	.file	"895100.c"
	.intel_syntax noprefix
	.text
	.local	debug_mode
	.comm	debug_mode,4,4
	.section	.rodata
.LC0:
	.string	"debug"
.LC1:
	.string	"chroot"
.LC2:
	.string	"user"
.LC3:
	.string	"group"
.LC4:
	.string	"port"
.LC5:
	.string	"help"
	.section	.data.rel.local,"aw"
	.align 32
	.type	longopts, @object
	.size	longopts, 224
longopts:
	.quad	.LC0
	.long	0
	.zero	4
	.quad	debug_mode
	.long	1
	.zero	4
	.quad	.LC1
	.long	0
	.zero	4
	.quad	0
	.long	99
	.zero	4
	.quad	.LC2
	.long	1
	.zero	4
	.quad	0
	.long	117
	.zero	4
	.quad	.LC3
	.long	1
	.zero	4
	.quad	0
	.long	103
	.zero	4
	.quad	.LC4
	.long	1
	.zero	4
	.quad	0
	.long	112
	.zero	4
	.quad	.LC5
	.long	0
	.zero	4
	.quad	0
	.long	104
	.zero	4
	.quad	0
	.long	0
	.zero	4
	.quad	0
	.long	0
	.zero	4
	.section	.rodata
	.align 8
.LC6:
	.string	"Usage: %s [--port=n] [--chroot --user=u --group=g] [--debug] <docroot> \n"
.LC7:
	.string	""
.LC8:
	.string	"LittleHTTP"
	.text
	.globl	main
	.type	main, @function
main:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	DWORD PTR -52[rbp], edi
	mov	QWORD PTR -64[rbp], rsi
	mov	QWORD PTR -32[rbp], 0
	mov	DWORD PTR -44[rbp], 0
	mov	QWORD PTR -24[rbp], 0
	mov	QWORD PTR -16[rbp], 0
	jmp	.L2
.L12:
	cmp	DWORD PTR -40[rbp], 117
	jg	.L2
	cmp	DWORD PTR -40[rbp], 99
	jge	.L3
	cmp	DWORD PTR -40[rbp], 0
	je	.L2
	cmp	DWORD PTR -40[rbp], 63
	je	.L5
	jmp	.L2
