	.file	"extr_elftc_copyfile.c_elftc_copyfile.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	elftc_copyfile
	.type	elftc_copyfile, @function
elftc_copyfile:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, esi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	ebp, edi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	rsi, rsp
	call	fstat@PLT
	test	rax, rax
	js	.L19
	mov	rbx, QWORD PTR [rsp]
	xor	eax, eax
	test	rbx, rbx
	jne	.L21
.L1:
	mov	rcx, QWORD PTR 8[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L22
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L21:
	.cfi_restore_state
	mov	rdi, rbx
	call	malloc@PLT
	mov	r13, rax
	test	rax, rax
	je	.L19
	mov	r15, rax
	mov	r14, rbx
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rdx, r14
	mov	rsi, r15
	mov	edi, ebp
	call	read@PLT
	test	rax, rax
	js	.L6
	add	r15, rax
	sub	r14, rax
	jne	.L5
	mov	rbp, r13
	.p2align 4,,10
	.p2align 3
.L7:
	mov	rdx, rbx
	mov	rsi, rbp
	mov	edi, r12d
	call	write@PLT
	test	rax, rax
	jle	.L6
	add	rbp, rax
	sub	rbx, rax
	jne	.L7
	mov	rdi, r13
	call	free@PLT
	xor	eax, eax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rdi, r13
	call	free@PLT
.L19:
	mov	eax, -1
	jmp	.L1
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	elftc_copyfile, .-elftc_copyfile
	.comm	PROT_READ,4,4
	.comm	MAP_SHARED,4,4
	.comm	MAP_FAILED,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.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, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_elftc_copyfile.c_elftc_copyfile.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	elftc_copyfile
	.syntax unified
	.arm
	.fpu softvfp
	.type	elftc_copyfile, %function
elftc_copyfile:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r3, .L24
	sub	sp, sp, #12
	mov	r6, r1
	mov	r1, sp
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	mov	r8, r0
	bl	fstat
	cmp	r0, #0
	blt	.L20
	ldr	r0, [sp]
	cmp	r0, #0
	bne	.L22
.L1:
	ldr	r3, .L24
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L23
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L22:
	mov	r5, r0
	bl	malloc
	subs	r7, r0, #0
	beq	.L20
	mov	r9, r7
	mov	r4, r5
.L5:
	mov	r2, r4
	mov	r1, r9
	mov	r0, r8
	bl	read
	cmp	r0, #0
	blt	.L6
	subs	r4, r4, r0
	add	r9, r9, r0
	bne	.L5
	mov	r4, r7
.L7:
	mov	r2, r5
	mov	r1, r4
	mov	r0, r6
	bl	write
	cmp	r0, #0
	ble	.L6
	subs	r5, r5, r0
	add	r4, r4, r0
	bne	.L7
	mov	r0, r7
	bl	free
	mov	r0, r5
	b	.L1
.L6:
	mov	r0, r7
	bl	free
.L20:
	mvn	r0, #0
	b	.L1
.L23:
	bl	__stack_chk_fail
.L25:
	.align	2
.L24:
	.word	.LC0
	.size	elftc_copyfile, .-elftc_copyfile
	.comm	PROT_READ,4,4
	.comm	MAP_SHARED,4,4
	.comm	MAP_FAILED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
