	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xenon_emmc_phy_enable_dll
_xenon_emmc_phy_enable_dll:             ## @xenon_emmc_phy_enable_dll
	.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	%rdi, %r15
	callq	_sdhci_priv
	movq	%rax, %rdi
	callq	_sdhci_pltfm_priv
	movq	%rax, %r14
	movq	8(%rax), %rbx
	movq	(%r15), %rax
	movq	_MMC_HIGH_52_MAX_DTR@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setle	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_9
LBB0_3:
	movl	4(%rbx), %esi
	movq	%r15, %rdi
	callq	_sdhci_readl
	movq	_XENON_DLL_ENABLE@GOTPCREL(%rip), %r13
	xorl	%r12d, %r12d
	testl	%eax, (%r13)
	jne	LBB0_9
## %bb.4:
	movl	4(%rbx), %esi
	movq	%r15, %rdi
	callq	_sdhci_readl
	movq	_XENON_DLL_FAST_LOCK@GOTPCREL(%rip), %rcx
	orl	(%r13), %eax
	orl	(%rcx), %eax
	movq	_XENON_DLL_PHASE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	_XENON_DLL_PHSEL0_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %r8b
	movl	%edi, %esi
	movl	%r8d, %ecx
	shll	%cl, %esi
	movq	_XENON_DLL_PHSEL1_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %r9b
	movl	%r9d, %ecx
	shll	%cl, %edi
	orl	%esi, %edi
	notl	%edi
	movq	_XENON_DLL_PHASE_90_DEGREE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%esi, %edx
	movl	%r8d, %ecx
	shll	%cl, %edx
	andl	%eax, %edi
	movl	%r9d, %ecx
	shll	%cl, %esi
	orl	%edx, %esi
	orl	%edi, %esi
	movq	_XENON_DLL_BYPASS_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%esi, %eax
	orl	(%rbx), %eax
	movq	(%r14), %rcx
	movq	_EMMC_5_1_PHY@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	movq	_XENON_DLL_REFCLK_SEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	movl	$-1, %esi
	cmovel	%ecx, %esi
	andl	%eax, %esi
	movl	4(%rbx), %edx
	movq	%r15, %rdi
	callq	_sdhci_writel
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%eax, %edi
	movl	$32, %esi
	callq	_ktime_add_ms
	movl	%eax, %r14d
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%eax, %edi
	movl	%r14d, %esi
	callq	_ktime_after
	movl	%eax, %ebx
	movq	_XENON_SLOT_EXT_PRESENT_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_sdhci_readw
	movq	_XENON_DLL_LOCK_STATE@GOTPCREL(%rip), %r13
	testl	%eax, (%r13)
	jne	LBB0_9
## %bb.5:
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	testl	%ebx, %ebx
	jne	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	$100, %edi
	callq	_udelay
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%eax, %edi
	movl	%r14d, %esi
	callq	_ktime_after
	movl	%eax, %ebx
	movq	_XENON_SLOT_EXT_PRESENT_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_sdhci_readw
	testl	%eax, (%r13)
	je	LBB0_6
LBB0_9:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	8(%r15), %edi
	callq	_mmc_dev
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_MMC_HIGH_52_MAX_DTR,8,3        ## @MMC_HIGH_52_MAX_DTR
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_XENON_DLL_ENABLE,4,2           ## @XENON_DLL_ENABLE
	.comm	_XENON_DLL_FAST_LOCK,4,2        ## @XENON_DLL_FAST_LOCK
	.comm	_XENON_DLL_PHASE_MASK,4,2       ## @XENON_DLL_PHASE_MASK
	.comm	_XENON_DLL_PHSEL0_SHIFT,4,2     ## @XENON_DLL_PHSEL0_SHIFT
	.comm	_XENON_DLL_PHSEL1_SHIFT,4,2     ## @XENON_DLL_PHSEL1_SHIFT
	.comm	_XENON_DLL_PHASE_90_DEGREE,4,2  ## @XENON_DLL_PHASE_90_DEGREE
	.comm	_XENON_DLL_BYPASS_EN,4,2        ## @XENON_DLL_BYPASS_EN
	.comm	_EMMC_5_1_PHY,8,3               ## @EMMC_5_1_PHY
	.comm	_XENON_DLL_REFCLK_SEL,4,2       ## @XENON_DLL_REFCLK_SEL
	.comm	_XENON_SLOT_EXT_PRESENT_STATE,4,2 ## @XENON_SLOT_EXT_PRESENT_STATE
	.comm	_XENON_DLL_LOCK_STATE,4,2       ## @XENON_DLL_LOCK_STATE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Wait for DLL Lock time-out\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_xenon_emmc_phy_enable_dll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xenon_emmc_phy_enable_dll
