	.file	"870332.c"
	.intel_syntax noprefix
	.text
	.globl	error
	.type	error, @function
error:
.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	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE6:
	.size	error, .-error
	.section	.rodata
	.align 8
.LC0:
	.string	"PORT NUMBER REQUIRED. PROGRAM TERMINATED"
.LC1:
	.string	"%s\n"
.LC2:
	.string	"Socket not created"
.LC3:
	.string	"setsockpot"
.LC4:
	.string	"bind error"
.LC5:
	.string	"Listener on port %d \n"
.LC6:
	.string	"Listen error"
.LC7:
	.string	"select error"
.LC8:
	.string	"accept error"
	.align 8
.LC9:
	.string	"New Connection, socket fd is %d, ip is : %s, port : %d \n"
.LC10:
	.string	"Client %d says: %s \n"
	.align 8
.LC11:
	.string	"File can not be uploaded (file doesn't exist)"
.LC12:
	.string	"w"
.LC13:
	.string	"%s "
	.align 8
.LC14:
	.string	"Client %d successfully uploaded file %s\n"
.LC15:
	.string	"r"
.LC16:
	.string	"%s"
	.align 8
.LC17:
	.string	"Client %d successfully downloaded file %s\n"
.LC18:
	.string	"Client %d disconnected\n"
	.align 8
