// File: /workspace/github_cpp_makefile_star2_O1/donfreiday[P]gb/./imgui/imgui_demo.cpp
// Function: ExampleAppConsole::ExecCommand(char const*)
void    ExecCommand(const char* command_line)
    {
        AddLog("# %s\n", command_line);

        // Insert into history. First find match and delete it so it can be pushed to the back. This isn't trying to be smart or optimal.
        HistoryPos = -1;
        for (int i = History.Size-1; i >= 0; i--)
            if (Stricmp(History[i], command_line) == 0)
            {
                free(History[i]);
                History.erase(History.begin() + i);
                break;
            }
        History.push_back(strdup(command_line));

        // Process command
        if (Stricmp(command_line, "CLEAR") == 0)
        {
            ClearLog();
        }
        else if (Stricmp(command_line, "HELP") == 0)
        {
            AddLog("Commands:");
            for (int i = 0; i < Commands.Size; i++)
                AddLog("- %s", Commands[i]);
        }
        else if (Stricmp(command_line, "HISTORY") == 0)
        {
            for (int i = History.Size >= 10 ? History.Size - 10 : 0; i < History.Size; i++)
                AddLog("%3d: %s\n", i, History[i]);
        }
        else
        {
            AddLog("Unknown command: '%s'\n", command_line);
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x1637d(%rip), %rsi     # 0x4249e
movq %r14, %rdx
xorl %eax, %eax
callq 0x2bfa2
movl $0xffffffff, 0x128(%rbx) # imm = 0xFFFFFFFF
movslq 0x118(%rbx), %r15
leal 0x1(%r15), %r12d
testq %r15, %r15
jle 0x2c1cf
movslq 0x118(%rbx), %rax
cmpq %rax, %r15
jg 0x2c389
movq 0x120(%rbx), %rax
movq -0x8(%rax,%r15,8), %rdi
movq %r14, %rsi
callq 0x2c878
decl %r12d
decq %r15
testl %eax, %eax
jne 0x2c140
cmpl %r12d, 0x118(%rbx)
jl 0x2c389
movq 0x120(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x7900
movslq 0x118(%rbx), %rdx
cmpl %r12d, %edx
jl 0x2c3a8
movq 0x120(%rbx), %rax
movl %r15d, %ecx
leaq (%rax,%rcx,8), %rdi
leaq (%rax,%rcx,8), %rsi
addq $0x8, %rsi
notq %rcx
addq %rcx, %rdx
shlq $0x3, %rdx
callq 0x7130
decl 0x118(%rbx)
movq %r14, %rdi
callq 0x7030
movq %rax, %r15
movl 0x118(%rbx), %r13d
movl 0x11c(%rbx), %eax
cmpl %eax, %r13d
jne 0x2c254
incl %r13d
testl %eax, %eax
je 0x2c200
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
jmp 0x2c205
movl $0x8, %ecx
cmpl %r13d, %ecx
cmovgl %ecx, %r13d
cmpl %r13d, %eax
jge 0x2c254
movslq %r13d, %rdi
shlq $0x3, %rdi
callq 0x85d9
movq %rax, %r12
movq 0x120(%rbx), %rsi
movslq 0x118(%rbx), %rdx
shlq $0x3, %rdx
movq %rax, %rdi
callq 0x7080
movq 0x120(%rbx), %rdi
callq 0x9065
movq %r12, 0x120(%rbx)
movl %r13d, 0x11c(%rbx)
movq 0x120(%rbx), %rax
movslq 0x118(%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x118(%rbx)
movq %r15, (%rax,%rcx,8)
leaq 0x15fb7(%rip), %rsi     # 0x4222d
movq %r14, %rdi
callq 0x2c878
testl %eax, %eax
je 0x2c2ce
leaq 0x15f97(%rip), %rsi     # 0x42220
movq %r14, %rdi
callq 0x2c878
testl %eax, %eax
je 0x2c2e4
leaq 0x15f89(%rip), %rsi     # 0x42225
movq %r14, %rdi
callq 0x2c878
testl %eax, %eax
je 0x2c331
leaq 0x16209(%rip), %rsi     # 0x424bc
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2bfa2
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2bf06
leaq 0x161b9(%rip), %rsi     # 0x424a4
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2bfa2
cmpl $0x0, 0x130(%rbx)
jle 0x2c37a
leaq 0x161a9(%rip), %r14     # 0x424ae
xorl %r15d, %r15d
movq 0x138(%rbx), %rax
movq (%rax,%r15,8), %rdx
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x2bfa2
incq %r15
movslq 0x130(%rbx), %rax
cmpq %rax, %r15
jl 0x2c308
jmp 0x2c37a
movl 0x118(%rbx), %ecx
leal -0xa(%rcx), %edx
xorl %eax, %eax
cmpl $0xa, %ecx
cmovgel %edx, %eax
cmpl %ecx, %eax
jge 0x2c37a
movslq %eax, %r14
leaq 0x16163(%rip), %r15     # 0x424b3
movq 0x120(%rbx), %rax
movq (%rax,%r14,8), %rcx
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
xorl %eax, %eax
callq 0x2bfa2
incq %r14
movslq 0x118(%rbx), %rax
cmpq %rax, %r14
jl 0x2c350
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x12a20(%rip), %rdi     # 0x3edb0
leaq 0x126fc(%rip), %rsi     # 0x3ea93
leaq 0x15e9e(%rip), %rcx     # 0x4223c
movl $0x31c, %edx            # imm = 0x31C
callq 0x7140
leaq 0x1307a(%rip), %rdi     # 0x3f429
leaq 0x126dd(%rip), %rsi     # 0x3ea93
leaq 0x16116(%rip), %rcx     # 0x424d3
movl $0x33a, %edx            # imm = 0x33A
callq 0x7140
nop