	.file	"176648.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"Usage: <input filename> <output filename>\n"
.LC1:
	.string	"Error opening file '%s': %s\n"
.LC2:
	.string	"'%s' size: %lld bytes\n"
.LC3:
	.string	"%lld >> 510!!\n"
.LC4:
	.string	"rb"
.LC5:
	.string	"read '%s' error, size is %d.\n"
.LC6:
	.string	"wb+"
	.align 8
.LC7:
	.string	"write '%s' error, size is %d.\n"
	.align 8
.LC8:
	.string	"build 512 bytes boot sector: '%s' success!\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 720
	mov	DWORD PTR -708[rbp], edi
	mov	QWORD PTR -720[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -708[rbp], 3
	je	.L2
	mov	rax, QWORD PTR stderr[rip]
	mov	rcx, rax
	mov	edx, 42
	mov	esi, 1
	lea	rdi, .LC0[rip]
	call	fwrite@PLT
	mov	eax, -1
	jmp	.L8
.L2:
	mov	rax, QWORD PTR -720[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rdx, -672[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	stat@PLT
	test	eax, eax
	je	.L4
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	mov	edi, eax
	call	strerror@PLT
	mov	rcx, rax
	mov	rax, QWORD PTR -720[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L8
.L4:
	mov	rdx, QWORD PTR -624[rbp]
	mov	rax, QWORD PTR -720[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	rax, QWORD PTR -624[rbp]
	cmp	rax, 510
	jle	.L5
	mov	rdx, QWORD PTR -624[rbp]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L8
.L5:
	lea	rax, -528[rbp]
	mov	edx, 512
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	mov	rax, QWORD PTR -720[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -688[rbp], rax
	mov	rax, QWORD PTR -624[rbp]
	mov	rsi, rax
	mov	rdx, QWORD PTR -688[rbp]
	lea	rax, -528[rbp]
	mov	rcx, rdx
	mov	rdx, rsi
	mov	esi, 1
	mov	rdi, rax
	call	fread@PLT
	mov	DWORD PTR -692[rbp], eax
	mov	eax, DWORD PTR -692[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -624[rbp]
	cmp	rdx, rax
	je	.L6
	mov	rax, QWORD PTR -720[rbp]
	add	rax, 8
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	ecx, DWORD PTR -692[rbp]
	lea	rsi, .LC5[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L8
.L6:
	mov	rax, QWORD PTR -688[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	BYTE PTR -18[rbp], 85
	mov	BYTE PTR -17[rbp], -86
	mov	rax, QWORD PTR -720[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC6[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -680[rbp], rax
	mov	rdx, QWORD PTR -680[rbp]
	lea	rax, -528[rbp]
	mov	rcx, rdx
	mov	edx, 512
	mov	esi, 1
	mov	rdi, rax
	call	fwrite@PLT
	mov	DWORD PTR -692[rbp], eax
	cmp	DWORD PTR -692[rbp], 512
	je	.L7
	mov	rax, QWORD PTR -720[rbp]
	add	rax, 16
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	mov	ecx, DWORD PTR -692[rbp]
	lea	rsi, .LC7[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, -1
	jmp	.L8
.L7:
	mov	rax, QWORD PTR -680[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -720[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
.L8:
	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
.LFE0:
	.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	"176648.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: <input filename> <output filename>\012\000"
	.align	2
.LC1:
	.ascii	"Error opening file '%s': %s\012\000"
	.align	2
.LC2:
	.ascii	"'%s' size: %lld bytes\012\000"
	.align	2
.LC3:
	.ascii	"%lld >> 510!!\012\000"
	.align	2
.LC4:
	.ascii	"rb\000"
	.align	2
.LC5:
	.ascii	"read '%s' error, size is %d.\012\000"
	.align	2
.LC6:
	.ascii	"wb+\000"
	.align	2
.LC7:
	.ascii	"write '%s' error, size is %d.\012\000"
	.align	2
.LC8:
	.ascii	"build 512 bytes boot sector: '%s' success!\012\000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 632
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, fp, lr}
	add	fp, sp, #12
	sub	sp, sp, #632
	str	r0, [fp, #-640]
	str	r1, [fp, #-644]
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	ldr	r3, [fp, #-640]
	cmp	r3, #3
	beq	.L2
	ldr	r3, .L10+4
	ldr	r3, [r3]
	mov	r2, #42
	mov	r1, #1
	ldr	r0, .L10+8
	bl	fwrite
	mvn	r3, #0
	b	.L8
.L2:
	ldr	r3, [fp, #-644]
	add	r3, r3, #4
	ldr	r3, [r3]
	sub	r2, fp, #620
	mov	r1, r2
	mov	r0, r3
	bl	stat
	mov	r3, r0
	cmp	r3, #0
	beq	.L4
	ldr	r3, .L10+4
	ldr	r4, [r3]
	ldr	r3, [fp, #-644]
	add	r3, r3, #4
	ldr	r5, [r3]
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	mov	r0, r3
	bl	strerror
	mov	r3, r0
	mov	r2, r5
	ldr	r1, .L10+12
	mov	r0, r4
	bl	fprintf
	mvn	r3, #0
	b	.L8
.L4:
	ldr	r3, [fp, #-644]
	add	r3, r3, #4
	ldr	r1, [r3]
	ldr	r3, [fp, #-576]
	mov	r2, r3
	asr	r3, r2, #31
	ldr	r0, .L10+16
	bl	printf
	ldr	r3, [fp, #-576]
	ldr	r2, .L10+20
	cmp	r3, r2
	ble	.L5
	ldr	r3, .L10+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-576]
	mov	r2, r3
	asr	r3, r2, #31
	ldr	r1, .L10+24
	bl	fprintf
	mvn	r3, #0
	b	.L8
.L5:
	sub	r3, fp, #528
	mov	r2, #512
	mov	r1, #0
	mov	r0, r3
	bl	memset
	ldr	r3, [fp, #-644]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L10+28
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-632]
	ldr	r3, [fp, #-576]
	mov	r2, r3
	sub	r0, fp, #528
	ldr	r3, [fp, #-632]
	mov	r1, #1
	bl	fread
	mov	r3, r0
	str	r3, [fp, #-628]
	ldr	r3, [fp, #-576]
	ldr	r2, [fp, #-628]
	cmp	r2, r3
	beq	.L6
	ldr	r3, .L10+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-644]
	add	r3, r3, #4
	ldr	r2, [r3]
	ldr	r3, [fp, #-628]
	ldr	r1, .L10+32
	bl	fprintf
	mvn	r3, #0
	b	.L8
.L6:
	ldr	r0, [fp, #-632]
	bl	fclose
	mov	r3, #85
	strb	r3, [fp, #-18]
	mvn	r3, #85
	strb	r3, [fp, #-17]
	ldr	r3, [fp, #-644]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldr	r1, .L10+36
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-624]
	sub	r0, fp, #528
	ldr	r3, [fp, #-624]
	mov	r2, #512
	mov	r1, #1
	bl	fwrite
	mov	r3, r0
	str	r3, [fp, #-628]
	ldr	r3, [fp, #-628]
	cmp	r3, #512
	beq	.L7
	ldr	r3, .L10+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-644]
	add	r3, r3, #8
	ldr	r2, [r3]
	ldr	r3, [fp, #-628]
	ldr	r1, .L10+40
	bl	fprintf
	mvn	r3, #0
	b	.L8
.L7:
	ldr	r0, [fp, #-624]
	bl	fclose
	ldr	r3, [fp, #-644]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L10+44
	bl	printf
	mov	r3, #0
.L8:
	ldr	r2, .L10
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L9
	bl	__stack_chk_fail
.L9:
	mov	r0, r3
	sub	sp, fp, #12
	@ sp needed
	pop	{r4, r5, fp, pc}
.L11:
	.align	2
.L10:
	.word	.LC9
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	510
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
