	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_pcie_phy_enable
_tegra_pcie_phy_enable:                 ## @tegra_pcie_phy_enable
	.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, %rbx
	movq	(%rdi), %r12
	movq	8(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_PADS_CTL_SEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_pads_writel
	movq	_PADS_CTL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_pads_readl
	movq	_PADS_CTL_IDDQ_1L@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r13), %edx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_pads_writel
	movl	4(%r12), %esi
	movq	%rbx, %rdi
	callq	_pads_readl
	movq	_PADS_PLL_CTL_REFCLK_MASK@GOTPCREL(%rip), %rcx
	movq	_PADS_PLL_CTL_TXCLKREF_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
	orl	(%rcx), %edi
	notl	%edi
	andl	%eax, %edi
	movq	_PADS_PLL_CTL_REFCLK_INTERNAL_CML@GOTPCREL(%rip), %rax
	movl	(%r12), %esi
	movl	4(%r12), %edx
	orl	(%rax), %esi
	orl	%edi, %esi
	movq	%rbx, %rdi
	callq	_pads_writel
	movl	4(%r12), %esi
	movq	%rbx, %rdi
	callq	_pads_readl
	movq	_PADS_PLL_CTL_RST_B4SM@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	notl	%esi
	andl	%eax, %esi
	movl	4(%r12), %edx
	movq	%rbx, %rdi
	callq	_pads_writel
	movl	$20, %edi
	movl	$100, %esi
	callq	_usleep_range
	movl	4(%r12), %esi
	movq	%rbx, %rdi
	callq	_pads_readl
	orl	(%r15), %eax
	movl	4(%r12), %edx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_pads_writel
	movq	%rbx, %rdi
	movl	$500, %esi                      ## imm = 0x1F4
	callq	_tegra_pcie_pll_wait
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_pads_readl
	movq	_PADS_CTL_IDDQ_1L@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movl	(%r13), %edx
	movq	%rbx, %rdi
	callq	_pads_writel
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_pads_readl
	movq	_PADS_CTL_TX_DATA_EN_1L@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_PADS_CTL_RX_DATA_EN_1L@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r13), %edx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_pads_writel
	jmp	LBB0_3
LBB0_1:
	movl	%eax, %r12d
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %edx
	callq	_dev_err
	movl	%r12d, %r14d
LBB0_3:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PADS_CTL_SEL,4,2               ## @PADS_CTL_SEL
	.comm	_PADS_CTL,4,2                   ## @PADS_CTL
	.comm	_PADS_CTL_IDDQ_1L,4,2           ## @PADS_CTL_IDDQ_1L
	.comm	_PADS_PLL_CTL_REFCLK_MASK,4,2   ## @PADS_PLL_CTL_REFCLK_MASK
	.comm	_PADS_PLL_CTL_TXCLKREF_MASK,4,2 ## @PADS_PLL_CTL_TXCLKREF_MASK
	.comm	_PADS_PLL_CTL_REFCLK_INTERNAL_CML,4,2 ## @PADS_PLL_CTL_REFCLK_INTERNAL_CML
	.comm	_PADS_PLL_CTL_RST_B4SM,4,2      ## @PADS_PLL_CTL_RST_B4SM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PLL failed to lock: %d\n"

	.comm	_PADS_CTL_TX_DATA_EN_1L,4,2     ## @PADS_CTL_TX_DATA_EN_1L
	.comm	_PADS_CTL_RX_DATA_EN_1L,4,2     ## @PADS_CTL_RX_DATA_EN_1L
	.no_dead_strip	_tegra_pcie_phy_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_pcie_phy_enable
_tegra_pcie_phy_enable:                 ; @tegra_pcie_phy_enable
	.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
	ldp	x21, x20, [x0]
Lloh0:
	adrp	x8, _PADS_CTL_SEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PADS_CTL_SEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_pads_writel
Lloh3:
	adrp	x22, _PADS_CTL@GOTPAGE
