	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_sdhci_set_padctrl
_tegra_sdhci_set_padctrl:               ## @tegra_sdhci_set_padctrl
	.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
	movl	%edx, %ebx
	movl	%esi, %r15d
	movq	%rdi, %r14
	callq	_sdhci_priv
	movq	%rax, %rdi
	callq	_sdhci_pltfm_priv
	testl	%ebx, %ebx
	je	LBB0_1
## %bb.10:
	cmpl	$0, 24(%rax)
	je	LBB0_11
## %bb.12:
	movq	_MMC_SIGNAL_VOLTAGE_180@GOTPCREL(%rip), %rcx
	movl	8(%rax), %edi
	cmpl	%r15d, (%rcx)
	jne	LBB0_15
## %bb.13:
	movq	16(%rax), %rsi
	callq	_pinctrl_select_state
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_18
## %bb.14:
	movl	(%r14), %edi
	callq	_mmc_dev
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_17
LBB0_1:
	movq	_MMC_SIGNAL_VOLTAGE_180@GOTPCREL(%rip), %rcx
	cmpl	%r15d, (%rcx)
	jne	LBB0_4
## %bb.2:
	movq	40(%rax), %rsi
	testq	%rsi, %rsi
	jne	LBB0_8
## %bb.3:
	leaq	48(%rax), %rcx
	addq	$52, %rax
	jmp	LBB0_6
LBB0_11:
	xorl	%ebx, %ebx
	jmp	LBB0_18
LBB0_15:
	movq	(%rax), %rsi
	callq	_pinctrl_select_state
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_18
## %bb.16:
	movl	(%r14), %edi
	callq	_mmc_dev
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_17
LBB0_4:
	movq	32(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_5
LBB0_8:
	movl	8(%rax), %edi
	callq	_pinctrl_select_state
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_18
## %bb.9:
	movl	(%r14), %edi
	callq	_mmc_dev
	leaq	L_.str(%rip), %rsi
LBB0_17:
	movl	%eax, %edi
	movl	%ebx, %edx
	callq	_dev_err
	jmp	LBB0_18
LBB0_5:
	leaq	56(%rax), %rcx
	addq	$60, %rax
LBB0_6:
	movl	(%rax), %r15d
	movl	(%rcx), %r12d
	xorl	%ebx, %ebx
	movl	%r12d, %eax
	orl	%r15d, %eax
	je	LBB0_18
## %bb.7:
	movq	_SDHCI_TEGRA_SDMEM_COMP_PADCTRL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r14, %rdi
	callq	_sdhci_readl
	movq	_SDHCI_COMP_PADCTRL_DRVUPDN_OFFSET_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	shll	$20, %r12d
	shll	$12, %r15d
	orl	%r12d, %r15d
	orl	%ecx, %r15d
	movl	(%r13), %edx
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_sdhci_writel
LBB0_18:
	movl	%ebx, %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_180,4,2     ## @MMC_SIGNAL_VOLTAGE_180
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed pads drvupdn, ret: %d\n"

	.comm	_SDHCI_TEGRA_SDMEM_COMP_PADCTRL,4,2 ## @SDHCI_TEGRA_SDMEM_COMP_PADCTRL
	.comm	_SDHCI_COMP_PADCTRL_DRVUPDN_OFFSET_MASK,4,2 ## @SDHCI_COMP_PADCTRL_DRVUPDN_OFFSET_MASK
L_.str.1:                               ## @.str.1
	.asciz	"setting 1.8V failed, ret: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"setting 3.3V failed, ret: %d\n"

	.no_dead_strip	_tegra_sdhci_set_padctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_sdhci_set_padctrl
_tegra_sdhci_set_padctrl:               ; @tegra_sdhci_set_padctrl
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
	bl	_sdhci_priv
	bl	_sdhci_pltfm_priv
	cbz	w21, LBB0_5
; %bb.1:
	ldr	w8, [x0, #24]
	cbz	w8, LBB0_17
; %bb.2:
Lloh0:
	adrp	x8, _MMC_SIGNAL_VOLTAGE_180@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MMC_SIGNAL_VOLTAGE_180@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
	ldr	w8, [x0, #8]
	cmp	w9, w20
	b.ne	LBB0_8
; %bb.3:
	ldr	x1, [x0, #16]
	mov	x0, x8
	bl	_pinctrl_select_state
	mov	x20, x0
	tbz	w0, #31, LBB0_18
; %bb.4:
	ldr	w0, [x19]
	bl	_mmc_dev
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_13
LBB0_5:
Lloh5:
	adrp	x8, _MMC_SIGNAL_VOLTAGE_180@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MMC_SIGNAL_VOLTAGE_180@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_10
; %bb.6:
	ldr	x1, [x0, #40]
	cbnz	x1, LBB0_11
; %bb.7:
	add	x8, x0, #48
	add	x9, x0, #52
	b	LBB0_15
LBB0_8:
	ldr	x1, [x0]
	mov	x0, x8
	bl	_pinctrl_select_state
	mov	x20, x0
	tbz	w0, #31, LBB0_18
; %bb.9:
	ldr	w0, [x19]
	bl	_mmc_dev
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_13
LBB0_10:
	ldr	x1, [x0, #32]
	cbz	x1, LBB0_14
LBB0_11:
	ldr	w0, [x0, #8]
	bl	_pinctrl_select_state
	mov	x20, x0
	tbz	w0, #31, LBB0_18
; %bb.12:
	ldr	w0, [x19]
	bl	_mmc_dev
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
LBB0_13:
	mov	x2, x20
	bl	_dev_err
	b	LBB0_18
LBB0_14:
	add	x8, x0, #56
	add	x9, x0, #60
LBB0_15:
	ldr	w20, [x9]
	ldr	w21, [x8]
	orr	w8, w21, w20
	cbz	w8, LBB0_17
; %bb.16:
Lloh12:
	adrp	x22, _SDHCI_TEGRA_SDMEM_COMP_PADCTRL@GOTPAGE
Lloh13:
	ldr	x22, [x22, _SDHCI_TEGRA_SDMEM_COMP_PADCTRL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_sdhci_readl
Lloh14:
	adrp	x8, _SDHCI_COMP_PADCTRL_DRVUPDN_OFFSET_MASK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SDHCI_COMP_PADCTRL_DRVUPDN_OFFSET_MASK@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	bic	w8, w0, w8
	lsl	w9, w21, #20
	orr	w9, w9, w20, lsl #12
	orr	w1, w9, w8
	ldr	w2, [x22]
	mov	x0, x19
	bl	_sdhci_writel
LBB0_17:
	mov	w20, #0
LBB0_18:
	mov	x0, x20
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_MMC_SIGNAL_VOLTAGE_180,4,2     ; @MMC_SIGNAL_VOLTAGE_180
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed pads drvupdn, ret: %d\n"

	.comm	_SDHCI_TEGRA_SDMEM_COMP_PADCTRL,4,2 ; @SDHCI_TEGRA_SDMEM_COMP_PADCTRL
	.comm	_SDHCI_COMP_PADCTRL_DRVUPDN_OFFSET_MASK,4,2 ; @SDHCI_COMP_PADCTRL_DRVUPDN_OFFSET_MASK
l_.str.1:                               ; @.str.1
	.asciz	"setting 1.8V failed, ret: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"setting 3.3V failed, ret: %d\n"

	.no_dead_strip	_tegra_sdhci_set_padctrl
.subsections_via_symbols
