	.file	"extr_ecore_init_fw_funcs.c_ecore_init_prs_ets.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ecore_init_prs_ets
	.type	ecore_init_prs_ets, @function
ecore_init_prs_ets:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	r10, QWORD PTR NUM_OF_TCS[rip]
	mov	r13, QWORD PTR PRS_REG_ETS_ARB_CREDIT_WEIGHT_1[rip]
	mov	r14, QWORD PTR PRS_REG_ETS_ARB_CREDIT_UPPER_BOUND_1[rip]
	sub	r13, QWORD PTR PRS_REG_ETS_ARB_CREDIT_WEIGHT_0[rip]
	mov	QWORD PTR [rsp], rdi
	sub	r14, QWORD PTR PRS_REG_ETS_ARB_CREDIT_UPPER_BOUND_0[rip]
	mov	QWORD PTR 8[rsp], r13
	mov	QWORD PTR 16[rsp], r14
	test	r10, r10
	je	.L10
	mov	rax, QWORD PTR 8[rdx]
	xor	esi, esi
	xor	edi, edi
	xor	ecx, ecx
	mov	r15d, 4294967295
	mov	r9d, 1
	.p2align 4,,10
	.p2align 3
.L5:
	cmp	QWORD PTR 16[rax], 0
	je	.L3
	mov	edx, r9d
	sal	edx, cl
	movsx	rdx, edx
	or	rdi, rdx
.L3:
	mov	r8d, DWORD PTR 8[rax]
	test	r8d, r8d
	je	.L4
	mov	edx, r9d
	sal	edx, cl
	movsx	rdx, edx
	or	rsi, rdx
	mov	rdx, QWORD PTR [rax]
	cmp	r15, rdx
	cmovg	r15, rdx
.L4:
	add	rcx, 1
	add	rax, 24
	cmp	rcx, r10
	jne	.L5
	mov	rcx, rdi
	mov	r13, rsi
.L2:
	mov	rbx, QWORD PTR [rsp]
	mov	rdx, QWORD PTR PRS_REG_ETS_ARB_CLIENT_IS_STRICT[rip]
	mov	rsi, r12
	xor	r14d, r14d
	mov	rdi, rbx
	call	ecore_wr@PLT
	mov	rcx, r13
	mov	rdi, rbx
	mov	rsi, r12
	mov	rdx, QWORD PTR PRS_REG_ETS_ARB_CLIENT_IS_SUBJECT2WFQ[rip]
	xor	r13d, r13d
	xor	ebx, ebx
	call	ecore_wr@PLT
	cmp	QWORD PTR NUM_OF_TCS[rip], 0
	je	.L1
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rdx, QWORD PTR 8[rbp]
	lea	rax, [rbx+rbx*2]
	lea	rax, [rdx+rax*8]
	mov	edx, DWORD PTR 8[rax]
	test	edx, edx
	je	.L7
	mov	rax, QWORD PTR [rax]
	imul	rax, QWORD PTR PRS_ETS_MIN_WFQ_BYTES[rip]
	mov	rsi, r12
	mov	rdi, QWORD PTR [rsp]
	cqo
	idiv	r15
	mov	rdx, QWORD PTR PRS_REG_ETS_ARB_CREDIT_WEIGHT_0[rip]
	add	rdx, r13
	mov	rcx, rax
	mov	QWORD PTR 24[rsp], rax
	call	ecore_wr@PLT
	mov	r11, QWORD PTR 24[rsp]
	mov	esi, DWORD PTR 0[rbp]
	mov	rdi, r11
	call	PRS_ETS_UP_BOUND@PLT
	mov	rdx, QWORD PTR PRS_REG_ETS_ARB_CREDIT_UPPER_BOUND_0[rip]
	mov	rdi, QWORD PTR [rsp]
	mov	rsi, r12
	mov	rcx, rax
	add	rdx, r14
	call	ecore_wr@PLT
.L7:
	add	rbx, 1
	add	r13, QWORD PTR 8[rsp]
	add	r14, QWORD PTR 16[rsp]
	cmp	QWORD PTR NUM_OF_TCS[rip], rbx
	ja	.L8
.L1:
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	xor	r13d, r13d
	xor	ecx, ecx
	mov	r15d, 4294967295
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	ecore_init_prs_ets, .-ecore_init_prs_ets
	.comm	PRS_REG_ETS_ARB_CREDIT_WEIGHT_1,8,8
	.comm	PRS_REG_ETS_ARB_CREDIT_WEIGHT_0,8,8
	.comm	PRS_REG_ETS_ARB_CREDIT_UPPER_BOUND_1,8,8
	.comm	PRS_REG_ETS_ARB_CREDIT_UPPER_BOUND_0,8,8
	.comm	PRS_REG_ETS_ARB_CLIENT_IS_SUBJECT2WFQ,8,8
	.comm	PRS_REG_ETS_ARB_CLIENT_IS_STRICT,8,8
	.comm	PRS_ETS_MIN_WFQ_BYTES,8,8
	.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_ecore_init_fw_funcs.c_ecore_init_prs_ets.c"
	.text
	.global	__aeabi_idiv
	.align	2
	.global	ecore_init_prs_ets
	.syntax unified
	.arm
	.fpu softvfp
	.type	ecore_init_prs_ets, %function
