	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qlcnic_sriov_pf_cal_res_limit
_qlcnic_sriov_pf_cal_res_limit:         ## @qlcnic_sriov_pf_cal_res_limit
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	8(%rax), %r13
	movq	(%r13), %r15
	movq	%rdx, %rsi
	callq	_qlcnic_sriov_pf_get_vport_handle
	testl	%eax, %eax
	js	LBB0_1
## %bb.3:
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	8(%r13), %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leal	1(%rax), %ecx
	movl	$65535, (%rbx)                  ## imm = 0xFFFF
	movl	24(%r13), %eax
	cltd
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	idivl	%ecx
	movl	%eax, 4(%rbx)
	movq	%r14, %rdi
	callq	_qlcnic_83xx_pf_check
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	_QLCNIC_83XX_SRIOV_VF_MAX_MAC@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	jmp	LBB0_6
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_2
LBB0_4:
	incq	%r15
LBB0_6:
	movl	28(%r13), %eax
	movl	%eax, 8(%rbx)
	movq	(%r14), %rcx
	cmpq	%r12, (%rcx)
	jne	LBB0_8
## %bb.7:
	movl	$0, 56(%rbx)
	movq	_MAX_BW@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 52(%rbx)
	movl	32(%r13), %ecx
	imull	-56(%rbp), %r15d                ## 4-byte Folded Reload
	subl	%r15d, %ecx
	movl	%ecx, 12(%rbx)
	movl	36(%r13), %ecx
	subl	%r15d, %ecx
	movl	%ecx, 16(%rbx)
	movq	_QLCNIC_SRIOV_VF_MAX_MAC@GOTPCREL(%rip), %rcx
	imull	(%rcx), %r15d
	subl	%r15d, %eax
	movl	%eax, 8(%rbx)
	movl	24(%r13), %eax
	subl	8(%r13), %eax
	jmp	LBB0_10
LBB0_8:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_qlcnic_sriov_func_to_index
	testl	%eax, %eax
	js	LBB0_2
## %bb.9:
	movq	16(%r13), %rcx
	movl	%eax, %eax
	movq	(%rcx,%rax,8), %rax
	movl	4(%rax), %ecx
	movl	%ecx, 56(%rbx)
	movl	(%rax), %eax
	movl	%eax, 52(%rbx)
	movl	%r15d, 12(%rbx)
	movl	%r15d, 16(%rbx)
	movq	_QLCNIC_SRIOV_VF_MAX_MAC@GOTPCREL(%rip), %rax
	imull	(%rax), %r15d
	movl	%r15d, 8(%rbx)
	movq	_QLCNIC_SINGLE_RING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_10:
	movl	%eax, 4(%rbx)
	movl	40(%r13), %eax
	cltd
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	idivl	%ecx
	movl	%eax, 20(%rbx)
	movl	44(%r13), %eax
	cltd
	idivl	%ecx
	movl	%eax, 24(%rbx)
	movl	48(%r13), %eax
	cltd
	idivl	%ecx
	movl	%eax, 28(%rbx)
	movl	52(%r13), %eax
	cltd
	idivl	%ecx
	movl	%eax, 32(%rbx)
	movl	56(%r13), %eax
	cltd
	idivl	%ecx
	movl	%eax, 36(%rbx)
	movl	68(%r13), %eax
	movl	%eax, 48(%rbx)
	movl	64(%r13), %eax
	movl	%eax, 44(%rbx)
	movl	60(%r13), %eax
	movl	%eax, 40(%rbx)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_qlcnic_sriov_pf_set_vport_info ## TAILCALL
