// File: /workspace/github_cpp_makefile_star2_O2/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 %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x146c9(%rip), %rsi     # 0x3b60b
movq %r15, %rdx
xorl %eax, %eax
callq 0x26e48
orl $-0x1, 0x128(%rbx)
leaq 0x118(%rbx), %r14
movl 0x118(%rbx), %r12d
testl %r12d, %r12d
jle 0x26fac
decl %r12d
movq %r14, %rdi
movl %r12d, %esi
callq 0x26d98
movq (%rax), %rdi
movq %r15, %rsi
callq 0x2753c
testl %eax, %eax
jne 0x26f61
movq %r14, %rdi
movl %r12d, %esi
callq 0x26d98
movq (%rax), %rdi
callq 0x78d0
movl %r12d, %esi
shlq $0x3, %rsi
addq 0x120(%rbx), %rsi
movq %r14, %rdi
callq 0x27592
movq %r15, %rdi
callq 0x7030
leaq -0x28(%rbp), %rsi
movq %rax, (%rsi)
movq %r14, %rdi
callq 0x270b4
leaq 0x143d3(%rip), %rsi     # 0x3b39d
movq %r15, %rdi
callq 0x2753c
testl %eax, %eax
je 0x27012
leaq 0x143b3(%rip), %rsi     # 0x3b390
movq %r15, %rdi
callq 0x2753c
testl %eax, %eax
je 0x27027
leaq 0x143a5(%rip), %rsi     # 0x3b395
movq %r15, %rdi
callq 0x2753c
testl %eax, %eax
je 0x2706e
leaq 0x14626(%rip), %rsi     # 0x3b629
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x26e48
jmp 0x2701a
movq %rbx, %rdi
callq 0x26cc0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x145e3(%rip), %rsi     # 0x3b611
movq %rbx, %rdi
xorl %eax, %eax
callq 0x26e48
leaq 0x130(%rbx), %r14
leaq 0x145d5(%rip), %r15     # 0x3b61b
xorl %r12d, %r12d
cmpl (%r14), %r12d
jge 0x2701a
movq %r14, %rdi
movl %r12d, %esi
callq 0x27508
movq (%rax), %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x26e48
incl %r12d
jmp 0x27049
movl (%r14), %eax
leal -0xa(%rax), %r15d
xorl %ecx, %ecx
cmpl $0xa, %eax
cmovll %ecx, %r15d
leaq 0x1459b(%rip), %r12     # 0x3b620
cmpl %eax, %r15d
jge 0x2701a
movq %r14, %rdi
movl %r15d, %esi
callq 0x26d98
movq (%rax), %rcx
movq %rbx, %rdi
movq %r12, %rsi
movl %r15d, %edx
xorl %eax, %eax
callq 0x26e48
incl %r15d
movl 0x118(%rbx), %eax
jmp 0x27085
nop