	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pcie_retrain_link
_pcie_retrain_link:                     ## @pcie_retrain_link
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r15
	movq	_PCI_EXP_LNKCTL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	callq	_pcie_capability_read_word
	movq	_PCI_EXP_LNKCTL_RL@GOTPCREL(%rip), %r14
	movl	-44(%rbp), %edx
	orl	(%r14), %edx
	movl	%edx, -44(%rbp)
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_pcie_capability_write_word
	cmpq	$0, (%r15)
	je	LBB0_2
## %bb.1:
	movl	(%r14), %edx
	notl	%edx
	andl	-44(%rbp), %edx
	movl	%edx, -44(%rbp)
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_pcie_capability_write_word
LBB0_2:
	movq	_jiffies@GOTPCREL(%rip), %rcx
	movq	_LINK_RETRAIN_TIMEOUT@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	addq	(%rcx), %rbx
	movq	_PCI_EXP_LNKSTA@GOTPCREL(%rip), %r14
	leaq	-44(%rbp), %r12
	movq	_PCI_EXP_LNKSTA_LT@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %esi
	movq	%r15, %rdi
	movq	%r12, %rdx
	callq	_pcie_capability_read_word
	movl	(%r13), %eax
	testl	%eax, -44(%rbp)
	je	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, %edi
	callq	_msleep
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%rbx, %rsi
	callq	_time_before
	testq	%rax, %rax
	jne	LBB0_3
## %bb.6:
	movl	(%r13), %ecx
	xorl	%eax, %eax
	testl	%ecx, -44(%rbp)
	sete	%al
	jmp	LBB0_7
LBB0_4:
	movl	$1, %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_EXP_LNKCTL,4,2             ## @PCI_EXP_LNKCTL
	.comm	_PCI_EXP_LNKCTL_RL,4,2          ## @PCI_EXP_LNKCTL_RL
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_LINK_RETRAIN_TIMEOUT,8,3       ## @LINK_RETRAIN_TIMEOUT
	.comm	_PCI_EXP_LNKSTA,4,2             ## @PCI_EXP_LNKSTA
	.comm	_PCI_EXP_LNKSTA_LT,4,2          ## @PCI_EXP_LNKSTA_LT
	.no_dead_strip	_pcie_retrain_link
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pcie_retrain_link
_pcie_retrain_link:                     ; @pcie_retrain_link
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldr	x19, [x0]
Lloh0:
	adrp	x20, _PCI_EXP_LNKCTL@GOTPAGE
Lloh1:
	ldr	x20, [x20, _PCI_EXP_LNKCTL@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, sp, #12
	mov	x0, x19
	bl	_pcie_capability_read_word
Lloh2:
	adrp	x21, _PCI_EXP_LNKCTL_RL@GOTPAGE
Lloh3:
	ldr	x21, [x21, _PCI_EXP_LNKCTL_RL@GOTPAGEOFF]
	ldr	w8, [x21]
	ldr	w9, [sp, #12]
	orr	w2, w9, w8
	str	w2, [sp, #12]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_pcie_capability_write_word
	ldr	x8, [x19]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	w8, [x21]
	ldr	w9, [sp, #12]
	bic	w2, w9, w8
	str	w2, [sp, #12]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_pcie_capability_write_word
LBB0_2:
Lloh4:
	adrp	x21, _jiffies@GOTPAGE
Lloh5:
	ldr	x21, [x21, _jiffies@GOTPAGEOFF]
	ldr	x8, [x21]
Lloh6:
	adrp	x9, _LINK_RETRAIN_TIMEOUT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _LINK_RETRAIN_TIMEOUT@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x20, x9, x8
Lloh9:
	adrp	x23, _PCI_EXP_LNKSTA@GOTPAGE
Lloh10:
	ldr	x23, [x23, _PCI_EXP_LNKSTA@GOTPAGEOFF]
Lloh11:
	adrp	x22, _PCI_EXP_LNKSTA_LT@GOTPAGE
Lloh12:
	ldr	x22, [x22, _PCI_EXP_LNKSTA_LT@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x23]
	add	x2, sp, #12
	mov	x0, x19
	bl	_pcie_capability_read_word
	ldr	w8, [sp, #12]
	ldr	w9, [x22]
	mov	w0, #1
	tst	w9, w8
	b.eq	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	bl	_msleep
	ldr	x0, [x21]
	mov	x1, x20
	bl	_time_before
	cbnz	x0, LBB0_3
; %bb.5:
	ldr	w8, [sp, #12]
	ldr	w9, [x22]
	tst	w9, w8
	cset	w0, eq
LBB0_6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_EXP_LNKCTL,4,2             ; @PCI_EXP_LNKCTL
	.comm	_PCI_EXP_LNKCTL_RL,4,2          ; @PCI_EXP_LNKCTL_RL
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_LINK_RETRAIN_TIMEOUT,8,3       ; @LINK_RETRAIN_TIMEOUT
	.comm	_PCI_EXP_LNKSTA,4,2             ; @PCI_EXP_LNKSTA
	.comm	_PCI_EXP_LNKSTA_LT,4,2          ; @PCI_EXP_LNKSTA_LT
	.no_dead_strip	_pcie_retrain_link
.subsections_via_symbols
