LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/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 0x58f09(%rip), %rax     # 0xfbcd0
movq (%rax), %r14
movl 0x160c(%r14), %eax
movss 0x1610(%r14), %xmm0
subss 0x159c(%r14), %xmm0
xorps %xmm1, %xmm1
cmpless %xmm0, %xmm1
andps %xmm0, %xmm1
movl %eax, 0x1bec(%r14)
movss %xmm1, 0x1bf0(%r14)
xorl %r15d, %r15d
leaq -0x20(%rbp), %rbx
movq %r15, (%rbx)
leaq -0x28(%rbp), %rdx
movq %r15, (%rdx)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x545cf
movss 0x10(%r14), %xmm0
movss 0x1bf0(%r14), %xmm1
addss 0x1984(%r14), %xmm1
addss 0x159c(%r14), %xmm1
movss %xmm0, (%rbx)
movss %xmm1, 0x4(%rbx)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4b6f2
xorps %xmm0, %xmm0
movl $0x2, %edi
callq 0x43ff0
movq %r15, (%rbx)
leaq -0x20(%rbp), %rsi
movl $0x4, %edi
callq 0x4417f
leaq 0x175fe(%rip), %rdi     # 0xba470
xorl %esi, %esi
movl $0x50f, %edx            # imm = 0x50F
callq 0x4b741
testb %al, %al
je 0xa2ea6
callq 0xa2a06
movl %eax, %ebx
movl $0x2, %edi
callq 0x44325
movq $0x0, 0x1bec(%r14)
movb $0x1, %al
testb %bl, %bl
je 0xa2ebb
jmp 0xa2ec2
movl $0x2, %edi
callq 0x44325
movq $0x0, 0x1bec(%r14)
callq 0x50af3
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xa2bcb
leaq 0x58df3(%rip), %rax     # 0xfbcd0
movq (%rax), %rax
movq 0x1c90(%rax), %rdi
cmpq %rdi, 0x1ae0(%rax)
jne 0xa2f09
cmpl $0x0, 0x1cdc(%rax)
jne 0xa2f09
cmpb $0x0, 0x1ce8(%rax)
jne 0xa2f09
xorl %esi, %esi
callq 0x4b620
popq %rbp
jmp 0x50af3
// File: /workspace/github_cpp_makefile_star2_O3/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 0x5857a(%rip), %rax     # 0xfbcd0
movq (%rax), %rbx
movq 0x1c90(%rbx), %rax
testq %rax, %rax
je 0xa37a6
movq 0x1ae0(%rbx), %r14
cmpq %r14, 0x388(%rax)
jne 0xa37a6
cmpl $0x0, 0x1d10(%rbx)
jne 0xa37a6
callq 0x57d7d
testb %al, %al
je 0xa37a6
cmpl $0x1, 0x1bc(%r14)
jne 0xa37a6
movl 0x1c80(%rbx), %edi
movl $0x1, %esi
callq 0x5702e
callq 0x57daa
popq %rbx
popq %r14
popq %rbp
jmp 0x5732f
// File: /workspace/github_cpp_makefile_star2_O3/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 0x581c8(%rip), %rax     # 0xfbcd0
movq (%rax), %r12
movq 0x1ae0(%r12), %r14
cmpb $0x0, 0x93(%r14)
je 0xa3b24
xorl %eax, %eax
jmp 0xa3bab
movl %esi, %ebx
movq %rdi, %rsi
movq %r14, %rdi
xorl %edx, %edx
callq 0x4570a
movl %eax, %r15d
leaq 0x2110(%r12), %rdi
movl %eax, %esi
callq 0xac028
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 0xa3bb8
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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:
testl %esi, %esi
je 0xa5096
movslq (%rdi), %rcx
testq %rcx, %rcx
jle 0xa5096
pushq %rbp
movq %rsp, %rbp
movq 0x8(%rdi), %rax
cmpl %esi, (%rax)
je 0xa5094
addq $0x24, %rax
decq %rcx
jne 0xa5085
xorl %eax, %eax
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/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
testl %esi, %esi
je 0xa50ec
movslq (%rbx), %rax
testq %rax, %rax
jle 0xa50ec
movq 0x8(%rbx), %rdi
leaq (%rax,%rax,8), %rcx
leaq -0x24(,%rcx,4), %rdx
xorl %ecx, %ecx
cmpl %r14d, (%rdi)
je 0xa50dc
incq %rcx
addq $-0x24, %rdx
addq $0x24, %rdi
cmpq $-0x24, %rdx
jne 0xa50c4
jmp 0xa50ec
cmpq %rax, %rcx
jae 0xa5118
leaq 0x24(%rdi), %rsi
callq 0xc130
decl (%rbx)
cmpl %r14d, 0x20(%rbx)
jne 0xa50f9
movl $0x0, 0x20(%rbx)
cmpl %r14d, 0x18(%rbx)
jne 0xa5106
movl $0x0, 0x18(%rbx)
cmpl %r14d, 0x1c(%rbx)
jne 0xa5113
movl $0x0, 0x1c(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x1b411(%rip), %rdi     # 0xc0530
leaq 0x14565(%rip), %rsi     # 0xb968b
leaq 0x2e187(%rip), %rcx     # 0xd32b4
movl $0x674, %edx            # imm = 0x674
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/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 0xa516a
testb $0x1, %al
jne 0xa515f
movb $0x1, 0x22(%rsi)
movl 0x20(%rdi), %eax
cmpl (%rsi), %eax
jne 0xa5169
movl $0xffffffff, 0x8(%rsi)  # imm = 0xFFFFFFFF
movq $0x0, 0x18(%rdi)
retq
movl (%rsi), %eax
cmpl %eax, 0x20(%rdi)
je 0xa5169
movl %eax, 0x1c(%rdi)
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x2d9b8(%rip), %rdi     # 0xd2b2d
leaq 0x2be9c(%rip), %rsi     # 0xd1018
leaq 0x2d9d3(%rip), %rcx     # 0xd2b56
movl $0x1c88, %edx           # imm = 0x1C88
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/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 0xa519b
cmpl $0x1, %edx
jne 0xa51ca
cmpl $0x0, 0x64(%rdi)
jne 0xa51ab
movl (%rsi), %eax
movl %eax, 0x64(%rdi)
movb %dl, 0x68(%rdi)
popq %rbp
retq
leaq 0x2da3e(%rip), %rdi     # 0xd2bf0
leaq 0x2be5f(%rip), %rsi     # 0xd1018
leaq 0x2d9e7(%rip), %rcx     # 0xd2ba7
movl $0x1cc4, %edx           # imm = 0x1CC4
callq 0xc140
leaq 0x2d9bf(%rip), %rdi     # 0xd2b90
leaq 0x2be40(%rip), %rsi     # 0xd1018
leaq 0x2d9c8(%rip), %rcx     # 0xd2ba7
movl $0x1cc3, %edx           # imm = 0x1CC3
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/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:
movl 0x64(%rdi), %eax
testl %eax, %eax
je 0xa521a
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
movslq (%rdi), %rcx
testq %rcx, %rcx
jle 0xa5257
movq 0x8(%rbx), %r14
cmpl %eax, (%r14)
je 0xa521d
addq $0x24, %r14
decq %rcx
jne 0xa520a
jmp 0xa5257
xorl %eax, %eax
retq
testb $0x20, 0x4(%r14)
jne 0xa5257
movq %rbx, %rdi
movq %r14, %rsi
callq 0xac098
movsbl 0x68(%rbx), %ecx
addl %eax, %ecx
js 0xa5257
cmpl (%rbx), %ecx
jge 0xa5257
movq 0x8(%rbx), %rax
movl %ecx, %ecx
leaq (%rcx,%rcx,8), %rcx
movl 0x4(%rax,%rcx,4), %edx
testb $0x20, %dl
jne 0xa5257
xorl 0x4(%r14), %edx
testb $-0x40, %dl
je 0xa5262
xorl %eax, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq (%rax,%rcx,4), %rax
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 0xa52b5
callq 0x592b5
movb $0x1, %al
jmp 0xa5259
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::BeginTabItem(char const*, bool*, int)
bool    ImGui::BeginTabItem(const char* label, bool* p_open, ImGuiTabItemFlags flags)
{
    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = g.CurrentWindow;
    if (window->SkipItems)
        return false;

    ImGuiTabBar* tab_bar = g.CurrentTabBar;
    if (tab_bar == NULL)
    {
        IM_ASSERT_USER_ERROR(tab_bar, "Needs to be called between BeginTabBar() and EndTabBar()!");
        return false;
    }
    IM_ASSERT(!(flags & ImGuiTabItemFlags_Button)); // BeginTabItem() Can't be used with button flags, use TabItemButton() instead!

    bool ret = TabItemEx(tab_bar, label, p_open, flags);
    if (ret && !(flags & ImGuiTabItemFlags_NoPushId))
    {
        ImGuiTabItem* tab = &tab_bar->Tabs[tab_bar->LastTabItemIdx];
        PushOverrideID(tab->ID); // We already hashed 'label' so push into the ID stack directly instead of doing another hash through PushID(label)
    }
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x56a09(%rip), %rax     # 0xfbcd0
movq (%rax), %rax
movq 0x1ae0(%rax), %rcx
cmpb $0x0, 0x93(%rcx)
je 0xa52de
xorl %eax, %eax
jmp 0xa5336
movq 0x2108(%rax), %rbx
testq %rbx, %rbx
je 0xa533b
movl %edx, %r14d
btl $0x15, %edx
jb 0xa535a
movq %rsi, %rdx
movq %rdi, %rsi
movq %rbx, %rdi
movl %r14d, %ecx
callq 0xa5398
movl %eax, %ecx
xorb $0x1, %cl
andl $0x8, %r14d
shrl $0x3, %r14d
orb %cl, %r14b
jne 0xa5336
movswl 0x70(%rbx), %eax
testl %eax, %eax
js 0xa5379
cmpl %eax, (%rbx)
jle 0xa5379
movq 0x8(%rbx), %rcx
movl %eax, %eax
leaq (%rax,%rax,8), %rax
movl (%rcx,%rax,4), %edi
callq 0x54f5b
movb $0x1, %al
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x2d8d0(%rip), %rdi     # 0xd2c12
leaq 0x2bccf(%rip), %rsi     # 0xd1018
leaq 0x2d90b(%rip), %rcx     # 0xd2c5b
movl $0x1d5e, %edx           # imm = 0x1D5E
callq 0xc140
leaq 0x2da0b(%rip), %rdi     # 0xd2d6c
leaq 0x2bcb0(%rip), %rsi     # 0xd1018
leaq 0x2d8ec(%rip), %rcx     # 0xd2c5b
movl $0x1d61, %edx           # imm = 0x1D61
callq 0xc140
leaq 0x142f8(%rip), %rdi     # 0xb9678
leaq 0x14304(%rip), %rsi     # 0xb968b
leaq 0x2dee8(%rip), %rcx     # 0xd3276
movl $0x65c, %edx            # imm = 0x65C
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::EndTabItem()
void    ImGui::EndTabItem()
{
    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, "Needs to be called between BeginTabBar() and EndTabBar()!");
        return;
    }
    IM_ASSERT(tab_bar->LastTabItemIdx >= 0);
    ImGuiTabItem* tab = &tab_bar->Tabs[tab_bar->LastTabItemIdx];
    if (!(tab->Flags & ImGuiTabItemFlags_NoPushId))
        PopID();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x55fed(%rip), %rax     # 0xfbcd0
movq (%rax), %rax
movq 0x1ae0(%rax), %rcx
cmpb $0x0, 0x93(%rcx)
jne 0xa5d26
movq 0x2108(%rax), %rax
testq %rax, %rax
je 0xa5d28
movswl 0x70(%rax), %ecx
testl %ecx, %ecx
js 0xa5d47
cmpl %ecx, (%rax)
jle 0xa5d66
movq 0x8(%rax), %rax
movslq %ecx, %rcx
leaq (%rcx,%rcx,8), %rcx
testb $0x8, 0x4(%rax,%rcx,4)
jne 0xa5d26
popq %rbp
jmp 0x55082
popq %rbp
retq
leaq 0x2cf6e(%rip), %rdi     # 0xd2c9d
leaq 0x2b2e2(%rip), %rsi     # 0xd1018
leaq 0x2cfb3(%rip), %rcx     # 0xd2cf0
movl $0x1d76, %edx           # imm = 0x1D76
callq 0xc140
leaq 0x2cfbb(%rip), %rdi     # 0xd2d09
leaq 0x2b2c3(%rip), %rsi     # 0xd1018
leaq 0x2cf94(%rip), %rcx     # 0xd2cf0
movl $0x1d79, %edx           # imm = 0x1D79
callq 0xc140
leaq 0x1390b(%rip), %rdi     # 0xb9678
leaq 0x13917(%rip), %rsi     # 0xb968b
leaq 0x2d4fb(%rip), %rcx     # 0xd3276
movl $0x65c, %edx            # imm = 0x65C
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::TabItemButton(char const*, int)
bool    ImGui::TabItemButton(const char* label, ImGuiTabItemFlags flags)
{
    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = g.CurrentWindow;
    if (window->SkipItems)
        return false;

    ImGuiTabBar* tab_bar = g.CurrentTabBar;
    if (tab_bar == NULL)
    {
        IM_ASSERT_USER_ERROR(tab_bar != NULL, "Needs to be called between BeginTabBar() and EndTabBar()!");
        return false;
    }
    return TabItemEx(tab_bar, label, NULL, flags | ImGuiTabItemFlags_Button | ImGuiTabItemFlags_NoReorder);
}

// Assembly:
leaq 0x55f44(%rip), %rax     # 0xfbcd0
movq (%rax), %rax
movq 0x1ae0(%rax), %rdx
cmpb $0x0, 0x93(%rdx)
je 0xa5da2
xorl %eax, %eax
retq
movl %esi, %ecx
movq %rdi, %rsi
movq 0x2108(%rax), %rdi
testq %rdi, %rdi
je 0xa5dc0
orl $0x200020, %ecx         # imm = 0x200020
xorl %edx, %edx
jmp 0xa5398
pushq %rbp
movq %rsp, %rbp
leaq 0x2ced2(%rip), %rdi     # 0xd2c9d
leaq 0x2b246(%rip), %rsi     # 0xd1018
leaq 0x2cf4d(%rip), %rcx     # 0xd2d26
movl $0x1d89, %edx           # imm = 0x1D89
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::TabBarCalcTabID(ImGuiTabBar*, char const*)
static ImU32   ImGui::TabBarCalcTabID(ImGuiTabBar* tab_bar, const char* label)
{
    if (tab_bar->Flags & ImGuiTabBarFlags_DockNode)
    {
        ImGuiID id = ImHashStr(label);
        KeepAliveID(id);
        return id;
    }
    else
    {
        ImGuiWindow* window = GImGui->CurrentWindow;
        return window->GetID(label);
    }
}

// Assembly:
btl $0x14, %edi
jb 0xa5e01
leaq 0x55ee0(%rip), %rax     # 0xfbcd0
movq (%rax), %rax
movq 0x1ae0(%rax), %rdi
xorl %edx, %edx
jmp 0x4570a
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x42033
movl %eax, %ebx
movl %eax, %edi
callq 0x459e2
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::TabItemCalcSize(char const*, bool)
ImVec2 ImGui::TabItemCalcSize(const char* label, bool has_close_button)
{
    ImGuiContext& g = *GImGui;
    ImVec2 label_size = CalcTextSize(label, NULL, true);
    ImVec2 size = ImVec2(label_size.x + g.Style.FramePadding.x, label_size.y + g.Style.FramePadding.y * 2.0f);
    if (has_close_button)
        size.x += g.Style.FramePadding.x + (g.Style.ItemInnerSpacing.x + g.FontSize); // We use Y intentionally to fit the close button circle.
    else
        size.x += g.Style.FramePadding.x + 1.0f;
    return ImVec2(ImMin(size.x, TabBarCalcMaxTabWidth()), size.y);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
leaq 0x55e98(%rip), %r14     # 0xfbcd0
movq (%r14), %r15
movss 0xf18d(%rip), %xmm0     # 0xb4fd0
xorl %esi, %esi
movl $0x1, %edx
callq 0x44a23
movaps %xmm0, %xmm1
movss 0x1598(%r15), %xmm0
movss 0x159c(%r15), %xmm2
testl %ebx, %ebx
je 0xa5e7c
movss 0x15b0(%r15), %xmm3
addss 0x1980(%r15), %xmm3
jmp 0xa5e84
movss 0xf160(%rip), %xmm3     # 0xb4fe4
addss %xmm0, %xmm3
addss %xmm1, %xmm0
addss %xmm3, %xmm0
shufps $0x55, %xmm1, %xmm1     # xmm1 = xmm1[1,1,1,1]
addss %xmm2, %xmm2
movq (%r14), %rax
movss 0x1980(%rax), %xmm3
mulss 0xfa5d(%rip), %xmm3     # 0xb5908
addss %xmm1, %xmm2
minss %xmm3, %xmm0
unpcklps %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::SetTabItemClosed(char const*)
void    ImGui::SetTabItemClosed(const char* label)
{
    ImGuiContext& g = *GImGui;
    bool is_within_manual_tab_bar = g.CurrentTabBar && !(g.CurrentTabBar->Flags & ImGuiTabBarFlags_DockNode);
    if (is_within_manual_tab_bar)
    {
        ImGuiTabBar* tab_bar = g.CurrentTabBar;
        ImGuiID tab_id = TabBarCalcTabID(tab_bar, label);
        if (ImGuiTabItem* tab = TabBarFindTabByID(tab_bar, tab_id))
            tab->WantClose = true; // Will be processed by next call to TabBarLayout()
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x555c4(%rip), %rax     # 0xfbcd0
movq (%rax), %rax
movq 0x2108(%rax), %rbx
testq %rbx, %rbx
je 0xa675b
movq %rdi, %rsi
movl 0x10(%rbx), %edi
btl $0x14, %edi
jb 0xa675b
callq 0xa5de3
testl %eax, %eax
je 0xa675b
movslq (%rbx), %rdx
testq %rdx, %rdx
jle 0xa675b
movq 0x8(%rbx), %rcx
shlq $0x2, %rdx
leaq (%rdx,%rdx,8), %rsi
xorl %edx, %edx
cmpl %eax, (%rcx,%rdx)
je 0xa6756
addq $0x24, %rdx
cmpq %rdx, %rsi
jne 0xa6746
jmp 0xa675b
movb $0x1, 0x22(%rcx,%rdx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imstb_textedit.h
// Function: ImStb::stb_text_makeundo_replace(ImGuiInputTextState*, ImStb::STB_TexteditState*, int, int, int)
static void stb_text_makeundo_replace(STB_TEXTEDIT_STRING *str, STB_TexteditState *state, int where, int old_length, int new_length)
{
   int i;
   STB_TEXTEDIT_CHARTYPE *p = stb_text_createundo(&state->undostate, where, old_length, new_length);
   if (p) {
      for (i=0; i < old_length; ++i)
         p[i] = STB_TEXTEDIT_GETCHAR(str, where+i);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %r15d
movl %edx, %ebx
movq %rdi, %r14
leaq 0x20(%rsi), %rdi
movl %edx, %esi
movl %ecx, %edx
movl %r8d, %ecx
callq 0xa6e26
testq %rax, %rax
sete %cl
testl %r15d, %r15d
setle %dl
orb %cl, %dl
jne 0xa67c6
movl %ebx, %ecx
movl %r15d, %edx
leaq (%rcx,%rcx), %rsi
xorl %edi, %edi
testl %ebx, %ebx
js 0xa67d1
leal (%rcx,%rdi), %r8d
cmpl %r8d, 0x10(%r14)
jle 0xa67d1
movq 0x18(%r14), %r8
addq %rsi, %r8
movzwl (%r8,%rdi,2), %r8d
movw %r8w, (%rax,%rdi,2)
incq %rdi
cmpq %rdi, %rdx
jne 0xa679f
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x12ea0(%rip), %rdi     # 0xb9678
leaq 0x12eac(%rip), %rsi     # 0xb968b
leaq 0x2c87b(%rip), %rcx     # 0xd3061
movl $0x65d, %edx            # imm = 0x65D
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImStb::STB_TEXTEDIT_DELETECHARS(ImGuiInputTextState*, int, int)
static void STB_TEXTEDIT_DELETECHARS(STB_TEXTEDIT_STRING* obj, int pos, int n)
{
    ImWchar* dst = obj->TextW.Data + pos;

    // We maintain our buffer length in both UTF-8 and wchar formats
    obj->Edited = true;
    obj->CurLenA -= ImTextCountUtf8BytesFromStr(dst, dst + n);
    obj->CurLenW -= n;

    // Offset remaining text (FIXME-OPT: Use memmove)
    const ImWchar* src = obj->TextW.Data + pos + n;
    while (ImWchar c = *src++)
        *dst++ = c;
    *dst = '\0';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movslq %esi, %r13
leaq (,%r13,2), %r15
movq 0x18(%rdi), %rbx
addq %r15, %rbx
movb $0x1, 0xe7e(%rdi)
movslq %edx, %r12
leaq (%rbx,%r12,2), %rsi
movq %rbx, %rdi
callq 0x424b1
subl %eax, 0x8(%r14)
subl %r12d, 0x4(%r14)
movq 0x18(%r14), %rcx
leaq (%rcx,%r13,2), %rax
movzwl (%rax,%r12,2), %eax
testw %ax, %ax
je 0xa6861
leaq (%r15,%r12,2), %rdx
addq %rdx, %rcx
addq $0x2, %rcx
movw %ax, (%rbx)
addq $0x2, %rbx
movzwl (%rcx), %eax
addq $0x2, %rcx
testw %ax, %ax
jne 0xa684e
movw $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imstb_textedit.h
// Function: ImStb::stb_textedit_delete_selection(ImGuiInputTextState*, ImStb::STB_TexteditState*)
static void stb_textedit_delete_selection(STB_TEXTEDIT_STRING *str, STB_TexteditState *state)
{
   stb_textedit_clamp(str, state);
   if (STB_TEXT_HAS_SELECTION(state)) {
      if (state->select_start < state->select_end) {
         stb_textedit_delete(str, state, state->select_start, state->select_end - state->select_start);
         state->select_end = state->cursor = state->select_start;
      } else {
         stb_textedit_delete(str, state, state->select_end, state->select_start - state->select_end);
         state->select_start = state->cursor = state->select_end;
      }
      state->has_preferred_x = 0;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl 0x4(%rdi), %eax
leaq 0x4(%rsi), %r15
movl 0x4(%rsi), %edx
movl 0x8(%rsi), %ecx
leaq 0x8(%rsi), %r14
cmpl %ecx, %edx
je 0xa6ab9
cmpl %eax, %edx
jle 0xa6aaa
movl %eax, (%r15)
movl %eax, %edx
cmpl %eax, %ecx
jle 0xa6ab3
movl %eax, (%r14)
movl %eax, %ecx
cmpl %ecx, %edx
jne 0xa6abb
movl %edx, (%rbx)
movl %edx, %ecx
cmpl %eax, (%rbx)
jle 0xa6ac1
movl %eax, (%rbx)
movl %edx, %eax
subl %ecx, %eax
je 0xa6af5
jge 0xa6ad8
subl %edx, %ecx
movq %rbx, %rsi
callq 0xa6d80
movq %r15, %rax
jmp 0xa6aea
movq %rbx, %rsi
movl %ecx, %edx
movl %eax, %ecx
callq 0xa6d80
movq %r14, %rax
movq %r15, %r14
movl (%rax), %eax
movl %eax, (%r14)
movl %eax, (%rbx)
movb $0x0, 0x16(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imstb_textedit.h
// Function: ImStb::stb_textedit_move_to_last(ImGuiInputTextState*, ImStb::STB_TexteditState*)
static void stb_textedit_move_to_last(STB_TEXTEDIT_STRING *str, STB_TexteditState *state)
{
   if (STB_TEXT_HAS_SELECTION(state)) {
      stb_textedit_sortselection(state);
      stb_textedit_clamp(str, state);
      state->cursor = state->select_end;
      state->select_start = state->select_end;
      state->has_preferred_x = 0;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x4(%rsi), %edx
movl 0x8(%rsi), %r8d
cmpl %r8d, %edx
je 0xa6b46
movl %r8d, %eax
movl %edx, %ecx
jle 0xa6b1f
movl %edx, 0x8(%rsi)
movl %edx, %eax
movl %r8d, %ecx
cmpl %r8d, %edx
je 0xa6b3d
movl 0x4(%rdi), %edx
cmpl %edx, %ecx
cmovgel %edx, %ecx
cmpl %edx, %eax
jle 0xa6b35
movl %edx, 0x8(%rsi)
movl %edx, %eax
cmpl %eax, %ecx
jne 0xa6b3d
movl %ecx, (%rsi)
movl %ecx, %eax
movl %eax, (%rsi)
movl %eax, 0x4(%rsi)
movb $0x0, 0x16(%rsi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imstb_textedit.h
// Function: ImStb::stb_textedit_clamp(ImGuiInputTextState*, ImStb::STB_TexteditState*)
static void stb_textedit_clamp(STB_TEXTEDIT_STRING *str, STB_TexteditState *state)
{
   int n = STB_TEXTEDIT_STRINGLEN(str);
   if (STB_TEXT_HAS_SELECTION(state)) {
      if (state->select_start > n) state->select_start = n;
      if (state->select_end   > n) state->select_end = n;
      // if clamping forced them to be equal, move the cursor to match
      if (state->select_start == state->select_end)
         state->cursor = state->select_start;
   }
   if (state->cursor > n) state->cursor = n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x4(%rsi), %eax
movl 0x8(%rsi), %ecx
cmpl %ecx, %eax
je 0xa6b6e
cmpl %edi, %eax
jle 0xa6b5f
movl %edi, 0x4(%rsi)
movl %edi, %eax
cmpl %edi, %ecx
jle 0xa6b68
movl %edi, 0x8(%rsi)
movl %edi, %ecx
cmpl %ecx, %eax
jne 0xa6b6e
movl %eax, (%rsi)
cmpl %edi, (%rsi)
jle 0xa6b74
movl %edi, (%rsi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imstb_textedit.h
// Function: ImStb::stb_text_createundo(ImStb::StbUndoState*, int, int, int)
static STB_TEXTEDIT_CHARTYPE *stb_text_createundo(StbUndoState *state, int pos, int insert_len, int delete_len)
{
   StbUndoRecord *r = stb_text_create_undo_record(state, insert_len);
   if (r == NULL)
      return NULL;

   r->where = pos;
   r->insert_length = (STB_TEXTEDIT_POSITIONTYPE) insert_len;
   r->delete_length = (STB_TEXTEDIT_POSITIONTYPE) delete_len;

   if (insert_len == 0) {
      r->char_storage = -1;
      return NULL;
   } else {
      r->char_storage = state->undo_char_point;
      state->undo_char_point += insert_len;
      return &state->undo_char[r->char_storage];
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %r15d
movl %edx, %r14d
movl %esi, %r12d
movq %rdi, %rbx
movw $0x63, 0xe00(%rdi)
movl $0x3e7, 0xe08(%rdi)     # imm = 0x3E7
cmpw $0x63, 0xdfe(%rdi)
jne 0xa6e62
movq %rbx, %rdi
callq 0xa6f06
cmpl $0x3e7, %r14d           # imm = 0x3E7
jle 0xa6e80
movw $0x0, 0xdfe(%rbx)
movl $0x0, 0xe04(%rbx)
jmp 0xa6efb
movl 0xe04(%rbx), %eax
leal (%rax,%r14), %ecx
cmpl $0x3e8, %ecx            # imm = 0x3E8
jl 0xa6eac
movq %rbx, %rdi
callq 0xa6f06
movl 0xe04(%rbx), %eax
leal (%rax,%r14), %ecx
cmpl $0x3e7, %ecx            # imm = 0x3E7
jg 0xa6e92
movswq 0xdfe(%rbx), %rdx
leal 0x1(%rdx), %ecx
movw %cx, 0xdfe(%rbx)
shlq $0x4, %rdx
leaq (%rbx,%rdx), %rcx
movl %r12d, (%rbx,%rdx)
movl %r14d, 0x4(%rbx,%rdx)
movl %r15d, 0x8(%rbx,%rdx)
testl %r14d, %r14d
je 0xa6ef4
movl %eax, 0xc(%rcx)
addl %eax, %r14d
movl %r14d, 0xe04(%rbx)
cltq
leaq (%rbx,%rax,2), %rax
addq $0x630, %rax            # imm = 0x630
jmp 0xa6efd
movl $0xffffffff, 0xc(%rcx)  # imm = 0xFFFFFFFF
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imstb_textedit.h
// Function: ImStb::stb_textedit_discard_undo(ImStb::StbUndoState*)
static void stb_textedit_discard_undo(StbUndoState *state)
{
   if (state->undo_point > 0) {
      // if the 0th undo state has characters, clean those up
      if (state->undo_rec[0].char_storage >= 0) {
         int n = state->undo_rec[0].insert_length, i;
         // delete n characters from all other records
         state->undo_char_point -= n;
         STB_TEXTEDIT_memmove(state->undo_char, state->undo_char + n, (size_t) (state->undo_char_point*sizeof(STB_TEXTEDIT_CHARTYPE)));
         for (i=0; i < state->undo_point; ++i)
            if (state->undo_rec[i].char_storage >= 0)
               state->undo_rec[i].char_storage -= n; // @OPTIMIZE: get rid of char_storage and infer it
      }
      --state->undo_point;
      STB_TEXTEDIT_memmove(state->undo_rec, state->undo_rec+1, (size_t) (state->undo_point*sizeof(state->undo_rec[0])));
   }
}

// Assembly:
movzwl 0xdfe(%rdi), %eax
testw %ax, %ax
jle 0xa6fa3
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpl $0x0, 0xc(%rdi)
js 0xa6f82
movslq 0x4(%rbx), %r14
movslq 0xe04(%rbx), %rdx
subq %r14, %rdx
movl %edx, 0xe04(%rbx)
leaq 0x630(%rbx), %rdi
leaq (%rbx,%r14,2), %rsi
addq $0x630, %rsi            # imm = 0x630
addq %rdx, %rdx
callq 0xc130
movswq 0xdfe(%rbx), %rax
testq %rax, %rax
jle 0xa6f82
movq %rax, %rcx
shlq $0x4, %rcx
xorl %edx, %edx
movl 0xc(%rbx,%rdx), %esi
testl %esi, %esi
js 0xa6f79
subl %r14d, %esi
movl %esi, 0xc(%rbx,%rdx)
addq $0x10, %rdx
cmpq %rdx, %rcx
jne 0xa6f6a
decl %eax
movw %ax, 0xdfe(%rbx)
leaq 0x10(%rbx), %rsi
movswq %ax, %rdx
shlq $0x4, %rdx
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0xc130
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: bool ImGui::CheckboxFlagsT<int>(char const*, int*, int)
bool ImGui::CheckboxFlagsT(const char* label, T* flags, T flags_value)
{
    bool all_on = (*flags & flags_value) == flags_value;
    bool any_on = (*flags & flags_value) != 0;
    bool pressed;
    if (!all_on && any_on)
    {
        ImGuiWindow* window = GetCurrentWindow();
        ImGuiItemFlags backup_item_flags = window->DC.ItemFlags;
        window->DC.ItemFlags |= ImGuiItemFlags_MixedValue;
        pressed = Checkbox(label, &all_on);
        window->DC.ItemFlags = backup_item_flags;
    }
    else
    {
        pressed = Checkbox(label, &all_on);

    }
    if (pressed)
    {
        if (all_on)
            *flags |= flags_value;
        else
            *flags &= ~flags_value;
    }
    return pressed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebx
movq %rsi, %r14
movl (%rsi), %eax
andl %edx, %eax
cmpl %edx, %eax
sete -0x21(%rbp)
setne %cl
testl %eax, %eax
setne %al
testb %al, %cl
jne 0xa72c4
leaq -0x21(%rbp), %rsi
callq 0x9286b
jmp 0xa7301
leaq 0x54a05(%rip), %rax     # 0xfbcd0
movq (%rax), %rax
movq 0x1ae0(%rax), %r15
movb $0x1, 0x90(%r15)
movl 0x1cc(%r15), %r12d
movl %r12d, %eax
orl $0x40, %eax
movl %eax, 0x1cc(%r15)
leaq -0x21(%rbp), %rsi
callq 0x9286b
movl %r12d, 0x1cc(%r15)
testb %al, %al
je 0xa7310
cmpb $0x1, -0x21(%rbp)
jne 0xa7314
orl (%r14), %ebx
jmp 0xa7319
xorl %eax, %eax
jmp 0xa731e
notl %ebx
andl (%r14), %ebx
movl %ebx, (%r14)
movb $0x1, %al
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: int ImGui::RoundScalarWithFormatT<int, int>(char const*, int, int)
TYPE ImGui::RoundScalarWithFormatT(const char* format, ImGuiDataType data_type, TYPE v)
{
    const char* fmt_start = ImParseFormatFindStart(format);
    if (fmt_start[0] != '%' || fmt_start[1] == '%') // Don't apply if the value is not visible in the format string
        return v;
    char v_str[64];
    ImFormatString(v_str, IM_ARRAYSIZE(v_str), fmt_start, v);
    const char* p = v_str;
    while (*p == ' ')
        p++;
    if (data_type == ImGuiDataType_Float || data_type == ImGuiDataType_Double)
        v = (TYPE)ImAtof(p);
    else
        ImAtoi(p, (SIGNEDTYPE*)&v);
    return v;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x48, %rsp
movl %edx, %eax
movl %edx, -0xc(%rbp)
movb (%rdi), %cl
testb %cl, %cl
je 0xac607
movl %esi, %ebx
movq %rdi, %rdx
cmpb $0x25, %cl
jne 0xac5af
cmpb $0x25, 0x1(%rdx)
jne 0xac5c6
xorl %esi, %esi
cmpb $0x25, %cl
sete %sil
addq %rsi, %rdx
incq %rdx
movb (%rdx), %cl
testb %cl, %cl
jne 0xac5a4
jmp 0xac607
leaq -0x50(%rbp), %rdi
movl $0x40, %esi
movl %eax, %ecx
xorl %eax, %eax
callq 0x41f22
leaq -0x51(%rbp), %rdi
cmpb $0x20, 0x1(%rdi)
leaq 0x1(%rdi), %rdi
je 0xac5dc
andl $-0x2, %ebx
cmpl $0x8, %ebx
jne 0xac5f9
callq 0xc700
cvttsd2si %xmm0, %eax
jmp 0xac607
leaq -0xc(%rbp), %rbx
movq %rbx, %rsi
callq 0x97c2d
movl (%rbx), %eax
addq $0x48, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/backends/imgui_impl_sdl.cpp
// Function: ImGui_ImplSDL2_Shutdown()
void ImGui_ImplSDL2_Shutdown()
{
    g_Window = NULL;

    // Destroy last known clipboard data
    if (g_ClipboardTextData)
        SDL_free(g_ClipboardTextData);
    g_ClipboardTextData = NULL;

    // Destroy SDL mouse cursors
    for (ImGuiMouseCursor cursor_n = 0; cursor_n < ImGuiMouseCursor_COUNT; cursor_n++)
        SDL_FreeCursor(g_MouseCursors[cursor_n]);
    memset(g_MouseCursors, 0, sizeof(g_MouseCursors));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq $0x0, 0x54534(%rip) # 0x1027d8
movq 0x54535(%rip), %rdi     # 0x1027e0
testq %rdi, %rdi
je 0xae2b5
callq 0xc990
movq $0x0, 0x54520(%rip) # 0x1027e0
xorl %ebx, %ebx
leaq 0x54527(%rip), %r14     # 0x1027f0
movq (%rbx,%r14), %rdi
callq 0xc540
addq $0x8, %rbx
cmpq $0x48, %rbx
jne 0xae2c9
xorps %xmm0, %xmm0
movaps %xmm0, 0x5453a(%rip)    # 0x102820
movaps %xmm0, 0x54523(%rip)    # 0x102810
movaps %xmm0, 0x5450c(%rip)    # 0x102800
movaps %xmm0, 0x544f5(%rip)    # 0x1027f0
movq $0x0, 0x5452a(%rip) # 0x102830
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/backends/imgui_impl_sdl.cpp
// Function: ImGui_ImplSDL2_GetClipboardText(void*)
static const char* ImGui_ImplSDL2_GetClipboardText(void*)
{
    if (g_ClipboardTextData)
        SDL_free(g_ClipboardTextData);
    g_ClipboardTextData = SDL_GetClipboardText();
    return g_ClipboardTextData;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x53e6f(%rip), %rdi     # 0x1027e0
testq %rdi, %rdi
je 0xae97b
callq 0xc990
callq 0xc0e0
movq %rax, 0x53e59(%rip)     # 0x1027e0
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/backends/imgui_impl_opengl3.cpp
// Function: ImGui_ImplOpenGL3_DestroyDeviceObjects()
void    ImGui_ImplOpenGL3_DestroyDeviceObjects()
{
    if (g_VboHandle)        { glDeleteBuffers(1, &g_VboHandle); g_VboHandle = 0; }
    if (g_ElementsHandle)   { glDeleteBuffers(1, &g_ElementsHandle); g_ElementsHandle = 0; }
    if (g_ShaderHandle && g_VertHandle) { glDetachShader(g_ShaderHandle, g_VertHandle); }
    if (g_ShaderHandle && g_FragHandle) { glDetachShader(g_ShaderHandle, g_FragHandle); }
    if (g_VertHandle)       { glDeleteShader(g_VertHandle); g_VertHandle = 0; }
    if (g_FragHandle)       { glDeleteShader(g_FragHandle); g_FragHandle = 0; }
    if (g_ShaderHandle)     { glDeleteProgram(g_ShaderHandle); g_ShaderHandle = 0; }

    ImGui_ImplOpenGL3_DestroyFontsTexture();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $0x0, 0x53def(%rip)     # 0x1028a4
je 0xaead6
movq 0x4844a(%rip), %rax     # 0xf6f08
leaq 0x53ddf(%rip), %rsi     # 0x1028a4
movl $0x1, %edi
callq *(%rax)
movl $0x0, 0x53dce(%rip)     # 0x1028a4
cmpl $0x0, 0x53dcb(%rip)     # 0x1028a8
je 0xaeafe
movq 0x48422(%rip), %rax     # 0xf6f08
leaq 0x53dbb(%rip), %rsi     # 0x1028a8
movl $0x1, %edi
callq *(%rax)
movl $0x0, 0x53daa(%rip)     # 0x1028a8
movl 0x53d7c(%rip), %edi     # 0x102880
testl %edi, %edi
setne %al
movl 0x53d79(%rip), %esi     # 0x102888
testl %esi, %esi
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xaeb2a
movq 0x484a6(%rip), %rax     # 0xf6fc8
callq *(%rax)
movl 0x53d56(%rip), %edi     # 0x102880
testl %edi, %edi
setne %al
movl 0x53d57(%rip), %esi     # 0x10288c
testl %esi, %esi
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xaeb4a
movq 0x48480(%rip), %rax     # 0xf6fc8
callq *(%rax)
movl 0x53d38(%rip), %edi     # 0x102888
testl %edi, %edi
je 0xaeb67
movq 0x48425(%rip), %rax     # 0xf6f80
callq *(%rax)
movl $0x0, 0x53d21(%rip)     # 0x102888
movl 0x53d1f(%rip), %edi     # 0x10288c
testl %edi, %edi
je 0xaeb84
movq 0x48408(%rip), %rax     # 0xf6f80
callq *(%rax)
movl $0x0, 0x53d08(%rip)     # 0x10288c
movl 0x53cf6(%rip), %edi     # 0x102880
testl %edi, %edi
je 0xaeba1
movq 0x4839b(%rip), %rax     # 0xf6f30
callq *(%rax)
movl $0x0, 0x53cdf(%rip)     # 0x102880
popq %rbp
jmp 0xaf82d
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/backends/imgui_impl_opengl3.cpp
// Function: ImGui_ImplOpenGL3_CreateFontsTexture()
bool ImGui_ImplOpenGL3_CreateFontsTexture()
{
    // Build texture atlas
    ImGuiIO& io = ImGui::GetIO();
    unsigned char* pixels;
    int width, height;
    io.Fonts->GetTexDataAsRGBA32(&pixels, &width, &height);   // Load as RGBA 32-bit (75% of the memory is wasted, but default font is so small) because it is more likely to be compatible with user's existing shaders. If your ImTextureId represent a higher-level concept than just a GL texture id, consider calling GetTexDataAsAlpha8() instead to save on GPU memory.

    // Upload texture to graphics system
    GLint last_texture;
    glGetIntegerv(GL_TEXTURE_BINDING_2D, &last_texture);
    glGenTextures(1, &g_FontTexture);
    glBindTexture(GL_TEXTURE_2D, g_FontTexture);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
#ifdef GL_UNPACK_ROW_LENGTH
    glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
#endif
    glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, pixels);

    // Store our identifier
    io.Fonts->TexID = (ImTextureID)(intptr_t)g_FontTexture;

    // Restore state
    glBindTexture(GL_TEXTURE_2D, last_texture);

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
callq 0x4714d
movq %rax, %rbx
movq 0xa0(%rax), %rdi
leaq -0x40(%rbp), %r14
leaq -0x34(%rbp), %r12
leaq -0x30(%rbp), %r13
movq %r14, %rsi
movq %r12, %rdx
movq %r13, %rcx
xorl %r8d, %r8d
callq 0x7b3fe
leaq -0x2c(%rbp), %r15
movl $0x8069, %edi           # imm = 0x8069
movq %r15, %rsi
callq 0xc740
leaq 0x53105(%rip), %rsi     # 0x102884
movl $0x1, %edi
callq 0xc310
movl 0x530f5(%rip), %esi     # 0x102884
movl $0xde1, %edi            # imm = 0xDE1
callq 0xc960
movl $0xde1, %edi            # imm = 0xDE1
movl $0x2801, %esi           # imm = 0x2801
movl $0x2601, %edx           # imm = 0x2601
callq 0xc690
movl $0xde1, %edi            # imm = 0xDE1
movl $0x2800, %esi           # imm = 0x2800
movl $0x2601, %edx           # imm = 0x2601
callq 0xc690
movl $0xcf2, %edi            # imm = 0xCF2
xorl %esi, %esi
callq 0xc820
movl (%r12), %ecx
movl (%r13), %r8d
subq $0x8, %rsp
movl $0xde1, %edi            # imm = 0xDE1
xorl %esi, %esi
movl $0x1908, %edx           # imm = 0x1908
xorl %r9d, %r9d
pushq (%r14)
pushq $0x1401                 # imm = 0x1401
pushq $0x1908                 # imm = 0x1908
callq 0xc8c0
addq $0x20, %rsp
movl 0x53080(%rip), %eax     # 0x102884
movq 0xa0(%rbx), %rcx
movq %rax, 0x8(%rcx)
movl (%r15), %esi
movl $0xde1, %edi            # imm = 0xDE1
callq 0xc960
movb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/backends/imgui_impl_opengl3.cpp
// Function: ImGui_ImplOpenGL3_DestroyFontsTexture()
void ImGui_ImplOpenGL3_DestroyFontsTexture()
{
    if (g_FontTexture)
    {
        ImGuiIO& io = ImGui::GetIO();
        glDeleteTextures(1, &g_FontTexture);
        io.Fonts->TexID = 0;
        g_FontTexture = 0;
    }
}

// Assembly:
cmpl $0x0, 0x53050(%rip)     # 0x102884
je 0xaf874
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
callq 0x4714d
movq %rax, %rbx
leaq 0x53039(%rip), %rsi     # 0x102884
movl $0x1, %edi
callq 0xc8a0
movq 0xa0(%rbx), %rax
movq $0x0, 0x8(%rax)
movl $0x0, 0x53016(%rip)     # 0x102884
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/backends/imgui_impl_opengl3.cpp
// Function: CheckShader(unsigned int, char const*)
static bool CheckShader(GLuint handle, const char* desc)
{
    GLint status = 0, log_length = 0;
    glGetShaderiv(handle, GL_COMPILE_STATUS, &status);
    glGetShaderiv(handle, GL_INFO_LOG_LENGTH, &log_length);
    if ((GLboolean)status == GL_FALSE)
        fprintf(stderr, "ERROR: ImGui_ImplOpenGL3_CreateDeviceObjects: failed to compile %s!\n", desc);
    if (log_length > 1)
    {
        ImVector<char> buf;
        buf.resize((int)(log_length + 1));
        glGetShaderInfoLog(handle, log_length, NULL, (GLchar*)buf.begin());
        fprintf(stderr, "%s\n", buf.begin());
    }
    return (GLboolean)status == GL_TRUE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movl %edi, %ebx
xorl %eax, %eax
leaq -0x44(%rbp), %r15
movl %eax, (%r15)
leaq -0x2c(%rbp), %r12
movl %eax, (%r12)
movq 0x47655(%rip), %r13     # 0xf6ef8
movl $0x8b81, %esi           # imm = 0x8B81
movq %r15, %rdx
callq *(%r13)
movl %ebx, %edi
movl $0x8b84, %esi           # imm = 0x8B84
movq %r12, %rdx
callq *(%r13)
cmpb $0x0, (%r15)
je 0xaf8dc
movl -0x2c(%rbp), %r12d
cmpl $0x2, %r12d
jge 0xaf8f9
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x4762d(%rip), %rax     # 0xf6f10
movq (%rax), %rdi
leaq 0x24389(%rip), %rsi     # 0xd3c76
movq %r14, %rdx
xorl %eax, %eax
callq 0xc1a0
jmp 0xaf8c3
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
incl %r12d
cmpl $0x9, %r12d
movl $0x8, %r15d
cmovael %r12d, %r15d
movq %r15, %rdi
callq 0x41c63
movq %rax, %r14
movl -0x2c(%rbp), %esi
movq %rax, -0x38(%rbp)
movl %r15d, -0x3c(%rbp)
movl %r12d, -0x40(%rbp)
movq 0x4757e(%rip), %rax     # 0xf6eb0
movl %ebx, %edi
xorl %edx, %edx
movq %r14, %rcx
callq *(%rax)
movq 0x475ce(%rip), %rax     # 0xf6f10
movq (%rax), %rdi
leaq 0x15c45(%rip), %rsi     # 0xc5591
movq %r14, %rdx
xorl %eax, %eax
callq 0xc1a0
testq %r14, %r14
je 0xaf8cd
movq %r14, %rdi
callq 0x41d3c
jmp 0xaf8cd
movq %rax, %rdi
callq 0x39dbe
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x5e6f8
movq %rbx, %rdi
callq 0xc560
// File: /workspace/github_cpp_makefile_star2_O3/statgen[P]statgen/lib/samtools-0.1.7a-hybrid/misc/maq2sam.c
// Function: maq_delete_maqmap
void maq_delete_maqmap(maqmap_t *mm)
{
	int i;
	if (mm == 0) return;
	for (i = 0; i < mm->n_ref; ++i)
		free(mm->ref_name[i]);
	free(mm->ref_name);
	free(mm->mapped_reads);
	free(mm);
}

// Assembly:
testq %rdi, %rdi
je 0x1303
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x0, 0x4(%rdi)
jle 0x12e2
xorl %r14d, %r14d
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x1040
incq %r14
movslq 0x4(%rbx), %rax
cmpq %rax, %r14
jl 0x12c9
movq 0x8(%rbx), %rdi
callq 0x1040
movq 0x18(%rbx), %rdi
callq 0x1040
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1040
retq
// File: /workspace/github_cpp_makefile_star2_O3/statgen[P]statgen/lib/samtools-0.1.7a-hybrid/misc/maq2sam.c
// Function: maqmap_read_header
maqmap_t *maqmap_read_header(gzFile fp)
{
	maqmap_t *mm;
	int k, len;
	mm = maq_new_maqmap();
	gzread(fp, &mm->format, sizeof(int));
	if (mm->format != MAQMAP_FORMAT_NEW) {
		if (mm->format > 0) {
			fprintf(stderr, "** Obsolete map format is detected. Please use 'mapass2maq' command to convert the format.\n");
			exit(3);
		}
		assert(mm->format == MAQMAP_FORMAT_NEW);
	}
	gzread(fp, &mm->n_ref, sizeof(int));
	mm->ref_name = (char**)calloc(mm->n_ref, sizeof(char*));
	for (k = 0; k != mm->n_ref; ++k) {
		gzread(fp, &len, sizeof(int));
		mm->ref_name[k] = (char*)malloc(len * sizeof(char));
		gzread(fp, mm->ref_name[k], len);
	}
	/* read number of mapped reads */
	gzread(fp, &mm->n_mapped_reads, sizeof(uint64_t));
	return mm;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x1, %edi
movl $0x20, %esi
callq 0x10a0
movq %rax, %r14
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq %rbx, %rdi
movq %rax, %rsi
movl $0x4, %edx
callq 0x10b0
movl (%r14), %eax
cmpl $-0x1, %eax
jne 0x13e6
leaq 0x4(%r14), %rsi
movq %rbx, %rdi
movl $0x4, %edx
callq 0x10b0
movslq 0x4(%r14), %r15
movl $0x8, %esi
movq %r15, %rdi
callq 0x10a0
movq %rax, 0x8(%r14)
testq %r15, %r15
je 0x13c1
xorl %r13d, %r13d
leaq 0xc(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
movl $0x4, %edx
callq 0x10b0
movl 0xc(%rsp), %eax
movslq %eax, %r12
movq %r12, %rdi
callq 0x10e0
movq 0x8(%r14), %rcx
movq %rax, (%rcx,%r13,8)
movq 0x8(%r14), %rax
movq (%rax,%r13,8), %rsi
movq %rbx, %rdi
movl %r12d, %edx
callq 0x10b0
incq %r13
movl 0x4(%r14), %eax
cmpq %rax, %r13
jne 0x137b
movq %r14, %rsi
addq $0x10, %rsi
movq %rbx, %rdi
movl $0x8, %edx
callq 0x10b0
movq %r14, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
testl %eax, %eax
jle 0x13ef
callq 0x1130
leaq 0xc6a(%rip), %rdi       # 0x2060
leaq 0xc83(%rip), %rsi       # 0x2080
leaq 0xc86(%rip), %rcx       # 0x208a
movl $0x4b, %edx
callq 0x1090