	.file	"extr_bte.c_bte_unaligned_copy.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	bte_unaligned_copy
	.type	bte_unaligned_copy, @function
bte_unaligned_copy:
.LFB0:
	.cfi_startproc
	endbr64
	test	edx, edx
	jne	.L2
	mov	r8, QWORD PTR BTE_SUCCESS[rip]
	mov	rax, r8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	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
	mov	r13d, ecx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, edx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	ebp, esi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, edi
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	eax, DWORD PTR L1_CACHE_BYTES[rip]
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	lea	edi, [rax+rax*2]
	add	edi, edx
	call	kmalloc@PLT
	mov	r8, QWORD PTR BTEFAIL_NOTAVAIL[rip]
	mov	r15, rax
	test	rax, rax
	je	.L1
	mov	edi, eax
	call	L1_CACHE_ALIGN@PLT
	cdqe
	mov	QWORD PTR 8[rsp], rax
	mov	eax, DWORD PTR L1_CACHE_MASK[rip]
	mov	r14d, eax
	mov	edx, eax
	and	r14d, ebx
	and	edx, ebp
	cmp	r14d, edx
	jne	.L5
	mov	edx, eax
	not	edx
	and	edx, ebx
	mov	DWORD PTR 16[rsp], edx
	test	r14d, r14d
	jne	.L6
	test	r12d, r12d
	jle	.L8
	mov	edx, DWORD PTR L1_CACHE_BYTES[rip]
	mov	esi, ebp
	mov	r10d, r12d
	xor	r9d, r9d
	xor	r11d, r11d
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L6:
	mov	r11d, DWORD PTR L1_CACHE_BYTES[rip]
	mov	edx, r11d
	sub	edx, r14d
	cmp	edx, r12d
	cmovg	edx, r12d
	mov	r9d, edx
	cmp	r12d, edx
	jle	.L18
	mov	r10d, r12d
	lea	esi, 0[rbp+rdx]
	sub	r10d, edx
	mov	edx, r11d
.L9:
	and	eax, r10d
	mov	ecx, eax
	mov	DWORD PTR 24[rsp], eax
	lea	eax, [r12+rbp]
	sub	eax, ecx
	mov	DWORD PTR 28[rsp], eax
	cmp	eax, esi
	je	.L27
	mov	eax, DWORD PTR 24[rsp]
	test	eax, eax
	jne	.L28
.L13:
	lea	r12d, [rbx+r9]
	xor	r8d, r8d
	mov	ecx, r13d
	mov	edx, r10d
	mov	edi, r12d
	mov	DWORD PTR 28[rsp], r11d
	mov	DWORD PTR 24[rsp], r9d
	call	bte_copy@PLT
	mov	r9d, DWORD PTR 24[rsp]
	mov	r11d, DWORD PTR 28[rsp]
	cmp	QWORD PTR BTE_SUCCESS[rip], rax
	mov	r12d, r9d
	je	.L10
	mov	rdi, r15
	mov	QWORD PTR 8[rsp], rax
	call	kfree@PLT
	mov	r8, QWORD PTR 8[rsp]
.L1:
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r8
	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
.L5:
	.cfi_restore_state
	sub	ebx, r14d
	lea	edi, [r12+r14]
	mov	DWORD PTR 16[rsp], ebx
	call	L1_CACHE_ALIGN@PLT
	mov	r11d, eax
.L10:
	mov	DWORD PTR 24[rsp], r11d
	test	r12d, r12d
	jle	.L8
	mov	rdi, QWORD PTR 8[rsp]
	call	ia64_tpa@PLT
	mov	r11d, DWORD PTR 24[rsp]
	xor	r8d, r8d
	mov	ecx, r13d
	mov	edi, DWORD PTR 16[rsp]
	mov	esi, eax
	mov	edx, r11d
	call	bte_copy@PLT
	cmp	QWORD PTR BTE_SUCCESS[rip], rax
	mov	QWORD PTR 16[rsp], rax
	je	.L16
	mov	rdi, r15
	call	kfree@PLT
	mov	r8, QWORD PTR 16[rsp]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L16:
	movsx	r10, r14d
	mov	r14, QWORD PTR 8[rsp]
	mov	edi, ebp
	add	r14, r10
	call	__va@PLT
	mov	edx, r12d
	mov	rsi, r14
	mov	edi, eax
	call	memcpy@PLT
