	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_reinit_intr                ## -- Begin function qib_reinit_intr
	.p2align	4, 0x90
_qib_reinit_intr:                       ## @qib_reinit_intr
	.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, %r14
	movl	20(%rdi), %edx
	testl	%edx, %edx
	je	LBB0_3
## %bb.1:
	movq	8(%r14), %rdi
	movslq	(%rdi), %rbx
	testq	%rbx, %rbx
	je	LBB0_2
## %bb.4:
	movq	_PCI_MSI_ADDRESS_LO@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%rbx, %rsi
	callq	_pci_write_config_dword
	movq	8(%r14), %rdi
	movq	_PCI_MSI_ADDRESS_HI@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%rbx, %rsi
	movl	16(%r14), %edx
	callq	_pci_write_config_dword
	movq	8(%r14), %rdi
	movq	_PCI_MSI_FLAGS@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	addl	%ebx, %esi
	leaq	-28(%rbp), %rdx
	callq	_pci_read_config_word
	movl	-28(%rbp), %eax
	movq	_PCI_MSI_FLAGS_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	testl	%eax, %edx
	jne	LBB0_6
## %bb.5:
	orl	%eax, %edx
	movl	%edx, -28(%rbp)
	movq	8(%r14), %rdi
	movl	(%r15), %esi
	addl	%ebx, %esi
	callq	_pci_write_config_word
	movl	-28(%rbp), %eax
LBB0_6:
	movq	_PCI_MSI_FLAGS_64BIT@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	andl	(%rcx), %eax
	movq	8(%r14), %rdi
	setne	%dl
	leal	(%rbx,%rdx,4), %esi
	addl	$8, %esi
	movl	(%r14), %edx
	callq	_pci_write_config_word
	movq	%r14, %rdi
	callq	_qib_free_irq
	movl	$1, %ebx
	jmp	LBB0_7
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_qib_dev_err
LBB0_3:
	movq	%r14, %rdi
	callq	_qib_free_irq
	movq	_QIB_HAS_INTX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ebx, %ebx
	testl	%eax, 4(%r14)
	setne	%bl
LBB0_7:
	movq	8(%r14), %rdi
	callq	_pci_set_master
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't find MSI capability, can't restore MSI settings\n"

	.comm	_PCI_MSI_ADDRESS_LO,8,3         ## @PCI_MSI_ADDRESS_LO
	.comm	_PCI_MSI_ADDRESS_HI,8,3         ## @PCI_MSI_ADDRESS_HI
	.comm	_PCI_MSI_FLAGS,4,2              ## @PCI_MSI_FLAGS
	.comm	_PCI_MSI_FLAGS_ENABLE,4,2       ## @PCI_MSI_FLAGS_ENABLE
	.comm	_PCI_MSI_FLAGS_64BIT,4,2        ## @PCI_MSI_FLAGS_64BIT
	.comm	_QIB_HAS_INTX,4,2               ## @QIB_HAS_INTX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_reinit_intr                ; -- Begin function qib_reinit_intr
	.p2align	2
_qib_reinit_intr:                       ; @qib_reinit_intr
	.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	x19, x0
	ldr	w2, [x0, #20]
	cbz	w2, LBB0_6
; %bb.1:
	ldr	x0, [x19, #8]
	ldrsw	x20, [x0]
	cbz	w20, LBB0_5
; %bb.2:
Lloh0:
	adrp	x8, _PCI_MSI_ADDRESS_LO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_MSI_ADDRESS_LO@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	add	x1, x8, x20
	bl	_pci_write_config_dword
	ldr	x0, [x19, #8]
Lloh3:
	adrp	x8, _PCI_MSI_ADDRESS_HI@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCI_MSI_ADDRESS_HI@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	add	x1, x8, x20
	ldr	w2, [x19, #16]
	bl	_pci_write_config_dword
	ldr	x0, [x19, #8]
Lloh6:
	adrp	x21, _PCI_MSI_FLAGS@GOTPAGE
Lloh7:
	ldr	x21, [x21, _PCI_MSI_FLAGS@GOTPAGEOFF]
	ldr	w8, [x21]
	add	w1, w8, w20
	add	x2, sp, #12
	bl	_pci_read_config_word
	ldr	w8, [sp, #12]
Lloh8:
	adrp	x9, _PCI_MSI_FLAGS_ENABLE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _PCI_MSI_FLAGS_ENABLE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_4
; %bb.3:
	orr	w2, w9, w8
	str	w2, [sp, #12]
	ldr	x0, [x19, #8]
	ldr	w8, [x21]
	add	w1, w8, w20
	bl	_pci_write_config_word
	ldr	w8, [sp, #12]
LBB0_4:
	ldr	x0, [x19, #8]
Lloh11:
	adrp	x9, _PCI_MSI_FLAGS_64BIT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _PCI_MSI_FLAGS_64BIT@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	mov	w8, #12
	mov	w9, #8
	csel	w8, w9, w8, eq
	add	w1, w8, w20
	ldr	w2, [x19]
	bl	_pci_write_config_word
	mov	x0, x19
	bl	_qib_free_irq
	mov	w20, #1
	b	LBB0_7
LBB0_5:
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_qib_dev_err
LBB0_6:
	mov	x0, x19
	bl	_qib_free_irq
	ldr	w8, [x19, #4]
Lloh16:
	adrp	x9, _QIB_HAS_INTX@GOTPAGE
Lloh17:
	ldr	x9, [x9, _QIB_HAS_INTX@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w20, ne
LBB0_7:
	ldr	x0, [x19, #8]
	bl	_pci_set_master
	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	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't find MSI capability, can't restore MSI settings\n"

	.comm	_PCI_MSI_ADDRESS_LO,8,3         ; @PCI_MSI_ADDRESS_LO
	.comm	_PCI_MSI_ADDRESS_HI,8,3         ; @PCI_MSI_ADDRESS_HI
	.comm	_PCI_MSI_FLAGS,4,2              ; @PCI_MSI_FLAGS
	.comm	_PCI_MSI_FLAGS_ENABLE,4,2       ; @PCI_MSI_FLAGS_ENABLE
	.comm	_PCI_MSI_FLAGS_64BIT,4,2        ; @PCI_MSI_FLAGS_64BIT
	.comm	_QIB_HAS_INTX,4,2               ; @QIB_HAS_INTX
.subsections_via_symbols