.L3:
	mov	eax, DWORD PTR -40[rbp]
	sub	eax, 99
	cmp	eax, 18
	ja	.L2
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L7[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L7[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L7:
	.long	.L11-.L7
	.long	.L2-.L7
	.long	.L2-.L7
	.long	.L2-.L7
	.long	.L10-.L7
	.long	.L9-.L7
	.long	.L2-.L7
	.long	.L2-.L7
	.long	.L2-.L7
	.long	.L2-.L7
	.long	.L2-.L7
	.long	.L2-.L7
	.long	.L2-.L7
	.long	.L8-.L7
	.long	.L2-.L7
	.long	.L2-.L7
	.long	.L2-.L7
	.long	.L2-.L7
	.long	.L6-.L7
	.text
.L11:
	mov	DWORD PTR -44[rbp], 1
	jmp	.L2
.L6:
	mov	rax, QWORD PTR optarg[rip]
	mov	QWORD PTR -24[rbp], rax
	jmp	.L2
.L10:
	mov	rax, QWORD PTR optarg[rip]
	mov	QWORD PTR -16[rbp], rax
	jmp	.L2
.L8:
	mov	rax, QWORD PTR optarg[rip]
	mov	QWORD PTR -32[rbp], rax
	jmp	.L2
.L9:
	mov	rax, QWORD PTR -64[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stdout[rip]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 0
	call	exit@PLT
.L5:
	mov	rax, QWORD PTR -64[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	rsi, QWORD PTR -64[rbp]
	mov	eax, DWORD PTR -52[rbp]
	mov	r8d, 0
	lea	rcx, longopts[rip]
	lea	rdx, .LC7[rip]
	mov	edi, eax
	call	getopt_long@PLT
	mov	DWORD PTR -40[rbp], eax
	cmp	DWORD PTR -40[rbp], -1
	jne	.L12
	mov	eax, DWORD PTR -52[rbp]
	lea	edx, -1[rax]
	mov	eax, DWORD PTR optind[rip]
	cmp	edx, eax
	je	.L13
	mov	rax, QWORD PTR -64[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L13:
	cmp	DWORD PTR -44[rbp], 0
	je	.L14
	mov	rdx, QWORD PTR -16[rbp]
	mov	rcx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	setup_environment
	lea	rax, .LC7[rip]
	mov	QWORD PTR -8[rbp], rax
.L14:
	call	install_signal_handlers
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	listen_socket
	mov	DWORD PTR -36[rbp], eax
	mov	eax, DWORD PTR debug_mode[rip]
	test	eax, eax
	jne	.L15
	mov	edx, 24
	mov	esi, 9
	lea	rdi, .LC8[rip]
	call	openlog@PLT
	call	become_daemon
.L15:
	mov	eax, DWORD PTR optind[rip]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -64[rbp]
	add	rax, rdx
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rdx, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	server_main
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC9:
	.string	"use both of --user and --group\n"
.LC10:
	.string	"no such group: %s\n"
.LC11:
	.string	"setgid(2)"
.LC12:
	.string	"initgroups(2)"
.LC13:
	.string	"no such user: %s\n"
.LC14:
	.string	"setuid(2)"
	.text
	.type	setup_environment, @function
setup_environment:
.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, 48
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -40[rbp], rdx
	cmp	QWORD PTR -32[rbp], 0
	je	.L18
	cmp	QWORD PTR -40[rbp], 0
	jne	.L19
.L18:
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 31
	mov	esi, 1
	lea	rdi, .LC9[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L19:
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	getgrnam@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L20
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -40[rbp]
	lea	rsi, .LC10[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L20:
	mov	rax, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR 16[rax]
	mov	edi, eax
	call	setgid@PLT
	test	eax, eax
	jns	.L21
	lea	rdi, .LC11[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L21:
	mov	rax, QWORD PTR -16[rbp]
	mov	edx, DWORD PTR 16[rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	initgroups@PLT
	test	eax, eax
	jns	.L22
	lea	rdi, .LC12[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L22:
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	getpwnam@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L23
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -32[rbp]
	lea	rsi, .LC13[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
.L23:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	chroot@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 16[rax]
	mov	edi, eax
	call	setuid@PLT
	test	eax, eax
	jns	.L25
	lea	rdi, .LC14[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L25:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	setup_environment, .-setup_environment
	.section	.rodata
.LC15:
	.string	"failed to listen socket"
	.text
	.type	listen_socket, @function
listen_socket:
.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, 112
	mov	QWORD PTR -104[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -64[rbp]
	mov	edx, 48
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	DWORD PTR -60[rbp], 2
	mov	DWORD PTR -56[rbp], 1
	mov	DWORD PTR -64[rbp], 1
	lea	rcx, -80[rbp]
	lea	rdx, -64[rbp]
	mov	rax, QWORD PTR -104[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	getaddrinfo@PLT
	mov	DWORD PTR -88[rbp], eax
	cmp	DWORD PTR -88[rbp], 0
	je	.L27
	mov	eax, DWORD PTR -88[rbp]
	mov	edi, eax
	call	gai_strerror@PLT
	mov	rdi, rax
	mov	eax, 0
	call	log_exit
.L27:
	mov	rax, QWORD PTR -80[rbp]
	mov	QWORD PTR -72[rbp], rax
	jmp	.L28
.L34:
	mov	rax, QWORD PTR -72[rbp]
	mov	edx, DWORD PTR 12[rax]
	mov	rax, QWORD PTR -72[rbp]
	mov	ecx, DWORD PTR 8[rax]
	mov	rax, QWORD PTR -72[rbp]
	mov	eax, DWORD PTR 4[rax]
	mov	esi, ecx
	mov	edi, eax
	call	socket@PLT
	mov	DWORD PTR -84[rbp], eax
	cmp	DWORD PTR -84[rbp], 0
	js	.L37
	mov	rax, QWORD PTR -72[rbp]
	mov	edx, DWORD PTR 16[rax]
	mov	rax, QWORD PTR -72[rbp]
	mov	rcx, QWORD PTR 24[rax]
	mov	eax, DWORD PTR -84[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	jns	.L31
	mov	eax, DWORD PTR -84[rbp]
	mov	edi, eax
	call	close@PLT
	jmp	.L30
.L31:
	mov	eax, DWORD PTR -84[rbp]
	mov	esi, 5
	mov	edi, eax
	call	listen@PLT
	test	eax, eax
	jns	.L32
	mov	eax, DWORD PTR -84[rbp]
	mov	edi, eax
	call	close@PLT
	jmp	.L30
.L32:
	mov	rax, QWORD PTR -80[rbp]
	mov	rdi, rax
	call	freeaddrinfo@PLT
	mov	eax, DWORD PTR -84[rbp]
	jmp	.L35
.L37:
	nop
.L30:
	mov	rax, QWORD PTR -72[rbp]
	mov	rax, QWORD PTR 40[rax]
	mov	QWORD PTR -72[rbp], rax
.L28:
	cmp	QWORD PTR -72[rbp], 0
	jne	.L34
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	log_exit
	mov	eax, -1
.L35:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L36
	call	__stack_chk_fail@PLT
.L36:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	listen_socket, .-listen_socket
	.section	.rodata
.LC16:
	.string	"accept(2) failed: %s"
.LC17:
	.string	"r"
.LC18:
	.string	"w"
	.text
	.type	server_main, @function
server_main:
.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, 192
	mov	DWORD PTR -180[rbp], edi
	mov	QWORD PTR -192[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
.L42:
	mov	DWORD PTR -172[rbp], 128
	lea	rdx, -172[rbp]
	lea	rcx, -144[rbp]
	mov	eax, DWORD PTR -180[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -168[rbp], eax
	cmp	DWORD PTR -168[rbp], 0
	jns	.L39
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC16[rip]
	mov	eax, 0
	call	log_exit
.L39:
	call	fork@PLT
	mov	DWORD PTR -164[rbp], eax
	cmp	DWORD PTR -164[rbp], 0
	jns	.L40
	mov	edi, 3
	call	exit@PLT
.L40:
	cmp	DWORD PTR -164[rbp], 0
	jne	.L41
	mov	eax, DWORD PTR -168[rbp]
	lea	rsi, .LC17[rip]
	mov	edi, eax
	call	fdopen@PLT
	mov	QWORD PTR -160[rbp], rax
	mov	eax, DWORD PTR -168[rbp]
	lea	rsi, .LC18[rip]
	mov	edi, eax
	call	fdopen@PLT
	mov	QWORD PTR -152[rbp], rax
	mov	rdx, QWORD PTR -192[rbp]
	mov	rcx, QWORD PTR -152[rbp]
	mov	rax, QWORD PTR -160[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	service
	mov	edi, 0
	call	exit@PLT
.L41:
	mov	eax, DWORD PTR -168[rbp]
	mov	edi, eax
	call	close@PLT
	jmp	.L42
	.cfi_endproc
.LFE9:
	.size	server_main, .-server_main
	.section	.rodata
.LC19:
	.string	"/"
.LC20:
	.string	"chdir(2) failed: %s"
.LC21:
	.string	"/dev/null"
.LC22:
	.string	"fork(2) failed: %s"
.LC23:
	.string	"setsid(2) failed: %s"
	.text
	.type	become_daemon, @function
become_daemon:
.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
	lea	rdi, .LC19[rip]
	call	chdir@PLT
	test	eax, eax
	jns	.L45
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC20[rip]
	mov	eax, 0
	call	log_exit
.L45:
	mov	rax, QWORD PTR stdin[rip]
	mov	rdx, rax
	lea	rsi, .LC17[rip]
	lea	rdi, .LC21[rip]
	call	freopen@PLT
	mov	rax, QWORD PTR stdout[rip]
	mov	rdx, rax
	lea	rsi, .LC17[rip]
	lea	rdi, .LC21[rip]
	call	freopen@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, rax
	lea	rsi, .LC17[rip]
	lea	rdi, .LC21[rip]
	call	freopen@PLT
	call	fork@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jns	.L46
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC22[rip]
	mov	eax, 0
	call	log_exit
.L46:
	cmp	DWORD PTR -4[rbp], 0
	je	.L47
	mov	edi, 0
	call	_exit@PLT
.L47:
	call	setsid@PLT
	test	eax, eax
	jns	.L49
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC23[rip]
	mov	eax, 0
	call	log_exit
.L49:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	become_daemon, .-become_daemon
	.type	service, @function
service:
.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, 48
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -40[rbp], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	read_request
	mov	QWORD PTR -8[rbp], rax
	mov	rdx, QWORD PTR -40[rbp]
	mov	rcx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	respond_to
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free_request
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	service, .-service
	.section	.rodata
	.align 8
.LC24:
	.string	"request body too long (size: %d)"
	.align 8
.LC25:
	.string	"failed to read request body: %s"
	.text
	.type	read_request, @function
read_request:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	edi, 48
	call	xmalloc
	mov	QWORD PTR -16[rbp], rax
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	read_request_line
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR 24[rax], 0
	jmp	.L52
.L53:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR 24[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR -16[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 24[rax], rdx
.L52:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	read_header_field
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L53
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	content_length
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR 40[rdx], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 40[rax]
	test	rax, rax
	je	.L54
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 40[rax]
	cmp	rax, 1048576
	jle	.L55
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 40[rax]
	mov	rsi, rax
	lea	rdi, .LC24[rip]
	mov	eax, 0
	call	log_exit
.L55:
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 40[rax]
	mov	rdi, rax
	call	xmalloc
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR 32[rdx], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 40[rax]
	mov	rsi, rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	rdx, QWORD PTR -24[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	rdi, rax
	call	fread@PLT
	test	rax, rax
	jne	.L56
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	rsi, rax
	lea	rdi, .LC25[rip]
	mov	eax, 0
	call	log_exit
	jmp	.L56
.L54:
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR 32[rax], 0
.L56:
	mov	rax, QWORD PTR -16[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	read_request, .-read_request
	.section	.rodata
.LC26:
	.string	"no request line"
	.align 8
.LC27:
	.string	"parse error on request line (1): %s"
	.align 8
.LC28:
	.string	"parse error on request line (2): %s"
.LC29:
	.string	"HTTP/1."
	.align 8
.LC30:
	.string	"parse error on request line (3): %s"
	.text
	.type	read_request_line, @function
read_request_line:
.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, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 48
	mov	QWORD PTR -4136[rbp], rdi
	mov	QWORD PTR -4144[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rdx, QWORD PTR -4144[rbp]
	lea	rax, -4112[rbp]
	mov	esi, 4096
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L59
	lea	rdi, .LC26[rip]
	mov	eax, 0
	call	log_exit
.L59:
	lea	rax, -4112[rbp]
	mov	esi, 32
	mov	rdi, rax
	call	strchr@PLT
	mov	QWORD PTR -4128[rbp], rax
	cmp	QWORD PTR -4128[rbp], 0
	jne	.L60
	lea	rax, -4112[rbp]
	mov	rsi, rax
	lea	rdi, .LC27[rip]
	mov	eax, 0
	call	log_exit
.L60:
	mov	rax, QWORD PTR -4128[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -4128[rbp], rdx
	mov	BYTE PTR [rax], 0
	lea	rdx, -4112[rbp]
	mov	rax, QWORD PTR -4128[rbp]
	sub	rax, rdx
	mov	rdi, rax
	call	xmalloc
	mov	rdx, QWORD PTR -4136[rbp]
	mov	QWORD PTR 8[rdx], rax
	mov	rax, QWORD PTR -4136[rbp]
	mov	rax, QWORD PTR 8[rax]
	lea	rdx, -4112[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rax, QWORD PTR -4136[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	upcase
	mov	rax, QWORD PTR -4128[rbp]
	mov	QWORD PTR -4120[rbp], rax
	mov	rax, QWORD PTR -4120[rbp]
	mov	esi, 32
	mov	rdi, rax
	call	strchr@PLT
	mov	QWORD PTR -4128[rbp], rax
	cmp	QWORD PTR -4128[rbp], 0
	jne	.L61
	lea	rax, -4112[rbp]
	mov	rsi, rax
	lea	rdi, .LC28[rip]
	mov	eax, 0
	call	log_exit
.L61:
	mov	rax, QWORD PTR -4128[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -4128[rbp], rdx
	mov	BYTE PTR [rax], 0
	mov	rax, QWORD PTR -4128[rbp]
	sub	rax, QWORD PTR -4120[rbp]
	mov	rdi, rax
	call	xmalloc
	mov	rdx, QWORD PTR -4136[rbp]
	mov	QWORD PTR 16[rdx], rax
	mov	rax, QWORD PTR -4136[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdx, QWORD PTR -4120[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rax, QWORD PTR -4128[rbp]
	mov	edx, 7
	lea	rsi, .LC29[rip]
	mov	rdi, rax
	call	strncasecmp@PLT
	test	eax, eax
	je	.L62
	lea	rax, -4112[rbp]
	mov	rsi, rax
	lea	rdi, .LC30[rip]
	mov	eax, 0
	call	log_exit
.L62:
	add	QWORD PTR -4128[rbp], 7
	mov	rax, QWORD PTR -4128[rbp]
	mov	rdi, rax
	call	atoi@PLT
	mov	rdx, QWORD PTR -4136[rbp]
	mov	DWORD PTR [rdx], eax
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L63
	call	__stack_chk_fail@PLT
.L63:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	read_request_line, .-read_request_line
	.section	.rodata
	.align 8
.LC31:
	.string	"failed to read request header field: %s"
.LC32:
	.string	"\r\n"
	.align 8
.LC33:
	.string	"parse error on request header field: %s"
.LC34:
	.string	" \t"
	.text
	.type	read_header_field, @function
read_header_field:
.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, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 48
	mov	QWORD PTR -4136[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rdx, QWORD PTR -4136[rbp]
	lea	rax, -4112[rbp]
	mov	esi, 4096
	mov	rdi, rax
	call	fgets@PLT
	test	rax, rax
	jne	.L65
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC31[rip]
	mov	eax, 0
	call	log_exit
.L65:
	movzx	eax, BYTE PTR -4112[rbp]
	cmp	al, 10
	je	.L66
	lea	rax, -4112[rbp]
	lea	rsi, .LC32[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L67
.L66:
	mov	eax, 0
	jmp	.L70
.L67:
	lea	rax, -4112[rbp]
	mov	esi, 58
	mov	rdi, rax
	call	strchr@PLT
	mov	QWORD PTR -4128[rbp], rax
	cmp	QWORD PTR -4128[rbp], 0
	jne	.L69
	lea	rax, -4112[rbp]
	mov	rsi, rax
	lea	rdi, .LC33[rip]
	mov	eax, 0
	call	log_exit
.L69:
	mov	rax, QWORD PTR -4128[rbp]
	lea	rdx, 1[rax]
	mov	QWORD PTR -4128[rbp], rdx
	mov	BYTE PTR [rax], 0
	mov	edi, 24
	call	xmalloc
	mov	QWORD PTR -4120[rbp], rax
	lea	rdx, -4112[rbp]
	mov	rax, QWORD PTR -4128[rbp]
	sub	rax, rdx
	mov	rdi, rax
	call	xmalloc
	mov	rdx, QWORD PTR -4120[rbp]
	mov	QWORD PTR [rdx], rax
	mov	rax, QWORD PTR -4120[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rdx, -4112[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rax, QWORD PTR -4128[rbp]
	lea	rsi, .LC34[rip]
	mov	rdi, rax
	call	strspn@PLT
	add	QWORD PTR -4128[rbp], rax
	mov	rax, QWORD PTR -4128[rbp]
	mov	rdi, rax
	call	strlen@PLT
	add	rax, 1
	mov	rdi, rax
	call	xmalloc
	mov	rdx, QWORD PTR -4120[rbp]
	mov	QWORD PTR 8[rdx], rax
	mov	rax, QWORD PTR -4120[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdx, QWORD PTR -4128[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	mov	rax, QWORD PTR -4120[rbp]
.L70:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L71
	call	__stack_chk_fail@PLT
.L71:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	read_header_field, .-read_header_field
	.section	.rodata
.LC35:
	.string	"Content-Length"
	.align 8
.LC36:
	.string	"negative Content-Length value: %d"
	.text
	.type	content_length, @function
content_length:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC35[rip]
	mov	rdi, rax
	call	lookup_header_field_value
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	jne	.L73
	mov	eax, 0
	jmp	.L74
.L73:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	atol@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jns	.L75
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC36[rip]
	mov	eax, 0
	call	log_exit
.L75:
	mov	rax, QWORD PTR -8[rbp]
.L74:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	content_length, .-content_length
	.type	lookup_header_field_value, @function
lookup_header_field_value:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	QWORD PTR -8[rbp], rax
	jmp	.L77
.L80:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR -32[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcasecmp@PLT
	test	eax, eax
	jne	.L78
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	jmp	.L79
.L78:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -8[rbp], rax
.L77:
	cmp	QWORD PTR -8[rbp], 0
	jne	.L80
	mov	eax, 0
.L79:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	lookup_header_field_value, .-lookup_header_field_value
	.type	upcase, @function
upcase:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -8[rbp], rax
	jmp	.L82
.L83:
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	toupper@PLT
	mov	edx, eax
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR [rax], dl
	add	QWORD PTR -8[rbp], 1
.L82:
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L83
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	upcase, .-upcase
	.type	free_request, @function
free_request:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	QWORD PTR -16[rbp], rax
	jmp	.L85
.L86:
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
.L85:
	cmp	QWORD PTR -16[rbp], 0
	jne	.L86
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	free@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	free_request, .-free_request
	.type	get_fileinfo, @function
get_fileinfo:
.LFB19:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 192
	mov	QWORD PTR -184[rbp], rdi
	mov	QWORD PTR -192[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edi, 24
	call	xmalloc
	mov	QWORD PTR -168[rbp], rax
	mov	rdx, QWORD PTR -192[rbp]
	mov	rax, QWORD PTR -184[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	build_fspath
	mov	rdx, QWORD PTR -168[rbp]
	mov	QWORD PTR [rdx], rax
	mov	rax, QWORD PTR -168[rbp]
	mov	DWORD PTR 16[rax], 0
	mov	rax, QWORD PTR -168[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rdx, -160[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	lstat@PLT
	test	eax, eax
	jns	.L88
	mov	rax, QWORD PTR -168[rbp]
	jmp	.L91
.L88:
	mov	eax, DWORD PTR -136[rbp]
	and	eax, 61440
	cmp	eax, 32768
	je	.L90
	mov	rax, QWORD PTR -168[rbp]
	jmp	.L91
.L90:
	mov	rax, QWORD PTR -168[rbp]
	mov	DWORD PTR 16[rax], 1
	mov	rdx, QWORD PTR -112[rbp]
	mov	rax, QWORD PTR -168[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -168[rbp]
.L91:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L92
	call	__stack_chk_fail@PLT
.L92:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	get_fileinfo, .-get_fileinfo
	.type	free_fileinfo, @function
free_fileinfo:
.LFB20:
	.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	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE20:
	.size	free_fileinfo, .-free_fileinfo
	.section	.rodata
.LC37:
	.string	"text/html"
	.text
	.type	guess_content_type, @function
guess_content_type:
.LFB21:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	lea	rax, .LC37[rip]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE21:
	.size	guess_content_type, .-guess_content_type
	.section	.rodata
.LC38:
	.string	"%s/%s"
	.text
	.type	build_fspath, @function
build_fspath:
.LFB22:
	.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, 40
	.cfi_offset 3, -24
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rbx, rax
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	strlen@PLT
	add	rax, rbx
	add	rax, 2
	mov	rdi, rax
	call	xmalloc
	mov	QWORD PTR -24[rbp], rax
	mov	rcx, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC38[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE22:
	.size	build_fspath, .-build_fspath
	.type	install_signal_handlers, @function
install_signal_handlers:
.LFB23:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rsi, signal_exit[rip]
	mov	edi, 15
	call	trap_signal
	lea	rsi, wait_child[rip]
	mov	edi, 17
	call	trap_signal
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE23:
	.size	install_signal_handlers, .-install_signal_handlers
	.type	wait_child, @function
wait_child:
.LFB24:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	mov	edi, 0
	call	wait@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE24:
	.size	wait_child, .-wait_child
	.section	.rodata
.LC39:
	.string	"GET"
.LC40:
	.string	"HEAD"
.LC41:
	.string	"POST"
	.text
	.type	respond_to, @function
respond_to:
.LFB25:
	.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	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	QWORD PTR -24[rbp], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	lea	rsi, .LC39[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L101
	mov	rdx, QWORD PTR -24[rbp]
	mov	rcx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	do_file_response
	jmp	.L105
.L101:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	lea	rsi, .LC40[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L103
	mov	rdx, QWORD PTR -24[rbp]
	mov	rcx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	do_file_response
	jmp	.L105
.L103:
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	lea	rsi, .LC41[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L104
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	method_not_allowed
	jmp	.L105
.L104:
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	not_implemented
.L105:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE25:
	.size	respond_to, .-respond_to
	.section	.rodata
.LC42:
	.string	"200 OK"
.LC43:
	.string	"Content-Length: %ld\r\n"
.LC44:
	.string	"Content-Type %s\r\n"
.LC45:
	.string	"failed to open %s: %s\n"
	.align 8
.LC46:
	.string	"failed to write to socket: %s\n"
	.text
	.type	do_file_response, @function
do_file_response:
.LFB26:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 1104
	mov	QWORD PTR -1080[rbp], rdi
	mov	QWORD PTR -1088[rbp], rsi
	mov	QWORD PTR -1096[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -1080[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -1096[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	get_fileinfo
	mov	QWORD PTR -1056[rbp], rax
	mov	rax, QWORD PTR -1056[rbp]
	mov	eax, DWORD PTR 16[rax]
	test	eax, eax
	jne	.L107
	mov	rax, QWORD PTR -1056[rbp]
	mov	rdi, rax
	call	free_fileinfo
	mov	rdx, QWORD PTR -1088[rbp]
	mov	rax, QWORD PTR -1080[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	not_found
	jmp	.L106
.L107:
	mov	rcx, QWORD PTR -1088[rbp]
	mov	rax, QWORD PTR -1080[rbp]
	lea	rdx, .LC42[rip]
	mov	rsi, rcx
	mov	rdi, rax
	call	output_common_header_fields
	mov	rax, QWORD PTR -1056[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -1088[rbp]
	lea	rsi, .LC43[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -1056[rbp]
	mov	rdi, rax
	call	guess_content_type
	mov	rdx, rax
	mov	rax, QWORD PTR -1088[rbp]
	lea	rsi, .LC44[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -1088[rbp]
	mov	rcx, rax
	mov	edx, 2
	mov	esi, 1
	lea	rdi, .LC32[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR -1080[rbp]
	mov	rax, QWORD PTR 8[rax]
	lea	rsi, .LC40[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L109
	mov	rax, QWORD PTR -1056[rbp]
	mov	rax, QWORD PTR [rax]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -1060[rbp], eax
	cmp	DWORD PTR -1060[rbp], 0
	jns	.L115
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -1056[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC45[rip]
	mov	eax, 0
	call	log_exit
.L115:
	lea	rcx, -1040[rbp]
	mov	eax, DWORD PTR -1060[rbp]
	mov	edx, 1024
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	QWORD PTR -1048[rbp], rax
	cmp	QWORD PTR -1048[rbp], 0
	jns	.L111
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -1056[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC45[rip]
	mov	eax, 0
	call	log_exit
.L111:
	cmp	QWORD PTR -1048[rbp], 0
	je	.L118
	mov	rdx, QWORD PTR -1048[rbp]
	mov	rcx, QWORD PTR -1088[rbp]
	lea	rax, -1040[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	rdx, QWORD PTR -1048[rbp]
	cmp	rax, rdx
	jnb	.L115
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC46[rip]
	mov	eax, 0
	call	log_exit
	jmp	.L115
.L118:
	nop
	mov	eax, DWORD PTR -1060[rbp]
	mov	edi, eax
	call	close@PLT
.L109:
	mov	rax, QWORD PTR -1088[rbp]
	mov	rdi, rax
	call	fflush@PLT
	mov	rax, QWORD PTR -1056[rbp]
	mov	rdi, rax
	call	free_fileinfo
.L106:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L116
	call	__stack_chk_fail@PLT
.L116:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE26:
	.size	do_file_response, .-do_file_response
	.section	.rodata
.LC47:
	.string	"405 Method Not Allowed"
.LC48:
	.string	"Content-Type: text/html\r\n"
	.align 8
.LC49:
	.string	"The request method %s is not allowed\r\n"
	.text
	.type	method_not_allowed, @function
method_not_allowed:
.LFB27:
	.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	QWORD PTR -16[rbp], rsi
	mov	rcx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, .LC47[rip]
	mov	rsi, rcx
	mov	rdi, rax
	call	output_common_header_fields
	mov	rax, QWORD PTR -16[rbp]
	mov	rcx, rax
	mov	edx, 25
	mov	esi, 1
	lea	rdi, .LC48[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rcx, rax
	mov	edx, 2
	mov	esi, 1
	lea	rdi, .LC32[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC49[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	fflush@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE27:
	.size	method_not_allowed, .-method_not_allowed
	.section	.rodata
.LC50:
	.string	"501 Not Implemented"
	.align 8
.LC51:
	.string	"The request method %s is not implemented\r\n"
	.text
	.type	not_implemented, @function
not_implemented:
.LFB28:
	.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	QWORD PTR -16[rbp], rsi
	mov	rcx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, .LC50[rip]
	mov	rsi, rcx
	mov	rdi, rax
	call	output_common_header_fields
	mov	rax, QWORD PTR -16[rbp]
	mov	rcx, rax
	mov	edx, 25
	mov	esi, 1
	lea	rdi, .LC48[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rcx, rax
	mov	edx, 2
	mov	esi, 1
	lea	rdi, .LC32[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC51[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	fflush@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE28:
	.size	not_implemented, .-not_implemented
	.section	.rodata
.LC52:
	.string	"404 Not Found"
.LC53:
	.string	"File not found\r\n"
	.text
	.type	not_found, @function
not_found:
.LFB29:
	.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	QWORD PTR -16[rbp], rsi
	mov	rcx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, .LC52[rip]
	mov	rsi, rcx
	mov	rdi, rax
	call	output_common_header_fields
	mov	rax, QWORD PTR -16[rbp]
	mov	rcx, rax
	mov	edx, 25
	mov	esi, 1
	lea	rdi, .LC48[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rcx, rax
	mov	edx, 2
	mov	esi, 1
	lea	rdi, .LC32[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rcx, rax
	mov	edx, 16
	mov	esi, 1
	lea	rdi, .LC53[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	fflush@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE29:
	.size	not_found, .-not_found
	.section	.rodata
.LC54:
	.string	"gmtime() failed: %s\n"
.LC55:
	.string	"%a, %d %b %Y %H:%M:%S GMT"
.LC56:
	.string	"HTTP/1.%d %s\r\n"
.LC57:
	.string	"Date: %s\r\n"
.LC58:
	.string	"1.0"
.LC59:
	.string	"Server: %s/%s\r\n"
.LC60:
	.string	"Connection: close\r\n"
	.text
	.type	output_common_header_fields, @function
output_common_header_fields:
.LFB30:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	add	rsp, -128
	mov	QWORD PTR -104[rbp], rdi
	mov	QWORD PTR -112[rbp], rsi
	mov	QWORD PTR -120[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edi, 0
	call	time@PLT
	mov	QWORD PTR -96[rbp], rax
	lea	rax, -96[rbp]
	mov	rdi, rax
	call	gmtime@PLT
	mov	QWORD PTR -88[rbp], rax
	cmp	QWORD PTR -88[rbp], 0
	jne	.L123
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC54[rip]
	mov	eax, 0
	call	log_exit
.L123:
	mov	rdx, QWORD PTR -88[rbp]
	lea	rax, -80[rbp]
	mov	rcx, rdx
	lea	rdx, .LC55[rip]
	mov	esi, 64
	mov	rdi, rax
	call	strftime@PLT
	mov	rdx, QWORD PTR -120[rbp]
	mov	rax, QWORD PTR -112[rbp]
	mov	rcx, rdx
	mov	edx, 0
	lea	rsi, .LC56[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	lea	rdx, -80[rbp]
	mov	rax, QWORD PTR -112[rbp]
	lea	rsi, .LC57[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -112[rbp]
	lea	rcx, .LC58[rip]
	lea	rdx, .LC8[rip]
	lea	rsi, .LC59[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -112[rbp]
	mov	rcx, rax
	mov	edx, 19
	mov	esi, 1
	lea	rdi, .LC60[rip]
	call	fwrite@PLT
	mov	rax, QWORD PTR -112[rbp]
	mov	rdi, rax
	call	fflush@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L124
	call	__stack_chk_fail@PLT
.L124:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE30:
	.size	output_common_header_fields, .-output_common_header_fields
	.section	.rodata
.LC61:
	.string	"sigaction() failed: %s"
	.text
	.type	trap_signal, @function
trap_signal:
.LFB31:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 176
	mov	DWORD PTR -164[rbp], edi
	mov	QWORD PTR -176[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -176[rbp]
	mov	QWORD PTR -160[rbp], rax
	lea	rax, -160[rbp]
	add	rax, 8
	mov	rdi, rax
	call	sigemptyset@PLT
	mov	DWORD PTR -24[rbp], 268435456
	lea	rcx, -160[rbp]
	mov	eax, DWORD PTR -164[rbp]
	mov	edx, 0
	mov	rsi, rcx
	mov	edi, eax
	call	sigaction@PLT
	test	eax, eax
	jns	.L128
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rsi, rax
	lea	rdi, .LC61[rip]
	mov	eax, 0
	call	log_exit
.L128:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L127
	call	__stack_chk_fail@PLT
.L127:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE31:
	.size	trap_signal, .-trap_signal
	.section	.rodata
.LC62:
	.string	"exit by singnal %d"
	.text
	.type	signal_exit, @function
signal_exit:
.LFB32:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	mov	eax, DWORD PTR -4[rbp]
	mov	esi, eax
	lea	rdi, .LC62[rip]
	mov	eax, 0
	call	log_exit
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE32:
	.size	signal_exit, .-signal_exit
	.section	.rodata
	.align 8
.LC63:
	.string	"failed to allocate memory (size: %d)"
	.text
	.type	xmalloc, @function
xmalloc:
.LFB33:
	.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	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L131
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rax
	lea	rdi, .LC63[rip]
	mov	eax, 0
	call	log_exit
.L131:
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE33:
	.size	xmalloc, .-xmalloc
	.type	log_exit, @function
log_exit:
.LFB34:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 224
	mov	QWORD PTR -216[rbp], rdi
	mov	QWORD PTR -168[rbp], rsi
	mov	QWORD PTR -160[rbp], rdx
	mov	QWORD PTR -152[rbp], rcx
	mov	QWORD PTR -144[rbp], r8
	mov	QWORD PTR -136[rbp], r9
	test	al, al
	je	.L134
	movaps	XMMWORD PTR -128[rbp], xmm0
	movaps	XMMWORD PTR -112[rbp], xmm1
	movaps	XMMWORD PTR -96[rbp], xmm2
	movaps	XMMWORD PTR -80[rbp], xmm3
	movaps	XMMWORD PTR -64[rbp], xmm4
	movaps	XMMWORD PTR -48[rbp], xmm5
	movaps	XMMWORD PTR -32[rbp], xmm6
	movaps	XMMWORD PTR -16[rbp], xmm7
.L134:
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -184[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -208[rbp], 8
	mov	DWORD PTR -204[rbp], 48
	lea	rax, 16[rbp]
	mov	QWORD PTR -200[rbp], rax
	lea	rax, -176[rbp]
	mov	QWORD PTR -192[rbp], rax
	mov	eax, DWORD PTR debug_mode[rip]
	test	eax, eax
	je	.L135
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, -208[rbp]
	mov	rcx, QWORD PTR -216[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	vfprintf@PLT
	mov	rax, QWORD PTR stderr[rip]
	mov	rsi, rax
	mov	edi, 10
	call	fputc@PLT
	jmp	.L136
.L135:
	lea	rdx, -208[rbp]
	mov	rax, QWORD PTR -216[rbp]
	mov	rsi, rax
	mov	edi, 3
	call	vsyslog@PLT
.L136:
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE34:
	.size	log_exit, .-log_exit
	.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	"895100.c"
	.text
	.local	debug_mode
	.comm	debug_mode,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"debug\000"
	.align	2
.LC1:
	.ascii	"chroot\000"
	.align	2
.LC2:
	.ascii	"user\000"
	.align	2
.LC3:
	.ascii	"group\000"
	.align	2
.LC4:
	.ascii	"port\000"
	.align	2
.LC5:
	.ascii	"help\000"
	.data
	.align	2
	.type	longopts, %object
	.size	longopts, 112
longopts:
	.word	.LC0
	.word	0
	.word	debug_mode
	.word	1
	.word	.LC1
	.word	0
	.word	0
	.word	99
	.word	.LC2
	.word	1
	.word	0
	.word	117
	.word	.LC3
	.word	1
	.word	0
	.word	103
	.word	.LC4
	.word	1
	.word	0
	.word	112
	.word	.LC5
	.word	0
	.word	0
	.word	104
	.word	0
	.word	0
	.word	0
	.word	0
	.section	.rodata
	.align	2
.LC6:
	.ascii	"Usage: %s [--port=n] [--chroot --user=u --group=g] "
	.ascii	"[--debug] <docroot> \012\000"
	.align	2
.LC7:
	.ascii	"\000"
	.align	2
.LC8:
	.ascii	"LittleHTTP\000"
	.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, #48
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	mov	r3, #0
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-24]
	mov	r3, #0
	str	r3, [fp, #-20]
	b	.L2
.L12:
	ldr	r3, [fp, #-16]
	cmp	r3, #117
	bgt	.L2
	ldr	r3, [fp, #-16]
	cmp	r3, #99
	bge	.L3
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L2
	ldr	r3, [fp, #-16]
	cmp	r3, #63
	beq	.L5
	b	.L2
.L3:
	ldr	r3, [fp, #-16]
	sub	r3, r3, #99
	cmp	r3, #18
	ldrls	pc, [pc, r3, asl #2]
	b	.L2
.L7:
	.word	.L11
	.word	.L2
	.word	.L2
	.word	.L2
	.word	.L10
	.word	.L9
	.word	.L2
	.word	.L2
	.word	.L2
	.word	.L2
	.word	.L2
	.word	.L2
	.word	.L2
	.word	.L8
	.word	.L2
	.word	.L2
	.word	.L2
	.word	.L2
	.word	.L6
.L11:
	mov	r3, #1
	str	r3, [fp, #-28]
	b	.L2
.L6:
	ldr	r3, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-24]
	b	.L2
.L10:
	ldr	r3, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-20]
	b	.L2
.L8:
	ldr	r3, .L17
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	b	.L2
.L9:
	ldr	r3, .L17+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-44]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L17+8
	bl	fprintf
	mov	r0, #0
	bl	exit
.L5:
	ldr	r3, .L17+12
	ldr	r0, [r3]
	ldr	r3, [fp, #-44]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L17+8
	bl	fprintf
	mov	r0, #1
	bl	exit
.L2:
	mov	r3, #0
	str	r3, [sp]
	ldr	r3, .L17+16
	ldr	r2, .L17+20
	ldr	r1, [fp, #-44]
	ldr	r0, [fp, #-40]
	bl	getopt_long
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmn	r3, #1
	bne	.L12
	ldr	r3, [fp, #-40]
	sub	r2, r3, #1
	ldr	r3, .L17+24
	ldr	r3, [r3]
	cmp	r2, r3
	beq	.L13
	ldr	r3, .L17+12
	ldr	r0, [r3]
	ldr	r3, [fp, #-44]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L17+8
	bl	fprintf
	mov	r0, #1
	bl	exit
.L13:
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	beq	.L14
	ldr	r2, [fp, #-20]
	ldr	r1, [fp, #-24]
	ldr	r0, [fp, #-12]
	bl	setup_environment
	ldr	r3, .L17+20
	str	r3, [fp, #-12]
.L14:
	bl	install_signal_handlers
	ldr	r0, [fp, #-32]
	bl	listen_socket
	str	r0, [fp, #-8]
	ldr	r3, .L17+28
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L15
	mov	r2, #24
	mov	r1, #9
	ldr	r0, .L17+32
	bl	openlog
	bl	become_daemon
.L15:
	ldr	r3, .L17+24
	ldr	r3, [r3]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-44]
	add	r3, r2, r3
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	server_main
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	optarg
	.word	stdout
	.word	.LC6
	.word	stderr
	.word	longopts
	.word	.LC7
	.word	optind
	.word	debug_mode
	.word	.LC8
	.size	main, .-main
	.section	.rodata
	.align	2
.LC9:
	.ascii	"use both of --user and --group\012\000"
	.align	2
.LC10:
	.ascii	"no such group: %s\012\000"
	.align	2
.LC11:
	.ascii	"setgid(2)\000"
	.align	2
.LC12:
	.ascii	"initgroups(2)\000"
	.align	2
.LC13:
	.ascii	"no such user: %s\012\000"
	.align	2
.LC14:
	.ascii	"setuid(2)\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	setup_environment, %function
setup_environment:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	beq	.L20
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	bne	.L21
.L20:
	ldr	r3, .L28
	ldr	r3, [r3]
	mov	r2, #31
	mov	r1, #1
	ldr	r0, .L28+4
	bl	fwrite
	mov	r0, #1
	bl	exit
.L21:
	ldr	r0, [fp, #-24]
	bl	getgrnam
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L22
	ldr	r3, .L28
	ldr	r3, [r3]
	ldr	r2, [fp, #-24]
	ldr	r1, .L28+8
	mov	r0, r3
	bl	fprintf
	mov	r0, #1
	bl	exit
.L22:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	setgid
	mov	r3, r0
	cmp	r3, #0
	bge	.L23
	ldr	r0, .L28+12
	bl	perror
	mov	r0, #1
	bl	exit
.L23:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #8]
	mov	r1, r3
	ldr	r0, [fp, #-20]
	bl	initgroups
	mov	r3, r0
	cmp	r3, #0
	bge	.L24
	ldr	r0, .L28+16
	bl	perror
	mov	r0, #1
	bl	exit
.L24:
	ldr	r0, [fp, #-20]
	bl	getpwnam
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L25
	ldr	r3, .L28
	ldr	r3, [r3]
	ldr	r2, [fp, #-20]
	ldr	r1, .L28+20
	mov	r0, r3
	bl	fprintf
	mov	r0, #1
	bl	exit
.L25:
	ldr	r0, [fp, #-16]
	bl	chroot
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	setuid
	mov	r3, r0
	cmp	r3, #0
	bge	.L27
	ldr	r0, .L28+24
	bl	perror
	mov	r0, #1
	bl	exit
.L27:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L29:
	.align	2
.L28:
	.word	stderr
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.size	setup_environment, .-setup_environment
	.section	.rodata
	.align	2
.LC15:
	.ascii	"failed to listen socket\000"
	.align	2
.LC16:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	listen_socket, %function
listen_socket:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #64
	str	r0, [fp, #-64]
	ldr	r3, .L42
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #40
	mov	r2, #32
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #2
	str	r3, [fp, #-36]
	mov	r3, #1
	str	r3, [fp, #-32]
	mov	r3, #1
	str	r3, [fp, #-40]
	sub	r3, fp, #56
	sub	r2, fp, #40
	ldr	r1, [fp, #-64]
	mov	r0, #0
	bl	getaddrinfo
	str	r0, [fp, #-48]
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	beq	.L31
	ldr	r0, [fp, #-48]
	bl	gai_strerror
	mov	r3, r0
	mov	r0, r3
	bl	log_exit
.L31:
	ldr	r3, [fp, #-56]
	str	r3, [fp, #-52]
	b	.L32
.L38:
	ldr	r3, [fp, #-52]
	ldr	r0, [r3, #4]
	ldr	r3, [fp, #-52]
	ldr	r1, [r3, #8]
	ldr	r3, [fp, #-52]
	ldr	r3, [r3, #12]
	mov	r2, r3
	bl	socket
	str	r0, [fp, #-44]
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	blt	.L41
	ldr	r3, [fp, #-52]
	ldr	r1, [r3, #20]
	ldr	r3, [fp, #-52]
	ldr	r3, [r3, #16]
	mov	r2, r3
	ldr	r0, [fp, #-44]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	bge	.L35
	ldr	r0, [fp, #-44]
	bl	close
	b	.L34
.L35:
	mov	r1, #5
	ldr	r0, [fp, #-44]
	bl	listen
	mov	r3, r0
	cmp	r3, #0
	bge	.L36
	ldr	r0, [fp, #-44]
	bl	close
	b	.L34
.L36:
	ldr	r3, [fp, #-56]
	mov	r0, r3
	bl	freeaddrinfo
	ldr	r3, [fp, #-44]
	b	.L39
.L41:
	nop
.L34:
	ldr	r3, [fp, #-52]
	ldr	r3, [r3, #28]
	str	r3, [fp, #-52]
.L32:
	ldr	r3, [fp, #-52]
	cmp	r3, #0
	bne	.L38
	ldr	r0, .L42+4
	bl	log_exit
	mvn	r3, #0
.L39:
	ldr	r2, .L42
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L40
	bl	__stack_chk_fail
.L40:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L43:
	.align	2
.L42:
	.word	.LC16
	.word	.LC15
	.size	listen_socket, .-listen_socket
	.section	.rodata
	.align	2
.LC17:
	.ascii	"accept(2) failed: %s\000"
	.align	2
.LC18:
	.ascii	"r\000"
	.align	2
.LC19:
	.ascii	"w\000"
	.align	2
.LC20:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	server_main, %function
server_main:
	@ args = 0, pretend = 0, frame = 160
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #160
	str	r0, [fp, #-160]
	str	r1, [fp, #-164]
	ldr	r3, .L50
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
.L48:
	mov	r3, #128
	str	r3, [fp, #-156]
	sub	r2, fp, #156
	sub	r3, fp, #136
	mov	r1, r3
	ldr	r0, [fp, #-160]
	bl	accept
	str	r0, [fp, #-152]
	ldr	r3, [fp, #-152]
	cmp	r3, #0
	bge	.L45
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L50+4
	bl	log_exit
.L45:
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-148]
	ldr	r3, [fp, #-148]
	cmp	r3, #0
	bge	.L46
	mov	r0, #3
	bl	exit
.L46:
	ldr	r3, [fp, #-148]
	cmp	r3, #0
	bne	.L47
	ldr	r1, .L50+8
	ldr	r0, [fp, #-152]
	bl	fdopen
	str	r0, [fp, #-144]
	ldr	r1, .L50+12
	ldr	r0, [fp, #-152]
	bl	fdopen
	str	r0, [fp, #-140]
	ldr	r2, [fp, #-164]
	ldr	r1, [fp, #-140]
	ldr	r0, [fp, #-144]
	bl	service
	mov	r0, #0
	bl	exit
.L47:
	ldr	r0, [fp, #-152]
	bl	close
	b	.L48
.L51:
	.align	2
.L50:
	.word	.LC20
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.size	server_main, .-server_main
	.section	.rodata
	.align	2
.LC21:
	.ascii	"/\000"
	.align	2
.LC22:
	.ascii	"chdir(2) failed: %s\000"
	.align	2
.LC23:
	.ascii	"/dev/null\000"
	.align	2
.LC24:
	.ascii	"fork(2) failed: %s\000"
	.align	2
.LC25:
	.ascii	"setsid(2) failed: %s\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	become_daemon, %function
become_daemon:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	ldr	r0, .L58
	bl	chdir
	mov	r3, r0
	cmp	r3, #0
	bge	.L53
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L58+4
	bl	log_exit
.L53:
	ldr	r3, .L58+8
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L58+12
	ldr	r0, .L58+16
	bl	freopen
	ldr	r3, .L58+20
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L58+12
	ldr	r0, .L58+16
	bl	freopen
	ldr	r3, .L58+24
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L58+12
	ldr	r0, .L58+16
	bl	freopen
	bl	fork
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L54
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L58+28
	bl	log_exit
.L54:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L55
	mov	r0, #0
	bl	_exit
.L55:
	bl	setsid
	mov	r3, r0
	cmp	r3, #0
	bge	.L57
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L58+32
	bl	log_exit
.L57:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L59:
	.align	2
.L58:
	.word	.LC21
	.word	.LC22
	.word	stdin
	.word	.LC18
	.word	.LC23
	.word	stdout
	.word	stderr
	.word	.LC24
	.word	.LC25
	.size	become_daemon, .-become_daemon
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	service, %function
service:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r0, [fp, #-16]
	bl	read_request
	str	r0, [fp, #-8]
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-8]
	bl	respond_to
	ldr	r0, [fp, #-8]
	bl	free_request
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	service, .-service
	.section	.rodata
	.align	2
.LC26:
	.ascii	"request body too long (size: %d)\000"
	.align	2
.LC27:
	.ascii	"failed to read request body: %s\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_request, %function
read_request:
	@ 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]
	mov	r0, #24
	bl	xmalloc
	str	r0, [fp, #-12]
	ldr	r1, [fp, #-16]
	ldr	r0, [fp, #-12]
	bl	read_request_line
	ldr	r3, [fp, #-12]
	mov	r2, #0
	str	r2, [r3, #12]
	b	.L62
.L63:
	ldr	r3, [fp, #-12]
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-8]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-8]
	str	r2, [r3, #12]
.L62:
	ldr	r0, [fp, #-16]
	bl	read_header_field
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L63
	ldr	r0, [fp, #-12]
	bl	content_length
	mov	r2, r0
	ldr	r3, [fp, #-12]
	str	r2, [r3, #20]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #20]
	cmp	r3, #0
	beq	.L64
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #20]
	cmp	r3, #1048576
	ble	.L65
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #20]
	mov	r1, r3
	ldr	r0, .L68
	bl	log_exit
.L65:
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #20]
	mov	r0, r3
	bl	xmalloc
	mov	r2, r0
	ldr	r3, [fp, #-12]
	str	r2, [r3, #16]
	ldr	r3, [fp, #-12]
	ldr	r0, [r3, #16]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #20]
	mov	r1, r3
	ldr	r3, [fp, #-16]
	mov	r2, #1
	bl	fread
	mov	r3, r0
	cmp	r3, #0
	bne	.L66
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #16]
	mov	r1, r3
	ldr	r0, .L68+4
	bl	log_exit
	b	.L66
.L64:
	ldr	r3, [fp, #-12]
	mov	r2, #0
	str	r2, [r3, #16]
.L66:
	ldr	r3, [fp, #-12]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L69:
	.align	2
.L68:
	.word	.LC26
	.word	.LC27
	.size	read_request, .-read_request
	.section	.rodata
	.align	2
.LC28:
	.ascii	"no request line\000"
	.align	2
.LC29:
	.ascii	"parse error on request line (1): %s\000"
	.align	2
.LC30:
	.ascii	"parse error on request line (2): %s\000"
	.align	2
.LC31:
	.ascii	"HTTP/1.\000"
	.align	2
.LC32:
	.ascii	"parse error on request line (3): %s\000"
	.align	2
.LC33:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_request_line, %function
read_request_line:
	@ args = 0, pretend = 0, frame = 4120
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #4096
	sub	sp, sp, #28
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r0, [r3, #-20]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r1, [r3, #-24]
	ldr	r3, .L76
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r2, [r2, #-24]
	mov	r1, #4096
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L71
	ldr	r0, .L76+4
	bl	log_exit
.L71:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, #32
	mov	r0, r3
	bl	strchr
	str	r0, [r4, #-12]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-12]
	cmp	r3, #0
	bne	.L72
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L76+8
	bl	log_exit
.L72:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-12]
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r1, r2
	add	r2, r3, #1
	str	r2, [r1, #-12]
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r2, [r2, #-12]
	sub	r3, r2, r3
	mov	r0, r3
	bl	xmalloc
	mov	r2, r0
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-20]
	str	r2, [r3, #4]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-20]
	ldr	r2, [r3, #4]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	mov	r0, r2
	bl	strcpy
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-20]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	upcase
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-12]
	str	r3, [r2, #-8]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r1, #32
	ldr	r0, [r3, #-8]
	bl	strchr
	str	r0, [r4, #-12]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-12]
	cmp	r3, #0
	bne	.L73
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L76+12
	bl	log_exit
.L73:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-12]
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r1, r2
	add	r2, r3, #1
	str	r2, [r1, #-12]
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, [r2, #-12]
	ldr	r3, [r3, #-8]
	sub	r3, r2, r3
	mov	r0, r3
	bl	xmalloc
	mov	r2, r0
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-20]
	str	r2, [r3, #8]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-20]
	ldr	r3, [r3, #8]
	sub	r2, fp, #4096
	sub	r2, r2, #12
	ldr	r1, [r2, #-8]
	mov	r0, r3
	bl	strcpy
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, #7
	ldr	r1, .L76+16
	ldr	r0, [r3, #-12]
	bl	strncasecmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L74
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L76+20
	bl	log_exit
.L74:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-12]
	add	r3, r3, #7
	str	r3, [r2, #-12]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-12]
	bl	atoi
	mov	r2, r0
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-20]
	str	r2, [r3]
	nop
	ldr	r3, .L76
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L75
	bl	__stack_chk_fail
.L75:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L77:
	.align	2
.L76:
	.word	.LC33
	.word	.LC28
	.word	.LC29
	.word	.LC30
	.word	.LC31
	.word	.LC32
	.size	read_request_line, .-read_request_line
	.section	.rodata
	.align	2
.LC34:
	.ascii	"failed to read request header field: %s\000"
	.align	2
.LC35:
	.ascii	"\015\012\000"
	.align	2
.LC36:
	.ascii	"parse error on request header field: %s\000"
	.align	2
.LC37:
	.ascii	" \011\000"
	.align	2
.LC38:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_header_field, %function
read_header_field:
	@ args = 0, pretend = 0, frame = 4120
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #4096
	sub	sp, sp, #28
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r0, [r3, #-20]
	ldr	r3, .L86
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r2, [r2, #-20]
	mov	r1, #4096
	mov	r0, r3
	bl	fgets
	mov	r3, r0
	cmp	r3, #0
	bne	.L79
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L86+4
	bl	log_exit
.L79:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldrb	r3, [r3, #-4]	@ zero_extendqisi2
	cmp	r3, #10
	beq	.L80
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r1, .L86+8
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L81
.L80:
	mov	r3, #0
	b	.L84
.L81:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, #58
	mov	r0, r3
	bl	strchr
	str	r0, [r4, #-12]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-12]
	cmp	r3, #0
	bne	.L83
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L86+12
	bl	log_exit
.L83:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-12]
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r1, r2
	add	r2, r3, #1
	str	r2, [r1, #-12]
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	mov	r0, #12
	bl	xmalloc
	str	r0, [r4, #-8]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r2, [r2, #-12]
	sub	r3, r2, r3
	mov	r0, r3
	bl	xmalloc
	mov	r2, r0
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	str	r2, [r3]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	ldr	r2, [r3]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	mov	r0, r2
	bl	strcpy
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r1, .L86+16
	ldr	r0, [r3, #-12]
	bl	strspn
	mov	r2, r0
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r1, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-12]
	add	r3, r3, r2
	str	r3, [r1, #-12]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-12]
	bl	strlen
	mov	r3, r0
	add	r3, r3, #1
	mov	r0, r3
	bl	xmalloc
	mov	r2, r0
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	str	r2, [r3, #4]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	ldr	r3, [r3, #4]
	sub	r2, fp, #4096
	sub	r2, r2, #12
	ldr	r1, [r2, #-12]
	mov	r0, r3
	bl	strcpy
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
.L84:
	ldr	r2, .L86
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L85
	bl	__stack_chk_fail
.L85:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L87:
	.align	2
.L86:
	.word	.LC38
	.word	.LC34
	.word	.LC35
	.word	.LC36
	.word	.LC37
	.size	read_header_field, .-read_header_field
	.section	.rodata
	.align	2
.LC39:
	.ascii	"Content-Length\000"
	.align	2
.LC40:
	.ascii	"negative Content-Length value: %d\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	content_length, %function
content_length:
	@ 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]
	ldr	r1, .L92
	ldr	r0, [fp, #-16]
	bl	lookup_header_field_value
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L89
	mov	r3, #0
	b	.L90
.L89:
	ldr	r0, [fp, #-12]
	bl	atol
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L91
	ldr	r1, [fp, #-8]
	ldr	r0, .L92+4
	bl	log_exit
.L91:
	ldr	r3, [fp, #-8]
.L90:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L93:
	.align	2
.L92:
	.word	.LC39
	.word	.LC40
	.size	content_length, .-content_length
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	lookup_header_field_value, %function
lookup_header_field_value:
	@ 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	r3, [fp, #-16]
	ldr	r3, [r3, #12]
	str	r3, [fp, #-8]
	b	.L95
.L98:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	ldr	r1, [fp, #-20]
	mov	r0, r3
	bl	strcasecmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L96
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	b	.L97
.L96:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-8]
.L95:
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L98
	mov	r3, #0
.L97:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	lookup_header_field_value, .-lookup_header_field_value
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	upcase, %function
upcase:
	@ 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]
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-8]
	b	.L100
.L101:
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	toupper
	mov	r3, r0
	and	r2, r3, #255
	ldr	r3, [fp, #-8]
	strb	r2, [r3]
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L100:
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L101
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	upcase, .-upcase
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	free_request, %function
free_request:
	@ 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]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #12]
	str	r3, [fp, #-12]
	b	.L103
.L104:
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-12]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	free
	ldr	r0, [fp, #-8]
	bl	free
.L103:
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bne	.L104
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	mov	r0, r3
	bl	free
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	free
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #16]
	mov	r0, r3
	bl	free
	ldr	r0, [fp, #-16]
	bl	free
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	free_request, .-free_request
	.section	.rodata
	.align	2
.LC41:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_fileinfo, %function
get_fileinfo:
	@ args = 0, pretend = 0, frame = 112
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #112
	str	r0, [fp, #-112]
	str	r1, [fp, #-116]
	ldr	r3, .L111
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r0, #12
	bl	xmalloc
	str	r0, [fp, #-104]
	ldr	r1, [fp, #-116]
	ldr	r0, [fp, #-112]
	bl	build_fspath
	mov	r2, r0
	ldr	r3, [fp, #-104]
	str	r2, [r3]
	ldr	r3, [fp, #-104]
	mov	r2, #0
	str	r2, [r3, #8]
	ldr	r3, [fp, #-104]
	ldr	r3, [r3]
	sub	r2, fp, #100
	mov	r1, r2
	mov	r0, r3
	bl	lstat
	mov	r3, r0
	cmp	r3, #0
	bge	.L106
	ldr	r3, [fp, #-104]
	b	.L109
.L106:
	ldr	r3, [fp, #-84]
	and	r3, r3, #61440
	cmp	r3, #32768
	beq	.L108
	ldr	r3, [fp, #-104]
	b	.L109
.L108:
	ldr	r3, [fp, #-104]
	mov	r2, #1
	str	r2, [r3, #8]
	ldr	r2, [fp, #-56]
	ldr	r3, [fp, #-104]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-104]
.L109:
	ldr	r2, .L111
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L110
	bl	__stack_chk_fail
.L110:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L112:
	.align	2
.L111:
	.word	.LC41
	.size	get_fileinfo, .-get_fileinfo
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	free_fileinfo, %function
free_fileinfo:
	@ 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	r3, [fp, #-8]
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r0, [fp, #-8]
	bl	free
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	free_fileinfo, .-free_fileinfo
	.section	.rodata
	.align	2
.LC42:
	.ascii	"text/html\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	guess_content_type, %function
guess_content_type:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, .L116
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L117:
	.align	2
.L116:
	.word	.LC42
	.size	guess_content_type, .-guess_content_type
	.section	.rodata
	.align	2
.LC43:
	.ascii	"%s/%s\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	build_fspath, %function
build_fspath:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #20
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r0, [fp, #-24]
	bl	strlen
	mov	r4, r0
	ldr	r0, [fp, #-28]
	bl	strlen
	mov	r3, r0
	add	r3, r4, r3
	add	r3, r3, #2
	mov	r0, r3
	bl	xmalloc
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-24]
	ldr	r1, .L120
	ldr	r0, [fp, #-16]
	bl	sprintf
	ldr	r3, [fp, #-16]
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L121:
	.align	2
.L120:
	.word	.LC43
	.size	build_fspath, .-build_fspath
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	install_signal_handlers, %function
install_signal_handlers:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r1, .L123
	mov	r0, #15
	bl	trap_signal
	ldr	r1, .L123+4
	mov	r0, #17
	bl	trap_signal
	nop
	pop	{fp, pc}
.L124:
	.align	2
.L123:
	.word	signal_exit
	.word	wait_child
	.size	install_signal_handlers, .-install_signal_handlers
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	wait_child, %function
wait_child:
	@ 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]
	mov	r0, #0
	bl	wait
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	wait_child, .-wait_child
	.section	.rodata
	.align	2
.LC44:
	.ascii	"GET\000"
	.align	2
.LC45:
	.ascii	"HEAD\000"
	.align	2
.LC46:
	.ascii	"POST\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	respond_to, %function
respond_to:
	@ 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, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	ldr	r1, .L132
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L127
	ldr	r2, [fp, #-16]
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	do_file_response
	b	.L131
.L127:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	ldr	r1, .L132+4
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L129
	ldr	r2, [fp, #-16]
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	do_file_response
	b	.L131
.L129:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	ldr	r1, .L132+8
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L130
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	method_not_allowed
	b	.L131
.L130:
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	not_implemented
.L131:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L133:
	.align	2
.L132:
	.word	.LC44
	.word	.LC45
	.word	.LC46
	.size	respond_to, .-respond_to
	.section	.rodata
	.align	2
.LC47:
	.ascii	"200 OK\000"
	.align	2
.LC48:
	.ascii	"Content-Length: %ld\015\012\000"
	.align	2
.LC49:
	.ascii	"Content-Type %s\015\012\000"
	.align	2
.LC50:
	.ascii	"failed to open %s: %s\012\000"
	.align	2
.LC51:
	.ascii	"failed to write to socket: %s\012\000"
	.align	2
.LC52:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	do_file_response, %function
do_file_response:
	@ args = 0, pretend = 0, frame = 1056
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #1056
	sub	sp, sp, #4
	str	r0, [fp, #-1056]
	str	r1, [fp, #-1060]
	str	r2, [fp, #-1064]
	ldr	r3, .L147
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, [fp, #-1056]
	ldr	r3, [r3, #8]
	mov	r1, r3
	ldr	r0, [fp, #-1064]
	bl	get_fileinfo
	str	r0, [fp, #-1052]
	ldr	r3, [fp, #-1052]
	ldr	r3, [r3, #8]
	cmp	r3, #0
	bne	.L135
	ldr	r0, [fp, #-1052]
	bl	free_fileinfo
	ldr	r1, [fp, #-1060]
	ldr	r0, [fp, #-1056]
	bl	not_found
	b	.L134
.L135:
	ldr	r2, .L147+4
	ldr	r1, [fp, #-1060]
	ldr	r0, [fp, #-1056]
	bl	output_common_header_fields
	ldr	r3, [fp, #-1052]
	ldr	r3, [r3, #4]
	mov	r2, r3
	ldr	r1, .L147+8
	ldr	r0, [fp, #-1060]
	bl	fprintf
	ldr	r0, [fp, #-1052]
	bl	guess_content_type
	mov	r3, r0
	mov	r2, r3
	ldr	r1, .L147+12
	ldr	r0, [fp, #-1060]
	bl	fprintf
	ldr	r3, [fp, #-1060]
	mov	r2, #2
	mov	r1, #1
	ldr	r0, .L147+16
	bl	fwrite
	ldr	r3, [fp, #-1056]
	ldr	r3, [r3, #4]
	ldr	r1, .L147+20
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L137
	ldr	r3, [fp, #-1052]
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	open
	str	r0, [fp, #-1048]
	ldr	r3, [fp, #-1048]
	cmp	r3, #0
	bge	.L143
	ldr	r3, [fp, #-1052]
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	mov	r1, r4
	ldr	r0, .L147+24
	bl	log_exit
.L143:
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, r3
	ldr	r0, [fp, #-1048]
	bl	read
	str	r0, [fp, #-1044]
	ldr	r3, [fp, #-1044]
	cmp	r3, #0
	bge	.L139
	ldr	r3, [fp, #-1052]
	ldr	r4, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r3
	mov	r1, r4
	ldr	r0, .L147+24
	bl	log_exit
.L139:
	ldr	r3, [fp, #-1044]
	cmp	r3, #0
	beq	.L146
	ldr	r2, [fp, #-1044]
	sub	r0, fp, #1024
	sub	r0, r0, #12
	sub	r0, r0, #4
	ldr	r3, [fp, #-1060]
	mov	r1, #1
	bl	fwrite
	mov	r2, r0
	ldr	r3, [fp, #-1044]
	cmp	r2, r3
	bcs	.L143
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L147+28
	bl	log_exit
	b	.L143
.L146:
	nop
	ldr	r0, [fp, #-1048]
	bl	close
.L137:
	ldr	r0, [fp, #-1060]
	bl	fflush
	ldr	r0, [fp, #-1052]
	bl	free_fileinfo
.L134:
	ldr	r3, .L147
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L144
	bl	__stack_chk_fail
.L144:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L148:
	.align	2
.L147:
	.word	.LC52
	.word	.LC47
	.word	.LC48
	.word	.LC49
	.word	.LC35
	.word	.LC45
	.word	.LC50
	.word	.LC51
	.size	do_file_response, .-do_file_response
	.section	.rodata
	.align	2
.LC53:
	.ascii	"405 Method Not Allowed\000"
	.align	2
.LC54:
	.ascii	"Content-Type: text/html\015\012\000"
	.align	2
.LC55:
	.ascii	"The request method %s is not allowed\015\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	method_not_allowed, %function
method_not_allowed:
	@ 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]
	str	r1, [fp, #-12]
	ldr	r2, .L150
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	output_common_header_fields
	ldr	r3, [fp, #-12]
	mov	r2, #25
	mov	r1, #1
	ldr	r0, .L150+4
	bl	fwrite
	ldr	r3, [fp, #-12]
	mov	r2, #2
	mov	r1, #1
	ldr	r0, .L150+8
	bl	fwrite
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	mov	r2, r3
	ldr	r1, .L150+12
	ldr	r0, [fp, #-12]
	bl	fprintf
	ldr	r0, [fp, #-12]
	bl	fflush
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L151:
	.align	2
.L150:
	.word	.LC53
	.word	.LC54
	.word	.LC35
	.word	.LC55
	.size	method_not_allowed, .-method_not_allowed
	.section	.rodata
	.align	2
.LC56:
	.ascii	"501 Not Implemented\000"
	.align	2
.LC57:
	.ascii	"The request method %s is not implemented\015\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	not_implemented, %function
not_implemented:
	@ 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]
	str	r1, [fp, #-12]
	ldr	r2, .L153
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	output_common_header_fields
	ldr	r3, [fp, #-12]
	mov	r2, #25
	mov	r1, #1
	ldr	r0, .L153+4
	bl	fwrite
	ldr	r3, [fp, #-12]
	mov	r2, #2
	mov	r1, #1
	ldr	r0, .L153+8
	bl	fwrite
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	mov	r2, r3
	ldr	r1, .L153+12
	ldr	r0, [fp, #-12]
	bl	fprintf
	ldr	r0, [fp, #-12]
	bl	fflush
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L154:
	.align	2
.L153:
	.word	.LC56
	.word	.LC54
	.word	.LC35
	.word	.LC57
	.size	not_implemented, .-not_implemented
	.section	.rodata
	.align	2
.LC58:
	.ascii	"404 Not Found\000"
	.align	2
.LC59:
	.ascii	"File not found\015\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	not_found, %function
not_found:
	@ 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]
	str	r1, [fp, #-12]
	ldr	r2, .L156
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	output_common_header_fields
	ldr	r3, [fp, #-12]
	mov	r2, #25
	mov	r1, #1
	ldr	r0, .L156+4
	bl	fwrite
	ldr	r3, [fp, #-12]
	mov	r2, #2
	mov	r1, #1
	ldr	r0, .L156+8
	bl	fwrite
	ldr	r3, [fp, #-12]
	mov	r2, #16
	mov	r1, #1
	ldr	r0, .L156+12
	bl	fwrite
	ldr	r0, [fp, #-12]
	bl	fflush
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L157:
	.align	2
.L156:
	.word	.LC58
	.word	.LC54
	.word	.LC35
	.word	.LC59
	.size	not_found, .-not_found
	.section	.rodata
	.align	2
.LC60:
	.ascii	"gmtime() failed: %s\012\000"
	.align	2
.LC61:
	.ascii	"%a, %d %b %Y %H:%M:%S GMT\000"
	.align	2
.LC62:
	.ascii	"HTTP/1.%d %s\015\012\000"
	.align	2
.LC63:
	.ascii	"Date: %s\015\012\000"
	.align	2
.LC64:
	.ascii	"1.0\000"
	.align	2
.LC65:
	.ascii	"Server: %s/%s\015\012\000"
	.align	2
.LC66:
	.ascii	"Connection: close\015\012\000"
	.align	2
.LC67:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	output_common_header_fields, %function
output_common_header_fields:
	@ args = 0, pretend = 0, frame = 96
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #96
	str	r0, [fp, #-88]
	str	r1, [fp, #-92]
	str	r2, [fp, #-96]
	ldr	r3, .L161
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r0, #0
	bl	time
	mov	r3, r0
	str	r3, [fp, #-80]
	sub	r3, fp, #80
	mov	r0, r3
	bl	gmtime
	str	r0, [fp, #-76]
	ldr	r3, [fp, #-76]
	cmp	r3, #0
	bne	.L159
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L161+4
	bl	log_exit
.L159:
	sub	r0, fp, #72
	ldr	r3, [fp, #-76]
	ldr	r2, .L161+8
	mov	r1, #64
	bl	strftime
	ldr	r3, [fp, #-96]
	mov	r2, #0
	ldr	r1, .L161+12
	ldr	r0, [fp, #-92]
	bl	fprintf
	sub	r3, fp, #72
	mov	r2, r3
	ldr	r1, .L161+16
	ldr	r0, [fp, #-92]
	bl	fprintf
	ldr	r3, .L161+20
	ldr	r2, .L161+24
	ldr	r1, .L161+28
	ldr	r0, [fp, #-92]
	bl	fprintf
	ldr	r3, [fp, #-92]
	mov	r2, #19
	mov	r1, #1
	ldr	r0, .L161+32
	bl	fwrite
	ldr	r0, [fp, #-92]
	bl	fflush
	nop
	ldr	r3, .L161
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L160
	bl	__stack_chk_fail
.L160:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L162:
	.align	2
.L161:
	.word	.LC67
	.word	.LC60
	.word	.LC61
	.word	.LC62
	.word	.LC63
	.word	.LC64
	.word	.LC8
	.word	.LC65
	.word	.LC66
	.size	output_common_header_fields, .-output_common_header_fields
	.section	.rodata
	.align	2
.LC68:
	.ascii	"sigaction() failed: %s\000"
	.align	2
.LC69:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	trap_signal, %function
trap_signal:
	@ args = 0, pretend = 0, frame = 152
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #152
	str	r0, [fp, #-152]
	str	r1, [fp, #-156]
	ldr	r3, .L167
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-156]
	str	r3, [fp, #-148]
	sub	r3, fp, #148
	add	r3, r3, #4
	mov	r0, r3
	bl	sigemptyset
	mov	r3, #268435456
	str	r3, [fp, #-16]
	sub	r3, fp, #148
	mov	r2, #0
	mov	r1, r3
	ldr	r0, [fp, #-152]
	bl	sigaction
	mov	r3, r0
	cmp	r3, #0
	bge	.L166
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L167+4
	bl	log_exit
.L166:
	nop
	ldr	r3, .L167
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L165
	bl	__stack_chk_fail
.L165:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L168:
	.align	2
.L167:
	.word	.LC69
	.word	.LC68
	.size	trap_signal, .-trap_signal
	.section	.rodata
	.align	2
.LC70:
	.ascii	"exit by singnal %d\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	signal_exit, %function
signal_exit:
	@ 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	r1, [fp, #-8]
	ldr	r0, .L170
	bl	log_exit
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L171:
	.align	2
.L170:
	.word	.LC70
	.size	signal_exit, .-signal_exit
	.section	.rodata
	.align	2
.LC71:
	.ascii	"failed to allocate memory (size: %d)\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	xmalloc, %function
xmalloc:
	@ 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]
	ldr	r0, [fp, #-16]
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bne	.L173
	ldr	r1, [fp, #-16]
	ldr	r0, .L175
	bl	log_exit
.L173:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L176:
	.align	2
.L175:
	.word	.LC71
	.size	xmalloc, .-xmalloc
	.section	.rodata
	.align	2
.LC72:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	log_exit, %function
log_exit:
	@ args = 4, pretend = 16, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 1
	push	{r0, r1, r2, r3}
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	ldr	r3, [fp, #4]
	str	r3, [fp, #-16]
	ldr	r3, .L181
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	add	r3, fp, #8
	str	r3, [fp, #-12]
	ldr	r3, .L181+4
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L178
	ldr	r3, .L181+8
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	ldr	r1, [fp, #-16]
	mov	r0, r3
	bl	vfprintf
	ldr	r3, .L181+8
	ldr	r3, [r3]
	mov	r1, r3
	mov	r0, #10
	bl	fputc
	b	.L179
.L178:
	ldr	r2, [fp, #-12]
	ldr	r1, [fp, #-16]
	mov	r0, #3
	bl	vsyslog
.L179:
	mov	r0, #1
	bl	exit
.L182:
	.align	2
.L181:
	.word	.LC72
	.word	debug_mode
	.word	stderr
	.size	log_exit, .-log_exit
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
