	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dw_mci_dmac_complete_dma
_dw_mci_dmac_complete_dma:              ## @dw_mci_dmac_complete_dma
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	40(%rdi), %r14
	movl	32(%rdi), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_vdbg
	movq	(%rbx), %rax
	movq	_TRANS_MODE_EDMAC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.1:
	testq	%r14, %r14
	je	LBB0_4
## %bb.2:
	movq	_MMC_DATA_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_4
## %bb.3:
	movq	24(%rbx), %rax
	movl	(%rax), %edi
	callq	_mmc_dev
	movl	4(%r14), %edx
	movl	8(%r14), %esi
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%eax, %edi
	callq	_dma_sync_sg_for_cpu
LBB0_4:
	movq	16(%rbx), %rax
	movq	%rbx, %rdi
	callq	*(%rax)
	testq	%r14, %r14
	je	LBB0_5
## %bb.6:
	movq	_EVENT_XFER_COMPLETE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	12(%rbx), %rsi
	callq	_set_bit
	addq	$8, %rbx
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_tasklet_schedule               ## TAILCALL
LBB0_5:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DMA complete\n"

	.comm	_TRANS_MODE_EDMAC,8,3           ## @TRANS_MODE_EDMAC
	.comm	_MMC_DATA_READ,4,2              ## @MMC_DATA_READ
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_EVENT_XFER_COMPLETE,4,2        ## @EVENT_XFER_COMPLETE
	.no_dead_strip	_dw_mci_dmac_complete_dma
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dw_mci_dmac_complete_dma
_dw_mci_dmac_complete_dma:              ; @dw_mci_dmac_complete_dma
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x20, [x0, #40]
	ldr	w0, [x0, #32]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_vdbg
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _TRANS_MODE_EDMAC@GOTPAGE
Lloh3:
	ldr	x9, [x9, _TRANS_MODE_EDMAC@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	ccmp	x20, #0, #4, eq
	b.eq	LBB0_3
; %bb.1:
	ldr	w8, [x20]
Lloh5:
	adrp	x9, _MMC_DATA_READ@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MMC_DATA_READ@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
	ldr	x8, [x19, #24]
	ldr	w0, [x8]
	bl	_mmc_dev
	ldp	w2, w1, [x20, #4]
Lloh8:
	adrp	x8, _DMA_FROM_DEVICE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	bl	_dma_sync_sg_for_cpu
LBB0_3:
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
	cbz	x20, LBB0_5
; %bb.4:
Lloh11:
	adrp	x8, _EVENT_XFER_COMPLETE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EVENT_XFER_COMPLETE@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	add	x1, x19, #12
	bl	_set_bit
	add	x0, x19, #8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_tasklet_schedule
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DMA complete\n"

	.comm	_TRANS_MODE_EDMAC,8,3           ; @TRANS_MODE_EDMAC
	.comm	_MMC_DATA_READ,4,2              ; @MMC_DATA_READ
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_EVENT_XFER_COMPLETE,4,2        ; @EVENT_XFER_COMPLETE
	.no_dead_strip	_dw_mci_dmac_complete_dma
.subsections_via_symbols
