	.file	"extr_intel_powerclamp.c_adjust_compensation.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	adjust_compensation, @function
adjust_compensation:
.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
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	movsx	rbp, edi
	mov	rax, rbp
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	sal	rax, 4
	add	rax, QWORD PTR cal_data[rip]
	mov	r13, rax
	mov	rax, QWORD PTR CONFIDENCE_OK[rip]
	cmp	QWORD PTR 0[r13], rax
	jl	.L9
.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
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	lea	rdi, idle_wakeup_counter[rip]
	mov	r12d, esi
	call	atomic_read@PLT
	mov	r14d, eax
	xor	eax, eax
	call	num_online_cpus@PLT
	imul	eax, r12d
	cmp	r14d, eax
	ja	.L1
	mov	edi, DWORD PTR set_target_ratio[rip]
	sub	edi, DWORD PTR current_ratio[rip]
	js	.L1
	imul	rax, rbp, 1717986919
	mov	rbx, rbp
	sar	ebx, 31
	sar	rax, 34
	sub	eax, ebx
	add	eax, 1
	cmp	eax, edi
	jl	.L1
	mov	eax, DWORD PTR 8[r13]
	test	eax, eax
	jne	.L10
	mov	DWORD PTR 8[r13], edi
.L6:
	add	QWORD PTR 0[r13], 1
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L10:
	add	edi, eax
	mov	esi, 2
	call	roundup@PLT
	mov	edx, eax
	shr	edx, 31
	add	eax, edx
	sar	eax
	mov	DWORD PTR 8[r13], eax
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	adjust_compensation, .-adjust_compensation
	.comm	set_target_ratio,4,4
	.comm	idle_wakeup_counter,4,4
	.comm	current_ratio,4,4
	.comm	cal_data,8,8
	.comm	CONFIDENCE_OK,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_intel_powerclamp.c_adjust_compensation.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	adjust_compensation, %function
adjust_compensation:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r2, .L10
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, .L10+4
	ldr	r6, [r2]
	ldr	r3, [r3]
	ldr	r2, [r6, r0, lsl #3]
	add	r8, r6, r0, lsl #3
	cmp	r2, r3
	popge	{r4, r5, r6, r7, r8, pc}
	mov	r4, r0
	ldr	r0, .L10+8
	mov	r5, r1
	bl	atomic_read
	mov	r7, r0
	bl	num_online_cpus
	mul	r1, r5, r0
	cmp	r7, r1
	pophi	{r4, r5, r6, r7, r8, pc}
	ldr	r2, .L10+12
	ldr	r3, .L10+16
	ldr	r0, [r2]
	ldr	r3, [r3]
	subs	r0, r0, r3
	popmi	{r4, r5, r6, r7, r8, pc}
	ldr	r2, .L10+20
	asr	r3, r4, #31
	smull	r1, r2, r4, r2
	rsb	r3, r3, r2, asr #2
	add	r3, r3, #1
	cmp	r3, r0
	poplt	{r4, r5, r6, r7, r8, pc}
	ldr	r3, [r8, #4]
	cmp	r3, #0
	streq	r0, [r8, #4]
	bne	.L9
.L6:
	ldr	r3, [r6, r4, lsl #3]
	add	r3, r3, #1
	str	r3, [r6, r4, lsl #3]
	pop	{r4, r5, r6, r7, r8, pc}
.L9:
	mov	r1, #2
	add	r0, r3, r0
	bl	roundup
	add	r0, r0, r0, lsr #31
	asr	r0, r0, #1
	str	r0, [r8, #4]
	b	.L6
.L11:
	.align	2
.L10:
	.word	cal_data
	.word	CONFIDENCE_OK
	.word	idle_wakeup_counter
	.word	set_target_ratio
	.word	current_ratio
	.word	1717986919
	.size	adjust_compensation, .-adjust_compensation
	.comm	set_target_ratio,4,4
	.comm	idle_wakeup_counter,4,4
	.comm	current_ratio,4,4
	.comm	cal_data,4,4
	.comm	CONFIDENCE_OK,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
