	.file	"310768.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"APPEND "
.LC1:
	.string	"%s %s"
	.text
	.globl	get_request
	.type	get_request, @function
get_request:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 1064
	.cfi_offset 3, -24
	mov	QWORD PTR -1064[rbp], rdi
	mov	QWORD PTR -1072[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -1064[rbp]
	mov	ecx, 640
	mov	esi, 0
	mov	QWORD PTR [rax], rsi
	mov	edx, ecx
	add	rdx, rax
	add	rdx, 8
	mov	QWORD PTR -16[rdx], rsi
	lea	rdx, 8[rax]
	and	rdx, -8
	sub	rax, rdx
	add	ecx, eax
	and	ecx, -8
	mov	eax, ecx
	shr	eax, 3
	mov	ecx, eax
	mov	rdi, rdx
	mov	rax, rsi
	rep stosq
	mov	WORD PTR -1026[rbp], 34
	mov	rdx, QWORD PTR -1072[rbp]
	lea	rax, -1024[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	lea	rdx, -1026[rbp]
	lea	rax, -1024[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strtok@PLT
	mov	QWORD PTR -1040[rbp], rax
	mov	rax, QWORD PTR -1040[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L2
	mov	rax, QWORD PTR -1064[rbp]
	mov	rdx, QWORD PTR -1040[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	lea	rax, -1026[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	strtok@PLT
	mov	QWORD PTR -1040[rbp], rax
	mov	rax, QWORD PTR -1064[rbp]
	lea	rdx, 384[rax]
	mov	rax, QWORD PTR -1040[rbp]
	mov	rsi, rax
	mov	rdi, rdx
	call	strcpy@PLT
	lea	rax, -1026[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	strtok@PLT
	mov	QWORD PTR -1040[rbp], rax
	mov	DWORD PTR -1044[rbp], 0
	jmp	.L3
.L4:
	mov	eax, DWORD PTR -1044[rbp]
	cdqe
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR -1040[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -1044[rbp]
	movsx	rcx, edx
	mov	rdx, QWORD PTR -1040[rbp]
	add	rdx, rcx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR [rdx], al
	add	DWORD PTR -1044[rbp], 1
.L3:
	mov	eax, DWORD PTR -1044[rbp]
	movsx	rbx, eax
	mov	rax, QWORD PTR -1040[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rbx, rax
	jb	.L4
	mov	rax, QWORD PTR -1040[rbp]
	mov	rdi, rax
	call	strlen@PLT
	lea	rdx, -2[rax]
	mov	rax, QWORD PTR -1064[rbp]
	lea	rcx, 128[rax]
	mov	rax, QWORD PTR -1040[rbp]
	mov	rsi, rax
	mov	rdi, rcx
	call	strncpy@PLT
	jmp	.L7
.L2:
	mov	rax, QWORD PTR -1064[rbp]
	lea	rcx, 128[rax]
	mov	rdx, QWORD PTR -1064[rbp]
	mov	rax, QWORD PTR -1072[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
.L7:
	nop
	mov	rax, QWORD PTR -24[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	get_request, .-get_request
	.section	.rodata
.LC2:
	.string	"open"
	.align 8
.LC3:
	.string	"ERROR-1 File could not be openned\n"
.LC4:
	.string	"OK-1 File open OK\n"
.LC5:
	.string	"\n"
	.text
	.globl	send_file
	.type	send_file, @function
send_file:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 4048
	mov	DWORD PTR -4036[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, 144[rbp]
	mov	edx, 256
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -4024[rbp], eax
	cmp	DWORD PTR -4024[rbp], -1
	jne	.L9
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	eax, DWORD PTR -4036[rbp]
	mov	ecx, 0
	mov	edx, 34
	lea	rsi, .LC3[rip]
	mov	edi, eax
	call	send@PLT
	jmp	.L8
.L9:
	mov	eax, DWORD PTR -4036[rbp]
	mov	ecx, 0
	mov	edx, 18
	lea	rsi, .LC4[rip]
	mov	edi, eax
	call	send@PLT
.L12:
	lea	rax, -4016[rbp]
	mov	rsi, rax
	mov	eax, 0
	mov	edx, 500
	mov	rdi, rsi
	mov	rcx, rdx
	rep stosq
	lea	rcx, -4016[rbp]
	mov	eax, DWORD PTR -4024[rbp]
	mov	edx, 4000
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -4020[rbp], eax
	cmp	DWORD PTR -4020[rbp], 0
	jle	.L11
	mov	eax, DWORD PTR -4020[rbp]
	movsx	rdx, eax
	lea	rsi, -4016[rbp]
	mov	eax, DWORD PTR -4036[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
.L11:
	cmp	DWORD PTR -4020[rbp], 0
	jg	.L12
	mov	eax, DWORD PTR -4024[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -4036[rbp]
	mov	ecx, 0
	mov	edx, 1
	lea	rsi, .LC5[rip]
	mov	edi, eax
	call	send@PLT
	nop
.L8:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L14
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	send_file, .-send_file
	.section	.rodata
.LC6:
	.string	"create"
	.align 8
.LC7:
	.string	"ERROR-2 File could not be created\n"
.LC8:
	.string	"OK-5 File created OK\n"
	.text
	.globl	create_file
	.type	create_file, @function
create_file:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	lea	rax, 144[rbp]
	mov	edx, 511
	mov	esi, 193
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L16
	lea	rdi, .LC6[rip]
	call	perror@PLT
	mov	eax, DWORD PTR -20[rbp]
	mov	ecx, 0
	mov	edx, 34
	lea	rsi, .LC7[rip]
	mov	edi, eax
	call	send@PLT
	jmp	.L15
.L16:
	mov	eax, DWORD PTR -20[rbp]
	mov	ecx, 0
	mov	edx, 21
	lea	rsi, .LC8[rip]
	mov	edi, eax
	call	send@PLT
	mov	eax, DWORD PTR -4[rbp]
	mov	edi, eax
	call	close@PLT
	nop
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	create_file, .-create_file
	.section	.rodata
.LC9:
	.string	"remove"
	.align 8
.LC10:
	.string	"ERROR-3 File could not be removed\n"
.LC11:
	.string	"OK-6 File removed OK\n"
	.text
	.globl	remove_file
	.type	remove_file, @function
remove_file:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	lea	rax, 144[rbp]
	mov	rdi, rax
	call	remove@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L19
	lea	rdi, .LC9[rip]
	call	perror@PLT
	mov	eax, DWORD PTR -20[rbp]
	mov	ecx, 0
	mov	edx, 34
	lea	rsi, .LC10[rip]
	mov	edi, eax
	call	send@PLT
	jmp	.L18
.L19:
	mov	eax, DWORD PTR -20[rbp]
	mov	ecx, 0
	mov	edx, 21
	lea	rsi, .LC11[rip]
	mov	edi, eax
	call	send@PLT
	nop
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	remove_file, .-remove_file
	.section	.rodata
.LC12:
	.string	"append"
	.align 8
.LC13:
	.string	"ERROR 4 Content could not be appended\n"
.LC14:
	.string	"OK-7 Content appended\n"
	.text
	.globl	append_content
	.type	append_content, @function
append_content:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	lea	rax, 144[rbp]
	mov	esi, 1026
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L22
	lea	rdi, .LC12[rip]
	call	perror@PLT
	mov	eax, DWORD PTR -20[rbp]
	mov	ecx, 0
	mov	edx, 38
	lea	rsi, .LC13[rip]
	mov	edi, eax
	call	send@PLT
	jmp	.L21
.L22:
	lea	rax, 400[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rcx, 400[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	eax, DWORD PTR -20[rbp]
	mov	ecx, 0
	mov	edx, 22
	lea	rsi, .LC14[rip]
	mov	edi, eax
	call	send@PLT
	nop
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	append_content, .-append_content
	.section	.rodata
.LC15:
	.string	"GET"
.LC16:
	.string	"OK-0 method GET OK\n"
.LC17:
	.string	"CREATE"
.LC18:
	.string	"OK-2 method CREATE OK\n"
.LC19:
	.string	"REMOVE"
.LC20:
	.string	"OK-3 method REMOVE OK\n"
.LC21:
	.string	"OK-4 method APPEND OK\n"
.LC22:
	.string	"ERROR-0 Method not supported\n"
	.text
	.globl	proc_request
	.type	proc_request, @function
proc_request:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	lea	rsi, .LC15[rip]
	lea	rdi, 16[rbp]
	call	strcmp@PLT
	test	eax, eax
	jne	.L25
	mov	eax, DWORD PTR -4[rbp]
	mov	ecx, 0
	mov	edx, 19
	lea	rsi, .LC16[rip]
	mov	edi, eax
	call	send@PLT
	mov	r8d, DWORD PTR -4[rbp]
	sub	rsp, 640
	mov	rax, rsp
	mov	rdi, rax
	lea	rax, 16[rbp]
	mov	edx, 80
	mov	rsi, rax
	mov	rcx, rdx
	rep movsq
	mov	edi, r8d
	call	send_file
	add	rsp, 640
	jmp	.L30
.L25:
	lea	rsi, .LC17[rip]
	lea	rdi, 16[rbp]
	call	strcmp@PLT
	test	eax, eax
	jne	.L27
	mov	eax, DWORD PTR -4[rbp]
	mov	ecx, 0
	mov	edx, 22
	lea	rsi, .LC18[rip]
	mov	edi, eax
	call	send@PLT
	mov	r8d, DWORD PTR -4[rbp]
	sub	rsp, 640
	mov	rax, rsp
	mov	rdi, rax
	lea	rax, 16[rbp]
	mov	edx, 80
	mov	rsi, rax
	mov	rcx, rdx
	rep movsq
	mov	edi, r8d
	call	create_file
	add	rsp, 640
	jmp	.L30
.L27:
	lea	rsi, .LC19[rip]
	lea	rdi, 16[rbp]
	call	strcmp@PLT
	test	eax, eax
	jne	.L28
	mov	eax, DWORD PTR -4[rbp]
	mov	ecx, 0
	mov	edx, 22
	lea	rsi, .LC20[rip]
	mov	edi, eax
	call	send@PLT
	mov	r8d, DWORD PTR -4[rbp]
	sub	rsp, 640
	mov	rax, rsp
	mov	rdi, rax
	lea	rax, 16[rbp]
	mov	edx, 80
	mov	rsi, rax
	mov	rcx, rdx
	rep movsq
	mov	edi, r8d
	call	remove_file
	add	rsp, 640
	jmp	.L30
.L28:
	lea	rsi, .LC0[rip]
	lea	rdi, 16[rbp]
	call	strcmp@PLT
	test	eax, eax
	jne	.L29
	mov	eax, DWORD PTR -4[rbp]
	mov	ecx, 0
	mov	edx, 22
	lea	rsi, .LC21[rip]
	mov	edi, eax
	call	send@PLT
	mov	r8d, DWORD PTR -4[rbp]
	sub	rsp, 640
	mov	rax, rsp
	mov	rdi, rax
	lea	rax, 16[rbp]
	mov	edx, 80
	mov	rsi, rax
	mov	rcx, rdx
	rep movsq
	mov	edi, r8d
	call	append_content
	add	rsp, 640
	jmp	.L30
.L29:
	mov	eax, DWORD PTR -4[rbp]
	mov	ecx, 0
	mov	edx, 29
	lea	rsi, .LC22[rip]
	mov	edi, eax
	call	send@PLT
.L30:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	proc_request, .-proc_request
	.section	.rodata
.LC23:
	.string	"socket"
.LC24:
	.string	"bind"
.LC25:
	.string	"listen"
	.text
	.globl	setup_server
	.type	setup_server, @function
setup_server:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	DWORD PTR -52[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -40[rbp], 1
	mov	edx, 6
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -36[rbp], eax
	lea	rdx, -40[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	r8d, 4
	mov	rcx, rdx
	mov	edx, 2
	mov	esi, 1
	mov	edi, eax
	call	setsockopt@PLT
	cmp	DWORD PTR -36[rbp], -1
	jne	.L32
	lea	rdi, .LC23[rip]
	call	perror@PLT
	mov	eax, 0
	jmp	.L36
.L32:
	mov	eax, DWORD PTR -52[rbp]
	mov	WORD PTR -30[rbp], ax
	mov	WORD PTR -32[rbp], 2
	mov	DWORD PTR -28[rbp], 0
	lea	rcx, -32[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	cmp	eax, -1
	jne	.L34
	lea	rdi, .LC24[rip]
	call	perror@PLT
	mov	eax, 0
	jmp	.L36
.L34:
	mov	eax, DWORD PTR -36[rbp]
	mov	esi, 1000
	mov	edi, eax
	call	listen@PLT
	cmp	eax, -1
	jne	.L35
	lea	rdi, .LC25[rip]
	call	perror@PLT
	mov	eax, 0
	jmp	.L36
.L35:
	mov	eax, DWORD PTR -36[rbp]
.L36:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L37
	call	__stack_chk_fail@PLT
.L37:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	setup_server, .-setup_server
	.section	.rodata
.LC26:
	.string	"accept"
.LC27:
	.string	"**Client %s:%d connected\n"
	.text
	.globl	accept_new_connection
	.type	accept_new_connection, @function
accept_new_connection:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 72
	.cfi_offset 3, -24
	mov	DWORD PTR -68[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -56[rbp], 16
	lea	rdx, -56[rbp]
	lea	rcx, -48[rbp]
	mov	eax, DWORD PTR -68[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -52[rbp], eax
	cmp	DWORD PTR -52[rbp], -1
	jne	.L39
	lea	rdi, .LC26[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L39:
	movzx	eax, WORD PTR -46[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	ntohs@PLT
	movzx	ebx, ax
	mov	eax, DWORD PTR -44[rbp]
	mov	edi, eax
	call	inet_ntoa@PLT
	mov	edx, ebx
	mov	rsi, rax
	lea	rdi, .LC27[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -52[rbp]
	mov	rcx, QWORD PTR -24[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L41
	call	__stack_chk_fail@PLT
.L41:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	accept_new_connection, .-accept_new_connection
	.section	.rodata
.LC28:
	.string	"method: %s\nfilename: %s\n"
	.text
	.globl	handle_connection
	.type	handle_connection, @function
handle_connection:
.LFB14:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 1680
	mov	DWORD PTR -1668[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -1008[rbp]
	mov	rsi, rax
	mov	eax, 0
	mov	edx, 125
	mov	rdi, rsi
	mov	rcx, rdx
	rep stosq
	lea	rsi, -1008[rbp]
	mov	eax, DWORD PTR -1668[rbp]
	mov	ecx, 0
	mov	edx, 1000
	mov	edi, eax
	call	recv@PLT
	mov	DWORD PTR -1652[rbp], eax
	cmp	DWORD PTR -1652[rbp], 0
	jle	.L43
	lea	rdx, -1008[rbp]
	lea	rax, -1648[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	get_request
	lea	rax, -1648[rbp]
	lea	rdx, 128[rax]
	lea	rax, -1648[rbp]
	mov	rsi, rax
	lea	rdi, .LC28[rip]
	mov	eax, 0
	call	printf@PLT
	mov	r8d, DWORD PTR -1668[rbp]
	sub	rsp, 640
	mov	rax, rsp
	mov	rdi, rax
	lea	rax, -1648[rbp]
	mov	edx, 80
	mov	rsi, rax
	mov	rcx, rdx
	rep movsq
	mov	edi, r8d
	call	proc_request
	add	rsp, 640
.L43:
	mov	eax, DWORD PTR -1668[rbp]
	mov	edi, eax
	call	close@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L44
	call	__stack_chk_fail@PLT
.L44:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	handle_connection, .-handle_connection
	.section	.rodata
.LC29:
	.string	"Uso: %s <porta>\n"
.LC30:
	.string	"**Waiting for connections"
.LC31:
	.string	"select"
	.text
	.globl	main
	.type	main, @function
main:
.LFB15:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 320
	mov	DWORD PTR -308[rbp], edi
	mov	QWORD PTR -320[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -308[rbp], 2
	je	.L46
	mov	rax, QWORD PTR -320[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC29[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L54
	jmp	.L55
.L46:
	mov	rax, QWORD PTR -320[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	movzx	eax, ax
	mov	edi, eax
	call	setup_server
	mov	DWORD PTR -288[rbp], eax
	mov	eax, 0
	mov	ecx, 16
	lea	rdx, -272[rbp]
	mov	rdi, rdx
#APP
# 251 "the_stack_data/310768.c" 1
	cld; rep; stosq
# 0 "" 2
#NO_APP
	mov	eax, edi
	mov	edx, ecx
	mov	DWORD PTR -284[rbp], edx
	mov	DWORD PTR -280[rbp], eax
	mov	eax, DWORD PTR -288[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	esi, eax
	movsx	rax, esi
	mov	rdi, QWORD PTR -272[rbp+rax*8]
	mov	eax, DWORD PTR -288[rbp]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	or	rdi, rax
	mov	rdx, rdi
	movsx	rax, esi
	mov	QWORD PTR -272[rbp+rax*8], rdx
.L53:
	lea	rdi, .LC30[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -272[rbp]
	mov	rdx, QWORD PTR -264[rbp]
	mov	QWORD PTR -144[rbp], rax
	mov	QWORD PTR -136[rbp], rdx
	mov	rax, QWORD PTR -256[rbp]
	mov	rdx, QWORD PTR -248[rbp]
	mov	QWORD PTR -128[rbp], rax
	mov	QWORD PTR -120[rbp], rdx
	mov	rax, QWORD PTR -240[rbp]
	mov	rdx, QWORD PTR -232[rbp]
	mov	QWORD PTR -112[rbp], rax
	mov	QWORD PTR -104[rbp], rdx
	mov	rax, QWORD PTR -224[rbp]
	mov	rdx, QWORD PTR -216[rbp]
	mov	QWORD PTR -96[rbp], rax
	mov	QWORD PTR -88[rbp], rdx
	mov	rax, QWORD PTR -208[rbp]
	mov	rdx, QWORD PTR -200[rbp]
	mov	QWORD PTR -80[rbp], rax
	mov	QWORD PTR -72[rbp], rdx
	mov	rax, QWORD PTR -192[rbp]
	mov	rdx, QWORD PTR -184[rbp]
	mov	QWORD PTR -64[rbp], rax
	mov	QWORD PTR -56[rbp], rdx
	mov	rax, QWORD PTR -176[rbp]
	mov	rdx, QWORD PTR -168[rbp]
	mov	QWORD PTR -48[rbp], rax
	mov	QWORD PTR -40[rbp], rdx
	mov	rax, QWORD PTR -160[rbp]
	mov	rdx, QWORD PTR -152[rbp]
	mov	QWORD PTR -32[rbp], rax
	mov	QWORD PTR -24[rbp], rdx
	lea	rax, -144[rbp]
	mov	r8d, 0
	mov	ecx, 0
	mov	edx, 0
	mov	rsi, rax
	mov	edi, 1024
	call	select@PLT
	test	eax, eax
	jns	.L48
	lea	rdi, .LC31[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L48:
	mov	DWORD PTR -292[rbp], 0
	jmp	.L49
.L52:
	mov	eax, DWORD PTR -292[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	cdqe
	mov	rsi, QWORD PTR -144[rbp+rax*8]
	mov	eax, DWORD PTR -292[rbp]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	and	rax, rsi
	test	rax, rax
	je	.L50
	mov	eax, DWORD PTR -292[rbp]
	cmp	eax, DWORD PTR -288[rbp]
	jne	.L51
	mov	eax, DWORD PTR -288[rbp]
	mov	edi, eax
	call	accept_new_connection
	mov	DWORD PTR -276[rbp], eax
	mov	eax, DWORD PTR -276[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	esi, eax
	movsx	rax, esi
	mov	rdi, QWORD PTR -272[rbp+rax*8]
	mov	eax, DWORD PTR -276[rbp]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	or	rdi, rax
	mov	rdx, rdi
	movsx	rax, esi
	mov	QWORD PTR -272[rbp+rax*8], rdx
	jmp	.L50
.L51:
	mov	eax, DWORD PTR -292[rbp]
	mov	edi, eax
	call	handle_connection
	mov	eax, DWORD PTR -292[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	esi, eax
	movsx	rax, esi
	mov	rdi, QWORD PTR -272[rbp+rax*8]
	mov	eax, DWORD PTR -292[rbp]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	not	rax
	and	rdi, rax
	mov	rdx, rdi
	movsx	rax, esi
	mov	QWORD PTR -272[rbp+rax*8], rdx
.L50:
	add	DWORD PTR -292[rbp], 1
.L49:
	cmp	DWORD PTR -292[rbp], 1023
	jle	.L52
	jmp	.L53
.L55:
	call	__stack_chk_fail@PLT
.L54:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.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	"310768.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"APPEND \000"
	.align	2
.LC1:
	.ascii	"%s %s\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	get_request
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_request, %function
get_request:
	@ args = 0, pretend = 0, frame = 1024
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #1024
	sub	sp, sp, #4
	str	r0, [fp, #-1032]
	str	r1, [fp, #-1036]
	ldr	r3, .L8
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, [fp, #-1032]
	mov	r0, r3
	mov	r3, #640
	mov	r2, r3
	mov	r1, #0
	bl	memset
	sub	r3, fp, #12
	sub	r3, r3, #1008
	mov	r2, #34
	strh	r2, [r3]	@ movhi
	sub	r3, fp, #1016
	ldr	r1, [fp, #-1036]
	mov	r0, r3
	bl	strcpy
	sub	r2, fp, #1020
	sub	r3, fp, #1016
	mov	r1, r2
	mov	r0, r3
	bl	strtok
	str	r0, [fp, #-1024]
	ldr	r1, .L8+4
	ldr	r0, [fp, #-1024]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L2
	ldr	r3, [fp, #-1032]
	ldr	r1, [fp, #-1024]
	mov	r0, r3
	bl	strcpy
	sub	r3, fp, #1020
	mov	r1, r3
	mov	r0, #0
	bl	strtok
	str	r0, [fp, #-1024]
	ldr	r3, [fp, #-1032]
	add	r3, r3, #384
	ldr	r1, [fp, #-1024]
	mov	r0, r3
	bl	strcpy
	sub	r3, fp, #1020
	mov	r1, r3
	mov	r0, #0
	bl	strtok
	str	r0, [fp, #-1024]
	mov	r3, #0
	str	r3, [fp, #-1028]
	b	.L3
.L4:
	ldr	r3, [fp, #-1028]
	add	r3, r3, #1
	ldr	r2, [fp, #-1024]
	add	r2, r2, r3
	ldr	r3, [fp, #-1028]
	ldr	r1, [fp, #-1024]
	add	r3, r1, r3
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r3, [fp, #-1028]
	add	r3, r3, #1
	str	r3, [fp, #-1028]
.L3:
	ldr	r0, [fp, #-1024]
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-1028]
	cmp	r2, r3
	bhi	.L4
	ldr	r3, [fp, #-1032]
	add	r4, r3, #128
	ldr	r0, [fp, #-1024]
	bl	strlen
	mov	r3, r0
	sub	r3, r3, #2
	mov	r2, r3
	ldr	r1, [fp, #-1024]
	mov	r0, r4
	bl	strncpy
	b	.L7
.L2:
	ldr	r2, [fp, #-1032]
	ldr	r3, [fp, #-1032]
	add	r3, r3, #128
	ldr	r1, .L8+8
	ldr	r0, [fp, #-1036]
	bl	__isoc99_sscanf
.L7:
	nop
	ldr	r3, .L8
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L6
	bl	__stack_chk_fail
.L6:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L9:
	.align	2
.L8:
	.word	.LC2
	.word	.LC0
	.word	.LC1
	.size	get_request, .-get_request
	.section	.rodata
	.align	2
.LC3:
	.ascii	"open\000"
	.align	2
.LC4:
	.ascii	"ERROR-1 File could not be openned\012\000"
	.align	2
.LC5:
	.ascii	"OK-1 File open OK\012\000"
	.align	2
.LC6:
	.ascii	"\012\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	send_file
	.syntax unified
	.arm
	.fpu softvfp
	.type	send_file, %function
send_file:
	@ args = 644, pretend = 16, frame = 4024
	@ frame_needed = 1, uses_anonymous_args = 0
	sub	sp, sp, #16
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #4016
	sub	sp, sp, #8
	str	r0, [fp, #-4024]
	add	r0, fp, #8
	stm	r0, {r1, r2, r3}
	ldr	r3, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	add	r3, fp, #8
	add	r3, r3, #128
	mov	r2, #256
	mov	r1, #0
	mov	r0, r3
	bl	open
	str	r0, [fp, #-4016]
	ldr	r3, [fp, #-4016]
	cmn	r3, #1
	bne	.L11
	ldr	r0, .L17+4
	bl	perror
	mov	r3, #0
	mov	r2, #34
	ldr	r1, .L17+8
	ldr	r0, [fp, #-4024]
	bl	send
	b	.L10
.L11:
	mov	r3, #0
	mov	r2, #18
	ldr	r1, .L17+12
	ldr	r0, [fp, #-4024]
	bl	send
.L14:
	sub	r3, fp, #4000
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	mov	r3, #4000
	mov	r2, r3
	mov	r1, #0
	bl	memset
	sub	r3, fp, #4000
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #4000
	mov	r1, r3
	ldr	r0, [fp, #-4016]
	bl	read
	str	r0, [fp, #-4012]
	ldr	r3, [fp, #-4012]
	cmp	r3, #0
	ble	.L13
	ldr	r2, [fp, #-4012]
	sub	r1, fp, #4000
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	ldr	r0, [fp, #-4024]
	bl	send
.L13:
	ldr	r3, [fp, #-4012]
	cmp	r3, #0
	bgt	.L14
	ldr	r0, [fp, #-4016]
	bl	close
	mov	r3, #0
	mov	r2, #1
	ldr	r1, .L17+16
	ldr	r0, [fp, #-4024]
	bl	send
	nop
.L10:
	ldr	r3, .L17
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L16
	bl	__stack_chk_fail
.L16:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, lr}
	add	sp, sp, #16
	bx	lr
.L18:
	.align	2
.L17:
	.word	.LC7
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	send_file, .-send_file
	.section	.rodata
	.align	2
.LC8:
	.ascii	"create\000"
	.align	2
.LC9:
	.ascii	"ERROR-2 File could not be created\012\000"
	.align	2
.LC10:
	.ascii	"OK-5 File created OK\012\000"
	.text
	.align	2
	.global	create_file
	.syntax unified
	.arm
	.fpu softvfp
	.type	create_file, %function
create_file:
	@ args = 644, pretend = 16, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	sub	sp, sp, #16
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	add	r0, fp, #8
	stm	r0, {r1, r2, r3}
	add	r3, fp, #8
	add	r3, r3, #128
	ldr	r2, .L22
	mov	r1, #193
	mov	r0, r3
	bl	open
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L20
	ldr	r0, .L22+4
	bl	perror
	mov	r3, #0
	mov	r2, #34
	ldr	r1, .L22+8
	ldr	r0, [fp, #-16]
	bl	send
	b	.L19
.L20:
	mov	r3, #0
	mov	r2, #21
	ldr	r1, .L22+12
	ldr	r0, [fp, #-16]
	bl	send
	ldr	r0, [fp, #-8]
	bl	close
	nop
.L19:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, lr}
	add	sp, sp, #16
	bx	lr
.L23:
	.align	2
.L22:
	.word	511
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.size	create_file, .-create_file
	.section	.rodata
	.align	2
.LC11:
	.ascii	"remove\000"
	.align	2
.LC12:
	.ascii	"ERROR-3 File could not be removed\012\000"
	.align	2
.LC13:
	.ascii	"OK-6 File removed OK\012\000"
	.text
	.align	2
	.global	remove_file
	.syntax unified
	.arm
	.fpu softvfp
	.type	remove_file, %function
remove_file:
	@ args = 644, pretend = 16, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	sub	sp, sp, #16
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	add	r0, fp, #8
	stm	r0, {r1, r2, r3}
	add	r3, fp, #8
	add	r3, r3, #128
	mov	r0, r3
	bl	remove
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L25
	ldr	r0, .L27
	bl	perror
	mov	r3, #0
	mov	r2, #34
	ldr	r1, .L27+4
	ldr	r0, [fp, #-16]
	bl	send
	b	.L24
.L25:
	mov	r3, #0
	mov	r2, #21
	ldr	r1, .L27+8
	ldr	r0, [fp, #-16]
	bl	send
	nop
.L24:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, lr}
	add	sp, sp, #16
	bx	lr
.L28:
	.align	2
.L27:
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.size	remove_file, .-remove_file
	.section	.rodata
	.align	2
.LC14:
	.ascii	"append\000"
	.align	2
.LC15:
	.ascii	"ERROR 4 Content could not be appended\012\000"
	.align	2
.LC16:
	.ascii	"OK-7 Content appended\012\000"
	.text
	.align	2
	.global	append_content
	.syntax unified
	.arm
	.fpu softvfp
	.type	append_content, %function
append_content:
	@ args = 644, pretend = 16, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	sub	sp, sp, #16
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	add	r0, fp, #8
	stm	r0, {r1, r2, r3}
	add	r3, fp, #8
	add	r3, r3, #128
	ldr	r1, .L32
	mov	r0, r3
	bl	open
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L30
	ldr	r0, .L32+4
	bl	perror
	mov	r3, #0
	mov	r2, #38
	ldr	r1, .L32+8
	ldr	r0, [fp, #-16]
	bl	send
	b	.L29
.L30:
	add	r3, fp, #8
	add	r3, r3, #384
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	add	r3, fp, #8
	add	r3, r3, #384
	mov	r1, r3
	ldr	r0, [fp, #-8]
	bl	write
	mov	r3, #0
	mov	r2, #22
	ldr	r1, .L32+12
	ldr	r0, [fp, #-16]
	bl	send
	nop
.L29:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, lr}
	add	sp, sp, #16
	bx	lr
.L33:
	.align	2
.L32:
	.word	1026
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.size	append_content, .-append_content
	.section	.rodata
	.align	2
.LC17:
	.ascii	"GET\000"
	.align	2
.LC18:
	.ascii	"OK-0 method GET OK\012\000"
	.align	2
.LC19:
	.ascii	"CREATE\000"
	.align	2
.LC20:
	.ascii	"OK-2 method CREATE OK\012\000"
	.align	2
.LC21:
	.ascii	"REMOVE\000"
	.align	2
.LC22:
	.ascii	"OK-3 method REMOVE OK\012\000"
	.align	2
.LC23:
	.ascii	"OK-4 method APPEND OK\012\000"
	.align	2
.LC24:
	.ascii	"ERROR-0 Method not supported\012\000"
	.text
	.align	2
	.global	proc_request
	.syntax unified
	.arm
	.fpu softvfp
	.type	proc_request, %function
proc_request:
	@ args = 644, pretend = 16, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	sub	sp, sp, #16
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #640
	str	r0, [fp, #-8]
	add	r0, fp, #8
	stm	r0, {r1, r2, r3}
	add	r3, fp, #8
	ldr	r1, .L41
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L35
	mov	r3, #0
	mov	r2, #19
	ldr	r1, .L41+4
	ldr	r0, [fp, #-8]
	bl	send
	mov	r0, sp
	add	r3, fp, #20
	mov	r2, #628
	mov	r1, r3
	bl	memcpy
	add	r3, fp, #8
	ldm	r3, {r1, r2, r3}
	ldr	r0, [fp, #-8]
	bl	send_file
	b	.L40
.L35:
	add	r3, fp, #8
	ldr	r1, .L41+8
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L37
	mov	r3, #0
	mov	r2, #22
	ldr	r1, .L41+12
	ldr	r0, [fp, #-8]
	bl	send
	mov	r0, sp
	add	r3, fp, #20
	mov	r2, #628
	mov	r1, r3
	bl	memcpy
	add	r3, fp, #8
	ldm	r3, {r1, r2, r3}
	ldr	r0, [fp, #-8]
	bl	create_file
	b	.L40
.L37:
	add	r3, fp, #8
	ldr	r1, .L41+16
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L38
	mov	r3, #0
	mov	r2, #22
	ldr	r1, .L41+20
	ldr	r0, [fp, #-8]
	bl	send
	mov	r0, sp
	add	r3, fp, #20
	mov	r2, #628
	mov	r1, r3
	bl	memcpy
	add	r3, fp, #8
	ldm	r3, {r1, r2, r3}
	ldr	r0, [fp, #-8]
	bl	remove_file
	b	.L40
.L38:
	add	r3, fp, #8
	ldr	r1, .L41+24
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L39
	mov	r3, #0
	mov	r2, #22
	ldr	r1, .L41+28
	ldr	r0, [fp, #-8]
	bl	send
	mov	r0, sp
	add	r3, fp, #20
	mov	r2, #628
	mov	r1, r3
	bl	memcpy
	add	r3, fp, #8
	ldm	r3, {r1, r2, r3}
	ldr	r0, [fp, #-8]
	bl	append_content
	b	.L40
.L39:
	mov	r3, #0
	mov	r2, #29
	ldr	r1, .L41+32
	ldr	r0, [fp, #-8]
	bl	send
.L40:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, lr}
	add	sp, sp, #16
	bx	lr
.L42:
	.align	2
.L41:
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.word	.LC0
	.word	.LC23
	.word	.LC24
	.size	proc_request, .-proc_request
	.section	.rodata
	.align	2
.LC25:
	.ascii	"socket\000"
	.align	2
.LC26:
	.ascii	"bind\000"
	.align	2
.LC27:
	.ascii	"listen\000"
	.align	2
.LC28:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	setup_server
	.syntax unified
	.arm
	.fpu softvfp
	.type	setup_server, %function
setup_server:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-40]
	ldr	r3, .L50
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #1
	str	r3, [fp, #-32]
	mov	r2, #6
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-28]
	sub	r3, fp, #32
	mov	r2, #4
	str	r2, [sp]
	mov	r2, #2
	mov	r1, #1
	ldr	r0, [fp, #-28]
	bl	setsockopt
	ldr	r3, [fp, #-28]
	cmn	r3, #1
	bne	.L44
	ldr	r0, .L50+4
	bl	perror
	mov	r3, #0
	b	.L48
.L44:
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	strh	r3, [fp, #-22]	@ movhi
	mov	r3, #2
	strh	r3, [fp, #-24]	@ movhi
	mov	r3, #0
	str	r3, [fp, #-20]
	sub	r3, fp, #24
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-28]
	bl	bind
	mov	r3, r0
	cmn	r3, #1
	bne	.L46
	ldr	r0, .L50+8
	bl	perror
	mov	r3, #0
	b	.L48
.L46:
	mov	r1, #1000
	ldr	r0, [fp, #-28]
	bl	listen
	mov	r3, r0
	cmn	r3, #1
	bne	.L47
	ldr	r0, .L50+12
	bl	perror
	mov	r3, #0
	b	.L48
.L47:
	ldr	r3, [fp, #-28]
.L48:
	ldr	r2, .L50
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L49
	bl	__stack_chk_fail
.L49:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L51:
	.align	2
.L50:
	.word	.LC28
	.word	.LC25
	.word	.LC26
	.word	.LC27
	.size	setup_server, .-setup_server
	.section	.rodata
	.align	2
.LC29:
	.ascii	"accept\000"
	.align	2
.LC30:
	.ascii	"**Client %s:%d connected\012\000"
	.align	2
.LC31:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	accept_new_connection
	.syntax unified
	.arm
	.fpu softvfp
	.type	accept_new_connection, %function
accept_new_connection:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #44
	str	r0, [fp, #-48]
	ldr	r3, .L56
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r3, #16
	str	r3, [fp, #-40]
	sub	r2, fp, #40
	sub	r3, fp, #32
	mov	r1, r3
	ldr	r0, [fp, #-48]
	bl	accept
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmn	r3, #1
	bne	.L53
	ldr	r0, .L56+4
	bl	perror
	mov	r0, #1
	bl	exit
.L53:
	ldr	r0, [fp, #-28]
	bl	inet_ntoa
	mov	r4, r0
	ldrh	r3, [fp, #-30]
	mov	r0, r3
	bl	ntohs
	mov	r3, r0
	mov	r2, r3
	mov	r1, r4
	ldr	r0, .L56+8
	bl	printf
	ldr	r3, [fp, #-36]
	ldr	r2, .L56
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L55
	bl	__stack_chk_fail
.L55:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L57:
	.align	2
.L56:
	.word	.LC31
	.word	.LC29
	.word	.LC30
	.size	accept_new_connection, .-accept_new_connection
	.section	.rodata
	.align	2
.LC32:
	.ascii	"method: %s\012filename: %s\012\000"
	.align	2
.LC33:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	handle_connection
	.syntax unified
	.arm
	.fpu softvfp
	.type	handle_connection, %function
handle_connection:
	@ args = 0, pretend = 0, frame = 1656
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #2288
	str	r0, [fp, #-1656]
	ldr	r3, .L61
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #1008
	mov	r0, r3
	mov	r3, #1000
	mov	r2, r3
	mov	r1, #0
	bl	memset
	sub	r1, fp, #1008
	mov	r3, #0
	mov	r2, #1000
	ldr	r0, [fp, #-1656]
	bl	recv
	str	r0, [fp, #-1652]
	ldr	r3, [fp, #-1652]
	cmp	r3, #0
	ble	.L59
	sub	r2, fp, #1008
	sub	r3, fp, #1632
	sub	r3, r3, #4
	sub	r3, r3, #12
	mov	r1, r2
	mov	r0, r3
	bl	get_request
	sub	r3, fp, #1632
	sub	r3, r3, #4
	sub	r3, r3, #12
	add	r2, r3, #128
	sub	r3, fp, #1632
	sub	r3, r3, #4
	sub	r3, r3, #12
	mov	r1, r3
	ldr	r0, .L61+4
	bl	printf
	mov	r0, sp
	sub	r3, fp, #1632
	sub	r3, r3, #4
	mov	r2, #628
	mov	r1, r3
	bl	memcpy
	sub	r3, fp, #1632
	sub	r3, r3, #4
	sub	r3, r3, #12
	ldm	r3, {r1, r2, r3}
	ldr	r0, [fp, #-1656]
	bl	proc_request
.L59:
	ldr	r0, [fp, #-1656]
	bl	close
	nop
	ldr	r3, .L61
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L60
	bl	__stack_chk_fail
.L60:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L62:
	.align	2
.L61:
	.word	.LC33
	.word	.LC32
	.size	handle_connection, .-handle_connection
	.section	.rodata
	.align	2
.LC34:
	.ascii	"Uso: %s <porta>\012\000"
	.align	2
.LC35:
	.ascii	"**Waiting for connections\000"
	.align	2
.LC36:
	.ascii	"select\000"
	.align	2
.LC37:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 288
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #296
	str	r0, [fp, #-288]
	str	r1, [fp, #-292]
	ldr	r3, .L76
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-288]
	cmp	r3, #2
	beq	.L64
	ldr	r3, [fp, #-292]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L76+4
	bl	printf
	mov	r3, #0
	ldr	r2, .L76
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L74
	b	.L75
.L64:
	ldr	r3, [fp, #-292]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	htons
	mov	r3, r0
	mov	r0, r3
	bl	setup_server
	str	r0, [fp, #-276]
	sub	r3, fp, #264
	str	r3, [fp, #-272]
	mov	r3, #0
	str	r3, [fp, #-280]
	b	.L66
.L67:
	ldr	r3, [fp, #-272]
	ldr	r2, [fp, #-280]
	mov	r1, #0
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-280]
	add	r3, r3, #1
	str	r3, [fp, #-280]
.L66:
	ldr	r3, [fp, #-280]
	cmp	r3, #31
	bls	.L67
	ldr	r3, [fp, #-276]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	mov	r2, r3
	lsl	r3, r2, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r1, [r3, #-260]
	ldr	r3, [fp, #-276]
	rsbs	r0, r3, #0
	and	r3, r3, #31
	and	r0, r0, #31
	rsbpl	r3, r0, #0
	mov	r0, #1
	lsl	r3, r0, r3
	orr	r1, r1, r3
	lsl	r3, r2, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	str	r1, [r3, #-260]
.L73:
	ldr	r0, .L76+8
	bl	puts
	sub	r3, fp, #136
	sub	r1, fp, #264
	mov	r2, #128
	mov	r0, r3
	bl	memcpy
	sub	r1, fp, #136
	mov	r3, #0
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #0
	mov	r0, #1024
	bl	select
	mov	r3, r0
	cmp	r3, #0
	bge	.L68
	ldr	r0, .L76+12
	bl	perror
	mov	r0, #1
	bl	exit
.L68:
	mov	r3, #0
	str	r3, [fp, #-284]
	b	.L69
.L72:
	ldr	r3, [fp, #-284]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-132]
	ldr	r3, [fp, #-284]
	rsbs	r1, r3, #0
	and	r3, r3, #31
	and	r1, r1, #31
	rsbpl	r3, r1, #0
	mov	r1, #1
	lsl	r3, r1, r3
	and	r3, r3, r2
	cmp	r3, #0
	beq	.L70
	ldr	r2, [fp, #-284]
	ldr	r3, [fp, #-276]
	cmp	r2, r3
	bne	.L71
	ldr	r0, [fp, #-276]
	bl	accept_new_connection
	str	r0, [fp, #-268]
	ldr	r3, [fp, #-268]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	mov	r2, r3
	lsl	r3, r2, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r1, [r3, #-260]
	ldr	r3, [fp, #-268]
	rsbs	r0, r3, #0
	and	r3, r3, #31
	and	r0, r0, #31
	rsbpl	r3, r0, #0
	mov	r0, #1
	lsl	r3, r0, r3
	orr	r1, r1, r3
	lsl	r3, r2, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	str	r1, [r3, #-260]
	b	.L70
.L71:
	ldr	r0, [fp, #-284]
	bl	handle_connection
	ldr	r3, [fp, #-284]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	mov	r2, r3
	lsl	r3, r2, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r1, [r3, #-260]
	ldr	r3, [fp, #-284]
	rsbs	r0, r3, #0
	and	r3, r3, #31
	and	r0, r0, #31
	rsbpl	r3, r0, #0
	mov	r0, #1
	lsl	r3, r0, r3
	mvn	r3, r3
	and	r1, r1, r3
	lsl	r3, r2, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	str	r1, [r3, #-260]
.L70:
	ldr	r3, [fp, #-284]
	add	r3, r3, #1
	str	r3, [fp, #-284]
.L69:
	ldr	r3, [fp, #-284]
	cmp	r3, #1024
	blt	.L72
	b	.L73
.L75:
	bl	__stack_chk_fail
.L74:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L77:
	.align	2
.L76:
	.word	.LC37
	.word	.LC34
	.word	.LC35
	.word	.LC36
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
