	.file	"extr_be_cmds.c_be_cmd_config_qos.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	be_cmd_config_qos
	.type	be_cmd_config_qos, @function
be_cmd_config_qos:
.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
	mov	r13d, edx
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12d, ecx
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	ebx, esi
	sub	rsp, 48
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	call	BE3_chip@PLT
	test	rax, rax
	jne	.L12
	mov	r14, rsp
	mov	rdi, r14
	call	be_reset_nic_desc@PLT
	mov	eax, DWORD PTR 0[rbp]
	mov	rdi, rbp
	mov	DWORD PTR 32[rsp], r12d
	mov	QWORD PTR 24[rsp], 0
	mov	DWORD PTR 36[rsp], eax
	call	lancer_chip@PLT
	test	rax, rax
	jne	.L13
	mov	eax, DWORD PTR NIC_RESOURCE_DESC_TYPE_V1[rip]
	mov	ecx, DWORD PTR NOSV_SHIFT[rip]
	mov	edi, 100
	mov	edx, DWORD PTR IMM_SHIFT[rip]
	mov	DWORD PTR 8[rsp], eax
	mov	eax, DWORD PTR RESOURCE_DESC_SIZE_V1[rip]
	mov	DWORD PTR 4[rsp], eax
	mov	eax, 1
	sal	eax, cl
	bts	eax, edx
	mov	DWORD PTR [rsp], eax
	test	ebx, ebx
	je	.L6
	imul	eax, ebx, 100
	cdq
	idiv	r13d
	mov	edi, eax
.L6:
	call	cpu_to_le32@PLT
	mov	r8d, 1
	mov	QWORD PTR 16[rsp], rax
.L5:
	mov	edx, DWORD PTR 4[rsp]
	mov	r9d, r12d
	mov	ecx, 1
	mov	rsi, r14
	mov	rdi, rbp
	call	be_cmd_set_profile_config@PLT
.L1:
	mov	rbx, QWORD PTR 40[rsp]
	xor	rbx, QWORD PTR fs:40
	jne	.L14
	add	rsp, 48
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	pop	rbx
	.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
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	mov	eax, DWORD PTR NIC_RESOURCE_DESC_TYPE_V0[rip]
	mov	ecx, DWORD PTR IMM_SHIFT[rip]
	movsx	rdi, ebx
	sar	ebx, 31
	mov	edx, DWORD PTR QUN_SHIFT[rip]
	imul	rdi, rdi, 1717986919
	mov	DWORD PTR 8[rsp], eax
	mov	eax, DWORD PTR RESOURCE_DESC_SIZE_V0[rip]
	mov	DWORD PTR 4[rsp], eax
	mov	eax, 1
	sar	rdi, 34
	sal	eax, cl
	sub	edi, ebx
	bts	eax, edx
	mov	edx, DWORD PTR NOSV_SHIFT[rip]
	bts	eax, edx
	mov	DWORD PTR [rsp], eax
	call	cpu_to_le32@PLT
	xor	r8d, r8d
	mov	QWORD PTR 16[rsp], rax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L12:
	movsx	rsi, ebx
	sar	ebx, 31
	mov	edx, r12d
	mov	rdi, rbp
	imul	rsi, rsi, 1717986919
	sar	rsi, 34
	sub	esi, ebx
	call	be_cmd_set_qos@PLT
	jmp	.L1
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	be_cmd_config_qos, .-be_cmd_config_qos
	.comm	RESOURCE_DESC_SIZE_V1,4,4
	.comm	RESOURCE_DESC_SIZE_V0,4,4
	.comm	QUN_SHIFT,4,4
	.comm	NOSV_SHIFT,4,4
	.comm	NIC_RESOURCE_DESC_TYPE_V1,4,4
	.comm	NIC_RESOURCE_DESC_TYPE_V0,4,4
	.comm	IMM_SHIFT,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_be_cmds.c_be_cmd_config_qos.c"
	.text
	.global	__aeabi_idiv
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	be_cmd_config_qos
	.syntax unified
	.arm
	.fpu softvfp
	.type	be_cmd_config_qos, %function
