	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function be_msix_enable
LCPI0_0:
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.long	2                               ## 0x2
	.long	3                               ## 0x3
LCPI0_1:
	.long	4                               ## 0x4
	.long	4                               ## 0x4
	.long	4                               ## 0x4
	.long	4                               ## 0x4
LCPI0_2:
	.long	8                               ## 0x8
	.long	8                               ## 0x8
	.long	8                               ## 0x8
	.long	8                               ## 0x8
LCPI0_3:
	.long	12                              ## 0xc
	.long	12                              ## 0xc
	.long	12                              ## 0xc
	.long	12                              ## 0xc
LCPI0_4:
	.long	16                              ## 0x10
	.long	16                              ## 0x10
	.long	16                              ## 0x10
	.long	16                              ## 0x10
LCPI0_5:
	.long	20                              ## 0x14
	.long	20                              ## 0x14
	.long	20                              ## 0x14
	.long	20                              ## 0x14
LCPI0_6:
	.long	24                              ## 0x18
	.long	24                              ## 0x18
	.long	24                              ## 0x18
	.long	24                              ## 0x18
LCPI0_7:
	.long	28                              ## 0x1c
	.long	28                              ## 0x1c
	.long	28                              ## 0x1c
	.long	28                              ## 0x1c
LCPI0_8:
	.long	32                              ## 0x20
	.long	32                              ## 0x20
	.long	32                              ## 0x20
	.long	32                              ## 0x20
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_be_msix_enable:                        ## @be_msix_enable
	.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, %r15
	movq	16(%rdi), %r14
	callq	_be_roce_supported
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	callq	_be_max_func_eqs
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_be_max_nic_eqs
	subl	%eax, %ebx
	xorl	%eax, %eax
	callq	_num_online_cpus
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_min
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_be_max_any_irqs
	addl	%ebx, %eax
	jmp	LBB0_3
LBB0_2:
	movl	24(%r15), %esi
	movl	28(%r15), %edi
	callq	_max
LBB0_3:
	movq	8(%r15), %rsi
	testl	%eax, %eax
	je	LBB0_15
## %bb.4:
	movl	%eax, %ecx
	cmpl	$8, %eax
	jae	LBB0_6
## %bb.5:
	xorl	%edx, %edx
	jmp	LBB0_14
LBB0_6:
	movl	%ecx, %edx
	andl	$-8, %edx
	leaq	-8(%rdx), %rbx
	movq	%rbx, %rdi
	shrq	$3, %rdi
	incq	%rdi
	movl	%edi, %r8d
	andl	$3, %r8d
	cmpq	$24, %rbx
	jae	LBB0_8
## %bb.7:
	movdqa	LCPI0_0(%rip), %xmm0            ## xmm0 = [0,1,2,3]
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_8:
	andq	$-4, %rdi
	movdqa	LCPI0_0(%rip), %xmm0            ## xmm0 = [0,1,2,3]
	xorl	%ebx, %ebx
	movdqa	LCPI0_1(%rip), %xmm8            ## xmm8 = [4,4,4,4]
	movdqa	LCPI0_2(%rip), %xmm9            ## xmm9 = [8,8,8,8]
	movdqa	LCPI0_3(%rip), %xmm10           ## xmm10 = [12,12,12,12]
	movdqa	LCPI0_4(%rip), %xmm4            ## xmm4 = [16,16,16,16]
	movdqa	LCPI0_5(%rip), %xmm5            ## xmm5 = [20,20,20,20]
	movdqa	LCPI0_6(%rip), %xmm6            ## xmm6 = [24,24,24,24]
	movdqa	LCPI0_7(%rip), %xmm7            ## xmm7 = [28,28,28,28]
	movdqa	LCPI0_8(%rip), %xmm1            ## xmm1 = [32,32,32,32]
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movdqa	%xmm0, %xmm2
	paddd	%xmm8, %xmm2
	movdqu	%xmm0, (%rsi,%rbx,4)
	movdqu	%xmm2, 16(%rsi,%rbx,4)
	movdqa	%xmm0, %xmm2
	paddd	%xmm9, %xmm2
	movdqa	%xmm0, %xmm3
	paddd	%xmm10, %xmm3
	movdqu	%xmm2, 32(%rsi,%rbx,4)
	movdqu	%xmm3, 48(%rsi,%rbx,4)
	movdqa	%xmm0, %xmm2
	paddd	%xmm4, %xmm2
	movdqa	%xmm0, %xmm3
	paddd	%xmm5, %xmm3
	movdqu	%xmm2, 64(%rsi,%rbx,4)
	movdqu	%xmm3, 80(%rsi,%rbx,4)
	movdqa	%xmm0, %xmm2
	paddd	%xmm6, %xmm2
	movdqa	%xmm0, %xmm3
	paddd	%xmm7, %xmm3
	movdqu	%xmm2, 96(%rsi,%rbx,4)
	movdqu	%xmm3, 112(%rsi,%rbx,4)
	addq	$32, %rbx
	paddd	%xmm1, %xmm0
	addq	$-4, %rdi
	jne	LBB0_9
LBB0_10:
	testq	%r8, %r8
	je	LBB0_13
## %bb.11:
	leaq	(%rsi,%rbx,4), %rdi
	addq	$16, %rdi
	shlq	$5, %r8
	xorl	%ebx, %ebx
	movdqa	LCPI0_1(%rip), %xmm1            ## xmm1 = [4,4,4,4]
	movdqa	LCPI0_2(%rip), %xmm2            ## xmm2 = [8,8,8,8]
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movdqa	%xmm0, %xmm3
	paddd	%xmm1, %xmm3
	movdqu	%xmm0, -16(%rdi,%rbx)
	movdqu	%xmm3, (%rdi,%rbx)
	paddd	%xmm2, %xmm0
	addq	$32, %rbx
	cmpq	%rbx, %r8
	jne	LBB0_12
