	.file	"242329886.c"
	.intel_syntax noprefix
	.text
	.globl	PORT
	.section	.rodata
	.align 4
	.type	PORT, @object
	.size	PORT, 4
PORT:
	.long	9000
	.globl	DOCUMENT_ROOT
	.bss
	.align 8
	.type	DOCUMENT_ROOT, @object
	.size	DOCUMENT_ROOT, 8
DOCUMENT_ROOT:
	.zero	8
	.text
	.globl	queue_init
	.type	queue_init, @function
queue_init:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	edi, 16
	call	malloc@PLT
	mov	QWORD PTR -32[rbp], rax
	cmp	QWORD PTR -32[rbp], 0
	je	.L15
	mov	edi, 40
	call	malloc@PLT
	mov	QWORD PTR -24[rbp], rax
	cmp	QWORD PTR -24[rbp], 0
	je	.L16
	mov	edi, 40
	call	malloc@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	je	.L17
	mov	edi, 48
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	je	.L18
	mov	rax, QWORD PTR -24[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_mutex_init@PLT
	test	eax, eax
	jne	.L19
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_mutex_init@PLT
	test	eax, eax
	jne	.L19
	mov	rax, QWORD PTR -32[rbp]
	mov	QWORD PTR 8[rax], 0
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR -32[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR -24[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR 24[rax], rdx
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 32[rax], rdx
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	esi, 0
	mov	rdi, rax
	call	pthread_cond_init@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR 40[rax], 0
	jmp	.L14
.L19:
	nop
.L12:
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	jmp	.L9
.L18:
	nop
.L9:
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	free@PLT
	jmp	.L7
.L17:
	nop
.L7:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	free@PLT
	jmp	.L5
.L16:
	nop
.L5:
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	free@PLT
	jmp	.L3
.L15:
	nop
.L3:
	mov	edi, 1
	call	exit@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	queue_init, .-queue_init
	.type	enqueue, @function
enqueue:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -28[rbp], esi
	mov	edi, 16
	call	malloc@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -28[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rax], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rdi, rax
	call	pthread_mutex_lock@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 40[rax]
	lea	edx, 1[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 40[rax], edx
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	rdi, rax
	call	pthread_cond_signal@PLT
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rdi, rax
	call	pthread_mutex_unlock@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	enqueue, .-enqueue
	.type	dequeue, @function
dequeue:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	pthread_mutex_lock@PLT
	jmp	.L22
.L23:
	mov	rax, QWORD PTR -24[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 32[rax]
	mov	rsi, rdx
	mov	rdi, rax
	call	pthread_cond_wait@PLT
.L22:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR 8[rax]
	test	rax, rax
	je	.L23
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	edx, DWORD PTR [rax]
	mov	rax, QWORD PTR -32[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR [rax], rdx
	mov	rax, QWORD PTR -24[rbp]
	mov	eax, DWORD PTR 40[rax]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	DWORD PTR 40[rax], edx
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	rdi, rax
	call	pthread_mutex_unlock@PLT
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	free@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	dequeue, .-dequeue
	.section	.rodata
.LC0:
	.string	"application"
.LC1:
	.string	"audio"
.LC2:
	.string	"image"
.LC3:
	.string	"message"
.LC4:
	.string	"multipart"
.LC5:
	.string	"text"
.LC6:
	.string	"video"
	.text
	.type	type_to_str, @function
type_to_str:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	cmp	DWORD PTR -4[rbp], 6
	ja	.L25
	mov	eax, DWORD PTR -4[rbp]
	lea	rdx, 0[0+rax*4]
	lea	rax, .L27[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L27[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L27:
	.long	.L33-.L27
	.long	.L32-.L27
	.long	.L31-.L27
	.long	.L30-.L27
	.long	.L29-.L27
	.long	.L28-.L27
	.long	.L26-.L27
	.text
.L33:
	lea	rax, .LC0[rip]
	jmp	.L34
.L32:
	lea	rax, .LC1[rip]
	jmp	.L34
.L31:
	lea	rax, .LC2[rip]
	jmp	.L34
.L30:
	lea	rax, .LC3[rip]
	jmp	.L34
.L29:
	lea	rax, .LC4[rip]
	jmp	.L34
.L28:
	lea	rax, .LC5[rip]
	jmp	.L34
.L26:
	lea	rax, .LC6[rip]
	jmp	.L34
.L25:
	mov	eax, 0
.L34:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	type_to_str, .-type_to_str
	.section	.rodata
.LC7:
	.string	"OK"
.LC8:
	.string	"Bad Request"
.LC9:
	.string	"Forbidden"
.LC10:
	.string	"Not Found"
.LC11:
	.string	"Request Timeout"
.LC12:
	.string	"Request Entity Too Large"
.LC13:
	.string	"Internal Server Error"
	.text
	.type	status_to_str, @function
status_to_str:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	DWORD PTR -4[rbp], edi
	cmp	DWORD PTR -4[rbp], 200
	je	.L36
	cmp	DWORD PTR -4[rbp], 200
	jl	.L37
	cmp	DWORD PTR -4[rbp], 413
	jg	.L37
	cmp	DWORD PTR -4[rbp], 400
	jl	.L37
	mov	eax, DWORD PTR -4[rbp]
	sub	eax, 400
	cmp	eax, 13
	ja	.L37
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L39[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L39[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L39:
	.long	.L43-.L39
	.long	.L37-.L39
	.long	.L37-.L39
	.long	.L42-.L39
	.long	.L41-.L39
	.long	.L37-.L39
	.long	.L37-.L39
	.long	.L37-.L39
	.long	.L40-.L39
	.long	.L37-.L39
	.long	.L37-.L39
	.long	.L37-.L39
	.long	.L37-.L39
	.long	.L38-.L39
	.text
.L36:
	lea	rax, .LC7[rip]
	jmp	.L44
.L43:
	lea	rax, .LC8[rip]
	jmp	.L44
.L42:
	lea	rax, .LC9[rip]
	jmp	.L44
.L41:
	lea	rax, .LC10[rip]
	jmp	.L44
.L40:
	lea	rax, .LC11[rip]
	jmp	.L44
.L38:
	lea	rax, .LC12[rip]
	jmp	.L44
.L37:
	lea	rax, .LC13[rip]
.L44:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	status_to_str, .-status_to_str
	.section	.rodata
.LC14:
	.string	" \t"
	.text
	.type	strsep_whitespace, @function
strsep_whitespace:
.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, 32
	mov	QWORD PTR -24[rbp], rdi
	mov	rax, QWORD PTR -24[rbp]
	lea	rsi, .LC14[rip]
	mov	rdi, rax
	call	strsep@PLT
	mov	QWORD PTR -8[rbp], rax
	jmp	.L46
.L48:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR [rax], rdx
.L46:
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L47
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 32
	je	.L48
	mov	rax, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 9
	je	.L48
.L47:
	mov	rax, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	strsep_whitespace, .-strsep_whitespace
	.section	.rodata
.LC15:
	.string	"\n"
.LC16:
	.string	"\r"
	.text
	.type	strsep_newline, @function
strsep_newline:
.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	QWORD PTR -40[rbp], rdi
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	mov	esi, 13
	mov	rdi, rax
	call	strchr@PLT
	mov	QWORD PTR -16[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	mov	esi, 10
	mov	rdi, rax
	call	strchr@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -16[rbp], 0
	je	.L51
	mov	rax, QWORD PTR -8[rbp]
	cmp	rax, QWORD PTR -16[rbp]
	jnb	.L52
.L51:
	mov	rax, QWORD PTR -40[rbp]
	lea	rsi, .LC15[rip]
	mov	rdi, rax
	call	strsep@PLT
	mov	QWORD PTR -24[rbp], rax
	jmp	.L53
.L52:
	mov	rax, QWORD PTR -40[rbp]
	lea	rsi, .LC16[rip]
	mov	rdi, rax
	call	strsep@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR [rax]
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR [rax], rdx
.L53:
	mov	rax, QWORD PTR -24[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	strsep_newline, .-strsep_newline
	.section	.rodata
.LC17:
	.string	"GET"
.LC18:
	.string	"HEAD"
	.text
	.type	parse_method, @function
parse_method:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC17[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L56
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR [rax], 0
	jmp	.L57
.L56:
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC18[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L58
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR [rax], 1
	jmp	.L57
.L58:
	mov	eax, 400
	jmp	.L59
.L57:
	mov	eax, 200
.L59:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	parse_method, .-parse_method
	.section	.rodata
.LC19:
	.string	"/"
.LC20:
	.string	"/index.html"
.LC21:
	.string	"%s/index.html"
	.text
	.type	parse_path, @function
parse_path:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC19[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L61
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC20[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L62
.L61:
	mov	rax, QWORD PTR DOCUMENT_ROOT[rip]
	mov	rdx, QWORD PTR -16[rbp]
	lea	rdi, 4[rdx]
	mov	rcx, rax
	lea	rdx, .LC21[rip]
	mov	esi, 1024
	mov	eax, 0
	call	snprintf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR 1028[rax], 5
	mov	eax, 200
	jmp	.L63
.L62:
	mov	eax, 404
.L63:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	parse_path, .-parse_path
	.section	.rodata
.LC22:
	.string	"HTTP/1.0"
.LC23:
	.string	"HTTP/1.1"
	.text
	.type	parse_protocol_version, @function
parse_protocol_version:
.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, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC22[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L65
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR 1032[rax], 0
	jmp	.L66
.L65:
	mov	rax, QWORD PTR -8[rbp]
	lea	rsi, .LC23[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L67
	mov	rax, QWORD PTR -16[rbp]
	mov	DWORD PTR 1032[rax], 1
	jmp	.L66
.L67:
	mov	eax, 400
	jmp	.L68
.L66:
	mov	eax, 200
.L68:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	parse_protocol_version, .-parse_protocol_version
	.type	parse_initial_line, @function
parse_initial_line:
.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, 48
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	lea	rax, -40[rbp]
	mov	rdi, rax
	call	strsep_whitespace
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L70
	mov	eax, 400
	jmp	.L71
.L70:
	mov	rdx, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	parse_method
	mov	DWORD PTR -20[rbp], eax
	cmp	DWORD PTR -20[rbp], 200
	je	.L72
	mov	eax, DWORD PTR -20[rbp]
	jmp	.L71
.L72:
	lea	rax, -40[rbp]
	mov	rdi, rax
	call	strsep_whitespace
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L73
	mov	eax, 400
	jmp	.L71
.L73:
	mov	rdx, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	parse_path
	mov	DWORD PTR -16[rbp], eax
	cmp	DWORD PTR -16[rbp], 200
	je	.L74
	mov	eax, DWORD PTR -16[rbp]
	jmp	.L71
.L74:
	lea	rax, -40[rbp]
	mov	rdi, rax
	call	strsep_whitespace
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L75
	mov	eax, 400
	jmp	.L71
.L75:
	mov	rdx, QWORD PTR -48[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	parse_protocol_version
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 200
	je	.L76
	mov	eax, DWORD PTR -12[rbp]
	jmp	.L71
.L76:
	mov	eax, 200
.L71:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	parse_initial_line, .-parse_initial_line
	.type	parse_header, @function
parse_header:
.LFB17:
	.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
	mov	QWORD PTR -16[rbp], rsi
	mov	eax, 200
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	parse_header, .-parse_header
	.type	parse_request, @function
parse_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	QWORD PTR -32[rbp], rsi
	lea	rax, -24[rbp]
	mov	rdi, rax
	call	strsep_newline
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	jne	.L80
	mov	eax, 400
	jmp	.L81
.L80:
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	parse_initial_line
	mov	DWORD PTR -16[rbp], eax
	cmp	DWORD PTR -16[rbp], 200
	je	.L83
	mov	eax, DWORD PTR -16[rbp]
	jmp	.L81
.L85:
	mov	rdx, QWORD PTR -32[rbp]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	parse_header
	mov	DWORD PTR -12[rbp], eax
	cmp	DWORD PTR -12[rbp], 200
	je	.L83
	mov	eax, DWORD PTR -12[rbp]
	jmp	.L81
.L83:
	lea	rax, -24[rbp]
	mov	rdi, rax
	call	strsep_newline
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	je	.L84
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L85
.L84:
	mov	eax, 200
.L81:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE18:
	.size	parse_request, .-parse_request
	.section	.rodata
.LC24:
	.string	"Socket error!\n"
	.text
	.type	socket_, @function
socket_:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	DWORD PTR -28[rbp], edx
	mov	edx, DWORD PTR -28[rbp]
	mov	ecx, DWORD PTR -24[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, ecx
	mov	edi, eax
	call	socket@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jns	.L87
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 14
	mov	esi, 1
	lea	rdi, .LC24[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L87:
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE19:
	.size	socket_, .-socket_
	.section	.rodata
.LC25:
	.string	"bind_"
	.text
	.type	bind_, @function
bind_:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -24[rbp], edx
	mov	edx, DWORD PTR -24[rbp]
	mov	rcx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jns	.L90
	lea	rdi, .LC25[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L90:
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE20:
	.size	bind_, .-bind_
	.section	.rodata
.LC26:
	.string	"Listen error!\n"
	.text
	.type	listen_, @function
listen_:
.LFB21:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	DWORD PTR -24[rbp], esi
	mov	edx, DWORD PTR -24[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, edx
	mov	edi, eax
	call	listen@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jns	.L93
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 14
	mov	esi, 1
	lea	rdi, .LC26[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L93:
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE21:
	.size	listen_, .-listen_
	.type	listening_socket, @function
listening_socket:
.LFB22:
	.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	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -32[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	WORD PTR -32[rbp], 2
	mov	eax, 9000
	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
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket_
	mov	DWORD PTR -36[rbp], eax
	lea	rcx, -32[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind_
	mov	eax, DWORD PTR -36[rbp]
	mov	esi, 1024
	mov	edi, eax
	call	listen_
	mov	eax, DWORD PTR -36[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L97
	call	__stack_chk_fail@PLT
.L97:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE22:
	.size	listening_socket, .-listening_socket
	.section	.rodata
.LC27:
	.string	"\r\n\r\n"
.LC28:
	.string	"\n\n"
.LC29:
	.string	"recv"
.LC30:
	.string	"HTTP/1.%d %d %s\r\n"
	.align 8
.LC31:
	.string	"Date: %a, %d %b %Y %H:%M:%S GMT\r\n"
.LC32:
	.string	"Content-Length: %d\r\n"
.LC33:
	.string	"Content-Type: %s\r\n"
.LC34:
	.string	"\r\n"
.LC35:
	.string	"open"
.LC36:
	.string	"sending file"
	.text
	.type	worker_routine, @function
worker_routine:
.LFB23:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 2288
	mov	QWORD PTR -2280[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	call	pthread_self@PLT
	mov	rdi, rax
	call	pthread_detach@PLT
	mov	edi, 1036
	call	malloc@PLT
	mov	QWORD PTR -2232[rbp], rax
	mov	rax, QWORD PTR -2280[rbp]
	mov	QWORD PTR -2224[rbp], rax
.L99:
	lea	rdx, -2260[rbp]
	mov	rax, QWORD PTR -2224[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	dequeue
	lea	rax, -2064[rbp]
	mov	edx, 1024
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	DWORD PTR -2256[rbp], 0
.L108:
	mov	eax, DWORD PTR -2256[rbp]
	movsx	rdx, eax
	lea	rax, -2064[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strndup@PLT
	mov	QWORD PTR -2216[rbp], rax
	mov	rax, QWORD PTR -2216[rbp]
	lea	rsi, .LC27[rip]
	mov	rdi, rax
	call	strstr@PLT
	test	rax, rax
	jne	.L100
	mov	rax, QWORD PTR -2216[rbp]
	lea	rsi, .LC28[rip]
	mov	rdi, rax
	call	strstr@PLT
	test	rax, rax
	jne	.L100
	cmp	DWORD PTR -2256[rbp], 1023
	jle	.L101
.L100:
	mov	rax, QWORD PTR -2216[rbp]
	mov	rdi, rax
	call	free@PLT
	nop
	mov	rdx, QWORD PTR -2232[rbp]
	lea	rax, -2064[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	parse_request
	mov	DWORD PTR -2252[rbp], eax
	jmp	.L107
.L101:
	mov	rax, QWORD PTR -2216[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	eax, 1024
	sub	eax, DWORD PTR -2256[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -2256[rbp]
	cdqe
	lea	rcx, -2064[rbp]
	lea	rsi, [rcx+rax]
	mov	eax, DWORD PTR -2260[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	recv@PLT
	mov	DWORD PTR -2248[rbp], eax
	cmp	DWORD PTR -2248[rbp], 0
	jg	.L103
	cmp	DWORD PTR -2248[rbp], 0
	jne	.L104
	mov	eax, DWORD PTR -2260[rbp]
	mov	edi, eax
	call	close@PLT
	jmp	.L99
.L104:
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 11
	jne	.L105
	mov	DWORD PTR -2252[rbp], 408
	jmp	.L107
.L105:
	mov	DWORD PTR -2252[rbp], 500
	lea	rdi, .LC29[rip]
	call	perror@PLT
	jmp	.L107
.L103:
	mov	eax, DWORD PTR -2248[rbp]
	add	DWORD PTR -2256[rbp], eax
	jmp	.L108
.L107:
	mov	eax, DWORD PTR -2252[rbp]
	mov	edi, eax
	call	status_to_str
	mov	rsi, rax
	mov	rax, QWORD PTR -2232[rbp]
	mov	edx, DWORD PTR 1032[rax]
	mov	ecx, DWORD PTR -2252[rbp]
	lea	rax, -2064[rbp]
	mov	r8, rsi
	lea	rsi, .LC30[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	DWORD PTR -2248[rbp], eax
	mov	eax, DWORD PTR -2248[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -2260[rbp]
	lea	rsi, -2064[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	lea	rax, -2240[rbp]
	mov	rdi, rax
	call	time@PLT
	lea	rax, -2240[rbp]
	mov	rdi, rax
	call	gmtime@PLT
	mov	rdx, rax
	lea	rax, -1040[rbp]
	mov	rcx, rdx
	lea	rdx, .LC31[rip]
	mov	esi, 1024
	mov	rdi, rax
	call	strftime@PLT
	mov	DWORD PTR -2248[rbp], eax
	mov	eax, DWORD PTR -2248[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -2260[rbp]
	lea	rsi, -1040[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	cmp	DWORD PTR -2252[rbp], 200
	jne	.L109
	mov	rax, QWORD PTR -2232[rbp]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jne	.L109
	mov	rax, QWORD PTR -2232[rbp]
	lea	rdx, 4[rax]
	lea	rax, -2208[rbp]
	mov	rsi, rax
	mov	rdi, rdx
	call	stat@PLT
	mov	rax, QWORD PTR -2160[rbp]
	mov	edx, eax
	lea	rax, -2064[rbp]
	lea	rsi, .LC32[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	DWORD PTR -2248[rbp], eax
	mov	eax, DWORD PTR -2248[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -2260[rbp]
	lea	rsi, -2064[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	mov	rax, QWORD PTR -2232[rbp]
	mov	eax, DWORD PTR 1028[rax]
	mov	edi, eax
	call	type_to_str
	mov	rdx, rax
	lea	rax, -2064[rbp]
	lea	rsi, .LC33[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	DWORD PTR -2248[rbp], eax
	mov	eax, DWORD PTR -2248[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -2260[rbp]
	lea	rsi, -2064[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
.L109:
	mov	eax, DWORD PTR -2260[rbp]
	mov	ecx, 0
	mov	edx, 2
	lea	rsi, .LC34[rip]
	mov	edi, eax
	call	send@PLT
	cmp	DWORD PTR -2252[rbp], 200
	jne	.L110
	mov	rax, QWORD PTR -2232[rbp]
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	jne	.L110
	mov	rax, QWORD PTR -2232[rbp]
	add	rax, 4
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -2244[rbp], eax
	cmp	DWORD PTR -2244[rbp], 0
	jns	.L112
	lea	rdi, .LC35[rip]
	call	perror@PLT
	jmp	.L112
.L113:
	mov	eax, DWORD PTR -2248[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -2260[rbp]
	lea	rsi, -2064[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	test	rax, rax
	jns	.L112
	lea	rdi, .LC36[rip]
	call	perror@PLT
.L112:
	lea	rcx, -2064[rbp]
	mov	eax, DWORD PTR -2244[rbp]
	mov	edx, 1024
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -2248[rbp], eax
	cmp	DWORD PTR -2248[rbp], 0
	jg	.L113
	mov	eax, DWORD PTR -2244[rbp]
	mov	edi, eax
	call	close@PLT
.L110:
	mov	rax, QWORD PTR -2232[rbp]
	mov	eax, DWORD PTR 1032[rax]
	test	eax, eax
	je	.L114
	cmp	DWORD PTR -2252[rbp], 200
	je	.L115
.L114:
	mov	eax, DWORD PTR -2260[rbp]
	mov	edi, eax
	call	close@PLT
	jmp	.L116
.L115:
	mov	edx, DWORD PTR -2260[rbp]
	mov	rax, QWORD PTR -2224[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	enqueue
.L116:
	jmp	.L99
	.cfi_endproc
.LFE23:
	.size	worker_routine, .-worker_routine
	.section	.rodata
.LC37:
	.string	"accept"
	.text
	.globl	greeter_routine
	.type	greeter_routine, @function
greeter_routine:
.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, 96
	mov	QWORD PTR -88[rbp], rdi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -88[rbp]
	mov	QWORD PTR -64[rbp], rax
	mov	rax, QWORD PTR -64[rbp]
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -76[rbp], eax
	mov	rax, QWORD PTR -64[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -56[rbp], rax
.L122:
	mov	DWORD PTR -80[rbp], 16
	lea	rdx, -80[rbp]
	lea	rcx, -32[rbp]
	mov	eax, DWORD PTR -76[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -72[rbp], eax
	cmp	DWORD PTR -72[rbp], 0
	jns	.L119
	lea	rdi, .LC37[rip]
	call	perror@PLT
	jmp	.L122
.L119:
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 40[rax]
	mov	DWORD PTR -68[rbp], eax
	mov	QWORD PTR -48[rbp], 10
	cmp	DWORD PTR -68[rbp], 0
	jle	.L121
	mov	rcx, QWORD PTR -48[rbp]
	mov	eax, DWORD PTR -68[rbp]
	movsx	rdx, eax
	imul	rdx, rdx, 1374389535
	shr	rdx, 32
	sar	edx, 4
	sar	eax, 31
	mov	esi, eax
	mov	eax, edx
	sub	eax, esi
	cdqe
	add	rax, rcx
	mov	QWORD PTR -48[rbp], rax
.L121:
	lea	rdx, -48[rbp]
	mov	eax, DWORD PTR -72[rbp]
	mov	r8d, 16
	mov	rcx, rdx
	mov	edx, 20
	mov	esi, 1
	mov	edi, eax
	call	setsockopt@PLT
	mov	edx, DWORD PTR -72[rbp]
	mov	rax, QWORD PTR -56[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	enqueue
	jmp	.L122
	.cfi_endproc
.LFE24:
	.size	greeter_routine, .-greeter_routine
	.section	.rodata
.LC38:
	.string	"/resources"
.LC39:
	.string	"getcwd"
	.text
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 1160
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	mov	edi, 84
	call	sysconf@PLT
	mov	rdx, rax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	lea	rdx, -1[rax]
	mov	QWORD PTR -1152[rbp], rdx
	mov	rdx, rax
	mov	QWORD PTR -1184[rbp], rdx
	mov	QWORD PTR -1176[rbp], 0
	mov	rdx, rax
	mov	QWORD PTR -1200[rbp], rdx
	mov	QWORD PTR -1192[rbp], 0
	lea	rdx, 0[0+rax*8]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	esi, 16
	mov	edx, 0
	div	rsi
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L125:
	cmp	rsp, rdx
	je	.L126
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L125
.L126:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L127
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L127:
	mov	rax, rsp
	add	rax, 7
	shr	rax, 3
	sal	rax, 3
	mov	QWORD PTR -1144[rbp], rax
	mov	edi, 84
	call	sysconf@PLT
	mov	rdx, rax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	lea	rdx, -1[rax]
	mov	QWORD PTR -1136[rbp], rdx
	mov	rdx, rax
	mov	r14, rdx
	mov	r15d, 0
	mov	rdx, rax
	mov	r12, rdx
	mov	r13d, 0
	lea	rdx, 0[0+rax*8]
	mov	eax, 16
	sub	rax, 1
	add	rax, rdx
	mov	ebx, 16
	mov	edx, 0
	div	rbx
	imul	rax, rax, 16
	mov	rcx, rax
	and	rcx, -4096
	mov	rdx, rsp
	sub	rdx, rcx
.L128:
	cmp	rsp, rdx
	je	.L129
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	jmp	.L128
.L129:
	mov	rdx, rax
	and	edx, 4095
	sub	rsp, rdx
	mov	rdx, rax
	and	edx, 4095
	test	rdx, rdx
	je	.L130
	and	eax, 4095
	sub	rax, 8
	add	rax, rsp
	or	QWORD PTR [rax], 0
.L130:
	mov	rax, rsp
	add	rax, 7
	shr	rax, 3
	sal	rax, 3
	mov	QWORD PTR -1128[rbp], rax
	lea	rax, .LC38[rip]
	mov	QWORD PTR -1120[rbp], rax
	lea	rax, -1088[rbp]
	mov	esi, 1016
	mov	rdi, rax
	call	getcwd@PLT
	test	rax, rax
	jne	.L131
	lea	rdi, .LC39[rip]
	call	perror@PLT
.L131:
	mov	rdx, QWORD PTR -1120[rbp]
	lea	rax, -1088[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcat@PLT
	mov	QWORD PTR DOCUMENT_ROOT[rip], rax
	mov	edi, 48
	call	malloc@PLT
	mov	QWORD PTR -1112[rbp], rax
	mov	rax, QWORD PTR -1112[rbp]
	mov	rdi, rax
	call	queue_init
	mov	eax, 0
	call	listening_socket
	mov	DWORD PTR -1156[rbp], eax
	mov	eax, DWORD PTR -1156[rbp]
	mov	DWORD PTR -1104[rbp], eax
	mov	rax, QWORD PTR -1112[rbp]
	mov	QWORD PTR -1096[rbp], rax
	mov	DWORD PTR -1160[rbp], 0
	jmp	.L132
.L133:
	mov	eax, DWORD PTR -1160[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -1128[rbp]
	lea	rdi, [rdx+rax]
	lea	rax, -1104[rbp]
	mov	rcx, rax
	lea	rdx, greeter_routine[rip]
	mov	esi, 0
	call	pthread_create@PLT
	add	DWORD PTR -1160[rbp], 1
.L132:
	mov	eax, DWORD PTR -1160[rbp]
	movsx	rbx, eax
	mov	edi, 84
	call	sysconf@PLT
	mov	rdx, rax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	cmp	rbx, rax
	jl	.L133
	mov	DWORD PTR -1164[rbp], 0
	jmp	.L134
.L135:
	mov	eax, DWORD PTR -1164[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -1144[rbp]
	lea	rdi, [rdx+rax]
	mov	rax, QWORD PTR -1112[rbp]
	mov	rcx, rax
	lea	rdx, worker_routine[rip]
	mov	esi, 0
	call	pthread_create@PLT
	add	DWORD PTR -1164[rbp], 1
.L134:
	mov	eax, DWORD PTR -1164[rbp]
	movsx	rbx, eax
	mov	edi, 84
	call	sysconf@PLT
	mov	rdx, rax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	cmp	rbx, rax
	jl	.L135
	mov	edi, 0
	call	pthread_exit@PLT
	.cfi_endproc
.LFE25:
	.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	"242329886.c"
	.text
	.global	PORT
	.section	.rodata
	.align	2
	.type	PORT, %object
	.size	PORT, 4
PORT:
	.word	9000
	.comm	DOCUMENT_ROOT,4,4
	.text
	.align	2
	.global	queue_init
	.syntax unified
	.arm
	.fpu softvfp
	.type	queue_init, %function
queue_init:
	@ 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, #-24]
	mov	r0, #8
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	beq	.L15
	mov	r0, #24
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L16
	mov	r0, #24
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L17
	mov	r0, #48
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L18
	mov	r1, #0
	ldr	r0, [fp, #-16]
	bl	pthread_mutex_init
	mov	r3, r0
	cmp	r3, #0
	bne	.L19
	mov	r1, #0
	ldr	r0, [fp, #-12]
	bl	pthread_mutex_init
	mov	r3, r0
	cmp	r3, #0
	bne	.L19
	ldr	r3, [fp, #-20]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-20]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-24]
	str	r2, [r3]
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-16]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-12]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-8]
	str	r2, [r3, #16]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #16]
	mov	r1, #0
	mov	r0, r3
	bl	pthread_cond_init
	ldr	r3, [fp, #-24]
	mov	r2, #0
	str	r2, [r3, #20]
	b	.L14
.L19:
	nop
.L12:
	ldr	r0, [fp, #-8]
	bl	free
	b	.L9
.L18:
	nop
.L9:
	ldr	r0, [fp, #-12]
	bl	free
	b	.L7
.L17:
	nop
.L7:
	ldr	r0, [fp, #-16]
	bl	free
	b	.L5
.L16:
	nop
.L5:
	ldr	r0, [fp, #-20]
	bl	free
	b	.L3
.L15:
	nop
.L3:
	mov	r0, #1
	bl	exit
.L14:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	queue_init, .-queue_init
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	enqueue, %function
enqueue:
	@ 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]
	mov	r0, #8
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-20]
	str	r2, [r3]
	ldr	r3, [fp, #-8]
	mov	r2, #0
	str	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #12]
	mov	r0, r3
	bl	pthread_mutex_lock
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #4]
	ldr	r2, [fp, #-8]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-8]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #20]
	add	r2, r3, #1
	ldr	r3, [fp, #-16]
	str	r2, [r3, #20]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #16]
	mov	r0, r3
	bl	pthread_cond_signal
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #12]
	mov	r0, r3
	bl	pthread_mutex_unlock
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	enqueue, .-enqueue
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	dequeue, %function
dequeue:
	@ 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, #8]
	mov	r0, r3
	bl	pthread_mutex_lock
	b	.L22
.L23:
	ldr	r3, [fp, #-16]
	ldr	r2, [r3, #16]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	mov	r1, r3
	mov	r0, r2
	bl	pthread_cond_wait
.L22:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r3, [r3, #4]
	cmp	r3, #0
	beq	.L23
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #4]
	ldr	r2, [r3]
	ldr	r3, [fp, #-20]
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-16]
	str	r2, [r3]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #20]
	sub	r2, r3, #1
	ldr	r3, [fp, #-16]
	str	r2, [r3, #20]
	ldr	r3, [fp, #-16]
	ldr	r3, [r3, #8]
	mov	r0, r3
	bl	pthread_mutex_unlock
	ldr	r0, [fp, #-8]
	bl	free
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	dequeue, .-dequeue
	.section	.rodata
	.align	2
.LC0:
	.ascii	"application\000"
	.align	2
.LC1:
	.ascii	"audio\000"
	.align	2
.LC2:
	.ascii	"image\000"
	.align	2
.LC3:
	.ascii	"message\000"
	.align	2
.LC4:
	.ascii	"multipart\000"
	.align	2
.LC5:
	.ascii	"text\000"
	.align	2
.LC6:
	.ascii	"video\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	type_to_str, %function
type_to_str:
	@ 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, [fp, #-8]
	cmp	r3, #6
	ldrls	pc, [pc, r3, asl #2]
	b	.L25
.L27:
	.word	.L33
	.word	.L32
	.word	.L31
	.word	.L30
	.word	.L29
	.word	.L28
	.word	.L26
.L33:
	ldr	r3, .L35
	b	.L34
.L32:
	ldr	r3, .L35+4
	b	.L34
.L31:
	ldr	r3, .L35+8
	b	.L34
.L30:
	ldr	r3, .L35+12
	b	.L34
.L29:
	ldr	r3, .L35+16
	b	.L34
.L28:
	ldr	r3, .L35+20
	b	.L34
.L26:
	ldr	r3, .L35+24
	b	.L34
.L25:
	mov	r3, #0
.L34:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L36:
	.align	2
.L35:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	type_to_str, .-type_to_str
	.section	.rodata
	.align	2
.LC7:
	.ascii	"OK\000"
	.align	2
.LC8:
	.ascii	"Bad Request\000"
	.align	2
.LC9:
	.ascii	"Forbidden\000"
	.align	2
.LC10:
	.ascii	"Not Found\000"
	.align	2
.LC11:
	.ascii	"Request Timeout\000"
	.align	2
.LC12:
	.ascii	"Request Entity Too Large\000"
	.align	2
.LC13:
	.ascii	"Internal Server Error\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	status_to_str, %function
status_to_str:
	@ 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, [fp, #-8]
	cmp	r3, #200
	beq	.L38
	ldr	r3, [fp, #-8]
	cmp	r3, #200
	blt	.L39
	ldr	r3, [fp, #-8]
	ldr	r2, .L47
	cmp	r3, r2
	bgt	.L39
	ldr	r3, [fp, #-8]
	cmp	r3, #400
	blt	.L39
	ldr	r3, [fp, #-8]
	sub	r3, r3, #400
	cmp	r3, #13
	ldrls	pc, [pc, r3, asl #2]
	b	.L39
.L41:
	.word	.L45
	.word	.L39
	.word	.L39
	.word	.L44
	.word	.L43
	.word	.L39
	.word	.L39
	.word	.L39
	.word	.L42
	.word	.L39
	.word	.L39
	.word	.L39
	.word	.L39
	.word	.L40
.L38:
	ldr	r3, .L47+4
	b	.L46
.L45:
	ldr	r3, .L47+8
	b	.L46
.L44:
	ldr	r3, .L47+12
	b	.L46
.L43:
	ldr	r3, .L47+16
	b	.L46
.L42:
	ldr	r3, .L47+20
	b	.L46
.L40:
	ldr	r3, .L47+24
	b	.L46
.L39:
	ldr	r3, .L47+28
.L46:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L48:
	.align	2
.L47:
	.word	413
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.size	status_to_str, .-status_to_str
	.section	.rodata
	.align	2
.LC14:
	.ascii	" \011\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	strsep_whitespace, %function
strsep_whitespace:
	@ 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, .L54
	ldr	r0, [fp, #-16]
	bl	strsep
	str	r0, [fp, #-8]
	b	.L50
.L52:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, [fp, #-16]
	str	r2, [r3]
.L50:
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L51
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #32
	beq	.L52
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #9
	beq	.L52
.L51:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L55:
	.align	2
.L54:
	.word	.LC14
	.size	strsep_whitespace, .-strsep_whitespace
	.section	.rodata
	.align	2
.LC15:
	.ascii	"\012\000"
	.align	2
.LC16:
	.ascii	"\015\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	strsep_newline, %function
strsep_newline:
	@ 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, #-24]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	mov	r1, #13
	mov	r0, r3
	bl	strchr
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	mov	r1, #10
	mov	r0, r3
	bl	strchr
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	beq	.L57
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	bcs	.L58
.L57:
	ldr	r1, .L61
	ldr	r0, [fp, #-24]
	bl	strsep
	str	r0, [fp, #-16]
	b	.L59
.L58:
	ldr	r1, .L61+4
	ldr	r0, [fp, #-24]
	bl	strsep
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r3, [fp, #-24]
	str	r2, [r3]
.L59:
	ldr	r3, [fp, #-16]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L62:
	.align	2
.L61:
	.word	.LC15
	.word	.LC16
	.size	strsep_newline, .-strsep_newline
	.section	.rodata
	.align	2
.LC17:
	.ascii	"GET\000"
	.align	2
.LC18:
	.ascii	"HEAD\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	parse_method, %function
parse_method:
	@ 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	r1, .L68
	ldr	r0, [fp, #-8]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L64
	ldr	r3, [fp, #-12]
	mov	r2, #0
	str	r2, [r3]
	b	.L65
.L64:
	ldr	r1, .L68+4
	ldr	r0, [fp, #-8]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L66
	ldr	r3, [fp, #-12]
	mov	r2, #1
	str	r2, [r3]
	b	.L65
.L66:
	mov	r3, #400
	b	.L67
.L65:
	mov	r3, #200
.L67:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L69:
	.align	2
.L68:
	.word	.LC17
	.word	.LC18
	.size	parse_method, .-parse_method
	.section	.rodata
	.align	2
.LC19:
	.ascii	"/\000"
	.align	2
.LC20:
	.ascii	"/index.html\000"
	.align	2
.LC21:
	.ascii	"%s/index.html\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	parse_path, %function
parse_path:
	@ 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	r1, .L74
	ldr	r0, [fp, #-8]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L71
	ldr	r1, .L74+4
	ldr	r0, [fp, #-8]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L72
.L71:
	ldr	r3, [fp, #-12]
	add	r0, r3, #4
	ldr	r3, .L74+8
	ldr	r3, [r3]
	ldr	r2, .L74+12
	mov	r1, #1024
	bl	snprintf
	ldr	r3, [fp, #-12]
	mov	r2, #5
	str	r2, [r3, #1028]
	mov	r3, #200
	b	.L73
.L72:
	mov	r3, #404
.L73:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L75:
	.align	2
.L74:
	.word	.LC19
	.word	.LC20
	.word	DOCUMENT_ROOT
	.word	.LC21
	.size	parse_path, .-parse_path
	.section	.rodata
	.align	2
.LC22:
	.ascii	"HTTP/1.0\000"
	.align	2
.LC23:
	.ascii	"HTTP/1.1\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	parse_protocol_version, %function
parse_protocol_version:
	@ 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	r1, .L81
	ldr	r0, [fp, #-8]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L77
	ldr	r3, [fp, #-12]
	mov	r2, #0
	str	r2, [r3, #1032]
	b	.L78
.L77:
	ldr	r1, .L81+4
	ldr	r0, [fp, #-8]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L79
	ldr	r3, [fp, #-12]
	mov	r2, #1
	str	r2, [r3, #1032]
	b	.L78
.L79:
	mov	r3, #400
	b	.L80
.L78:
	mov	r3, #200
.L80:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L82:
	.align	2
.L81:
	.word	.LC22
	.word	.LC23
	.size	parse_protocol_version, .-parse_protocol_version
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	parse_initial_line, %function
parse_initial_line:
	@ 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, #-24]
	str	r1, [fp, #-28]
	sub	r3, fp, #24
	mov	r0, r3
	bl	strsep_whitespace
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L84
	mov	r3, #400
	b	.L85
.L84:
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-20]
	bl	parse_method
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #200
	beq	.L86
	ldr	r3, [fp, #-16]
	b	.L85
.L86:
	sub	r3, fp, #24
	mov	r0, r3
	bl	strsep_whitespace
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L87
	mov	r3, #400
	b	.L85
.L87:
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-20]
	bl	parse_path
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #200
	beq	.L88
	ldr	r3, [fp, #-12]
	b	.L85
.L88:
	sub	r3, fp, #24
	mov	r0, r3
	bl	strsep_whitespace
	str	r0, [fp, #-20]
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bne	.L89
	mov	r3, #400
	b	.L85
.L89:
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-20]
	bl	parse_protocol_version
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #200
	beq	.L90
	ldr	r3, [fp, #-8]
	b	.L85
.L90:
	mov	r3, #200
.L85:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	parse_initial_line, .-parse_initial_line
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	parse_header, %function
parse_header:
	@ 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]
	str	r1, [fp, #-12]
	mov	r3, #200
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	parse_header, .-parse_header
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	parse_request, %function
parse_request:
	@ 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, #-24]
	str	r1, [fp, #-28]
	sub	r3, fp, #24
	mov	r0, r3
	bl	strsep_newline
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bne	.L94
	mov	r3, #400
	b	.L95
.L94:
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-16]
	bl	parse_initial_line
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #200
	beq	.L97
	ldr	r3, [fp, #-12]
	b	.L95
.L99:
	ldr	r1, [fp, #-28]
	ldr	r0, [fp, #-16]
	bl	parse_header
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #200
	beq	.L97
	ldr	r3, [fp, #-8]
	b	.L95
.L97:
	sub	r3, fp, #24
	mov	r0, r3
	bl	strsep_newline
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L98
	ldr	r3, [fp, #-16]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L99
.L98:
	mov	r3, #200
.L95:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	parse_request, .-parse_request
	.section	.rodata
	.align	2
.LC24:
	.ascii	"Socket error!\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	socket_, %function
socket_:
	@ 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	r2, [fp, #-24]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	socket
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L101
	ldr	r3, .L103
	ldr	r3, [r3]
	mov	r2, #14
	mov	r1, #1
	ldr	r0, .L103+4
	bl	fwrite
	mov	r0, #1
	bl	exit
.L101:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L104:
	.align	2
.L103:
	.word	stderr
	.word	.LC24
	.size	socket_, .-socket_
	.section	.rodata
	.align	2
.LC25:
	.ascii	"bind_\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	bind_, %function
bind_:
	@ 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	r2, [fp, #-24]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	bind
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L106
	ldr	r0, .L108
	bl	perror
	mov	r0, #1
	bl	exit
.L106:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L109:
	.align	2
.L108:
	.word	.LC25
	.size	bind_, .-bind_
	.section	.rodata
	.align	2
.LC26:
	.ascii	"Listen error!\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	listen_, %function
listen_:
	@ 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	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	listen
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L111
	ldr	r3, .L113
	ldr	r3, [r3]
	mov	r2, #14
	mov	r1, #1
	ldr	r0, .L113+4
	bl	fwrite
	mov	r0, #1
	bl	exit
.L111:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L114:
	.align	2
.L113:
	.word	stderr
	.word	.LC26
	.size	listen_, .-listen_
	.section	.rodata
	.align	2
.LC27:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	listening_socket, %function
listening_socket:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r3, .L118
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	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, .L118+4
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	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]
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket_
	str	r0, [fp, #-28]
	sub	r3, fp, #24
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-28]
	bl	bind_
	mov	r1, #1024
	ldr	r0, [fp, #-28]
	bl	listen_
	ldr	r3, [fp, #-28]
	ldr	r2, .L118
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L117
	bl	__stack_chk_fail
.L117:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L119:
	.align	2
.L118:
	.word	.LC27
	.word	9000
	.size	listening_socket, .-listening_socket
	.section	.rodata
	.align	2
.LC28:
	.ascii	"\015\012\015\012\000"
	.align	2
.LC29:
	.ascii	"\012\012\000"
	.align	2
.LC30:
	.ascii	"recv\000"
	.align	2
.LC31:
	.ascii	"HTTP/1.%d %d %s\015\012\000"
	.align	2
.LC32:
	.ascii	"Date: %a, %d %b %Y %H:%M:%S GMT\015\012\000"
	.align	2
.LC33:
	.ascii	"Content-Length: %d\015\012\000"
	.align	2
.LC34:
	.ascii	"Content-Type: %s\015\012\000"
	.align	2
.LC35:
	.ascii	"\015\012\000"
	.align	2
.LC36:
	.ascii	"open\000"
	.align	2
.LC37:
	.ascii	"sending file\000"
	.align	2
.LC38:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	worker_routine, %function
worker_routine:
	@ args = 0, pretend = 0, frame = 2192
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #2192
	sub	sp, sp, #12
	str	r0, [fp, #-2200]
	ldr	r3, .L140
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	bl	pthread_self
	mov	r3, r0
	mov	r0, r3
	bl	pthread_detach
	ldr	r0, .L140+4
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-2176]
	ldr	r3, [fp, #-2200]
	str	r3, [fp, #-2172]
.L121:
	sub	r3, fp, #2176
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-2172]
	bl	dequeue
	sub	r3, fp, #2048
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #0
	str	r3, [fp, #-2184]
.L130:
	ldr	r2, [fp, #-2184]
	sub	r3, fp, #2048
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r2
	mov	r0, r3
	bl	strndup
	mov	r3, r0
	str	r3, [fp, #-2168]
	ldr	r1, .L140+8
	ldr	r0, [fp, #-2168]
	bl	strstr
	mov	r3, r0
	cmp	r3, #0
	bne	.L122
	ldr	r1, .L140+12
	ldr	r0, [fp, #-2168]
	bl	strstr
	mov	r3, r0
	cmp	r3, #0
	bne	.L122
	ldr	r3, [fp, #-2184]
	cmp	r3, #1024
	blt	.L123
.L122:
	ldr	r0, [fp, #-2168]
	bl	free
	nop
	sub	r3, fp, #2048
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r1, [fp, #-2176]
	mov	r0, r3
	bl	parse_request
	str	r0, [fp, #-2180]
	b	.L129
.L123:
	ldr	r0, [fp, #-2168]
	bl	free
	ldr	r0, [fp, #-2192]
	ldr	r2, [fp, #-2184]
	sub	r3, fp, #2048
	sub	r3, r3, #12
	sub	r3, r3, #4
	add	r1, r3, r2
	ldr	r3, [fp, #-2184]
	rsb	r3, r3, #1024
	mov	r2, r3
	mov	r3, #0
	bl	recv
	str	r0, [fp, #-2164]
	ldr	r3, [fp, #-2164]
	cmp	r3, #0
	bgt	.L125
	ldr	r3, [fp, #-2164]
	cmp	r3, #0
	bne	.L126
	ldr	r3, [fp, #-2192]
	mov	r0, r3
	bl	close
	b	.L121
.L126:
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #11
	bne	.L127
	mov	r3, #408
	str	r3, [fp, #-2180]
	b	.L129
.L127:
	mov	r3, #500
	str	r3, [fp, #-2180]
	ldr	r0, .L140+16
	bl	perror
	b	.L129
.L125:
	ldr	r2, [fp, #-2184]
	ldr	r3, [fp, #-2164]
	add	r3, r2, r3
	str	r3, [fp, #-2184]
	b	.L130
.L129:
	ldr	r3, [fp, #-2176]
	ldr	r4, [r3, #1032]
	ldr	r0, [fp, #-2180]
	bl	status_to_str
	mov	r3, r0
	sub	r0, fp, #2048
	sub	r0, r0, #12
	sub	r0, r0, #4
	str	r3, [sp]
	ldr	r3, [fp, #-2180]
	mov	r2, r4
	ldr	r1, .L140+20
	bl	sprintf
	str	r0, [fp, #-2164]
	ldr	r0, [fp, #-2192]
	ldr	r2, [fp, #-2164]
	sub	r1, fp, #2048
	sub	r1, r1, #12
	sub	r1, r1, #4
	mov	r3, #0
	bl	send
	sub	r3, fp, #2176
	sub	r3, r3, #12
	mov	r0, r3
	bl	time
	sub	r3, fp, #2176
	sub	r3, r3, #12
	mov	r0, r3
	bl	gmtime
	mov	r3, r0
	sub	r0, fp, #1024
	sub	r0, r0, #12
	sub	r0, r0, #4
	ldr	r2, .L140+24
	mov	r1, #1024
	bl	strftime
	mov	r3, r0
	str	r3, [fp, #-2164]
	ldr	r0, [fp, #-2192]
	ldr	r2, [fp, #-2164]
	sub	r1, fp, #1024
	sub	r1, r1, #12
	sub	r1, r1, #4
	mov	r3, #0
	bl	send
	ldr	r3, [fp, #-2180]
	cmp	r3, #200
	bne	.L131
	ldr	r3, [fp, #-2176]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L131
	ldr	r3, [fp, #-2176]
	add	r3, r3, #4
	sub	r2, fp, #2144
	sub	r2, r2, #12
	mov	r1, r2
	mov	r0, r3
	bl	stat
	ldr	r2, [fp, #-2112]
	sub	r3, fp, #2048
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r1, .L140+28
	mov	r0, r3
	bl	sprintf
	str	r0, [fp, #-2164]
	ldr	r0, [fp, #-2192]
	ldr	r2, [fp, #-2164]
	sub	r1, fp, #2048
	sub	r1, r1, #12
	sub	r1, r1, #4
	mov	r3, #0
	bl	send
	ldr	r3, [fp, #-2176]
	ldr	r3, [r3, #1028]
	mov	r0, r3
	bl	type_to_str
	mov	r2, r0
	sub	r3, fp, #2048
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r1, .L140+32
	mov	r0, r3
	bl	sprintf
	str	r0, [fp, #-2164]
	ldr	r0, [fp, #-2192]
	ldr	r2, [fp, #-2164]
	sub	r1, fp, #2048
	sub	r1, r1, #12
	sub	r1, r1, #4
	mov	r3, #0
	bl	send
.L131:
	ldr	r0, [fp, #-2192]
	mov	r3, #0
	mov	r2, #2
	ldr	r1, .L140+36
	bl	send
	ldr	r3, [fp, #-2180]
	cmp	r3, #200
	bne	.L132
	ldr	r3, [fp, #-2176]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L132
	ldr	r3, [fp, #-2176]
	add	r3, r3, #4
	mov	r1, #0
	mov	r0, r3
	bl	open
	str	r0, [fp, #-2160]
	ldr	r3, [fp, #-2160]
	cmp	r3, #0
	bge	.L134
	ldr	r0, .L140+40
	bl	perror
	b	.L134
.L135:
	ldr	r0, [fp, #-2192]
	ldr	r2, [fp, #-2164]
	sub	r1, fp, #2048
	sub	r1, r1, #12
	sub	r1, r1, #4
	mov	r3, #0
	bl	send
	mov	r3, r0
	cmp	r3, #0
	bge	.L134
	ldr	r0, .L140+44
	bl	perror
.L134:
	sub	r3, fp, #2048
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, r3
	ldr	r0, [fp, #-2160]
	bl	read
	str	r0, [fp, #-2164]
	ldr	r3, [fp, #-2164]
	cmp	r3, #0
	bgt	.L135
	ldr	r0, [fp, #-2160]
	bl	close
.L132:
	ldr	r3, [fp, #-2176]
	ldr	r3, [r3, #1032]
	cmp	r3, #0
	beq	.L136
	ldr	r3, [fp, #-2180]
	cmp	r3, #200
	beq	.L137
.L136:
	ldr	r3, [fp, #-2192]
	mov	r0, r3
	bl	close
	b	.L138
.L137:
	ldr	r3, [fp, #-2192]
	mov	r1, r3
	ldr	r0, [fp, #-2172]
	bl	enqueue
.L138:
	b	.L121
.L141:
	.align	2
.L140:
	.word	.LC38
	.word	1036
	.word	.LC28
	.word	.LC29
	.word	.LC30
	.word	.LC31
	.word	.LC32
	.word	.LC33
	.word	.LC34
	.word	.LC35
	.word	.LC36
	.word	.LC37
	.size	worker_routine, .-worker_routine
	.section	.rodata
	.align	2
.LC39:
	.ascii	"accept\000"
	.align	2
.LC40:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	greeter_routine
	.syntax unified
	.arm
	.fpu softvfp
	.type	greeter_routine, %function
greeter_routine:
	@ args = 0, pretend = 0, frame = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #72
	str	r0, [fp, #-64]
	ldr	r3, .L148
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-64]
	str	r3, [fp, #-52]
	ldr	r3, [fp, #-52]
	ldr	r3, [r3]
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-52]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-44]
.L146:
	mov	r3, #16
	str	r3, [fp, #-56]
	sub	r2, fp, #56
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, [fp, #-48]
	bl	accept
	str	r0, [fp, #-40]
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	bge	.L143
	ldr	r0, .L148+4
	bl	perror
	b	.L146
.L143:
	ldr	r3, [fp, #-44]
	ldr	r3, [r3, #20]
	str	r3, [fp, #-36]
	mov	r3, #10
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	ble	.L145
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-36]
	ldr	r1, .L148+8
	smull	r0, r1, r3, r1
	asr	r1, r1, #4
	asr	r3, r3, #31
	sub	r3, r1, r3
	add	r3, r2, r3
	str	r3, [fp, #-32]
.L145:
	sub	r3, fp, #32
	mov	r2, #8
	str	r2, [sp]
	mov	r2, #20
	mov	r1, #1
	ldr	r0, [fp, #-40]
	bl	setsockopt
	ldr	r1, [fp, #-40]
	ldr	r0, [fp, #-44]
	bl	enqueue
	b	.L146
.L149:
	.align	2
.L148:
	.word	.LC40
	.word	.LC39
	.word	1374389535
	.size	greeter_routine, .-greeter_routine
	.section	.rodata
	.align	2
.LC41:
	.ascii	"/resources\000"
	.align	2
.LC42:
	.ascii	"getcwd\000"
	.align	2
.LC43:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1072
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1072
	ldr	r3, .L157
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r0, #84
	bl	sysconf
	mov	r2, r0
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	ip, r3
	sub	r3, ip, #1
	str	r3, [fp, #-1068]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	lsl	r3, r3, #2
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #3
	lsr	r3, r3, #2
	lsl	r3, r3, #2
	str	r3, [fp, #-1064]
	mov	r0, #84
	bl	sysconf
	mov	r2, r0
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	ip, r3
	sub	r3, ip, #1
	str	r3, [fp, #-1060]
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	mov	r0, r3
	mov	r1, #0
	mov	r2, #0
	mov	r3, #0
	lsl	r3, r1, #5
	orr	r3, r3, r0, lsr #27
	lsl	r2, r0, #5
	mov	r3, ip
	lsl	r3, r3, #2
	add	r3, r3, #7
	lsr	r3, r3, #3
	lsl	r3, r3, #3
	sub	sp, sp, r3
	mov	r3, sp
	add	r3, r3, #3
	lsr	r3, r3, #2
	lsl	r3, r3, #2
	str	r3, [fp, #-1056]
	ldr	r3, .L157+4
	str	r3, [fp, #-1052]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, #1020
	mov	r0, r3
	bl	getcwd
	mov	r3, r0
	cmp	r3, #0
	bne	.L151
	ldr	r0, .L157+8
	bl	perror
.L151:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, [fp, #-1052]
	mov	r0, r3
	bl	strcat
	mov	r3, r0
	ldr	r2, .L157+12
	str	r3, [r2]
	mov	r0, #24
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-1048]
	ldr	r0, [fp, #-1048]
	bl	queue_init
	bl	listening_socket
	str	r0, [fp, #-1044]
	ldr	r3, [fp, #-1044]
	str	r3, [fp, #-1040]
	ldr	r3, [fp, #-1048]
	str	r3, [fp, #-1036]
	mov	r3, #0
	str	r3, [fp, #-1072]
	b	.L152
.L153:
	ldr	r3, [fp, #-1072]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-1056]
	add	r0, r2, r3
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #12
	ldr	r2, .L157+16
	mov	r1, #0
	bl	pthread_create
	ldr	r3, [fp, #-1072]
	add	r3, r3, #1
	str	r3, [fp, #-1072]
.L152:
	mov	r0, #84
	bl	sysconf
	mov	r2, r0
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-1072]
	cmp	r3, r2
	blt	.L153
	mov	r3, #0
	str	r3, [fp, #-1076]
	b	.L154
.L155:
	ldr	r3, [fp, #-1076]
	lsl	r3, r3, #2
	ldr	r2, [fp, #-1064]
	add	r0, r2, r3
	ldr	r3, [fp, #-1048]
	ldr	r2, .L157+20
	mov	r1, #0
	bl	pthread_create
	ldr	r3, [fp, #-1076]
	add	r3, r3, #1
	str	r3, [fp, #-1076]
.L154:
	mov	r0, #84
	bl	sysconf
	mov	r2, r0
	mov	r3, r2
	lsl	r3, r3, #1
	add	r3, r3, r2
	lsl	r3, r3, #2
	mov	r2, r3
	ldr	r3, [fp, #-1076]
	cmp	r3, r2
	blt	.L155
	mov	r0, #0
	bl	pthread_exit
.L158:
	.align	2
.L157:
	.word	.LC43
	.word	.LC41
	.word	.LC42
	.word	DOCUMENT_ROOT
	.word	greeter_routine
	.word	worker_routine
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
