	.file	"extr_pci-gart_64.c_gart_alloc_coherent.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	gart_alloc_coherent, @function
gart_alloc_coherent:
.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
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	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
	cmp	QWORD PTR force_iommu[rip], 0
	je	.L2
	test	DWORD PTR GFP_DMA[rip], ecx
	je	.L10
.L2:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rdx, r13
	mov	rsi, rbp
	mov	rdi, 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
	jmp	dma_generic_alloc_coherent@PLT
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	ebx, DWORD PTR __GFP_DMA[rip]
	or	ebx, DWORD PTR __GFP_HIGHMEM[rip]
	mov	rdi, rsi
	or	ebx, DWORD PTR __GFP_DMA32[rip]
	not	ebx
	and	ebx, ecx
	call	get_order@PLT
	or	ebx, DWORD PTR __GFP_ZERO[rip]
	mov	rsi, rax
	mov	edi, ebx
	call	alloc_pages@PLT
	mov	r14, rax
	test	rax, rax
	je	.L1
	mov	rdi, rbp
	call	get_order@PLT
	mov	rdi, r14
	mov	r15d, DWORD PTR DMA_BIDIRECTIONAL[rip]
	mov	rbx, rax
	call	page_to_phys@PLT
	mov	ecx, ebx
	mov	r8d, 1
	mov	rdx, rbp
	sal	r8, cl
	mov	esi, eax
	mov	ecx, r15d
	mov	rdi, r12
	sub	r8, 1
	call	dma_map_area@PLT
	mov	rbx, rax
	xor	eax, eax
	call	flush_gart@PLT
	cmp	QWORD PTR bad_dma_address[rip], rbx
	je	.L4
	mov	QWORD PTR 0[r13], rbx
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rdi, r14
	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
	jmp	page_address@PLT
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	rdi, rbp
	call	get_order@PLT
	mov	rdi, r14
	mov	rsi, rax
	call	__free_pages@PLT
.L1:
	add	rsp, 8
	.cfi_def_cfa_offset 56
	xor	eax, eax
	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
	.cfi_endproc
.LFE0:
	.size	gart_alloc_coherent, .-gart_alloc_coherent
	.comm	force_iommu,8,8
	.comm	bad_dma_address,8,8
	.comm	__GFP_ZERO,4,4
	.comm	__GFP_HIGHMEM,4,4
	.comm	__GFP_DMA32,4,4
	.comm	__GFP_DMA,4,4
	.comm	GFP_DMA,4,4
	.comm	DMA_BIDIRECTIONAL,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_pci-gart_64.c_gart_alloc_coherent.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	gart_alloc_coherent, %function
gart_alloc_coherent:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	ip, .L14
	mov	r5, r0
	ldr	r0, [ip]
	mov	r4, r1
	cmp	r0, #0
	mov	r7, r2
	sub	sp, sp, #8
	beq	.L2
	ldr	r2, .L14+4
	ldr	r2, [r2]
	tst	r3, r2
	beq	.L13
.L2:
	mov	r2, r7
	mov	r1, r4
	mov	r0, r5
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, lr}
	b	dma_generic_alloc_coherent
.L13:
	ldr	r0, .L14+8
	ldr	r2, .L14+12
	ldr	r6, [r0]
	ldr	r2, [r2]
	ldr	r1, .L14+16
	orr	r6, r6, r2
	ldr	r1, [r1]
	ldr	r2, .L14+20
	orr	r6, r6, r1
	ldr	r2, [r2]
	bic	r3, r3, r6
	mov	r0, r4
	orr	r6, r3, r2
	bl	get_order
	mov	r1, r0
	mov	r0, r6
	bl	alloc_pages
	subs	r6, r0, #0
	beq	.L1
	mov	r0, r4
	bl	get_order
	mov	r8, r0
	mov	r0, r6
	bl	page_to_phys
	mvn	r3, #0
	mvn	r3, r3, lsl r8
	ldr	r2, .L14+24
	str	r3, [sp]
	ldr	r3, [r2]
	mov	r1, r0
	mov	r2, r4
	mov	r0, r5
	bl	dma_map_area
	mov	r5, r0
	bl	flush_gart
	ldr	r3, .L14+28
	ldr	r3, [r3]
	cmp	r3, r5
	beq	.L4
	mov	r0, r6
	str	r5, [r7]
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, lr}
	b	page_address
.L4:
	mov	r0, r4
	bl	get_order
	mov	r1, r0
	mov	r0, r6
	bl	__free_pages
.L1:
	mov	r0, #0
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L15:
	.align	2
.L14:
	.word	force_iommu
	.word	GFP_DMA
	.word	__GFP_DMA
	.word	__GFP_HIGHMEM
	.word	__GFP_DMA32
	.word	__GFP_ZERO
	.word	DMA_BIDIRECTIONAL
	.word	bad_dma_address
	.size	gart_alloc_coherent, .-gart_alloc_coherent
	.comm	force_iommu,4,4
	.comm	bad_dma_address,4,4
	.comm	__GFP_ZERO,4,4
	.comm	__GFP_HIGHMEM,4,4
	.comm	__GFP_DMA32,4,4
	.comm	__GFP_DMA,4,4
	.comm	GFP_DMA,4,4
	.comm	DMA_BIDIRECTIONAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
