// File: /workspace/github_cpp_makefile_star2_O3/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 0x1671e(%rip), %rsi     # 0x4241b
movq %r14, %rdx
xorl %eax, %eax
callq 0x2bb82
movl $0xffffffff, 0x128(%rbx) # imm = 0xFFFFFFFF
movl 0x118(%rbx), %r15d
movl 0x118(%rbx), %r13d
testl %r15d, %r15d
jle 0x2bdb2
cmpl %r15d, %r13d
jl 0x2bf6b
movq 0x120(%rbx), %rax
movq -0x8(%rax,%r15,8), %rdi
movq %r14, %rsi
callq 0x2c432
decq %r15
testl %eax, %eax
jne 0x2bd18
leal 0x1(%r15), %r12d
cmpl %r12d, 0x118(%rbx)
jl 0x2bf6b
movq 0x120(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x78e0
movl 0x118(%rbx), %edx
cmpl %r12d, %edx
jl 0x2bf8a
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
movl 0x118(%rbx), %r13d
decl %r13d
movl %r13d, 0x118(%rbx)
movq %r14, %rdi
callq 0x7030
movq %rax, %r15
cmpl 0x11c(%rbx), %r13d
jne 0x2bddf
leal 0x1(%r13), %eax
testl %r13d, %r13d
je 0x2bde8
movl %r13d, %ecx
shrl $0x1f, %ecx
addl %r13d, %ecx
sarl %ecx
addl %r13d, %ecx
jmp 0x2bded
movq 0x120(%rbx), %r12
jmp 0x2be40
movl $0x8, %ecx
cmpl %eax, %ecx
cmovgl %ecx, %eax
movslq %eax, %r13
leaq (,%r13,8), %rdi
callq 0x8589
movq %rax, %r12
movq 0x120(%rbx), %rsi
movslq 0x118(%rbx), %rdx
shlq $0x3, %rdx
movq %rax, %rdi
callq 0x7080
movq 0x120(%rbx), %rdi
callq 0x9019
movq %r12, 0x120(%rbx)
movl %r13d, 0x11c(%rbx)
movl 0x118(%rbx), %r13d
leal 0x1(%r13), %eax
movl %eax, 0x118(%rbx)
movslq %r13d, %rax
movq %r15, (%r12,%rax,8)
leaq 0x16355(%rip), %rsi     # 0x421ad
movq %r14, %rdi
callq 0x2c432
testl %eax, %eax
je 0x2beb0
leaq 0x16335(%rip), %rsi     # 0x421a0
movq %r14, %rdi
callq 0x2c432
testl %eax, %eax
je 0x2bec6
leaq 0x16327(%rip), %rsi     # 0x421a5
movq %r14, %rdi
callq 0x2c432
testl %eax, %eax
je 0x2bf13
leaq 0x165a4(%rip), %rsi     # 0x42439
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 0x2bb82
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2bae6
leaq 0x16554(%rip), %rsi     # 0x42421
movq %rbx, %rdi
xorl %eax, %eax
callq 0x2bb82
cmpl $0x0, 0x130(%rbx)
jle 0x2bf5c
leaq 0x16544(%rip), %r14     # 0x4242b
xorl %r15d, %r15d
movq 0x138(%rbx), %rax
movq (%rax,%r15,8), %rdx
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x2bb82
incq %r15
movslq 0x130(%rbx), %rax
cmpq %rax, %r15
jl 0x2beea
jmp 0x2bf5c
movl 0x118(%rbx), %ecx
leal -0xa(%rcx), %edx
xorl %eax, %eax
cmpl $0xa, %ecx
cmovgel %edx, %eax
cmpl %ecx, %eax
jge 0x2bf5c
movslq %eax, %r14
leaq 0x164fe(%rip), %r15     # 0x42430
movq 0x120(%rbx), %rax
movq (%rax,%r14,8), %rcx
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
xorl %eax, %eax
callq 0x2bb82
incq %r14
movslq 0x118(%rbx), %rax
cmpq %rax, %r14
jl 0x2bf32
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x12e6e(%rip), %rdi     # 0x3ede0
leaq 0x12b4a(%rip), %rsi     # 0x3eac3
leaq 0x1623c(%rip), %rcx     # 0x421bc
movl $0x31c, %edx            # imm = 0x31C
callq 0x7140
leaq 0x164bf(%rip), %rdi     # 0x42450
leaq 0x12b2b(%rip), %rsi     # 0x3eac3
leaq 0x164cd(%rip), %rcx     # 0x4246c
movl $0x33a, %edx            # imm = 0x33A
callq 0x7140
nop