	.file	"76700240.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Shutting down server...\n"
	.align 8
.LC1:
	.string	"Call shutdown() on server failed"
.LC2:
	.string	"Failed call close() on server"
	.text
	.type	performServerShutdown.0, @function
performServerShutdown.0:
.LFB7:
	.cfi_startproc
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 40
	.cfi_offset 3, -24
	mov	rbx, r10
	mov	QWORD PTR -40[rbp], r10
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 24
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	eax, DWORD PTR [rbx]
	mov	esi, 2
	mov	edi, eax
	call	shutdown@PLT
	mov	DWORD PTR -24[rbp], eax
	cmp	DWORD PTR -24[rbp], 0
	je	.L2
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	eax, 2
	jmp	.L3
.L2:
	mov	eax, DWORD PTR [rbx]
	mov	edi, eax
	call	close@PLT
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], 0
	je	.L4
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	eax, 2
	jmp	.L3
.L4:
	mov	eax, 1
.L3:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	performServerShutdown.0, .-performServerShutdown.0
	.section	.rodata
.LC3:
	.string	"/dev/input/event%s"
.LC4:
	.string	"/dev/input/event0"
	.align 8
.LC5:
	.string	"Failed to create a IPv4 TCP socket"
.LC6:
	.string	"Failed to setup a server"
.LC7:
	.string	"Failed to bind 0.0.0.0:%d!\n"
.LC8:
	.string	"Is the port already in use?"
.LC9:
	.string	"The error was"
	.align 8
.LC10:
	.string	"Failed to start listening for clients"
.LC11:
	.string	"Server started on port %d.\n"
	.align 8
.LC12:
	.string	"Failed to connect to new client.\n"
.LC13:
	.string	"New client connected."
.LC14:
	.string	"r"
	.align 8
.LC15:
	.string	"Failed to open wacom event file!\n"
	.align 8
.LC16:
	.string	"Failed to read wacom event file"
	.align 8
.LC17:
	.string	"Failed to close connection to client"
	.align 8
.LC18:
	.string	"Faild to close wacom event file"
