	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cvm_mmc_dma_request
_cvm_mmc_dma_request:                   ## @cvm_mmc_dma_request
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	callq	_mmc_priv
	movq	%rax, %r15
	movq	(%rax), %r13
	movq	16(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	cmpl	$0, 20(%rax)
	je	LBB0_5
## %bb.2:
	cmpl	$0, 16(%rax)
	je	LBB0_5
## %bb.3:
	movq	24(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	(%rax), %rax
	movq	_MMC_STOP_TRANSMISSION@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.6:
	movq	%r15, %rdi
	callq	_cvm_mmc_switch_to
	movq	16(%rbx), %r12
	movl	(%r12), %esi
	movl	4(%r12), %edx
	movl	%edx, %ecx
	imull	%esi, %ecx
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_debug
	movq	8(%r12), %rsi
	testq	%rsi, %rsi
	je	LBB0_8
## %bb.7:
	movq	%r15, %rdi
	callq	_set_wdog
LBB0_8:
	movq	%r13, %r15
	movq	48(%r13), %rdi
	callq	_WARN_ON
	movq	%rbx, 48(%r13)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_prepare_ext_dma
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_prepare_dma
	testl	%eax, %eax
	je	LBB0_9
## %bb.13:
	movl	%eax, %r13d
	movl	$1, (%r15)
	movq	_MIO_EMM_INT_CMD_ERR@GOTPCREL(%rip), %rax
	movq	_MIO_EMM_INT_DMA_DONE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_MIO_EMM_INT_DMA_ERR@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	%r15, %rdi
	callq	*32(%r15)
	movq	24(%r15), %rax
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movq	8(%rbx), %rsi
	movq	%r15, %rdi
	movq	%r12, %rdx
	movl	%r13d, %ecx
	callq	*%rax
LBB0_15:
	movq	(%r14), %rdi
	callq	_mmc_card_sd
	movq	%rax, %r14
	movq	16(%r15), %rbx
	movq	%r15, %rdi
	callq	_MIO_EMM_STS_MASK
	addq	%rax, %rbx
	testq	%r14, %r14
	movl	$-466026368, %eax               ## imm = 0xE4390080
	movl	$11534336, %edi                 ## imm = 0xB00000
	cmovel	%eax, %edi
	movq	%rbx, %rsi
	callq	_writeq
	movq	16(%r15), %rbx
	movq	%r15, %rdi
	callq	_MIO_EMM_DMA
	addq	%rax, %rbx
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movq	%rbx, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writeq                         ## TAILCALL
LBB0_5:
	movq	(%r14), %rdi
	leaq	L_.str(%rip), %rsi
LBB0_10:
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movq	8(%rbx), %rax
	movl	%ecx, (%rax)
	movq	(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	%rbx, %rdi
	callq	*%rax
LBB0_12:
	movq	%r13, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*8(%rdi)                        ## TAILCALL
LBB0_9:
	movq	40(%r15), %rdi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_MMC_STOP_TRANSMISSION,8,3      ## @MMC_STOP_TRANSMISSION
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error: cmv_mmc_dma_request no data\n"

L_.str.1:                               ## @.str.1
	.asciz	"DMA request  blocks: %d  block_size: %d  total_size: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"prepare_dma failed\n"

	.comm	_MIO_EMM_INT_CMD_ERR,4,2        ## @MIO_EMM_INT_CMD_ERR
	.comm	_MIO_EMM_INT_DMA_DONE,4,2       ## @MIO_EMM_INT_DMA_DONE
	.comm	_MIO_EMM_INT_DMA_ERR,4,2        ## @MIO_EMM_INT_DMA_ERR
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_cvm_mmc_dma_request
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cvm_mmc_dma_request
_cvm_mmc_dma_request:                   ; @cvm_mmc_dma_request
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x21, x0
	bl	_mmc_priv
	ldr	x19, [x0]
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_11
; %bb.1:
	ldr	w9, [x8, #20]
	cbz	w9, LBB0_11
; %bb.2:
	ldr	w8, [x8, #16]
	cbz	w8, LBB0_11
; %bb.3:
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_11
; %bb.4:
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _MMC_STOP_TRANSMISSION@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MMC_STOP_TRANSMISSION@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.5:
	mov	x23, x0
	bl	_cvm_mmc_switch_to
	ldr	x22, [x20, #16]
	ldp	w1, w2, [x22]
	mul	w3, w2, w1
Lloh3:
	adrp	x0, l_.str.1@PAGE
Lloh4:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_debug
	ldr	x1, [x22, #8]
	cbz	x1, LBB0_7
; %bb.6:
	mov	x0, x23
	bl	_set_wdog
LBB0_7:
	ldr	x0, [x19, #48]
	bl	_WARN_ON
	str	x20, [x19, #48]
	mov	x0, x21
	mov	x1, x20
	bl	_prepare_ext_dma
	mov	x23, x0
	mov	x0, x19
	mov	x1, x22
	bl	_prepare_dma
	cbz	w0, LBB0_15
; %bb.8:
	mov	x24, x0
	mov	w8, #1
	str	w8, [x19]
	ldr	x8, [x19, #32]
Lloh5:
	adrp	x9, _MIO_EMM_INT_CMD_ERR@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MIO_EMM_INT_CMD_ERR@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
Lloh8:
	adrp	x10, _MIO_EMM_INT_DMA_DONE@GOTPAGE
Lloh9:
	ldr	x10, [x10, _MIO_EMM_INT_DMA_DONE@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh11:
	adrp	x10, _MIO_EMM_INT_DMA_ERR@GOTPAGE
Lloh12:
	ldr	x10, [x10, _MIO_EMM_INT_DMA_ERR@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
	orr	w1, w9, w10
	mov	x0, x19
	blr	x8
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_10
; %bb.9:
	ldr	x1, [x20, #8]
	mov	x0, x19
	mov	x2, x22
	mov	x3, x24
	blr	x8
LBB0_10:
	ldr	x0, [x21]
	bl	_mmc_card_sd
	mov	x20, x0
	ldr	x21, [x19, #16]
	mov	x0, x19
	bl	_MIO_EMM_STS_MASK
	add	x1, x0, x21
	cmp	x20, #0
	mov	w8, #11534336
	mov	w9, #128
	movk	w9, #58425, lsl #16
	csel	w0, w9, w8, eq
	bl	_writeq
	ldr	x20, [x19, #16]
	mov	x0, x19
	bl	_MIO_EMM_DMA
	add	x1, x0, x20
	mov	x0, x23
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_writeq
LBB0_11:
	ldr	x0, [x21]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
LBB0_12:
	bl	_dev_err
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w9, w8
	ldp	x8, x10, [x20]
	str	w9, [x10]
	cbz	x8, LBB0_14
; %bb.13:
	mov	x0, x20
	blr	x8
LBB0_14:
	ldr	x1, [x19, #8]
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	br	x1
LBB0_15:
	ldr	x0, [x19, #40]
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_MMC_STOP_TRANSMISSION,8,3      ; @MMC_STOP_TRANSMISSION
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error: cmv_mmc_dma_request no data\n"

l_.str.1:                               ; @.str.1
	.asciz	"DMA request  blocks: %d  block_size: %d  total_size: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"prepare_dma failed\n"

	.comm	_MIO_EMM_INT_CMD_ERR,4,2        ; @MIO_EMM_INT_CMD_ERR
	.comm	_MIO_EMM_INT_DMA_DONE,4,2       ; @MIO_EMM_INT_DMA_DONE
	.comm	_MIO_EMM_INT_DMA_ERR,4,2        ; @MIO_EMM_INT_DMA_ERR
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_cvm_mmc_dma_request
.subsections_via_symbols
