	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nicvf_register_misc_interrupt
_nicvf_register_misc_interrupt:         ## @nicvf_register_misc_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %rdi
	xorl	%eax, %eax
	cmpq	$0, (%rdi)
	jne	LBB0_7
## %bb.1:
	movq	_NICVF_INTR_ID_MISC@GOTPCREL(%rip), %rax
	movslq	(%rax), %r14
	callq	_pci_msix_vec_count
	movl	%eax, 24(%rbx)
	movq	16(%rbx), %rdi
	movq	_PCI_IRQ_MSIX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%eax, %esi
	movl	%eax, %edx
	callq	_pci_alloc_irq_vectors
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	movq	8(%rbx), %rax
	movl	(%rax,%r14,4), %edi
	leaq	L_.str.1(%rip), %rsi
	leaq	L_.str.2(%rip), %rdx
	callq	_sprintf
	movq	16(%rbx), %rdi
	movl	%r14d, %esi
	callq	_pci_irq_vector
	movq	_nicvf_misc_intr_handler@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	8(%rbx), %rcx
	movl	(%rcx,%r14,4), %ecx
	movl	%eax, %edi
	xorl	%edx, %edx
	movq	%rbx, %r8
	callq	_request_irq
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:
	movq	(%rbx), %rax
	movl	$1, (%rax,%r14,4)
	movq	_NICVF_INTR_MBOX@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_nicvf_enable_intr
	movq	%rbx, %rdi
	callq	_nicvf_check_pf_ready
	movl	%eax, %ecx
	movl	$0, %eax
	testl	%ecx, %ecx
	jne	LBB0_7
## %bb.5:
	movl	(%r14), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_nicvf_disable_intr
	movq	%rbx, %rdi
	callq	_nicvf_unregister_interrupts
	jmp	LBB0_6
LBB0_2:
	movl	24(%rbx), %edx
	movl	28(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_netdev_err
LBB0_6:
	movl	$1, %eax
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NICVF_INTR_ID_MISC,4,2         ## @NICVF_INTR_ID_MISC
	.comm	_PCI_IRQ_MSIX,4,2               ## @PCI_IRQ_MSIX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Req for #%d msix vectors failed\n"

L_.str.1:                               ## @.str.1
	.asciz	"%s Mbox"

L_.str.2:                               ## @.str.2
	.asciz	"NICVF"

	.comm	_nicvf_misc_intr_handler,4,2    ## @nicvf_misc_intr_handler
	.comm	_NICVF_INTR_MBOX,4,2            ## @NICVF_INTR_MBOX
	.no_dead_strip	_nicvf_register_misc_interrupt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nicvf_register_misc_interrupt
_nicvf_register_misc_interrupt:         ; @nicvf_register_misc_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	x0, [x0, #16]
	ldr	x8, [x0]
	cbz	x8, LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_8
LBB0_2:
Lloh0:
	adrp	x8, _NICVF_INTR_ID_MISC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NICVF_INTR_ID_MISC@GOTPAGEOFF]
Lloh2:
	ldrsw	x20, [x8]
	bl	_pci_msix_vec_count
	mov	x1, x0
	str	w0, [x19, #24]
	ldr	x0, [x19, #16]
Lloh3:
	adrp	x8, _PCI_IRQ_MSIX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCI_IRQ_MSIX@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	mov	x2, x1
	bl	_pci_alloc_irq_vectors
	tbnz	w0, #31, LBB0_6
; %bb.3:
	ldr	x8, [x19, #8]
	lsl	x21, x20, #2
	ldr	w0, [x8, x21]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
Lloh8:
	adrp	x2, l_.str.2@PAGE
Lloh9:
	add	x2, x2, l_.str.2@PAGEOFF
	bl	_sprintf
	ldr	x0, [x19, #16]
	mov	x1, x20
	bl	_pci_irq_vector
Lloh10:
	adrp	x8, _nicvf_misc_intr_handler@GOTPAGE
Lloh11:
	ldr	x8, [x8, _nicvf_misc_intr_handler@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	ldr	x8, [x19, #8]
	ldr	w3, [x8, x21]
	mov	w2, #0
	mov	x4, x19
	bl	_request_irq
	cbnz	w0, LBB0_8
; %bb.4:
	ldr	x8, [x19]
	mov	w9, #1
	str	w9, [x8, x20, lsl #2]
Lloh13:
	adrp	x20, _NICVF_INTR_MBOX@GOTPAGE
Lloh14:
	ldr	x20, [x20, _NICVF_INTR_MBOX@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #0
	bl	_nicvf_enable_intr
	mov	x0, x19
	bl	_nicvf_check_pf_ready
	mov	x8, x0
	mov	w0, #0
	cbnz	w8, LBB0_8
; %bb.5:
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #0
	bl	_nicvf_disable_intr
	mov	x0, x19
	bl	_nicvf_unregister_interrupts
	b	LBB0_7
LBB0_6:
	ldp	w2, w0, [x19, #24]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	bl	_netdev_err
LBB0_7:
	mov	w0, #1
LBB0_8:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_NICVF_INTR_ID_MISC,4,2         ; @NICVF_INTR_ID_MISC
	.comm	_PCI_IRQ_MSIX,4,2               ; @PCI_IRQ_MSIX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Req for #%d msix vectors failed\n"

l_.str.1:                               ; @.str.1
	.asciz	"%s Mbox"

l_.str.2:                               ; @.str.2
	.asciz	"NICVF"

	.comm	_nicvf_misc_intr_handler,4,2    ; @nicvf_misc_intr_handler
	.comm	_NICVF_INTR_MBOX,4,2            ; @NICVF_INTR_MBOX
	.no_dead_strip	_nicvf_register_misc_interrupt
.subsections_via_symbols
