	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_pcib_port_enable
_tegra_pcib_port_enable:                ## @tegra_pcib_port_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	8(%rdi), %rax
	movslq	%esi, %rcx
	movq	(%rax,%rcx,8), %r14
	movl	8(%r14), %esi
	callq	_AFI_RD4
	movq	_AFI_PEX_CTRL_RST_L@GOTPCREL(%rip), %r12
	movl	(%r12), %ebx
	notl	%ebx
	andl	%eax, %ebx
	movl	8(%r14), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_AFI_WR4
	movl	8(%r14), %esi
	movq	%r15, %rdi
	callq	_AFI_RD4
	movl	$10, %edi
	callq	_DELAY
	movq	_AFI_PEX_CTRL_REFCLK_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_AFI_PEX_CTRL_CLKREQ_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_AFI_PEX_CTRL_OVERRIDE_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	8(%r14), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_AFI_WR4
	movl	8(%r14), %esi
	movq	%r15, %rdi
	callq	_AFI_RD4
	movl	$100, %edi
	callq	_DELAY
	orl	(%r12), %ebx
	movl	8(%r14), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_AFI_WR4
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_tegra_pcib_wait_for_link
	movq	_bootverbose@GOTPCREL(%rip), %rcx
	cmpq	$0, (%rcx)
	je	LBB0_1
## %bb.2:
	movl	(%r15), %edi
	movl	(%r14), %ecx
	movl	4(%r14), %edx
	cmpl	$2, %ecx
	leaq	L_.str.1(%rip), %rsi
	leaq	L_.str.2(%rip), %r8
	cmovgeq	%rsi, %r8
	testl	%eax, %eax
	leaq	L_.str.3(%rip), %rax
	leaq	L_.str.4(%rip), %r9
	cmoveq	%rax, %r9
	leaq	L_.str(%rip), %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_device_printf                  ## TAILCALL
LBB0_1:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AFI_PEX_CTRL_RST_L,4,2         ## @AFI_PEX_CTRL_RST_L
	.comm	_AFI_PEX_CTRL_REFCLK_EN,4,2     ## @AFI_PEX_CTRL_REFCLK_EN
	.comm	_AFI_PEX_CTRL_CLKREQ_EN,4,2     ## @AFI_PEX_CTRL_CLKREQ_EN
	.comm	_AFI_PEX_CTRL_OVERRIDE_EN,4,2   ## @AFI_PEX_CTRL_OVERRIDE_EN
	.comm	_bootverbose,8,3                ## @bootverbose
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	" port %d (%d lane%s): Link is %s\n"

L_.str.1:                               ## @.str.1
	.asciz	"s"

L_.str.2:                               ## @.str.2
	.space	1

L_.str.3:                               ## @.str.3
	.asciz	"up"

L_.str.4:                               ## @.str.4
	.asciz	"down"

	.no_dead_strip	_tegra_pcib_port_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_pcib_port_enable
_tegra_pcib_port_enable:                ; @tegra_pcib_port_enable
	.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	x20, x0
	ldr	x8, [x0, #8]
	ldr	x19, [x8, w1, sxtw #3]
	ldr	w1, [x19, #8]
	bl	_AFI_RD4
Lloh0:
	adrp	x22, _AFI_PEX_CTRL_RST_L@GOTPAGE
Lloh1:
	ldr	x22, [x22, _AFI_PEX_CTRL_RST_L@GOTPAGEOFF]
	ldr	w8, [x22]
	bic	w21, w0, w8
	ldr	w1, [x19, #8]
	mov	x0, x20
	mov	x2, x21
	bl	_AFI_WR4
	ldr	w1, [x19, #8]
	mov	x0, x20
	bl	_AFI_RD4
	mov	w0, #10
	bl	_DELAY
Lloh2:
	adrp	x8, _AFI_PEX_CTRL_REFCLK_EN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AFI_PEX_CTRL_REFCLK_EN@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	orr	w8, w8, w21
Lloh5:
	adrp	x9, _AFI_PEX_CTRL_CLKREQ_EN@GOTPAGE
Lloh6:
	ldr	x9, [x9, _AFI_PEX_CTRL_CLKREQ_EN@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh8:
	adrp	x9, _AFI_PEX_CTRL_OVERRIDE_EN@GOTPAGE
Lloh9:
	ldr	x9, [x9, _AFI_PEX_CTRL_OVERRIDE_EN@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w21, w8, w9
	ldr	w1, [x19, #8]
	mov	x0, x20
	mov	x2, x21
	bl	_AFI_WR4
	ldr	w1, [x19, #8]
	mov	x0, x20
	bl	_AFI_RD4
	mov	w0, #100
	bl	_DELAY
	ldr	w8, [x22]
	orr	w2, w8, w21
	ldr	w1, [x19, #8]
	mov	x0, x20
	bl	_AFI_WR4
	mov	x0, x20
	mov	x1, x19
	bl	_tegra_pcib_wait_for_link
Lloh11:
	adrp	x8, _bootverbose@GOTPAGE
Lloh12:
	ldr	x8, [x8, _bootverbose@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w8, [x20]
	ldp	w3, w2, [x19]
Lloh14:
	adrp	x9, l_.str.2@PAGE
Lloh15:
	add	x9, x9, l_.str.2@PAGEOFF
Lloh16:
	adrp	x10, l_.str.1@PAGE
Lloh17:
	add	x10, x10, l_.str.1@PAGEOFF
	cmp	w3, #1
	csel	x4, x10, x9, gt
Lloh18:
	adrp	x9, l_.str.4@PAGE
Lloh19:
	add	x9, x9, l_.str.4@PAGEOFF
Lloh20:
	adrp	x10, l_.str.3@PAGE
Lloh21:
	add	x10, x10, l_.str.3@PAGEOFF
	cmp	w0, #0
	csel	x5, x10, x9, eq
Lloh22:
	adrp	x1, l_.str@PAGE
Lloh23:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x8
	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	_device_printf
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	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_AFI_PEX_CTRL_RST_L,4,2         ; @AFI_PEX_CTRL_RST_L
	.comm	_AFI_PEX_CTRL_REFCLK_EN,4,2     ; @AFI_PEX_CTRL_REFCLK_EN
	.comm	_AFI_PEX_CTRL_CLKREQ_EN,4,2     ; @AFI_PEX_CTRL_CLKREQ_EN
	.comm	_AFI_PEX_CTRL_OVERRIDE_EN,4,2   ; @AFI_PEX_CTRL_OVERRIDE_EN
	.comm	_bootverbose,8,3                ; @bootverbose
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	" port %d (%d lane%s): Link is %s\n"

l_.str.1:                               ; @.str.1
	.asciz	"s"

l_.str.2:                               ; @.str.2
	.space	1

l_.str.3:                               ; @.str.3
	.asciz	"up"

l_.str.4:                               ; @.str.4
	.asciz	"down"

	.no_dead_strip	_tegra_pcib_port_enable
.subsections_via_symbols
