	.file	"1226632.c"
	.intel_syntax noprefix
	.text
	.globl	pollfds
	.bss
	.align 32
	.type	pollfds, @object
	.size	pollfds, 40
pollfds:
	.zero	40
	.globl	pollnum
	.align 4
	.type	pollnum, @object
	.size	pollnum, 4
pollnum:
	.zero	4
	.section	.rodata
.LC0:
	.string	"Error: fcntl(F_GETFL): %d\n"
.LC1:
	.string	"Error: fcntl(F_SETFL): %d\n"
	.text
	.type	setblocking, @function
setblocking:
.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, 32
	mov	DWORD PTR -20[rbp], edi
	mov	eax, esi
	mov	BYTE PTR -24[rbp], al
	mov	eax, DWORD PTR -20[rbp]
	mov	edx, 0
	mov	esi, 3
	mov	edi, eax
	mov	eax, 0
	call	fcntl@PLT
	mov	DWORD PTR -8[rbp], eax
	cmp	DWORD PTR -8[rbp], -1
	jne	.L2
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	cmp	BYTE PTR -24[rbp], 0
	je	.L3
	and	DWORD PTR -8[rbp], -2049
	jmp	.L4
.L3:
	or	DWORD PTR -8[rbp], 2048
.L4:
	mov	edx, DWORD PTR -8[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	esi, 4
	mov	edi, eax
	mov	eax, 0
	call	fcntl@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -8[rbp], -1
	jne	.L6
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	setblocking, .-setblocking
	.globl	pollfds_add
	.type	pollfds_add, @function
pollfds_add:
.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 -20[rbp], edi
	mov	eax, DWORD PTR pollnum[rip]
	cmp	eax, 4
	jg	.L8
	mov	eax, DWORD PTR pollnum[rip]
	lea	edx, 1[rax]
	mov	DWORD PTR pollnum[rip], edx
	mov	DWORD PTR -4[rbp], eax
	jmp	.L9
.L8:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L10
.L12:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, pollfds[rip]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	js	.L14
	add	DWORD PTR -4[rbp], 1
.L10:
	cmp	DWORD PTR -4[rbp], 4
	jle	.L12
	mov	eax, -1
	jmp	.L13
.L14:
	nop
.L9:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rcx, 0[0+rax*8]
	lea	rdx, pollfds[rip]
	mov	eax, DWORD PTR -20[rbp]
	mov	DWORD PTR [rcx+rdx], eax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, pollfds[rip+4]
	mov	WORD PTR [rdx+rax], 1
	mov	eax, 0
.L13:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	pollfds_add, .-pollfds_add
	.globl	pollfds_del
	.type	pollfds_del, @function
pollfds_del:
.LFB8:
	.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 -20[rbp], edi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L16
.L19:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, pollfds[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cmp	DWORD PTR -20[rbp], eax
	jne	.L17
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, pollfds[rip]
	mov	DWORD PTR [rdx+rax], -1
	jmp	.L18
.L17:
	add	DWORD PTR -4[rbp], 1
.L16:
	mov	eax, DWORD PTR pollnum[rip]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L19
	nop
.L18:
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	pollfds_del, .-pollfds_del
	.section	.rodata
.LC2:
	.string	"error: socket: %d\n"
.LC3:
	.string	"Cannot bind IPv4, errno: %d\n"
.LC4:
	.string	"error: socket(AF_INET6): %d\n"
.LC5:
	.string	"error: setsockopt: %d\n"
.LC6:
	.string	"Cannot bind IPv6, errno: %d\n"
	.align 8
.LC7:
	.string	"Asynchronous TCP echo server waits for connections on port %d...\n"
.LC8:
	.string	"poll error: %d\n"
.LC9:
	.string	"error: accept: %d\n"
.LC10:
	.string	"Connection #%d from %s fd=%d\n"
.LC11:
	.string	"error: send: %d\n"
.LC12:
	.string	"error: recv: %d\n"
.LC13:
	.string	"Connection fd=%d closed\n"
	.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, 416
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -396[rbp], 0
	mov	QWORD PTR -352[rbp], 0
	mov	QWORD PTR -344[rbp], 0
	mov	WORD PTR -352[rbp], 2
	mov	edi, 4242
	call	htons@PLT
	mov	WORD PTR -350[rbp], ax
	mov	edi, 0
	call	htonl@PLT
	mov	DWORD PTR -348[rbp], eax
	mov	QWORD PTR -336[rbp], 0
	mov	QWORD PTR -328[rbp], 0
	mov	QWORD PTR -320[rbp], 0
	mov	DWORD PTR -312[rbp], 0
	mov	WORD PTR -336[rbp], 10
	mov	edi, 4242
	call	htons@PLT
	mov	WORD PTR -334[rbp], ax
	mov	edx, 6
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -392[rbp], eax
	cmp	DWORD PTR -392[rbp], 0
	jns	.L21
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L21:
	lea	rcx, -352[rbp]
	mov	eax, DWORD PTR -392[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	mov	DWORD PTR -388[rbp], eax
	cmp	DWORD PTR -388[rbp], -1
	jne	.L22
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
.L22:
	add	DWORD PTR -396[rbp], 1
	mov	eax, DWORD PTR -392[rbp]
	mov	esi, 0
	mov	edi, eax
	call	setblocking
	mov	eax, DWORD PTR -392[rbp]
	mov	esi, 5
	mov	edi, eax
	call	listen@PLT
	mov	eax, DWORD PTR -392[rbp]
	mov	edi, eax
	call	pollfds_add
	mov	edx, 6
	mov	esi, 1
	mov	edi, 10
	call	socket@PLT
	mov	DWORD PTR -384[rbp], eax
	cmp	DWORD PTR -384[rbp], 0
	jns	.L23
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L23:
	mov	DWORD PTR -412[rbp], 1
	lea	rdx, -412[rbp]
	mov	eax, DWORD PTR -384[rbp]
	mov	r8d, 4
	mov	rcx, rdx
	mov	edx, 26
	mov	esi, 41
	mov	edi, eax
	call	setsockopt@PLT
	mov	DWORD PTR -388[rbp], eax
	cmp	DWORD PTR -388[rbp], 0
	jns	.L24
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	edi, 1
	call	exit@PLT
.L24:
	lea	rcx, -336[rbp]
	mov	eax, DWORD PTR -384[rbp]
	mov	edx, 28
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	mov	DWORD PTR -388[rbp], eax
	cmp	DWORD PTR -388[rbp], -1
	jne	.L25
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
.L25:
	add	DWORD PTR -396[rbp], 1
	mov	eax, DWORD PTR -384[rbp]
	mov	esi, 0
	mov	edi, eax
	call	setblocking
	mov	eax, DWORD PTR -384[rbp]
	mov	esi, 5
	mov	edi, eax
	call	listen@PLT
	mov	eax, DWORD PTR -384[rbp]
	mov	edi, eax
	call	pollfds_add
	mov	esi, 4242
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
.L42:
	mov	DWORD PTR -408[rbp], 128
	mov	eax, DWORD PTR pollnum[rip]
	cdqe
	mov	edx, -1
	mov	rsi, rax
	lea	rdi, pollfds[rip]
	call	poll@PLT
	mov	DWORD PTR -388[rbp], eax
	cmp	DWORD PTR -388[rbp], -1
	jne	.L26
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L42
.L26:
	mov	DWORD PTR -404[rbp], 0
	jmp	.L28
.L41:
	mov	eax, DWORD PTR -404[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, pollfds[rip+6]
	movzx	eax, WORD PTR [rdx+rax]
	cwde
	and	eax, 1
	test	eax, eax
	je	.L44
	mov	eax, DWORD PTR -404[rbp]
	cdqe
	lea	rdx, 0[0+rax*8]
	lea	rax, pollfds[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	DWORD PTR -380[rbp], eax
	mov	eax, DWORD PTR -404[rbp]
	cmp	eax, DWORD PTR -396[rbp]
	jge	.L31
	lea	rdx, -408[rbp]
	lea	rcx, -304[rbp]
	mov	eax, DWORD PTR -380[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -372[rbp], eax
	lea	rax, -304[rbp]
	add	rax, 4
	mov	QWORD PTR -360[rbp], rax
	cmp	DWORD PTR -372[rbp], 0
	jns	.L32
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L30
.L32:
	movzx	eax, WORD PTR -304[rbp]
	movzx	eax, ax
	lea	rdx, -176[rbp]
	mov	rsi, QWORD PTR -360[rbp]
	mov	ecx, 32
	mov	edi, eax
	call	inet_ntop@PLT
	mov	eax, DWORD PTR counter.1[rip]
	lea	edx, 1[rax]
	mov	DWORD PTR counter.1[rip], edx
	mov	ecx, DWORD PTR -372[rbp]
	lea	rdx, -176[rbp]
	mov	esi, eax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -372[rbp]
	mov	edi, eax
	call	pollfds_add
	test	eax, eax
	jns	.L33
	mov	eax, DWORD PTR -372[rbp]
	mov	ecx, 0
	mov	edx, 21
	lea	rsi, msg.0[rip]
	mov	edi, eax
	call	send@PLT
	mov	DWORD PTR -388[rbp], eax
	cmp	DWORD PTR -388[rbp], 0
	jns	.L34
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
.L34:
	mov	eax, DWORD PTR -372[rbp]
	mov	edi, eax
	call	close@PLT
	jmp	.L30
.L33:
	mov	eax, DWORD PTR -372[rbp]
	mov	esi, 0
	mov	edi, eax
	call	setblocking
	jmp	.L30
.L31:
	lea	rsi, -144[rbp]
	mov	eax, DWORD PTR -380[rbp]
	mov	ecx, 0
	mov	edx, 128
	mov	edi, eax
	call	recv@PLT
	mov	DWORD PTR -400[rbp], eax
	cmp	DWORD PTR -400[rbp], 0
	jg	.L35
	cmp	DWORD PTR -400[rbp], 0
	jns	.L45
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L36
.L45:
	nop
.L36:
	mov	eax, DWORD PTR -380[rbp]
	mov	edi, eax
	call	pollfds_del
	mov	eax, DWORD PTR -380[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -380[rbp]
	mov	esi, eax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L30
.L35:
	mov	eax, DWORD PTR -380[rbp]
	mov	esi, 1
	mov	edi, eax
	call	setblocking
	lea	rax, -144[rbp]
	mov	QWORD PTR -368[rbp], rax
	jmp	.L38
.L40:
	mov	eax, DWORD PTR -400[rbp]
	movsx	rdx, eax
	mov	rsi, QWORD PTR -368[rbp]
	mov	eax, DWORD PTR -380[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	mov	DWORD PTR -376[rbp], eax
	cmp	DWORD PTR -376[rbp], 0
	jns	.L39
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	esi, eax
	lea	rdi, .LC11[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L36
.L39:
	mov	eax, DWORD PTR -376[rbp]
	cdqe
	add	QWORD PTR -368[rbp], rax
	mov	eax, DWORD PTR -376[rbp]
	sub	DWORD PTR -400[rbp], eax
.L38:
	cmp	DWORD PTR -400[rbp], 0
	jne	.L40
	mov	eax, DWORD PTR -380[rbp]
	mov	esi, 0
	mov	edi, eax
	call	setblocking
	jmp	.L30
.L44:
	nop
.L30:
	add	DWORD PTR -404[rbp], 1
.L28:
	mov	eax, DWORD PTR pollnum[rip]
	cmp	DWORD PTR -404[rbp], eax
	jl	.L41
	jmp	.L42
	.cfi_endproc
.LFE9:
	.size	main, .-main
	.local	counter.1
	.comm	counter.1,4,4
	.data
	.align 16
	.type	msg.0, @object
	.size	msg.0, 22
msg.0:
	.string	"Too many connections\n"
	.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	"1226632.c"
	.text
	.comm	pollfds,40,4
	.comm	pollnum,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Error: fcntl(F_GETFL): %d\012\000"
	.align	2
.LC1:
	.ascii	"Error: fcntl(F_SETFL): %d\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	setblocking, %function
setblocking:
	@ 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	r3, r1
	strb	r3, [fp, #-17]
	mov	r2, #0
	mov	r1, #3
	ldr	r0, [fp, #-16]
	bl	fcntl
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	bne	.L2
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L7
	bl	printf
	mov	r0, #1
	bl	exit
.L2:
	ldrb	r3, [fp, #-17]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L3
	ldr	r3, [fp, #-12]
	bic	r3, r3, #2048
	str	r3, [fp, #-12]
	b	.L4
.L3:
	ldr	r3, [fp, #-12]
	orr	r3, r3, #2048
	str	r3, [fp, #-12]
.L4:
	ldr	r2, [fp, #-12]
	mov	r1, #4
	ldr	r0, [fp, #-16]
	bl	fcntl
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-12]
	cmn	r3, #1
	bne	.L6
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L7+4
	bl	printf
	mov	r0, #1
	bl	exit
.L6:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	.LC0
	.word	.LC1
	.size	setblocking, .-setblocking
	.align	2
	.global	pollfds_add
	.syntax unified
	.arm
	.fpu softvfp
	.type	pollfds_add, %function
pollfds_add:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	ldr	r3, .L17
	ldr	r3, [r3]
	cmp	r3, #4
	bgt	.L10
	ldr	r3, .L17
	ldr	r3, [r3]
	add	r2, r3, #1
	ldr	r1, .L17
	str	r2, [r1]
	str	r3, [fp, #-8]
	b	.L11
.L10:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L12
.L14:
	ldr	r2, .L17+4
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #3]
	cmp	r3, #0
	blt	.L16
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L12:
	ldr	r3, [fp, #-8]
	cmp	r3, #4
	ble	.L14
	mvn	r3, #0
	b	.L15
.L16:
	nop
.L11:
	ldr	r1, .L17+4
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-16]
	str	r2, [r1, r3, lsl #3]
	ldr	r2, .L17+4
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #3
	add	r3, r2, r3
	add	r3, r3, #4
	mov	r2, #1
	strh	r2, [r3]	@ movhi
	mov	r3, #0
.L15:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L18:
	.align	2
.L17:
	.word	pollnum
	.word	pollfds
	.size	pollfds_add, .-pollfds_add
	.align	2
	.global	pollfds_del
	.syntax unified
	.arm
	.fpu softvfp
	.type	pollfds_del, %function
pollfds_del:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #20
	str	r0, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L20
.L23:
	ldr	r2, .L24
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #3]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bne	.L21
	ldr	r2, .L24
	ldr	r3, [fp, #-8]
	mvn	r1, #0
	str	r1, [r2, r3, lsl #3]
	b	.L22
.L21:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L20:
	ldr	r3, .L24+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L23
	nop
.L22:
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
.L25:
	.align	2
.L24:
	.word	pollfds
	.word	pollnum
	.size	pollfds_del, .-pollfds_del
	.section	.rodata
	.align	2
.LC2:
	.ascii	"error: socket: %d\012\000"
	.align	2
.LC3:
	.ascii	"Cannot bind IPv4, errno: %d\012\000"
	.align	2
.LC4:
	.ascii	"error: socket(AF_INET6): %d\012\000"
	.align	2
.LC5:
	.ascii	"error: setsockopt: %d\012\000"
	.align	2
.LC6:
	.ascii	"Cannot bind IPv6, errno: %d\012\000"
	.align	2
.LC7:
	.ascii	"Asynchronous TCP echo server waits for connections "
	.ascii	"on port %d...\012\000"
	.align	2
.LC8:
	.ascii	"poll error: %d\012\000"
	.align	2
.LC9:
	.ascii	"error: accept: %d\012\000"
	.align	2
.LC10:
	.ascii	"Connection #%d from %s fd=%d\012\000"
	.align	2
.LC11:
	.ascii	"error: send: %d\012\000"
	.align	2
.LC12:
	.ascii	"error: recv: %d\012\000"
	.align	2
.LC13:
	.ascii	"Connection fd=%d closed\012\000"
	.align	2
.LC14:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 392
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #400
	ldr	r3, .L52
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-372]
	sub	r3, fp, #340
	mov	r2, #0
	str	r2, [r3]
	str	r2, [r3, #4]
	str	r2, [r3, #8]
	str	r2, [r3, #12]
	sub	r3, fp, #4
	sub	r3, r3, #336
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	ldr	r0, .L52+4
	bl	htons
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #4
	sub	r3, r3, #336
	strh	r2, [r3, #2]	@ movhi
	mov	r0, #0
	bl	htonl
	mov	r3, r0
	str	r3, [fp, #-336]
	sub	r3, fp, #324
	mov	r2, #0
	str	r2, [r3]
	str	r2, [r3, #4]
	str	r2, [r3, #8]
	str	r2, [r3, #12]
	str	r2, [r3, #16]
	str	r2, [r3, #20]
	str	r2, [r3, #24]
	sub	r3, fp, #4
	sub	r3, r3, #320
	mov	r2, #10
	strh	r2, [r3]	@ movhi
	ldr	r0, .L52+4
	bl	htons
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #4
	sub	r3, r3, #320
	strh	r2, [r3, #2]	@ movhi
	mov	r2, #6
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-368]
	ldr	r3, [fp, #-368]
	cmp	r3, #0
	bge	.L27
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L52+8
	bl	printf
	mov	r0, #1
	bl	exit
.L27:
	sub	r3, fp, #340
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-368]
	bl	bind
	str	r0, [fp, #-364]
	ldr	r3, [fp, #-364]
	cmn	r3, #1
	bne	.L28
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L52+12
	bl	printf
.L28:
	ldr	r3, [fp, #-372]
	add	r3, r3, #1
	str	r3, [fp, #-372]
	mov	r1, #0
	ldr	r0, [fp, #-368]
	bl	setblocking
	mov	r1, #5
	ldr	r0, [fp, #-368]
	bl	listen
	ldr	r0, [fp, #-368]
	bl	pollfds_add
	mov	r2, #6
	mov	r1, #1
	mov	r0, #10
	bl	socket
	str	r0, [fp, #-360]
	ldr	r3, [fp, #-360]
	cmp	r3, #0
	bge	.L29
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L52+16
	bl	printf
	mov	r0, #1
	bl	exit
.L29:
	mov	r3, #1
	str	r3, [fp, #-392]
	sub	r3, fp, #392
	mov	r2, #4
	str	r2, [sp]
	mov	r2, #26
	mov	r1, #41
	ldr	r0, [fp, #-360]
	bl	setsockopt
	str	r0, [fp, #-364]
	ldr	r3, [fp, #-364]
	cmp	r3, #0
	bge	.L30
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L52+20
	bl	printf
	mov	r0, #1
	bl	exit
.L30:
	sub	r3, fp, #324
	mov	r2, #28
	mov	r1, r3
	ldr	r0, [fp, #-360]
	bl	bind
	str	r0, [fp, #-364]
	ldr	r3, [fp, #-364]
	cmn	r3, #1
	bne	.L31
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L52+24
	bl	printf
.L31:
	ldr	r3, [fp, #-372]
	add	r3, r3, #1
	str	r3, [fp, #-372]
	mov	r1, #0
	ldr	r0, [fp, #-360]
	bl	setblocking
	mov	r1, #5
	ldr	r0, [fp, #-360]
	bl	listen
	ldr	r0, [fp, #-360]
	bl	pollfds_add
	ldr	r1, .L52+4
	ldr	r0, .L52+28
	bl	printf
.L48:
	mov	r3, #128
	str	r3, [fp, #-388]
	ldr	r3, .L52+32
	ldr	r3, [r3]
	mvn	r2, #0
	mov	r1, r3
	ldr	r0, .L52+36
	bl	poll
	str	r0, [fp, #-364]
	ldr	r3, [fp, #-364]
	cmn	r3, #1
	bne	.L32
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L52+40
	bl	printf
	b	.L48
.L32:
	mov	r3, #0
	str	r3, [fp, #-384]
	b	.L34
.L47:
	ldr	r2, .L52+36
	ldr	r3, [fp, #-384]
	lsl	r3, r3, #3
	add	r3, r2, r3
	add	r3, r3, #6
	ldrsh	r3, [r3]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L50
	ldr	r2, .L52+36
	ldr	r3, [fp, #-384]
	ldr	r3, [r2, r3, lsl #3]
	str	r3, [fp, #-356]
	ldr	r2, [fp, #-384]
	ldr	r3, [fp, #-372]
	cmp	r2, r3
	bge	.L37
	sub	r2, fp, #388
	sub	r3, fp, #296
	mov	r1, r3
	ldr	r0, [fp, #-356]
	bl	accept
	str	r0, [fp, #-348]
	sub	r3, fp, #296
	add	r3, r3, #4
	str	r3, [fp, #-344]
	ldr	r3, [fp, #-348]
	cmp	r3, #0
	bge	.L38
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L52+44
	bl	printf
	b	.L36
.L38:
	sub	r3, fp, #4
	sub	r3, r3, #292
	ldrh	r3, [r3]
	mov	r0, r3
	sub	r2, fp, #168
	mov	r3, #32
	ldr	r1, [fp, #-344]
	bl	inet_ntop
	ldr	r3, .L52+48
	ldr	r1, [r3]
	add	r3, r1, #1
	ldr	r2, .L52+48
	str	r3, [r2]
	sub	r2, fp, #168
	ldr	r3, [fp, #-348]
	ldr	r0, .L52+52
	bl	printf
	ldr	r0, [fp, #-348]
	bl	pollfds_add
	mov	r3, r0
	cmp	r3, #0
	bge	.L39
	mov	r3, #0
	mov	r2, #21
	ldr	r1, .L52+56
	ldr	r0, [fp, #-348]
	bl	send
	str	r0, [fp, #-364]
	ldr	r3, [fp, #-364]
	cmp	r3, #0
	bge	.L40
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L52+60
	bl	printf
.L40:
	ldr	r0, [fp, #-348]
	bl	close
	b	.L36
.L39:
	mov	r1, #0
	ldr	r0, [fp, #-348]
	bl	setblocking
	b	.L36
.L37:
	sub	r1, fp, #136
	mov	r3, #0
	mov	r2, #128
	ldr	r0, [fp, #-356]
	bl	recv
	str	r0, [fp, #-380]
	ldr	r3, [fp, #-380]
	cmp	r3, #0
	bgt	.L41
	ldr	r3, [fp, #-380]
	cmp	r3, #0
	bge	.L51
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L52+64
	bl	printf
	b	.L42
.L51:
	nop
.L42:
	ldr	r0, [fp, #-356]
	bl	pollfds_del
	ldr	r0, [fp, #-356]
	bl	close
	ldr	r1, [fp, #-356]
	ldr	r0, .L52+68
	bl	printf
	b	.L36
.L41:
	mov	r1, #1
	ldr	r0, [fp, #-356]
	bl	setblocking
	sub	r3, fp, #136
	str	r3, [fp, #-376]
	b	.L44
.L46:
	ldr	r2, [fp, #-380]
	mov	r3, #0
	ldr	r1, [fp, #-376]
	ldr	r0, [fp, #-356]
	bl	send
	str	r0, [fp, #-352]
	ldr	r3, [fp, #-352]
	cmp	r3, #0
	bge	.L45
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L52+60
	bl	printf
	b	.L42
.L45:
	ldr	r3, [fp, #-352]
	ldr	r2, [fp, #-376]
	add	r3, r2, r3
	str	r3, [fp, #-376]
	ldr	r2, [fp, #-380]
	ldr	r3, [fp, #-352]
	sub	r3, r2, r3
	str	r3, [fp, #-380]
.L44:
	ldr	r3, [fp, #-380]
	cmp	r3, #0
	bne	.L46
	mov	r1, #0
	ldr	r0, [fp, #-356]
	bl	setblocking
	b	.L36
.L50:
	nop
.L36:
	ldr	r3, [fp, #-384]
	add	r3, r3, #1
	str	r3, [fp, #-384]
.L34:
	ldr	r3, .L52+32
	ldr	r3, [r3]
	ldr	r2, [fp, #-384]
	cmp	r2, r3
	blt	.L47
	b	.L48
.L53:
	.align	2
.L52:
	.word	.LC14
	.word	4242
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	pollnum
	.word	pollfds
	.word	.LC8
	.word	.LC9
	.word	counter.6189
	.word	.LC10
	.word	msg.6205
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.size	main, .-main
	.local	counter.6189
	.comm	counter.6189,4,4
	.data
	.align	2
	.type	msg.6205, %object
	.size	msg.6205, 22
msg.6205:
	.ascii	"Too many connections\012\000"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
