// File: Ciaxur[P]yagb-emu/include/imgui/imgui_demo.cpp
// Function: ShowExampleMenuFile()
static void ShowExampleMenuFile()
{
    ImGui::MenuItem("(demo menu)", NULL, false, false);
    if (ImGui::MenuItem("New")) {}
    if (ImGui::MenuItem("Open", "Ctrl+O")) {}
    if (ImGui::BeginMenu("Open Recent"))
    {
        ImGui::MenuItem("fish_hat.c");
        ImGui::MenuItem("fish_hat.inl");
        ImGui::MenuItem("fish_hat.h");
        if (ImGui::BeginMenu("More.."))
        {
            ImGui::MenuItem("Hello");
            ImGui::MenuItem("Sailor");
            if (ImGui::BeginMenu("Recurse.."))
            {
                ShowExampleMenuFile();
                ImGui::EndMenu();
            }
            ImGui::EndMenu();
        }
        ImGui::EndMenu();
    }
    if (ImGui::MenuItem("Save", "Ctrl+S")) {}
    if (ImGui::MenuItem("Save As..")) {}

    ImGui::Separator();
    if (ImGui::BeginMenu("Options"))
    {
        static bool enabled = true;
        ImGui::MenuItem("Enabled", "", &enabled);
        ImGui::BeginChild("child", ImVec2(0, 60), true);
        for (int i = 0; i < 10; i++)
            ImGui::Text("Scrolling Text %d", i);
        ImGui::EndChild();
        static float f = 0.5f;
        static int n = 0;
        ImGui::SliderFloat("Value", &f, 0.0f, 1.0f);
        ImGui::InputFloat("Input", &f, 0.1f);
        ImGui::Combo("Combo", &n, "Yes\0No\0Maybe\0\0");
        ImGui::EndMenu();
    }

    if (ImGui::BeginMenu("Colors"))
    {
        float sz = ImGui::GetTextLineHeight();
        for (int i = 0; i < ImGuiCol_COUNT; i++)
        {
            const char* name = ImGui::GetStyleColorName((ImGuiCol)i);
            ImVec2 p = ImGui::GetCursorScreenPos();
            ImGui::GetWindowDrawList()->AddRectFilled(p, ImVec2(p.x + sz, p.y + sz), ImGui::GetColorU32((ImGuiCol)i));
            ImGui::Dummy(ImVec2(sz, sz));
            ImGui::SameLine();
            ImGui::MenuItem(name);
        }
        ImGui::EndMenu();
    }

    // Here we demonstrate appending again to the "Options" menu (which we already created above)
    // Of course in this demo it is a little bit silly that this function calls BeginMenu("Options") twice.
    // In a real code-base using it would make senses to use this feature from very different code locations.
    if (ImGui::BeginMenu("Options")) // <-- Append!
    {
        static bool b = true;
        ImGui::Checkbox("SomeOption", &b);
        ImGui::EndMenu();
    }

    if (ImGui::BeginMenu("Disabled", false)) // Disabled
    {
        IM_ASSERT(0);
    }
    if (ImGui::MenuItem("Checked", NULL, true)) {}
    if (ImGui::MenuItem("Quit", "Alt+F4")) {}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
leaq 0x8c9ee(%rip), %rdi     # 0x18287d
xorl %eax, %eax
movl %eax, %esi
xorl %ecx, %ecx
movl %ecx, %edx
callq 0x155360
leaq 0x8c9e6(%rip), %rdi     # 0x182889
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x155360
testb $0x1, %al
jne 0xf5eb9
jmp 0xf5ebb
jmp 0xf5ebb
leaq 0x8c9cb(%rip), %rdi     # 0x18288d
leaq 0x8c9c9(%rip), %rsi     # 0x182892
xorl %edx, %edx
movl $0x1, %ecx
callq 0x155360
testb $0x1, %al
jne 0xf5edb
jmp 0xf5edd
jmp 0xf5edd
leaq 0x8c9b5(%rip), %rdi     # 0x182899
movl $0x1, %esi
callq 0x154790
testb $0x1, %al
jne 0xf5ef7
jmp 0xf5fac
leaq 0x8c9a7(%rip), %rdi     # 0x1828a5
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x155360
leaq 0x8c99b(%rip), %rdi     # 0x1828b0
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x155360
leaq 0x8c991(%rip), %rdi     # 0x1828bd
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x155360
leaq 0x8c985(%rip), %rdi     # 0x1828c8
movl $0x1, %esi
callq 0x154790
testb $0x1, %al
jne 0xf5f53
jmp 0xf5fa7
leaq 0x88056(%rip), %rdi     # 0x17dfb0
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x155360
leaq 0x8578f(%rip), %rdi     # 0x17b700
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x155360
leaq 0x8c947(%rip), %rdi     # 0x1828cf
movl $0x1, %esi
callq 0x154790
testb $0x1, %al
jne 0xf5f98
jmp 0xf5fa2
callq 0xf5e80
callq 0x1552c0
callq 0x1552c0
callq 0x1552c0
leaq 0x842cf(%rip), %rdi     # 0x17a282
leaq 0x8c91f(%rip), %rsi     # 0x1828d9
xorl %edx, %edx
movl $0x1, %ecx
callq 0x155360
testb $0x1, %al
jne 0xf5fcc
jmp 0xf5fce
jmp 0xf5fce
leaq 0x8c90b(%rip), %rdi     # 0x1828e0
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x155360
testb $0x1, %al
jne 0xf5feb
jmp 0xf5fed
jmp 0xf5fed
callq 0x13dec0
leaq 0x7c481(%rip), %rdi     # 0x17247a
movl $0x1, %esi
callq 0x154790
testb $0x1, %al
jne 0xf600c
jmp 0xf60f6
leaq 0x8b9e6(%rip), %rdi     # 0x1819f9
leaq 0x7beef(%rip), %rsi     # 0x171f09
leaq 0x11cc0f(%rip), %rdx    # 0x212c30
movl $0x1, %ecx
callq 0x155770
leaq -0x8(%rbp), %rdi
xorps %xmm0, %xmm0
movss 0x7c76a(%rip), %xmm1    # 0x1727a4
callq 0xbf4c0
leaq 0x87673(%rip), %rdi     # 0x17d6b9
leaq -0x8(%rbp), %rsi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0xd5cc0
movl $0x0, -0xc(%rbp)
cmpl $0xa, -0xc(%rbp)
jge 0xf607f
movl -0xc(%rbp), %esi
leaq 0x8c87d(%rip), %rdi     # 0x1828ea
movb $0x0, %al
callq 0x139160
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xf605d
callq 0xd5d90
leaq 0x88d18(%rip), %rdi     # 0x17eda3
leaq 0x11cba2(%rip), %rsi    # 0x212c34
xorps %xmm0, %xmm0
movss 0x7ab9f(%rip), %xmm1    # 0x170c3c
leaq 0x99c0a(%rip), %rdx     # 0x18fcae
xorl %ecx, %ecx
callq 0x144910
leaq 0x8593b(%rip), %rdi     # 0x17b9ed
leaq 0x11cb7b(%rip), %rsi    # 0x212c34
movss 0x7c6bb(%rip), %xmm0    # 0x17277c
xorps %xmm1, %xmm1
leaq 0x99be3(%rip), %rdx     # 0x18fcae
xorl %ecx, %ecx
callq 0x149f10
leaq 0x87386(%rip), %rdi     # 0x17d45f
leaq 0x11df8c(%rip), %rsi    # 0x21406c
leaq 0x82708(%rip), %rdx     # 0x1787ef
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
callq 0x13fb50
callq 0x1552c0
leaq 0x840e8(%rip), %rdi     # 0x17a1e5
movl $0x1, %esi
callq 0x154790
testb $0x1, %al
jne 0xf6110
jmp 0xf61e6
callq 0xdd000
movss %xmm0, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x35, -0x14(%rbp)
jge 0xf61e1
movl -0x14(%rbp), %edi
callq 0xc7cf0
movq %rax, -0x20(%rbp)
callq 0xdc6c0
movlpd %xmm0, -0x28(%rbp)
callq 0xdae40
movq %rax, -0x40(%rbp)
movss -0x28(%rbp), %xmm0
addss -0x10(%rbp), %xmm0
movss -0x24(%rbp), %xmm1
addss -0x10(%rbp), %xmm1
leaq -0x30(%rbp), %rdi
callq 0xbf4c0
movl -0x14(%rbp), %edi
movss 0x7aaca(%rip), %xmm0    # 0x170c3c
callq 0xc76e0
movq -0x40(%rbp), %rdi
movl %eax, %ecx
leaq -0x28(%rbp), %rsi
leaq -0x30(%rbp), %rdx
xorps %xmm0, %xmm0
movl $0xf, %r8d
callq 0x113090
movss -0x10(%rbp), %xmm0
movss -0x10(%rbp), %xmm1
leaq -0x38(%rbp), %rdi
callq 0xbf4c0
leaq -0x38(%rbp), %rdi
callq 0x13d8d0
xorps %xmm0, %xmm0
movss 0x7bdc6(%rip), %xmm1    # 0x171f80
callq 0xdc1c0
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x155360
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0xf6121
callq 0x1552c0
leaq 0x7c28d(%rip), %rdi     # 0x17247a
movl $0x1, %esi
callq 0x154790
testb $0x1, %al
jne 0xf61fd
jmp 0xf6215
leaq 0x8c6f8(%rip), %rdi     # 0x1828fc
leaq 0x11ca2d(%rip), %rsi    # 0x212c38
callq 0x13c7c0
callq 0x1552c0
leaq 0x7d1dd(%rip), %rdi     # 0x1733f9
xorl %esi, %esi
callq 0x154790
testb $0x1, %al
jne 0xf6229
jmp 0xf6248
leaq 0x7eeda(%rip), %rdi     # 0x17510a
leaq 0x829c5(%rip), %rsi     # 0x178bfc
movl $0x17ed, %edx           # imm = 0x17ED
leaq 0x8c6c4(%rip), %rcx     # 0x182907
callq 0xd180
leaq 0x8c6d3(%rip), %rdi     # 0x182922
xorl %eax, %eax
movl %eax, %esi
movl $0x1, %ecx
movl %ecx, %edx
callq 0x155360
testb $0x1, %al
jne 0xf6265
jmp 0xf6267
jmp 0xf6267
leaq 0x8c6bc(%rip), %rdi     # 0x18292a
leaq 0x8c6ba(%rip), %rsi     # 0x18292f
xorl %edx, %edx
movl $0x1, %ecx
callq 0x155360
testb $0x1, %al
jne 0xf6287
jmp 0xf6289
jmp 0xf6289
addq $0x40, %rsp
popq %rbp
retq
nop