LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::InputScalarN(char const*, int, void*, int, void const*, void const*, char const*, int)
bool ImGui::InputScalarN(const char* label, ImGuiDataType data_type, void* p_data, int components, const void* p_step, const void* p_step_fast, const char* format, ImGuiInputTextFlags flags)
{
    ImGuiWindow* window = GetCurrentWindow();
    if (window->SkipItems)
        return false;

    ImGuiContext& g = *GImGui;
    bool value_changed = false;
    BeginGroup();
    PushID(label);
    PushMultiItemsWidths(components, CalcItemWidth());
    size_t type_size = GDataTypeInfo[data_type].Size;
    for (int i = 0; i < components; i++)
    {
        PushID(i);
        if (i > 0)
            SameLine(0, g.Style.ItemInnerSpacing.x);
        value_changed |= InputScalar("", data_type, p_data, p_step, p_step_fast, format, flags);
        PopID();
        PopItemWidth();
        p_data = (void*)((char*)p_data + type_size);
    }
    PopID();

    const char* label_end = FindRenderedTextEnd(label);
    if (label != label_end)
    {
        SameLine(0.0f, g.Style.ItemInnerSpacing.x);
        TextEx(label, label_end);
    }

    EndGroup();
    return value_changed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, -0x50(%rbp)
movq %r8, -0x48(%rbp)
leaq 0x6004e(%rip), %rax     # 0xe3ce0
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq 0x1ae0(%rax), %rax
movb $0x1, 0x90(%rax)
xorl %r15d, %r15d
cmpb $0x0, 0x93(%rax)
movl $0x0, %r14d
jne 0x83dab
movq %rdx, %r13
movq %rdi, %rbx
movl %esi, %r14d
movl %ecx, -0x2c(%rbp)
callq 0x43ff2
movq %rbx, -0x40(%rbp)
movq %rbx, %rdi
callq 0x42ea4
callq 0x43d17
movl -0x2c(%rbp), %edi
callq 0x43bdb
movl %r14d, -0x30(%rbp)
movslq %r14d, %rax
shlq $0x5, %rax
leaq 0x5ad37(%rip), %rcx     # 0xdea30
movq (%rax,%rcx), %rbx
movl -0x2c(%rbp), %r12d
testl %r12d, %r12d
cmovlel %r15d, %r12d
xorl %r14d, %r14d
cmpl %r15d, %r12d
je 0x83d6a
movl %r15d, %edi
callq 0x42f5a
testl %r15d, %r15d
je 0x83d31
movq -0x38(%rbp), %rax
movss 0x15b0(%rax), %xmm1
xorps %xmm0, %xmm0
callq 0x437ec
movl 0x18(%rbp), %eax
movl %eax, (%rsp)
leaq 0x181e3(%rip), %rdi     # 0x9bf21
movl -0x30(%rbp), %esi
movq %r13, %rdx
movq -0x48(%rbp), %rcx
movq -0x50(%rbp), %r8
movq 0x10(%rbp), %r9
callq 0x8393b
orb %al, %r14b
callq 0x42fea
callq 0x43cbe
addq %rbx, %r13
incl %r15d
jmp 0x83d0b
callq 0x42fea
movq -0x40(%rbp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x36123
cmpq %r15, %rax
je 0x83da6
movq %rax, %rbx
movq -0x38(%rbp), %rax
movss 0x15b0(%rax), %xmm1
xorps %xmm0, %xmm0
callq 0x437ec
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x7911c
callq 0x4352b
andb $0x1, %r14b
movl %r14d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGuiInputTextCallbackData::DeleteChars(int, int)
void ImGuiInputTextCallbackData::DeleteChars(int pos, int bytes_count)
{
    IM_ASSERT(pos + bytes_count <= BufTextLen);
    char* dst = Buf + pos;
    const char* src = Buf + pos + bytes_count;
    while (char c = *src++)
        *dst++ = c;
    *dst = '\0';

    if (CursorPos >= pos + bytes_count)
        CursorPos -= bytes_count;
    else if (CursorPos >= pos)
        CursorPos = pos;
    SelectionStart = SelectionEnd = CursorPos;
    BufDirty = true;
    BufTextLen -= bytes_count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leal (%rdx,%rsi), %eax
cmpl 0x20(%rdi), %eax
jg 0x84beb
movslq %esi, %rcx
addq 0x18(%rdi), %rcx
movslq %edx, %r8
movb (%rcx,%r8), %r9b
testb %r9b, %r9b
je 0x84bc3
movb %r9b, (%rcx)
incq %rcx
jmp 0x84bb2
movb $0x0, (%rcx)
movl 0x2c(%rdi), %ecx
cmpl %eax, %ecx
jge 0x84bd3
cmpl %esi, %ecx
jge 0x84bd7
jmp 0x84bdc
subl %edx, %ecx
movl %ecx, %esi
movl %esi, 0x2c(%rdi)
movl %esi, %ecx
movl %ecx, 0x34(%rdi)
movl %ecx, 0x30(%rdi)
movb $0x1, 0x28(%rdi)
subl %edx, 0x20(%rdi)
popq %rbp
retq
leaq 0x346f7(%rip), %rdi     # 0xb92e9
leaq 0x3378f(%rip), %rsi     # 0xb8388
leaq 0x34709(%rip), %rcx     # 0xb9309
movl $0xe56, %edx            # imm = 0xE56
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: RenderArrowsForVerticalBar(ImDrawList*, ImVec2, ImVec2, float, float)
static void RenderArrowsForVerticalBar(ImDrawList* draw_list, ImVec2 pos, ImVec2 half_sz, float bar_w, float alpha)
{
    ImU32 alpha8 = IM_F32_TO_INT8_SAT(alpha);
    ImGui::RenderArrowPointingAt(draw_list, ImVec2(pos.x + half_sz.x + 1,         pos.y), ImVec2(half_sz.x + 2, half_sz.y + 1), ImGuiDir_Right, IM_COL32(0,0,0,alpha8));
    ImGui::RenderArrowPointingAt(draw_list, ImVec2(pos.x + half_sz.x,             pos.y), half_sz,                              ImGuiDir_Right, IM_COL32(255,255,255,alpha8));
    ImGui::RenderArrowPointingAt(draw_list, ImVec2(pos.x + bar_w - half_sz.x - 1, pos.y), ImVec2(half_sz.x + 2, half_sz.y + 1), ImGuiDir_Left,  IM_COL32(0,0,0,alpha8));
    ImGui::RenderArrowPointingAt(draw_list, ImVec2(pos.x + bar_w - half_sz.x,     pos.y), half_sz,                              ImGuiDir_Left,  IM_COL32(255,255,255,alpha8));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movaps %xmm2, -0x50(%rbp)
movaps %xmm1, -0x40(%rbp)
movaps %xmm0, %xmm2
movq %rdi, %rbx
movss 0x13c2e(%rip), %xmm0    # 0x9bff8
movaps %xmm2, %xmm5
movaps %xmm2, %xmm6
movaps %xmm2, -0x30(%rbp)
addps %xmm1, %xmm5
movaps %xmm5, -0x70(%rbp)
addss %xmm0, %xmm5
movaps %xmm1, %xmm2
shufps $0x55, %xmm1, %xmm2     # xmm2 = xmm2[1,1],xmm1[1,1]
addss %xmm0, %xmm2
minss %xmm3, %xmm0
xorps %xmm4, %xmm4
cmpltss %xmm4, %xmm3
andnps %xmm0, %xmm3
mulss 0x14473(%rip), %xmm3    # 0x9c874
addss 0x13c0f(%rip), %xmm3    # 0x9c018
cvttss2si %xmm3, %r14d
movss 0x1447e(%rip), %xmm0    # 0x9c894
addss %xmm1, %xmm0
unpcklps %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
movaps %xmm0, %xmm1
movaps %xmm0, -0x60(%rbp)
shll $0x18, %r14d
movaps %xmm6, %xmm0
movss %xmm5, %xmm0            # xmm0 = xmm5[0],xmm0[1,2,3]
pushq $0x1
popq %r12
movl %r12d, %esi
movl %r14d, %edx
callq 0x6bded
movaps -0x30(%rbp), %xmm0
movaps -0x70(%rbp), %xmm1
shufps $0x1, %xmm1, %xmm0      # xmm0 = xmm0[1,0],xmm1[0,0]
shufps $0xe2, %xmm1, %xmm0     # xmm0 = xmm0[2,0],xmm1[2,3]
leal 0xffffff(%r14), %r15d
movq %rbx, %rdi
movaps -0x40(%rbp), %xmm1
movl %r12d, %esi
movl %r15d, %edx
callq 0x6bded
movaps -0x50(%rbp), %xmm0
movaps -0x30(%rbp), %xmm2
addss %xmm2, %xmm0
subss -0x40(%rbp), %xmm0
movaps %xmm0, -0x50(%rbp)
movss 0x13b6c(%rip), %xmm1    # 0x9bff0
addss %xmm0, %xmm1
movaps %xmm2, %xmm0
movss %xmm1, %xmm0            # xmm0 = xmm1[0],xmm0[1,2,3]
movq %rbx, %rdi
movaps -0x60(%rbp), %xmm1
xorl %esi, %esi
movl %r14d, %edx
callq 0x6bded
movaps -0x30(%rbp), %xmm0
movaps -0x50(%rbp), %xmm1
movss %xmm1, %xmm0            # xmm0 = xmm1[0],xmm0[1,2,3]
movq %rbx, %rdi
movaps -0x40(%rbp), %xmm1
xorl %esi, %esi
movl %r15d, %edx
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x6bded
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::SetColorEditOptions(int)
void ImGui::SetColorEditOptions(ImGuiColorEditFlags flags)
{
    ImGuiContext& g = *GImGui;
    if ((flags & ImGuiColorEditFlags__DisplayMask) == 0)
        flags |= ImGuiColorEditFlags__OptionsDefault & ImGuiColorEditFlags__DisplayMask;
    if ((flags & ImGuiColorEditFlags__DataTypeMask) == 0)
        flags |= ImGuiColorEditFlags__OptionsDefault & ImGuiColorEditFlags__DataTypeMask;
    if ((flags & ImGuiColorEditFlags__PickerMask) == 0)
        flags |= ImGuiColorEditFlags__OptionsDefault & ImGuiColorEditFlags__PickerMask;
    if ((flags & ImGuiColorEditFlags__InputMask) == 0)
        flags |= ImGuiColorEditFlags__OptionsDefault & ImGuiColorEditFlags__InputMask;
    IM_ASSERT(ImIsPowerOfTwo(flags & ImGuiColorEditFlags__DisplayMask));    // Check only 1 option is selected
    IM_ASSERT(ImIsPowerOfTwo(flags & ImGuiColorEditFlags__DataTypeMask));   // Check only 1 option is selected
    IM_ASSERT(ImIsPowerOfTwo(flags & ImGuiColorEditFlags__PickerMask));     // Check only 1 option is selected
    IM_ASSERT(ImIsPowerOfTwo(flags & ImGuiColorEditFlags__InputMask));      // Check only 1 option is selected
    g.ColorEditOptions = flags;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, %eax
orl $0x100000, %eax         # imm = 0x100000
testl $0x700000, %edi         # imm = 0x700000
cmovnel %edi, %eax
movl %eax, %ecx
orl $0x800000, %ecx         # imm = 0x800000
testl $0x1800000, %eax        # imm = 0x1800000
cmovnel %eax, %ecx
movl %ecx, %edx
orl $0x2000000, %edx        # imm = 0x2000000
testl $0x6000000, %ecx        # imm = 0x6000000
cmovnel %ecx, %edx
movl %edx, %eax
orl $0x8000000, %eax        # imm = 0x8000000
testl $0x18000000, %edx       # imm = 0x18000000
cmovnel %edx, %eax
movl %eax, %ecx
andl $0x700000, %ecx         # imm = 0x700000
leal -0x1(%rcx), %edx
xorl %edx, %ecx
cmpl %edx, %ecx
jbe 0x887a9
movl %eax, %ecx
andl $0x1800000, %ecx        # imm = 0x1800000
leal -0x1(%rcx), %edx
xorl %edx, %ecx
cmpl %edx, %ecx
jbe 0x887c8
movl %eax, %ecx
andl $0x6000000, %ecx        # imm = 0x6000000
leal -0x1(%rcx), %edx
xorl %edx, %ecx
cmpl %edx, %ecx
jbe 0x887e7
movl %eax, %ecx
andl $0x18000000, %ecx       # imm = 0x18000000
leal -0x1(%rcx), %edx
xorl %edx, %ecx
cmpl %edx, %ecx
jbe 0x88806
leaq 0x5b542(%rip), %rcx     # 0xe3ce0
movq (%rcx), %rcx
movl %eax, 0x306c(%rcx)
popq %rbp
retq
leaq 0x30f74(%rip), %rdi     # 0xb9724
leaq 0x2fbd1(%rip), %rsi     # 0xb8388
leaq 0x3118a(%rip), %rcx     # 0xb9948
movl $0x14f4, %edx           # imm = 0x14F4
callq 0xc140
leaq 0x311ae(%rip), %rdi     # 0xb997d
leaq 0x2fbb2(%rip), %rsi     # 0xb8388
leaq 0x3116b(%rip), %rcx     # 0xb9948
movl $0x14f5, %edx           # imm = 0x14F5
callq 0xc140
leaq 0x3109e(%rip), %rdi     # 0xb988c
leaq 0x2fb93(%rip), %rsi     # 0xb8388
leaq 0x3114c(%rip), %rcx     # 0xb9948
movl $0x14f6, %edx           # imm = 0x14F6
callq 0xc140
leaq 0x30f93(%rip), %rdi     # 0xb97a0
leaq 0x2fb74(%rip), %rsi     # 0xb8388
leaq 0x3112d(%rip), %rcx     # 0xb9948
movl $0x14f7, %edx           # imm = 0x14F7
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::TreeNodeExV(char const*, int, char const*, __va_list_tag*)
bool ImGui::TreeNodeExV(const char* str_id, ImGuiTreeNodeFlags flags, const char* fmt, va_list args)
{
    ImGuiWindow* window = GetCurrentWindow();
    if (window->SkipItems)
        return false;

    ImGuiContext& g = *GImGui;
    const char* label_end = g.TempBuffer + ImFormatStringV(g.TempBuffer, IM_ARRAYSIZE(g.TempBuffer), fmt, args);
    return TreeNodeBehavior(window->GetID(str_id), flags, g.TempBuffer, label_end);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x5b427(%rip), %rax     # 0xe3ce0
movq (%rax), %r13
movq 0x1ae0(%r13), %r15
movb $0x1, 0x90(%r15)
cmpb $0x0, 0x93(%r15)
je 0x888e6
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %esi, %ebx
movq %rdi, %r14
leaq 0x3378(%r13), %r12
movl $0xc01, %esi            # imm = 0xC01
movq %r12, %rdi
callq 0x34731
cltq
addq %rax, %r13
addq $0x3378, %r13           # imm = 0x3378
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x3700a
movl %eax, %edi
movl %ebx, %esi
movq %r12, %rdx
movq %r13, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x88a94
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::TreeNodeExV(void const*, int, char const*, __va_list_tag*)
bool ImGui::TreeNodeExV(const void* ptr_id, ImGuiTreeNodeFlags flags, const char* fmt, va_list args)
{
    ImGuiWindow* window = GetCurrentWindow();
    if (window->SkipItems)
        return false;

    ImGuiContext& g = *GImGui;
    const char* label_end = g.TempBuffer + ImFormatStringV(g.TempBuffer, IM_ARRAYSIZE(g.TempBuffer), fmt, args);
    return TreeNodeBehavior(window->GetID(ptr_id), flags, g.TempBuffer, label_end);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x5b317(%rip), %rax     # 0xe3ce0
movq (%rax), %r13
movq 0x1ae0(%r13), %r15
movb $0x1, 0x90(%r15)
cmpb $0x0, 0x93(%r15)
je 0x889f6
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %esi, %ebx
movq %rdi, %r14
leaq 0x3378(%r13), %r12
movl $0xc01, %esi            # imm = 0xC01
movq %r12, %rdi
callq 0x34731
cltq
addq %rax, %r13
addq $0x3378, %r13           # imm = 0x3378
movq %r15, %rdi
movq %r14, %rsi
callq 0x37128
movl %eax, %edi
movl %ebx, %esi
movq %r12, %rdx
movq %r13, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x88a94
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::TreeNodeBehaviorIsOpen(unsigned int, int)
bool ImGui::TreeNodeBehaviorIsOpen(ImGuiID id, ImGuiTreeNodeFlags flags)
{
    if (flags & ImGuiTreeNodeFlags_Leaf)
        return true;

    // We only write to the tree storage if the user clicks (or explicitly use the SetNextItemOpen function)
    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = g.CurrentWindow;
    ImGuiStorage* storage = window->DC.StateStorage;

    bool is_open;
    if (g.NextItemData.Flags & ImGuiNextItemDataFlags_HasOpen)
    {
        if (g.NextItemData.OpenCond & ImGuiCond_Always)
        {
            is_open = g.NextItemData.OpenVal;
            storage->SetInt(id, is_open);
        }
        else
        {
            // We treat ImGuiCond_Once and ImGuiCond_FirstUseEver the same because tree node state are not saved persistently.
            const int stored_value = storage->GetInt(id, -1);
            if (stored_value == -1)
            {
                is_open = g.NextItemData.OpenVal;
                storage->SetInt(id, is_open);
            }
            else
            {
                is_open = stored_value != 0;
            }
        }
    }
    else
    {
        is_open = storage->GetInt(id, (flags & ImGuiTreeNodeFlags_DefaultOpen) ? 1 : 0) != 0;
    }

    // When logging is enabled, we automatically expand tree nodes (but *NOT* collapsing headers.. seems like sensible behavior).
    // NB- If we are above max depth we still allow manually opened nodes to be logged.
    if (g.LogEnabled && !(flags & ImGuiTreeNodeFlags_NoAutoOpenOnLog) && (window->DC.TreeDepth - g.LogDepthRef) < g.LogDepthToExpand)
        is_open = true;

    return is_open;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movb $0x1, %r14b
btl $0x8, %esi
jb 0x89547
movl %esi, %ebx
movl %edi, %r15d
leaq 0x5a83b(%rip), %rax     # 0xe3ce0
movq (%rax), %r13
movq 0x1ae0(%r13), %rax
movq %rax, -0x30(%rbp)
movq 0x1a8(%rax), %r12
testb $0x2, 0x1bf8(%r13)
jne 0x894d9
movl %ebx, %edx
shrl $0x5, %edx
andl $0x1, %edx
movq %r12, %rdi
movl %r15d, %esi
callq 0x34f94
jmp 0x894f6
testb $0x1, 0x1c04(%r13)
jne 0x894fe
pushq $-0x1
popq %rdx
movq %r12, %rdi
movl %r15d, %esi
callq 0x34f94
cmpl $-0x1, %eax
je 0x894fe
testl %eax, %eax
setne %r14b
jmp 0x89514
movb 0x1c08(%r13), %r14b
movzbl %r14b, %edx
movq %r12, %rdi
movl %r15d, %esi
callq 0x351a0
testb $0x10, %bl
jne 0x89547
cmpb $0x0, 0x3138(%r13)
je 0x89547
movq -0x30(%rbp), %rax
movl 0x18c(%rax), %eax
subl 0x3160(%r13), %eax
cmpl 0x3164(%r13), %eax
movzbl %r14b, %eax
pushq $0x1
popq %r14
cmovgel %eax, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::TreePushOverrideID(unsigned int)
void ImGui::TreePushOverrideID(ImGuiID id)
{
    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = g.CurrentWindow;
    Indent();
    window->DC.TreeDepth++;
    window->IDStack.push_back(id);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq -0x14(%rbp), %rbx
movl %edi, (%rbx)
leaq 0x5a76f(%rip), %rax     # 0xe3ce0
movq (%rax), %rax
movq 0x1ae0(%rax), %r14
xorps %xmm0, %xmm0
callq 0x43ae4
incl 0x18c(%r14)
addq $0xc8, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x49fbe
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::TreePush(char const*)
void ImGui::TreePush(const char* str_id)
{
    ImGuiWindow* window = GetCurrentWindow();
    Indent();
    window->DC.TreeDepth++;
    PushID(str_id ? str_id : "#TreePush");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x5a72a(%rip), %rax     # 0xe3ce0
movq (%rax), %rax
movq 0x1ae0(%rax), %r14
movb $0x1, 0x90(%r14)
xorps %xmm0, %xmm0
callq 0x43ae4
incl 0x18c(%r14)
testq %rbx, %rbx
leaq 0x30590(%rip), %rdi     # 0xb9b71
cmovneq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x42ea4
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::TreePush(void const*)
void ImGui::TreePush(const void* ptr_id)
{
    ImGuiWindow* window = GetCurrentWindow();
    Indent();
    window->DC.TreeDepth++;
    PushID(ptr_id ? ptr_id : (const void*)"#TreePush");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x5a6e1(%rip), %rax     # 0xe3ce0
movq (%rax), %rax
movq 0x1ae0(%rax), %r14
movb $0x1, 0x90(%r14)
xorps %xmm0, %xmm0
callq 0x43ae4
incl 0x18c(%r14)
testq %rbx, %rbx
leaq 0x30547(%rip), %rdi     # 0xb9b71
cmovneq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x42f1f
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::TreePop()
void ImGui::TreePop()
{
    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = g.CurrentWindow;
    Unindent();

    window->DC.TreeDepth--;
    ImU32 tree_depth_mask = (1 << window->DC.TreeDepth);

    // Handle Left arrow to move to parent tree node (when ImGuiTreeNodeFlags_NavLeftJumpsBackHere is enabled)
    if (g.NavMoveDir == ImGuiDir_Left && g.NavWindow == window && NavMoveRequestButNoResultYet())
        if (g.NavIdIsAlive && (window->DC.TreeJumpToParentOnPopMask & tree_depth_mask))
        {
            SetNavID(window->IDStack.back(), g.NavLayer, 0);
            NavMoveRequestCancel();
        }
    window->DC.TreeJumpToParentOnPopMask &= tree_depth_mask - 1;

    IM_ASSERT(window->IDStack.Size > 1); // There should always be 1 element in the IDStack (pushed during window creation). If this triggers you called TreePop/PopID too much.
    PopID();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x5a698(%rip), %rax     # 0xe3ce0
movq (%rax), %r15
movq 0x1ae0(%r15), %rbx
xorps %xmm0, %xmm0
callq 0x43b36
movl 0x18c(%rbx), %ecx
decl %ecx
pushq $0x1
popq %r14
shll %cl, %r14d
movl %ecx, 0x18c(%rbx)
cmpl $0x0, 0x1d10(%r15)
jne 0x896bf
cmpq %rbx, 0x1c90(%r15)
jne 0x896bf
callq 0x455d9
testb %al, %al
je 0x896bf
cmpb $0x1, 0x1ce4(%r15)
jne 0x896bf
testl %r14d, 0x190(%rbx)
je 0x896bf
leaq 0xc8(%rbx), %rdi
callq 0x4a148
movl (%rax), %edi
movl 0x1cdc(%r15), %esi
xorl %edx, %edx
callq 0x45409
callq 0x45606
decl %r14d
andl %r14d, 0x190(%rbx)
cmpl $0x1, 0xc8(%rbx)
jle 0x896e1
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x42fea
leaq 0x150ce(%rip), %rdi     # 0x9e7b6
leaq 0x2ec99(%rip), %rsi     # 0xb8388
leaq 0x30485(%rip), %rcx     # 0xb9b7b
movl $0x16f8, %edx           # imm = 0x16F8
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::SetNextItemOpen(bool, int)
void ImGui::SetNextItemOpen(bool is_open, ImGuiCond cond)
{
    ImGuiContext& g = *GImGui;
    if (g.CurrentWindow->SkipItems)
        return;
    g.NextItemData.Flags |= ImGuiNextItemDataFlags_HasOpen;
    g.NextItemData.OpenVal = is_open;
    g.NextItemData.OpenCond = cond ? cond : ImGuiCond_Always;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x5a5b1(%rip), %rax     # 0xe3ce0
movq (%rax), %rax
movq 0x1ae0(%rax), %rcx
cmpb $0x0, 0x93(%rcx)
jne 0x8975c
orb $0x2, 0x1bf8(%rax)
movb %dil, 0x1c08(%rax)
cmpl $0x1, %esi
adcl $0x0, %esi
movl %esi, 0x1c04(%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::ListBoxHeader(char const*, int, int)
bool ImGui::ListBoxHeader(const char* label, int items_count, int height_in_items)
{
    // Size default to hold ~7.25 items.
    // We add +25% worth of item height to allow the user to see at a glance if there are more items up/down, without looking at the scrollbar.
    // We don't add this extra bit if items_count <= height_in_items. It is slightly dodgy, because it means a dynamic list of items will make the widget resize occasionally when it crosses that size.
    // I am expecting that someone will come and complain about this behavior in a remote future, then we can advise on a better solution.
    if (height_in_items < 0)
        height_in_items = ImMin(items_count, 7);
    const ImGuiStyle& style = GetStyle();
    float height_in_items_f = (height_in_items < items_count) ? (height_in_items + 0.25f) : (height_in_items + 0.00f);

    // We include ItemSpacing.y so that a list sized for the exact number of items doesn't make a scrollbar appears. We could also enforce that by passing a flag to BeginChild().
    ImVec2 size;
    size.x = 0.0f;
    size.y = ImFloor(GetTextLineHeightWithSpacing() * height_in_items_f + style.FramePadding.y * 2.0f);
    return ListBoxHeader(label, size);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %esi, %r15d
cmpl $0x7, %esi
pushq $0x7
popq %r12
cmovll %esi, %r12d
movq %rdi, %rbx
testl %edx, %edx
cmovnsl %edx, %r12d
callq 0x35cfd
movq %rax, %r14
cvtsi2ss %r12d, %xmm0
cmpl %r15d, %r12d
jge 0x89ba7
addss 0x12459(%rip), %xmm0    # 0x9c000
movss %xmm0, -0x24(%rbp)
leaq -0x2c(%rbp), %r15
andl $0x0, (%r15)
callq 0x43eac
movss 0x3c(%r14), %xmm1
addss %xmm1, %xmm1
mulss -0x24(%rbp), %xmm0
addss %xmm1, %xmm0
cvttps2dq %xmm0, %xmm0
cvtdq2ps %xmm0, %xmm0
movss %xmm0, 0x4(%r15)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x89941
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::ListBoxFooter()
void ImGui::ListBoxFooter()
{
    ImGuiWindow * window = GetCurrentWindow();
    IM_ASSERT((window->Flags & ImGuiWindowFlags_ChildWindow) && "Mismatched ListBoxHeader/ListBoxFooter calls. Did you test the return value of ListBoxHeader()?");
    ImGuiWindow* parent_window = window->ParentWindow;
    const ImRect bb = parent_window->DC.LastItemRect;
    const ImGuiStyle& style = GetStyle();

    EndChildFrame();

    // Redeclare item size so that it includes the label (we have stored the full size in LastItemRect)
    // We call SameLine() to restore DC.CurrentLine* data
    SameLine();
    parent_window->DC.CursorPos = bb.Min;
    ItemSize(bb, style.FramePadding.y);
    EndGroup();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
leaq 0x5a0db(%rip), %rax     # 0xe3ce0
movq (%rax), %rax
movq 0x1ae0(%rax), %rax
movb $0x1, 0x90(%rax)
testb $0x1, 0xf(%rax)
je 0x89c77
movq 0x388(%rax), %r15
movups 0x12c(%r15), %xmm0
leaq -0x30(%rbp), %rbx
movaps %xmm0, (%rbx)
callq 0x35cfd
movq %rax, %r14
callq 0x412a1
movss 0x123a9(%rip), %xmm1    # 0x9bff0
xorps %xmm0, %xmm0
callq 0x437ec
movq (%rbx), %rax
movq %rax, 0xd8(%r15)
movss 0x3c(%r14), %xmm0
movq %rbx, %rdi
callq 0x4388d
callq 0x4352b
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2ff13(%rip), %rdi     # 0xb9b91
leaq 0x2e703(%rip), %rsi     # 0xb8388
leaq 0x2ff99(%rip), %rcx     # 0xb9c25
movl $0x1829, %edx           # imm = 0x1829
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::ListBox(char const*, int*, bool (*)(void*, int, char const**), void*, int, int)
bool ImGui::ListBox(const char* label, int* current_item, bool (*items_getter)(void*, int, const char**), void* data, int items_count, int height_in_items)
{
    if (!ListBoxHeader(label, items_count, height_in_items))
        return false;

    // Assume all items have even height (= 1 line of text). If you need items of different or variable sizes you can create a custom version of ListBox() in your code without using the clipper.
    ImGuiContext& g = *GImGui;
    bool value_changed = false;
    ImGuiListClipper clipper;
    clipper.Begin(items_count, GetTextLineHeightWithSpacing()); // We know exactly our line height here so we pass it as a minor optimization, but generally you don't need to.
    while (clipper.Step())
        for (int i = clipper.DisplayStart; i < clipper.DisplayEnd; i++)
        {
            const bool item_selected = (i == *current_item);
            const char* item_text;
            if (!items_getter(data, i, &item_text))
                item_text = "*Unknown item*";

            PushID(i);
            if (Selectable(item_text, item_selected))
            {
                *current_item = i;
                value_changed = true;
            }
            if (item_selected)
                SetItemDefaultFocus();
            PopID();
        }
    ListBoxFooter();
    if (value_changed)
        MarkItemEdited(g.CurrentWindow->DC.LastItemId);

    return value_changed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %r8d, %r12d
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movl %r8d, %esi
movl %r9d, %edx
callq 0x89b67
testb %al, %al
je 0x89d8a
leaq 0x59ff9(%rip), %rax     # 0xe3ce0
movq (%rax), %rax
movq %rax, -0x40(%rbp)
leaq -0x64(%rbp), %rdi
callq 0x358c6
callq 0x43eac
leaq -0x64(%rbp), %rdi
movl %r12d, %esi
callq 0x35904
movl $0x0, -0x2c(%rbp)
leaq -0x64(%rbp), %rdi
callq 0x35aa6
testb %al, %al
je 0x89d8e
movl -0x64(%rbp), %r13d
cmpl -0x60(%rbp), %r13d
jge 0x89d0f
movl (%r15), %r12d
movq %rbx, %rdi
movl %r13d, %esi
leaq -0x38(%rbp), %rdx
callq *%r14
testb %al, %al
jne 0x89d45
leaq 0x2eb2d(%rip), %rax     # 0xb886e
movq %rax, -0x38(%rbp)
movl %r13d, %edi
callq 0x42f5a
xorl %esi, %esi
cmpl %r12d, %r13d
sete %sil
movq -0x38(%rbp), %rdi
andq $0x0, -0x48(%rbp)
xorl %edx, %edx
leaq -0x48(%rbp), %rcx
callq 0x7d81c
testb %al, %al
je 0x89d76
movl %r13d, (%r15)
movb $0x1, %al
movl %eax, -0x2c(%rbp)
cmpl %r12d, %r13d
jne 0x89d80
callq 0x42cc0
callq 0x42fea
incl %r13d
jmp 0x89d20
xorl %ebx, %ebx
jmp 0x89dba
callq 0x89bf1
movl -0x2c(%rbp), %ebx
testb $0x1, %bl
je 0x89db1
movq -0x40(%rbp), %rax
movq 0x1ae0(%rax), %rax
movl 0x124(%rax), %edi
callq 0x3749e
leaq -0x64(%rbp), %rdi
callq 0x358da
andb $0x1, %bl
movl %ebx, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x89dd4
jmp 0x89dd4
jmp 0x89dd4
movq %rax, %rbx
leaq -0x64(%rbp), %rdi
callq 0x358da
movq %rbx, %rdi
callq 0xc580
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::Value(char const*, float, char const*)
void ImGui::Value(const char* prefix, float v, const char* float_format)
{
    if (float_format)
    {
        char fmt[64];
        ImFormatString(fmt, IM_ARRAYSIZE(fmt), "%%s: %s", float_format);
        Text(fmt, prefix, v);
    }
    else
    {
        Text("%s: %.3f", prefix, v);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
testq %rsi, %rsi
je 0x8a7e7
movq %rsi, %rcx
leaq 0x2f56b(%rip), %rdx     # 0xb9d21
leaq -0x60(%rbp), %r14
pushq $0x40
popq %rsi
movq %r14, %rdi
xorl %eax, %eax
movss %xmm0, -0x14(%rbp)
callq 0x3468c
cvtss2sd -0x14(%rbp), %xmm0
movq %r14, %rdi
movq %rbx, %rsi
movb $0x1, %al
callq 0x795ac
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
cvtss2sd %xmm0, %xmm0
leaq 0x2f537(%rip), %rdi     # 0xb9d29
movq %rbx, %rsi
movb $0x1, %al
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x795ac
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGuiMenuColumns::Update(int, float, bool)
void ImGuiMenuColumns::Update(int count, float spacing, bool clear)
{
    IM_ASSERT(count == IM_ARRAYSIZE(Pos));
    IM_UNUSED(count);
    Width = NextWidth = 0.0f;
    Spacing = spacing;
    if (clear)
        memset(NextWidths, 0, sizeof(NextWidths));
    for (int i = 0; i < IM_ARRAYSIZE(Pos); i++)
    {
        if (i > 0 && NextWidths[i] > 0.0f)
            Width += Spacing;
        Pos[i] = IM_FLOOR(Width);
        Width += NextWidths[i];
        NextWidths[i] = 0.0f;
    }
}

// Assembly:
cmpl $0x3, %esi
jne 0x8a868
andl $0x0, 0x8(%rdi)
movss %xmm0, (%rdi)
testb %dl, %dl
je 0x8a81e
andl $0x0, 0x20(%rdi)
andq $0x0, 0x18(%rdi)
xorps %xmm1, %xmm1
xorl %eax, %eax
xorps %xmm2, %xmm2
testq %rax, %rax
je 0x8a842
cmpq $0x3, %rax
je 0x8a862
movss 0x18(%rdi,%rax,4), %xmm3
ucomiss %xmm1, %xmm3
jbe 0x8a847
addss %xmm0, %xmm2
jmp 0x8a847
movss 0x18(%rdi), %xmm3
cvttps2dq %xmm2, %xmm4
cvtdq2ps %xmm4, %xmm4
movss %xmm4, 0xc(%rdi,%rax,4)
addss %xmm3, %xmm2
andl $0x0, 0x18(%rdi,%rax,4)
incq %rax
jmp 0x8a826
movss %xmm2, 0x4(%rdi)
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x2f4bf(%rip), %rdi     # 0xb9d32
leaq 0x2db0e(%rip), %rsi     # 0xb8388
leaq 0x2f4e0(%rip), %rcx     # 0xb9d61
movl $0x193d, %edx           # imm = 0x193D
callq 0xc140
nop
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGuiMenuColumns::DeclColumns(float, float, float)
float ImGuiMenuColumns::DeclColumns(float w0, float w1, float w2) // not using va_arg because they promote float to double
{
    NextWidth = 0.0f;
    NextWidths[0] = ImMax(NextWidths[0], w0);
    NextWidths[1] = ImMax(NextWidths[1], w1);
    NextWidths[2] = ImMax(NextWidths[2], w2);
    for (int i = 0; i < IM_ARRAYSIZE(Pos); i++)
        NextWidth += NextWidths[i] + ((i > 0 && NextWidths[i] > 0.0f) ? Spacing : 0.0f);
    return ImMax(Width, NextWidth);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movss (%rdi), %xmm3
movss 0x18(%rdi), %xmm4
movaps %xmm0, %xmm5
cmpless %xmm4, %xmm5
andps %xmm5, %xmm4
andnps %xmm0, %xmm5
orps %xmm4, %xmm5
movss %xmm5, 0x18(%rdi)
movss 0x1c(%rdi), %xmm0
movaps %xmm1, %xmm4
cmpless %xmm0, %xmm4
andps %xmm4, %xmm0
andnps %xmm1, %xmm4
orps %xmm0, %xmm4
movss %xmm4, 0x1c(%rdi)
movss 0x20(%rdi), %xmm0
movaps %xmm2, %xmm1
cmpless %xmm0, %xmm1
andps %xmm1, %xmm0
andnps %xmm2, %xmm1
orps %xmm0, %xmm1
movss %xmm1, 0x20(%rdi)
xorps %xmm1, %xmm1
xorl %eax, %eax
cmpq $0x3, %rax
je 0x8a913
movss 0x18(%rdi,%rax,4), %xmm0
xorps %xmm2, %xmm2
testq %rax, %rax
je 0x8a906
cmpltss %xmm0, %xmm2
andps %xmm3, %xmm2
addss %xmm2, %xmm0
addss %xmm0, %xmm1
incq %rax
jmp 0x8a8ea
movss %xmm1, 0x8(%rdi)
movss 0x4(%rdi), %xmm2
movaps %xmm1, %xmm0
cmpless %xmm2, %xmm0
andps %xmm0, %xmm2
andnps %xmm1, %xmm0
orps %xmm2, %xmm0
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::BeginMainMenuBar()
bool ImGui::BeginMainMenuBar()
{
    ImGuiContext& g = *GImGui;
    g.NextWindowData.MenuBarOffsetMinVal = ImVec2(g.Style.DisplaySafeAreaPadding.x, ImMax(g.Style.DisplaySafeAreaPadding.y - g.Style.FramePadding.y, 0.0f));
    SetNextWindowPos(ImVec2(0.0f, 0.0f));
    SetNextWindowSize(ImVec2(g.IO.DisplaySize.x, g.NextWindowData.MenuBarOffsetMinVal.y + g.FontBaseSize + g.Style.FramePadding.y));
    PushStyleVar(ImGuiStyleVar_WindowRounding, 0.0f);
    PushStyleVar(ImGuiStyleVar_WindowMinSize, ImVec2(0, 0));
    ImGuiWindowFlags window_flags = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_MenuBar;
    bool is_open = Begin("##MainMenuBar", NULL, window_flags) && BeginMenuBar();
    PopStyleVar(2);
    g.NextWindowData.MenuBarOffsetMinVal = ImVec2(0.0f, 0.0f);
    if (!is_open)
    {
        End();
        return false;
    }
    return true; //-V1020
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
leaq 0x59035(%rip), %rax     # 0xe3ce0
movq (%rax), %r15
movl 0x160c(%r15), %eax
movss 0x1610(%r15), %xmm0
subss 0x159c(%r15), %xmm0
xorps %xmm1, %xmm1
cmpless %xmm0, %xmm1
andps %xmm0, %xmm1
movl %eax, 0x1bec(%r15)
movss %xmm1, 0x1bf0(%r15)
leaq -0x20(%rbp), %r14
andq $0x0, (%r14)
leaq -0x28(%rbp), %rdx
andq $0x0, (%rdx)
xorl %ebx, %ebx
movq %r14, %rdi
xorl %esi, %esi
callq 0x42997
movss 0x10(%r15), %xmm0
movss 0x1bf0(%r15), %xmm1
addss 0x1984(%r15), %xmm1
addss 0x159c(%r15), %xmm1
movss %xmm0, (%r14)
movss %xmm1, 0x4(%r14)
movq %r14, %rdi
xorl %esi, %esi
callq 0x3ba89
pushq $0x2
popq %rdi
xorps %xmm0, %xmm0
callq 0x35f08
andq $0x0, (%r14)
pushq $0x4
popq %rdi
leaq -0x20(%rbp), %rsi
callq 0x35fca
leaq 0x16734(%rip), %rdi     # 0xa148a
xorl %esi, %esi
movl $0x50f, %edx            # imm = 0x50F
callq 0x3bad8
testb %al, %al
je 0x8ad6d
callq 0x8a94c
movl %eax, %ebx
pushq $0x2
popq %rdi
callq 0x3605c
andq $0x0, 0x1bec(%r15)
testb %bl, %bl
jne 0x8ad86
callq 0x3f958
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::EndMainMenuBar()
void ImGui::EndMainMenuBar()
{
    EndMenuBar();

    // When the user has left the menu layer (typically: closed menus through activation of an item), we restore focus to the previous window
    // FIXME: With this strategy we won't be able to restore a NULL focus.
    ImGuiContext& g = *GImGui;
    if (g.CurrentWindow == g.NavWindow && g.NavLayer == ImGuiNavLayer_Main && !g.NavAnyRequest)
        FocusTopMostWindowUnderOne(g.NavWindow, NULL);

    End();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x8aaea
leaq 0x58f3d(%rip), %rax     # 0xe3ce0
movq (%rax), %rax
movq 0x1c90(%rax), %rdi
cmpq %rdi, 0x1ae0(%rax)
jne 0x8adcf
cmpl $0x0, 0x1cdc(%rax)
jne 0x8adcf
cmpb $0x0, 0x1ce8(%rax)
jne 0x8adcf
xorl %esi, %esi
callq 0x3b9e5
popq %rbp
jmp 0x3f958
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::EndMenu()
void ImGui::EndMenu()
{
    // Nav: When a left move request _within our child menu_ failed, close ourselves (the _parent_ menu).
    // A menu doesn't close itself because EndMenuBar() wants the catch the last Left<>Right inputs.
    // However, it means that with the current code, a BeginMenu() from outside another menu or a menu-bar won't be closable with the Left direction.
    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = g.CurrentWindow;
    if (g.NavWindow && g.NavWindow->ParentWindow == window && g.NavMoveDir == ImGuiDir_Left && NavMoveRequestButNoResultYet() && window->DC.LayoutType == ImGuiLayoutType_Vertical)
    {
        ClosePopupToLevel(g.BeginPopupStack.Size, true);
        NavMoveRequestCancel();
    }

    EndPopup();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x587b4(%rip), %rax     # 0xe3ce0
movq (%rax), %rbx
movq 0x1c90(%rbx), %rax
testq %rax, %rax
je 0x8b57a
movq 0x1ae0(%rbx), %r14
cmpq %r14, 0x388(%rax)
jne 0x8b57a
cmpl $0x0, 0x1d10(%rbx)
jne 0x8b57a
callq 0x455d9
testb %al, %al
je 0x8b57a
cmpl $0x1, 0x1bc(%r14)
jne 0x8b57a
movl 0x1c80(%rbx), %edi
pushq $0x1
popq %rsi
callq 0x44963
callq 0x45606
popq %rbx
popq %r14
popq %rbp
jmp 0x44bbe
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::BeginTabBar(char const*, int)
bool    ImGui::BeginTabBar(const char* str_id, ImGuiTabBarFlags flags)
{
    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = g.CurrentWindow;
    if (window->SkipItems)
        return false;

    ImGuiID id = window->GetID(str_id);
    ImGuiTabBar* tab_bar = g.TabBars.GetOrAddByKey(id);
    ImRect tab_bar_bb = ImRect(window->DC.CursorPos.x, window->DC.CursorPos.y, window->WorkRect.Max.x, window->DC.CursorPos.y + g.FontSize + g.Style.FramePadding.y * 2);
    tab_bar->ID = id;
    return BeginTabBarEx(tab_bar, tab_bar_bb, flags | ImGuiTabBarFlags_IsFocused);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
leaq 0x58414(%rip), %rax     # 0xe3ce0
movq (%rax), %r12
movq 0x1ae0(%r12), %r14
cmpb $0x0, 0x93(%r14)
je 0x8b8e8
xorl %eax, %eax
jmp 0x8b96f
movl %esi, %ebx
movq %rdi, %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x3700a
movl %eax, %r15d
leaq 0x2110(%r12), %rdi
movl %eax, %esi
callq 0x93198
movss 0xd8(%r14), %xmm0
movss 0xdc(%r14), %xmm1
movss 0x240(%r14), %xmm2
movss 0x1980(%r12), %xmm3
addss %xmm1, %xmm3
movss 0x159c(%r12), %xmm4
addss %xmm4, %xmm4
addss %xmm3, %xmm4
leaq -0x30(%rbp), %rsi
movss %xmm0, (%rsi)
movss %xmm1, 0x4(%rsi)
movss %xmm2, 0x8(%rsi)
movss %xmm4, 0xc(%rsi)
movl %r15d, 0x14(%rax)
orl $0x200000, %ebx         # imm = 0x200000
movq %rax, %rdi
movl %ebx, %edx
callq 0x8b97c
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::EndTabBar()
void    ImGui::EndTabBar()
{
    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = g.CurrentWindow;
    if (window->SkipItems)
        return;

    ImGuiTabBar* tab_bar = g.CurrentTabBar;
    if (tab_bar == NULL)
    {
        IM_ASSERT_USER_ERROR(tab_bar != NULL, "Mismatched BeginTabBar()/EndTabBar()!");
        return;
    }

    // Fallback in case no TabItem have been submitted
    if (tab_bar->WantLayout)
        TabBarLayout(tab_bar);

    // Restore the last visible height if no tab is visible, this reduce vertical flicker/movement when a tabs gets removed without calling SetTabItemClosed().
    const bool tab_bar_appearing = (tab_bar->PrevFrameVisible + 1 < g.FrameCount);
    if (tab_bar->VisibleTabWasSubmitted || tab_bar->VisibleTabId == 0 || tab_bar_appearing)
    {
        tab_bar->CurrTabsContentsHeight = ImMax(window->DC.CursorPos.y - tab_bar->BarRect.Max.y, tab_bar->CurrTabsContentsHeight);
        window->DC.CursorPos.y = tab_bar->BarRect.Max.y + tab_bar->CurrTabsContentsHeight;
    }
    else
    {
        window->DC.CursorPos.y = tab_bar->BarRect.Max.y + tab_bar->PrevTabsContentsHeight;
    }
    if (tab_bar->BeginCount > 1)
        window->DC.CursorPos = tab_bar->BackupCursorPos;

    if ((tab_bar->Flags & ImGuiTabBarFlags_DockNode) == 0)
        PopID();

    g.CurrentTabBarStack.pop_back();
    g.CurrentTabBar = g.CurrentTabBarStack.empty() ? NULL : GetTabBarFromTabBarRef(g.CurrentTabBarStack.back());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq 0x580f3(%rip), %r15     # 0xe3ce0
movq (%r15), %r14
movq 0x1ae0(%r14), %r12
cmpb $0x0, 0x93(%r12)
jne 0x8bcf7
movq 0x2108(%r14), %rbx
testq %rbx, %rbx
je 0x8bd00
cmpb $0x1, 0x6a(%rbx)
jne 0x8bc24
movq %rbx, %rdi
callq 0x8bd1f
cmpb $0x0, 0x6b(%rbx)
je 0x8bc68
movss 0xdc(%r12), %xmm0
movss 0x38(%rbx), %xmm1
movss 0x3c(%rbx), %xmm2
subss %xmm1, %xmm0
movaps %xmm2, %xmm3
cmpless %xmm0, %xmm3
andps %xmm3, %xmm0
andnps %xmm2, %xmm3
orps %xmm0, %xmm3
movss %xmm3, 0x3c(%rbx)
addss %xmm1, %xmm3
movss %xmm3, 0xdc(%r12)
jmp 0x8bc90
cmpl $0x0, 0x20(%rbx)
je 0x8bc2a
movl 0x28(%rbx), %eax
incl %eax
cmpl 0x1a68(%r14), %eax
jl 0x8bc2a
movss 0x38(%rbx), %xmm0
addss 0x40(%rbx), %xmm0
movss %xmm0, 0xdc(%r12)
cmpb $0x2, 0x69(%rbx)
jl 0x8bca5
movq 0x80(%rbx), %rax
movq %rax, 0xd8(%r12)
testb $0x10, 0x12(%rbx)
jne 0x8bcb0
callq 0x42fea
leaq 0x2138(%r14), %rbx
movq %rbx, %rdi
callq 0x788de
cmpl $0x0, 0x2138(%r14)
je 0x8bcee
movq %rbx, %rdi
callq 0x7890c
movq %rax, %rcx
movq (%rax), %rax
testq %rax, %rax
jne 0x8bcf0
movl $0x2110, %edi           # imm = 0x2110
addq (%r15), %rdi
movl 0x8(%rcx), %esi
callq 0x4ca7e
jmp 0x8bcf0
xorl %eax, %eax
movq %rax, 0x2108(%r14)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2e13f(%rip), %rdi     # 0xb9e46
leaq 0x2c67a(%rip), %rsi     # 0xb8388
leaq 0x2e170(%rip), %rcx     # 0xb9e85
movl $0x1b58, %edx           # imm = 0x1B58
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::TabBarFindTabByID(ImGuiTabBar*, unsigned int)
ImGuiTabItem* ImGui::TabBarFindTabByID(ImGuiTabBar* tab_bar, ImGuiID tab_id)
{
    if (tab_id != 0)
        for (int n = 0; n < tab_bar->Tabs.Size; n++)
            if (tab_bar->Tabs[n].ID == tab_id)
                return &tab_bar->Tabs[n];
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testl %esi, %esi
je 0x8cb0e
movl %esi, %r14d
movq %rdi, %rbx
xorl %r15d, %r15d
cmpl (%rbx), %r15d
jge 0x8cb0e
movq %rbx, %rdi
movl %r15d, %esi
callq 0x4bc4e
cmpl %r14d, (%rax)
je 0x8cb1b
incl %r15d
jmp 0x8caf4
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movl %r15d, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4bc4e
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::TabBarRemoveTab(ImGuiTabBar*, unsigned int)
void ImGui::TabBarRemoveTab(ImGuiTabBar* tab_bar, ImGuiID tab_id)
{
    if (ImGuiTabItem* tab = TabBarFindTabByID(tab_bar, tab_id))
        tab_bar->Tabs.erase(tab);
    if (tab_bar->VisibleTabId == tab_id)      { tab_bar->VisibleTabId = 0; }
    if (tab_bar->SelectedTabId == tab_id)     { tab_bar->SelectedTabId = 0; }
    if (tab_bar->NextSelectedTabId == tab_id) { tab_bar->NextSelectedTabId = 0; }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
callq 0x8cadd
testq %rax, %rax
je 0x8cb52
movq %rbx, %rdi
movq %rax, %rsi
callq 0x931d6
cmpl %r14d, 0x20(%rbx)
jne 0x8cb5c
andl $0x0, 0x20(%rbx)
cmpl %r14d, 0x18(%rbx)
jne 0x8cb66
andl $0x0, 0x18(%rbx)
cmpl %r14d, 0x1c(%rbx)
jne 0x8cb70
andl $0x0, 0x1c(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::TabBarCloseTab(ImGuiTabBar*, ImGuiTabItem*)
void ImGui::TabBarCloseTab(ImGuiTabBar* tab_bar, ImGuiTabItem* tab)
{
    IM_ASSERT(!(tab->Flags & ImGuiTabItemFlags_Button));
    if (!(tab->Flags & ImGuiTabItemFlags_UnsavedDocument))
    {
        // This will remove a frame of lag for selecting another tab on closure.
        // However we don't run it in the case where the 'Unsaved' flag is set, so user gets a chance to fully undo the closure
        tab->WantClose = true;
        if (tab_bar->VisibleTabId == tab->ID)
        {
            tab->LastFrameVisible = -1;
            tab_bar->SelectedTabId = tab_bar->NextSelectedTabId = 0;
        }
    }
    else
    {
        // Actually select before expecting closure attempt (on an UnsavedDocument tab user is expect to e.g. show a popup)
        if (tab_bar->VisibleTabId != tab->ID)
            tab_bar->NextSelectedTabId = tab->ID;
    }
}

// Assembly:
movl 0x4(%rsi), %eax
btl $0x15, %eax
jb 0x8cba2
testb $0x1, %al
jne 0x8cb97
movb $0x1, 0x22(%rsi)
movl 0x20(%rdi), %eax
cmpl (%rsi), %eax
jne 0x8cba1
orl $-0x1, 0x8(%rsi)
andq $0x0, 0x18(%rdi)
retq
movl (%rsi), %eax
cmpl %eax, 0x20(%rdi)
je 0x8cba1
movl %eax, 0x1c(%rdi)
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x2d2f0(%rip), %rdi     # 0xb9e9d
leaq 0x2b7d4(%rip), %rsi     # 0xb8388
leaq 0x2d30b(%rip), %rcx     # 0xb9ec6
movl $0x1c88, %edx           # imm = 0x1C88
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::TabBarQueueReorder(ImGuiTabBar*, ImGuiTabItem const*, int)
void ImGui::TabBarQueueReorder(ImGuiTabBar* tab_bar, const ImGuiTabItem* tab, int dir)
{
    IM_ASSERT(dir == -1 || dir == +1);
    IM_ASSERT(tab_bar->ReorderRequestTabId == 0);
    tab_bar->ReorderRequestTabId = tab->ID;
    tab_bar->ReorderRequestDir = (ImS8)dir;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $-0x1, %edx
je 0x8cbd3
cmpl $0x1, %edx
jne 0x8cc02
cmpl $0x0, 0x64(%rdi)
jne 0x8cbe3
movl (%rsi), %eax
movl %eax, 0x64(%rdi)
movb %dl, 0x68(%rdi)
popq %rbp
retq
leaq 0x2d376(%rip), %rdi     # 0xb9f60
leaq 0x2b797(%rip), %rsi     # 0xb8388
leaq 0x2d31f(%rip), %rcx     # 0xb9f17
movl $0x1cc4, %edx           # imm = 0x1CC4
callq 0xc140
leaq 0x2d2f7(%rip), %rdi     # 0xb9f00
leaq 0x2b778(%rip), %rsi     # 0xb8388
leaq 0x2d300(%rip), %rcx     # 0xb9f17
movl $0x1cc3, %edx           # imm = 0x1CC3
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::TabBarProcessReorder(ImGuiTabBar*)
bool ImGui::TabBarProcessReorder(ImGuiTabBar* tab_bar)
{
    ImGuiTabItem* tab1 = TabBarFindTabByID(tab_bar, tab_bar->ReorderRequestTabId);
    if (tab1 == NULL || (tab1->Flags & ImGuiTabItemFlags_NoReorder))
        return false;

    //IM_ASSERT(tab_bar->Flags & ImGuiTabBarFlags_Reorderable); // <- this may happen when using debug tools
    int tab2_order = tab_bar->GetTabOrder(tab1) + tab_bar->ReorderRequestDir;
    if (tab2_order < 0 || tab2_order >= tab_bar->Tabs.Size)
        return false;

    // Reordered TabItem must share the same position flags than target
    ImGuiTabItem* tab2 = &tab_bar->Tabs[tab2_order];
    if (tab2->Flags & ImGuiTabItemFlags_NoReorder)
        return false;
    if ((tab1->Flags & (ImGuiTabItemFlags_Leading | ImGuiTabItemFlags_Trailing)) != (tab2->Flags & (ImGuiTabItemFlags_Leading | ImGuiTabItemFlags_Trailing)))
        return false;

    ImGuiTabItem item_tmp = *tab1;
    *tab1 = *tab2;
    *tab2 = item_tmp;

    if (tab_bar->Flags & ImGuiTabBarFlags_SaveSettings)
        MarkIniSettingsDirty();
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
movl 0x64(%rdi), %esi
callq 0x8cadd
testq %rax, %rax
je 0x8cc75
movq %rax, %r14
testb $0x20, 0x4(%rax)
jne 0x8cc75
movq %rbx, %rdi
movq %r14, %rsi
callq 0x932f2
movsbl 0x68(%rbx), %esi
addl %eax, %esi
js 0x8cc75
cmpl (%rbx), %esi
jge 0x8cc75
movq %rbx, %rdi
callq 0x4bc4e
movl 0x4(%rax), %ecx
testb $0x20, %cl
jne 0x8cc75
xorl 0x4(%r14), %ecx
testb $-0x40, %cl
je 0x8cc80
xorl %eax, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl 0x20(%r14), %ecx
movl %ecx, -0x20(%rbp)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movaps %xmm1, -0x30(%rbp)
movaps %xmm0, -0x40(%rbp)
movl 0x1f(%rax), %ecx
movl %ecx, 0x1f(%r14)
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups %xmm1, 0x10(%r14)
movups %xmm0, (%r14)
movl -0x21(%rbp), %ecx
movl %ecx, 0x1f(%rax)
movaps -0x40(%rbp), %xmm0
movaps -0x30(%rbp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
testb $0x40, 0x12(%rbx)
je 0x8cccf
callq 0x466fe
movb $0x1, %al
jmp 0x8cc77