	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rsxx_error_detected
_rsxx_error_detected:                   ## @rsxx_error_detected
	.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
	movq	(%rdi), %rax
	movq	_RSXX_EEH_SUPPORT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_2
## %bb.1:
	movq	_PCI_ERS_RESULT_NONE@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_2:
	movq	%rdi, %rbx
	movq	_pci_channel_io_perm_failure@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	je	LBB0_6
## %bb.3:
	movq	%rbx, %rdi
	callq	_rsxx_eeh_frozen
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	leaq	8(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_6:
	movq	%rbx, %rdi
	callq	_rsxx_eeh_failure
	movq	_PCI_ERS_RESULT_DISCONNECT@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_4:
	movq	_PCI_ERS_RESULT_NEED_RESET@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RSXX_EEH_SUPPORT,8,3           ## @RSXX_EEH_SUPPORT
	.comm	_PCI_ERS_RESULT_NONE,4,2        ## @PCI_ERS_RESULT_NONE
	.comm	_pci_channel_io_perm_failure,4,2 ## @pci_channel_io_perm_failure
	.comm	_PCI_ERS_RESULT_DISCONNECT,4,2  ## @PCI_ERS_RESULT_DISCONNECT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Slot reset setup failed\n"

	.comm	_PCI_ERS_RESULT_NEED_RESET,4,2  ## @PCI_ERS_RESULT_NEED_RESET
	.no_dead_strip	_rsxx_error_detected
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rsxx_error_detected
_rsxx_error_detected:                   ; @rsxx_error_detected
	.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
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _RSXX_EEH_SUPPORT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RSXX_EEH_SUPPORT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _PCI_ERS_RESULT_NONE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCI_ERS_RESULT_NONE@GOTPAGEOFF]
	b	LBB0_7
LBB0_2:
	mov	x19, x0
Lloh5:
	adrp	x8, _pci_channel_io_perm_failure@GOTPAGE
Lloh6:
	ldr	x8, [x8, _pci_channel_io_perm_failure@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w8, w1
	b.eq	LBB0_5
; %bb.3:
	mov	x0, x19
	bl	_rsxx_eeh_frozen
	cbz	w0, LBB0_6
; %bb.4:
	add	x0, x19, #8
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_5:
	mov	x0, x19
	bl	_rsxx_eeh_failure
Lloh10:
	adrp	x8, _PCI_ERS_RESULT_DISCONNECT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PCI_ERS_RESULT_DISCONNECT@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh12:
	adrp	x8, _PCI_ERS_RESULT_NEED_RESET@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PCI_ERS_RESULT_NEED_RESET@GOTPAGEOFF]
LBB0_7:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_RSXX_EEH_SUPPORT,8,3           ; @RSXX_EEH_SUPPORT
	.comm	_PCI_ERS_RESULT_NONE,4,2        ; @PCI_ERS_RESULT_NONE
	.comm	_pci_channel_io_perm_failure,4,2 ; @pci_channel_io_perm_failure
	.comm	_PCI_ERS_RESULT_DISCONNECT,4,2  ; @PCI_ERS_RESULT_DISCONNECT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Slot reset setup failed\n"

	.comm	_PCI_ERS_RESULT_NEED_RESET,4,2  ; @PCI_ERS_RESULT_NEED_RESET
	.no_dead_strip	_rsxx_error_detected
.subsections_via_symbols
