	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mxs_mmc_prep_dma
_mxs_mmc_prep_dma:                      ## @mxs_mmc_prep_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	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	8(%rdi), %r12
	testq	%r12, %r12
	je	LBB0_2
## %bb.1:
	movl	(%r15), %edi
	callq	_mmc_dev
	movq	8(%r12), %rsi
	movl	(%r12), %edx
	movl	16(%r15), %ecx
	movl	%eax, %edi
	callq	_dma_map_sg
	movq	8(%r12), %rsi
	movq	%r12, %rax
	jmp	LBB0_3
LBB0_2:
	movq	32(%r15), %rsi
	movq	_SSP_PIO_NUM@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %edx
	movl	20(%r15), %ecx
	movl	24(%r15), %edi
	movq	%r14, %r8
	callq	_dmaengine_prep_slave_sg
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_mxs_mmc_dma_irq_callback@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	%r15, (%rbx)
	jmp	LBB0_7
LBB0_5:
	testq	%r12, %r12
	je	LBB0_7
## %bb.6:
	movl	(%r15), %edi
	callq	_mmc_dev
	movq	8(%r12), %rsi
	movl	(%r12), %edx
	movl	16(%r15), %ecx
	movl	%eax, %edi
	callq	_dma_unmap_sg
LBB0_7:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SSP_PIO_NUM,4,2                ## @SSP_PIO_NUM
	.comm	_mxs_mmc_dma_irq_callback,4,2   ## @mxs_mmc_dma_irq_callback
	.no_dead_strip	_mxs_mmc_prep_dma
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mxs_mmc_prep_dma
_mxs_mmc_prep_dma:                      ; @mxs_mmc_prep_dma
	.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	x20, x1
	mov	x19, x0
	ldr	x21, [x0, #8]
	cbz	x21, LBB0_2
; %bb.1:
	ldr	w0, [x19]
	bl	_mmc_dev
	ldr	x1, [x21, #8]
	ldr	w2, [x21]
	ldr	w3, [x19, #16]
	bl	_dma_map_sg
	ldr	x1, [x21, #8]
	mov	x8, x21
	b	LBB0_3
LBB0_2:
	ldr	x1, [x19, #32]
Lloh0:
	adrp	x8, _SSP_PIO_NUM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SSP_PIO_NUM@GOTPAGEOFF]
LBB0_3:
	ldr	w2, [x8]
	ldp	w3, w0, [x19, #20]
	mov	x4, x20
	bl	_dmaengine_prep_slave_sg
	mov	x20, x0
	cbz	x0, LBB0_5
; %bb.4:
Lloh2:
	adrp	x8, _mxs_mmc_dma_irq_callback@GOTPAGE
Lloh3:
	ldr	x8, [x8, _mxs_mmc_dma_irq_callback@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x20, #8]
	str	x19, [x20]
	b	LBB0_7
LBB0_5:
	cbz	x21, LBB0_7
; %bb.6:
	ldr	w0, [x19]
	bl	_mmc_dev
	ldr	x1, [x21, #8]
	ldr	w2, [x21]
	ldr	w3, [x19, #16]
	bl	_dma_unmap_sg
LBB0_7:
	mov	x0, x20
	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
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_SSP_PIO_NUM,4,2                ; @SSP_PIO_NUM
	.comm	_mxs_mmc_dma_irq_callback,4,2   ; @mxs_mmc_dma_irq_callback
	.no_dead_strip	_mxs_mmc_prep_dma
.subsections_via_symbols