.LC19:
	.string	"Connection to client lost"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 208
	mov	DWORD PTR -196[rbp], edi
	mov	QWORD PTR -208[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, 16[rbp]
	mov	QWORD PTR -104[rbp], rax
	cmp	DWORD PTR -196[rbp], 1
	jle	.L6
	mov	rax, QWORD PTR -208[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	lea	rax, -48[rbp]
	mov	rcx, rdx
	lea	rdx, .LC3[rip]
	mov	esi, 32
	mov	rdi, rax
	mov	eax, 0
	call	snprintf@PLT
	jmp	.L7
.L6:
	lea	rax, -48[rbp]
	lea	rdx, .LC4[rip]
	mov	esi, 32
	mov	rdi, rax
	mov	eax, 0
	call	snprintf@PLT
.L7:
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -112[rbp], eax
	mov	eax, DWORD PTR -112[rbp]
	test	eax, eax
	jne	.L8
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L25
.L8:
	mov	DWORD PTR -180[rbp], 1
	mov	eax, DWORD PTR -112[rbp]
	lea	rdx, -180[rbp]
	mov	r8d, 4
	mov	rcx, rdx
	mov	edx, 2
	mov	esi, 1
	mov	edi, eax
	call	setsockopt@PLT
	test	eax, eax
	je	.L10
	lea	rdi, .LC6[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L25
.L10:
	mov	WORD PTR -64[rbp], 2
	mov	DWORD PTR -60[rbp], 0
	mov	edi, 33333
	call	htons@PLT
	mov	WORD PTR -62[rbp], ax
	mov	QWORD PTR -168[rbp], 16
	mov	rax, QWORD PTR -168[rbp]
	mov	edx, eax
	mov	eax, DWORD PTR -112[rbp]
	lea	rcx, -64[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	jns	.L11
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, 33333
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 27
	mov	esi, 1
	lea	rdi, .LC8[rip]
	call	fwrite@PLT
	lea	rdi, .LC9[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L25
.L11:
	mov	DWORD PTR -176[rbp], 1
	mov	eax, DWORD PTR -112[rbp]
	lea	rdx, -176[rbp]
	mov	r8d, 4
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 6
	mov	edi, eax
	call	setsockopt@PLT
	mov	eax, DWORD PTR -112[rbp]
	mov	esi, 3
	mov	edi, eax
	call	listen@PLT
	test	eax, eax
	jns	.L12
	lea	rdi, .LC10[rip]
	call	perror@PLT
	mov	eax, 1
	jmp	.L25
.L12:
	mov	esi, 1
	mov	edi, 13
	call	signal@PLT
	mov	esi, 33333
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
.L24:
	mov	eax, DWORD PTR -112[rbp]
	lea	rdx, -168[rbp]
	lea	rcx, -64[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -172[rbp], eax
	cmp	DWORD PTR -172[rbp], 0
	jns	.L13
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 33
	mov	esi, 1
	lea	rdi, .LC12[rip]
	call	fwrite@PLT
	lea	rax, -112[rbp]
	mov	r10, rax
	mov	eax, 0
	call	performServerShutdown.0
	jmp	.L25
.L13:
	lea	rdi, .LC13[rip]
	call	puts@PLT
	lea	rax, -48[rbp]
	lea	rsi, .LC14[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -160[rbp], rax
	cmp	QWORD PTR -160[rbp], 0
	jne	.L15
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 33
	mov	esi, 1
	lea	rdi, .LC15[rip]
	call	fwrite@PLT
	lea	rax, -112[rbp]
	mov	r10, rax
	mov	eax, 0
	call	performServerShutdown.0
	jmp	.L25
.L15:
	mov	QWORD PTR -152[rbp], 24
	mov	QWORD PTR -144[rbp], 16
	mov	rax, QWORD PTR -152[rbp]
	sub	rax, QWORD PTR -144[rbp]
	mov	QWORD PTR -136[rbp], rax
.L23:
	mov	rcx, QWORD PTR -160[rbp]
	mov	rdx, QWORD PTR -152[rbp]
	lea	rax, -96[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	QWORD PTR -128[rbp], rax
	mov	rax, QWORD PTR -128[rbp]
	cmp	rax, QWORD PTR -152[rbp]
	je	.L16
	lea	rdi, .LC16[rip]
	call	perror@PLT
	mov	eax, DWORD PTR -172[rbp]
	mov	edi, eax
	call	close@PLT
	test	eax, eax
	je	.L17
	lea	rdi, .LC17[rip]
	call	perror@PLT
.L17:
	lea	rax, -112[rbp]
	mov	r10, rax
	mov	eax, 0
	call	performServerShutdown.0
	mov	rax, QWORD PTR -160[rbp]
	mov	rdi, rax
	call	fclose@PLT
	test	eax, eax
	je	.L18
	lea	rdi, .LC18[rip]
	call	perror@PLT
.L18:
	mov	eax, 1
	jmp	.L25
.L16:
	lea	rdx, -96[rbp]
	mov	rax, QWORD PTR -144[rbp]
	lea	rcx, [rdx+rax]
	mov	rdx, QWORD PTR -136[rbp]
	mov	eax, DWORD PTR -172[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	QWORD PTR -120[rbp], rax
	mov	rax, QWORD PTR -136[rbp]
	cmp	QWORD PTR -120[rbp], rax
	je	.L23
	lea	rdi, .LC19[rip]
	call	perror@PLT
	cmp	QWORD PTR -120[rbp], 0
	jg	.L23
	cmp	QWORD PTR -120[rbp], 0
	jne	.L20
	mov	eax, DWORD PTR -172[rbp]
	mov	edi, eax
	call	close@PLT
	test	eax, eax
	je	.L20
	lea	rdi, .LC17[rip]
	call	perror@PLT
.L20:
	mov	rax, QWORD PTR -160[rbp]
	mov	rdi, rax
	call	fclose@PLT
	test	eax, eax
	je	.L27
	lea	rdi, .LC18[rip]
	call	perror@PLT
.L27:
	nop
	jmp	.L24
.L25:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L26
	call	__stack_chk_fail@PLT
.L26:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"76700240.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Shutting down server...\012\000"
	.align	2
.LC1:
	.ascii	"Call shutdown() on server failed\000"
	.align	2
.LC2:
	.ascii	"Failed call close() on server\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	performServerShutdown.6772, %function
performServerShutdown.6772:
	@ Nested: function declared inside another function.
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	mov	r4, ip
	str	ip, [fp, #-24]
	ldr	r3, .L5
	ldr	r3, [r3]
	mov	r2, #24
	mov	r1, #1
	ldr	r0, .L5+4
	bl	fwrite
	ldr	r3, [r4]
	mov	r1, #2
	mov	r0, r3
	bl	shutdown
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	beq	.L2
	ldr	r0, .L5+8
	bl	perror
	mov	r3, #2
	b	.L3
.L2:
	ldr	r3, [r4]
	mov	r0, r3
	bl	close
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L4
	ldr	r0, .L5+12
	bl	perror
	mov	r3, #2
	b	.L3
.L4:
	mov	r3, #1
.L3:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L6:
	.align	2
.L5:
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	performServerShutdown.6772, .-performServerShutdown.6772
	.section	.rodata
	.align	2
.LC3:
	.ascii	"/dev/input/event%s\000"
	.align	2
.LC4:
	.ascii	"/dev/input/event0\000"
	.align	2
.LC5:
	.ascii	"Failed to create a IPv4 TCP socket\000"
	.align	2
.LC6:
	.ascii	"Failed to setup a server\000"
	.align	2
.LC7:
	.ascii	"Failed to bind 0.0.0.0:%d!\012\000"
	.align	2
.LC8:
	.ascii	"Is the port already in use?\000"
	.align	2
.LC9:
	.ascii	"The error was\000"
	.align	2
.LC10:
	.ascii	"Failed to start listening for clients\000"
	.align	2
.LC11:
	.ascii	"Server started on port %d.\012\000"
	.align	2
.LC12:
	.ascii	"Failed to connect to new client.\012\000"
	.align	2
.LC13:
	.ascii	"New client connected.\000"
	.align	2
.LC14:
	.ascii	"r\000"
	.align	2
.LC15:
	.ascii	"Failed to open wacom event file!\012\000"
	.align	2
.LC16:
	.ascii	"Failed to read wacom event file\000"
	.align	2
.LC17:
	.ascii	"Failed to close connection to client\000"
	.align	2
.LC18:
	.ascii	"Faild to close wacom event file\000"
	.align	2
.LC19:
	.ascii	"Connection to client lost\000"
	.align	2
.LC20:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 128
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #136
	str	r0, [fp, #-128]
	str	r1, [fp, #-132]
	ldr	r3, .L30
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	add	r3, fp, #4
	str	r3, [fp, #-76]
	ldr	r3, [fp, #-128]
	cmp	r3, #1
	ble	.L8
	ldr	r3, [fp, #-132]
	add	r3, r3, #4
	ldr	r3, [r3]
	sub	r0, fp, #40
	ldr	r2, .L30+4
	mov	r1, #32
	bl	snprintf
	b	.L9
.L8:
	sub	r3, fp, #40
	ldr	r2, .L30+8
	mov	r1, #32
	mov	r0, r3
	bl	snprintf
.L9:
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	mov	r3, r0
	str	r3, [fp, #-80]
	ldr	r3, [fp, #-80]
	cmp	r3, #0
	bne	.L10
	ldr	r0, .L30+12
	bl	perror
	mov	r3, #1
	b	.L27
.L10:
	mov	r3, #1
	str	r3, [fp, #-120]
	ldr	r0, [fp, #-80]
	sub	r3, fp, #120
	mov	r2, #4
	str	r2, [sp]
	mov	r2, #2
	mov	r1, #1
	bl	setsockopt
	mov	r3, r0
	cmp	r3, #0
	beq	.L12
	ldr	r0, .L30+16
	bl	perror
	mov	r3, #1
	b	.L27
.L12:
	mov	r3, #2
	strh	r3, [fp, #-56]	@ movhi
	mov	r3, #0
	str	r3, [fp, #-52]
	ldr	r0, .L30+20
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-54]	@ movhi
	mov	r3, #16
	str	r3, [fp, #-116]
	ldr	r2, [fp, #-116]
	ldr	r3, [fp, #-80]
	sub	r1, fp, #56
	mov	r0, r3
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	bge	.L13
	ldr	r3, .L30+24
	ldr	r3, [r3]
	ldr	r2, .L30+20
	ldr	r1, .L30+28
	mov	r0, r3
	bl	fprintf
	ldr	r3, .L30+24
	ldr	r3, [r3]
	mov	r2, #27
	mov	r1, #1
	ldr	r0, .L30+32
	bl	fwrite
	ldr	r0, .L30+36
	bl	perror
	mov	r3, #1
	b	.L27
.L13:
	mov	r3, #1
	str	r3, [fp, #-112]
	ldr	r0, [fp, #-80]
	sub	r3, fp, #112
	mov	r2, #4
	str	r2, [sp]
	mov	r2, #1
	mov	r1, #6
	bl	setsockopt
	ldr	r3, [fp, #-80]
	mov	r1, #3
	mov	r0, r3
	bl	listen
	mov	r3, r0
	cmp	r3, #0
	bge	.L14
	ldr	r0, .L30+40
	bl	perror
	mov	r3, #1
	b	.L27
.L14:
	mov	r1, #1
	mov	r0, #13
	bl	signal
	ldr	r1, .L30+20
	ldr	r0, .L30+44
	bl	printf
.L26:
	ldr	r3, [fp, #-80]
	sub	r2, fp, #116
	sub	r1, fp, #56
	mov	r0, r3
	bl	accept
	str	r0, [fp, #-108]
	ldr	r3, [fp, #-108]
	cmp	r3, #0
	bge	.L15
	ldr	r3, .L30+24
	ldr	r3, [r3]
	mov	r2, #33
	mov	r1, #1
	ldr	r0, .L30+48
	bl	fwrite
	sub	r3, fp, #80
	mov	ip, r3
	bl	performServerShutdown.6772
	mov	r3, r0
	b	.L27
.L15:
	ldr	r0, .L30+52
	bl	puts
	sub	r3, fp, #40
	ldr	r1, .L30+56
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-104]
	ldr	r3, [fp, #-104]
	cmp	r3, #0
	bne	.L17
	ldr	r3, .L30+24
	ldr	r3, [r3]
	mov	r2, #33
	mov	r1, #1
	ldr	r0, .L30+60
	bl	fwrite
	sub	r3, fp, #80
	mov	ip, r3
	bl	performServerShutdown.6772
	mov	r3, r0
	b	.L27
.L17:
	mov	r3, #16
	str	r3, [fp, #-100]
	mov	r3, #8
	str	r3, [fp, #-96]
	ldr	r2, [fp, #-100]
	ldr	r3, [fp, #-96]
	sub	r3, r2, r3
	str	r3, [fp, #-92]
.L25:
	sub	r0, fp, #72
	ldr	r3, [fp, #-104]
	ldr	r2, [fp, #-100]
	mov	r1, #1
	bl	fread
	str	r0, [fp, #-88]
	ldr	r2, [fp, #-88]
	ldr	r3, [fp, #-100]
	cmp	r2, r3
	beq	.L18
	ldr	r0, .L30+64
	bl	perror
	ldr	r0, [fp, #-108]
	bl	close
	mov	r3, r0
	cmp	r3, #0
	beq	.L19
	ldr	r0, .L30+68
	bl	perror
.L19:
	sub	r3, fp, #80
	mov	ip, r3
	bl	performServerShutdown.6772
	ldr	r0, [fp, #-104]
	bl	fclose
	mov	r3, r0
	cmp	r3, #0
	beq	.L20
	ldr	r0, .L30+72
	bl	perror
.L20:
	mov	r3, #1
	b	.L27
.L18:
	sub	r2, fp, #72
	ldr	r3, [fp, #-96]
	add	r3, r2, r3
	ldr	r2, [fp, #-92]
	mov	r1, r3
	ldr	r0, [fp, #-108]
	bl	write
	str	r0, [fp, #-84]
	ldr	r3, [fp, #-84]
	ldr	r2, [fp, #-92]
	cmp	r2, r3
	beq	.L25
	ldr	r0, .L30+76
	bl	perror
	ldr	r3, [fp, #-84]
	cmp	r3, #0
	bgt	.L25
	ldr	r3, [fp, #-84]
	cmp	r3, #0
	bne	.L22
	ldr	r0, [fp, #-108]
	bl	close
	mov	r3, r0
	cmp	r3, #0
	beq	.L22
	ldr	r0, .L30+68
	bl	perror
.L22:
	ldr	r0, [fp, #-104]
	bl	fclose
	mov	r3, r0
	cmp	r3, #0
	beq	.L29
	ldr	r0, .L30+72
	bl	perror
.L29:
	nop
	b	.L26
.L27:
	ldr	r2, .L30
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L28
	bl	__stack_chk_fail
.L28:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L31:
	.align	2
.L30:
	.word	.LC20
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	33333
	.word	stderr
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
