	.file	"800771.c"
	.intel_syntax noprefix
	.text
	.type	stream_write, @function
stream_write:
.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
	mov	QWORD PTR -16[rbp], rsi
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	mov	rcx, QWORD PTR -16[rbp]
	mov	eax, DWORD PTR -4[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	stream_write, .-stream_write
	.type	open_server_socket, @function
open_server_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, 48
	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], 0
	jns	.L3
	mov	edi, 1
	call	exit@PLT
.L3:
	lea	rax, -32[rbp]
	mov	edx, 16
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	WORD PTR -32[rbp], 2
	mov	edi, 0
	call	htonl@PLT
	mov	DWORD PTR -28[rbp], eax
	mov	edi, 12001
	call	htons@PLT
	mov	WORD PTR -30[rbp], ax
	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	.L4
	mov	eax, DWORD PTR -36[rbp]
	mov	edi, eax
	call	close@PLT
	mov	edi, 1
	call	exit@PLT
.L4:
	mov	eax, DWORD PTR -36[rbp]
	mov	esi, 10
	mov	edi, eax
	call	listen@PLT
	test	eax, eax
	jns	.L5
	mov	eax, DWORD PTR -36[rbp]
	mov	edi, eax
	call	close@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	mov	eax, DWORD PTR -36[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L7
	call	__stack_chk_fail@PLT
.L7:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	open_server_socket, .-open_server_socket
	.section	.rodata
.LC0:
	.string	"---- SLEEP 5 SECONDS ----\n"
	.text
	.type	accept_client_connection, @function
accept_client_connection:
.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, 64
	mov	DWORD PTR -52[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -44[rbp], 16
	lea	rdx, -44[rbp]
	lea	rcx, -32[rbp]
	mov	eax, DWORD PTR -52[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -40[rbp], eax
	cmp	DWORD PTR -40[rbp], 0
	jns	.L9
	mov	eax, -1
	jmp	.L11
.L9:
	mov	eax, DWORD PTR -40[rbp]
	mov	edx, 0
	mov	esi, 3
	mov	edi, eax
	mov	eax, 0
	call	fcntl@PLT
	mov	DWORD PTR -36[rbp], eax
	mov	eax, DWORD PTR -36[rbp]
	or	ah, 8
	mov	edx, eax
	mov	eax, DWORD PTR -40[rbp]
	mov	esi, 4
	mov	edi, eax
	mov	eax, 0
	call	fcntl@PLT
	mov	eax, DWORD PTR -40[rbp]
	lea	rsi, .LC0[rip]
	mov	edi, eax
	call	stream_write
	mov	edi, 5
	call	sleep@PLT
	mov	eax, DWORD PTR -40[rbp]
.L11:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L12
	call	__stack_chk_fail@PLT
.L12:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	accept_client_connection, .-accept_client_connection
	.section	.rodata
.LC1:
	.string	">> "
	.text
	.type	read_then_echo_write, @function
read_then_echo_write:
.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, 1072
	mov	DWORD PTR -1060[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	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
	jg	.L14
	mov	eax, DWORD PTR -1044[rbp]
	jmp	.L16
.L14:
	mov	eax, DWORD PTR -1060[rbp]
	lea	rsi, .LC1[rip]
	mov	edi, eax
	call	stream_write
	mov	eax, DWORD PTR -1044[rbp]
	movsx	rdx, eax
	lea	rcx, -1040[rbp]
	mov	eax, DWORD PTR -1060[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	eax, DWORD PTR -1044[rbp]
.L16:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	read_then_echo_write, .-read_then_echo_write
	.section	.rodata
.LC2:
	.string	"---- EPOLL REGISTERED ----\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB10:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 1280
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	edi, 100
	call	epoll_create@PLT
	mov	DWORD PTR -1276[rbp], eax
	cmp	DWORD PTR -1276[rbp], 0
	jns	.L19
	mov	edi, 1
	call	exit@PLT
.L19:
	mov	eax, 0
	call	open_server_socket
	mov	DWORD PTR -1272[rbp], eax
	lea	rax, -1252[rbp]
	mov	edx, 12
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	DWORD PTR -1252[rbp], 1
	mov	eax, DWORD PTR -1272[rbp]
	mov	DWORD PTR -1248[rbp], eax
	lea	rcx, -1252[rbp]
	mov	edx, DWORD PTR -1272[rbp]
	mov	eax, DWORD PTR -1276[rbp]
	mov	esi, 1
	mov	edi, eax
	call	epoll_ctl@PLT
.L28:
	lea	rsi, -1216[rbp]
	mov	eax, DWORD PTR -1276[rbp]
	mov	ecx, -1
	mov	edx, 100
	mov	edi, eax
	call	epoll_wait@PLT
	mov	DWORD PTR -1268[rbp], eax
	mov	DWORD PTR -1280[rbp], 0
	jmp	.L20
.L27:
	mov	eax, DWORD PTR -1280[rbp]
	movsx	rdx, eax
	mov	rax, rdx
	add	rax, rax
	add	rax, rdx
	sal	rax, 2
	add	rax, rbp
	sub	rax, 1216
	mov	rdx, QWORD PTR [rax]
	mov	QWORD PTR -1240[rbp], rdx
	mov	eax, DWORD PTR 8[rax]
	mov	DWORD PTR -1232[rbp], eax
	mov	eax, DWORD PTR -1236[rbp]
	cmp	DWORD PTR -1272[rbp], eax
	jne	.L21
	mov	eax, DWORD PTR -1272[rbp]
	mov	edi, eax
	call	accept_client_connection
	mov	DWORD PTR -1256[rbp], eax
	cmp	DWORD PTR -1256[rbp], 0
	js	.L30
	lea	rax, -1228[rbp]
	mov	edx, 12
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	DWORD PTR -1228[rbp], -2147483647
	mov	eax, DWORD PTR -1256[rbp]
	mov	DWORD PTR -1224[rbp], eax
	lea	rcx, -1228[rbp]
	mov	edx, DWORD PTR -1256[rbp]
	mov	eax, DWORD PTR -1276[rbp]
	mov	esi, 1
	mov	edi, eax
	call	epoll_ctl@PLT
	mov	eax, DWORD PTR -1256[rbp]
	lea	rsi, .LC2[rip]
	mov	edi, eax
	call	stream_write
	jmp	.L26
.L21:
	mov	eax, DWORD PTR -1236[rbp]
	mov	DWORD PTR -1264[rbp], eax
	mov	eax, DWORD PTR -1264[rbp]
	mov	edi, eax
	call	read_then_echo_write
	mov	DWORD PTR -1260[rbp], eax
	cmp	DWORD PTR -1260[rbp], 0
	jg	.L31
	lea	rcx, -1252[rbp]
	mov	edx, DWORD PTR -1264[rbp]
	mov	eax, DWORD PTR -1276[rbp]
	mov	esi, 2
	mov	edi, eax
	call	epoll_ctl@PLT
	mov	eax, DWORD PTR -1264[rbp]
	mov	edi, eax
	call	close@PLT
	jmp	.L26
.L30:
	nop
	jmp	.L26
.L31:
	nop
.L26:
	add	DWORD PTR -1280[rbp], 1
.L20:
	mov	eax, DWORD PTR -1280[rbp]
	cmp	eax, DWORD PTR -1268[rbp]
	jl	.L27
	jmp	.L28
	.cfi_endproc
.LFE10:
	.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	"800771.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	stream_write, %function
stream_write:
	@ 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	r0, [fp, #-12]
	bl	strlen
	mov	r3, r0
	mov	r2, r3
	ldr	r1, [fp, #-12]
	ldr	r0, [fp, #-8]
	bl	write
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	stream_write, .-stream_write
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	open_server_socket, %function
open_server_socket:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	ldr	r3, .L8
	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]
	cmp	r3, #0
	bge	.L3
	mov	r0, #1
	bl	exit
.L3:
	sub	r3, fp, #24
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #2
	strh	r3, [fp, #-24]	@ movhi
	mov	r0, #0
	bl	htonl
	mov	r3, r0
	str	r3, [fp, #-20]
	ldr	r0, .L8+4
	bl	htons
	mov	r3, r0
	strh	r3, [fp, #-22]	@ movhi
	sub	r3, fp, #24
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-28]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	bge	.L4
	ldr	r0, [fp, #-28]
	bl	close
	mov	r0, #1
	bl	exit
.L4:
	mov	r1, #10
	ldr	r0, [fp, #-28]
	bl	listen
	mov	r3, r0
	cmp	r3, #0
	bge	.L5
	ldr	r0, [fp, #-28]
	bl	close
	mov	r0, #1
	bl	exit
.L5:
	ldr	r3, [fp, #-28]
	ldr	r2, .L8
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L7
	bl	__stack_chk_fail
.L7:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L9:
	.align	2
.L8:
	.word	.LC0
	.word	12001
	.size	open_server_socket, .-open_server_socket
	.section	.rodata
	.align	2
.LC1:
	.ascii	"---- SLEEP 5 SECONDS ----\012\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	accept_client_connection, %function
accept_client_connection:
	@ 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]
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #16
	str	r3, [fp, #-36]
	sub	r2, fp, #36
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, [fp, #-40]
	bl	accept
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bge	.L11
	mvn	r3, #0
	b	.L13
.L11:
	mov	r2, #0
	mov	r1, #3
	ldr	r0, [fp, #-32]
	bl	fcntl
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	orr	r3, r3, #2048
	mov	r2, r3
	mov	r1, #4
	ldr	r0, [fp, #-32]
	bl	fcntl
	ldr	r1, .L15+4
	ldr	r0, [fp, #-32]
	bl	stream_write
	mov	r0, #5
	bl	sleep
	ldr	r3, [fp, #-32]
.L13:
	ldr	r2, .L15
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L14
	bl	__stack_chk_fail
.L14:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC2
	.word	.LC1
	.size	accept_client_connection, .-accept_client_connection
	.section	.rodata
	.align	2
.LC3:
	.ascii	">> \000"
	.align	2
.LC4:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	read_then_echo_write, %function
read_then_echo_write:
	@ 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	r2, #1024
	mov	r1, r3
	ldr	r0, [fp, #-1040]
	bl	read
	str	r0, [fp, #-1036]
	ldr	r3, [fp, #-1036]
	cmp	r3, #0
	bgt	.L18
	ldr	r3, [fp, #-1036]
	b	.L20
.L18:
	ldr	r1, .L22+4
	ldr	r0, [fp, #-1040]
	bl	stream_write
	ldr	r2, [fp, #-1036]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, [fp, #-1040]
	bl	write
	ldr	r3, [fp, #-1036]
.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	.LC4
	.word	.LC3
	.size	read_then_echo_write, .-read_then_echo_write
	.section	.rodata
	.align	2
.LC5:
	.ascii	"---- EPOLL REGISTERED ----\012\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1688
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1680
	sub	sp, sp, #8
	ldr	r3, .L38
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r0, #100
	bl	epoll_create
	str	r0, [fp, #-1684]
	ldr	r3, [fp, #-1684]
	cmp	r3, #0
	bge	.L25
	mov	r0, #1
	bl	exit
.L25:
	bl	open_server_socket
	str	r0, [fp, #-1680]
	sub	r3, fp, #1648
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #1
	str	r3, [fp, #-1660]
	ldr	r3, [fp, #-1680]
	str	r3, [fp, #-1652]
	sub	r3, fp, #1648
	sub	r3, r3, #4
	sub	r3, r3, #8
	ldr	r2, [fp, #-1680]
	mov	r1, #1
	ldr	r0, [fp, #-1684]
	bl	epoll_ctl
.L34:
	sub	r1, fp, #1600
	sub	r1, r1, #4
	sub	r1, r1, #8
	mvn	r3, #0
	mov	r2, #100
	ldr	r0, [fp, #-1684]
	bl	epoll_wait
	str	r0, [fp, #-1676]
	mov	r3, #0
	str	r3, [fp, #-1688]
	b	.L26
.L33:
	ldr	r3, [fp, #-1688]
	lsl	r3, r3, #4
	sub	r2, fp, #4
	add	r3, r2, r3
	sub	ip, fp, #1632
	sub	ip, ip, #4
	sub	ip, ip, #8
	sub	r3, r3, #1600
	sub	r3, r3, #8
	ldm	r3, {r0, r1, r2, r3}
	stm	ip, {r0, r1, r2, r3}
	ldr	r3, [fp, #-1636]
	ldr	r2, [fp, #-1680]
	cmp	r2, r3
	bne	.L27
	ldr	r0, [fp, #-1680]
	bl	accept_client_connection
	str	r0, [fp, #-1664]
	ldr	r3, [fp, #-1664]
	cmp	r3, #0
	blt	.L36
	sub	r3, fp, #1616
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r2, #16
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #-2147483647
	str	r3, [fp, #-1628]
	ldr	r3, [fp, #-1664]
	str	r3, [fp, #-1620]
	sub	r3, fp, #1616
	sub	r3, r3, #4
	sub	r3, r3, #8
	ldr	r2, [fp, #-1664]
	mov	r1, #1
	ldr	r0, [fp, #-1684]
	bl	epoll_ctl
	ldr	r1, .L38+4
	ldr	r0, [fp, #-1664]
	bl	stream_write
	b	.L32
.L27:
	ldr	r3, [fp, #-1636]
	str	r3, [fp, #-1672]
	ldr	r0, [fp, #-1672]
	bl	read_then_echo_write
	str	r0, [fp, #-1668]
	ldr	r3, [fp, #-1668]
	cmp	r3, #0
	bgt	.L37
	sub	r3, fp, #1648
	sub	r3, r3, #4
	sub	r3, r3, #8
	ldr	r2, [fp, #-1672]
	mov	r1, #2
	ldr	r0, [fp, #-1684]
	bl	epoll_ctl
	ldr	r0, [fp, #-1672]
	bl	close
	b	.L32
.L36:
	nop
	b	.L32
.L37:
	nop
.L32:
	ldr	r3, [fp, #-1688]
	add	r3, r3, #1
	str	r3, [fp, #-1688]
.L26:
	ldr	r2, [fp, #-1688]
	ldr	r3, [fp, #-1676]
	cmp	r2, r3
	blt	.L33
	b	.L34
.L39:
	.align	2
.L38:
	.word	.LC6
	.word	.LC5
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
