	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cvm_mmc_init_lowlevel
_cvm_mmc_init_lowlevel:                 ## @cvm_mmc_init_lowlevel
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	24(%rdi), %r15
	movb	(%rdi), %al
	movq	(%r15), %rbx
	movq	16(%r15), %r12
	btsq	%rax, %rbx
	movq	%rbx, (%r15)
	movq	%r15, %rdi
	callq	_MIO_EMM_CFG
	addq	%rax, %r12
	movl	%ebx, %edi
	movq	%r12, %rsi
	callq	_writeq
	movl	$10, %edi
	callq	_udelay
	movq	16(%r14), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_cvm_mmc_set_clock
	movq	_MIO_EMM_SWITCH_POWER_CLASS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$10, %esi
	callq	_FIELD_PREP
	movl	%eax, %r12d
	movq	_MIO_EMM_SWITCH_CLK_HI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%r15), %eax
	cltd
	idivl	8(%r14)
	movl	%eax, %esi
	shrl	$31, %esi
	addl	%eax, %esi
	sarl	%esi
	callq	_FIELD_PREP
	movl	%eax, %ebx
	movq	_MIO_EMM_SWITCH_CLK_LO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%r15), %eax
	cltd
	idivl	8(%r14)
	orl	%r12d, %ebx
	movl	%eax, %esi
	shrl	$31, %esi
	addl	%eax, %esi
	sarl	%esi
	callq	_FIELD_PREP
	orl	%ebx, %eax
	movl	%eax, -36(%rbp)
	movq	(%r14), %rsi
	leaq	-36(%rbp), %rdi
	callq	_set_bus_id
	movl	-36(%rbp), %esi
	movq	%r15, %rdi
	callq	_do_switch
	movl	-36(%rbp), %eax
	movl	%eax, 12(%r14)
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_set_wdog
	movq	16(%r15), %rbx
	movq	%r15, %rdi
	callq	_MIO_EMM_STS_MASK
	addq	%rax, %rbx
	movl	$-466026368, %edi               ## imm = 0xE4390080
	movq	%rbx, %rsi
	callq	_writeq
	movq	16(%r15), %rbx
	movq	%r15, %rdi
	callq	_MIO_EMM_RCA
	addq	%rax, %rbx
	movl	$1, %edi
	movq	%rbx, %rsi
	callq	_writeq
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MIO_EMM_SWITCH_POWER_CLASS,4,2 ## @MIO_EMM_SWITCH_POWER_CLASS
	.comm	_MIO_EMM_SWITCH_CLK_HI,4,2      ## @MIO_EMM_SWITCH_CLK_HI
	.comm	_MIO_EMM_SWITCH_CLK_LO,4,2      ## @MIO_EMM_SWITCH_CLK_LO
	.no_dead_strip	_cvm_mmc_init_lowlevel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cvm_mmc_init_lowlevel
_cvm_mmc_init_lowlevel:                 ; @cvm_mmc_init_lowlevel
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x0
	ldr	x19, [x0, #24]
	ldr	x8, [x0]
	mov	w9, #1
	lsl	x8, x9, x8
	ldr	x9, [x19]
	orr	x21, x9, x8
	str	x21, [x19]
	ldr	x22, [x19, #16]
	mov	x0, x19
	bl	_MIO_EMM_CFG
	add	x1, x0, x22
	mov	x0, x21
	bl	_writeq
	mov	w0, #10
	bl	_udelay
	ldr	x8, [x20, #16]
	ldr	w1, [x8]
	mov	x0, x20
	bl	_cvm_mmc_set_clock
Lloh0:
	adrp	x8, _MIO_EMM_SWITCH_POWER_CLASS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MIO_EMM_SWITCH_POWER_CLASS@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	w1, #10
	bl	_FIELD_PREP
	mov	x21, x0
Lloh3:
	adrp	x8, _MIO_EMM_SWITCH_CLK_HI@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MIO_EMM_SWITCH_CLK_HI@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldr	w8, [x19, #8]
	ldr	w9, [x20, #8]
	sdiv	w8, w8, w9
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w1, w8, #1
	bl	_FIELD_PREP
	orr	w21, w21, w0
Lloh6:
	adrp	x8, _MIO_EMM_SWITCH_CLK_LO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MIO_EMM_SWITCH_CLK_LO@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldr	w8, [x19, #8]
	ldr	w9, [x20, #8]
	sdiv	w8, w8, w9
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w1, w8, #1
	bl	_FIELD_PREP
	orr	w8, w21, w0
	str	w8, [sp, #12]
	ldr	x1, [x20]
	add	x0, sp, #12
	bl	_set_bus_id
	ldr	w1, [sp, #12]
	mov	x0, x19
	bl	_do_switch
	ldr	w8, [sp, #12]
	str	w8, [x20, #12]
	mov	x0, x20
	mov	w1, #0
	bl	_set_wdog
	ldr	x20, [x19, #16]
	mov	x0, x19
	bl	_MIO_EMM_STS_MASK
	add	x1, x0, x20
	mov	w0, #128
	movk	w0, #58425, lsl #16
	bl	_writeq
	ldr	x20, [x19, #16]
	mov	x0, x19
	bl	_MIO_EMM_RCA
	add	x1, x0, x20
	mov	w0, #1
	bl	_writeq
	mov	w0, #0
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MIO_EMM_SWITCH_POWER_CLASS,4,2 ; @MIO_EMM_SWITCH_POWER_CLASS
	.comm	_MIO_EMM_SWITCH_CLK_HI,4,2      ; @MIO_EMM_SWITCH_CLK_HI
	.comm	_MIO_EMM_SWITCH_CLK_LO,4,2      ; @MIO_EMM_SWITCH_CLK_LO
	.no_dead_strip	_cvm_mmc_init_lowlevel
.subsections_via_symbols
