	.file	"267387.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"usage: portnumber needed"
.LC1:
	.string	"cannot bind"
.LC2:
	.string	"fd = %d, events:%d,%d,%d\n"
.LC3:
	.string	"accept"
.LC4:
	.string	"new connection fd: %d\n"
.LC5:
	.string	"epoll_ctl"
	.align 8
.LC6:
	.string	"############# read #############"
.LC7:
	.string	"%s%s"
.LC8:
	.string	"%s\n"
.LC9:
	.string	"GET"
	.align 8
.LC10:
	.string	"HTTP/1.0 400 Bad request\r\n\r\n<html><head>\n<title>400 Bad Request</title>\n</head><body>\n<h1>Bad Request</h1>\n</body></html>\n"
	.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, 3424
	mov	DWORD PTR -3412[rbp], edi
	mov	QWORD PTR -3424[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -3412[rbp], 1
	jne	.L2
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	mov	edi, 256
	call	epoll_create@PLT
	mov	DWORD PTR -3392[rbp], eax
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -3388[rbp], eax
	mov	eax, DWORD PTR -3388[rbp]
	mov	edi, eax
	call	setnonblocking
	mov	eax, DWORD PTR -3388[rbp]
	mov	DWORD PTR -3352[rbp], eax
	mov	DWORD PTR -3356[rbp], -2147483647
	lea	rcx, -3356[rbp]
	mov	edx, DWORD PTR -3388[rbp]
	mov	eax, DWORD PTR -3392[rbp]
	mov	esi, 1
	mov	edi, eax
	call	epoll_ctl@PLT
	mov	WORD PTR -3344[rbp], 2
	mov	rax, QWORD PTR -3424[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -3342[rbp], ax
	mov	DWORD PTR -3340[rbp], 0
	lea	rcx, -3344[rbp]
	mov	eax, DWORD PTR -3388[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	cmp	eax, -1
	jne	.L3
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	eax, DWORD PTR -3388[rbp]
	mov	esi, 1
	mov	edi, eax
	call	listen@PLT
.L16:
	lea	rsi, -3328[rbp]
	mov	eax, DWORD PTR -3392[rbp]
	mov	ecx, 500
	mov	edx, 20
	mov	edi, eax
	call	epoll_wait@PLT
	mov	DWORD PTR -3384[rbp], eax
	mov	DWORD PTR -3396[rbp], 0
	jmp	.L4
.L5:
	mov	eax, DWORD PTR -3396[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	add	rax, rbp
	sub	rax, 3328
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -3396[rbp]
	movsx	rcx, eax
	mov	rax, rcx
	add	rax, rax
	add	rax, rcx
	sal	rax, 2
	add	rax, rbp
	sub	rax, 3324
	mov	eax, DWORD PTR [rax]
	mov	r8d, 4
	mov	ecx, 1
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	add	DWORD PTR -3396[rbp], 1
.L4:
	mov	eax, DWORD PTR -3396[rbp]
	cmp	eax, DWORD PTR -3384[rbp]
	jl	.L5
	mov	DWORD PTR -3396[rbp], 0
	jmp	.L6
.L15:
	mov	eax, DWORD PTR -3396[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	add	rax, rbp
	sub	rax, 3324
	mov	eax, DWORD PTR [rax]
	cmp	DWORD PTR -3388[rbp], eax
	jne	.L7
	mov	eax, DWORD PTR -3388[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -3372[rbp], eax
	cmp	DWORD PTR -3372[rbp], 0
	jns	.L8
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L8:
	mov	eax, DWORD PTR -3372[rbp]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -3372[rbp]
	mov	edi, eax
	call	setnonblocking
	mov	eax, DWORD PTR -3372[rbp]
	mov	DWORD PTR -3352[rbp], eax
	mov	DWORD PTR -3356[rbp], -2147483647
	lea	rcx, -3356[rbp]
	mov	edx, DWORD PTR -3372[rbp]
	mov	eax, DWORD PTR -3392[rbp]
	mov	esi, 1
	mov	edi, eax
	call	epoll_ctl@PLT
	cmp	eax, -1
	jne	.L9
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L7:
	mov	eax, DWORD PTR -3396[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	add	rax, rbp
	sub	rax, 3324
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR -3380[rbp], eax
	lea	rcx, -2064[rbp]
	mov	eax, DWORD PTR -3380[rbp]
	mov	edx, 1024
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -3376[rbp], eax
	lea	rdi, .LC6[rip]
	call	puts@PLT
	lea	rax, -2064[rbp]
	mov	rdi, rax
	call	puts@PLT
	cmp	DWORD PTR -3376[rbp], -1
	je	.L16
	cmp	DWORD PTR -3376[rbp], 0
	je	.L16
	lea	rcx, -2576[rbp]
	lea	rdx, -3088[rbp]
	lea	rax, -2064[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_sscanf@PLT
	lea	rdx, -1040[rbp]
	lea	rax, -2576[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	handle_url
	cmp	eax, -1
	jne	.L11
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, -1040[rbp]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, DWORD PTR -3380[rbp]
	mov	edi, eax
	call	close@PLT
	jmp	.L14
.L11:
	lea	rax, -3088[rbp]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L12
	lea	rdx, -2576[rbp]
	mov	eax, DWORD PTR -3380[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	handle_get
	mov	eax, DWORD PTR -3380[rbp]
	mov	edi, eax
	call	close@PLT
	jmp	.L9
.L12:
	lea	rax, .LC10[rip]
	mov	QWORD PTR -3368[rbp], rax
	mov	rax, QWORD PTR -3368[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rcx, QWORD PTR -3368[rbp]
	mov	eax, DWORD PTR -3380[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	eax, DWORD PTR -3380[rbp]
	mov	edi, eax
	call	close@PLT
.L9:
	add	DWORD PTR -3396[rbp], 1
.L6:
	mov	eax, DWORD PTR -3396[rbp]
	cmp	eax, DWORD PTR -3384[rbp]
	jl	.L15
.L14:
	jmp	.L16
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC11:
	.string	"HTTP/1.0 404 Not Found\r\n\r\n<html>\n<head><title>404 Not Found</title></head>\n<body>\n<h1>404 Not Found</h1>\n</body>\n</html>\n"
	.align 8
.LC12:
	.string	"############# write ###############"
.LC13:
	.string	"HTTP/1.0 200 OK\r\n\r\n"
.LC14:
	.string	"HTTP/1.0 200 OK\r\n\r"
.LC15:
	.string	"%s"
	.text
	.globl	handle_get
	.type	handle_get, @function
handle_get:
.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, 1072
	mov	DWORD PTR -1060[rbp], edi
	mov	QWORD PTR -1072[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR -1072[rbp]
	add	rax, 1
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -1056[rbp], eax
	cmp	DWORD PTR -1056[rbp], -1
	jne	.L19
	lea	rax, .LC11[rip]
	mov	QWORD PTR -1048[rbp], rax
	mov	rax, QWORD PTR -1048[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rcx, QWORD PTR -1048[rbp]
	mov	eax, DWORD PTR -1060[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	jmp	.L18
.L19:
	lea	rdi, .LC12[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -1060[rbp]
	mov	edx, 19
	lea	rsi, .LC13[rip]
	mov	edi, eax
	call	write@PLT
	lea	rdi, .LC14[rip]
	call	puts@PLT
	jmp	.L21
.L22:
	mov	eax, DWORD PTR -1052[rbp]
	movsx	rdx, eax
	lea	rcx, -1040[rbp]
	mov	eax, DWORD PTR -1060[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	lea	rax, -1040[rbp]
	mov	rsi, rax
	lea	rdi, .LC15[rip]
	mov	eax, 0
	call	printf@PLT
.L21:
	lea	rcx, -1040[rbp]
	mov	eax, DWORD PTR -1056[rbp]
	mov	edx, 1024
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -1052[rbp], eax
	cmp	DWORD PTR -1052[rbp], 0
	jg	.L22
	mov	edi, 10
	call	putchar@PLT
	mov	eax, DWORD PTR -1056[rbp]
	mov	edi, eax
	call	close@PLT
.L18:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L23
	call	__stack_chk_fail@PLT
.L23:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	handle_get, .-handle_get
	.section	.rodata
.LC16:
	.string	"/"
.LC17:
	.string	"."
.LC18:
	.string	".."
	.align 8
.LC19:
	.string	"handle_url:invalid url,Found:%s"
	.align 8
.LC20:
	.string	"ptr:%d, url:\"%s\", url len:%ld\n"
	.align 8
.LC21:
	.string	"handle_url:too long url. url length:%ld"
	.text
	.globl	handle_url
	.type	handle_url, @function
handle_url:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	lea	r11, -24576[rsp]
.LPSRL0:
	sub	rsp, 4096
	or	DWORD PTR [rsp], 0
	cmp	rsp, r11
	jne	.LPSRL0
	sub	rsp, 72
	.cfi_offset 3, -24
	mov	QWORD PTR -24648[rbp], rdi
	mov	QWORD PTR -24656[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -24640[rbp], 0
	mov	QWORD PTR -4128[rbp], 0
	mov	QWORD PTR -4120[rbp], 0
	lea	rdx, -4112[rbp]
	mov	eax, 0
	mov	ecx, 510
	mov	rdi, rdx
	rep stosq
	mov	rdx, QWORD PTR -24648[rbp]
	lea	rax, -8224[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
	lea	rax, -8224[rbp]
	lea	rsi, .LC16[rip]
	mov	rdi, rax
	call	strtok@PLT
	mov	QWORD PTR -24632[rbp], rax
	jmp	.L25
.L32:
	mov	rax, QWORD PTR -24632[rbp]
	lea	rsi, .LC17[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	je	.L37
	mov	rax, QWORD PTR -24632[rbp]
	lea	rsi, .LC18[rip]
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L28
	cmp	DWORD PTR -24640[rbp], 0
	jne	.L29
	mov	rdx, QWORD PTR -24648[rbp]
	mov	rax, QWORD PTR -24656[rbp]
	lea	rsi, .LC19[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	eax, -1
	jmp	.L35
.L29:
	sub	DWORD PTR -24640[rbp], 1
.L28:
	mov	rax, QWORD PTR -24648[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rcx, rax
	mov	rdx, QWORD PTR -24648[rbp]
	mov	eax, DWORD PTR -24640[rbp]
	mov	esi, eax
	lea	rdi, .LC20[rip]
	mov	eax, 0
	call	printf@PLT
	cmp	DWORD PTR -24640[rbp], 2049
	jne	.L31
	mov	rax, QWORD PTR -24648[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rax, QWORD PTR -24656[rbp]
	lea	rsi, .LC21[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
	mov	eax, -1
	jmp	.L35
.L31:
	mov	eax, DWORD PTR -24640[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -24640[rbp], edx
	cdqe
	mov	rdx, QWORD PTR -24632[rbp]
	mov	QWORD PTR -24624[rbp+rax*8], rdx
	jmp	.L27
.L37:
	nop
.L27:
	lea	rsi, .LC16[rip]
	mov	edi, 0
	call	strtok@PLT
	mov	QWORD PTR -24632[rbp], rax
.L25:
	cmp	QWORD PTR -24632[rbp], 0
	jne	.L32
	mov	DWORD PTR -24636[rbp], 0
	jmp	.L33
.L34:
	mov	eax, DWORD PTR -24636[rbp]
	cdqe
	mov	rbx, QWORD PTR -24624[rbp+rax*8]
	lea	rax, -4128[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rax, -4128[rbp]
	add	rax, rdx
	mov	WORD PTR [rax], 47
	lea	rax, -4128[rbp]
	mov	rsi, rbx
	mov	rdi, rax
	call	strcat@PLT
	add	DWORD PTR -24636[rbp], 1
.L33:
	mov	eax, DWORD PTR -24636[rbp]
	cmp	eax, DWORD PTR -24640[rbp]
	jl	.L34
	mov	rax, QWORD PTR -24648[rbp]
	mov	BYTE PTR [rax], 0
	lea	rdx, -4128[rbp]
	mov	rax, QWORD PTR -24648[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcat@PLT
	mov	eax, 0
.L35:
	mov	rbx, QWORD PTR -24[rbp]
	sub	rbx, QWORD PTR fs:40
	je	.L36
	call	__stack_chk_fail@PLT
.L36:
	mov	rbx, QWORD PTR -8[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	handle_url, .-handle_url
	.section	.rodata
.LC22:
	.string	"fcntl(sock,GETFL)"
.LC23:
	.string	"fcntl(sock,SETFL,opts)"
	.text
	.globl	setnonblocking
	.type	setnonblocking, @function
setnonblocking:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, 3
	mov	edi, eax
	mov	eax, 0
	call	fcntl@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jns	.L39
	lea	rdi, .LC22[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L39:
	or	DWORD PTR -4[rbp], 2048
	mov	edx, DWORD PTR -4[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, 4
	mov	edi, eax
	mov	eax, 0
	call	fcntl@PLT
	test	eax, eax
	jns	.L41
	lea	rdi, .LC23[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L41:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	setnonblocking, .-setnonblocking
	.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	"267387.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"usage: portnumber needed\000"
	.align	2
.LC1:
	.ascii	"cannot bind\000"
	.align	2
.LC2:
	.ascii	"fd = %d, events:%d,%d,%d\012\000"
	.align	2
.LC3:
	.ascii	"accept\000"
	.align	2
.LC4:
	.ascii	"new connection fd: %d\012\000"
	.align	2
.LC5:
	.ascii	"epoll_ctl\000"
	.align	2
.LC6:
	.ascii	"############# read #############\000"
	.align	2
.LC7:
	.ascii	"%s%s\000"
	.align	2
.LC8:
	.ascii	"%s\012\000"
	.align	2
.LC9:
	.ascii	"GET\000"
	.align	2
.LC10:
	.ascii	"HTTP/1.0 400 Bad request\015\012\015\012<html><head"
	.ascii	">\012<title>400 Bad Request</title>\012</head><body"
	.ascii	">\012<h1>Bad Request</h1>\012</body></html>\012\000"
	.align	2
.LC11:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 3472
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #3472
	sub	sp, sp, #8
	str	r0, [fp, #-3472]
	str	r1, [fp, #-3476]
	ldr	r3, .L18
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-3472]
	cmp	r3, #1
	bne	.L2
	ldr	r0, .L18+4
	bl	perror
	mov	r0, #1
	bl	exit
.L2:
	mov	r0, #256
	bl	epoll_create
	str	r0, [fp, #-3464]
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-3460]
	ldr	r0, [fp, #-3460]
	bl	setnonblocking
	ldr	r3, [fp, #-3460]
	str	r3, [fp, #-3428]
	mov	r3, #-2147483647
	str	r3, [fp, #-3436]
	sub	r3, fp, #3424
	sub	r3, r3, #4
	sub	r3, r3, #8
	ldr	r2, [fp, #-3460]
	mov	r1, #1
	ldr	r0, [fp, #-3464]
	bl	epoll_ctl
	sub	r3, fp, #4
	sub	r3, r3, #3408
	sub	r3, r3, #8
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	ldr	r3, [fp, #-3476]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	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, #3408
	sub	r3, r3, #8
	strh	r2, [r3, #2]	@ movhi
	mov	r3, #0
	str	r3, [fp, #-3416]
	sub	r3, fp, #3408
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-3460]
	bl	bind
	mov	r3, r0
	cmn	r3, #1
	bne	.L3
	ldr	r0, .L18+8
	bl	perror
	mov	r0, #1
	bl	exit
.L3:
	mov	r1, #1
	ldr	r0, [fp, #-3460]
	bl	listen
.L16:
	sub	r1, fp, #3392
	sub	r1, r1, #4
	sub	r1, r1, #8
	mov	r3, #500
	mov	r2, #20
	ldr	r0, [fp, #-3464]
	bl	epoll_wait
	str	r0, [fp, #-3456]
	mov	r3, #0
	str	r3, [fp, #-3468]
	b	.L4
.L5:
	ldr	r3, [fp, #-3468]
	lsl	r3, r3, #4
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r1, [r3, #-3392]
	ldr	r3, [fp, #-3468]
	lsl	r3, r3, #4
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-3400]
	mov	r3, #4
	str	r3, [sp]
	mov	r3, #1
	ldr	r0, .L18+12
	bl	printf
	ldr	r3, [fp, #-3468]
	add	r3, r3, #1
	str	r3, [fp, #-3468]
.L4:
	ldr	r2, [fp, #-3468]
	ldr	r3, [fp, #-3456]
	cmp	r2, r3
	blt	.L5
	mov	r3, #0
	str	r3, [fp, #-3468]
	b	.L6
.L15:
	ldr	r3, [fp, #-3468]
	lsl	r3, r3, #4
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-3392]
	ldr	r2, [fp, #-3460]
	cmp	r2, r3
	bne	.L7
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-3460]
	bl	accept
	str	r0, [fp, #-3440]
	ldr	r3, [fp, #-3440]
	cmp	r3, #0
	bge	.L8
	ldr	r0, .L18+16
	bl	perror
	mov	r0, #1
	bl	exit
.L8:
	ldr	r1, [fp, #-3440]
	ldr	r0, .L18+20
	bl	printf
	ldr	r0, [fp, #-3440]
	bl	setnonblocking
	ldr	r3, [fp, #-3440]
	str	r3, [fp, #-3428]
	mov	r3, #-2147483647
	str	r3, [fp, #-3436]
	sub	r3, fp, #3424
	sub	r3, r3, #4
	sub	r3, r3, #8
	ldr	r2, [fp, #-3440]
	mov	r1, #1
	ldr	r0, [fp, #-3464]
	bl	epoll_ctl
	mov	r3, r0
	cmn	r3, #1
	bne	.L9
	ldr	r0, .L18+24
	bl	perror
	mov	r0, #1
	bl	exit
.L7:
	ldr	r3, [fp, #-3468]
	lsl	r3, r3, #4
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r3, [r3, #-3392]
	str	r3, [fp, #-3452]
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, r3
	ldr	r0, [fp, #-3452]
	bl	read
	str	r0, [fp, #-3448]
	ldr	r0, .L18+28
	bl	puts
	sub	r3, fp, #2048
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	puts
	ldr	r3, [fp, #-3448]
	cmn	r3, #1
	beq	.L16
	ldr	r3, [fp, #-3448]
	cmp	r3, #0
	beq	.L16
	sub	r3, fp, #2560
	sub	r3, r3, #4
	sub	r3, r3, #4
	sub	r2, fp, #3072
	sub	r2, r2, #4
	sub	r2, r2, #4
	sub	r0, fp, #2048
	sub	r0, r0, #4
	sub	r0, r0, #4
	ldr	r1, .L18+32
	bl	__isoc99_sscanf
	sub	r2, fp, #1024
	sub	r2, r2, #4
	sub	r2, r2, #4
	sub	r3, fp, #2560
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r2
	mov	r0, r3
	bl	handle_url
	mov	r3, r0
	cmn	r3, #1
	bne	.L11
	ldr	r3, .L18+36
	ldr	r0, [r3]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, r3
	ldr	r1, .L18+40
	bl	fprintf
	ldr	r0, [fp, #-3452]
	bl	close
	b	.L14
.L11:
	sub	r3, fp, #3072
	sub	r3, r3, #4
	sub	r3, r3, #4
	ldr	r1, .L18+44
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L12
	sub	r3, fp, #2560
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-3452]
	bl	handle_get
	ldr	r0, [fp, #-3452]
	bl	close
	b	.L9
.L12:
	ldr	r3, .L18+48
	str	r3, [fp, #-3444]
	ldr	r0, [fp, #-3444]
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	ldr	r1, [fp, #-3444]
	ldr	r0, [fp, #-3452]
	bl	write
	ldr	r0, [fp, #-3452]
	bl	close
.L9:
	ldr	r3, [fp, #-3468]
	add	r3, r3, #1
	str	r3, [fp, #-3468]
.L6:
	ldr	r2, [fp, #-3468]
	ldr	r3, [fp, #-3456]
	cmp	r2, r3
	blt	.L15
.L14:
	b	.L16
.L19:
	.align	2
.L18:
	.word	.LC11
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	stderr
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.size	main, .-main
	.section	.rodata
	.align	2
.LC12:
	.ascii	"HTTP/1.0 404 Not Found\015\012\015\012<html>\012<he"
	.ascii	"ad><title>404 Not Found</title></head>\012<body>\012"
	.ascii	"<h1>404 Not Found</h1>\012</body>\012</html>\012\000"
	.align	2
.LC13:
	.ascii	"############# write ###############\000"
	.align	2
.LC14:
	.ascii	"HTTP/1.0 200 OK\015\012\015\012\000"
	.align	2
.LC15:
	.ascii	"HTTP/1.0 200 OK\015\012\015\000"
	.align	2
.LC16:
	.ascii	"%s\000"
	.align	2
.LC17:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	handle_get
	.syntax unified
	.arm
	.fpu softvfp
	.type	handle_get, %function
handle_get:
	@ args = 0, pretend = 0, frame = 1048
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1040
	sub	sp, sp, #8
	str	r0, [fp, #-1048]
	str	r1, [fp, #-1052]
	ldr	r3, .L26
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-1052]
	add	r3, r3, #1
	mov	r1, #0
	mov	r0, r3
	bl	open
	str	r0, [fp, #-1044]
	ldr	r3, [fp, #-1044]
	cmn	r3, #1
	bne	.L21
	ldr	r3, .L26+4
	str	r3, [fp, #-1036]
	ldr	r0, [fp, #-1036]
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	ldr	r1, [fp, #-1036]
	ldr	r0, [fp, #-1048]
	bl	write
	b	.L20
.L21:
	ldr	r0, .L26+8
	bl	puts
	mov	r2, #19
	ldr	r1, .L26+12
	ldr	r0, [fp, #-1048]
	bl	write
	ldr	r0, .L26+16
	bl	puts
	b	.L23
.L24:
	ldr	r2, [fp, #-1040]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-1048]
	bl	write
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L26+20
	bl	printf
.L23:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, r3
	ldr	r0, [fp, #-1044]
	bl	read
	str	r0, [fp, #-1040]
	ldr	r3, [fp, #-1040]
	cmp	r3, #0
	bgt	.L24
	mov	r0, #10
	bl	putchar
	ldr	r0, [fp, #-1044]
	bl	close
.L20:
	ldr	r3, .L26
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L25
	bl	__stack_chk_fail
.L25:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L27:
	.align	2
.L26:
	.word	.LC17
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.size	handle_get, .-handle_get
	.section	.rodata
	.align	2
.LC18:
	.ascii	"/\000"
	.align	2
.LC19:
	.ascii	".\000"
	.align	2
.LC20:
	.ascii	"..\000"
	.align	2
.LC21:
	.ascii	"handle_url:invalid url,Found:%s\000"
	.align	2
.LC22:
	.ascii	"ptr:%d, url:\"%s\", url len:%ld\012\000"
	.align	2
.LC23:
	.ascii	"handle_url:too long url. url length:%ld\000"
	.align	2
.LC24:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	handle_url
	.syntax unified
	.arm
	.fpu softvfp
	.type	handle_url, %function
handle_url:
	@ args = 0, pretend = 0, frame = 16416
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #16384
	sub	sp, sp, #36
	sub	r3, fp, #16384
	sub	r3, r3, #12
	str	r0, [r3, #-28]
	sub	r3, fp, #16384
	sub	r3, r3, #12
	str	r1, [r3, #-32]
	ldr	r3, .L42
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #16384
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-20]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-4]
	mov	r0, r2
	ldr	r3, .L42+4
	mov	r2, r3
	mov	r1, #0
	bl	memset
	sub	r3, fp, #16384
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r1, [r2, #-28]
	mov	r0, r3
	bl	strcpy
	sub	r3, fp, #16384
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #8192
	sub	r3, r3, #12
	sub	r3, r3, #4
	ldr	r1, .L42+8
	mov	r0, r3
	bl	strtok
	str	r0, [r4, #-16]
	b	.L29
.L36:
	sub	r3, fp, #16384
	sub	r3, r3, #12
	ldr	r1, .L42+12
	ldr	r0, [r3, #-16]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	beq	.L41
	sub	r3, fp, #16384
	sub	r3, r3, #12
	ldr	r1, .L42+16
	ldr	r0, [r3, #-16]
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L32
	sub	r3, fp, #16384
	sub	r3, r3, #12
	ldr	r3, [r3, #-20]
	cmp	r3, #0
	bne	.L33
	sub	r3, fp, #16384
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #16384
	sub	r3, r3, #12
	ldr	r2, [r2, #-28]
	ldr	r1, .L42+20
	ldr	r0, [r3, #-32]
	bl	sprintf
	mvn	r3, #0
	b	.L39
.L33:
	sub	r3, fp, #16384
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #16384
	sub	r3, r3, #12
	ldr	r3, [r3, #-20]
	sub	r3, r3, #1
	str	r3, [r2, #-20]
.L32:
	sub	r3, fp, #16384
	sub	r3, r3, #12
	ldr	r0, [r3, #-28]
	bl	strlen
	mov	r3, r0
	sub	r2, fp, #16384
	sub	r2, r2, #12
	sub	r1, fp, #16384
	sub	r1, r1, #12
	ldr	r2, [r2, #-28]
	ldr	r1, [r1, #-20]
	ldr	r0, .L42+24
	bl	printf
	sub	r3, fp, #16384
	sub	r3, r3, #12
	ldr	r3, [r3, #-20]
	ldr	r2, .L42+28
	cmp	r3, r2
	bne	.L35
	sub	r3, fp, #16384
	sub	r3, r3, #12
	ldr	r0, [r3, #-28]
	bl	strlen
	mov	r3, r0
	sub	r2, fp, #16384
	sub	r2, r2, #12
	mov	r0, r2
	mov	r2, r3
	ldr	r1, .L42+32
	ldr	r0, [r0, #-32]
	bl	sprintf
	mvn	r3, #0
	b	.L39
.L35:
	sub	r3, fp, #16384
	sub	r3, r3, #12
	ldr	r3, [r3, #-20]
	sub	r2, fp, #16384
	sub	r2, r2, #12
	mov	r1, r2
	add	r2, r3, #1
	str	r2, [r1, #-20]
	sub	r2, fp, #16384
	sub	r2, r2, #12
	lsl	r3, r3, #2
	add	r3, r2, r3
	sub	r2, fp, #16384
	sub	r2, r2, #12
	ldr	r2, [r2, #-16]
	str	r2, [r3, #-8]
	b	.L31
.L41:
	nop
.L31:
	sub	r3, fp, #16384
	sub	r3, r3, #12
	mov	r4, r3
	ldr	r1, .L42+8
	mov	r0, #0
	bl	strtok
	str	r0, [r4, #-16]
.L29:
	sub	r3, fp, #16384
	sub	r3, r3, #12
	ldr	r3, [r3, #-16]
	cmp	r3, #0
	bne	.L36
	sub	r3, fp, #16384
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-12]
	b	.L37
.L38:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	add	r3, r3, r2
	ldr	r2, .L42+8
	mov	r0, r3
	mov	r1, r2
	mov	r3, #2
	mov	r2, r3
	bl	memcpy
	sub	r2, fp, #4096
	sub	r2, r2, #12
	sub	r2, r2, #4
	sub	r3, fp, #16384
	sub	r3, r3, #12
	mov	r1, r3
	sub	r3, fp, #16384
	sub	r3, r3, #12
	ldr	r3, [r3, #-12]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3, #-8]
	mov	r1, r3
	mov	r0, r2
	bl	strcat
	sub	r3, fp, #16384
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #16384
	sub	r3, r3, #12
	ldr	r3, [r3, #-12]
	add	r3, r3, #1
	str	r3, [r2, #-12]
.L37:
	sub	r3, fp, #16384
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #16384
	sub	r3, r3, #12
	ldr	r2, [r2, #-12]
	ldr	r3, [r3, #-20]
	cmp	r2, r3
	blt	.L38
	sub	r3, fp, #16384
	sub	r3, r3, #12
	ldr	r3, [r3, #-28]
	mov	r2, #0
	strb	r2, [r3]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	sub	r2, fp, #16384
	sub	r2, r2, #12
	mov	r1, r3
	ldr	r0, [r2, #-28]
	bl	strcat
	mov	r3, #0
.L39:
	ldr	r2, .L42
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L40
	bl	__stack_chk_fail
.L40:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L43:
	.align	2
.L42:
	.word	.LC24
	.word	4092
	.word	.LC18
	.word	.LC19
	.word	.LC20
	.word	.LC21
	.word	.LC22
	.word	2049
	.word	.LC23
	.size	handle_url, .-handle_url
	.section	.rodata
	.align	2
.LC25:
	.ascii	"fcntl(sock,GETFL)\000"
	.align	2
.LC26:
	.ascii	"fcntl(sock,SETFL,opts)\000"
	.text
	.align	2
	.global	setnonblocking
	.syntax unified
	.arm
	.fpu softvfp
	.type	setnonblocking, %function
setnonblocking:
	@ 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	r1, #3
	ldr	r0, [fp, #-16]
	bl	fcntl
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L45
	ldr	r0, .L48
	bl	perror
	mov	r0, #1
	bl	exit
.L45:
	ldr	r3, [fp, #-8]
	orr	r3, r3, #2048
	str	r3, [fp, #-8]
	ldr	r2, [fp, #-8]
	mov	r1, #4
	ldr	r0, [fp, #-16]
	bl	fcntl
	mov	r3, r0
	cmp	r3, #0
	bge	.L47
	ldr	r0, .L48+4
	bl	perror
	mov	r0, #1
	bl	exit
.L47:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L49:
	.align	2
.L48:
	.word	.LC25
	.word	.LC26
	.size	setnonblocking, .-setnonblocking
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
