	.file	"262942.c"
	.intel_syntax noprefix
	.text
	.globl	copyfile
	.type	copyfile, @function
copyfile:
.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, 1088
	mov	DWORD PTR -1076[rbp], edi
	mov	DWORD PTR -1080[rbp], esi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -1056[rbp], 0
	mov	DWORD PTR -1052[rbp], 0
.L13:
	nop
.L3:
	lea	rcx, -1040[rbp]
	mov	eax, DWORD PTR -1076[rbp]
	mov	edx, 1024
	mov	rsi, rcx
	mov	edi, eax
	call	read@PLT
	mov	DWORD PTR -1060[rbp], eax
	cmp	DWORD PTR -1060[rbp], -1
	jne	.L2
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 4
	je	.L3
.L2:
	cmp	DWORD PTR -1060[rbp], 0
	jle	.L16
	lea	rax, -1040[rbp]
	mov	QWORD PTR -1048[rbp], rax
	jmp	.L6
.L11:
	nop
.L8:
	mov	eax, DWORD PTR -1060[rbp]
	movsx	rdx, eax
	mov	rcx, QWORD PTR -1048[rbp]
	mov	eax, DWORD PTR -1080[rbp]
	mov	rsi, rcx
	mov	edi, eax
	call	write@PLT
	mov	DWORD PTR -1056[rbp], eax
	cmp	DWORD PTR -1056[rbp], -1
	jne	.L7
	call	__errno_location@PLT
	mov	eax, DWORD PTR [rax]
	cmp	eax, 4
	je	.L8
.L7:
	cmp	DWORD PTR -1056[rbp], 0
	js	.L17
	mov	eax, DWORD PTR -1056[rbp]
	add	DWORD PTR -1052[rbp], eax
	mov	eax, DWORD PTR -1056[rbp]
	sub	DWORD PTR -1060[rbp], eax
	mov	eax, DWORD PTR -1056[rbp]
	cdqe
	add	QWORD PTR -1048[rbp], rax
.L6:
	cmp	DWORD PTR -1060[rbp], 0
	jg	.L11
	jmp	.L10
.L17:
	nop
.L10:
	cmp	DWORD PTR -1056[rbp], -1
	je	.L18
	jmp	.L13
.L16:
	nop
	jmp	.L5
.L18:
	nop
.L5:
	mov	eax, DWORD PTR -1052[rbp]
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L15
	call	__stack_chk_fail@PLT
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	copyfile, .-copyfile
	.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	"262942.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	copyfile
	.syntax unified
	.arm
	.fpu softvfp
	.type	copyfile, %function
copyfile:
	@ args = 0, pretend = 0, frame = 1056
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1056
	str	r0, [fp, #-1056]
	str	r1, [fp, #-1060]
	ldr	r3, .L19
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-1040]
	mov	r3, #0
	str	r3, [fp, #-1036]
.L13:
	nop
.L3:
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, r3
	ldr	r0, [fp, #-1056]
	bl	read
	str	r0, [fp, #-1044]
	ldr	r3, [fp, #-1044]
	cmn	r3, #1
	bne	.L2
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #4
	beq	.L3
.L2:
	ldr	r3, [fp, #-1044]
	cmp	r3, #0
	ble	.L16
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	str	r3, [fp, #-1048]
	b	.L6
.L11:
	nop
.L8:
	ldr	r3, [fp, #-1044]
	mov	r2, r3
	ldr	r1, [fp, #-1048]
	ldr	r0, [fp, #-1060]
	bl	write
	str	r0, [fp, #-1040]
	ldr	r3, [fp, #-1040]
	cmn	r3, #1
	bne	.L7
	bl	__errno_location
	mov	r3, r0
	ldr	r3, [r3]
	cmp	r3, #4
	beq	.L8
.L7:
	ldr	r3, [fp, #-1040]
	cmp	r3, #0
	blt	.L17
	ldr	r2, [fp, #-1036]
	ldr	r3, [fp, #-1040]
	add	r3, r2, r3
	str	r3, [fp, #-1036]
	ldr	r2, [fp, #-1044]
	ldr	r3, [fp, #-1040]
	sub	r3, r2, r3
	str	r3, [fp, #-1044]
	ldr	r3, [fp, #-1040]
	ldr	r2, [fp, #-1048]
	add	r3, r2, r3
	str	r3, [fp, #-1048]
.L6:
	ldr	r3, [fp, #-1044]
	cmp	r3, #0
	bgt	.L11
	b	.L10
.L17:
	nop
.L10:
	ldr	r3, [fp, #-1040]
	cmn	r3, #1
	beq	.L18
	b	.L13
.L16:
	nop
	b	.L5
.L18:
	nop
.L5:
	ldr	r3, [fp, #-1036]
	ldr	r2, .L19
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L15
	bl	__stack_chk_fail
.L15:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L20:
	.align	2
.L19:
	.word	.LC0
	.size	copyfile, .-copyfile
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
