	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function enable_msix
_enable_msix:                           ## @enable_msix
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	_MSIX_ENTRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	leaq	(,%r15,8), %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	testl	%r15d, %r15d
	jle	LBB0_7
## %bb.1:
	leaq	-1(%r15), %rcx
	movl	%r15d, %eax
	andl	$7, %eax
	cmpq	$7, %rcx
	jae	LBB0_3
## %bb.2:
	xorl	%ecx, %ecx
	jmp	LBB0_5
LBB0_3:
	andl	$-8, %r15d
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ecx, (%rbx,%rcx,8)
	leal	1(%rcx), %edx
	movl	%edx, 8(%rbx,%rcx,8)
	leal	2(%rcx), %edx
	movl	%edx, 16(%rbx,%rcx,8)
	leal	3(%rcx), %edx
	movl	%edx, 24(%rbx,%rcx,8)
	leal	4(%rcx), %edx
	movl	%edx, 32(%rbx,%rcx,8)
	leal	5(%rcx), %edx
	movl	%edx, 40(%rbx,%rcx,8)
	leal	6(%rcx), %edx
	movl	%edx, 48(%rbx,%rcx,8)
	leal	7(%rcx), %edx
	movl	%edx, 56(%rbx,%rcx,8)
	addq	$8, %rcx
	cmpq	%r15, %rcx
	jne	LBB0_4
LBB0_5:
	testq	%rax, %rax
	je	LBB0_7
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ecx, (%rbx,%rcx,8)
	incq	%rcx
	decq	%rax
	jne	LBB0_6
LBB0_7:
	movq	_MSIX_EXTRAS@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movl	20(%r14), %ecx
	addl	%edx, %ecx
	addl	16(%r14), %edx
	movl	12(%r14), %edi
	movq	%rbx, %rsi
	callq	_pci_enable_msix_range
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_18
## %bb.8:
	movl	(%r12), %eax
	movl	%r15d, %r12d
	subl	%eax, %r12d
	cmpl	20(%r14), %r12d
	jge	LBB0_11
