	.file	"838069.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
	.align 8
.LC0:
	.string	"Welcome to the File Copy Program by Ting! \nEnter the name of the file to copy from:"
.LC1:
	.string	"%s"
.LC2:
	.string	"error: open %s \n"
	.align 8
.LC3:
	.string	"Enter the name of the file to copy to:"
.LC4:
	.string	"error: read %s \n"
.LC5:
	.string	" bytes copied"
.LC6:
	.string	"File Copy Successful, "
.LC7:
	.string	"%s%d%s\n"
.LC8:
	.string	"write %s error\n"
.LC9:
	.string	"error: close %s \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, 480
	mov	DWORD PTR -468[rbp], edi
	mov	QWORD PTR -480[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -452[rbp], 0
	lea	rdi, .LC0[rip]
	call	puts@PLT
	lea	rax, -416[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rax, -416[rbp]
	mov	esi, 0
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -448[rbp], eax
	cmp	DWORD PTR -448[rbp], 0
	jns	.L2
	lea	rax, -416[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L12
.L2:
	lea	rdi, .LC3[rip]
	call	puts@PLT
	lea	rax, -208[rbp]
	mov	rsi, rax
	lea	rdi, .LC1[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	lea	rax, -208[rbp]
	mov	edx, 384
	mov	esi, 65
	mov	rdi, rax
	mov	eax, 0
	call	open@PLT
	mov	DWORD PTR -444[rbp], eax
	cmp	DWORD PTR -444[rbp], 0
	jns	.L4
	lea	rax, -208[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L12
.L4:
	lea	rcx, -429[rbp]
	mov	eax, DWORD PTR -448[rbp]
	mov	edx, 13
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -440[rbp], eax
	cmp	DWORD PTR -440[rbp], 0
	jns	.L5
	lea	rax, -416[rbp]
	mov	rsi, rax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L12
.L5:
	cmp	DWORD PTR -440[rbp], 0
	jne	.L6
	mov	eax, DWORD PTR -452[rbp]
	lea	rcx, .LC5[rip]
	mov	edx, eax
	lea	rsi, .LC6[rip]
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	nop
	mov	eax, DWORD PTR -448[rbp]
	mov	edi, eax
	call	close@PLT
	test	eax, eax
	jns	.L10
	jmp	.L14
.L6:
	cmp	DWORD PTR -440[rbp], 0
	jle	.L4
	mov	eax, DWORD PTR -440[rbp]
	movsx	rdx, eax
	lea	rcx, -429[rbp]
	mov	eax, DWORD PTR -444[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -436[rbp], eax
	mov	eax, DWORD PTR -436[rbp]
	cmp	eax, DWORD PTR -440[rbp]
	je	.L9
	lea	rax, -208[rbp]
	mov	rsi, rax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L12
.L9:
	mov	eax, DWORD PTR -440[rbp]
	add	DWORD PTR -452[rbp], eax
	jmp	.L4
.L14:
	lea	rax, -416[rbp]
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L12
.L10:
	mov	eax, DWORD PTR -444[rbp]
	mov	edi, eax
	call	close@PLT
	test	eax, eax
	jns	.L11
	lea	rax, -208[rbp]
	mov	rsi, rax
	lea	rdi, .LC9[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, -1
	jmp	.L12
.L11:
	mov	eax, 0
.L12:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L13
	call	__stack_chk_fail@PLT
.L13:
	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	"838069.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Welcome to the File Copy Program by Ting! \012Enter"
	.ascii	" the name of the file to copy from:\000"
	.align	2
.LC1:
	.ascii	"%s\000"
	.align	2
.LC2:
	.ascii	"error: open %s \012\000"
	.align	2
.LC3:
	.ascii	"Enter the name of the file to copy to:\000"
	.align	2
.LC4:
	.ascii	"error: read %s \012\000"
	.align	2
.LC5:
	.ascii	" bytes copied\000"
	.align	2
.LC6:
	.ascii	"File Copy Successful, \000"
	.align	2
.LC7:
	.ascii	"%s%d%s\012\000"
	.align	2
.LC8:
	.ascii	"write %s error\012\000"
	.align	2
.LC9:
	.ascii	"error: close %s \012\000"
	.align	2
.LC10:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 448
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #448
	str	r0, [fp, #-448]
	str	r1, [fp, #-452]
	ldr	r3, .L15
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-444]
	ldr	r0, .L15+4
	bl	puts
	sub	r3, fp, #408
	mov	r1, r3
	ldr	r0, .L15+8
	bl	__isoc99_scanf
	sub	r3, fp, #408
	mov	r1, #0
	mov	r0, r3
	bl	open
	str	r0, [fp, #-440]
	ldr	r3, [fp, #-440]
	cmp	r3, #0
	bge	.L2
	sub	r3, fp, #408
	mov	r1, r3
	ldr	r0, .L15+12
	bl	printf
	mvn	r3, #0
	b	.L12
.L2:
	ldr	r0, .L15+16
	bl	puts
	sub	r3, fp, #208
	mov	r1, r3
	ldr	r0, .L15+8
	bl	__isoc99_scanf
	sub	r3, fp, #208
	mov	r2, #384
	mov	r1, #65
	mov	r0, r3
	bl	open
	str	r0, [fp, #-436]
	ldr	r3, [fp, #-436]
	cmp	r3, #0
	bge	.L4
	sub	r3, fp, #208
	mov	r1, r3
	ldr	r0, .L15+12
	bl	printf
	mvn	r3, #0
	b	.L12
.L4:
	sub	r3, fp, #424
	mov	r2, #13
	mov	r1, r3
	ldr	r0, [fp, #-440]
	bl	read
	str	r0, [fp, #-432]
	ldr	r3, [fp, #-432]
	cmp	r3, #0
	bge	.L5
	sub	r3, fp, #408
	mov	r1, r3
	ldr	r0, .L15+20
	bl	printf
	mvn	r3, #0
	b	.L12
.L5:
	ldr	r3, [fp, #-432]
	cmp	r3, #0
	bne	.L6
	ldr	r3, .L15+24
	ldr	r2, [fp, #-444]
	ldr	r1, .L15+28
	ldr	r0, .L15+32
	bl	printf
	nop
	ldr	r0, [fp, #-440]
	bl	close
	mov	r3, r0
	cmp	r3, #0
	bge	.L10
	b	.L14
.L6:
	ldr	r3, [fp, #-432]
	cmp	r3, #0
	ble	.L4
	ldr	r2, [fp, #-432]
	sub	r3, fp, #424
	mov	r1, r3
	ldr	r0, [fp, #-436]
	bl	write
	str	r0, [fp, #-428]
	ldr	r2, [fp, #-428]
	ldr	r3, [fp, #-432]
	cmp	r2, r3
	beq	.L9
	sub	r3, fp, #208
	mov	r1, r3
	ldr	r0, .L15+36
	bl	printf
	mvn	r3, #0
	b	.L12
.L9:
	ldr	r2, [fp, #-444]
	ldr	r3, [fp, #-432]
	add	r3, r2, r3
	str	r3, [fp, #-444]
	b	.L4
.L14:
	sub	r3, fp, #408
	mov	r1, r3
	ldr	r0, .L15+40
	bl	printf
	mvn	r3, #0
	b	.L12
.L10:
	ldr	r0, [fp, #-436]
	bl	close
	mov	r3, r0
	cmp	r3, #0
	bge	.L11
	sub	r3, fp, #208
	mov	r1, r3
	ldr	r0, .L15+40
	bl	printf
	mvn	r3, #0
	b	.L12
.L11:
	mov	r3, #0
.L12:
	ldr	r2, .L15
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L13
	bl	__stack_chk_fail
.L13:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L16:
	.align	2
.L15:
	.word	.LC10
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