.LC19:
	.string	"Host disconnected, ip %s, port %d \n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	rbx
	sub	rsp, 1192
	.cfi_offset 3, -24
	mov	DWORD PTR -1188[rbp], edi
	mov	QWORD PTR -1200[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -1188[rbp], 1
	jg	.L3
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, .LC0[rip]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L3:
	mov	rax, QWORD PTR -1200[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	atoi@PLT
	mov	DWORD PTR -1136[rbp], eax
	movabs	rax, 5495271495276709192
	mov	edx, 1414415689
	mov	QWORD PTR -800[rbp], rax
	mov	QWORD PTR -792[rbp], rdx
	lea	rdx, -784[rbp]
	mov	eax, 0
	mov	ecx, 29
	mov	rdi, rdx
	rep stosq
	mov	rdx, rdi
	mov	DWORD PTR [rdx], eax
	add	rdx, 4
	mov	WORD PTR [rdx], ax
	add	rdx, 2
	mov	BYTE PTR [rdx], al
	add	rdx, 1
	mov	DWORD PTR -1132[rbp], 30
	mov	DWORD PTR -1164[rbp], 1
	mov	DWORD PTR -1144[rbp], 0
	jmp	.L4
.L5:
	mov	eax, DWORD PTR -1144[rbp]
	cdqe
	mov	DWORD PTR -1056[rbp+rax*4], 0
	add	DWORD PTR -1144[rbp], 1
.L4:
	mov	eax, DWORD PTR -1144[rbp]
	cmp	eax, DWORD PTR -1132[rbp]
	jl	.L5
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -1128[rbp], eax
	cmp	DWORD PTR -1128[rbp], 0
	jns	.L6
	lea	rdi, .LC2[rip]
	call	error
.L6:
	lea	rax, -1088[rbp]
	mov	QWORD PTR [rax], 0
	mov	QWORD PTR 8[rax], 0
	lea	rdx, -1164[rbp]
	mov	eax, DWORD PTR -1128[rbp]
	mov	r8d, 4
	mov	rcx, rdx
	mov	edx, 2
	mov	esi, 1
	mov	edi, eax
	call	setsockopt@PLT
	test	eax, eax
	jns	.L7
	lea	rdi, .LC3[rip]
	call	error
.L7:
	mov	WORD PTR -1088[rbp], 2
	mov	DWORD PTR -1084[rbp], 0
	mov	eax, DWORD PTR -1136[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	htons@PLT
	mov	WORD PTR -1086[rbp], ax
	lea	rcx, -1088[rbp]
	mov	eax, DWORD PTR -1128[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	test	eax, eax
	jns	.L8
	lea	rdi, .LC4[rip]
	call	error
.L8:
	mov	eax, DWORD PTR -1136[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -1128[rbp]
	mov	esi, 10
	mov	edi, eax
	call	listen@PLT
	test	eax, eax
	jns	.L9
	lea	rdi, .LC6[rip]
	call	error
.L9:
	mov	DWORD PTR -1168[rbp], 16
.L41:
	mov	eax, 0
	mov	ecx, 16
	lea	rdx, -928[rbp]
	mov	rdi, rdx
#APP
# 92 "the_stack_data/870332.c" 1
	cld; rep; stosq
# 0 "" 2
#NO_APP
	mov	eax, edi
	mov	edx, ecx
	mov	DWORD PTR -1124[rbp], edx
	mov	DWORD PTR -1120[rbp], eax
	mov	eax, DWORD PTR -1128[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	esi, eax
	movsx	rax, esi
	mov	rdi, QWORD PTR -928[rbp+rax*8]
	mov	eax, DWORD PTR -1128[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 -928[rbp+rax*8], rdx
	mov	eax, DWORD PTR -1128[rbp]
	mov	DWORD PTR -1148[rbp], eax
	mov	DWORD PTR -1152[rbp], 0
	jmp	.L10
.L13:
	mov	eax, DWORD PTR -1152[rbp]
	cdqe
	mov	eax, DWORD PTR -1056[rbp+rax*4]
	mov	DWORD PTR -1108[rbp], eax
	cmp	DWORD PTR -1108[rbp], 0
	jle	.L11
	mov	eax, DWORD PTR -1108[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	mov	esi, eax
	movsx	rax, esi
	mov	rdi, QWORD PTR -928[rbp+rax*8]
	mov	eax, DWORD PTR -1108[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 -928[rbp+rax*8], rdx
.L11:
	mov	eax, DWORD PTR -1108[rbp]
	cmp	eax, DWORD PTR -1148[rbp]
	jle	.L12
	mov	eax, DWORD PTR -1108[rbp]
	mov	DWORD PTR -1148[rbp], eax
.L12:
	add	DWORD PTR -1152[rbp], 1
.L10:
	mov	eax, DWORD PTR -1152[rbp]
	cmp	eax, DWORD PTR -1132[rbp]
	jl	.L13
	mov	eax, DWORD PTR -1148[rbp]
	lea	edi, 1[rax]
	lea	rax, -928[rbp]
	mov	r8d, 0
	mov	ecx, 0
	mov	edx, 0
	mov	rsi, rax
	call	select@PLT
	mov	DWORD PTR -1116[rbp], eax
	cmp	DWORD PTR -1116[rbp], 0
	jns	.L14
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 4
	je	.L14
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, .LC7[rip]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
.L14:
	mov	eax, DWORD PTR -1128[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	cdqe
	mov	rsi, QWORD PTR -928[rbp+rax*8]
	mov	eax, DWORD PTR -1128[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	.L15
	lea	rdx, -1168[rbp]
	lea	rcx, -1072[rbp]
	mov	eax, DWORD PTR -1128[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -1112[rbp], eax
	cmp	DWORD PTR -1112[rbp], 0
	jns	.L16
	lea	rdi, .LC8[rip]
	call	error
.L16:
	movzx	eax, WORD PTR -1070[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	ntohs@PLT
	movzx	ebx, ax
	mov	eax, DWORD PTR -1068[rbp]
	mov	edi, eax
	call	inet_ntoa@PLT
	mov	rdx, rax
	mov	eax, DWORD PTR -1112[rbp]
	mov	ecx, ebx
	mov	esi, eax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	DWORD PTR -1152[rbp], 0
	jmp	.L17
.L19:
	mov	eax, DWORD PTR -1152[rbp]
	cdqe
	mov	eax, DWORD PTR -1056[rbp+rax*4]
	test	eax, eax
	jne	.L18
	mov	eax, DWORD PTR -1152[rbp]
	cdqe
	mov	edx, DWORD PTR -1112[rbp]
	mov	DWORD PTR -1056[rbp+rax*4], edx
	jmp	.L15
.L18:
	add	DWORD PTR -1152[rbp], 1
.L17:
	mov	eax, DWORD PTR -1152[rbp]
	cmp	eax, DWORD PTR -1132[rbp]
	jl	.L19
.L15:
	mov	DWORD PTR -1152[rbp], 0
	jmp	.L20
.L40:
	mov	eax, DWORD PTR -1152[rbp]
	cdqe
	mov	eax, DWORD PTR -1056[rbp+rax*4]
	mov	DWORD PTR -1108[rbp], eax
	mov	eax, DWORD PTR -1108[rbp]
	lea	edx, 63[rax]
	test	eax, eax
	cmovs	eax, edx
	sar	eax, 6
	cdqe
	mov	rsi, QWORD PTR -928[rbp+rax*8]
	mov	eax, DWORD PTR -1108[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	.L21
	lea	rsi, -1160[rbp]
	mov	eax, DWORD PTR -1108[rbp]
	mov	ecx, 0
	mov	edx, 4
	mov	edi, eax
	call	recv@PLT
	mov	eax, DWORD PTR -1160[rbp]
	cmp	eax, 5
	ja	.L21
	mov	eax, eax
	lea	rdx, 0[0+rax*4]
	lea	rax, .L24[rip]
	mov	eax, DWORD PTR [rdx+rax]
	cdqe
	lea	rdx, .L24[rip]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L24:
	.long	.L21-.L24
	.long	.L28-.L24
	.long	.L27-.L24
	.long	.L26-.L24
	.long	.L25-.L24
	.long	.L23-.L24
	.text
.L28:
	lea	rax, -544[rbp]
	mov	rdx, rax
	mov	eax, 0
	mov	ecx, 31
	mov	rdi, rdx
	rep stosq
	mov	rdx, rdi
	mov	DWORD PTR [rdx], eax
	add	rdx, 4
	mov	WORD PTR [rdx], ax
	add	rdx, 2
	mov	BYTE PTR [rdx], al
	add	rdx, 1
	lea	rsi, -544[rbp]
	mov	eax, DWORD PTR -1108[rbp]
	mov	ecx, 0
	mov	edx, 255
	mov	edi, eax
	call	recv@PLT
	lea	rax, -544[rbp]
	mov	rdi, rax
	call	puts@PLT
	mov	eax, DWORD PTR -1152[rbp]
	lea	ecx, 1[rax]
	lea	rax, -544[rbp]
	mov	rdx, rax
	mov	esi, ecx
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L21
.L27:
	lea	rsi, -544[rbp]
	mov	eax, DWORD PTR -1108[rbp]
	mov	ecx, 0
	mov	edx, 255
	mov	edi, eax
	call	send@PLT
	jmp	.L21
.L26:
	mov	DWORD PTR -1156[rbp], 0
	mov	DWORD PTR -1140[rbp], 0
	lea	rax, -288[rbp]
	mov	rdx, rax
	mov	eax, 0
	mov	ecx, 31
	mov	rdi, rdx
	rep stosq
	mov	rdx, rdi
	mov	DWORD PTR [rdx], eax
	add	rdx, 4
	mov	WORD PTR [rdx], ax
	add	rdx, 2
	mov	BYTE PTR [rdx], al
	add	rdx, 1
	lea	rsi, -288[rbp]
	mov	eax, DWORD PTR -1108[rbp]
	mov	ecx, 0
	mov	edx, 255
	mov	edi, eax
	call	recv@PLT
	lea	rsi, -1156[rbp]
	mov	eax, DWORD PTR -1108[rbp]
	mov	ecx, 0
	mov	edx, 4
	mov	edi, eax
	call	recv@PLT
	mov	eax, DWORD PTR -1156[rbp]
	cmp	eax, -1
	jne	.L29
	lea	rdi, .LC11[rip]
	call	puts@PLT
	jmp	.L21
.L29:
	lea	rax, -288[rbp]
	lea	rsi, .LC12[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -1096[rbp], rax
	mov	rax, QWORD PTR -1096[rbp]
	mov	rdi, rax
	call	rewind@PLT
	jmp	.L31
.L32:
	lea	rsi, -544[rbp]
	mov	eax, DWORD PTR -1108[rbp]
	mov	ecx, 0
	mov	edx, 255
	mov	edi, eax
	call	recv@PLT
	lea	rdx, -544[rbp]
	mov	rax, QWORD PTR -1096[rbp]
	lea	rsi, .LC13[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	add	DWORD PTR -1140[rbp], 1
.L31:
	mov	eax, DWORD PTR -1156[rbp]
	cmp	DWORD PTR -1140[rbp], eax
	jne	.L32
	mov	rax, QWORD PTR -1096[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	eax, DWORD PTR -1152[rbp]
	lea	ecx, 1[rax]
	lea	rax, -288[rbp]
	mov	rdx, rax
	mov	esi, ecx
	lea	rdi, .LC14[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L21
.L25:
	mov	DWORD PTR -1156[rbp], 0
	lea	rax, -288[rbp]
	mov	rdx, rax
	mov	eax, 0
	mov	ecx, 31
	mov	rdi, rdx
	rep stosq
	mov	rdx, rdi
	mov	DWORD PTR [rdx], eax
	add	rdx, 4
	mov	WORD PTR [rdx], ax
	add	rdx, 2
	mov	BYTE PTR [rdx], al
	add	rdx, 1
	lea	rsi, -288[rbp]
	mov	eax, DWORD PTR -1108[rbp]
	mov	ecx, 0
	mov	edx, 255
	mov	edi, eax
	call	recv@PLT
	lea	rax, -288[rbp]
	lea	rsi, .LC15[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -1104[rbp], rax
	cmp	QWORD PTR -1104[rbp], 0
	jne	.L33
	mov	DWORD PTR -1156[rbp], -1
	lea	rsi, -1156[rbp]
	mov	eax, DWORD PTR -1108[rbp]
	mov	ecx, 0
	mov	edx, 4
	mov	edi, eax
	call	send@PLT
	jmp	.L34
.L33:
	mov	rax, QWORD PTR -1104[rbp]
	mov	rdi, rax
	call	rewind@PLT
	jmp	.L35
.L37:
	lea	rdx, -544[rbp]
	mov	rax, QWORD PTR -1104[rbp]
	lea	rsi, .LC16[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	call	__ctype_b_loc@PLT
	mov	rdx, QWORD PTR [rax]
	movsx	rax, BYTE PTR -1169[rbp]
	add	rax, rax
	add	rax, rdx
	movzx	eax, WORD PTR [rax]
	movzx	eax, ax
	and	eax, 8192
	test	eax, eax
	jne	.L36
	cmp	BYTE PTR -1169[rbp], 9
	jne	.L35
.L36:
	mov	eax, DWORD PTR -1156[rbp]
	add	eax, 1
	mov	DWORD PTR -1156[rbp], eax
.L35:
	mov	rax, QWORD PTR -1104[rbp]
	mov	rdi, rax
	call	getc@PLT
	mov	BYTE PTR -1169[rbp], al
	cmp	BYTE PTR -1169[rbp], -1
	jne	.L37
	lea	rsi, -1156[rbp]
	mov	eax, DWORD PTR -1108[rbp]
	mov	ecx, 0
	mov	edx, 4
	mov	edi, eax
	call	send@PLT
	mov	rax, QWORD PTR -1104[rbp]
	mov	rdi, rax
	call	rewind@PLT
	jmp	.L38
.L39:
	lea	rdx, -544[rbp]
	mov	rax, QWORD PTR -1104[rbp]
	lea	rsi, .LC16[rip]
	mov	rdi, rax
	mov	eax, 0
	call	__isoc99_fscanf@PLT
	lea	rsi, -544[rbp]
	mov	eax, DWORD PTR -1108[rbp]
	mov	ecx, 0
	mov	edx, 255
	mov	edi, eax
	call	send@PLT
	mov	rax, QWORD PTR -1104[rbp]
	mov	rdi, rax
	call	fgetc@PLT
	mov	BYTE PTR -1170[rbp], al
.L38:
	cmp	BYTE PTR -1170[rbp], -1
	jne	.L39
	mov	rax, QWORD PTR -1104[rbp]
	mov	rdi, rax
	call	fclose@PLT
.L34:
	mov	eax, DWORD PTR -1152[rbp]
	lea	ecx, 1[rax]
	lea	rax, -288[rbp]
	mov	rdx, rax
	mov	esi, ecx
	lea	rdi, .LC17[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L21
.L23:
	lea	rdx, -1168[rbp]
	lea	rcx, -1072[rbp]
	mov	eax, DWORD PTR -1108[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	getpeername@PLT
	mov	eax, DWORD PTR -1152[rbp]
	add	eax, 1
	mov	esi, eax
	lea	rdi, .LC18[rip]
	mov	eax, 0
	call	printf@PLT
	movzx	eax, WORD PTR -1070[rbp]
	movzx	eax, ax
	mov	edi, eax
	call	ntohs@PLT
	movzx	ebx, ax
	mov	eax, DWORD PTR -1068[rbp]
	mov	edi, eax
	call	inet_ntoa@PLT
	mov	edx, ebx
	mov	rsi, rax
	lea	rdi, .LC19[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -1108[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, DWORD PTR -1152[rbp]
	cdqe
	mov	DWORD PTR -1056[rbp+rax*4], 0
	nop
.L21:
	add	DWORD PTR -1152[rbp], 1
.L20:
	mov	eax, DWORD PTR -1152[rbp]
	cmp	eax, DWORD PTR -1132[rbp]
	jl	.L40
	jmp	.L41
	.cfi_endproc
.LFE7:
	.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	"870332.c"
	.text
	.align	2
	.global	error
	.syntax unified
	.arm
	.fpu softvfp
	.type	error, %function
error:
	@ 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, [fp, #-8]
	bl	perror
	mov	r0, #1
	bl	exit
	.size	error, .-error
	.section	.rodata
	.align	2
.LC0:
	.ascii	"PORT NUMBER REQUIRED. PROGRAM TERMINATED\000"
	.align	2
.LC1:
	.ascii	"%s\012\000"
	.align	2
.LC3:
	.ascii	"Socket not created\000"
	.align	2
.LC4:
	.ascii	"setsockpot\000"
	.align	2
.LC5:
	.ascii	"bind error\000"
	.align	2
.LC6:
	.ascii	"Listener on port %d \012\000"
	.align	2
.LC7:
	.ascii	"Listen error\000"
	.align	2
.LC8:
	.ascii	"select error\000"
	.align	2
.LC9:
	.ascii	"accept error\000"
	.align	2
.LC10:
	.ascii	"New Connection, socket fd is %d, ip is : %s, port :"
	.ascii	" %d \012\000"
	.align	2
.LC11:
	.ascii	"Client %d says: %s \012\000"
	.align	2
.LC12:
	.ascii	"File can not be uploaded (file doesn't exist)\000"
	.align	2
.LC13:
	.ascii	"w\000"
	.align	2
.LC14:
	.ascii	"%s \000"
	.align	2
.LC15:
	.ascii	"Client %d successfully uploaded file %s\012\000"
	.align	2
.LC16:
	.ascii	"r\000"
	.align	2
.LC17:
	.ascii	"%s\000"
	.align	2
.LC18:
	.ascii	"Client %d successfully downloaded file %s\012\000"
	.align	2
.LC19:
	.ascii	"Client %d disconnected\012\000"
	.align	2
.LC20:
	.ascii	"Host disconnected, ip %s, port %d \012\000"
	.align	2
.LC2:
	.ascii	"HELLO CLIENT\000"
	.space	242
	.align	2
.LC21:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1136
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #1136
	sub	sp, sp, #12
	str	r0, [fp, #-1144]
	str	r1, [fp, #-1148]
	ldr	r3, .L44
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, [fp, #-1144]
	cmp	r3, #1
	bgt	.L3
	ldr	r3, .L44+4
	ldr	r3, [r3]
	ldr	r2, .L44+8
	ldr	r1, .L44+12
	mov	r0, r3
	bl	fprintf
.L3:
	ldr	r3, [fp, #-1148]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r0, r3
	bl	atoi
	str	r0, [fp, #-1100]
	ldr	r3, .L44+16
	sub	ip, fp, #784
	ldm	r3, {r0, r1, r2, r3}
	stmia	ip!, {r0, r1, r2}
	strb	r3, [ip]
	sub	r3, fp, #768
	sub	r3, r3, #3
	mov	r2, #242
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r3, #30
	str	r3, [fp, #-1096]
	mov	r3, #1
	str	r3, [fp, #-1132]
	mov	r3, #0
	str	r3, [fp, #-1112]
	b	.L4
.L5:
	ldr	r3, [fp, #-1112]
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3, #-1020]
	ldr	r3, [fp, #-1112]
	add	r3, r3, #1
	str	r3, [fp, #-1112]
.L4:
	ldr	r2, [fp, #-1112]
	ldr	r3, [fp, #-1096]
	cmp	r2, r3
	blt	.L5
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-1092]
	ldr	r3, [fp, #-1092]
	cmp	r3, #0
	bge	.L6
	ldr	r0, .L44+20
	bl	error
.L6:
	sub	r3, fp, #1040
	sub	r3, r3, #12
	sub	r3, r3, #12
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2]
	str	r3, [r2, #4]
	str	r3, [r2, #8]
	str	r3, [r2, #12]
	sub	r3, fp, #1120
	sub	r3, r3, #12
	mov	r2, #4
	str	r2, [sp]
	mov	r2, #2
	mov	r1, #1
	ldr	r0, [fp, #-1092]
	bl	setsockopt
	mov	r3, r0
	cmp	r3, #0
	bge	.L7
	ldr	r0, .L44+24
	bl	error
.L7:
	sub	r3, fp, #12
	sub	r3, r3, #1040
	sub	r3, r3, #12
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	mov	r3, #0
	str	r3, [fp, #-1060]
	ldr	r3, [fp, #-1100]
	lsl	r3, r3, #16
	lsr	r3, r3, #16
	mov	r0, r3
	bl	htons
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #12
	sub	r3, r3, #1040
	sub	r3, r3, #12
	strh	r2, [r3, #2]	@ movhi
	sub	r3, fp, #1040
	sub	r3, r3, #12
	sub	r3, r3, #12
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-1092]
	bl	bind
	mov	r3, r0
	cmp	r3, #0
	bge	.L8
	ldr	r0, .L44+28
	bl	error
.L8:
	ldr	r1, [fp, #-1100]
	ldr	r0, .L44+32
	bl	printf
	mov	r1, #10
	ldr	r0, [fp, #-1092]
	bl	listen
	mov	r3, r0
	cmp	r3, #0
	bge	.L9
	ldr	r0, .L44+36
	bl	error
.L9:
	mov	r3, #16
	str	r3, [fp, #-1136]
.L41:
	sub	r3, fp, #912
	str	r3, [fp, #-1088]
	mov	r3, #0
	str	r3, [fp, #-1108]
	b	.L10
.L11:
	ldr	r3, [fp, #-1088]
	ldr	r2, [fp, #-1108]
	mov	r1, #0
	str	r1, [r3, r2, lsl #2]
	ldr	r3, [fp, #-1108]
	add	r3, r3, #1
	str	r3, [fp, #-1108]
.L10:
	ldr	r3, [fp, #-1108]
	cmp	r3, #31
	bls	.L11
	ldr	r3, [fp, #-1092]
	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, #12
	add	r3, r1, r3
	ldr	r1, [r3, #-900]
	ldr	r3, [fp, #-1092]
	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, #12
	add	r3, r2, r3
	str	r1, [r3, #-900]
	ldr	r3, [fp, #-1092]
	str	r3, [fp, #-1116]
	mov	r3, #0
	str	r3, [fp, #-1120]
	b	.L12
.L15:
	ldr	r3, [fp, #-1120]
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r3, [r3, #-1020]
	str	r3, [fp, #-1076]
	ldr	r3, [fp, #-1076]
	cmp	r3, #0
	ble	.L13
	ldr	r3, [fp, #-1076]
	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, #12
	add	r3, r1, r3
	ldr	r1, [r3, #-900]
	ldr	r3, [fp, #-1076]
	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, #12
	add	r3, r2, r3
	str	r1, [r3, #-900]
.L13:
	ldr	r2, [fp, #-1076]
	ldr	r3, [fp, #-1116]
	cmp	r2, r3
	ble	.L14
	ldr	r3, [fp, #-1076]
	str	r3, [fp, #-1116]
.L14:
	ldr	r3, [fp, #-1120]
	add	r3, r3, #1
	str	r3, [fp, #-1120]
.L12:
	ldr	r2, [fp, #-1120]
	ldr	r3, [fp, #-1096]
	cmp	r2, r3
	blt	.L15
	ldr	r3, [fp, #-1116]
	add	r0, r3, #1
	sub	r1, fp, #912
	mov	r3, #0
	str	r3, [sp]
	mov	r3, #0
	mov	r2, #0
	bl	select
	str	r0, [fp, #-1084]
	ldr	r3, [fp, #-1084]
	cmp	r3, #0
	bge	.L16
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #4
	beq	.L16
	ldr	r3, .L44+4
	ldr	r3, [r3]
	ldr	r2, .L44+40
	ldr	r1, .L44+12
	mov	r0, r3
	bl	fprintf
.L16:
	ldr	r3, [fp, #-1092]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r2, [r3, #-900]
	ldr	r3, [fp, #-1092]
	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	.L17
	sub	r2, fp, #1120
	sub	r2, r2, #12
	sub	r2, r2, #4
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #12
	mov	r1, r3
	ldr	r0, [fp, #-1092]
	bl	accept
	str	r0, [fp, #-1080]
	ldr	r3, [fp, #-1080]
	cmp	r3, #0
	bge	.L18
	ldr	r0, .L44+44
	bl	error
.L18:
	ldr	r0, [fp, #-1044]
	bl	inet_ntoa
	mov	r4, r0
	sub	r3, fp, #12
	sub	r3, r3, #1024
	sub	r3, r3, #12
	ldrh	r3, [r3, #2]
	mov	r0, r3
	bl	ntohs
	mov	r3, r0
	mov	r2, r4
	ldr	r1, [fp, #-1080]
	ldr	r0, .L44+48
	bl	printf
	mov	r3, #0
	str	r3, [fp, #-1120]
	b	.L19
.L21:
	ldr	r3, [fp, #-1120]
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r3, [r3, #-1020]
	cmp	r3, #0
	bne	.L20
	ldr	r3, [fp, #-1120]
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r2, [fp, #-1080]
	str	r2, [r3, #-1020]
	b	.L17
.L20:
	ldr	r3, [fp, #-1120]
	add	r3, r3, #1
	str	r3, [fp, #-1120]
.L19:
	ldr	r2, [fp, #-1120]
	ldr	r3, [fp, #-1096]
	cmp	r2, r3
	blt	.L21
.L17:
	mov	r3, #0
	str	r3, [fp, #-1120]
	b	.L22
.L40:
	ldr	r3, [fp, #-1120]
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r3, [r3, #-1020]
	str	r3, [fp, #-1076]
	ldr	r3, [fp, #-1076]
	add	r2, r3, #31
	cmp	r3, #0
	movlt	r3, r2
	movge	r3, r3
	asr	r3, r3, #5
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	ldr	r2, [r3, #-900]
	ldr	r3, [fp, #-1076]
	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	.L23
	sub	r1, fp, #1104
	sub	r1, r1, #12
	sub	r1, r1, #12
	mov	r3, #0
	mov	r2, #4
	ldr	r0, [fp, #-1076]
	bl	recv
	ldr	r3, [fp, #-1128]
	sub	r3, r3, #1
	cmp	r3, #4
	ldrls	pc, [pc, r3, asl #2]
	b	.L23
.L26:
	.word	.L30
	.word	.L29
	.word	.L28
	.word	.L27
	.word	.L25
.L30:
	sub	r3, fp, #528
	mov	r0, r3
	mov	r3, #255
	mov	r2, r3
	mov	r1, #0
	bl	memset
	sub	r1, fp, #528
	mov	r3, #0
	mov	r2, #255
	ldr	r0, [fp, #-1076]
	bl	recv
	sub	r3, fp, #528
	mov	r0, r3
	bl	puts
	ldr	r3, [fp, #-1120]
	add	r3, r3, #1
	sub	r2, fp, #528
	mov	r1, r3
	ldr	r0, .L44+52
	bl	printf
	b	.L23
.L29:
	sub	r1, fp, #528
	mov	r3, #0
	mov	r2, #255
	ldr	r0, [fp, #-1076]
	bl	send
	b	.L23
.L28:
	mov	r3, #0
	str	r3, [fp, #-1124]
	mov	r3, #0
	str	r3, [fp, #-1104]
	sub	r3, fp, #272
	mov	r0, r3
	mov	r3, #255
	mov	r2, r3
	mov	r1, #0
	bl	memset
	sub	r1, fp, #272
	mov	r3, #0
	mov	r2, #255
	ldr	r0, [fp, #-1076]
	bl	recv
	sub	r1, fp, #1104
	sub	r1, r1, #12
	sub	r1, r1, #8
	mov	r3, #0
	mov	r2, #4
	ldr	r0, [fp, #-1076]
	bl	recv
	ldr	r3, [fp, #-1124]
	cmn	r3, #1
	bne	.L31
	ldr	r0, .L44+56
	bl	puts
	b	.L23
.L31:
	sub	r3, fp, #272
	ldr	r1, .L44+60
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-1068]
	ldr	r0, [fp, #-1068]
	bl	rewind
	b	.L33
.L34:
	sub	r1, fp, #528
	mov	r3, #0
	mov	r2, #255
	ldr	r0, [fp, #-1076]
	bl	recv
	sub	r3, fp, #528
	mov	r2, r3
	ldr	r1, .L44+64
	ldr	r0, [fp, #-1068]
	bl	fprintf
	ldr	r3, [fp, #-1104]
	add	r3, r3, #1
	str	r3, [fp, #-1104]
.L33:
	ldr	r3, [fp, #-1124]
	ldr	r2, [fp, #-1104]
	cmp	r2, r3
	bne	.L34
	ldr	r0, [fp, #-1068]
	bl	fclose
	ldr	r3, [fp, #-1120]
	add	r3, r3, #1
	sub	r2, fp, #272
	mov	r1, r3
	ldr	r0, .L44+68
	bl	printf
	b	.L23
.L27:
	mov	r3, #0
	str	r3, [fp, #-1124]
	sub	r3, fp, #272
	mov	r0, r3
	mov	r3, #255
	mov	r2, r3
	mov	r1, #0
	bl	memset
	sub	r1, fp, #272
	mov	r3, #0
	mov	r2, #255
	ldr	r0, [fp, #-1076]
	bl	recv
	sub	r3, fp, #272
	ldr	r1, .L44+72
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-1072]
	ldr	r3, [fp, #-1072]
	cmp	r3, #0
	bne	.L35
	mvn	r3, #0
	str	r3, [fp, #-1124]
	sub	r1, fp, #1104
	sub	r1, r1, #12
	sub	r1, r1, #8
	mov	r3, #0
	mov	r2, #4
	ldr	r0, [fp, #-1076]
	bl	send
	ldr	r3, [fp, #-1120]
	add	r3, r3, #1
	sub	r2, fp, #272
	mov	r1, r3
	ldr	r0, .L44+76
	bl	printf
	b	.L23
.L35:
	ldr	r0, [fp, #-1072]
	bl	rewind
	b	.L37
.L43:
	ldrb	r3, [fp, #-1137]	@ zero_extendqisi2
	cmp	r3, #9
	bne	.L37
.L38:
	ldr	r3, [fp, #-1124]
	add	r3, r3, #1
	str	r3, [fp, #-1124]
.L37:
	ldr	r0, [fp, #-1072]
	bl	getc
	mov	r3, r0
	strb	r3, [fp, #-1137]
	sub	r3, fp, #528
	mov	r2, r3
	ldr	r1, .L44+80
	ldr	r0, [fp, #-1072]
	bl	__isoc99_fscanf
	bl	__ctype_b_loc
	mov	r3, r0
	ldr	r2, [r3]
	ldrb	r3, [fp, #-1137]	@ zero_extendqisi2
	lsl	r3, r3, #1
	add	r3, r2, r3
	ldrh	r3, [r3]
	and	r3, r3, #8192
	cmp	r3, #0
	bne	.L38
	b	.L43
.L25:
	sub	r2, fp, #1120
	sub	r2, r2, #12
	sub	r2, r2, #4
	sub	r3, fp, #1024
	sub	r3, r3, #12
	sub	r3, r3, #12
	mov	r1, r3
	ldr	r0, [fp, #-1076]
	bl	getpeername
	ldr	r3, [fp, #-1120]
	add	r3, r3, #1
	mov	r1, r3
	ldr	r0, .L44+84
	bl	printf
	ldr	r0, [fp, #-1044]
	bl	inet_ntoa
	mov	r4, r0
	sub	r3, fp, #12
	sub	r3, r3, #1024
	sub	r3, r3, #12
	ldrh	r3, [r3, #2]
	mov	r0, r3
	bl	ntohs
	mov	r3, r0
	mov	r2, r3
	mov	r1, r4
	ldr	r0, .L44+88
	bl	printf
	ldr	r0, [fp, #-1076]
	bl	close
	ldr	r3, [fp, #-1120]
	lsl	r3, r3, #2
	sub	r2, fp, #12
	add	r3, r2, r3
	mov	r2, #0
	str	r2, [r3, #-1020]
	nop
.L23:
	ldr	r3, [fp, #-1120]
	add	r3, r3, #1
	str	r3, [fp, #-1120]
.L22:
	ldr	r2, [fp, #-1120]
	ldr	r3, [fp, #-1096]
	cmp	r2, r3
	blt	.L40
	b	.L41
.L45:
	.align	2
.L44:
	.word	.LC21
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC18
	.word	.LC17
	.word	.LC19
	.word	.LC20
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
