	.file	"extr_dma-alloc.c_consistent_alloc.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	consistent_alloc
	.type	consistent_alloc, @function
consistent_alloc:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xor	eax, eax
	mov	r15, rdx
	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, edi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	call	in_interrupt@PLT
	test	rax, rax
	jne	.L22
.L2:
	mov	rdi, rbp
	call	PAGE_ALIGN@PLT
	mov	rdi, rax
	mov	rbx, rax
	call	get_order@PLT
	mov	edi, r12d
	mov	esi, eax
	mov	r13d, eax
	call	__get_free_pages@PLT
	mov	r14, rax
	test	rax, rax
	je	.L23
	mov	esi, DWORD PTR VM_ALLOC[rip]
	mov	rdi, rbx
	call	get_vm_area@PLT
	mov	r12, rax
	test	rax, rax
	je	.L24
	mov	edi, DWORD PTR [rax]
	call	VMALLOC_VMADDR@PLT
	mov	rdi, r14
	mov	r12, rax
	call	virt_to_bus@PLT
	mov	QWORD PTR [r15], rax
	mov	rbp, rax
	test	r13d, r13d
	jg	.L25
	test	rbx, rbx
	je	.L8
.L7:
	xor	r13d, r13d
	xor	edi, edi
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L26:
	test	eax, eax
	jne	.L11
.L10:
	mov	edx, DWORD PTR PAGE_KERNEL_NOCACHE[rip]
	lea	rsi, 0[rbp+rdi]
	add	rdi, r12
	call	map_page@PLT
	add	r13d, DWORD PTR PAGE_SIZE[rip]
	movsx	rdi, r13d
	cmp	rdi, rbx
	jb	.L26
	test	eax, eax
	jne	.L11
.L8:
	lea	rsi, [r12+rbx]
	mov	rdi, r12
	call	frv_cache_invalidate@PLT
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r12
	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
.L25:
	.cfi_restore_state
	mov	rdi, r14
	call	virt_to_page@PLT
	mov	esi, r13d
	mov	rdi, rax
	call	split_page@PLT
	test	rbx, rbx
	jne	.L7
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L22:
	xor	eax, eax
	call	BUG@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L23:
	xor	eax, eax
	xor	r12d, r12d
	call	BUG@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rdi, r12
	xor	r12d, r12d
	call	vfree@PLT
	jmp	.L1
.L24:
	mov	esi, r13d
	mov	rdi, r14
	call	free_pages@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	consistent_alloc, .-consistent_alloc
	.comm	VM_ALLOC,4,4
	.comm	PAGE_SIZE,8,8
	.comm	PAGE_KERNEL_NOCACHE,4,4
	.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_dma-alloc.c_consistent_alloc.c"
	.text
	.align	2
	.global	consistent_alloc
	.syntax unified
	.arm
	.fpu softvfp
	.type	consistent_alloc, %function
consistent_alloc:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r5, r0
	mov	r4, r1
	mov	r9, r2
	bl	in_interrupt
	cmp	r0, #0
	bne	.L23
.L2:
	mov	r0, r4
	bl	PAGE_ALIGN
	mov	r6, r0
	bl	get_order
	mov	r8, r0
	mov	r0, r5
	mov	r1, r8
	bl	__get_free_pages
	subs	r4, r0, #0
	beq	.L24
	ldr	r3, .L28
	mov	r0, r6
	ldr	r1, [r3]
	bl	get_vm_area
	subs	r5, r0, #0
	beq	.L25
	ldr	r0, [r5]
	bl	VMALLOC_VMADDR
	mov	r5, r0
	mov	r0, r4
	bl	virt_to_bus
	cmp	r8, #0
	mov	r7, r0
	str	r0, [r9]
	bgt	.L26
.L21:
	cmp	r6, #0
	beq	.L8
	mov	r4, #0
	mov	r3, r4
	ldr	r8, .L28+4
	ldr	r9, .L28+8
.L9:
	add	r1, r7, r3
	add	r0, r5, r3
	ldr	r2, [r8]
	bl	map_page
	ldr	r3, [r9]
	add	r4, r4, r3
	cmp	r4, r6
	movcs	r10, #0
	movcc	r10, #1
	cmp	r0, #0
	movne	r10, #0
	cmp	r10, #0
	mov	r3, r4
	bne	.L9
	cmp	r0, #0
	bne	.L27
.L8:
	mov	r0, r5
	add	r1, r5, r6
	bl	frv_cache_invalidate
.L1:
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L26:
	mov	r0, r4
	bl	virt_to_page
	mov	r1, r8
	bl	split_page
	b	.L21
.L23:
	bl	BUG
	b	.L2
.L24:
	mov	r5, r4
	bl	BUG
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L27:
	mov	r0, r5
	mov	r5, r10
	bl	vfree
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L25:
	mov	r1, r8
	mov	r0, r4
	bl	free_pages
	b	.L1
.L29:
	.align	2
.L28:
	.word	VM_ALLOC
	.word	PAGE_KERNEL_NOCACHE
	.word	PAGE_SIZE
	.size	consistent_alloc, .-consistent_alloc
	.comm	VM_ALLOC,4,4
	.comm	PAGE_SIZE,4,4
	.comm	PAGE_KERNEL_NOCACHE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
