// File: /workspace/github_cpp_makefile_star2_O1/acherkaoui[P]HTOP/terminal/terminal.cpp
// Function: Curses::printCpu()
void Curses::printCpu()
{
	int x = 0;
	print(_cpu, x++, 2, "                                     "
		"                   ", 2);
	print(_cpu, x++, 2, ("                         " +
		data.cpu.getModuleName()).c_str(), 8);
	print(_cpu, x++, 2, "                                     "
		"                   ", 2);

	x++;
	std::vector<CPUData> cpu = data.cpu.getStats();

	mvwprintw(_cpu, x++, 2, " Threads: %s", std::to_string(cpu.size()).c_str());
	x++;
	print(_cpu, x, 2, " cpu", 7);
	print(_cpu, x, 35, "Active", 8);
	print(_cpu, x++, 42, "Idle", 4);
	x++;

	for(size_t i = 0; i < cpu.size(); ++i) {
		print(_cpu, x, 2,  (" " + cpu[i].cpu).c_str(), 7);
		ProgressBar(_cpu, x, 9, cpu[i].active);
		print(_cpu, x, 32, ( "   " + std::to_string(cpu[i].active).substr(0, 5) + "%%").c_str(), 8);
		print(_cpu, x++, 40, ( "   " + std::to_string(cpu[i].idle).substr(0, 5) + "%%").c_str(), 4);
		x++;
	}
	print(_cpu, x++, 2, "                                     "
		"                   ", 2);

	mvwin(_cpu  , 1, 1);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %rbx
movq 0x6b8(%rdi), %rsi
leaq 0x1b83(%rip), %r8       # 0xd835
xorl %edx, %edx
movl $0x2, %ecx
movl $0x2, %r9d
callq 0xa25e
movq 0x6b8(%rbx), %r15
movq %rbx, 0x20(%rsp)
leaq 0x20(%rbx), %r14
leaq 0x28(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x7d00
leaq 0x1b69(%rip), %rcx      # 0xd854
movl $0x19, %r8d
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x43b0
leaq 0x10(%rsp), %rsi
movq %rsi, -0x10(%rsi)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xbd23
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0xbd29
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%rsp), %r8
movq %r15, %rsi
movl $0x1, %edx
movl $0x2, %ecx
movl $0x8, %r9d
callq 0xa25e
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xbd70
callq 0x4320
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbd83
callq 0x4320
movq 0x20(%rsp), %rax
movq 0x6b8(%rax), %rsi
leaq 0x1a9f(%rip), %r8       # 0xd835
movl $0x2, %edx
movl $0x2, %ecx
movl $0x2, %r9d
callq 0xa25e
leaq 0x48(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x811e
movq 0x8(%r15), %r14
subq (%r15), %r14
sarq $0x3, %r14
movabsq $-0x1111111111111111, %rax # imm = 0xEEEEEEEEEEEEEEEF
imulq %rax, %r14
movl $0x1, %esi
cmpq $0xa, %r14
jb 0xbe2e
movl $0x4, %esi
movabsq $0x346dc5d63886594b, %rdi # imm = 0x346DC5D63886594B
movq %r14, %rcx
cmpq $0x63, %rcx
jbe 0xbe27
cmpq $0x3e7, %rcx            # imm = 0x3E7
jbe 0xbe2c
cmpq $0x2710, %rcx           # imm = 0x2710
jb 0xbe2e
movq %rcx, %rax
mulq %rdi
shrq $0xb, %rdx
addl $0x4, %esi
cmpq $0x1869f, %rcx          # imm = 0x1869F
movq %rdx, %rcx
ja 0xbdf1
addl $-0x3, %esi
jmp 0xbe2e
addl $-0x2, %esi
jmp 0xbe2e
decl %esi
movq 0x20(%rsp), %rax
movq 0x6b8(%rax), %r15
movl %esi, %esi
movq %rsp, %rdi
leaq 0x10(%rsp), %rax
movq %rax, (%rdi)
xorl %edx, %edx
callq 0x43f0
movq (%rsp), %rdi
movl 0x8(%rsp), %esi
movq %r14, %rdx
callq 0x9c00
movq (%rsp), %r8
leaq 0x1ad8(%rip), %rcx      # 0xd941
movq %r15, %rdi
movl $0x4, %esi
movl $0x2, %edx
xorl %eax, %eax
callq 0x40f0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
movq 0x20(%rsp), %r14
je 0xbe95
callq 0x4320
movq 0x6b8(%r14), %rsi
leaq 0x1aab(%rip), %r8       # 0xd94e
movl $0x6, %edx
movl $0x2, %ecx
movl $0x7, %r9d
callq 0xa25e
movq 0x6b8(%r14), %rsi
leaq 0x1a8d(%rip), %r8       # 0xd953
movl $0x6, %edx
movl $0x23, %ecx
movl $0x8, %r9d
callq 0xa25e
movq 0x6b8(%r14), %rsi
leaq 0x1a71(%rip), %r8       # 0xd95a
movl $0x6, %edx
movl $0x2a, %ecx
movl $0x4, %r9d
callq 0xa25e
movq 0x48(%rsp), %rdx
cmpq %rdx, 0x50(%rsp)
je 0xc2d9
movl $0x8, %ebp
xorl %r13d, %r13d
leaq 0x80(%rsp), %rbx
xorl %r15d, %r15d
movq %r15, 0xa0(%rsp)
movq 0x6b8(%r14), %r14
addq %r13, %rdx
movq %rsp, %rdi
leaq 0x192f(%rip), %rsi      # 0xd86c
callq 0xcbbe
movq (%rsp), %r8
movq %r14, %rsi
movl %ebp, %edx
movl $0x2, %ecx
movl $0x7, %r9d
callq 0xa25e
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
movq 0x20(%rsp), %r14
je 0xbf73
callq 0x4320
movq 0x6b8(%r14), %rdx
movq 0x48(%rsp), %rax
movss 0x70(%rax,%r13), %xmm0
leaq 0xa8(%rsp), %rdi
movl %ebp, %ecx
movl $0x9, %r8d
callq 0xb194
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0xbfb5
callq 0x4320
movq 0x6b8(%r14), %r14
movq 0x48(%rsp), %rax
xorps %xmm0, %xmm0
cvtss2sd 0x70(%rax,%r13), %xmm0
movl $0x3a, %edx
movq %rbx, %r12
movq %rbx, %rdi
movq 0x5fdb(%rip), %rsi      # 0x11fb8
leaq 0x19ae(%rip), %rcx      # 0xd992
movb $0x1, %al
callq 0xcc3f
movl $0x5, %ecx
leaq 0x60(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x4370
movl $0x3, %r8d
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x1854(%rip), %rcx      # 0xd86a
callq 0x43b0
leaq 0x38(%rsp), %rsi
movq %rsi, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xc043
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0xc049
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x28(%rsp), %rdi
leaq 0x1743(%rip), %rsi      # 0xd7b0
callq 0x4600
leaq 0x10(%rsp), %rsi
movq %rsi, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xc098
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0xc09e
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%rsp), %r8
movq %r14, %rsi
movl %ebp, %edx
movl $0x20, %ecx
movl $0x8, %r9d
callq 0xa25e
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
movq 0x20(%rsp), %r14
je 0xc0e7
callq 0x4320
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xc0fb
callq 0x4320
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0xc10f
callq 0x4320
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0xc129
callq 0x4320
movq 0x6b8(%r14), %r14
movq 0x48(%rsp), %rax
xorps %xmm0, %xmm0
cvtss2sd 0x74(%rax,%r13), %xmm0
movl $0x3a, %edx
movq %rbx, %r12
movq %rbx, %rdi
movq 0x5e67(%rip), %rsi      # 0x11fb8
leaq 0x183a(%rip), %rcx      # 0xd992
movb $0x1, %al
callq 0xcc3f
movl $0x5, %ecx
leaq 0x60(%rsp), %r15
movq %r15, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x4370
movl $0x3, %r8d
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x16e0(%rip), %rcx      # 0xd86a
callq 0x43b0
leaq 0x38(%rsp), %rsi
movq %rsi, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xc1b7
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0xc1bd
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x30(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x28(%rsp), %rdi
leaq 0x15cf(%rip), %rsi      # 0xd7b0
callq 0x4600
leaq 0x10(%rsp), %rsi
movq %rsi, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xc20c
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0xc212
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%rsp), %r8
movq %r14, %rsi
movl %ebp, %edx
movl $0x28, %ecx
movl $0x4, %r9d
callq 0xa25e
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
movq 0x20(%rsp), %r14
je 0xc25b
callq 0x4320
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xc26f
callq 0x4320
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0xc283
callq 0x4320
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
movq 0xa0(%rsp), %r15
je 0xc2a5
callq 0x4320
addl $0x2, %ebp
incq %r15
movq 0x48(%rsp), %rdx
movq 0x50(%rsp), %rax
subq %rdx, %rax
sarq $0x3, %rax
movabsq $-0x1111111111111111, %rcx # imm = 0xEEEEEEEEEEEEEEEF
imulq %rcx, %rax
addq $0x78, %r13
cmpq %rax, %r15
jb 0xbf21
jmp 0xc2de
movl $0x8, %ebp
movq 0x6b8(%r14), %rsi
leaq 0x1549(%rip), %r8       # 0xd835
movl %ebp, %edx
movl $0x2, %ecx
movl $0x2, %r9d
callq 0xa25e
movq 0x6b8(%r14), %rdi
movl $0x1, %esi
movl $0x1, %edx
callq 0x41d0
leaq 0x48(%rsp), %rdi
callq 0x85d4
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xc36f
jmp 0xc389
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xc34f
callq 0x4320
jmp 0xc34f
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc3ff
callq 0x4320
jmp 0xc3ff
jmp 0xc389
jmp 0xc389
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
jmp 0xc3eb
jmp 0xc389
jmp 0xc389
jmp 0xc38e
jmp 0xc393
jmp 0xc398
jmp 0xc39d
movq %rax, %rbx
jmp 0xc3f5
movq %rax, %rbx
jmp 0xc3db
movq %rax, %rbx
jmp 0xc3c7
movq %rax, %rbx
jmp 0xc3b3
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xc3b3
callq 0x4320
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xc3c7
callq 0x4320
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0xc3db
callq 0x4320
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0xc3f5
callq 0x4320
leaq 0x48(%rsp), %rdi
callq 0x85d4
movq %rbx, %rdi
callq 0x45c0
nop