// File: /workspace/github_cpp_makefile_star2_O1/ColinHarker[P]ltsim/src/system.cpp
// Function: System::display(WindowWrap&)
void System::display(WindowWrap& disp)
{
   constexpr char titles[] = " CPU   MEM  USER   PID      VSZ    RSS   TTY  STAT START  "
                             "TIME COMMAND";

   mvwprintw(disp.getWin(), 1, 0, titles);
   int ROW = 2;
   for(SystemProcess sp : m_processes)
   {
      float cpu = sp.getCpuAsFloat();
      float mem = sp.getMemAsFloat();

      std::string cpuStr = sp.getCpuAsString();
      std::string memStr = sp.getMemAsString();

      displayPercentColor(disp, cpu, cpuStr + " ", ROW, 1);
      displayPercentColor(disp, mem, memStr, ROW, 7);

      mvwprintw(disp.getWin(), ROW, 12, sp.toString().c_str());
      ROW++;
   }
   wclrtobot(disp.getWin());
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x258, %rsp            # imm = 0x258
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x3d40(%rip), %rsi      # 0xa310
leaq 0xb0(%rsp), %r14
movl $0x8, %ecx
movq %r14, %rdi
rep  movsq (%rsi), %es:(%rdi)
movl $0x444e41, 0x43(%r14)   # imm = 0x444E41
movl $0x414d4d4f, 0x40(%r14) # imm = 0x414D4D4F
movq %rbx, %rdi
callq 0x969e
movq %rax, %rdi
movl $0x1, %esi
xorl %edx, %edx
movq %r14, %rcx
xorl %eax, %eax
callq 0x3060
movq (%r15), %r14
movq 0x8(%r15), %rax
movq %rax, 0x88(%rsp)
cmpq %rax, %r14
je 0x67e1
movl $0x2, %ebp
leaq 0xf8(%rsp), %r15
leaq 0x8(%rsp), %r12
movq %r15, %rdi
movq %r14, %rsi
callq 0x814c
movq %r15, %rdi
callq 0x63c2
movss %xmm0, 0x4(%rsp)
movq %r15, %rdi
callq 0x63f6
movss %xmm0, (%rsp)
leaq 0x68(%rsp), %rdi
movq %r15, %rsi
callq 0x63d2
leaq 0x48(%rsp), %rdi
movq %r15, %rsi
callq 0x6406
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x3c88
movq %r12, %rdi
leaq 0x39b3(%rip), %rsi      # 0xa055
callq 0x3430
movq %rbx, %rdi
movss 0x4(%rsp), %xmm0
movq %r12, %rsi
movl %ebp, %edx
movl $0x1, %ecx
callq 0x8f55
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x66db
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3210
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x3c88
movq %rbx, %rdi
movss (%rsp), %xmm0
leaq 0x28(%rsp), %rsi
movl %ebp, %edx
movl $0x7, %ecx
callq 0x8f55
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x6731
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3210
movq %rbx, %rdi
callq 0x969e
movq %rax, %r13
leaq 0x90(%rsp), %rdi
movq %r15, %rsi
callq 0x612c
movq 0x90(%rsp), %rcx
movq %r13, %rdi
movl %ebp, %esi
movl $0xc, %edx
xorl %eax, %eax
callq 0x3060
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x678a
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x3210
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x67a6
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3210
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x67c2
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3210
movq %r15, %rdi
callq 0x3b50
addq $0x160, %r14            # imm = 0x160
incl %ebp
cmpq 0x88(%rsp), %r14
jne 0x6639
movq %rbx, %rdi
callq 0x969e
movq %rax, %rdi
callq 0x32a0
addq $0x258, %rsp            # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6807
jmp 0x6807
movq %rax, %rbx
jmp 0x68af
movq %rax, %rbx
jmp 0x6893
jmp 0x6816
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x6877
movq 0x18(%rsp), %rsi
jmp 0x686a
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x6877
movq 0x38(%rsp), %rsi
jmp 0x686a
jmp 0x6874
movq %rax, %rbx
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x6877
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x3210
jmp 0x6877
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x6893
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3210
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x68af
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3210
leaq 0xf8(%rsp), %rdi
callq 0x3b50
movq %rbx, %rdi
callq 0x33f0