	.file	"113093.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"read"
.LC1:
	.string	"server received %d bytes\n"
.LC2:
	.string	"write error\n"
	.text
	.globl	echo
	.type	echo, @function
echo:
.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, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 48
	mov	DWORD PTR -4132[rbp], edi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rcx, -4112[rbp]
	mov	eax, DWORD PTR -4132[rbp]
	mov	edx, 4096
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -4120[rbp], eax
	cmp	DWORD PTR -4120[rbp], 0
	jns	.L2
	lea	rdi, .LC0[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	cmp	DWORD PTR -4120[rbp], 0
	jle	.L5
	mov	eax, DWORD PTR -4120[rbp]
	mov	esi, eax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -4120[rbp]
	movsx	rdx, eax
	lea	rcx, -4112[rbp]
	mov	eax, DWORD PTR -4132[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -4116[rbp], eax
	mov	eax, DWORD PTR -4116[rbp]
	cmp	eax, DWORD PTR -4120[rbp]
	je	.L5
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 12
	mov	esi, 1
	lea	rdi, .LC2[rip]
	call	fwrite@PLT
	mov	edi, 1
	call	exit@PLT
.L5:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L4
	call	__stack_chk_fail@PLT
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	echo, .-echo
	.section	.rodata
.LC3:
	.string	"fgets"
.LC4:
	.string	"%s"
	.text
	.globl	command
	.type	command, @function
command:
.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, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	rdx, QWORD PTR stdin[rip]
	lea	rax, -4112[rbp]
	mov	esi, 4096
	mov	rdi, rax
	call	fgets@PLT
	mov	QWORD PTR -4120[rbp], rax
	cmp	QWORD PTR -4120[rbp], 0
	jne	.L7
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	feof@PLT
	test	eax, eax
	je	.L8
	mov	edi, 0
	call	exit@PLT
.L8:
	mov	rax, QWORD PTR stdin[rip]
	mov	rdi, rax
	call	ferror@PLT
	test	eax, eax
	je	.L7
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L7:
	lea	rax, -4112[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	command, .-command
	.globl	open_listenfd
	.type	open_listenfd, @function
open_listenfd:
.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 -40[rbp], 1
	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	.L11
	mov	eax, -1
	jmp	.L16
.L11:
	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	.L13
	mov	eax, -1
	jmp	.L16
.L13:
	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	eax, DWORD PTR -52[rbp]
	movzx	eax, ax
	mov	edi, eax
	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	.L14
	mov	eax, -1
	jmp	.L16
.L14:
	mov	eax, DWORD PTR -36[rbp]
	mov	esi, 1024
	mov	edi, eax
	call	listen@PLT
	test	eax, eax
	jns	.L15
	mov	eax, -1
	jmp	.L16
.L15:
	mov	eax, DWORD PTR -36[rbp]
.L16:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	open_listenfd, .-open_listenfd
	.section	.rodata
.LC5:
	.string	"Open_listenfd error"
	.text
	.globl	Open_listenfd
	.type	Open_listenfd, @function
Open_listenfd:
.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	edi, eax
	call	open_listenfd
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jns	.L19
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L19:
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	Open_listenfd, .-Open_listenfd
	.section	.rodata
.LC6:
	.string	"Select error"
	.text
	.globl	Select
	.type	Select, @function
Select:
.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, 64
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -40[rbp], rdx
	mov	QWORD PTR -48[rbp], rcx
	mov	QWORD PTR -56[rbp], r8
	mov	rdi, QWORD PTR -56[rbp]
	mov	rcx, QWORD PTR -48[rbp]
	mov	rdx, QWORD PTR -40[rbp]
	mov	rsi, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	r8, rdi
	mov	edi, eax
	call	select@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jns	.L22
	lea	rdi, .LC6[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L22:
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE10:
	.size	Select, .-Select
	.section	.rodata
.LC7:
	.string	"Accept error"
	.text
	.globl	Accept
	.type	Accept, @function
Accept:
.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, 48
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	QWORD PTR -40[rbp], rdx
	mov	rdx, QWORD PTR -40[rbp]
	mov	rcx, QWORD PTR -32[rbp]
	mov	eax, DWORD PTR -20[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jns	.L25
	lea	rdi, .LC7[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L25:
	mov	eax, DWORD PTR -4[rbp]
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	Accept, .-Accept
	.section	.rodata
.LC8:
	.string	"Close error"
	.text
	.globl	Close
	.type	Close, @function
Close:
.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	eax, DWORD PTR -20[rbp]
	mov	edi, eax
	call	close@PLT
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 0
	jns	.L29
	lea	rdi, .LC8[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L29:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	Close, .-Close
	.section	.rodata
.LC9:
	.string	"usage: %s <port>\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 336
	mov	DWORD PTR -324[rbp], edi
	mov	QWORD PTR -336[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -312[rbp], 16
	cmp	DWORD PTR -324[rbp], 2
	je	.L31
	mov	rax, QWORD PTR -336[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC9[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 0
	call	exit@PLT
.L31:
	mov	rax, QWORD PTR -336[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -308[rbp], eax
	mov	eax, DWORD PTR -308[rbp]
	mov	edi, eax
	call	Open_listenfd
	mov	DWORD PTR -304[rbp], eax
	mov	eax, 0
	mov	ecx, 16
	lea	rdx, -272[rbp]
	mov	rdi, rdx
#APP
# 141 "the_stack_data/113093.c" 1
	cld; rep; stosq
# 0 "" 2
#NO_APP
	mov	eax, edi
	mov	edx, ecx
	mov	DWORD PTR -300[rbp], edx
	mov	DWORD PTR -296[rbp], eax
	mov	rax, QWORD PTR -272[rbp]
	or	rax, 1
	mov	QWORD PTR -272[rbp], rax
	mov	eax, DWORD PTR -304[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	esi, eax
	movsx	rax, esi
	mov	rdi, QWORD PTR -272[rbp+rax*8]
	mov	eax, DWORD PTR -304[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 -272[rbp+rax*8], rdx
.L34:
	mov	rax, QWORD PTR -272[rbp]
	mov	rdx, QWORD PTR -264[rbp]
	mov	QWORD PTR -144[rbp], rax
	mov	QWORD PTR -136[rbp], rdx
	mov	rax, QWORD PTR -256[rbp]
	mov	rdx, QWORD PTR -248[rbp]
	mov	QWORD PTR -128[rbp], rax
	mov	QWORD PTR -120[rbp], rdx
	mov	rax, QWORD PTR -240[rbp]
	mov	rdx, QWORD PTR -232[rbp]
	mov	QWORD PTR -112[rbp], rax
	mov	QWORD PTR -104[rbp], rdx
	mov	rax, QWORD PTR -224[rbp]
	mov	rdx, QWORD PTR -216[rbp]
	mov	QWORD PTR -96[rbp], rax
	mov	QWORD PTR -88[rbp], rdx
	mov	rax, QWORD PTR -208[rbp]
	mov	rdx, QWORD PTR -200[rbp]
	mov	QWORD PTR -80[rbp], rax
	mov	QWORD PTR -72[rbp], rdx
	mov	rax, QWORD PTR -192[rbp]
	mov	rdx, QWORD PTR -184[rbp]
	mov	QWORD PTR -64[rbp], rax
	mov	QWORD PTR -56[rbp], rdx
	mov	rax, QWORD PTR -176[rbp]
	mov	rdx, QWORD PTR -168[rbp]
	mov	QWORD PTR -48[rbp], rax
	mov	QWORD PTR -40[rbp], rdx
	mov	rax, QWORD PTR -160[rbp]
	mov	rdx, QWORD PTR -152[rbp]
	mov	QWORD PTR -32[rbp], rax
	mov	QWORD PTR -24[rbp], rdx
	mov	eax, DWORD PTR -304[rbp]
	lea	edi, 1[rax]
	lea	rax, -144[rbp]
	mov	r8d, 0
	mov	ecx, 0
	mov	edx, 0
	mov	rsi, rax
	call	Select
	mov	rax, QWORD PTR -144[rbp]
	and	eax, 1
	test	rax, rax
	je	.L32
	call	command
.L32:
	mov	eax, DWORD PTR -304[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	cdqe
	mov	rsi, QWORD PTR -144[rbp+rax*8]
	mov	eax, DWORD PTR -304[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	.L34
	lea	rdx, -312[rbp]
	lea	rcx, -288[rbp]
	mov	eax, DWORD PTR -304[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	Accept
	mov	DWORD PTR -292[rbp], eax
	mov	eax, DWORD PTR -292[rbp]
	mov	edi, eax
	call	echo
	mov	eax, DWORD PTR -292[rbp]
	mov	edi, eax
	call	Close
	jmp	.L34
	.cfi_endproc
.LFE13:
	.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	"113093.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"read\000"
	.align	2
.LC1:
	.ascii	"server received %d bytes\012\000"
	.align	2
.LC2:
	.ascii	"write error\012\000"
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	echo
	.syntax unified
	.arm
	.fpu softvfp
	.type	echo, %function
echo:
	@ args = 0, pretend = 0, frame = 4120
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #4096
	sub	sp, sp, #28
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r0, [r3, #-20]
	ldr	r3, .L6
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r0, r2
	mov	r2, #4096
	mov	r1, r3
	ldr	r0, [r0, #-20]
	bl	read
	str	r0, [r4, #-12]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-12]
	cmp	r3, #0
	bge	.L2
	ldr	r0, .L6+4
	bl	perror
	mov	r0, #1
	bl	exit
.L2:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-12]
	cmp	r3, #0
	ble	.L5
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r1, [r3, #-12]
	ldr	r0, .L6+8
	bl	printf
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, [r3, #-12]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	sub	r1, fp, #4096
	sub	r1, r1, #12
	mov	r0, r1
	mov	r1, r3
	ldr	r0, [r0, #-20]
	bl	write
	str	r0, [r4, #-8]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r2, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, [r2, #-8]
	ldr	r3, [r3, #-12]
	cmp	r2, r3
	beq	.L5
	ldr	r3, .L6+12
	ldr	r3, [r3]
	mov	r2, #12
	mov	r1, #1
	ldr	r0, .L6+16
	bl	fwrite
	mov	r0, #1
	bl	exit
.L5:
	nop
	ldr	r3, .L6
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L4
	bl	__stack_chk_fail
.L4:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L7:
	.align	2
.L6:
	.word	.LC3
	.word	.LC0
	.word	.LC1
	.word	stderr
	.word	.LC2
	.size	echo, .-echo
	.section	.rodata
	.align	2
.LC4:
	.ascii	"fgets\000"
	.align	2
.LC5:
	.ascii	"%s\000"
	.align	2
.LC6:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	command
	.syntax unified
	.arm
	.fpu softvfp
	.type	command, %function
command:
	@ args = 0, pretend = 0, frame = 4104
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #4096
	sub	sp, sp, #12
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, .L12+4
	ldr	r2, [r3]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, #4096
	mov	r0, r3
	bl	fgets
	str	r0, [r4, #-8]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	cmp	r3, #0
	bne	.L9
	ldr	r3, .L12+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	feof
	mov	r3, r0
	cmp	r3, #0
	beq	.L10
	mov	r0, #0
	bl	exit
.L10:
	ldr	r3, .L12+4
	ldr	r3, [r3]
	mov	r0, r3
	bl	ferror
	mov	r3, r0
	cmp	r3, #0
	beq	.L9
	ldr	r0, .L12+8
	bl	perror
	mov	r0, #1
	bl	exit
.L9:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	mov	r1, r3
	ldr	r0, .L12+12
	bl	printf
	nop
	ldr	r3, .L12
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L11
	bl	__stack_chk_fail
.L11:
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC6
	.word	stdin
	.word	.LC4
	.word	.LC5
	.size	command, .-command
	.section	.rodata
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	open_listenfd
	.syntax unified
	.arm
	.fpu softvfp
	.type	open_listenfd, %function
open_listenfd:
	@ 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, .L22
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #1
	str	r3, [fp, #-32]
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #0
	bge	.L15
	mvn	r3, #0
	b	.L20
.L15:
	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	.L17
	mvn	r3, #0
	b	.L20
.L17:
	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	r3, [fp, #-40]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	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	.L18
	mvn	r3, #0
	b	.L20
.L18:
	mov	r1, #1024
	ldr	r0, [fp, #-28]
	bl	listen
	mov	r3, r0
	cmp	r3, #0
	bge	.L19
	mvn	r3, #0
	b	.L20
.L19:
	ldr	r3, [fp, #-28]
.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	.LC7
	.size	open_listenfd, .-open_listenfd
	.section	.rodata
	.align	2
.LC8:
	.ascii	"Open_listenfd error\000"
	.text
	.align	2
	.global	Open_listenfd
	.syntax unified
	.arm
	.fpu softvfp
	.type	Open_listenfd, %function
Open_listenfd:
	@ 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]
	ldr	r0, [fp, #-16]
	bl	open_listenfd
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L25
	ldr	r0, .L27
	bl	perror
	mov	r0, #1
	bl	exit
.L25:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L28:
	.align	2
.L27:
	.word	.LC8
	.size	Open_listenfd, .-Open_listenfd
	.section	.rodata
	.align	2
.LC9:
	.ascii	"Select error\000"
	.text
	.align	2
	.global	Select
	.syntax unified
	.arm
	.fpu softvfp
	.type	Select, %function
Select:
	@ args = 4, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #4]
	str	r3, [sp]
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	select
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L30
	ldr	r0, .L32
	bl	perror
	mov	r0, #1
	bl	exit
.L30:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L33:
	.align	2
.L32:
	.word	.LC9
	.size	Select, .-Select
	.section	.rodata
	.align	2
.LC10:
	.ascii	"Accept error\000"
	.text
	.align	2
	.global	Accept
	.syntax unified
	.arm
	.fpu softvfp
	.type	Accept, %function
Accept:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	str	r2, [fp, #-24]
	ldr	r2, [fp, #-24]
	ldr	r1, [fp, #-20]
	ldr	r0, [fp, #-16]
	bl	accept
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L35
	ldr	r0, .L37
	bl	perror
	mov	r0, #1
	bl	exit
.L35:
	ldr	r3, [fp, #-8]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L38:
	.align	2
.L37:
	.word	.LC10
	.size	Accept, .-Accept
	.section	.rodata
	.align	2
.LC11:
	.ascii	"Close error\000"
	.text
	.align	2
	.global	Close
	.syntax unified
	.arm
	.fpu softvfp
	.type	Close, %function
Close:
	@ 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]
	ldr	r0, [fp, #-16]
	bl	close
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	bge	.L41
	ldr	r0, .L42
	bl	perror
	mov	r0, #1
	bl	exit
.L41:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L43:
	.align	2
.L42:
	.word	.LC11
	.size	Close, .-Close
	.section	.rodata
	.align	2
.LC12:
	.ascii	"usage: %s <port>\012\000"
	.align	2
.LC13:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 312
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #320
	str	r0, [fp, #-312]
	str	r1, [fp, #-316]
	ldr	r3, .L52
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #16
	str	r3, [fp, #-304]
	ldr	r3, [fp, #-312]
	cmp	r3, #2
	beq	.L45
	ldr	r3, .L52+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-316]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L52+8
	bl	fprintf
	mov	r0, #0
	bl	exit
.L45:
	ldr	r3, [fp, #-316]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-296]
	ldr	r0, [fp, #-296]
	bl	Open_listenfd
	str	r0, [fp, #-292]
	sub	r3, fp, #264
	str	r3, [fp, #-288]
	mov	r3, #0
	str	r3, [fp, #-300]
	b	.L46
.L47:
	ldr	r3, [fp, #-288]
	ldr	r2, [fp, #-300]
	mov	r1, #0
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-300]
	add	r3, r3, #1
	str	r3, [fp, #-300]
.L46:
	ldr	r3, [fp, #-300]
	cmp	r3, #31
	bls	.L47
	ldr	r3, [fp, #-264]
	orr	r3, r3, #1
	str	r3, [fp, #-264]
	ldr	r3, [fp, #-292]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	mov	r2, r3
	lsl	r3, r2, #2
	sub	r1, fp, #4
	add	r3, r1, r3
	ldr	r1, [r3, #-260]
	ldr	r3, [fp, #-292]
	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
	lsl	r3, r2, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	str	r1, [r3, #-260]
.L50:
	sub	r3, fp, #136
	sub	r1, fp, #264
	mov	r2, #128
	mov	r0, r3
	bl	memcpy
	ldr	r3, [fp, #-292]
	add	r0, r3, #1
	sub	r1, fp, #136
	mov	r3, #0
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #0
	bl	Select
	ldr	r3, [fp, #-136]
	and	r3, r3, #1
	cmp	r3, #0
	beq	.L48
	bl	command
.L48:
	ldr	r3, [fp, #-292]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	lsl	r3, r3, #2
	sub	r2, fp, #4
	add	r3, r2, r3
	ldr	r2, [r3, #-132]
	ldr	r3, [fp, #-292]
	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	.L50
	sub	r2, fp, #304
	sub	r3, fp, #280
	mov	r1, r3
	ldr	r0, [fp, #-292]
	bl	Accept
	str	r0, [fp, #-284]
	ldr	r0, [fp, #-284]
	bl	echo
	ldr	r0, [fp, #-284]
	bl	Close
	b	.L50
.L53:
	.align	2
.L52:
	.word	.LC13
	.word	stderr
	.word	.LC12
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