_xenon_emmc_phy_enable_dll:             ; @xenon_emmc_phy_enable_dll
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	bl	_sdhci_priv
	bl	_sdhci_pltfm_priv
	mov	x20, x0
	ldr	x21, [x0, #8]
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _MMC_HIGH_52_MAX_DTR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MMC_HIGH_52_MAX_DTR@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, le
	bl	_WARN_ON
	cbz	x0, LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_3:
	ldr	w1, [x21, #4]
	mov	x0, x19
	bl	_sdhci_readl
Lloh5:
	adrp	x22, _XENON_DLL_ENABLE@GOTPAGE
Lloh6:
	ldr	x22, [x22, _XENON_DLL_ENABLE@GOTPAGEOFF]
	ldr	w8, [x22]
	tst	w8, w0
	b.ne	LBB0_5
; %bb.4:
	ldr	w1, [x21, #4]
	mov	x0, x19
	bl	_sdhci_readl
Lloh7:
	adrp	x8, _XENON_DLL_FAST_LOCK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _XENON_DLL_FAST_LOCK@GOTPAGEOFF]
	ldr	w9, [x22]
Lloh9:
	ldr	w8, [x8]
	orr	w9, w9, w0
	orr	w8, w9, w8
Lloh10:
	adrp	x9, _XENON_DLL_PHASE_MASK@GOTPAGE
Lloh11:
	ldr	x9, [x9, _XENON_DLL_PHASE_MASK@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
Lloh13:
	adrp	x10, _XENON_DLL_PHSEL0_SHIFT@GOTPAGE
Lloh14:
	ldr	x10, [x10, _XENON_DLL_PHSEL0_SHIFT@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
Lloh16:
	adrp	x11, _XENON_DLL_PHSEL1_SHIFT@GOTPAGE
Lloh17:
	ldr	x11, [x11, _XENON_DLL_PHSEL1_SHIFT@GOTPAGEOFF]
	lsl	w12, w9, w10
Lloh18:
	ldr	w11, [x11]
	lsl	w9, w9, w11
	orr	w9, w9, w12
Lloh19:
	adrp	x12, _XENON_DLL_PHASE_90_DEGREE@GOTPAGE
Lloh20:
	ldr	x12, [x12, _XENON_DLL_PHASE_90_DEGREE@GOTPAGEOFF]
	bic	w8, w8, w9
Lloh21:
	ldr	w9, [x12]
	lsl	w10, w9, w10
	lsl	w9, w9, w11
	orr	w9, w10, w9
	orr	w8, w9, w8
Lloh22:
	adrp	x9, _XENON_DLL_BYPASS_EN@GOTPAGE
Lloh23:
	ldr	x9, [x9, _XENON_DLL_BYPASS_EN@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	bic	w8, w8, w9
	ldp	w9, w2, [x21]
	orr	w8, w8, w9
	ldr	x9, [x20]
Lloh25:
	adrp	x10, _EMMC_5_1_PHY@GOTPAGE
Lloh26:
	ldr	x10, [x10, _EMMC_5_1_PHY@GOTPAGEOFF]
Lloh27:
	adrp	x11, _XENON_DLL_REFCLK_SEL@GOTPAGE
Lloh28:
	ldr	x11, [x11, _XENON_DLL_REFCLK_SEL@GOTPAGEOFF]
Lloh29:
	ldr	x10, [x10]
Lloh30:
	ldr	w11, [x11]
	cmp	x9, x10
	mov	w9, #-1
	csinv	w9, w9, w11, ne
	and	w1, w9, w8
	mov	x0, x19
	bl	_sdhci_writel
	bl	_ktime_get
	mov	w1, #32
	bl	_ktime_add_ms
	mov	x20, x0
	bl	_ktime_get
	mov	x1, x20
	bl	_ktime_after
	mov	x21, x0
Lloh31:
	adrp	x22, _XENON_SLOT_EXT_PRESENT_STATE@GOTPAGE
Lloh32:
	ldr	x22, [x22, _XENON_SLOT_EXT_PRESENT_STATE@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_sdhci_readw
Lloh33:
	adrp	x23, _XENON_DLL_LOCK_STATE@GOTPAGE
Lloh34:
	ldr	x23, [x23, _XENON_DLL_LOCK_STATE@GOTPAGEOFF]
	ldr	w8, [x23]
	tst	w8, w0
	b.eq	LBB0_8
LBB0_5:
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	mov	w0, #100
	bl	_udelay
	bl	_ktime_get
	mov	x1, x20
	bl	_ktime_after
	mov	x21, x0
	ldr	w1, [x22]
	mov	x0, x19
	bl	_sdhci_readw
	mov	x8, x0
	mov	w0, #0
	ldr	w9, [x23]
	tst	w9, w8
	b.ne	LBB0_6
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	cbz	w21, LBB0_7
; %bb.9:
	ldr	w0, [x19, #8]
	bl	_mmc_dev
Lloh35:
	adrp	x1, l_.str@PAGE
Lloh36:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh37:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh38:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh29
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpAdd	Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_MMC_HIGH_52_MAX_DTR,8,3        ; @MMC_HIGH_52_MAX_DTR
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_XENON_DLL_ENABLE,4,2           ; @XENON_DLL_ENABLE
	.comm	_XENON_DLL_FAST_LOCK,4,2        ; @XENON_DLL_FAST_LOCK
	.comm	_XENON_DLL_PHASE_MASK,4,2       ; @XENON_DLL_PHASE_MASK
	.comm	_XENON_DLL_PHSEL0_SHIFT,4,2     ; @XENON_DLL_PHSEL0_SHIFT
	.comm	_XENON_DLL_PHSEL1_SHIFT,4,2     ; @XENON_DLL_PHSEL1_SHIFT
	.comm	_XENON_DLL_PHASE_90_DEGREE,4,2  ; @XENON_DLL_PHASE_90_DEGREE
	.comm	_XENON_DLL_BYPASS_EN,4,2        ; @XENON_DLL_BYPASS_EN
	.comm	_EMMC_5_1_PHY,8,3               ; @EMMC_5_1_PHY
	.comm	_XENON_DLL_REFCLK_SEL,4,2       ; @XENON_DLL_REFCLK_SEL
	.comm	_XENON_SLOT_EXT_PRESENT_STATE,4,2 ; @XENON_SLOT_EXT_PRESENT_STATE
	.comm	_XENON_DLL_LOCK_STATE,4,2       ; @XENON_DLL_LOCK_STATE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Wait for DLL Lock time-out\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_xenon_emmc_phy_enable_dll
.subsections_via_symbols
