// File: /workspace/github_cpp_makefile_star2_O3/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 0x3dbc(%rip), %rsi      # 0xa360
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 0x960e
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 0x67b5
movl $0x2, %ebp
leaq 0xf8(%rsp), %r15
leaq 0x8(%rsp), %r12
movq %r15, %rdi
movq %r14, %rsi
callq 0x80f0
movq %r15, %rdi
callq 0x6396
movss %xmm0, 0x4(%rsp)
movq %r15, %rdi
callq 0x63ca
movss %xmm0, (%rsp)
leaq 0x68(%rsp), %rdi
movq %r15, %rsi
callq 0x63a6
leaq 0x48(%rsp), %rdi
movq %r15, %rsi
callq 0x63da
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x68(%rsp), %rsi
movq 0x70(%rsp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x3c8e
movq %r12, %rdi
leaq 0x39df(%rip), %rsi      # 0xa055
callq 0x3430
movq %rbx, %rdi
movss 0x4(%rsp), %xmm0
movq %r12, %rsi
movl %ebp, %edx
movl $0x1, %ecx
callq 0x8ef9
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x66af
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 0x3c8e
movq %rbx, %rdi
movss (%rsp), %xmm0
leaq 0x28(%rsp), %rsi
movl %ebp, %edx
movl $0x7, %ecx
callq 0x8ef9
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x6705
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3210
movq %rbx, %rdi
callq 0x960e
movq %rax, %r13
leaq 0x90(%rsp), %rdi
movq %r15, %rsi
callq 0x6100
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 0x675e
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x3210
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x677a
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3210
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x6796
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3210
movq %r15, %rdi
callq 0x3b56
addq $0x160, %r14            # imm = 0x160
incl %ebp
cmpq 0x88(%rsp), %r14
jne 0x660d
movq %rbx, %rdi
callq 0x960e
movq %rax, %rdi
callq 0x32a0
addq $0x258, %rsp            # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x67db
jmp 0x67db
movq %rax, %rbx
jmp 0x6883
movq %rax, %rbx
jmp 0x6867
jmp 0x67ea
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x684b
movq 0x18(%rsp), %rsi
jmp 0x683e
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x684b
movq 0x38(%rsp), %rsi
jmp 0x683e
jmp 0x6848
movq %rax, %rbx
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x684b
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x3210
jmp 0x684b
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x6867
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3210
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x6883
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3210
leaq 0xf8(%rsp), %rdi
callq 0x3b56
movq %rbx, %rdi
callq 0x33f0