	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function be_calculate_vf_res
_be_calculate_vf_res:                   ## @be_calculate_vf_res
	.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
	subq	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
                                        ## kill: def $esi killed $esi def $rsi
	movq	%rdi, %r15
	movl	(%rdi), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	4(%rdi), %eax
	movl	8(%rdi), %r12d
	movl	16(%rdi), %ecx
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	20(%rdi), %ecx
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movq	24(%rdi), %rcx
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	movq	32(%rdi), %rcx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	40(%rdi), %rcx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	48(%rdi), %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -112(%rbp)
	movaps	%xmm0, -128(%rbp)
	movaps	%xmm0, -144(%rbp)
	movaps	%xmm0, -160(%rbp)
	movl	$1, %r13d
	movq	%rsi, %rbx
	testl	%esi, %esi
	je	LBB0_2
## %bb.1:
	movq	_SH_VF_MAX_NIC_EQS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leal	1(%rbx), %ecx
	cltd
	idivl	%ecx
	movl	%eax, %esi
	callq	_min
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	movq	%rbx, %r14
	movl	%r12d, %ebx
	movl	%eax, %r12d
	movq	%r15, %rdi
	callq	_be_max_pf_pool_rss_tables
	cmpl	%r14d, %eax
	movl	$1, %r13d
	cmovgl	%r12d, %r13d
	movl	%ebx, %r12d
	movq	%r14, %rbx
	movq	-88(%rbp), %r14                 ## 8-byte Reload
LBB0_2:
	movq	_ACTIVE_PROFILE_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_RESOURCE_MODIFIABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	-160(%rbp), %rsi
	movq	%r15, %rdi
	xorl	%edx, %edx
	xorl	%r9d, %r9d
	callq	_be_cmd_get_profile_config
	movq	_BE_IF_FLAGS_RSS@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	testl	%eax, -160(%rbp)
	je	LBB0_3
## %bb.4:
	movq	_IF_CAPS_FLAGS_VALID_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	orl	%eax, 56(%r14)
	movl	(%r15), %eax
	cmpl	$2, %r13d
	jl	LBB0_6
## %bb.5:
	orl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	movq	_BE_IF_FLAGS_DEFQ_RSS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%ecx, %r12d
	cmovnel	%ecx, %r12d
	orl	%eax, %r12d
	jmp	LBB0_7
LBB0_3:
	movl	$1, %r13d
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	jmp	LBB0_7
LBB0_6:
	movq	_BE_IF_FLAGS_DEFQ_RSS@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	notl	%eax
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	andl	%eax, %r12d
LBB0_7:
	movq	_BE_IF_FLAGS_VLAN_PROMISCUOUS@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	testl	%eax, -160(%rbp)
	je	LBB0_9
## %bb.8:
	movq	_IF_CAPS_FLAGS_VALID_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	orl	%eax, 56(%r14)
	movl	(%r15), %eax
	notl	%eax
	andl	%eax, %r12d
LBB0_9:
	movq	-80(%rbp), %r8                  ## 8-byte Reload
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%r12d, (%r14)
	movl	%r13d, 12(%r14)
	movl	%r13d, 4(%r14)
	incl	%ebx
	cltd
	idivl	%ebx
	movl	%eax, 16(%r14)
	movl	%ecx, %eax
	cltd
	idivl	%ebx
	movl	%eax, 20(%r14)
	movq	_FIELD_MODIFIABLE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%rbx, %r9
	movslq	%ebx, %rcx
	cmpq	%rsi, -136(%rbp)
	je	LBB0_10
## %bb.14:
	cmpq	%rsi, -128(%rbp)
	je	LBB0_15
LBB0_19:
	cmpq	%rsi, -120(%rbp)
	je	LBB0_20
LBB0_24:
	cmpq	%rsi, -112(%rbp)
	je	LBB0_25
	jmp	LBB0_29
LBB0_10:
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_11
## %bb.12:
	cqto
	idivq	%rcx
	jmp	LBB0_13
LBB0_11:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%r9d
                                        ## kill: def $eax killed $eax def $rax
LBB0_13:
	movq	%rax, 24(%r14)
	cmpq	%rsi, -128(%rbp)
	jne	LBB0_19
LBB0_15:
	movq	%rdi, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_16
## %bb.17:
	movq	%rdi, %rax
	cqto
	idivq	%rcx
	jmp	LBB0_18