ecore_init_prs_ets:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	ip, .L24
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L24+4
	ldr	r5, [ip]
	ldr	ip, .L24+8
	ldr	r10, .L24+12
	ldr	lr, [ip]
	ldr	ip, [r3]
	ldr	r3, .L24+16
	ldr	r4, [r10]
	ldr	r3, [r3]
	sub	sp, sp, #20
	mov	fp, r2
	sub	r3, ip, r3
	sub	r2, r5, lr
	cmp	r4, #0
	mov	r8, r0
	mov	r9, r1
	str	r2, [sp, #4]
	str	r3, [sp, #8]
	beq	.L10
	mov	r0, #0
	mvn	r6, #0
	mov	r3, r0
	mov	r1, r0
	mov	lr, #1
	ldr	r2, [fp, #4]
.L5:
	ldr	ip, [r2, #8]
	cmp	ip, #0
	ldr	ip, [r2, #4]
	orrne	r3, r3, lr, lsl r1
	cmp	ip, #0
	beq	.L4
	ldr	ip, [r2]
	orr	r0, r0, lr, lsl r1
	cmp	r6, ip
	movge	r6, ip
.L4:
	add	r1, r1, #1
	cmp	r1, r4
	add	r2, r2, #12
	bne	.L5
	mov	r4, r0
.L2:
	ldr	r2, .L24+20
	mov	r1, r9
	ldr	r2, [r2]
	mov	r0, r8
	bl	ecore_wr
	ldr	r2, .L24+24
	mov	r3, r4
	mov	r1, r9
	mov	r0, r8
	ldr	r2, [r2]
	bl	ecore_wr
	ldr	r3, [r10]
	cmp	r3, #0
	beq	.L1
	mov	r5, #0
	mov	r7, r5
	mov	r4, r5
.L8:
	ldr	r3, [fp, #4]
	add	r2, r4, r4, lsl #1
	add	r1, r3, r2, lsl #2
	ldr	r1, [r1, #4]
	add	r4, r4, #1
	cmp	r1, #0
	beq	.L7
	ldr	r3, [r3, r2, lsl #2]
	ldr	r2, .L24+28
	mov	r1, r6
	ldr	r0, [r2]
	mul	r0, r3, r0
	bl	__aeabi_idiv
	ldr	r2, .L24+8
	mov	r3, r0
	ldr	r2, [r2]
	mov	r1, r9
	str	r0, [sp, #12]
	add	r2, r7, r2
	mov	r0, r8
	bl	ecore_wr
	ldr	r3, .L24+16
	ldr	r1, [fp]
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	add	r2, r5, r2
	mov	r0, r3
	str	r2, [sp, #12]
	bl	PRS_ETS_UP_BOUND
	mov	r1, r9
	mov	r3, r0
	ldr	r2, [sp, #12]
	mov	r0, r8
	bl	ecore_wr
.L7:
	ldr	r3, [r10]
	ldr	r2, [sp, #4]
	cmp	r3, r4
	ldr	r3, [sp, #8]
	add	r7, r7, r2
	add	r5, r5, r3
	bhi	.L8
.L1:
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L10:
	mvn	r6, #0
	mov	r3, r4
	b	.L2
.L25:
	.align	2
.L24:
	.word	PRS_REG_ETS_ARB_CREDIT_WEIGHT_1
	.word	PRS_REG_ETS_ARB_CREDIT_UPPER_BOUND_1
	.word	PRS_REG_ETS_ARB_CREDIT_WEIGHT_0
	.word	NUM_OF_TCS
	.word	PRS_REG_ETS_ARB_CREDIT_UPPER_BOUND_0
	.word	PRS_REG_ETS_ARB_CLIENT_IS_STRICT
	.word	PRS_REG_ETS_ARB_CLIENT_IS_SUBJECT2WFQ
	.word	PRS_ETS_MIN_WFQ_BYTES
	.size	ecore_init_prs_ets, .-ecore_init_prs_ets
	.comm	PRS_REG_ETS_ARB_CREDIT_WEIGHT_1,4,4
	.comm	PRS_REG_ETS_ARB_CREDIT_WEIGHT_0,4,4
	.comm	PRS_REG_ETS_ARB_CREDIT_UPPER_BOUND_1,4,4
	.comm	PRS_REG_ETS_ARB_CREDIT_UPPER_BOUND_0,4,4
	.comm	PRS_REG_ETS_ARB_CLIENT_IS_SUBJECT2WFQ,4,4
	.comm	PRS_REG_ETS_ARB_CLIENT_IS_STRICT,4,4
	.comm	PRS_ETS_MIN_WFQ_BYTES,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
