LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGuiTextFilter::Build()
void ImGuiTextFilter::Build()
{
    Filters.resize(0);
    ImGuiTextRange input_range(InputBuf, InputBuf + strlen(InputBuf));
    input_range.split(',', &Filters);

    CountGrep = 0;
    for (int i = 0; i != Filters.Size; i++)
    {
        ImGuiTextRange& f = Filters[i];
        while (f.b < f.e && ImCharIsBlankA(f.b[0]))
            f.b++;
        while (f.e > f.b && ImCharIsBlankA(f.e[-1]))
            f.e--;
        if (f.empty())
            continue;
        if (Filters[i].b[0] != '-')
            CountGrep += 1;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x100(%rdi), %r14
cmpl $0x0, 0x104(%rdi)
jns 0x42ded
movq 0xb8f5b(%rip), %rax     # 0xfbcd0
testq %rax, %rax
je 0x42d80
incl 0x3b4(%rax)
movq 0xb8f59(%rip), %rsi     # 0xfbce0
xorl %edi, %edi
callq *0xb4781(%rip)          # 0xf7510
movq %rax, %r15
movq 0x108(%rbx), %rsi
testq %rsi, %rsi
je 0x42ddc
movslq 0x100(%rbx), %rdx
shlq $0x4, %rdx
movq %r15, %rdi
callq 0xc080
movq 0x108(%rbx), %rdi
testq %rdi, %rdi
je 0x42dcf
movq 0xb8f0c(%rip), %rax     # 0xfbcd0
testq %rax, %rax
je 0x42dcf
decl 0x3b4(%rax)
movq 0xb8f0a(%rip), %rsi     # 0xfbce0
callq *0xb473c(%rip)          # 0xf7518
movq %r15, 0x108(%rbx)
movl $0x0, 0x104(%rbx)
xorl %r15d, %r15d
movl %r15d, 0x100(%rbx)
movq %rbx, %rdi
callq 0xc350
addq %rbx, %rax
leaq -0x28(%rbp), %rdi
movq %rbx, (%rdi)
movq %rax, 0x8(%rdi)
movl $0x2c, %esi
movq %r14, %rdx
callq 0x42f7e
movl %r15d, 0x110(%rbx)
movl 0x100(%rbx), %eax
testq %rax, %rax
je 0x42ede
movq 0x108(%rbx), %rcx
testl %eax, %eax
movl $0x0, %edx
cmovgl %eax, %edx
xorl %esi, %esi
cmpq %rdx, %rsi
je 0x42ee9
movq %rsi, %r8
shlq $0x4, %r8
leaq (%rcx,%r8), %r9
movq (%rcx,%r8), %rdi
movq 0x8(%rcx,%r8), %r8
cmpq %r8, %rdi
jae 0x42e83
movzbl (%rdi), %r10d
cmpl $0x20, %r10d
je 0x42e75
cmpl $0x9, %r10d
jne 0x42e83
incq %rdi
movq %rdi, (%r9)
cmpq %r8, %rdi
jne 0x42e65
movq %r8, %rdi
cmpq %rdi, %r8
jbe 0x42eb6
decq %r8
movzbl (%r8), %r10d
cmpl $0x20, %r10d
je 0x42e9b
cmpl $0x9, %r10d
jne 0x42eb3
movq %r8, 0x8(%r9)
leaq -0x1(%r8), %r10
cmpq %rdi, %r8
movq %r10, %r8
ja 0x42e8b
incq %r10
movq %r10, %r8
jmp 0x42eb6
incq %r8
cmpq %r8, %rdi
je 0x42ed2
movslq (%r14), %r8
cmpq %r8, %rsi
jge 0x42ee9
cmpb $0x2d, (%rdi)
je 0x42ed2
incl %r15d
movl %r15d, 0x110(%rbx)
incq %rsi
cmpq %rax, %rsi
jne 0x42e43
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x76788(%rip), %rdi     # 0xb9678
leaq 0x76794(%rip), %rsi     # 0xb968b
leaq 0x77937(%rip), %rcx     # 0xba835
movl $0x65c, %edx            # imm = 0x65C
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGuiTextFilter::Draw(char const*, float)
bool ImGuiTextFilter::Draw(const char* label, float width)
{
    if (width != 0.0f)
        ImGui::SetNextItemWidth(width);
    bool value_changed = ImGui::InputText(label, InputBuf, IM_ARRAYSIZE(InputBuf));
    if (value_changed)
        Build();
    return value_changed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x42f1c
jnp 0x42f32
movq 0xb8dad(%rip), %rax     # 0xfbcd0
orl $0x1, 0x1bf8(%rax)
movss %xmm0, 0x1bfc(%rax)
movl $0x100, %edx            # imm = 0x100
movq %rsi, %rdi
movq %rbx, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x9b17a
movl %eax, %r14d
testb %al, %al
je 0x42f59
movq %rbx, %rdi
callq 0x42d4e
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGuiTextFilter::PassFilter(char const*, char const*) const
bool ImGuiTextFilter::PassFilter(const char* text, const char* text_end) const
{
    if (Filters.empty())
        return true;

    if (text == NULL)
        text = "";

    for (int i = 0; i != Filters.Size; i++)
    {
        const ImGuiTextRange& f = Filters[i];
        if (f.empty())
            continue;
        if (f.b[0] == '-')
        {
            // Subtract
            if (ImStristr(text, text_end, f.b + 1, f.e) != NULL)
                return false;
        }
        else
        {
            // Grep
            if (ImStristr(text, text_end, f.b, f.e) != NULL)
                return true;
        }
    }

    // Implicit * grep
    if (CountGrep == 0)
        return true;

    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, -0x38(%rbp)
movl 0x100(%rdi), %r13d
testq %r13, %r13
je 0x43298
testq %rsi, %rsi
leaq 0x71cfa(%rip), %rax     # 0xb4f1d
cmovneq %rsi, %rax
movq %rax, -0x30(%rbp)
movq %rdi, -0x40(%rbp)
movq 0x108(%rdi), %r14
xorl %ebx, %ebx
testl %r13d, %r13d
movl $0x0, %r15d
cmovgl %r13d, %r15d
shlq $0x4, %r15
shlq $0x4, %r13
cmpq %rbx, %r15
je 0x432ad
movq (%r14,%rbx), %rdx
movq 0x8(%r14,%rbx), %rcx
cmpq %rcx, %rdx
je 0x4327e
cmpb $0x2d, (%rdx)
setne %r12b
jne 0x4326c
incq %rdx
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x41ddb
testq %rax, %rax
jne 0x4329b
addq $0x10, %rbx
cmpq %rbx, %r13
jne 0x4324d
movq -0x40(%rbp), %rax
cmpl $0x0, 0x110(%rax)
sete %r12b
jmp 0x4329b
movb $0x1, %r12b
movl %r12d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x763c4(%rip), %rdi     # 0xb9678
leaq 0x763d0(%rip), %rsi     # 0xb968b
leaq 0x775d7(%rip), %rcx     # 0xba899
movl $0x65d, %edx            # imm = 0x65D
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGuiTextBuffer::append(char const*, char const*)
void ImGuiTextBuffer::append(const char* str, const char* str_end)
{
    int len = str_end ? (int)(str_end - str) : (int)strlen(str);

    // Add zero-terminator the first time
    const int write_off = (Buf.Size != 0) ? Buf.Size : 1;
    const int needed_sz = write_off + len;
    if (write_off + len >= Buf.Capacity)
    {
        int new_capacity = Buf.Capacity * 2;
        Buf.reserve(needed_sz > new_capacity ? needed_sz : new_capacity);
    }

    Buf.resize(needed_sz);
    memcpy(&Buf[write_off - 1], str, (size_t)len);
    Buf[write_off - 1 + len] = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
testq %rdx, %rdx
movq %rsi, -0x38(%rbp)
je 0x432f1
movq %rdx, %r15
subq %rsi, %r15
jmp 0x432fc
movq %rsi, %rdi
callq 0xc350
movq %rax, %r15
movl (%rbx), %r13d
movl 0x4(%rbx), %eax
cmpl $0x1, %r13d
adcl $0x0, %r13d
leal (%r15,%r13), %r14d
cmpl %eax, %r14d
jl 0x43323
leal (%rax,%rax), %r12d
cmpl %r12d, %r14d
cmovgl %r14d, %r12d
cmpl %r12d, %eax
jl 0x4334f
cmpl %r14d, %eax
jge 0x433bd
testl %eax, %eax
je 0x43342
movl %eax, %r12d
shrl $0x1f, %r12d
addl %eax, %r12d
sarl %r12d
addl %eax, %r12d
jmp 0x43348
movl $0x8, %r12d
cmpl %r14d, %r12d
cmovlel %r14d, %r12d
movslq %r12d, %rdi
movq 0xb8977(%rip), %rax     # 0xfbcd0
testq %rax, %rax
je 0x43364
incl 0x3b4(%rax)
movq 0xb8975(%rip), %rsi     # 0xfbce0
callq *0xb419f(%rip)          # 0xf7510
movq 0x8(%rbx), %rsi
testq %rsi, %rsi
je 0x433b5
movslq (%rbx), %rdx
movq %rax, -0x30(%rbp)
movq %rax, %rdi
callq 0xc080
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x433a4
movq 0xb8937(%rip), %rax     # 0xfbcd0
testq %rax, %rax
je 0x433a4
decl 0x3b4(%rax)
movq 0xb8935(%rip), %rsi     # 0xfbce0
callq *0xb4167(%rip)          # 0xf7518
movq -0x30(%rbp), %rax
movq %rax, 0x8(%rbx)
movl %r12d, 0x4(%rbx)
movl %r14d, (%rbx)
testl %r15d, %r15d
js 0x43407
testl %r13d, %r13d
jle 0x43407
decl %r13d
movq 0x8(%rbx), %rdi
addq %r13, %rdi
movl %r15d, %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movq -0x38(%rbp), %rsi
callq 0xc080
movl %r15d, %eax
addq %r13, %rax
cmpl %eax, (%rbx)
jle 0x43407
movq 0x8(%rbx), %rcx
movb $0x0, (%rcx,%rax)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7626a(%rip), %rdi     # 0xb9678
leaq 0x76276(%rip), %rsi     # 0xb968b
leaq 0x7737c(%rip), %rcx     # 0xba798
movl $0x65c, %edx            # imm = 0x65C
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGuiTextBuffer::appendfv(char const*, __va_list_tag*)
void ImGuiTextBuffer::appendfv(const char* fmt, va_list args)
{
    va_list args_copy;
    va_copy(args_copy, args);

    int len = ImFormatStringV(NULL, 0, fmt, args);         // FIXME-OPT: could do a first pass write attempt, likely successful on first pass.
    if (len <= 0)
    {
        va_end(args_copy);
        return;
    }

    // Add zero-terminator the first time
    const int write_off = (Buf.Size != 0) ? Buf.Size : 1;
    const int needed_sz = write_off + len;
    if (write_off + len >= Buf.Capacity)
    {
        int new_capacity = Buf.Capacity * 2;
        Buf.reserve(needed_sz > new_capacity ? needed_sz : new_capacity);
    }

    Buf.resize(needed_sz);
    ImFormatStringV(&Buf[write_off - 1], (size_t)len + 1, fmt, args_copy);
    va_end(args_copy);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rcx
movq %rsi, %rbx
movq %rdi, %r15
movq 0x10(%rdx), %rax
movq %rax, -0x40(%rbp)
movups (%rdx), %xmm0
movaps %xmm0, -0x50(%rbp)
xorl %edi, %edi
xorl %esi, %esi
movq %rbx, %rdx
callq 0xc5c0
testl %eax, %eax
jle 0x435df
movl %eax, %r14d
movq %rbx, -0x38(%rbp)
movl (%r15), %r13d
movl 0x4(%r15), %eax
cmpl $0x1, %r13d
adcl $0x0, %r13d
leal (%r14,%r13), %r12d
cmpl %eax, %r12d
jl 0x43508
leal (%rax,%rax), %ebx
cmpl %ebx, %r12d
cmovgl %r12d, %ebx
cmpl %ebx, %eax
jl 0x4352e
cmpl %r12d, %eax
jge 0x4359c
testl %eax, %eax
je 0x43522
movl %eax, %ebx
shrl $0x1f, %ebx
addl %eax, %ebx
sarl %ebx
addl %eax, %ebx
jmp 0x43527
movl $0x8, %ebx
cmpl %r12d, %ebx
cmovlel %r12d, %ebx
movslq %ebx, %rdi
movq 0xb8798(%rip), %rax     # 0xfbcd0
testq %rax, %rax
je 0x43543
incl 0x3b4(%rax)
movq 0xb8796(%rip), %rsi     # 0xfbce0
callq *0xb3fc0(%rip)          # 0xf7510
movq 0x8(%r15), %rsi
testq %rsi, %rsi
je 0x43594
movslq (%r15), %rdx
movq %rax, -0x30(%rbp)
movq %rax, %rdi
callq 0xc080
movq 0x8(%r15), %rdi
testq %rdi, %rdi
je 0x43583
movq 0xb8758(%rip), %rax     # 0xfbcd0
testq %rax, %rax
je 0x43583
decl 0x3b4(%rax)
movq 0xb8756(%rip), %rsi     # 0xfbce0
callq *0xb3f88(%rip)          # 0xf7518
movq -0x30(%rbp), %rax
movq %rax, 0x8(%r15)
movl %ebx, 0x4(%r15)
movl %r12d, (%r15)
testl %r13d, %r13d
jle 0x435ee
movl %r13d, %ebx
addq 0x8(%r15), %rbx
leal 0x1(%r14), %r15d
leaq -0x1(%rbx), %rdi
leaq -0x50(%rbp), %rcx
movq %r15, %rsi
movq -0x38(%rbp), %rdx
callq 0xc5c0
decq %rbx
je 0x435df
cmpl %r15d, %eax
movl %r14d, %ecx
cmovll %eax, %ecx
cmpl $-0x1, %eax
cmovel %r14d, %ecx
movslq %ecx, %rax
movb $0x0, (%rbx,%rax)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x76083(%rip), %rdi     # 0xb9678
leaq 0x7608f(%rip), %rsi     # 0xb968b
leaq 0x77195(%rip), %rcx     # 0xba798
movl $0x65c, %edx            # imm = 0x65C
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::CalcListClipping(int, float, int*, int*)
void ImGui::CalcListClipping(int items_count, float items_height, int* out_items_display_start, int* out_items_display_end)
{
    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = g.CurrentWindow;
    if (g.LogEnabled)
    {
        // If logging is active, do not perform any clipping
        *out_items_display_start = 0;
        *out_items_display_end = items_count;
        return;
    }
    if (GetSkipItemForListClipping())
    {
        *out_items_display_start = *out_items_display_end = 0;
        return;
    }

    // We create the union of the ClipRect and the NavScoringRect which at worst should be 1 page away from ClipRect
    ImRect unclipped_rect = window->ClipRect;
    if (g.NavMoveRequest)
        unclipped_rect.Add(g.NavScoringRect);
    if (g.NavJustMovedToId && window->NavLastIds[0] == g.NavJustMovedToId)
        unclipped_rect.Add(ImRect(window->Pos + window->NavRectRel[0].Min, window->Pos + window->NavRectRel[0].Max));

    const ImVec2 pos = window->DC.CursorPos;
    int start = (int)((unclipped_rect.Min.y - pos.y) / items_height);
    int end = (int)((unclipped_rect.Max.y - pos.y) / items_height);

    // When performing a navigation request, ensure we have one item extra in the direction we are moving to
    if (g.NavMoveRequest && g.NavMoveClipDir == ImGuiDir_Up)
        start--;
    if (g.NavMoveRequest && g.NavMoveClipDir == ImGuiDir_Down)
        end++;

    start = ImClamp(start, 0, items_count);
    end = ImClamp(end + 1, start, items_count);
    *out_items_display_start = start;
    *out_items_display_end = end;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0xb86b8(%rip), %rax     # 0xfbcd0
cmpb $0x1, 0x3138(%rax)
jne 0x4362c
movl $0x0, (%rsi)
jmp 0x43747
movq 0x1ae0(%rax), %rcx
movq 0x20a8(%rax), %r8
leaq 0x256(%r8), %r9
leaq 0x93(%rcx), %r10
testq %r8, %r8
cmoveq %r10, %r9
cmpb $0x1, (%r9)
jne 0x43660
xorl %eax, %eax
movl %eax, (%rdx)
movl %eax, (%rsi)
jmp 0x43749
movss 0x25c(%rcx), %xmm4
movss 0x264(%rcx), %xmm3
movb 0x1d00(%rax), %r8b
cmpb $0x1, %r8b
jne 0x43698
movss 0x1ccc(%rax), %xmm2
movss 0x1cd4(%rax), %xmm1
minss %xmm4, %xmm2
ucomiss %xmm3, %xmm1
jbe 0x4369b
jmp 0x4369e
movaps %xmm4, %xmm2
movaps %xmm3, %xmm1
movl 0x1cb4(%rax), %r9d
testl %r9d, %r9d
je 0x436d7
cmpl %r9d, 0x3b0(%rcx)
jne 0x436d7
movss 0x14(%rcx), %xmm3
movss 0x3bc(%rcx), %xmm4
addss %xmm3, %xmm4
addss 0x3c4(%rcx), %xmm3
minss %xmm2, %xmm4
ucomiss %xmm1, %xmm3
jbe 0x436da
jmp 0x436dd
movaps %xmm2, %xmm4
movaps %xmm1, %xmm3
movss 0xdc(%rcx), %xmm1
subss %xmm1, %xmm4
divss %xmm0, %xmm4
cvttss2si %xmm4, %r9d
subss %xmm1, %xmm3
divss %xmm0, %xmm3
cvttss2si %xmm3, %ecx
testb %r8b, %r8b
je 0x43723
movl 0x1d18(%rax), %eax
xorl %r8d, %r8d
cmpl $0x2, %eax
sete %r8b
subl %r8d, %r9d
xorl %r8d, %r8d
cmpl $0x3, %eax
sete %r8b
addl %r8d, %ecx
cmpl %edi, %r9d
movl %edi, %eax
cmovll %r9d, %eax
xorl %r8d, %r8d
testl %r9d, %r9d
cmovnsl %eax, %r8d
incl %ecx
cmpl %edi, %ecx
cmovll %ecx, %edi
cmpl %r8d, %ecx
cmovll %r8d, %edi
movl %r8d, (%rsi)
movl %edi, (%rdx)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGuiListClipper::Begin(int, float)
void ImGuiListClipper::Begin(int items_count, float items_height)
{
    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = g.CurrentWindow;

    if (ImGuiTable* table = g.CurrentTable)
        if (table->IsInsideRow)
            ImGui::TableEndRow(table);

    StartPosY = window->DC.CursorPos.y;
    ItemsHeight = items_height;
    ItemsCount = items_count;
    ItemsFrozen = 0;
    StepNo = 0;
    DisplayStart = -1;
    DisplayEnd = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
movq 0xb852b(%rip), %rax     # 0xfbcd0
movq 0x1ae0(%rax), %r15
movq 0x20a8(%rax), %rdi
testq %rdi, %rdi
je 0x437d0
cmpb $0x1, 0x249(%rdi)
jne 0x437d0
movss %xmm0, -0x1c(%rbp)
callq 0x89b8c
movss -0x1c(%rbp), %xmm0
movss 0xdc(%r15), %xmm1
movss %xmm1, 0x18(%rbx)
movss %xmm0, 0x14(%rbx)
movl %r14d, 0x8(%rbx)
movq $0x0, 0xc(%rbx)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, (%rbx)
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: ImGuiListClipper::End()
void ImGuiListClipper::End()
{
    if (ItemsCount < 0) // Already ended
        return;

    // In theory here we should assert that ImGui::GetCursorPosY() == StartPosY + DisplayEnd * ItemsHeight, but it feels saner to just seek at the end and not assert/crash the user.
    if (ItemsCount < INT_MAX && DisplayStart >= 0)
        SetCursorPosYAndSetupForPrevLine(StartPosY + (ItemsCount - ItemsFrozen) * ItemsHeight, ItemsHeight);
    ItemsCount = -1;
    StepNo = 3;
}

// Assembly:
movl 0x8(%rdi), %eax
testl %eax, %eax
js 0x4384c
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
je 0x43838
cmpl $0x0, (%rbx)
js 0x43838
subl 0x10(%rbx), %eax
cvtsi2ss %eax, %xmm0
movss 0x14(%rbx), %xmm1
mulss %xmm1, %xmm0
addss 0x18(%rbx), %xmm0
callq 0x4384d
movabsq $0x3ffffffff, %rax      # imm = 0x3FFFFFFFF
movq %rax, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: SetCursorPosYAndSetupForPrevLine(float, float)
static void SetCursorPosYAndSetupForPrevLine(float pos_y, float line_height)
{
    // Set cursor position and a few other things so that SetScrollHereY() and Columns() can work when seeking cursor.
    // FIXME: It is problematic that we have to do that here, because custom/equivalent end-user code would stumble on the same issue.
    // The clipper should probably have a 4th step to display the last item in a regular manner.
    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = g.CurrentWindow;
    float off_y = pos_y - window->DC.CursorPos.y;
    window->DC.CursorPos.y = pos_y;
    window->DC.CursorMaxPos.y = ImMax(window->DC.CursorMaxPos.y, pos_y);
    window->DC.CursorPosPrevLine.y = window->DC.CursorPos.y - line_height;  // Setting those fields so that SetScrollHereY() can properly function after the end of our clipper usage.
    window->DC.PrevLineSize.y = (line_height - g.Style.ItemSpacing.y);      // If we end up needing more accurate data (to e.g. use SameLine) we may as well make the clipper have a fourth step to let user process and display the last item in their list.
    if (ImGuiOldColumns* columns = window->DC.CurrentColumns)
        columns->LineMinY = window->DC.CursorPos.y;                         // Setting this so that cell Y position are set properly
    if (ImGuiTable* table = g.CurrentTable)
    {
        if (table->IsInsideRow)
            ImGui::TableEndRow(table);
        table->RowPosY2 = window->DC.CursorPos.y;
        const int row_increase = (int)((off_y / line_height) + 0.5f);
        //table->CurrentRow += row_increase; // Can't do without fixing TableEndRow()
        table->RowBgColorCounter += row_increase;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq 0xb8471(%rip), %rax     # 0xfbcd0
movq 0x1ae0(%rax), %r14
movaps %xmm0, %xmm4
subss 0xdc(%r14), %xmm4
movss %xmm0, 0xdc(%r14)
movss 0xf4(%r14), %xmm3
movaps %xmm0, %xmm2
cmpless %xmm3, %xmm2
andps %xmm2, %xmm3
andnps %xmm0, %xmm2
orps %xmm3, %xmm2
movss %xmm2, 0xf4(%r14)
movaps %xmm0, %xmm2
subss %xmm1, %xmm2
movss %xmm2, 0xe4(%r14)
movaps %xmm1, %xmm2
subss 0x15ac(%rax), %xmm2
movss %xmm2, 0x10c(%r14)
movq 0x1b0(%r14), %rcx
testq %rcx, %rcx
je 0x438d3
movss %xmm0, 0x1c(%rcx)
movq 0x20a8(%rax), %rbx
testq %rbx, %rbx
je 0x43929
cmpb $0x1, 0x249(%rbx)
jne 0x4390b
movq %rbx, %rdi
movss %xmm1, -0x14(%rbp)
movaps %xmm4, -0x30(%rbp)
callq 0x89b8c
movaps -0x30(%rbp), %xmm4
movss -0x14(%rbp), %xmm1
movss 0xdc(%r14), %xmm0
divss %xmm1, %xmm4
addss 0x716ed(%rip), %xmm4    # 0xb5004
cvttss2si %xmm4, %eax
movss %xmm0, 0x80(%rbx)
addl %eax, 0x94(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::GetColorU32(int, float)
ImU32 ImGui::GetColorU32(ImGuiCol idx, float alpha_mul)
{
    ImGuiStyle& style = GImGui->Style;
    ImVec4 c = style.Colors[idx];
    c.w *= style.Alpha * alpha_mul;
    return ColorConvertFloat4ToU32(c);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq 0xb80f7(%rip), %rax     # 0xfbcd0
movslq %edi, %rcx
shlq $0x4, %rcx
movups 0x1624(%rax,%rcx), %xmm1
leaq -0x10(%rbp), %rdi
movaps %xmm1, (%rdi)
mulss 0x1560(%rax), %xmm0
mulss 0xc(%rdi), %xmm0
movss %xmm0, 0xc(%rdi)
callq 0x42601
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::GetColorU32(ImVec4 const&)
ImU32 ImGui::GetColorU32(const ImVec4& col)
{
    ImGuiStyle& style = GImGui->Style;
    ImVec4 c = col;
    c.w *= style.Alpha;
    return ColorConvertFloat4ToU32(c);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq 0xb80b5(%rip), %rax     # 0xfbcd0
movups (%rdi), %xmm0
leaq -0x10(%rbp), %rdi
movaps %xmm0, (%rdi)
movss 0x1560(%rax), %xmm0
mulss 0xc(%rdi), %xmm0
movss %xmm0, 0xc(%rdi)
callq 0x42601
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::GetColorU32(unsigned int)
ImU32 ImGui::GetColorU32(ImU32 col)
{
    ImGuiStyle& style = GImGui->Style;
    if (style.Alpha >= 1.0f)
        return col;
    ImU32 a = (col & IM_COL32_A_MASK) >> IM_COL32_A_SHIFT;
    a = (ImU32)(a * style.Alpha); // We don't need to clamp 0..255 because Style.Alpha is in 0..1 range.
    return (col & ~IM_COL32_A_MASK) | (a << IM_COL32_A_SHIFT);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, %eax
movq 0xb8064(%rip), %rcx     # 0xfbcd0
movss 0x1560(%rcx), %xmm0
ucomiss 0x71369(%rip), %xmm0    # 0xb4fe4
jae 0x43c9b
movl %eax, %ecx
shrl $0x18, %ecx
cvtsi2ss %ecx, %xmm1
mulss %xmm1, %xmm0
cvttss2si %xmm0, %rcx
andl $0xffffff, %eax         # imm = 0xFFFFFF
shll $0x18, %ecx
orl %eax, %ecx
movl %ecx, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::PushStyleColor(int, unsigned int)
void ImGui::PushStyleColor(ImGuiCol idx, ImU32 col)
{
    ImGuiContext& g = *GImGui;
    ImGuiColorMod backup;
    backup.Col = idx;
    backup.BackupValue = g.Style.Colors[idx];
    g.ColorStack.push_back(backup);
    g.Style.Colors[idx] = ColorConvertU32ToFloat4(col);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebx
movl %edi, %r14d
movq 0xb8016(%rip), %r13     # 0xfbcd0
movslq %edi, %rax
shlq $0x4, %rax
leaq (%rax,%r13), %rdx
addq $0x1624, %rdx           # imm = 0x1624
movups (%rdx), %xmm0
movaps %xmm0, -0x40(%rbp)
movl 0x1c10(%r13), %eax
cmpl 0x1c14(%r13), %eax
jne 0x43cfc
leal 0x1(%rax), %r12d
testl %eax, %eax
movq %rdx, -0x30(%rbp)
je 0x43d08
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
jmp 0x43d0d
movq 0x1c18(%r13), %r15
jmp 0x43d9d
movl $0x8, %ecx
cmpl %r12d, %ecx
cmovgl %ecx, %r12d
movslq %r12d, %rax
shlq $0x2, %rax
leaq (%rax,%rax,4), %rdi
incl 0x3b4(%r13)
movq 0xb7fb3(%rip), %rsi     # 0xfbce0
callq *0xb37dd(%rip)          # 0xf7510
movq %rax, %r15
movq 0x1c18(%r13), %rsi
testq %rsi, %rsi
je 0x43d84
movslq 0x1c10(%r13), %rax
shlq $0x2, %rax
leaq (%rax,%rax,4), %rdx
movq %r15, %rdi
callq 0xc080
movq 0x1c18(%r13), %rdi
testq %rdi, %rdi
je 0x43d77
movq 0xb7f64(%rip), %rax     # 0xfbcd0
testq %rax, %rax
je 0x43d77
decl 0x3b4(%rax)
movq 0xb7f62(%rip), %rsi     # 0xfbce0
callq *0xb3794(%rip)          # 0xf7518
movq %r15, 0x1c18(%r13)
movl %r12d, 0x1c14(%r13)
movl 0x1c10(%r13), %eax
movq -0x30(%rbp), %rdx
cltq
leaq (%rax,%rax,4), %rax
movl %r14d, (%r15,%rax,4)
movaps -0x40(%rbp), %xmm0
movups %xmm0, 0x4(%r15,%rax,4)
incl 0x1c10(%r13)
movl $0xff, %eax
movl %ebx, %ecx
andl %eax, %ecx
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
movss 0x71a7c(%rip), %xmm1    # 0xb584c
mulss %xmm1, %xmm0
movl %ebx, %ecx
shrl $0x8, %ecx
andl %eax, %ecx
cvtsi2ss %ecx, %xmm2
mulss %xmm1, %xmm2
unpcklps %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
movl %ebx, %ecx
shrl $0x10, %ecx
andl %eax, %ecx
xorps %xmm2, %xmm2
cvtsi2ss %ecx, %xmm2
mulss %xmm1, %xmm2
shrl $0x18, %ebx
cvtsi2ss %ebx, %xmm3
mulss %xmm1, %xmm3
unpcklps %xmm3, %xmm2            # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
movlhps %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0]
movups %xmm0, (%rdx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::PushStyleColor(int, ImVec4 const&)
void ImGui::PushStyleColor(ImGuiCol idx, const ImVec4& col)
{
    ImGuiContext& g = *GImGui;
    ImGuiColorMod backup;
    backup.Col = idx;
    backup.BackupValue = g.Style.Colors[idx];
    g.ColorStack.push_back(backup);
    g.Style.Colors[idx] = col;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edi, %r14d
movq 0xb7e9a(%rip), %r12     # 0xfbcd0
movslq %edi, %rax
shlq $0x4, %rax
leaq (%r12,%rax), %r13
addq $0x1624, %r13           # imm = 0x1624
movups (%r13), %xmm0
movaps %xmm0, -0x40(%rbp)
movl 0x1c10(%r12), %eax
cmpl 0x1c14(%r12), %eax
jne 0x43e7b
leal 0x1(%rax), %ebx
testl %eax, %eax
movq %rsi, -0x30(%rbp)
je 0x43e88
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
jmp 0x43e8d
movq 0x1c18(%r12), %r15
jmp 0x43f22
movl $0x8, %ecx
cmpl %ebx, %ecx
cmovgl %ecx, %ebx
movslq %ebx, %rax
shlq $0x2, %rax
leaq (%rax,%rax,4), %rdi
incl 0x3b4(%r12)
movq 0xb7e34(%rip), %rsi     # 0xfbce0
callq *0xb365e(%rip)          # 0xf7510
movq %rax, %r15
movq 0x1c18(%r12), %rsi
testq %rsi, %rsi
je 0x43f06
movslq 0x1c10(%r12), %rax
shlq $0x2, %rax
leaq (%rax,%rax,4), %rdx
movq %r15, %rdi
callq 0xc080
movq 0x1c18(%r12), %rdi
testq %rdi, %rdi
je 0x43ef9
movq 0xb7de2(%rip), %rax     # 0xfbcd0
testq %rax, %rax
je 0x43ef9
decl 0x3b4(%rax)
movq 0xb7de0(%rip), %rsi     # 0xfbce0
callq *0xb3612(%rip)          # 0xf7518
movq %r15, 0x1c18(%r12)
movl %ebx, 0x1c14(%r12)
movl 0x1c10(%r12), %eax
movq -0x30(%rbp), %rsi
cltq
leaq (%rax,%rax,4), %rax
movl %r14d, (%r15,%rax,4)
movaps -0x40(%rbp), %xmm0
movups %xmm0, 0x4(%r15,%rax,4)
incl 0x1c10(%r12)
movups (%rsi), %xmm0
movups %xmm0, (%r13)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::PopStyleColor(int)
void ImGui::PopStyleColor(int count)
{
    ImGuiContext& g = *GImGui;
    while (count > 0)
    {
        ImGuiColorMod& backup = g.ColorStack.back();
        g.Style.Colors[backup.Col] = backup.BackupValue;
        g.ColorStack.pop_back();
        count--;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testl %edi, %edi
jle 0x43fb0
movq 0xb7d6c(%rip), %rax     # 0xfbcd0
leaq 0x1624(%rax), %rcx
movl 0x1c10(%rax), %edx
incl %edi
testl %edx, %edx
jle 0x43fd1
movq 0x1c18(%rax), %rsi
movl %edx, %edx
leaq (%rdx,%rdx,4), %rdx
movslq -0x14(%rsi,%rdx,4), %r8
shlq $0x4, %r8
movups -0x10(%rsi,%rdx,4), %xmm0
movups %xmm0, (%rcx,%r8)
movl 0x1c10(%rax), %edx
testl %edx, %edx
jle 0x43fb2
decl %edx
movl %edx, 0x1c10(%rax)
decl %edi
cmpl $0x1, %edi
jg 0x43f73
popq %rbp
retq
leaq 0x899f1(%rip), %rdi     # 0xcd9aa
leaq 0x756cb(%rip), %rsi     # 0xb968b
leaq 0x76979(%rip), %rcx     # 0xba940
movl $0x672, %edx            # imm = 0x672
callq 0xc140
leaq 0x899d2(%rip), %rdi     # 0xcd9aa
leaq 0x756ac(%rip), %rsi     # 0xb968b
leaq 0x76923(%rip), %rcx     # 0xba909
movl $0x666, %edx            # imm = 0x666
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::PushStyleVar(int, float)
void ImGui::PushStyleVar(ImGuiStyleVar idx, float val)
{
    const ImGuiStyleVarInfo* var_info = GetStyleVarInfo(idx);
    if (var_info->Type == ImGuiDataType_Float && var_info->Count == 1)
    {
        ImGuiContext& g = *GImGui;
        float* pvar = (float*)var_info->GetVarPtr(&g.Style);
        g.StyleVarStack.push_back(ImGuiStyleMod(idx, *pvar));
        *pvar = val;
        return;
    }
    IM_ASSERT(0 && "Called PushStyleVar() float variant but variable is not a float!");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x18, %edi
jae 0x44141
movl %edi, %ebx
movl %edi, %eax
leaq (%rax,%rax,2), %rax
leaq 0x71f1a(%rip), %rcx     # 0xb5f30
cmpl $0x1, 0x4(%rcx,%rax,4)
jne 0x44160
leaq (%rcx,%rax,4), %rax
movq 0xb7ca4(%rip), %r15     # 0xfbcd0
movl 0x8(%rax), %r12d
movss 0x1560(%r15,%r12), %xmm1
movl 0x1c20(%r15), %eax
cmpl 0x1c24(%r15), %eax
jne 0x44069
leal 0x1(%rax), %r13d
testl %eax, %eax
movss %xmm0, -0x30(%rbp)
movss %xmm1, -0x2c(%rbp)
je 0x44075
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
jmp 0x4407a
movq 0x1c28(%r15), %r14
jmp 0x44110
movl $0x8, %ecx
cmpl %r13d, %ecx
cmovgl %ecx, %r13d
movslq %r13d, %rax
shlq $0x2, %rax
leaq (%rax,%rax,2), %rdi
incl 0x3b4(%r15)
movq 0xb7c46(%rip), %rsi     # 0xfbce0
callq *0xb3470(%rip)          # 0xf7510
movq %rax, %r14
movq 0x1c28(%r15), %rsi
testq %rsi, %rsi
je 0x440f1
movslq 0x1c20(%r15), %rax
shlq $0x2, %rax
leaq (%rax,%rax,2), %rdx
movq %r14, %rdi
callq 0xc080
movq 0x1c28(%r15), %rdi
testq %rdi, %rdi
je 0x440e4
movq 0xb7bf7(%rip), %rax     # 0xfbcd0
testq %rax, %rax
je 0x440e4
decl 0x3b4(%rax)
movq 0xb7bf5(%rip), %rsi     # 0xfbce0
callq *0xb3427(%rip)          # 0xf7518
movq %r14, 0x1c28(%r15)
movl %r13d, 0x1c24(%r15)
movl 0x1c20(%r15), %eax
movss -0x30(%rbp), %xmm0
movss -0x2c(%rbp), %xmm1
cltq
leaq (%rax,%rax,2), %rax
movl %ebx, (%r14,%rax,4)
movss %xmm1, 0x4(%r14,%rax,4)
incl 0x1c20(%r15)
movss %xmm0, 0x1560(%r15,%r12)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x75499(%rip), %rdi     # 0xb95e1
leaq 0x72016(%rip), %rsi     # 0xb6165
leaq 0x754b1(%rip), %rcx     # 0xb9607
movl $0x9b4, %edx            # imm = 0x9B4
callq 0xc140
leaq 0x72318(%rip), %rdi     # 0xb647f
leaq 0x71ff7(%rip), %rsi     # 0xb6165
leaq 0x72352(%rip), %rcx     # 0xb64c7
movl $0x9c4, %edx            # imm = 0x9C4
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::PushStyleVar(int, ImVec2 const&)
void ImGui::PushStyleVar(ImGuiStyleVar idx, const ImVec2& val)
{
    const ImGuiStyleVarInfo* var_info = GetStyleVarInfo(idx);
    if (var_info->Type == ImGuiDataType_Float && var_info->Count == 2)
    {
        ImGuiContext& g = *GImGui;
        ImVec2* pvar = (ImVec2*)var_info->GetVarPtr(&g.Style);
        g.StyleVarStack.push_back(ImGuiStyleMod(idx, *pvar));
        *pvar = val;
        return;
    }
    IM_ASSERT(0 && "Called PushStyleVar() ImVec2 variant but variable is not a ImVec2!");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpl $0x18, %edi
jae 0x442e7
movl %edi, %r14d
movl %edi, %eax
leaq (%rax,%rax,2), %rax
leaq 0x71d87(%rip), %rcx     # 0xb5f30
cmpl $0x2, 0x4(%rcx,%rax,4)
jne 0x44306
leaq (%rcx,%rax,4), %rax
movq 0xb7b11(%rip), %r12     # 0xfbcd0
movl 0x8(%rax), %r13d
movsd 0x1560(%r12,%r13), %xmm1
movl 0x1c20(%r12), %eax
cmpl 0x1c24(%r12), %eax
jne 0x441fb
leal 0x1(%rax), %ebx
testl %eax, %eax
movq %rsi, -0x30(%rbp)
movaps %xmm1, -0x40(%rbp)
je 0x44208
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
jmp 0x4420d
movq 0x1c28(%r12), %r15
jmp 0x442a6
movl $0x8, %ecx
cmpl %ebx, %ecx
cmovgl %ecx, %ebx
movslq %ebx, %rax
shlq $0x2, %rax
leaq (%rax,%rax,2), %rdi
incl 0x3b4(%r12)
movq 0xb7ab4(%rip), %rsi     # 0xfbce0
callq *0xb32de(%rip)          # 0xf7510
movq %rax, %r15
movq 0x1c28(%r12), %rsi
testq %rsi, %rsi
je 0x44286
movslq 0x1c20(%r12), %rax
shlq $0x2, %rax
leaq (%rax,%rax,2), %rdx
movq %r15, %rdi
callq 0xc080
movq 0x1c28(%r12), %rdi
testq %rdi, %rdi
je 0x44279
movq 0xb7a62(%rip), %rax     # 0xfbcd0
testq %rax, %rax
je 0x44279
decl 0x3b4(%rax)
movq 0xb7a60(%rip), %rsi     # 0xfbce0
callq *0xb3292(%rip)          # 0xf7518
movq %r15, 0x1c28(%r12)
movl %ebx, 0x1c24(%r12)
movl 0x1c20(%r12), %eax
movq -0x30(%rbp), %rsi
movaps -0x40(%rbp), %xmm1
movaps %xmm1, %xmm0
shufps $0x55, %xmm1, %xmm0     # xmm0 = xmm0[1,1],xmm1[1,1]
cltq
leaq (%rax,%rax,2), %rax
movl %r14d, (%r15,%rax,4)
movss %xmm1, 0x4(%r15,%rax,4)
movss %xmm0, 0x8(%r15,%rax,4)
incl 0x1c20(%r12)
movq (%rsi), %rax
movq %rax, 0x1560(%r12,%r13)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x752f3(%rip), %rdi     # 0xb95e1
leaq 0x71e70(%rip), %rsi     # 0xb6165
leaq 0x7530b(%rip), %rcx     # 0xb9607
movl $0x9b4, %edx            # imm = 0x9B4
callq 0xc140
leaq 0x721e9(%rip), %rdi     # 0xb64f6
leaq 0x71e51(%rip), %rsi     # 0xb6165
leaq 0x72225(%rip), %rcx     # 0xb6540
movl $0x9d2, %edx            # imm = 0x9D2
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::PopStyleVar(int)
void ImGui::PopStyleVar(int count)
{
    ImGuiContext& g = *GImGui;
    while (count > 0)
    {
        // We avoid a generic memcpy(data, &backup.Backup.., GDataTypeSize[info->Type] * info->Count), the overhead in Debug is not worth it.
        ImGuiStyleMod& backup = g.StyleVarStack.back();
        const ImGuiStyleVarInfo* info = GetStyleVarInfo(backup.VarIdx);
        void* data = info->GetVarPtr(&g.Style);
        if (info->Type == ImGuiDataType_Float && info->Count == 1)      { ((float*)data)[0] = backup.BackupFloat[0]; }
        else if (info->Type == ImGuiDataType_Float && info->Count == 2) { ((float*)data)[0] = backup.BackupFloat[0]; ((float*)data)[1] = backup.BackupFloat[1]; }
        g.StyleVarStack.pop_back();
        count--;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
testl %edi, %edi
jle 0x443c4
movq 0xb7998(%rip), %rax     # 0xfbcd0
movl 0x1c20(%rax), %ecx
incl %edi
leaq 0x71be9(%rip), %rdx     # 0xb5f30
testl %ecx, %ecx
jle 0x443e5
movq 0x1c28(%rax), %rsi
movl %ecx, %r8d
leaq (%r8,%r8,2), %r9
movl -0xc(%rsi,%r9,4), %r8d
cmpq $0x18, %r8
jae 0x443c6
leaq (%rsi,%r9,4), %rsi
leaq (%r8,%r8,2), %r8
movl 0x4(%rdx,%r8,4), %r9d
movl 0x8(%rdx,%r8,4), %r8d
cmpl $0x2, %r9d
je 0x44397
cmpl $0x1, %r9d
jne 0x443b5
movss -0x8(%rsi), %xmm0
movss %xmm0, 0x1560(%rax,%r8)
jmp 0x443b5
movss -0x8(%rsi), %xmm0
movss %xmm0, 0x1560(%rax,%r8)
movss -0x4(%rsi), %xmm0
movss %xmm0, 0x1564(%rax,%r8)
decl %ecx
movl %ecx, 0x1c20(%rax)
decl %edi
cmpl $0x1, %edi
jg 0x44347
popq %rbp
retq
leaq 0x75214(%rip), %rdi     # 0xb95e1
leaq 0x71d91(%rip), %rsi     # 0xb6165
leaq 0x7522c(%rip), %rcx     # 0xb9607
movl $0x9b4, %edx            # imm = 0x9B4
callq 0xc140
leaq 0x895be(%rip), %rdi     # 0xcd9aa
leaq 0x75298(%rip), %rsi     # 0xb968b
leaq 0x76583(%rip), %rcx     # 0xba97d
movl $0x666, %edx            # imm = 0x666
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::FindRenderedTextEnd(char const*, char const*)
const char* ImGui::FindRenderedTextEnd(const char* text, const char* text_end)
{
    const char* text_display_end = text;
    if (!text_end)
        text_end = (const char*)-1;

    while (text_display_end < text_end && *text_display_end != '\0' && (text_display_end[0] != '#' || text_display_end[1] != '#'))
        text_display_end++;
    return text_display_end;
}

// Assembly:
movq %rdi, %rax
xorl %ecx, %ecx
cmpq $0x1, %rsi
sbbq %rcx, %rcx
orq %rsi, %rcx
cmpq %rdi, %rcx
jbe 0x44475
pushq %rbp
movq %rsp, %rbp
movzbl (%rax), %edx
cmpl $0x23, %edx
je 0x44463
testl %edx, %edx
jne 0x44469
jmp 0x44474
cmpb $0x23, 0x1(%rax)
je 0x44474
incq %rax
cmpq %rcx, %rax
jne 0x44455
movq %rcx, %rax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::RenderText(ImVec2, char const*, char const*, bool)
void ImGui::RenderText(ImVec2 pos, const char* text, const char* text_end, bool hide_text_after_hash)
{
    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = g.CurrentWindow;

    // Hide anything after a '##' string
    const char* text_display_end;
    if (hide_text_after_hash)
    {
        text_display_end = FindRenderedTextEnd(text, text_end);
    }
    else
    {
        if (!text_end)
            text_end = text + strlen(text); // FIXME-OPT
        text_display_end = text_end;
    }

    if (text != text_display_end)
    {
        window->DrawList->AddText(g.Font, g.FontSize, pos, GetColorU32(ImGuiCol_Text), text, text_display_end);
        if (g.LogEnabled)
            LogRenderedText(&pos, text, text_display_end);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movlps %xmm0, -0x38(%rbp)
movq 0xb7838(%rip), %r13     # 0xfbcd0
movq 0x1ae0(%r13), %r15
testl %edx, %edx
je 0x444de
xorl %eax, %eax
cmpq $0x1, %r14
sbbq %rax, %rax
orq %r14, %rax
cmpq %rbx, %rax
jbe 0x4457d
movq %rbx, %r14
movzbl (%r14), %ecx
cmpl $0x23, %ecx
je 0x444ca
testl %ecx, %ecx
jne 0x444d1
jmp 0x444f1
cmpb $0x23, 0x1(%r14)
je 0x444f1
incq %r14
cmpq %rax, %r14
jne 0x444bb
movq %rax, %r14
jmp 0x444f1
testq %r14, %r14
jne 0x444f1
movq %rbx, %rdi
callq 0xc350
movq %rax, %r14
addq %rbx, %r14
cmpq %rbx, %r14
je 0x4457d
movq 0x2b8(%r15), %r15
movq 0x1978(%r13), %r12
movss 0x1980(%r13), %xmm0
movss %xmm0, -0x2c(%rbp)
movups 0x1624(%r13), %xmm0
leaq -0x50(%rbp), %rdi
movaps %xmm0, (%rdi)
movss 0x1560(%r13), %xmm0
mulss 0xc(%rdi), %xmm0
movss %xmm0, 0xc(%rdi)
callq 0x42601
movq $0x0, (%rsp)
leaq -0x38(%rbp), %rdx
xorps %xmm1, %xmm1
movq %r15, %rdi
movq %r12, %rsi
movss -0x2c(%rbp), %xmm0
movl %eax, %ecx
movq %rbx, %r8
movq %r14, %r9
callq 0x79640
cmpb $0x1, 0x3138(%r13)
jne 0x4457d
leaq -0x38(%rbp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x4458c
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::RenderTextWrapped(ImVec2, char const*, char const*, float)
void ImGui::RenderTextWrapped(ImVec2 pos, const char* text, const char* text_end, float wrap_width)
{
    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = g.CurrentWindow;

    if (!text_end)
        text_end = text + strlen(text); // FIXME-OPT

    if (text != text_end)
    {
        window->DrawList->AddText(g.Font, g.FontSize, pos, GetColorU32(ImGuiCol_Text), text, text_end, wrap_width);
        if (g.LogEnabled)
            LogRenderedText(&pos, text, text_end);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movss %xmm1, -0x30(%rbp)
movq %rsi, %r14
movq %rdi, %rbx
movlps %xmm0, -0x38(%rbp)
movq 0xb758b(%rip), %r13     # 0xfbcd0
movq 0x1ae0(%r13), %r15
testq %rsi, %rsi
jne 0x4475f
movq %rbx, %rdi
callq 0xc350
movq %rax, %r14
addq %rbx, %r14
cmpq %rbx, %r14
je 0x447ed
movq 0x2b8(%r15), %r15
movq 0x1978(%r13), %r12
movss 0x1980(%r13), %xmm0
movss %xmm0, -0x2c(%rbp)
movups 0x1624(%r13), %xmm0
leaq -0x50(%rbp), %rdi
movaps %xmm0, (%rdi)
movss 0x1560(%r13), %xmm0
mulss 0xc(%rdi), %xmm0
movss %xmm0, 0xc(%rdi)
callq 0x42601
movq $0x0, (%rsp)
leaq -0x38(%rbp), %rdx
movq %r15, %rdi
movq %r12, %rsi
movss -0x2c(%rbp), %xmm0
movl %eax, %ecx
movq %rbx, %r8
movq %r14, %r9
movss -0x30(%rbp), %xmm1
callq 0x79640
cmpb $0x1, 0x3138(%r13)
jne 0x447ed
leaq -0x38(%rbp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x4458c
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::CalcTextSize(char const*, char const*, bool, float)
ImVec2 ImGui::CalcTextSize(const char* text, const char* text_end, bool hide_text_after_double_hash, float wrap_width)
{
    ImGuiContext& g = *GImGui;

    const char* text_display_end;
    if (hide_text_after_double_hash)
        text_display_end = FindRenderedTextEnd(text, text_end);      // Hide anything after a '##' string
    else
        text_display_end = text_end;

    ImFont* font = g.Font;
    const float font_size = g.FontSize;
    if (text == text_display_end)
        return ImVec2(0.0f, font_size);
    ImVec2 text_size = font->CalcTextSizeA(font_size, FLT_MAX, wrap_width, text, text_display_end, NULL);

    // Round
    text_size.x = IM_FLOOR(text_size.x + 0.95f);

    return text_size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movaps %xmm0, %xmm2
movq %rsi, %rax
movq %rdi, %rsi
movq 0xb7299(%rip), %rcx     # 0xfbcd0
testl %edx, %edx
je 0x44a6e
xorl %edx, %edx
cmpq $0x1, %rax
sbbq %rdx, %rdx
orq %rax, %rdx
cmpq %rsi, %rdx
jbe 0x44aad
movq %rsi, %rax
movzbl (%rax), %edi
cmpl $0x23, %edi
je 0x44a5d
testl %edi, %edi
jne 0x44a63
jmp 0x44a6e
cmpb $0x23, 0x1(%rax)
je 0x44a6e
incq %rax
cmpq %rdx, %rax
jne 0x44a4f
movq %rdx, %rax
movss 0x1980(%rcx), %xmm0
cmpq %rsi, %rax
je 0x44ab5
movq 0x1978(%rcx), %rdi
movss 0x70db6(%rip), %xmm1    # 0xb5840
movq %rax, %rdx
xorl %ecx, %ecx
callq 0x81a68
movss 0x70dc0(%rip), %xmm1    # 0xb585c
addss %xmm0, %xmm1
cvttps2dq %xmm1, %xmm1
cvtdq2ps %xmm1, %xmm1
movss %xmm1, %xmm0            # xmm0 = xmm1[0],xmm0[1,2,3]
jmp 0x44ac0
movss 0x1980(%rcx), %xmm0
movq %xmm0, %xmm0            # xmm0 = xmm0[0],zero
xorps %xmm1, %xmm1
shufps $0xe2, %xmm1, %xmm0     # xmm0 = xmm0[2,0],xmm1[2,3]
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::RenderTextClipped(ImVec2 const&, ImVec2 const&, char const*, char const*, ImVec2 const*, ImVec2 const&, ImRect const*)
void ImGui::RenderTextClipped(const ImVec2& pos_min, const ImVec2& pos_max, const char* text, const char* text_end, const ImVec2* text_size_if_known, const ImVec2& align, const ImRect* clip_rect)
{
    // Hide anything after a '##' string
    const char* text_display_end = FindRenderedTextEnd(text, text_end);
    const int text_len = (int)(text_display_end - text);
    if (text_len == 0)
        return;

    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = g.CurrentWindow;
    RenderTextClippedEx(window->DrawList, pos_min, pos_max, text, text_display_end, text_size_if_known, align, clip_rect);
    if (g.LogEnabled)
        LogRenderedText(&pos_min, text, text_display_end);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r9, %rax
movq %r8, %r9
movq %rdx, %rbx
movq %rsi, %rdx
movq %rdi, %r14
xorl %esi, %esi
cmpq $0x1, %rcx
sbbq %rsi, %rsi
orq %rcx, %rsi
movq %rbx, %r15
cmpq %rbx, %rsi
jbe 0x44b11
movzbl (%r15), %ecx
cmpl $0x23, %ecx
je 0x44aff
testl %ecx, %ecx
jne 0x44b06
jmp 0x44b11
cmpb $0x23, 0x1(%r15)
je 0x44b11
incq %r15
cmpq %rsi, %r15
jne 0x44af0
movq %rsi, %r15
cmpl %ebx, %r15d
je 0x44b63
movq 0xb71b3(%rip), %r12     # 0xfbcd0
movq 0x1ae0(%r12), %rcx
movq 0x2b8(%rcx), %rdi
movq %r14, %rsi
movq %rbx, %rcx
movq %r15, %r8
pushq 0x10(%rbp)
pushq %rax
callq 0x447fc
addq $0x10, %rsp
cmpb $0x1, 0x3138(%r12)
jne 0x44b63
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4458c
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::RenderFrame(ImVec2, ImVec2, unsigned int, bool, float)
void ImGui::RenderFrame(ImVec2 p_min, ImVec2 p_max, ImU32 fill_col, bool border, float rounding)
{
    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = g.CurrentWindow;
    window->DrawList->AddRectFilled(p_min, p_max, fill_col, rounding);
    const float border_size = g.Style.FrameBorderSize;
    if (border && border_size > 0.0f)
    {
        window->DrawList->AddRect(p_min + ImVec2(1, 1), p_max + ImVec2(1, 1), GetColorU32(ImGuiCol_BorderShadow), rounding, ImDrawCornerFlags_All, border_size);
        window->DrawList->AddRect(p_min, p_max, GetColorU32(ImGuiCol_Border), rounding, ImDrawCornerFlags_All, border_size);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %esi, %ebx
movl %edi, %ecx
leaq -0x40(%rbp), %rsi
movlps %xmm0, (%rsi)
leaq -0x38(%rbp), %rdx
movlps %xmm1, (%rdx)
movq 0xb6d3d(%rip), %r15     # 0xfbcd0
movq 0x1ae0(%r15), %r14
movq 0x2b8(%r14), %rdi
movss %xmm2, -0x30(%rbp)
movaps %xmm2, %xmm0
movl $0xf, %r8d
callq 0x785e6
testl %ebx, %ebx
je 0x450d1
movss 0x15a4(%r15), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm1
jbe 0x450d1
movq 0x2b8(%r14), %r15
movss 0x70004(%rip), %xmm0    # 0xb4fe4
leaq -0x40(%rbp), %rax
movss %xmm1, -0x2c(%rbp)
movss (%rax), %xmm1
addss %xmm0, %xmm1
movss 0x4(%rax), %xmm2
addss %xmm0, %xmm2
unpcklps %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
leaq -0x60(%rbp), %r13
leaq -0x38(%rbp), %rax
movss (%rax), %xmm2
addss %xmm0, %xmm2
addss 0x4(%rax), %xmm0
movlps %xmm1, (%r13)
unpcklps %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
leaq -0x58(%rbp), %rbx
movlps %xmm2, (%rbx)
movq 0xb6ca8(%rip), %rax     # 0xfbcd0
movups 0x1684(%rax), %xmm0
leaq -0x50(%rbp), %r12
movaps %xmm0, (%r12)
movss 0x1560(%rax), %xmm0
mulss 0xc(%r12), %xmm0
movss %xmm0, 0xc(%r12)
movq %r12, %rdi
callq 0x42601
movq %r15, %rdi
movq %r13, %rsi
movq %rbx, %rdx
movl %eax, %ecx
movss -0x30(%rbp), %xmm0
movl $0xf, %r8d
movss -0x2c(%rbp), %xmm1
callq 0x7851c
movq 0x2b8(%r14), %rbx
movq 0xb6c4c(%rip), %rax     # 0xfbcd0
movups 0x1674(%rax), %xmm0
movaps %xmm0, (%r12)
movss 0x1560(%rax), %xmm0
mulss 0xc(%r12), %xmm0
movss %xmm0, 0xc(%r12)
leaq -0x50(%rbp), %rdi
callq 0x42601
movq %rbx, %rdi
leaq -0x40(%rbp), %rsi
leaq -0x38(%rbp), %rdx
movl %eax, %ecx
movss -0x30(%rbp), %xmm0
movl $0xf, %r8d
movss -0x2c(%rbp), %xmm1
callq 0x7851c
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::RenderFrameBorder(ImVec2, ImVec2, float)
void ImGui::RenderFrameBorder(ImVec2 p_min, ImVec2 p_max, float rounding)
{
    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = g.CurrentWindow;
    const float border_size = g.Style.FrameBorderSize;
    if (border_size > 0.0f)
    {
        window->DrawList->AddRect(p_min + ImVec2(1, 1), p_max + ImVec2(1, 1), GetColorU32(ImGuiCol_BorderShadow), rounding, ImDrawCornerFlags_All, border_size);
        window->DrawList->AddRect(p_min, p_max, GetColorU32(ImGuiCol_Border), rounding, ImDrawCornerFlags_All, border_size);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movlps %xmm0, -0x40(%rbp)
movlps %xmm1, -0x38(%rbp)
movq 0xb6bd0(%rip), %rax     # 0xfbcd0
movss 0x15a4(%rax), %xmm4
xorps %xmm3, %xmm3
ucomiss %xmm3, %xmm4
jbe 0x4520c
movaps %xmm1, %xmm5
shufps $0x55, %xmm1, %xmm5     # xmm5 = xmm5[1,1],xmm1[1,1]
movss %xmm2, -0x30(%rbp)
movaps %xmm0, %xmm3
shufps $0x55, %xmm0, %xmm3     # xmm3 = xmm3[1,1],xmm0[1,1]
movq 0x1ae0(%rax), %r13
movq 0x2b8(%r13), %rbx
movss %xmm4, -0x2c(%rbp)
movss 0x6fea2(%rip), %xmm4    # 0xb4fe4
addss %xmm4, %xmm0
addss %xmm4, %xmm3
unpcklps %xmm3, %xmm0            # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
leaq -0x60(%rbp), %r15
movlps %xmm0, (%r15)
addss %xmm4, %xmm1
addss %xmm4, %xmm5
unpcklps %xmm5, %xmm1            # xmm1 = xmm1[0],xmm5[0],xmm1[1],xmm5[1]
leaq -0x58(%rbp), %r12
movlps %xmm1, (%r12)
movups 0x1684(%rax), %xmm0
leaq -0x50(%rbp), %r14
movaps %xmm0, (%r14)
movss 0x1560(%rax), %xmm0
mulss 0xc(%r14), %xmm0
movss %xmm0, 0xc(%r14)
movq %r14, %rdi
callq 0x42601
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
movl %eax, %ecx
movss -0x30(%rbp), %xmm0
movl $0xf, %r8d
movss -0x2c(%rbp), %xmm1
callq 0x7851c
movq 0x2b8(%r13), %rbx
movq 0xb6b0e(%rip), %rax     # 0xfbcd0
movups 0x1674(%rax), %xmm0
movaps %xmm0, (%r14)
movss 0x1560(%rax), %xmm0
mulss 0xc(%r14), %xmm0
movss %xmm0, 0xc(%r14)
leaq -0x50(%rbp), %rdi
callq 0x42601
leaq -0x40(%rbp), %rsi
leaq -0x38(%rbp), %rdx
movq %rbx, %rdi
movl %eax, %ecx
movss -0x30(%rbp), %xmm0
movl $0xf, %r8d
movss -0x2c(%rbp), %xmm1
callq 0x7851c
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGuiWindow::GetID(char const*, char const*)
ImGuiID ImGuiWindow::GetID(const char* str, const char* str_end)
{
    ImGuiID seed = IDStack.back();
    ImGuiID id = ImHashStr(str, str_end ? (str_end - str) : 0, seed);
    ImGui::KeepAliveID(id);
#ifdef IMGUI_ENABLE_TEST_ENGINE
    ImGuiContext& g = *GImGui;
    IMGUI_TEST_ENGINE_ID_INFO2(id, ImGuiDataType_String, str, str_end);
#endif
    return id;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq 0xc8(%rdi), %rax
testq %rax, %rax
jle 0x45765
movq 0xd0(%rdi), %rcx
movl -0x4(%rcx,%rax,4), %eax
movq %rdx, %rcx
subq %rsi, %rcx
testq %rdx, %rdx
cmoveq %rdx, %rcx
movq %rsi, %rdi
movq %rcx, %rsi
movl %eax, %edx
callq 0x42033
movq 0xb658a(%rip), %rcx     # 0xfbcd0
cmpl %eax, 0x1b30(%rcx)
jne 0x45754
movl %eax, 0x1b34(%rcx)
cmpl %eax, 0x1b70(%rcx)
jne 0x45763
movb $0x1, 0x1b74(%rcx)
popq %rbp
retq
leaq 0x8823e(%rip), %rdi     # 0xcd9aa
leaq 0x73f18(%rip), %rsi     # 0xb968b
leaq 0x7527e(%rip), %rcx     # 0xba9f8
movl $0x666, %edx            # imm = 0x666
callq 0xc140