	.file	"305498.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"rb"
.LC1:
	.string	".\\input.txt"
.LC2:
	.string	"in file open error.\r"
.LC3:
	.string	"input file's size:%d.\r\n"
.LC4:
	.string	"wb"
.LC5:
	.string	".\\output.txt"
.LC6:
	.string	"out file open error.\r"
.LC7:
	.string	"memory alloc error.\r"
.LC8:
	.string	"end of read file by %d.\r\n"
.LC9:
	.string	"write out file error.\r"
.LC10:
	.string	"output file's size:%d.\r\n"
.LC11:
	.string	"---- ----- ---------\r"
.LC12:
	.string	"  in count:%09d.\r\n"
.LC13:
	.string	" out count:%09d.\r\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, 112
	mov	DWORD PTR -100[rbp], edi
	mov	QWORD PTR -112[rbp], rsi
	mov	DWORD PTR -92[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	mov	QWORD PTR -80[rbp], 0
	mov	QWORD PTR -56[rbp], 0
	mov	QWORD PTR -48[rbp], 0
	lea	rsi, .LC0[rip]
	lea	rdi, .LC1[rip]
	call	fopen@PLT
	mov	QWORD PTR -40[rbp], rax
	cmp	QWORD PTR -40[rbp], 0
	jne	.L2
	lea	rdi, .LC2[rip]
	call	puts@PLT
	mov	DWORD PTR -92[rbp], -1
.L2:
	cmp	DWORD PTR -92[rbp], 0
	jne	.L3
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, 2
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	ftell@PLT
	mov	QWORD PTR -32[rbp], rax
	mov	rax, QWORD PTR -32[rbp]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, 0
	mov	esi, 0
	mov	rdi, rax
	call	fseek@PLT
.L3:
	cmp	DWORD PTR -92[rbp], 0
	jne	.L4
	lea	rsi, .LC4[rip]
	lea	rdi, .LC5[rip]
	call	fopen@PLT
	mov	QWORD PTR -80[rbp], rax
	cmp	QWORD PTR -80[rbp], 0
	jne	.L4
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	DWORD PTR -92[rbp], -1
.L4:
	mov	QWORD PTR -24[rbp], 512
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -16[rbp], rax
	cmp	DWORD PTR -92[rbp], 0
	jne	.L5
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -56[rbp], rax
	cmp	QWORD PTR -56[rbp], 0
	jne	.L5
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	DWORD PTR -92[rbp], -1
.L5:
	cmp	DWORD PTR -92[rbp], 0
	jne	.L6
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	malloc@PLT
	mov	QWORD PTR -48[rbp], rax
	cmp	QWORD PTR -48[rbp], 0
	jne	.L6
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	DWORD PTR -92[rbp], -1
.L6:
	mov	QWORD PTR -72[rbp], 0
	mov	QWORD PTR -64[rbp], 0
	jmp	.L7
.L11:
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -56[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	rdx, QWORD PTR -24[rbp]
	mov	rcx, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR -56[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	DWORD PTR -88[rbp], eax
	cmp	DWORD PTR -88[rbp], 0
	jg	.L8
	mov	eax, DWORD PTR -88[rbp]
	mov	esi, eax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L9
.L8:
	add	QWORD PTR -72[rbp], 1
	mov	rdx, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	eax, DWORD PTR -88[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	mov	eax, DWORD PTR -88[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -80[rbp]
	mov	rax, QWORD PTR -48[rbp]
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	DWORD PTR -84[rbp], eax
	mov	eax, DWORD PTR -84[rbp]
	cmp	eax, DWORD PTR -88[rbp]
	je	.L10
	lea	rdi, .LC9[rip]
	call	puts@PLT
	mov	DWORD PTR -92[rbp], -1
	jmp	.L9
.L10:
	add	QWORD PTR -64[rbp], 1
.L7:
	cmp	DWORD PTR -92[rbp], 0
	jne	.L9
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	feof@PLT
	test	eax, eax
	je	.L11
.L9:
	cmp	DWORD PTR -92[rbp], 0
	jne	.L12
	mov	rax, QWORD PTR -80[rbp]
	mov	rdi, rax
	call	ftell@PLT
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, .LC10[rip]
	mov	eax, 0
	call	printf@PLT
.L12:
	cmp	QWORD PTR -48[rbp], 0
	je	.L13
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	QWORD PTR -48[rbp], 0
.L13:
	cmp	QWORD PTR -56[rbp], 0
	je	.L14
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	QWORD PTR -56[rbp], 0
.L14:
	cmp	QWORD PTR -40[rbp], 0
	je	.L15
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	QWORD PTR -40[rbp], 0
.L15:
	cmp	QWORD PTR -80[rbp], 0
	je	.L16
	mov	rax, QWORD PTR -80[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	QWORD PTR -80[rbp], 0
.L16:
	lea	rdi, .LC11[rip]
	call	puts@PLT
	mov	rax, QWORD PTR -72[rbp]
	mov	rsi, rax
	lea	rdi, .LC12[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -64[rbp]
	mov	rsi, rax
	lea	rdi, .LC13[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -92[rbp]
	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	"305498.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"rb\000"
	.align	2
.LC1:
	.ascii	".\\input.txt\000"
	.align	2
.LC2:
	.ascii	"in file open error.\015\000"
	.align	2
.LC3:
	.ascii	"input file's size:%d.\015\012\000"
	.align	2
.LC4:
	.ascii	"wb\000"
	.align	2
.LC5:
	.ascii	".\\output.txt\000"
	.align	2
.LC6:
	.ascii	"out file open error.\015\000"
	.align	2
.LC7:
	.ascii	"memory alloc error.\015\000"
	.align	2
.LC8:
	.ascii	"end of read file by %d.\015\012\000"
	.align	2
.LC9:
	.ascii	"write out file error.\015\000"
	.align	2
.LC10:
	.ascii	"output file's size:%d.\015\012\000"
	.align	2
.LC11:
	.ascii	"---- ----- ---------\015\000"
	.align	2
.LC12:
	.ascii	"  in count:%09d.\015\012\000"
	.align	2
.LC13:
	.ascii	" out count:%09d.\015\012\000"
	.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]
	mov	r3, #0
	str	r3, [fp, #-56]
	mov	r3, #0
	str	r3, [fp, #-32]
	mov	r3, #0
	str	r3, [fp, #-52]
	mov	r3, #0
	str	r3, [fp, #-40]
	mov	r3, #0
	str	r3, [fp, #-36]
	ldr	r1, .L18
	ldr	r0, .L18+4
	bl	fopen
	str	r0, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	bne	.L2
	ldr	r0, .L18+8
	bl	puts
	mvn	r3, #0
	str	r3, [fp, #-56]
.L2:
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	bne	.L3
	mov	r2, #2
	mov	r1, #0
	ldr	r0, [fp, #-32]
	bl	fseek
	ldr	r0, [fp, #-32]
	bl	ftell
	str	r0, [fp, #-28]
	ldr	r1, [fp, #-28]
	ldr	r0, .L18+12
	bl	printf
	mov	r2, #0
	mov	r1, #0
	ldr	r0, [fp, #-32]
	bl	fseek
.L3:
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	bne	.L4
	ldr	r1, .L18+16
	ldr	r0, .L18+20
	bl	fopen
	str	r0, [fp, #-52]
	ldr	r3, [fp, #-52]
	cmp	r3, #0
	bne	.L4
	ldr	r0, .L18+24
	bl	puts
	mvn	r3, #0
	str	r3, [fp, #-56]
.L4:
	mov	r3, #512
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-24]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	bne	.L5
	ldr	r3, [fp, #-24]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-40]
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	bne	.L5
	ldr	r0, .L18+28
	bl	puts
	mvn	r3, #0
	str	r3, [fp, #-56]
.L5:
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	bne	.L6
	ldr	r3, [fp, #-20]
	mov	r0, r3
	bl	malloc
	mov	r3, r0
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	bne	.L6
	ldr	r0, .L18+28
	bl	puts
	mvn	r3, #0
	str	r3, [fp, #-56]
.L6:
	mov	r3, #0
	str	r3, [fp, #-48]
	mov	r3, #0
	str	r3, [fp, #-44]
	b	.L7
.L11:
	ldr	r3, [fp, #-24]
	mov	r2, r3
	mov	r1, #0
	ldr	r0, [fp, #-40]
	bl	memset
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-32]
	mov	r1, #1
	ldr	r0, [fp, #-40]
	bl	fread
	mov	r3, r0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	bgt	.L8
	ldr	r1, [fp, #-16]
	ldr	r0, .L18+32
	bl	printf
	b	.L9
.L8:
	ldr	r3, [fp, #-48]
	add	r3, r3, #1
	str	r3, [fp, #-48]
	ldr	r3, [fp, #-20]
	mov	r2, r3
	mov	r1, #0
	ldr	r0, [fp, #-36]
	bl	memset
	ldr	r3, [fp, #-16]
	mov	r2, r3
	ldr	r1, [fp, #-40]
	ldr	r0, [fp, #-36]
	bl	memcpy
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-52]
	mov	r1, #1
	ldr	r0, [fp, #-36]
	bl	fwrite
	mov	r3, r0
	str	r3, [fp, #-12]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	beq	.L10
	ldr	r0, .L18+36
	bl	puts
	mvn	r3, #0
	str	r3, [fp, #-56]
	b	.L9
.L10:
	ldr	r3, [fp, #-44]
	add	r3, r3, #1
	str	r3, [fp, #-44]
.L7:
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	bne	.L9
	ldr	r0, [fp, #-32]
	bl	feof
	mov	r3, r0
	cmp	r3, #0
	beq	.L11
.L9:
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	bne	.L12
	ldr	r0, [fp, #-52]
	bl	ftell
	str	r0, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r0, .L18+40
	bl	printf
.L12:
	ldr	r3, [fp, #-36]
	cmp	r3, #0
	beq	.L13
	ldr	r0, [fp, #-36]
	bl	free
	mov	r3, #0
	str	r3, [fp, #-36]
.L13:
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	beq	.L14
	ldr	r0, [fp, #-40]
	bl	free
	mov	r3, #0
	str	r3, [fp, #-40]
.L14:
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	beq	.L15
	ldr	r0, [fp, #-32]
	bl	fclose
	mov	r3, #0
	str	r3, [fp, #-32]
.L15:
	ldr	r3, [fp, #-52]
	cmp	r3, #0
	beq	.L16
	ldr	r0, [fp, #-52]
	bl	fclose
	mov	r3, #0
	str	r3, [fp, #-52]
.L16:
	ldr	r0, .L18+44
	bl	puts
	ldr	r1, [fp, #-48]
	ldr	r0, .L18+48
	bl	printf
	ldr	r1, [fp, #-44]
	ldr	r0, .L18+52
	bl	printf
	ldr	r3, [fp, #-56]
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.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
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