LBB0_16:
	movl	%edi, %eax
	xorl	%edx, %edx
	divl	%r9d
                                        ## kill: def $eax killed $eax def $rax
LBB0_18:
	movq	%rax, 32(%r14)
	cmpq	%rsi, -120(%rbp)
	jne	LBB0_24
LBB0_20:
	movq	%r8, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_21
## %bb.22:
	movq	%r8, %rax
	cqto
	idivq	%rcx
	jmp	LBB0_23
LBB0_21:
	movl	%r8d, %eax
	xorl	%edx, %edx
	divl	%r9d
                                        ## kill: def $eax killed $eax def $rax
LBB0_23:
	movq	%rax, 40(%r14)
	cmpq	%rsi, -112(%rbp)
	jne	LBB0_29
LBB0_25:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_26
## %bb.27:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	cqto
	idivq	%rcx
	jmp	LBB0_28
LBB0_26:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%r9d
                                        ## kill: def $eax killed $eax def $rax
LBB0_28:
	movq	%rax, 48(%r14)
LBB0_29:
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SH_VF_MAX_NIC_EQS,4,2          ## @SH_VF_MAX_NIC_EQS
	.comm	_ACTIVE_PROFILE_TYPE,4,2        ## @ACTIVE_PROFILE_TYPE
	.comm	_RESOURCE_MODIFIABLE,4,2        ## @RESOURCE_MODIFIABLE
	.comm	_BE_IF_FLAGS_RSS,4,2            ## @BE_IF_FLAGS_RSS
	.comm	_IF_CAPS_FLAGS_VALID_SHIFT,4,2  ## @IF_CAPS_FLAGS_VALID_SHIFT
	.comm	_BE_IF_FLAGS_DEFQ_RSS,4,2       ## @BE_IF_FLAGS_DEFQ_RSS
	.comm	_BE_IF_FLAGS_VLAN_PROMISCUOUS,4,2 ## @BE_IF_FLAGS_VLAN_PROMISCUOUS
	.comm	_FIELD_MODIFIABLE,8,3           ## @FIELD_MODIFIABLE
	.no_dead_strip	_be_calculate_vf_res
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function be_calculate_vf_res
_be_calculate_vf_res:                   ; @be_calculate_vf_res
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	x28, x27, [sp, #96]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #112]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #128]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldp	w23, w8, [x0]
	ldr	w24, [x0, #8]
	ldp	w28, w27, [x0, #16]
	ldp	x26, x10, [x0, #24]
	ldr	x9, [x0, #40]
	stp	x10, x9, [sp, #8]               ; 16-byte Folded Spill
	ldr	x9, [x0, #48]
	str	x9, [sp, #24]                   ; 8-byte Folded Spill
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #64]
	stp	q0, q0, [sp, #32]
	cbz	w1, LBB0_2
; %bb.1:
Lloh0:
	adrp	x9, _SH_VF_MAX_NIC_EQS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SH_VF_MAX_NIC_EQS@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x9]
	add	w9, w20, #1
	sdiv	w1, w8, w9
	bl	_min
	mov	x22, x0
	mov	x0, x21
	bl	_be_max_pf_pool_rss_tables
	cmp	w0, w20
	csinc	w22, w22, wzr, gt
	b	LBB0_3
LBB0_2:
	mov	w22, #1
LBB0_3:
Lloh3:
	adrp	x8, _ACTIVE_PROFILE_TYPE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ACTIVE_PROFILE_TYPE@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
Lloh6:
	adrp	x8, _RESOURCE_MODIFIABLE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RESOURCE_MODIFIABLE@GOTPAGEOFF]
Lloh8:
	ldr	w4, [x8]
	add	x1, sp, #32
	mov	x0, x21
	mov	x2, #0
	mov	w5, #0
	bl	_be_cmd_get_profile_config
	ldr	w8, [sp, #32]
Lloh9:
	adrp	x25, _BE_IF_FLAGS_RSS@GOTPAGE
Lloh10:
	ldr	x25, [x25, _BE_IF_FLAGS_RSS@GOTPAGEOFF]
	ldr	w9, [x25]
Lloh11:
	adrp	x21, _IF_CAPS_FLAGS_VALID_SHIFT@GOTPAGE
Lloh12:
	ldr	x21, [x21, _IF_CAPS_FLAGS_VALID_SHIFT@GOTPAGEOFF]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.4:
	ldr	w0, [x21]
	bl	_BIT
	ldr	w8, [x19, #56]
	orr	w8, w8, w0
	str	w8, [x19, #56]
	ldr	w8, [x25]
	cmp	w22, #2
	b.lt	LBB0_7
; %bb.5:
	orr	w8, w8, w23
Lloh13:
	adrp	x9, _BE_IF_FLAGS_DEFQ_RSS@GOTPAGE
Lloh14:
	ldr	x9, [x9, _BE_IF_FLAGS_DEFQ_RSS@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w24
	csel	w9, wzr, w9, eq
	orr	w23, w8, w9
	b	LBB0_8
LBB0_6:
	mov	w22, #1
	b	LBB0_8
LBB0_7:
Lloh16:
	adrp	x9, _BE_IF_FLAGS_DEFQ_RSS@GOTPAGE
Lloh17:
	ldr	x9, [x9, _BE_IF_FLAGS_DEFQ_RSS@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w23, w23, w8
LBB0_8:
	ldr	w8, [sp, #32]
Lloh19:
	adrp	x24, _BE_IF_FLAGS_VLAN_PROMISCUOUS@GOTPAGE
Lloh20:
	ldr	x24, [x24, _BE_IF_FLAGS_VLAN_PROMISCUOUS@GOTPAGEOFF]
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.9:
	ldr	w0, [x21]
	bl	_BIT
	ldr	w8, [x19, #56]
	orr	w8, w8, w0
	str	w8, [x19, #56]
	ldr	w8, [x24]
	bic	w23, w23, w8
LBB0_10:
	stp	w23, w22, [x19]
	add	w8, w20, #1
	sdiv	w9, w28, w8
	stp	w22, w9, [x19, #12]
	sdiv	w9, w27, w8
	str	w9, [x19, #20]
	ldr	x10, [sp, #56]
Lloh21:
	adrp	x9, _FIELD_MODIFIABLE@GOTPAGE
Lloh22:
	ldr	x9, [x9, _FIELD_MODIFIABLE@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x10, x9
	b.ne	LBB0_12
; %bb.11:
	sxtw	x10, w8
	sdiv	x10, x26, x10
	str	x10, [x19, #24]
LBB0_12:
	ldr	x10, [sp, #64]
	cmp	x10, x9
	b.ne	LBB0_14
; %bb.13:
	mov	x10, x8
	sxtw	x10, w10
	ldr	x11, [sp, #8]                   ; 8-byte Folded Reload
	sdiv	x10, x11, x10
	str	x10, [x19, #32]
LBB0_14:
	ldr	x10, [sp, #72]
	cmp	x10, x9
	b.ne	LBB0_16
; %bb.15:
	mov	x10, x8
	sxtw	x10, w10
	ldr	x11, [sp, #16]                  ; 8-byte Folded Reload
	sdiv	x10, x11, x10
	str	x10, [x19, #40]
LBB0_16:
	ldr	x10, [sp, #80]
	cmp	x10, x9
	b.ne	LBB0_18
; %bb.17:
                                        ; kill: def $w8 killed $w8 killed $x8 def $x8
	sxtw	x8, w8
	ldr	x9, [sp, #24]                   ; 8-byte Folded Reload
	sdiv	x8, x9, x8
	str	x8, [x19, #48]
LBB0_18:
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #128]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #112]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_SH_VF_MAX_NIC_EQS,4,2          ; @SH_VF_MAX_NIC_EQS
	.comm	_ACTIVE_PROFILE_TYPE,4,2        ; @ACTIVE_PROFILE_TYPE
	.comm	_RESOURCE_MODIFIABLE,4,2        ; @RESOURCE_MODIFIABLE
	.comm	_BE_IF_FLAGS_RSS,4,2            ; @BE_IF_FLAGS_RSS
	.comm	_IF_CAPS_FLAGS_VALID_SHIFT,4,2  ; @IF_CAPS_FLAGS_VALID_SHIFT
	.comm	_BE_IF_FLAGS_DEFQ_RSS,4,2       ; @BE_IF_FLAGS_DEFQ_RSS
	.comm	_BE_IF_FLAGS_VLAN_PROMISCUOUS,4,2 ; @BE_IF_FLAGS_VLAN_PROMISCUOUS
	.comm	_FIELD_MODIFIABLE,8,3           ; @FIELD_MODIFIABLE
	.no_dead_strip	_be_calculate_vf_res
.subsections_via_symbols