LBB0_2:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_QLCNIC_83XX_SRIOV_VF_MAX_MAC,8,3 ## @QLCNIC_83XX_SRIOV_VF_MAX_MAC
	.comm	_MAX_BW,4,2                     ## @MAX_BW
	.comm	_QLCNIC_SRIOV_VF_MAX_MAC,8,3    ## @QLCNIC_SRIOV_VF_MAX_MAC
	.comm	_QLCNIC_SINGLE_RING,4,2         ## @QLCNIC_SINGLE_RING
	.no_dead_strip	_qlcnic_sriov_pf_cal_res_limit
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qlcnic_sriov_pf_cal_res_limit
_qlcnic_sriov_pf_cal_res_limit:         ; @qlcnic_sriov_pf_cal_res_limit
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0]
	ldr	x23, [x8, #8]
	ldr	x25, [x23]
	mov	x1, x2
	bl	_qlcnic_sriov_pf_get_vport_handle
	tbnz	w0, #31, LBB0_3
; %bb.1:
	mov	x21, x0
	ldr	w26, [x23, #8]
	add	w24, w26, #1
	mov	w8, #65535
	ldr	w9, [x23, #24]
	sdiv	w9, w9, w24
	stp	w8, w9, [x19]
	mov	x0, x20
	bl	_qlcnic_83xx_pf_check
Lloh0:
	adrp	x8, _QLCNIC_83XX_SRIOV_VF_MAX_MAC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QLCNIC_83XX_SRIOV_VF_MAX_MAC@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, #0
	csinc	x25, x8, x25, ne
	ldr	w8, [x23, #28]
	str	w8, [x19, #8]
	ldr	x9, [x20]
	ldr	x9, [x9]
	cmp	x9, x22
	b.ne	LBB0_4
; %bb.2:
Lloh3:
	adrp	x9, _MAX_BW@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MAX_BW@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	stp	w9, wzr, [x19, #52]
	mul	w9, w25, w26
	ldr	d0, [x23, #32]
	dup.2s	v1, w9
	sub.2s	v0, v0, v1
	stur	d0, [x19, #12]
Lloh6:
	adrp	x10, _QLCNIC_SRIOV_VF_MAX_MAC@GOTPAGE
Lloh7:
	ldr	x10, [x10, _QLCNIC_SRIOV_VF_MAX_MAC@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	msub	w8, w10, w9, w8
	str	w8, [x19, #8]
	ldr	w8, [x23, #24]
	ldr	w9, [x23, #8]
	sub	w8, w8, w9
	b	LBB0_6
LBB0_3:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_4:
	mov	x0, x20
	mov	x1, x22
	bl	_qlcnic_sriov_func_to_index
	tbnz	w0, #31, LBB0_7
; %bb.5:
	ldr	x8, [x23, #16]
	ldr	x8, [x8, w0, uxtw #3]
	ldr	d0, [x8]
	stur	d0, [x19, #52]
	str	w25, [x19, #16]
Lloh12:
	adrp	x8, _QLCNIC_SRIOV_VF_MAX_MAC@GOTPAGE
Lloh13:
	ldr	x8, [x8, _QLCNIC_SRIOV_VF_MAX_MAC@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	mul	w8, w8, w25
	stp	w8, w25, [x19, #8]
Lloh15:
	adrp	x8, _QLCNIC_SINGLE_RING@GOTPAGE
Lloh16:
	ldr	x8, [x8, _QLCNIC_SINGLE_RING@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
LBB0_6:
	str	w8, [x19, #4]
	ldp	w8, w9, [x23, #40]
	sdiv	w8, w8, w24
	sdiv	w9, w9, w24
	stp	w8, w9, [x19, #20]
	ldp	w8, w9, [x23, #48]
	sdiv	w8, w8, w24
	sdiv	w9, w9, w24
	stp	w8, w9, [x19, #28]
	ldr	w8, [x23, #56]
	sdiv	w8, w8, w24
	str	w8, [x19, #36]
	ldr	w8, [x23, #68]
	str	w8, [x19, #48]
	ldur	d0, [x23, #60]
	str	d0, [x19, #40]
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_qlcnic_sriov_pf_set_vport_info
LBB0_7:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_QLCNIC_83XX_SRIOV_VF_MAX_MAC,8,3 ; @QLCNIC_83XX_SRIOV_VF_MAX_MAC
	.comm	_MAX_BW,4,2                     ; @MAX_BW
	.comm	_QLCNIC_SRIOV_VF_MAX_MAC,8,3    ; @QLCNIC_SRIOV_VF_MAX_MAC
	.comm	_QLCNIC_SINGLE_RING,4,2         ; @QLCNIC_SINGLE_RING
	.no_dead_strip	_qlcnic_sriov_pf_cal_res_limit
.subsections_via_symbols
