	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dpc_reset_link
_dpc_reset_link:                        ## @dpc_reset_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_to_dpc_dev
	movq	%rax, %rbx
	movq	8(%rax), %r14
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_pcie_wait_for_link
	cmpq	$0, (%rbx)
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_dpc_wait_rp_inactive
	testq	%rax, %rax
	jne	LBB0_4
LBB0_2:
	movq	_PCI_EXP_DPC_STATUS@GOTPCREL(%rip), %rax
	addq	(%rax), %r14
	movq	_PCI_EXP_DPC_STATUS_TRIGGER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_pci_write_config_word
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_pcie_wait_for_link
	testl	%eax, %eax
	jne	LBB0_3
LBB0_4:
	movq	_PCI_ERS_RESULT_DISCONNECT@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_PCI_ERS_RESULT_RECOVERED@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_ERS_RESULT_DISCONNECT,4,2  ## @PCI_ERS_RESULT_DISCONNECT
	.comm	_PCI_EXP_DPC_STATUS,8,3         ## @PCI_EXP_DPC_STATUS
	.comm	_PCI_EXP_DPC_STATUS_TRIGGER,4,2 ## @PCI_EXP_DPC_STATUS_TRIGGER
	.comm	_PCI_ERS_RESULT_RECOVERED,4,2   ## @PCI_ERS_RESULT_RECOVERED
	.no_dead_strip	_dpc_reset_link
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dpc_reset_link
_dpc_reset_link:                        ; @dpc_reset_link
	.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	_to_dpc_dev
	mov	x20, x0
	ldr	x21, [x0, #8]
	mov	x0, x19
	mov	w1, #0
	bl	_pcie_wait_for_link
	ldr	x8, [x20]
	cbz	x8, LBB0_3
; %bb.1:
	mov	x0, x20
	bl	_dpc_wait_rp_inactive
	cbz	x0, LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _PCI_ERS_RESULT_DISCONNECT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_ERS_RESULT_DISCONNECT@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh2:
	adrp	x20, _PCI_ERS_RESULT_DISCONNECT@GOTPAGE
Lloh3:
	ldr	x20, [x20, _PCI_ERS_RESULT_DISCONNECT@GOTPAGEOFF]
Lloh4:
	adrp	x8, _PCI_EXP_DPC_STATUS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PCI_EXP_DPC_STATUS@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	add	x1, x8, x21
Lloh7:
	adrp	x8, _PCI_EXP_DPC_STATUS_TRIGGER@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PCI_EXP_DPC_STATUS_TRIGGER@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_pci_write_config_word
	mov	x0, x19
	mov	w1, #1
	bl	_pcie_wait_for_link
Lloh10:
	adrp	x8, _PCI_ERS_RESULT_RECOVERED@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PCI_ERS_RESULT_RECOVERED@GOTPAGEOFF]
	cmp	w0, #0
	csel	x8, x20, x8, eq
LBB0_4:
	ldr	w0, [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
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_ERS_RESULT_DISCONNECT,4,2  ; @PCI_ERS_RESULT_DISCONNECT
	.comm	_PCI_EXP_DPC_STATUS,8,3         ; @PCI_EXP_DPC_STATUS
	.comm	_PCI_EXP_DPC_STATUS_TRIGGER,4,2 ; @PCI_EXP_DPC_STATUS_TRIGGER
	.comm	_PCI_ERS_RESULT_RECOVERED,4,2   ; @PCI_ERS_RESULT_RECOVERED
	.no_dead_strip	_dpc_reset_link
.subsections_via_symbols
