	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qed_pf_wfq_rt_init
_qed_pf_wfq_rt_init:                    ## @qed_pf_wfq_rt_init
	.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	%rsi, %rbx
	movq	%rdi, %r14
	movq	8(%rsi), %r12
	addq	(%rsi), %r12
	movq	32(%rsi), %r13
	movl	24(%rsi), %edi
	callq	_QM_WFQ_INC_VAL
	testl	%eax, %eax
	je	LBB0_9
## %bb.1:
	movq	_QM_WFQ_MAX_INC_VAL@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jg	LBB0_9
## %bb.2:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	testq	%r12, %r12
	je	LBB0_7
## %bb.3:
	xorl	%r15d, %r15d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	imull	%ecx, %esi
	addl	(%rdx), %esi
	cltd
	idivl	%ecx
	addl	%edx, %esi
	movq	_QM_WFQ_CRD_REG_SIGN_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_OVERWRITE_RT_REG
	incq	%r15
	cmpq	%r15, %r12
	je	LBB0_7
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13,%r15,8), %edx
	movl	4(%r13,%r15,8), %esi
	movl	20(%rbx), %ecx
	movq	%r14, %rdi
	callq	_qed_get_ext_voq
	movl	%eax, %esi
	movl	16(%rbx), %eax
	movq	_MAX_NUM_PFS_BB@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_QM_REG_WFQPFCRD_MSB_RT_OFFSET@GOTPCREL(%rip), %rdx
	cmpl	%ecx, %eax
	jge	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_QM_REG_WFQPFCRD_RT_OFFSET@GOTPCREL(%rip), %rdx
	jmp	LBB0_6
LBB0_9:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_DP_NOTICE
	movl	$-1, %eax
	jmp	LBB0_8
LBB0_7:
	movq	_QM_REG_WFQPFUPPERBOUND_RT_OFFSET@GOTPCREL(%rip), %rax
	movslq	16(%rbx), %rsi
	addq	(%rax), %rsi
	movq	_QM_WFQ_UPPER_BOUND@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_QM_WFQ_CRD_REG_SIGN_BIT@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%r14, %rdi
	callq	_STORE_RT_REG
	movq	_QM_REG_WFQPFWEIGHT_RT_OFFSET@GOTPCREL(%rip), %rax
	movslq	16(%rbx), %rsi
	addq	(%rax), %rsi
	movq	%r14, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_STORE_RT_REG
	xorl	%eax, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_QM_WFQ_MAX_INC_VAL,4,2         ## @QM_WFQ_MAX_INC_VAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid PF WFQ weight configuration\n"

	.comm	_MAX_NUM_PFS_BB,4,2             ## @MAX_NUM_PFS_BB
	.comm	_QM_REG_WFQPFCRD_RT_OFFSET,4,2  ## @QM_REG_WFQPFCRD_RT_OFFSET
	.comm	_QM_REG_WFQPFCRD_MSB_RT_OFFSET,4,2 ## @QM_REG_WFQPFCRD_MSB_RT_OFFSET
	.comm	_QM_WFQ_CRD_REG_SIGN_BIT,8,3    ## @QM_WFQ_CRD_REG_SIGN_BIT
	.comm	_QM_REG_WFQPFUPPERBOUND_RT_OFFSET,8,3 ## @QM_REG_WFQPFUPPERBOUND_RT_OFFSET
	.comm	_QM_WFQ_UPPER_BOUND,4,2         ## @QM_WFQ_UPPER_BOUND
	.comm	_QM_REG_WFQPFWEIGHT_RT_OFFSET,8,3 ## @QM_REG_WFQPFWEIGHT_RT_OFFSET
	.no_dead_strip	_qed_pf_wfq_rt_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qed_pf_wfq_rt_init
