	.file	"464065.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"usage: %s source destination\n"
.LC1:
	.string	"Cannot open"
.LC2:
	.string	"Cannot creat"
.LC3:
	.string	"%s is already exist. \n"
	.align 8
.LC4:
	.string	"Do you want to replace it (y/n)? "
.LC5:
	.string	"%c"
.LC6:
	.string	" File overwriting ... "
.LC7:
	.string	" Operation abort ! "
.LC8:
	.string	" invalid input "
.LC9:
	.string	"Write error to "
.LC10:
	.string	"Read error from "
.LC11:
	.string	""
.LC12:
	.string	"Error closing files"
	.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, 4096
	or	QWORD PTR [rsp], 0
	sub	rsp, 48
	mov	DWORD PTR -4132[rbp], edi
	mov	QWORD PTR -4144[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -4132[rbp], 3
	je	.L2
	mov	rax, QWORD PTR -4144[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	edi, 1
	call	exit@PLT
.L2:
	mov	rax, QWORD PTR -4144[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -4120[rbp], eax
	cmp	DWORD PTR -4120[rbp], -1
	jne	.L3
	mov	rax, QWORD PTR -4144[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	call	oops
.L3:
	mov	rax, QWORD PTR -4144[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	cmp	eax, -1
	jne	.L4
	mov	rax, QWORD PTR -4144[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	esi, 420
	mov	rdi, rax
	call	creat@PLT
	mov	DWORD PTR -4124[rbp], eax
	cmp	DWORD PTR -4124[rbp], -1
	jne	.L9
	mov	rax, QWORD PTR -4144[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	call	oops
	jmp	.L9
.L4:
	mov	rax, QWORD PTR -4144[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC3[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	lea	rax, -4125[rbp]
	mov	rsi, rax
	lea	rdi, .LC5[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	movzx	eax, BYTE PTR -4125[rbp]
	cmp	al, 121
	jne	.L6
	mov	rax, QWORD PTR -4144[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	esi, 420
	mov	rdi, rax
	call	creat@PLT
	mov	DWORD PTR -4124[rbp], eax
	cmp	DWORD PTR -4124[rbp], -1
	jne	.L7
	mov	rax, QWORD PTR -4144[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	call	oops
.L7:
	lea	rdi, .LC6[rip]
	call	puts@PLT
	jmp	.L9
.L6:
	movzx	eax, BYTE PTR -4125[rbp]
	cmp	al, 110
	jne	.L8
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L8:
	lea	rdi, .LC8[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
.L10:
	mov	eax, DWORD PTR -4116[rbp]
	movsx	rdx, eax
	lea	rcx, -4112[rbp]
	mov	eax, DWORD PTR -4124[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	edx, DWORD PTR -4116[rbp]
	movsx	rdx, edx
	cmp	rax, rdx
	je	.L9
	mov	rax, QWORD PTR -4144[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	call	oops
.L9:
	lea	rcx, -4112[rbp]
	mov	eax, DWORD PTR -4120[rbp]
	mov	edx, 4096
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -4116[rbp], eax
	cmp	DWORD PTR -4116[rbp], 0
	jg	.L10
	cmp	DWORD PTR -4116[rbp], -1
	jne	.L11
	mov	rax, QWORD PTR -4144[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC10[rip]
	call	oops
.L11:
	mov	eax, DWORD PTR -4120[rbp]
	mov	edi, eax
	call	close@PLT
	cmp	eax, -1
	je	.L12
	mov	eax, DWORD PTR -4124[rbp]
	mov	edi, eax
	call	close@PLT
	cmp	eax, -1
	jne	.L13
.L12:
	lea	rsi, .LC11[rip]
	lea	rdi, .LC12[rip]
	call	oops
.L13:
	mov	eax, 0
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	main, .-main
	.section	.rodata
.LC13:
	.string	"Error : %s"
	.text
	.globl	oops
	.type	oops, @function
oops:
.LFB7:
	.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	QWORD PTR -16[rbp], rsi
	mov	rax, QWORD PTR stderr[rip]
	mov	rdx, QWORD PTR -8[rbp]
	lea	rsi, .LC13[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	perror@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE7:
	.size	oops, .-oops
	.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	"464065.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"usage: %s source destination\012\000"
	.align	2
.LC1:
	.ascii	"Cannot open\000"
	.align	2
.LC2:
	.ascii	"Cannot creat\000"
	.align	2
.LC3:
	.ascii	"%s is already exist. \012\000"
	.align	2
.LC4:
	.ascii	"Do you want to replace it (y/n)? \000"
	.align	2
.LC5:
	.ascii	"%c\000"
	.align	2
.LC6:
	.ascii	" File overwriting ... \000"
	.align	2
.LC7:
	.ascii	" Operation abort ! \000"
	.align	2
.LC8:
	.ascii	" invalid input \000"
	.align	2
.LC9:
	.ascii	"Write error to \000"
	.align	2
.LC10:
	.ascii	"Read error from \000"
	.align	2
.LC11:
	.ascii	"\000"
	.align	2
.LC12:
	.ascii	"Error closing files\000"
	.align	2
.LC13:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 4128
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #4096
	sub	sp, sp, #36
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r0, [r3, #-28]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	str	r1, [r3, #-32]
	ldr	r3, .L16
	ldr	r3, [r3]
	str	r3, [fp, #-16]
	mov	r3,#0
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-28]
	cmp	r3, #3
	beq	.L2
	ldr	r3, .L16+4
	ldr	r0, [r3]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-32]
	ldr	r3, [r3]
	mov	r2, r3
	ldr	r1, .L16+8
	bl	fprintf
	mov	r0, #1
	bl	exit
.L2:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-32]
	add	r3, r3, #4
	ldr	r3, [r3]
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r4, r2
	mov	r1, #0
	mov	r0, r3
	bl	open
	str	r0, [r4, #-12]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-12]
	cmn	r3, #1
	bne	.L3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-32]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L16+12
	bl	oops
.L3:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-32]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r1, #0
	mov	r0, r3
	bl	open
	mov	r3, r0
	cmn	r3, #1
	bne	.L4
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-32]
	add	r3, r3, #8
	ldr	r3, [r3]
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r4, r2
	mov	r1, #420
	mov	r0, r3
	bl	creat
	str	r0, [r4, #-16]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-16]
	cmn	r3, #1
	bne	.L9
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-32]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L16+16
	bl	oops
	b	.L9
.L4:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-32]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L16+20
	bl	printf
	ldr	r0, .L16+24
	bl	printf
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #17
	mov	r1, r3
	ldr	r0, .L16+28
	bl	__isoc99_scanf
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldrb	r3, [r3, #-17]	@ zero_extendqisi2
	cmp	r3, #121
	bne	.L6
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-32]
	add	r3, r3, #8
	ldr	r3, [r3]
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r4, r2
	mov	r1, #420
	mov	r0, r3
	bl	creat
	str	r0, [r4, #-16]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-16]
	cmn	r3, #1
	bne	.L7
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-32]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L16+16
	bl	oops
.L7:
	ldr	r0, .L16+32
	bl	puts
	b	.L9
.L6:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldrb	r3, [r3, #-17]	@ zero_extendqisi2
	cmp	r3, #110
	bne	.L8
	ldr	r0, .L16+36
	bl	puts
	mov	r0, #1
	bl	exit
.L8:
	ldr	r0, .L16+40
	bl	puts
	mov	r0, #1
	bl	exit
.L10:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r2, [r3, #-8]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	sub	r1, fp, #4096
	sub	r1, r1, #12
	mov	r0, r1
	mov	r1, r3
	ldr	r0, [r0, #-16]
	bl	write
	mov	r2, r0
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	cmp	r3, r2
	beq	.L9
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-32]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L16+44
	bl	oops
.L9:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	mov	r4, r3
	sub	r3, fp, #4096
	sub	r3, r3, #12
	sub	r3, r3, #4
	sub	r2, fp, #4096
	sub	r2, r2, #12
	mov	r0, r2
	mov	r2, #4096
	mov	r1, r3
	ldr	r0, [r0, #-12]
	bl	read
	str	r0, [r4, #-8]
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	cmp	r3, #0
	bgt	.L10
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-8]
	cmn	r3, #1
	bne	.L11
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r3, [r3, #-32]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L16+48
	bl	oops
.L11:
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-12]
	bl	close
	mov	r3, r0
	cmn	r3, #1
	beq	.L12
	sub	r3, fp, #4096
	sub	r3, r3, #12
	ldr	r0, [r3, #-16]
	bl	close
	mov	r3, r0
	cmn	r3, #1
	bne	.L13
.L12:
	ldr	r1, .L16+52
	ldr	r0, .L16+56
	bl	oops
.L13:
	mov	r3, #0
	ldr	r2, .L16
	ldr	r1, [r2]
	ldr	r2, [fp, #-16]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L15
	bl	__stack_chk_fail
.L15:
	mov	r0, r3
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L17:
	.align	2
.L16:
	.word	.LC13
	.word	stderr
	.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
	.size	main, .-main
	.section	.rodata
	.align	2
.LC14:
	.ascii	"Error : %s\000"
	.text
	.align	2
	.global	oops
	.syntax unified
	.arm
	.fpu softvfp
	.type	oops, %function
oops:
	@ 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]
	str	r1, [fp, #-12]
	ldr	r3, .L19
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	ldr	r1, .L19+4
	mov	r0, r3
	bl	fprintf
	ldr	r0, [fp, #-12]
	bl	perror
	mov	r0, #1
	bl	exit
.L20:
	.align	2
.L19:
	.word	stderr
	.word	.LC14
	.size	oops, .-oops
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
