	.file	"11074547.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"Usage: %s file\n"
.LC1:
	.string	".bin"
.LC2:
	.string	"%s.bin"
.LC3:
	.string	"r"
.LC4:
	.string	"w"
	.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, 352
	mov	DWORD PTR -340[rbp], edi
	mov	QWORD PTR -352[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -340[rbp], 1
	jg	.L2
	mov	rax, QWORD PTR -352[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR stderr[rip]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L10
	jmp	.L11
.L2:
	mov	rax, QWORD PTR -352[rbp]
	mov	rax, QWORD PTR 8[rax]
	mov	QWORD PTR -312[rbp], rax
	mov	QWORD PTR -328[rbp], 0
	mov	QWORD PTR -320[rbp], 0
	mov	QWORD PTR -272[rbp], 0
	mov	QWORD PTR -264[rbp], 0
	mov	QWORD PTR -256[rbp], 0
	mov	QWORD PTR -248[rbp], 0
	mov	QWORD PTR -240[rbp], 0
	mov	QWORD PTR -232[rbp], 0
	mov	QWORD PTR -224[rbp], 0
	mov	QWORD PTR -216[rbp], 0
	mov	QWORD PTR -208[rbp], 0
	mov	QWORD PTR -200[rbp], 0
	mov	QWORD PTR -192[rbp], 0
	mov	QWORD PTR -184[rbp], 0
	mov	QWORD PTR -176[rbp], 0
	mov	QWORD PTR -168[rbp], 0
	mov	QWORD PTR -160[rbp], 0
	mov	QWORD PTR -152[rbp], 0
	mov	QWORD PTR -144[rbp], 0
	mov	QWORD PTR -136[rbp], 0
	mov	QWORD PTR -128[rbp], 0
	mov	QWORD PTR -120[rbp], 0
	mov	QWORD PTR -112[rbp], 0
	mov	QWORD PTR -104[rbp], 0
	mov	QWORD PTR -96[rbp], 0
	mov	QWORD PTR -88[rbp], 0
	mov	QWORD PTR -80[rbp], 0
	mov	QWORD PTR -72[rbp], 0
	mov	QWORD PTR -64[rbp], 0
	mov	QWORD PTR -56[rbp], 0
	mov	QWORD PTR -48[rbp], 0
	mov	QWORD PTR -40[rbp], 0
	mov	QWORD PTR -32[rbp], 0
	mov	QWORD PTR -24[rbp], 0
	mov	rax, QWORD PTR -312[rbp]
	mov	esi, 46
	mov	rdi, rax
	call	strrchr@PLT
	mov	QWORD PTR -304[rbp], rax
	cmp	QWORD PTR -304[rbp], 0
	je	.L4
	mov	rax, QWORD PTR -304[rbp]
	sub	rax, QWORD PTR -312[rbp]
	mov	rdx, rax
	mov	rcx, QWORD PTR -312[rbp]
	lea	rax, -272[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	mov	rax, QWORD PTR -304[rbp]
	sub	rax, QWORD PTR -312[rbp]
	mov	rdx, rax
	lea	rax, -272[rbp]
	add	rax, rdx
	mov	edx, 4
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	memcpy@PLT
	jmp	.L5
.L4:
	mov	rdx, QWORD PTR -312[rbp]
	lea	rax, -272[rbp]
	lea	rsi, .LC2[rip]
	mov	rdi, rax
	mov	eax, 0
	call	sprintf@PLT
.L5:
	mov	rax, QWORD PTR -312[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -296[rbp], rax
	cmp	QWORD PTR -296[rbp], 0
	jne	.L6
	mov	edi, 1
	call	exit@PLT
.L6:
	lea	rax, -272[rbp]
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	QWORD PTR -288[rbp], rax
	cmp	QWORD PTR -288[rbp], 0
	jne	.L8
	mov	edi, 1
	call	exit@PLT
.L9:
	cmp	QWORD PTR -280[rbp], 1
	jle	.L8
	mov	rax, QWORD PTR -328[rbp]
	mov	edx, 10
	mov	esi, 0
	mov	rdi, rax
	call	strtol@PLT
	mov	DWORD PTR -332[rbp], eax
	mov	rdx, QWORD PTR -288[rbp]
	lea	rax, -332[rbp]
	mov	rcx, rdx
	mov	edx, 1
	mov	esi, 2
	mov	rdi, rax
	call	fwrite@PLT
.L8:
	mov	rdx, QWORD PTR -296[rbp]
	lea	rcx, -320[rbp]
	lea	rax, -328[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	getline@PLT
	mov	QWORD PTR -280[rbp], rax
	cmp	QWORD PTR -280[rbp], -1
	jne	.L9
	mov	rax, QWORD PTR -328[rbp]
	mov	rdi, rax
	call	free@PLT
	mov	rax, QWORD PTR -288[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	rax, QWORD PTR -296[rbp]
	mov	rdi, rax
	call	fclose@PLT
	mov	edi, 0
	call	exit@PLT
.L11:
	call	__stack_chk_fail@PLT
.L10:
	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	"11074547.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: %s file\012\000"
	.align	2
.LC1:
	.ascii	".bin\000"
	.align	2
.LC2:
	.ascii	"%s.bin\000"
	.align	2
.LC3:
	.ascii	"r\000"
	.align	2
.LC4:
	.ascii	"w\000"
	.align	2
.LC5:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 304
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #304
	str	r0, [fp, #-304]
	str	r1, [fp, #-308]
	ldr	r3, .L12
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-304]
	cmp	r3, #1
	bgt	.L2
	ldr	r3, .L12+4
	ldr	r0, [r3]
	ldr	r3, [fp, #-308]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L12+8
	bl	fprintf
	mov	r3, #1
	ldr	r2, .L12
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L10
	b	.L11
.L2:
	ldr	r3, [fp, #-308]
	ldr	r3, [r3, #4]
	str	r3, [fp, #-284]
	mov	r3, #0
	str	r3, [fp, #-296]
	mov	r3, #0
	str	r3, [fp, #-292]
	mov	r3, #0
	str	r3, [fp, #-264]
	sub	r3, fp, #260
	mov	r2, #252
	mov	r1, #0
	mov	r0, r3
	bl	memset
	mov	r1, #46
	ldr	r0, [fp, #-284]
	bl	strrchr
	str	r0, [fp, #-280]
	ldr	r3, [fp, #-280]
	cmp	r3, #0
	beq	.L4
	ldr	r2, [fp, #-280]
	ldr	r3, [fp, #-284]
	sub	r3, r2, r3
	mov	r2, r3
	sub	r3, fp, #264
	ldr	r1, [fp, #-284]
	mov	r0, r3
	bl	memcpy
	ldr	r2, [fp, #-280]
	ldr	r3, [fp, #-284]
	sub	r3, r2, r3
	mov	r2, r3
	sub	r3, fp, #264
	add	r3, r3, r2
	mov	r2, #4
	ldr	r1, .L12+12
	mov	r0, r3
	bl	memcpy
	b	.L5
.L4:
	sub	r3, fp, #264
	ldr	r2, [fp, #-284]
	ldr	r1, .L12+16
	mov	r0, r3
	bl	sprintf
.L5:
	ldr	r1, .L12+20
	ldr	r0, [fp, #-284]
	bl	fopen
	str	r0, [fp, #-276]
	ldr	r3, [fp, #-276]
	cmp	r3, #0
	bne	.L6
	mov	r0, #1
	bl	exit
.L6:
	sub	r3, fp, #264
	ldr	r1, .L12+24
	mov	r0, r3
	bl	fopen
	str	r0, [fp, #-272]
	ldr	r3, [fp, #-272]
	cmp	r3, #0
	bne	.L8
	mov	r0, #1
	bl	exit
.L9:
	ldr	r3, [fp, #-268]
	cmp	r3, #1
	ble	.L8
	ldr	r3, [fp, #-296]
	mov	r2, #10
	mov	r1, #0
	mov	r0, r3
	bl	strtol
	mov	r3, r0
	str	r3, [fp, #-288]
	sub	r0, fp, #288
	ldr	r3, [fp, #-272]
	mov	r2, #1
	mov	r1, #2
	bl	fwrite
.L8:
	sub	r1, fp, #292
	sub	r3, fp, #296
	ldr	r2, [fp, #-276]
	mov	r0, r3
	bl	getline
	str	r0, [fp, #-268]
	ldr	r3, [fp, #-268]
	cmn	r3, #1
	bne	.L9
	ldr	r3, [fp, #-296]
	mov	r0, r3
	bl	free
	ldr	r0, [fp, #-272]
	bl	fclose
	ldr	r0, [fp, #-276]
	bl	fclose
	mov	r0, #0
	bl	exit
.L11:
	bl	__stack_chk_fail
.L10:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L13:
	.align	2
.L12:
	.word	.LC5
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
