	.file	"extr_amd_iommu.c_free_coherent.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	free_coherent, @function
free_coherent:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14, rdx
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13d, ecx
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	sub	rsp, 40
	.cfi_def_cfa_offset 80
	mov	edi, DWORD PTR cnt_free_coherent[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	INC_STATS_COUNTER@PLT
	mov	rdi, rbp
	call	check_device@PLT
	test	eax, eax
	jne	.L16
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L17
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	lea	rcx, 4[rsp]
	lea	rdx, 16[rsp]
	mov	rdi, rbp
	lea	rsi, 8[rsp]
	call	get_device_resources@PLT
	cmp	QWORD PTR 8[rsp], 0
	je	.L5
	mov	rdi, QWORD PTR 16[rsp]
	test	rdi, rdi
	je	.L5
	call	dma_ops_domain@PLT
	test	eax, eax
	jne	.L18
.L5:
	mov	rdi, r12
	call	get_order@PLT
	mov	rdi, r14
	mov	esi, eax
	call	free_pages@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L18:
	mov	rdi, QWORD PTR 16[rsp]
	xor	ebp, ebp
	mov	rsi, rbp
	call	spin_lock_irqsave@PLT
	mov	rax, QWORD PTR 16[rsp]
	mov	rcx, r12
	mov	edx, r13d
	mov	r8d, DWORD PTR DMA_BIDIRECTIONAL[rip]
	mov	rdi, QWORD PTR 8[rsp]
	mov	esi, DWORD PTR 4[rax]
	call	__unmap_single@PLT
	mov	rdi, QWORD PTR 8[rsp]
	call	iommu_completion_wait@PLT
	mov	rdi, QWORD PTR 16[rsp]
	mov	rsi, rbp
	call	spin_unlock_irqrestore@PLT
	jmp	.L5
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	free_coherent, .-free_coherent
	.comm	cnt_free_coherent,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_amd_iommu.c_free_coherent.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	free_coherent, %function
free_coherent:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	mov	r4, r0
	ldr	ip, .L19
	mov	r5, r3
	ldr	r3, .L19+4
	sub	sp, sp, #28
	ldr	r0, [ip]
	mov	r7, r1
	mov	r6, r2
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	bl	INC_STATS_COUNTER
	mov	r0, r4
	bl	check_device
	cmp	r0, #0
	bne	.L16
.L1:
	ldr	r3, .L19+4
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L17
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L16:
	add	r3, sp, #16
	mov	r0, r4
	add	r2, sp, #12
	add	r1, sp, #8
	bl	get_device_resources
	ldr	r3, [sp, #8]
	cmp	r3, #0
	beq	.L5
	ldr	r0, [sp, #12]
	cmp	r0, #0
	beq	.L5
	bl	dma_ops_domain
	cmp	r0, #0
	bne	.L18
.L5:
	mov	r0, r7
	bl	get_order
	mov	r1, r0
	mov	r0, r6
	bl	free_pages
	b	.L1
.L18:
	mov	r4, #0
	ldr	r0, [sp, #12]
	mov	r1, r4
	bl	spin_lock_irqsave
	ldr	r3, .L19+8
	ldr	r2, [sp, #12]
	ldr	r3, [r3]
	ldr	r1, [r2, #4]
	ldr	r0, [sp, #8]
	mov	r2, r5
	str	r3, [sp]
	mov	r3, r7
	bl	__unmap_single
	ldr	r0, [sp, #8]
	bl	iommu_completion_wait
	mov	r1, r4
	ldr	r0, [sp, #12]
	bl	spin_unlock_irqrestore
	b	.L5
.L17:
	bl	__stack_chk_fail
.L20:
	.align	2
.L19:
	.word	cnt_free_coherent
	.word	.LC0
	.word	DMA_BIDIRECTIONAL
	.size	free_coherent, .-free_coherent
	.comm	cnt_free_coherent,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
