	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function BEx_get_resources
_BEx_get_resources:                     ## @BEx_get_resources
	.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	%rsi, %r14
	movq	%rdi, %rbx
	movq	16(%rdi), %r12
	callq	_BE3_chip
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rbx, %rdi
	callq	_be_physfn
	xorl	%r15d, %r15d
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movq	%r12, %rdi
	callq	_pci_sriov_get_totalvfs
	testl	%eax, %eax
	jle	LBB0_5
## %bb.4:
	movq	_MAX_VFS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movl	%eax, %esi
	callq	_min
	movl	%eax, %r15d
LBB0_5:
	movl	%r15d, 40(%r14)
	testl	%r15d, %r15d
	setne	%al
	movq	_num_vfs@GOTPCREL(%rip), %rcx
	cmpq	$0, (%rcx)
	setne	%r15b
	andb	%al, %r15b
	jmp	LBB0_6
LBB0_1:
	xorl	%r15d, %r15d
LBB0_6:
	movq	%rbx, %rdi
	callq	_be_physfn
	testq	%rax, %rax
	jne	LBB0_7
## %bb.8:
	movq	_BE_VF_UC_PMAC_COUNT@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	_BE_UC_PMAC_COUNT@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
	movl	%eax, 36(%r14)
	movq	_FLEX10_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_BE_NUM_VLANS_SUPPORTED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%ecx, (%rbx)
	je	LBB0_11
## %bb.10:
	leal	7(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$3, %ecx
	movl	%ecx, %eax
LBB0_11:
	movl	%eax, (%r14)
	movq	_BE_MAX_MC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r14)
	movq	%rbx, %rdi
	callq	_BE2_chip
	testq	%rax, %rax
	setne	%al
	orb	%r15b, %al
	movl	$1, %r12d
	jne	LBB0_15
## %bb.12:
	movq	%rbx, %rdi
	callq	_be_is_mc
	testq	%rax, %rax
	jne	LBB0_15
## %bb.13:
	movq	%rbx, %rdi
	callq	_be_physfn
	movl	$1, %r12d
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movq	_BE3_MAX_TX_QS@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_15:
	movl	%r12d, 4(%r14)
	movq	_BE_FUNCTION_CAPS_RSS@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	testl	%eax, 4(%rbx)
	sete	%al
	orb	%r15b, %al
	jne	LBB0_21
## %bb.16:
	movq	%rbx, %rdi
	callq	_be_physfn
	testq	%rax, %rax
	je	LBB0_21
## %bb.17:
	cmpq	$0, 8(%rbx)
	jne	LBB0_18
## %bb.19:
	movq	_BE2_MAX_RSS_QS@GOTPCREL(%rip), %rax
	jmp	LBB0_20
LBB0_18:
	movq	_BE3_MAX_RSS_QS@GOTPCREL(%rip), %rax
LBB0_20:
	movq	(%rax), %rax
	movq	%rax, 16(%r14)
LBB0_21:
	movq	16(%r14), %rax
	incq	%rax
	movq	%rax, 24(%r14)
	movq	%rbx, %rdi
	callq	_be_physfn
	movl	$1, %ecx
	testq	%rax, %rax
	je	LBB0_23
## %bb.22:
	movq	_BE3_MAX_EVT_QS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_23:
	movl	%ecx, 8(%r14)
	movq	_BE_IF_CAP_FLAGS_WANT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r14)
	movl	(%r12), %ecx
	testl	%ecx, 4(%rbx)
	jne	LBB0_25
## %bb.24:
	movq	_BE_IF_FLAGS_RSS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, 12(%r14)
