	.file	"extr_bxe_elink.c_elink_ets_bw_limit.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"ETS enabled BW limit configuration\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"Total BW can't be zero\n"
	.text
	.p2align 4
	.globl	elink_ets_bw_limit
	.type	elink_ets_bw_limit, @function
elink_ets_bw_limit:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	lea	r15d, [rsi+rdx]
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	ebp, edx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, esi
	lea	rsi, .LC0[rip]
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	r14, QWORD PTR [rdi]
	mov	rdi, r14
	call	ELINK_DEBUG_P0@PLT
	test	ebx, ebx
	sete	dl
	test	ebp, ebp
	sete	al
	or	dl, al
	jne	.L4
	test	r15d, r15d
	je	.L4
	mov	ecx, DWORD PTR ELINK_ETS_BW_LIMIT_CREDIT_WEIGHT[rip]
	mov	rdi, r13
	imul	ebx, ecx
	mov	eax, ebx
	cdq
	idiv	r15d
	mov	r12d, eax
	mov	eax, ecx
	imul	eax, ebp
	cdq
	idiv	r15d
	mov	r15d, eax
	call	elink_ets_bw_limit_common@PLT
	mov	esi, DWORD PTR NIG_REG_P0_TX_ARB_CREDIT_WEIGHT_0[rip]
	mov	edx, r12d
	mov	rdi, r14
	call	REG_WR@PLT
	mov	esi, DWORD PTR NIG_REG_P0_TX_ARB_CREDIT_WEIGHT_1[rip]
	mov	edx, r15d
	mov	rdi, r14
	call	REG_WR@PLT
	mov	esi, DWORD PTR PBF_REG_COS0_WEIGHT[rip]
	mov	edx, r12d
	mov	rdi, r14
	call	REG_WR@PLT
	mov	esi, DWORD PTR PBF_REG_COS1_WEIGHT[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	edx, r15d
	pop	rbx
	.cfi_def_cfa_offset 48
	mov	rdi, r14
	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
	jmp	REG_WR@PLT
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	add	rsp, 8
	.cfi_def_cfa_offset 56
	mov	rdi, r14
	lea	rsi, .LC1[rip]
	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
	jmp	ELINK_DEBUG_P0@PLT
	.cfi_endproc
.LFE0:
	.size	elink_ets_bw_limit, .-elink_ets_bw_limit
	.comm	PBF_REG_COS1_WEIGHT,4,4
	.comm	PBF_REG_COS0_WEIGHT,4,4
	.comm	NIG_REG_P0_TX_ARB_CREDIT_WEIGHT_1,4,4
	.comm	NIG_REG_P0_TX_ARB_CREDIT_WEIGHT_0,4,4
	.comm	ELINK_ETS_BW_LIMIT_CREDIT_WEIGHT,4,4
	.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_bxe_elink.c_elink_ets_bw_limit.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"ETS enabled BW limit configuration\012\000"
	.align	2
.LC1:
	.ascii	"Total BW can't be zero\012\000"
	.global	__aeabi_idiv
	.text
	.align	2
	.global	elink_ets_bw_limit
	.syntax unified
	.arm
	.fpu softvfp
	.type	elink_ets_bw_limit, %function
elink_ets_bw_limit:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r4, r2
	ldr	r8, [r0]
	mov	r5, r1
	mov	r6, r0
	ldr	r1, .L5
	mov	r0, r8
	bl	ELINK_DEBUG_P0
	clz	r3, r4
	cmp	r5, #0
	add	r7, r5, r4
	lsr	r3, r3, #5
	moveq	r3, #1
	cmp	r7, #0
	moveq	r3, #1
	cmp	r3, #0
	beq	.L2
	mov	r0, r8
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r1, .L5+4
	b	ELINK_DEBUG_P0
.L2:
	ldr	r3, .L5+8
	mov	r1, r7
	ldr	r9, [r3]
	mul	r0, r5, r9
	bl	__aeabi_idiv
	mov	r1, r7
	mov	r5, r0
	mul	r0, r4, r9
	bl	__aeabi_idiv
	mov	r4, r0
	mov	r0, r6
	bl	elink_ets_bw_limit_common
	ldr	r3, .L5+12
	mov	r2, r5
	ldr	r1, [r3]
	mov	r0, r8
	bl	REG_WR
	ldr	r3, .L5+16
	mov	r2, r4
	ldr	r1, [r3]
	mov	r0, r8
	bl	REG_WR
	ldr	r3, .L5+20
	mov	r2, r5
	ldr	r1, [r3]
	mov	r0, r8
	bl	REG_WR
	ldr	r3, .L5+24
	mov	r2, r4
	mov	r0, r8
	pop	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r1, [r3]
	b	REG_WR
.L6:
	.align	2
.L5:
	.word	.LC0
	.word	.LC1
	.word	ELINK_ETS_BW_LIMIT_CREDIT_WEIGHT
	.word	NIG_REG_P0_TX_ARB_CREDIT_WEIGHT_0
	.word	NIG_REG_P0_TX_ARB_CREDIT_WEIGHT_1
	.word	PBF_REG_COS0_WEIGHT
	.word	PBF_REG_COS1_WEIGHT
	.size	elink_ets_bw_limit, .-elink_ets_bw_limit
	.comm	PBF_REG_COS1_WEIGHT,4,4
	.comm	PBF_REG_COS0_WEIGHT,4,4
	.comm	NIG_REG_P0_TX_ARB_CREDIT_WEIGHT_1,4,4
	.comm	NIG_REG_P0_TX_ARB_CREDIT_WEIGHT_0,4,4
	.comm	ELINK_ETS_BW_LIMIT_CREDIT_WEIGHT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
