	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnx2x_init_fw_wrr
_bnx2x_init_fw_wrr:                     ## @bnx2x_init_fw_wrr
	.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	_MAX_COS_NUMBER@GOTPCREL(%rip), %r10
	movq	(%r10), %r8
	testq	%r8, %r8
	je	LBB0_25
## %bb.1:
	movq	%rdx, %r11
	movq	(%rdi), %rdx
	cmpq	$4, %r8
	jae	LBB0_4
## %bb.2:
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	jmp	LBB0_3
LBB0_4:
	movq	%r8, %rax
	andq	$-4, %rax
	leaq	-4(%rax), %rcx
	movq	%rcx, %rsi
	shrq	$2, %rsi
	incq	%rsi
	movl	%esi, %r9d
	andl	$3, %r9d
	cmpq	$12, %rcx
	jae	LBB0_6
## %bb.5:
	pxor	%xmm0, %xmm0
	xorl	%ecx, %ecx
	pxor	%xmm1, %xmm1
	jmp	LBB0_8
LBB0_6:
	andq	$-4, %rsi
	pxor	%xmm0, %xmm0
	xorl	%ecx, %ecx
	pxor	%xmm1, %xmm1
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	(%rdx,%rcx,8), %xmm2
	paddq	%xmm0, %xmm2
	movdqu	16(%rdx,%rcx,8), %xmm0
	paddq	%xmm1, %xmm0
	movdqu	32(%rdx,%rcx,8), %xmm1
	movdqu	48(%rdx,%rcx,8), %xmm3
	movdqu	64(%rdx,%rcx,8), %xmm4
	paddq	%xmm1, %xmm4
	paddq	%xmm2, %xmm4
	movdqu	80(%rdx,%rcx,8), %xmm2
	paddq	%xmm3, %xmm2
	paddq	%xmm0, %xmm2
	movdqu	96(%rdx,%rcx,8), %xmm0
	paddq	%xmm4, %xmm0
	movdqu	112(%rdx,%rcx,8), %xmm1
	paddq	%xmm2, %xmm1
	addq	$16, %rcx
	addq	$-4, %rsi
	jne	LBB0_7
LBB0_8:
	testq	%r9, %r9
	je	LBB0_11
## %bb.9:
	leaq	(%rdx,%rcx,8), %rcx
	addq	$16, %rcx
	shlq	$5, %r9
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movdqu	-16(%rcx,%rsi), %xmm2
	paddq	%xmm2, %xmm0
	movdqu	(%rcx,%rsi), %xmm2
	paddq	%xmm2, %xmm1
	addq	$32, %rsi
	cmpq	%rsi, %r9
	jne	LBB0_10
LBB0_11:
	paddq	%xmm1, %xmm0
	pshufd	$238, %xmm0, %xmm1              ## xmm1 = xmm0[2,3,2,3]
	paddq	%xmm0, %xmm1
	movq	%xmm1, %rcx
	jmp	LBB0_12
LBB0_3:
	addq	(%rdx,%rax,8), %rcx
	incq	%rax
LBB0_12:
	cmpq	%rax, %r8
	jne	LBB0_3
## %bb.13:
	testq	%rcx, %rcx
	je	LBB0_25
## %bb.14:
	movq	_BNX2X_PORT2_MODE_NUM_VNICS@GOTPCREL(%rip), %r8
	movq	(%r8), %rax
	testq	%rax, %rax
	je	LBB0_25
## %bb.15:
	imulq	$800, %rcx, %r12                ## imm = 0x320
	movl	$1, %edx
	xorl	%r9d, %r9d
	movq	_T_FAIR_COEF@GOTPCREL(%rip), %r14
	movq	_MIN_ABOVE_THRESH@GOTPCREL(%rip), %r15
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_16 Depth=1
	movq	(%r8), %rax
LBB0_24:                                ##   in Loop: Header=BB0_16 Depth=1
	incq	%r9
	cmpq	%rax, %r9
	jae	LBB0_25
LBB0_16:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_19 Depth 2
	testq	%rdx, %rdx
	je	LBB0_17
## %bb.18:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	8(%r11), %rax
	movq	(%rax,%r9,8), %rcx
	xorl	%ebx, %ebx
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_19 Depth=2
	xorl	%edx, %edx
	divq	%r12
LBB0_22:                                ##   in Loop: Header=BB0_19 Depth=2
	imulq	%rax, %rsi
	movq	%rsi, (%rcx,%rbx,8)
	movq	(%r15), %rax
	addq	(%r11), %rax
	cmpq	%rax, %rsi
	cmovaq	%rsi, %rax
	movq	%rax, (%rcx,%rbx,8)
	incq	%rbx
	movq	(%r10), %rdx
	cmpq	%rdx, %rbx
	jae	LBB0_23
