	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_sdhci_hs400_dll_cal
_tegra_sdhci_hs400_dll_cal:             ## @tegra_sdhci_hs400_dll_cal
	.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
	movq	%rdi, %r14
	movq	_SDHCI_TEGRA_VENDOR_DLLCAL_CFG@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_sdhci_readl
	movl	%eax, %ebx
	movq	_SDHCI_TEGRA_DLLCAL_CALIBRATE@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	(%r15), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_sdhci_writel
	movq	_SDHCI_TEGRA_VENDOR_DLLCAL_STA@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%r14), %rdi
	movq	_SDHCI_TEGRA_DLLCAL_STA_ACTIVE@GOTPCREL(%rip), %rax
	xorl	%edx, %edx
	movl	(%rax), %eax
	andl	%ebx, %eax
	sete	%dl
	movl	%ebx, %esi
	movl	$1000, %ecx                     ## imm = 0x3E8
	movl	$5000, %r8d                     ## imm = 0x1388
	callq	_readl_poll_timeout
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	(%r14), %edi
	callq	_mmc_dev
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
LBB0_1:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SDHCI_TEGRA_VENDOR_DLLCAL_CFG,4,2 ## @SDHCI_TEGRA_VENDOR_DLLCAL_CFG
	.comm	_SDHCI_TEGRA_DLLCAL_CALIBRATE,4,2 ## @SDHCI_TEGRA_DLLCAL_CALIBRATE
	.comm	_SDHCI_TEGRA_VENDOR_DLLCAL_STA,8,3 ## @SDHCI_TEGRA_VENDOR_DLLCAL_STA
	.comm	_SDHCI_TEGRA_DLLCAL_STA_ACTIVE,4,2 ## @SDHCI_TEGRA_DLLCAL_STA_ACTIVE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"HS400 delay line calibration timed out\n"

	.no_dead_strip	_tegra_sdhci_hs400_dll_cal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_sdhci_hs400_dll_cal
_tegra_sdhci_hs400_dll_cal:             ; @tegra_sdhci_hs400_dll_cal
	.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, x0
Lloh0:
	adrp	x21, _SDHCI_TEGRA_VENDOR_DLLCAL_CFG@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SDHCI_TEGRA_VENDOR_DLLCAL_CFG@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_sdhci_readl
Lloh2:
	adrp	x8, _SDHCI_TEGRA_DLLCAL_CALIBRATE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SDHCI_TEGRA_DLLCAL_CALIBRATE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	orr	w20, w8, w0
	ldr	w2, [x21]
	mov	x0, x19
	mov	x1, x20
	bl	_sdhci_writel
	ldr	x8, [x19, #8]
Lloh5:
	adrp	x9, _SDHCI_TEGRA_VENDOR_DLLCAL_STA@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SDHCI_TEGRA_VENDOR_DLLCAL_STA@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	add	x0, x9, x8
Lloh8:
	adrp	x8, _SDHCI_TEGRA_DLLCAL_STA_ACTIVE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SDHCI_TEGRA_DLLCAL_STA_ACTIVE@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	tst	w8, w20
	cset	w2, eq
	mov	x1, x20
	mov	w3, #1000
	mov	w4, #5000
	bl	_readl_poll_timeout
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x19]
	bl	_mmc_dev
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	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
	b	_dev_err
LBB0_2:
	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	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_SDHCI_TEGRA_VENDOR_DLLCAL_CFG,4,2 ; @SDHCI_TEGRA_VENDOR_DLLCAL_CFG
	.comm	_SDHCI_TEGRA_DLLCAL_CALIBRATE,4,2 ; @SDHCI_TEGRA_DLLCAL_CALIBRATE
	.comm	_SDHCI_TEGRA_VENDOR_DLLCAL_STA,8,3 ; @SDHCI_TEGRA_VENDOR_DLLCAL_STA
	.comm	_SDHCI_TEGRA_DLLCAL_STA_ACTIVE,4,2 ; @SDHCI_TEGRA_DLLCAL_STA_ACTIVE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"HS400 delay line calibration timed out\n"

	.no_dead_strip	_tegra_sdhci_hs400_dll_cal
.subsections_via_symbols
