// File: Ciaxur[P]yagb-emu/include/imgui/imgui_demo.cpp
// Function: ShowExampleAppLog(bool*)
static void ShowExampleAppLog(bool* p_open)
{
    static ExampleAppLog log;

    // For the demo: add a debug button _BEFORE_ the normal log window contents
    // We take advantage of a rarely used feature: multiple calls to Begin()/End() are appending to the _same_ window.
    // Most of the contents of the window will be added by the log.Draw() call.
    ImGui::SetNextWindowSize(ImVec2(500, 400), ImGuiCond_FirstUseEver);
    ImGui::Begin("Example: Log", p_open);
    if (ImGui::SmallButton("[Debug] Add 5 entries"))
    {
        static int counter = 0;
        const char* categories[3] = { "info", "warn", "error" };
        const char* words[] = { "Bumfuzzled", "Cattywampus", "Snickersnee", "Abibliophobia", "Absquatulate", "Nincompoop", "Pauciloquent" };
        for (int n = 0; n < 5; n++)
        {
            const char* category = categories[counter % IM_ARRAYSIZE(categories)];
            const char* word = words[counter % IM_ARRAYSIZE(words)];
            log.AddLog("[%05d] [%s] Hello, current time is %.1f, here's a word: '%s'\n",
                ImGui::GetFrameCount(), category, ImGui::GetTime(), word);
            counter++;
        }
    }
    ImGui::End();

    // Actually call in the regular Log helper (which will Begin() into the same window as we just did)
    log.Draw("Example: Log", p_open);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
cmpb $0x0, 0x1230fa(%rip)    # 0x214410
jne 0xf135d
leaq 0x1230f1(%rip), %rdi    # 0x214410
callq 0xd380
cmpl $0x0, %eax
je 0xf135d
leaq 0x122fa0(%rip), %rdi    # 0x2142d0
callq 0x10aee0
jmp 0xf1337
leaq 0x19c62(%rip), %rdi     # 0x10afa0
leaq 0x122f8b(%rip), %rsi    # 0x2142d0
leaq 0x11d26c(%rip), %rdx    # 0x20e5b8
callq 0xd820
leaq 0x1230b8(%rip), %rdi    # 0x214410
callq 0xd580
leaq -0x1c(%rbp), %rdi
movss 0x87207(%rip), %xmm0    # 0x178570
movss 0x80c0b(%rip), %xmm1    # 0x171f7c
callq 0xbf4c0
leaq -0x1c(%rbp), %rdi
movl $0x4, %esi
callq 0xd00c0
movq -0x8(%rbp), %rsi
leaq 0x918da(%rip), %rdi     # 0x182c69
xorl %edx, %edx
callq 0xd0170
leaq 0x918d9(%rip), %rdi     # 0x182c76
callq 0x13a960
testb $0x1, %al
jne 0xf13ab
jmp 0xf14b8
movq 0x11c6ae(%rip), %rax    # 0x20da60
movq %rax, -0x40(%rbp)
movq 0x11c6ab(%rip), %rax    # 0x20da68
movq %rax, -0x38(%rbp)
movq 0x11c6a8(%rip), %rax    # 0x20da70
movq %rax, -0x30(%rbp)
leaq -0x80(%rbp), %rdi
leaq 0x11c6a9(%rip), %rsi    # 0x20da80
movl $0x38, %edx
callq 0xd0a0
movl $0x0, -0x84(%rbp)
cmpl $0x5, -0x84(%rbp)
jge 0xf14b6
movl 0x12301a(%rip), %eax    # 0x214418
movl $0x3, %ecx
cltd
idivl %ecx
movslq %edx, %rax
movq -0x40(%rbp,%rax,8), %rax
movq %rax, -0x90(%rbp)
movl 0x122ffd(%rip), %eax    # 0x214418
movl $0x7, %ecx
cltd
idivl %ecx
movslq %edx, %rax
movq -0x80(%rbp,%rax,8), %rax
movq %rax, -0x98(%rbp)
callq 0xcb260
movl %eax, -0xa4(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0xa0(%rbp)
callq 0xcb240
movl -0xa4(%rbp), %edx
movq -0xa0(%rbp), %rcx
movq -0x98(%rbp), %r8
leaq 0x122e65(%rip), %rdi    # 0x2142d0
leaq 0x91880(%rip), %rsi     # 0x182cf2
movb $0x1, %al
callq 0x10afe0
movl 0x122f99(%rip), %eax    # 0x214418
addl $0x1, %eax
movl %eax, 0x122f90(%rip)    # 0x214418
movl -0x84(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x84(%rbp)
jmp 0xf13eb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
leaq 0x122f61(%rip), %rdi    # 0x214410
callq 0xd460
jmp 0xf14dd
jmp 0xf14b8
callq 0xd3b60
movq -0x8(%rbp), %rdx
leaq 0x122e08(%rip), %rdi    # 0x2142d0
leaq 0x9179a(%rip), %rsi     # 0x182c69
callq 0x10b100
addq $0xb0, %rsp
popq %rbp
retq
movq -0x10(%rbp), %rdi
callq 0xd620
nopw %cs:(%rax,%rax)