	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function renesas_sdhi_internal_dmac_complete_tasklet_fn
_renesas_sdhi_internal_dmac_complete_tasklet_fn: ## @renesas_sdhi_internal_dmac_complete_tasklet_fn
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_spin_lock_irq
	movq	24(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	_MMC_DATA_READ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %r15
	movq	%r15, %rcx
	andl	(%rax), %edx
	jne	LBB0_3
## %bb.2:
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rcx
LBB0_3:
	movl	(%rcx), %r14d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_renesas_sdhi_internal_dmac_enable_dma
	movq	16(%rbx), %rdi
	movl	4(%rbx), %edx
	movl	8(%rbx), %esi
	movl	%r14d, %ecx
	callq	_dma_unmap_sg
	cmpl	(%r15), %r14d
	jne	LBB0_5
## %bb.4:
	movq	_SDHI_INTERNAL_DMAC_RX_IN_USE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_global_flags@GOTPCREL(%rip), %rsi
	callq	_clear_bit
LBB0_5:
	movq	%rbx, %rdi
	callq	_tmio_mmc_do_data_irq
LBB0_6:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irq                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MMC_DATA_READ,4,2              ## @MMC_DATA_READ
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_SDHI_INTERNAL_DMAC_RX_IN_USE,4,2 ## @SDHI_INTERNAL_DMAC_RX_IN_USE
	.comm	_global_flags,4,2               ## @global_flags
	.no_dead_strip	_renesas_sdhi_internal_dmac_complete_tasklet_fn
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function renesas_sdhi_internal_dmac_complete_tasklet_fn
_renesas_sdhi_internal_dmac_complete_tasklet_fn: ; @renesas_sdhi_internal_dmac_complete_tasklet_fn
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	bl	_spin_lock_irq
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_4
; %bb.1:
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _MMC_DATA_READ@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MMC_DATA_READ@GOTPAGEOFF]
Lloh2:
	adrp	x10, _DMA_TO_DEVICE@GOTPAGE
Lloh3:
	ldr	x10, [x10, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
Lloh5:
	adrp	x21, _DMA_FROM_DEVICE@GOTPAGE
Lloh6:
	ldr	x21, [x21, _DMA_FROM_DEVICE@GOTPAGEOFF]
	tst	w9, w8
	csel	x8, x10, x21, eq
	ldr	w20, [x8]
	mov	x0, x19
	mov	w1, #0
	bl	_renesas_sdhi_internal_dmac_enable_dma
	ldr	x0, [x19, #16]
	ldp	w2, w1, [x19, #4]
	mov	x3, x20
	bl	_dma_unmap_sg
	ldr	w8, [x21]
	cmp	w20, w8
	b.ne	LBB0_3
; %bb.2:
Lloh7:
	adrp	x8, _SDHI_INTERNAL_DMAC_RX_IN_USE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SDHI_INTERNAL_DMAC_RX_IN_USE@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x1, _global_flags@GOTPAGE
Lloh11:
	ldr	x1, [x1, _global_flags@GOTPAGEOFF]
	bl	_clear_bit
LBB0_3:
	mov	x0, x19
	bl	_tmio_mmc_do_data_irq
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_spin_unlock_irq
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_MMC_DATA_READ,4,2              ; @MMC_DATA_READ
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_SDHI_INTERNAL_DMAC_RX_IN_USE,4,2 ; @SDHI_INTERNAL_DMAC_RX_IN_USE
	.comm	_global_flags,4,2               ; @global_flags
	.no_dead_strip	_renesas_sdhi_internal_dmac_complete_tasklet_fn
.subsections_via_symbols
