	.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
	pushq	%rax
	.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, %r15
	movq	(%rdi), %rax
	movq	8(%rax), %r13
	movq	%rdx, %rsi
	callq	_qlcnic_sriov_pf_get_vport_handle
	testl	%eax, %eax
	js	LBB0_1
## %bb.3:
	movl	%eax, %r8d
	movl	(%r13), %ecx
	leal	1(%rcx), %esi
	movl	$65535, (%rbx)                  ## imm = 0xFFFF
	movl	16(%r13), %eax
	cltd
	idivl	%esi
	movl	%eax, 4(%rbx)
	movl	20(%r13), %eax
	movl	%eax, 8(%rbx)
	movq	_QLCNIC_SRIOV_VF_MAX_MAC@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r14d
	movq	(%r15), %rdx
	cmpq	%r12, (%rdx)
	movq	%r15, %rdi
	jne	LBB0_5
## %bb.4:
	imull	%ecx, %r14d
	subl	%r14d, %eax
	movl	%eax, 12(%rbx)
	movl	24(%r13), %eax
	subl	%r14d, %eax
	movl	%eax, 16(%rbx)
	movl	$0, 56(%rbx)
	movq	_MAX_BW@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 52(%rbx)
	jmp	LBB0_7
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_2
LBB0_5:
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movl	%r8d, -48(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r15
	movq	%r12, %rsi
	callq	_qlcnic_sriov_func_to_index
	testl	%eax, %eax
	js	LBB0_2
## %bb.6:
	movq	8(%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	%r14d, 12(%rbx)
	movl	%r14d, 16(%rbx)
	movq	%r15, %rdi
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
LBB0_7:
	movl	28(%r13), %eax
	cltd
	idivl	%esi
	movl	%eax, 20(%rbx)
	movl	32(%r13), %eax
	cltd
	idivl	%esi
	movl	%eax, 24(%rbx)
	movl	36(%r13), %eax
	cltd
	idivl	%esi
	movl	%eax, 28(%rbx)
	movl	40(%r13), %eax
	cltd
	idivl	%esi
	movl	%eax, 32(%rbx)
	movl	44(%r13), %eax
	cltd
	idivl	%esi
	movl	%eax, 36(%rbx)
	movl	56(%r13), %eax
	movl	%eax, 48(%rbx)
	movl	52(%r13), %eax
	movl	%eax, 44(%rbx)
	movl	48(%r13), %eax
	movl	%eax, 40(%rbx)
	movq	%rbx, %rsi
	movl	%r8d, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_qlcnic_sriov_pf_set_vport_info ## TAILCALL
LBB0_2:
	addq	$8, %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_SRIOV_VF_MAX_MAC,4,2    ## @QLCNIC_SRIOV_VF_MAX_MAC
	.comm	_MAX_BW,4,2                     ## @MAX_BW
	.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]
	mov	x1, x2
	bl	_qlcnic_sriov_pf_get_vport_handle
	tbnz	w0, #31, LBB0_3
; %bb.1:
	mov	x21, x0
	ldr	w8, [x23]
	add	w24, w8, #1
	mov	w10, #65535
	ldp	w11, w9, [x23, #16]
	sdiv	w11, w11, w24
	stp	w10, w11, [x19]
	str	w9, [x19, #8]
Lloh0:
	adrp	x10, _QLCNIC_SRIOV_VF_MAX_MAC@GOTPAGE
Lloh1:
	ldr	x10, [x10, _QLCNIC_SRIOV_VF_MAX_MAC@GOTPAGEOFF]
Lloh2:
	ldr	w25, [x10]
	ldr	x10, [x20]
	ldr	x10, [x10]
	cmp	x10, x22
	b.ne	LBB0_4
; %bb.2:
	mul	w8, w25, w8
	sub	w9, w9, w8
	ldr	w10, [x23, #24]
	sub	w8, w10, w8
	stp	w9, w8, [x19, #12]
Lloh3:
	adrp	x8, _MAX_BW@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_BW@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	stp	w8, wzr, [x19, #52]
	b	LBB0_6
LBB0_3:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	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, #8]
	ldr	x8, [x8, w0, uxtw #3]
	ldr	d0, [x8]
	stur	d0, [x19, #52]
	stp	w25, w25, [x19, #12]
LBB0_6:
	ldp	w8, w9, [x23, #28]
	sdiv	w8, w8, w24
	sdiv	w9, w9, w24
	stp	w8, w9, [x19, #20]
	ldp	w8, w9, [x23, #36]
	sdiv	w8, w8, w24
	sdiv	w9, w9, w24
	stp	w8, w9, [x19, #28]
	ldr	w8, [x23, #44]
	sdiv	w8, w8, w24
	str	w8, [x19, #36]
	ldr	w8, [x23, #56]
	str	w8, [x19, #48]
	ldr	d0, [x23, #48]
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_QLCNIC_SRIOV_VF_MAX_MAC,4,2    ; @QLCNIC_SRIOV_VF_MAX_MAC
	.comm	_MAX_BW,4,2                     ; @MAX_BW
	.no_dead_strip	_qlcnic_sriov_pf_cal_res_limit
.subsections_via_symbols
