	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pcie_do_recovery               ## -- Begin function pcie_do_recovery
	.p2align	4, 0x90
_pcie_do_recovery:                      ## @pcie_do_recovery
	.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
	movl	%edx, %r15d
	movl	%esi, %r12d
	movq	%rdi, %rbx
	movq	_PCI_ERS_RESULT_CAN_RECOVER@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_pci_pcie_type
	movq	_PCI_EXP_TYPE_ROOT_PORT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_3
## %bb.1:
	movq	%rbx, %rdi
	callq	_pci_pcie_type
	movq	_PCI_EXP_TYPE_DOWNSTREAM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_3
## %bb.2:
	movq	8(%rbx), %rax
	movq	(%rax), %rbx
LBB0_3:
	movq	(%rbx), %r14
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_pci_dbg
	movq	_pci_channel_io_frozen@GOTPCREL(%rip), %r13
	cmpl	%r12d, (%r13)
	jne	LBB0_4
## %bb.5:
	movq	_report_frozen_detected@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_4:
	movq	_report_normal_detected@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	callq	_pci_walk_bus
	cmpl	%r12d, (%r13)
	jne	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_reset_link
	movq	_PCI_ERS_RESULT_RECOVERED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
LBB0_8:
	movq	-48(%rbp), %rax
	movq	_PCI_ERS_RESULT_CAN_RECOVER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.9:
	movq	_PCI_ERS_RESULT_RECOVERED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_pci_dbg
	movq	_report_mmio_enabled@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	callq	_pci_walk_bus
	movq	-48(%rbp), %rax
LBB0_10:
	movq	_PCI_ERS_RESULT_NEED_RESET@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.11:
	movq	_PCI_ERS_RESULT_RECOVERED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	callq	_pci_dbg
	movq	_report_slot_reset@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	callq	_pci_walk_bus
	movq	-48(%rbp), %rax
LBB0_12:
	movq	_PCI_ERS_RESULT_RECOVERED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.13:
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	callq	_pci_dbg
	movq	_report_resume@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	callq	_pci_walk_bus
	movq	%rbx, %rdi
	callq	_pci_aer_clear_device_status
	movq	%rbx, %rdi
	callq	_pci_cleanup_aer_uncorrect_error_status
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_15
LBB0_14:
	movq	_PCI_ERS_RESULT_DISCONNECT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_pci_uevent_ers
	leaq	L_.str.5(%rip), %rsi
LBB0_15:
	movq	%rbx, %rdi
	callq	_pci_info
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_ERS_RESULT_CAN_RECOVER,8,3 ## @PCI_ERS_RESULT_CAN_RECOVER
	.comm	_PCI_EXP_TYPE_ROOT_PORT,8,3     ## @PCI_EXP_TYPE_ROOT_PORT
	.comm	_PCI_EXP_TYPE_DOWNSTREAM,8,3    ## @PCI_EXP_TYPE_DOWNSTREAM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"broadcast error_detected message\n"

	.comm	_pci_channel_io_frozen,4,2      ## @pci_channel_io_frozen
	.comm	_report_frozen_detected,4,2     ## @report_frozen_detected
	.comm	_report_normal_detected,4,2     ## @report_normal_detected
	.comm	_PCI_ERS_RESULT_RECOVERED,8,3   ## @PCI_ERS_RESULT_RECOVERED
L_.str.1:                               ## @.str.1
	.asciz	"broadcast mmio_enabled message\n"

	.comm	_report_mmio_enabled,4,2        ## @report_mmio_enabled
	.comm	_PCI_ERS_RESULT_NEED_RESET,8,3  ## @PCI_ERS_RESULT_NEED_RESET
L_.str.2:                               ## @.str.2
	.asciz	"broadcast slot_reset message\n"

	.comm	_report_slot_reset,4,2          ## @report_slot_reset
L_.str.3:                               ## @.str.3
	.asciz	"broadcast resume message\n"

	.comm	_report_resume,4,2              ## @report_resume
L_.str.4:                               ## @.str.4
	.asciz	"AER: Device recovery successful\n"

	.comm	_PCI_ERS_RESULT_DISCONNECT,4,2  ## @PCI_ERS_RESULT_DISCONNECT
L_.str.5:                               ## @.str.5
	.asciz	"AER: Device recovery failed\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pcie_do_recovery               ; -- Begin function pcie_do_recovery
	.p2align	2