be_cmd_config_qos:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r7, r3
	ldr	r3, .L14
	sub	sp, sp, #40
	mov	r4, r1
	mov	r8, r2
	ldr	r3, [r3]
	str	r3, [sp, #36]
	mov	r3,#0
	mov	r6, r0
	bl	BE3_chip
	subs	r5, r0, #0
	bne	.L11
	add	r0, sp, #8
	bl	be_reset_nic_desc
	ldr	r3, [r6]
	mov	r0, r6
	str	r7, [sp, #28]
	str	r5, [sp, #24]
	str	r3, [sp, #32]
	bl	lancer_chip
	cmp	r0, #0
	bne	.L12
	mov	r2, #1
	ldr	r1, .L14+4
	ldr	r3, .L14+8
	ldr	ip, [r1]
	ldr	r3, [r3]
	ldr	r0, .L14+12
	ldr	r1, .L14+16
	ldr	r0, [r0]
	ldr	r1, [r1]
	lsl	r3, r2, r3
	cmp	r4, #0
	orr	r3, r3, r2, lsl ip
	str	r0, [sp, #16]
	str	r3, [sp, #8]
	moveq	r0, #100
	str	r1, [sp, #12]
	beq	.L6
	add	r4, r4, r4, lsl #2
	add	r4, r4, r4, lsl #2
	mov	r1, r8
	lsl	r0, r4, #2
	bl	__aeabi_idiv
.L6:
	bl	cpu_to_le32
	mov	r5, #1
	str	r0, [sp, #20]
.L5:
	mov	r0, r6
	mov	r3, #1
	stm	sp, {r5, r7}
	ldr	r2, [sp, #12]
	add	r1, sp, #8
	bl	be_cmd_set_profile_config
.L1:
	ldr	r3, .L14
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L13
	add	sp, sp, #40
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L12:
	mov	ip, #1
	ldr	r1, .L14+20
	ldr	r3, .L14+4
	ldr	r2, .L14+24
	ldr	r3, [r3]
	smull	r0, r2, r4, r2
	ldr	r0, [r1]
	ldr	r1, .L14+8
	lsl	r3, ip, r3
	ldr	r1, [r1]
	orr	r3, r3, ip, lsl r0
	orr	r3, r3, ip, lsl r1
	ldr	lr, .L14+28
	ldr	ip, .L14+32
	asr	r0, r4, #31
	ldr	lr, [lr]
	rsb	r0, r0, r2, asr #2
	ldr	r2, [ip]
	str	r3, [sp, #8]
	str	lr, [sp, #16]
	str	r2, [sp, #12]
	bl	cpu_to_le32
	str	r0, [sp, #20]
	b	.L5
.L11:
	ldr	r0, .L14+24
	asr	r1, r4, #31
	smull	r3, r4, r0, r4
	mov	r2, r7
	mov	r0, r6
	rsb	r1, r1, r4, asr #2
	bl	be_cmd_set_qos
	b	.L1
.L13:
	bl	__stack_chk_fail
.L15:
	.align	2
.L14:
	.word	.LC0
	.word	IMM_SHIFT
	.word	NOSV_SHIFT
	.word	NIC_RESOURCE_DESC_TYPE_V1
	.word	RESOURCE_DESC_SIZE_V1
	.word	QUN_SHIFT
	.word	1717986919
	.word	NIC_RESOURCE_DESC_TYPE_V0
	.word	RESOURCE_DESC_SIZE_V0
	.size	be_cmd_config_qos, .-be_cmd_config_qos
	.comm	RESOURCE_DESC_SIZE_V1,4,4
	.comm	RESOURCE_DESC_SIZE_V0,4,4
	.comm	QUN_SHIFT,4,4
	.comm	NOSV_SHIFT,4,4
	.comm	NIC_RESOURCE_DESC_TYPE_V1,4,4
	.comm	NIC_RESOURCE_DESC_TYPE_V0,4,4
	.comm	IMM_SHIFT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
