	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_pcie_dw_pme_turnoff
_tegra_pcie_dw_pme_turnoff:             ## @tegra_pcie_dw_pme_turnoff
	.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
	addq	$16, %rdi
	callq	_tegra_pcie_dw_link_up
	testl	%eax, %eax
	je	LBB0_6
## %bb.1:
	movq	%r14, %rdi
	callq	_tegra_pcie_try_link_l2
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_info
	movq	_APPL_PINMUX@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_appl_readl
	movq	_APPL_PINMUX_PEX_RST@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	notl	%ebx
	andl	%eax, %ebx
	movl	(%r15), %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_appl_writel
	movq	_APPL_DEBUG@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%r14), %rdi
	movq	_APPL_DEBUG_LTSSM_STATE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%ebx, %eax
	movq	_APPL_DEBUG_LTSSM_STATE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	movq	_LTSSM_STATE_PRE_DETECT@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpl	(%rcx), %eax
	sete	%dl
	movq	_LTSSM_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	%ebx, %esi
	movl	$1, %ecx
	callq	_readl_poll_timeout_atomic
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_info
	jmp	LBB0_5
LBB0_6:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_dbg                        ## TAILCALL
LBB0_4:
	movq	_APPL_CTRL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_appl_readl
	movq	_APPL_CTRL_LTSSM_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movl	(%rbx), %edx
	movq	%r14, %rdi
	callq	_appl_writel
LBB0_5:
	movq	_APPL_PINMUX@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_appl_readl
	movq	_APPL_PINMUX_CLKREQ_OVERRIDE_EN@GOTPCREL(%rip), %rcx
	movq	_APPL_PINMUX_CLKREQ_OVERRIDE@GOTPCREL(%rip), %rdx
	orl	(%rcx), %eax
	orl	(%rdx), %eax
	movq	_APPL_PINMUX_CLK_OUTPUT_IN_OVERRIDE_EN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_APPL_PINMUX_CLK_OUTPUT_IN_OVERRIDE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movl	(%rbx), %edx
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_appl_writel                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PCIe link is not up...!\n"

L_.str.1:                               ## @.str.1
	.asciz	"Link didn't transition to L2 state\n"

	.comm	_APPL_PINMUX,4,2                ## @APPL_PINMUX
	.comm	_APPL_PINMUX_PEX_RST,4,2        ## @APPL_PINMUX_PEX_RST
	.comm	_APPL_DEBUG,8,3                 ## @APPL_DEBUG
	.comm	_APPL_DEBUG_LTSSM_STATE_MASK,4,2 ## @APPL_DEBUG_LTSSM_STATE_MASK
	.comm	_APPL_DEBUG_LTSSM_STATE_SHIFT,4,2 ## @APPL_DEBUG_LTSSM_STATE_SHIFT
	.comm	_LTSSM_STATE_PRE_DETECT,4,2     ## @LTSSM_STATE_PRE_DETECT
	.comm	_LTSSM_TIMEOUT,4,2              ## @LTSSM_TIMEOUT
L_.str.2:                               ## @.str.2
	.asciz	"Link didn't go to detect state\n"

	.comm	_APPL_CTRL,4,2                  ## @APPL_CTRL
	.comm	_APPL_CTRL_LTSSM_EN,4,2         ## @APPL_CTRL_LTSSM_EN
	.comm	_APPL_PINMUX_CLKREQ_OVERRIDE_EN,4,2 ## @APPL_PINMUX_CLKREQ_OVERRIDE_EN
	.comm	_APPL_PINMUX_CLKREQ_OVERRIDE,4,2 ## @APPL_PINMUX_CLKREQ_OVERRIDE
	.comm	_APPL_PINMUX_CLK_OUTPUT_IN_OVERRIDE_EN,4,2 ## @APPL_PINMUX_CLK_OUTPUT_IN_OVERRIDE_EN
	.comm	_APPL_PINMUX_CLK_OUTPUT_IN_OVERRIDE,4,2 ## @APPL_PINMUX_CLK_OUTPUT_IN_OVERRIDE
	.no_dead_strip	_tegra_pcie_dw_pme_turnoff
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_pcie_dw_pme_turnoff
_tegra_pcie_dw_pme_turnoff:             ; @tegra_pcie_dw_pme_turnoff
	.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
	add	x0, x0, #16
	bl	_tegra_pcie_dw_link_up
	cbz	w0, LBB0_4
; %bb.1:
	mov	x0, x19
	bl	_tegra_pcie_try_link_l2
Lloh0:
	adrp	x21, _APPL_PINMUX@GOTPAGE
Lloh1:
	ldr	x21, [x21, _APPL_PINMUX@GOTPAGEOFF]
	cbz	x0, LBB0_6
; %bb.2:
	ldr	w0, [x19]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_info
	ldr	w1, [x21]
	mov	x0, x19
	bl	_appl_readl
Lloh4:
	adrp	x8, _APPL_PINMUX_PEX_RST@GOTPAGE