LBB0_13:
	cmpq	%rcx, %rdx
	je	LBB0_15
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	%edx, (%rsi,%rdx,4)
	incq	%rdx
	cmpq	%rdx, %rcx
	jne	LBB0_14
LBB0_15:
	movq	16(%r15), %rdi
	movq	_MIN_MSIX_VECTORS@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movl	%eax, %ecx
	callq	_pci_enable_msix_range
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_20
## %bb.16:
	movq	%r15, %rdi
	callq	_be_roce_supported
	testq	%rax, %rax
	je	LBB0_19
## %bb.17:
	cmpl	(%r12), %ebx
	jle	LBB0_19
## %bb.18:
	movl	%ebx, %edx
	shrl	%edx
	movl	%edx, (%r15)
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_info
LBB0_19:
	movl	(%r15), %eax
	subl	%eax, %ebx
	movl	%ebx, 4(%r15)
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_dev_info
	xorl	%ebx, %ebx
	jmp	LBB0_21
LBB0_20:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_warn
	movq	%r15, %rdi
	callq	_be_virtfn
	xorl	%ecx, %ecx
	testq	%rax, %rax
	cmovel	%ecx, %ebx
LBB0_21:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MIN_MSIX_VECTORS,4,2           ## @MIN_MSIX_VECTORS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"enabled %d MSI-x vector(s) for RoCE\n"

L_.str.1:                               ## @.str.1
	.asciz	"enabled %d MSI-x vector(s) for NIC\n"

L_.str.2:                               ## @.str.2
	.asciz	"MSIx enable failed\n"

	.no_dead_strip	_be_msix_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function be_msix_enable
lCPI0_0:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.long	2                               ; 0x2
	.long	3                               ; 0x3
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_be_msix_enable:                        ; @be_msix_enable
	.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, #16]
	bl	_be_roce_supported
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_be_max_func_eqs
	mov	x21, x0
	mov	x0, x19
	bl	_be_max_nic_eqs
	sub	w21, w21, w0
	bl	_num_online_cpus
	mov	x1, x0
	mov	x0, x21
	bl	_min
	mov	x21, x0
	mov	x0, x19
	bl	_be_max_any_irqs
	add	w3, w0, w21
	ldr	x1, [x19, #8]
	cbnz	w3, LBB0_3
	b	LBB0_9
LBB0_2:
	ldp	w1, w0, [x19, #24]
	bl	_max
	mov	x3, x0
	ldr	x1, [x19, #8]
	cbz	w3, LBB0_9
LBB0_3:
	mov	w8, w3
	cmp	w3, #16
	b.hs	LBB0_5
; %bb.4:
	mov	x9, #0
	b	LBB0_8
LBB0_5:
	and	x9, x8, #0xfffffff0
Lloh0:
	adrp	x10, lCPI0_0@PAGE
Lloh1:
	ldr	q0, [x10, lCPI0_0@PAGEOFF]
	add	x10, x1, #32
	movi.4s	v1, #4
	movi.4s	v2, #8
	movi.4s	v3, #12
	movi.4s	v4, #16
	mov	x11, x9
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	add.4s	v5, v0, v1
	add.4s	v6, v0, v2
	add.4s	v7, v0, v3
	stp	q0, q5, [x10, #-32]
	stp	q6, q7, [x10], #64
	add.4s	v0, v0, v4
	subs	x11, x11, #16
	b.ne	LBB0_6
; %bb.7:
	cmp	x9, x8
	b.eq	LBB0_9
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	str	w9, [x1, x9, lsl #2]
	add	x9, x9, #1
	cmp	x8, x9
	b.ne	LBB0_8
LBB0_9:
	ldr	x0, [x19, #16]
Lloh2:
	adrp	x22, _MIN_MSIX_VECTORS@GOTPAGE
Lloh3:
	ldr	x22, [x22, _MIN_MSIX_VECTORS@GOTPAGEOFF]
	ldr	w2, [x22]
	bl	_pci_enable_msix_range
	mov	x21, x0
	tbnz	w0, #31, LBB0_14
; %bb.10:
	mov	x0, x19
	bl	_be_roce_supported
	cbz	x0, LBB0_13
; %bb.11:
	ldr	w8, [x22]
	cmp	w21, w8
	b.le	LBB0_13
; %bb.12:
	lsr	w2, w21, #1
	str	w2, [x19]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_info
LBB0_13:
	ldr	w8, [x19]
	sub	w2, w21, w8
	str	w2, [x19, #4]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_info
	mov	w0, #0
	b	LBB0_15
LBB0_14:
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_warn
	mov	x0, x19
	bl	_be_virtfn
	cmp	x0, #0
	csel	w0, wzr, w21, eq
LBB0_15:
	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 AdrpLdr	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_MIN_MSIX_VECTORS,4,2           ; @MIN_MSIX_VECTORS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"enabled %d MSI-x vector(s) for RoCE\n"

l_.str.1:                               ; @.str.1
	.asciz	"enabled %d MSI-x vector(s) for NIC\n"

l_.str.2:                               ; @.str.2
	.asciz	"MSIx enable failed\n"

	.no_dead_strip	_be_msix_enable
.subsections_via_symbols