Lloh4:
	ldr	x22, [x22, _PADS_CTL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_pads_readl
Lloh5:
	adrp	x23, _PADS_CTL_IDDQ_1L@GOTPAGE
Lloh6:
	ldr	x23, [x23, _PADS_CTL_IDDQ_1L@GOTPAGEOFF]
	ldr	w8, [x23]
	orr	w1, w8, w0
	ldr	w2, [x22]
	mov	x0, x19
	bl	_pads_writel
	ldr	w1, [x21, #4]
	mov	x0, x19
	bl	_pads_readl
Lloh7:
	adrp	x8, _PADS_PLL_CTL_REFCLK_MASK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PADS_PLL_CTL_REFCLK_MASK@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _PADS_PLL_CTL_TXCLKREF_MASK@GOTPAGE
Lloh11:
	ldr	x9, [x9, _PADS_PLL_CTL_TXCLKREF_MASK@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh13:
	adrp	x9, _PADS_PLL_CTL_REFCLK_INTERNAL_CML@GOTPAGE
Lloh14:
	ldr	x9, [x9, _PADS_PLL_CTL_REFCLK_INTERNAL_CML@GOTPAGEOFF]
	bic	w8, w0, w8
Lloh15:
	ldr	w9, [x9]
	ldp	w10, w2, [x21]
	orr	w9, w10, w9
	orr	w1, w9, w8
	mov	x0, x19
	bl	_pads_writel
	ldr	w1, [x21, #4]
	mov	x0, x19
	bl	_pads_readl
Lloh16:
	adrp	x24, _PADS_PLL_CTL_RST_B4SM@GOTPAGE
Lloh17:
	ldr	x24, [x24, _PADS_PLL_CTL_RST_B4SM@GOTPAGEOFF]
	ldr	w8, [x24]
	bic	w1, w0, w8
	ldr	w2, [x21, #4]
	mov	x0, x19
	bl	_pads_writel
	mov	w0, #20
	mov	w1, #100
	bl	_usleep_range
	ldr	w1, [x21, #4]
	mov	x0, x19
	bl	_pads_readl
	ldr	w8, [x24]
	orr	w1, w8, w0
	ldr	w2, [x21, #4]
	mov	x0, x19
	bl	_pads_writel
	mov	x0, x19
	mov	w1, #500
	bl	_tegra_pcie_pll_wait
	tbnz	w0, #31, LBB0_2
; %bb.1:
	ldr	w1, [x22]
	mov	x0, x19
	bl	_pads_readl
	ldr	w8, [x23]
	bic	w1, w0, w8
	ldr	w2, [x22]
	mov	x0, x19
	bl	_pads_writel
	ldr	w1, [x22]
	mov	x0, x19
	bl	_pads_readl
Lloh18:
	adrp	x8, _PADS_CTL_TX_DATA_EN_1L@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PADS_CTL_TX_DATA_EN_1L@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _PADS_CTL_RX_DATA_EN_1L@GOTPAGE
Lloh22:
	ldr	x9, [x9, _PADS_CTL_RX_DATA_EN_1L@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w8, w8, w0
	orr	w1, w8, w9
	ldr	w2, [x22]
	mov	x0, x19
	bl	_pads_writel
	mov	w21, #0
	b	LBB0_3
LBB0_2:
	mov	x21, x0
Lloh24:
	adrp	x1, l_.str@PAGE
Lloh25:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_dev_err
LBB0_3:
	mov	x0, x21
	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
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_PADS_CTL_SEL,4,2               ; @PADS_CTL_SEL
	.comm	_PADS_CTL,4,2                   ; @PADS_CTL
	.comm	_PADS_CTL_IDDQ_1L,4,2           ; @PADS_CTL_IDDQ_1L
	.comm	_PADS_PLL_CTL_REFCLK_MASK,4,2   ; @PADS_PLL_CTL_REFCLK_MASK
	.comm	_PADS_PLL_CTL_TXCLKREF_MASK,4,2 ; @PADS_PLL_CTL_TXCLKREF_MASK
	.comm	_PADS_PLL_CTL_REFCLK_INTERNAL_CML,4,2 ; @PADS_PLL_CTL_REFCLK_INTERNAL_CML
	.comm	_PADS_PLL_CTL_RST_B4SM,4,2      ; @PADS_PLL_CTL_RST_B4SM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PLL failed to lock: %d\n"

	.comm	_PADS_CTL_TX_DATA_EN_1L,4,2     ; @PADS_CTL_TX_DATA_EN_1L
	.comm	_PADS_CTL_RX_DATA_EN_1L,4,2     ; @PADS_CTL_RX_DATA_EN_1L
	.no_dead_strip	_tegra_pcie_phy_enable
.subsections_via_symbols
