	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xgbe_config_multi_msi
_xgbe_config_multi_msi:                 ## @xgbe_config_multi_msi
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	_XGBE_MSI_BASE_COUNT@GOTPCREL(%rip), %r15
	movl	(%r15), %r14d
	movl	72(%rdi), %esi
	movl	76(%rdi), %edi
	callq	_max
	addl	%eax, %r14d
	movq	16(%r12), %rdi
	movq	_XGBE_MSI_MIN_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PCI_IRQ_MSI@GOTPCREL(%rip), %rax
	movq	_PCI_IRQ_MSIX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%r14d, %edx
	callq	_pci_alloc_irq_vectors
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	$1, (%r12)
	movl	%r14d, 4(%r12)
	movq	16(%r12), %rdi
	xorl	%esi, %esi
	callq	_pci_irq_vector
	movq	%rax, 64(%r12)
	movq	16(%r12), %rdi
	movl	$1, %esi
	callq	_pci_irq_vector
	movq	%rax, 56(%r12)
	movq	16(%r12), %rdi
	movl	$2, %esi
	callq	_pci_irq_vector
	movq	%rax, 48(%r12)
	movq	16(%r12), %rdi
	movl	$3, %esi
	callq	_pci_irq_vector
	movq	%rax, 40(%r12)
	movl	(%r15), %r15d
	movl	$0, %eax
	cmpl	%r15d, %r14d
	jbe	LBB0_6
## %bb.3:
	subl	%r15d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	leal	(%r15,%rbx), %esi
	movq	16(%r12), %rdi
	callq	_pci_irq_vector
	movq	32(%r12), %rcx
	movq	%rax, (%rcx,%rbx,8)
	incq	%rbx
	cmpl	%ebx, %r14d
	jne	LBB0_4
## %bb.5:
	movl	%r14d, %eax
LBB0_6:
	movl	%eax, 8(%r12)
	movl	$1, 12(%r12)
	movq	_XGBE_IRQ_MODE_LEVEL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%r12)
	movq	%r12, %rdi
	callq	_netif_msg_probe
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movl	24(%r12), %edi
	movq	16(%r12), %rax
	cmpq	$0, (%rax)
	leaq	L_.str.3(%rip), %rax
	leaq	L_.str.2(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_dbg
LBB0_8:
	xorl	%r14d, %r14d
	jmp	LBB0_9
LBB0_1:
	movl	24(%r12), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_info
LBB0_9:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XGBE_MSI_BASE_COUNT,4,2        ## @XGBE_MSI_BASE_COUNT
	.comm	_XGBE_MSI_MIN_COUNT,4,2         ## @XGBE_MSI_MIN_COUNT
	.comm	_PCI_IRQ_MSI,4,2                ## @PCI_IRQ_MSI
	.comm	_PCI_IRQ_MSIX,4,2               ## @PCI_IRQ_MSIX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"multi MSI/MSI-X enablement failed\n"

	.comm	_XGBE_IRQ_MODE_LEVEL,4,2        ## @XGBE_IRQ_MODE_LEVEL
L_.str.1:                               ## @.str.1
	.asciz	"multi %s interrupts enabled\n"

L_.str.2:                               ## @.str.2
	.asciz	"MSI-X"

L_.str.3:                               ## @.str.3
	.asciz	"MSI"

	.no_dead_strip	_xgbe_config_multi_msi
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xgbe_config_multi_msi
_xgbe_config_multi_msi:                 ; @xgbe_config_multi_msi
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
Lloh0:
	adrp	x22, _XGBE_MSI_BASE_COUNT@GOTPAGE
Lloh1:
	ldr	x22, [x22, _XGBE_MSI_BASE_COUNT@GOTPAGEOFF]
	ldr	w20, [x22]
	ldr	w0, [x0, #76]
	ldr	w1, [x19, #72]
	bl	_max
	add	w2, w20, w0
	ldr	x0, [x19, #16]
Lloh2:
	adrp	x8, _XGBE_MSI_MIN_COUNT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _XGBE_MSI_MIN_COUNT@GOTPAGEOFF]
Lloh4:
	adrp	x9, _PCI_IRQ_MSI@GOTPAGE
Lloh5:
	ldr	x9, [x9, _PCI_IRQ_MSI@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
Lloh7:
	ldr	w8, [x9]
Lloh8:
	adrp	x9, _PCI_IRQ_MSIX@GOTPAGE
Lloh9:
	ldr	x9, [x9, _PCI_IRQ_MSIX@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w3, w9, w8
	bl	_pci_alloc_irq_vectors
	mov	x20, x0
	tbnz	w0, #31, LBB0_7
; %bb.1:
	mov	w21, #1
	stp	w21, w20, [x19]
	ldr	x0, [x19, #16]
	mov	w1, #0
	bl	_pci_irq_vector
	str	x0, [x19, #64]
	ldr	x0, [x19, #16]
	mov	w1, #1
	bl	_pci_irq_vector
	str	x0, [x19, #56]
	ldr	x0, [x19, #16]
	mov	w1, #2
	bl	_pci_irq_vector
	str	x0, [x19, #48]
	ldr	x0, [x19, #16]
	mov	w1, #3
	bl	_pci_irq_vector
	mov	w23, #0
	str	x0, [x19, #40]
	ldr	w22, [x22]
	cmp	w20, w22
	b.ls	LBB0_4
; %bb.2:
	mov	x24, #0
	sub	w23, w20, w22
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	w1, w22, w24
	ldr	x0, [x19, #16]
	bl	_pci_irq_vector
	ldr	x8, [x19, #32]
	str	x0, [x8, x24, lsl #3]
	add	x24, x24, #1
	cmp	w23, w24
	b.ne	LBB0_3
LBB0_4:
	stp	w23, w21, [x19, #8]
Lloh11:
	adrp	x8, _XGBE_IRQ_MODE_LEVEL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _XGBE_IRQ_MODE_LEVEL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [x19, #28]
	mov	x0, x19
	bl	_netif_msg_probe
	cbz	x0, LBB0_6
; %bb.5:
	ldr	w0, [x19, #24]
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
Lloh14:
	adrp	x9, l_.str.2@PAGE
Lloh15:
	add	x9, x9, l_.str.2@PAGEOFF
Lloh16:
	adrp	x10, l_.str.3@PAGE
Lloh17:
	add	x10, x10, l_.str.3@PAGEOFF
	cmp	x8, #0
	csel	x2, x10, x9, eq
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
LBB0_6:
	mov	w20, #0
	b	LBB0_8
LBB0_7:
	ldr	w0, [x19, #24]
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_info
LBB0_8:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_XGBE_MSI_BASE_COUNT,4,2        ; @XGBE_MSI_BASE_COUNT
	.comm	_XGBE_MSI_MIN_COUNT,4,2         ; @XGBE_MSI_MIN_COUNT
	.comm	_PCI_IRQ_MSI,4,2                ; @PCI_IRQ_MSI
	.comm	_PCI_IRQ_MSIX,4,2               ; @PCI_IRQ_MSIX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"multi MSI/MSI-X enablement failed\n"

	.comm	_XGBE_IRQ_MODE_LEVEL,4,2        ; @XGBE_IRQ_MODE_LEVEL
l_.str.1:                               ; @.str.1
	.asciz	"multi %s interrupts enabled\n"

l_.str.2:                               ; @.str.2
	.asciz	"MSI-X"

l_.str.3:                               ; @.str.3
	.asciz	"MSI"

	.no_dead_strip	_xgbe_config_multi_msi
.subsections_via_symbols