LBB0_25:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_VFS,4,2                    ## @MAX_VFS
	.comm	_num_vfs,8,3                    ## @num_vfs
	.comm	_BE_UC_PMAC_COUNT,4,2           ## @BE_UC_PMAC_COUNT
	.comm	_BE_VF_UC_PMAC_COUNT,4,2        ## @BE_VF_UC_PMAC_COUNT
	.comm	_FLEX10_MODE,4,2                ## @FLEX10_MODE
	.comm	_BE_NUM_VLANS_SUPPORTED,4,2     ## @BE_NUM_VLANS_SUPPORTED
	.comm	_BE_MAX_MC,4,2                  ## @BE_MAX_MC
	.comm	_BE3_MAX_TX_QS,4,2              ## @BE3_MAX_TX_QS
	.comm	_BE_FUNCTION_CAPS_RSS,4,2       ## @BE_FUNCTION_CAPS_RSS
	.comm	_BE3_MAX_RSS_QS,8,3             ## @BE3_MAX_RSS_QS
	.comm	_BE2_MAX_RSS_QS,8,3             ## @BE2_MAX_RSS_QS
	.comm	_BE3_MAX_EVT_QS,4,2             ## @BE3_MAX_EVT_QS
	.comm	_BE_IF_CAP_FLAGS_WANT,4,2       ## @BE_IF_CAP_FLAGS_WANT
	.comm	_BE_IF_FLAGS_RSS,4,2            ## @BE_IF_FLAGS_RSS
	.no_dead_strip	_BEx_get_resources
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function BEx_get_resources
_BEx_get_resources:                     ; @BEx_get_resources
	.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, x1
	mov	x20, x0
	ldr	x21, [x0, #16]
	bl	_BE3_chip
	cbz	x0, LBB0_4
; %bb.1:
	mov	x0, x20
	bl	_be_physfn
	cbz	x0, LBB0_4
; %bb.2:
	mov	x0, x21
	bl	_pci_sriov_get_totalvfs
	cmp	w0, #1
	b.lt	LBB0_5
; %bb.3:
	mov	x1, x0
Lloh0:
	adrp	x8, _MAX_VFS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_VFS@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_min
	b	LBB0_6
LBB0_4:
	mov	w21, #0
	b	LBB0_7
LBB0_5:
	mov	w0, #0
LBB0_6:
	str	w0, [x19, #40]
	cmp	w0, #0
Lloh3:
	adrp	x8, _num_vfs@GOTPAGE
Lloh4:
	ldr	x8, [x8, _num_vfs@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ccmp	x8, #0, #4, ne
	cset	w21, ne
LBB0_7:
	mov	x0, x20
	bl	_be_physfn
Lloh6:
	adrp	x8, _BE_VF_UC_PMAC_COUNT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BE_VF_UC_PMAC_COUNT@GOTPAGEOFF]
Lloh8:
	adrp	x9, _BE_UC_PMAC_COUNT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _BE_UC_PMAC_COUNT@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x8, x9, eq
	ldr	w8, [x8]
	str	w8, [x19, #36]
	ldr	w8, [x20]
Lloh10:
	adrp	x9, _FLEX10_MODE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _FLEX10_MODE@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
Lloh13:
	adrp	x10, _BE_NUM_VLANS_SUPPORTED@GOTPAGE
Lloh14:
	ldr	x10, [x10, _BE_NUM_VLANS_SUPPORTED@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
	add	w11, w10, #7
	cmp	w10, #0
	csel	w11, w11, w10, lt
	asr	w11, w11, #3
	tst	w9, w8
	csel	w8, w10, w11, eq
	str	w8, [x19]
Lloh16:
	adrp	x8, _BE_MAX_MC@GOTPAGE
Lloh17:
	ldr	x8, [x8, _BE_MAX_MC@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	str	w8, [x19, #32]
	mov	x0, x20
	bl	_BE2_chip
	mov	w8, #1
	cbnz	x0, LBB0_12
; %bb.8:
	tbnz	w21, #0, LBB0_12
; %bb.9:
	mov	x0, x20
	bl	_be_is_mc
	cbz	x0, LBB0_11
; %bb.10:
	mov	w8, #1
	b	LBB0_12
LBB0_11:
	mov	x0, x20
	bl	_be_physfn
Lloh19:
	adrp	x8, _BE3_MAX_TX_QS@GOTPAGE
Lloh20:
	ldr	x8, [x8, _BE3_MAX_TX_QS@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	cmp	x0, #0
	csinc	w8, w8, wzr, ne
LBB0_12:
	str	w8, [x19, #4]
	ldr	w8, [x20, #4]
Lloh22:
	adrp	x22, _BE_FUNCTION_CAPS_RSS@GOTPAGE
Lloh23:
	ldr	x22, [x22, _BE_FUNCTION_CAPS_RSS@GOTPAGEOFF]
	ldr	w9, [x22]
	tst	w9, w8
	cset	w8, eq
	orr	w8, w8, w21
	tbnz	w8, #0, LBB0_15
; %bb.13:
	mov	x0, x20
	bl	_be_physfn
	cbz	x0, LBB0_15
; %bb.14:
	ldr	x8, [x20, #8]
Lloh24:
	adrp	x9, _BE3_MAX_RSS_QS@GOTPAGE
Lloh25:
	ldr	x9, [x9, _BE3_MAX_RSS_QS@GOTPAGEOFF]
Lloh26:
	adrp	x10, _BE2_MAX_RSS_QS@GOTPAGE
Lloh27:
	ldr	x10, [x10, _BE2_MAX_RSS_QS@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x10, x9, eq
	ldr	x8, [x8]
	str	x8, [x19, #16]
LBB0_15:
	ldr	x8, [x19, #16]
	add	x8, x8, #1
	str	x8, [x19, #24]
	mov	x0, x20
	bl	_be_physfn
Lloh28:
	adrp	x8, _BE3_MAX_EVT_QS@GOTPAGE
Lloh29:
	ldr	x8, [x8, _BE3_MAX_EVT_QS@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	cmp	x0, #0
	csinc	w9, w8, wzr, ne
Lloh31:
	adrp	x8, _BE_IF_CAP_FLAGS_WANT@GOTPAGE
Lloh32:
	ldr	x8, [x8, _BE_IF_CAP_FLAGS_WANT@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	stp	w9, w8, [x19, #8]
	ldr	w9, [x20, #4]
	ldr	w10, [x22]
	tst	w10, w9
	b.ne	LBB0_17
; %bb.16:
Lloh34:
	adrp	x9, _BE_IF_FLAGS_RSS@GOTPAGE
Lloh35:
	ldr	x9, [x9, _BE_IF_FLAGS_RSS@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
	bic	w8, w8, w9
	str	w8, [x19, #12]
LBB0_17:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_VFS,4,2                    ; @MAX_VFS
	.comm	_num_vfs,8,3                    ; @num_vfs
	.comm	_BE_UC_PMAC_COUNT,4,2           ; @BE_UC_PMAC_COUNT
	.comm	_BE_VF_UC_PMAC_COUNT,4,2        ; @BE_VF_UC_PMAC_COUNT
	.comm	_FLEX10_MODE,4,2                ; @FLEX10_MODE
	.comm	_BE_NUM_VLANS_SUPPORTED,4,2     ; @BE_NUM_VLANS_SUPPORTED
	.comm	_BE_MAX_MC,4,2                  ; @BE_MAX_MC
	.comm	_BE3_MAX_TX_QS,4,2              ; @BE3_MAX_TX_QS
	.comm	_BE_FUNCTION_CAPS_RSS,4,2       ; @BE_FUNCTION_CAPS_RSS
	.comm	_BE3_MAX_RSS_QS,8,3             ; @BE3_MAX_RSS_QS
	.comm	_BE2_MAX_RSS_QS,8,3             ; @BE2_MAX_RSS_QS
	.comm	_BE3_MAX_EVT_QS,4,2             ; @BE3_MAX_EVT_QS
	.comm	_BE_IF_CAP_FLAGS_WANT,4,2       ; @BE_IF_CAP_FLAGS_WANT
	.comm	_BE_IF_FLAGS_RSS,4,2            ; @BE_IF_FLAGS_RSS
	.no_dead_strip	_BEx_get_resources
.subsections_via_symbols
