	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cvm_mmc_switch_to
_cvm_mmc_switch_to:                     ## @cvm_mmc_switch_to
	.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	24(%rdi), %r12
	movq	(%r12), %rax
	cmpq	%rax, (%rdi)
	je	LBB0_4
## %bb.1:
	movq	%rdi, %r14
	movq	16(%r12), %rcx
	movq	(%rcx,%rax,8), %rbx
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.2:
	movq	8(%r12), %r15
	movq	%r12, %rdi
	callq	_MIO_EMM_SWITCH
	addq	%rax, %r15
	movq	%r15, %rdi
	callq	_readq
	movl	%eax, 8(%rbx)
	movq	8(%r12), %r15
	movq	%r12, %rdi
	callq	_MIO_EMM_RCA
	addq	%rax, %r15
	movq	%r15, %rdi
	callq	_readq
	movl	%eax, 12(%rbx)
LBB0_3:
	movl	12(%r14), %r15d
	movq	8(%r12), %rbx
	movq	%r12, %rdi
	callq	_MIO_EMM_RCA
	addq	%rax, %rbx
	movl	%r15d, %edi
	movq	%rbx, %rsi
	callq	_writeq
	movl	8(%r14), %eax
	movl	%eax, -36(%rbp)
	movq	(%r14), %rsi
	leaq	-36(%rbp), %rdi
	callq	_set_bus_id
	movl	-36(%rbp), %esi
	movq	%r12, %rdi
	callq	_do_switch
	movq	_MIO_EMM_SAMPLE_CMD_CNT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	20(%r14), %esi
	callq	_FIELD_PREP
	movl	%eax, %r15d
	movq	_MIO_EMM_SAMPLE_DAT_CNT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	16(%r14), %esi
	callq	_FIELD_PREP
	orl	%eax, %r15d
	movq	8(%r12), %rbx
	movq	%r12, %rdi
	callq	_MIO_EMM_SAMPLE
	addq	%rax, %rbx
	movl	%r15d, %edi
	movq	%rbx, %rsi
	callq	_writeq
	movq	(%r14), %rax
	movq	%rax, (%r12)
LBB0_4:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MIO_EMM_SAMPLE_CMD_CNT,4,2     ## @MIO_EMM_SAMPLE_CMD_CNT
	.comm	_MIO_EMM_SAMPLE_DAT_CNT,4,2     ## @MIO_EMM_SAMPLE_DAT_CNT
	.no_dead_strip	_cvm_mmc_switch_to
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cvm_mmc_switch_to
_cvm_mmc_switch_to:                     ; @cvm_mmc_switch_to
	.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
	ldr	x19, [x0, #24]
	ldr	x9, [x0]
	ldr	x8, [x19]
	cmp	x9, x8
	b.eq	LBB0_4
; %bb.1:
	mov	x20, x0
	ldr	x9, [x19, #16]
	ldr	x21, [x9, x8, lsl #3]
	cbz	x21, LBB0_3
; %bb.2:
	ldr	x22, [x19, #8]
	mov	x0, x19
	bl	_MIO_EMM_SWITCH
	add	x0, x0, x22
	bl	_readq
	str	w0, [x21, #8]
	ldr	x22, [x19, #8]
	mov	x0, x19
	bl	_MIO_EMM_RCA
	add	x0, x0, x22
	bl	_readq
	str	w0, [x21, #12]
LBB0_3:
	ldr	w21, [x20, #12]
	ldr	x22, [x19, #8]
	mov	x0, x19
	bl	_MIO_EMM_RCA
	add	x1, x0, x22
	mov	x0, x21
	bl	_writeq
	ldr	w8, [x20, #8]
	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
Lloh0:
	adrp	x8, _MIO_EMM_SAMPLE_CMD_CNT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MIO_EMM_SAMPLE_CMD_CNT@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	ldr	w1, [x20, #20]
	bl	_FIELD_PREP
	mov	x21, x0
Lloh3:
	adrp	x8, _MIO_EMM_SAMPLE_DAT_CNT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MIO_EMM_SAMPLE_DAT_CNT@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	ldr	w1, [x20, #16]
	bl	_FIELD_PREP
	orr	w21, w0, w21
	ldr	x22, [x19, #8]
	mov	x0, x19
	bl	_MIO_EMM_SAMPLE
	add	x1, x0, x22
	mov	x0, x21
	bl	_writeq
	ldr	x8, [x20]
	str	x8, [x19]
LBB0_4:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MIO_EMM_SAMPLE_CMD_CNT,4,2     ; @MIO_EMM_SAMPLE_CMD_CNT
	.comm	_MIO_EMM_SAMPLE_DAT_CNT,4,2     ; @MIO_EMM_SAMPLE_DAT_CNT
	.no_dead_strip	_cvm_mmc_switch_to
.subsections_via_symbols
