	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wmt_mci_set_ios
_wmt_mci_set_ios:                       ## @wmt_mci_set_ios
	.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, %r14
	movq	%rdi, %rbx
	callq	_mmc_priv
	movq	%rax, %r15
	movq	(%r14), %rax
	movq	_MMC_POWER_UP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_wmt_reset_hardware
	movq	_WMT_SD_POWER_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_wmt_set_sd_power
	movq	(%r14), %rax
LBB0_2:
	movq	_MMC_POWER_OFF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movq	_WMT_SD_POWER_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_wmt_set_sd_power
LBB0_4:
	movl	12(%r14), %esi
	testl	%esi, %esi
	je	LBB0_6
## %bb.5:
	movl	8(%r15), %edi
	callq	_clk_set_rate
LBB0_6:
	movq	_SDMMC_BUSMODE@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	addq	(%r15), %rdi
	callq	_readb
	movl	%eax, %ebx
	movq	_SDMMC_EXTCTRL@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	addq	(%r15), %rdi
	callq	_readb
	movq	_BM_EIGHTBIT_MODE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movq	_BM_FOURBIT_MODE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%edx, %edi
	orl	%r8d, %edi
	notl	%edi
	andl	%ebx, %edi
	movq	_EXT_EIGHTBIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%esi, %ebx
	notl	%ebx
	andl	%eax, %ebx
	movl	8(%r14), %ecx
	cmpl	$129, %ecx
	je	LBB0_9
## %bb.7:
	cmpl	$128, %ecx
	jne	LBB0_10
## %bb.8:
	orl	%r8d, %edi
	orl	%eax, %esi
	movl	%esi, %ebx
	jmp	LBB0_10
LBB0_9:
	orl	%edx, %edi
LBB0_10:
	movq	(%r12), %rsi
	addq	(%r15), %rsi
	callq	_writeb
	movq	(%r13), %rsi
	addq	(%r15), %rsi
	movl	%ebx, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writeb                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MMC_POWER_UP,8,3               ## @MMC_POWER_UP
	.comm	_WMT_SD_POWER_ON,4,2            ## @WMT_SD_POWER_ON
	.comm	_MMC_POWER_OFF,8,3              ## @MMC_POWER_OFF
	.comm	_WMT_SD_POWER_OFF,4,2           ## @WMT_SD_POWER_OFF
	.comm	_SDMMC_BUSMODE,8,3              ## @SDMMC_BUSMODE
	.comm	_SDMMC_EXTCTRL,8,3              ## @SDMMC_EXTCTRL
	.comm	_BM_EIGHTBIT_MODE,4,2           ## @BM_EIGHTBIT_MODE
	.comm	_BM_FOURBIT_MODE,4,2            ## @BM_FOURBIT_MODE
	.comm	_EXT_EIGHTBIT,4,2               ## @EXT_EIGHTBIT
	.no_dead_strip	_wmt_mci_set_ios
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wmt_mci_set_ios
_wmt_mci_set_ios:                       ; @wmt_mci_set_ios
	.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
	mov	x19, x0
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _MMC_POWER_UP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MMC_POWER_UP@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_wmt_reset_hardware
Lloh3:
	adrp	x8, _WMT_SD_POWER_ON@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WMT_SD_POWER_ON@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_wmt_set_sd_power
	ldr	x8, [x20]
LBB0_2:
Lloh6:
	adrp	x9, _MMC_POWER_OFF@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MMC_POWER_OFF@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
Lloh9:
	adrp	x8, _WMT_SD_POWER_OFF@GOTPAGE
Lloh10:
	ldr	x8, [x8, _WMT_SD_POWER_OFF@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_wmt_set_sd_power
LBB0_4:
	ldr	w1, [x20, #12]
	cbz	w1, LBB0_6
; %bb.5:
	ldr	w0, [x19, #8]
	bl	_clk_set_rate
LBB0_6:
	ldr	x8, [x19]
Lloh12:
	adrp	x22, _SDMMC_BUSMODE@GOTPAGE
Lloh13:
	ldr	x22, [x22, _SDMMC_BUSMODE@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readb
	mov	x21, x0
	ldr	x8, [x19]
Lloh14:
	adrp	x23, _SDMMC_EXTCTRL@GOTPAGE
Lloh15:
	ldr	x23, [x23, _SDMMC_EXTCTRL@GOTPAGEOFF]
	ldr	x9, [x23]
	add	x0, x9, x8
	bl	_readb
Lloh16:
	adrp	x8, _BM_EIGHTBIT_MODE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _BM_EIGHTBIT_MODE@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	adrp	x9, _BM_FOURBIT_MODE@GOTPAGE
Lloh20:
	ldr	x9, [x9, _BM_FOURBIT_MODE@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	orr	w10, w9, w8
	bic	w10, w21, w10
Lloh22:
	adrp	x11, _EXT_EIGHTBIT@GOTPAGE
Lloh23:
	ldr	x11, [x11, _EXT_EIGHTBIT@GOTPAGEOFF]
Lloh24:
	ldr	w11, [x11]
	bic	w12, w0, w11
	ldr	w13, [x20, #8]
	orr	w9, w10, w9
	orr	w8, w10, w8
	orr	w11, w11, w0
	cmp	w13, #128
	csel	w8, w10, w8, ne
	csel	w10, w12, w11, ne
	cmp	w13, #129
	csel	w0, w9, w8, eq
	csel	w20, w12, w10, eq
	ldr	x8, [x19]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_writeb
	ldr	x8, [x19]
	ldr	x9, [x23]
	add	x1, x9, x8
	mov	x0, x20
	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	_writeb
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_MMC_POWER_UP,8,3               ; @MMC_POWER_UP
	.comm	_WMT_SD_POWER_ON,4,2            ; @WMT_SD_POWER_ON
	.comm	_MMC_POWER_OFF,8,3              ; @MMC_POWER_OFF
	.comm	_WMT_SD_POWER_OFF,4,2           ; @WMT_SD_POWER_OFF
	.comm	_SDMMC_BUSMODE,8,3              ; @SDMMC_BUSMODE
	.comm	_SDMMC_EXTCTRL,8,3              ; @SDMMC_EXTCTRL
	.comm	_BM_EIGHTBIT_MODE,4,2           ; @BM_EIGHTBIT_MODE
	.comm	_BM_FOURBIT_MODE,4,2            ; @BM_FOURBIT_MODE
	.comm	_EXT_EIGHTBIT,4,2               ; @EXT_EIGHTBIT
	.no_dead_strip	_wmt_mci_set_ios
.subsections_via_symbols
