	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nic_register_interrupts
_nic_register_interrupts:               ## @nic_register_interrupts
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	16(%rdi), %rdi
	callq	_pci_msix_vec_count
	movl	%eax, (%r12)
	movq	16(%r12), %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_1
## %bb.2:
	movq	_NIC_PF_INTR_ID_MBOX0@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	cmpl	(%r12), %r14d
	jge	LBB0_7
## %bb.3:
	movslq	%r14d, %r13
	incq	%r13
	movq	_nic_mbx_intr_handler@GOTPCREL(%rip), %r15
	movl	%r14d, %eax
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r12), %rcx
	movl	-4(%rcx,%r13,4), %edi
	movl	%r14d, %edx
	subl	%eax, %edx
	leaq	L_.str.1(%rip), %rsi
	callq	_sprintf
	movq	16(%r12), %rdi
	movl	%r14d, %esi
	callq	_pci_irq_vector
	movl	(%r15), %esi
	movq	24(%r12), %rcx
	movl	-4(%rcx,%r13,4), %ecx
	movl	%eax, %edi
	xorl	%edx, %edx
	movq	%r12, %r8
	callq	_request_irq
	testl	%eax, %eax
	jne	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%r12), %rax
	movl	$1, -4(%rax,%r13,4)
	movslq	(%r12), %rax
	cmpq	%rax, %r13
	jge	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_NIC_PF_INTR_ID_MBOX0@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	incl	%r14d
	incq	%r13
	jmp	LBB0_4
LBB0_7:
	movq	%r12, %rdi
	callq	_nic_enable_mbx_intr
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_1:
	movq	16(%r12), %rdi
	movl	(%r12), %edx
	leaq	L_.str(%rip), %rsi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dev_err
	movl	$1, %ebx
	jmp	LBB0_9
LBB0_8:
	movl	%eax, %ebx
	movq	16(%r12), %rdi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	movq	%r12, %rdi
	callq	_nic_free_all_interrupts
	movq	16(%r12), %rdi
	callq	_pci_free_irq_vectors
	movl	$0, (%r12)
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_IRQ_MSIX,4,2               ## @PCI_IRQ_MSIX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Request for #%d msix vectors failed, returned %d\n"

	.comm	_NIC_PF_INTR_ID_MBOX0,4,2       ## @NIC_PF_INTR_ID_MBOX0
L_.str.1:                               ## @.str.1
	.asciz	"NICPF Mbox%d"

	.comm	_nic_mbx_intr_handler,4,2       ## @nic_mbx_intr_handler
L_.str.2:                               ## @.str.2
	.asciz	"Request irq failed\n"

	.no_dead_strip	_nic_register_interrupts
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nic_register_interrupts
_nic_register_interrupts:               ; @nic_register_interrupts
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldr	x0, [x0, #16]
	bl	_pci_msix_vec_count
	mov	x1, x0
	str	w0, [x19]
	ldr	x0, [x19, #16]
Lloh0:
	adrp	x8, _PCI_IRQ_MSIX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_IRQ_MSIX@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x8]
	mov	x2, x1
	bl	_pci_alloc_irq_vectors
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_7
; %bb.1:
Lloh3:
	adrp	x23, _NIC_PF_INTR_ID_MBOX0@GOTPAGE
Lloh4:
	ldr	x23, [x23, _NIC_PF_INTR_ID_MBOX0@GOTPAGEOFF]
	ldr	w8, [x23]
	ldr	w9, [x19]
	cmp	w8, w9
	b.ge	LBB0_6
; %bb.2:
	sxtw	x20, w8
Lloh5:
	adrp	x24, _nic_mbx_intr_handler@GOTPAGE
Lloh6:
	ldr	x24, [x24, _nic_mbx_intr_handler@GOTPAGEOFF]
	mov	w25, #1
Lloh7:
	adrp	x21, l_.str.1@PAGE
Lloh8:
	add	x21, x21, l_.str.1@PAGEOFF
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #24]
	lsl	x22, x20, #2
	ldr	w0, [x9, x22]
	sub	w2, w20, w8
	mov	x1, x21
	bl	_sprintf
	ldr	x0, [x19, #16]
	mov	x1, x20
	bl	_pci_irq_vector
	ldr	w1, [x24]
	ldr	x8, [x19, #24]
	ldr	w3, [x8, x22]
	mov	w2, #0
	mov	x4, x19
	bl	_request_irq
	cbnz	w0, LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #8]
	str	w25, [x8, x20, lsl #2]
	add	x20, x20, #1
	ldrsw	x8, [x19]
	cmp	x20, x8
	b.ge	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x23]
	b	LBB0_3
LBB0_6:
	mov	x0, x19
	bl	_nic_enable_mbx_intr
	mov	w22, #0
	b	LBB0_9
LBB0_7:
	ldr	x8, [x19, #16]
	ldr	w9, [x19]
	stp	x9, x0, [sp]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x8
	bl	_dev_err
	mov	w22, #1
	b	LBB0_9
LBB0_8:
	mov	x22, x0
	ldr	x0, [x19, #16]
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
	mov	x0, x19
	bl	_nic_free_all_interrupts
	ldr	x0, [x19, #16]
	bl	_pci_free_irq_vectors
	str	wzr, [x19]
LBB0_9:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_IRQ_MSIX,4,2               ; @PCI_IRQ_MSIX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Request for #%d msix vectors failed, returned %d\n"

	.comm	_NIC_PF_INTR_ID_MBOX0,4,2       ; @NIC_PF_INTR_ID_MBOX0
l_.str.1:                               ; @.str.1
	.asciz	"NICPF Mbox%d"

	.comm	_nic_mbx_intr_handler,4,2       ; @nic_mbx_intr_handler
l_.str.2:                               ; @.str.2
	.asciz	"Request irq failed\n"

	.no_dead_strip	_nic_register_interrupts
.subsections_via_symbols