Lloh5:
	ldr	x8, [x8, _APPL_PINMUX_PEX_RST@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	bic	w20, w0, w8
	ldr	w2, [x21]
	mov	x0, x19
	mov	x1, x20
	bl	_appl_writel
	ldr	x8, [x19, #8]
Lloh7:
	adrp	x9, _APPL_DEBUG@GOTPAGE
Lloh8:
	ldr	x9, [x9, _APPL_DEBUG@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	add	x0, x9, x8
Lloh10:
	adrp	x8, _APPL_DEBUG_LTSSM_STATE_MASK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _APPL_DEBUG_LTSSM_STATE_MASK@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	and	w8, w8, w20
Lloh13:
	adrp	x9, _APPL_DEBUG_LTSSM_STATE_SHIFT@GOTPAGE
Lloh14:
	ldr	x9, [x9, _APPL_DEBUG_LTSSM_STATE_SHIFT@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	asr	w8, w8, w9
Lloh16:
	adrp	x9, _LTSSM_STATE_PRE_DETECT@GOTPAGE
Lloh17:
	ldr	x9, [x9, _LTSSM_STATE_PRE_DETECT@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	cmp	w8, w9
	cset	w2, eq
Lloh19:
	adrp	x8, _LTSSM_TIMEOUT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _LTSSM_TIMEOUT@GOTPAGEOFF]
Lloh21:
	ldr	w4, [x8]
	mov	x1, x20
	mov	w3, #1
	bl	_readl_poll_timeout_atomic
	cbz	w0, LBB0_5
; %bb.3:
	ldr	w0, [x19]
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_info
	b	LBB0_6
LBB0_4:
	ldr	w0, [x19]
Lloh24:
	adrp	x1, l_.str@PAGE
Lloh25:
	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_dbg
LBB0_5:
Lloh26:
	adrp	x20, _APPL_CTRL@GOTPAGE
Lloh27:
	ldr	x20, [x20, _APPL_CTRL@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_appl_readl
Lloh28:
	adrp	x8, _APPL_CTRL_LTSSM_EN@GOTPAGE
Lloh29:
	ldr	x8, [x8, _APPL_CTRL_LTSSM_EN@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	bic	w1, w0, w8
	ldr	w2, [x20]
	mov	x0, x19
	bl	_appl_writel
LBB0_6:
	ldr	w1, [x21]
	mov	x0, x19
	bl	_appl_readl
Lloh31:
	adrp	x8, _APPL_PINMUX_CLKREQ_OVERRIDE_EN@GOTPAGE
Lloh32:
	ldr	x8, [x8, _APPL_PINMUX_CLKREQ_OVERRIDE_EN@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
Lloh34:
	adrp	x9, _APPL_PINMUX_CLKREQ_OVERRIDE@GOTPAGE
Lloh35:
	ldr	x9, [x9, _APPL_PINMUX_CLKREQ_OVERRIDE@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
Lloh37:
	adrp	x10, _APPL_PINMUX_CLK_OUTPUT_IN_OVERRIDE_EN@GOTPAGE
Lloh38:
	ldr	x10, [x10, _APPL_PINMUX_CLK_OUTPUT_IN_OVERRIDE_EN@GOTPAGEOFF]
Lloh39:
	ldr	w10, [x10]
	orr	w8, w8, w0
	orr	w8, w8, w9
	orr	w8, w8, w10
Lloh40:
	adrp	x9, _APPL_PINMUX_CLK_OUTPUT_IN_OVERRIDE@GOTPAGE
Lloh41:
	ldr	x9, [x9, _APPL_PINMUX_CLK_OUTPUT_IN_OVERRIDE@GOTPAGEOFF]
Lloh42:
	ldr	w9, [x9]
	bic	w1, w8, w9
	ldr	w2, [x21]
	mov	x0, x19
	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	_appl_writel
	.loh AdrpLdrGot	Lloh0, Lloh1
	.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 AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PCIe link is not up...!\n"

l_.str.1:                               ; @.str.1
	.asciz	"Link didn't transition to L2 state\n"

	.comm	_APPL_PINMUX,4,2                ; @APPL_PINMUX
	.comm	_APPL_PINMUX_PEX_RST,4,2        ; @APPL_PINMUX_PEX_RST
	.comm	_APPL_DEBUG,8,3                 ; @APPL_DEBUG
	.comm	_APPL_DEBUG_LTSSM_STATE_MASK,4,2 ; @APPL_DEBUG_LTSSM_STATE_MASK
	.comm	_APPL_DEBUG_LTSSM_STATE_SHIFT,4,2 ; @APPL_DEBUG_LTSSM_STATE_SHIFT
	.comm	_LTSSM_STATE_PRE_DETECT,4,2     ; @LTSSM_STATE_PRE_DETECT
	.comm	_LTSSM_TIMEOUT,4,2              ; @LTSSM_TIMEOUT
l_.str.2:                               ; @.str.2
	.asciz	"Link didn't go to detect state\n"

	.comm	_APPL_CTRL,4,2                  ; @APPL_CTRL
	.comm	_APPL_CTRL_LTSSM_EN,4,2         ; @APPL_CTRL_LTSSM_EN
	.comm	_APPL_PINMUX_CLKREQ_OVERRIDE_EN,4,2 ; @APPL_PINMUX_CLKREQ_OVERRIDE_EN
	.comm	_APPL_PINMUX_CLKREQ_OVERRIDE,4,2 ; @APPL_PINMUX_CLKREQ_OVERRIDE
	.comm	_APPL_PINMUX_CLK_OUTPUT_IN_OVERRIDE_EN,4,2 ; @APPL_PINMUX_CLK_OUTPUT_IN_OVERRIDE_EN
	.comm	_APPL_PINMUX_CLK_OUTPUT_IN_OVERRIDE,4,2 ; @APPL_PINMUX_CLK_OUTPUT_IN_OVERRIDE
	.no_dead_strip	_tegra_pcie_dw_pme_turnoff
.subsections_via_symbols
