	.file	"extr_Platform.c_Platform_setCPUValues.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	Platform_setCPUValues
	.type	Platform_setCPUValues, @function
Platform_setCPUValues:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	.cfi_offset 15, -24
	mov	r15, rdi
	push	r14
	push	r13
	push	r12
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	movsx	r12, esi
	push	rbx
	sub	rsp, 56
	.cfi_offset 3, -56
	movsx	rcx, DWORD PTR CPUSTATES[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	mov	rax, QWORD PTR 8[rdi]
	mov	rdi, rsp
	mov	r10, QWORD PTR [rax]
	lea	rax, 15[0+rcx*4]
	mov	rsi, rax
	mov	rdx, rax
	and	rsi, -4096
	and	rdx, -16
	sub	rdi, rsi
	mov	rsi, rdi
	cmp	rsp, rsi
	je	.L3
.L33:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rsi
	jne	.L33
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L34
.L4:
	mov	rsi, rax
	mov	rdi, rsp
	mov	rdx, rax
	mov	r13, rsp
	and	rsi, -4096
	and	rdx, -16
	sub	rdi, rsi
	mov	rsi, rdi
	cmp	rsp, rsi
	je	.L6
.L35:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rsi
	jne	.L35
.L6:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L36
.L7:
	mov	rdx, rax
	mov	rbx, rsp
	and	rax, -4096
	mov	r14, rsp
	sub	rbx, rax
	and	rdx, -16
	mov	rax, rbx
	cmp	rsp, rax
	je	.L9
.L37:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L37
.L9:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	je	.L10
	or	QWORD PTR -8[rsp+rdx], 0
.L10:
	mov	eax, DWORD PTR CTL_KERN[rip]
	sal	rcx, 3
	mov	r11, rsp
	xor	r9d, r9d
	mov	QWORD PTR -80[rbp], rcx
	xor	r8d, r8d
	lea	rcx, -80[rbp]
	lea	rdi, -68[rbp]
	mov	DWORD PTR -68[rbp], eax
	mov	rdx, r13
	mov	esi, 3
	mov	rbx, QWORD PTR [r15]
	mov	eax, DWORD PTR KERN_CPTIME2[rip]
	mov	QWORD PTR -96[rbp], r10
	mov	QWORD PTR -88[rbp], r11
	mov	DWORD PTR -64[rbp], eax
	lea	eax, -1[r12]
	mov	DWORD PTR -60[rbp], eax
	call	sysctl@PLT
	mov	r11, QWORD PTR -88[rbp]
	mov	r10, QWORD PTR -96[rbp]
	pxor	xmm1, xmm1
	cmp	eax, -1
	je	.L11
	mov	rax, QWORD PTR old_v[rip]
	mov	r8, r11
	mov	rdx, r13
	mov	rsi, r14
	mov	DWORD PTR [r10+r12*4], 1
	sal	r12, 3
	mov	edi, DWORD PTR CPUSTATES[rip]
	mov	rcx, QWORD PTR -8[rax+r12]
	call	percentages@PLT
	mov	eax, DWORD PTR CPUSTATES[rip]
	test	eax, eax
	jle	.L12
	mov	rax, QWORD PTR old_v[rip]
	movsd	xmm1, QWORD PTR .LC1[rip]
	mov	rcx, QWORD PTR -8[rax+r12]
	xor	eax, eax
	.p2align 4,,10
	.p2align 3
.L13:
	mov	edx, DWORD PTR 0[r13+rax*4]
	pxor	xmm0, xmm0
	mov	DWORD PTR [rcx+rax*4], edx
	cvtsi2sd	xmm0, DWORD PTR [r14+rax*4]
	divsd	xmm0, xmm1
	movsd	QWORD PTR [rbx+rax*8], xmm0
	add	rax, 1
	cmp	DWORD PTR CPUSTATES[rip], eax
	jg	.L13
.L12:
	mov	esi, 4
	mov	rdi, r15
	call	Meter_setItems@PLT
	movsd	xmm0, QWORD PTR [rbx]
	addsd	xmm0, QWORD PTR 8[rbx]
	addsd	xmm0, QWORD PTR 16[rbx]
	addsd	xmm0, QWORD PTR 24[rbx]
	movsd	xmm1, QWORD PTR .LC2[rip]
	comisd	xmm1, xmm0
	pxor	xmm1, xmm1
	jb	.L11
	comisd	xmm0, xmm1
	jb	.L11
.L1:
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L38
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L34:
	.cfi_restore_state
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
.L36:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L11:
	movapd	xmm0, xmm1
	jmp	.L1
.L38:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	Platform_setCPUValues, .-Platform_setCPUValues
	.comm	old_v,8,8
	.comm	KERN_CPTIME2,4,4
	.comm	CTL_KERN,4,4
	.comm	CPUSTATES,4,4
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC1:
	.long	0
	.long	1076101120
	.align 8
.LC2:
	.long	0
	.long	1079574528
	.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_Platform.c_Platform_setCPUValues.c"
	.text
	.global	__aeabi_i2d
	.global	__aeabi_ddiv
	.global	__aeabi_dadd
	.global	__aeabi_dcmple
	.global	__aeabi_dcmpge
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	Platform_setCPUValues
	.syntax unified
	.arm
	.fpu softvfp
	.type	Platform_setCPUValues, %function
Platform_setCPUValues:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	add	fp, sp, #32
	sub	sp, sp, #52
	mov	r10, r0
	mov	r8, r1
	mov	r4, #0
	ldr	r9, .L16
	ldr	lr, [r10, #4]
	ldr	r1, [r9]
	ldr	r0, .L16+4
	lsl	r3, r1, #2
	add	r3, r3, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	add	r5, sp, #8
	sub	sp, sp, r3
	add	r2, sp, #8
	ldr	ip, .L16+8
	sub	sp, sp, r3
	ldr	r3, [lr]
	ldr	r7, .L16+12
	ldr	r0, [r0]
	ldr	ip, [ip]
	str	r2, [fp, #-64]
	str	r3, [fp, #-68]
	str	r4, [sp, #4]
	str	r4, [sp]
	sub	lr, r8, #1
	ldr	r7, [r7]
	str	r7, [fp, #-40]
	mov	r7,#0
	lsl	r1, r1, #3
	str	lr, [fp, #-44]
	ldr	lr, [r10]
	str	r1, [fp, #-56]
	str	r0, [fp, #-52]
	mov	r2, r5
	mov	r1, #3
	sub	r3, fp, #56
	sub	r0, fp, #52
	mov	r6, lr
	str	lr, [fp, #-72]
	str	ip, [fp, #-48]
	bl	sysctl
	cmn	r0, #1
	beq	.L2
	mov	r0, #1
	ldr	r7, .L16+16
	lsl	ip, r8, #2
	ldr	r3, [r7]
	sub	r2, ip, #4
	ldr	ip, [fp, #-68]
	ldr	r3, [r3, r2]
	add	r1, sp, #8
	str	r0, [ip, r8, lsl #2]
	str	r2, [fp, #-76]
	str	r1, [sp]
	mov	r2, r5
	ldr	r0, [r9]
	ldr	r1, [fp, #-64]
	bl	percentages
	ldr	r3, [r9]
	cmp	r3, r4
	ble	.L3
	ldr	r3, [r7]
	ldr	r2, [fp, #-76]
	mov	r8, r6
	ldr	r7, [r3, r2]
	ldr	r3, [fp, #-64]
	sub	r5, r5, #4
	sub	r6, r3, #4
	sub	r7, r7, #4
.L4:
	ldr	r3, [r5, #4]!
	add	r4, r4, #1
	str	r3, [r7, #4]!
	ldr	r0, [r6, #4]!
	bl	__aeabi_i2d
	ldr	r3, .L16+20
	mov	r2, #0
	bl	__aeabi_ddiv
	ldr	r3, [r9]
	stm	r8!, {r0-r1}
	cmp	r3, r4
	bgt	.L4
.L3:
	mov	r1, #4
	mov	r0, r10
	bl	Meter_setItems
	ldr	r4, [fp, #-72]
	add	r3, r4, #8
	ldmia	r3, {r2-r3}
	ldmia	r4, {r0-r1}
	bl	__aeabi_dadd
	add	r3, r4, #16
	ldmia	r3, {r2-r3}
	bl	__aeabi_dadd
	add	r3, r4, #24
	ldmia	r3, {r2-r3}
	bl	__aeabi_dadd
	mov	r2, #0
	ldr	r3, .L16+24
	mov	r4, r0
	mov	r5, r1
	bl	__aeabi_dcmple
	cmp	r0, #0
	beq	.L2
	mov	r2, #0
	mov	r3, #0
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dcmpge
	cmp	r0, #0
	bne	.L1
.L2:
	mov	r4, #0
	mov	r5, #0
.L1:
	ldr	r3, .L16+12
	ldr	r2, [r3]
	ldr	r3, [fp, #-40]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L15
	mov	r0, r4
	mov	r1, r5
	sub	sp, fp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L15:
	bl	__stack_chk_fail
.L17:
	.align	2
.L16:
	.word	CPUSTATES
	.word	CTL_KERN
	.word	KERN_CPTIME2
	.word	.LC0
	.word	old_v
	.word	1076101120
	.word	1079574528
	.size	Platform_setCPUValues, .-Platform_setCPUValues
	.comm	old_v,4,4
	.comm	KERN_CPTIME2,4,4
	.comm	CTL_KERN,4,4
	.comm	CPUSTATES,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