_qed_pf_wfq_rt_init:                    ; @qed_pf_wfq_rt_init
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x1
	mov	x19, x0
	ldp	x23, x25, [x1]
	ldr	x24, [x1, #32]
	ldr	w0, [x1, #24]
	bl	_QM_WFQ_INC_VAL
Lloh0:
	adrp	x8, _QM_WFQ_MAX_INC_VAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QM_WFQ_MAX_INC_VAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, #0
	ccmp	w0, w8, #0, ne
	b.le	LBB0_2
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_DP_NOTICE
	mov	w0, #-1
	b	LBB0_6
LBB0_2:
	mov	x21, x0
Lloh5:
	adrp	x22, _QM_WFQ_CRD_REG_SIGN_BIT@GOTPAGE
Lloh6:
	ldr	x22, [x22, _QM_WFQ_CRD_REG_SIGN_BIT@GOTPAGEOFF]
	add	x23, x25, x23
	cbz	x23, LBB0_5
; %bb.3:
	add	x24, x24, #4
Lloh7:
	adrp	x25, _MAX_NUM_PFS_BB@GOTPAGE
Lloh8:
	ldr	x25, [x25, _MAX_NUM_PFS_BB@GOTPAGEOFF]
Lloh9:
	adrp	x26, _QM_REG_WFQPFCRD_RT_OFFSET@GOTPAGE
Lloh10:
	ldr	x26, [x26, _QM_REG_WFQPFCRD_RT_OFFSET@GOTPAGEOFF]
Lloh11:
	adrp	x27, _QM_REG_WFQPFCRD_MSB_RT_OFFSET@GOTPAGE
Lloh12:
	ldr	x27, [x27, _QM_REG_WFQPFCRD_MSB_RT_OFFSET@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w2, w1, [x24, #-4]
	ldr	w3, [x20, #20]
	mov	x0, x19
	bl	_qed_get_ext_voq
	ldr	w8, [x20, #16]
	ldr	w9, [x25]
	cmp	w8, w9
	csel	x10, x26, x27, lt
	ldr	w10, [x10]
	madd	w10, w9, w0, w10
	sdiv	w11, w8, w9
	msub	w8, w11, w9, w8
	add	w1, w10, w8
	ldr	w2, [x22]
	mov	x0, x19
	bl	_OVERWRITE_RT_REG
	add	x24, x24, #8
	subs	x23, x23, #1
	b.ne	LBB0_4
LBB0_5:
Lloh13:
	adrp	x8, _QM_REG_WFQPFUPPERBOUND_RT_OFFSET@GOTPAGE
Lloh14:
	ldr	x8, [x8, _QM_REG_WFQPFUPPERBOUND_RT_OFFSET@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	ldrsw	x9, [x20, #16]
	add	x1, x8, x9
Lloh16:
	adrp	x8, _QM_WFQ_UPPER_BOUND@GOTPAGE
Lloh17:
	ldr	x8, [x8, _QM_WFQ_UPPER_BOUND@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	ldr	w9, [x22]
	orr	w2, w8, w9
	mov	x0, x19
	bl	_STORE_RT_REG
Lloh19:
	adrp	x8, _QM_REG_WFQPFWEIGHT_RT_OFFSET@GOTPAGE
Lloh20:
	ldr	x8, [x8, _QM_REG_WFQPFWEIGHT_RT_OFFSET@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	ldrsw	x9, [x20, #16]
	add	x1, x8, x9
	mov	x0, x19
	mov	x2, x21
	bl	_STORE_RT_REG
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_QM_WFQ_MAX_INC_VAL,4,2         ; @QM_WFQ_MAX_INC_VAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid PF WFQ weight configuration\n"

	.comm	_MAX_NUM_PFS_BB,4,2             ; @MAX_NUM_PFS_BB
	.comm	_QM_REG_WFQPFCRD_RT_OFFSET,4,2  ; @QM_REG_WFQPFCRD_RT_OFFSET
	.comm	_QM_REG_WFQPFCRD_MSB_RT_OFFSET,4,2 ; @QM_REG_WFQPFCRD_MSB_RT_OFFSET
	.comm	_QM_WFQ_CRD_REG_SIGN_BIT,8,3    ; @QM_WFQ_CRD_REG_SIGN_BIT
	.comm	_QM_REG_WFQPFUPPERBOUND_RT_OFFSET,8,3 ; @QM_REG_WFQPFUPPERBOUND_RT_OFFSET
	.comm	_QM_WFQ_UPPER_BOUND,4,2         ; @QM_WFQ_UPPER_BOUND
	.comm	_QM_REG_WFQPFWEIGHT_RT_OFFSET,8,3 ; @QM_REG_WFQPFWEIGHT_RT_OFFSET
	.no_dead_strip	_qed_pf_wfq_rt_init
.subsections_via_symbols
