	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function armada8k_pcie_link_up
_armada8k_pcie_link_up:                 ## @armada8k_pcie_link_up
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	_PCIE_GLB_STS_RDLH_LINK_UP@GOTPCREL(%rip), %rax
	movq	_PCIE_GLB_STS_PHY_LINK_UP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%rax), %ebx
	movq	_PCIE_GLOBAL_STATUS_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_dw_pcie_readl_dbi
	movl	%eax, %edx
	notl	%edx
	movl	$1, %ecx
	testl	%edx, %ebx
	je	LBB0_2
## %bb.1:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_dbg
	xorl	%ecx, %ecx
LBB0_2:
	movl	%ecx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCIE_GLB_STS_RDLH_LINK_UP,4,2  ## @PCIE_GLB_STS_RDLH_LINK_UP
	.comm	_PCIE_GLB_STS_PHY_LINK_UP,4,2   ## @PCIE_GLB_STS_PHY_LINK_UP
	.comm	_PCIE_GLOBAL_STATUS_REG,4,2     ## @PCIE_GLOBAL_STATUS_REG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No link detected (Global-Status: 0x%08x).\n"

	.no_dead_strip	_armada8k_pcie_link_up
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function armada8k_pcie_link_up
_armada8k_pcie_link_up:                 ; @armada8k_pcie_link_up
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _PCIE_GLB_STS_RDLH_LINK_UP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCIE_GLB_STS_RDLH_LINK_UP@GOTPAGEOFF]
Lloh2:
	adrp	x9, _PCIE_GLB_STS_PHY_LINK_UP@GOTPAGE
Lloh3:
	ldr	x9, [x9, _PCIE_GLB_STS_PHY_LINK_UP@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	ldr	w9, [x9]
	orr	w20, w9, w8
Lloh6:
	adrp	x8, _PCIE_GLOBAL_STATUS_REG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PCIE_GLOBAL_STATUS_REG@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_dw_pcie_readl_dbi
	bics	wzr, w20, w0
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #1
	b	LBB0_3
LBB0_2:
	mov	x2, x0
	ldr	w0, [x19]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	mov	w0, #0
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_PCIE_GLB_STS_RDLH_LINK_UP,4,2  ; @PCIE_GLB_STS_RDLH_LINK_UP
	.comm	_PCIE_GLB_STS_PHY_LINK_UP,4,2   ; @PCIE_GLB_STS_PHY_LINK_UP
	.comm	_PCIE_GLOBAL_STATUS_REG,4,2     ; @PCIE_GLOBAL_STATUS_REG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No link detected (Global-Status: 0x%08x).\n"

	.no_dead_strip	_armada8k_pcie_link_up
.subsections_via_symbols
