// File: /workspace/github_cpp_makefile_star2_O3/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 0x1cb9(%rip), %r8       # 0xd845
xorl %edx, %edx
movl $0x2, %ecx
movl $0x2, %r9d
callq 0xa156
movq 0x6b8(%rbx), %r15
movq %rbx, 0x20(%rsp)
leaq 0x20(%rbx), %r14
leaq 0x28(%rsp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x7c64
leaq 0x1c9f(%rip), %rcx      # 0xd864
movl $0x19, %r8d
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x43b0
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %r8
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %r8
je 0xbbfe
movq %r8, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0xbc09
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq %r12, %r8
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r15, %rsi
movl $0x1, %edx
movl $0x2, %ecx
movl $0x8, %r9d
callq 0xa156
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xbc47
callq 0x4320
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xbc5a
callq 0x4320
movq 0x20(%rsp), %rax
movq 0x6b8(%rax), %rsi
leaq 0x1bd8(%rip), %r8       # 0xd845
movl $0x2, %edx
movl $0x2, %ecx
movl $0x2, %r9d
callq 0xa156
leaq 0x48(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x8064
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 0xbd05
movl $0x4, %esi
movabsq $0x346dc5d63886594b, %rdi # imm = 0x346DC5D63886594B
movq %r14, %rcx
cmpq $0x63, %rcx
jbe 0xbcfe
cmpq $0x3e7, %rcx            # imm = 0x3E7
jbe 0xbd03
cmpq $0x2710, %rcx           # imm = 0x2710
jb 0xbd05
movq %rcx, %rax
mulq %rdi
shrq $0xb, %rdx
addl $0x4, %esi
cmpq $0x1869f, %rcx          # imm = 0x1869F
movq %rdx, %rcx
ja 0xbcc8
addl $-0x3, %esi
jmp 0xbd05
addl $-0x2, %esi
jmp 0xbd05
decl %esi
movq 0x20(%rsp), %rax
movq 0x6b8(%rax), %r15
movl %esi, %esi
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
movq %rsp, %rdi
xorl %edx, %edx
callq 0x43f0
movq (%rsp), %rdi
movl 0x8(%rsp), %esi
movq %r14, %rdx
callq 0x9af8
movq (%rsp), %r8
leaq 0x1c10(%rip), %rcx      # 0xd951
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 0xbd6d
callq 0x4320
movq 0x6b8(%r14), %rsi
leaq 0x1be3(%rip), %r8       # 0xd95e
movl $0x6, %edx
movl $0x2, %ecx
movl $0x7, %r9d
callq 0xa156
movq 0x6b8(%r14), %rsi
leaq 0x1bc5(%rip), %r8       # 0xd963
movl $0x6, %edx
movl $0x23, %ecx
movl $0x8, %r9d
callq 0xa156
movq 0x6b8(%r14), %rsi
leaq 0x1ba9(%rip), %r8       # 0xd96a
movl $0x6, %edx
movl $0x2a, %ecx
movl $0x4, %r9d
callq 0xa156
movq 0x48(%rsp), %rdx
cmpq %rdx, 0x50(%rsp)
je 0xc1b1
movl $0x8, %ebp
xorl %r15d, %r15d
leaq 0x80(%rsp), %rbx
xorl %r12d, %r12d
movq %r12, 0xa0(%rsp)
movq 0x6b8(%r14), %r14
addq %r15, %rdx
movq %rsp, %rdi
leaq 0x1a67(%rip), %rsi      # 0xd87c
callq 0xcab2
movq (%rsp), %r8
movq %r14, %rsi
movl %ebp, %edx
movl $0x2, %ecx
movl $0x7, %r9d
callq 0xa156
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
movq 0x20(%rsp), %r14
je 0xbe4b
callq 0x4320
movq 0x6b8(%r14), %rdx
movq 0x48(%rsp), %rax
movss 0x70(%rax,%r15), %xmm0
leaq 0xa8(%rsp), %rdi
movl %ebp, %ecx
movl $0x9, %r8d
callq 0xb08e
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0xbe8d
callq 0x4320
movq 0x6b8(%r14), %r14
movq 0x48(%rsp), %rax
xorps %xmm0, %xmm0
cvtss2sd 0x70(%rax,%r15), %xmm0
movl $0x3a, %edx
movq %rbx, %r13
movq %rbx, %rdi
movq 0x6103(%rip), %rsi      # 0x11fb8
leaq 0x1ae6(%rip), %rcx      # 0xd9a2
movb $0x1, %al
callq 0xcb33
movl $0x5, %ecx
leaq 0x60(%rsp), %r12
movq %r12, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x4370
movl $0x3, %r8d
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x198c(%rip), %rcx      # 0xd87a
callq 0x43b0
leaq 0x38(%rsp), %rsi
movq %rsi, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xbf1b
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0xbf21
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 0x187b(%rip), %rsi      # 0xd7c0
callq 0x4600
leaq 0x10(%rsp), %rsi
movq %rsi, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xbf70
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0xbf76
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 0xa156
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
movq 0x20(%rsp), %r14
je 0xbfbf
callq 0x4320
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xbfd3
callq 0x4320
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0xbfe7
callq 0x4320
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0xc001
callq 0x4320
movq 0x6b8(%r14), %r14
movq 0x48(%rsp), %rax
xorps %xmm0, %xmm0
cvtss2sd 0x74(%rax,%r15), %xmm0
movl $0x3a, %edx
movq %rbx, %r13
movq %rbx, %rdi
movq 0x5f8f(%rip), %rsi      # 0x11fb8
leaq 0x1972(%rip), %rcx      # 0xd9a2
movb $0x1, %al
callq 0xcb33
movl $0x5, %ecx
leaq 0x60(%rsp), %r12
movq %r12, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x4370
movl $0x3, %r8d
movq %r12, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0x1818(%rip), %rcx      # 0xd87a
callq 0x43b0
leaq 0x38(%rsp), %rsi
movq %rsi, 0x28(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xc08f
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0xc095
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 0x1707(%rip), %rsi      # 0xd7c0
callq 0x4600
leaq 0x10(%rsp), %rsi
movq %rsi, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xc0e4
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0xc0ea
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 0xa156
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
movq 0x20(%rsp), %r14
je 0xc133
callq 0x4320
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xc147
callq 0x4320
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0xc15b
callq 0x4320
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
movq 0xa0(%rsp), %r12
je 0xc17d
callq 0x4320
addl $0x2, %ebp
incq %r12
movq 0x48(%rsp), %rdx
movq 0x50(%rsp), %rax
subq %rdx, %rax
sarq $0x3, %rax
movabsq $-0x1111111111111111, %rcx # imm = 0xEEEEEEEEEEEEEEEF
imulq %rcx, %rax
addq $0x78, %r15
cmpq %rax, %r12
jb 0xbdf9
jmp 0xc1b6
movl $0x8, %ebp
movq 0x6b8(%r14), %rsi
leaq 0x1681(%rip), %r8       # 0xd845
movl %ebp, %edx
movl $0x2, %ecx
movl $0x2, %r9d
callq 0xa156
movq 0x6b8(%r14), %rdi
movl $0x1, %esi
movl $0x1, %edx
callq 0x41d0
leaq 0x48(%rsp), %rdi
callq 0x84fe
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xc242
jmp 0xc25c
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0xc222
callq 0x4320
jmp 0xc222
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc2d2
callq 0x4320
jmp 0xc2d2
jmp 0xc25c
jmp 0xc25c
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
jmp 0xc2be
jmp 0xc25c
jmp 0xc25c
jmp 0xc261
jmp 0xc266
jmp 0xc26b
jmp 0xc270
movq %rax, %rbx
jmp 0xc2c8
movq %rax, %rbx
jmp 0xc2ae
movq %rax, %rbx
jmp 0xc29a
movq %rax, %rbx
jmp 0xc286
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xc286
callq 0x4320
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xc29a
callq 0x4320
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0xc2ae
callq 0x4320
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0xc2c8
callq 0x4320
leaq 0x48(%rsp), %rdi
callq 0x84fe
movq %rbx, %rdi
callq 0x45c0