	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dw_mci_hi3660_switch_voltage
_dw_mci_hi3660_switch_voltage:          ## @dw_mci_hi3660_switch_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r12
	callq	_mmc_priv
	movq	(%rax), %r15
	movq	8(%r15), %rax
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	cmpl	$0, 8(%rax)
	je	LBB0_9
## %bb.2:
	movq	(%rax), %rax
	movq	_DWMMC_SDIO_ID@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_9
## %bb.3:
	movq	(%r14), %rax
	movq	_MMC_SIGNAL_VOLTAGE_330@GOTPCREL(%rip), %rcx
	xorl	%esi, %esi
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.4:
	movq	_MMC_SIGNAL_VOLTAGE_180@GOTPCREL(%rip), %rcx
	movl	$1, %esi
	cmpq	(%rcx), %rax
	jne	LBB0_6
LBB0_5:
	movq	%r15, %rdi
	callq	_dw_mci_set_sel18
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
LBB0_6:
	movl	(%r12), %edi
	callq	_IS_ERR
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_mmc_regulator_set_vqmmc
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	%eax, %r14d
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	movl	%r14d, %ebx
LBB0_9:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DWMMC_SDIO_ID,8,3              ## @DWMMC_SDIO_ID
	.comm	_MMC_SIGNAL_VOLTAGE_330,8,3     ## @MMC_SIGNAL_VOLTAGE_330
	.comm	_MMC_SIGNAL_VOLTAGE_180,8,3     ## @MMC_SIGNAL_VOLTAGE_180
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Regulator set error %d\n"

	.no_dead_strip	_dw_mci_hi3660_switch_voltage
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dw_mci_hi3660_switch_voltage
_dw_mci_hi3660_switch_voltage:          ; @dw_mci_hi3660_switch_voltage
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x21, x0
	bl	_mmc_priv
	ldr	x20, [x0]
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_9
; %bb.1:
	ldr	w9, [x8, #8]
	cbz	w9, LBB0_9
; %bb.2:
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _DWMMC_SDIO_ID@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DWMMC_SDIO_ID@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_9
; %bb.3:
	ldr	x8, [x19]
Lloh3:
	adrp	x9, _MMC_SIGNAL_VOLTAGE_330@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MMC_SIGNAL_VOLTAGE_330@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.4:
	mov	w1, #0
	b	LBB0_7
LBB0_5:
Lloh6:
	adrp	x9, _MMC_SIGNAL_VOLTAGE_180@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MMC_SIGNAL_VOLTAGE_180@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.6:
	mov	w1, #1
LBB0_7:
	mov	x0, x20
	bl	_dw_mci_set_sel18
	mov	x22, x0
	cbnz	w0, LBB0_10
LBB0_8:
	ldr	w0, [x21]
	bl	_IS_ERR
	cbz	w0, LBB0_11
LBB0_9:
	mov	w22, #0
LBB0_10:
	mov	x0, x22
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_11:
	mov	x0, x21
	mov	x1, x19
	bl	_mmc_regulator_set_vqmmc
	mov	x22, x0
	cbz	w0, LBB0_10
; %bb.12:
	ldr	w0, [x20]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x22
	bl	_dev_err
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_DWMMC_SDIO_ID,8,3              ; @DWMMC_SDIO_ID
	.comm	_MMC_SIGNAL_VOLTAGE_330,8,3     ; @MMC_SIGNAL_VOLTAGE_330
	.comm	_MMC_SIGNAL_VOLTAGE_180,8,3     ; @MMC_SIGNAL_VOLTAGE_180
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Regulator set error %d\n"

	.no_dead_strip	_dw_mci_hi3660_switch_voltage
.subsections_via_symbols