## %bb.9:
	movl	8(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r12d, %edx
	callq	_dev_warn
	movl	%r12d, 20(%r14)
	cmpl	24(%r14), %r12d
	jge	LBB0_11
## %bb.10:
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_reduce_ethqs
LBB0_11:
	testl	%r15d, %r15d
	je	LBB0_17
## %bb.12:
	movq	(%r14), %rax
	movl	%r15d, %ecx
	cmpl	$9, %r15d
	jae	LBB0_14
## %bb.13:
	xorl	%edx, %edx
	jmp	LBB0_16
LBB0_14:
	movl	%ecx, %edx
	andl	$7, %edx
	testq	%rdx, %rdx
	movl	$8, %esi
	cmovneq	%rdx, %rsi
	movq	%rcx, %rdx
	subq	%rsi, %rdx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movups	4(%rbx,%rsi,8), %xmm0
	movups	20(%rbx,%rsi,8), %xmm1
	shufps	$136, %xmm1, %xmm0              ## xmm0 = xmm0[0,2],xmm1[0,2]
	movups	36(%rbx,%rsi,8), %xmm1
	movups	52(%rbx,%rsi,8), %xmm2
	shufps	$136, %xmm2, %xmm1              ## xmm1 = xmm1[0,2],xmm2[0,2]
	movups	%xmm0, (%rax,%rsi,4)
	movups	%xmm1, 16(%rax,%rsi,4)
	addq	$8, %rsi
	cmpq	%rsi, %rdx
	jne	LBB0_15
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movl	4(%rbx,%rdx,8), %esi
	movl	%esi, (%rax,%rdx,4)
	incq	%rdx
	cmpq	%rdx, %rcx
	jne	LBB0_16
LBB0_17:
	xorl	%r15d, %r15d
LBB0_18:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_20
## %bb.19:
	movl	%r15d, %eax
	leaq	-32(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MSIX_ENTRIES,4,2               ## @MSIX_ENTRIES
	.comm	_MSIX_EXTRAS,4,2                ## @MSIX_EXTRAS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"only enough MSI-X vectors for %d Queue Sets\n"

	.no_dead_strip	_enable_msix
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function enable_msix
_enable_msix:                           ; @enable_msix
	.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
	sub	sp, sp, #16
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x8, _MSIX_ENTRIES@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MSIX_ENTRIES@GOTPAGEOFF]
Lloh5:
	ldr	w12, [x8]
	lsl	x8, x12, #3
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xffffffff0
	sub	x19, x9, x8
	mov	sp, x19
	cmp	w12, #1
	b.lt	LBB0_8
; %bb.1:
	cmp	w12, #4
	b.hs	LBB0_3
; %bb.2:
	mov	x8, #0
	b	LBB0_6
LBB0_3:
	mov	x9, #0
	and	x8, x12, #0xfffffffc
	add	x10, x19, #16
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	w11, w9, #1
	add	w13, w9, #2
	add	w14, w9, #3
	stur	w9, [x10, #-16]
	stur	w11, [x10, #-8]
	str	w13, [x10]
	str	w14, [x10, #8]
	add	x9, x9, #4
	add	x10, x10, #32
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.5:
	cmp	x8, x12
	b.eq	LBB0_8
LBB0_6:
	add	x9, x19, x8, lsl #3
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	str	w8, [x9], #8
	add	x8, x8, #1
	cmp	x12, x8
	b.ne	LBB0_7
LBB0_8:
Lloh8:
	adrp	x22, _MSIX_EXTRAS@GOTPAGE
Lloh9:
	ldr	x22, [x22, _MSIX_EXTRAS@GOTPAGEOFF]
	ldr	w8, [x20, #20]
	ldr	w9, [x22]
	add	w3, w9, w8
	ldp	w0, w8, [x20, #12]
	add	w2, w8, w9
	mov	x1, x19
	bl	_pci_enable_msix_range
	mov	x21, x0
	tbnz	w0, #31, LBB0_20
; %bb.9:
	ldr	w8, [x22]
	ldr	w9, [x20, #20]
	sub	w22, w21, w8
	cmp	w22, w9
	b.ge	LBB0_12
; %bb.10:
	ldr	w0, [x20, #8]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x22
	bl	_dev_warn
	str	w22, [x20, #20]
	ldr	w8, [x20, #24]
	cmp	w22, w8
	b.ge	LBB0_12
; %bb.11:
	mov	x0, x20
	mov	x1, x22
	bl	_reduce_ethqs
LBB0_12:
	cbz	w21, LBB0_20
; %bb.13:
	ldr	x9, [x20]
	mov	w8, w21
	cmp	w21, #17
	b.hs	LBB0_15
; %bb.14:
	mov	x10, #0
	b	LBB0_17
LBB0_15:
	ands	x10, x8, #0xf
	mov	w11, #16
	csel	x10, x11, x10, eq
	sub	x10, x8, x10
	add	x13, x19, #68
	add	x11, x9, #32
	mov	x12, x10
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	sub	x14, x13, #64
	ld2.4s	{ v0, v1 }, [x14]
	sub	x14, x13, #32
	ld2.4s	{ v2, v3 }, [x14]
	add	x14, x13, #128
	ld2.4s	{ v4, v5 }, [x13], #32
	ld2.4s	{ v6, v7 }, [x13]
	stp	q0, q2, [x11, #-32]
	stp	q4, q6, [x11], #64
	mov	x13, x14
	subs	x12, x12, #16
	b.ne	LBB0_16
LBB0_17:
	add	x11, x19, x10, lsl #3
	add	x11, x11, #4
	add	x9, x9, x10, lsl #2
	sub	x8, x8, x10
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x11], #8
	str	w10, [x9], #4
	subs	x8, x8, #1
	b.ne	LBB0_18
; %bb.19:
	mov	w21, #0
LBB0_20:
	ldur	x8, [x29, #-40]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_22
; %bb.21:
	mov	x0, x21
	sub	sp, x29, #32
	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
LBB0_22:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_MSIX_ENTRIES,4,2               ; @MSIX_ENTRIES
	.comm	_MSIX_EXTRAS,4,2                ; @MSIX_EXTRAS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"only enough MSI-X vectors for %d Queue Sets\n"

	.no_dead_strip	_enable_msix
.subsections_via_symbols
