	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dw_mci_hi6220_switch_voltage
_dw_mci_hi6220_switch_voltage:          ## @dw_mci_hi6220_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	%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, %rbx
	movq	%rdi, %r13
	callq	_mmc_priv
	movq	(%rax), %r15
	movq	8(%r15), %rax
	xorl	%r14d, %r14d
	testq	%rax, %rax
	je	LBB0_12
## %bb.1:
	movl	(%rax), %edi
	testl	%edi, %edi
	je	LBB0_12
## %bb.2:
	movq	(%rbx), %rax
	movq	_MMC_SIGNAL_VOLTAGE_330@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movq	_AO_SCTRL_CTRL3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AO_SCTRL_SEL18@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%ecx, %ecx
	callq	_regmap_update_bits
	movl	%eax, %r12d
	movl	$3000000, %ebx                  ## imm = 0x2DC6C0
	testl	%r12d, %r12d
	je	LBB0_8
LBB0_7:
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_11:
	movl	%r12d, %r14d
	jmp	LBB0_12
LBB0_4:
	movq	_MMC_SIGNAL_VOLTAGE_180@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.5:
	movq	_AO_SCTRL_CTRL3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_AO_SCTRL_SEL18@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, %edx
	callq	_regmap_update_bits
	movl	%eax, %r12d
	movl	$1800000, %ebx                  ## imm = 0x1B7740
	testl	%r12d, %r12d
	jne	LBB0_7
LBB0_8:
	movl	(%r13), %edi
	callq	_IS_ERR_OR_NULL
	testq	%rax, %rax
	jne	LBB0_12
## %bb.9:
	movl	(%r13), %edi
	movl	%ebx, %esi
	movl	%ebx, %edx
	callq	_regulator_set_voltage
	testl	%eax, %eax
	je	LBB0_12
## %bb.10:
	movl	%eax, %r12d
	movl	(%r15), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edx
	movl	%ebx, %ecx
	movl	%ebx, %r8d
	xorl	%eax, %eax
	callq	_dev_dbg
	jmp	LBB0_11
LBB0_13:
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
LBB0_12:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MMC_SIGNAL_VOLTAGE_330,8,3     ## @MMC_SIGNAL_VOLTAGE_330
	.comm	_AO_SCTRL_CTRL3,4,2             ## @AO_SCTRL_CTRL3
	.comm	_AO_SCTRL_SEL18,4,2             ## @AO_SCTRL_SEL18
	.comm	_MMC_SIGNAL_VOLTAGE_180,8,3     ## @MMC_SIGNAL_VOLTAGE_180
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"voltage not supported\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"switch voltage failed\n"

L_.str.2:                               ## @.str.2
	.asciz	"Regulator set error %d: %d - %d\n"

	.no_dead_strip	_dw_mci_hi6220_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_hi6220_switch_voltage
_dw_mci_hi6220_switch_voltage:          ; @dw_mci_hi6220_switch_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
	mov	x20, x1
	mov	x19, x0
	bl	_mmc_priv
	ldr	x22, [x0]
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_9
; %bb.1:
	ldr	w0, [x8]
	cbz	w0, LBB0_9
; %bb.2:
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _MMC_SIGNAL_VOLTAGE_330@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MMC_SIGNAL_VOLTAGE_330@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.3:
Lloh3:
	adrp	x8, _AO_SCTRL_CTRL3@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AO_SCTRL_CTRL3@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _AO_SCTRL_SEL18@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AO_SCTRL_SEL18@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	w3, #0
	bl	_regmap_update_bits
	mov	x20, x0
	mov	w21, #50880
	movk	w21, #45, lsl #16
	cbz	w20, LBB0_8
LBB0_4:
	ldr	w0, [x22]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_5:
	bl	_dev_dbg
	b	LBB0_10
LBB0_6:
Lloh11:
	adrp	x9, _MMC_SIGNAL_VOLTAGE_180@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MMC_SIGNAL_VOLTAGE_180@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.7:
Lloh14:
	adrp	x8, _AO_SCTRL_CTRL3@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AO_SCTRL_CTRL3@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x8, _AO_SCTRL_SEL18@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AO_SCTRL_SEL18@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	x3, x2
	bl	_regmap_update_bits
	mov	x20, x0
	mov	w21, #30528
	movk	w21, #27, lsl #16
	cbnz	w20, LBB0_4
LBB0_8:
	ldr	w0, [x19]
	bl	_IS_ERR_OR_NULL
	cbz	x0, LBB0_12
LBB0_9:
	mov	w20, #0
LBB0_10:
	mov	x0, x20
	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_11:
	ldr	w0, [x22]
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_10
LBB0_12:
	ldr	w0, [x19]
	mov	x1, x21
	mov	x2, x21
	bl	_regulator_set_voltage
	mov	x20, x0
	cbz	w0, LBB0_10
; %bb.13:
	ldr	w0, [x22]
	stp	x21, x21, [sp, #8]
	str	x20, [sp]
Lloh25:
	adrp	x1, l_.str.2@PAGE
Lloh26:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_MMC_SIGNAL_VOLTAGE_330,8,3     ; @MMC_SIGNAL_VOLTAGE_330
	.comm	_AO_SCTRL_CTRL3,4,2             ; @AO_SCTRL_CTRL3
	.comm	_AO_SCTRL_SEL18,4,2             ; @AO_SCTRL_SEL18
	.comm	_MMC_SIGNAL_VOLTAGE_180,8,3     ; @MMC_SIGNAL_VOLTAGE_180
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"voltage not supported\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"switch voltage failed\n"

l_.str.2:                               ; @.str.2
	.asciz	"Regulator set error %d: %d - %d\n"

	.no_dead_strip	_dw_mci_hi6220_switch_voltage
.subsections_via_symbols