_pcie_do_recovery:                      ; @pcie_do_recovery
	.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
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x23, _PCI_ERS_RESULT_CAN_RECOVER@GOTPAGE
Lloh1:
	ldr	x23, [x23, _PCI_ERS_RESULT_CAN_RECOVER@GOTPAGEOFF]
	ldr	x8, [x23]
	str	x8, [sp, #8]
	bl	_pci_pcie_type
Lloh2:
	adrp	x8, _PCI_EXP_TYPE_ROOT_PORT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PCI_EXP_TYPE_ROOT_PORT@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_pci_pcie_type
Lloh5:
	adrp	x8, _PCI_EXP_TYPE_DOWNSTREAM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PCI_EXP_TYPE_DOWNSTREAM@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_3
; %bb.2:
	ldr	x8, [x19, #8]
	ldr	x19, [x8]
LBB0_3:
	ldr	x20, [x19]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_pci_dbg
Lloh10:
	adrp	x24, _pci_channel_io_frozen@GOTPAGE
Lloh11:
	ldr	x24, [x24, _pci_channel_io_frozen@GOTPAGEOFF]
Lloh12:
	adrp	x8, _report_frozen_detected@GOTPAGE
Lloh13:
	ldr	x8, [x8, _report_frozen_detected@GOTPAGEOFF]
	ldr	w9, [x24]
Lloh14:
	adrp	x10, _report_normal_detected@GOTPAGE
Lloh15:
	ldr	x10, [x10, _report_normal_detected@GOTPAGEOFF]
	cmp	w9, w22
	csel	x8, x8, x10, eq
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x20
	bl	_pci_walk_bus
	ldr	w8, [x24]
Lloh16:
	adrp	x24, _PCI_ERS_RESULT_RECOVERED@GOTPAGE
Lloh17:
	ldr	x24, [x24, _PCI_ERS_RESULT_RECOVERED@GOTPAGEOFF]
	cmp	w8, w22
	b.ne	LBB0_5
; %bb.4:
	mov	x0, x19
	mov	x1, x21
	bl	_reset_link
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_11
LBB0_5:
	ldr	x8, [sp, #8]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.6:
	ldr	x8, [x24]
	str	x8, [sp, #8]
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_pci_dbg
Lloh20:
	adrp	x8, _report_mmio_enabled@GOTPAGE
Lloh21:
	ldr	x8, [x8, _report_mmio_enabled@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x20
	bl	_pci_walk_bus
	ldr	x8, [sp, #8]
LBB0_7:
Lloh23:
	adrp	x9, _PCI_ERS_RESULT_NEED_RESET@GOTPAGE
Lloh24:
	ldr	x9, [x9, _PCI_ERS_RESULT_NEED_RESET@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.8:
	ldr	x8, [x24]
	str	x8, [sp, #8]
Lloh26:
	adrp	x1, l_.str.2@PAGE
Lloh27:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_pci_dbg
Lloh28:
	adrp	x8, _report_slot_reset@GOTPAGE
Lloh29:
	ldr	x8, [x8, _report_slot_reset@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x20
	bl	_pci_walk_bus
	ldr	x8, [sp, #8]
LBB0_9:
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.10:
Lloh31:
	adrp	x1, l_.str.3@PAGE
Lloh32:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_pci_dbg
Lloh33:
	adrp	x8, _report_resume@GOTPAGE
Lloh34:
	ldr	x8, [x8, _report_resume@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x20
	bl	_pci_walk_bus
	mov	x0, x19
	bl	_pci_aer_clear_device_status
	mov	x0, x19
	bl	_pci_cleanup_aer_uncorrect_error_status
Lloh36:
	adrp	x1, l_.str.4@PAGE
Lloh37:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_12
LBB0_11:
Lloh38:
	adrp	x8, _PCI_ERS_RESULT_DISCONNECT@GOTPAGE
Lloh39:
	ldr	x8, [x8, _PCI_ERS_RESULT_DISCONNECT@GOTPAGEOFF]
Lloh40:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_pci_uevent_ers
Lloh41:
	adrp	x1, l_.str.5@PAGE
Lloh42:
	add	x1, x1, l_.str.5@PAGEOFF
LBB0_12:
	mov	x0, x19
	bl	_pci_info
	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 AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_ERS_RESULT_CAN_RECOVER,8,3 ; @PCI_ERS_RESULT_CAN_RECOVER
	.comm	_PCI_EXP_TYPE_ROOT_PORT,8,3     ; @PCI_EXP_TYPE_ROOT_PORT
	.comm	_PCI_EXP_TYPE_DOWNSTREAM,8,3    ; @PCI_EXP_TYPE_DOWNSTREAM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"broadcast error_detected message\n"

	.comm	_pci_channel_io_frozen,4,2      ; @pci_channel_io_frozen
	.comm	_report_frozen_detected,4,2     ; @report_frozen_detected
	.comm	_report_normal_detected,4,2     ; @report_normal_detected
	.comm	_PCI_ERS_RESULT_RECOVERED,8,3   ; @PCI_ERS_RESULT_RECOVERED
l_.str.1:                               ; @.str.1
	.asciz	"broadcast mmio_enabled message\n"

	.comm	_report_mmio_enabled,4,2        ; @report_mmio_enabled
	.comm	_PCI_ERS_RESULT_NEED_RESET,8,3  ; @PCI_ERS_RESULT_NEED_RESET
l_.str.2:                               ; @.str.2
	.asciz	"broadcast slot_reset message\n"

	.comm	_report_slot_reset,4,2          ; @report_slot_reset
l_.str.3:                               ; @.str.3
	.asciz	"broadcast resume message\n"

	.comm	_report_resume,4,2              ; @report_resume
l_.str.4:                               ; @.str.4
	.asciz	"AER: Device recovery successful\n"

	.comm	_PCI_ERS_RESULT_DISCONNECT,4,2  ; @PCI_ERS_RESULT_DISCONNECT
l_.str.5:                               ; @.str.5
	.asciz	"AER: Device recovery failed\n"

.subsections_via_symbols
