	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_pcie_port_disable
_tegra_pcie_port_disable:               ## @tegra_pcie_port_disable
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_tegra_pcie_port_get_pex_ctrl
	movq	%rax, %r14
	movq	(%r15), %rdi
	movq	(%rdi), %rbx
	movq	%rax, %rsi
	callq	_afi_readl
	movq	_AFI_PEX_CTRL_RST@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	notq	%rsi
	andq	%rax, %rsi
	movq	(%r15), %rdi
	movq	%r14, %rdx
	callq	_afi_writel
	movq	(%r15), %rdi
	movq	%r14, %rsi
	callq	_afi_readl
	movq	_AFI_PEX_CTRL_CLKREQ_EN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	xorl	%edx, %edx
	cmpq	$1, (%rbx)
	sbbq	%rdx, %rdx
	notq	%rcx
	orq	%rcx, %rdx
	movq	_AFI_PEX_CTRL_REFCLK_EN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	notq	%rsi
	andq	%rax, %rsi
	andq	%rdx, %rsi
	movq	(%r15), %rdi
	movq	%r14, %rdx
	callq	_afi_writel
	movq	(%r15), %rdi
	movq	_AFI_PCIE_CONFIG@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	callq	_afi_readl
	movq	%rax, %r14
	movl	8(%r15), %edi
	callq	_AFI_PCIE_CONFIG_PCIE_DISABLE
	movq	%rax, %rbx
	movl	8(%r15), %edi
	callq	_AFI_PCIE_CONFIG_PCIE_CLKREQ_GPIO
	orq	%rax, %rbx
	orq	%r14, %rbx
	movq	(%r15), %rdi
	movq	(%r12), %rdx
	movq	%rbx, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_afi_writel                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AFI_PEX_CTRL_RST,8,3           ## @AFI_PEX_CTRL_RST
	.comm	_AFI_PEX_CTRL_CLKREQ_EN,8,3     ## @AFI_PEX_CTRL_CLKREQ_EN
	.comm	_AFI_PEX_CTRL_REFCLK_EN,8,3     ## @AFI_PEX_CTRL_REFCLK_EN
	.comm	_AFI_PCIE_CONFIG,8,3            ## @AFI_PCIE_CONFIG
	.no_dead_strip	_tegra_pcie_port_disable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_pcie_port_disable
_tegra_pcie_port_disable:               ; @tegra_pcie_port_disable
	.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
	bl	_tegra_pcie_port_get_pex_ctrl
	mov	x20, x0
	ldr	x0, [x19]
	ldr	x21, [x0]
	mov	x1, x20
	bl	_afi_readl
Lloh0:
	adrp	x8, _AFI_PEX_CTRL_RST@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AFI_PEX_CTRL_RST@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	bic	x1, x0, x8
	ldr	x0, [x19]
	mov	x2, x20
	bl	_afi_writel
	ldr	x0, [x19]
	mov	x1, x20
	bl	_afi_readl
	ldr	x8, [x21]
Lloh3:
	adrp	x9, _AFI_PEX_CTRL_CLKREQ_EN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AFI_PEX_CTRL_CLKREQ_EN@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, #0
	mov	x8, #-1
	csinv	x8, x8, x9, eq
	and	x8, x8, x0
Lloh6:
	adrp	x9, _AFI_PEX_CTRL_REFCLK_EN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _AFI_PEX_CTRL_REFCLK_EN@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	bic	x1, x8, x9
	ldr	x0, [x19]
	mov	x2, x20
	bl	_afi_writel
	ldr	x0, [x19]
Lloh9:
	adrp	x21, _AFI_PCIE_CONFIG@GOTPAGE
Lloh10:
	ldr	x21, [x21, _AFI_PCIE_CONFIG@GOTPAGEOFF]
	ldr	x1, [x21]
	bl	_afi_readl
	mov	x20, x0
	ldr	w0, [x19, #8]
	bl	_AFI_PCIE_CONFIG_PCIE_DISABLE
	orr	x20, x0, x20
	ldr	w0, [x19, #8]
	bl	_AFI_PCIE_CONFIG_PCIE_CLKREQ_GPIO
	orr	x1, x20, x0
	ldr	x0, [x19]
	ldr	x2, [x21]
	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	_afi_writel
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AFI_PEX_CTRL_RST,8,3           ; @AFI_PEX_CTRL_RST
	.comm	_AFI_PEX_CTRL_CLKREQ_EN,8,3     ; @AFI_PEX_CTRL_CLKREQ_EN
	.comm	_AFI_PEX_CTRL_REFCLK_EN,8,3     ; @AFI_PEX_CTRL_REFCLK_EN
	.comm	_AFI_PCIE_CONFIG,8,3            ; @AFI_PCIE_CONFIG
	.no_dead_strip	_tegra_pcie_port_disable
.subsections_via_symbols
