	.file	"34511487.c"
	.intel_syntax noprefix
	.text
	.globl	kbhit
	.type	kbhit, @function
kbhit:
.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, 160
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -144[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	tcgetattr@PLT
	mov	rax, QWORD PTR -144[rbp]
	mov	rdx, QWORD PTR -136[rbp]
	mov	QWORD PTR -80[rbp], rax
	mov	QWORD PTR -72[rbp], rdx
	mov	rax, QWORD PTR -128[rbp]
	mov	rdx, QWORD PTR -120[rbp]
	mov	QWORD PTR -64[rbp], rax
	mov	QWORD PTR -56[rbp], rdx
	mov	rax, QWORD PTR -112[rbp]
	mov	rdx, QWORD PTR -104[rbp]
	mov	QWORD PTR -48[rbp], rax
	mov	QWORD PTR -40[rbp], rdx
	mov	rax, QWORD PTR -96[rbp]
	mov	QWORD PTR -32[rbp], rax
	mov	eax, DWORD PTR -88[rbp]
	mov	DWORD PTR -24[rbp], eax
	mov	eax, DWORD PTR -68[rbp]
	and	eax, -3
	mov	DWORD PTR -68[rbp], eax
	lea	rax, -80[rbp]
	mov	rdx, rax
	mov	esi, 0
	mov	edi, 0
	call	tcsetattr@PLT
	lea	rax, -148[rbp]
	mov	rdx, rax
	mov	esi, 21531
	mov	edi, 0
	mov	eax, 0
	call	ioctl@PLT
	lea	rax, -144[rbp]
	mov	rdx, rax
	mov	esi, 0
	mov	edi, 0
	call	tcsetattr@PLT
	mov	eax, DWORD PTR -148[rbp]
	test	eax, eax
	setg	al
	movzx	eax, al
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L3
	call	__stack_chk_fail@PLT
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	kbhit, .-kbhit
	.globl	getch
	.type	getch, @function
getch:
.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, 160
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -144[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	tcgetattr@PLT
	mov	rax, QWORD PTR -144[rbp]
	mov	rdx, QWORD PTR -136[rbp]
	mov	QWORD PTR -80[rbp], rax
	mov	QWORD PTR -72[rbp], rdx
	mov	rax, QWORD PTR -128[rbp]
	mov	rdx, QWORD PTR -120[rbp]
	mov	QWORD PTR -64[rbp], rax
	mov	QWORD PTR -56[rbp], rdx
	mov	rax, QWORD PTR -112[rbp]
	mov	rdx, QWORD PTR -104[rbp]
	mov	QWORD PTR -48[rbp], rax
	mov	QWORD PTR -40[rbp], rdx
	mov	rax, QWORD PTR -96[rbp]
	mov	QWORD PTR -32[rbp], rax
	mov	eax, DWORD PTR -88[rbp]
	mov	DWORD PTR -24[rbp], eax
	mov	eax, DWORD PTR -68[rbp]
	and	eax, -11
	mov	DWORD PTR -68[rbp], eax
	lea	rax, -80[rbp]
	mov	rdx, rax
	mov	esi, 0
	mov	edi, 0
	call	tcsetattr@PLT
	call	getchar@PLT
	mov	DWORD PTR -148[rbp], eax
	lea	rax, -144[rbp]
	mov	rdx, rax
	mov	esi, 0
	mov	edi, 0
	call	tcsetattr@PLT
	mov	eax, DWORD PTR -148[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	getch, .-getch
	.globl	getche
	.type	getche, @function
getche:
.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, 160
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -144[rbp]
	mov	rsi, rax
	mov	edi, 0
	call	tcgetattr@PLT
	mov	rax, QWORD PTR -144[rbp]
	mov	rdx, QWORD PTR -136[rbp]
	mov	QWORD PTR -80[rbp], rax
	mov	QWORD PTR -72[rbp], rdx
	mov	rax, QWORD PTR -128[rbp]
	mov	rdx, QWORD PTR -120[rbp]
	mov	QWORD PTR -64[rbp], rax
	mov	QWORD PTR -56[rbp], rdx
	mov	rax, QWORD PTR -112[rbp]
	mov	rdx, QWORD PTR -104[rbp]
	mov	QWORD PTR -48[rbp], rax
	mov	QWORD PTR -40[rbp], rdx
	mov	rax, QWORD PTR -96[rbp]
	mov	QWORD PTR -32[rbp], rax
	mov	eax, DWORD PTR -88[rbp]
	mov	DWORD PTR -24[rbp], eax
	mov	eax, DWORD PTR -68[rbp]
	and	eax, -3
	mov	DWORD PTR -68[rbp], eax
	lea	rax, -80[rbp]
	mov	rdx, rax
	mov	esi, 0
	mov	edi, 0
	call	tcsetattr@PLT
	call	getchar@PLT
	mov	DWORD PTR -148[rbp], eax
	lea	rax, -144[rbp]
	mov	rdx, rax
	mov	esi, 0
	mov	edi, 0
	call	tcsetattr@PLT
	mov	eax, DWORD PTR -148[rbp]
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L9
	call	__stack_chk_fail@PLT
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	getche, .-getche
	.globl	ibuf
	.bss
	.align 32
	.type	ibuf, @object
	.size	ibuf, 1024
ibuf:
	.zero	1024
	.globl	obuf
	.align 32
	.type	obuf, @object
	.size	obuf, 1024
obuf:
	.zero	1024
	.section	.rodata
.LC0:
	.string	"%d %d\n"
.LC1:
	.string	"opening stream socket"
.LC2:
	.string	"binding stream socket"
.LC3:
	.string	"getting socket name"
.LC4:
	.string	"Socket has port #%d\n"
.LC5:
	.string	"on accept"
.LC6:
	.string	"client connected"
.LC7:
	.string	"%s"
.LC8:
	.string	"w"
.LC9:
	.string	"\nclosing socket"
	.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, 96
	mov	DWORD PTR -84[rbp], edi
	mov	QWORD PTR -96[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	QWORD PTR -48[rbp], 0
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -64[rbp], eax
	cmp	DWORD PTR -64[rbp], 0
	jns	.L11
	call	__errno_location@PLT
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -64[rbp]
	mov	esi, eax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC1[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L11:
	cmp	DWORD PTR -84[rbp], 2
	jle	.L12
	mov	rax, QWORD PTR -96[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	QWORD PTR -48[rbp], rax
.L12:
	mov	WORD PTR -32[rbp], 2
	mov	DWORD PTR -28[rbp], 0
	mov	rax, QWORD PTR -96[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -30[rbp], ax
	lea	rcx, -32[rbp]
	mov	eax, DWORD PTR -64[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	je	.L13
	lea	rdi, .LC2[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L13:
	mov	DWORD PTR -76[rbp], 16
	lea	rdx, -76[rbp]
	lea	rcx, -32[rbp]
	mov	eax, DWORD PTR -64[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	getsockname@PLT
	test	eax, eax
	je	.L14
	lea	rdi, .LC3[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L14:
	movzx	eax, WORD PTR -30[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	ntohs@PLT
	movzx	eax, ax
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -64[rbp]
	mov	esi, 5
	mov	edi, eax
	call	listen@PLT
.L25:
	mov	eax, DWORD PTR -64[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -60[rbp], eax
	cmp	DWORD PTR -60[rbp], -1
	jne	.L15
	lea	rdi, .LC5[rip]
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
.L15:
	mov	eax, DWORD PTR -60[rbp]
	mov	edx, 2048
	mov	esi, 4
	mov	edi, eax
	mov	eax, 0
	call	fcntl@PLT
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	DWORD PTR -72[rbp], 1
	jmp	.L16
.L24:
	mov	DWORD PTR -68[rbp], 0
	jmp	.L17
.L19:
	call	getch
	mov	ecx, eax
	mov	eax, DWORD PTR -68[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -68[rbp], edx
	mov	esi, ecx
	movsx	rdx, eax
	lea	rcx, ibuf[rip]
	mov	BYTE PTR [rdx+rcx], sil
	cdqe
	lea	rdx, ibuf[rip]
	movzx	eax, BYTE PTR [rax+rdx]
	movsx	eax, al
	mov	DWORD PTR -52[rbp], eax
	cmp	DWORD PTR -52[rbp], 13
	jne	.L18
	mov	edi, 10
	call	putchar@PLT
	mov	eax, DWORD PTR -68[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -68[rbp], edx
	cdqe
	lea	rdx, ibuf[rip]
	mov	BYTE PTR [rax+rdx], 10
.L18:
	cmp	DWORD PTR -52[rbp], 27
	jne	.L17
	mov	DWORD PTR -72[rbp], -1
.L17:
	mov	eax, 0
	call	kbhit
	test	eax, eax
	jne	.L19
	cmp	DWORD PTR -68[rbp], 0
	jle	.L20
	mov	eax, DWORD PTR -68[rbp]
	cdqe
	lea	rdx, ibuf[rip]
	mov	BYTE PTR [rax+rdx], 0
	mov	eax, DWORD PTR -68[rbp]
	movsx	rdx, eax
	mov	eax, DWORD PTR -60[rbp]
	mov	ecx, 0
	lea	rsi, ibuf[rip]
	mov	edi, eax
	call	send@PLT
	test	rax, rax
	jns	.L21
	mov	DWORD PTR -72[rbp], 0
.L21:
	mov	DWORD PTR -68[rbp], 0
.L20:
	mov	edx, 1024
	mov	esi, 0
	lea	rdi, obuf[rip]
	call	memset@PLT
	mov	eax, DWORD PTR -60[rbp]
	mov	ecx, 0
	mov	edx, 1024
	lea	rsi, obuf[rip]
	mov	edi, eax
	call	recv@PLT
	mov	DWORD PTR -56[rbp], eax
	cmp	DWORD PTR -56[rbp], 0
	jle	.L22
	lea	rsi, obuf[rip]
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	cmp	QWORD PTR -48[rbp], 0
	je	.L16
	mov	rax, QWORD PTR -48[rbp]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -40[rbp], rax
	cmp	QWORD PTR -40[rbp], 0
	je	.L16
	mov	rax, QWORD PTR -40[rbp]
	mov	rsi, rax
	lea	rdi, obuf[rip]
	call	fputs@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	fclose@PLT
	jmp	.L16
.L22:
	cmp	DWORD PTR -56[rbp], 0
	jne	.L23
	mov	DWORD PTR -72[rbp], 0
.L23:
	call	__errno_location@PLT
	mov	DWORD PTR [rax], 0
.L16:
	cmp	DWORD PTR -72[rbp], 0
	jg	.L24
	lea	rdi, .LC9[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -60[rbp]
	mov	edi, eax
	call	close@PLT
	cmp	DWORD PTR -72[rbp], 0
	jns	.L25
	mov	eax, DWORD PTR -64[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L27
	call	__stack_chk_fail@PLT
.L27:
	leave
	.cfi_def_cfa 7, 8
	ret
	.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	"34511487.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	kbhit
	.syntax unified
	.arm
	.fpu softvfp
	.type	kbhit, %function
kbhit:
	@ args = 0, pretend = 0, frame = 128
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #128
	ldr	r3, .L4
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #128
	mov	r1, r3
	mov	r0, #0
	bl	tcgetattr
	sub	ip, fp, #68
	sub	lr, fp, #128
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1, r2}
	stm	ip, {r0, r1, r2}
	ldr	r3, [fp, #-56]
	bic	r3, r3, #2
	str	r3, [fp, #-56]
	sub	r3, fp, #68
	mov	r2, r3
	mov	r1, #0
	mov	r0, #0
	bl	tcsetattr
	sub	r3, fp, #132
	mov	r2, r3
	ldr	r1, .L4+4
	mov	r0, #0
	bl	ioctl
	sub	r3, fp, #128
	mov	r2, r3
	mov	r1, #0
	mov	r0, #0
	bl	tcsetattr
	ldr	r3, [fp, #-132]
	cmp	r3, #0
	movgt	r3, #1
	movle	r3, #0
	and	r3, r3, #255
	ldr	r2, .L4
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L3
	bl	__stack_chk_fail
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L5:
	.align	2
.L4:
	.word	.LC0
	.word	21531
	.size	kbhit, .-kbhit
	.section	.rodata
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	getch
	.syntax unified
	.arm
	.fpu softvfp
	.type	getch, %function
getch:
	@ args = 0, pretend = 0, frame = 128
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #128
	ldr	r3, .L9
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #128
	mov	r1, r3
	mov	r0, #0
	bl	tcgetattr
	sub	ip, fp, #68
	sub	lr, fp, #128
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1, r2}
	stm	ip, {r0, r1, r2}
	ldr	r3, [fp, #-56]
	bic	r3, r3, #10
	str	r3, [fp, #-56]
	sub	r3, fp, #68
	mov	r2, r3
	mov	r1, #0
	mov	r0, #0
	bl	tcsetattr
	bl	getchar
	str	r0, [fp, #-132]
	sub	r3, fp, #128
	mov	r2, r3
	mov	r1, #0
	mov	r0, #0
	bl	tcsetattr
	ldr	r3, [fp, #-132]
	ldr	r2, .L9
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L8
	bl	__stack_chk_fail
.L8:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L10:
	.align	2
.L9:
	.word	.LC1
	.size	getch, .-getch
	.section	.rodata
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	getche
	.syntax unified
	.arm
	.fpu softvfp
	.type	getche, %function
getche:
	@ args = 0, pretend = 0, frame = 128
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #128
	ldr	r3, .L14
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #128
	mov	r1, r3
	mov	r0, #0
	bl	tcgetattr
	sub	ip, fp, #68
	sub	lr, fp, #128
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldmia	lr!, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2, r3}
	ldm	lr, {r0, r1, r2}
	stm	ip, {r0, r1, r2}
	ldr	r3, [fp, #-56]
	bic	r3, r3, #2
	str	r3, [fp, #-56]
	sub	r3, fp, #68
	mov	r2, r3
	mov	r1, #0
	mov	r0, #0
	bl	tcsetattr
	bl	getchar
	str	r0, [fp, #-132]
	sub	r3, fp, #128
	mov	r2, r3
	mov	r1, #0
	mov	r0, #0
	bl	tcsetattr
	ldr	r3, [fp, #-132]
	ldr	r2, .L14
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L13
	bl	__stack_chk_fail
.L13:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L15:
	.align	2
.L14:
	.word	.LC2
	.size	getche, .-getche
	.comm	ibuf,1024,4
	.comm	obuf,1024,4
	.section	.rodata
	.align	2
.LC3:
	.ascii	"%d %d\012\000"
	.align	2
.LC4:
	.ascii	"opening stream socket\000"
	.align	2
.LC5:
	.ascii	"binding stream socket\000"
	.align	2
.LC6:
	.ascii	"getting socket name\000"
	.align	2
.LC7:
	.ascii	"Socket has port #%d\012\000"
	.align	2
.LC8:
	.ascii	"on accept\000"
	.align	2
.LC9:
	.ascii	"client connected\000"
	.align	2
.LC10:
	.ascii	"%s\000"
	.align	2
.LC11:
	.ascii	"w\000"
	.align	2
.LC12:
	.ascii	"\012closing socket\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 = 64
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #64
	str	r0, [fp, #-64]
	str	r1, [fp, #-68]
	ldr	r3, .L34
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-52]
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-44]
	ldr	r3, [fp, #-44]
	cmp	r3, #0
	bge	.L17
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, [fp, #-44]
	ldr	r0, .L34+4
	bl	printf
	ldr	r0, .L34+8
	bl	perror
	mov	r0, #1
	bl	exit
.L17:
	ldr	r3, [fp, #-64]
	cmp	r3, #2
	ble	.L18
	ldr	r3, [fp, #-68]
	ldr	r3, [r3, #8]
	str	r3, [fp, #-52]
.L18:
	mov	r3, #2
	strh	r3, [fp, #-24]	@ movhi
	mov	r3, #0
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-68]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	mov	r3, r0
	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, #-44]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	beq	.L19
	ldr	r0, .L34+12
	bl	perror
	mov	r0, #1
	bl	exit
.L19:
	mov	r3, #16
	str	r3, [fp, #-60]
	sub	r2, fp, #60
	sub	r3, fp, #24
	mov	r1, r3
	ldr	r0, [fp, #-44]
	bl	getsockname
	mov	r3, r0
	cmp	r3, #0
	beq	.L20
	ldr	r0, .L34+16
	bl	perror
	mov	r0, #1
	bl	exit
.L20:
	ldrh	r3, [fp, #-22]
	mov	r0, r3
	bl	ntohs
	mov	r3, r0
	mov	r1, r3
	ldr	r0, .L34+20
	bl	printf
	mov	r1, #5
	ldr	r0, [fp, #-44]
	bl	listen
.L31:
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-44]
	bl	accept
	str	r0, [fp, #-40]
	ldr	r3, [fp, #-40]
	cmn	r3, #1
	bne	.L21
	ldr	r0, .L34+24
	bl	perror
	mov	r0, #1
	bl	exit
.L21:
	mov	r2, #2048
	mov	r1, #4
	ldr	r0, [fp, #-40]
	bl	fcntl
	ldr	r0, .L34+28
	bl	puts
	mov	r3, #1
	str	r3, [fp, #-56]
	b	.L22
.L30:
	mov	r3, #0
	str	r3, [fp, #-48]
	b	.L23
.L25:
	bl	getch
	mov	r1, r0
	ldr	r3, [fp, #-48]
	add	r2, r3, #1
	str	r2, [fp, #-48]
	and	r1, r1, #255
	ldr	r2, .L34+32
	strb	r1, [r2, r3]
	ldr	r2, .L34+32
	ldrb	r3, [r2, r3]	@ zero_extendqisi2
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-28]
	cmp	r3, #13
	bne	.L24
	mov	r0, #10
	bl	putchar
	ldr	r3, [fp, #-48]
	add	r2, r3, #1
	str	r2, [fp, #-48]
	ldr	r2, .L34+32
	mov	r1, #10
	strb	r1, [r2, r3]
.L24:
	ldr	r3, [fp, #-28]
	cmp	r3, #27
	bne	.L23
	mvn	r3, #0
	str	r3, [fp, #-56]
.L23:
	bl	kbhit
	mov	r3, r0
	cmp	r3, #0
	bne	.L25
	ldr	r3, [fp, #-48]
	cmp	r3, #0
	ble	.L26
	ldr	r2, .L34+32
	ldr	r3, [fp, #-48]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r2, [fp, #-48]
	mov	r3, #0
	ldr	r1, .L34+32
	ldr	r0, [fp, #-40]
	bl	send
	mov	r3, r0
	cmp	r3, #0
	bge	.L27
	mov	r3, #0
	str	r3, [fp, #-56]
.L27:
	mov	r3, #0
	str	r3, [fp, #-48]
.L26:
	mov	r2, #1024
	mov	r1, #0
	ldr	r0, .L34+36
	bl	memset
	mov	r3, #0
	mov	r2, #1024
	ldr	r1, .L34+36
	ldr	r0, [fp, #-40]
	bl	recv
	str	r0, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	ble	.L28
	ldr	r1, .L34+36
	ldr	r0, .L34+40
	bl	printf
	ldr	r3, [fp, #-52]
	cmp	r3, #0
	beq	.L22
	ldr	r1, .L34+44
	ldr	r0, [fp, #-52]
	bl	fopen
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	beq	.L22
	ldr	r1, [fp, #-32]
	ldr	r0, .L34+36
	bl	fputs
	ldr	r0, [fp, #-32]
	bl	fclose
	b	.L22
.L28:
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	bne	.L29
	mov	r3, #0
	str	r3, [fp, #-56]
.L29:
	bl	__errno_location
	mov	r3, r0
	mov	r2, #0
	str	r2, [r3]
.L22:
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	bgt	.L30
	ldr	r0, .L34+48
	bl	puts
	ldr	r0, [fp, #-40]
	bl	close
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	bge	.L31
	ldr	r0, [fp, #-44]
	bl	close
	mov	r3, #0
	ldr	r2, .L34
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L33
	bl	__stack_chk_fail
.L33:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L35:
	.align	2
.L34:
	.word	.LC13
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	ibuf
	.word	obuf
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
