	.file	"169184.c"
	.intel_syntax noprefix
	.text
	.globl	buf
	.bss
	.align 32
	.type	buf, @object
	.size	buf, 8192
buf:
	.zero	8192
	.section	.rodata
	.align 8
.LC0:
	.string	"Usage: fopen source destination"
.LC1:
	.string	"r"
.LC2:
	.string	"cannot open input file"
.LC3:
	.string	"w"
.LC4:
	.string	"cannot open output file"
.LC5:
	.string	"write error"
.LC6:
	.string	"read error"
.LC7:
	.string	"cannot close"
	.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
	push	r13
	push	r12
	push	rbx
	sub	rsp, 24
	.cfi_offset 13, -24
	.cfi_offset 12, -32
	.cfi_offset 3, -40
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	cmp	DWORD PTR -36[rbp], 3
	je	.L2
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	fatal
.L2:
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC1[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	rbx, rax
	test	rbx, rbx
	jne	.L3
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	fatal
.L3:
	mov	rax, QWORD PTR -48[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	fopen@PLT
	mov	r12, rax
	test	r12, r12
	jne	.L5
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	fatal
	jmp	.L5
.L6:
	mov	eax, r13d
	mov	rcx, r12
	mov	rdx, rax
	mov	esi, 1
	lea	rdi, buf[rip]
	call	fwrite@PLT
	mov	edx, r13d
	cmp	rax, rdx
	je	.L5
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	fatal
.L5:
	mov	rcx, rbx
	mov	edx, 8192
	mov	esi, 1
	lea	rdi, buf[rip]
	call	fread@PLT
	mov	r13d, eax
	test	r13d, r13d
	jne	.L6
	mov	rdi, rbx
	call	feof@PLT
	test	eax, eax
	jne	.L7
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	fatal
.L7:
	mov	rdi, rbx
	call	fclose@PLT
	cmp	eax, -1
	je	.L8
	mov	rdi, r12
	call	fclose@PLT
	cmp	eax, -1
	jne	.L9
.L8:
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	fatal
.L9:
	mov	edi, 0
	call	exit@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
.LC8:
	.string	"fatal: %s\n"
	.text
	.globl	fatal
	.type	fatal, @function
fatal:
.LFB1:
	.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 stderr[rip]
	mov	rdx, QWORD PTR -8[rbp]
	lea	rsi, .LC8[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE1:
	.size	fatal, .-fatal
	.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	"169184.c"
	.text
	.comm	buf,8192,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: fopen source destination\000"
	.align	2
.LC1:
	.ascii	"r\000"
	.align	2
.LC2:
	.ascii	"cannot open input file\000"
	.align	2
.LC3:
	.ascii	"w\000"
	.align	2
.LC4:
	.ascii	"cannot open output file\000"
	.align	2
.LC5:
	.ascii	"write error\000"
	.align	2
.LC6:
	.ascii	"read error\000"
	.align	2
.LC7:
	.ascii	"cannot close\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, fp, lr}
	add	fp, sp, #16
	sub	sp, sp, #12
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, [fp, #-24]
	cmp	r3, #3
	beq	.L2
	ldr	r0, .L10
	bl	fatal
.L2:
	ldr	r3, [fp, #-28]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r1, .L10+4
	mov	r0, r3
	bl	fopen
	mov	r4, r0
	cmp	r4, #0
	bne	.L3
	ldr	r0, .L10+8
	bl	fatal
.L3:
	ldr	r3, [fp, #-28]
	add	r3, r3, #8
	ldr	r3, [r3]
	ldr	r1, .L10+12
	mov	r0, r3
	bl	fopen
	mov	r6, r0
	cmp	r6, #0
	bne	.L5
	ldr	r0, .L10+16
	bl	fatal
	b	.L5
.L6:
	mov	r3, r6
	mov	r2, r5
	mov	r1, #1
	ldr	r0, .L10+20
	bl	fwrite
	mov	r3, r0
	cmp	r5, r3
	beq	.L5
	ldr	r0, .L10+24
	bl	fatal
.L5:
	mov	r3, r4
	mov	r2, #8192
	mov	r1, #1
	ldr	r0, .L10+20
	bl	fread
	mov	r5, r0
	cmp	r5, #0
	bne	.L6
	mov	r0, r4
	bl	feof
	mov	r3, r0
	cmp	r3, #0
	bne	.L7
	ldr	r0, .L10+28
	bl	fatal
.L7:
	mov	r0, r4
	bl	fclose
	mov	r3, r0
	cmn	r3, #1
	beq	.L8
	mov	r0, r6
	bl	fclose
	mov	r3, r0
	cmn	r3, #1
	bne	.L9
.L8:
	ldr	r0, .L10+32
	bl	fatal
.L9:
	mov	r0, #0
	bl	exit
.L11:
	.align	2
.L10:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	buf
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.size	main, .-main
	.section	.rodata
	.align	2
.LC8:
	.ascii	"fatal: %s\012\000"
	.text
	.align	2
	.global	fatal
	.syntax unified
	.arm
	.fpu softvfp
	.type	fatal, %function
fatal:
	@ 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	r3, .L13
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	ldr	r1, .L13+4
	mov	r0, r3
	bl	fprintf
	mov	r0, #1
	bl	exit
.L14:
	.align	2
.L13:
	.word	stderr
	.word	.LC8
	.size	fatal, .-fatal
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
