	.file	"176705321.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Create Socket Failed!"
.LC1:
	.string	"Server Listen Failed!"
.LC2:
	.string	"Server Accept Failed!"
.LC3:
	.string	"r"
.LC4:
	.string	"File:\t%s Not Found!\n"
.LC5:
	.string	"file_block_length = %d\n"
.LC6:
	.string	"Send File:\t%s Failed!\n"
.LC7:
	.string	"File:\t%s Transfer Finished!\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 1648
	mov	DWORD PTR -1636[rbp], edi
	mov	QWORD PTR -1648[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rax, -1600[rbp]
	mov	QWORD PTR [rax], 0
	mov	QWORD PTR 8[rax], 0
	mov	WORD PTR -1600[rbp], 2
	mov	edi, 0
	call	htons@PLT
	movzx	eax, ax
	mov	DWORD PTR -1596[rbp], eax
	mov	edi, 9999
	call	htons@PLT
	mov	WORD PTR -1598[rbp], ax
	mov	edx, 0
	mov	esi, 1
	mov	edi, 2
	call	socket@PLT
	mov	DWORD PTR -1620[rbp], eax
	cmp	DWORD PTR -1620[rbp], 0
	jns	.L2
	lea	rdi, .LC0[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L2:
	lea	rcx, -1600[rbp]
	mov	eax, DWORD PTR -1620[rbp]
	mov	edx, 16
	mov	rsi, rcx
	mov	edi, eax
	call	bind@PLT
	mov	eax, DWORD PTR -1620[rbp]
	mov	esi, 20
	mov	edi, eax
	call	listen@PLT
	test	eax, eax
	je	.L3
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L3:
	mov	DWORD PTR -1624[rbp], 16
	lea	rdx, -1624[rbp]
	lea	rcx, -1584[rbp]
	mov	eax, DWORD PTR -1620[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	accept@PLT
	mov	DWORD PTR -1616[rbp], eax
	cmp	DWORD PTR -1616[rbp], 0
	jns	.L4
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	eax, DWORD PTR -1620[rbp]
	mov	edi, eax
	call	close@PLT
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L14
	jmp	.L15
.L4:
	lea	rax, -1040[rbp]
	mov	rsi, rax
	mov	eax, 0
	mov	edx, 128
	mov	rdi, rsi
	mov	rcx, rdx
	rep stosq
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1616[rbp]
	mov	ecx, 0
	mov	edx, 1024
	mov	edi, eax
	call	recv@PLT
	mov	DWORD PTR -1624[rbp], eax
	lea	rax, -1568[rbp]
	mov	rdx, rax
	mov	eax, 0
	mov	ecx, 64
	mov	rdi, rdx
	rep stosq
	mov	rdx, rdi
	mov	BYTE PTR [rdx], al
	add	rdx, 1
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	strlen@PLT
	cmp	rax, 512
	ja	.L6
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	rdx, rax
	jmp	.L7
.L6:
	mov	edx, 512
.L7:
	lea	rcx, -1040[rbp]
	lea	rax, -1568[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	strncpy@PLT
	lea	rax, -1568[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -1608[rbp], rax
	cmp	QWORD PTR -1608[rbp], 0
	jne	.L8
	lea	rax, -1568[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L9
.L8:
	lea	rax, -1040[rbp]
	mov	rsi, rax
	mov	eax, 0
	mov	edx, 128
	mov	rdi, rsi
	mov	rcx, rdx
	rep stosq
	mov	DWORD PTR -1612[rbp], 0
	jmp	.L10
.L13:
	mov	eax, DWORD PTR -1612[rbp]
	mov	esi, eax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -1612[rbp]
	movsx	rdx, eax
	lea	rsi, -1040[rbp]
	mov	eax, DWORD PTR -1616[rbp]
	mov	ecx, 0
	mov	edi, eax
	call	send@PLT
	test	rax, rax
	jns	.L11
	lea	rax, -1568[rbp]
	mov	rsi, rax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L12
.L11:
	lea	rax, -1040[rbp]
	mov	rsi, rax
	mov	eax, 0
	mov	edx, 128
	mov	rdi, rsi
	mov	rcx, rdx
	rep stosq
.L10:
	mov	rdx, QWORD PTR -1608[rbp]
	lea	rax, -1040[rbp]
	mov	rcx, rdx
	mov	edx, 1024
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	DWORD PTR -1612[rbp], eax
	cmp	DWORD PTR -1612[rbp], 0
	jg	.L13
.L12:
	mov	rax, QWORD PTR -1608[rbp]
	mov	rdi, rax
	call	fclose@PLT
	lea	rax, -1568[rbp]
	mov	rsi, rax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
.L9:
	mov	eax, DWORD PTR -1616[rbp]
	mov	edi, eax
	call	close@PLT
	jmp	.L3
.L15:
	call	__stack_chk_fail@PLT
.L14:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"176705321.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Create Socket Failed!\000"
	.align	2
.LC1:
	.ascii	"Server Listen Failed!\000"
	.align	2
.LC2:
	.ascii	"Server Accept Failed!\000"
	.align	2
.LC3:
	.ascii	"r\000"
	.align	2
.LC4:
	.ascii	"File:\011%s Not Found!\012\000"
	.align	2
.LC5:
	.ascii	"file_block_length = %d\012\000"
	.align	2
.LC6:
	.ascii	"Send File:\011%s Failed!\012\000"
	.align	2
.LC7:
	.ascii	"File:\011%s Transfer Finished!\012\000"
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1608
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1600
	sub	sp, sp, #8
	str	r0, [fp, #-1608]
	str	r1, [fp, #-1612]
	ldr	r3, .L16
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #1568
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r2, r3
	mov	r3, #0
	str	r3, [r2]
	str	r3, [r2, #4]
	str	r3, [r2, #8]
	str	r3, [r2, #12]
	sub	r3, fp, #4
	sub	r3, r3, #1568
	sub	r3, r3, #8
	mov	r2, #2
	strh	r2, [r3]	@ movhi
	mov	r0, #0
	bl	htons
	mov	r3, r0
	str	r3, [fp, #-1576]
	ldr	r0, .L16+4
	bl	htons
	mov	r3, r0
	mov	r2, r3
	sub	r3, fp, #4
	sub	r3, r3, #1568
	sub	r3, r3, #8
	strh	r2, [r3, #2]	@ movhi
	mov	r2, #0
	mov	r1, #1
	mov	r0, #2
	bl	socket
	str	r0, [fp, #-1596]
	ldr	r3, [fp, #-1596]
	cmp	r3, #0
	bge	.L2
	ldr	r0, .L16+8
	bl	puts
	mov	r0, #1
	bl	exit
.L2:
	sub	r3, fp, #1568
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r2, #16
	mov	r1, r3
	ldr	r0, [fp, #-1596]
	bl	bind
	mov	r1, #20
	ldr	r0, [fp, #-1596]
	bl	listen
	mov	r3, r0
	cmp	r3, #0
	beq	.L3
	ldr	r0, .L16+12
	bl	puts
	mov	r0, #1
	bl	exit
.L3:
	mov	r3, #16
	str	r3, [fp, #-1600]
	sub	r2, fp, #1584
	sub	r2, r2, #4
	sub	r2, r2, #12
	sub	r3, fp, #1552
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r1, r3
	ldr	r0, [fp, #-1596]
	bl	accept
	str	r0, [fp, #-1592]
	ldr	r3, [fp, #-1592]
	cmp	r3, #0
	bge	.L4
	ldr	r0, .L16+16
	bl	puts
	ldr	r0, [fp, #-1596]
	bl	close
	mov	r3, #0
	ldr	r2, .L16
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L14
	b	.L15
.L4:
	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	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	mov	r2, #1024
	ldr	r0, [fp, #-1592]
	bl	recv
	mov	r3, r0
	str	r3, [fp, #-1600]
	sub	r3, fp, #1536
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r0, r3
	ldr	r3, .L16+20
	mov	r2, r3
	mov	r1, #0
	bl	memset
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r3, r0
	cmp	r3, #512
	bhi	.L6
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r0, r3
	bl	strlen
	mov	r2, r0
	b	.L7
.L6:
	mov	r2, #512
.L7:
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	sub	r3, fp, #1536
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r0, r3
	bl	strncpy
	sub	r3, fp, #1536
	sub	r3, r3, #4
	sub	r3, r3, #8
	ldr	r1, .L16+24
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-1588]
	ldr	r3, [fp, #-1588]
	cmp	r3, #0
	bne	.L8
	sub	r3, fp, #1536
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r1, r3
	ldr	r0, .L16+28
	bl	printf
	b	.L9
.L8:
	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
	mov	r3, #0
	str	r3, [fp, #-1584]
	b	.L10
.L13:
	ldr	r1, [fp, #-1584]
	ldr	r0, .L16+32
	bl	printf
	ldr	r2, [fp, #-1584]
	sub	r1, fp, #1024
	sub	r1, r1, #4
	sub	r1, r1, #4
	mov	r3, #0
	ldr	r0, [fp, #-1592]
	bl	send
	mov	r3, r0
	cmp	r3, #0
	bge	.L11
	sub	r3, fp, #1536
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r1, r3
	ldr	r0, .L16+36
	bl	printf
	b	.L12
.L11:
	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
.L10:
	sub	r0, fp, #1024
	sub	r0, r0, #4
	sub	r0, r0, #4
	ldr	r3, [fp, #-1588]
	mov	r2, #1024
	mov	r1, #1
	bl	fread
	mov	r3, r0
	str	r3, [fp, #-1584]
	ldr	r3, [fp, #-1584]
	cmp	r3, #0
	bgt	.L13
.L12:
	ldr	r0, [fp, #-1588]
	bl	fclose
	sub	r3, fp, #1536
	sub	r3, r3, #4
	sub	r3, r3, #8
	mov	r1, r3
	ldr	r0, .L16+40
	bl	printf
.L9:
	ldr	r0, [fp, #-1592]
	bl	close
	b	.L3
.L15:
	bl	__stack_chk_fail
.L14:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC8
	.word	9999
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	513
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
