	.file	"267212.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"create socket error"
.LC1:
	.string	"Not in presentation format"
.LC2:
	.string	"inet_pton"
.LC3:
	.string	"bind socket error"
.LC4:
	.string	"listen socket error"
.LC5:
	.string	"server listen on %s:%d\n"
	.text
	.globl	init_server
	.type	init_server, @function
init_server:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	QWORD PTR -56[rbp], rdi
	mov	DWORD PTR -60[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -44[rbp], 16
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -40[rbp], eax
	cmp	DWORD PTR -40[rbp], -1
	jne	.L2
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L2:
	lea	rax, -32[rbp]
	mov	QWORD PTR [rax], 0
	mov	QWORD PTR 8[rax], 0
	mov	WORD PTR -32[rbp], 2
	mov	eax, DWORD PTR -60[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -30[rbp], ax
	cmp	QWORD PTR -56[rbp], 0
	jne	.L3
	mov	edi, 0
	call	htonl@PLT
	mov	DWORD PTR -28[rbp], eax
	jmp	.L4
.L3:
	lea	rax, -32[rbp]
	lea	rdx, 4[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	rsi, rax
	mov	edi, 2
	call	inet_pton@PLT
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], 0
	jg	.L4
	cmp	DWORD PTR -36[rbp], 0
	jne	.L5
	lea	rdi, .LC1[rip]
	call	puts@PLT
	jmp	.L6
.L5:
	lea	rdi, .LC2[rip]
	call	perror@PLT
.L6:
	mov	edi, -1
	call	exit@PLT
.L4:
	mov	edx, DWORD PTR -44[rbp]
	lea	rcx, -32[rbp]
	mov	eax, DWORD PTR -40[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	je	.L7
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L7:
	mov	eax, DWORD PTR -40[rbp]
	mov	esi, 512
	mov	edi, eax
	call	listen@PLT
	test	eax, eax
	je	.L8
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L8:
	mov	edx, DWORD PTR -60[rbp]
	mov	rax, QWORD PTR -56[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -40[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L10
	call	__stack_chk_fail@PLT
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	init_server, .-init_server
	.globl	max
	.type	max, @function
max:
.LFB7:
	.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
	mov	DWORD PTR -8[rbp], esi
	mov	eax, DWORD PTR -4[rbp]
	cmp	DWORD PTR -8[rbp], eax
	cmovge	eax, DWORD PTR -8[rbp]
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	max, .-max
	.section	.rodata
.LC6:
	.string	"read error"
.LC7:
	.string	"client closed"
.LC8:
	.string	"read %d bytes data: %s"
	.text
	.globl	read_fd
	.type	read_fd, @function
read_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, 1072
	mov	DWORD PTR -1060[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -1040[rbp]
	mov	rsi, rax
	mov	eax, 0
	mov	edx, 128
	mov	rdi, rsi
	mov	rcx, rdx
	rep stosq
	lea	rcx, -1040[rbp]
	mov	eax, DWORD PTR -1060[rbp]
	mov	edx, 1024
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -1044[rbp], eax
	cmp	DWORD PTR -1044[rbp], 0
	jns	.L14
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 4
	jne	.L15
	mov	eax, 0
	jmp	.L18
.L15:
	lea	rdi, .LC6[rip]
	call	perror@PLT
	mov	eax, -1
	jmp	.L18
.L14:
	cmp	DWORD PTR -1044[rbp], 0
	jne	.L17
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	eax, -1
	jmp	.L18
.L17:
	lea	rdx, -1040[rbp]
	mov	eax, DWORD PTR -1044[rbp]
	mov	esi, eax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
.L18:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L19
	call	__stack_chk_fail@PLT
.L19:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	read_fd, .-read_fd
	.section	.rodata
.LC9:
	.string	"setsockopt error"
.LC10:
	.string	"%d socket ready to read\n"
.LC11:
	.string	"select error"
.LC12:
	.string	"accept error"
.LC13:
	.string	"inet_ntop error"
	.align 8
.LC14:
	.string	"accept a client(%d), ip(%s), port(%d)\n"
	.align 8
.LC15:
	.string	"too many clients, close this one"
	.text
	.globl	main
	.type	main, @function
main:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 368
	mov	DWORD PTR -4452[rbp], edi
	mov	QWORD PTR -4464[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	esi, 1
	mov	edi, 13
	call	signal@PLT
	mov	DWORD PTR -4444[rbp], 16
	mov	DWORD PTR -4440[rbp], 1
	mov	esi, 8888
	mov	edi, 0
	call	init_server
	mov	DWORD PTR -4420[rbp], eax
	lea	rdx, -4440[rbp]
	mov	eax, DWORD PTR -4420[rbp]
	mov	r8d, 4
	mov	rcx, rdx
	mov	edx, 2
	mov	esi, 1
	mov	edi, eax
	call	setsockopt@PLT
	test	eax, eax
	je	.L21
	lea	rdi, .LC9[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L21:
	mov	eax, 0
	mov	ecx, 16
	lea	rdx, -4256[rbp]
	mov	rdi, rdx
#APP
# 98 "the_stack_data/267212.c" 1
	cld; rep; stosq
# 0 "" 2
#NO_APP
	mov	eax, edi
	mov	edx, ecx
	mov	DWORD PTR -4416[rbp], edx
	mov	DWORD PTR -4412[rbp], eax
	mov	eax, DWORD PTR -4420[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	esi, eax
	movsx	rax, esi
	mov	rdi, QWORD PTR -4256[rbp+rax*8]
	mov	eax, DWORD PTR -4420[rbp]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	or	rdi, rax
	mov	rdx, rdi
	movsx	rax, esi
	mov	QWORD PTR -4256[rbp+rax*8], rdx
	mov	DWORD PTR -4424[rbp], 0
	jmp	.L22
.L23:
	mov	eax, DWORD PTR -4424[rbp]
	cdqe
	mov	DWORD PTR -4128[rbp+rax*4], -1
	add	DWORD PTR -4424[rbp], 1
.L22:
	cmp	DWORD PTR -4424[rbp], 1023
	jle	.L23
	mov	eax, DWORD PTR -4420[rbp]
	mov	DWORD PTR -4436[rbp], eax
	mov	DWORD PTR -4432[rbp], -1
.L44:
	mov	rax, QWORD PTR -4256[rbp]
	mov	rdx, QWORD PTR -4248[rbp]
	mov	QWORD PTR -4384[rbp], rax
	mov	QWORD PTR -4376[rbp], rdx
	mov	rax, QWORD PTR -4240[rbp]
	mov	rdx, QWORD PTR -4232[rbp]
	mov	QWORD PTR -4368[rbp], rax
	mov	QWORD PTR -4360[rbp], rdx
	mov	rax, QWORD PTR -4224[rbp]
	mov	rdx, QWORD PTR -4216[rbp]
	mov	QWORD PTR -4352[rbp], rax
	mov	QWORD PTR -4344[rbp], rdx
	mov	rax, QWORD PTR -4208[rbp]
	mov	rdx, QWORD PTR -4200[rbp]
	mov	QWORD PTR -4336[rbp], rax
	mov	QWORD PTR -4328[rbp], rdx
	mov	rax, QWORD PTR -4192[rbp]
	mov	rdx, QWORD PTR -4184[rbp]
	mov	QWORD PTR -4320[rbp], rax
	mov	QWORD PTR -4312[rbp], rdx
	mov	rax, QWORD PTR -4176[rbp]
	mov	rdx, QWORD PTR -4168[rbp]
	mov	QWORD PTR -4304[rbp], rax
	mov	QWORD PTR -4296[rbp], rdx
	mov	rax, QWORD PTR -4160[rbp]
	mov	rdx, QWORD PTR -4152[rbp]
	mov	QWORD PTR -4288[rbp], rax
	mov	QWORD PTR -4280[rbp], rdx
	mov	rax, QWORD PTR -4144[rbp]
	mov	rdx, QWORD PTR -4136[rbp]
	mov	QWORD PTR -4272[rbp], rax
	mov	QWORD PTR -4264[rbp], rdx
	mov	eax, DWORD PTR -4436[rbp]
	lea	edi, 1[rax]
	lea	rax, -4384[rbp]
	mov	r8d, 0
	mov	ecx, 0
	mov	edx, 0
	mov	rsi, rax
	call	select@PLT
	mov	DWORD PTR -4428[rbp], eax
	mov	eax, DWORD PTR -4428[rbp]
	mov	esi, eax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	cmp	DWORD PTR -4428[rbp], 0
	jns	.L24
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 4
	je	.L46
	lea	rdi, .LC11[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L24:
	mov	eax, DWORD PTR -4420[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	cdqe
	mov	rsi, QWORD PTR -4384[rbp+rax*8]
	mov	eax, DWORD PTR -4420[rbp]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	and	rax, rsi
	test	rax, rax
	je	.L27
	mov	DWORD PTR -4444[rbp], 16
	mov	eax, DWORD PTR -4444[rbp]
	mov	edx, eax
	lea	rax, -4400[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	lea	rdx, -4444[rbp]
	lea	rcx, -4400[rbp]
	mov	eax, DWORD PTR -4420[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -4408[rbp], eax
	cmp	DWORD PTR -4408[rbp], -1
	jne	.L28
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 4
	je	.L47
	lea	rdi, .LC12[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L28:
	lea	rax, -32[rbp]
	lea	rdx, -4400[rbp]
	lea	rsi, 4[rdx]
	mov	ecx, 16
	mov	rdx, rax
	mov	edi, 2
	call	inet_ntop@PLT
	test	rax, rax
	jne	.L31
	lea	rdi, .LC13[rip]
	call	perror@PLT
	mov	edi, -1
	call	exit@PLT
.L31:
	movzx	eax, WORD PTR -4398[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	ntohs@PLT
	movzx	ecx, ax
	lea	rdx, -32[rbp]
	mov	eax, DWORD PTR -4408[rbp]
	mov	esi, eax
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -4424[rbp], 0
	jmp	.L32
.L35:
	mov	eax, DWORD PTR -4424[rbp]
	cdqe
	mov	eax, DWORD PTR -4128[rbp+rax*4]
	cmp	eax, -1
	je	.L48
	add	DWORD PTR -4424[rbp], 1
.L32:
	cmp	DWORD PTR -4424[rbp], 1023
	jle	.L35
	jmp	.L34
.L48:
	nop
.L34:
	cmp	DWORD PTR -4424[rbp], 1024
	jne	.L36
	lea	rdi, .LC15[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -4408[rbp]
	mov	edi, eax
	call	close@PLT
	jmp	.L37
.L36:
	mov	eax, DWORD PTR -4408[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	esi, eax
	movsx	rax, esi
	mov	rdi, QWORD PTR -4256[rbp+rax*8]
	mov	eax, DWORD PTR -4408[rbp]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	or	rdi, rax
	mov	rdx, rdi
	movsx	rax, esi
	mov	QWORD PTR -4256[rbp+rax*8], rdx
	mov	eax, DWORD PTR -4424[rbp]
	cdqe
	mov	edx, DWORD PTR -4408[rbp]
	mov	DWORD PTR -4128[rbp+rax*4], edx
	mov	edx, DWORD PTR -4408[rbp]
	mov	eax, DWORD PTR -4436[rbp]
	mov	esi, edx
	mov	edi, eax
	call	max
	mov	DWORD PTR -4436[rbp], eax
	mov	eax, DWORD PTR -4424[rbp]
	cmp	eax, DWORD PTR -4432[rbp]
	jle	.L37
	mov	eax, DWORD PTR -4424[rbp]
	mov	DWORD PTR -4432[rbp], eax
.L37:
	sub	DWORD PTR -4428[rbp], 1
	cmp	DWORD PTR -4428[rbp], 0
	jle	.L49
.L27:
	mov	DWORD PTR -4424[rbp], 0
	jmp	.L39
.L43:
	mov	eax, DWORD PTR -4424[rbp]
	cdqe
	mov	eax, DWORD PTR -4128[rbp+rax*4]
	mov	DWORD PTR -4408[rbp], eax
	cmp	DWORD PTR -4408[rbp], 0
	js	.L50
	mov	eax, DWORD PTR -4408[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	cdqe
	mov	rsi, QWORD PTR -4384[rbp+rax*8]
	mov	eax, DWORD PTR -4408[rbp]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	and	rax, rsi
	test	rax, rax
	je	.L41
	mov	eax, DWORD PTR -4408[rbp]
	mov	edi, eax
	call	read_fd
	mov	DWORD PTR -4404[rbp], eax
	cmp	DWORD PTR -4404[rbp], 0
	je	.L42
	mov	eax, DWORD PTR -4408[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -4408[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	esi, eax
	movsx	rax, esi
	mov	rdi, QWORD PTR -4256[rbp+rax*8]
	mov	eax, DWORD PTR -4408[rbp]
	cdq
	shr	edx, 26
	add	eax, edx
	and	eax, 63
	sub	eax, edx
	mov	edx, 1
	mov	ecx, eax
	sal	rdx, cl
	mov	rax, rdx
	not	rax
	and	rdi, rax
	mov	rdx, rdi
	movsx	rax, esi
	mov	QWORD PTR -4256[rbp+rax*8], rdx
	mov	eax, DWORD PTR -4424[rbp]
	cdqe
	mov	DWORD PTR -4128[rbp+rax*4], -1
.L42:
	sub	DWORD PTR -4428[rbp], 1
	cmp	DWORD PTR -4428[rbp], 0
	jle	.L51
	jmp	.L41
.L50:
	nop
.L41:
	add	DWORD PTR -4424[rbp], 1
.L39:
	mov	eax, DWORD PTR -4424[rbp]
	cmp	eax, DWORD PTR -4432[rbp]
	jle	.L43
	jmp	.L44
.L46:
	nop
	jmp	.L44
.L47:
	nop
	jmp	.L44
.L49:
	nop
	jmp	.L44
.L51:
	nop
	jmp	.L44
	.cfi_endproc
.LFE9:
	.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	"267212.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"create socket error\000"
	.align	2
.LC1:
	.ascii	"Not in presentation format\000"
	.align	2
.LC2:
	.ascii	"inet_pton\000"
	.align	2
.LC3:
	.ascii	"bind socket error\000"
	.align	2
.LC4:
	.ascii	"listen socket error\000"
	.align	2
.LC5:
	.ascii	"server listen on %s:%d\012\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	init_server
	.syntax unified
	.arm
	.fpu softvfp
	.type	init_server, %function
init_server:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-40]
	str	r1, [fp, #-44]
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #16
	str	r3, [fp, #-36]
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmn	r3, #1
	bne	.L2
	ldr	r0, .L11+4
	bl	perror
	mvn	r0, #0
	bl	exit
.L2:
	sub	r3, fp, #24
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2]
	str	r3, [r2, #4]
	str	r3, [r2, #8]
	str	r3, [r2, #12]
	mov	r3, #2
	strh	r3, [fp, #-24]	@ movhi
	ldr	r3, [fp, #-44]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-22]	@ movhi
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	bne	.L3
	mov	r0, #0
	bl	htonl
	mov	r3, r0
	str	r3, [fp, #-20]
	b	.L4
.L3:
	sub	r3, fp, #24
	add	r3, r3, #4
	mov	r2, r3
	ldr	r1, [fp, #-40]
	mov	r0, #2
	bl	inet_pton
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bgt	.L4
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bne	.L5
	ldr	r0, .L11+8
	bl	puts
	b	.L6
.L5:
	ldr	r0, .L11+12
	bl	perror
.L6:
	mvn	r0, #0
	bl	exit
.L4:
	sub	r3, fp, #24
	ldr	r2, [fp, #-36]
	mov	r1, r3
	ldr	r0, [fp, #-32]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	beq	.L7
	ldr	r0, .L11+16
	bl	perror
	mvn	r0, #0
	bl	exit
.L7:
	mov	r1, #512
	ldr	r0, [fp, #-32]
	bl	listen
	mov	r3, r0
	cmp	r3, #0
	beq	.L8
	ldr	r0, .L11+20
	bl	perror
	mvn	r0, #0
	bl	exit
.L8:
	ldr	r2, [fp, #-44]
	ldr	r1, [fp, #-40]
	ldr	r0, .L11+24
	bl	printf
	ldr	r3, [fp, #-32]
	ldr	r2, .L11
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L10
	bl	__stack_chk_fail
.L10:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L12:
	.align	2
.L11:
	.word	.LC6
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.size	init_server, .-init_server
	.align	2
	.global	max
	.syntax unified
	.arm
	.fpu softvfp
	.type	max, %function
max:
	@ 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]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	movge	r3, r2
	movlt	r3, r3
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	max, .-max
	.section	.rodata
	.align	2
.LC7:
	.ascii	"read error\000"
	.align	2
.LC8:
	.ascii	"client closed\000"
	.align	2
.LC9:
	.ascii	"read %d bytes data: %s\000"
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	read_fd
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_fd, %function
read_fd:
	@ args = 0, pretend = 0, frame = 1040
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1040
	str	r0, [fp, #-1040]
	ldr	r3, .L22
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	mov	r3, #1024
	mov	r2, r3
	mov	r1, #0
	bl	memset
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, r3
	ldr	r0, [fp, #-1040]
	bl	read
	str	r0, [fp, #-1036]
	ldr	r3, [fp, #-1036]
	cmp	r3, #0
	bge	.L16
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #4
	bne	.L17
	mov	r3, #0
	b	.L20
.L17:
	ldr	r0, .L22+4
	bl	perror
	mvn	r3, #0
	b	.L20
.L16:
	ldr	r3, [fp, #-1036]
	cmp	r3, #0
	bne	.L19
	ldr	r0, .L22+8
	bl	puts
	mvn	r3, #0
	b	.L20
.L19:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, r3
	ldr	r1, [fp, #-1036]
	ldr	r0, .L22+12
	bl	printf
	mov	r3, #0
.L20:
	ldr	r2, .L22
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L21
	bl	__stack_chk_fail
.L21:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L23:
	.align	2
.L22:
	.word	.LC10
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.size	read_fd, .-read_fd
	.section	.rodata
	.align	2
.LC11:
	.ascii	"setsockopt error\000"
	.align	2
.LC12:
	.ascii	"%d socket ready to read\012\000"
	.align	2
.LC13:
	.ascii	"select error\000"
	.align	2
.LC14:
	.ascii	"accept error\000"
	.align	2
.LC15:
	.ascii	"inet_ntop error\000"
	.align	2
.LC16:
	.ascii	"accept a client(%d), ip(%s), port(%d)\012\000"
	.align	2
.LC17:
	.ascii	"too many clients, close this one\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 = 4440
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #4416
	sub	sp, sp, #36
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r0, [r3, #-340]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r1, [r3, #-344]
	ldr	r3, .L58
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	mov	r1, #1
	mov	r0, #13
	bl	signal
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #16
	str	r3, [r2, #-336]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #1
	str	r3, [r2, #-332]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	ldr	r1, .L58+4
	mov	r0, #0
	bl	init_server
	str	r0, [r4, #-308]
	sub	r3, fp, #4416
	sub	r3, r3, #12
	sub	r3, r3, #12
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r0, r2
	mov	r2, #4
	str	r2, [sp]
	mov	r2, #2
	mov	r1, #1
	ldr	r0, [r0, #-308]
	bl	setsockopt
	mov	r3, r0
	cmp	r3, #0
	beq	.L25
	ldr	r0, .L58+8
	bl	perror
	mvn	r0, #0
	bl	exit
.L25:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4224
	sub	r3, r3, #12
	sub	r3, r3, #20
	str	r3, [r2, #-304]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-312]
	b	.L26
.L27:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-304]
	sub	r2, fp, #4096
	sub	r2, r2, #12
	ldr	r2, [r2, #-312]
	mov	r1, #0
	str	r1, [r3, r2, lsl #2]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-312]
	add	r3, r3, #1
	str	r3, [r2, #-312]
.L26:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-312]
	cmp	r3, #31
	bls	.L27
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-308]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r1, r3
	lsl	r3, r2, #2
	add	r3, r1, r3
	ldr	r1, [r3, #-148]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-308]
	rsbs	r0, r3, #0
	and	r3, r3, #31
	and	r0, r0, #31
	rsbpl	r3, r0, #0
	mov	r0, #1
	lsl	r3, r0, r3
	orr	r1, r1, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r0, r3
	lsl	r3, r2, #2
	add	r3, r0, r3
	str	r1, [r3, #-148]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-316]
	b	.L28
.L29:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-316]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mvn	r2, #0
	str	r2, [r3, #-20]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-316]
	add	r3, r3, #1
	str	r3, [r2, #-316]
.L28:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-316]
	cmp	r3, #1024
	blt	.L29
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-308]
	str	r3, [r2, #-328]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mvn	r3, #0
	str	r3, [r2, #-324]
.L50:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r2, fp, #4096
	sub	r2, r2, #12
	sub	r3, r3, #276
	sub	r1, r2, #148
	mov	r2, #128
	mov	r0, r3
	bl	memcpy
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-328]
	add	r0, r3, #1
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r1, fp, #4352
	sub	r1, r1, #12
	sub	r1, r1, #20
	mov	r3, #0
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #0
	bl	select
	str	r0, [r4, #-320]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r1, [r3, #-320]
	ldr	r0, .L58+12
	bl	printf
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-320]
	cmp	r3, #0
	bge	.L30
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #4
	beq	.L52
	ldr	r0, .L58+16
	bl	perror
	mvn	r0, #0
	bl	exit
.L30:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-308]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	sub	r2, fp, #4096
	sub	r2, r2, #12
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3, #-276]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-308]
	rsbs	r1, r3, #0
	and	r3, r3, #31
	and	r1, r1, #31
	rsbpl	r3, r1, #0
	mov	r1, #1
	lsl	r3, r1, r3
	and	r3, r3, r2
	cmp	r3, #0
	beq	.L33
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #16
	str	r3, [r2, #-336]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, [r3, #-336]
	sub	r3, fp, #4352
	sub	r3, r3, #12
	sub	r3, r3, #36
	mov	r1, #0
	mov	r0, r3
	bl	memset
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r2, fp, #4416
	sub	r2, r2, #12
	sub	r2, r2, #16
	sub	r3, fp, #4352
	sub	r3, r3, #12
	sub	r3, r3, #36
	sub	r1, fp, #4096
	sub	r1, r1, #12
	mov	r0, r1
	mov	r1, r3
	ldr	r0, [r0, #-308]
	bl	accept
	str	r0, [r4, #-300]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-300]
	cmn	r3, #1
	bne	.L34
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #4
	beq	.L53
	ldr	r0, .L58+20
	bl	perror
	mvn	r0, #0
	bl	exit
.L34:
	sub	r2, fp, #32
	sub	r3, fp, #4352
	sub	r3, r3, #12
	sub	r3, r3, #36
	add	r1, r3, #4
	mov	r3, #16
	mov	r0, #2
	bl	inet_ntop
	mov	r3, r0
	cmp	r3, #0
	bne	.L37
	ldr	r0, .L58+24
	bl	perror
	mvn	r0, #0
	bl	exit
.L37:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #292
	ldrh	r3, [r3, #2]
	mov	r0, r3
	bl	ntohs
	mov	r3, r0
	mov	r0, r3
	sub	r2, fp, #32
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r1, r3
	mov	r3, r0
	ldr	r1, [r1, #-300]
	ldr	r0, .L58+28
	bl	printf
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-316]
	b	.L38
.L41:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-316]
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r3, [r3, #-20]
	cmn	r3, #1
	beq	.L54
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-316]
	add	r3, r3, #1
	str	r3, [r2, #-316]
.L38:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-316]
	cmp	r3, #1024
	blt	.L41
	b	.L40
.L54:
	nop
.L40:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-316]
	cmp	r3, #1024
	bne	.L42
	ldr	r0, .L58+32
	bl	puts
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-300]
	bl	close
	b	.L43
.L42:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-300]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r1, r3
	lsl	r3, r2, #2
	add	r3, r1, r3
	ldr	r1, [r3, #-148]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-300]
	rsbs	r0, r3, #0
	and	r3, r3, #31
	and	r0, r0, #31
	rsbpl	r3, r0, #0
	mov	r0, #1
	lsl	r3, r0, r3
	orr	r1, r1, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r0, r3
	lsl	r3, r2, #2
	add	r3, r0, r3
	str	r1, [r3, #-148]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-316]
	lsl	r3, r3, #2
	add	r3, r2, r3
	sub	r2, fp, #4096
	sub	r2, r2, #12
	ldr	r2, [r2, #-300]
	str	r2, [r3, #-20]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r1, [r2, #-300]
	ldr	r0, [r3, #-328]
	bl	max
	str	r0, [r4, #-328]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, [r2, #-316]
	ldr	r3, [r3, #-324]
	cmp	r2, r3
	ble	.L43
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-316]
	str	r3, [r2, #-324]
.L43:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-320]
	sub	r3, r3, #1
	str	r3, [r2, #-320]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-320]
	cmp	r3, #0
	ble	.L55
.L33:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2, #-316]
	b	.L45
.L49:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r1, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-316]
	lsl	r3, r3, #2
	add	r3, r1, r3
	ldr	r3, [r3, #-20]
	str	r3, [r2, #-300]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-300]
	cmp	r3, #0
	blt	.L56
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-300]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	sub	r2, fp, #4096
	sub	r2, r2, #12
	lsl	r3, r3, #2
	add	r3, r2, r3
	ldr	r2, [r3, #-276]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-300]
	rsbs	r1, r3, #0
	and	r3, r3, #31
	and	r1, r1, #31
	rsbpl	r3, r1, #0
	mov	r1, #1
	lsl	r3, r1, r3
	and	r3, r3, r2
	cmp	r3, #0
	beq	.L47
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-300]
	bl	read_fd
	str	r0, [r4, #-296]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-296]
	cmp	r3, #0
	beq	.L48
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-300]
	bl	close
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-300]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r1, r3
	lsl	r3, r2, #2
	add	r3, r1, r3
	ldr	r1, [r3, #-148]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-300]
	rsbs	r0, r3, #0
	and	r3, r3, #31
	and	r0, r0, #31
	rsbpl	r3, r0, #0
	mov	r0, #1
	lsl	r3, r0, r3
	mvn	r3, r3
	and	r1, r1, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r0, r3
	lsl	r3, r2, #2
	add	r3, r0, r3
	str	r1, [r3, #-148]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-316]
	lsl	r3, r3, #2
	add	r3, r2, r3
	mvn	r2, #0
	str	r2, [r3, #-20]
.L48:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-320]
	sub	r3, r3, #1
	str	r3, [r2, #-320]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-320]
	cmp	r3, #0
	ble	.L57
	b	.L47
.L56:
	nop
.L47:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-316]
	add	r3, r3, #1
	str	r3, [r2, #-316]
.L45:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, [r2, #-316]
	ldr	r3, [r3, #-324]
	cmp	r2, r3
	ble	.L49
	b	.L50
.L52:
	nop
	b	.L50
.L53:
	nop
	b	.L50
.L55:
	nop
	b	.L50
.L57:
	nop
	b	.L50
.L59:
	.align	2
.L58:
	.word	.LC18
	.word	8888
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
