	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmc_set_uhs_voltage            ## -- Begin function mmc_set_uhs_voltage
	.p2align	4, 0x90
_mmc_set_uhs_voltage:                   ## @mmc_set_uhs_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
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -48(%rbp)
	movaps	%xmm0, -64(%rbp)
	movq	(%rdi), %rax
	cmpl	$0, 8(%rax)
	je	LBB0_1
## %bb.3:
	movl	%esi, %r14d
	movq	%rdi, %r15
	cmpq	$0, (%rax)
	jne	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	callq	_mmc_hostname
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_warn
LBB0_5:
	movq	_SD_SWITCH_VOLTAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -40(%rbp)
	movq	$0, -48(%rbp)
	movq	_MMC_RSP_R1@GOTPCREL(%rip), %rax
	movq	_MMC_CMD_AC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, -64(%rbp)
	leaq	-64(%rbp), %rsi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_mmc_wait_for_cmd
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_17
## %bb.6:
	movq	%r15, %rdi
	callq	_mmc_host_is_spi
	testl	%eax, %eax
	je	LBB0_7
LBB0_9:
	movl	$1, %edi
	callq	_mmc_delay
	movq	(%r15), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	%r15, %rdi
	callq	*%rax
	testq	%rax, %rax
	je	LBB0_14
LBB0_11:
	movq	%r15, %rdi
	callq	_mmc_host_set_uhs_voltage
	testq	%rax, %rax
	je	LBB0_12
LBB0_14:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	je	LBB0_15
## %bb.16:
	negl	%ebx
	movq	%r15, %rdi
	callq	_mmc_hostname
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_debug
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_mmc_power_cycle
	jmp	LBB0_17
LBB0_1:
	movq	_EPERM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_17:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	-56(%rbp), %rax
	movq	_R1_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_9
## %bb.8:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_15:
	xorl	%ebx, %ebx
	jmp	LBB0_17
LBB0_12:
	movl	$1, %edi
	callq	_mmc_delay
	movq	(%r15), %rax
	movq	(%rax), %rcx
	xorl	%ebx, %ebx
	testq	%rcx, %rcx
	je	LBB0_17
## %bb.13:
	movq	%r15, %rdi
	callq	*%rcx
	testq	%rax, %rax
	jne	LBB0_14
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_EPERM,4,2                      ## @EPERM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: cannot verify signal voltage switch\n"

	.comm	_SD_SWITCH_VOLTAGE,4,2          ## @SD_SWITCH_VOLTAGE
	.comm	_MMC_RSP_R1,4,2                 ## @MMC_RSP_R1
	.comm	_MMC_CMD_AC,4,2                 ## @MMC_CMD_AC
	.comm	_R1_ERROR,4,2                   ## @R1_ERROR
	.comm	_EIO,4,2                        ## @EIO
	.comm	_EAGAIN,4,2                     ## @EAGAIN
L_.str.1:                               ## @.str.1
	.asciz	"%s: Signal voltage switch failed, power cycling card\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmc_set_uhs_voltage            ; -- Begin function mmc_set_uhs_voltage
	.p2align	2
_mmc_set_uhs_voltage:                   ; @mmc_set_uhs_voltage
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp]
	ldr	x8, [x0]
	ldr	w9, [x8, #8]
	cbz	w9, LBB0_10
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x8]
	cbnz	x8, LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_mmc_hostname
	mov	x1, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_warn
LBB0_3:
Lloh2:
	adrp	x8, _SD_SWITCH_VOLTAGE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SD_SWITCH_VOLTAGE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [sp, #24]
	str	xzr, [sp, #16]
Lloh5:
	adrp	x8, _MMC_RSP_R1@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MMC_RSP_R1@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _MMC_CMD_AC@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MMC_CMD_AC@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [sp]
	mov	x1, sp
	mov	x0, x20
	mov	w2, #0
	bl	_mmc_wait_for_cmd
	mov	x21, x0
	cbnz	w0, LBB0_12
; %bb.4:
	mov	x0, x20
	bl	_mmc_host_is_spi
	cbz	w0, LBB0_13
LBB0_5:
	mov	w0, #1
	bl	_mmc_delay
	ldr	x8, [x20]
	ldr	x8, [x8]
	cbz	x8, LBB0_7
; %bb.6:
	mov	x0, x20
	blr	x8
	cbz	x0, LBB0_8
LBB0_7:
	mov	x0, x20
	bl	_mmc_host_set_uhs_voltage
	cbz	x0, LBB0_15
LBB0_8:
Lloh11:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cbz	w8, LBB0_17
; %bb.9:
	neg	w21, w8
	mov	x0, x20
	bl	_mmc_hostname
	mov	x1, x0
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_debug
	mov	x0, x20
	mov	x1, x19
	bl	_mmc_power_cycle
	b	LBB0_12
LBB0_10:
Lloh16:
	adrp	x8, _EPERM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_12:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_13:
	ldr	x8, [sp, #8]
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _R1_ERROR@GOTPAGE
Lloh19:
	ldr	x9, [x9, _R1_ERROR@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.14:
Lloh21:
	adrp	x8, _EIO@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_11
LBB0_15:
	mov	w0, #1
	bl	_mmc_delay
	ldr	x8, [x20]
	ldr	x8, [x8]
	cbz	x8, LBB0_17
; %bb.16:
	mov	x0, x20
	blr	x8
	cbnz	x0, LBB0_8
LBB0_17:
	mov	w21, #0
	b	LBB0_12
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_EPERM,4,2                      ; @EPERM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: cannot verify signal voltage switch\n"

	.comm	_SD_SWITCH_VOLTAGE,4,2          ; @SD_SWITCH_VOLTAGE
	.comm	_MMC_RSP_R1,4,2                 ; @MMC_RSP_R1
	.comm	_MMC_CMD_AC,4,2                 ; @MMC_CMD_AC
	.comm	_R1_ERROR,4,2                   ; @R1_ERROR
	.comm	_EIO,4,2                        ; @EIO
	.comm	_EAGAIN,4,2                     ; @EAGAIN
l_.str.1:                               ; @.str.1
	.asciz	"%s: Signal voltage switch failed, power cycling card\n"

.subsections_via_symbols
