// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/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)
        {
            int first = History.Size - 10;
            for (int i = first > 0 ? first : 0; i < History.Size; i++)
                AddLog("%3d: %s\n", i, History[i]);
        }
        else
        {
            AddLog("Unknown command: '%s'\n", command_line);
        }

        // On command input, we scroll to bottom even if AutoScroll==false
        ScrollToBottom = true;
    }

// 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 0x52fe4(%rip), %rsi     # 0xc75bf
movq %r14, %rdx
xorl %eax, %eax
callq 0x743c6
movl $0xffffffff, 0x130(%rbx) # imm = 0xFFFFFFFF
movl 0x120(%rbx), %r12d
movq %r12, %r15
incq %r15
testl %r12d, %r12d
jle 0x7467f
cmpl %r12d, 0x120(%rbx)
jl 0x7482c
movq 0x128(%rbx), %rax
movq -0x10(%rax,%r15,8), %rdi
movq %r14, %rsi
callq 0x74d08
decq %r15
decl %r12d
testl %eax, %eax
jne 0x745fc
cmpl %r15d, 0x120(%rbx)
jl 0x7482c
movq 0x128(%rbx), %rax
movq -0x8(%rax,%r15,8), %rdi
callq 0xc170
movslq 0x120(%rbx), %rdx
cmpl %r15d, %edx
jl 0x7484b
movq 0x128(%rbx), %rax
leaq (%rax,%r15,8), %rsi
leaq (%rax,%r15,8), %rdi
addq $-0x8, %rdi
subq %r15, %rdx
shlq $0x3, %rdx
callq 0xc130
decl 0x120(%rbx)
movq %r14, %rdi
callq 0x7454c
movq %rax, %r15
movl 0x120(%rbx), %r13d
movl 0x124(%rbx), %eax
cmpl %eax, %r13d
jne 0x74709
incl %r13d
testl %eax, %eax
je 0x746b0
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
jmp 0x746b5
movl $0x8, %ecx
cmpl %r13d, %ecx
cmovgl %ecx, %r13d
cmpl %r13d, %eax
jge 0x74709
movslq %r13d, %rdi
shlq $0x3, %rdi
callq 0x424fb
movq %rax, %r12
movq 0x128(%rbx), %rsi
testq %rsi, %rsi
je 0x746fb
movslq 0x120(%rbx), %rdx
shlq $0x3, %rdx
movq %r12, %rdi
callq 0xc080
movq 0x128(%rbx), %rdi
callq 0x425d4
movq %r12, 0x128(%rbx)
movl %r13d, 0x124(%rbx)
movq 0x128(%rbx), %rax
movslq 0x120(%rbx), %rcx
movq %r15, (%rax,%rcx,8)
incl 0x120(%rbx)
leaq 0x52bea(%rip), %rsi     # 0xc7312
movq %r14, %rdi
callq 0x74d08
testl %eax, %eax
je 0x74773
leaq 0x52bca(%rip), %rsi     # 0xc7305
movq %r14, %rdi
callq 0x74d08
testl %eax, %eax
je 0x74780
leaq 0x52bbc(%rip), %rsi     # 0xc730a
movq %r14, %rdi
callq 0x74d08
testl %eax, %eax
je 0x747cd
leaq 0x52e7c(%rip), %rsi     # 0xc75dd
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x743c6
jmp 0x74816
movq %rbx, %rdi
callq 0x7436a
jmp 0x74816
leaq 0x52e3e(%rip), %rsi     # 0xc75c5
movq %rbx, %rdi
xorl %eax, %eax
callq 0x743c6
cmpl $0x0, 0x110(%rbx)
jle 0x74816
leaq 0x52e2e(%rip), %r14     # 0xc75cf
xorl %r15d, %r15d
movq 0x118(%rbx), %rax
movq (%rax,%r15,8), %rdx
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x743c6
incq %r15
movslq 0x110(%rbx), %rax
cmpq %rax, %r15
jl 0x747a4
jmp 0x74816
movl 0x120(%rbx), %ecx
cmpl $0xb, %ecx
movl $0xa, %eax
cmovgel %ecx, %eax
addl $-0xa, %eax
cmpl %ecx, %eax
jge 0x74816
movl %eax, %r14d
leaq 0x52de5(%rip), %r15     # 0xc75d4
movq 0x128(%rbx), %rax
movq (%rax,%r14,8), %rcx
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
xorl %eax, %eax
callq 0x743c6
incq %r14
cmpl %r14d, 0x120(%rbx)
jg 0x747ef
movb $0x1, 0x251(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x46e45(%rip), %rdi     # 0xbb678
leaq 0x46e51(%rip), %rsi     # 0xbb68b
leaq 0x52af7(%rip), %rcx     # 0xc7338
movl $0x65c, %edx            # imm = 0x65C
callq 0xc140
leaq 0x4dd0e(%rip), %rdi     # 0xc2560
leaq 0x46e32(%rip), %rsi     # 0xbb68b
leaq 0x52d94(%rip), %rcx     # 0xc75f4
movl $0x674, %edx            # imm = 0x674
callq 0xc140