.L8:
	mov	rdi, r15
	call	kfree@PLT
	mov	r8, QWORD PTR BTE_SUCCESS[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L18:
	mov	r12d, r9d
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L27:
	add	r9d, ecx
	add	r11d, edx
.L12:
	mov	ecx, DWORD PTR 24[rsp]
	lea	eax, [r9+rcx]
	cmp	eax, r12d
	jge	.L18
	sub	r12d, r9d
	lea	esi, [r9+rbp]
	mov	r10d, r12d
	sub	r10d, ecx
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L28:
	mov	rdi, QWORD PTR 8[rsp]
	mov	DWORD PTR 44[rsp], r9d
	mov	DWORD PTR 40[rsp], r11d
	mov	DWORD PTR 32[rsp], edx
	call	ia64_tpa@PLT
	mov	edx, DWORD PTR 32[rsp]
	xor	r8d, r8d
	lea	edi, [r12+rbx]
	mov	esi, eax
	sub	edi, DWORD PTR 24[rsp]
	mov	ecx, r13d
	call	bte_copy@PLT
	mov	r11d, DWORD PTR 40[rsp]
	mov	r9d, DWORD PTR 44[rsp]
	cmp	QWORD PTR BTE_SUCCESS[rip], rax
	mov	QWORD PTR 32[rsp], rax
	je	.L14
	mov	rdi, r15
	call	kfree@PLT
	mov	r8, QWORD PTR 32[rsp]
	jmp	.L1
.L14:
	mov	edi, DWORD PTR 28[rsp]
	mov	DWORD PTR 32[rsp], r9d
	mov	DWORD PTR 40[rsp], r11d
	call	__va@PLT
	mov	edx, DWORD PTR 24[rsp]
	mov	rsi, QWORD PTR 8[rsp]
	mov	edi, eax
	call	memcpy@PLT
	mov	r9d, DWORD PTR 32[rsp]
	mov	r11d, DWORD PTR 40[rsp]
	jmp	.L12
	.cfi_endproc
.LFE0:
	.size	bte_unaligned_copy, .-bte_unaligned_copy
	.comm	L1_CACHE_MASK,4,4
	.comm	L1_CACHE_BYTES,4,4
	.comm	GFP_KERNEL,4,4
	.comm	BTE_SUCCESS,8,8
	.comm	BTEFAIL_NOTAVAIL,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_bte.c_bte_unaligned_copy.c"
	.text
	.align	2
	.global	bte_unaligned_copy
	.syntax unified
	.arm
	.fpu softvfp
	.type	bte_unaligned_copy, %function
bte_unaligned_copy:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	subs	r4, r2, #0
	sub	sp, sp, #36
	bne	.L2
	ldr	r3, .L29
	ldr	r3, [r3]
.L1:
	mov	r0, r3
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	ldr	r10, .L29+4
	mov	r5, r0
	ldr	r0, [r10]
	mov	r7, r3
	ldr	r3, .L29+8
	add	r0, r0, r0, lsl #1
	mov	r6, r1
	add	r0, r0, r4
	ldr	r1, [r3]
	bl	kmalloc
	subs	r8, r0, #0
	beq	.L25
	bl	L1_CACHE_ALIGN
	ldr	r3, .L29+12
	str	r0, [sp, #8]
	ldr	r3, [r3]
	and	r9, r3, r5
	and	r2, r3, r6
	cmp	r9, r2
	bne	.L5
	bic	r2, r5, r3
	cmp	r9, #0
	str	r2, [sp, #12]
	bne	.L6
	cmp	r4, #0
	ble	.L26
	ldr	fp, [r10]
	mov	r1, r6
	mov	r2, r4
	mov	r10, r9
	str	r9, [sp, #16]
	b	.L9
.L5:
	add	r0, r4, r9
	bl	L1_CACHE_ALIGN
	mov	r10, r0
	sub	r3, r5, r9
	ldr	fp, .L29
	str	r3, [sp, #12]
.L10:
	cmp	r4, #0
	ble	.L8
	ldr	r0, [sp, #8]
	bl	ia64_tpa
	mov	ip, #0
	mov	r1, r0
	mov	r2, r10
	mov	r3, r7
	ldr	r0, [sp, #12]
	str	ip, [sp]
	bl	bte_copy
	ldr	r2, [fp]
	str	r0, [sp, #12]
	cmp	r2, r0
	beq	.L16
	mov	r0, r8
	bl	kfree
	ldr	r3, [sp, #12]
	b	.L1
.L16:
	mov	r0, r6
	bl	__va
	ldr	r3, [sp, #8]
	mov	r2, r4
	add	r1, r3, r9
	bl	memcpy
.L8:
	mov	r0, r8
	bl	kfree
	ldr	r3, [fp]
	mov	r0, r3
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L25:
	ldr	r3, .L29+16
	ldr	r3, [r3]
	mov	r0, r3
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L6:
	ldr	r10, [r10]
	sub	r2, r10, r9
	cmp	r2, r4
	movlt	r1, r2
	movge	r1, r4
	cmp	r4, r1
	str	r1, [sp, #16]
	ble	.L17
	mov	fp, r10
	sub	r2, r4, r1
	add	r1, r6, r1
.L9:
	and	r3, r3, r2
	mov	r0, r3
	str	r3, [sp, #20]
	add	r3, r4, r6
	sub	r3, r3, r0
	cmp	r3, r1
	str	r3, [sp, #24]
	beq	.L27
	ldr	r3, [sp, #20]
	cmp	r3, #0
	bne	.L22
	ldr	fp, .L29
.L13:
	mov	r3, #0
	ldr	r0, [sp, #16]
	str	r3, [sp]
	add	r0, r5, r0
	mov	r3, r7
	bl	bte_copy
	ldr	r2, [fp]
	cmp	r2, r0
	bne	.L28
.L19:
	ldr	r4, [sp, #16]
	b	.L10
.L17:
	ldr	r4, [sp, #16]
	ldr	fp, .L29
	b	.L10
.L26:
	ldr	fp, .L29
	b	.L8
.L27:
	ldr	r3, [sp, #16]
	add	r10, r10, fp
	add	r3, r3, r0
	ldr	fp, .L29
	str	r3, [sp, #16]
.L12:
	ldr	r2, [sp, #16]
	ldr	r1, [sp, #20]
	add	r3, r2, r1
	cmp	r3, r4
	bge	.L19
	mov	r3, r2
	sub	r2, r4, r2
	sub	r2, r2, r1
	add	r1, r3, r6
	b	.L13
.L22:
	ldr	r0, [sp, #8]
	bl	ia64_tpa
	mov	ip, #0
	mov	r1, r0
	ldr	r0, [sp, #20]
	add	r3, r4, r5
	mov	r2, fp
	sub	r0, r3, r0
	str	ip, [sp]
	mov	r3, r7
	bl	bte_copy
	ldr	fp, .L29
	str	r0, [sp, #28]
	ldr	r2, [fp]
	cmp	r2, r0
	beq	.L14
	mov	r0, r8
	bl	kfree
	ldr	r3, [sp, #28]
	b	.L1
.L28:
	str	r0, [sp, #8]
	mov	r0, r8
	bl	kfree
	ldr	r3, [sp, #8]
	b	.L1
.L14:
	ldr	r0, [sp, #24]
	bl	__va
	ldr	r2, [sp, #20]
	ldr	r1, [sp, #8]
	bl	memcpy
	b	.L12
.L30:
	.align	2
.L29:
	.word	BTE_SUCCESS
	.word	L1_CACHE_BYTES
	.word	GFP_KERNEL
	.word	L1_CACHE_MASK
	.word	BTEFAIL_NOTAVAIL
	.size	bte_unaligned_copy, .-bte_unaligned_copy
	.comm	L1_CACHE_MASK,4,4
	.comm	L1_CACHE_BYTES,4,4
	.comm	GFP_KERNEL,4,4
	.comm	BTE_SUCCESS,4,4
	.comm	BTEFAIL_NOTAVAIL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
