	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmc_select_voltage             ## -- Begin function mmc_select_voltage
	.p2align	4, 0x90
_mmc_select_voltage:                    ## @mmc_select_voltage
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	testb	$127, %bl
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_mmc_dev
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_warn
	andl	$-128, %ebx
LBB0_2:
	andl	(%r14), %ebx
	je	LBB0_3
## %bb.4:
	movq	_MMC_CAP2_FULL_PWR_CYCLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r14)
	je	LBB0_6
## %bb.5:
	bsfl	%ebx, %ecx
	movl	$3, %r15d
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r15d
	andl	%ebx, %r15d
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_mmc_power_cycle
	jmp	LBB0_8
LBB0_3:
	movq	%r14, %rdi
	callq	_mmc_dev
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_warn
	xorl	%r15d, %r15d
	jmp	LBB0_8
LBB0_6:
	movl	%ebx, %edi
	callq	_fls
	decl	%eax
	movl	$3, %r15d
	movl	%eax, %ecx
	shll	%cl, %r15d
	andl	%ebx, %r15d
	cmpl	8(%r14), %eax
	je	LBB0_8
## %bb.7:
	movq	%r14, %rdi
	callq	_mmc_dev
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_warn
LBB0_8:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"card claims to support voltages below defined range\n"

L_.str.1:                               ## @.str.1
	.asciz	"no support for card's volts\n"

	.comm	_MMC_CAP2_FULL_PWR_CYCLE,4,2    ## @MMC_CAP2_FULL_PWR_CYCLE
L_.str.2:                               ## @.str.2
	.asciz	"exceeding card's volts\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmc_select_voltage             ; -- Begin function mmc_select_voltage
	.p2align	2
_mmc_select_voltage:                    ; @mmc_select_voltage
	.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	x20, x1
	mov	x19, x0
	tst	w1, #0x7f
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_mmc_dev
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
	and	w20, w20, #0xffffff80
LBB0_2:
	ldr	w8, [x19]
	ands	w20, w8, w20
	b.eq	LBB0_5
; %bb.3:
	ldr	w8, [x19, #4]
Lloh2:
	adrp	x9, _MMC_CAP2_FULL_PWR_CYCLE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MMC_CAP2_FULL_PWR_CYCLE@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.4:
	rbit	w8, w20
	clz	w8, w8
	mov	w9, #3
	lsl	w8, w9, w8
	and	w20, w8, w20
	mov	x0, x19
	mov	x1, x20
	bl	_mmc_power_cycle
	b	LBB0_9
LBB0_5:
	mov	x0, x19
	bl	_mmc_dev
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_8
LBB0_6:
	mov	x0, x20
	bl	_fls
	sub	w8, w0, #1
	mov	w9, #3
	lsl	w9, w9, w8
	and	w20, w9, w20
	ldr	w9, [x19, #8]
	cmp	w8, w9
	b.eq	LBB0_9
; %bb.7:
	mov	x0, x19
	bl	_mmc_dev
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_8:
	bl	_dev_warn
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"card claims to support voltages below defined range\n"

l_.str.1:                               ; @.str.1
	.asciz	"no support for card's volts\n"

	.comm	_MMC_CAP2_FULL_PWR_CYCLE,4,2    ; @MMC_CAP2_FULL_PWR_CYCLE
l_.str.2:                               ; @.str.2
	.asciz	"exceeding card's volts\n"

.subsections_via_symbols