LBB0_19:                                ##   Parent Loop BB0_16 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rdi), %rax
	imulq	$100, (%rax,%rbx,8), %rsi
	movslq	(%r14), %rax
	movq	%rax, %rdx
	orq	%r12, %rdx
	shrq	$32, %rdx
	jne	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=2
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%r12d
                                        ## kill: def $eax killed $eax def $rax
	jmp	LBB0_22
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_16 Depth=1
	xorl	%edx, %edx
	jmp	LBB0_24
LBB0_25:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_COS_NUMBER,8,3             ## @MAX_COS_NUMBER
	.comm	_BNX2X_PORT2_MODE_NUM_VNICS,8,3 ## @BNX2X_PORT2_MODE_NUM_VNICS
	.comm	_T_FAIR_COEF,4,2                ## @T_FAIR_COEF
	.comm	_MIN_ABOVE_THRESH,8,3           ## @MIN_ABOVE_THRESH
	.no_dead_strip	_bnx2x_init_fw_wrr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnx2x_init_fw_wrr
_bnx2x_init_fw_wrr:                     ; @bnx2x_init_fw_wrr
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _MAX_COS_NUMBER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_COS_NUMBER@GOTPAGEOFF]
	ldr	x9, [x8]
	cbz	x9, LBB0_9
; %bb.1:
	ldr	x10, [x0]
	cmp	x9, #8
	b.hs	LBB0_3
; %bb.2:
	mov	x11, #0
	mov	x12, #0
	b	LBB0_6
LBB0_3:
	and	x11, x9, #0xfffffffffffffff8
	add	x12, x10, #32
	movi.2d	v0, #0000000000000000
	mov	x13, x11
	movi.2d	v1, #0000000000000000
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q4, q5, [x12, #-32]
	ldp	q6, q7, [x12], #64
	add.2d	v0, v4, v0
	add.2d	v1, v5, v1
	add.2d	v2, v6, v2
	add.2d	v3, v7, v3
	subs	x13, x13, #8
	b.ne	LBB0_4
; %bb.5:
	add.2d	v0, v1, v0
	add.2d	v0, v2, v0
	add.2d	v0, v3, v0
	addp.2d	d0, v0
	fmov	x12, d0
	cmp	x9, x11
	b.eq	LBB0_8
LBB0_6:
	sub	x9, x9, x11
	add	x10, x10, x11, lsl #3
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x10], #8
	add	x12, x11, x12
	subs	x9, x9, #1
	b.ne	LBB0_7
LBB0_8:
Lloh2:
	adrp	x9, _BNX2X_PORT2_MODE_NUM_VNICS@GOTPAGE
Lloh3:
	ldr	x9, [x9, _BNX2X_PORT2_MODE_NUM_VNICS@GOTPAGEOFF]
	ldr	x15, [x9]
	cmp	x12, #0
	ccmp	x15, #0, #4, ne
	b.ne	LBB0_10
LBB0_9:
	ret
LBB0_10:
	mov	x10, #0
	mov	w11, #800
	mul	x11, x12, x11
	mov	w16, #1
Lloh4:
	adrp	x12, _T_FAIR_COEF@GOTPAGE
Lloh5:
	ldr	x12, [x12, _T_FAIR_COEF@GOTPAGEOFF]
	mov	w13, #100
Lloh6:
	adrp	x14, _MIN_ABOVE_THRESH@GOTPAGE
Lloh7:
	ldr	x14, [x14, _MIN_ABOVE_THRESH@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	x10, x10, #1
	cmp	x10, x15
	b.hs	LBB0_9
LBB0_12:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_14 Depth 2
	cbz	x16, LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x15, #0
	ldr	x16, [x2, #8]
	ldr	x17, [x16, x10, lsl #3]
LBB0_14:                                ;   Parent Loop BB0_12 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x16, [x0]
	lsl	x1, x15, #3
	ldr	x16, [x16, x1]
	ldrsw	x3, [x12]
	udiv	x3, x3, x11
	mul	x16, x16, x3
	mul	x16, x16, x13
	str	x16, [x17, x1]
	ldr	x3, [x2]
	ldr	x4, [x14]
	add	x3, x4, x3
	cmp	x16, x3
	csel	x16, x16, x3, hi
	str	x16, [x17, x1]
	add	x15, x15, #1
	ldr	x16, [x8]
	cmp	x15, x16
	b.lo	LBB0_14
; %bb.15:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	x15, [x9]
	b	LBB0_11
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_COS_NUMBER,8,3             ; @MAX_COS_NUMBER
	.comm	_BNX2X_PORT2_MODE_NUM_VNICS,8,3 ; @BNX2X_PORT2_MODE_NUM_VNICS
	.comm	_T_FAIR_COEF,4,2                ; @T_FAIR_COEF
	.comm	_MIN_ABOVE_THRESH,8,3           ; @MIN_ABOVE_THRESH
	.no_dead_strip	_bnx2x_init_fw_wrr
.subsections_via_symbols
