// File: ColinHarker[P]ltsim/src/utils.cpp
// Function: displayPercentColor(WindowWrap&, float, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, int)
void displayPercentColor(WindowWrap& disp, float percent, string str, int row, int col)
{
   if(percent == 0.0)
   {
      displayElement(disp, row, col, str, flag::printType::standard, flag::color::none);
   }
   else if(percent < 60)
   {
      displayElement(disp, row, col, str, flag::printType::use_color, flag::color::green);
   }
   else if(percent >= 60 && percent < 85)
   {
      displayElement(disp, row, col, str, flag::printType::use_color, flag::color::yellow);
   }
   else
   {
      displayElement(disp, row, col, str, flag::printType::use_color, flag::color::red);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movq %rsi, -0xb8(%rbp)
movq %rdi, -0x8(%rbp)
movss %xmm0, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl %ecx, -0x20(%rbp)
movss -0xc(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xcdb7
jp 0xcdb7
movq -0xb8(%rbp), %rsi
movq -0x8(%rbp), %rax
movq %rax, -0xd0(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0xc8(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0xc4(%rbp)
leaq -0x40(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
callq 0x3130
movq -0xd0(%rbp), %rdi
movl -0xc8(%rbp), %esi
movl -0xc4(%rbp), %edx
movq -0xc0(%rbp), %rcx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0xcbf0
jmp 0xcd8f
leaq -0x40(%rbp), %rdi
callq 0x31d0
jmp 0xcf93
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x31d0
jmp 0xcf9c
movss 0x1569(%rip), %xmm0     # 0xe328
ucomiss -0xc(%rbp), %xmm0
jbe 0xce4f
movq -0xb8(%rbp), %rsi
movq -0x8(%rbp), %rax
movq %rax, -0xe8(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0xe0(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0xdc(%rbp)
leaq -0x70(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
callq 0x3130
movq -0xe8(%rbp), %rdi
movl -0xe0(%rbp), %esi
movl -0xdc(%rbp), %edx
movq -0xd8(%rbp), %rcx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0xcbf0
jmp 0xce27
leaq -0x70(%rbp), %rdi
callq 0x31d0
jmp 0xcf91
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x31d0
jmp 0xcf9c
movss -0xc(%rbp), %xmm0
movss 0x14cc(%rip), %xmm1     # 0xe328
ucomiss %xmm1, %xmm0
jb 0xcf06
movss 0x14bf(%rip), %xmm0     # 0xe32c
ucomiss -0xc(%rbp), %xmm0
jbe 0xcf06
movq -0xb8(%rbp), %rsi
movq -0x8(%rbp), %rax
movq %rax, -0x100(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0xf8(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0xf4(%rbp)
leaq -0x90(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
callq 0x3130
movq -0x100(%rbp), %rdi
movl -0xf8(%rbp), %esi
movl -0xf4(%rbp), %edx
movq -0xf0(%rbp), %rcx
xorl %r8d, %r8d
movl $0x2, %r9d
callq 0xcbf0
jmp 0xced8
leaq -0x90(%rbp), %rdi
callq 0x31d0
jmp 0xcf8f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x31d0
jmp 0xcf9c
movq -0xb8(%rbp), %rsi
movq -0x8(%rbp), %rax
movq %rax, -0x118(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0x110(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x10c(%rbp)
leaq -0xb0(%rbp), %rdi
movq %rdi, -0x108(%rbp)
callq 0x3130
movq -0x118(%rbp), %rdi
movl -0x110(%rbp), %esi
movl -0x10c(%rbp), %edx
movq -0x108(%rbp), %rcx
xorl %r8d, %r8d
movl $0x3, %r9d
callq 0xcbf0
jmp 0xcf67
leaq -0xb0(%rbp), %rdi
callq 0x31d0
jmp 0xcf8f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x31d0
jmp 0xcf9c
jmp 0xcf91
jmp 0xcf93
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x3510
nopw %cs:(%rax,%rax)