LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::CreateContext(ImFontAtlas*)
ImGuiContext* ImGui::CreateContext(ImFontAtlas* shared_font_atlas)
{
    ImGuiContext* ctx = IM_NEW(ImGuiContext)(shared_font_atlas);
    if (GImGui == NULL)
        SetCurrentContext(ctx);
    Initialize(ctx);
    return ctx;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movl $0x3f80, %edi           # imm = 0x3F80
callq 0x3440d
movq %rax, %rbx
movq %rax, %rdi
movq %r14, %rsi
callq 0x4a32c
cmpq $0x0, 0xac242(%rip)     # 0xe3ce0
jne 0x37aa7
movq %rbx, 0xac239(%rip)     # 0xe3ce0
movq %rbx, %rdi
callq 0x37ab7
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::Initialize(ImGuiContext*)
void ImGui::Initialize(ImGuiContext* context)
{
    ImGuiContext& g = *context;
    IM_ASSERT(!g.Initialized && !g.SettingsLoaded);

    // Add .ini handle for ImGuiWindow type
    {
        ImGuiSettingsHandler ini_handler;
        ini_handler.TypeName = "Window";
        ini_handler.TypeHash = ImHashStr("Window");
        ini_handler.ClearAllFn = WindowSettingsHandler_ClearAll;
        ini_handler.ReadOpenFn = WindowSettingsHandler_ReadOpen;
        ini_handler.ReadLineFn = WindowSettingsHandler_ReadLine;
        ini_handler.ApplyAllFn = WindowSettingsHandler_ApplyAll;
        ini_handler.WriteAllFn = WindowSettingsHandler_WriteAll;
        g.SettingsHandlers.push_back(ini_handler);
    }

#ifdef IMGUI_HAS_TABLE
    // Add .ini handle for ImGuiTable type
    TableSettingsInstallHandler(context);
#endif // #ifdef IMGUI_HAS_TABLE

#ifdef IMGUI_HAS_DOCK
#endif // #ifdef IMGUI_HAS_DOCK

    g.Initialized = true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x50, %rsp
cmpb $0x0, (%rdi)
jne 0x37b67
movq %rdi, %rbx
cmpb $0x1, 0x30e1(%rdi)
je 0x37b67
xorps %xmm0, %xmm0
leaq -0x58(%rbp), %r14
movups %xmm0, 0x38(%r14)
movups %xmm0, 0x28(%r14)
movups %xmm0, 0x18(%r14)
movups %xmm0, 0x8(%r14)
leaq 0x698dd(%rip), %rdi     # 0xa13da
movq %rdi, (%r14)
xorl %esi, %esi
xorl %edx, %edx
callq 0x3479a
movl %eax, 0x8(%r14)
leaq 0x717c(%rip), %rax      # 0x3ec90
movq %rax, 0x10(%r14)
leaq 0x71c0(%rip), %rax      # 0x3ecdf
movq %rax, 0x20(%r14)
leaq 0x71d1(%rip), %rax      # 0x3ecfb
movq %rax, 0x28(%r14)
leaq 0x7260(%rip), %rax      # 0x3ed95
movq %rax, 0x30(%r14)
leaq 0x72b6(%rip), %rax      # 0x3edf6
movq %rax, 0x38(%r14)
leaq 0x30f8(%rbx), %rdi
movq %r14, %rsi
callq 0x4af14
movq %rbx, %rdi
callq 0x7659c
movb $0x1, (%rbx)
addq $0x50, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x65f82(%rip), %rdi     # 0x9daf0
leaq 0x65620(%rip), %rsi     # 0x9d195
leaq 0x65f98(%rip), %rcx     # 0x9db14
movl $0xf9e, %edx            # imm = 0xF9E
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::DestroyContext(ImGuiContext*)
void ImGui::DestroyContext(ImGuiContext* ctx)
{
    if (ctx == NULL)
        ctx = GImGui;
    Shutdown(ctx);
    if (GImGui == ctx)
        SetCurrentContext(NULL);
    IM_DELETE(ctx);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rdi, %rdi
jne 0x37b9b
movq 0xac145(%rip), %rbx     # 0xe3ce0
movq %rbx, %rdi
callq 0x37bc2
cmpq %rbx, 0xac136(%rip)     # 0xe3ce0
jne 0x37bb4
andq $0x0, 0xac12c(%rip)     # 0xe3ce0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x4abca
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::CallContextHooks(ImGuiContext*, ImGuiContextHookType)
void ImGui::CallContextHooks(ImGuiContext* ctx, ImGuiContextHookType hook_type)
{
    ImGuiContext& g = *ctx;
    for (int n = 0; n < g.Hooks.Size; n++)
        if (g.Hooks[n].Type == hook_type)
            g.Hooks[n].Callback(&g, &g.Hooks[n]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leaq 0x3128(%rdi), %r15
xorl %r12d, %r12d
cmpl (%r15), %r12d
jge 0x37e73
movq %r15, %rdi
movl %r12d, %esi
callq 0x4ac48
cmpl %ebx, (%rax)
jne 0x37e6e
movq %r15, %rdi
movl %r12d, %esi
callq 0x4ac48
movq 0x8(%rax), %r13
movq %r15, %rdi
movl %r12d, %esi
callq 0x4ac48
movq %r14, %rdi
movq %rax, %rsi
callq *%r13
incl %r12d
jmp 0x37e37
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::StartMouseMovingWindow(ImGuiWindow*)
void ImGui::StartMouseMovingWindow(ImGuiWindow* window)
{
    // Set ActiveId even if the _NoMove flag is set. Without it, dragging away from a window with _NoMove would activate hover on other windows.
    // We _also_ call this when clicking in a window empty space when io.ConfigWindowsMoveFromTitleBarOnly is set, but clear g.MovingWindow afterward.
    // This is because we want ActiveId to be set even when the window is not permitted to move.
    ImGuiContext& g = *GImGui;
    FocusWindow(window);
    SetActiveID(window->MoveId, window);
    g.NavDisableHighlight = true;
    g.ActiveIdNoClearOnFocusLoss = true;
    g.ActiveIdClickOffset = g.IO.MousePos - window->RootWindow->Pos;

    bool can_move_window = true;
    if ((window->Flags & ImGuiWindowFlags_NoMove) || (window->RootWindow->Flags & ImGuiWindowFlags_NoMove))
        can_move_window = false;
    if (can_move_window)
        g.MovingWindow = window;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0xabdac(%rip), %r14     # 0xe3ce0
callq 0x37fa1
movl 0x54(%rbx), %edi
movq %rbx, %rsi
callq 0x3739b
movb $0x1, %al
movb %al, 0x1ce6(%r14)
movb %al, 0x1b3e(%r14)
movq 0x390(%rbx), %rax
movss 0x128(%r14), %xmm0
movss 0x12c(%r14), %xmm1
subss 0x10(%rax), %xmm0
subss 0x14(%rax), %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movlps %xmm0, 0x1b58(%r14)
testb $0x4, 0xc(%rbx)
jne 0x37f9c
movq 0x390(%rbx), %rax
testb $0x4, 0xc(%rax)
jne 0x37f9c
movq %rbx, 0x1b00(%r14)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::FocusWindow(ImGuiWindow*)
void ImGui::FocusWindow(ImGuiWindow* window)
{
    ImGuiContext& g = *GImGui;

    if (g.NavWindow != window)
    {
        g.NavWindow = window;
        if (window && g.NavDisableMouseHover)
            g.NavMousePosDirty = true;
        g.NavInitRequest = false;
        g.NavId = window ? window->NavLastIds[0] : 0; // Restore NavId
        g.NavFocusScopeId = 0;
        g.NavIdIsAlive = false;
        g.NavLayer = ImGuiNavLayer_Main;
        //IMGUI_DEBUG_LOG("FocusWindow(\"%s\")\n", window ? window->Name : NULL);
    }

    // Close popups if any
    ClosePopupsOverWindow(window, false);

    // Move the root window to the top of the pile
    IM_ASSERT(window == NULL || window->RootWindow != NULL);
    ImGuiWindow* focus_front_window = window ? window->RootWindow : NULL; // NB: In docking branch this is window->RootWindowDockStop
    ImGuiWindow* display_front_window = window ? window->RootWindow : NULL;

    // Steal active widgets. Some of the cases it triggers includes:
    // - Focus a window while an InputText in another window is active, if focus happens before the old InputText can run.
    // - When using Nav to activate menu items (due to timing of activating on press->new window appears->losing ActiveId)
    if (g.ActiveId != 0 && g.ActiveIdWindow && g.ActiveIdWindow->RootWindow != focus_front_window)
        if (!g.ActiveIdNoClearOnFocusLoss)
            ClearActiveID();

    // Passing NULL allow to disable keyboard focus
    if (!window)
        return;

    // Bring to front
    BringWindowToFocusFront(focus_front_window);
    if (((window->Flags | display_front_window->Flags) & ImGuiWindowFlags_NoBringToFrontOnFocus) == 0)
        BringWindowToDisplayFront(display_front_window);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0xabd2b(%rip), %r15     # 0xe3ce0
cmpq %rdi, 0x1c90(%r15)
je 0x38015
movq %rbx, 0x1c90(%r15)
testq %rbx, %rbx
je 0x37fec
cmpb $0x1, 0x1ce7(%r15)
jne 0x37fdc
movb $0x1, 0x1ce5(%r15)
movb $0x0, 0x1ce9(%r15)
movl 0x3b0(%rbx), %eax
jmp 0x37ff6
movb $0x0, 0x1ce9(%r15)
xorl %eax, %eax
movl %eax, 0x1c98(%r15)
andl $0x0, 0x1c9c(%r15)
movb $0x0, 0x1ce4(%r15)
andl $0x0, 0x1cdc(%r15)
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x385f5
testq %rbx, %rbx
je 0x38033
movq 0x390(%rbx), %r14
testq %r14, %r14
je 0x38098
cmpl $0x0, 0x1b30(%r15)
je 0x38061
movq 0x1b60(%r15), %rax
testq %rax, %rax
je 0x38061
cmpq %r14, 0x390(%rax)
je 0x38061
cmpb $0x0, 0x1b3e(%r15)
jne 0x38061
callq 0x37444
testq %rbx, %rbx
je 0x3808d
movq %r14, %rdi
callq 0x4210e
movl 0xc(%r14), %eax
orl 0xc(%rbx), %eax
btl $0xd, %eax
jb 0x3808d
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x421a4
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x662e8(%rip), %rdi     # 0x9e387
leaq 0x650ef(%rip), %rsi     # 0x9d195
leaq 0x6630b(%rip), %rcx     # 0x9e3b8
movl $0x1889, %edx           # imm = 0x1889
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::UpdateMouseMovingWindowNewFrame()
void ImGui::UpdateMouseMovingWindowNewFrame()
{
    ImGuiContext& g = *GImGui;
    if (g.MovingWindow != NULL)
    {
        // We actually want to move the root window. g.MovingWindow == window we clicked on (could be a child window).
        // We track it to preserve Focus and so that generally ActiveIdWindow == MovingWindow and ActiveId == MovingWindow->MoveId for consistency.
        KeepAliveID(g.ActiveId);
        IM_ASSERT(g.MovingWindow && g.MovingWindow->RootWindow);
        ImGuiWindow* moving_window = g.MovingWindow->RootWindow;
        if (g.IO.MouseDown[0] && IsMousePosValid(&g.IO.MousePos))
        {
            ImVec2 pos = g.IO.MousePos - g.ActiveIdClickOffset;
            if (moving_window->Pos.x != pos.x || moving_window->Pos.y != pos.y)
            {
                MarkIniSettingsDirty(moving_window);
                SetWindowPos(moving_window, pos, ImGuiCond_Always);
            }
            FocusWindow(g.MovingWindow);
        }
        else
        {
            ClearActiveID();
            g.MovingWindow = NULL;
        }
    }
    else
    {
        // When clicking/dragging from a window that has the _NoMove flag, we still set the ActiveId in order to prevent hovering others.
        if (g.ActiveIdWindow && g.ActiveIdWindow->MoveId == g.ActiveId)
        {
            KeepAliveID(g.ActiveId);
            if (!g.IO.MouseDown[0])
                ClearActiveID();
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq 0xabc17(%rip), %r14     # 0xe3ce0
cmpq $0x0, 0x1b00(%r14)
je 0x38197
movl 0x1b30(%r14), %edi
callq 0x370fd
movq 0x1b00(%r14), %rax
testq %rax, %rax
je 0x381d4
movq 0x390(%rax), %rbx
testq %rbx, %rbx
je 0x381d4
cmpb $0x1, 0x130(%r14)
jne 0x38188
leaq 0x128(%r14), %rdi
callq 0x381f3
testb %al, %al
je 0x38188
movss 0x128(%r14), %xmm1
movss 0x12c(%r14), %xmm0
subss 0x1b58(%r14), %xmm1
subss 0x1b5c(%r14), %xmm0
movaps %xmm1, %xmm2
unpcklps %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
movlps %xmm2, -0x18(%rbp)
movss 0x10(%rbx), %xmm2
ucomiss %xmm1, %xmm2
jne 0x38163
jp 0x38163
movss 0x14(%rbx), %xmm1
ucomiss %xmm0, %xmm1
jne 0x38163
jnp 0x3817a
movq %rbx, %rdi
callq 0x38255
leaq -0x18(%rbp), %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq 0x38281
movq 0x1b00(%r14), %rdi
callq 0x37fa1
jmp 0x381be
callq 0x37444
andq $0x0, 0x1b00(%r14)
jmp 0x381be
movq 0x1b60(%r14), %rax
testq %rax, %rax
je 0x381be
movl 0x54(%rax), %edi
cmpl 0x1b30(%r14), %edi
jne 0x381be
callq 0x370fd
cmpb $0x0, 0x130(%r14)
je 0x381c7
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x37444
leaq 0x6582c(%rip), %rdi     # 0x9da07
leaq 0x64fb3(%rip), %rsi     # 0x9d195
leaq 0x6584b(%rip), %rcx     # 0x9da34
movl $0xd6c, %edx            # imm = 0xD6C
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::IsMousePosValid(ImVec2 const*)
bool ImGui::IsMousePosValid(const ImVec2* mouse_pos)
{
    // The assert is only to silence a false-positive in XCode Static Analysis.
    // Because GImGui is not dereferenced in every code path, the static analyzer assume that it may be NULL (which it doesn't for other functions).
    IM_ASSERT(GImGui != NULL);
    const float MOUSE_INVALID = -256000.0f;
    ImVec2 p = mouse_pos ? *mouse_pos : GImGui->IO.MousePos;
    return p.x >= MOUSE_INVALID && p.y >= MOUSE_INVALID;
}

// Assembly:
movq 0xabae6(%rip), %rax     # 0xe3ce0
testq %rax, %rax
je 0x38232
addq $0x128, %rax            # imm = 0x128
testq %rdi, %rdi
cmovneq %rdi, %rax
movss 0x4(%rax), %xmm0
movss (%rax), %xmm1
movss 0x6467b(%rip), %xmm2    # 0x9c898
movaps %xmm2, %xmm3
cmpleps %xmm1, %xmm3
cmpleps %xmm0, %xmm2
andps %xmm3, %xmm2
movd %xmm2, %eax
andb $0x1, %al
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x65cbe(%rip), %rdi     # 0x9defb
leaq 0x64f51(%rip), %rsi     # 0x9d195
leaq 0x65cc1(%rip), %rcx     # 0x9df0c
movl $0x120a, %edx           # imm = 0x120A
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::SetWindowPos(ImGuiWindow*, ImVec2 const&, int)
void ImGui::SetWindowPos(ImGuiWindow* window, const ImVec2& pos, ImGuiCond cond)
{
    // Test condition (NB: bit 0 is always true) and clear flags for next time
    if (cond && (window->SetWindowPosAllowFlags & cond) == 0)
        return;

    IM_ASSERT(cond == 0 || ImIsPowerOfTwo(cond)); // Make sure the user doesn't attempt to combine multiple condition flags.
    window->SetWindowPosAllowFlags &= ~(ImGuiCond_Once | ImGuiCond_FirstUseEver | ImGuiCond_Appearing);
    window->SetWindowPosVal = ImVec2(FLT_MAX, FLT_MAX);

    // Set
    const ImVec2 old_pos = window->Pos;
    window->Pos = ImFloor(pos);
    ImVec2 offset = window->Pos - old_pos;
    window->DC.CursorPos += offset;         // As we happen to move the window while it is being appended to (which is a bad idea - will smear) let's at least offset the cursor
    window->DC.CursorMaxPos += offset;      // And more importantly we need to offset CursorMaxPos/CursorStartPos this so ContentSize calculation doesn't get affected.
    window->DC.CursorStartPos += offset;
}

// Assembly:
movl 0xaf(%rdi), %eax
testl %edx, %edx
je 0x382a1
movsbl %al, %ecx
testl %edx, %ecx
je 0x3835e
leal -0x1(%rdx), %ecx
testl %ecx, %edx
jne 0x3835f
andl $-0xf, %eax
movl %eax, 0xaf(%rdi)
movabsq $0x7f7fffff7f7fffff, %rax # imm = 0x7F7FFFFF7F7FFFFF
movq %rax, 0xb4(%rdi)
movss (%rsi), %xmm0
movss 0x4(%rsi), %xmm1
cvttps2dq %xmm0, %xmm0
cvtdq2ps %xmm0, %xmm0
cvttps2dq %xmm1, %xmm1
cvtdq2ps %xmm1, %xmm1
movaps %xmm0, %xmm2
unpcklps %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
movss 0x10(%rdi), %xmm3
subss %xmm3, %xmm0
movss 0x14(%rdi), %xmm3
subss %xmm3, %xmm1
movlps %xmm2, 0x10(%rdi)
movss 0xd8(%rdi), %xmm2
addss %xmm0, %xmm2
movss %xmm2, 0xd8(%rdi)
movss 0xdc(%rdi), %xmm2
addss %xmm1, %xmm2
movss %xmm2, 0xdc(%rdi)
movss 0xf0(%rdi), %xmm2
addss %xmm0, %xmm2
movss %xmm2, 0xf0(%rdi)
movss 0xf4(%rdi), %xmm2
addss %xmm1, %xmm2
movss %xmm2, 0xf4(%rdi)
addss 0xe8(%rdi), %xmm0
movss %xmm0, 0xe8(%rdi)
addss 0xec(%rdi), %xmm1
movss %xmm1, 0xec(%rdi)
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x661e2(%rip), %rdi     # 0x9e54c
leaq 0x64e24(%rip), %rsi     # 0x9d195
leaq 0x661f6(%rip), %rcx     # 0x9e56e
movl $0x198e, %edx           # imm = 0x198E
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::IsPopupOpen(unsigned int, int)
bool ImGui::IsPopupOpen(ImGuiID id, ImGuiPopupFlags popup_flags)
{
    ImGuiContext& g = *GImGui;
    if (popup_flags & ImGuiPopupFlags_AnyPopupId)
    {
        // Return true if any popup is open at the current BeginPopup() level of the popup stack
        // This may be used to e.g. test for another popups already opened to handle popups priorities at the same level.
        IM_ASSERT(id == 0);
        if (popup_flags & ImGuiPopupFlags_AnyPopupLevel)
            return g.OpenPopupStack.Size > 0;
        else
            return g.OpenPopupStack.Size > g.BeginPopupStack.Size;
    }
    else
    {
        if (popup_flags & ImGuiPopupFlags_AnyPopupLevel)
        {
            // Return true if the popup is open anywhere in the popup stack
            for (int n = 0; n < g.OpenPopupStack.Size; n++)
                if (g.OpenPopupStack[n].PopupId == id)
                    return true;
            return false;
        }
        else
        {
            // Return true if the popup is open at the current BeginPopup() level of the popup stack (this is the most-common query)
            return g.OpenPopupStack.Size > g.BeginPopupStack.Size && g.OpenPopupStack[g.BeginPopupStack.Size].PopupId == id;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edi, %ebx
movq 0xab81d(%rip), %rax     # 0xe3ce0
testb %sil, %sil
js 0x384f3
leaq 0x1c70(%rax), %r15
btl $0x8, %esi
jb 0x3850b
movl 0x1c80(%rax), %esi
cmpl %esi, 0x1c70(%rax)
jle 0x38533
movq %r15, %rdi
callq 0x4b386
cmpl %ebx, (%rax)
sete %r14b
jmp 0x38536
testl %ebx, %ebx
jne 0x38542
btl $0x8, %esi
movl 0x1c70(%rax), %ecx
jb 0x3852b
cmpl 0x1c80(%rax), %ecx
jmp 0x3852d
xorl %r12d, %r12d
cmpl (%r15), %r12d
setl %r14b
jge 0x38536
movq %r15, %rdi
movl %r12d, %esi
callq 0x4b386
incl %r12d
cmpl %ebx, (%rax)
jne 0x3850e
jmp 0x38536
testl %ecx, %ecx
setg %r14b
jmp 0x38536
xorl %r14d, %r14d
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x66adc(%rip), %rdi     # 0x9f025
leaq 0x64c45(%rip), %rsi     # 0x9d195
leaq 0x66ad6(%rip), %rcx     # 0x9f02d
movl $0x1ec4, %edx           # imm = 0x1EC4
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::GetTopMostPopupModal()
ImGuiWindow* ImGui::GetTopMostPopupModal()
{
    ImGuiContext& g = *GImGui;
    for (int n = g.OpenPopupStack.Size - 1; n >= 0; n--)
        if (ImGuiWindow* popup = g.OpenPopupStack.Data[n].Window)
            if (popup->Flags & ImGuiWindowFlags_Modal)
                return popup;
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0xab774(%rip), %rcx     # 0xe3ce0
movl 0x1c70(%rcx), %edx
imulq $0x30, %rdx, %rsi
addq $-0x28, %rsi
testl %edx, %edx
jle 0x3859c
movq 0x1c78(%rcx), %rax
movq (%rax,%rsi), %rax
testq %rax, %rax
je 0x38594
testb $0x8, 0xf(%rax)
jne 0x3859e
decl %edx
addq $-0x30, %rsi
jmp 0x3857a
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::IsWindowAbove(ImGuiWindow*, ImGuiWindow*)
bool ImGui::IsWindowAbove(ImGuiWindow* potential_above, ImGuiWindow* potential_below)
{
    ImGuiContext& g = *GImGui;
    for (int i = g.Windows.Size - 1; i >= 0; i--)
    {
        ImGuiWindow* candidate_window = g.Windows[i];
        if (candidate_window == potential_above)
            return true;
        if (candidate_window == potential_below)
            return false;
    }
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0xab728(%rip), %r15     # 0xe3ce0
movl 0x1a88(%r15), %r12d
addq $0x1a88, %r15           # imm = 0x1A88
testl %r12d, %r12d
jle 0x385e6
decl %r12d
movq %r15, %rdi
movl %r12d, %esi
callq 0x4ad62
movq (%rax), %rax
cmpq %r14, %rax
je 0x385ea
cmpq %rbx, %rax
jne 0x385c6
xorl %eax, %eax
jmp 0x385ec
movb $0x1, %al
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::IsWindowChildOf(ImGuiWindow*, ImGuiWindow*)
bool ImGui::IsWindowChildOf(ImGuiWindow* window, ImGuiWindow* potential_parent)
{
    if (window->RootWindow == potential_parent)
        return true;
    while (window != NULL)
    {
        if (window == potential_parent)
            return true;
        window = window->ParentWindow;
    }
    return false;
}

// Assembly:
cmpq %rsi, 0x390(%rdi)
je 0x38b20
pushq %rbp
movq %rsp, %rbp
testq %rdi, %rdi
setne %al
cmpq %rsi, %rdi
je 0x38b1e
testq %rdi, %rdi
je 0x38b1e
movq 0x388(%rdi), %rdi
jmp 0x38b05
popq %rbp
retq
movb $0x1, %al
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::GetMergedKeyModFlags()
ImGuiKeyModFlags ImGui::GetMergedKeyModFlags()
{
    ImGuiContext& g = *GImGui;
    ImGuiKeyModFlags key_mod_flags = ImGuiKeyModFlags_None;
    if (g.IO.KeyCtrl)   { key_mod_flags |= ImGuiKeyModFlags_Ctrl; }
    if (g.IO.KeyShift)  { key_mod_flags |= ImGuiKeyModFlags_Shift; }
    if (g.IO.KeyAlt)    { key_mod_flags |= ImGuiKeyModFlags_Alt; }
    if (g.IO.KeySuper)  { key_mod_flags |= ImGuiKeyModFlags_Super; }
    return key_mod_flags;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0xab1b2(%rip), %rax     # 0xe3ce0
movzbl 0x140(%rax), %ecx
leal 0x2(%rcx), %edx
cmpb $0x0, 0x141(%rax)
cmovel %ecx, %edx
leal 0x4(%rdx), %ecx
cmpb $0x0, 0x142(%rax)
cmovel %edx, %ecx
cmpb $0x0, 0x143(%rax)
leal 0x8(%rcx), %eax
cmovel %ecx, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::SetCurrentFont(ImFont*)
void ImGui::SetCurrentFont(ImFont* font)
{
    ImGuiContext& g = *GImGui;
    IM_ASSERT(font && font->IsLoaded());    // Font Atlas not created. Did you call io.Fonts->GetTexDataAsRGBA32 / GetTexDataAsAlpha8 ?
    IM_ASSERT(font->Scale > 0.0f);
    g.Font = font;
    g.FontBaseSize = ImMax(1.0f, g.IO.FontGlobalScale * g.Font->FontSize * g.Font->Scale);
    g.FontSize = g.CurrentWindow ? g.CurrentWindow->CalcFontSize() : 0.0f;

    ImFontAtlas* atlas = g.Font->ContainerAtlas;
    g.DrawListSharedData.TexUvWhitePixel = atlas->TexUvWhitePixel;
    g.DrawListSharedData.TexUvLines = atlas->TexUvLines;
    g.DrawListSharedData.Font = g.Font;
    g.DrawListSharedData.FontSize = g.FontSize;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x3b9a7
movq 0x40(%rdi), %rcx
testq %rcx, %rcx
je 0x3b9a7
movss 0x58(%rdi), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm1
jbe 0x3b9c6
movq 0xa83b8(%rip), %rbx     # 0xe3ce0
movq %rdi, 0x1978(%rbx)
movss 0xb0(%rbx), %xmm2
mulss 0x14(%rdi), %xmm2
mulss %xmm2, %xmm1
movss 0x606b0(%rip), %xmm2    # 0x9bff8
maxss %xmm1, %xmm2
movss %xmm2, 0x1984(%rbx)
movq 0x1ae0(%rbx), %rax
testq %rax, %rax
je 0x3b973
movq %rax, %rdi
callq 0x4b6fc
movq 0x1978(%rbx), %rdi
movq 0x40(%rdi), %rcx
movss %xmm0, 0x1980(%rbx)
movq 0x38(%rcx), %rax
movq %rax, 0x1988(%rbx)
addq $0x70, %rcx
movq %rcx, 0x1a58(%rbx)
movq %rdi, 0x1990(%rbx)
movss %xmm0, 0x1998(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x62a31(%rip), %rdi     # 0x9e3df
leaq 0x617e0(%rip), %rsi     # 0x9d195
leaq 0x62a3c(%rip), %rcx     # 0x9e3f8
movl $0x18bb, %edx           # imm = 0x18BB
callq 0xc140
leaq 0x62a50(%rip), %rdi     # 0x9e41d
leaq 0x617c1(%rip), %rsi     # 0x9d195
leaq 0x62a1d(%rip), %rcx     # 0x9e3f8
movl $0x18bc, %edx           # imm = 0x18BC
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::FocusTopMostWindowUnderOne(ImGuiWindow*, ImGuiWindow*)
void ImGui::FocusTopMostWindowUnderOne(ImGuiWindow* under_this_window, ImGuiWindow* ignore_window)
{
    ImGuiContext& g = *GImGui;

    int start_idx = g.WindowsFocusOrder.Size - 1;
    if (under_this_window != NULL)
    {
        int under_this_window_idx = FindWindowFocusIndex(under_this_window);
        if (under_this_window_idx != -1)
            start_idx = under_this_window_idx - 1;
    }
    for (int i = start_idx; i >= 0; i--)
    {
        // We may later decide to test for different NoXXXInputs based on the active navigation input (mouse vs nav) but that may feel more confusing to the user.
        ImGuiWindow* window = g.WindowsFocusOrder[i];
        if (window != ignore_window && window->WasActive && !(window->Flags & ImGuiWindowFlags_ChildWindow))
            if ((window->Flags & (ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_NoNavInputs)) != (ImGuiWindowFlags_NoMouseInputs | ImGuiWindowFlags_NoNavInputs))
            {
                ImGuiWindow* focus_window = NavRestoreLastChildNavWindow(window);
                FocusWindow(focus_window);
                return;
            }
    }
    FocusWindow(NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq 0xa82e7(%rip), %r14     # 0xe3ce0
movl 0x1a98(%r14), %r15d
decl %r15d
testq %rdi, %rdi
je 0x3ba17
callq 0x422d0
leal -0x1(%rax), %ecx
cmpl $-0x1, %eax
cmovnel %ecx, %r15d
addq $0x1a98, %r14           # imm = 0x1A98
testl %r15d, %r15d
js 0x3ba5e
movq %r14, %rdi
movl %r15d, %esi
callq 0x4ad62
movq (%rax), %rax
cmpq %rbx, %rax
je 0x3ba59
cmpb $0x1, 0x8f(%rax)
jne 0x3ba59
movl 0xc(%rax), %ecx
movl %ecx, %edx
shrl $0x18, %edx
andl $0x1, %edx
notl %ecx
testl $0x40200, %ecx          # imm = 0x40200
sete %cl
orb %dl, %cl
je 0x3ba6f
decl %r15d
jmp 0x3ba1e
xorl %edi, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x37fa1
movq 0x3a8(%rax), %rdi
testq %rdi, %rdi
je 0x3ba84
cmpb $0x0, 0x8f(%rdi)
jne 0x3ba60
movq %rax, %rdi
jmp 0x3ba60
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::SetNextWindowSize(ImVec2 const&, int)
void ImGui::SetNextWindowSize(const ImVec2& size, ImGuiCond cond)
{
    ImGuiContext& g = *GImGui;
    IM_ASSERT(cond == 0 || ImIsPowerOfTwo(cond)); // Make sure the user doesn't attempt to combine multiple condition flags.
    g.NextWindowData.Flags |= ImGuiNextWindowDataFlags_HasSize;
    g.NextWindowData.SizeVal = size;
    g.NextWindowData.SizeCond = cond ? cond : ImGuiCond_Always;
}

// Assembly:
leal -0x1(%rsi), %eax
testl %eax, %esi
jne 0x3bab5
movq 0xa8249(%rip), %rax     # 0xe3ce0
orl $0x2, 0x1b88(%rax)
movq (%rdi), %rcx
movq %rcx, 0x1ba8(%rax)
cmpl $0x1, %esi
adcl $0x0, %esi
movl %esi, 0x1b90(%rax)
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x62a8c(%rip), %rdi     # 0x9e54c
leaq 0x616ce(%rip), %rsi     # 0x9d195
leaq 0x62bde(%rip), %rcx     # 0x9e6ac
movl $0x1a20, %edx           # imm = 0x1A20
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: WindowSettingsHandler_ClearAll(ImGuiContext*, ImGuiSettingsHandler*)
static void WindowSettingsHandler_ClearAll(ImGuiContext* ctx, ImGuiSettingsHandler*)
{
    ImGuiContext& g = *ctx;
    for (int i = 0; i != g.Windows.Size; i++)
        g.Windows[i]->SettingsOffset = -1;
    g.SettingsWindows.clear();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1a88(%rdi), %r14
xorl %r15d, %r15d
cmpl (%r14), %r15d
je 0x3ecc6
movq %r14, %rdi
movl %r15d, %esi
callq 0x4ad62
movq (%rax), %rax
orl $-0x1, 0x2b4(%rax)
incl %r15d
jmp 0x3eca7
addq $0x3108, %rbx           # imm = 0x3108
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4b1ac
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: WindowSettingsHandler_ReadOpen(ImGuiContext*, ImGuiSettingsHandler*, char const*)
static void* WindowSettingsHandler_ReadOpen(ImGuiContext*, ImGuiSettingsHandler*, const char* name)
{
    ImGuiWindowSettings* settings = ImGui::FindOrCreateWindowSettings(name);
    ImGuiID id = settings->ID;
    *settings = ImGuiWindowSettings(); // Clear existing if recycling previous entry
    settings->ID = id;
    settings->WantApply = true;
    return (void*)settings;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdx, %rdi
callq 0x467e5
andw $0x0, 0xc(%rax)
andq $0x0, 0x4(%rax)
movb $0x1, 0xd(%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: WindowSettingsHandler_ApplyAll(ImGuiContext*, ImGuiSettingsHandler*)
static void WindowSettingsHandler_ApplyAll(ImGuiContext* ctx, ImGuiSettingsHandler*)
{
    ImGuiContext& g = *ctx;
    for (ImGuiWindowSettings* settings = g.SettingsWindows.begin(); settings != NULL; settings = g.SettingsWindows.next_chunk(settings))
        if (settings->WantApply)
        {
            if (ImGuiWindow* window = ImGui::FindWindowByID(settings->ID))
                ApplyWindowSettings(window, settings);
            settings->WantApply = false;
        }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x3110(%rdi), %rax
addq $0x3108, %rbx           # imm = 0x3108
leaq 0x4(%rax), %r14
testq %rax, %rax
cmoveq %rax, %r14
testq %r14, %r14
je 0x3edf1
cmpb $0x1, 0xd(%r14)
jne 0x3ede1
movl (%r14), %edi
callq 0x412ab
testq %rax, %rax
je 0x3eddc
movq %rax, %rdi
movq %r14, %rsi
callq 0x491bc
movb $0x0, 0xd(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4ba3e
movq %rax, %r14
jmp 0x3edb8
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::SaveIniSettingsToDisk(char const*)
void ImGui::SaveIniSettingsToDisk(const char* ini_filename)
{
    ImGuiContext& g = *GImGui;
    g.SettingsDirtyTimer = 0.0f;
    if (!ini_filename)
        return;

    size_t ini_data_size = 0;
    const char* ini_data = SaveIniSettingsToMemory(&ini_data_size);
    ImFileHandle f = ImFileOpen(ini_filename, "wt");
    if (!f)
        return;
    ImFileWrite(ini_data, sizeof(char), ini_data_size, f);
    ImFileClose(f);
}

// Assembly:
movq 0xa4cf1(%rip), %rax     # 0xe3ce0
andl $0x0, 0x30e4(%rax)
testq %rdi, %rdi
je 0x3f052
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
leaq -0x18(%rbp), %rdi
andq $0x0, (%rdi)
callq 0x46b8b
movq %rax, %rbx
leaq 0x608bf(%rip), %rsi     # 0x9f8df
movq %r14, %rdi
callq 0xc9d0
testq %rax, %rax
je 0x3f04a
movq %rax, %r14
movq -0x18(%rbp), %rdx
pushq $0x1
popq %rsi
movq %rbx, %rdi
movq %rax, %rcx
callq 0xc910
movq %r14, %rdi
callq 0x3483a
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImDrawDataBuilder::FlattenIntoSingleLayer()
void ImDrawDataBuilder::FlattenIntoSingleLayer()
{
    int n = Layers[0].Size;
    int size = n;
    for (int i = 1; i < IM_ARRAYSIZE(Layers); i++)
        size += Layers[i].Size;
    Layers[0].resize(size);
    for (int layer_n = 1; layer_n < IM_ARRAYSIZE(Layers); layer_n++)
    {
        ImVector<ImDrawList*>& layer = Layers[layer_n];
        if (layer.empty())
            continue;
        memcpy(&Layers[0][n], &layer[0], layer.Size * sizeof(ImDrawList*));
        n += layer.Size;
        layer.resize(0);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl (%rdi), %r14d
leaq 0x10(%rdi), %r15
movl 0x10(%rdi), %esi
addl %r14d, %esi
callq 0x4b22a
movb $0x1, %r13b
testb $0x1, %r13b
je 0x3f0c4
cmpl $0x0, (%r15)
je 0x3f0c4
movq %rbx, %rdi
movl %r14d, %esi
callq 0x4b268
movq %rax, %r12
xorl %r13d, %r13d
movq %r15, %rdi
xorl %esi, %esi
callq 0x4b268
movslq 0x10(%rbx), %rdx
shlq $0x3, %rdx
movq %r12, %rdi
movq %rax, %rsi
callq 0xc080
addl 0x10(%rbx), %r14d
movq %r15, %rdi
xorl %esi, %esi
callq 0x4b22a
jmp 0x3f07a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::End()
void ImGui::End()
{
    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = g.CurrentWindow;

    // Error checking: verify that user hasn't called End() too many times!
    if (g.CurrentWindowStack.Size <= 1 && g.WithinFrameScopeWithImplicitWindow)
    {
        IM_ASSERT_USER_ERROR(g.CurrentWindowStack.Size > 1, "Calling End() too many times!");
        return;
    }
    IM_ASSERT(g.CurrentWindowStack.Size > 0);

    // Error checking: verify that user doesn't directly call End() on a child window.
    if (window->Flags & ImGuiWindowFlags_ChildWindow)
        IM_ASSERT_USER_ERROR(g.WithinEndChild, "Must call EndChild() and not End()!");

    // Close anything that is open
    if (window->DC.CurrentColumns)
        EndColumns();
    PopClipRect();   // Inner window clip rectangle

    // Stop logging
    if (!(window->Flags & ImGuiWindowFlags_ChildWindow))    // FIXME: add more options for scope of logging
        LogFinish();

    // Pop from window stack
    g.CurrentWindowStack.pop_back();
    if (window->Flags & ImGuiWindowFlags_Popup)
        g.BeginPopupStack.pop_back();
    window->DC.StackSizesOnBegin.CompareWithCurrentState();
    SetCurrentWindow(g.CurrentWindowStack.empty() ? NULL : g.CurrentWindowStack.back());
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0xa4377(%rip), %r14     # 0xe3ce0
movq 0x1ae0(%r14), %rbx
movl 0x1ab8(%r14), %eax
cmpl $0x1, %eax
jg 0x3f993
cmpb $0x1, 0x1a75(%r14)
je 0x3fa1d
cmpl $0x1, %eax
jne 0x3fa3c
testb $0x1, 0xf(%rbx)
je 0x3f9a7
cmpb $0x0, 0x1a76(%r14)
je 0x3fa5b
cmpq $0x0, 0x1b0(%rbx)
je 0x3f9b6
callq 0x780e5
leaq 0x1ab8(%r14), %r15
callq 0x3f128
testb $0x1, 0xf(%rbx)
jne 0x3f9cd
callq 0x41ef0
movq %r15, %rdi
callq 0x4b6a0
testb $0x4, 0xf(%rbx)
je 0x3f9ea
addq $0x1c80, %r14           # imm = 0x1C80
movq %r14, %rdi
callq 0x4b6ce
addq $0x1f8, %rbx            # imm = 0x1F8
movq %rbx, %rdi
callq 0x41fba
cmpl $0x0, (%r15)
je 0x3fa0c
movq %r15, %rdi
callq 0x4b3bc
movq (%rax), %rdi
jmp 0x3fa0e
xorl %edi, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x41a6d
leaq 0x5e8b4(%rip), %rdi     # 0x9e2d8
leaq 0x5d76a(%rip), %rsi     # 0x9d195
leaq 0x5e8e9(%rip), %rcx     # 0x9e31b
movl $0x182e, %edx           # imm = 0x182E
callq 0xc140
leaq 0x5e8ea(%rip), %rdi     # 0x9e32d
leaq 0x5d74b(%rip), %rsi     # 0x9d195
leaq 0x5e8ca(%rip), %rcx     # 0x9e31b
movl $0x1831, %edx           # imm = 0x1831
callq 0xc140
leaq 0x5e8e9(%rip), %rdi     # 0x9e34b
leaq 0x5d72c(%rip), %rsi     # 0x9d195
leaq 0x5e8ab(%rip), %rcx     # 0x9e31b
movl $0x1835, %edx           # imm = 0x1835
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::ClearDragDrop()
void ImGui::ClearDragDrop()
{
    ImGuiContext& g = *GImGui;
    g.DragDropActive = false;
    g.DragDropPayload.Clear();
    g.DragDropAcceptFlags = ImGuiDragDropFlags_None;
    g.DragDropAcceptIdCurr = g.DragDropAcceptIdPrev = 0;
    g.DragDropAcceptIdCurrRectSurface = FLT_MAX;
    g.DragDropAcceptFrameCount = -1;

    g.DragDropPayloadBufHeap.clear();
    memset(&g.DragDropPayloadBufLocal, 0, sizeof(g.DragDropPayloadBufLocal));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0xa4220(%rip), %rbx     # 0xe3ce0
xorl %eax, %eax
movb %al, 0x2004(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x2030(%rbx)
movups %xmm0, 0x2040(%rbx)
movb %al, 0x2050(%rbx)
movups %xmm0, 0x2018(%rbx)
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
movq %rax, 0x2028(%rbx)
andw $0x0, 0x2051(%rbx)
andl $0x0, 0x206c(%rbx)
movq %rax, 0x2078(%rbx)
movq $0x7f7fffff, 0x2070(%rbx) # imm = 0x7F7FFFFF
leaq 0x2088(%rbx), %rdi
callq 0x4b95c
xorps %xmm0, %xmm0
movups %xmm0, 0x2098(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: AddWindowToSortBuffer(ImVector<ImGuiWindow*>*, ImGuiWindow*)
static void AddWindowToSortBuffer(ImVector<ImGuiWindow*>* out_sorted_windows, ImGuiWindow* window)
{
    out_sorted_windows->push_back(window);
    if (window->Active)
    {
        int count = window->DC.ChildWindows.Size;
        if (count > 1)
            ImQsort(window->DC.ChildWindows.Data, (size_t)count, sizeof(ImGuiWindow*), ChildWindowComparer);
        for (int i = 0; i < count; i++)
        {
            ImGuiWindow* child = window->DC.ChildWindows[i];
            if (child->Active)
                AddWindowToSortBuffer(out_sorted_windows, child);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq -0x28(%rbp), %r14
movq %rsi, (%r14)
movq %r14, %rsi
callq 0x4b3f4
movq (%r14), %rax
cmpb $0x1, 0x8e(%rax)
jne 0x3fc40
movslq 0x198(%rax), %r14
cmpq $0x2, %r14
jl 0x3fc03
movq 0x1a0(%rax), %rdi
leaq 0x9510(%rip), %rcx      # 0x49108
pushq $0x8
popq %rdx
movq %r14, %rsi
callq 0xc650
xorl %r15d, %r15d
testl %r14d, %r14d
cmovlel %r15d, %r14d
movl $0x198, %r12d           # imm = 0x198
cmpl %r15d, %r14d
je 0x3fc40
movq -0x28(%rbp), %rdi
addq %r12, %rdi
movl %r15d, %esi
callq 0x4ad62
movq (%rax), %rsi
cmpb $0x1, 0x8e(%rsi)
jne 0x3fc3b
movq %rbx, %rdi
callq 0x3fbb0
incl %r15d
jmp 0x3fc13
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::IsKeyDown(int)
bool ImGui::IsKeyDown(int user_key_index)
{
    if (user_key_index < 0)
        return false;
    ImGuiContext& g = *GImGui;
    IM_ASSERT(user_key_index >= 0 && user_key_index < IM_ARRAYSIZE(g.IO.KeysDown));
    return g.IO.KeysDown[user_key_index];
}

// Assembly:
testl %edi, %edi
js 0x4001b
cmpl $0x200, %edi            # imm = 0x200
jae 0x4001e
movq 0xa3ccf(%rip), %rax     # 0xe3ce0
movl %edi, %ecx
movb 0x144(%rax,%rcx), %al
retq
xorl %eax, %eax
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x5dc03(%rip), %rdi     # 0x9dc2c
leaq 0x5d165(%rip), %rsi     # 0x9d195
leaq 0x5dc57(%rip), %rcx     # 0x9dc8e
movl $0x1185, %edx           # imm = 0x1185
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::CalcTypematicRepeatAmount(float, float, float, float)
int ImGui::CalcTypematicRepeatAmount(float t0, float t1, float repeat_delay, float repeat_rate)
{
    if (t1 == 0.0f)
        return 1;
    if (t0 >= t1)
        return 0;
    if (repeat_rate <= 0.0f)
        return (t0 < repeat_delay) && (t1 >= repeat_delay);
    const int count_t0 = (t0 < repeat_delay) ? -1 : (int)((t0 - repeat_delay) / repeat_rate);
    const int count_t1 = (t1 < repeat_delay) ? -1 : (int)((t1 - repeat_delay) / repeat_rate);
    const int count = count_t1 - count_t0;
    return count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorps %xmm4, %xmm4
ucomiss %xmm4, %xmm1
jne 0x40056
jp 0x40056
movl $0x1, %eax
jmp 0x400a1
xorl %eax, %eax
ucomiss %xmm1, %xmm0
jae 0x400a1
ucomiss %xmm3, %xmm4
jae 0x4008f
ucomiss %xmm0, %xmm2
subss %xmm2, %xmm0
divss %xmm3, %xmm0
cvttss2si %xmm0, %ecx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
cmoval %edx, %ecx
ucomiss %xmm1, %xmm2
subss %xmm2, %xmm1
divss %xmm3, %xmm1
cvttss2si %xmm1, %eax
cmoval %edx, %eax
subl %ecx, %eax
jmp 0x400a1
cmpltps %xmm2, %xmm0
cmpleps %xmm1, %xmm2
andps %xmm0, %xmm2
movd %xmm2, %eax
andl $0x1, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::GetKeyPressedAmount(int, float, float)
int ImGui::GetKeyPressedAmount(int key_index, float repeat_delay, float repeat_rate)
{
    ImGuiContext& g = *GImGui;
    if (key_index < 0)
        return 0;
    IM_ASSERT(key_index >= 0 && key_index < IM_ARRAYSIZE(g.IO.KeysDown));
    const float t = g.IO.KeysDownDuration[key_index];
    return CalcTypematicRepeatAmount(t - g.IO.DeltaTime, t, repeat_delay, repeat_rate);
}

// Assembly:
testl %edi, %edi
js 0x400d4
cmpl $0x200, %edi            # imm = 0x200
jae 0x400d7
movaps %xmm1, %xmm3
movaps %xmm0, %xmm2
movq 0xa3c24(%rip), %rax     # 0xe3ce0
movl %edi, %ecx
movss 0x4a0(%rax,%rcx,4), %xmm1
movaps %xmm1, %xmm0
subss 0x18(%rax), %xmm0
jmp 0x40041
xorl %eax, %eax
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x5dbc7(%rip), %rdi     # 0x9dca9
leaq 0x5d0ac(%rip), %rsi     # 0x9d195
leaq 0x5dc11(%rip), %rcx     # 0x9dd01
movl $0x11a0, %edx           # imm = 0x11A0
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::IsKeyPressed(int, bool)
bool ImGui::IsKeyPressed(int user_key_index, bool repeat)
{
    ImGuiContext& g = *GImGui;
    if (user_key_index < 0)
        return false;
    IM_ASSERT(user_key_index >= 0 && user_key_index < IM_ARRAYSIZE(g.IO.KeysDown));
    const float t = g.IO.KeysDownDuration[user_key_index];
    if (t == 0.0f)
        return true;
    if (repeat && t > g.IO.KeyRepeatDelay)
        return GetKeyPressedAmount(user_key_index, g.IO.KeyRepeatDelay, g.IO.KeyRepeatRate) > 0;
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testl %edi, %edi
js 0x40154
cmpl $0x200, %edi            # imm = 0x200
jae 0x40158
movq 0xa3bcf(%rip), %rcx     # 0xe3ce0
movl %edi, %eax
movss 0x4a0(%rcx,%rax,4), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm1, %xmm0
setnp %dl
sete %al
andb %dl, %al
xorb $0x1, %sil
orb %al, %sil
jne 0x40156
movss 0x94(%rcx), %xmm0
ucomiss %xmm0, %xmm1
jbe 0x40154
movss 0x98(%rcx), %xmm1
callq 0x400a3
testl %eax, %eax
setg %al
jmp 0x40156
xorl %eax, %eax
popq %rbp
retq
leaq 0x5dacd(%rip), %rdi     # 0x9dc2c
leaq 0x5d02f(%rip), %rsi     # 0x9d195
leaq 0x5dbc6(%rip), %rcx     # 0x9dd33
movl $0x11aa, %edx           # imm = 0x11AA
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::IsKeyReleased(int)
bool ImGui::IsKeyReleased(int user_key_index)
{
    ImGuiContext& g = *GImGui;
    if (user_key_index < 0) return false;
    IM_ASSERT(user_key_index >= 0 && user_key_index < IM_ARRAYSIZE(g.IO.KeysDown));
    return g.IO.KeysDownDurationPrev[user_key_index] >= 0.0f && !g.IO.KeysDown[user_key_index];
}

// Assembly:
testl %edi, %edi
js 0x4019d
cmpl $0x200, %edi            # imm = 0x200
jae 0x401aa
movq 0xa3b56(%rip), %rax     # 0xe3ce0
movl %edi, %ecx
movss 0xca0(%rax,%rcx,4), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jae 0x401a0
xorl %eax, %eax
retq
movb 0x144(%rax,%rcx), %al
xorb $0x1, %al
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x5da77(%rip), %rdi     # 0x9dc2c
leaq 0x5cfd9(%rip), %rsi     # 0x9d195
leaq 0x5db94(%rip), %rcx     # 0x9dd57
movl $0x11b7, %edx           # imm = 0x11B7
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::IsMouseClicked(int, bool)
bool ImGui::IsMouseClicked(ImGuiMouseButton button, bool repeat)
{
    ImGuiContext& g = *GImGui;
    IM_ASSERT(button >= 0 && button < IM_ARRAYSIZE(g.IO.MouseDown));
    const float t = g.IO.MouseDownDuration[button];
    if (t == 0.0f)
        return true;

    if (repeat && t > g.IO.KeyRepeatDelay)
    {
        // FIXME: 2019/05/03: Our old repeat code was wrong here and led to doubling the repeat rate, which made it an ok rate for repeat on mouse hold.
        int amount = CalcTypematicRepeatAmount(t - g.IO.DeltaTime, t, g.IO.KeyRepeatDelay, g.IO.KeyRepeatRate * 0.50f);
        if (amount > 0)
            return true;
    }
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpl $0x5, %edi
jae 0x40234
movq 0xa3b01(%rip), %rax     # 0xe3ce0
movl %edi, %ecx
movss 0x43c(%rax,%rcx,4), %xmm1
movb $0x1, %bl
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm1
jne 0x401f6
jnp 0x4022b
testb %sil, %sil
je 0x40229
movss 0x94(%rax), %xmm2
ucomiss %xmm2, %xmm1
jbe 0x40229
movaps %xmm1, %xmm0
subss 0x18(%rax), %xmm0
movss 0x98(%rax), %xmm3
mulss 0x5bdf8(%rip), %xmm3    # 0x9c018
callq 0x40041
testl %eax, %eax
jg 0x4022b
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x5db3b(%rip), %rdi     # 0x9dd76
leaq 0x5cf53(%rip), %rsi     # 0x9d195
leaq 0x5dbab(%rip), %rcx     # 0x9ddf4
movl $0x11c5, %edx           # imm = 0x11C5
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::IsMouseDragPastThreshold(int, float)
bool ImGui::IsMouseDragPastThreshold(ImGuiMouseButton button, float lock_threshold)
{
    ImGuiContext& g = *GImGui;
    IM_ASSERT(button >= 0 && button < IM_ARRAYSIZE(g.IO.MouseDown));
    if (lock_threshold < 0.0f)
        lock_threshold = g.IO.MouseDragThreshold;
    return g.IO.MouseDragMaxDistanceSqr[button] >= lock_threshold * lock_threshold;
}

// Assembly:
cmpl $0x5, %edi
jae 0x402f4
movq 0xa3a0f(%rip), %rax     # 0xe3ce0
xorps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
jbe 0x402de
movss 0x38(%rax), %xmm0
movl %edi, %ecx
movss 0x48c(%rax,%rcx,4), %xmm1
mulss %xmm0, %xmm0
ucomiss %xmm0, %xmm1
setae %al
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x5da77(%rip), %rdi     # 0x9dd76
leaq 0x5ce8f(%rip), %rsi     # 0x9d195
leaq 0x5db7b(%rip), %rcx     # 0x9de88
movl $0x11e7, %edx           # imm = 0x11E7
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::IsMouseDragging(int, float)
bool ImGui::IsMouseDragging(ImGuiMouseButton button, float lock_threshold)
{
    ImGuiContext& g = *GImGui;
    IM_ASSERT(button >= 0 && button < IM_ARRAYSIZE(g.IO.MouseDown));
    if (!g.IO.MouseDown[button])
        return false;
    return IsMouseDragPastThreshold(button, lock_threshold);
}

// Assembly:
cmpl $0x5, %edi
jae 0x40336
movq 0xa39bd(%rip), %rax     # 0xe3ce0
movl %edi, %ecx
cmpb $0x1, 0x130(%rax,%rcx)
je 0x402c5
xorl %eax, %eax
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x5da35(%rip), %rdi     # 0x9dd76
leaq 0x5ce4d(%rip), %rsi     # 0x9d195
leaq 0x5db77(%rip), %rcx     # 0x9dec6
movl $0x11f0, %edx           # imm = 0x11F0
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::GetMousePosOnOpeningCurrentPopup()
ImVec2 ImGui::GetMousePosOnOpeningCurrentPopup()
{
    ImGuiContext& g = *GImGui;
    if (g.BeginPopupStack.Size > 0)
        return g.OpenPopupStack[g.BeginPopupStack.Size - 1].OpenMousePos;
    return g.IO.MousePos;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0xa3967(%rip), %rax     # 0xe3ce0
movl 0x1c80(%rax), %esi
testl %esi, %esi
jle 0x40399
addq $0x1c70, %rax           # imm = 0x1C70
decl %esi
movq %rax, %rdi
callq 0x4b386
addq $0x28, %rax
jmp 0x4039f
addq $0x128, %rax            # imm = 0x128
movsd (%rax), %xmm0
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::IsAnyMouseDown()
bool ImGui::IsAnyMouseDown()
{
    ImGuiContext& g = *GImGui;
    for (int n = 0; n < IM_ARRAYSIZE(g.IO.MouseDown); n++)
        if (g.IO.MouseDown[n])
            return true;
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0xa3930(%rip), %rax     # 0xe3ce0
xorl %edx, %edx
movq %rdx, %rcx
cmpq $0x5, %rdx
je 0x403c9
leaq 0x1(%rcx), %rdx
cmpb $0x1, 0x130(%rax,%rcx)
jne 0x403b2
cmpq $0x5, %rcx
setb %al
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::GetMouseDragDelta(int, float)
ImVec2 ImGui::GetMouseDragDelta(ImGuiMouseButton button, float lock_threshold)
{
    ImGuiContext& g = *GImGui;
    IM_ASSERT(button >= 0 && button < IM_ARRAYSIZE(g.IO.MouseDown));
    if (lock_threshold < 0.0f)
        lock_threshold = g.IO.MouseDragThreshold;
    if (g.IO.MouseDown[button] || g.IO.MouseReleased[button])
        if (g.IO.MouseDragMaxDistanceSqr[button] >= lock_threshold * lock_threshold)
            if (IsMousePosValid(&g.IO.MousePos) && IsMousePosValid(&g.IO.MouseClickedPos[button]))
                return g.IO.MousePos - g.IO.MouseClickedPos[button];
    return ImVec2(0.0f, 0.0f);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
cmpl $0x5, %edi
jae 0x4047d
movq 0xa38f7(%rip), %r14     # 0xe3ce0
xorps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
jbe 0x403f7
movss 0x38(%r14), %xmm0
movl %edi, %ebx
cmpb $0x0, 0x130(%r14,%rbx)
jne 0x40412
xorps %xmm2, %xmm2
cmpb $0x1, 0x42a(%r14,%rbx)
jne 0x40475
movss 0x48c(%r14,%rbx,4), %xmm1
mulss %xmm0, %xmm0
xorps %xmm2, %xmm2
ucomiss %xmm0, %xmm1
jb 0x40475
leaq 0x128(%r14), %rdi
callq 0x381f3
testb %al, %al
je 0x40472
leaq (%r14,%rbx,8), %rbx
addq $0x3cc, %rbx            # imm = 0x3CC
movq %rbx, %rdi
callq 0x381f3
testb %al, %al
xorps %xmm2, %xmm2
je 0x40475
movss 0x128(%r14), %xmm2
subss (%rbx), %xmm2
movss 0x12c(%r14), %xmm0
subss 0x4(%rbx), %xmm0
unpcklps %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
jmp 0x40475
xorps %xmm2, %xmm2
movaps %xmm2, %xmm0
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x5d8f2(%rip), %rdi     # 0x9dd76
leaq 0x5cd0a(%rip), %rsi     # 0x9d195
leaq 0x5daa6(%rip), %rcx     # 0x9df38
movl $0x121f, %edx           # imm = 0x121F
callq 0xc140