	.file	"extr_apm_32.c_apm_cpu_idle.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	apm_cpu_idle, @function
apm_cpu_idle:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	ebp, 1
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	xor	ebx, ebx
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	esi, DWORD PTR jiffies[rip]
	mov	ecx, esi
	sub	ecx, DWORD PTR last_jiffies.1939[rip]
.L2:
	cmp	DWORD PTR IDLE_CALC_LIMIT[rip], ecx
	jnb	.L3
	mov	rax, QWORD PTR current[rip]
	mov	DWORD PTR last_jiffies.1939[rip], esi
	mov	DWORD PTR use_apm_idle.1938[rip], 0
	mov	eax, DWORD PTR [rax]
	mov	DWORD PTR last_stime.1940[rip], eax
.L22:
	mov	r12d, DWORD PTR IDLE_LEAKY_MAX[rip]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L25:
	cmp	eax, 1
	cmove	ebx, ebp
.L7:
	xor	eax, eax
	call	original_pm_idle@PLT
	xor	eax, eax
	call	local_irq_disable@PLT
	mov	esi, DWORD PTR jiffies[rip]
	mov	ecx, esi
	sub	ecx, DWORD PTR last_jiffies.1939[rip]
	cmp	DWORD PTR idle_period[rip], ecx
	jb	.L2
.L6:
	xor	eax, eax
	call	need_resched@PLT
	test	eax, eax
	jne	.L24
	mov	eax, DWORD PTR use_apm_idle.1938[rip]
	test	eax, eax
	je	.L7
	xor	eax, eax
	mov	r13d, DWORD PTR jiffies[rip]
	call	apm_do_idle@PLT
	test	eax, eax
	jne	.L25
	cmp	DWORD PTR jiffies[rip], r13d
	mov	ebx, 1
	je	.L9
	test	r12d, r12d
	je	.L7
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L24:
	test	ebx, ebx
	jne	.L26
.L12:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	jmp	local_irq_enable@PLT
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	test	r12d, r12d
	je	.L7
	sub	r12d, 1
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L3:
	cmp	DWORD PTR idle_period[rip], ecx
	jnb	.L22
	mov	rax, QWORD PTR current[rip]
	xor	edx, edx
	mov	edi, DWORD PTR [rax]
	mov	eax, edi
	sub	eax, DWORD PTR last_stime.1940[rip]
	imul	eax, eax, 100
	div	ecx
	cmp	DWORD PTR idle_threshold[rip], eax
	setb	al
	cmp	QWORD PTR apm_info[rip], 0
	movzx	eax, al
	mov	DWORD PTR use_apm_idle.1938[rip], eax
	je	.L5
	mov	DWORD PTR use_apm_idle.1938[rip], 0
.L5:
	mov	DWORD PTR last_jiffies.1939[rip], esi
	mov	DWORD PTR last_stime.1940[rip], edi
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L26:
	xor	eax, eax
	call	apm_do_busy@PLT
	jmp	.L12
	.cfi_endproc
.LFE0:
	.size	apm_cpu_idle, .-apm_cpu_idle
	.local	last_stime.1940
	.comm	last_stime.1940,4,4
	.local	use_apm_idle.1938
	.comm	use_apm_idle.1938,4,4
	.local	last_jiffies.1939
	.comm	last_jiffies.1939,4,4
	.comm	jiffies,4,4
	.comm	idle_threshold,4,4
	.comm	idle_period,4,4
	.comm	current,8,8
	.comm	apm_info,8,8
	.comm	IDLE_LEAKY_MAX,4,4
	.comm	IDLE_CALC_LIMIT,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_apm_32.c_apm_cpu_idle.c"
	.text
	.global	__aeabi_uidiv
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	apm_cpu_idle, %function
apm_cpu_idle:
	@ 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	r6, #0
	ldr	r5, .L32
	ldr	r4, .L32+4
	ldr	r3, [r5]
	ldr	r1, [r4]
	ldr	r10, .L32+8
	ldr	r7, .L32+12
	ldr	fp, .L32+16
	sub	r1, r3, r1
.L2:
	ldr	r3, [r10]
	cmp	r3, r1
	bcs	.L3
	mov	r1, #0
	ldr	r2, [fp]
	ldr	r3, [r5]
	ldr	r2, [r2]
	str	r3, [r4]
	stmib	r4, {r1, r2}
.L4:
	ldr	r3, .L32+20
	ldr	r8, [r3]
	b	.L6
.L29:
	cmp	r0, #1
	moveq	r6, #1
.L7:
	bl	original_pm_idle
	bl	local_irq_disable
	ldr	r1, [r5]
	ldr	r2, [r4]
	ldr	r3, [r7]
	sub	r1, r1, r2
	cmp	r3, r1
	bcc	.L2
.L6:
	bl	need_resched
	cmp	r0, #0
	bne	.L28
	ldr	r3, [r4, #4]
	cmp	r3, #0
	beq	.L7
	ldr	r9, [r5]
	bl	apm_do_idle
	cmp	r0, #0
	bne	.L29
	ldr	r3, [r5]
	cmp	r3, r9
	beq	.L9
	cmp	r8, #0
	bne	.L30
.L14:
	mov	r6, #1
	b	.L7
.L28:
	cmp	r6, #0
	bne	.L31
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	local_irq_enable
.L9:
	cmp	r8, #0
	movne	r6, #1
	subne	r8, r8, #1
	beq	.L14
	b	.L6
.L3:
	ldr	r3, [r7]
	cmp	r3, r1
	bcs	.L4
	ldr	r3, [fp]
	ldr	r0, [r4, #8]
	ldr	r8, [r3]
	sub	r0, r8, r0
	add	r0, r0, r0, lsl #2
	add	r0, r0, r0, lsl #2
	lsl	r0, r0, #2
	bl	__aeabi_uidiv
	ldr	r3, .L32+24
	ldr	r2, [r5]
	ldr	r3, [r3]
	str	r8, [r4, #8]
	cmp	r3, r0
	movcs	r0, #0
	movcc	r0, #1
	ldr	r3, .L32+28
	ldr	r3, [r3]
	cmp	r3, #0
	moveq	r3, r0
	movne	r3, #0
	stm	r4, {r2, r3}
	b	.L4
.L30:
	ldr	r3, .L32+20
	mov	r6, #1
	ldr	r8, [r3]
	b	.L6
.L31:
	bl	apm_do_busy
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	local_irq_enable
.L33:
	.align	2
.L32:
	.word	jiffies
	.word	.LANCHOR0
	.word	IDLE_CALC_LIMIT
	.word	idle_period
	.word	current
	.word	IDLE_LEAKY_MAX
	.word	idle_threshold
	.word	apm_info
	.size	apm_cpu_idle, .-apm_cpu_idle
	.comm	jiffies,4,4
	.comm	idle_threshold,4,4
	.comm	idle_period,4,4
	.comm	current,4,4
	.comm	apm_info,4,4
	.comm	IDLE_LEAKY_MAX,4,4
	.comm	IDLE_CALC_LIMIT,4,4
	.bss
	.align	2
	.set	.LANCHOR0,. + 0
	.type	last_jiffies.4223, %object
	.size	last_jiffies.4223, 4
last_jiffies.4223:
	.space	4
	.type	use_apm_idle.4222, %object
	.size	use_apm_idle.4222, 4
use_apm_idle.4222:
	.space	4
	.type	last_stime.4224, %object
	.size	last_stime.4224, 4
last_stime.4224:
	.space	4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
