	.file	"extr_omap.c_mmc_omap_release_dma.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	mmc_omap_release_dma, @function
mmc_omap_release_dma:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	edi, DWORD PTR 24[rdi]
	call	mmc_dev@PLT
	mov	rdx, QWORD PTR 8[rbx]
	mov	r12, QWORD PTR 16[rbx]
	mov	rdi, rax
	mov	ecx, DWORD PTR DMA_TO_DEVICE[rip]
	mov	eax, DWORD PTR 0[rbp]
	test	DWORD PTR MMC_DATA_WRITE[rip], eax
	jne	.L3
	mov	ecx, DWORD PTR DMA_FROM_DEVICE[rip]
	mov	r12, rdx
.L3:
	test	r12, r12
	je	.L4
	cmp	QWORD PTR 16[rbp], 0
	jne	.L11
.L5:
	mov	rax, QWORD PTR [r12]
	mov	rdi, QWORD PTR [rax]
.L4:
	mov	esi, DWORD PTR 4[rbp]
	mov	edx, DWORD PTR [rbx]
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	dma_unmap_sg@PLT
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	rdi, r12
	mov	DWORD PTR 12[rsp], ecx
	call	dmaengine_terminate_all@PLT
	mov	QWORD PTR 8[rbp], 0
	mov	ecx, DWORD PTR 12[rsp]
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	mmc_omap_release_dma, .-mmc_omap_release_dma
	.comm	MMC_DATA_WRITE,4,4
	.comm	DMA_TO_DEVICE,4,4
	.comm	DMA_FROM_DEVICE,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_omap.c_mmc_omap_release_dma.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mmc_omap_release_dma, %function
mmc_omap_release_dma:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r1
	mov	r4, r0
	ldr	r0, [r0, #12]
	bl	mmc_dev
	ldr	r3, .L15
	ldr	r2, [r5]
	ldr	r3, [r3]
	tst	r2, r3
	ldmib	r4, {r3, r6}
	moveq	r6, r3
	ldrne	r3, .L15+4
	ldreq	r3, .L15+8
	cmp	r6, #0
	ldr	r7, [r3]
	beq	.L4
	ldr	r3, [r5, #12]
	cmp	r3, #0
	bne	.L14
.L5:
	ldr	r3, [r6]
	ldr	r0, [r3]
.L4:
	mov	r3, r7
	ldr	r2, [r4]
	ldr	r1, [r5, #4]
	pop	{r4, r5, r6, r7, r8, lr}
	b	dma_unmap_sg
.L14:
	mov	r0, r6
	bl	dmaengine_terminate_all
	mov	r3, #0
	str	r3, [r5, #8]
	b	.L5
.L16:
	.align	2
.L15:
	.word	MMC_DATA_WRITE
	.word	DMA_TO_DEVICE
	.word	DMA_FROM_DEVICE
	.size	mmc_omap_release_dma, .-mmc_omap_release_dma
	.comm	MMC_DATA_WRITE,4,4
	.comm	DMA_TO_DEVICE,4,4
	.comm	DMA_FROM_DEVICE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
