	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ls1021_pcie_link_up
_ls1021_pcie_link_up:                   ## @ls1021_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	callq	_to_ls_pcie
	movl	4(%rax), %ebx
	testl	%ebx, %ebx
	je	LBB0_1
## %bb.2:
	movl	(%rax), %edi
	callq	_SCFG_PEXMSCPORTSR
	leaq	-12(%rbp), %rdx
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_regmap_read
	movl	-12(%rbp), %edx
	movq	_LTSSM_STATE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %edx
	movq	_LTSSM_STATE_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %edx
	movq	_LTSSM_PCIE_L0@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	cmpl	(%rcx), %edx
	setge	%al
	jmp	LBB0_3
LBB0_1:
	xorl	%eax, %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LTSSM_STATE_SHIFT,4,2          ## @LTSSM_STATE_SHIFT
	.comm	_LTSSM_STATE_MASK,4,2           ## @LTSSM_STATE_MASK
	.comm	_LTSSM_PCIE_L0,4,2              ## @LTSSM_PCIE_L0
	.no_dead_strip	_ls1021_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 ls1021_pcie_link_up
_ls1021_pcie_link_up:                   ; @ls1021_pcie_link_up
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	bl	_to_ls_pcie
	ldr	w19, [x0, #4]
	cbz	w19, LBB0_2
; %bb.1:
	ldr	w0, [x0]
	bl	_SCFG_PEXMSCPORTSR
	mov	x1, x0
	add	x2, sp, #12
	mov	x0, x19
	bl	_regmap_read
Lloh0:
	adrp	x8, _LTSSM_STATE_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LTSSM_STATE_SHIFT@GOTPAGEOFF]
	ldr	w9, [sp, #12]
Lloh2:
	ldr	w8, [x8]
	asr	w8, w9, w8
Lloh3:
	adrp	x9, _LTSSM_STATE_MASK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _LTSSM_STATE_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w8, w8, w9
Lloh6:
	adrp	x9, _LTSSM_PCIE_L0@GOTPAGE
Lloh7:
	ldr	x9, [x9, _LTSSM_PCIE_L0@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w8, w9
	cset	w0, ge
	b	LBB0_3
LBB0_2:
	mov	w0, #0
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_LTSSM_STATE_SHIFT,4,2          ; @LTSSM_STATE_SHIFT
	.comm	_LTSSM_STATE_MASK,4,2           ; @LTSSM_STATE_MASK
	.comm	_LTSSM_PCIE_L0,4,2              ; @LTSSM_PCIE_L0
	.no_dead_strip	_ls1021_pcie_link_up
.subsections_via_symbols
