	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function e1000_test_msi_interrupt
_e1000_test_msi_interrupt:              ## @e1000_test_msi_interrupt
	.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, %rbx
	movq	24(%rdi), %r14
	movq	_ICR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_er32
	movq	%rbx, %rdi
	callq	_e1000_free_irq
	movq	%rbx, %rdi
	callq	_e1000e_reset_interrupt_capability
	movq	_FLAG_MSI_TEST_FAILED@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	orl	%eax, (%rbx)
	movq	8(%rbx), %rdi
	callq	_pci_enable_msi
	testl	%eax, %eax
	jne	LBB0_7
## %bb.1:
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	movq	_e1000_intr_msi_test@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %ecx
	xorl	%edx, %edx
	movq	%r14, %r8
	callq	_request_irq
	testl	%eax, %eax
	jne	LBB0_6
## %bb.2:
	xorl	%eax, %eax
	callq	_wmb
	movq	%rbx, %rdi
	callq	_e1000_irq_enable
	movq	_ICS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_E1000_ICS_RXSEQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ew32
	xorl	%eax, %eax
	callq	_e1e_flush
	movl	$100, %edi
	callq	_msleep
	movq	%rbx, %rdi
	callq	_e1000_irq_disable
	xorl	%eax, %eax
	callq	_rmb
	movl	(%r15), %eax
	testl	%eax, (%rbx)
	je	LBB0_4
## %bb.3:
	movq	_E1000E_INT_MODE_LEGACY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	leaq	L_.str(%rip), %rdi
	callq	_e_info
	jmp	LBB0_5
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	callq	_e_dbg
LBB0_5:
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_free_irq
LBB0_6:
	movq	8(%rbx), %rdi
	callq	_pci_disable_msi
LBB0_7:
	movq	%rbx, %rdi
	callq	_e1000e_set_interrupt_capability
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_e1000_request_irq              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ICR,4,2                        ## @ICR
	.comm	_FLAG_MSI_TEST_FAILED,4,2       ## @FLAG_MSI_TEST_FAILED
	.comm	_e1000_intr_msi_test,4,2        ## @e1000_intr_msi_test
	.comm	_ICS,4,2                        ## @ICS
	.comm	_E1000_ICS_RXSEQ,4,2            ## @E1000_ICS_RXSEQ
	.comm	_E1000E_INT_MODE_LEGACY,4,2     ## @E1000E_INT_MODE_LEGACY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MSI interrupt test failed, using legacy interrupt.\n"

L_.str.1:                               ## @.str.1
	.asciz	"MSI interrupt test succeeded!\n"

	.no_dead_strip	_e1000_test_msi_interrupt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function e1000_test_msi_interrupt
_e1000_test_msi_interrupt:              ; @e1000_test_msi_interrupt
	.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
	ldr	x20, [x0, #24]
Lloh0:
	adrp	x8, _ICR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ICR@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_er32
	mov	x0, x19
	bl	_e1000_free_irq
	mov	x0, x19
	bl	_e1000e_reset_interrupt_capability
Lloh3:
	adrp	x21, _FLAG_MSI_TEST_FAILED@GOTPAGE
Lloh4:
	ldr	x21, [x21, _FLAG_MSI_TEST_FAILED@GOTPAGEOFF]
	ldr	w8, [x21]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	ldr	x0, [x19, #8]
	bl	_pci_enable_msi
	cbnz	w0, LBB0_7
; %bb.1:
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
Lloh5:
	adrp	x8, _e1000_intr_msi_test@GOTPAGE
Lloh6:
	ldr	x8, [x8, _e1000_intr_msi_test@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	ldr	w3, [x20]
	mov	w2, #0
	mov	x4, x20
	bl	_request_irq
	cbnz	w0, LBB0_6
; %bb.2:
	bl	_wmb
	mov	x0, x19
	bl	_e1000_irq_enable
Lloh8:
	adrp	x8, _ICS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ICS@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x8, _E1000_ICS_RXSEQ@GOTPAGE
Lloh12:
	ldr	x8, [x8, _E1000_ICS_RXSEQ@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	bl	_ew32
	bl	_e1e_flush
	mov	w0, #100
	bl	_msleep
	mov	x0, x19
	bl	_e1000_irq_disable
	bl	_rmb
	ldr	w8, [x19]
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
Lloh14:
	adrp	x8, _E1000E_INT_MODE_LEGACY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _E1000E_INT_MODE_LEGACY@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	str	w8, [x19, #16]
Lloh17:
	adrp	x0, l_.str@PAGE
Lloh18:
	add	x0, x0, l_.str@PAGEOFF
	bl	_e_info
	b	LBB0_5
LBB0_4:
Lloh19:
	adrp	x0, l_.str.1@PAGE
Lloh20:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_e_dbg
LBB0_5:
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	mov	x1, x20
	bl	_free_irq
LBB0_6:
	ldr	x0, [x19, #8]
	bl	_pci_disable_msi
LBB0_7:
	mov	x0, x19
	bl	_e1000e_set_interrupt_capability
	mov	x0, x19
	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
	b	_e1000_request_irq
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_ICR,4,2                        ; @ICR
	.comm	_FLAG_MSI_TEST_FAILED,4,2       ; @FLAG_MSI_TEST_FAILED
	.comm	_e1000_intr_msi_test,4,2        ; @e1000_intr_msi_test
	.comm	_ICS,4,2                        ; @ICS
	.comm	_E1000_ICS_RXSEQ,4,2            ; @E1000_ICS_RXSEQ
	.comm	_E1000E_INT_MODE_LEGACY,4,2     ; @E1000E_INT_MODE_LEGACY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MSI interrupt test failed, using legacy interrupt.\n"

l_.str.1:                               ; @.str.1
	.asciz	"MSI interrupt test succeeded!\n"

	.no_dead_strip	_e1000_test_msi_interrupt
.subsections_via_symbols
