	.file	"847578.c"
	.intel_syntax noprefix
	.text
	.globl	ev
	.bss
	.align 8
	.type	ev, @object
	.size	ev, 12
ev:
	.zero	12
	.globl	events
	.align 32
	.type	events, @object
	.size	events, 120
events:
	.zero	120
	.globl	listen_sock
	.align 4
	.type	listen_sock, @object
	.size	listen_sock, 4
listen_sock:
	.zero	4
	.globl	conn_sock
	.align 4
	.type	conn_sock, @object
	.size	conn_sock, 4
conn_sock:
	.zero	4
	.globl	nfds
	.align 4
	.type	nfds, @object
	.size	nfds, 4
nfds:
	.zero	4
	.globl	epollfd
	.align 4
	.type	epollfd, @object
	.size	epollfd, 4
epollfd:
	.zero	4
	.section	.rodata
.LC0:
	.string	"Received SIGALRM"
	.text
	.globl	sigalrm_handler
	.type	sigalrm_handler, @function
sigalrm_handler:
.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	DWORD PTR -4[rbp], edi
	lea	rdi, .LC0[rip]
	call	puts@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	sigalrm_handler, .-sigalrm_handler
	.section	.rodata
.LC1:
	.string	"socket()"
.LC2:
	.string	"setsockopt(SO_REUSEADDR)"
.LC3:
	.string	"bind()"
.LC4:
	.string	"listen()"
	.text
	.globl	setup_listening_socket
	.type	setup_listening_socket, @function
