	.file	"311638.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"GET"
.LC1:
	.string	"POST"
.LC2:
	.string	"htdocs%s"
.LC3:
	.string	"\n"
	.text
	.globl	accept_request
	.type	accept_request, @function
accept_request:
.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, 2272
	mov	QWORD PTR -2264[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -2240[rbp], 0
	mov	QWORD PTR -2216[rbp], 0
	mov	rax, QWORD PTR -2264[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -2236[rbp], eax
	lea	rcx, -1040[rbp]
	mov	eax, DWORD PTR -2236[rbp]
	mov	edx, 1024
	mov	rsi, rcx
	mov	edi, eax
	call	get_line
	mov	DWORD PTR -2244[rbp], eax
	mov	QWORD PTR -2232[rbp], 0
	mov	QWORD PTR -2224[rbp], 0
	jmp	.L2
.L4:
	lea	rdx, -1040[rbp]
	mov	rax, QWORD PTR -2224[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	lea	rcx, -2064[rbp]
	mov	rdx, QWORD PTR -2232[rbp]
	add	rdx, rcx
	mov	BYTE PTR [rdx], al
	add	QWORD PTR -2232[rbp], 1
	add	QWORD PTR -2224[rbp], 1
.L2:
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	lea	rcx, -1040[rbp]
	mov	rax, QWORD PTR -2224[rbp]
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	movsx	rax, al
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 8192
	test	eax, eax
	jne	.L3
	cmp	QWORD PTR -2232[rbp], 253
	jbe	.L4
.L3:
	lea	rdx, -2064[rbp]
	mov	rax, QWORD PTR -2232[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	lea	rax, -2064[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	strcasecmp@PLT
	test	eax, eax
	je	.L5
	lea	rax, -2064[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	strcasecmp@PLT
	test	eax, eax
	je	.L5
	mov	eax, DWORD PTR -2236[rbp]
	mov	edi, eax
	call	unimplemented
	mov	eax, 0
	jmp	.L28
.L5:
	lea	rax, -2064[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	strcasecmp@PLT
	test	eax, eax
	jne	.L7
	mov	DWORD PTR -2240[rbp], 1
.L7:
	mov	QWORD PTR -2232[rbp], 0
	jmp	.L8
.L10:
	add	QWORD PTR -2224[rbp], 1
.L8:
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	lea	rcx, -1040[rbp]
	mov	rax, QWORD PTR -2224[rbp]
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	movsx	rax, al
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 8192
	test	eax, eax
	je	.L11
	cmp	QWORD PTR -2224[rbp], 1023
	jbe	.L10
	jmp	.L11
.L13:
	lea	rdx, -1040[rbp]
	mov	rax, QWORD PTR -2224[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	lea	rcx, -1808[rbp]
	mov	rdx, QWORD PTR -2232[rbp]
	add	rdx, rcx
	mov	BYTE PTR [rdx], al
	add	QWORD PTR -2232[rbp], 1
	add	QWORD PTR -2224[rbp], 1
.L11:
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	lea	rcx, -1040[rbp]
	mov	rax, QWORD PTR -2224[rbp]
	add	rax, rcx
	movzx	eax, BYTE PTR [rax]
	movsx	rax, al
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 8192
	test	eax, eax
	jne	.L12
	cmp	QWORD PTR -2232[rbp], 253
	ja	.L12
	cmp	QWORD PTR -2224[rbp], 1023
	jbe	.L13
.L12:
	lea	rdx, -1808[rbp]
	mov	rax, QWORD PTR -2232[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	lea	rax, -2064[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	strcasecmp@PLT
	test	eax, eax
	jne	.L14
	lea	rax, -1808[rbp]
	mov	QWORD PTR -2216[rbp], rax
	jmp	.L15
.L17:
	add	QWORD PTR -2216[rbp], 1
.L15:
	mov	rax, QWORD PTR -2216[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 63
	je	.L16
	mov	rax, QWORD PTR -2216[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L17
.L16:
	mov	rax, QWORD PTR -2216[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 63
	jne	.L14
	mov	DWORD PTR -2240[rbp], 1
	mov	rax, QWORD PTR -2216[rbp]
	mov	BYTE PTR [rax], 0
	add	QWORD PTR -2216[rbp], 1
.L14:
	lea	rdx, -1808[rbp]
	lea	rax, -1552[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -1552[rbp]
	mov	rdi, rax
	call	strlen@PLT
	sub	rax, 1
	movzx	eax, BYTE PTR -1552[rbp+rax]
	cmp	al, 47
	jne	.L18
	lea	rax, -1552[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rax, -1552[rbp]
	add	rax, rdx
	movabs	rsi, 8388005400609582697
	mov	QWORD PTR [rax], rsi
	mov	WORD PTR 8[rax], 27757
	mov	BYTE PTR 10[rax], 0
.L18:
	lea	rdx, -2208[rbp]
	lea	rax, -1552[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	stat@PLT
	cmp	eax, -1
	jne	.L19
	jmp	.L20
.L22:
	lea	rcx, -1040[rbp]
	mov	eax, DWORD PTR -2236[rbp]
	mov	edx, 1024
	mov	rsi, rcx
	mov	edi, eax
	call	get_line
	mov	DWORD PTR -2244[rbp], eax
.L20:
	cmp	DWORD PTR -2244[rbp], 0
	jle	.L21
	lea	rax, -1040[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	call	strcmp@PLT
	test	eax, eax
	jne	.L22
.L21:
	mov	eax, DWORD PTR -2236[rbp]
	mov	edi, eax
	call	not_found
	jmp	.L23
.L19:
	mov	eax, DWORD PTR -2184[rbp]
	and	eax, 61440
	cmp	eax, 16384
	jne	.L24
	lea	rax, -1552[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rax, -1552[rbp]
	add	rax, rdx
	movabs	rsi, 7507070005745183023
	mov	QWORD PTR [rax], rsi
	mov	DWORD PTR 8[rax], 7105908
.L24:
	mov	eax, DWORD PTR -2184[rbp]
	and	eax, 64
	test	eax, eax
	jne	.L25
	mov	eax, DWORD PTR -2184[rbp]
	and	eax, 8
	test	eax, eax
	jne	.L25
	mov	eax, DWORD PTR -2184[rbp]
	and	eax, 1
	test	eax, eax
	je	.L26
.L25:
	mov	DWORD PTR -2240[rbp], 1
.L26:
	cmp	DWORD PTR -2240[rbp], 0
	jne	.L27
	lea	rdx, -1552[rbp]
	mov	eax, DWORD PTR -2236[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	serve_file
	jmp	.L23
.L27:
	mov	rcx, QWORD PTR -2216[rbp]
	lea	rdx, -2064[rbp]
	lea	rsi, -1552[rbp]
	mov	eax, DWORD PTR -2236[rbp]
	mov	edi, eax
	call	execute_cgi
.L23:
	mov	eax, DWORD PTR -2236[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
.L28:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L29
	call	__stack_chk_fail@PLT
.L29:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	accept_request, .-accept_request
	.section	.rodata
.LC4:
	.string	"HTTP/1.0 400 BAD REQUEST\r\n"
.LC5:
	.string	"Content-type: text/html\r\n"
.LC6:
	.string	"\r\n"
	.align 8
.LC7:
	.string	"<P>Your browser sent a bad request, "
	.align 8
.LC8:
	.string	"such as a POST without a Content-Length.\r\n"
	.text
	.globl	bad_request
	.type	bad_request, @function
bad_request:
.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, 1056
	mov	DWORD PTR -1044[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -1040[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1044[rbp]
	mov	ecx, 0
	mov	edx, 1024
	mov	edi, eax
	call	send@PLT
	lea	rax, -1040[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1044[rbp]
	mov	ecx, 0
	mov	edx, 1024
	mov	edi, eax
	call	send@PLT
	lea	rax, -1040[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1044[rbp]
	mov	ecx, 0
	mov	edx, 1024
	mov	edi, eax
	call	send@PLT
	lea	rax, -1040[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1044[rbp]
	mov	ecx, 0
	mov	edx, 1024
	mov	edi, eax
	call	send@PLT
	lea	rax, -1040[rbp]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1044[rbp]
	mov	ecx, 0
	mov	edx, 1024
	mov	edi, eax
	call	send@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L31
	call	__stack_chk_fail@PLT
.L31:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	bad_request, .-bad_request
	.globl	cat
	.type	cat, @function
cat:
.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, 1056
	mov	DWORD PTR -1044[rbp], edi
	mov	QWORD PTR -1056[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rdx, QWORD PTR -1056[rbp]
	lea	rax, -1040[rbp]
	mov	esi, 1024
	mov	rdi, rax
	call	fgets@PLT
	jmp	.L33
.L34:
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1044[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	mov	rdx, QWORD PTR -1056[rbp]
	lea	rax, -1040[rbp]
	mov	esi, 1024
	mov	rdi, rax
	call	fgets@PLT
.L33:
	mov	rax, QWORD PTR -1056[rbp]
	mov	rdi, rax
	call	feof@PLT
	test	eax, eax
	je	.L34
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L35
	call	__stack_chk_fail@PLT
.L35:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	cat, .-cat
	.section	.rodata
	.align 8
.LC9:
	.string	"HTTP/1.0 500 Internal Server Error\r\n"
	.align 8
.LC10:
	.string	"<P>Error prohibited CGI execution.\r\n"
	.text
	.globl	cannot_execute
	.type	cannot_execute, @function
cannot_execute:
.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, 1056
	mov	DWORD PTR -1044[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -1040[rbp]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1044[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	lea	rax, -1040[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1044[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	lea	rax, -1040[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1044[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	lea	rax, -1040[rbp]
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1044[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L37
	call	__stack_chk_fail@PLT
.L37:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	cannot_execute, .-cannot_execute
	.globl	error_die
	.type	error_die, @function
error_die:
.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, 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
.LFE10:
	.size	error_die, .-error_die
	.section	.rodata
.LC11:
	.string	"Content-Length:"
.LC12:
	.string	"HTTP/1.0 200 OK\r\n"
.LC13:
	.string	"REQUEST_METHOD=%s"
.LC14:
	.string	"QUERY_STRING=%s"
.LC15:
	.string	"CONTENT_LENGTH=%d"
	.text
	.globl	execute_cgi
	.type	execute_cgi, @function
execute_cgi:
.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, 1888
	mov	DWORD PTR -1860[rbp], edi
	mov	QWORD PTR -1872[rbp], rsi
	mov	QWORD PTR -1880[rbp], rdx
	mov	QWORD PTR -1888[rbp], rcx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -1836[rbp], 1
	mov	DWORD PTR -1832[rbp], -1
	mov	BYTE PTR -1040[rbp], 65
	mov	BYTE PTR -1039[rbp], 0
	mov	rax, QWORD PTR -1880[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	strcasecmp@PLT
	test	eax, eax
	jne	.L40
	jmp	.L41
.L43:
	lea	rcx, -1040[rbp]
	mov	eax, DWORD PTR -1860[rbp]
	mov	edx, 1024
	mov	rsi, rcx
	mov	edi, eax
	call	get_line
	mov	DWORD PTR -1836[rbp], eax
.L41:
	cmp	DWORD PTR -1836[rbp], 0
	jle	.L42
	lea	rax, -1040[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	call	strcmp@PLT
	test	eax, eax
	jne	.L43
	jmp	.L42
.L40:
	lea	rcx, -1040[rbp]
	mov	eax, DWORD PTR -1860[rbp]
	mov	edx, 1024
	mov	rsi, rcx
	mov	edi, eax
	call	get_line
	mov	DWORD PTR -1836[rbp], eax
	jmp	.L44
.L47:
	mov	BYTE PTR -1025[rbp], 0
	lea	rax, -1040[rbp]
	lea	rsi, .LC11[rip]
	mov	rdi, rax
	call	strcasecmp@PLT
	test	eax, eax
	jne	.L45
	lea	rax, -1040[rbp]
	add	rax, 16
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -1832[rbp], eax
.L45:
	lea	rcx, -1040[rbp]
	mov	eax, DWORD PTR -1860[rbp]
	mov	edx, 1024
	mov	rsi, rcx
	mov	edi, eax
	call	get_line
	mov	DWORD PTR -1836[rbp], eax
.L44:
	cmp	DWORD PTR -1836[rbp], 0
	jle	.L46
	lea	rax, -1040[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	call	strcmp@PLT
	test	eax, eax
	jne	.L47
.L46:
	cmp	DWORD PTR -1832[rbp], -1
	jne	.L42
	mov	eax, DWORD PTR -1860[rbp]
	mov	edi, eax
	call	bad_request
	jmp	.L39
.L42:
	lea	rax, -1040[rbp]
	lea	rsi, .LC12[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1860[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	lea	rax, -1824[rbp]
	mov	rdi, rax
	call	pipe@PLT
	test	eax, eax
	jns	.L49
	mov	eax, DWORD PTR -1860[rbp]
	mov	edi, eax
	call	cannot_execute
	jmp	.L39
.L49:
	lea	rax, -1816[rbp]
	mov	rdi, rax
	call	pipe@PLT
	test	eax, eax
	jns	.L50
	mov	eax, DWORD PTR -1860[rbp]
	mov	edi, eax
	call	cannot_execute
	jmp	.L39
.L50:
	call	fork@PLT
	mov	DWORD PTR -1828[rbp], eax
	cmp	DWORD PTR -1828[rbp], 0
	jns	.L51
	mov	eax, DWORD PTR -1860[rbp]
	mov	edi, eax
	call	cannot_execute
	jmp	.L39
.L51:
	cmp	DWORD PTR -1828[rbp], 0
	jne	.L52
	mov	eax, DWORD PTR -1820[rbp]
	mov	esi, 1
	mov	edi, eax
	call	dup2@PLT
	mov	eax, DWORD PTR -1816[rbp]
	mov	esi, 0
	mov	edi, eax
	call	dup2@PLT
	mov	eax, DWORD PTR -1824[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -1812[rbp]
	mov	edi, eax
	call	close@PLT
	mov	rdx, QWORD PTR -1880[rbp]
	lea	rax, -1808[rbp]
	lea	rsi, .LC13[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -1808[rbp]
	mov	rdi, rax
	call	putenv@PLT
	mov	rax, QWORD PTR -1880[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	call	strcasecmp@PLT
	test	eax, eax
	jne	.L53
	mov	rdx, QWORD PTR -1888[rbp]
	lea	rax, -1552[rbp]
	lea	rsi, .LC14[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -1552[rbp]
	mov	rdi, rax
	call	putenv@PLT
	jmp	.L54
.L53:
	mov	edx, DWORD PTR -1832[rbp]
	lea	rax, -1296[rbp]
	lea	rsi, .LC15[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -1296[rbp]
	mov	rdi, rax
	call	putenv@PLT
.L54:
	mov	rcx, QWORD PTR -1872[rbp]
	mov	rax, QWORD PTR -1872[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	rdi, rax
	mov	eax, 0
	call	execl@PLT
	mov	edi, 0
	call	exit@PLT
.L52:
	mov	eax, DWORD PTR -1820[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -1816[rbp]
	mov	edi, eax
	call	close@PLT
	mov	rax, QWORD PTR -1880[rbp]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	strcasecmp@PLT
	test	eax, eax
	jne	.L58
	mov	DWORD PTR -1840[rbp], 0
	jmp	.L56
.L57:
	lea	rsi, -1845[rbp]
	mov	eax, DWORD PTR -1860[rbp]
	mov	ecx, 0
	mov	edx, 1
	mov	edi, eax
	call	recv@PLT
	mov	eax, DWORD PTR -1812[rbp]
	lea	rcx, -1845[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	add	DWORD PTR -1840[rbp], 1
.L56:
	mov	eax, DWORD PTR -1840[rbp]
	cmp	eax, DWORD PTR -1832[rbp]
	jl	.L57
	jmp	.L58
.L59:
	lea	rsi, -1845[rbp]
	mov	eax, DWORD PTR -1860[rbp]
	mov	ecx, 0
	mov	edx, 1
	mov	edi, eax
	call	send@PLT
.L58:
	mov	eax, DWORD PTR -1824[rbp]
	lea	rcx, -1845[rbp]
	mov	edx, 1
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	test	rax, rax
	jg	.L59
	mov	eax, DWORD PTR -1824[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -1812[rbp]
	mov	edi, eax
	call	close@PLT
	lea	rcx, -1844[rbp]
	mov	eax, DWORD PTR -1828[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	call	waitpid@PLT
.L39:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L61
	call	__stack_chk_fail@PLT
.L61:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	execute_cgi, .-execute_cgi
	.section	.rodata
.LC16:
	.string	"%02X\n"
	.text
	.globl	get_line
	.type	get_line, @function
get_line:
.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	DWORD PTR -40[rbp], edx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -16[rbp], 0
	mov	BYTE PTR -17[rbp], 0
	jmp	.L63
.L68:
	lea	rsi, -17[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	ecx, 0
	mov	edx, 1
	mov	edi, eax
	call	recv@PLT
	mov	DWORD PTR -12[rbp], eax
	movzx	eax, BYTE PTR -17[rbp]
	movsx	eax, al
	mov	esi, eax
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	printf@PLT
	cmp	DWORD PTR -12[rbp], 0
	jle	.L64
	movzx	eax, BYTE PTR -17[rbp]
	cmp	al, 13
	jne	.L65
	lea	rsi, -17[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	ecx, 2
	mov	edx, 1
	mov	edi, eax
	call	recv@PLT
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 0
	jle	.L66
	movzx	eax, BYTE PTR -17[rbp]
	cmp	al, 10
	jne	.L66
	lea	rsi, -17[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	ecx, 0
	mov	edx, 1
	mov	edi, eax
	call	recv@PLT
	jmp	.L65
.L66:
	mov	BYTE PTR -17[rbp], 10
.L65:
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -48[rbp]
	add	rdx, rax
	movzx	eax, BYTE PTR -17[rbp]
	mov	BYTE PTR [rdx], al
	add	DWORD PTR -16[rbp], 1
	jmp	.L63
.L64:
	mov	BYTE PTR -17[rbp], 10
.L63:
	mov	eax, DWORD PTR -40[rbp]
	sub	eax, 1
	cmp	DWORD PTR -16[rbp], eax
	jge	.L67
	movzx	eax, BYTE PTR -17[rbp]
	cmp	al, 10
	jne	.L68
.L67:
	mov	eax, DWORD PTR -16[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	mov	eax, DWORD PTR -16[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L70
	call	__stack_chk_fail@PLT
.L70:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	get_line, .-get_line
	.section	.rodata
.LC17:
	.string	"Content-Type: text/html\r\n"
	.text
	.globl	headers
	.type	headers, @function
headers:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 1056
	mov	DWORD PTR -1044[rbp], edi
	mov	QWORD PTR -1056[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -1040[rbp]
	movabs	rdx, 3471766442030158920
	movabs	rcx, 957946345412375072
	mov	QWORD PTR [rax], rdx
	mov	QWORD PTR 8[rax], rcx
	mov	WORD PTR 16[rax], 10
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1044[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	lea	rax, -1040[rbp]
	movabs	rdx, 2322294337967383891
	movabs	rcx, 7237412644500694122
	mov	QWORD PTR [rax], rdx
	mov	QWORD PTR 8[rax], rcx
	movabs	rcx, 724288090028257327
	mov	QWORD PTR 16[rax], rcx
	mov	BYTE PTR 24[rax], 0
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1044[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	lea	rax, -1040[rbp]
	lea	rsi, .LC17[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1044[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	lea	rax, -1040[rbp]
	mov	WORD PTR [rax], 2573
	mov	BYTE PTR 2[rax], 0
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1044[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L72
	call	__stack_chk_fail@PLT
.L72:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	headers, .-headers
	.section	.rodata
.LC18:
	.string	"HTTP/1.0 404 NOT FOUND\r\n"
.LC19:
	.string	"Server: jdbhttpd/0.1.0\r\n"
	.align 8
.LC20:
	.string	"<HTML><TITLE>Not Found</TITLE>\r\n"
	.align 8
.LC21:
	.string	"<BODY><P>The server could not fulfill\r\n"
	.align 8
.LC22:
	.string	"your request because the resource specified\r\n"
	.align 8
.LC23:
	.string	"is unavailable or nonexistent.\r\n"
.LC24:
	.string	"</BODY></HTML>\r\n"
	.text
	.globl	not_found
	.type	not_found, @function
not_found:
.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, 1056
	mov	DWORD PTR -1044[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -1040[rbp]
	lea	rsi, .LC18[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1044[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	lea	rax, -1040[rbp]
	lea	rsi, .LC19[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1044[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	lea	rax, -1040[rbp]
	lea	rsi, .LC17[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1044[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	lea	rax, -1040[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1044[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	lea	rax, -1040[rbp]
	lea	rsi, .LC20[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1044[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	lea	rax, -1040[rbp]
	lea	rsi, .LC21[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1044[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	lea	rax, -1040[rbp]
	lea	rsi, .LC22[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1044[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	lea	rax, -1040[rbp]
	lea	rsi, .LC23[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1044[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	lea	rax, -1040[rbp]
	lea	rsi, .LC24[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1044[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L74
	call	__stack_chk_fail@PLT
.L74:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	not_found, .-not_found
	.section	.rodata
.LC25:
	.string	"r"
	.text
	.globl	serve_file
	.type	serve_file, @function
serve_file:
.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, 1072
	mov	DWORD PTR -1060[rbp], edi
	mov	QWORD PTR -1072[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -1048[rbp], 0
	mov	DWORD PTR -1052[rbp], 1
	mov	BYTE PTR -1040[rbp], 65
	mov	BYTE PTR -1039[rbp], 0
	jmp	.L76
.L78:
	lea	rcx, -1040[rbp]
	mov	eax, DWORD PTR -1060[rbp]
	mov	edx, 1024
	mov	rsi, rcx
	mov	edi, eax
	call	get_line
	mov	DWORD PTR -1052[rbp], eax
.L76:
	cmp	DWORD PTR -1052[rbp], 0
	jle	.L77
	lea	rax, -1040[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	call	strcmp@PLT
	test	eax, eax
	jne	.L78
.L77:
	mov	rax, QWORD PTR -1072[rbp]
	lea	rsi, .LC25[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -1048[rbp], rax
	cmp	QWORD PTR -1048[rbp], 0
	jne	.L79
	mov	eax, DWORD PTR -1060[rbp]
	mov	edi, eax
	call	not_found
	jmp	.L80
.L79:
	mov	rdx, QWORD PTR -1072[rbp]
	mov	eax, DWORD PTR -1060[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	headers
	mov	rdx, QWORD PTR -1048[rbp]
	mov	eax, DWORD PTR -1060[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	cat
.L80:
	mov	rax, QWORD PTR -1048[rbp]
	mov	rdi, rax
	call	fclose@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L81
	call	__stack_chk_fail@PLT
.L81:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	serve_file, .-serve_file
	.section	.rodata
.LC26:
	.string	"socket"
.LC27:
	.string	"bind"
.LC28:
	.string	"getsockname"
.LC29:
	.string	"listen"
	.text
	.globl	startup
	.type	startup, @function
startup:
.LFB16:
	.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	QWORD PTR -56[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -36[rbp], 0
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], -1
	jne	.L83
	lea	rdi, .LC26[rip]
	call	error_die
.L83:
	lea	rax, -32[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	WORD PTR -32[rbp], 2
	mov	rax, QWORD PTR -56[rbp]
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -30[rbp], ax
	mov	edi, 0
	call	htonl@PLT
	mov	DWORD PTR -28[rbp], eax
	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	.L84
	lea	rdi, .LC27[rip]
	call	error_die
.L84:
	mov	rax, QWORD PTR -56[rbp]
	movzx	eax, WORD PTR [rax]
	test	ax, ax
	jne	.L85
	mov	DWORD PTR -40[rbp], 16
	lea	rdx, -40[rbp]
	lea	rcx, -32[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	getsockname@PLT
	cmp	eax, -1
	jne	.L86
	lea	rdi, .LC28[rip]
	call	error_die
.L86:
	movzx	eax, WORD PTR -30[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	ntohs@PLT
	mov	rdx, QWORD PTR -56[rbp]
	mov	WORD PTR [rdx], ax
.L85:
	mov	eax, DWORD PTR -36[rbp]
	mov	esi, 5
	mov	edi, eax
	call	listen@PLT
	test	eax, eax
	jns	.L87
	lea	rdi, .LC29[rip]
	call	error_die
.L87:
	mov	eax, DWORD PTR -36[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L89
	call	__stack_chk_fail@PLT
.L89:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	startup, .-startup
	.section	.rodata
	.align 8
.LC30:
	.string	"HTTP/1.0 501 Method Not Implemented\r\n"
	.align 8
.LC31:
	.string	"<HTML><HEAD><TITLE>Method Not Implemented\r\n"
.LC32:
	.string	"</TITLE></HEAD>\r\n"
	.align 8
.LC33:
	.string	"<BODY><P>HTTP request method not supported.\r\n"
	.text
	.globl	unimplemented
	.type	unimplemented, @function
unimplemented:
.LFB17:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 1056
	mov	DWORD PTR -1044[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -1040[rbp]
	lea	rsi, .LC30[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1044[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	lea	rax, -1040[rbp]
	lea	rsi, .LC19[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1044[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	lea	rax, -1040[rbp]
	lea	rsi, .LC17[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1044[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	lea	rax, -1040[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1044[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	lea	rax, -1040[rbp]
	lea	rsi, .LC31[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1044[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	lea	rax, -1040[rbp]
	lea	rsi, .LC32[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1044[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	lea	rax, -1040[rbp]
	lea	rsi, .LC33[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1044[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	lea	rax, -1040[rbp]
	lea	rsi, .LC24[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1044[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L91
	call	__stack_chk_fail@PLT
.L91:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	unimplemented, .-unimplemented
	.section	.rodata
.LC34:
	.string	"httpd running on port %d\n"
.LC35:
	.string	"accept"
.LC36:
	.string	"pthread_create"
	.text
	.globl	main
	.type	main, @function
main:
.LFB18:
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -44[rbp], -1
	mov	WORD PTR -54[rbp], 0
	mov	DWORD PTR -52[rbp], -1
	mov	DWORD PTR -48[rbp], 16
	lea	rax, -54[rbp]
	mov	rdi, rax
	call	startup
	mov	DWORD PTR -44[rbp], eax
	movzx	eax, WORD PTR -54[rbp]
	movzx	eax, ax
	mov	esi, eax
	lea	rdi, .LC34[rip]
	mov	eax, 0
	call	printf@PLT
.L95:
	lea	rdx, -48[rbp]
	lea	rcx, -32[rbp]
	mov	eax, DWORD PTR -44[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -52[rbp], eax
	mov	eax, DWORD PTR -52[rbp]
	cmp	eax, -1
	jne	.L93
	lea	rdi, .LC35[rip]
	call	error_die
.L93:
	lea	rax, -52[rbp]
	mov	rdi, rax
	call	accept_request
	lea	rdx, -52[rbp]
	lea	rax, -40[rbp]
	mov	rcx, rdx
	lea	rdx, accept_request[rip]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_create@PLT
	test	eax, eax
	je	.L95
	lea	rdi, .LC36[rip]
	call	perror@PLT
	jmp	.L95
	.cfi_endproc
.LFE18:
	.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	"311638.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"GET\000"
	.align	2
.LC1:
	.ascii	"POST\000"
	.align	2
.LC2:
	.ascii	"htdocs%s\000"
	.align	2
.LC3:
	.ascii	"index.html\000"
	.align	2
.LC4:
	.ascii	"\012\000"
	.align	2
.LC5:
	.ascii	"/index.html\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	accept_request
	.syntax unified
	.arm
	.fpu softvfp
	.type	accept_request, %function
accept_request:
	@ args = 0, pretend = 0, frame = 2176
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #2176
	str	r0, [fp, #-2176]
	ldr	r3, .L30
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-2160]
	mov	r3, #0
	str	r3, [fp, #-2156]
	ldr	r3, [fp, #-2176]
	ldr	r3, [r3]
	str	r3, [fp, #-2152]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, r3
	ldr	r0, [fp, #-2152]
	bl	get_line
	str	r0, [fp, #-2172]
	mov	r3, #0
	str	r3, [fp, #-2168]
	mov	r3, #0
	str	r3, [fp, #-2164]
	b	.L2
.L4:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-2164]
	add	r3, r3, r2
	ldrb	r1, [r3]	@ zero_extendqisi2
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-2168]
	add	r3, r3, r2
	mov	r2, r1
	strb	r2, [r3]
	ldr	r3, [fp, #-2168]
	add	r3, r3, #1
	str	r3, [fp, #-2168]
	ldr	r3, [fp, #-2164]
	add	r3, r3, #1
	str	r3, [fp, #-2164]
.L2:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, [fp, #-2164]
	add	r3, r3, r1
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #8192
	cmp	r3, #0
	bne	.L3
	ldr	r3, [fp, #-2168]
	cmp	r3, #253
	bls	.L4
.L3:
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-2168]
	add	r3, r3, r2
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L30+4
	mov	r0, r3
	bl	strcasecmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L5
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L30+8
	mov	r0, r3
	bl	strcasecmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L5
	ldr	r0, [fp, #-2152]
	bl	unimplemented
	mov	r3, #0
	b	.L28
.L5:
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L30+8
	mov	r0, r3
	bl	strcasecmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L7
	mov	r3, #1
	str	r3, [fp, #-2160]
.L7:
	mov	r3, #0
	str	r3, [fp, #-2168]
	b	.L8
.L10:
	ldr	r3, [fp, #-2164]
	add	r3, r3, #1
	str	r3, [fp, #-2164]
.L8:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, [fp, #-2164]
	add	r3, r3, r1
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #8192
	cmp	r3, #0
	beq	.L11
	ldr	r3, [fp, #-2164]
	cmp	r3, #1024
	bcc	.L10
	b	.L11
.L13:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-2164]
	add	r3, r3, r2
	ldrb	r1, [r3]	@ zero_extendqisi2
	sub	r3, fp, #1792
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-2168]
	add	r3, r3, r2
	mov	r2, r1
	strb	r2, [r3]
	ldr	r3, [fp, #-2168]
	add	r3, r3, #1
	str	r3, [fp, #-2168]
	ldr	r3, [fp, #-2164]
	add	r3, r3, #1
	str	r3, [fp, #-2164]
.L11:
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, [fp, #-2164]
	add	r3, r3, r1
	ldrb	r3, [r3]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #8192
	cmp	r3, #0
	bne	.L12
	ldr	r3, [fp, #-2168]
	cmp	r3, #253
	bhi	.L12
	ldr	r3, [fp, #-2164]
	cmp	r3, #1024
	bcc	.L13
.L12:
	sub	r3, fp, #1792
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-2168]
	add	r3, r3, r2
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L30+4
	mov	r0, r3
	bl	strcasecmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L14
	sub	r3, fp, #1792
	sub	r3, r3, #4
	sub	r3, r3, #4
	str	r3, [fp, #-2156]
	b	.L15
.L17:
	ldr	r3, [fp, #-2156]
	add	r3, r3, #1
	str	r3, [fp, #-2156]
.L15:
	ldr	r3, [fp, #-2156]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #63
	beq	.L16
	ldr	r3, [fp, #-2156]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L17
.L16:
	ldr	r3, [fp, #-2156]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #63
	bne	.L14
	mov	r3, #1
	str	r3, [fp, #-2160]
	ldr	r3, [fp, #-2156]
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-2156]
	add	r3, r3, #1
	str	r3, [fp, #-2156]
.L14:
	sub	r2, fp, #1792
	sub	r2, r2, #4
	sub	r2, r2, #4
	sub	r3, fp, #1536
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L30+12
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #1536
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	sub	r3, r3, #1
	sub	r2, fp, #4
	add	r3, r2, r3
	ldrb	r3, [r3, #-1540]	@ zero_extendqisi2
	cmp	r3, #47
	bne	.L18
	sub	r3, fp, #1536
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #1536
	sub	r3, r3, #4
	sub	r3, r3, #4
	add	r3, r3, r2
	ldr	r2, .L30+16
	mov	r0, r3
	mov	r1, r2
	mov	r3, #11
	mov	r2, r3
	bl	memcpy
.L18:
	sub	r2, fp, #2144
	sub	r2, r2, #4
	sub	r3, fp, #1536
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r2
	mov	r0, r3
	bl	stat
	mov	r3, r0
	cmn	r3, #1
	bne	.L19
	b	.L20
.L22:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, r3
	ldr	r0, [fp, #-2152]
	bl	get_line
	str	r0, [fp, #-2172]
.L20:
	ldr	r3, [fp, #-2172]
	cmp	r3, #0
	ble	.L21
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L30+20
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L22
.L21:
	ldr	r0, [fp, #-2152]
	bl	not_found
	b	.L23
.L19:
	ldr	r3, [fp, #-2132]
	and	r3, r3, #61440
	cmp	r3, #16384
	bne	.L24
	sub	r3, fp, #1536
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #1536
	sub	r3, r3, #4
	sub	r3, r3, #4
	add	r3, r3, r2
	ldr	r2, .L30+24
	mov	r0, r3
	mov	r1, r2
	mov	r3, #12
	mov	r2, r3
	bl	memcpy
.L24:
	ldr	r3, [fp, #-2132]
	and	r3, r3, #64
	cmp	r3, #0
	bne	.L25
	ldr	r3, [fp, #-2132]
	and	r3, r3, #8
	cmp	r3, #0
	bne	.L25
	ldr	r3, [fp, #-2132]
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L26
.L25:
	mov	r3, #1
	str	r3, [fp, #-2160]
.L26:
	ldr	r3, [fp, #-2160]
	cmp	r3, #0
	bne	.L27
	sub	r3, fp, #1536
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-2152]
	bl	serve_file
	b	.L23
.L27:
	sub	r2, fp, #2048
	sub	r2, r2, #4
	sub	r2, r2, #4
	sub	r1, fp, #1536
	sub	r1, r1, #4
	sub	r1, r1, #4
	ldr	r3, [fp, #-2156]
	ldr	r0, [fp, #-2152]
	bl	execute_cgi
.L23:
	ldr	r0, [fp, #-2152]
	bl	close
	mov	r3, #0
.L28:
	ldr	r2, .L30
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L29
	bl	__stack_chk_fail
.L29:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L31:
	.align	2
.L30:
	.word	.LC6
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	accept_request, .-accept_request
	.section	.rodata
	.align	2
.LC7:
	.ascii	"HTTP/1.0 400 BAD REQUEST\015\012\000"
	.align	2
.LC8:
	.ascii	"Content-type: text/html\015\012\000"
	.align	2
.LC9:
	.ascii	"\015\012\000"
	.align	2
.LC10:
	.ascii	"<P>Your browser sent a bad request, \000"
	.align	2
.LC11:
	.ascii	"such as a POST without a Content-Length.\015\012\000"
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	bad_request
	.syntax unified
	.arm
	.fpu softvfp
	.type	bad_request, %function
bad_request:
	@ args = 0, pretend = 0, frame = 1040
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1040
	str	r0, [fp, #-1040]
	ldr	r3, .L34
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L34+4
	mov	r0, r3
	bl	sprintf
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	mov	r2, #1024
	ldr	r0, [fp, #-1040]
	bl	send
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L34+8
	mov	r0, r3
	bl	sprintf
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	mov	r2, #1024
	ldr	r0, [fp, #-1040]
	bl	send
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L34+12
	mov	r0, r3
	bl	sprintf
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	mov	r2, #1024
	ldr	r0, [fp, #-1040]
	bl	send
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L34+16
	mov	r0, r3
	bl	sprintf
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	mov	r2, #1024
	ldr	r0, [fp, #-1040]
	bl	send
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L34+20
	mov	r0, r3
	bl	sprintf
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	mov	r2, #1024
	ldr	r0, [fp, #-1040]
	bl	send
	nop
	ldr	r3, .L34
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L33
	bl	__stack_chk_fail
.L33:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L35:
	.align	2
.L34:
	.word	.LC12
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.size	bad_request, .-bad_request
	.section	.rodata
	.align	2
.LC13:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	cat
	.syntax unified
	.arm
	.fpu softvfp
	.type	cat, %function
cat:
	@ args = 0, pretend = 0, frame = 1040
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1040
	str	r0, [fp, #-1040]
	str	r1, [fp, #-1044]
	ldr	r3, .L40
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-1044]
	mov	r1, #1024
	mov	r0, r3
	bl	fgets
	b	.L37
.L38:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	ldr	r0, [fp, #-1040]
	bl	send
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-1044]
	mov	r1, #1024
	mov	r0, r3
	bl	fgets
.L37:
	ldr	r0, [fp, #-1044]
	bl	feof
	mov	r3, r0
	cmp	r3, #0
	beq	.L38
	nop
	ldr	r3, .L40
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L39
	bl	__stack_chk_fail
.L39:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L41:
	.align	2
.L40:
	.word	.LC13
	.size	cat, .-cat
	.section	.rodata
	.align	2
.LC14:
	.ascii	"HTTP/1.0 500 Internal Server Error\015\012\000"
	.align	2
.LC15:
	.ascii	"<P>Error prohibited CGI execution.\015\012\000"
	.align	2
.LC16:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	cannot_execute
	.syntax unified
	.arm
	.fpu softvfp
	.type	cannot_execute, %function
cannot_execute:
	@ args = 0, pretend = 0, frame = 1040
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1040
	str	r0, [fp, #-1040]
	ldr	r3, .L44
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L44+4
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	ldr	r0, [fp, #-1040]
	bl	send
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L44+8
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	ldr	r0, [fp, #-1040]
	bl	send
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L44+12
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	ldr	r0, [fp, #-1040]
	bl	send
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L44+16
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	ldr	r0, [fp, #-1040]
	bl	send
	nop
	ldr	r3, .L44
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L43
	bl	__stack_chk_fail
.L43:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L45:
	.align	2
.L44:
	.word	.LC16
	.word	.LC14
	.word	.LC8
	.word	.LC9
	.word	.LC15
	.size	cannot_execute, .-cannot_execute
	.align	2
	.global	error_die
	.syntax unified
	.arm
	.fpu softvfp
	.type	error_die, %function
error_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	error_die, .-error_die
	.section	.rodata
	.align	2
.LC17:
	.ascii	"Content-Length:\000"
	.align	2
.LC18:
	.ascii	"HTTP/1.0 200 OK\015\012\000"
	.align	2
.LC19:
	.ascii	"REQUEST_METHOD=%s\000"
	.align	2
.LC20:
	.ascii	"QUERY_STRING=%s\000"
	.align	2
.LC21:
	.ascii	"CONTENT_LENGTH=%d\000"
	.align	2
.LC22:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	execute_cgi
	.syntax unified
	.arm
	.fpu softvfp
	.type	execute_cgi, %function
execute_cgi:
	@ args = 0, pretend = 0, frame = 1856
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1856
	str	r0, [fp, #-1848]
	str	r1, [fp, #-1852]
	str	r2, [fp, #-1856]
	str	r3, [fp, #-1860]
	ldr	r3, .L70
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #1
	str	r3, [fp, #-1828]
	mvn	r3, #0
	str	r3, [fp, #-1824]
	mov	r3, #65
	strb	r3, [fp, #-1032]
	mov	r3, #0
	strb	r3, [fp, #-1031]
	ldr	r1, .L70+4
	ldr	r0, [fp, #-1856]
	bl	strcasecmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L48
	b	.L49
.L51:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, r3
	ldr	r0, [fp, #-1848]
	bl	get_line
	str	r0, [fp, #-1828]
.L49:
	ldr	r3, [fp, #-1828]
	cmp	r3, #0
	ble	.L50
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L70+8
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L51
	b	.L50
.L48:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, r3
	ldr	r0, [fp, #-1848]
	bl	get_line
	str	r0, [fp, #-1828]
	b	.L52
.L55:
	mov	r3, #0
	strb	r3, [fp, #-1017]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L70+12
	mov	r0, r3
	bl	strcasecmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L53
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	add	r3, r3, #16
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-1824]
.L53:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, r3
	ldr	r0, [fp, #-1848]
	bl	get_line
	str	r0, [fp, #-1828]
.L52:
	ldr	r3, [fp, #-1828]
	cmp	r3, #0
	ble	.L54
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L70+8
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L55
.L54:
	ldr	r3, [fp, #-1824]
	cmn	r3, #1
	bne	.L50
	ldr	r0, [fp, #-1848]
	bl	bad_request
	b	.L47
.L50:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L70+16
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	ldr	r0, [fp, #-1848]
	bl	send
	sub	r3, fp, #1808
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	pipe
	mov	r3, r0
	cmp	r3, #0
	bge	.L57
	ldr	r0, [fp, #-1848]
	bl	cannot_execute
	b	.L47
.L57:
	sub	r3, fp, #1792
	sub	r3, r3, #4
	sub	r3, r3, #12
	mov	r0, r3
	bl	pipe
	mov	r3, r0
	cmp	r3, #0
	bge	.L58
	ldr	r0, [fp, #-1848]
	bl	cannot_execute
	b	.L47
.L58:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-1820]
	ldr	r3, [fp, #-1820]
	cmp	r3, #0
	bge	.L59
	ldr	r0, [fp, #-1848]
	bl	cannot_execute
	b	.L47
.L59:
	ldr	r3, [fp, #-1820]
	cmp	r3, #0
	bne	.L60
	ldr	r3, [fp, #-1812]
	mov	r1, #1
	mov	r0, r3
	bl	dup2
	ldr	r3, [fp, #-1808]
	mov	r1, #0
	mov	r0, r3
	bl	dup2
	ldr	r3, [fp, #-1816]
	mov	r0, r3
	bl	close
	ldr	r3, [fp, #-1804]
	mov	r0, r3
	bl	close
	sub	r3, fp, #1792
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-1856]
	ldr	r1, .L70+20
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #1792
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	putenv
	ldr	r1, .L70+4
	ldr	r0, [fp, #-1856]
	bl	strcasecmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L61
	sub	r3, fp, #1536
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-1860]
	ldr	r1, .L70+24
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #1536
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	putenv
	b	.L62
.L61:
	sub	r3, fp, #1280
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, [fp, #-1824]
	ldr	r1, .L70+28
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #1280
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	putenv
.L62:
	mov	r2, #0
	ldr	r1, [fp, #-1852]
	ldr	r0, [fp, #-1852]
	bl	execl
	mov	r0, #0
	bl	exit
.L60:
	ldr	r3, [fp, #-1812]
	mov	r0, r3
	bl	close
	ldr	r3, [fp, #-1808]
	mov	r0, r3
	bl	close
	ldr	r1, .L70+32
	ldr	r0, [fp, #-1856]
	bl	strcasecmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L66
	mov	r3, #0
	str	r3, [fp, #-1832]
	b	.L64
.L65:
	sub	r1, fp, #1824
	sub	r1, r1, #4
	sub	r1, r1, #9
	mov	r3, #0
	mov	r2, #1
	ldr	r0, [fp, #-1848]
	bl	recv
	ldr	r0, [fp, #-1804]
	sub	r3, fp, #1824
	sub	r3, r3, #4
	sub	r3, r3, #9
	mov	r2, #1
	mov	r1, r3
	bl	write
	ldr	r3, [fp, #-1832]
	add	r3, r3, #1
	str	r3, [fp, #-1832]
.L64:
	ldr	r2, [fp, #-1832]
	ldr	r3, [fp, #-1824]
	cmp	r2, r3
	blt	.L65
	b	.L66
.L67:
	sub	r1, fp, #1824
	sub	r1, r1, #4
	sub	r1, r1, #9
	mov	r3, #0
	mov	r2, #1
	ldr	r0, [fp, #-1848]
	bl	send
.L66:
	ldr	r0, [fp, #-1816]
	sub	r3, fp, #1824
	sub	r3, r3, #4
	sub	r3, r3, #9
	mov	r2, #1
	mov	r1, r3
	bl	read
	mov	r3, r0
	cmp	r3, #0
	bgt	.L67
	ldr	r3, [fp, #-1816]
	mov	r0, r3
	bl	close
	ldr	r3, [fp, #-1804]
	mov	r0, r3
	bl	close
	sub	r3, fp, #1824
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-1820]
	bl	waitpid
.L47:
	ldr	r3, .L70
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L69
	bl	__stack_chk_fail
.L69:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L71:
	.align	2
.L70:
	.word	.LC22
	.word	.LC0
	.word	.LC4
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.word	.LC20
	.word	.LC21
	.word	.LC1
	.size	execute_cgi, .-execute_cgi
	.section	.rodata
	.align	2
.LC23:
	.ascii	"%02X\012\000"
	.align	2
.LC24:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	get_line
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_line, %function
get_line:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	ldr	r3, .L81
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	strb	r3, [fp, #-17]
	b	.L73
.L78:
	sub	r1, fp, #17
	mov	r3, #0
	mov	r2, #1
	ldr	r0, [fp, #-24]
	bl	recv
	str	r0, [fp, #-12]
	ldrb	r3, [fp, #-17]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, .L81+4
	bl	printf
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	ble	.L74
	ldrb	r3, [fp, #-17]	@ zero_extendqisi2
	cmp	r3, #13
	bne	.L75
	sub	r1, fp, #17
	mov	r3, #2
	mov	r2, #1
	ldr	r0, [fp, #-24]
	bl	recv
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	ble	.L76
	ldrb	r3, [fp, #-17]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L76
	sub	r1, fp, #17
	mov	r3, #0
	mov	r2, #1
	ldr	r0, [fp, #-24]
	bl	recv
	b	.L75
.L76:
	mov	r3, #10
	strb	r3, [fp, #-17]
.L75:
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	ldrb	r2, [fp, #-17]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
	b	.L73
.L74:
	mov	r3, #10
	strb	r3, [fp, #-17]
.L73:
	ldr	r3, [fp, #-32]
	sub	r3, r3, #1
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bge	.L77
	ldrb	r3, [fp, #-17]	@ zero_extendqisi2
	cmp	r3, #10
	bne	.L78
.L77:
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-28]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r2, .L81
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L80
	bl	__stack_chk_fail
.L80:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L82:
	.align	2
.L81:
	.word	.LC24
	.word	.LC23
	.size	get_line, .-get_line
	.section	.rodata
	.align	2
.LC25:
	.ascii	"Server: jdbhttpd/0.1.0\015\012\000"
	.align	2
.LC26:
	.ascii	"Content-Type: text/html\015\012\000"
	.align	2
.LC27:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	headers
	.syntax unified
	.arm
	.fpu softvfp
	.type	headers, %function
headers:
	@ args = 0, pretend = 0, frame = 1040
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1040
	str	r0, [fp, #-1040]
	str	r1, [fp, #-1044]
	ldr	r3, .L85
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, .L85+4
	mov	ip, r3
	mov	lr, r2
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldr	r3, [lr]
	strh	r3, [ip]	@ movhi
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	ldr	r0, [fp, #-1040]
	bl	send
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, .L85+8
	mov	ip, r3
	mov	lr, r2
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1, r2}
	stmia	ip!, {r0, r1}
	strb	r2, [ip]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	ldr	r0, [fp, #-1040]
	bl	send
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L85+12
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	ldr	r0, [fp, #-1040]
	bl	send
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r2, .L85+16
	ldr	r2, [r2]
	strh	r2, [r3]	@ movhi
	add	r3, r3, #2
	lsr	r2, r2, #16
	strb	r2, [r3]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	ldr	r0, [fp, #-1040]
	bl	send
	nop
	ldr	r3, .L85
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L84
	bl	__stack_chk_fail
.L84:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L86:
	.align	2
.L85:
	.word	.LC27
	.word	.LC18
	.word	.LC25
	.word	.LC26
	.word	.LC9
	.size	headers, .-headers
	.section	.rodata
	.align	2
.LC28:
	.ascii	"HTTP/1.0 404 NOT FOUND\015\012\000"
	.align	2
.LC29:
	.ascii	"<HTML><TITLE>Not Found</TITLE>\015\012\000"
	.align	2
.LC30:
	.ascii	"<BODY><P>The server could not fulfill\015\012\000"
	.align	2
.LC31:
	.ascii	"your request because the resource specified\015\012"
	.ascii	"\000"
	.align	2
.LC32:
	.ascii	"is unavailable or nonexistent.\015\012\000"
	.align	2
.LC33:
	.ascii	"</BODY></HTML>\015\012\000"
	.align	2
.LC34:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	not_found
	.syntax unified
	.arm
	.fpu softvfp
	.type	not_found, %function
not_found:
	@ args = 0, pretend = 0, frame = 1040
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1040
	str	r0, [fp, #-1040]
	ldr	r3, .L89
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L89+4
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	ldr	r0, [fp, #-1040]
	bl	send
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L89+8
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	ldr	r0, [fp, #-1040]
	bl	send
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L89+12
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	ldr	r0, [fp, #-1040]
	bl	send
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L89+16
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	ldr	r0, [fp, #-1040]
	bl	send
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L89+20
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	ldr	r0, [fp, #-1040]
	bl	send
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L89+24
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	ldr	r0, [fp, #-1040]
	bl	send
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L89+28
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	ldr	r0, [fp, #-1040]
	bl	send
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L89+32
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	ldr	r0, [fp, #-1040]
	bl	send
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L89+36
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	ldr	r0, [fp, #-1040]
	bl	send
	nop
	ldr	r3, .L89
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L88
	bl	__stack_chk_fail
.L88:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L90:
	.align	2
.L89:
	.word	.LC34
	.word	.LC28
	.word	.LC25
	.word	.LC26
	.word	.LC9
	.word	.LC29
	.word	.LC30
	.word	.LC31
	.word	.LC32
	.word	.LC33
	.size	not_found, .-not_found
	.section	.rodata
	.align	2
.LC35:
	.ascii	"r\000"
	.align	2
.LC36:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	serve_file
	.syntax unified
	.arm
	.fpu softvfp
	.type	serve_file, %function
serve_file:
	@ args = 0, pretend = 0, frame = 1048
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1040
	sub	sp, sp, #8
	str	r0, [fp, #-1048]
	str	r1, [fp, #-1052]
	ldr	r3, .L98
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-1036]
	mov	r3, #1
	str	r3, [fp, #-1040]
	mov	r3, #65
	strb	r3, [fp, #-1032]
	mov	r3, #0
	strb	r3, [fp, #-1031]
	b	.L92
.L94:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, r3
	ldr	r0, [fp, #-1048]
	bl	get_line
	str	r0, [fp, #-1040]
.L92:
	ldr	r3, [fp, #-1040]
	cmp	r3, #0
	ble	.L93
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L98+4
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L94
.L93:
	ldr	r1, .L98+8
	ldr	r0, [fp, #-1052]
	bl	fopen
	str	r0, [fp, #-1036]
	ldr	r3, [fp, #-1036]
	cmp	r3, #0
	bne	.L95
	ldr	r0, [fp, #-1048]
	bl	not_found
	b	.L96
.L95:
	ldr	r1, [fp, #-1052]
	ldr	r0, [fp, #-1048]
	bl	headers
	ldr	r1, [fp, #-1036]
	ldr	r0, [fp, #-1048]
	bl	cat
.L96:
	ldr	r0, [fp, #-1036]
	bl	fclose
	nop
	ldr	r3, .L98
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L97
	bl	__stack_chk_fail
.L97:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L99:
	.align	2
.L98:
	.word	.LC36
	.word	.LC4
	.word	.LC35
	.size	serve_file, .-serve_file
	.section	.rodata
	.align	2
.LC37:
	.ascii	"socket\000"
	.align	2
.LC38:
	.ascii	"bind\000"
	.align	2
.LC39:
	.ascii	"getsockname\000"
	.align	2
.LC40:
	.ascii	"listen\000"
	.align	2
.LC41:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	startup
	.syntax unified
	.arm
	.fpu softvfp
	.type	startup, %function
startup:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-40]
	ldr	r3, .L108
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-28]
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmn	r3, #1
	bne	.L101
	ldr	r0, .L108+4
	bl	error_die
.L101:
	sub	r3, fp, #24
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #2
	strh	r3, [fp, #-24]	@ movhi
	ldr	r3, [fp, #-40]
	ldrh	r3, [r3]
	mov	r0, r3
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-22]	@ movhi
	mov	r0, #0
	bl	htonl
	mov	r3, r0
	str	r3, [fp, #-20]
	sub	r3, fp, #24
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-28]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	bge	.L102
	ldr	r0, .L108+8
	bl	error_die
.L102:
	ldr	r3, [fp, #-40]
	ldrh	r3, [r3]
	cmp	r3, #0
	bne	.L103
	mov	r3, #16
	str	r3, [fp, #-32]
	sub	r2, fp, #32
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, [fp, #-28]
	bl	getsockname
	mov	r3, r0
	cmn	r3, #1
	bne	.L104
	ldr	r0, .L108+12
	bl	error_die
.L104:
	ldrh	r3, [fp, #-22]
	mov	r0, r3
	bl	ntohs
	mov	r3, r0
	mov	r2, r3
	ldr	r3, [fp, #-40]
	strh	r2, [r3]	@ movhi
.L103:
	mov	r1, #5
	ldr	r0, [fp, #-28]
	bl	listen
	mov	r3, r0
	cmp	r3, #0
	bge	.L105
	ldr	r0, .L108+16
	bl	error_die
.L105:
	ldr	r3, [fp, #-28]
	ldr	r2, .L108
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L107
	bl	__stack_chk_fail
.L107:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L109:
	.align	2
.L108:
	.word	.LC41
	.word	.LC37
	.word	.LC38
	.word	.LC39
	.word	.LC40
	.size	startup, .-startup
	.section	.rodata
	.align	2
.LC42:
	.ascii	"HTTP/1.0 501 Method Not Implemented\015\012\000"
	.align	2
.LC43:
	.ascii	"<HTML><HEAD><TITLE>Method Not Implemented\015\012\000"
	.align	2
.LC44:
	.ascii	"</TITLE></HEAD>\015\012\000"
	.align	2
.LC45:
	.ascii	"<BODY><P>HTTP request method not supported.\015\012"
	.ascii	"\000"
	.align	2
.LC46:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	unimplemented
	.syntax unified
	.arm
	.fpu softvfp
	.type	unimplemented, %function
unimplemented:
	@ args = 0, pretend = 0, frame = 1040
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1040
	str	r0, [fp, #-1040]
	ldr	r3, .L112
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L112+4
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	ldr	r0, [fp, #-1040]
	bl	send
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L112+8
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	ldr	r0, [fp, #-1040]
	bl	send
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L112+12
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	ldr	r0, [fp, #-1040]
	bl	send
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L112+16
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	ldr	r0, [fp, #-1040]
	bl	send
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L112+20
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	ldr	r0, [fp, #-1040]
	bl	send
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L112+24
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	ldr	r0, [fp, #-1040]
	bl	send
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L112+28
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	ldr	r0, [fp, #-1040]
	bl	send
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L112+32
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	ldr	r0, [fp, #-1040]
	bl	send
	nop
	ldr	r3, .L112
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L111
	bl	__stack_chk_fail
.L111:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L113:
	.align	2
.L112:
	.word	.LC46
	.word	.LC42
	.word	.LC25
	.word	.LC26
	.word	.LC9
	.word	.LC43
	.word	.LC44
	.word	.LC45
	.word	.LC33
	.size	unimplemented, .-unimplemented
	.section	.rodata
	.align	2
.LC47:
	.ascii	"httpd running on port %d\012\000"
	.align	2
.LC48:
	.ascii	"accept\000"
	.align	2
.LC49:
	.ascii	"pthread_create\000"
	.align	2
.LC50:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	ldr	r3, .L119
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mvn	r3, #0
	str	r3, [fp, #-28]
	mov	r3, #0
	strh	r3, [fp, #-42]	@ movhi
	mvn	r3, #0
	str	r3, [fp, #-40]
	mov	r3, #16
	str	r3, [fp, #-36]
	sub	r3, fp, #42
	mov	r0, r3
	bl	startup
	str	r0, [fp, #-28]
	ldrh	r3, [fp, #-42]
	mov	r1, r3
	ldr	r0, .L119+4
	bl	printf
.L117:
	sub	r2, fp, #36
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, [fp, #-28]
	bl	accept
	mov	r3, r0
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-40]
	cmn	r3, #1
	bne	.L115
	ldr	r0, .L119+8
	bl	error_die
.L115:
	sub	r3, fp, #40
	mov	r0, r3
	bl	accept_request
	sub	r3, fp, #40
	sub	r0, fp, #32
	ldr	r2, .L119+12
	mov	r1, #0
	bl	pthread_create
	mov	r3, r0
	cmp	r3, #0
	beq	.L117
	ldr	r0, .L119+16
	bl	perror
	b	.L117
.L120:
	.align	2
.L119:
	.word	.LC50
	.word	.LC47
	.word	.LC48
	.word	accept_request
	.word	.LC49
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
