	.file	"106403.c"
	.intel_syntax noprefix
	.text
	.globl	error
	.type	error, @function
error:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	error, .-error
	.section	.rodata
.LC0:
	.string	"ERROR, no port provided\n"
.LC1:
	.string	"ERROR opening socket"
.LC2:
	.string	"ERROR on binding"
.LC3:
	.string	"ERROR on accept"
.LC4:
	.string	"ERROR reading from socket"
.LC5:
	.string	"./src/index.html"
.LC6:
	.string	"./src%s"
.LC7:
	.string	"rb"
.LC8:
	.string	"HTTP/1.1 404 Not Found\r\n"
	.align 8
.LC9:
	.string	"Server: Linux version 5.0.1 (Ubuntu 7.3.0-27ubuntu1~18.04)\r\n"
.LC10:
	.string	"./src/404.html"
.LC11:
	.string	"Content-Type: text/html\r\n"
.LC12:
	.string	"Content-Length: "
.LC13:
	.string	"%d"
.LC14:
	.string	"\r\n\r\n"
.LC15:
	.string	"HTTP/1.1 200 OK\r\n"
	.align 8
.LC16:
	.string	"Error while writing data to stream"
.LC17:
	.string	"ERROR writing to socket"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.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, 2248
	.cfi_offset 3, -24
	mov	DWORD PTR -2244[rbp], edi
	mov	QWORD PTR -2256[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -2244[rbp], 1
	jg	.L3
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 24
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -2220[rbp], eax
	cmp	DWORD PTR -2220[rbp], 0
	jns	.L4
	lea	rdi, .LC1[rip]
	call	error
.L4:
	lea	rax, -2144[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	rax, QWORD PTR -2256[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -2216[rbp], eax
	mov	WORD PTR -2144[rbp], 2
	mov	DWORD PTR -2140[rbp], 0
	mov	eax, DWORD PTR -2216[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -2142[rbp], ax
	lea	rcx, -2144[rbp]
	mov	eax, DWORD PTR -2220[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	jns	.L5
	lea	rdi, .LC2[rip]
	call	error
.L5:
	mov	eax, DWORD PTR -2220[rbp]
	mov	esi, 5
	mov	edi, eax
	call	listen@PLT
	mov	DWORD PTR -2236[rbp], 16
.L23:
	lea	rdx, -2236[rbp]
	lea	rcx, -2128[rbp]
	mov	eax, DWORD PTR -2220[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -2212[rbp], eax
	cmp	DWORD PTR -2212[rbp], 0
	jns	.L6
	lea	rdi, .LC3[rip]
	call	error
.L6:
	lea	rax, -2080[rbp]
	mov	edx, 1024
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rcx, -2080[rbp]
	mov	eax, DWORD PTR -2212[rbp]
	mov	edx, 1024
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -2208[rbp], eax
	cmp	DWORD PTR -2208[rbp], 0
	jns	.L7
	lea	rdi, .LC4[rip]
	call	error
.L7:
	lea	rax, -2080[rbp]
	mov	rdi, rax
	call	puts@PLT
	lea	rax, -2080[rbp]
	mov	esi, 47
	mov	rdi, rax
	call	strchr@PLT
	mov	QWORD PTR -2184[rbp], rax
	mov	rax, QWORD PTR -2184[rbp]
	mov	esi, 32
	mov	rdi, rax
	call	strchr@PLT
	mov	QWORD PTR -2176[rbp], rax
	mov	rax, QWORD PTR -2176[rbp]
	sub	rax, QWORD PTR -2184[rbp]
	mov	DWORD PTR -2204[rbp], eax
	mov	edi, 256
	call	malloc@PLT
	mov	QWORD PTR -2168[rbp], rax
	mov	eax, DWORD PTR -2204[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -2184[rbp]
	mov	rax, QWORD PTR -2168[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	strncpy@PLT
	mov	edi, 256
	call	malloc@PLT
	mov	QWORD PTR -2160[rbp], rax
	mov	rax, QWORD PTR -2168[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 47
	jne	.L8
	mov	rax, QWORD PTR -2168[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rax, 1
	jne	.L8
	mov	rax, QWORD PTR -2160[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	jmp	.L9
.L8:
	mov	rdx, QWORD PTR -2168[rbp]
	mov	rax, QWORD PTR -2160[rbp]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
.L9:
	mov	rax, QWORD PTR -2160[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -2152[rbp], rax
	cmp	QWORD PTR -2152[rbp], 0
	jne	.L10
	mov	eax, DWORD PTR -2212[rbp]
	lea	rsi, .LC8[rip]
	mov	edi, eax
	call	write_to_fd
	mov	eax, DWORD PTR -2212[rbp]
	lea	rsi, .LC9[rip]
	mov	edi, eax
	call	write_to_fd
	lea	rsi, .LC7[rip]
	lea	rdi, .LC10[rip]
	call	fopen@PLT
	mov	QWORD PTR -2152[rbp], rax
	mov	eax, DWORD PTR -2212[rbp]
	lea	rsi, .LC11[rip]
	mov	edi, eax
	call	write_to_fd
	mov	eax, DWORD PTR -2212[rbp]
	lea	rsi, .LC12[rip]
	mov	edi, eax
	call	write_to_fd
	mov	rax, QWORD PTR -2152[rbp]
	mov	edx, 2
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	DWORD PTR -2192[rbp], eax
	mov	rax, QWORD PTR -2152[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	edx, DWORD PTR -2192[rbp]
	lea	rax, -2112[rbp]
	lea	rsi, .LC13[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rdx, -2112[rbp]
	mov	eax, DWORD PTR -2212[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	write_to_fd
	mov	eax, DWORD PTR -2212[rbp]
	lea	rsi, .LC14[rip]
	mov	edi, eax
	call	write_to_fd
	mov	QWORD PTR -1056[rbp], 0
	mov	QWORD PTR -1048[rbp], 0
	lea	rdx, -1040[rbp]
	mov	eax, 0
	mov	ecx, 126
	mov	rdi, rdx
	rep stosq
	jmp	.L11
.L12:
	mov	eax, DWORD PTR -2188[rbp]
	movsx	rdx, eax
	lea	rcx, -1056[rbp]
	mov	eax, DWORD PTR -2212[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
.L11:
	mov	rdx, QWORD PTR -2152[rbp]
	lea	rax, -1056[rbp]
	mov	rcx, rdx
	mov	edx, 1024
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	DWORD PTR -2188[rbp], eax
	cmp	DWORD PTR -2188[rbp], 0
	jg	.L12
	jmp	.L13
.L10:
	mov	eax, DWORD PTR -2212[rbp]
	lea	rsi, .LC15[rip]
	mov	edi, eax
	call	write_to_fd
	mov	eax, DWORD PTR -2212[rbp]
	lea	rsi, .LC9[rip]
	mov	edi, eax
	call	write_to_fd
	mov	DWORD PTR -2232[rbp], -1
	mov	DWORD PTR -2228[rbp], 5
	jmp	.L14
.L17:
	mov	eax, DWORD PTR -2228[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -2160[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 46
	jne	.L15
	mov	rax, QWORD PTR -2160[rbp]
	sub	rax, 1
	movzx	eax, BYTE PTR [rax]
	cmp	al, 47
	je	.L15
	mov	eax, DWORD PTR -2228[rbp]
	mov	DWORD PTR -2232[rbp], eax
	jmp	.L16
.L15:
	add	DWORD PTR -2228[rbp], 1
.L14:
	mov	eax, DWORD PTR -2228[rbp]
	movsx	rbx, eax
	mov	rax, QWORD PTR -2160[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rbx, rax
	jb	.L17
.L16:
	mov	eax, DWORD PTR -2232[rbp]
	cdqe
	lea	rdx, 1[rax]
	mov	rax, QWORD PTR -2160[rbp]
	add	rdx, rax
	mov	eax, DWORD PTR -2212[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	add_content_type
	mov	eax, DWORD PTR -2212[rbp]
	lea	rsi, .LC12[rip]
	mov	edi, eax
	call	write_to_fd
	mov	rax, QWORD PTR -2152[rbp]
	mov	edx, 2
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	rax, QWORD PTR -2152[rbp]
	mov	rdi, rax
	call	ftell@PLT
	mov	DWORD PTR -2200[rbp], eax
	mov	rax, QWORD PTR -2152[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	edx, DWORD PTR -2200[rbp]
	lea	rax, -2112[rbp]
	lea	rsi, .LC13[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	lea	rdx, -2112[rbp]
	mov	eax, DWORD PTR -2212[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	write_to_fd
	mov	eax, DWORD PTR -2212[rbp]
	lea	rsi, .LC14[rip]
	mov	edi, eax
	call	write_to_fd
	mov	QWORD PTR -1056[rbp], 0
	mov	QWORD PTR -1048[rbp], 0
	lea	rdx, -1040[rbp]
	mov	eax, 0
	mov	ecx, 126
	mov	rdi, rdx
	rep stosq
	mov	DWORD PTR -2224[rbp], 0
	jmp	.L18
.L21:
	mov	eax, DWORD PTR -2196[rbp]
	movsx	rdx, eax
	lea	rcx, -1056[rbp]
	mov	eax, DWORD PTR -2212[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -2196[rbp], eax
	cmp	DWORD PTR -2196[rbp], -1
	jne	.L19
	lea	rdi, .LC16[rip]
	call	perror@PLT
	jmp	.L13
.L19:
	mov	eax, DWORD PTR -2196[rbp]
	add	DWORD PTR -2224[rbp], eax
.L18:
	mov	rdx, QWORD PTR -2152[rbp]
	lea	rax, -1056[rbp]
	mov	rcx, rdx
	mov	edx, 1024
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	DWORD PTR -2196[rbp], eax
	cmp	DWORD PTR -2196[rbp], 0
	jg	.L21
.L13:
	cmp	DWORD PTR -2208[rbp], 0
	jns	.L22
	lea	rdi, .LC17[rip]
	call	error
.L22:
	mov	eax, DWORD PTR -2212[rbp]
	mov	edi, eax
	call	close@PLT
	mov	rax, QWORD PTR -2168[rbp]
	mov	rdi, rax
	call	free@PLT
	jmp	.L23
	.cfi_endproc
.LFE7:
	.size	main, .-main
	.globl	write_to_fd
	.type	write_to_fd, @function
write_to_fd:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	rax, QWORD PTR -32[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	write_to_fd, .-write_to_fd
	.section	.rodata
.LC18:
	.string	"Content-Type: "
.LC19:
	.string	"htm"
.LC20:
	.string	"html"
.LC21:
	.string	"text/html\r\n"
.LC22:
	.string	"jpeg"
.LC23:
	.string	"jpg"
.LC24:
	.string	"image/jpeg\r\n"
.LC25:
	.string	"gif"
.LC26:
	.string	"image/gif\r\n"
.LC27:
	.string	"png"
.LC28:
	.string	"image/png\r\n"
.LC29:
	.string	"mp3"
.LC30:
	.string	"audio/mpeg3\r\n"
.LC31:
	.string	"mp4"
.LC32:
	.string	"video/mpeg4\r\n"
.LC33:
	.string	"pdf"
.LC34:
	.string	"application/pdf\r\n"
.LC35:
	.string	"text/plain\r\n"
	.text
	.globl	add_content_type
	.type	add_content_type, @function
add_content_type:
.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, 16
	mov	DWORD PTR -4[rbp], edi
	mov	QWORD PTR -16[rbp], rsi
	mov	eax, DWORD PTR -4[rbp]
	lea	rsi, .LC18[rip]
	mov	edi, eax
	call	write_to_fd
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC19[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L28
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC20[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L29
.L28:
	mov	eax, DWORD PTR -4[rbp]
	lea	rsi, .LC21[rip]
	mov	edi, eax
	call	write_to_fd
	jmp	.L30
.L29:
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC22[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L31
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC23[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L32
.L31:
	mov	eax, DWORD PTR -4[rbp]
	lea	rsi, .LC24[rip]
	mov	edi, eax
	call	write_to_fd
	jmp	.L30
.L32:
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC25[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L33
	mov	eax, DWORD PTR -4[rbp]
	lea	rsi, .LC26[rip]
	mov	edi, eax
	call	write_to_fd
	jmp	.L38
.L33:
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC27[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L34
	mov	eax, DWORD PTR -4[rbp]
	lea	rsi, .LC28[rip]
	mov	edi, eax
	call	write_to_fd
	jmp	.L38
.L34:
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC29[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L35
	mov	eax, DWORD PTR -4[rbp]
	lea	rsi, .LC30[rip]
	mov	edi, eax
	call	write_to_fd
	jmp	.L38
.L35:
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC31[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L36
	mov	eax, DWORD PTR -4[rbp]
	lea	rsi, .LC32[rip]
	mov	edi, eax
	call	write_to_fd
	jmp	.L38
.L36:
	mov	rax, QWORD PTR -16[rbp]
	lea	rsi, .LC33[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L37
	mov	eax, DWORD PTR -4[rbp]
	lea	rsi, .LC34[rip]
	mov	edi, eax
	call	write_to_fd
	jmp	.L38
.L37:
	mov	eax, DWORD PTR -4[rbp]
	lea	rsi, .LC35[rip]
	mov	edi, eax
	call	write_to_fd
	jmp	.L38
.L30:
.L38:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	add_content_type, .-add_content_type
	.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	"106403.c"
	.text
	.align	2
	.global	error
	.syntax unified
	.arm
	.fpu softvfp
	.type	error, %function
error:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r0, [fp, #-8]
	bl	perror
	mov	r0, #1
	bl	exit
	.size	error, .-error
	.section	.rodata
	.align	2
.LC0:
	.ascii	"ERROR, no port provided\012\000"
	.align	2
.LC1:
	.ascii	"ERROR opening socket\000"
	.align	2
.LC2:
	.ascii	"ERROR on binding\000"
	.align	2
.LC3:
	.ascii	"ERROR on accept\000"
	.align	2
.LC4:
	.ascii	"ERROR reading from socket\000"
	.align	2
.LC5:
	.ascii	"./src/index.html\000"
	.align	2
.LC6:
	.ascii	"./src%s\000"
	.align	2
.LC7:
	.ascii	"rb\000"
	.align	2
.LC8:
	.ascii	"HTTP/1.1 404 Not Found\015\012\000"
	.align	2
.LC9:
	.ascii	"Server: Linux version 5.0.1 (Ubuntu 7.3.0-27ubuntu1"
	.ascii	"~18.04)\015\012\000"
	.align	2
.LC10:
	.ascii	"./src/404.html\000"
	.align	2
.LC11:
	.ascii	"Content-Type: text/html\015\012\000"
	.align	2
.LC12:
	.ascii	"Content-Length: \000"
	.align	2
.LC13:
	.ascii	"%d\000"
	.align	2
.LC14:
	.ascii	"\015\012\015\012\000"
	.align	2
.LC15:
	.ascii	"HTTP/1.1 200 OK\015\012\000"
	.align	2
.LC16:
	.ascii	"Error while writing data to stream\000"
	.align	2
.LC17:
	.ascii	"ERROR writing to socket\000"
	.align	2
.LC18:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 2184
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #2176
	sub	sp, sp, #8
	str	r0, [fp, #-2184]
	str	r1, [fp, #-2188]
	ldr	r3, .L25
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-2184]
	cmp	r3, #1
	bgt	.L3
	ldr	r3, .L25+4
	ldr	r3, [r3]
	mov	r2, #24
	mov	r1, #1
	ldr	r0, .L25+8
	bl	fwrite
	mov	r0, #1
	bl	exit
.L3:
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-2164]
	ldr	r3, [fp, #-2164]
	cmp	r3, #0
	bge	.L4
	ldr	r0, .L25+12
	bl	error
.L4:
	sub	r3, fp, #2096
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, [fp, #-2188]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-2160]
	sub	r3, fp, #4
	sub	r3, r3, #2096
	sub	r3, r3, #8
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	mov	r3, #0
	str	r3, [fp, #-2104]
	ldr	r3, [fp, #-2160]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	htons
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #4
	sub	r3, r3, #2096
	sub	r3, r3, #8
	strh	r2, [r3, #2]	@ movhi
	sub	r3, fp, #2096
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-2164]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	bge	.L5
	ldr	r0, .L25+16
	bl	error
.L5:
	mov	r1, #5
	ldr	r0, [fp, #-2164]
	bl	listen
	mov	r3, #16
	str	r3, [fp, #-2180]
.L23:
	sub	r2, fp, #2176
	sub	r2, r2, #4
	sub	r3, fp, #2080
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r1, r3
	ldr	r0, [fp, #-2164]
	bl	accept
	str	r0, [fp, #-2156]
	ldr	r3, [fp, #-2156]
	cmp	r3, #0
	bge	.L6
	ldr	r0, .L25+20
	bl	error
.L6:
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, r3
	ldr	r0, [fp, #-2156]
	bl	read
	str	r0, [fp, #-2152]
	ldr	r3, [fp, #-2152]
	cmp	r3, #0
	bge	.L7
	ldr	r0, .L25+24
	bl	error
.L7:
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	puts
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, #47
	mov	r0, r3
	bl	strchr
	str	r0, [fp, #-2148]
	mov	r1, #32
	ldr	r0, [fp, #-2148]
	bl	strchr
	str	r0, [fp, #-2144]
	ldr	r2, [fp, #-2144]
	ldr	r3, [fp, #-2148]
	sub	r3, r2, r3
	str	r3, [fp, #-2140]
	mov	r0, #256
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-2136]
	ldr	r3, [fp, #-2140]
	mov	r2, r3
	ldr	r1, [fp, #-2148]
	ldr	r0, [fp, #-2136]
	bl	strncpy
	mov	r0, #256
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-2132]
	ldr	r3, [fp, #-2136]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #47
	bne	.L8
	ldr	r0, [fp, #-2136]
	bl	strlen
	mov	r3, r0
	cmp	r3, #1
	bne	.L8
	ldr	r1, .L25+28
	ldr	r0, [fp, #-2132]
	bl	sprintf
	b	.L9
.L8:
	ldr	r2, [fp, #-2136]
	ldr	r1, .L25+32
	ldr	r0, [fp, #-2132]
	bl	sprintf
.L9:
	ldr	r1, .L25+36
	ldr	r0, [fp, #-2132]
	bl	fopen
	str	r0, [fp, #-2128]
	ldr	r3, [fp, #-2128]
	cmp	r3, #0
	bne	.L10
	ldr	r1, .L25+40
	ldr	r0, [fp, #-2156]
	bl	write_to_fd
	ldr	r1, .L25+44
	ldr	r0, [fp, #-2156]
	bl	write_to_fd
	ldr	r1, .L25+36
	ldr	r0, .L25+48
	bl	fopen
	str	r0, [fp, #-2128]
	ldr	r1, .L25+52
	ldr	r0, [fp, #-2156]
	bl	write_to_fd
	ldr	r1, .L25+56
	ldr	r0, [fp, #-2156]
	bl	write_to_fd
	mov	r2, #2
	mov	r1, #0
	ldr	r0, [fp, #-2128]
	bl	fseek
	str	r0, [fp, #-2116]
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-2128]
	bl	fseek
	sub	r3, fp, #2064
	sub	r3, r3, #4
	sub	r3, r3, #8
	ldr	r2, [fp, #-2116]
	ldr	r1, .L25+60
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #2064
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r1, r3
	ldr	r0, [fp, #-2156]
	bl	write_to_fd
	ldr	r1, .L25+64
	ldr	r0, [fp, #-2156]
	bl	write_to_fd
	mov	r3, #0
	str	r3, [fp, #-1032]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	mov	r2, #1020
	mov	r1, #0
	mov	r0, r3
	bl	memset
	b	.L11
.L12:
	ldr	r2, [fp, #-2112]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-2156]
	bl	write
.L11:
	sub	r0, fp, #1024
	sub	r0, r0, #4
	sub	r0, r0, #4
	ldr	r3, [fp, #-2128]
	mov	r2, #1024
	mov	r1, #1
	bl	fread
	mov	r3, r0
	str	r3, [fp, #-2112]
	ldr	r3, [fp, #-2112]
	cmp	r3, #0
	bgt	.L12
	b	.L13
.L10:
	ldr	r1, .L25+68
	ldr	r0, [fp, #-2156]
	bl	write_to_fd
	ldr	r1, .L25+44
	ldr	r0, [fp, #-2156]
	bl	write_to_fd
	mvn	r3, #0
	str	r3, [fp, #-2176]
	mov	r3, #5
	str	r3, [fp, #-2172]
	b	.L14
.L17:
	ldr	r3, [fp, #-2172]
	ldr	r2, [fp, #-2132]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #46
	bne	.L15
	ldr	r3, [fp, #-2132]
	sub	r3, r3, #1
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #47
	beq	.L15
	ldr	r3, [fp, #-2172]
	str	r3, [fp, #-2176]
	b	.L16
.L15:
	ldr	r3, [fp, #-2172]
	add	r3, r3, #1
	str	r3, [fp, #-2172]
.L14:
	ldr	r0, [fp, #-2132]
	bl	strlen
	mov	r2, r0
	ldr	r3, [fp, #-2172]
	cmp	r2, r3
	bhi	.L17
.L16:
	ldr	r3, [fp, #-2176]
	add	r3, r3, #1
	ldr	r2, [fp, #-2132]
	add	r3, r2, r3
	mov	r1, r3
	ldr	r0, [fp, #-2156]
	bl	add_content_type
	ldr	r1, .L25+56
	ldr	r0, [fp, #-2156]
	bl	write_to_fd
	mov	r2, #2
	mov	r1, #0
	ldr	r0, [fp, #-2128]
	bl	fseek
	ldr	r0, [fp, #-2128]
	bl	ftell
	str	r0, [fp, #-2124]
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-2128]
	bl	fseek
	sub	r3, fp, #2064
	sub	r3, r3, #4
	sub	r3, r3, #8
	ldr	r2, [fp, #-2124]
	ldr	r1, .L25+60
	mov	r0, r3
	bl	sprintf
	sub	r3, fp, #2064
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r1, r3
	ldr	r0, [fp, #-2156]
	bl	write_to_fd
	ldr	r1, .L25+64
	ldr	r0, [fp, #-2156]
	bl	write_to_fd
	mov	r3, #0
	str	r3, [fp, #-1032]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	mov	r2, #1020
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #0
	str	r3, [fp, #-2168]
	b	.L18
.L21:
	ldr	r2, [fp, #-2120]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-2156]
	bl	write
	str	r0, [fp, #-2120]
	ldr	r3, [fp, #-2120]
	cmn	r3, #1
	bne	.L19
	ldr	r0, .L25+72
	bl	perror
	b	.L13
.L19:
	ldr	r2, [fp, #-2168]
	ldr	r3, [fp, #-2120]
	add	r3, r2, r3
	str	r3, [fp, #-2168]
.L18:
	sub	r0, fp, #1024
	sub	r0, r0, #4
	sub	r0, r0, #4
	ldr	r3, [fp, #-2128]
	mov	r2, #1024
	mov	r1, #1
	bl	fread
	mov	r3, r0
	str	r3, [fp, #-2120]
	ldr	r3, [fp, #-2120]
	cmp	r3, #0
	bgt	.L21
.L13:
	ldr	r3, [fp, #-2152]
	cmp	r3, #0
	bge	.L22
	ldr	r0, .L25+76
	bl	error
.L22:
	ldr	r0, [fp, #-2156]
	bl	close
	ldr	r0, [fp, #-2136]
	bl	free
	b	.L23
.L26:
	.align	2
.L25:
	.word	.LC18
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.size	main, .-main
	.align	2
	.global	write_to_fd
	.syntax unified
	.arm
	.fpu softvfp
	.type	write_to_fd, %function
write_to_fd:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r0, [fp, #-20]
	bl	strlen
	mov	r3, r0
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r2, r3
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	write
	mov	r3, r0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	write_to_fd, .-write_to_fd
	.section	.rodata
	.align	2
.LC19:
	.ascii	"Content-Type: \000"
	.align	2
.LC20:
	.ascii	"htm\000"
	.align	2
.LC21:
	.ascii	"html\000"
	.align	2
.LC22:
	.ascii	"text/html\015\012\000"
	.align	2
.LC23:
	.ascii	"jpeg\000"
	.align	2
.LC24:
	.ascii	"jpg\000"
	.align	2
.LC25:
	.ascii	"image/jpeg\015\012\000"
	.align	2
.LC26:
	.ascii	"gif\000"
	.align	2
.LC27:
	.ascii	"image/gif\015\012\000"
	.align	2
.LC28:
	.ascii	"png\000"
	.align	2
.LC29:
	.ascii	"image/png\015\012\000"
	.align	2
.LC30:
	.ascii	"mp3\000"
	.align	2
.LC31:
	.ascii	"audio/mpeg3\015\012\000"
	.align	2
.LC32:
	.ascii	"mp4\000"
	.align	2
.LC33:
	.ascii	"video/mpeg4\015\012\000"
	.align	2
.LC34:
	.ascii	"pdf\000"
	.align	2
.LC35:
	.ascii	"application/pdf\015\012\000"
	.align	2
.LC36:
	.ascii	"text/plain\015\012\000"
	.text
	.align	2
	.global	add_content_type
	.syntax unified
	.arm
	.fpu softvfp
	.type	add_content_type, %function
add_content_type:
	@ 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, .L41
	ldr	r0, [fp, #-8]
	bl	write_to_fd
	ldr	r1, .L41+4
	ldr	r0, [fp, #-12]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L30
	ldr	r1, .L41+8
	ldr	r0, [fp, #-12]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L31
.L30:
	ldr	r1, .L41+12
	ldr	r0, [fp, #-8]
	bl	write_to_fd
	b	.L32
.L31:
	ldr	r1, .L41+16
	ldr	r0, [fp, #-12]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L33
	ldr	r1, .L41+20
	ldr	r0, [fp, #-12]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L34
.L33:
	ldr	r1, .L41+24
	ldr	r0, [fp, #-8]
	bl	write_to_fd
	b	.L32
.L34:
	ldr	r1, .L41+28
	ldr	r0, [fp, #-12]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L35
	ldr	r1, .L41+32
	ldr	r0, [fp, #-8]
	bl	write_to_fd
	b	.L40
.L35:
	ldr	r1, .L41+36
	ldr	r0, [fp, #-12]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L36
	ldr	r1, .L41+40
	ldr	r0, [fp, #-8]
	bl	write_to_fd
	b	.L40
.L36:
	ldr	r1, .L41+44
	ldr	r0, [fp, #-12]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L37
	ldr	r1, .L41+48
	ldr	r0, [fp, #-8]
	bl	write_to_fd
	b	.L40
.L37:
	ldr	r1, .L41+52
	ldr	r0, [fp, #-12]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L38
	ldr	r1, .L41+56
	ldr	r0, [fp, #-8]
	bl	write_to_fd
	b	.L40
.L38:
	ldr	r1, .L41+60
	ldr	r0, [fp, #-12]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L39
	ldr	r1, .L41+64
	ldr	r0, [fp, #-8]
	bl	write_to_fd
	b	.L40
.L39:
	ldr	r1, .L41+68
	ldr	r0, [fp, #-8]
	bl	write_to_fd
	b	.L40
.L32:
.L40:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L42:
	.align	2
.L41:
	.word	.LC19
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.word	.LC23
	.word	.LC24
	.word	.LC25
	.word	.LC26
	.word	.LC27
	.word	.LC28
	.word	.LC29
	.word	.LC30
	.word	.LC31
	.word	.LC32
	.word	.LC33
	.word	.LC34
	.word	.LC35
	.word	.LC36
	.size	add_content_type, .-add_content_type
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
