	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qib_pci_error_detected
_qib_pci_error_detected:                ## @qib_pci_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r15
	callq	_pci_get_drvdata
	cmpl	$128, %ebx
	je	LBB0_5
## %bb.1:
	cmpl	$130, %ebx
	je	LBB0_4
## %bb.2:
	movq	_PCI_ERS_RESULT_RECOVERED@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	cmpl	$129, %ebx
	jne	LBB0_8
## %bb.3:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_qib_devinfo
	jmp	LBB0_9
LBB0_5:
	movq	%rax, %r14
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_qib_devinfo
	testq	%r14, %r14
	je	LBB0_7
## %bb.6:
	movq	_QIB_PRESENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, (%r14)
	movq	%r14, %rdi
	callq	_qib_disable_after_error
LBB0_7:
	movq	_PCI_ERS_RESULT_DISCONNECT@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_9
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_qib_devinfo
	movq	%r15, %rdi
	callq	_pci_disable_device
	movq	_PCI_ERS_RESULT_NEED_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_9
LBB0_8:
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_qib_devinfo
LBB0_9:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_ERS_RESULT_RECOVERED,4,2   ## @PCI_ERS_RESULT_RECOVERED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"State Normal, ignoring\n"

L_.str.1:                               ## @.str.1
	.asciz	"State Frozen, requesting reset\n"

	.comm	_PCI_ERS_RESULT_NEED_RESET,4,2  ## @PCI_ERS_RESULT_NEED_RESET
L_.str.2:                               ## @.str.2
	.asciz	"State Permanent Failure, disabling\n"

	.comm	_QIB_PRESENT,4,2                ## @QIB_PRESENT
	.comm	_PCI_ERS_RESULT_DISCONNECT,4,2  ## @PCI_ERS_RESULT_DISCONNECT
L_.str.3:                               ## @.str.3
	.asciz	"QIB PCI errors detected (state %d)\n"

	.no_dead_strip	_qib_pci_error_detected
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qib_pci_error_detected
_qib_pci_error_detected:                ; @qib_pci_error_detected
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x1
	mov	x19, x0
	bl	_pci_get_drvdata
	cmp	w21, #128
	b.eq	LBB0_4
; %bb.1:
	cmp	w21, #130
	b.eq	LBB0_7
; %bb.2:
Lloh0:
	adrp	x8, _PCI_ERS_RESULT_RECOVERED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_ERS_RESULT_RECOVERED@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	cmp	w21, #129
	b.ne	LBB0_8
; %bb.3:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_9
LBB0_4:
	mov	x20, x0
Lloh5:
	adrp	x1, l_.str.2@PAGE
Lloh6:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_qib_devinfo
	cbz	x20, LBB0_6
; %bb.5:
Lloh7:
	adrp	x8, _QIB_PRESENT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _QIB_PRESENT@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	ldr	w9, [x20]
	bic	w8, w9, w8
	str	w8, [x20]
	mov	x0, x20
	bl	_qib_disable_after_error
LBB0_6:
Lloh10:
	adrp	x8, _PCI_ERS_RESULT_DISCONNECT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PCI_ERS_RESULT_DISCONNECT@GOTPAGEOFF]
Lloh12:
	ldr	w20, [x8]
	b	LBB0_10
LBB0_7:
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_qib_devinfo
	mov	x0, x19
	bl	_pci_disable_device
Lloh15:
	adrp	x8, _PCI_ERS_RESULT_NEED_RESET@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PCI_ERS_RESULT_NEED_RESET@GOTPAGEOFF]
Lloh17:
	ldr	w20, [x8]
	b	LBB0_10
LBB0_8:
	str	x21, [sp]
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_9:
	mov	x0, x19
	bl	_qib_devinfo
LBB0_10:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_ERS_RESULT_RECOVERED,4,2   ; @PCI_ERS_RESULT_RECOVERED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"State Normal, ignoring\n"

l_.str.1:                               ; @.str.1
	.asciz	"State Frozen, requesting reset\n"

	.comm	_PCI_ERS_RESULT_NEED_RESET,4,2  ; @PCI_ERS_RESULT_NEED_RESET
l_.str.2:                               ; @.str.2
	.asciz	"State Permanent Failure, disabling\n"

	.comm	_QIB_PRESENT,4,2                ; @QIB_PRESENT
	.comm	_PCI_ERS_RESULT_DISCONNECT,4,2  ; @PCI_ERS_RESULT_DISCONNECT
l_.str.3:                               ; @.str.3
	.asciz	"QIB PCI errors detected (state %d)\n"

	.no_dead_strip	_qib_pci_error_detected
.subsections_via_symbols