setup_listening_socket:
.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, 64
	mov	DWORD PTR -52[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], -1
	jne	.L3
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	DWORD PTR -40[rbp], 1
	lea	rdx, -40[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	r8d, 4
	mov	rcx, rdx
	mov	edx, 2
	mov	esi, 1
	mov	edi, eax
	call	setsockopt@PLT
	test	eax, eax
	jns	.L4
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	lea	rax, -32[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	WORD PTR -32[rbp], 2
	mov	eax, DWORD PTR -52[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -30[rbp], ax
	mov	edi, 0
	call	htonl@PLT
	mov	DWORD PTR -28[rbp], eax
	lea	rcx, -32[rbp]
	mov	eax, DWORD PTR -36[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	jns	.L5
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	mov	eax, DWORD PTR -36[rbp]
	mov	esi, 10
	mov	edi, eax
	call	listen@PLT
	test	eax, eax
	jns	.L6
	lea	rdi, .LC4[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L6:
	mov	eax, DWORD PTR -36[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L8
	call	__stack_chk_fail@PLT
.L8:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	setup_listening_socket, .-setup_listening_socket
	.section	.rodata
.LC5:
	.string	"read"
	.text
	.globl	copy_fd
	.type	copy_fd, @function
copy_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	DWORD PTR -1064[rbp], esi
	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, 1023
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -1044[rbp], eax
	cmp	DWORD PTR -1044[rbp], -1
	jne	.L10
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L10:
	cmp	DWORD PTR -1044[rbp], 0
	je	.L14
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	lea	rcx, -1040[rbp]
	mov	eax, DWORD PTR -1064[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	jmp	.L9
.L14:
	nop
.L9:
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	copy_fd, .-copy_fd
	.section	.rodata
	.align 8
.LC6:
	.string	"No alarm set. Will not be interrupted."
.LC7:
	.string	"strtol()"
.LC8:
	.string	"Alarm after %ld seconds.\n"
.LC9:
	.string	"sigaction"
	.text
	.globl	setup_signals
	.type	setup_signals, @function
setup_signals:
.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, 192
	mov	DWORD PTR -180[rbp], edi
	mov	QWORD PTR -192[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -180[rbp], 1
	jg	.L16
	lea	rdi, .LC6[rip]
	call	puts@PLT
	jmp	.L15
.L16:
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 0
	mov	rax, QWORD PTR -192[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	edx, 10
	mov	esi, 0
	mov	rdi, rax
	call	strtol@PLT
	mov	QWORD PTR -168[rbp], rax
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	je	.L18
	lea	rdi, .LC7[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L18:
	cmp	QWORD PTR -168[rbp], 0
	je	.L19
	mov	rax, QWORD PTR -168[rbp]
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -160[rbp]
	add	rax, 8
	mov	rdi, rax
	call	sigemptyset@PLT
	mov	DWORD PTR -24[rbp], 268435456
	lea	rax, sigalrm_handler[rip]
	mov	QWORD PTR -160[rbp], rax
	lea	rax, -160[rbp]
	mov	edx, 0
	mov	rsi, rax
	mov	edi, 14
	call	sigaction@PLT
	cmp	eax, -1
	jne	.L21
	jmp	.L24
.L19:
	lea	rdi, .LC6[rip]
	call	puts@PLT
	jmp	.L15
.L24:
	lea	rdi, .LC9[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L21:
	mov	rax, QWORD PTR -168[rbp]
	mov	edi, eax
	call	alarm@PLT
.L15:
	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
.LFE9:
	.size	setup_signals, .-setup_signals
	.section	.rodata
.LC10:
	.string	"epoll_create1()"
	.text
	.globl	setup_epoll
	.type	setup_epoll, @function
setup_epoll:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	edi, 0
	call	epoll_create1@PLT
	mov	DWORD PTR epollfd[rip], eax
	mov	eax, DWORD PTR epollfd[rip]
	cmp	eax, -1
	jne	.L27
	lea	rdi, .LC10[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L27:
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	setup_epoll, .-setup_epoll
	.section	.rodata
.LC11:
	.string	"epoll_ctl"
	.text
	.globl	add_fd_to_epoll
	.type	add_fd_to_epoll, @function
add_fd_to_epoll:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	DWORD PTR -4[rbp], edi
	mov	DWORD PTR ev[rip], 1
	mov	eax, DWORD PTR -4[rbp]
	mov	DWORD PTR ev[rip+4], eax
	mov	eax, DWORD PTR epollfd[rip]
	mov	edx, DWORD PTR -4[rbp]
	lea	rcx, ev[rip]
	mov	esi, 1
	mov	edi, eax
	call	epoll_ctl@PLT
	cmp	eax, -1
	jne	.L30
	lea	rdi, .LC11[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L30:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	add_fd_to_epoll, .-add_fd_to_epoll
	.section	.rodata
.LC12:
	.string	"epoll_wait()"
.LC13:
	.string	"stdin ready.."
.LC14:
	.string	"socket data ready.."
.LC15:
	.string	"new connection ready.."
.LC16:
	.string	"accept()"
	.text
	.globl	main
	.type	main, @function
main:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	rdx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	rsi, rdx
	mov	edi, eax
	call	setup_signals
	mov	eax, 0
	call	setup_epoll
	mov	edi, 0
	call	add_fd_to_epoll
	mov	edi, 5000
	call	setup_listening_socket
	mov	DWORD PTR listen_sock[rip], eax
	mov	eax, DWORD PTR listen_sock[rip]
	mov	edi, eax
	call	add_fd_to_epoll
.L39:
	mov	eax, DWORD PTR epollfd[rip]
	mov	ecx, -1
	mov	edx, 10
	lea	rsi, events[rip]
	mov	edi, eax
	call	epoll_wait@PLT
	mov	DWORD PTR nfds[rip], eax
	mov	eax, DWORD PTR nfds[rip]
	cmp	eax, -1
	jne	.L32
	lea	rdi, .LC12[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L32:
	mov	DWORD PTR -4[rbp], 0
	jmp	.L33
.L38:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	lea	rax, events[rip+4]
	mov	eax, DWORD PTR [rdx+rax]
	test	eax, eax
	jne	.L34
	lea	rdi, .LC13[rip]
	call	puts@PLT
	mov	esi, 1
	mov	edi, 0
	call	copy_fd
	jmp	.L35
.L34:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	lea	rax, events[rip+4]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR conn_sock[rip]
	cmp	edx, eax
	jne	.L36
	lea	rdi, .LC14[rip]
	call	puts@PLT
	mov	edx, DWORD PTR conn_sock[rip]
	mov	eax, DWORD PTR conn_sock[rip]
	mov	esi, edx
	mov	edi, eax
	call	copy_fd
	jmp	.L35
.L36:
	mov	eax, DWORD PTR -4[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	mov	rdx, rax
	lea	rax, events[rip+4]
	mov	edx, DWORD PTR [rdx+rax]
	mov	eax, DWORD PTR listen_sock[rip]
	cmp	edx, eax
	jne	.L35
	lea	rdi, .LC15[rip]
	call	puts@PLT
	mov	eax, DWORD PTR listen_sock[rip]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR conn_sock[rip], eax
	mov	eax, DWORD PTR conn_sock[rip]
	cmp	eax, -1
	jne	.L37
	lea	rdi, .LC16[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L37:
	mov	eax, DWORD PTR conn_sock[rip]
	mov	edi, eax
	call	add_fd_to_epoll
.L35:
	add	DWORD PTR -4[rbp], 1
.L33:
	mov	eax, DWORD PTR nfds[rip]
	cmp	DWORD PTR -4[rbp], eax
	jl	.L38
	jmp	.L39
	.cfi_endproc
.LFE12:
	.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	"847578.c"
	.text
	.comm	ev,16,8
	.comm	events,160,8
	.comm	listen_sock,4,4
	.comm	conn_sock,4,4
	.comm	nfds,4,4
	.comm	epollfd,4,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Received SIGALRM\000"
	.text
	.align	2
	.global	sigalrm_handler
	.syntax unified
	.arm
	.fpu softvfp
	.type	sigalrm_handler, %function
sigalrm_handler:
	@ 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, .L2
	bl	puts
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L3:
	.align	2
.L2:
	.word	.LC0
	.size	sigalrm_handler, .-sigalrm_handler
	.section	.rodata
	.align	2
.LC1:
	.ascii	"socket()\000"
	.align	2
.LC2:
	.ascii	"setsockopt(SO_REUSEADDR)\000"
	.align	2
.LC3:
	.ascii	"bind()\000"
	.align	2
.LC4:
	.ascii	"listen()\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	setup_listening_socket
	.syntax unified
	.arm
	.fpu softvfp
	.type	setup_listening_socket, %function
setup_listening_socket:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #48
	str	r0, [fp, #-40]
	ldr	r3, .L11
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmn	r3, #1
	bne	.L5
	ldr	r0, .L11+4
	bl	perror
	mov	r0, #1
	bl	exit
.L5:
	mov	r3, #1
	str	r3, [fp, #-32]
	sub	r3, fp, #32
	mov	r2, #4
	str	r2, [sp]
	mov	r2, #2
	mov	r1, #1
	ldr	r0, [fp, #-28]
	bl	setsockopt
	mov	r3, r0
	cmp	r3, #0
	bge	.L6
	ldr	r0, .L11+8
	bl	perror
	mov	r0, #1
	bl	exit
.L6:
	sub	r3, fp, #24
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #2
	strh	r3, [fp, #-24]	@ movhi
	ldr	r3, [fp, #-40]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-22]	@ movhi
	mov	r0, #0
	bl	htonl
	mov	r3, r0
	str	r3, [fp, #-20]
	sub	r3, fp, #24
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-28]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	bge	.L7
	ldr	r0, .L11+12
	bl	perror
	mov	r0, #1
	bl	exit
.L7:
	mov	r1, #10
	ldr	r0, [fp, #-28]
	bl	listen
	mov	r3, r0
	cmp	r3, #0
	bge	.L8
	ldr	r0, .L11+16
	bl	perror
	mov	r0, #1
	bl	exit
.L8:
	ldr	r3, [fp, #-28]
	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	.LC5
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	setup_listening_socket, .-setup_listening_socket
	.section	.rodata
	.align	2
.LC6:
	.ascii	"read\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	copy_fd
	.syntax unified
	.arm
	.fpu softvfp
	.type	copy_fd, %function
copy_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]
	str	r1, [fp, #-1044]
	ldr	r3, .L19
	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
	ldr	r2, .L19+4
	mov	r1, r3
	ldr	r0, [fp, #-1040]
	bl	read
	str	r0, [fp, #-1036]
	ldr	r3, [fp, #-1036]
	cmn	r3, #1
	bne	.L14
	ldr	r0, .L19+8
	bl	perror
	mov	r0, #1
	bl	exit
.L14:
	ldr	r3, [fp, #-1036]
	cmp	r3, #0
	beq	.L18
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-1044]
	bl	write
	b	.L13
.L18:
	nop
.L13:
	ldr	r3, .L19
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L17
	bl	__stack_chk_fail
.L17:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	.LC7
	.word	1023
	.word	.LC6
	.size	copy_fd, .-copy_fd
	.section	.rodata
	.align	2
.LC8:
	.ascii	"No alarm set. Will not be interrupted.\000"
	.align	2
.LC9:
	.ascii	"strtol()\000"
	.align	2
.LC10:
	.ascii	"Alarm after %ld seconds.\012\000"
	.align	2
.LC11:
	.ascii	"sigaction\000"
	.align	2
.LC12:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	setup_signals
	.syntax unified
	.arm
	.fpu softvfp
	.type	setup_signals, %function
setup_signals:
	@ args = 0, pretend = 0, frame = 160
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #160
	str	r0, [fp, #-160]
	str	r1, [fp, #-164]
	ldr	r3, .L31
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-160]
	cmp	r3, #1
	bgt	.L22
	ldr	r0, .L31+4
	bl	puts
	b	.L21
.L22:
	bl	__errno_location
	mov	r3, r0
	mov	r2, #0
	str	r2, [r3]
	ldr	r3, [fp, #-164]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, #10
	mov	r1, #0
	mov	r0, r3
	bl	strtol
	str	r0, [fp, #-152]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L24
	ldr	r0, .L31+8
	bl	perror
	mov	r0, #1
	bl	exit
.L24:
	ldr	r3, [fp, #-152]
	cmp	r3, #0
	beq	.L25
	ldr	r1, [fp, #-152]
	ldr	r0, .L31+12
	bl	printf
	sub	r3, fp, #148
	add	r3, r3, #4
	mov	r0, r3
	bl	sigemptyset
	mov	r3, #268435456
	str	r3, [fp, #-16]
	ldr	r3, .L31+16
	str	r3, [fp, #-148]
	sub	r3, fp, #148
	mov	r2, #0
	mov	r1, r3
	mov	r0, #14
	bl	sigaction
	mov	r3, r0
	cmn	r3, #1
	bne	.L27
	b	.L30
.L25:
	ldr	r0, .L31+4
	bl	puts
	b	.L21
.L30:
	ldr	r0, .L31+20
	bl	perror
	mov	r0, #1
	bl	exit
.L27:
	ldr	r3, [fp, #-152]
	mov	r0, r3
	bl	alarm
.L21:
	ldr	r3, .L31
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L29
	bl	__stack_chk_fail
.L29:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L32:
	.align	2
.L31:
	.word	.LC12
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	sigalrm_handler
	.word	.LC11
	.size	setup_signals, .-setup_signals
	.section	.rodata
	.align	2
.LC13:
	.ascii	"epoll_create1()\000"
	.text
	.align	2
	.global	setup_epoll
	.syntax unified
	.arm
	.fpu softvfp
	.type	setup_epoll, %function
setup_epoll:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	mov	r0, #0
	bl	epoll_create1
	mov	r3, r0
	ldr	r2, .L36
	str	r3, [r2]
	ldr	r3, .L36
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L35
	ldr	r0, .L36+4
	bl	perror
	mov	r0, #1
	bl	exit
.L35:
	nop
	pop	{fp, pc}
.L37:
	.align	2
.L36:
	.word	epollfd
	.word	.LC13
	.size	setup_epoll, .-setup_epoll
	.section	.rodata
	.align	2
.LC14:
	.ascii	"epoll_ctl\000"
	.text
	.align	2
	.global	add_fd_to_epoll
	.syntax unified
	.arm
	.fpu softvfp
	.type	add_fd_to_epoll, %function
add_fd_to_epoll:
	@ 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	r3, .L41
	mov	r2, #1
	str	r2, [r3]
	ldr	r2, .L41
	ldr	r3, [fp, #-8]
	str	r3, [r2, #8]
	ldr	r3, .L41+4
	ldr	r0, [r3]
	ldr	r3, .L41
	ldr	r2, [fp, #-8]
	mov	r1, #1
	bl	epoll_ctl
	mov	r3, r0
	cmn	r3, #1
	bne	.L40
	ldr	r0, .L41+8
	bl	perror
	mov	r0, #1
	bl	exit
.L40:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L42:
	.align	2
.L41:
	.word	ev
	.word	epollfd
	.word	.LC14
	.size	add_fd_to_epoll, .-add_fd_to_epoll
	.section	.rodata
	.align	2
.LC15:
	.ascii	"epoll_wait()\000"
	.align	2
.LC16:
	.ascii	"stdin ready..\000"
	.align	2
.LC17:
	.ascii	"socket data ready..\000"
	.align	2
.LC18:
	.ascii	"new connection ready..\000"
	.align	2
.LC19:
	.ascii	"accept()\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	setup_signals
	bl	setup_epoll
	mov	r0, #0
	bl	add_fd_to_epoll
	ldr	r0, .L52
	bl	setup_listening_socket
	mov	r3, r0
	ldr	r2, .L52+4
	str	r3, [r2]
	ldr	r3, .L52+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	add_fd_to_epoll
.L51:
	ldr	r3, .L52+8
	ldr	r0, [r3]
	mvn	r3, #0
	mov	r2, #10
	ldr	r1, .L52+12
	bl	epoll_wait
	mov	r3, r0
	ldr	r2, .L52+16
	str	r3, [r2]
	ldr	r3, .L52+16
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L44
	ldr	r0, .L52+20
	bl	perror
	mov	r0, #1
	bl	exit
.L44:
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L45
.L50:
	ldr	r2, .L52+12
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #4
	add	r3, r2, r3
	ldr	r3, [r3, #8]
	cmp	r3, #0
	bne	.L46
	ldr	r0, .L52+24
	bl	puts
	mov	r1, #1
	mov	r0, #0
	bl	copy_fd
	b	.L47
.L46:
	ldr	r2, .L52+12
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #4
	add	r3, r2, r3
	ldr	r2, [r3, #8]
	ldr	r3, .L52+28
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L48
	ldr	r0, .L52+32
	bl	puts
	ldr	r3, .L52+28
	ldr	r3, [r3]
	ldr	r2, .L52+28
	ldr	r2, [r2]
	mov	r1, r2
	mov	r0, r3
	bl	copy_fd
	b	.L47
.L48:
	ldr	r2, .L52+12
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #4
	add	r3, r2, r3
	ldr	r2, [r3, #8]
	ldr	r3, .L52+4
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L47
	ldr	r0, .L52+36
	bl	puts
	ldr	r3, .L52+4
	ldr	r3, [r3]
	mov	r2, #0
	mov	r1, #0
	mov	r0, r3
	bl	accept
	mov	r3, r0
	ldr	r2, .L52+28
	str	r3, [r2]
	ldr	r3, .L52+28
	ldr	r3, [r3]
	cmn	r3, #1
	bne	.L49
	ldr	r0, .L52+40
	bl	perror
	mov	r0, #1
	bl	exit
.L49:
	ldr	r3, .L52+28
	ldr	r3, [r3]
	mov	r0, r3
	bl	add_fd_to_epoll
.L47:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L45:
	ldr	r3, .L52+16
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	cmp	r2, r3
	blt	.L50
	b	.L51
.L53:
	.align	2
.L52:
	.word	5000
	.word	listen_sock
	.word	epollfd
	.word	events
	.word	nfds
	.word	.LC15
	.word	.LC16
	.word	conn_sock
	.word	.LC17
	.word	.LC18
	.word	.LC19
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
