LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4f877
xorl %ecx, %ecx
testl %eax, %eax
movl $0x0, %edx
cmovgl %eax, %edx
cmpq %rcx, %rdx
je 0x4f884
movq 0x1a90(%rdi), %rsi
movq (%rsi,%rcx,8), %rsi
movl $0xffffffff, 0x2b4(%rsi) # imm = 0xFFFFFFFF
incq %rcx
cmpq %rcx, %rax
jne 0x4f855
addq $0x3108, %rdi           # imm = 0x3108
popq %rbp
jmp 0x5e166
leaq 0x69ded(%rip), %rdi     # 0xb9678
leaq 0x69df9(%rip), %rsi     # 0xb968b
leaq 0x6b1ce(%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: 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 0x5939a
movw $0x0, 0xc(%rax)
movq $0x0, 0x4(%rax)
movb $0x1, 0xd(%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x4fa20
movq %rdi, %rbx
addq $0x3108, %rbx           # imm = 0x3108
addq $0x4, %r14
movl $0x1ac8, %r15d          # imm = 0x1AC8
cmpb $0x1, 0xd(%r14)
jne 0x4fa09
movl (%r14), %esi
movq 0xac334(%rip), %rdi     # 0xfbcd0
addq %r15, %rdi
callq 0x42976
testq %rax, %rax
je 0x4fa04
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 0x4f9fa
movzwl 0xa(%r14), %edx
testw %dx, %dx
jle 0x4f9fa
movswl %cx, %ecx
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
movswl %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 0x5e478
movq %rax, %r14
testq %rax, %rax
jne 0x4f98b
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::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 0xac034(%rip), %rax     # 0xfbcd0
movl $0x0, 0x30e4(%rax)
testq %rdi, %rdi
je 0x4fd07
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
leaq -0x18(%rbp), %rdi
movq $0x0, (%rdi)
callq 0x597e0
movq %rax, %rbx
leaq 0x68bdc(%rip), %rsi     # 0xb88af
movq %r14, %rdi
callq 0xc9a0
testq %rax, %rax
je 0x4fcff
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
// File: /workspace/github_cpp_makefile_star2_O3/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), %ecx
movl 0x10(%rdi), %r12d
leal (%r12,%r14), %r13d
movl %r12d, %eax
cmpl %r13d, %ecx
jge 0x4fdcf
testl %ecx, %ecx
je 0x4fd49
movl %ecx, %r15d
shrl $0x1f, %r15d
addl %ecx, %r15d
sarl %r15d
addl %ecx, %r15d
jmp 0x4fd4f
movl $0x8, %r15d
cmpl %r13d, %r15d
cmovlel %r13d, %r15d
movslq %r15d, %rdi
shlq $0x3, %rdi
movq 0xabf6c(%rip), %rax     # 0xfbcd0
testq %rax, %rax
je 0x4fd6f
incl 0x3b4(%rax)
movq 0xabf6a(%rip), %rsi     # 0xfbce0
callq *0xa7794(%rip)          # 0xf7510
movq 0x8(%rbx), %rsi
testq %rsi, %rsi
je 0x4fdc4
movslq (%rbx), %rdx
shlq $0x3, %rdx
movq %rax, -0x30(%rbp)
movq %rax, %rdi
callq 0xc080
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x4fdb3
movq 0xabf28(%rip), %rax     # 0xfbcd0
testq %rax, %rax
je 0x4fdb3
decl 0x3b4(%rax)
movq 0xabf26(%rip), %rsi     # 0xfbce0
callq *0xa7758(%rip)          # 0xf7518
movq -0x30(%rbp), %rax
movq %rax, 0x8(%rbx)
movl %r15d, 0x4(%rbx)
movl 0x10(%rbx), %eax
movl %r13d, (%rbx)
testl %eax, %eax
je 0x4fe8b
testl %r14d, %r14d
js 0x4fe9a
testl %r12d, %r12d
jle 0x4fe9a
testl %eax, %eax
jle 0x4fe9a
shlq $0x3, %r14
addq 0x8(%rbx), %r14
movq 0x18(%rbx), %rsi
movl %eax, %edx
shlq $0x3, %rdx
movq %r14, %rdi
callq 0xc080
cmpl $0x0, 0x14(%rbx)
jns 0x4fe84
movq 0xabeb5(%rip), %rax     # 0xfbcd0
testq %rax, %rax
je 0x4fe26
incl 0x3b4(%rax)
movq 0xabeb3(%rip), %rsi     # 0xfbce0
xorl %edi, %edi
callq *0xa76db(%rip)          # 0xf7510
movq %rax, %r14
movq 0x18(%rbx), %rsi
testq %rsi, %rsi
je 0x4fe79
movslq 0x10(%rbx), %rdx
shlq $0x3, %rdx
movq %r14, %rdi
callq 0xc080
movq 0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x4fe6c
movq 0xabe6f(%rip), %rax     # 0xfbcd0
testq %rax, %rax
je 0x4fe6c
decl 0x3b4(%rax)
movq 0xabe6d(%rip), %rsi     # 0xfbce0
callq *0xa769f(%rip)          # 0xf7518
movq %r14, 0x18(%rbx)
movl $0x0, 0x14(%rbx)
movl $0x0, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x697d7(%rip), %rdi     # 0xb9678
leaq 0x697e3(%rip), %rsi     # 0xb968b
leaq 0x6ac34(%rip), %rcx     # 0xbaae3
movl $0x65c, %edx            # imm = 0x65C
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/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 %r14
pushq %rbx
movq 0xab00c(%rip), %rbx     # 0xfbcd0
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 0x50d53
xorl %r14d, %r14d
movq %r14, 0x2088(%rbx)
decl 0x3b4(%rbx)
movq 0xaaf9d(%rip), %rsi     # 0xfbce0
callq *0xa67cf(%rip)          # 0xf7518
xorps %xmm0, %xmm0
movq %r14, 0x2090(%rbx)
movups %xmm0, 0x2098(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x50db8
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 0x56a80
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9039e
callq 0x56bca
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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), %eax
cmpl 0x4(%rdi), %eax
jne 0x50e2a
leal 0x1(%rax), %r12d
testl %eax, %eax
je 0x50e33
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
jmp 0x50e38
movq 0x8(%r14), %r15
jmp 0x50eb3
movl $0x8, %ecx
cmpl %r12d, %ecx
cmovgl %ecx, %r12d
movslq %r12d, %rdi
shlq $0x3, %rdi
movq 0xaae83(%rip), %rax     # 0xfbcd0
testq %rax, %rax
je 0x50e58
incl 0x3b4(%rax)
movq 0xaae81(%rip), %rsi     # 0xfbce0
callq *0xa66ab(%rip)          # 0xf7510
movq %rax, %r15
movq 0x8(%r14), %rsi
testq %rsi, %rsi
je 0x50ea8
movslq (%r14), %rdx
shlq $0x3, %rdx
movq %r15, %rdi
callq 0xc080
movq 0x8(%r14), %rdi
testq %rdi, %rdi
je 0x50e9b
movq 0xaae40(%rip), %rax     # 0xfbcd0
testq %rax, %rax
je 0x50e9b
decl 0x3b4(%rax)
movq 0xaae3e(%rip), %rsi     # 0xfbce0
callq *0xa6670(%rip)          # 0xf7518
movq %r15, 0x8(%r14)
movl %r12d, 0x4(%r14)
movl (%r14), %eax
cltq
movq %rbx, (%r15,%rax,8)
incl (%r14)
cmpb $0x1, 0x8e(%rbx)
jne 0x50f28
movl 0x198(%rbx), %r15d
cmpl $0x2, %r15d
jl 0x50eef
movq 0x1a0(%rbx), %rdi
leaq 0xb838(%rip), %rcx      # 0x5c718
movl $0x8, %edx
movq %r15, %rsi
callq 0xc620
jmp 0x50ef5
cmpl $0x1, %r15d
jne 0x50f28
xorl %r12d, %r12d
movslq 0x198(%rbx), %rax
cmpq %rax, %r12
jge 0x50f31
movq 0x1a0(%rbx), %rax
movq (%rax,%r12,8), %rsi
cmpb $0x1, 0x8e(%rsi)
jne 0x50f20
movq %r14, %rdi
callq 0x50dfd
incq %r12
cmpq %r12, %r15
jne 0x50ef8
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x68740(%rip), %rdi     # 0xb9678
leaq 0x6874c(%rip), %rsi     # 0xb968b
leaq 0x69b21(%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::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 0x514a3
cmpl $0x200, %edi            # imm = 0x200
jae 0x514a6
movq 0xaa837(%rip), %rax     # 0xfbcd0
movl %edi, %ecx
movb 0x144(%rax,%rcx), %al
retq
xorl %eax, %eax
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x6574b(%rip), %rdi     # 0xb6bfc
leaq 0x64cad(%rip), %rsi     # 0xb6165
leaq 0x6579f(%rip), %rcx     # 0xb6c5e
movl $0x1185, %edx           # imm = 0x1185
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/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 0x514dc
jnp 0x51527
xorl %eax, %eax
ucomiss %xmm1, %xmm0
jae 0x51527
ucomiss %xmm3, %xmm4
jae 0x51515
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 0x51527
cmpltps %xmm2, %xmm0
cmpleps %xmm1, %xmm2
andps %xmm0, %xmm2
movd %xmm2, %eax
andl $0x1, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x5155a
cmpl $0x200, %edi            # imm = 0x200
jae 0x5155d
movaps %xmm1, %xmm3
movaps %xmm0, %xmm2
movq 0xaa78e(%rip), %rax     # 0xfbcd0
movl %edi, %ecx
movss 0x4a0(%rax,%rcx,4), %xmm1
movaps %xmm1, %xmm0
subss 0x18(%rax), %xmm0
jmp 0x514c9
xorl %eax, %eax
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x65711(%rip), %rdi     # 0xb6c79
leaq 0x64bf6(%rip), %rsi     # 0xb6165
leaq 0x6575b(%rip), %rcx     # 0xb6cd1
movl $0x11a0, %edx           # imm = 0x11A0
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/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 0x515da
cmpl $0x200, %edi            # imm = 0x200
jae 0x515de
movq 0xaa739(%rip), %rcx     # 0xfbcd0
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 0x515dc
movss 0x94(%rcx), %xmm0
ucomiss %xmm0, %xmm1
jbe 0x515da
movss 0x98(%rcx), %xmm1
callq 0x51529
testl %eax, %eax
setg %al
jmp 0x515dc
xorl %eax, %eax
popq %rbp
retq
leaq 0x65617(%rip), %rdi     # 0xb6bfc
leaq 0x64b79(%rip), %rsi     # 0xb6165
leaq 0x65710(%rip), %rcx     # 0xb6d03
movl $0x11aa, %edx           # imm = 0x11AA
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/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 0x51623
cmpl $0x200, %edi            # imm = 0x200
jae 0x51630
movq 0xaa6c0(%rip), %rax     # 0xfbcd0
movl %edi, %ecx
movss 0xca0(%rax,%rcx,4), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jae 0x51626
xorl %eax, %eax
retq
movb 0x144(%rax,%rcx), %al
xorb $0x1, %al
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x655c1(%rip), %rdi     # 0xb6bfc
leaq 0x64b23(%rip), %rsi     # 0xb6165
leaq 0x656de(%rip), %rcx     # 0xb6d27
movl $0x11b7, %edx           # imm = 0x11B7
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/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 0x516ba
movq 0xaa66b(%rip), %rax     # 0xfbcd0
movl %edi, %ecx
movss 0x43c(%rax,%rcx,4), %xmm1
movb $0x1, %bl
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm1
jne 0x5167c
jnp 0x516b1
testb %sil, %sil
je 0x516af
movss 0x94(%rax), %xmm2
ucomiss %xmm2, %xmm1
jbe 0x516af
movaps %xmm1, %xmm0
subss 0x18(%rax), %xmm0
movss 0x98(%rax), %xmm3
mulss 0x6395e(%rip), %xmm3    # 0xb5004
callq 0x514c9
testl %eax, %eax
jg 0x516b1
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x65685(%rip), %rdi     # 0xb6d46
leaq 0x64a9d(%rip), %rsi     # 0xb6165
leaq 0x656f5(%rip), %rcx     # 0xb6dc4
movl $0x11c5, %edx           # imm = 0x11C5
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/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 0x5177a
movq 0xaa579(%rip), %rax     # 0xfbcd0
xorps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
jbe 0x51764
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 0x655c1(%rip), %rdi     # 0xb6d46
leaq 0x649d9(%rip), %rsi     # 0xb6165
leaq 0x656c5(%rip), %rcx     # 0xb6e58
movl $0x11e7, %edx           # imm = 0x11E7
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/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 0x517bc
movq 0xaa527(%rip), %rax     # 0xfbcd0
movl %edi, %ecx
cmpb $0x1, 0x130(%rax,%rcx)
je 0x5174b
xorl %eax, %eax
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x6557f(%rip), %rdi     # 0xb6d46
leaq 0x64997(%rip), %rsi     # 0xb6165
leaq 0x656c1(%rip), %rcx     # 0xb6e96
movl $0x11f0, %edx           # imm = 0x11F0
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/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 0xaa4d5(%rip), %rax     # 0xfbcd0
movslq 0x1c80(%rax), %rcx
testq %rcx, %rcx
jle 0x51827
cmpl %ecx, 0x1c70(%rax)
jl 0x51832
movq 0x1c78(%rax), %rax
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
addq $-0x8, %rax
jmp 0x5182d
addq $0x128, %rax            # imm = 0x128
movsd (%rax), %xmm0
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x67e3b(%rip), %rdi     # 0xb9678
leaq 0x67e47(%rip), %rsi     # 0xb968b
leaq 0x692ff(%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::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 0xaa470(%rip), %rcx     # 0xfbcd0
movb $0x1, %al
cmpb $0x0, 0x130(%rcx)
jne 0x5188b
xorl %edx, %edx
movq %rdx, %rax
cmpq $0x4, %rdx
je 0x51884
leaq 0x1(%rax), %rdx
cmpb $0x1, 0x131(%rcx,%rax)
jne 0x5186d
cmpq $0x4, %rax
setb %al
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0x51938
movq 0xaa42c(%rip), %r14     # 0xfbcd0
xorps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
jbe 0x518b2
movss 0x38(%r14), %xmm0
movl %edi, %ebx
cmpb $0x0, 0x130(%r14,%rbx)
jne 0x518cd
xorps %xmm2, %xmm2
cmpb $0x1, 0x42a(%r14,%rbx)
jne 0x51930
movss 0x48c(%r14,%rbx,4), %xmm1
mulss %xmm0, %xmm0
xorps %xmm2, %xmm2
ucomiss %xmm0, %xmm1
jb 0x51930
leaq 0x128(%r14), %rdi
callq 0x4750f
testb %al, %al
je 0x5192d
leaq (%r14,%rbx,8), %rbx
addq $0x3cc, %rbx            # imm = 0x3CC
movq %rbx, %rdi
callq 0x4750f
testb %al, %al
xorps %xmm2, %xmm2
je 0x51930
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 0x51930
xorps %xmm2, %xmm2
movaps %xmm2, %xmm0
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x65407(%rip), %rdi     # 0xb6d46
leaq 0x6481f(%rip), %rsi     # 0xb6165
leaq 0x655bb(%rip), %rcx     # 0xb6f08
movl $0x121f, %edx           # imm = 0x121F
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/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 0x51975
movq 0xaa36d(%rip), %rax     # 0xfbcd0
movl %edi, %ecx
movq 0x128(%rax), %rdx
movq %rdx, 0x3cc(%rax,%rcx,8)
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x653c6(%rip), %rdi     # 0xb6d46
leaq 0x647de(%rip), %rsi     # 0xb6165
leaq 0x655b3(%rip), %rcx     # 0xb6f41
movl $0x122c, %edx           # imm = 0x122C
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/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 0xaa2e1(%rip), %rax     # 0xfbcd0
movl 0x1b30(%rax), %ecx
testl %ecx, %ecx
je 0x51a0b
movq 0x1ae0(%rax), %rax
cmpl 0x124(%rax), %ecx
sete %al
jmp 0x51a0d
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xaa2b6(%rip), %rcx     # 0xfbcd0
movl 0x1b30(%rcx), %edx
testl %edx, %edx
je 0x51a3d
movq 0x1ae0(%rcx), %rax
cmpl 0x124(%rax), %edx
jne 0x51a3d
movb $0x1, %al
cmpl %edx, 0x1b70(%rcx)
jne 0x51a3f
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xaa284(%rip), %rcx     # 0xfbcd0
movq 0x1ae0(%rcx), %rdx
movl 0x128(%rdx), %eax
testb $0x20, %al
jne 0x51a7c
movl 0x1b70(%rcx), %esi
xorl %eax, %eax
testl %esi, %esi
je 0x51a82
cmpl 0x124(%rdx), %esi
jne 0x51a82
cmpl %esi, 0x1b30(%rcx)
setne %al
jmp 0x51a82
andl $0x40, %eax
shrl $0x6, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xaa0a3(%rip), %rax     # 0xfbcd0
movq 0x1ae0(%rax), %rcx
movl 0x124(%rcx), %ecx
cmpl %ecx, 0x1b1c(%rax)
jne 0x51c49
movb $0x1, 0x1b24(%rax)
cmpl %ecx, 0x1b30(%rax)
jne 0x51c58
movb $0x1, 0x1b3d(%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xaa06b(%rip), %rax     # 0xfbcd0
movq 0x1ae0(%rax), %rcx
movl 0x124(%rcx), %ecx
cmpl %ecx, 0x1b1c(%rax)
jne 0x51c81
movb $0x1, 0x1b25(%rax)
cmpl %ecx, 0x1b30(%rax)
jne 0x51c90
movb $0x1, 0x1b42(%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/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 0xa9d45(%rip), %rbx     # 0xfbcd0
cmpq %rdi, 0x1c90(%rbx)
jne 0x5203f
movl 0xc(%rdi), %eax
btl $0x12, %eax
jb 0x52006
andl $0x5000000, %eax        # imm = 0x5000000
cmpl $0x1000000, %eax        # imm = 0x1000000
jne 0x51fc1
movl 0x3b0(%rdi), %eax
testl %eax, %eax
setne %cl
xorb $0x1, %sil
testb %sil, %cl
jne 0x5200c
movl 0x1cdc(%rbx), %esi
xorl %edi, %edi
xorl %edx, %edx
callq 0x57bad
movw $0x1, 0x1ce9(%rbx)
movl $0x0, 0x1cec(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x1cf0(%rbx)
movq 0xa9cdc(%rip), %rax     # 0xfbcd0
cmpb $0x0, 0x1d00(%rax)
je 0x5201e
movb $0x1, 0x1ce8(%rax)
jmp 0x5202e
movl 0x3b0(%rdi), %eax
movl %eax, 0x1c98(%rbx)
movl $0x0, 0x1c9c(%rbx)
jmp 0x52038
movb 0x1ce9(%rax), %cl
movb %cl, 0x1ce8(%rax)
testb %cl, %cl
je 0x52038
cmpq $0x0, 0x1c90(%rax)
je 0x5205e
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x663a1(%rip), %rdi     # 0xb83e7
leaq 0x64118(%rip), %rsi     # 0xb6165
leaq 0x663a9(%rip), %rcx     # 0xb83fd
movl $0x2207, %edx           # imm = 0x2207
callq 0xc140
leaq 0x681df(%rip), %rdi     # 0xba244
leaq 0x640f9(%rip), %rsi     # 0xb6165
leaq 0x681e7(%rip), %rcx     # 0xba25a
movl $0x2200, %edx           # imm = 0x2200
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/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 0xa9452(%rip), %r12     # 0xfbcd0
leaq 0x1694(%r12), %rsi
movl $0x3, %edi
callq 0x43e1b
movss 0x15a0(%r12), %xmm0
movl $0x6, %edi
callq 0x43ff0
movss 0x15a4(%r12), %xmm0
movl $0x7, %edi
callq 0x43ff0
addq $0x1598, %r12           # imm = 0x1598
movl $0x1, %edi
movq %r12, %rsi
callq 0x4417f
orl $0x10004, %ebx          # imm = 0x10004
movl %r15d, %edi
movq %r14, %rsi
movl $0x1, %edx
movl %ebx, %ecx
callq 0x520cd
movl %eax, %ebx
movl $0x3, %edi
callq 0x44325
movl $0x1, %edi
callq 0x43f55
movl %ebx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::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
leaq -0x18(%rbp), %r14
movq $0x0, (%r14)
leaq -0x20(%rbp), %rsi
movq %r14, %rdx
callq 0x52988
movq %rbx, %rdi
movq %r14, %rsi
callq 0x52ab6
movq %rbx, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x52ced
// File: /workspace/github_cpp_makefile_star2_O3/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 0x529ab
cmpb $0x0, 0xa4(%rdi)
jg 0x529ab
cmpb $0x0, 0xa5(%rdi)
jle 0x52aa6
cmpb $0x1, 0x95(%rdi)
jne 0x529c1
cmpb $0x0, 0xad(%rdi)
je 0x52a99
movss 0x38(%rdi), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm1
jne 0x529e7
jp 0x529e7
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 0x52a0e
jp 0x52a0e
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 0x52a52
jp 0x52a52
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 0x52a92
jp 0x52a92
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 0x529c1
movq 0x28(%rdi), %rax
movq %rax, (%rsi)
movq 0x30(%rdi), %rax
movq %rax, (%rdx)
jmp 0x52a97
// File: /workspace/github_cpp_makefile_star2_O3/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 0x52f2b
movl 0x8(%rdi), %edx
leaq 0x6417b(%rip), %rdi     # 0xb7072
xorl %ebx, %ebx
xorl %esi, %esi
callq 0x42033
notl %eax
leaq 0x62ad7(%rip), %rcx     # 0xb59e0
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 0x52f09
notl %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x640fa(%rip), %rdi     # 0xb702c
leaq 0x6322c(%rip), %rsi     # 0xb6165
leaq 0x640fd(%rip), %rcx     # 0xb703d
movl $0x1440, %edx           # imm = 0x1440
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/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 0x52f93
movq 0x390(%rdx), %rax
movq %rax, 0x390(%rdi)
testq %rdx, %rdx
je 0x52fb7
movl %esi, %eax
andl $0x8000000, %eax        # imm = 0x8000000
jne 0x52fb7
andl $0x5000000, %esi        # imm = 0x5000000
je 0x52fb7
movq 0x398(%rdx), %rax
movq %rax, 0x398(%rdi)
testb $-0x80, 0xe(%rdi)
je 0x52fd9
movq %rdi, %rax
movq 0x388(%rax), %rax
testq %rax, %rax
je 0x52fdb
movq %rax, 0x3a0(%rdi)
testb $-0x80, 0xe(%rax)
jne 0x52fc0
popq %rbp
retq
leaq 0x64098(%rip), %rdi     # 0xb707a
leaq 0x6317c(%rip), %rsi     # 0xb6165
leaq 0x640bb(%rip), %rcx     # 0xb70ab
movl $0x159b, %edx           # imm = 0x159B
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/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 0xa8ccb(%rip), %rax     # 0xfbcd0
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_O3/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:
movl 0xaf(%rdi), %eax
testl %edx, %edx
je 0x53077
movl %eax, %ecx
shrl $0x8, %ecx
movsbl %cl, %ecx
testl %edx, %ecx
je 0x530d9
leal -0x1(%rdx), %ecx
testl %ecx, %edx
jne 0x530da
andl $0xfffff1ff, %eax       # imm = 0xFFFFF1FF
movl %eax, 0xaf(%rdi)
movss (%rsi), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x5309e
cvttps2dq %xmm0, %xmm0
cvtdq2ps %xmm0, %xmm0
movss %xmm0, 0x20(%rdi)
xorl %eax, %eax
jmp 0x530a7
movb $0x0, 0xa7(%rdi)
movb $0x2, %al
movb %al, 0xa4(%rdi)
movss 0x4(%rsi), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x530cb
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 0x64437(%rip), %rdi     # 0xb751c
leaq 0x63079(%rip), %rsi     # 0xb6165
leaq 0x6448e(%rip), %rcx     # 0xb7581
movl $0x19b3, %edx           # imm = 0x19B3
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/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 0xa8b9e(%rip), %rax     # 0xfbcd0
movq %rdi, 0x1ae0(%rax)
testq %rdi, %rdi
je 0x5316a
movl 0x1b8(%rdi), %ecx
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
cmpq %rdx, %rcx
je 0x53176
testl %ecx, %ecx
js 0x531b4
cmpl %ecx, 0x20b0(%rax)
jle 0x531b4
imulq $0x258, %rcx, %rcx      # imm = 0x258
addq 0x20b8(%rax), %rcx
jmp 0x53178
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 0x531a3
mulss 0x2b0(%rcx), %xmm0
movss %xmm0, 0x1998(%rax)
movss %xmm0, 0x1980(%rax)
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x664b9(%rip), %rdi     # 0xb9678
leaq 0x664c5(%rip), %rsi     # 0xb968b
leaq 0x67860(%rip), %rcx     # 0xbaa2d
movl $0x65c, %edx            # imm = 0x65C
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ClampWindowRect(ImGuiWindow*, ImRect const&)
static inline void ClampWindowRect(ImGuiWindow* window, const ImRect& visibility_rect)
{
    ImGuiContext& g = *GImGui;
    ImVec2 size_for_clamping = window->Size;
    if (g.IO.ConfigWindowsMoveFromTitleBarOnly && !(window->Flags & ImGuiWindowFlags_NoTitleBar))
        size_for_clamping.y = window->TitleBarHeight();
    window->Pos = ImClamp(window->Pos, visibility_rect.Min - size_for_clamping, visibility_rect.Max);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0xa880b(%rip), %rax     # 0xfbcd0
movss 0x1c(%rdi), %xmm2
cmpb $0x1, 0xcd(%rax)
jne 0x5350d
testb $0x1, 0xc(%rdi)
jne 0x5350d
movss 0x1984(%rax), %xmm0
mulss 0x2b0(%rdi), %xmm0
movq 0x388(%rdi), %rcx
testq %rcx, %rcx
je 0x534fd
mulss 0x2b0(%rcx), %xmm0
movss 0x159c(%rax), %xmm2
addss %xmm2, %xmm2
addss %xmm0, %xmm2
movss 0x18(%rdi), %xmm4
movss (%rsi), %xmm1
movss 0x4(%rsi), %xmm0
subss %xmm2, %xmm0
movsd 0x8(%rsi), %xmm3
movss 0x10(%rdi), %xmm2
movss 0x14(%rdi), %xmm5
ucomiss %xmm5, %xmm0
ja 0x5353e
movaps %xmm3, %xmm0
shufps $0x55, %xmm3, %xmm0     # xmm0 = xmm0[1,1],xmm3[1,1]
minss %xmm5, %xmm0
subss %xmm4, %xmm1
minss %xmm2, %xmm3
cmpltss %xmm1, %xmm2
andps %xmm2, %xmm1
andnps %xmm3, %xmm2
orps %xmm1, %xmm2
unpcklps %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
movlps %xmm2, 0x10(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::LogFinish()
void ImGui::LogFinish()
{
    ImGuiContext& g = *GImGui;
    if (!g.LogEnabled)
        return;

    LogText(IM_NEWLINE);
    switch (g.LogType)
    {
    case ImGuiLogType_TTY:
#ifndef IMGUI_DISABLE_TTY_FUNCTIONS
        fflush(g.LogFile);
#endif
        break;
    case ImGuiLogType_File:
        ImFileClose(g.LogFile);
        break;
    case ImGuiLogType_Buffer:
        break;
    case ImGuiLogType_Clipboard:
        if (!g.LogBuffer.empty())
            SetClipboardText(g.LogBuffer.begin());
        break;
    case ImGuiLogType_None:
        IM_ASSERT(0);
        break;
    }

    g.LogEnabled = false;
    g.LogType = ImGuiLogType_None;
    g.LogFile = NULL;
    g.LogBuffer.clear();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0xa85ad(%rip), %rbx     # 0xfbcd0
cmpb $0x1, 0x3138(%rbx)
jne 0x53764
leaq 0x6e164(%rip), %rdi     # 0xc1897
xorl %eax, %eax
callq 0x58cc1
movl 0x313c(%rbx), %eax
cmpq $0x4, %rax
ja 0x537b3
leaq 0x621d7(%rip), %rcx     # 0xb5924
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x3140(%rbx), %rdi
callq 0xc450
jmp 0x537b3
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq 0x3140(%rbx), %rdi
callq 0xc3b0
jmp 0x537b3
cmpl $0x2, 0x3148(%rbx)
jl 0x537b3
movq 0xa8547(%rip), %rcx     # 0xfbcd0
movq 0x108(%rcx), %rax
testq %rax, %rax
je 0x537b3
movq 0x3150(%rbx), %rdx
testq %rdx, %rdx
leaq 0xa8532(%rip), %rsi     # 0xfbcd8
cmovneq %rdx, %rsi
movq 0x110(%rcx), %rdi
callq *%rax
movb $0x0, 0x3138(%rbx)
movl $0x0, 0x313c(%rbx)
movq $0x0, 0x3140(%rbx)
addq $0x3148, %rbx           # imm = 0x3148
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x5e1ae
leaq 0x64901(%rip), %rdi     # 0xb80ec
leaq 0x62973(%rip), %rsi     # 0xb6165
leaq 0x6501a(%rip), %rcx     # 0xb8813
movl $0x26fa, %edx           # imm = 0x26FA
callq 0xc140
nop