	.file	"extr_qed_init_fw_funcs.c_qed_init_vport_wfq.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Invalid VPORT WFQ weight configuration\n"
	.text
	.p2align 4
	.globl	qed_init_vport_wfq
	.type	qed_init_vport_wfq, @function
qed_init_vport_wfq:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	mov	edi, ecx
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	rbx, rdx
	call	QM_WFQ_INC_VAL@PLT
	test	rax, rax
	je	.L2
	cmp	QWORD PTR QM_WFQ_MAX_INC_VAL[rip], rax
	mov	r14, rax
	jl	.L2
	xor	r13d, r13d
	cmp	QWORD PTR NUM_OF_TCS[rip], 0
	je	.L4
	.p2align 4,,10
	.p2align 3
.L3:
	mov	edx, DWORD PTR [rbx+r13*4]
	cmp	DWORD PTR QM_INVALID_PQ_ID[rip], edx
	je	.L6
	sal	edx, 2
	mov	rcx, r14
	mov	rsi, r12
	mov	rdi, rbp
	movsx	rdx, edx
	add	rdx, QWORD PTR QM_REG_WFQVPWEIGHT[rip]
	call	qed_wr@PLT
.L6:
	add	r13, 1
	cmp	QWORD PTR NUM_OF_TCS[rip], r13
	ja	.L3
.L4:
	xor	eax, eax
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
.L2:
	.cfi_restore_state
	lea	rsi, .LC0[rip]
	mov	rdi, rbp
	call	DP_NOTICE@PLT
	mov	eax, -1
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	qed_init_vport_wfq, .-qed_init_vport_wfq
	.comm	QM_WFQ_MAX_INC_VAL,8,8
	.comm	QM_REG_WFQVPWEIGHT,8,8
	.comm	QM_INVALID_PQ_ID,4,4
	.comm	NUM_OF_TCS,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_qed_init_fw_funcs.c_qed_init_vport_wfq.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Invalid VPORT WFQ weight configuration\012\000"
	.text
	.align	2
	.global	qed_init_vport_wfq
	.syntax unified
	.arm
	.fpu softvfp
	.type	qed_init_vport_wfq, %function
qed_init_vport_wfq:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r8, r0
	mov	r0, r3
	mov	r9, r1
	mov	r5, r2
	bl	QM_WFQ_INC_VAL
	subs	fp, r0, #0
	beq	.L2
	ldr	r3, .L14
	ldr	r3, [r3]
	cmp	r3, fp
	blt	.L2
	ldr	r6, .L14+4
	ldr	r3, [r6]
	cmp	r3, #0
	beq	.L4
	mov	r4, #0
	ldr	r7, .L14+8
	ldr	r10, .L14+12
	sub	r5, r5, #4
.L7:
	ldr	r2, [r5, #4]!
	ldr	r3, [r7]
	add	r4, r4, #1
	cmp	r3, r2
	beq	.L6
	ldr	r1, [r10]
	mov	r3, fp
	add	r2, r1, r2, lsl #2
	mov	r0, r8
	mov	r1, r9
	bl	qed_wr
.L6:
	ldr	r3, [r6]
	cmp	r3, r4
	bhi	.L7
.L4:
	mov	r0, #0
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	mov	r0, r8
	ldr	r1, .L14+16
	bl	DP_NOTICE
	mvn	r0, #0
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L15:
	.align	2
.L14:
	.word	QM_WFQ_MAX_INC_VAL
	.word	NUM_OF_TCS
	.word	QM_INVALID_PQ_ID
	.word	QM_REG_WFQVPWEIGHT
	.word	.LC0
	.size	qed_init_vport_wfq, .-qed_init_vport_wfq
	.comm	QM_WFQ_MAX_INC_VAL,4,4
	.comm	QM_REG_WFQVPWEIGHT,4,4
	.comm	QM_INVALID_PQ_ID,4,4
	.comm	NUM_OF_TCS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
