	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmc_power_up
_mmc_power_up:                          ## @mmc_power_up
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	40(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	bsfq	%rax, %rax
	jmp	LBB0_3
LBB0_2:
	movl	32(%rbx), %edi
	callq	_fls
                                        ## kill: def $eax killed $eax def $rax
	decl	%eax
LBB0_3:
	movl	%eax, 4(%rbx)
	movq	%rbx, %rdi
	callq	_mmc_host_is_spi
	testq	%rax, %rax
	movq	_MMC_BUSMODE_PUSHPULL@GOTPCREL(%rip), %rax
	cmoveq	_MMC_BUSMODE_OPENDRAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_MMC_CS_HIGH@GOTPCREL(%rip), %rcx
	cmoveq	_MMC_CS_DONTCARE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 28(%rbx)
	movl	%eax, 24(%rbx)
	movq	_MMC_POWER_UP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	movq	_MMC_BUS_WIDTH_1@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	_MMC_TIMING_LEGACY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	%rbx, %rdi
	callq	_mmc_set_ios
	movl	$10, %edi
	callq	_mmc_delay
	movl	$400000, %eax                   ## imm = 0x61A80
	cmpl	$400001, (%rbx)                 ## imm = 0x61A81
	jl	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_mmc_hostname
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_warning
	movl	(%rbx), %eax
LBB0_5:
	movl	%eax, 8(%rbx)
	movq	_MMC_POWER_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	movq	%rbx, %rdi
	callq	_mmc_set_ios
	movl	$10, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_mmc_delay                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MMC_CS_HIGH,4,2                ## @MMC_CS_HIGH
	.comm	_MMC_BUSMODE_PUSHPULL,4,2       ## @MMC_BUSMODE_PUSHPULL
	.comm	_MMC_CS_DONTCARE,4,2            ## @MMC_CS_DONTCARE
	.comm	_MMC_BUSMODE_OPENDRAIN,4,2      ## @MMC_BUSMODE_OPENDRAIN
	.comm	_MMC_POWER_UP,4,2               ## @MMC_POWER_UP
	.comm	_MMC_BUS_WIDTH_1,4,2            ## @MMC_BUS_WIDTH_1
	.comm	_MMC_TIMING_LEGACY,4,2          ## @MMC_TIMING_LEGACY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: Minimum clock frequency too high for identification mode\n"

	.comm	_MMC_POWER_ON,4,2               ## @MMC_POWER_ON
	.no_dead_strip	_mmc_power_up
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmc_power_up
_mmc_power_up:                          ; @mmc_power_up
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x8, [x0, #40]
	cbz	x8, LBB0_2
; %bb.1:
	rbit	x8, x8
	clz	x8, x8
	b	LBB0_3
LBB0_2:
	ldr	w0, [x19, #32]
	bl	_fls
	sub	w8, w0, #1
LBB0_3:
	mov	w20, #6784
	movk	w20, #6, lsl #16
	str	w8, [x19, #4]
	mov	x0, x19
	bl	_mmc_host_is_spi
Lloh0:
	adrp	x8, _MMC_BUSMODE_OPENDRAIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MMC_BUSMODE_OPENDRAIN@GOTPAGEOFF]
Lloh2:
	adrp	x9, _MMC_BUSMODE_PUSHPULL@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MMC_BUSMODE_PUSHPULL@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x8, x9, eq
	ldr	w8, [x8]
Lloh4:
	adrp	x9, _MMC_CS_DONTCARE@GOTPAGE
Lloh5:
	ldr	x9, [x9, _MMC_CS_DONTCARE@GOTPAGEOFF]
Lloh6:
	adrp	x10, _MMC_CS_HIGH@GOTPAGE
Lloh7:
	ldr	x10, [x10, _MMC_CS_HIGH@GOTPAGEOFF]
	csel	x9, x9, x10, eq
	ldr	w9, [x9]
Lloh8:
	adrp	x10, _MMC_POWER_UP@GOTPAGE
Lloh9:
	ldr	x10, [x10, _MMC_POWER_UP@GOTPAGEOFF]
	str	w9, [x19, #28]
Lloh10:
	ldr	w9, [x10]
Lloh11:
	adrp	x10, _MMC_BUS_WIDTH_1@GOTPAGE
Lloh12:
	ldr	x10, [x10, _MMC_BUS_WIDTH_1@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
	stp	w10, w8, [x19, #20]
Lloh14:
	adrp	x8, _MMC_TIMING_LEGACY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MMC_TIMING_LEGACY@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	stp	w9, w8, [x19, #12]
	mov	x0, x19
	bl	_mmc_set_ios
	mov	w0, #10
	bl	_mmc_delay
	ldr	w8, [x19]
	cmp	w8, w20
	b.le	LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_mmc_hostname
	mov	x1, x0
Lloh17:
	adrp	x0, l_.str@PAGE
Lloh18:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_warning
	ldr	w20, [x19]
LBB0_5:
Lloh19:
	adrp	x8, _MMC_POWER_ON@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MMC_POWER_ON@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	stp	w20, w8, [x19, #8]
	mov	x0, x19
	bl	_mmc_set_ios
	mov	w0, #10
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_mmc_delay
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_MMC_CS_HIGH,4,2                ; @MMC_CS_HIGH
	.comm	_MMC_BUSMODE_PUSHPULL,4,2       ; @MMC_BUSMODE_PUSHPULL
	.comm	_MMC_CS_DONTCARE,4,2            ; @MMC_CS_DONTCARE
	.comm	_MMC_BUSMODE_OPENDRAIN,4,2      ; @MMC_BUSMODE_OPENDRAIN
	.comm	_MMC_POWER_UP,4,2               ; @MMC_POWER_UP
	.comm	_MMC_BUS_WIDTH_1,4,2            ; @MMC_BUS_WIDTH_1
	.comm	_MMC_TIMING_LEGACY,4,2          ; @MMC_TIMING_LEGACY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: Minimum clock frequency too high for identification mode\n"

	.comm	_MMC_POWER_ON,4,2               ; @MMC_POWER_ON
	.no_dead_strip	_mmc_power_up
.subsections_via_symbols
