LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::KeepAliveID(unsigned int)
void ImGui::KeepAliveID(ImGuiID id)
{
    ImGuiContext& g = *GImGui;
    if (g.ActiveId == id)
        g.ActiveIdIsAlive = id;
    if (g.ActiveIdPreviousFrame == id)
        g.ActiveIdPreviousFrameIsAlive = true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0xb62e3(%rip), %rax     # 0xfbcd0
cmpl %edi, 0x1b30(%rax)
jne 0x459fb
movl %edi, 0x1b34(%rax)
cmpl %edi, 0x1b70(%rax)
jne 0x45a0a
movb $0x1, 0x1b74(%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGuiWindow::GetID(void const*)
ImGuiID ImGuiWindow::GetID(const void* ptr)
{
    ImGuiID seed = IDStack.back();
    ImGuiID id = ImHashData(&ptr, sizeof(void*), seed);
    ImGui::KeepAliveID(id);
#ifdef IMGUI_ENABLE_TEST_ENGINE
    ImGuiContext& g = *GImGui;
    IMGUI_TEST_ENGINE_ID_INFO(id, ImGuiDataType_Pointer, ptr);
#endif
    return id;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rsi, -0x8(%rbp)
movslq 0xc8(%rdi), %rax
testq %rax, %rax
jle 0x45a7f
movq 0xd0(%rdi), %rcx
movl -0x4(%rcx,%rax,4), %eax
notl %eax
xorl %ecx, %ecx
leaq 0x6ffa6(%rip), %rdx     # 0xb59e0
movzbl %al, %esi
shrl $0x8, %eax
movzbl -0x8(%rbp,%rcx), %edi
xorl %esi, %edi
xorl (%rdx,%rdi,4), %eax
incq %rcx
cmpq $0x8, %rcx
jne 0x45a3a
notl %eax
movq 0xb6274(%rip), %rcx     # 0xfbcd0
cmpl %eax, 0x1b30(%rcx)
jne 0x45a6a
movl %eax, 0x1b34(%rcx)
cmpl %eax, 0x1b70(%rcx)
jne 0x45a79
movb $0x1, 0x1b74(%rcx)
addq $0x10, %rsp
popq %rbp
retq
leaq 0x87f24(%rip), %rdi     # 0xcd9aa
leaq 0x73bfe(%rip), %rsi     # 0xb968b
leaq 0x74f64(%rip), %rcx     # 0xba9f8
movl $0x666, %edx            # imm = 0x666
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGuiWindow::GetID(int)
ImGuiID ImGuiWindow::GetID(int n)
{
    ImGuiID seed = IDStack.back();
    ImGuiID id = ImHashData(&n, sizeof(n), seed);
    ImGui::KeepAliveID(id);
#ifdef IMGUI_ENABLE_TEST_ENGINE
    ImGuiContext& g = *GImGui;
    IMGUI_TEST_ENGINE_ID_INFO(id, ImGuiDataType_S32, (intptr_t)n);
#endif
    return id;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %esi, -0x4(%rbp)
movslq 0xc8(%rdi), %rax
testq %rax, %rax
jle 0x45b10
movq 0xd0(%rdi), %rcx
movl -0x4(%rcx,%rax,4), %eax
notl %eax
xorl %ecx, %ecx
leaq 0x6ff15(%rip), %rdx     # 0xb59e0
movzbl %al, %esi
shrl $0x8, %eax
movzbl -0x4(%rbp,%rcx), %edi
xorl %esi, %edi
xorl (%rdx,%rdi,4), %eax
incq %rcx
cmpq $0x4, %rcx
jne 0x45acb
notl %eax
movq 0xb61e3(%rip), %rcx     # 0xfbcd0
cmpl %eax, 0x1b30(%rcx)
jne 0x45afb
movl %eax, 0x1b34(%rcx)
cmpl %eax, 0x1b70(%rcx)
jne 0x45b0a
movb $0x1, 0x1b74(%rcx)
addq $0x10, %rsp
popq %rbp
retq
leaq 0x87e93(%rip), %rdi     # 0xcd9aa
leaq 0x73b6d(%rip), %rsi     # 0xb968b
leaq 0x74ed3(%rip), %rcx     # 0xba9f8
movl $0x666, %edx            # imm = 0x666
callq 0xc140
nop
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGuiWindow::GetIDNoKeepAlive(void const*)
ImGuiID ImGuiWindow::GetIDNoKeepAlive(const void* ptr)
{
    ImGuiID seed = IDStack.back();
    ImGuiID id = ImHashData(&ptr, sizeof(void*), seed);
#ifdef IMGUI_ENABLE_TEST_ENGINE
    ImGuiContext& g = *GImGui;
    IMGUI_TEST_ENGINE_ID_INFO(id, ImGuiDataType_Pointer, ptr);
#endif
    return id;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rsi, -0x8(%rbp)
movslq 0xc8(%rdi), %rax
testq %rax, %rax
jle 0x45bd1
movq 0xd0(%rdi), %rcx
movl -0x4(%rcx,%rax,4), %eax
notl %eax
xorl %ecx, %ecx
leaq 0x6fe30(%rip), %rdx     # 0xb59e0
movzbl %al, %esi
shrl $0x8, %eax
movzbl -0x8(%rbp,%rcx), %edi
xorl %esi, %edi
xorl (%rdx,%rdi,4), %eax
incq %rcx
cmpq $0x8, %rcx
jne 0x45bb0
notl %eax
addq $0x10, %rsp
popq %rbp
retq
leaq 0x87dd2(%rip), %rdi     # 0xcd9aa
leaq 0x73aac(%rip), %rsi     # 0xb968b
leaq 0x74e12(%rip), %rcx     # 0xba9f8
movl $0x666, %edx            # imm = 0x666
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGuiWindow::GetIDNoKeepAlive(int)
ImGuiID ImGuiWindow::GetIDNoKeepAlive(int n)
{
    ImGuiID seed = IDStack.back();
    ImGuiID id = ImHashData(&n, sizeof(n), seed);
#ifdef IMGUI_ENABLE_TEST_ENGINE
    ImGuiContext& g = *GImGui;
    IMGUI_TEST_ENGINE_ID_INFO(id, ImGuiDataType_S32, (intptr_t)n);
#endif
    return id;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %esi, -0x4(%rbp)
movslq 0xc8(%rdi), %rax
testq %rax, %rax
jle 0x45c3e
movq 0xd0(%rdi), %rcx
movl -0x4(%rcx,%rax,4), %eax
notl %eax
xorl %ecx, %ecx
leaq 0x6fdc3(%rip), %rdx     # 0xb59e0
movzbl %al, %esi
shrl $0x8, %eax
movzbl -0x4(%rbp,%rcx), %edi
xorl %esi, %edi
xorl (%rdx,%rdi,4), %eax
incq %rcx
cmpq $0x4, %rcx
jne 0x45c1d
notl %eax
addq $0x10, %rsp
popq %rbp
retq
leaq 0x87d65(%rip), %rdi     # 0xcd9aa
leaq 0x73a3f(%rip), %rsi     # 0xb968b
leaq 0x74da5(%rip), %rcx     # 0xba9f8
movl $0x666, %edx            # imm = 0x666
callq 0xc140
nop
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGuiWindow::GetIDFromRectangle(ImRect const&)
ImGuiID ImGuiWindow::GetIDFromRectangle(const ImRect& r_abs)
{
    ImGuiID seed = IDStack.back();
    const int r_rel[4] = { (int)(r_abs.Min.x - Pos.x), (int)(r_abs.Min.y - Pos.y), (int)(r_abs.Max.x - Pos.x), (int)(r_abs.Max.y - Pos.y) };
    ImGuiID id = ImHashData(&r_rel, sizeof(r_rel), seed);
    ImGui::KeepAliveID(id);
    return id;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movslq 0xc8(%rdi), %rax
testq %rax, %rax
jle 0x45d1a
movq 0xd0(%rdi), %rcx
movl -0x4(%rcx,%rax,4), %eax
movss (%rsi), %xmm0
movss 0x10(%rdi), %xmm1
subss %xmm1, %xmm0
cvttss2si %xmm0, %ecx
movl %ecx, -0x10(%rbp)
movss 0x4(%rsi), %xmm0
movss 0x14(%rdi), %xmm2
subss %xmm2, %xmm0
cvttss2si %xmm0, %ecx
movl %ecx, -0xc(%rbp)
movss 0x8(%rsi), %xmm0
subss %xmm1, %xmm0
cvttss2si %xmm0, %ecx
movl %ecx, -0x8(%rbp)
movss 0xc(%rsi), %xmm0
subss %xmm2, %xmm0
cvttss2si %xmm0, %ecx
movl %ecx, -0x4(%rbp)
notl %eax
xorl %ecx, %ecx
leaq 0x6fd0b(%rip), %rdx     # 0xb59e0
movzbl %al, %esi
shrl $0x8, %eax
movzbl -0x10(%rbp,%rcx), %edi
xorl %esi, %edi
xorl (%rdx,%rdi,4), %eax
incq %rcx
cmpq $0x10, %rcx
jne 0x45cd5
notl %eax
movq 0xb5fd9(%rip), %rcx     # 0xfbcd0
cmpl %eax, 0x1b30(%rcx)
jne 0x45d05
movl %eax, 0x1b34(%rcx)
cmpl %eax, 0x1b70(%rcx)
jne 0x45d14
movb $0x1, 0x1b74(%rcx)
addq $0x10, %rsp
popq %rbp
retq
leaq 0x87c89(%rip), %rdi     # 0xcd9aa
leaq 0x73963(%rip), %rsi     # 0xb968b
leaq 0x74cc9(%rip), %rcx     # 0xba9f8
movl $0x666, %edx            # imm = 0x666
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::GcCompactTransientMiscBuffers()
void ImGui::GcCompactTransientMiscBuffers()
{
    ImGuiContext& g = *GImGui;
    g.ItemFlagsStack.clear();
    g.GroupStack.clear();
    TableGcCompactSettings();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0xb5f89(%rip), %rbx     # 0xfbcd0
movq 0x1c58(%rbx), %rdi
testq %rdi, %rdi
je 0x45d77
xorl %r14d, %r14d
movq %r14, 0x1c50(%rbx)
decl 0x3b4(%rbx)
movq 0xb5f76(%rip), %rsi     # 0xfbce0
callq *0xb17a8(%rip)          # 0xf7518
movq %r14, 0x1c58(%rbx)
movq 0x1c68(%rbx), %rdi
testq %rdi, %rdi
je 0x45db8
movq $0x0, 0x1c60(%rbx)
movq 0xb5f3b(%rip), %rax     # 0xfbcd0
testq %rax, %rax
je 0x45da0
decl 0x3b4(%rax)
movq 0xb5f39(%rip), %rsi     # 0xfbce0
callq *0xb176b(%rip)          # 0xf7518
movq $0x0, 0x1c68(%rbx)
popq %rbx
popq %r14
popq %rbp
jmp 0x8db02
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::GcCompactTransientWindowBuffers(ImGuiWindow*)
void ImGui::GcCompactTransientWindowBuffers(ImGuiWindow* window)
{
    window->MemoryCompacted = true;
    window->MemoryDrawListIdxCapacity = window->DrawList->IdxBuffer.Capacity;
    window->MemoryDrawListVtxCapacity = window->DrawList->VtxBuffer.Capacity;
    window->IDStack.clear();
    window->DrawList->_ClearFreeMemory();
    window->DC.ChildWindows.clear();
    window->DC.ItemWidthStack.clear();
    window->DC.TextWrapPosStack.clear();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb $0x1, 0x3e0(%rdi)
movq 0xd0(%rdi), %rdi
movq 0x2b8(%rbx), %rax
movl 0x14(%rax), %ecx
movl %ecx, 0x3d8(%rbx)
movl 0x24(%rax), %ecx
movl %ecx, 0x3dc(%rbx)
testq %rdi, %rdi
je 0x45e32
movq $0x0, 0xc8(%rbx)
movq 0xb5ec8(%rip), %rax     # 0xfbcd0
testq %rax, %rax
je 0x45e13
decl 0x3b4(%rax)
movq 0xb5ec6(%rip), %rsi     # 0xfbce0
callq *0xb16f8(%rip)          # 0xf7518
movq $0x0, 0xd0(%rbx)
movq 0x2b8(%rbx), %rax
movq %rax, %rdi
callq 0x753f2
movq 0x1a0(%rbx), %rdi
testq %rdi, %rdi
je 0x45e7b
movq $0x0, 0x198(%rbx)
movq 0xb5e78(%rip), %rax     # 0xfbcd0
testq %rax, %rax
je 0x45e63
decl 0x3b4(%rax)
movq 0xb5e76(%rip), %rsi     # 0xfbce0
callq *0xb16a8(%rip)          # 0xf7518
movq $0x0, 0x1a0(%rbx)
movq 0x1e0(%rbx), %rdi
testq %rdi, %rdi
je 0x45ebc
movq $0x0, 0x1d8(%rbx)
movq 0xb5e37(%rip), %rax     # 0xfbcd0
testq %rax, %rax
je 0x45ea4
decl 0x3b4(%rax)
movq 0xb5e35(%rip), %rsi     # 0xfbce0
callq *0xb1667(%rip)          # 0xf7518
movq $0x0, 0x1e0(%rbx)
movq 0x1f0(%rbx), %rdi
testq %rdi, %rdi
je 0x45efd
movq $0x0, 0x1e8(%rbx)
movq 0xb5df6(%rip), %rax     # 0xfbcd0
testq %rax, %rax
je 0x45ee5
decl 0x3b4(%rax)
movq 0xb5df4(%rip), %rsi     # 0xfbce0
callq *0xb1626(%rip)          # 0xf7518
movq $0x0, 0x1f0(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::GcAwakeTransientWindowBuffers(ImGuiWindow*)
void ImGui::GcAwakeTransientWindowBuffers(ImGuiWindow* window)
{
    // We stored capacity of the ImDrawList buffer to reduce growth-caused allocation/copy when awakening.
    // The other buffers tends to amortize much faster.
    window->MemoryCompacted = false;
    window->DrawList->IdxBuffer.reserve(window->MemoryDrawListIdxCapacity);
    window->DrawList->VtxBuffer.reserve(window->MemoryDrawListVtxCapacity);
    window->MemoryDrawListIdxCapacity = window->MemoryDrawListVtxCapacity = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movb $0x0, 0x3e0(%rdi)
movq 0x2b8(%rdi), %r15
movl 0x3d8(%rdi), %r12d
cmpl %r12d, 0x14(%r15)
jge 0x45fa4
movslq %r12d, %rdi
addq %rdi, %rdi
movq 0xb5d96(%rip), %rax     # 0xfbcd0
testq %rax, %rax
je 0x45f45
incl 0x3b4(%rax)
movq 0xb5d94(%rip), %rsi     # 0xfbce0
callq *0xb15be(%rip)          # 0xf7510
movq %rax, %r14
movq 0x18(%r15), %rsi
testq %rsi, %rsi
je 0x45f95
movslq 0x10(%r15), %rdx
addq %rdx, %rdx
movq %r14, %rdi
callq 0xc080
movq 0x18(%r15), %rdi
testq %rdi, %rdi
je 0x45f88
movq 0xb5d53(%rip), %rax     # 0xfbcd0
testq %rax, %rax
je 0x45f88
decl 0x3b4(%rax)
movq 0xb5d51(%rip), %rsi     # 0xfbce0
callq *0xb1583(%rip)          # 0xf7518
movq %r14, 0x18(%r15)
movl %r12d, 0x14(%r15)
movq 0x2b8(%rbx), %r15
movl 0x3dc(%rbx), %r12d
cmpl %r12d, 0x24(%r15)
jge 0x4602b
movslq %r12d, %rax
shlq $0x2, %rax
leaq (%rax,%rax,4), %rdi
movq 0xb5d0d(%rip), %rax     # 0xfbcd0
testq %rax, %rax
je 0x45fce
incl 0x3b4(%rax)
movq 0xb5d0b(%rip), %rsi     # 0xfbce0
callq *0xb1535(%rip)          # 0xf7510
movq %rax, %r14
movq 0x28(%r15), %rsi
testq %rsi, %rsi
je 0x46023
movslq 0x20(%r15), %rax
shlq $0x2, %rax
leaq (%rax,%rax,4), %rdx
movq %r14, %rdi
callq 0xc080
movq 0x28(%r15), %rdi
testq %rdi, %rdi
je 0x46016
movq 0xb5cc5(%rip), %rax     # 0xfbcd0
testq %rax, %rax
je 0x46016
decl 0x3b4(%rax)
movq 0xb5cc3(%rip), %rsi     # 0xfbce0
callq *0xb14f5(%rip)          # 0xf7518
movq %r14, 0x28(%r15)
movl %r12d, 0x24(%r15)
movq $0x0, 0x3d8(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::SetActiveID(unsigned int, ImGuiWindow*)
void ImGui::SetActiveID(ImGuiID id, ImGuiWindow* window)
{
    ImGuiContext& g = *GImGui;
    g.ActiveIdIsJustActivated = (g.ActiveId != id);
    if (g.ActiveIdIsJustActivated)
    {
        g.ActiveIdTimer = 0.0f;
        g.ActiveIdHasBeenPressedBefore = false;
        g.ActiveIdHasBeenEditedBefore = false;
        if (id != 0)
        {
            g.LastActiveId = id;
            g.LastActiveIdTimer = 0.0f;
        }
    }
    g.ActiveId = id;
    g.ActiveIdAllowOverlap = false;
    g.ActiveIdNoClearOnFocusLoss = false;
    g.ActiveIdWindow = window;
    g.ActiveIdHasBeenEditedThisFrame = false;
    if (id)
    {
        g.ActiveIdIsAlive = id;
        g.ActiveIdSource = (g.NavActivateId == id || g.NavInputId == id || g.NavJustTabbedId == id || g.NavJustMovedToId == id) ? ImGuiInputSource_Nav : ImGuiInputSource_Mouse;
    }

    // Clear declaration of inputs claimed by the widget
    // (Please note that this is WIP and not all keys/inputs are thoroughly declared by all widgets yet)
    g.ActiveIdUsingMouseWheel = false;
    g.ActiveIdUsingNavDirMask = 0x00;
    g.ActiveIdUsingNavInputMask = 0x00;
    g.ActiveIdUsingKeyInputMask = 0x00;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0xb5c86(%rip), %rax     # 0xfbcd0
cmpl %edi, 0x1b30(%rax)
setne 0x1b3c(%rax)
je 0x460a3
movl $0x0, 0x1b38(%rax)
movw $0x0, 0x1b3f(%rax)
testl %edi, %edi
je 0x460f6
movl %edi, 0x1b80(%rax)
movl $0x0, 0x1b84(%rax)
movl %edi, 0x1b30(%rax)
movw $0x0, 0x1b3d(%rax)
movq %rsi, 0x1b60(%rax)
movb $0x0, 0x1b41(%rax)
jmp 0x460be
movw $0x0, 0x1b3d(%rax)
movq %rsi, 0x1b60(%rax)
movb $0x0, 0x1b41(%rax)
testl %edi, %edi
je 0x46117
movl %edi, 0x1b34(%rax)
movl $0x2, %ecx
cmpl %edi, 0x1ca0(%rax)
je 0x460ee
cmpl %edi, 0x1cac(%rax)
je 0x460ee
cmpl %edi, 0x1cb0(%rax)
je 0x460ee
xorl %ecx, %ecx
cmpl %edi, 0x1cb4(%rax)
sete %cl
incl %ecx
movl %ecx, 0x1b68(%rax)
jmp 0x46117
movl $0x0, 0x1b30(%rax)
movw $0x0, 0x1b3d(%rax)
movq %rsi, 0x1b60(%rax)
movb $0x0, 0x1b41(%rax)
movb $0x0, 0x1b42(%rax)
xorl %ecx, %ecx
movq %rcx, 0x1b44(%rax)
movq %rcx, 0x1b50(%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::SetHoveredID(unsigned int)
void ImGui::SetHoveredID(ImGuiID id)
{
    ImGuiContext& g = *GImGui;
    g.HoveredId = id;
    g.HoveredIdAllowOverlap = false;
    g.HoveredIdUsingMouseWheel = false;
    if (id != 0 && g.HoveredIdPreviousFrame != id)
        g.HoveredIdTimer = g.HoveredIdNotActiveTimer = 0.0f;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0xb5b87(%rip), %rax     # 0xfbcd0
movl %edi, 0x1b1c(%rax)
movw $0x0, 0x1b24(%rax)
testl %edi, %edi
je 0x4616f
cmpl %edi, 0x1b20(%rax)
je 0x4616f
movq $0x0, 0x1b28(%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::MarkItemEdited(unsigned int)
void ImGui::MarkItemEdited(ImGuiID id)
{
    // This marking is solely to be able to provide info for IsItemDeactivatedAfterEdit().
    // ActiveId might have been released by the time we call this (as in the typical press/release button behavior) but still need need to fill the data.
    ImGuiContext& g = *GImGui;
    IM_ASSERT(g.ActiveId == id || g.ActiveId == 0 || g.DragDropActive);
    IM_UNUSED(id); // Avoid unused variable warnings when asserts are compiled out.
    //IM_ASSERT(g.CurrentWindow->DC.LastItemId == id);
    g.ActiveIdHasBeenEditedThisFrame = true;
    g.ActiveIdHasBeenEditedBefore = true;
    g.CurrentWindow->DC.LastItemStatusFlags |= ImGuiItemStatusFlags_Edited;
}

// Assembly:
movq 0xb5b3b(%rip), %rax     # 0xfbcd0
movl 0x1b30(%rax), %ecx
cmpl %edi, %ecx
sete %dl
testl %ecx, %ecx
sete %cl
orb %dl, %cl
jne 0x461b2
cmpb $0x0, 0x2004(%rax)
je 0x461ca
movw $0x101, 0x1b40(%rax)    # imm = 0x101
movq 0x1ae0(%rax), %rax
orl $0x4, 0x128(%rax)
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x706b4(%rip), %rdi     # 0xb6889
leaq 0x6ff89(%rip), %rsi     # 0xb6165
leaq 0x706de(%rip), %rcx     # 0xb68c1
movl $0xbfe, %edx            # imm = 0xBFE
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::IsItemFocused()
bool ImGui::IsItemFocused()
{
    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = g.CurrentWindow;

    if (g.NavId != window->DC.LastItemId || g.NavId == 0)
        return false;
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0xb59c0(%rip), %rax     # 0xfbcd0
movq 0x1ae0(%rax), %rcx
movl 0x1c98(%rax), %eax
cmpl 0x124(%rcx), %eax
sete %cl
testl %eax, %eax
setne %al
andb %cl, %al
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::IsMouseHoveringRect(ImVec2 const&, ImVec2 const&, bool)
bool ImGui::IsMouseHoveringRect(const ImVec2& r_min, const ImVec2& r_max, bool clip)
{
    ImGuiContext& g = *GImGui;

    // Clip
    ImRect rect_clipped(r_min, r_max);
    if (clip)
        rect_clipped.ClipWith(g.CurrentWindow->ClipRect);

    // Expand for touch input
    const ImRect rect_for_touch(rect_clipped.Min - g.Style.TouchExtraPadding, rect_clipped.Max + g.Style.TouchExtraPadding);
    if (!rect_for_touch.Contains(g.IO.MousePos))
        return false;
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0xb5839(%rip), %rax     # 0xfbcd0
movsd (%rdi), %xmm1
movsd (%rsi), %xmm0
testl %edx, %edx
je 0x46507
movq 0x1ae0(%rax), %rcx
movaps %xmm1, %xmm2
shufps $0x55, %xmm1, %xmm2     # xmm2 = xmm2[1,1],xmm1[1,1]
movss 0x258(%rcx), %xmm3
movss 0x25c(%rcx), %xmm4
movaps %xmm3, %xmm5
cmpless %xmm1, %xmm5
andps %xmm5, %xmm1
andnps %xmm3, %xmm5
orps %xmm1, %xmm5
movaps %xmm4, %xmm1
cmpless %xmm2, %xmm1
andps %xmm1, %xmm2
andnps %xmm4, %xmm1
orps %xmm2, %xmm1
unpcklps %xmm1, %xmm5            # xmm5 = xmm5[0],xmm1[0],xmm5[1],xmm1[1]
movaps %xmm0, %xmm1
shufps $0x55, %xmm0, %xmm1     # xmm1 = xmm1[1,1],xmm0[1,1]
movss 0x260(%rcx), %xmm2
minss %xmm2, %xmm0
minss 0x264(%rcx), %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movaps %xmm5, %xmm1
movss 0x15c0(%rax), %xmm3
movaps %xmm1, %xmm4
subss %xmm3, %xmm4
movss 0x128(%rax), %xmm2
ucomiss %xmm4, %xmm2
jae 0x46527
xorl %eax, %eax
jmp 0x46565
movaps %xmm0, %xmm4
shufps $0x55, %xmm0, %xmm4     # xmm4 = xmm4[1,1],xmm0[1,1]
movss 0x15c4(%rax), %xmm5
addss %xmm5, %xmm4
addss %xmm0, %xmm3
shufps $0x55, %xmm1, %xmm1     # xmm1 = xmm1[1,1,1,1]
subss %xmm5, %xmm1
movss 0x12c(%rax), %xmm0
cmpltps %xmm3, %xmm2
cmpleps %xmm0, %xmm1
andps %xmm2, %xmm1
ucomiss %xmm0, %xmm4
movd %xmm1, %ecx
seta %al
andb %cl, %al
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::IsClippedEx(ImRect const&, unsigned int, bool)
bool ImGui::IsClippedEx(const ImRect& bb, ImGuiID id, bool clip_even_when_logged)
{
    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = g.CurrentWindow;
    if (!bb.Overlaps(window->ClipRect))
        if (id == 0 || (id != g.ActiveId && id != g.NavId))
            if (clip_even_when_logged || !g.LogEnabled)
                return true;
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0xb574c(%rip), %rcx     # 0xfbcd0
movq 0x1ae0(%rcx), %rax
movss 0xc(%rdi), %xmm0
ucomiss 0x25c(%rax), %xmm0
jbe 0x465c2
movss 0x264(%rax), %xmm0
ucomiss 0x4(%rdi), %xmm0
jbe 0x465c2
movss 0x8(%rdi), %xmm0
ucomiss 0x258(%rax), %xmm0
jbe 0x465c2
movss 0x260(%rax), %xmm0
ucomiss (%rdi), %xmm0
ja 0x465e5
testl %esi, %esi
je 0x465d6
cmpl %esi, 0x1b30(%rcx)
je 0x465e5
cmpl %esi, 0x1c98(%rcx)
je 0x465e5
movb $0x1, %al
testb %dl, %dl
jne 0x465e7
cmpb $0x1, 0x3138(%rcx)
jne 0x465e7
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::FocusableItemRegister(ImGuiWindow*, unsigned int)
bool ImGui::FocusableItemRegister(ImGuiWindow* window, ImGuiID id)
{
    ImGuiContext& g = *GImGui;

    // Increment counters
    const bool is_tab_stop = (window->DC.ItemFlags & (ImGuiItemFlags_NoTabStop | ImGuiItemFlags_Disabled)) == 0;
    window->DC.FocusCounterRegular++;
    if (is_tab_stop)
        window->DC.FocusCounterTabStop++;

    // Process TAB/Shift-TAB to tab *OUT* of the currently focused item.
    // (Note that we can always TAB out of a widget that doesn't allow tabbing in)
    if (g.ActiveId == id && g.FocusTabPressed && !IsActiveIdUsingKey(ImGuiKey_Tab) && g.FocusRequestNextWindow == NULL)
    {
        g.FocusRequestNextWindow = window;
        g.FocusRequestNextCounterTabStop = window->DC.FocusCounterTabStop + (g.IO.KeyShift ? (is_tab_stop ? -1 : 0) : +1); // Modulo on index will be applied at the end of frame once we've got the total counter of items.
    }

    // Handle focus requests
    if (g.FocusRequestCurrWindow == window)
    {
        if (window->DC.FocusCounterRegular == g.FocusRequestCurrCounterRegular)
            return true;
        if (is_tab_stop && window->DC.FocusCounterTabStop == g.FocusRequestCurrCounterTabStop)
        {
            g.NavJustTabbedId = id;
            return true;
        }

        // If another item is about to be focused, we clear our own active id
        if (g.ActiveId == id)
            ClearActiveID();
    }

    return false;
}

// Assembly:
movq 0xb56c4(%rip), %rax     # 0xfbcd0
movl 0x1c4(%rdi), %edx
movl 0x1cc(%rdi), %ecx
incl %edx
movl %edx, 0x1c4(%rdi)
testb $0x5, %cl
jne 0x4662b
incl 0x1c8(%rdi)
movl 0x1b30(%rax), %r8d
cmpl %esi, %r8d
jne 0x4668a
cmpb $0x1, 0x1e08(%rax)
jne 0x4668a
testb $0x1, 0x1b50(%rax)
jne 0x4668a
cmpq $0x0, 0x1df0(%rax)
jne 0x4668a
movl %ecx, %r9d
andl $0x5, %r9d
movq %rdi, 0x1df0(%rax)
xorl %r10d, %r10d
cmpl $0x1, %r9d
sbbl %r10d, %r10d
cmpb $0x0, 0x141(%rax)
movl $0x1, %r9d
cmovnel %r10d, %r9d
addl 0x1c8(%rdi), %r9d
movl %r9d, 0x1e04(%rax)
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
cmpq %rdi, 0x1de8(%rax)
je 0x4669d
xorl %ebx, %ebx
jmp 0x466d2
movb $0x1, %bl
cmpl 0x1df8(%rax), %edx
je 0x466d2
testb $0x5, %cl
jne 0x466c2
movl 0x1c8(%rdi), %ecx
cmpl 0x1dfc(%rax), %ecx
jne 0x466c2
movl %esi, 0x1cb0(%rax)
jmp 0x466d2
cmpl %esi, %r8d
jne 0x46699
xorl %ebx, %ebx
xorl %edi, %edi
xorl %esi, %esi
callq 0x4603f
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::CalcWrapWidthForPos(ImVec2 const&, float)
float ImGui::CalcWrapWidthForPos(const ImVec2& pos, float wrap_pos_x)
{
    if (wrap_pos_x < 0.0f)
        return 0.0f;

    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = g.CurrentWindow;
    if (wrap_pos_x == 0.0f)
    {
        // We could decide to setup a default wrapping max point for auto-resizing windows,
        // or have auto-wrap (with unspecified wrapping pos) behave as a ContentSize extending function?
        //if (window->Hidden && (window->Flags & ImGuiWindowFlags_AlwaysAutoResize))
        //    wrap_pos_x = ImMax(window->WorkRect.Min.x + g.FontSize * 10.0f, window->WorkRect.Max.x);
        //else
        wrap_pos_x = window->WorkRect.Max.x;
    }
    else if (wrap_pos_x > 0.0f)
    {
        wrap_pos_x += window->Pos.x - window->Scroll.x; // wrap_pos_x is provided is window local space
    }

    return ImMax(wrap_pos_x - pos.x, 1.0f);
}

// Assembly:
xorps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
ja 0x4673b
pushq %rbp
movq %rsp, %rbp
movq 0xb55d0(%rip), %rax     # 0xfbcd0
movq 0x1ae0(%rax), %rax
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x4671b
jp 0x4671b
movss 0x240(%rax), %xmm0
jmp 0x4672b
jbe 0x4672b
movss 0x10(%rax), %xmm1
subss 0x5c(%rax), %xmm1
addss %xmm1, %xmm0
subss (%rdi), %xmm0
maxss 0x6e8ad(%rip), %xmm0    # 0xb4fe4
movaps %xmm0, %xmm1
popq %rbp
movaps %xmm1, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O3/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, %rbx
movq 0xb54ee(%rip), %rax     # 0xfbcd0
testq %rax, %rax
je 0x467ed
incl 0x3b4(%rax)
movq 0xb54ec(%rip), %rsi     # 0xfbce0
movl $0x3f80, %edi           # imm = 0x3F80
callq *0xb0d11(%rip)          # 0xf7510
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
callq 0x5d3fa
cmpq $0x0, 0xb54bb(%rip)     # 0xfbcd0
jne 0x4681e
movq %r14, 0xb54b2(%rip)     # 0xfbcd0
movq %r14, %rdi
callq 0x4682e
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpb $0x0, (%rdi)
jne 0x469b5
movq %rdi, %rbx
cmpb $0x1, 0x30e1(%rdi)
je 0x469b5
leaq 0x73b64(%rip), %r14     # 0xba3c0
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x42033
movl %eax, %r15d
movl 0x30f8(%rbx), %eax
cmpl 0x30fc(%rbx), %eax
jne 0x4688e
leal 0x1(%rax), %r13d
testl %eax, %eax
je 0x4689a
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
jmp 0x4689f
movq 0x3100(%rbx), %r12
jmp 0x46935
movl $0x8, %ecx
cmpl %r13d, %ecx
cmovgl %ecx, %r13d
movslq %r13d, %rax
shlq $0x3, %rax
leaq (%rax,%rax,8), %rdi
movq 0xb5418(%rip), %rax     # 0xfbcd0
testq %rax, %rax
je 0x468c3
incl 0x3b4(%rax)
movq 0xb5416(%rip), %rsi     # 0xfbce0
callq *0xb0c40(%rip)          # 0xf7510
movq %rax, %r12
movq 0x3100(%rbx), %rsi
testq %rsi, %rsi
je 0x46921
movslq 0x30f8(%rbx), %rax
shlq $0x3, %rax
leaq (%rax,%rax,8), %rdx
movq %r12, %rdi
callq 0xc080
movq 0x3100(%rbx), %rdi
testq %rdi, %rdi
je 0x46914
movq 0xb53c7(%rip), %rax     # 0xfbcd0
testq %rax, %rax
je 0x46914
decl 0x3b4(%rax)
movq 0xb53c5(%rip), %rsi     # 0xfbce0
callq *0xb0bf7(%rip)          # 0xf7518
movq %r12, 0x3100(%rbx)
movl %r13d, 0x30fc(%rbx)
movl 0x30f8(%rbx), %eax
cltq
leaq (%rax,%rax,8), %rax
movq %r14, (%r12,%rax,8)
movl %r15d, 0x8(%r12,%rax,8)
movl $0x0, 0xc(%r12,%rax,8)
leaq 0x8ee6(%rip), %rcx      # 0x4f83a
movq %rcx, 0x10(%r12,%rax,8)
xorl %ecx, %ecx
movq %rcx, 0x18(%r12,%rax,8)
leaq 0x8f3c(%rip), %rdx      # 0x4f8a3
movq %rdx, 0x20(%r12,%rax,8)
leaq 0x8f50(%rip), %rdx      # 0x4f8c3
movq %rdx, 0x28(%r12,%rax,8)
leaq 0x8fde(%rip), %rdx      # 0x4f95d
movq %rdx, 0x30(%r12,%rax,8)
leaq 0x90a0(%rip), %rdx      # 0x4fa2b
movq %rdx, 0x38(%r12,%rax,8)
movq %rcx, 0x40(%r12,%rax,8)
incl 0x30f8(%rbx)
movq %rbx, %rdi
callq 0x8d1d7
movb $0x1, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x70104(%rip), %rdi     # 0xb6ac0
leaq 0x6f7a2(%rip), %rsi     # 0xb6165
leaq 0x7011a(%rip), %rcx     # 0xb6ae4
movl $0xf9e, %edx            # imm = 0xF9E
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/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 0x469e9
movq 0xb52e7(%rip), %rbx     # 0xfbcd0
movq %rbx, %rdi
callq 0x46a13
cmpq %rbx, 0xb52d8(%rip)     # 0xfbcd0
jne 0x46a05
movq $0x0, 0xb52cb(%rip) # 0xfbcd0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5dcbe
// File: /workspace/github_cpp_makefile_star2_O3/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:
movl 0x3128(%rdi), %eax
testl %eax, %eax
jle 0x4714c
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
xorl %r15d, %r15d
xorl %r12d, %r12d
movq 0x3130(%r14), %rcx
cmpl %ebx, (%rcx,%r15)
jne 0x47135
leaq (%rcx,%r15), %rsi
movq %r14, %rdi
callq *0x8(%rcx,%r15)
movl 0x3128(%r14), %eax
incq %r12
movslq %eax, %rcx
addq $0x18, %r15
cmpq %rcx, %r12
jl 0x47115
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::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 0xb4ad1(%rip), %r14     # 0xfbcd0
callq 0x4726c
movl 0x54(%rbx), %edi
movq %rbx, %rsi
callq 0x4603f
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 0x47267
movq 0x390(%rbx), %rax
testb $0x4, 0xc(%rax)
jne 0x47267
movq %rbx, 0x1b00(%r14)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xb4a50(%rip), %r15     # 0xfbcd0
cmpq %rdi, 0x1c90(%r15)
je 0x472e0
movq %rbx, 0x1c90(%r15)
testq %rbx, %rbx
je 0x472b7
cmpb $0x1, 0x1ce7(%r15)
jne 0x472a7
movb $0x1, 0x1ce5(%r15)
movb $0x0, 0x1ce9(%r15)
movl 0x3b0(%rbx), %eax
jmp 0x472c1
movb $0x0, 0x1ce9(%r15)
xorl %eax, %eax
movl %eax, 0x1c98(%r15)
xorl %eax, %eax
movl %eax, 0x1c9c(%r15)
movb $0x0, 0x1ce4(%r15)
movl %eax, 0x1cdc(%r15)
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4797e
testq %rbx, %rbx
je 0x472fe
movq 0x390(%rbx), %r14
testq %r14, %r14
je 0x47367
cmpl $0x0, 0x1b30(%r15)
je 0x47330
movq 0x1b60(%r15), %rax
testq %rax, %rax
je 0x47330
cmpq %r14, 0x390(%rax)
je 0x47330
cmpb $0x0, 0x1b3e(%r15)
jne 0x47330
xorl %edi, %edi
xorl %esi, %esi
callq 0x4603f
testq %rbx, %rbx
je 0x4735c
movq %r14, %rdi
callq 0x53958
movl 0xc(%r14), %eax
orl 0xc(%rbx), %eax
btl $0xd, %eax
jb 0x4735c
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x53a21
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6ffe9(%rip), %rdi     # 0xb7357
leaq 0x6edf0(%rip), %rsi     # 0xb6165
leaq 0x7000c(%rip), %rcx     # 0xb7388
movl $0x1889, %edx           # imm = 0x1889
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/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 0xb47ba(%rip), %rax     # 0xfbcd0
testq %rax, %rax
je 0x4754e
addq $0x128, %rax            # imm = 0x128
testq %rdi, %rdi
cmovneq %rdi, %rax
movss 0x4(%rax), %xmm0
movss (%rax), %xmm1
movss 0x6e333(%rip), %xmm2    # 0xb586c
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 0x6f972(%rip), %rdi     # 0xb6ecb
leaq 0x6ec05(%rip), %rsi     # 0xb6165
leaq 0x6f975(%rip), %rcx     # 0xb6edc
movl $0x120a, %edx           # imm = 0x120A
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/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 0x475bd
movsbl %al, %ecx
testl %edx, %ecx
je 0x4767a
leal -0x1(%rdx), %ecx
testl %ecx, %edx
jne 0x4767b
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 0x6fe96(%rip), %rdi     # 0xb751c
leaq 0x6ead8(%rip), %rsi     # 0xb6165
leaq 0x6feaa(%rip), %rcx     # 0xb753e
movl $0x198e, %edx           # imm = 0x198E
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/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
movq 0xb44a1(%rip), %rax     # 0xfbcd0
testb %sil, %sil
js 0x47869
btl $0x8, %esi
movl 0x1c70(%rax), %edx
jb 0x47881
movl 0x1c80(%rax), %ecx
cmpl %ecx, %edx
jle 0x478b7
testl %ecx, %ecx
js 0x478da
movq 0x1c78(%rax), %rax
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
cmpl %edi, (%rax,%rcx)
sete %al
jmp 0x478b9
testl %edi, %edi
jne 0x478bb
btl $0x8, %esi
movl 0x1c70(%rax), %ecx
jb 0x478b0
cmpl 0x1c80(%rax), %ecx
jmp 0x478b2
testl %edx, %edx
jle 0x478b7
movq 0x1c78(%rax), %rcx
leaq (%rdx,%rdx,2), %rdx
shlq $0x4, %rdx
addq $-0x30, %rdx
xorl %esi, %esi
cmpl %edi, (%rcx,%rsi)
sete %al
je 0x478b9
leaq 0x30(%rsi), %r8
cmpq %rsi, %rdx
movq %r8, %rsi
jne 0x4789a
jmp 0x478b9
testl %ecx, %ecx
setg %al
jmp 0x478b9
xorl %eax, %eax
popq %rbp
retq
leaq 0x70733(%rip), %rdi     # 0xb7ff5
leaq 0x6e89c(%rip), %rsi     # 0xb6165
leaq 0x7072d(%rip), %rcx     # 0xb7ffd
movl $0x1ec4, %edx           # imm = 0x1EC4
callq 0xc140
leaq 0x71d97(%rip), %rdi     # 0xb9678
leaq 0x71da3(%rip), %rsi     # 0xb968b
leaq 0x7325b(%rip), %rcx     # 0xbab4a
movl $0x65c, %edx            # imm = 0x65C
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/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 0xb43cc(%rip), %rax     # 0xfbcd0
movslq 0x1c70(%rax), %rcx
testq %rcx, %rcx
jle 0x47944
movq 0x1c78(%rax), %rax
leaq (%rcx,%rcx,2), %rdx
incq %rcx
shlq $0x4, %rdx
addq %rax, %rdx
addq $-0x28, %rdx
movq (%rdx), %rax
testq %rax, %rax
je 0x47937
testb $0x8, 0xf(%rax)
jne 0x47946
decq %rcx
addq $-0x30, %rdx
cmpq $0x1, %rcx
ja 0x47929
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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
movq 0xb437d(%rip), %rax     # 0xfbcd0
movl 0x1a88(%rax), %ecx
testl %ecx, %ecx
jle 0x47976
movq 0x1a90(%rax), %rdx
movq -0x8(%rdx,%rcx,8), %rdx
cmpq %rdi, %rdx
je 0x4797a
decq %rcx
cmpq %rsi, %rdx
jne 0x47959
xorl %eax, %eax
jmp 0x4797c
movb $0x1, %al
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x47e51
pushq %rbp
movq %rsp, %rbp
cmpq %rsi, %rdi
sete %al
je 0x47e4f
movq 0x388(%rdi), %rdi
testq %rdi, %rdi
jne 0x47e3b
popq %rbp
retq
movb $0x1, %al
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xb3e71(%rip), %rax     # 0xfbcd0
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_O3/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
testq %rdi, %rdi
je 0x4b5e2
movq 0x40(%rdi), %rax
testq %rax, %rax
je 0x4b5e2
movss 0x58(%rdi), %xmm2
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm2
jbe 0x4b601
movq 0xb0774(%rip), %rcx     # 0xfbcd0
movq %rdi, 0x1978(%rcx)
movss 0xb0(%rcx), %xmm1
mulss 0x14(%rdi), %xmm1
mulss %xmm1, %xmm2
movss 0x69a68(%rip), %xmm1    # 0xb4fe4
maxss %xmm2, %xmm1
movss %xmm1, 0x1984(%rcx)
movq 0x1ae0(%rcx), %rdx
testq %rdx, %rdx
je 0x4b5b3
mulss 0x2b0(%rdx), %xmm1
movq 0x388(%rdx), %rdx
testq %rdx, %rdx
je 0x4b5b0
mulss 0x2b0(%rdx), %xmm1
movaps %xmm1, %xmm0
movss %xmm0, 0x1980(%rcx)
movq 0x38(%rax), %rdx
movq %rdx, 0x1988(%rcx)
addq $0x70, %rax
movq %rax, 0x1a58(%rcx)
movq %rdi, 0x1990(%rcx)
movss %xmm0, 0x1998(%rcx)
popq %rbp
retq
leaq 0x6bdc6(%rip), %rdi     # 0xb73af
leaq 0x6ab75(%rip), %rsi     # 0xb6165
leaq 0x6bdd1(%rip), %rcx     # 0xb73c8
movl $0x18bb, %edx           # imm = 0x18BB
callq 0xc140
leaq 0x6bde5(%rip), %rdi     # 0xb73ed
leaq 0x6ab56(%rip), %rsi     # 0xb6165
leaq 0x6bdb2(%rip), %rcx     # 0xb73c8
movl $0x18bc, %edx           # imm = 0x18BC
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/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
movq 0xb06a5(%rip), %rax     # 0xfbcd0
movl 0x1a98(%rax), %ecx
testq %rdi, %rdi
je 0x4b65c
movl %ecx, %r8d
decq %r8
movl %ecx, %edx
testl %edx, %edx
jle 0x4b65c
movq 0x1aa0(%rax), %r9
movl %r8d, %r10d
decl %edx
decq %r8
cmpq %rdi, (%r9,%r10,8)
jne 0x4b63e
cmpl $-0x1, %edx
jne 0x4b65e
movl %ecx, %edx
testl %edx, %edx
jle 0x4b6b1
movl %edx, %edi
incq %rdi
cmpl %ecx, %edx
jg 0x4b6d3
movq 0x1aa0(%rax), %r8
movq -0x10(%r8,%rdi,8), %r8
cmpq %rsi, %r8
je 0x4b6a8
cmpb $0x1, 0x8f(%r8)
jne 0x4b6a8
movl 0xc(%r8), %r9d
movl %r9d, %r10d
shrl $0x18, %r10d
andl $0x1, %r10d
notl %r9d
testl $0x40200, %r9d          # imm = 0x40200
sete %r9b
orb %r10b, %r9b
je 0x4b6b9
decq %rdi
cmpq $0x1, %rdi
ja 0x4b667
xorl %edi, %edi
popq %rbp
jmp 0x4726c
movq 0x3a8(%r8), %rdi
testq %rdi, %rdi
je 0x4b6ce
cmpb $0x0, 0x8f(%rdi)
jne 0x4b6b3
movq %r8, %rdi
jmp 0x4b6b3
leaq 0x6df9e(%rip), %rdi     # 0xb9678
leaq 0x6dfaa(%rip), %rsi     # 0xb968b
leaq 0x6f37f(%rip), %rcx     # 0xbaa67
movl $0x65c, %edx            # imm = 0x65C
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4b71e
movq 0xb05d0(%rip), %rax     # 0xfbcd0
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 0x6bdf3(%rip), %rdi     # 0xb751c
leaq 0x6aa35(%rip), %rsi     # 0xb6165
leaq 0x6bf45(%rip), %rcx     # 0xb767c
movl $0x1a20, %edx           # imm = 0x1A20
callq 0xc140