	.file	"450069.c"
	.intel_syntax noprefix
	.text
	.type	die, @function
die:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	die, .-die
	.section	.rodata
.LC0:
	.string	"socket() failed"
.LC1:
	.string	"bind() failed"
.LC2:
	.string	"listen() failed"
	.text
	.type	createServerSocket, @function
createServerSocket:
.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, 64
	mov	eax, edi
	mov	WORD PTR -52[rbp], ax
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edx, 6
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], 0
	jns	.L3
	lea	rdi, .LC0[rip]
	call	die
.L3:
	lea	rax, -32[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	WORD PTR -32[rbp], 2
	mov	edi, 0
	call	htonl@PLT
	mov	DWORD PTR -28[rbp], eax
	movzx	eax, WORD PTR -52[rbp]
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -30[rbp], ax
	lea	rcx, -32[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	jns	.L4
	lea	rdi, .LC1[rip]
	call	die
.L4:
	mov	eax, DWORD PTR -36[rbp]
	mov	esi, 5
	mov	edi, eax
	call	listen@PLT
	test	eax, eax
	jns	.L5
	lea	rdi, .LC2[rip]
	call	die
.L5:
	mov	eax, DWORD PTR -36[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	createServerSocket, .-createServerSocket
	.section	.rodata
.LC3:
	.string	"send() failed"
	.text
	.globl	Send
	.type	Send, @function
Send:
.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
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	rdx, QWORD PTR -16[rbp]
	mov	rsi, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	cmp	QWORD PTR -8[rbp], rax
	je	.L9
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	rax, -1
	jmp	.L10
.L9:
	mov	rax, QWORD PTR -8[rbp]
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	Send, .-Send
	.section	.rodata
.LC4:
	.string	"OK"
.LC5:
	.string	"Created"
.LC6:
	.string	"Accepted"
.LC7:
	.string	"No Content"
.LC8:
	.string	"Moved Permanently"
.LC9:
	.string	"Moved Temporarily"
.LC10:
	.string	"Not Modified"
.LC11:
	.string	"Bad Request"
.LC12:
	.string	"Unauthorized"
.LC13:
	.string	"Forbidden"
.LC14:
	.string	"Not Found"
.LC15:
	.string	"Internal Server Error"
.LC16:
	.string	"Not Implemented"
.LC17:
	.string	"Bad Gateway"
.LC18:
	.string	"Service Unavailable"
	.section	.data.rel.local,"aw"
	.align 32
	.type	HTTP_StatusCodes, @object
	.size	HTTP_StatusCodes, 256
HTTP_StatusCodes:
	.long	200
	.zero	4
	.quad	.LC4
	.long	201
	.zero	4
	.quad	.LC5
	.long	202
	.zero	4
	.quad	.LC6
	.long	204
	.zero	4
	.quad	.LC7
	.long	301
	.zero	4
	.quad	.LC8
	.long	302
	.zero	4
	.quad	.LC9
	.long	304
	.zero	4
	.quad	.LC10
	.long	400
	.zero	4
	.quad	.LC11
	.long	401
	.zero	4
	.quad	.LC12
	.long	403
	.zero	4
	.quad	.LC13
	.long	404
	.zero	4
	.quad	.LC14
	.long	500
	.zero	4
	.quad	.LC15
	.long	501
	.zero	4
	.quad	.LC16
	.long	502
	.zero	4
	.quad	.LC17
	.long	503
	.zero	4
	.quad	.LC18
	.long	0
	.zero	4
	.quad	0
	.section	.rodata
.LC19:
	.string	"Unknown Status Code"
	.text
	.type	getReasonPhrase, @function
getReasonPhrase:
.LFB9:
	.cfi_startproc
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L12
.L15:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, HTTP_StatusCodes[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cmp	DWORD PTR -20[rbp], eax
	jne	.L13
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, HTTP_StatusCodes[rip+8]
	mov	rax, QWORD PTR [rdx+rax]
	jmp	.L14
.L13:
	add	DWORD PTR -4[rbp], 1
.L12:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	sal	rax, 4
	mov	rdx, rax
	lea	rax, HTTP_StatusCodes[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	jg	.L15
	lea	rax, .LC19[rip]
.L14:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	getReasonPhrase, .-getReasonPhrase
	.section	.rodata
.LC20:
	.string	"HTTP/1.0 %d "
	.align 8
.LC21:
	.string	"<html><body>\n<h1>%d %s</h1>\n</body></html>\n"
	.text
	.type	sendStatusLine, @function
sendStatusLine:
.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, 2048
	mov	DWORD PTR -2036[rbp], edi
	mov	DWORD PTR -2040[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	eax, DWORD PTR -2040[rbp]
	mov	edi, eax
	call	getReasonPhrase
	mov	QWORD PTR -2024[rbp], rax
	mov	edx, DWORD PTR -2040[rbp]
	lea	rax, -2016[rbp]
	lea	rsi, .LC20[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	rdx, QWORD PTR -2024[rbp]
	lea	rax, -2016[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcat@PLT
	lea	rax, -2016[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rax, -2016[rbp]
	add	rax, rdx
	mov	WORD PTR [rax], 2573
	mov	BYTE PTR 2[rax], 0
	lea	rax, -2016[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rax, -2016[rbp]
	add	rax, rdx
	mov	WORD PTR [rax], 2573
	mov	BYTE PTR 2[rax], 0
	cmp	DWORD PTR -2040[rbp], 200
	je	.L17
	mov	rcx, QWORD PTR -2024[rbp]
	mov	edx, DWORD PTR -2040[rbp]
	lea	rax, -1008[rbp]
	lea	rsi, .LC21[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rdx, -1008[rbp]
	lea	rax, -2016[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcat@PLT
.L17:
	lea	rdx, -2016[rbp]
	mov	eax, DWORD PTR -2036[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	Send
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	sendStatusLine, .-sendStatusLine
	.section	.rodata
.LC22:
	.string	"malloc failed"
.LC23:
	.string	"rb"
.LC24:
	.string	"\nsend() failed"
.LC25:
	.string	"fread failed"
	.text
	.type	handleFileRequest, @function
handleFileRequest:
.LFB11:
	.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, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 232
	.cfi_offset 3, -24
	mov	QWORD PTR -4312[rbp], rdi
	mov	QWORD PTR -4320[rbp], rsi
	mov	DWORD PTR -4324[rbp], edx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -4296[rbp], 0
	mov	rax, QWORD PTR -4312[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rbx, rax
	mov	rax, QWORD PTR -4320[rbp]
	mov	rdi, rax
	call	strlen@PLT
	add	rax, rbx
	add	rax, 100
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -4288[rbp], rax
	cmp	QWORD PTR -4288[rbp], 0
	jne	.L20
	lea	rdi, .LC22[rip]
	call	die
.L20:
	mov	rdx, QWORD PTR -4312[rbp]
	mov	rax, QWORD PTR -4288[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rdx, QWORD PTR -4320[rbp]
	mov	rax, QWORD PTR -4288[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcat@PLT
	mov	rax, QWORD PTR -4288[rbp]
	mov	rdi, rax
	call	strlen@PLT
	lea	rdx, -1[rax]
	mov	rax, QWORD PTR -4288[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 47
	jne	.L21
	mov	rax, QWORD PTR -4288[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -4288[rbp]
	add	rax, rdx
	movabs	rcx, 8388005400609582697
	mov	QWORD PTR [rax], rcx
	mov	WORD PTR 8[rax], 27757
	mov	BYTE PTR 10[rax], 0
.L21:
	lea	rdx, -4272[rbp]
	mov	rax, QWORD PTR -4288[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	stat@PLT
	test	eax, eax
	jne	.L22
	mov	eax, DWORD PTR -4248[rbp]
	and	eax, 61440
	cmp	eax, 16384
	jne	.L22
	mov	DWORD PTR -4300[rbp], 403
	mov	edx, DWORD PTR -4300[rbp]
	mov	eax, DWORD PTR -4324[rbp]
	mov	esi, edx
	mov	edi, eax
	call	sendStatusLine
	jmp	.L23
.L22:
	mov	rax, QWORD PTR -4288[rbp]
	lea	rsi, .LC23[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -4296[rbp], rax
	cmp	QWORD PTR -4296[rbp], 0
	jne	.L24
	mov	DWORD PTR -4300[rbp], 404
	mov	edx, DWORD PTR -4300[rbp]
	mov	eax, DWORD PTR -4324[rbp]
	mov	esi, edx
	mov	edi, eax
	call	sendStatusLine
	jmp	.L23
.L24:
	mov	DWORD PTR -4300[rbp], 200
	mov	edx, DWORD PTR -4300[rbp]
	mov	eax, DWORD PTR -4324[rbp]
	mov	esi, edx
	mov	edi, eax
	call	sendStatusLine
	jmp	.L25
.L27:
	mov	rdx, QWORD PTR -4280[rbp]
	lea	rsi, -4128[rbp]
	mov	eax, DWORD PTR -4324[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	mov	rdx, QWORD PTR -4280[rbp]
	cmp	rax, rdx
	je	.L25
	lea	rdi, .LC24[rip]
	call	perror@PLT
	jmp	.L26
.L25:
	mov	rdx, QWORD PTR -4296[rbp]
	lea	rax, -4128[rbp]
	mov	rcx, rdx
	mov	edx, 4096
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	QWORD PTR -4280[rbp], rax
	cmp	QWORD PTR -4280[rbp], 0
	jne	.L27
.L26:
	mov	rax, QWORD PTR -4296[rbp]
	mov	rdi, rax
	call	ferror@PLT
	test	eax, eax
	je	.L31
	lea	rdi, .LC25[rip]
	call	perror@PLT
	jmp	.L23
.L31:
	nop
.L23:
	mov	rax, QWORD PTR -4288[rbp]
	mov	rdi, rax
	call	free@PLT
	cmp	QWORD PTR -4296[rbp], 0
	je	.L28
	mov	rax, QWORD PTR -4296[rbp]
	mov	rdi, rax
	call	fclose@PLT
.L28:
	mov	eax, DWORD PTR -4300[rbp]
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L30
	call	__stack_chk_fail@PLT
.L30:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	handleFileRequest, .-handleFileRequest
	.section	.rodata
.LC26:
	.string	"signal() failed"
	.align 8
.LC27:
	.string	"usage: %s <server_port> <web_root>\n"
.LC28:
	.string	"accept() failed"
.LC29:
	.string	"r"
.LC30:
	.string	"fdopen failed"
.LC31:
	.string	""
.LC32:
	.string	"\t \r\n"
.LC33:
	.string	"GET"
.LC34:
	.string	"HTTP/1.0"
.LC35:
	.string	"HTTP/1.1"
.LC36:
	.string	"/.."
.LC37:
	.string	"/../"
.LC38:
	.string	"\r\n"
.LC39:
	.string	"\n"
.LC40:
	.string	"%s \"%s %s %s\" %d %s\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB12:
	.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, 2152
	.cfi_offset 3, -24
	mov	DWORD PTR -2148[rbp], edi
	mov	QWORD PTR -2160[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	esi, 1
	mov	edi, 13
	call	signal@PLT
	cmp	rax, -1
	jne	.L33
	lea	rdi, .LC26[rip]
	call	die
.L33:
	cmp	DWORD PTR -2148[rbp], 3
	je	.L34
	mov	rax, QWORD PTR -2160[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC27[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L34:
	mov	rax, QWORD PTR -2160[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	WORD PTR -2134[rbp], ax
	mov	rax, QWORD PTR -2160[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -2088[rbp], rax
	movzx	eax, WORD PTR -2134[rbp]
	mov	edi, eax
	call	createServerSocket
	mov	DWORD PTR -2124[rbp], eax
.L50:
	mov	DWORD PTR -2132[rbp], 16
	lea	rdx, -2132[rbp]
	lea	rcx, -2048[rbp]
	mov	eax, DWORD PTR -2124[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -2120[rbp], eax
	cmp	DWORD PTR -2120[rbp], 0
	jns	.L35
	lea	rdi, .LC28[rip]
	call	die
.L35:
	mov	eax, DWORD PTR -2120[rbp]
	lea	rsi, .LC29[rip]
	mov	edi, eax
	call	fdopen@PLT
	mov	QWORD PTR -2080[rbp], rax
	cmp	QWORD PTR -2080[rbp], 0
	jne	.L36
	lea	rdi, .LC30[rip]
	call	die
.L36:
	lea	rax, .LC31[rip]
	mov	QWORD PTR -2112[rbp], rax
	lea	rax, .LC31[rip]
	mov	QWORD PTR -2104[rbp], rax
	lea	rax, .LC31[rip]
	mov	QWORD PTR -2096[rbp], rax
	mov	rdx, QWORD PTR -2080[rbp]
	lea	rax, -1024[rbp]
	mov	esi, 1000
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L37
	mov	DWORD PTR -2128[rbp], 400
	jmp	.L38
.L37:
	lea	rax, .LC32[rip]
	mov	QWORD PTR -2072[rbp], rax
	mov	rdx, QWORD PTR -2072[rbp]
	lea	rax, -1024[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strtok@PLT
	mov	QWORD PTR -2112[rbp], rax
	mov	rax, QWORD PTR -2072[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	strtok@PLT
	mov	QWORD PTR -2104[rbp], rax
	mov	rax, QWORD PTR -2072[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	strtok@PLT
	mov	QWORD PTR -2096[rbp], rax
	mov	rax, QWORD PTR -2072[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	strtok@PLT
	mov	QWORD PTR -2064[rbp], rax
	cmp	QWORD PTR -2112[rbp], 0
	je	.L39
	cmp	QWORD PTR -2104[rbp], 0
	je	.L39
	cmp	QWORD PTR -2096[rbp], 0
	je	.L39
	cmp	QWORD PTR -2064[rbp], 0
	je	.L40
.L39:
	mov	DWORD PTR -2128[rbp], 501
	mov	edx, DWORD PTR -2128[rbp]
	mov	eax, DWORD PTR -2120[rbp]
	mov	esi, edx
	mov	edi, eax
	call	sendStatusLine
	jmp	.L38
.L40:
	mov	rax, QWORD PTR -2112[rbp]
	lea	rsi, .LC33[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L41
	mov	DWORD PTR -2128[rbp], 501
	mov	edx, DWORD PTR -2128[rbp]
	mov	eax, DWORD PTR -2120[rbp]
	mov	esi, edx
	mov	edi, eax
	call	sendStatusLine
	jmp	.L38
.L41:
	mov	rax, QWORD PTR -2096[rbp]
	lea	rsi, .LC34[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L42
	mov	rax, QWORD PTR -2096[rbp]
	lea	rsi, .LC35[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L42
	mov	DWORD PTR -2128[rbp], 501
	mov	edx, DWORD PTR -2128[rbp]
	mov	eax, DWORD PTR -2120[rbp]
	mov	esi, edx
	mov	edi, eax
	call	sendStatusLine
	jmp	.L38
.L42:
	cmp	QWORD PTR -2104[rbp], 0
	je	.L43
	mov	rax, QWORD PTR -2104[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 47
	je	.L44
.L43:
	mov	DWORD PTR -2128[rbp], 400
	mov	edx, DWORD PTR -2128[rbp]
	mov	eax, DWORD PTR -2120[rbp]
	mov	esi, edx
	mov	edi, eax
	call	sendStatusLine
	jmp	.L38
.L44:
	mov	rax, QWORD PTR -2104[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -2116[rbp], eax
	cmp	DWORD PTR -2116[rbp], 2
	jle	.L49
	mov	eax, DWORD PTR -2116[rbp]
	cdqe
	lea	rdx, -3[rax]
	mov	rax, QWORD PTR -2104[rbp]
	add	rax, rdx
	mov	QWORD PTR -2056[rbp], rax
	mov	rax, QWORD PTR -2056[rbp]
	lea	rsi, .LC36[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L46
	mov	rax, QWORD PTR -2104[rbp]
	lea	rsi, .LC37[rip]
	mov	rdi, rax
	call	strstr@PLT
	test	rax, rax
	je	.L49
.L46:
	mov	DWORD PTR -2128[rbp], 400
	mov	edx, DWORD PTR -2128[rbp]
	mov	eax, DWORD PTR -2120[rbp]
	mov	esi, edx
	mov	edi, eax
	call	sendStatusLine
	jmp	.L38
.L49:
	mov	rdx, QWORD PTR -2080[rbp]
	lea	rax, -2032[rbp]
	mov	esi, 1000
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L47
	mov	DWORD PTR -2128[rbp], 400
	jmp	.L38
.L47:
	lea	rax, -2032[rbp]
	mov	rsi, rax
	lea	rdi, .LC38[rip]
	call	strcmp@PLT
	test	eax, eax
	je	.L48
	lea	rax, -2032[rbp]
	mov	rsi, rax
	lea	rdi, .LC39[rip]
	call	strcmp@PLT
	test	eax, eax
	je	.L48
	jmp	.L49
.L48:
	mov	edx, DWORD PTR -2120[rbp]
	mov	rcx, QWORD PTR -2104[rbp]
	mov	rax, QWORD PTR -2088[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	handleFileRequest
	mov	DWORD PTR -2128[rbp], eax
.L38:
	mov	eax, DWORD PTR -2128[rbp]
	mov	edi, eax
	call	getReasonPhrase
	mov	rbx, rax
	mov	eax, DWORD PTR -2044[rbp]
	mov	edi, eax
	call	inet_ntoa@PLT
	mov	rsi, rax
	mov	rax, QWORD PTR stderr[rip]
	mov	r8, QWORD PTR -2096[rbp]
	mov	rdi, QWORD PTR -2104[rbp]
	mov	rdx, QWORD PTR -2112[rbp]
	push	rbx
	mov	ecx, DWORD PTR -2128[rbp]
	push	rcx
	mov	r9, r8
	mov	r8, rdi
	mov	rcx, rdx
	mov	rdx, rsi
	lea	rsi, .LC40[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	rsp, 16
	mov	rax, QWORD PTR -2080[rbp]
	mov	rdi, rax
	call	fclose@PLT
	jmp	.L50
	.cfi_endproc
.LFE12:
	.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	"450069.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	die, %function
die:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	perror
	mov	r0, #1
	bl	exit
	.size	die, .-die
	.section	.rodata
	.align	2
.LC0:
	.ascii	"socket() failed\000"
	.align	2
.LC1:
	.ascii	"bind() failed\000"
	.align	2
.LC2:
	.ascii	"listen() failed\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	createServerSocket, %function
createServerSocket:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	mov	r3, r0
	strh	r3, [fp, #-30]	@ movhi
	ldr	r3, .L8
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r2, #6
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bge	.L3
	ldr	r0, .L8+4
	bl	die
.L3:
	sub	r3, fp, #24
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #2
	strh	r3, [fp, #-24]	@ movhi
	mov	r0, #0
	bl	htonl
	mov	r3, r0
	str	r3, [fp, #-20]
	ldrh	r3, [fp, #-30]
	mov	r0, r3
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-22]	@ movhi
	sub	r3, fp, #24
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-28]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	bge	.L4
	ldr	r0, .L8+8
	bl	die
.L4:
	mov	r1, #5
	ldr	r0, [fp, #-28]
	bl	listen
	mov	r3, r0
	cmp	r3, #0
	bge	.L5
	ldr	r0, .L8+12
	bl	die
.L5:
	ldr	r3, [fp, #-28]
	ldr	r2, .L8
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L7
	bl	__stack_chk_fail
.L7:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.size	createServerSocket, .-createServerSocket
	.section	.rodata
	.align	2
.LC4:
	.ascii	"send() failed\000"
	.text
	.align	2
	.global	Send
	.syntax unified
	.arm
	.fpu softvfp
	.type	Send, %function
Send:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r0, [fp, #-20]
	bl	strlen
	str	r0, [fp, #-12]
	mov	r3, #0
	ldr	r2, [fp, #-12]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	send
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-12]
	cmp	r2, r3
	beq	.L11
	ldr	r0, .L13
	bl	perror
	mvn	r3, #0
	b	.L12
.L11:
	ldr	r3, [fp, #-8]
.L12:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	.LC4
	.size	Send, .-Send
	.section	.rodata
	.align	2
.LC5:
	.ascii	"OK\000"
	.align	2
.LC6:
	.ascii	"Created\000"
	.align	2
.LC7:
	.ascii	"Accepted\000"
	.align	2
.LC8:
	.ascii	"No Content\000"
	.align	2
.LC9:
	.ascii	"Moved Permanently\000"
	.align	2
.LC10:
	.ascii	"Moved Temporarily\000"
	.align	2
.LC11:
	.ascii	"Not Modified\000"
	.align	2
.LC12:
	.ascii	"Bad Request\000"
	.align	2
.LC13:
	.ascii	"Unauthorized\000"
	.align	2
.LC14:
	.ascii	"Forbidden\000"
	.align	2
.LC15:
	.ascii	"Not Found\000"
	.align	2
.LC16:
	.ascii	"Internal Server Error\000"
	.align	2
.LC17:
	.ascii	"Not Implemented\000"
	.align	2
.LC18:
	.ascii	"Bad Gateway\000"
	.align	2
.LC19:
	.ascii	"Service Unavailable\000"
	.data
	.align	2
	.type	HTTP_StatusCodes, %object
	.size	HTTP_StatusCodes, 128
HTTP_StatusCodes:
	.word	200
	.word	.LC5
	.word	201
	.word	.LC6
	.word	202
	.word	.LC7
	.word	204
	.word	.LC8
	.word	301
	.word	.LC9
	.word	302
	.word	.LC10
	.word	304
	.word	.LC11
	.word	400
	.word	.LC12
	.word	401
	.word	.LC13
	.word	403
	.word	.LC14
	.word	404
	.word	.LC15
	.word	500
	.word	.LC16
	.word	501
	.word	.LC17
	.word	502
	.word	.LC18
	.word	503
	.word	.LC19
	.word	0
	.word	0
	.section	.rodata
	.align	2
.LC20:
	.ascii	"Unknown Status Code\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	getReasonPhrase, %function
getReasonPhrase:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L16
.L19:
	ldr	r2, .L20
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bne	.L17
	ldr	r2, .L20
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #3
	add	r3, r2, r3
	ldr	r3, [r3, #4]
	b	.L18
.L17:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L16:
	ldr	r2, .L20
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #3]
	cmp	r3, #0
	bgt	.L19
	ldr	r3, .L20+4
.L18:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L21:
	.align	2
.L20:
	.word	HTTP_StatusCodes
	.word	.LC20
	.size	getReasonPhrase, .-getReasonPhrase
	.section	.rodata
	.align	2
.LC21:
	.ascii	"HTTP/1.0 %d \000"
	.align	2
.LC22:
	.ascii	"\015\012\000"
	.align	2
.LC23:
	.ascii	"<html><body>\012<h1>%d %s</h1>\012</body></html>\012"
	.ascii	"\000"
	.align	2
.LC24:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sendStatusLine, %function
sendStatusLine:
	@ args = 0, pretend = 0, frame = 2016
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #2016
	str	r0, [fp, #-2016]
	str	r1, [fp, #-2020]
	ldr	r3, .L25
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r0, [fp, #-2020]
	bl	getReasonPhrase
	str	r0, [fp, #-2012]
	sub	r3, fp, #2000
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-2020]
	ldr	r1, .L25+4
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #2000
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, [fp, #-2012]
	mov	r0, r3
	bl	strcat
	sub	r3, fp, #2000
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #2000
	sub	r3, r3, #4
	sub	r3, r3, #4
	add	r3, r3, r2
	ldr	r2, .L25+8
	mov	r0, r3
	mov	r1, r2
	mov	r3, #3
	mov	r2, r3
	bl	memcpy
	sub	r3, fp, #2000
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #2000
	sub	r3, r3, #4
	sub	r3, r3, #4
	add	r3, r3, r2
	ldr	r2, .L25+8
	mov	r0, r3
	mov	r1, r2
	mov	r3, #3
	mov	r2, r3
	bl	memcpy
	ldr	r3, [fp, #-2020]
	cmp	r3, #200
	beq	.L23
	sub	r0, fp, #1008
	ldr	r3, [fp, #-2012]
	ldr	r2, [fp, #-2020]
	ldr	r1, .L25+12
	bl	sprintf
	sub	r2, fp, #1008
	sub	r3, fp, #2000
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r2
	mov	r0, r3
	bl	strcat
.L23:
	sub	r3, fp, #2000
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-2016]
	bl	Send
	nop
	ldr	r3, .L25
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L24
	bl	__stack_chk_fail
.L24:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L26:
	.align	2
.L25:
	.word	.LC24
	.word	.LC21
	.word	.LC22
	.word	.LC23
	.size	sendStatusLine, .-sendStatusLine
	.section	.rodata
	.align	2
.LC25:
	.ascii	"malloc failed\000"
	.align	2
.LC26:
	.ascii	"index.html\000"
	.align	2
.LC27:
	.ascii	"rb\000"
	.align	2
.LC28:
	.ascii	"\012send() failed\000"
	.align	2
.LC29:
	.ascii	"fread failed\000"
	.align	2
.LC30:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	handleFileRequest, %function
handleFileRequest:
	@ args = 0, pretend = 0, frame = 4224
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #4224
	sub	sp, sp, #4
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r0, [r3, #-116]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r1, [r3, #-120]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r2, [r3, #-124]
	ldr	r3, .L40
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-108]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-116]
	bl	strlen
	mov	r4, r0
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-120]
	bl	strlen
	mov	r3, r0
	add	r3, r4, r3
	add	r3, r3, #100
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r4, r2
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [r4, #-104]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-104]
	cmp	r3, #0
	bne	.L28
	ldr	r0, .L40+4
	bl	die
.L28:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r1, [r2, #-116]
	ldr	r0, [r3, #-104]
	bl	strcpy
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r1, [r2, #-120]
	ldr	r0, [r3, #-104]
	bl	strcat
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-104]
	bl	strlen
	mov	r3, r0
	sub	r3, r3, #1
	sub	r2, fp, #4096
	sub	r2, r2, #12
	ldr	r2, [r2, #-104]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #47
	bne	.L29
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-104]
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-104]
	add	r3, r3, r2
	ldr	r2, .L40+8
	mov	r0, r3
	mov	r1, r2
	mov	r3, #11
	mov	r2, r3
	bl	memcpy
.L29:
	sub	r3, fp, #4160
	sub	r3, r3, #12
	sub	r3, r3, #32
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r1, r3
	ldr	r0, [r2, #-104]
	bl	stat
	mov	r3, r0
	cmp	r3, #0
	bne	.L30
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-80]
	and	r3, r3, #61440
	cmp	r3, #16384
	bne	.L30
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	ldr	r3, .L40+12
	str	r3, [r2, #-112]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r1, [r2, #-112]
	ldr	r0, [r3, #-124]
	bl	sendStatusLine
	b	.L31
.L30:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r1, .L40+16
	ldr	r0, [r3, #-104]
	bl	fopen
	str	r0, [r4, #-108]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-108]
	cmp	r3, #0
	bne	.L32
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #404
	str	r3, [r2, #-112]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r1, [r2, #-112]
	ldr	r0, [r3, #-124]
	bl	sendStatusLine
	b	.L31
.L32:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #200
	str	r3, [r2, #-112]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r1, [r2, #-112]
	ldr	r0, [r3, #-124]
	bl	sendStatusLine
	b	.L33
.L35:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r1, fp, #4096
	sub	r1, r1, #12
	sub	r1, r1, #4
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r0, r3
	mov	r3, #0
	ldr	r2, [r2, #-100]
	ldr	r0, [r0, #-124]
	bl	send
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-100]
	cmp	r3, r2
	beq	.L33
	ldr	r0, .L40+20
	bl	perror
	b	.L34
.L33:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r0, fp, #4096
	sub	r0, r0, #12
	sub	r0, r0, #4
	ldr	r3, [r3, #-108]
	mov	r2, #4096
	mov	r1, #1
	bl	fread
	str	r0, [r4, #-100]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-100]
	cmp	r3, #0
	bne	.L35
.L34:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-108]
	bl	ferror
	mov	r3, r0
	cmp	r3, #0
	beq	.L39
	ldr	r0, .L40+24
	bl	perror
	b	.L31
.L39:
	nop
.L31:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-104]
	bl	free
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-108]
	cmp	r3, #0
	beq	.L36
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-108]
	bl	fclose
.L36:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-112]
	ldr	r2, .L40
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L38
	bl	__stack_chk_fail
.L38:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L41:
	.align	2
.L40:
	.word	.LC30
	.word	.LC25
	.word	.LC26
	.word	403
	.word	.LC27
	.word	.LC28
	.word	.LC29
	.size	handleFileRequest, .-handleFileRequest
	.section	.rodata
	.align	2
.LC31:
	.ascii	"signal() failed\000"
	.align	2
.LC32:
	.ascii	"usage: %s <server_port> <web_root>\012\000"
	.align	2
.LC33:
	.ascii	"accept() failed\000"
	.align	2
.LC34:
	.ascii	"r\000"
	.align	2
.LC35:
	.ascii	"fdopen failed\000"
	.align	2
.LC36:
	.ascii	"\000"
	.align	2
.LC37:
	.ascii	"\011 \015\012\000"
	.align	2
.LC38:
	.ascii	"GET\000"
	.align	2
.LC39:
	.ascii	"HTTP/1.0\000"
	.align	2
.LC40:
	.ascii	"HTTP/1.1\000"
	.align	2
.LC41:
	.ascii	"/..\000"
	.align	2
.LC42:
	.ascii	"/../\000"
	.align	2
.LC43:
	.ascii	"\012\000"
	.align	2
.LC44:
	.ascii	"%s \"%s %s %s\" %d %s\012\000"
	.align	2
.LC45:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 2088
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #2096
	sub	sp, sp, #8
	str	r0, [fp, #-2096]
	str	r1, [fp, #-2100]
	ldr	r3, .L62
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r1, #1
	mov	r0, #13
	bl	signal
	mov	r3, r0
	cmn	r3, #1
	bne	.L43
	ldr	r0, .L62+4
	bl	die
.L43:
	ldr	r3, [fp, #-2096]
	cmp	r3, #3
	beq	.L44
	ldr	r3, .L62+8
	ldr	r0, [r3]
	ldr	r3, [fp, #-2100]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L62+12
	bl	fprintf
	mov	r0, #1
	bl	exit
.L44:
	ldr	r3, [fp, #-2100]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r2, r0
	sub	r3, fp, #12
	sub	r3, r3, #2064
	sub	r3, r3, #10
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-2100]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-2064]
	sub	r3, fp, #12
	sub	r3, r3, #2064
	sub	r3, r3, #10
	ldrh	r3, [r3]
	mov	r0, r3
	bl	createServerSocket
	str	r0, [fp, #-2060]
.L60:
	mov	r3, #16
	str	r3, [fp, #-2084]
	sub	r2, fp, #2064
	sub	r2, r2, #12
	sub	r2, r2, #8
	sub	r3, fp, #2016
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-2060]
	bl	accept
	str	r0, [fp, #-2056]
	ldr	r3, [fp, #-2056]
	cmp	r3, #0
	bge	.L45
	ldr	r0, .L62+16
	bl	die
.L45:
	ldr	r1, .L62+20
	ldr	r0, [fp, #-2056]
	bl	fdopen
	str	r0, [fp, #-2052]
	ldr	r3, [fp, #-2052]
	cmp	r3, #0
	bne	.L46
	ldr	r0, .L62+24
	bl	die
.L46:
	ldr	r3, .L62+28
	str	r3, [fp, #-2076]
	ldr	r3, .L62+28
	str	r3, [fp, #-2072]
	ldr	r3, .L62+28
	str	r3, [fp, #-2068]
	sub	r3, fp, #1016
	ldr	r2, [fp, #-2052]
	mov	r1, #1000
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L47
	mov	r3, #400
	str	r3, [fp, #-2080]
	b	.L48
.L47:
	ldr	r3, .L62+32
	str	r3, [fp, #-2048]
	sub	r3, fp, #1016
	ldr	r1, [fp, #-2048]
	mov	r0, r3
	bl	strtok
	str	r0, [fp, #-2076]
	ldr	r1, [fp, #-2048]
	mov	r0, #0
	bl	strtok
	str	r0, [fp, #-2072]
	ldr	r1, [fp, #-2048]
	mov	r0, #0
	bl	strtok
	str	r0, [fp, #-2068]
	ldr	r1, [fp, #-2048]
	mov	r0, #0
	bl	strtok
	str	r0, [fp, #-2044]
	ldr	r3, [fp, #-2076]
	cmp	r3, #0
	beq	.L49
	ldr	r3, [fp, #-2072]
	cmp	r3, #0
	beq	.L49
	ldr	r3, [fp, #-2068]
	cmp	r3, #0
	beq	.L49
	ldr	r3, [fp, #-2044]
	cmp	r3, #0
	beq	.L50
.L49:
	ldr	r3, .L62+36
	str	r3, [fp, #-2080]
	ldr	r1, [fp, #-2080]
	ldr	r0, [fp, #-2056]
	bl	sendStatusLine
	b	.L48
.L50:
	ldr	r1, .L62+40
	ldr	r0, [fp, #-2076]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L51
	ldr	r3, .L62+36
	str	r3, [fp, #-2080]
	ldr	r1, [fp, #-2080]
	ldr	r0, [fp, #-2056]
	bl	sendStatusLine
	b	.L48
.L51:
	ldr	r1, .L62+44
	ldr	r0, [fp, #-2068]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L52
	ldr	r1, .L62+48
	ldr	r0, [fp, #-2068]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L52
	ldr	r3, .L62+36
	str	r3, [fp, #-2080]
	ldr	r1, [fp, #-2080]
	ldr	r0, [fp, #-2056]
	bl	sendStatusLine
	b	.L48
.L52:
	ldr	r3, [fp, #-2072]
	cmp	r3, #0
	beq	.L53
	ldr	r3, [fp, #-2072]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #47
	beq	.L54
.L53:
	mov	r3, #400
	str	r3, [fp, #-2080]
	ldr	r1, [fp, #-2080]
	ldr	r0, [fp, #-2056]
	bl	sendStatusLine
	b	.L48
.L54:
	ldr	r0, [fp, #-2072]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-2040]
	ldr	r3, [fp, #-2040]
	cmp	r3, #2
	ble	.L59
	ldr	r3, [fp, #-2040]
	sub	r3, r3, #3
	ldr	r2, [fp, #-2072]
	add	r3, r2, r3
	str	r3, [fp, #-2036]
	ldr	r1, .L62+52
	ldr	r0, [fp, #-2036]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L56
	ldr	r1, .L62+56
	ldr	r0, [fp, #-2072]
	bl	strstr
	mov	r3, r0
	cmp	r3, #0
	beq	.L59
.L56:
	mov	r3, #400
	str	r3, [fp, #-2080]
	ldr	r1, [fp, #-2080]
	ldr	r0, [fp, #-2056]
	bl	sendStatusLine
	b	.L48
.L59:
	sub	r3, fp, #2000
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r2, [fp, #-2052]
	mov	r1, #1000
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L57
	mov	r3, #400
	str	r3, [fp, #-2080]
	b	.L48
.L57:
	sub	r3, fp, #2000
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L62+60
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L58
	sub	r3, fp, #2000
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L62+64
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L58
	b	.L59
.L58:
	ldr	r2, [fp, #-2056]
	ldr	r1, [fp, #-2072]
	ldr	r0, [fp, #-2064]
	bl	handleFileRequest
	str	r0, [fp, #-2080]
.L48:
	ldr	r3, .L62+8
	ldr	r4, [r3]
	ldr	r0, [fp, #-2028]
	bl	inet_ntoa
	mov	r5, r0
	ldr	r0, [fp, #-2080]
	bl	getReasonPhrase
	mov	r3, r0
	str	r3, [sp, #12]
	ldr	r3, [fp, #-2080]
	str	r3, [sp, #8]
	ldr	r3, [fp, #-2068]
	str	r3, [sp, #4]
	ldr	r3, [fp, #-2072]
	str	r3, [sp]
	ldr	r3, [fp, #-2076]
	mov	r2, r5
	ldr	r1, .L62+68
	mov	r0, r4
	bl	fprintf
	ldr	r0, [fp, #-2052]
	bl	fclose
	b	.L60
.L63:
	.align	2
.L62:
	.word	.LC45
	.word	.LC31
	.word	stderr
	.word	.LC32
	.word	.LC33
	.word	.LC34
	.word	.LC35
	.word	.LC36
	.word	.LC37
	.word	501
	.word	.LC38
	.word	.LC39
	.word	.LC40
	.word	.LC41
	.word	.LC42
	.word	.LC22
	.word	.LC43
	.word	.LC44
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
