LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::GetContentRegionMax()
ImVec2 ImGui::GetContentRegionMax()
{
    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = g.CurrentWindow;
    ImVec2 mx = window->ContentRegionRect.Max - window->Pos;
    if (window->DC.CurrentColumns || g.CurrentTable)
        mx.x = window->WorkRect.Max.x - window->Pos.x;
    return mx;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0xa597c(%rip), %rcx     # 0xfbcd0
movq 0x1ae0(%rcx), %rax
movss 0x270(%rax), %xmm0
movss 0x274(%rax), %xmm2
movss 0x10(%rax), %xmm1
subss 0x14(%rax), %xmm2
subss %xmm1, %xmm0
unpcklps %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
cmpq $0x0, 0x1b0(%rax)
jne 0x56390
cmpq $0x0, 0x20a8(%rcx)
je 0x563a0
movss 0x240(%rax), %xmm2
subss %xmm1, %xmm2
movss %xmm2, %xmm0            # xmm0 = xmm2[0],xmm0[1,2,3]
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::SetScrollFromPosX(ImGuiWindow*, float, float)
void ImGui::SetScrollFromPosX(ImGuiWindow* window, float local_x, float center_x_ratio)
{
    IM_ASSERT(center_x_ratio >= 0.0f && center_x_ratio <= 1.0f);
    window->ScrollTarget.x = IM_FLOOR(local_x + window->Scroll.x); // Convert local position to scroll offset
    window->ScrollTargetCenterRatio.x = center_x_ratio;
    window->ScrollTargetEdgeSnapDist.x = 0.0f;
}

// Assembly:
xorps %xmm2, %xmm2
ucomiss %xmm2, %xmm1
jb 0x567f9
movss 0x5e80e(%rip), %xmm2    # 0xb4fe4
ucomiss %xmm1, %xmm2
jb 0x567f9
addss 0x5c(%rdi), %xmm0
cvttps2dq %xmm0, %xmm0
cvtdq2ps %xmm0, %xmm0
movss %xmm0, 0x6c(%rdi)
movss %xmm1, 0x74(%rdi)
movl $0x0, 0x7c(%rdi)
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x616b8(%rip), %rdi     # 0xb7ebc
leaq 0x5f95a(%rip), %rsi     # 0xb6165
leaq 0x616db(%rip), %rcx     # 0xb7eed
movl $0x1e45, %edx           # imm = 0x1E45
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::SetScrollFromPosY(ImGuiWindow*, float, float)
void ImGui::SetScrollFromPosY(ImGuiWindow* window, float local_y, float center_y_ratio)
{
    IM_ASSERT(center_y_ratio >= 0.0f && center_y_ratio <= 1.0f);
    local_y -= window->TitleBarHeight() + window->MenuBarHeight(); // FIXME: Would be nice to have a more standardized access to our scrollable/client rect
    window->ScrollTarget.y = IM_FLOOR(local_y + window->Scroll.y); // Convert local position to scroll offset
    window->ScrollTargetCenterRatio.y = center_y_ratio;
    window->ScrollTargetEdgeSnapDist.y = 0.0f;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
xorps %xmm2, %xmm2
ucomiss %xmm2, %xmm1
jb 0x568d8
movss 0x5e7ab(%rip), %xmm2    # 0xb4fe4
ucomiss %xmm1, %xmm2
jb 0x568d8
movq %rdi, %rbx
movaps %xmm0, -0x20(%rbp)
movss %xmm1, -0x10(%rbp)
xorps %xmm1, %xmm1
testb $0x1, 0xc(%rdi)
jne 0x56892
movq 0xa5472(%rip), %rax     # 0xfbcd0
movss 0x1984(%rax), %xmm0
mulss 0x2b0(%rbx), %xmm0
movq 0x388(%rbx), %rcx
testq %rcx, %rcx
je 0x56882
mulss 0x2b0(%rcx), %xmm0
movss 0x159c(%rax), %xmm1
addss %xmm1, %xmm1
addss %xmm0, %xmm1
movss %xmm1, -0xc(%rbp)
movq %rbx, %rdi
callq 0x5e2b4
addss -0xc(%rbp), %xmm0
movaps -0x20(%rbp), %xmm1
subss %xmm0, %xmm1
addss 0x60(%rbx), %xmm1
cvttps2dq %xmm1, %xmm0
cvtdq2ps %xmm0, %xmm0
movss %xmm0, 0x70(%rbx)
movss -0x10(%rbp), %xmm0
movss %xmm0, 0x78(%rbx)
movl $0x0, 0x80(%rbx)
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
leaq 0x61649(%rip), %rdi     # 0xb7f28
leaq 0x5f87f(%rip), %rsi     # 0xb6165
leaq 0x6166c(%rip), %rcx     # 0xb7f59
movl $0x1e4d, %edx           # imm = 0x1E4D
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::SetScrollHereX(float)
void ImGui::SetScrollHereX(float center_x_ratio)
{
    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = g.CurrentWindow;
    float spacing_x = g.Style.ItemSpacing.x;
    float target_pos_x = ImLerp(window->DC.LastItemRect.Min.x - spacing_x, window->DC.LastItemRect.Max.x + spacing_x, center_x_ratio);
    SetScrollFromPosX(window, target_pos_x - window->Pos.x, center_x_ratio); // Convert from absolute to local pos

    // Tweak: snap on edges when aiming at an item very close to the edge
    window->ScrollTargetEdgeSnapDist.x = ImMax(0.0f, window->WindowPadding.x - spacing_x);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movaps %xmm0, %xmm1
movq 0xa52c7(%rip), %rax     # 0xfbcd0
movq 0x1ae0(%rax), %rbx
movss 0x15a8(%rax), %xmm3
movss %xmm3, -0xc(%rbp)
movss 0x12c(%rbx), %xmm2
subss %xmm3, %xmm2
movss 0x134(%rbx), %xmm0
addss %xmm3, %xmm0
subss %xmm2, %xmm0
mulss %xmm1, %xmm0
addss %xmm2, %xmm0
subss 0x10(%rbx), %xmm0
movq %rbx, %rdi
callq 0x567c6
movss 0x40(%rbx), %xmm0
subss -0xc(%rbp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm0, %xmm2
cmpless %xmm1, %xmm2
andnps %xmm0, %xmm2
movss %xmm2, 0x7c(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::IsPopupOpen(char const*, int)
bool ImGui::IsPopupOpen(const char* str_id, ImGuiPopupFlags popup_flags)
{
    ImGuiContext& g = *GImGui;
    ImGuiID id = (popup_flags & ImGuiPopupFlags_AnyPopupId) ? 0 : g.CurrentWindow->GetID(str_id);
    if ((popup_flags & ImGuiPopupFlags_AnyPopupLevel) && id != 0)
        IM_ASSERT(0 && "Cannot use IsPopupOpen() with a string id and ImGuiPopupFlags_AnyPopupLevel."); // But non-string version is legal and used internally
    return IsPopupOpen(id, popup_flags);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %rsi
xorl %edi, %edi
testb %bl, %bl
js 0x56c6a
movq 0xa5086(%rip), %rax     # 0xfbcd0
movq 0x1ae0(%rax), %rdi
xorl %edx, %edx
callq 0x4570a
movl %eax, %edi
btl $0x8, %ebx
setae %al
testl %edi, %edi
sete %cl
orb %al, %cl
je 0x56c77
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x47824
leaq 0x613b1(%rip), %rdi     # 0xb802f
leaq 0x5f4e0(%rip), %rsi     # 0xb6165
leaq 0x613f7(%rip), %rcx     # 0xb8083
movl $0x1ee1, %edx           # imm = 0x1EE1
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::NavCalcPreferredRefPos()
static ImVec2 ImGui::NavCalcPreferredRefPos()
{
    ImGuiContext& g = *GImGui;
    if (g.NavDisableHighlight || !g.NavDisableMouseHover || !g.NavWindow)
    {
        // Mouse (we need a fallback in case the mouse becomes invalid after being used)
        if (IsMousePosValid(&g.IO.MousePos))
            return g.IO.MousePos;
        return g.LastValidMousePos;
    }
    else
    {
        // When navigation is active and mouse is disabled, decide on an arbitrary position around the bottom left of the currently navigated item.
        const ImRect& rect_rel = g.NavWindow->NavRectRel[g.NavLayer];
        ImVec2 pos = g.NavWindow->Pos + ImVec2(rect_rel.Min.x + ImMin(g.Style.FramePadding.x * 4, rect_rel.GetWidth()), rect_rel.Max.y - ImMin(g.Style.FramePadding.y, rect_rel.GetHeight()));
        ImRect visible_rect = GetViewportRect();
        return ImFloor(ImClamp(pos, visible_rect.Min, visible_rect.Max));   // ImFloor() is important because non-integer mouse position application in backend might be lossy and result in undesirable non-zero delta.
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0xa4d99(%rip), %r14     # 0xfbcd0
cmpb $0x0, 0x1ce6(%r14)
jne 0x57007
cmpb $0x1, 0x1ce7(%r14)
jne 0x57007
movq 0x1c90(%r14), %rax
testq %rax, %rax
je 0x57007
movl 0x1cdc(%r14), %ecx
shlq $0x4, %rcx
movss 0x1598(%r14), %xmm0
mulss 0x5e8e5(%rip), %xmm0    # 0xb5864
movss 0x3b8(%rax,%rcx), %xmm1
movss 0x3c0(%rax,%rcx), %xmm2
subss %xmm1, %xmm2
minss %xmm2, %xmm0
addss %xmm1, %xmm0
movss 0x3c4(%rax,%rcx), %xmm1
movss 0x159c(%r14), %xmm2
movaps %xmm1, %xmm3
subss 0x3bc(%rax,%rcx), %xmm3
minss %xmm3, %xmm2
subss %xmm2, %xmm1
addss 0x10(%rax), %xmm0
addss 0x14(%rax), %xmm1
movss 0x10(%r14), %xmm2
movss 0x14(%r14), %xmm3
minss %xmm1, %xmm3
xorps %xmm4, %xmm4
cmpltss %xmm4, %xmm1
andnps %xmm3, %xmm1
minss %xmm0, %xmm2
cmpltss %xmm4, %xmm0
andnps %xmm2, %xmm0
cvttps2dq %xmm0, %xmm0
cvtdq2ps %xmm0, %xmm0
cvttps2dq %xmm1, %xmm1
cvtdq2ps %xmm1, %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
jmp 0x57029
leaq 0x128(%r14), %rbx
movq %rbx, %rdi
callq 0x4750f
testb %al, %al
je 0x57020
movsd (%rbx), %xmm0
jmp 0x57029
movsd 0x2158(%r14), %xmm0
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::ClosePopupToLevel(int, bool)
void ImGui::ClosePopupToLevel(int remaining, bool restore_focus_to_window_under_popup)
{
    ImGuiContext& g = *GImGui;
    IMGUI_DEBUG_LOG_POPUP("ClosePopupToLevel(%d), restore_focus_to_window_under_popup=%d\n", remaining, restore_focus_to_window_under_popup);
    IM_ASSERT(remaining >= 0 && remaining < g.OpenPopupStack.Size);

    // Trim open popup stack
    ImGuiWindow* focus_window = g.OpenPopupStack[remaining].SourceWindow;
    ImGuiWindow* popup_window = g.OpenPopupStack[remaining].Window;
    g.OpenPopupStack.resize(remaining);

    if (restore_focus_to_window_under_popup)
    {
        if (focus_window && !focus_window->WasActive && popup_window)
        {
            // Fallback
            FocusTopMostWindowUnderOne(popup_window, NULL);
        }
        else
        {
            if (g.NavLayer == ImGuiNavLayer_Main && focus_window)
                focus_window = NavRestoreLastChildNavWindow(focus_window);
            FocusWindow(focus_window);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
testl %edi, %edi
js 0x571ba
movl %edi, %r15d
movq 0xa4c7f(%rip), %r14     # 0xfbcd0
cmpl %edi, 0x1c70(%r14)
jle 0x571ba
movl %esi, %ebx
movq 0x1c78(%r14), %rax
movl %r15d, %ecx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movq 0x8(%rax,%rcx), %rdi
movq 0x10(%rax,%rcx), %rcx
movl 0x1c74(%r14), %eax
cmpl %r15d, %eax
jge 0x5713d
testl %eax, %eax
movq %rcx, -0x38(%rbp)
movq %rdi, -0x30(%rbp)
je 0x570aa
movl %eax, %r13d
shrl $0x1f, %r13d
addl %eax, %r13d
sarl %r13d
addl %eax, %r13d
jmp 0x570b0
movl $0x8, %r13d
cmpl %r15d, %r13d
cmovlel %r15d, %r13d
movq %r13, %rax
shlq $0x4, %rax
leaq (%rax,%rax,2), %rdi
incl 0x3b4(%r14)
movq 0xa4c10(%rip), %rsi     # 0xfbce0
callq *0xa043a(%rip)          # 0xf7510
movq %rax, %r12
movq 0x1c78(%r14), %rsi
testq %rsi, %rsi
je 0x57127
movslq 0x1c70(%r14), %rax
shlq $0x4, %rax
leaq (%rax,%rax,2), %rdx
movq %r12, %rdi
callq 0xc080
movq 0x1c78(%r14), %rdi
testq %rdi, %rdi
je 0x5711a
movq 0xa4bc1(%rip), %rax     # 0xfbcd0
testq %rax, %rax
je 0x5711a
decl 0x3b4(%rax)
movq 0xa4bbf(%rip), %rsi     # 0xfbce0
callq *0xa03f1(%rip)          # 0xf7518
movq %r12, 0x1c78(%r14)
movl %r13d, 0x1c74(%r14)
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %rdi
movl %r15d, 0x1c70(%r14)
testb %bl, %bl
je 0x5716a
testq %rcx, %rcx
je 0x57179
testq %rdi, %rdi
sete %al
orb 0x8f(%rcx), %al
je 0x5718e
cmpl $0x0, 0x1cdc(%r14)
je 0x571a3
movq %rcx, %rdi
jmp 0x5717b
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %edi, %edi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4726c
xorl %esi, %esi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4b620
movq 0x3a8(%rcx), %rdi
testq %rdi, %rdi
je 0x57165
cmpb $0x0, 0x8f(%rdi)
je 0x57165
jmp 0x5717b
leaq 0x60f64(%rip), %rdi     # 0xb8125
leaq 0x5ef9d(%rip), %rsi     # 0xb6165
leaq 0x60f8a(%rip), %rcx     # 0xb8159
movl $0x1f5a, %edx           # imm = 0x1F5A
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::CloseCurrentPopup()
void ImGui::CloseCurrentPopup()
{
    ImGuiContext& g = *GImGui;
    int popup_idx = g.BeginPopupStack.Size - 1;
    if (popup_idx < 0 || popup_idx >= g.OpenPopupStack.Size || g.BeginPopupStack[popup_idx].PopupId != g.OpenPopupStack[popup_idx].PopupId)
        return;

    // Closing a menu closes its top-most parent popup (unless a modal)
    while (popup_idx > 0)
    {
        ImGuiWindow* popup_window = g.OpenPopupStack[popup_idx].Window;
        ImGuiWindow* parent_popup_window = g.OpenPopupStack[popup_idx - 1].Window;
        bool close_parent = false;
        if (popup_window && (popup_window->Flags & ImGuiWindowFlags_ChildMenu))
            if (parent_popup_window == NULL || !(parent_popup_window->Flags & ImGuiWindowFlags_Modal))
                close_parent = true;
        if (!close_parent)
            break;
        popup_idx--;
    }
    IMGUI_DEBUG_LOG_POPUP("CloseCurrentPopup %d -> %d\n", g.BeginPopupStack.Size - 1, popup_idx);
    ClosePopupToLevel(popup_idx, true);

    // A common pattern is to close a popup when selecting a menu item/selectable that will open another window.
    // To improve this usage pattern, we avoid nav highlight for a single frame in the parent window.
    // Similarly, we could avoid mouse hover highlight in this window but it is less visually problematic.
    if (ImGuiWindow* window = g.NavWindow)
        window->DC.NavHideHighlightOneFrame = true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0xa4aea(%rip), %rbx     # 0xfbcd0
movl 0x1c80(%rbx), %edx
testl %edx, %edx
jle 0x57291
cmpl 0x1c70(%rbx), %edx
jg 0x57291
leal -0x1(%rdx), %eax
movq 0x1c78(%rbx), %rsi
movq 0x1c88(%rbx), %rdi
movl %eax, %ecx
movq %rcx, %r8
shlq $0x4, %r8
leaq (%r8,%r8,2), %r8
movl (%rdi,%r8), %edi
cmpl (%rsi,%r8), %edi
jne 0x57291
xorl %edi, %edi
testl %eax, %eax
je 0x57274
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movq 0x8(%rsi,%rcx), %rcx
addl $-0x2, %edx
leaq (%rdx,%rdx,2), %rdx
shlq $0x4, %rdx
addq %rsi, %rdx
addq $0x8, %rdx
testq %rcx, %rcx
je 0x57272
testb $0x10, 0xf(%rcx)
je 0x57272
movq (%rdx), %rcx
testq %rcx, %rcx
je 0x57266
testb $0x8, 0xf(%rcx)
jne 0x57272
decl %eax
addq $-0x30, %rdx
testl %eax, %eax
jne 0x5724d
jmp 0x57274
movl %eax, %edi
movl $0x1, %esi
callq 0x5702e
movq 0x1c90(%rbx), %rax
testq %rax, %rax
je 0x57291
movb $0x1, 0x15c(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::BeginPopupEx(unsigned int, int)
bool ImGui::BeginPopupEx(ImGuiID id, ImGuiWindowFlags flags)
{
    ImGuiContext& g = *GImGui;
    if (!IsPopupOpen(id, ImGuiPopupFlags_None))
    {
        g.NextWindowData.ClearFlags(); // We behave like Begin() and need to consume those values
        return false;
    }

    char name[20];
    if (flags & ImGuiWindowFlags_ChildMenu)
        ImFormatString(name, IM_ARRAYSIZE(name), "##Menu_%02d", g.BeginPopupStack.Size); // Recycle windows based on depth
    else
        ImFormatString(name, IM_ARRAYSIZE(name), "##Popup_%08x", id); // Not recycling, so we can close/open during the same frame

    flags |= ImGuiWindowFlags_Popup;
    bool is_open = Begin(name, NULL, flags);
    if (!is_open) // NB: Begin can return false when the popup is completely clipped (e.g. zero size display)
        EndPopup();

    return is_open;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebx
movl %edi, %r14d
movq 0xa4a1f(%rip), %r15     # 0xfbcd0
xorl %esi, %esi
callq 0x47824
testb %al, %al
je 0x572d7
btl $0x1c, %ebx
jb 0x572e6
leaq 0x60ec5(%rip), %rdx     # 0xb818e
leaq -0x30(%rbp), %rdi
movl $0x14, %esi
movl %r14d, %ecx
jmp 0x572fd
movl $0x0, 0x1b88(%r15)
xorl %ebx, %ebx
jmp 0x57322
movl 0x1c80(%r15), %ecx
leaq 0x60e8e(%rip), %rdx     # 0xb8182
leaq -0x30(%rbp), %rdi
movl $0x14, %esi
xorl %eax, %eax
callq 0x41f22
orl $0x4000000, %ebx        # imm = 0x4000000
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movl %ebx, %edx
callq 0x4b741
movl %eax, %ebx
testb %al, %al
jne 0x57322
callq 0x5732f
movl %ebx, %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.cpp
// Function: ImGui::EndPopup()
void ImGui::EndPopup()
{
    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = g.CurrentWindow;
    IM_ASSERT(window->Flags & ImGuiWindowFlags_Popup);  // Mismatched BeginPopup()/EndPopup() calls
    IM_ASSERT(g.BeginPopupStack.Size > 0);

    // Make all menus and popups wrap around for now, may need to expose that policy.
    if (g.NavWindow == window)
        NavMoveRequestTryWrapping(window, ImGuiNavMoveFlags_LoopY);

    // Child-popups don't need to be laid out
    IM_ASSERT(g.WithinEndChild == false);
    if (window->Flags & ImGuiWindowFlags_ChildWindow)
        g.WithinEndChild = true;
    End();
    g.WithinEndChild = false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0xa4994(%rip), %rbx     # 0xfbcd0
movq 0x1ae0(%rbx), %rcx
movl 0xc(%rcx), %eax
btl $0x1a, %eax
jae 0x57398
cmpl $0x0, 0x1c80(%rbx)
jle 0x573b7
cmpq %rcx, 0x1c90(%rbx)
jne 0x5736f
movq %rcx, 0x1db0(%rbx)
movl $0x2, 0x1db8(%rbx)
cmpb $0x0, 0x1a76(%rbx)
jne 0x573d6
btl $0x18, %eax
jae 0x57385
movb $0x1, 0x1a76(%rbx)
callq 0x50af3
movb $0x0, 0x1a76(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x60dfc(%rip), %rdi     # 0xb819b
leaq 0x5edbf(%rip), %rsi     # 0xb6165
leaq 0x60e15(%rip), %rcx     # 0xb81c2
movl $0x1fd7, %edx           # imm = 0x1FD7
callq 0xc140
leaq 0x60e1b(%rip), %rdi     # 0xb81d9
leaq 0x5eda0(%rip), %rsi     # 0xb6165
leaq 0x60df6(%rip), %rcx     # 0xb81c2
movl $0x1fd8, %edx           # imm = 0x1FD8
callq 0xc140
leaq 0x5fbf1(%rip), %rdi     # 0xb6fce
leaq 0x5ed81(%rip), %rsi     # 0xb6165
leaq 0x60dd7(%rip), %rcx     # 0xb81c2
movl $0x1fdf, %edx           # imm = 0x1FDF
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::BeginPopup(char const*, int)
bool ImGui::BeginPopup(const char* str_id, ImGuiWindowFlags flags)
{
    ImGuiContext& g = *GImGui;
    if (g.OpenPopupStack.Size <= g.BeginPopupStack.Size) // Early out for performance
    {
        g.NextWindowData.ClearFlags(); // We behave like Begin() and need to consume those values
        return false;
    }
    flags |= ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoSavedSettings;
    return BeginPopupEx(g.CurrentWindow->GetID(str_id), flags);
}

// Assembly:
movq 0xa48d4(%rip), %rax     # 0xfbcd0
movl 0x1c70(%rax), %ecx
cmpl 0x1c80(%rax), %ecx
jle 0x57438
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %rsi
orl $0x141, %ebx            # imm = 0x141
movq 0x1ae0(%rax), %rdi
xorl %edx, %edx
callq 0x4570a
movl %eax, %edi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x57298
movl $0x0, 0x1b88(%rax)
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::BeginPopupModal(char const*, bool*, int)
bool ImGui::BeginPopupModal(const char* name, bool* p_open, ImGuiWindowFlags flags)
{
    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = g.CurrentWindow;
    const ImGuiID id = window->GetID(name);
    if (!IsPopupOpen(id, ImGuiPopupFlags_None))
    {
        g.NextWindowData.ClearFlags(); // We behave like Begin() and need to consume those values
        return false;
    }

    // Center modal windows by default for increased visibility
    // (this won't really last as settings will kick in, and is mostly for backward compatibility. user may do the same themselves)
    // FIXME: Should test for (PosCond & window->SetWindowPosAllowFlags) with the upcoming window.
    if ((g.NextWindowData.Flags & ImGuiNextWindowDataFlags_HasPos) == 0)
        SetNextWindowPos(g.IO.DisplaySize * 0.5f, ImGuiCond_FirstUseEver, ImVec2(0.5f, 0.5f));

    flags |= ImGuiWindowFlags_Popup | ImGuiWindowFlags_Modal | ImGuiWindowFlags_NoCollapse;
    const bool is_open = Begin(name, p_open, flags);
    if (!is_open || (p_open && !*p_open)) // NB: is_open can be 'false' when the popup is completely clipped (e.g. zero size display)
    {
        EndPopup();
        if (is_open)
            ClosePopupToLevel(g.BeginPopupStack.Size, true);
        return false;
    }
    return is_open;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %r15
movq 0xa4870(%rip), %r12     # 0xfbcd0
movq 0x1ae0(%r12), %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x4570a
movl %eax, %edi
xorl %esi, %esi
callq 0x47824
testb %al, %al
je 0x57519
testb $0x1, 0x1b88(%r12)
jne 0x574db
movss 0x5db6e(%rip), %xmm0    # 0xb5004
movss 0x10(%r12), %xmm1
mulss %xmm0, %xmm1
mulss 0x14(%r12), %xmm0
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movq 0xa481e(%rip), %rax     # 0xfbcd0
orl $0x1, 0x1b88(%rax)
movlps %xmm1, 0x1b98(%rax)
movabsq $0x3f0000003f000000, %rcx # imm = 0x3F0000003F000000
movq %rcx, 0x1ba0(%rax)
movl $0x4, 0x1b8c(%rax)
orl $0xc000020, %r14d       # imm = 0xC000020
movq %r15, %rdi
movq %rbx, %rsi
movl %r14d, %edx
callq 0x4b741
testb %al, %al
je 0x57527
movb $0x1, %al
testq %rbx, %rbx
je 0x5752e
cmpb $0x0, (%rbx)
jne 0x5752e
callq 0x5732f
movl 0x1c80(%r12), %edi
movl $0x1, %esi
callq 0x5702e
jmp 0x5752c
movl $0x0, 0x1b88(%r12)
jmp 0x5752c
callq 0x5732f
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/imgui.cpp
// Function: ImGui::OpenPopupOnItemClick(char const*, int)
void ImGui::OpenPopupOnItemClick(const char* str_id, ImGuiPopupFlags popup_flags)
{
    ImGuiWindow* window = GImGui->CurrentWindow;
    int mouse_button = (popup_flags & ImGuiPopupFlags_MouseButtonMask_);
    if (IsMouseReleased(mouse_button) && IsItemHovered(ImGuiHoveredFlags_AllowWhenBlockedByPopup))
    {
        ImGuiID id = str_id ? window->GetID(str_id) : window->DC.LastItemId; // If user hasn't passed an ID, we can use the LastItemID. Using LastItemID as a Popup ID won't conflict!
        IM_ASSERT(id != 0);                                                  // You cannot pass a NULL str_id if the last item has no identifier (e.g. a Text() item)
        OpenPopupEx(id, popup_flags);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %eax
andl $0x1f, %eax
cmpl $0x5, %eax
jae 0x575cd
movq 0xa4764(%rip), %rcx     # 0xfbcd0
cmpb $0x1, 0x42a(%rcx,%rax)
jne 0x575a6
movl %esi, %ebx
movq %rdi, %r14
movq 0x1ae0(%rcx), %r15
movl $0x8, %edi
callq 0x461ed
testb %al, %al
je 0x575a6
testq %r14, %r14
je 0x575b1
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x4570a
movl %eax, %edi
jmp 0x575b8
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl 0x124(%r15), %edi
testl %edi, %edi
je 0x575ec
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x56cc5
leaq 0x5f772(%rip), %rdi     # 0xb6d46
leaq 0x5eb8a(%rip), %rsi     # 0xb6165
leaq 0x5f815(%rip), %rcx     # 0xb6df7
movl $0x11d7, %edx           # imm = 0x11D7
callq 0xc140
leaq 0x60e82(%rip), %rdi     # 0xb8475
leaq 0x5eb6b(%rip), %rsi     # 0xb6165
leaq 0x60bf3(%rip), %rcx     # 0xb81f4
movl $0x1fef, %edx           # imm = 0x1FEF
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::BeginPopupContextItem(char const*, int)
bool ImGui::BeginPopupContextItem(const char* str_id, ImGuiPopupFlags popup_flags)
{
    ImGuiWindow* window = GImGui->CurrentWindow;
    if (window->SkipItems)
        return false;
    ImGuiID id = str_id ? window->GetID(str_id) : window->DC.LastItemId; // If user hasn't passed an ID, we can use the LastItemID. Using LastItemID as a Popup ID won't conflict!
    IM_ASSERT(id != 0);                                                  // You cannot pass a NULL str_id if the last item has no identifier (e.g. a Text() item)
    int mouse_button = (popup_flags & ImGuiPopupFlags_MouseButtonMask_);
    if (IsMouseReleased(mouse_button) && IsItemHovered(ImGuiHoveredFlags_AllowWhenBlockedByPopup))
        OpenPopupEx(id, popup_flags);
    return BeginPopupEx(id, ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoSavedSettings);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %rsi
movq 0xa46b2(%rip), %rax     # 0xfbcd0
movq 0x1ae0(%rax), %rdi
cmpb $0x0, 0x93(%rdi)
je 0x57635
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
testq %rsi, %rsi
je 0x57646
xorl %edx, %edx
callq 0x4570a
movl %eax, %r14d
jmp 0x5764d
movl 0x124(%rdi), %r14d
testl %r14d, %r14d
je 0x57696
movl %ebx, %eax
andl $0x1f, %eax
cmpl $0x5, %eax
jae 0x576b5
movq 0xa466d(%rip), %rcx     # 0xfbcd0
cmpb $0x1, 0x42a(%rcx,%rax)
jne 0x57685
movl $0x8, %edi
callq 0x461ed
testb %al, %al
je 0x57685
movl %r14d, %edi
movl %ebx, %esi
callq 0x56cc5
movl %r14d, %edi
movl $0x141, %esi            # imm = 0x141
popq %rbx
popq %r14
popq %rbp
jmp 0x57298
leaq 0x60dd8(%rip), %rdi     # 0xb8475
leaq 0x5eac1(%rip), %rsi     # 0xb6165
leaq 0x60b89(%rip), %rcx     # 0xb8234
movl $0x1fff, %edx           # imm = 0x1FFF
callq 0xc140
leaq 0x5f68a(%rip), %rdi     # 0xb6d46
leaq 0x5eaa2(%rip), %rsi     # 0xb6165
leaq 0x5f72d(%rip), %rcx     # 0xb6df7
movl $0x11d7, %edx           # imm = 0x11D7
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::BeginPopupContextWindow(char const*, int)
bool ImGui::BeginPopupContextWindow(const char* str_id, ImGuiPopupFlags popup_flags)
{
    ImGuiWindow* window = GImGui->CurrentWindow;
    if (!str_id)
        str_id = "window_context";
    ImGuiID id = window->GetID(str_id);
    int mouse_button = (popup_flags & ImGuiPopupFlags_MouseButtonMask_);
    if (IsMouseReleased(mouse_button) && IsWindowHovered(ImGuiHoveredFlags_AllowWhenBlockedByPopup))
        if (!(popup_flags & ImGuiPopupFlags_NoOpenOverItems) || !IsAnyItemHovered())
            OpenPopupEx(id, popup_flags);
    return BeginPopupEx(id, ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoSavedSettings);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movq 0xa45ec(%rip), %rax     # 0xfbcd0
movq 0x1ae0(%rax), %rax
testq %rdi, %rdi
leaq 0x60b80(%rip), %rsi     # 0xb8275
cmovneq %rdi, %rsi
movq %rax, %rdi
xorl %edx, %edx
callq 0x4570a
movl %eax, %r14d
movl %ebx, %eax
andl $0x1f, %eax
cmpl $0x5, %eax
jae 0x5776a
movq 0xa45b9(%rip), %rcx     # 0xfbcd0
cmpb $0x1, 0x42a(%rcx,%rax)
jne 0x57759
movl $0x8, %edi
callq 0x540e4
testb %al, %al
je 0x57759
testb $0x40, %bl
jne 0x57740
movl %r14d, %edi
movl %ebx, %esi
callq 0x56cc5
jmp 0x57759
movq 0xa4589(%rip), %rax     # 0xfbcd0
cmpl $0x0, 0x1b1c(%rax)
jne 0x57759
cmpl $0x0, 0x1b20(%rax)
je 0x57734
movl %r14d, %edi
movl $0x141, %esi            # imm = 0x141
popq %rbx
popq %r14
popq %rbp
jmp 0x57298
leaq 0x5f5d5(%rip), %rdi     # 0xb6d46
leaq 0x5e9ed(%rip), %rsi     # 0xb6165
leaq 0x5f678(%rip), %rcx     # 0xb6df7
movl $0x11d7, %edx           # imm = 0x11D7
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::BeginPopupContextVoid(char const*, int)
bool ImGui::BeginPopupContextVoid(const char* str_id, ImGuiPopupFlags popup_flags)
{
    ImGuiWindow* window = GImGui->CurrentWindow;
    if (!str_id)
        str_id = "void_context";
    ImGuiID id = window->GetID(str_id);
    int mouse_button = (popup_flags & ImGuiPopupFlags_MouseButtonMask_);
    if (IsMouseReleased(mouse_button) && !IsWindowHovered(ImGuiHoveredFlags_AnyWindow))
        if (GetTopMostPopupModal() == NULL)
            OpenPopupEx(id, popup_flags);
    return BeginPopupEx(id, ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoSavedSettings);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movq 0xa4537(%rip), %rax     # 0xfbcd0
movq 0x1ae0(%rax), %rax
testq %rdi, %rdi
leaq 0x60ada(%rip), %rsi     # 0xb8284
cmovneq %rdi, %rsi
movq %rax, %rdi
xorl %edx, %edx
callq 0x4570a
movl %eax, %r14d
movl %ebx, %eax
andl $0x1f, %eax
cmpl $0x5, %eax
jae 0x57809
movq 0xa4504(%rip), %rcx     # 0xfbcd0
cmpb $0x1, 0x42a(%rcx,%rax)
jne 0x577f8
movl $0x4, %edi
callq 0x540e4
testb %al, %al
jne 0x577f8
callq 0x478f9
testq %rax, %rax
jne 0x577f8
movl %r14d, %edi
movl %ebx, %esi
callq 0x56cc5
movl %r14d, %edi
movl $0x141, %esi            # imm = 0x141
popq %rbx
popq %r14
popq %rbp
jmp 0x57298
leaq 0x5f536(%rip), %rdi     # 0xb6d46
leaq 0x5e94e(%rip), %rsi     # 0xb6165
leaq 0x5f5d9(%rip), %rcx     # 0xb6df7
movl $0x11d7, %edx           # imm = 0x11D7
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::GetWindowAllowedExtentRect(ImGuiWindow*)
ImRect ImGui::GetWindowAllowedExtentRect(ImGuiWindow* window)
{
    IM_UNUSED(window);
    ImVec2 padding = GImGui->Style.DisplaySafeAreaPadding;
    ImRect r_screen = GetViewportRect();
    r_screen.Expand(ImVec2((r_screen.GetWidth() > padding.x * 2) ? -padding.x : 0.0f, (r_screen.GetHeight() > padding.y * 2) ? -padding.y : 0.0f));
    return r_screen;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0xa4186(%rip), %rax     # 0xfbcd0
movss 0x160c(%rax), %xmm0
movss 0x1610(%rax), %xmm2
movss 0x10(%rax), %xmm3
movss 0x14(%rax), %xmm4
movaps %xmm0, %xmm1
addss %xmm0, %xmm1
movaps 0x5d44e(%rip), %xmm5    # 0xb4fc0
xorps %xmm5, %xmm0
cmpltss %xmm3, %xmm1
andps %xmm0, %xmm1
movaps %xmm2, %xmm6
addss %xmm2, %xmm6
xorps %xmm5, %xmm2
cmpltss %xmm4, %xmm6
andps %xmm2, %xmm6
xorps %xmm2, %xmm2
xorps %xmm0, %xmm0
subss %xmm1, %xmm0
subss %xmm6, %xmm2
unpcklps %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
addss %xmm3, %xmm1
addss %xmm4, %xmm6
unpcklps %xmm6, %xmm1            # xmm1 = xmm1[0],xmm6[0],xmm1[1],xmm6[1]
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::SetNavID(unsigned int, int, unsigned int)
void ImGui::SetNavID(ImGuiID id, int nav_layer, ImGuiID focus_scope_id)
{
    ImGuiContext& g = *GImGui;
    IM_ASSERT(g.NavWindow);
    IM_ASSERT(nav_layer == 0 || nav_layer == 1);
    g.NavId = id;
    g.NavFocusScopeId = focus_scope_id;
    g.NavWindow->NavLastIds[nav_layer] = id;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0xa4118(%rip), %rcx     # 0xfbcd0
movq 0x1c90(%rcx), %rax
testq %rax, %rax
je 0x57be0
cmpl $0x2, %esi
jae 0x57bff
movl %edi, 0x1c98(%rcx)
movl %edx, 0x1c9c(%rcx)
movl %esi, %ecx
movl %edi, 0x3b0(%rax,%rcx,4)
popq %rbp
retq
leaq 0x6080a(%rip), %rdi     # 0xb83f1
leaq 0x5e577(%rip), %rsi     # 0xb6165
leaq 0x606ed(%rip), %rcx     # 0xb82e2
movl $0x20a6, %edx           # imm = 0x20A6
callq 0xc140
leaq 0x60708(%rip), %rdi     # 0xb830e
leaq 0x5e558(%rip), %rsi     # 0xb6165
leaq 0x606ce(%rip), %rcx     # 0xb82e2
movl $0x20a7, %edx           # imm = 0x20A7
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::SetNavIDWithRectRel(unsigned int, int, unsigned int, ImRect const&)
void ImGui::SetNavIDWithRectRel(ImGuiID id, int nav_layer, ImGuiID focus_scope_id, const ImRect& rect_rel)
{
    ImGuiContext& g = *GImGui;
    SetNavID(id, nav_layer, focus_scope_id);
    g.NavWindow->NavRectRel[nav_layer] = rect_rel;
    g.NavMousePosDirty = true;
    g.NavDisableHighlight = false;
    g.NavDisableMouseHover = true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movl %esi, %r14d
movq 0xa409b(%rip), %r15     # 0xfbcd0
callq 0x57bad
movq 0x1c90(%r15), %rax
movslq %r14d, %rcx
shlq $0x4, %rcx
movups (%rbx), %xmm0
movups %xmm0, 0x3b8(%rax,%rcx)
movw $0x1, 0x1ce5(%r15)
movb $0x1, 0x1ce7(%r15)
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.cpp
// Function: ImGui::SetFocusID(unsigned int, ImGuiWindow*)
void ImGui::SetFocusID(ImGuiID id, ImGuiWindow* window)
{
    ImGuiContext& g = *GImGui;
    IM_ASSERT(id != 0);

    // Assume that SetFocusID() is called in the context where its window->DC.NavLayerCurrent and window->DC.NavFocusScopeIdCurrent are valid.
    // Note that window may be != g.CurrentWindow (e.g. SetFocusID call in InputTextEx for multi-line text)
    const ImGuiNavLayer nav_layer = window->DC.NavLayerCurrent;
    if (g.NavWindow != window)
        g.NavInitRequest = false;
    g.NavWindow = window;
    g.NavId = id;
    g.NavLayer = nav_layer;
    g.NavFocusScopeId = window->DC.NavFocusScopeIdCurrent;
    window->NavLastIds[nav_layer] = id;
    if (window->DC.LastItemId == id)
        window->NavRectRel[nav_layer] = ImRect(window->DC.LastItemRect.Min - window->Pos, window->DC.LastItemRect.Max - window->Pos);

    if (g.ActiveIdSource == ImGuiInputSource_Nav)
        g.NavDisableMouseHover = true;
    else
        g.NavDisableHighlight = true;
}

// Assembly:
testl %edi, %edi
je 0x57d2b
movq 0xa4051(%rip), %rax     # 0xfbcd0
movl 0x14c(%rsi), %ecx
cmpq %rsi, 0x1c90(%rax)
je 0x57c95
movb $0x0, 0x1ce9(%rax)
movq %rsi, 0x1c90(%rax)
movl %edi, 0x1c98(%rax)
movl %ecx, 0x1cdc(%rax)
movl 0x158(%rsi), %edx
movl %edx, 0x1c9c(%rax)
movl %edi, 0x3b0(%rsi,%rcx,4)
cmpl %edi, 0x124(%rsi)
jne 0x57d12
movss 0x12c(%rsi), %xmm0
movss 0x130(%rsi), %xmm1
movss 0x10(%rsi), %xmm2
movss 0x14(%rsi), %xmm3
subss %xmm2, %xmm0
subss %xmm3, %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movss 0x134(%rsi), %xmm1
movss 0x138(%rsi), %xmm4
subss %xmm2, %xmm1
subss %xmm3, %xmm4
unpcklps %xmm4, %xmm1            # xmm1 = xmm1[0],xmm4[0],xmm1[1],xmm4[1]
movlhps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
shlq $0x4, %rcx
movups %xmm0, 0x3b8(%rsi,%rcx)
cmpl $0x2, 0x1b68(%rax)
jne 0x57d23
movb $0x1, 0x1ce7(%rax)
retq
movb $0x1, 0x1ce6(%rax)
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x6073f(%rip), %rdi     # 0xb8475
leaq 0x5e428(%rip), %rsi     # 0xb6165
leaq 0x605eb(%rip), %rcx     # 0xb832f
movl $0x20ba, %edx           # imm = 0x20BA
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::NavMoveRequestForward(int, int, ImRect const&, int)
void ImGui::NavMoveRequestForward(ImGuiDir move_dir, ImGuiDir clip_dir, const ImRect& bb_rel, ImGuiNavMoveFlags move_flags)
{
    ImGuiContext& g = *GImGui;
    IM_ASSERT(g.NavMoveRequestForward == ImGuiNavForward_None);
    NavMoveRequestCancel();
    g.NavMoveDir = move_dir;
    g.NavMoveClipDir = clip_dir;
    g.NavMoveRequestForward = ImGuiNavForward_ForwardQueued;
    g.NavMoveRequestFlags = move_flags;
    g.NavWindow->NavRectRel[g.NavLayer] = bb_rel;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0xa3ec4(%rip), %r13     # 0xfbcd0
cmpl $0x0, 0x1d08(%r13)
jne 0x57e73
movl %ecx, %r14d
movq %rdx, %rbx
movl %esi, %r15d
movl %edi, %r12d
callq 0x57daa
movl %r12d, 0x1d10(%r13)
movl %r15d, 0x1d18(%r13)
movl $0x1, 0x1d08(%r13)
movl %r14d, 0x1d04(%r13)
movq 0x1c90(%r13), %rax
movl 0x1cdc(%r13), %ecx
shlq $0x4, %rcx
movups (%rbx), %xmm0
movups %xmm0, 0x3b8(%rax,%rcx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x604e4(%rip), %rdi     # 0xb835e
leaq 0x5e2e4(%rip), %rsi     # 0xb6165
leaq 0x60506(%rip), %rcx     # 0xb838e
movl $0x21c7, %edx           # imm = 0x21C7
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::GetNavInputAmount(int, ImGuiInputReadMode)
float ImGui::GetNavInputAmount(ImGuiNavInput n, ImGuiInputReadMode mode)
{
    ImGuiContext& g = *GImGui;
    if (mode == ImGuiInputReadMode_Down)
        return g.IO.NavInputs[n];                         // Instant, read analog input (0.0f..1.0f, as provided by user)

    const float t = g.IO.NavInputsDownDuration[n];
    if (t < 0.0f && mode == ImGuiInputReadMode_Released)  // Return 1.0f when just released, no repeat, ignore analog input.
        return (g.IO.NavInputsDownDurationPrev[n] >= 0.0f ? 1.0f : 0.0f);
    if (t < 0.0f)
        return 0.0f;
    if (mode == ImGuiInputReadMode_Pressed)               // Return 1.0f when just pressed, no repeat, ignore analog input.
        return (t == 0.0f) ? 1.0f : 0.0f;
    if (mode == ImGuiInputReadMode_Repeat)
        return (float)CalcTypematicRepeatAmount(t - g.IO.DeltaTime, t, g.IO.KeyRepeatDelay * 0.72f, g.IO.KeyRepeatRate * 0.80f);
    if (mode == ImGuiInputReadMode_RepeatSlow)
        return (float)CalcTypematicRepeatAmount(t - g.IO.DeltaTime, t, g.IO.KeyRepeatDelay * 1.25f, g.IO.KeyRepeatRate * 2.00f);
    if (mode == ImGuiInputReadMode_RepeatFast)
        return (float)CalcTypematicRepeatAmount(t - g.IO.DeltaTime, t, g.IO.KeyRepeatDelay * 0.72f, g.IO.KeyRepeatRate * 0.30f);
    return 0.0f;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0xa3e33(%rip), %rax     # 0xfbcd0
movslq %edi, %rcx
testl %esi, %esi
je 0x57ed4
movss 0x14a0(%rax,%rcx,4), %xmm1
cmpl $0x2, %esi
jne 0x57ee2
xorps %xmm2, %xmm2
ucomiss %xmm1, %xmm2
jbe 0x57ee2
cmpless 0x14f4(%rax,%rcx,4), %xmm2
movss 0x5d118(%rip), %xmm0    # 0xb4fe4
andps %xmm2, %xmm0
jmp 0x57fa2
movss 0x344(%rax,%rcx,4), %xmm0
jmp 0x57fa2
xorps %xmm0, %xmm0
ucomiss %xmm1, %xmm0
ja 0x57fa2
decl %esi
cmpl $0x4, %esi
ja 0x57fa2
leaq 0x5da68(%rip), %rcx     # 0xb5968
movslq (%rcx,%rsi,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
cmpeqss %xmm0, %xmm1
movss 0x5d0ce(%rip), %xmm0    # 0xb4fe4
andps %xmm1, %xmm0
jmp 0x57fa2
movaps %xmm1, %xmm0
subss 0x18(%rax), %xmm0
movss 0x94(%rax), %xmm2
movss 0x98(%rax), %xmm3
mulss 0x5d9b2(%rip), %xmm2    # 0xb58f0
addss %xmm3, %xmm3
jmp 0x57f96
movaps %xmm1, %xmm0
subss 0x18(%rax), %xmm0
movss 0x94(%rax), %xmm2
movss 0x98(%rax), %xmm3
mulss 0x5d984(%rip), %xmm2    # 0xb58e8
mulss 0x5d988(%rip), %xmm3    # 0xb58f4
jmp 0x57f96
movaps %xmm1, %xmm0
subss 0x18(%rax), %xmm0
movss 0x94(%rax), %xmm2
movss 0x98(%rax), %xmm3
mulss 0x5d95a(%rip), %xmm2    # 0xb58e8
mulss 0x5d956(%rip), %xmm3    # 0xb58ec
callq 0x514c9
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::EndDragDropSource()
void ImGui::EndDragDropSource()
{
    ImGuiContext& g = *GImGui;
    IM_ASSERT(g.DragDropActive);
    IM_ASSERT(g.DragDropWithinSource && "Not after a BeginDragDropSource()?");

    if (!(g.DragDropSourceFlags & ImGuiDragDropFlags_SourceNoPreviewTooltip))
        EndTooltip();

    // Discard the drag if have not called SetDragDropPayload()
    if (g.DragDropPayload.DataFrameCount == -1)
        ClearDragDrop();
    g.DragDropWithinSource = false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0xa389a(%rip), %rbx     # 0xfbcd0
cmpb $0x0, 0x2004(%rbx)
je 0x58472
cmpb $0x0, 0x2005(%rbx)
je 0x58491
testb $0x1, 0x2008(%rbx)
jne 0x58456
callq 0x56bca
cmpl $-0x1, 0x202c(%rbx)
jne 0x58464
callq 0x50cb6
movb $0x0, 0x2005(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x5e437(%rip), %rdi     # 0xb68b0
leaq 0x5dce5(%rip), %rsi     # 0xb6165
leaq 0x5fff6(%rip), %rcx     # 0xb847d
movl $0x259d, %edx           # imm = 0x259D
callq 0xc140
leaq 0x60005(%rip), %rdi     # 0xb849d
leaq 0x5dcc6(%rip), %rsi     # 0xb6165
leaq 0x5ffd7(%rip), %rcx     # 0xb847d
movl $0x259e, %edx           # imm = 0x259E
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::BeginDragDropTargetCustom(ImRect const&, unsigned int)
bool ImGui::BeginDragDropTargetCustom(const ImRect& bb, ImGuiID id)
{
    ImGuiContext& g = *GImGui;
    if (!g.DragDropActive)
        return false;

    ImGuiWindow* window = g.CurrentWindow;
    ImGuiWindow* hovered_window = g.HoveredWindowUnderMovingWindow;
    if (hovered_window == NULL || window->RootWindow != hovered_window->RootWindow)
        return false;
    IM_ASSERT(id != 0);
    if (!IsMouseHoveringRect(bb.Min, bb.Max) || (id == g.DragDropPayload.SourceId))
        return false;
    if (window->SkipItems)
        return false;

    IM_ASSERT(g.DragDropWithinTarget == false);
    g.DragDropTargetRect = bb;
    g.DragDropTargetId = id;
    g.DragDropWithinTarget = true;
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0xa3507(%rip), %r15     # 0xfbcd0
cmpb $0x1, 0x2004(%r15)
jne 0x58826
movq 0x1af8(%r15), %rax
testq %rax, %rax
je 0x58826
movq 0x1ae0(%r15), %r12
movq 0x390(%r12), %rcx
cmpq 0x390(%rax), %rcx
jne 0x58826
movl %esi, %ebx
testl %esi, %esi
je 0x5885a
movq %rdi, %r14
leaq 0x8(%rdi), %rsi
movl $0x1, %edx
callq 0x4648c
testb %al, %al
je 0x58826
cmpl %ebx, 0x2024(%r15)
je 0x58826
cmpb $0x0, 0x93(%r12)
je 0x58831
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
cmpb $0x0, 0x2006(%r15)
jne 0x58879
movups (%r14), %xmm0
movups %xmm0, 0x2058(%r15)
movl %ebx, 0x2068(%r15)
movb $0x1, 0x2006(%r15)
movb $0x1, %al
jmp 0x58828
leaq 0x5fc14(%rip), %rdi     # 0xb8475
leaq 0x5d8fd(%rip), %rsi     # 0xb6165
leaq 0x5fdde(%rip), %rcx     # 0xb864d
movl $0x25df, %edx           # imm = 0x25DF
callq 0xc140
leaq 0x5fe0c(%rip), %rdi     # 0xb868c
leaq 0x5d8de(%rip), %rsi     # 0xb6165
leaq 0x5fdbf(%rip), %rcx     # 0xb864d
movl $0x25e5, %edx           # imm = 0x25E5
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::BeginDragDropTarget()
bool ImGui::BeginDragDropTarget()
{
    ImGuiContext& g = *GImGui;
    if (!g.DragDropActive)
        return false;

    ImGuiWindow* window = g.CurrentWindow;
    if (!(window->DC.LastItemStatusFlags & ImGuiItemStatusFlags_HoveredRect))
        return false;
    ImGuiWindow* hovered_window = g.HoveredWindowUnderMovingWindow;
    if (hovered_window == NULL || window->RootWindow != hovered_window->RootWindow)
        return false;

    const ImRect& display_rect = (window->DC.LastItemStatusFlags & ImGuiItemStatusFlags_HasDisplayRect) ? window->DC.LastItemDisplayRect : window->DC.LastItemRect;
    ImGuiID id = window->DC.LastItemId;
    if (id == 0)
        id = window->GetIDFromRectangle(display_rect);
    if (g.DragDropPayload.SourceId == id)
        return false;

    IM_ASSERT(g.DragDropWithinTarget == false);
    g.DragDropTargetRect = display_rect;
    g.DragDropTargetId = id;
    g.DragDropWithinTarget = true;
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0xa342a(%rip), %r14     # 0xfbcd0
cmpb $0x1, 0x2004(%r14)
jne 0x58906
movq 0x1ae0(%r14), %rdi
movl 0x128(%rdi), %eax
testb $0x1, %al
je 0x58906
movq 0x1af8(%r14), %rcx
testq %rcx, %rcx
je 0x58906
movq 0x390(%rdi), %rdx
cmpq 0x390(%rcx), %rdx
jne 0x58906
andl $0x2, %eax
leaq (%rdi,%rax,8), %rbx
addq $0x12c, %rbx            # imm = 0x12C
movl 0x124(%rdi), %eax
testl %eax, %eax
jne 0x588fd
movq %rbx, %rsi
callq 0x45c5e
cmpl %eax, 0x2024(%r14)
jne 0x5890d
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
cmpb $0x0, 0x2006(%r14)
jne 0x58935
movups (%rbx), %xmm0
movups %xmm0, 0x2058(%r14)
movl %eax, 0x2068(%r14)
movb $0x1, 0x2006(%r14)
movb $0x1, %al
jmp 0x58908
leaq 0x5fd50(%rip), %rdi     # 0xb868c
leaq 0x5d822(%rip), %rsi     # 0xb6165
leaq 0x5fd62(%rip), %rcx     # 0xb86ac
movl $0x2604, %edx           # imm = 0x2604
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::EndDragDropTarget()
void ImGui::EndDragDropTarget()
{
    ImGuiContext& g = *GImGui;
    IM_ASSERT(g.DragDropActive);
    IM_ASSERT(g.DragDropWithinTarget);
    g.DragDropWithinTarget = false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0xa3068(%rip), %rax     # 0xfbcd0
cmpb $0x0, 0x2004(%rax)
je 0x58c83
cmpb $0x0, 0x2006(%rax)
je 0x58ca2
movb $0x0, 0x2006(%rax)
popq %rbp
retq
leaq 0x5dc26(%rip), %rdi     # 0xb68b0
leaq 0x5d4d4(%rip), %rsi     # 0xb6165
leaq 0x5faa6(%rip), %rcx     # 0xb873e
movl $0x2646, %edx           # imm = 0x2646
callq 0xc140
leaq 0x5fab5(%rip), %rdi     # 0xb875e
leaq 0x5d4b5(%rip), %rsi     # 0xb6165
leaq 0x5fa87(%rip), %rcx     # 0xb873e
movl $0x2647, %edx           # imm = 0x2647
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::LogText(char const*, ...)
void ImGui::LogText(const char* fmt, ...)
{
    ImGuiContext& g = *GImGui;
    if (!g.LogEnabled)
        return;

    va_list args;
    va_start(args, fmt);
    if (g.LogFile)
    {
        g.LogBuffer.Buf.resize(0);
        g.LogBuffer.appendfv(fmt, args);
        ImFileWrite(g.LogBuffer.c_str(), sizeof(char), (ImU64)g.LogBuffer.size(), g.LogFile);
    }
    else
    {
        g.LogBuffer.appendfv(fmt, args);
    }
    va_end(args);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd0, %rsp
testb %al, %al
je 0x58d03
movaps %xmm0, -0xc0(%rbp)
movaps %xmm1, -0xb0(%rbp)
movaps %xmm2, -0xa0(%rbp)
movaps %xmm3, -0x90(%rbp)
movaps %xmm4, -0x80(%rbp)
movaps %xmm5, -0x70(%rbp)
movaps %xmm6, -0x60(%rbp)
movaps %xmm7, -0x50(%rbp)
movq %r9, -0xc8(%rbp)
movq %r8, -0xd0(%rbp)
movq %rcx, -0xd8(%rbp)
movq %rdx, -0xe0(%rbp)
movq %rsi, -0xe8(%rbp)
movq 0xa2fa3(%rip), %r12     # 0xfbcd0
cmpb $0x1, 0x3138(%r12)
jne 0x58e6c
movq %rdi, %rbx
leaq -0xf0(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq 0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, -0x40(%rbp)
leaq 0x3148(%r12), %r14
cmpq $0x0, 0x3140(%r12)
je 0x58e5d
cmpl $0x0, 0x314c(%r12)
jns 0x58e07
movq 0xa2f43(%rip), %rax     # 0xfbcd0
testq %rax, %rax
je 0x58d98
incl 0x3b4(%rax)
movq 0xa2f41(%rip), %rsi     # 0xfbce0
xorl %edi, %edi
callq *0x9e769(%rip)          # 0xf7510
movq %rax, %r15
movq 0x3150(%r12), %rsi
testq %rsi, %rsi
je 0x58df3
movslq 0x3148(%r12), %rdx
movq %r15, %rdi
callq 0xc080
movq 0x3150(%r12), %rdi
testq %rdi, %rdi
je 0x58de6
movq 0xa2ef5(%rip), %rax     # 0xfbcd0
testq %rax, %rax
je 0x58de6
decl 0x3b4(%rax)
movq 0xa2ef3(%rip), %rsi     # 0xfbce0
callq *0x9e725(%rip)          # 0xf7518
movq %r15, 0x3150(%r12)
movl $0x0, 0x314c(%r12)
xorl %r15d, %r15d
movl %r15d, 0x3148(%r12)
leaq -0x40(%rbp), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4349e
movq 0x3150(%r12), %rax
testq %rax, %rax
leaq 0xa2ea5(%rip), %rdi     # 0xfbcd8
cmovneq %rax, %rdi
movl 0x3148(%r12), %eax
subl $0x1, %eax
cmovbl %r15d, %eax
movslq %eax, %rdx
movq 0x3140(%r12), %rcx
movl $0x1, %esi
callq 0xc8d0
jmp 0x58e6c
leaq -0x40(%rbp), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4349e
addq $0xd0, %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.cpp
// Function: ImGui::LogBegin(ImGuiLogType, int)
void ImGui::LogBegin(ImGuiLogType type, int auto_open_depth)
{
    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = g.CurrentWindow;
    IM_ASSERT(g.LogEnabled == false);
    IM_ASSERT(g.LogFile == NULL);
    IM_ASSERT(g.LogBuffer.empty());
    g.LogEnabled = true;
    g.LogType = type;
    g.LogDepthRef = window->DC.TreeDepth;
    g.LogDepthToExpand = ((auto_open_depth >= 0) ? auto_open_depth : g.LogDepthToExpandDefault);
    g.LogLinePosY = FLT_MAX;
    g.LogLineFirstItem = true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0xa2e49(%rip), %rax     # 0xfbcd0
cmpb $0x0, 0x3138(%rax)
jne 0x58eea
cmpq $0x0, 0x3140(%rax)
jne 0x58f09
cmpl $0x2, 0x3148(%rax)
jge 0x58f28
movq 0x1ae0(%rax), %rcx
movb $0x1, 0x3138(%rax)
movl %edi, 0x313c(%rax)
movl 0x18c(%rcx), %ecx
movl %ecx, 0x3160(%rax)
testl %esi, %esi
jns 0x58ed1
movl 0x3168(%rax), %esi
movl %esi, 0x3164(%rax)
movl $0x7f7fffff, 0x3158(%rax) # imm = 0x7F7FFFFF
movb $0x1, 0x315c(%rax)
popq %rbp
retq
leaq 0x5f893(%rip), %rdi     # 0xb8784
leaq 0x5d26d(%rip), %rsi     # 0xb6165
leaq 0x5f89b(%rip), %rcx     # 0xb879a
movl $0x26a1, %edx           # imm = 0x26A1
callq 0xc140
leaq 0x5f8b2(%rip), %rdi     # 0xb87c2
leaq 0x5d24e(%rip), %rsi     # 0xb6165
leaq 0x5f87c(%rip), %rcx     # 0xb879a
movl $0x26a2, %edx           # imm = 0x26A2
callq 0xc140
leaq 0x5f8a7(%rip), %rdi     # 0xb87d6
leaq 0x5d22f(%rip), %rsi     # 0xb6165
leaq 0x5f85d(%rip), %rcx     # 0xb879a
movl $0x26a3, %edx           # imm = 0x26A3
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::LogToTTY(int)
void ImGui::LogToTTY(int auto_open_depth)
{
    ImGuiContext& g = *GImGui;
    if (g.LogEnabled)
        return;
    IM_UNUSED(auto_open_depth);
#ifndef IMGUI_DISABLE_TTY_FUNCTIONS
    LogBegin(ImGuiLogType_TTY, auto_open_depth);
    g.LogFile = stdout;
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0xa2d7c(%rip), %rbx     # 0xfbcd0
cmpb $0x0, 0x3138(%rbx)
jne 0x58f7a
movl %edi, %esi
movl $0x1, %edi
callq 0x58e7c
movq 0x9df90(%rip), %rax     # 0xf6f00
movq (%rax), %rax
movq %rax, 0x3140(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq