LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4c23d
movq 0x40(%rdi), %rax
testq %rax, %rax
je 0x4c23d
movss 0x58(%rdi), %xmm2
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm2
jbe 0x4c25c
movq 0xb1b19(%rip), %rcx     # 0xfdcd0
movq %rdi, 0x1978(%rcx)
movss 0xb0(%rcx), %xmm1
mulss 0x14(%rdi), %xmm1
mulss %xmm1, %xmm2
movss 0x6ae0d(%rip), %xmm1    # 0xb6fe4
maxss %xmm2, %xmm1
movss %xmm1, 0x1984(%rcx)
movq 0x1ae0(%rcx), %rdx
testq %rdx, %rdx
je 0x4c20e
mulss 0x2b0(%rdx), %xmm1
movq 0x388(%rdx), %rdx
testq %rdx, %rdx
je 0x4c20b
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 0x6d16b(%rip), %rdi     # 0xb93af
leaq 0x6bf1a(%rip), %rsi     # 0xb8165
leaq 0x6d176(%rip), %rcx     # 0xb93c8
movl $0x18bb, %edx           # imm = 0x18BB
callq 0xc140
leaq 0x6d18a(%rip), %rdi     # 0xb93ed
leaq 0x6befb(%rip), %rsi     # 0xb8165
leaq 0x6d157(%rip), %rcx     # 0xb93c8
movl $0x18bc, %edx           # imm = 0x18BC
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/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 0xb1a4a(%rip), %rax     # 0xfdcd0
movl 0x1a98(%rax), %ecx
leal -0x1(%rcx), %edx
testq %rdi, %rdi
je 0x4c2c9
leaq -0x1(%rcx), %r9
movl %ecx, %r8d
testl %r8d, %r8d
jle 0x4c2b8
movq 0x1aa0(%rax), %r10
movl %r9d, %r11d
decl %r8d
decq %r9
cmpq %rdi, (%r10,%r11,8)
jne 0x4c29b
jmp 0x4c2be
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
leal -0x1(%r8), %edi
cmpl $-0x1, %r8d
cmovnel %edi, %edx
testl %edx, %edx
js 0x4c31d
movl %edx, %r8d
incq %r8
xorl %edi, %edi
cmpl %ecx, %edx
jge 0x4c33f
movq 0x1aa0(%rax), %r9
movq -0x8(%r9,%r8,8), %r9
cmpq %rsi, %r9
je 0x4c316
cmpb $0x1, 0x8f(%r9)
jne 0x4c316
movl 0xc(%r9), %r10d
movl %r10d, %r11d
shrl $0x18, %r11d
andl $0x1, %r11d
notl %r10d
testl $0x40200, %r10d         # imm = 0x40200
sete %r10b
orb %r11b, %r10b
je 0x4c321
decq %r8
jg 0x4c2d5
jmp 0x4c339
xorl %edi, %edi
jmp 0x4c339
movq 0x3a8(%r9), %rdi
testq %rdi, %rdi
je 0x4c336
cmpb $0x0, 0x8f(%rdi)
jne 0x4c339
movq %r9, %rdi
popq %rbp
jmp 0x47d9b
leaq 0x6f332(%rip), %rdi     # 0xbb678
leaq 0x6f33e(%rip), %rsi     # 0xbb68b
leaq 0x70713(%rip), %rcx     # 0xbca67
movl $0x65c, %edx            # imm = 0x65C
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4c38a
movq 0xb1964(%rip), %rax     # 0xfdcd0
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 0x6d187(%rip), %rdi     # 0xb951c
leaq 0x6bdc9(%rip), %rsi     # 0xb8165
leaq 0x6d2d9(%rip), %rcx     # 0xb967c
movl $0x1a20, %edx           # imm = 0x1A20
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/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
movl 0x1a88(%rdi), %eax
testq %rax, %rax
je 0x50858
xorl %ecx, %ecx
testl %eax, %eax
movl $0x0, %edx
cmovgl %eax, %edx
cmpq %rcx, %rdx
je 0x50865
movq 0x1a90(%rdi), %rsi
movq (%rsi,%rcx,8), %rsi
movl $0xffffffff, 0x2b4(%rsi) # imm = 0xFFFFFFFF
incq %rcx
cmpq %rcx, %rax
jne 0x50836
addq $0x3108, %rdi           # imm = 0x3108
popq %rbp
jmp 0x5f326
leaq 0x6ae0c(%rip), %rdi     # 0xbb678
leaq 0x6ae18(%rip), %rsi     # 0xbb68b
leaq 0x6c1ed(%rip), %rcx     # 0xbca67
movl $0x65c, %edx            # imm = 0x65C
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/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 0x5a53f
movl (%rax), %ecx
xorl %edx, %edx
movq %rdx, (%rax)
movq %rdx, 0x6(%rax)
movl %ecx, (%rax)
movb $0x1, 0xd(%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
pushq %rax
movq 0x3110(%rdi), %r14
testq %r14, %r14
je 0x50a00
movq %rdi, %rbx
addq $0x3108, %rbx           # imm = 0x3108
addq $0x4, %r14
movl $0x1ac8, %r15d          # imm = 0x1AC8
cmpb $0x1, 0xd(%r14)
jne 0x509e9
movl (%r14), %esi
movq 0xad354(%rip), %rdi     # 0xfdcd0
addq %r15, %rdi
callq 0x43208
testq %rax, %rax
je 0x509e4
movswl 0x4(%r14), %ecx
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
movswl 0x6(%r14), %ecx
xorps %xmm1, %xmm1
cvtsi2ss %ecx, %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movlps %xmm0, 0x10(%rax)
movzwl 0x8(%r14), %ecx
testw %cx, %cx
jle 0x509da
movzwl 0xa(%r14), %edx
testw %dx, %dx
jle 0x509da
movzwl %cx, %ecx
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
movzwl %dx, %ecx
xorps %xmm1, %xmm1
cvtsi2ss %ecx, %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movlhps %xmm0, %xmm0            # xmm0 = xmm0[0,0]
movups %xmm0, 0x18(%rax)
movb 0xc(%r14), %cl
movb %cl, 0x91(%rax)
movb $0x0, 0xd(%r14)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5f656
movq %rax, %r14
testq %rax, %rax
jne 0x5096b
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::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 0xad057(%rip), %rax     # 0xfdcd0
movl $0x0, 0x30e4(%rax)
testq %rdi, %rdi
je 0x50ce4
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
leaq -0x18(%rbp), %rdi
movq $0x0, (%rdi)
callq 0x5a96c
movq %rax, %rbx
leaq 0x69bff(%rip), %rsi     # 0xba8af
movq %r14, %rdi
callq 0xc9a0
testq %rax, %rax
je 0x50cdc
movq %rax, %r14
movq -0x18(%rbp), %rdx
movl $0x1, %esi
movq %rbx, %rdi
movq %rax, %rcx
callq 0xc8d0
movq %r14, %rdi
callq 0xc3b0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
movl 0x4(%rdi), %eax
movl 0x10(%rdi), %r12d
addl %r14d, %r12d
cmpl %r12d, %eax
jge 0x50da6
testl %eax, %eax
je 0x50d23
movl %eax, %r13d
shrl $0x1f, %r13d
addl %eax, %r13d
sarl %r13d
addl %eax, %r13d
jmp 0x50d29
movl $0x8, %r13d
cmpl %r12d, %r13d
cmovlel %r12d, %r13d
cmpl %r13d, %eax
jge 0x50da6
movslq %r13d, %rdi
shlq $0x3, %rdi
movq 0xacf8d(%rip), %rax     # 0xfdcd0
testq %rax, %rax
je 0x50d4e
incl 0x3b4(%rax)
movq 0xacf8b(%rip), %rsi     # 0xfdce0
callq *0xa87b5(%rip)          # 0xf9510
movq %rax, %r15
movq 0x8(%rbx), %rsi
testq %rsi, %rsi
je 0x50d9e
movslq (%rbx), %rdx
shlq $0x3, %rdx
movq %r15, %rdi
callq 0xc080
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x50d91
movq 0xacf4a(%rip), %rax     # 0xfdcd0
testq %rax, %rax
je 0x50d91
decl 0x3b4(%rax)
movq 0xacf48(%rip), %rsi     # 0xfdce0
callq *0xa877a(%rip)          # 0xf9518
movq %r15, 0x8(%rbx)
movl %r13d, 0x4(%rbx)
movl %r12d, (%rbx)
movl 0x10(%rbx), %edx
testq %rdx, %rdx
je 0x50e80
testl %r14d, %r14d
js 0x50e8f
cmpl %r14d, (%rbx)
jle 0x50e8f
testl %edx, %edx
jle 0x50e8f
shlq $0x3, %r14
addq 0x8(%rbx), %r14
movq 0x18(%rbx), %rsi
shlq $0x3, %rdx
movq %r14, %rdi
callq 0xc080
movl 0x14(%rbx), %eax
testl %eax, %eax
jns 0x50e79
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
xorl %r15d, %r15d
testl %ecx, %ecx
cmovgl %ecx, %r15d
leaq (,%r15,8), %rdi
movq 0xacebb(%rip), %rax     # 0xfdcd0
testq %rax, %rax
je 0x50e20
incl 0x3b4(%rax)
movq 0xaceb9(%rip), %rsi     # 0xfdce0
callq *0xa86e3(%rip)          # 0xf9510
movq %rax, %r14
movq 0x18(%rbx), %rsi
testq %rsi, %rsi
je 0x50e71
movslq 0x10(%rbx), %rdx
shlq $0x3, %rdx
movq %r14, %rdi
callq 0xc080
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x50e64
movq 0xace77(%rip), %rax     # 0xfdcd0
testq %rax, %rax
je 0x50e64
decl 0x3b4(%rax)
movq 0xace75(%rip), %rsi     # 0xfdce0
callq *0xa86a7(%rip)          # 0xf9518
movq %r14, 0x18(%rbx)
movl %r15d, 0x14(%rbx)
movl $0x0, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6a7e2(%rip), %rdi     # 0xbb678
leaq 0x6a7ee(%rip), %rsi     # 0xbb68b
leaq 0x6bc3f(%rip), %rcx     # 0xbcae3
movl $0x65c, %edx            # imm = 0x65C
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/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 0xac036(%rip), %rbx     # 0xfdcd0
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)
movw $0x0, 0x2051(%rbx)
movl $0x0, 0x206c(%rbx)
movq %rax, 0x2078(%rbx)
movq $0x7f7fffff, 0x2070(%rbx) # imm = 0x7F7FFFFF
movq 0x2090(%rbx), %rdi
testq %rdi, %rdi
je 0x51d33
movq $0x0, 0x2088(%rbx)
testq %rbx, %rbx
je 0x51d18
decl 0x3b4(%rbx)
movq 0xabfc1(%rip), %rsi     # 0xfdce0
callq *0xa77f3(%rip)          # 0xf9518
movq $0x0, 0x2090(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x2098(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::SetTooltip(char const*, ...)
void ImGui::SetTooltip(const char* fmt, ...)
{
    va_list args;
    va_start(args, fmt);
    SetTooltipV(fmt, args);
    va_end(args);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rdi, %rbx
leaq -0xe0(%rbp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x51d9a
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
leaq -0x30(%rbp), %r14
movq %rdi, 0x10(%r14)
leaq 0x10(%rbp), %rax
movq %rax, 0x8(%r14)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%r14)
xorl %edi, %edi
movl $0x1, %esi
callq 0x57b95
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9209f
callq 0x57cdf
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
movq %rsi, %rbx
movq %rdi, %r14
movl (%rdi), %r12d
movl 0x4(%rdi), %eax
cmpl %eax, %r12d
jne 0x51e95
incl %r12d
testl %eax, %eax
je 0x51e13
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
jmp 0x51e18
movl $0x8, %ecx
cmpl %r12d, %ecx
cmovgl %ecx, %r12d
cmpl %r12d, %eax
jge 0x51e95
movslq %r12d, %rdi
shlq $0x3, %rdi
movq 0xabe9e(%rip), %rax     # 0xfdcd0
testq %rax, %rax
je 0x51e3d
incl 0x3b4(%rax)
movq 0xabe9c(%rip), %rsi     # 0xfdce0
callq *0xa76c6(%rip)          # 0xf9510
movq %rax, %r15
movq 0x8(%r14), %rsi
testq %rsi, %rsi
je 0x51e8d
movslq (%r14), %rdx
shlq $0x3, %rdx
movq %r15, %rdi
callq 0xc080
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0x51e80
movq 0xabe5b(%rip), %rax     # 0xfdcd0
testq %rax, %rax
je 0x51e80
decl 0x3b4(%rax)
movq 0xabe59(%rip), %rsi     # 0xfdce0
callq *0xa768b(%rip)          # 0xf9518
movq %r15, 0x8(%r14)
movl %r12d, 0x4(%r14)
movq 0x8(%r14), %rax
movslq (%r14), %rcx
movq %rbx, (%rax,%rcx,8)
incl (%r14)
cmpb $0x1, 0x8e(%rbx)
jne 0x51f0c
movslq 0x198(%rbx), %r15
cmpq $0x2, %r15
jl 0x51ed4
movq 0x1a0(%rbx), %rdi
leaq 0xb9de(%rip), %rcx      # 0x5d8a5
movl $0x8, %edx
movq %r15, %rsi
callq 0xc620
testl %r15d, %r15d
jle 0x51f0c
xorl %r12d, %r12d
movslq 0x198(%rbx), %rax
cmpq %rax, %r12
jge 0x51f15
movq 0x1a0(%rbx), %rax
movq (%rax,%r12,8), %rsi
cmpb $0x1, 0x8e(%rsi)
jne 0x51f04
movq %r14, %rdi
callq 0x51ddf
incq %r12
cmpq %r12, %r15
jne 0x51edc
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6975c(%rip), %rdi     # 0xbb678
leaq 0x69768(%rip), %rsi     # 0xbb68b
leaq 0x6ab3d(%rip), %rcx     # 0xbca67
movl $0x65c, %edx            # imm = 0x65C
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/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 0x52491
cmpl $0x200, %edi            # imm = 0x200
jge 0x52494
movq 0xab849(%rip), %rax     # 0xfdcd0
movl %edi, %ecx
movb 0x144(%rax,%rcx), %al
retq
xorl %eax, %eax
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x6675d(%rip), %rdi     # 0xb8bfc
leaq 0x65cbf(%rip), %rsi     # 0xb8165
leaq 0x667b1(%rip), %rcx     # 0xb8c5e
movl $0x1185, %edx           # imm = 0x1185
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/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
movl $0x1, %eax
xorps %xmm4, %xmm4
ucomiss %xmm4, %xmm1
jne 0x524ca
jnp 0x52515
xorl %eax, %eax
ucomiss %xmm1, %xmm0
jae 0x52515
ucomiss %xmm3, %xmm4
jae 0x52503
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 0x52515
cmpltps %xmm2, %xmm0
cmpleps %xmm1, %xmm2
andps %xmm0, %xmm2
movd %xmm2, %eax
andl $0x1, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x52548
cmpl $0x200, %edi            # imm = 0x200
jge 0x5254b
movaps %xmm1, %xmm3
movaps %xmm0, %xmm2
movq 0xab7a0(%rip), %rax     # 0xfdcd0
movl %edi, %ecx
movss 0x4a0(%rax,%rcx,4), %xmm1
movaps %xmm1, %xmm0
subss 0x18(%rax), %xmm0
jmp 0x524b7
xorl %eax, %eax
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x66723(%rip), %rdi     # 0xb8c79
leaq 0x65c08(%rip), %rsi     # 0xb8165
leaq 0x6676d(%rip), %rcx     # 0xb8cd1
movl $0x11a0, %edx           # imm = 0x11A0
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/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 0x525c8
cmpl $0x200, %edi            # imm = 0x200
jge 0x525cc
movq 0xab74b(%rip), %rcx     # 0xfdcd0
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 0x525ca
movss 0x94(%rcx), %xmm0
ucomiss %xmm0, %xmm1
jbe 0x525c8
movss 0x98(%rcx), %xmm1
callq 0x52517
testl %eax, %eax
setg %al
jmp 0x525ca
xorl %eax, %eax
popq %rbp
retq
leaq 0x66629(%rip), %rdi     # 0xb8bfc
leaq 0x65b8b(%rip), %rsi     # 0xb8165
leaq 0x66722(%rip), %rcx     # 0xb8d03
movl $0x11aa, %edx           # imm = 0x11AA
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/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 0x52611
cmpl $0x200, %edi            # imm = 0x200
jge 0x5261e
movq 0xab6d2(%rip), %rax     # 0xfdcd0
movl %edi, %ecx
movss 0xca0(%rax,%rcx,4), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jae 0x52614
xorl %eax, %eax
retq
movb 0x144(%rax,%rcx), %al
xorb $0x1, %al
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x665d3(%rip), %rdi     # 0xb8bfc
leaq 0x65b35(%rip), %rsi     # 0xb8165
leaq 0x666f0(%rip), %rcx     # 0xb8d27
movl $0x11b7, %edx           # imm = 0x11B7
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/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 0x526a8
movq 0xab67d(%rip), %rax     # 0xfdcd0
movl %edi, %ecx
movss 0x43c(%rax,%rcx,4), %xmm1
movb $0x1, %bl
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm1
jne 0x5266a
jnp 0x5269f
testb %sil, %sil
je 0x5269d
movss 0x94(%rax), %xmm2
ucomiss %xmm2, %xmm1
jbe 0x5269d
movaps %xmm1, %xmm0
subss 0x18(%rax), %xmm0
movss 0x98(%rax), %xmm3
mulss 0x64970(%rip), %xmm3    # 0xb7004
callq 0x524b7
testl %eax, %eax
jg 0x5269f
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x66697(%rip), %rdi     # 0xb8d46
leaq 0x65aaf(%rip), %rsi     # 0xb8165
leaq 0x66707(%rip), %rcx     # 0xb8dc4
movl $0x11c5, %edx           # imm = 0x11C5
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/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 0x52768
movq 0xab58b(%rip), %rax     # 0xfdcd0
xorps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
jbe 0x52752
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 0x665d3(%rip), %rdi     # 0xb8d46
leaq 0x659eb(%rip), %rsi     # 0xb8165
leaq 0x666d7(%rip), %rcx     # 0xb8e58
movl $0x11e7, %edx           # imm = 0x11E7
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/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 0x527aa
movq 0xab539(%rip), %rax     # 0xfdcd0
movl %edi, %ecx
cmpb $0x1, 0x130(%rax,%rcx)
je 0x52739
xorl %eax, %eax
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x66591(%rip), %rdi     # 0xb8d46
leaq 0x659a9(%rip), %rsi     # 0xb8165
leaq 0x666d3(%rip), %rcx     # 0xb8e96
movl $0x11f0, %edx           # imm = 0x11F0
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/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:
movq 0xab4e7(%rip), %rax     # 0xfdcd0
movslq 0x1c80(%rax), %rcx
testq %rcx, %rcx
jle 0x52815
cmpl %ecx, 0x1c70(%rax)
jl 0x52820
movq 0x1c78(%rax), %rax
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
addq $-0x8, %rax
jmp 0x5281b
addq $0x128, %rax            # imm = 0x128
movsd (%rax), %xmm0
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x68e4d(%rip), %rdi     # 0xbb678
leaq 0x68e59(%rip), %rsi     # 0xbb68b
leaq 0x6a311(%rip), %rcx     # 0xbcb4a
movl $0x65c, %edx            # imm = 0x65C
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::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 0xab482(%rip), %rcx     # 0xfdcd0
movb $0x1, %al
cmpb $0x0, 0x130(%rcx)
jne 0x52879
xorl %edx, %edx
movq %rdx, %rax
cmpq $0x4, %rdx
je 0x52872
leaq 0x1(%rax), %rdx
cmpb $0x1, 0x131(%rcx,%rax)
jne 0x5285b
cmpq $0x4, %rax
setb %al
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x52926
movq 0xab43e(%rip), %r14     # 0xfdcd0
xorps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
jbe 0x528a0
movss 0x38(%r14), %xmm0
movl %edi, %ebx
cmpb $0x0, 0x130(%r14,%rbx)
jne 0x528bb
xorps %xmm2, %xmm2
cmpb $0x1, 0x42a(%r14,%rbx)
jne 0x5291e
movss 0x48c(%r14,%rbx,4), %xmm1
mulss %xmm0, %xmm0
xorps %xmm2, %xmm2
ucomiss %xmm0, %xmm1
jb 0x5291e
leaq 0x128(%r14), %rdi
callq 0x4806b
testb %al, %al
je 0x5291b
leaq (%r14,%rbx,8), %rbx
addq $0x3cc, %rbx            # imm = 0x3CC
movq %rbx, %rdi
callq 0x4806b
testb %al, %al
xorps %xmm2, %xmm2
je 0x5291e
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 0x5291e
xorps %xmm2, %xmm2
movaps %xmm2, %xmm0
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x66419(%rip), %rdi     # 0xb8d46
leaq 0x65831(%rip), %rsi     # 0xb8165
leaq 0x665cd(%rip), %rcx     # 0xb8f08
movl $0x121f, %edx           # imm = 0x121F
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::ResetMouseDragDelta(int)
void ImGui::ResetMouseDragDelta(ImGuiMouseButton button)
{
    ImGuiContext& g = *GImGui;
    IM_ASSERT(button >= 0 && button < IM_ARRAYSIZE(g.IO.MouseDown));
    // NB: We don't need to reset g.IO.MouseDragMaxDistanceSqr
    g.IO.MouseClickedPos[button] = g.IO.MousePos;
}

// Assembly:
cmpl $0x5, %edi
jae 0x52963
movq 0xab37f(%rip), %rax     # 0xfdcd0
movl %edi, %ecx
movq 0x128(%rax), %rdx
movq %rdx, 0x3cc(%rax,%rcx,8)
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x663d8(%rip), %rdi     # 0xb8d46
leaq 0x657f0(%rip), %rsi     # 0xb8165
leaq 0x665c5(%rip), %rcx     # 0xb8f41
movl $0x122c, %edx           # imm = 0x122C
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::IsItemActive()
bool ImGui::IsItemActive()
{
    ImGuiContext& g = *GImGui;
    if (g.ActiveId)
    {
        ImGuiWindow* window = g.CurrentWindow;
        return g.ActiveId == window->DC.LastItemId;
    }
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0xab2f3(%rip), %rax     # 0xfdcd0
movl 0x1b30(%rax), %ecx
testl %ecx, %ecx
je 0x529f9
movq 0x1ae0(%rax), %rax
cmpl 0x124(%rax), %ecx
sete %al
jmp 0x529fb
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::IsItemActivated()
bool ImGui::IsItemActivated()
{
    ImGuiContext& g = *GImGui;
    if (g.ActiveId)
    {
        ImGuiWindow* window = g.CurrentWindow;
        if (g.ActiveId == window->DC.LastItemId && g.ActiveIdPreviousFrame != window->DC.LastItemId)
            return true;
    }
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0xab2c8(%rip), %rcx     # 0xfdcd0
movl 0x1b30(%rcx), %eax
testl %eax, %eax
je 0x52a2d
movq 0x1ae0(%rcx), %rdx
movl 0x124(%rdx), %edx
cmpl %edx, %eax
jne 0x52a2d
movb $0x1, %al
cmpl %edx, 0x1b70(%rcx)
jne 0x52a2f
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::IsItemDeactivated()
bool ImGui::IsItemDeactivated()
{
    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = g.CurrentWindow;
    if (window->DC.LastItemStatusFlags & ImGuiItemStatusFlags_HasDeactivated)
        return (window->DC.LastItemStatusFlags & ImGuiItemStatusFlags_Deactivated) != 0;
    return (g.ActiveIdPreviousFrame == window->DC.LastItemId && g.ActiveIdPreviousFrame != 0 && g.ActiveId != window->DC.LastItemId);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0xab294(%rip), %rcx     # 0xfdcd0
movq 0x1ae0(%rcx), %rdx
movl 0x128(%rdx), %eax
testb $0x20, %al
jne 0x52a6d
movl 0x1b70(%rcx), %esi
movl 0x124(%rdx), %eax
cmpl %eax, %esi
setne %dl
testl %esi, %esi
sete %sil
orb %dl, %sil
je 0x52a75
xorl %eax, %eax
jmp 0x52a7e
andl $0x40, %eax
shrl $0x6, %eax
jmp 0x52a7e
cmpl %eax, 0x1b30(%rcx)
setne %al
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::SetItemAllowOverlap()
void ImGui::SetItemAllowOverlap()
{
    ImGuiContext& g = *GImGui;
    ImGuiID id = g.CurrentWindow->DC.LastItemId;
    if (g.HoveredId == id)
        g.HoveredIdAllowOverlap = true;
    if (g.ActiveId == id)
        g.ActiveIdAllowOverlap = true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0xab0a7(%rip), %rax     # 0xfdcd0
movq 0x1ae0(%rax), %rcx
movl 0x124(%rcx), %ecx
cmpl %ecx, 0x1b1c(%rax)
jne 0x52c45
movb $0x1, 0x1b24(%rax)
cmpl %ecx, 0x1b30(%rax)
jne 0x52c54
movb $0x1, 0x1b3d(%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::SetItemUsingMouseWheel()
void ImGui::SetItemUsingMouseWheel()
{
    ImGuiContext& g = *GImGui;
    ImGuiID id = g.CurrentWindow->DC.LastItemId;
    if (g.HoveredId == id)
        g.HoveredIdUsingMouseWheel = true;
    if (g.ActiveId == id)
        g.ActiveIdUsingMouseWheel = true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0xab06f(%rip), %rax     # 0xfdcd0
movq 0x1ae0(%rax), %rcx
movl 0x124(%rcx), %ecx
cmpl %ecx, 0x1b1c(%rax)
jne 0x52c7d
movb $0x1, 0x1b25(%rax)
cmpl %ecx, 0x1b30(%rax)
jne 0x52c8c
movb $0x1, 0x1b42(%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::NavInitWindow(ImGuiWindow*, bool)
void ImGui::NavInitWindow(ImGuiWindow* window, bool force_reinit)
{
    ImGuiContext& g = *GImGui;
    IM_ASSERT(window == g.NavWindow);
    bool init_for_nav = false;
    if (!(window->Flags & ImGuiWindowFlags_NoNavInputs))
        if (!(window->Flags & ImGuiWindowFlags_ChildWindow) || (window->Flags & ImGuiWindowFlags_Popup) || (window->NavLastIds[0] == 0) || force_reinit)
            init_for_nav = true;
    IMGUI_DEBUG_LOG_NAV("[nav] NavInitRequest: from NavInitWindow(), init_for_nav=%d, window=\"%s\", layer=%d\n", init_for_nav, window->Name, g.NavLayer);
    if (init_for_nav)
    {
        SetNavID(0, g.NavLayer, 0);
        g.NavInitRequest = true;
        g.NavInitRequestFromMove = false;
        g.NavInitResultId = 0;
        g.NavInitResultRectRel = ImRect();
        NavUpdateAnyRequestFlag();
    }
    else
    {
        g.NavId = window->NavLastIds[0];
        g.NavFocusScopeId = 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0xaad49(%rip), %rbx     # 0xfdcd0
cmpq %rdi, 0x1c90(%rbx)
jne 0x5303a
movl 0xc(%rdi), %eax
btl $0x12, %eax
jb 0x53001
andl $0x5000000, %eax        # imm = 0x5000000
cmpl $0x1000000, %eax        # imm = 0x1000000
jne 0x52fbc
cmpl $0x0, 0x3b0(%rdi)
setne %al
xorb $0x1, %sil
testb %sil, %al
jne 0x53001
movl 0x1cdc(%rbx), %esi
xorl %edi, %edi
xorl %edx, %edx
callq 0x58d20
movw $0x1, 0x1ce9(%rbx)
movl $0x0, 0x1cec(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x1cf0(%rbx)
movq 0xaace1(%rip), %rax     # 0xfdcd0
cmpb $0x0, 0x1d00(%rax)
je 0x53019
movb $0x1, 0x1ce8(%rax)
jmp 0x53029
movl 0x3b0(%rdi), %eax
movl %eax, 0x1c98(%rbx)
movl $0x0, 0x1c9c(%rbx)
jmp 0x53033
movb 0x1ce9(%rax), %cl
movb %cl, 0x1ce8(%rax)
testb %cl, %cl
je 0x53033
cmpq $0x0, 0x1c90(%rax)
je 0x53059
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x673a6(%rip), %rdi     # 0xba3e7
leaq 0x6511d(%rip), %rsi     # 0xb8165
leaq 0x673ae(%rip), %rcx     # 0xba3fd
movl $0x2207, %edx           # imm = 0x2207
callq 0xc140
leaq 0x691e4(%rip), %rdi     # 0xbc244
leaq 0x650fe(%rip), %rsi     # 0xb8165
leaq 0x691ec(%rip), %rcx     # 0xbc25a
movl $0x2200, %edx           # imm = 0x2200
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::BeginChildFrame(unsigned int, ImVec2 const&, int)
bool ImGui::BeginChildFrame(ImGuiID id, const ImVec2& size, ImGuiWindowFlags extra_flags)
{
    ImGuiContext& g = *GImGui;
    const ImGuiStyle& style = g.Style;
    PushStyleColor(ImGuiCol_ChildBg, style.Colors[ImGuiCol_FrameBg]);
    PushStyleVar(ImGuiStyleVar_ChildRounding, style.FrameRounding);
    PushStyleVar(ImGuiStyleVar_ChildBorderSize, style.FrameBorderSize);
    PushStyleVar(ImGuiStyleVar_WindowPadding, style.FramePadding);
    bool ret = BeginChild(id, size, true, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_AlwaysUseWindowPadding | extra_flags);
    PopStyleVar(3);
    PopStyleColor();
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movl %edi, %r15d
movq 0xaa472(%rip), %r12     # 0xfdcd0
leaq 0x1694(%r12), %rsi
movl $0x3, %edi
callq 0x4481b
movss 0x15a0(%r12), %xmm0
movl $0x6, %edi
callq 0x449ff
movss 0x15a4(%r12), %xmm0
movl $0x7, %edi
callq 0x449ff
addq $0x1598, %r12           # imm = 0x1598
movl $0x1, %edi
movq %r12, %rsi
callq 0x44ba2
orl $0x10004, %ebx          # imm = 0x10004
movl %r15d, %edi
movq %r14, %rsi
movl $0x1, %edx
movl %ebx, %ecx
callq 0x530c8
movl %eax, %ebx
movl $0x3, %edi
callq 0x44d5f
movl $0x1, %edi
callq 0x44964
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::CalcWindowNextAutoFitSize(ImGuiWindow*)
ImVec2 ImGui::CalcWindowNextAutoFitSize(ImGuiWindow* window)
{
    ImVec2 size_contents_current;
    ImVec2 size_contents_ideal;
    CalcWindowContentSizes(window, &size_contents_current, &size_contents_ideal);
    ImVec2 size_auto_fit = CalcWindowAutoFitSize(window, size_contents_ideal);
    ImVec2 size_final = CalcWindowSizeAfterConstraint(window, size_auto_fit);
    return size_final;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorl %eax, %eax
leaq -0x20(%rbp), %rsi
movq %rax, (%rsi)
leaq -0x18(%rbp), %r14
movq %rax, (%r14)
movq %r14, %rdx
callq 0x53969
movq %rbx, %rdi
movq %r14, %rsi
callq 0x53a97
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x53cbf
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: CalcWindowContentSizes(ImGuiWindow*, ImVec2*, ImVec2*)
static void CalcWindowContentSizes(ImGuiWindow* window, ImVec2* content_size_current, ImVec2* content_size_ideal)
{
    bool preserve_old_content_sizes = false;
    if (window->Collapsed && window->AutoFitFramesX <= 0 && window->AutoFitFramesY <= 0)
        preserve_old_content_sizes = true;
    else if (window->Hidden && window->HiddenFramesCannotSkipItems == 0 && window->HiddenFramesCanSkipItems > 0)
        preserve_old_content_sizes = true;
    if (preserve_old_content_sizes)
    {
        *content_size_current = window->ContentSize;
        *content_size_ideal = window->ContentSizeIdeal;
        return;
    }

    content_size_current->x = (window->ContentSizeExplicit.x != 0.0f) ? window->ContentSizeExplicit.x : IM_FLOOR(window->DC.CursorMaxPos.x - window->DC.CursorStartPos.x);
    content_size_current->y = (window->ContentSizeExplicit.y != 0.0f) ? window->ContentSizeExplicit.y : IM_FLOOR(window->DC.CursorMaxPos.y - window->DC.CursorStartPos.y);
    content_size_ideal->x = (window->ContentSizeExplicit.x != 0.0f) ? window->ContentSizeExplicit.x : IM_FLOOR(ImMax(window->DC.CursorMaxPos.x, window->DC.IdealMaxPos.x) - window->DC.CursorStartPos.x);
    content_size_ideal->y = (window->ContentSizeExplicit.y != 0.0f) ? window->ContentSizeExplicit.y : IM_FLOOR(ImMax(window->DC.CursorMaxPos.y, window->DC.IdealMaxPos.y) - window->DC.CursorStartPos.y);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpb $0x1, 0x91(%rdi)
jne 0x5398c
cmpb $0x0, 0xa4(%rdi)
jg 0x5398c
cmpb $0x0, 0xa5(%rdi)
jle 0x53a87
cmpb $0x1, 0x95(%rdi)
jne 0x539a2
cmpb $0x0, 0xad(%rdi)
je 0x53a7a
movss 0x38(%rdi), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm1
jne 0x539c8
jp 0x539c8
movss 0xf0(%rdi), %xmm1
subss 0xe8(%rdi), %xmm1
cvttps2dq %xmm1, %xmm1
cvtdq2ps %xmm1, %xmm1
movss %xmm1, (%rsi)
movss 0x3c(%rdi), %xmm1
ucomiss %xmm0, %xmm1
jne 0x539ef
jp 0x539ef
movss 0xf4(%rdi), %xmm0
subss 0xec(%rdi), %xmm0
cvttps2dq %xmm0, %xmm0
cvtdq2ps %xmm0, %xmm1
movss %xmm1, 0x4(%rsi)
movss 0x38(%rdi), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm1
jne 0x53a33
jp 0x53a33
movss 0xf0(%rdi), %xmm1
movss 0xf8(%rdi), %xmm2
movaps %xmm2, %xmm3
cmpless %xmm1, %xmm3
andps %xmm3, %xmm1
andnps %xmm2, %xmm3
orps %xmm1, %xmm3
subss 0xe8(%rdi), %xmm3
cvttps2dq %xmm3, %xmm1
cvtdq2ps %xmm1, %xmm1
movss %xmm1, (%rdx)
movss 0x3c(%rdi), %xmm1
ucomiss %xmm0, %xmm1
jne 0x53a73
jp 0x53a73
movss 0xf4(%rdi), %xmm0
movss 0xfc(%rdi), %xmm1
movaps %xmm1, %xmm2
cmpless %xmm0, %xmm2
andps %xmm2, %xmm0
andnps %xmm1, %xmm2
orps %xmm0, %xmm2
subss 0xec(%rdi), %xmm2
cvttps2dq %xmm2, %xmm0
cvtdq2ps %xmm0, %xmm1
movss %xmm1, 0x4(%rdx)
popq %rbp
retq
cmpb $0x0, 0xac(%rdi)
jle 0x539a2
movq 0x28(%rdi), %rax
movq %rax, (%rsi)
movq 0x30(%rdi), %rax
movq %rax, (%rdx)
jmp 0x53a78
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::GetWindowResizeID(ImGuiWindow*, int)
ImGuiID ImGui::GetWindowResizeID(ImGuiWindow* window, int n)
{
    IM_ASSERT(n >= 0 && n <= 7);
    ImGuiID id = window->ID;
    id = ImHashStr("#RESIZE", 0, id);
    id = ImHashData(&n, sizeof(int), id);
    return id;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %esi, -0xc(%rbp)
cmpl $0x8, %esi
jae 0x53f0d
movl 0x8(%rdi), %edx
leaq 0x65199(%rip), %rdi     # 0xb9072
xorl %ebx, %ebx
xorl %esi, %esi
callq 0x428dc
notl %eax
leaq 0x63af5(%rip), %rcx     # 0xb79e0
movzbl %al, %edx
shrl $0x8, %eax
movzbl -0xc(%rbp,%rbx), %esi
xorl %edx, %esi
xorl (%rcx,%rsi,4), %eax
incq %rbx
cmpq $0x4, %rbx
jne 0x53eeb
notl %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x65118(%rip), %rdi     # 0xb902c
leaq 0x6424a(%rip), %rsi     # 0xb8165
leaq 0x6511b(%rip), %rcx     # 0xb903d
movl $0x1440, %edx           # imm = 0x1440
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::UpdateWindowParentAndRootLinks(ImGuiWindow*, int, ImGuiWindow*)
void ImGui::UpdateWindowParentAndRootLinks(ImGuiWindow* window, ImGuiWindowFlags flags, ImGuiWindow* parent_window)
{
    window->ParentWindow = parent_window;
    window->RootWindow = window->RootWindowForTitleBarHighlight = window->RootWindowForNav = window;
    if (parent_window && (flags & ImGuiWindowFlags_ChildWindow) && !(flags & ImGuiWindowFlags_Tooltip))
        window->RootWindow = parent_window->RootWindow;
    if (parent_window && !(flags & ImGuiWindowFlags_Modal) && (flags & (ImGuiWindowFlags_ChildWindow | ImGuiWindowFlags_Popup)))
        window->RootWindowForTitleBarHighlight = parent_window->RootWindowForTitleBarHighlight;
    while (window->RootWindowForNav->Flags & ImGuiWindowFlags_NavFlattened)
    {
        IM_ASSERT(window->RootWindowForNav->ParentWindow != NULL);
        window->RootWindowForNav = window->RootWindowForNav->ParentWindow;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdx, 0x388(%rdi)
movq %rdi, 0x3a0(%rdi)
movq %rdi, 0x398(%rdi)
movq %rdi, 0x390(%rdi)
testq %rdx, %rdx
sete %al
movl %esi, %ecx
andl $0x3000000, %ecx        # imm = 0x3000000
cmpl $0x1000000, %ecx        # imm = 0x1000000
setne %cl
orb %al, %cl
jne 0x53f75
movq 0x390(%rdx), %rax
movq %rax, 0x390(%rdi)
testq %rdx, %rdx
je 0x53f99
movl %esi, %eax
andl $0x8000000, %eax        # imm = 0x8000000
jne 0x53f99
andl $0x5000000, %esi        # imm = 0x5000000
je 0x53f99
movq 0x398(%rdx), %rax
movq %rax, 0x398(%rdi)
movq 0x3a0(%rdi), %rax
testb $-0x80, 0xe(%rax)
je 0x53fbb
movq 0x388(%rax), %rax
testq %rax, %rax
je 0x53fbd
movq %rax, 0x3a0(%rdi)
jmp 0x53fa0
popq %rbp
retq
leaq 0x650b6(%rip), %rdi     # 0xb907a
leaq 0x6419a(%rip), %rsi     # 0xb8165
leaq 0x650d9(%rip), %rcx     # 0xb90ab
movl $0x159b, %edx           # imm = 0x159B
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGuiStackSizes::SetToCurrentState()
void ImGuiStackSizes::SetToCurrentState()
{
    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = g.CurrentWindow;
    SizeOfIDStack = (short)window->IDStack.Size;
    SizeOfColorStack = (short)g.ColorStack.Size;
    SizeOfStyleVarStack = (short)g.StyleVarStack.Size;
    SizeOfFontStack = (short)g.FontStack.Size;
    SizeOfFocusScopeStack = (short)g.FocusScopeStack.Size;
    SizeOfGroupStack = (short)g.GroupStack.Size;
    SizeOfBeginPopupStack = (short)g.BeginPopupStack.Size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0xa9c79(%rip), %rax     # 0xfdcd0
movq 0x1ae0(%rax), %rcx
movzwl 0xc8(%rcx), %ecx
movw %cx, (%rdi)
movzwl 0x1c10(%rax), %ecx
movw %cx, 0x2(%rdi)
movzwl 0x1c20(%rax), %ecx
movw %cx, 0x4(%rdi)
movzwl 0x1c30(%rax), %ecx
movw %cx, 0x6(%rdi)
movzwl 0x1c40(%rax), %ecx
movw %cx, 0x8(%rdi)
movzwl 0x1c60(%rax), %ecx
movw %cx, 0xa(%rdi)
movzwl 0x1c80(%rax), %eax
movw %ax, 0xc(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::SetWindowSize(ImGuiWindow*, ImVec2 const&, int)
void ImGui::SetWindowSize(ImGuiWindow* window, const ImVec2& size, ImGuiCond cond)
{
    // Test condition (NB: bit 0 is always true) and clear flags for next time
    if (cond && (window->SetWindowSizeAllowFlags & cond) == 0)
        return;

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

    // Set
    if (size.x > 0.0f)
    {
        window->AutoFitFramesX = 0;
        window->SizeFull.x = IM_FLOOR(size.x);
    }
    else
    {
        window->AutoFitFramesX = 2;
        window->AutoFitOnlyGrows = false;
    }
    if (size.y > 0.0f)
    {
        window->AutoFitFramesY = 0;
        window->SizeFull.y = IM_FLOOR(size.y);
    }
    else
    {
        window->AutoFitFramesY = 2;
        window->AutoFitOnlyGrows = false;
    }
}

// Assembly:
testl %edx, %edx
je 0x540c2
movsbl 0xb0(%rdi), %eax
testl %edx, %eax
je 0x54124
leal -0x1(%rdx), %eax
testl %eax, %edx
jne 0x54125
andb $-0xf, 0xb0(%rdi)
movss (%rsi), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x540ea
movb $0x0, 0xa4(%rdi)
cvttps2dq %xmm0, %xmm0
cvtdq2ps %xmm0, %xmm0
movss %xmm0, 0x20(%rdi)
jmp 0x540f8
movb $0x2, 0xa4(%rdi)
movb $0x0, 0xa7(%rdi)
movss 0x4(%rsi), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x54116
movb $0x0, 0xa5(%rdi)
cvttps2dq %xmm0, %xmm0
cvtdq2ps %xmm0, %xmm0
movss %xmm0, 0x24(%rdi)
retq
movb $0x2, 0xa5(%rdi)
movb $0x0, 0xa7(%rdi)
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x653ec(%rip), %rdi     # 0xb951c
leaq 0x6402e(%rip), %rsi     # 0xb8165
leaq 0x65443(%rip), %rcx     # 0xb9581
movl $0x19b3, %edx           # imm = 0x19B3
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: SetCurrentWindow(ImGuiWindow*)
static void SetCurrentWindow(ImGuiWindow* window)
{
    ImGuiContext& g = *GImGui;
    g.CurrentWindow = window;
    g.CurrentTable = window && window->DC.CurrentTableIdx != -1 ? g.Tables.GetByIndex(window->DC.CurrentTableIdx) : NULL;
    if (window)
        g.FontSize = g.DrawListSharedData.FontSize = window->CalcFontSize();
}

// Assembly:
movq 0xa9b5e(%rip), %rax     # 0xfdcd0
movq %rdi, 0x1ae0(%rax)
testq %rdi, %rdi
je 0x541aa
movl 0x1b8(%rdi), %ecx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
cmpq %rdx, %rcx
je 0x541b6
testl %ecx, %ecx
js 0x541f4
cmpl %ecx, 0x20b0(%rax)
jle 0x541f4
imulq $0x258, %rcx, %rcx      # imm = 0x258
addq 0x20b8(%rax), %rcx
jmp 0x541b8
movq $0x0, 0x20a8(%rax)
retq
xorl %ecx, %ecx
movq %rcx, 0x20a8(%rax)
movss 0x1984(%rax), %xmm0
mulss 0x2b0(%rdi), %xmm0
movq 0x388(%rdi), %rcx
testq %rcx, %rcx
je 0x541e3
mulss 0x2b0(%rcx), %xmm0
movss %xmm0, 0x1998(%rax)
movss %xmm0, 0x1980(%rax)
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x67479(%rip), %rdi     # 0xbb678
leaq 0x67485(%rip), %rsi     # 0xbb68b
leaq 0x68820(%rip), %rcx     # 0xbca2d
movl $0x65c, %edx            # imm = 0x65C
callq 0xc140