LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::CalcItemWidth()
float ImGui::CalcItemWidth()
{
    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = g.CurrentWindow;
    float w;
    if (g.NextItemData.Flags & ImGuiNextItemDataFlags_HasWidth)
        w = g.NextItemData.Width;
    else
        w = window->DC.ItemWidth;
    if (w < 0.0f)
    {
        float region_max_x = GetContentRegionMaxAbs().x;
        w = ImMax(1.0f, region_max_x - window->DC.CursorPos.x + w);
    }
    w = IM_FLOOR(w);
    return w;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0xa6a73(%rip), %rcx     # 0xfdcd0
movq 0x1ae0(%rcx), %rax
leaq 0x1bfc(%rcx), %rdx
leaq 0x1d0(%rax), %rsi
testb $0x1, 0x1bf8(%rcx)
cmoveq %rsi, %rdx
movss (%rdx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
jbe 0x572cc
movsd 0x270(%rax), %xmm1
cmpq $0x0, 0x1b0(%rax)
jne 0x572a5
cmpq $0x0, 0x20a8(%rcx)
je 0x572b1
movss 0x240(%rax), %xmm2
movss %xmm2, %xmm1            # xmm1 = xmm2[0],xmm1[1,2,3]
subss 0xd8(%rax), %xmm1
addss %xmm1, %xmm0
movss 0x5fd1f(%rip), %xmm1    # 0xb6fe4
maxss %xmm0, %xmm1
movaps %xmm1, %xmm0
cvttps2dq %xmm0, %xmm0
cvtdq2ps %xmm0, %xmm0
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::GetContentRegionMaxAbs()
ImVec2 ImGui::GetContentRegionMaxAbs()
{
    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = g.CurrentWindow;
    ImVec2 mx = window->ContentRegionRect.Max;
    if (window->DC.CurrentColumns || g.CurrentTable)
        mx.x = window->WorkRect.Max.x;
    return mx;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0xa69f0(%rip), %rcx     # 0xfdcd0
movq 0x1ae0(%rcx), %rax
movsd 0x270(%rax), %xmm0
cmpq $0x0, 0x1b0(%rax)
jne 0x57303
cmpq $0x0, 0x20a8(%rcx)
je 0x5730f
movss 0x240(%rax), %xmm1
movss %xmm1, %xmm0            # xmm0 = xmm1[0],xmm0[1,2,3]
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::CalcItemSize(ImVec2, float, float)
ImVec2 ImGui::CalcItemSize(ImVec2 size, float default_w, float default_h)
{
    ImGuiWindow* window = GImGui->CurrentWindow;

    ImVec2 region_max;
    if (size.x < 0.0f || size.y < 0.0f)
        region_max = GetContentRegionMaxAbs();

    if (size.x == 0.0f)
        size.x = default_w;
    else if (size.x < 0.0f)
        size.x = ImMax(4.0f, region_max.x - window->DC.CursorPos.x + size.x);

    if (size.y == 0.0f)
        size.y = default_h;
    else if (size.y < 0.0f)
        size.y = ImMax(4.0f, region_max.y - window->DC.CursorPos.y + size.y);

    return size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0xa69b4(%rip), %rcx     # 0xfdcd0
movq 0x1ae0(%rcx), %rax
xorps %xmm4, %xmm4
ucomiss %xmm0, %xmm4
ja 0x5733a
movaps %xmm0, %xmm5
shufps $0x55, %xmm0, %xmm5     # xmm5 = xmm5[1,1],xmm0[1,1]
xorps %xmm3, %xmm3
ucomiss %xmm5, %xmm4
jbe 0x57362
movsd 0x270(%rax), %xmm3
cmpq $0x0, 0x1b0(%rax)
jne 0x57356
cmpq $0x0, 0x20a8(%rcx)
je 0x57362
movss 0x240(%rax), %xmm4
movss %xmm4, %xmm3            # xmm3 = xmm4[0],xmm3[1,2,3]
xorps %xmm4, %xmm4
ucomiss %xmm4, %xmm0
jne 0x5736c
jnp 0x57390
ucomiss %xmm0, %xmm4
jbe 0x57394
movss 0xd8(%rax), %xmm1
movaps %xmm3, %xmm4
subss %xmm1, %xmm4
addss %xmm0, %xmm4
movss 0x604d8(%rip), %xmm1    # 0xb7864
maxss %xmm4, %xmm1
movss %xmm1, %xmm0            # xmm0 = xmm1[0],xmm0[1,2,3]
movaps %xmm0, %xmm1
shufps $0x55, %xmm0, %xmm1     # xmm1 = xmm1[1,1],xmm0[1,1]
xorps %xmm4, %xmm4
ucomiss %xmm4, %xmm1
jne 0x573a5
jnp 0x573c6
ucomiss %xmm1, %xmm4
jbe 0x573d0
shufps $0x55, %xmm3, %xmm3     # xmm3 = xmm3[1,1,1,1]
subss 0xdc(%rax), %xmm3
addss %xmm3, %xmm1
movss 0x604a2(%rip), %xmm2    # 0xb7864
maxss %xmm1, %xmm2
movlhps %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0]
shufps $0xe2, %xmm0, %xmm2     # xmm2 = xmm2[2,0],xmm0[2,3]
movaps %xmm2, %xmm0
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0xa6877(%rip), %rcx     # 0xfdcd0
movq 0x1ae0(%rcx), %rax
movss 0x270(%rax), %xmm0
movss 0x10(%rax), %xmm1
movss 0x274(%rax), %xmm2
subss 0x14(%rax), %xmm2
subss %xmm1, %xmm0
unpcklps %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
cmpq $0x0, 0x1b0(%rax)
jne 0x57495
cmpq $0x0, 0x20a8(%rcx)
je 0x574a5
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_O1/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 0x5790e
movss 0x5f6f9(%rip), %xmm2    # 0xb6fe4
ucomiss %xmm1, %xmm2
jb 0x5790e
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 0x625a3(%rip), %rdi     # 0xb9ebc
leaq 0x60845(%rip), %rsi     # 0xb8165
leaq 0x625c6(%rip), %rcx     # 0xb9eed
movl $0x1e45, %edx           # imm = 0x1E45
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/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 0x579ed
movss 0x5f696(%rip), %xmm2    # 0xb6fe4
ucomiss %xmm1, %xmm2
jb 0x579ed
movq %rdi, %rbx
movaps %xmm0, -0x20(%rbp)
movss %xmm1, -0x10(%rbp)
xorps %xmm1, %xmm1
testb $0x1, 0xc(%rdi)
jne 0x579a7
movq 0xa635d(%rip), %rax     # 0xfdcd0
movss 0x1984(%rax), %xmm0
mulss 0x2b0(%rbx), %xmm0
movq 0x388(%rbx), %rcx
testq %rcx, %rcx
je 0x57997
mulss 0x2b0(%rcx), %xmm0
movss 0x159c(%rax), %xmm1
addss %xmm1, %xmm1
addss %xmm0, %xmm1
movss %xmm1, -0xc(%rbp)
movq %rbx, %rdi
callq 0x5f48e
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 0x62534(%rip), %rdi     # 0xb9f28
leaq 0x6076a(%rip), %rsi     # 0xb8165
leaq 0x62557(%rip), %rcx     # 0xb9f59
movl $0x1e4d, %edx           # imm = 0x1E4D
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/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 0xa61b2(%rip), %rax     # 0xfdcd0
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 0x578db
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_O1/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 0x57d6f
movq 0xa5f71(%rip), %rax     # 0xfdcd0
movq 0x1ae0(%rax), %rdi
xorl %edx, %edx
callq 0x46258
movl %eax, %edi
btl $0x8, %ebx
jae 0x57d79
testl %edi, %edi
jne 0x57d86
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x483c1
leaq 0x622a2(%rip), %rdi     # 0xba02f
leaq 0x603d1(%rip), %rsi     # 0xb8165
leaq 0x622e8(%rip), %rcx     # 0xba083
movl $0x1ee1, %edx           # imm = 0x1EE1
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/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 0xa5c83(%rip), %r14     # 0xfdcd0
cmpb $0x0, 0x1ce6(%r14)
jne 0x5811d
cmpb $0x1, 0x1ce7(%r14)
jne 0x5811d
movq 0x1c90(%r14), %rax
testq %rax, %rax
je 0x5811d
movl 0x1cdc(%r14), %ecx
shlq $0x4, %rcx
movss 0x1598(%r14), %xmm0
mulss 0x5f7cf(%rip), %xmm0    # 0xb7864
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 0x5813f
leaq 0x128(%r14), %rbx
movq %rbx, %rdi
callq 0x4806b
testb %al, %al
je 0x58136
movsd (%rbx), %xmm0
jmp 0x5813f
movsd 0x2158(%r14), %xmm0
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0xa59be(%rip), %rbx     # 0xfdcd0
movl 0x1c80(%rbx), %edx
testl %edx, %edx
jle 0x583be
movl 0x1c70(%rbx), %eax
cmpl %eax, %edx
jg 0x583be
decl %edx
movq 0x1c78(%rbx), %rcx
movq 0x1c88(%rbx), %rsi
movl %edx, %edi
shlq $0x4, %rdi
leaq (%rdi,%rdi,2), %rdi
movl (%rsi,%rdi), %esi
cmpl (%rcx,%rdi), %esi
jne 0x583be
testl %edx, %edx
jle 0x5839f
cmpl %edx, %eax
jle 0x583c5
movl %edx, %esi
leaq (%rsi,%rsi,2), %rsi
shlq $0x4, %rsi
movq 0x8(%rcx,%rsi), %rsi
testq %rsi, %rsi
je 0x58392
testb $0x10, 0xf(%rsi)
je 0x58392
leal -0x1(%rdx), %edi
leaq (%rdi,%rdi,2), %rsi
shlq $0x4, %rsi
movq 0x8(%rcx,%rsi), %rsi
testq %rsi, %rsi
je 0x5838d
testb $0x8, 0xf(%rsi)
jne 0x58392
movb $0x1, %sil
jmp 0x58396
xorl %esi, %esi
movl %edx, %edi
movl %edi, %edx
testb %sil, %sil
jne 0x58350
jmp 0x583a1
xorl %edi, %edi
movl $0x1, %esi
callq 0x58144
movq 0x1c90(%rbx), %rax
testq %rax, %rax
je 0x583be
movb $0x1, 0x15c(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x632ac(%rip), %rdi     # 0xbb678
leaq 0x632b8(%rip), %rsi     # 0xbb68b
leaq 0x64770(%rip), %rcx     # 0xbcb4a
movl $0x65c, %edx            # imm = 0x65C
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/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 0xa58d3(%rip), %r15     # 0xfdcd0
xorl %esi, %esi
callq 0x483c1
testb %al, %al
je 0x58423
btl $0x1c, %ebx
jb 0x58432
leaq 0x61d79(%rip), %rdx     # 0xba18e
leaq -0x30(%rbp), %rdi
movl $0x14, %esi
movl %r14d, %ecx
jmp 0x58449
movl $0x0, 0x1b88(%r15)
xorl %ebx, %ebx
jmp 0x5846e
movl 0x1c80(%r15), %ecx
leaq 0x61d42(%rip), %rdx     # 0xba182
leaq -0x30(%rbp), %rdi
movl $0x14, %esi
xorl %eax, %eax
callq 0x427cb
orl $0x4000000, %ebx        # imm = 0x4000000
leaq -0x30(%rbp), %rdi
xorl %esi, %esi
movl %ebx, %edx
callq 0x4c3ad
movl %eax, %ebx
testb %al, %al
jne 0x5846e
callq 0x5847b
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0xa5848(%rip), %rbx     # 0xfdcd0
movq 0x1ae0(%rbx), %rcx
movl 0xc(%rcx), %eax
btl $0x1a, %eax
jae 0x584e4
cmpl $0x0, 0x1c80(%rbx)
jle 0x58503
cmpq %rcx, 0x1c90(%rbx)
jne 0x584bb
movq %rcx, 0x1db0(%rbx)
movl $0x2, 0x1db8(%rbx)
cmpb $0x0, 0x1a76(%rbx)
jne 0x58522
btl $0x18, %eax
jae 0x584d1
movb $0x1, 0x1a76(%rbx)
callq 0x51ace
movb $0x0, 0x1a76(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x61cb0(%rip), %rdi     # 0xba19b
leaq 0x5fc73(%rip), %rsi     # 0xb8165
leaq 0x61cc9(%rip), %rcx     # 0xba1c2
movl $0x1fd7, %edx           # imm = 0x1FD7
callq 0xc140
leaq 0x61ccf(%rip), %rdi     # 0xba1d9
leaq 0x5fc54(%rip), %rsi     # 0xb8165
leaq 0x61caa(%rip), %rcx     # 0xba1c2
movl $0x1fd8, %edx           # imm = 0x1FD8
callq 0xc140
leaq 0x60aa5(%rip), %rdi     # 0xb8fce
leaq 0x5fc35(%rip), %rsi     # 0xb8165
leaq 0x61c8b(%rip), %rcx     # 0xba1c2
movl $0x1fdf, %edx           # imm = 0x1FDF
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/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 0xa5788(%rip), %rax     # 0xfdcd0
movl 0x1c70(%rax), %ecx
cmpl 0x1c80(%rax), %ecx
jle 0x58584
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 0x46258
movl %eax, %edi
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x583e4
movl $0x0, 0x1b88(%rax)
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0xa5724(%rip), %r12     # 0xfdcd0
movq 0x1ae0(%r12), %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x46258
movl %eax, %edi
xorl %esi, %esi
callq 0x483c1
testb %al, %al
je 0x5866d
testb $0x1, 0x1b88(%r12)
jne 0x58627
movss 0x5ea22(%rip), %xmm0    # 0xb7004
movss 0x10(%r12), %xmm1
mulss %xmm0, %xmm1
mulss 0x14(%r12), %xmm0
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movq 0xa56d2(%rip), %rax     # 0xfdcd0
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 0x4c3ad
testb %al, %al
je 0x5867b
movl %eax, %r14d
movb $0x1, %al
testq %rbx, %rbx
je 0x58682
cmpb $0x0, (%rbx)
jne 0x58682
callq 0x5847b
testb %r14b, %r14b
je 0x58680
movl 0x1c80(%r12), %edi
movl $0x1, %esi
callq 0x58144
jmp 0x58680
movl $0x0, 0x1b88(%r12)
jmp 0x58680
callq 0x5847b
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x58721
movq 0xa5610(%rip), %rcx     # 0xfdcd0
cmpb $0x1, 0x42a(%rcx,%rax)
jne 0x586fa
movl %esi, %ebx
movq %rdi, %r14
movq 0x1ae0(%rcx), %r15
movl $0x8, %edi
callq 0x46d03
testb %al, %al
je 0x586fa
testq %r14, %r14
je 0x58705
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x46258
movl %eax, %edi
jmp 0x5870c
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl 0x124(%r15), %edi
testl %edi, %edi
je 0x58740
movl %ebx, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x57dd4
leaq 0x6061e(%rip), %rdi     # 0xb8d46
leaq 0x5fa36(%rip), %rsi     # 0xb8165
leaq 0x606c1(%rip), %rcx     # 0xb8df7
movl $0x11d7, %edx           # imm = 0x11D7
callq 0xc140
leaq 0x61d2e(%rip), %rdi     # 0xba475
leaq 0x5fa17(%rip), %rsi     # 0xb8165
leaq 0x61a9f(%rip), %rcx     # 0xba1f4
movl $0x1fef, %edx           # imm = 0x1FEF
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/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 0xa555e(%rip), %rax     # 0xfdcd0
movq 0x1ae0(%rax), %rdi
cmpb $0x0, 0x93(%rdi)
je 0x58789
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
testq %rsi, %rsi
je 0x5879a
xorl %edx, %edx
callq 0x46258
movl %eax, %r14d
jmp 0x587a1
movl 0x124(%rdi), %r14d
testl %r14d, %r14d
je 0x587ea
movl %ebx, %eax
andl $0x1f, %eax
cmpl $0x5, %eax
jae 0x58809
movq 0xa5519(%rip), %rcx     # 0xfdcd0
cmpb $0x1, 0x42a(%rcx,%rax)
jne 0x587d9
movl $0x8, %edi
callq 0x46d03
testb %al, %al
je 0x587d9
movl %r14d, %edi
movl %ebx, %esi
callq 0x57dd4
movl %r14d, %edi
movl $0x141, %esi            # imm = 0x141
popq %rbx
popq %r14
popq %rbp
jmp 0x583e4
leaq 0x61c84(%rip), %rdi     # 0xba475
leaq 0x5f96d(%rip), %rsi     # 0xb8165
leaq 0x61a35(%rip), %rcx     # 0xba234
movl $0x1fff, %edx           # imm = 0x1FFF
callq 0xc140
leaq 0x60536(%rip), %rdi     # 0xb8d46
leaq 0x5f94e(%rip), %rsi     # 0xb8165
leaq 0x605d9(%rip), %rcx     # 0xb8df7
movl $0x11d7, %edx           # imm = 0x11D7
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/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 0xa5498(%rip), %rax     # 0xfdcd0
movq 0x1ae0(%rax), %rax
testq %rdi, %rdi
leaq 0x61a2c(%rip), %rsi     # 0xba275
cmovneq %rdi, %rsi
movq %rax, %rdi
xorl %edx, %edx
callq 0x46258
movl %eax, %r14d
movl %ebx, %eax
andl $0x1f, %eax
cmpl $0x5, %eax
jae 0x588be
movq 0xa5465(%rip), %rcx     # 0xfdcd0
cmpb $0x1, 0x42a(%rcx,%rax)
jne 0x588ad
movl $0x8, %edi
callq 0x551af
testb %al, %al
je 0x588ad
testb $0x40, %bl
jne 0x58894
movl %r14d, %edi
movl %ebx, %esi
callq 0x57dd4
jmp 0x588ad
movq 0xa5435(%rip), %rax     # 0xfdcd0
cmpl $0x0, 0x1b1c(%rax)
jne 0x588ad
cmpl $0x0, 0x1b20(%rax)
je 0x58888
movl %r14d, %edi
movl $0x141, %esi            # imm = 0x141
popq %rbx
popq %r14
popq %rbp
jmp 0x583e4
leaq 0x60481(%rip), %rdi     # 0xb8d46
leaq 0x5f899(%rip), %rsi     # 0xb8165
leaq 0x60524(%rip), %rcx     # 0xb8df7
movl $0x11d7, %edx           # imm = 0x11D7
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/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 0xa53e3(%rip), %rax     # 0xfdcd0
movq 0x1ae0(%rax), %rax
testq %rdi, %rdi
leaq 0x61986(%rip), %rsi     # 0xba284
cmovneq %rdi, %rsi
movq %rax, %rdi
xorl %edx, %edx
callq 0x46258
movl %eax, %r14d
movl %ebx, %eax
andl $0x1f, %eax
cmpl $0x5, %eax
jae 0x5895d
movq 0xa53b0(%rip), %rcx     # 0xfdcd0
cmpb $0x1, 0x42a(%rcx,%rax)
jne 0x5894c
movl $0x4, %edi
callq 0x551af
testb %al, %al
jne 0x5894c
callq 0x484a1
testq %rax, %rax
jne 0x5894c
movl %r14d, %edi
movl %ebx, %esi
callq 0x57dd4
movl %r14d, %edi
movl $0x141, %esi            # imm = 0x141
popq %rbx
popq %r14
popq %rbp
jmp 0x583e4
leaq 0x603e2(%rip), %rdi     # 0xb8d46
leaq 0x5f7fa(%rip), %rsi     # 0xb8165
leaq 0x60485(%rip), %rcx     # 0xb8df7
movl $0x11d7, %edx           # imm = 0x11D7
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/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 0xa5013(%rip), %rax     # 0xfdcd0
movss 0x160c(%rax), %xmm0
movss 0x1610(%rax), %xmm2
movss 0x10(%rax), %xmm3
movss 0x14(%rax), %xmm4
movaps %xmm0, %xmm1
addss %xmm0, %xmm1
movaps 0x5e2db(%rip), %xmm5    # 0xb6fc0
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_O1/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 0xa4fa5(%rip), %rcx     # 0xfdcd0
movq 0x1c90(%rcx), %rax
testq %rax, %rax
je 0x58d53
cmpl $0x2, %esi
jae 0x58d72
movl %edi, 0x1c98(%rcx)
movl %edx, 0x1c9c(%rcx)
movl %esi, %ecx
movl %edi, 0x3b0(%rax,%rcx,4)
popq %rbp
retq
leaq 0x61697(%rip), %rdi     # 0xba3f1
leaq 0x5f404(%rip), %rsi     # 0xb8165
leaq 0x6157a(%rip), %rcx     # 0xba2e2
movl $0x20a6, %edx           # imm = 0x20A6
callq 0xc140
leaq 0x61595(%rip), %rdi     # 0xba30e
leaq 0x5f3e5(%rip), %rsi     # 0xb8165
leaq 0x6155b(%rip), %rcx     # 0xba2e2
movl $0x20a7, %edx           # imm = 0x20A7
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/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 0xa4f28(%rip), %r15     # 0xfdcd0
callq 0x58d20
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_O1/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 0x58e9e
movq 0xa4ede(%rip), %rax     # 0xfdcd0
movl 0x14c(%rsi), %ecx
cmpq %rsi, 0x1c90(%rax)
je 0x58e08
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 0x58e85
movss 0x12c(%rsi), %xmm0
movss 0x10(%rsi), %xmm1
movss 0x14(%rsi), %xmm2
subss %xmm1, %xmm0
movss 0x130(%rsi), %xmm3
subss %xmm2, %xmm3
unpcklps %xmm3, %xmm0            # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
movss 0x134(%rsi), %xmm3
subss %xmm1, %xmm3
movss 0x138(%rsi), %xmm1
subss %xmm2, %xmm1
unpcklps %xmm1, %xmm3            # xmm3 = xmm3[0],xmm1[0],xmm3[1],xmm1[1]
movlhps %xmm3, %xmm0            # xmm0 = xmm0[0],xmm3[0]
shlq $0x4, %rcx
movups %xmm0, 0x3b8(%rsi,%rcx)
cmpl $0x2, 0x1b68(%rax)
jne 0x58e96
movb $0x1, 0x1ce7(%rax)
retq
movb $0x1, 0x1ce6(%rax)
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x615cc(%rip), %rdi     # 0xba475
leaq 0x5f2b5(%rip), %rsi     # 0xb8165
leaq 0x61478(%rip), %rcx     # 0xba32f
movl $0x20ba, %edx           # imm = 0x20BA
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/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 0xa4d51(%rip), %r13     # 0xfdcd0
cmpl $0x0, 0x1d08(%r13)
jne 0x58fe6
movl %ecx, %r14d
movq %rdx, %rbx
movl %esi, %r15d
movl %edi, %r12d
callq 0x58f1d
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 0x61371(%rip), %rdi     # 0xba35e
leaq 0x5f171(%rip), %rsi     # 0xb8165
leaq 0x61393(%rip), %rcx     # 0xba38e
movl $0x21c7, %edx           # imm = 0x21C7
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/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 0xa4cc0(%rip), %rax     # 0xfdcd0
movslq %edi, %rcx
testl %esi, %esi
je 0x59047
movss 0x14a0(%rax,%rcx,4), %xmm1
cmpl $0x2, %esi
jne 0x59055
xorps %xmm2, %xmm2
ucomiss %xmm1, %xmm2
jbe 0x59055
cmpless 0x14f4(%rax,%rcx,4), %xmm2
movss 0x5dfa5(%rip), %xmm0    # 0xb6fe4
andps %xmm2, %xmm0
jmp 0x59115
movss 0x344(%rax,%rcx,4), %xmm0
jmp 0x59115
xorps %xmm0, %xmm0
ucomiss %xmm1, %xmm0
ja 0x59115
decl %esi
cmpl $0x4, %esi
ja 0x59115
leaq 0x5e8f5(%rip), %rcx     # 0xb7968
movslq (%rcx,%rsi,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
cmpeqss %xmm0, %xmm1
movss 0x5df5b(%rip), %xmm0    # 0xb6fe4
andps %xmm1, %xmm0
jmp 0x59115
movaps %xmm1, %xmm0
subss 0x18(%rax), %xmm0
movss 0x94(%rax), %xmm2
movss 0x98(%rax), %xmm3
mulss 0x5e83f(%rip), %xmm2    # 0xb78f0
addss %xmm3, %xmm3
jmp 0x59109
movaps %xmm1, %xmm0
subss 0x18(%rax), %xmm0
movss 0x94(%rax), %xmm2
movss 0x98(%rax), %xmm3
mulss 0x5e811(%rip), %xmm2    # 0xb78e8
mulss 0x5e815(%rip), %xmm3    # 0xb78f4
jmp 0x59109
movaps %xmm1, %xmm0
subss 0x18(%rax), %xmm0
movss 0x94(%rax), %xmm2
movss 0x98(%rax), %xmm3
mulss 0x5e7e7(%rip), %xmm2    # 0xb78e8
mulss 0x5e7e3(%rip), %xmm3    # 0xb78ec
callq 0x524b7
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0xa472f(%rip), %rbx     # 0xfdcd0
cmpb $0x0, 0x2004(%rbx)
je 0x595dd
cmpb $0x0, 0x2005(%rbx)
je 0x595fc
testb $0x1, 0x2008(%rbx)
jne 0x595c1
callq 0x57cdf
cmpl $-0x1, 0x202c(%rbx)
jne 0x595cf
callq 0x51c8d
movb $0x0, 0x2005(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x5f2cc(%rip), %rdi     # 0xb88b0
leaq 0x5eb7a(%rip), %rsi     # 0xb8165
leaq 0x60e8b(%rip), %rcx     # 0xba47d
movl $0x259d, %edx           # imm = 0x259D
callq 0xc140
leaq 0x60e9a(%rip), %rdi     # 0xba49d
leaq 0x5eb5b(%rip), %rsi     # 0xb8165
leaq 0x60e6c(%rip), %rcx     # 0xba47d
movl $0x259e, %edx           # imm = 0x259E
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/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 0xa4383(%rip), %r15     # 0xfdcd0
cmpb $0x1, 0x2004(%r15)
jne 0x599aa
movq 0x1af8(%r15), %rax
testq %rax, %rax
je 0x599aa
movq 0x1ae0(%r15), %r12
movq 0x390(%r12), %rcx
cmpq 0x390(%rax), %rcx
jne 0x599aa
movl %esi, %ebx
testl %esi, %esi
je 0x599de
movq %rdi, %r14
leaq 0x8(%rdi), %rsi
movl $0x1, %edx
callq 0x46fad
testb %al, %al
je 0x599aa
cmpl %ebx, 0x2024(%r15)
je 0x599aa
cmpb $0x0, 0x93(%r12)
je 0x599b5
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
cmpb $0x0, 0x2006(%r15)
jne 0x599fd
movups (%r14), %xmm0
movups %xmm0, 0x2058(%r15)
movl %ebx, 0x2068(%r15)
movb $0x1, 0x2006(%r15)
movb $0x1, %al
jmp 0x599ac
leaq 0x60a90(%rip), %rdi     # 0xba475
leaq 0x5e779(%rip), %rsi     # 0xb8165
leaq 0x60c5a(%rip), %rcx     # 0xba64d
movl $0x25df, %edx           # imm = 0x25DF
callq 0xc140
leaq 0x60c88(%rip), %rdi     # 0xba68c
leaq 0x5e75a(%rip), %rsi     # 0xb8165
leaq 0x60c3b(%rip), %rcx     # 0xba64d
movl $0x25e5, %edx           # imm = 0x25E5
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/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 0xa42a6(%rip), %r14     # 0xfdcd0
cmpb $0x1, 0x2004(%r14)
jne 0x59a61
movq 0x1ae0(%r14), %rdi
movl 0x128(%rdi), %eax
testb $0x1, %al
je 0x59a61
movq 0x1af8(%r14), %rcx
testq %rcx, %rcx
je 0x59a61
movq 0x390(%rdi), %rdx
cmpq 0x390(%rcx), %rdx
je 0x59a68
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
andl $0x2, %eax
leaq (%rdi,%rax,8), %rbx
addq $0x12c, %rbx            # imm = 0x12C
movl 0x124(%rdi), %ecx
testl %ecx, %ecx
jne 0x59a8a
movq %rbx, %rsi
callq 0x467ac
movl %eax, %ecx
cmpl %ecx, 0x2024(%r14)
setne %al
je 0x59a63
cmpb $0x0, 0x2006(%r14)
jne 0x59abe
movups (%rbx), %xmm0
movups %xmm0, 0x2058(%r14)
movl %ecx, 0x2068(%r14)
movb $0x1, 0x2006(%r14)
movb $0x1, %al
jmp 0x59a63
leaq 0x60bc7(%rip), %rdi     # 0xba68c
leaq 0x5e699(%rip), %rsi     # 0xb8165
leaq 0x60bd9(%rip), %rcx     # 0xba6ac
movl $0x2604, %edx           # imm = 0x2604
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/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 0xa3ece(%rip), %rax     # 0xfdcd0
cmpb $0x0, 0x2004(%rax)
je 0x59e1d
cmpb $0x0, 0x2006(%rax)
je 0x59e3c
movb $0x0, 0x2006(%rax)
popq %rbp
retq
leaq 0x5ea8c(%rip), %rdi     # 0xb88b0
leaq 0x5e33a(%rip), %rsi     # 0xb8165
leaq 0x6090c(%rip), %rcx     # 0xba73e
movl $0x2646, %edx           # imm = 0x2646
callq 0xc140
leaq 0x6091b(%rip), %rdi     # 0xba75e
leaq 0x5e31b(%rip), %rsi     # 0xb8165
leaq 0x608ed(%rip), %rcx     # 0xba73e
movl $0x2647, %edx           # imm = 0x2647
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
testb %al, %al
je 0x59e9f
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 0xa3e07(%rip), %r13     # 0xfdcd0
cmpb $0x1, 0x3138(%r13)
jne 0x5a00d
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(%r13), %r14
cmpq $0x0, 0x3140(%r13)
je 0x59ffe
movl 0x314c(%r13), %eax
testl %eax, %eax
jns 0x59fac
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
xorl %r15d, %r15d
testl %ecx, %ecx
cmovgl %ecx, %r15d
movq 0xa3d96(%rip), %rax     # 0xfdcd0
testq %rax, %rax
je 0x59f45
incl 0x3b4(%rax)
movq 0xa3d94(%rip), %rsi     # 0xfdce0
movq %r15, %rdi
callq *0x9f5bb(%rip)          # 0xf9510
movq %rax, %r12
movq 0x3150(%r13), %rsi
testq %rsi, %rsi
je 0x59f9e
movslq 0x3148(%r13), %rdx
movq %r12, %rdi
callq 0xc080
movq 0x3150(%r13), %rdi
testq %rdi, %rdi
je 0x59f91
movq 0xa3d4a(%rip), %rax     # 0xfdcd0
testq %rax, %rax
je 0x59f91
decl 0x3b4(%rax)
movq 0xa3d48(%rip), %rsi     # 0xfdce0
callq *0x9f57a(%rip)          # 0xf9518
movq %r12, 0x3150(%r13)
movl %r15d, 0x314c(%r13)
xorl %r15d, %r15d
movl %r15d, 0x3148(%r13)
leaq -0x40(%rbp), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x43e0c
movq 0x3150(%r13), %rax
testq %rax, %rax
leaq 0xa3d02(%rip), %rdi     # 0xfdcd8
cmovneq %rax, %rdi
movl 0x3148(%r13), %eax
subl $0x1, %eax
cmovbl %r15d, %eax
movslq %eax, %rdx
movq 0x3140(%r13), %rcx
movl $0x1, %esi
callq 0xc8d0
jmp 0x5a00d
leaq -0x40(%rbp), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x43e0c
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq