LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::DataTypeCompare(int, void const*, void const*)
int ImGui::DataTypeCompare(ImGuiDataType data_type, const void* arg_1, const void* arg_2)
{
    switch (data_type)
    {
    case ImGuiDataType_S8:     return DataTypeCompareT<ImS8  >((const ImS8*  )arg_1, (const ImS8*  )arg_2);
    case ImGuiDataType_U8:     return DataTypeCompareT<ImU8  >((const ImU8*  )arg_1, (const ImU8*  )arg_2);
    case ImGuiDataType_S16:    return DataTypeCompareT<ImS16 >((const ImS16* )arg_1, (const ImS16* )arg_2);
    case ImGuiDataType_U16:    return DataTypeCompareT<ImU16 >((const ImU16* )arg_1, (const ImU16* )arg_2);
    case ImGuiDataType_S32:    return DataTypeCompareT<ImS32 >((const ImS32* )arg_1, (const ImS32* )arg_2);
    case ImGuiDataType_U32:    return DataTypeCompareT<ImU32 >((const ImU32* )arg_1, (const ImU32* )arg_2);
    case ImGuiDataType_S64:    return DataTypeCompareT<ImS64 >((const ImS64* )arg_1, (const ImS64* )arg_2);
    case ImGuiDataType_U64:    return DataTypeCompareT<ImU64 >((const ImU64* )arg_1, (const ImU64* )arg_2);
    case ImGuiDataType_Float:  return DataTypeCompareT<float >((const float* )arg_1, (const float* )arg_2);
    case ImGuiDataType_Double: return DataTypeCompareT<double>((const double*)arg_1, (const double*)arg_2);
    case ImGuiDataType_COUNT:  break;
    }
    IM_ASSERT(0);
    return 0;
}

// Assembly:
cmpl $0x9, %edi
ja 0x972bc
movl %edi, %eax
leaq 0x3bd75(%rip), %rcx     # 0xd2fb0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb (%rsi), %al
cmpb (%rdx), %al
jmp 0x97295
movl (%rsi), %eax
cmpl (%rdx), %eax
jmp 0x97295
movsd (%rsi), %xmm0
movsd (%rdx), %xmm1
ucomisd %xmm0, %xmm1
seta %al
ucomisd %xmm1, %xmm0
jmp 0x9728a
movzwl (%rsi), %eax
cmpw (%rdx), %ax
jmp 0x97295
movzwl (%rsi), %eax
cmpw (%rdx), %ax
jmp 0x97287
movq (%rsi), %rax
cmpq (%rdx), %rax
jmp 0x97287
movb (%rsi), %al
cmpb (%rdx), %al
jmp 0x97287
movl (%rsi), %eax
cmpl (%rdx), %eax
setb %al
seta %cl
jmp 0x9729b
movq (%rsi), %rax
cmpq (%rdx), %rax
setl %al
setg %cl
movzbl %cl, %ecx
testb %al, %al
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmovel %ecx, %eax
retq
movss (%rsi), %xmm0
movss (%rdx), %xmm1
ucomiss %xmm0, %xmm1
seta %al
ucomiss %xmm1, %xmm0
jmp 0x9728a
pushq %rbp
movq %rsp, %rbp
leaq 0x22e25(%rip), %rdi     # 0xba0ec
leaq 0x3be7a(%rip), %rsi     # 0xd3148
leaq 0x3c4d3(%rip), %rcx     # 0xd37a8
movl $0x7d7, %edx            # imm = 0x7D7
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: PatchFormatStringFloatToInt(char const*)
static const char* PatchFormatStringFloatToInt(const char* fmt)
{
    if (fmt[0] == '%' && fmt[1] == '.' && fmt[2] == '0' && fmt[3] == 'f' && fmt[4] == 0) // Fast legacy path for "%.0f" which is expected to be the most common case.
        return "%d";
    const char* fmt_start = ImParseFormatFindStart(fmt);    // Find % (if any, and ignore %%)
    const char* fmt_end = ImParseFormatFindEnd(fmt_start);  // Find end of format specifier, which itself is an exercise of confidence/recklessness (because snprintf is dependent on libc or user).
    if (fmt_end > fmt_start && fmt_end[-1] == 'f')
    {
#ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS
        if (fmt_start == fmt && fmt_end[0] == 0)
            return "%d";
        ImGuiContext& g = *GImGui;
        ImFormatString(g.TempBuffer, IM_ARRAYSIZE(g.TempBuffer), "%.*s%%d%s", (int)(fmt_start - fmt), fmt, fmt_end); // Honor leading and trailing decorations, but lose alignment/precision.
        return g.TempBuffer;
#else
        IM_ASSERT(0 && "DragInt(): Invalid format string!"); // Old versions used a default parameter of "%.0f", please replace with e.g. "%d"
#endif
    }
    return fmt;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x25, (%rdi)
jne 0x97e1b
cmpb $0x2e, 0x1(%rbx)
jne 0x97e1b
cmpb $0x30, 0x2(%rbx)
jne 0x97e1b
cmpb $0x66, 0x3(%rbx)
jne 0x97e1b
cmpb $0x0, 0x4(%rbx)
je 0x97eb2
movq %rbx, %r14
movb (%r14), %dl
testb %dl, %dl
je 0x97e48
cmpb $0x25, %dl
jne 0x97e36
movl $0x1, %ecx
cmpb $0x25, 0x1(%r14)
jne 0x97e4f
xorl %ecx, %ecx
cmpb $0x25, %dl
sete %cl
addq %rcx, %r14
incq %r14
xorl %ecx, %ecx
jmp 0x97e52
movl $0x3, %ecx
jmp 0x97e52
movq %r14, %rax
testl %ecx, %ecx
je 0x97e1e
cmpl $0x1, %ecx
jne 0x97e5e
movq %rax, %r14
movq %r14, %rdi
callq 0x9984f
cmpq %r14, %rax
jbe 0x97eb9
cmpb $0x66, -0x1(%rax)
jne 0x97eb9
cmpq %rbx, %r14
jne 0x97e7b
cmpb $0x0, (%rax)
je 0x97eb2
leaq 0x65e4e(%rip), %rcx     # 0xfdcd0
movl $0x3378, %r15d          # imm = 0x3378
addq (%rcx), %r15
subl %ebx, %r14d
leaq 0x3d202(%rip), %rdx     # 0xd5097
movl $0xc01, %esi            # imm = 0xC01
movq %r15, %rdi
movl %r14d, %ecx
movq %rbx, %r8
movq %rax, %r9
xorl %eax, %eax
callq 0x427cb
movq %r15, %rbx
jmp 0x97eb9
leaq 0x265c9(%rip), %rbx     # 0xbe482
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::DragScalarN(char const*, int, void*, int, float, void const*, void const*, char const*, int)
bool ImGui::DragScalarN(const char* label, ImGuiDataType data_type, void* p_data, int components, float v_speed, const void* p_min, const void* p_max, const char* format, ImGuiSliderFlags flags)
{
    ImGuiWindow* window = GetCurrentWindow();
    if (window->SkipItems)
        return false;

    ImGuiContext& g = *GImGui;
    bool value_changed = false;
    BeginGroup();
    PushID(label);
    PushMultiItemsWidths(components, CalcItemWidth());
    size_t type_size = GDataTypeInfo[data_type].Size;
    for (int i = 0; i < components; i++)
    {
        PushID(i);
        if (i > 0)
            SameLine(0, g.Style.ItemInnerSpacing.x);
        value_changed |= DragScalar("", data_type, p_data, v_speed, p_min, p_max, format, flags);
        PopID();
        PopItemWidth();
        p_data = (void*)((char*)p_data + type_size);
    }
    PopID();

    const char* label_end = FindRenderedTextEnd(label);
    if (label != label_end)
    {
        SameLine(0, g.Style.ItemInnerSpacing.x);
        TextEx(label, label_end);
    }

    EndGroup();
    return value_changed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, -0x50(%rbp)
movq %r8, -0x48(%rbp)
movss %xmm0, -0x30(%rbp)
movl %esi, -0x2c(%rbp)
leaq 0x65c62(%rip), %rax     # 0xfdcd0
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq 0x1ae0(%rax), %rax
movb $0x1, 0x90(%rax)
cmpb $0x0, 0x93(%rax)
je 0x98094
xorl %r15d, %r15d
jmp 0x98181
movl %ecx, %r13d
movq %rdx, %rbx
movq %rdi, %r14
callq 0x5752d
movq %r14, -0x40(%rbp)
movq %r14, %rdi
callq 0x55c36
callq 0x57252
movl %r13d, %edi
callq 0x56ef3
xorl %r12d, %r12d
testl %r13d, %r13d
jle 0x9813d
movslq -0x2c(%rbp), %rax
shlq $0x5, %rax
leaq 0x6093e(%rip), %rcx     # 0xf8a10
movq (%rax,%rcx), %r14
xorl %r15d, %r15d
movl %r12d, %edi
callq 0x55f53
testl %r12d, %r12d
je 0x980fa
movq -0x38(%rbp), %rax
movss 0x15b0(%rax), %xmm1
xorps %xmm0, %xmm0
callq 0x569e1
movl 0x18(%rbp), %eax
movl %eax, (%rsp)
leaq 0x1ee16(%rip), %rdi     # 0xb6f1d
movl -0x2c(%rbp), %esi
movq %rbx, %rdx
movss -0x30(%rbp), %xmm0
movq -0x48(%rbp), %rcx
movq -0x50(%rbp), %r8
movq 0x10(%rbp), %r9
callq 0x978bf
orb %al, %r15b
callq 0x56188
callq 0x571b8
addq %r14, %rbx
incl %r12d
cmpl %r12d, %r13d
jne 0x980d9
jmp 0x98140
xorl %r15d, %r15d
callq 0x56188
movq -0x40(%rbp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x44e8b
cmpq %r14, %rax
je 0x9817c
movq %rax, %rbx
movq -0x38(%rbp), %rax
movss 0x15b0(%rax), %xmm1
xorps %xmm0, %xmm0
callq 0x569e1
movq %r14, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x91b8c
callq 0x56723
andb $0x1, %r15b
movl %r15d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::DragScalar(char const*, int, void*, float, void const*, void const*, char const*, float)
bool ImGui::DragScalar(const char* label, ImGuiDataType data_type, void* p_data, float v_speed, const void* p_min, const void* p_max, const char* format, float power)
{
    ImGuiSliderFlags drag_flags = ImGuiSliderFlags_None;
    if (power != 1.0f)
    {
        IM_ASSERT(power == 1.0f && "Call function with ImGuiSliderFlags_Logarithmic flags instead of using the old 'float power' function!");
        IM_ASSERT(p_min != NULL && p_max != NULL);  // When using a power curve the drag needs to have known bounds
        drag_flags |= ImGuiSliderFlags_Logarithmic;   // Fallback for non-asserting paths
    }
    return DragScalar(label, data_type, p_data, v_speed, p_min, p_max, format, drag_flags);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
ucomiss 0x1e906(%rip), %xmm1    # 0xb6fe4
jne 0x986e2
jnp 0x98714
jne 0x98724
jp 0x98724
testq %rcx, %rcx
je 0x986f5
movl $0x20, %eax
testq %r8, %r8
jne 0x98716
leaq 0x3b394(%rip), %rdi     # 0xd3a90
leaq 0x3aa45(%rip), %rsi     # 0xd3148
leaq 0x3b312(%rip), %rcx     # 0xd3a1c
movl $0x9b8, %edx            # imm = 0x9B8
callq 0xc140
xorl %eax, %eax
movl %eax, (%rsp)
callq 0x978bf
addq $0x10, %rsp
popq %rbp
retq
leaq 0x3b277(%rip), %rdi     # 0xd39a2
leaq 0x3aa16(%rip), %rsi     # 0xd3148
leaq 0x3b2e3(%rip), %rcx     # 0xd3a1c
movl $0x9b7, %edx            # imm = 0x9B7
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::DragScalarN(char const*, int, void*, int, float, void const*, void const*, char const*, float)
bool ImGui::DragScalarN(const char* label, ImGuiDataType data_type, void* p_data, int components, float v_speed, const void* p_min, const void* p_max, const char* format, float power)
{
    ImGuiSliderFlags drag_flags = ImGuiSliderFlags_None;
    if (power != 1.0f)
    {
        IM_ASSERT(power == 1.0f && "Call function with ImGuiSliderFlags_Logarithmic flags instead of using the old 'float power' function!");
        IM_ASSERT(p_min != NULL && p_max != NULL);  // When using a power curve the drag needs to have known bounds
        drag_flags |= ImGuiSliderFlags_Logarithmic;   // Fallback for non-asserting paths
    }
    return DragScalarN(label, data_type, p_data, components, v_speed, p_min, p_max, format, drag_flags);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
ucomiss 0x1e896(%rip), %xmm1    # 0xb6fe4
jne 0x98752
jnp 0x98784
jne 0x98795
jp 0x98795
testq %r8, %r8
je 0x98765
movl $0x20, %eax
testq %r9, %r9
jne 0x98786
leaq 0x3b324(%rip), %rdi     # 0xd3a90
leaq 0x3a9d5(%rip), %rsi     # 0xd3148
leaq 0x3b339(%rip), %rcx     # 0xd3ab3
movl $0x9c4, %edx            # imm = 0x9C4
callq 0xc140
xorl %eax, %eax
pushq %rax
pushq 0x10(%rbp)
callq 0x98046
addq $0x10, %rsp
popq %rbp
retq
leaq 0x3b206(%rip), %rdi     # 0xd39a2
leaq 0x3a9a5(%rip), %rsi     # 0xd3148
leaq 0x3b309(%rip), %rcx     # 0xd3ab3
movl $0x9c3, %edx            # imm = 0x9C3
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::SliderScalarN(char const*, int, void*, int, void const*, void const*, char const*, int)
bool ImGui::SliderScalarN(const char* label, ImGuiDataType data_type, void* v, int components, const void* v_min, const void* v_max, const char* format, ImGuiSliderFlags flags)
{
    ImGuiWindow* window = GetCurrentWindow();
    if (window->SkipItems)
        return false;

    ImGuiContext& g = *GImGui;
    bool value_changed = false;
    BeginGroup();
    PushID(label);
    PushMultiItemsWidths(components, CalcItemWidth());
    size_t type_size = GDataTypeInfo[data_type].Size;
    for (int i = 0; i < components; i++)
    {
        PushID(i);
        if (i > 0)
            SameLine(0, g.Style.ItemInnerSpacing.x);
        value_changed |= SliderScalar("", data_type, v, v_min, v_max, format, flags);
        PopID();
        PopItemWidth();
        v = (void*)((char*)v + type_size);
    }
    PopID();

    const char* label_end = FindRenderedTextEnd(label);
    if (label != label_end)
    {
        SameLine(0, g.Style.ItemInnerSpacing.x);
        TextEx(label, label_end);
    }

    EndGroup();
    return value_changed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, -0x50(%rbp)
movq %r8, -0x48(%rbp)
movl %esi, -0x2c(%rbp)
leaq 0x64ce0(%rip), %rax     # 0xfdcd0
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq 0x1ae0(%rax), %rax
movb $0x1, 0x90(%rax)
cmpb $0x0, 0x93(%rax)
je 0x99016
xorl %r14d, %r14d
jmp 0x990fe
movl %ecx, %r13d
movq %rdx, %rbx
movq %rdi, %r14
callq 0x5752d
movq %r14, -0x40(%rbp)
movq %r14, %rdi
callq 0x55c36
callq 0x57252
movl %r13d, %edi
callq 0x56ef3
xorl %r12d, %r12d
testl %r13d, %r13d
jle 0x990ba
movslq -0x2c(%rbp), %rax
shlq $0x5, %rax
leaq 0x5f9bc(%rip), %rcx     # 0xf8a10
movq (%rax,%rcx), %r15
xorl %r14d, %r14d
movl %r12d, %edi
callq 0x55f53
testl %r12d, %r12d
je 0x9907c
movq -0x38(%rbp), %rax
movss 0x15b0(%rax), %xmm1
xorps %xmm0, %xmm0
callq 0x569e1
movl 0x18(%rbp), %eax
movl %eax, (%rsp)
leaq 0x1de94(%rip), %rdi     # 0xb6f1d
movl -0x2c(%rbp), %esi
movq %rbx, %rdx
movq -0x48(%rbp), %rcx
movq -0x50(%rbp), %r8
movq 0x10(%rbp), %r9
callq 0x98b4d
orb %al, %r14b
callq 0x56188
callq 0x571b8
addq %r15, %rbx
incl %r12d
cmpl %r12d, %r13d
jne 0x9905b
jmp 0x990bd
xorl %r14d, %r14d
callq 0x56188
movq -0x40(%rbp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x44e8b
cmpq %r15, %rax
je 0x990f9
movq %rax, %rbx
movq -0x38(%rbp), %rax
movss 0x15b0(%rax), %xmm1
xorps %xmm0, %xmm0
callq 0x569e1
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x91b8c
callq 0x56723
andb $0x1, %r14b
movl %r14d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::SliderAngle(char const*, float*, float, float, char const*, int)
bool ImGui::SliderAngle(const char* label, float* v_rad, float v_degrees_min, float v_degrees_max, const char* format, ImGuiSliderFlags flags)
{
    if (format == NULL)
        format = "%.0f deg";
    float v_deg = (*v_rad) * 360.0f / (2 * IM_PI);
    bool value_changed = SliderFloat(label, &v_deg, v_degrees_min, v_degrees_max, format, flags);
    *v_rad = v_deg * (2 * IM_PI) / 360.0f;
    return value_changed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
testq %rdx, %rdx
leaq 0x263f0(%rip), %r9      # 0xbf5ff
cmovneq %rdx, %r9
movss (%rsi), %xmm2
mulss 0x23d09(%rip), %xmm2    # 0xbcf28
divss 0x2f75d(%rip), %xmm2    # 0xc8984
leaq -0x14(%rbp), %r14
movss %xmm2, (%r14)
leaq -0x1c(%rbp), %rax
movss %xmm0, (%rax)
leaq -0x18(%rbp), %r8
movss %xmm1, (%r8)
movl %ecx, (%rsp)
movl $0x8, %esi
movq %r14, %rdx
movq %rax, %rcx
callq 0x98b4d
movss 0x2f728(%rip), %xmm0    # 0xc8984
mulss (%r14), %xmm0
divss 0x23cbf(%rip), %xmm0    # 0xbcf28
movss %xmm0, (%rbx)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImParseFormatFindStart(char const*)
const char* ImParseFormatFindStart(const char* fmt)
{
    while (char c = fmt[0])
    {
        if (c == '%' && fmt[1] != '%')
            return fmt;
        else if (c == '%')
            fmt++;
        fmt++;
    }
    return fmt;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
movb (%rax), %sil
testb %sil, %sil
je 0x99837
cmpb $0x25, %sil
jne 0x99824
movl $0x1, %edx
cmpb $0x25, 0x1(%rax)
jne 0x9983e
xorl %edx, %edx
cmpb $0x25, %sil
sete %dl
addq %rdx, %rax
incq %rax
xorl %edx, %edx
jmp 0x99841
movl $0x3, %edx
jmp 0x99841
movq %rax, %rcx
testl %edx, %edx
je 0x9980b
cmpl $0x1, %edx
jne 0x9984d
movq %rcx, %rax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImParseFormatFindEnd(char const*)
const char* ImParseFormatFindEnd(const char* fmt)
{
    // Printf/scanf types modifiers: I/L/h/j/l/t/w/z. Other uppercase letters qualify as types aka end of the format.
    if (fmt[0] != '%')
        return fmt;
    const unsigned int ignored_uppercase_mask = (1 << ('I'-'A')) | (1 << ('L'-'A'));
    const unsigned int ignored_lowercase_mask = (1 << ('h'-'a')) | (1 << ('j'-'a')) | (1 << ('l'-'a')) | (1 << ('t'-'a')) | (1 << ('w'-'a')) | (1 << ('z'-'a'));
    for (char c; (c = *fmt) != 0; fmt++)
    {
        if (c >= 'A' && c <= 'Z' && ((1 << (c - 'A')) & ignored_uppercase_mask) == 0)
            return fmt + 1;
        if (c >= 'a' && c <= 'z' && ((1 << (c - 'a')) & ignored_lowercase_mask) == 0)
            return fmt + 1;
    }
    return fmt;
}

// Assembly:
movq %rdi, %rax
cmpb $0x25, (%rdi)
jne 0x998a3
movb (%rax), %cl
testb %cl, %cl
je 0x998a3
pushq %rbp
movq %rsp, %rbp
incq %rax
movl $0x900, %edx            # imm = 0x900
movl $0x2480a80, %esi        # imm = 0x2480A80
leal -0x41(%rcx), %edi
cmpb $0x19, %dil
ja 0x99883
leal -0x1(%rcx), %edi
movzbl %dil, %edi
btl %edi, %edx
jae 0x998a2
leal -0x61(%rcx), %edi
cmpb $0x19, %dil
ja 0x99896
decb %cl
movzbl %cl, %ecx
btl %ecx, %esi
jae 0x998a2
movb (%rax), %cl
incq %rax
testb %cl, %cl
jne 0x9986e
decq %rax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImParseFormatTrimDecorations(char const*, char*, unsigned long)
const char* ImParseFormatTrimDecorations(const char* fmt, char* buf, size_t buf_size)
{
    const char* fmt_start = ImParseFormatFindStart(fmt);
    if (fmt_start[0] != '%')
        return fmt;
    const char* fmt_end = ImParseFormatFindEnd(fmt_start);
    if (fmt_end[0] == 0) // If we only have leading decoration, we don't need to copy the data.
        return fmt_start;
    ImStrncpy(buf, fmt_start, ImMin((size_t)(fmt_end - fmt_start) + 1, buf_size));
    return buf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %rax
movq %rdi, %r15
movb (%r15), %sil
testb %sil, %sil
je 0x998e7
cmpb $0x25, %sil
jne 0x998d4
movl $0x1, %edx
cmpb $0x25, 0x1(%r15)
jne 0x998ee
xorl %edx, %edx
cmpb $0x25, %sil
sete %dl
addq %rdx, %r15
incq %r15
xorl %edx, %edx
jmp 0x998f1
movl $0x3, %edx
jmp 0x998f1
movq %r15, %rcx
testl %edx, %edx
je 0x998ba
cmpl $0x1, %edx
jne 0x998fd
movq %rcx, %r15
cmpb $0x25, (%r15)
jne 0x99933
movq %r15, %rdi
callq 0x9984f
cmpb $0x0, (%rax)
je 0x99930
subq %r15, %rax
incq %rax
cmpq %r14, %rax
cmovaeq %r14, %rax
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x42483
movq %rbx, %rax
jmp 0x99933
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImParseFormatPrecision(char const*, int)
int ImParseFormatPrecision(const char* fmt, int default_precision)
{
    fmt = ImParseFormatFindStart(fmt);
    if (fmt[0] != '%')
        return default_precision;
    fmt++;
    while (*fmt >= '0' && *fmt <= '9')
        fmt++;
    int precision = INT_MAX;
    if (*fmt == '.')
    {
        fmt = ImAtoi<int>(fmt + 1, &precision);
        if (precision < 0 || precision > 99)
            precision = default_precision;
    }
    if (*fmt == 'e' || *fmt == 'E') // Maximum precision with scientific notation
        precision = -1;
    if ((*fmt == 'g' || *fmt == 'G') && precision == INT_MAX)
        precision = -1;
    return (precision == INT_MAX) ? default_precision : precision;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebx
movb (%rdi), %dl
testb %dl, %dl
je 0x99973
cmpb $0x25, %dl
jne 0x99961
movl $0x1, %ecx
cmpb $0x25, 0x1(%rdi)
jne 0x9997a
xorl %ecx, %ecx
cmpb $0x25, %dl
sete %cl
addq %rcx, %rdi
incq %rdi
xorl %ecx, %ecx
jmp 0x9997d
movl $0x3, %ecx
jmp 0x9997d
movq %rdi, %rax
testl %ecx, %ecx
je 0x9994b
cmpl $0x1, %ecx
jne 0x99989
movq %rax, %rdi
cmpb $0x25, (%rdi)
jne 0x99a00
incq %rdi
movb (%rdi), %al
addb $-0x30, %al
incq %rdi
cmpb $0xa, %al
jb 0x99991
movl $0x7fffffff, -0x14(%rbp) # imm = 0x7FFFFFFF
cmpb $0x2e, -0x1(%rdi)
jne 0x999c6
leaq -0x14(%rbp), %r14
movq %r14, %rsi
callq 0x99a0b
movq %rax, %rdi
movl (%r14), %eax
cmpl $0x64, %eax
cmovael %ebx, %eax
movl %eax, (%r14)
jmp 0x999c9
decq %rdi
movzbl (%rdi), %eax
orl $0x20, %eax
cmpl $0x65, %eax
jne 0x999db
movl $0xffffffff, -0x14(%rbp) # imm = 0xFFFFFFFF
movb (%rdi), %al
cmpb $0x67, %al
je 0x999e5
cmpb $0x47, %al
jne 0x999f5
cmpl $0x7fffffff, -0x14(%rbp) # imm = 0x7FFFFFFF
jne 0x999f5
movl $0xffffffff, -0x14(%rbp) # imm = 0xFFFFFFFF
movl -0x14(%rbp), %eax
cmpl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmovnel %eax, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: char const* ImAtoi<int>(char const*, int*)
static const char* ImAtoi(const char* src, TYPE* output)
{
    int negative = 0;
    if (*src == '-') { negative = 1; src++; }
    if (*src == '+') { src++; }
    TYPE v = 0;
    while (*src >= '0' && *src <= '9')
        v = (v * 10) + (*src++ - '0');
    *output = negative ? -v : v;
    return src;
}

// Assembly:
movb (%rdi), %cl
xorl %eax, %eax
cmpb $0x2d, %cl
sete %al
leaq (%rdi,%rax), %rdx
xorl %r8d, %r8d
cmpb $0x2b, (%rdi,%rax)
sete %r8b
leaq (%rdx,%r8), %rax
movb (%r8,%rdx), %dil
leal -0x30(%rdi), %r8d
xorl %edx, %edx
cmpb $0x9, %r8b
ja 0x99a5e
pushq %rbp
movq %rsp, %rbp
xorl %edx, %edx
leal (%rdx,%rdx,4), %edx
addb $-0x30, %dil
movzbl %dil, %edi
leal (%rdi,%rdx,2), %edx
movb 0x1(%rax), %dil
incq %rax
leal -0x30(%rdi), %r8d
cmpb $0xa, %r8b
jb 0x99a3e
popq %rbp
movl %edx, %edi
negl %edi
cmpb $0x2d, %cl
cmovnel %edx, %edi
movl %edi, (%rsi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::TempInputText(ImRect const&, unsigned int, char const*, char*, int, int)
bool ImGui::TempInputText(const ImRect& bb, ImGuiID id, const char* label, char* buf, int buf_size, ImGuiInputTextFlags flags)
{
    // On the first frame, g.TempInputTextId == 0, then on subsequent frames it becomes == id.
    // We clear ActiveID on the first frame to allow the InputText() taking it back.
    ImGuiContext& g = *GImGui;
    const bool init = (g.TempInputId != id);
    if (init)
        ClearActiveID();

    g.CurrentWindow->DC.CursorPos = bb.Min;
    bool value_changed = InputTextEx(label, NULL, buf, buf_size, bb.GetSize(), flags);
    if (init)
    {
        // First frame we started displaying the InputText widget, we expect it to take the active id.
        IM_ASSERT(g.ActiveId == id);
        g.TempInputId = g.ActiveId;
    }
    return value_changed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r8d, %r13d
movq %rdx, %r11
movl %esi, %ebx
movq %rdi, %r14
leaq 0x64242(%rip), %rax     # 0xfdcd0
movq (%rax), %r15
movl 0x3068(%r15), %r12d
cmpl %esi, %r12d
je 0x99aba
movl %r9d, -0x2c(%rbp)
movq %rcx, -0x40(%rbp)
movq %r11, -0x38(%rbp)
callq 0x46c46
movq -0x38(%rbp), %r11
movq -0x40(%rbp), %rcx
movl -0x2c(%rbp), %r9d
movq 0x1ae0(%r15), %rax
movq (%r14), %rdx
movq %rdx, 0xd8(%rax)
movss 0x8(%r14), %xmm0
movss 0xc(%r14), %xmm1
subss (%r14), %xmm0
subss 0x4(%r14), %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
leaq -0x48(%rbp), %r8
movlps %xmm0, (%r8)
xorps %xmm0, %xmm0
movups %xmm0, (%rsp)
movq %r11, %rdi
xorl %esi, %esi
movq %rcx, %rdx
movl %r13d, %ecx
callq 0x99b49
cmpl %ebx, %r12d
je 0x99b1b
movl 0x1b30(%r15), %ecx
cmpl %ebx, %ecx
jne 0x99b2a
movl %ecx, 0x3068(%r15)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3a416(%rip), %rdi     # 0xd3f47
leaq 0x39610(%rip), %rsi     # 0xd3148
leaq 0x3a419(%rip), %rcx     # 0xd3f58
movl $0xca9, %edx            # imm = 0xCA9
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::InputScalarN(char const*, int, void*, int, void const*, void const*, char const*, int)
bool ImGui::InputScalarN(const char* label, ImGuiDataType data_type, void* p_data, int components, const void* p_step, const void* p_step_fast, const char* format, ImGuiInputTextFlags flags)
{
    ImGuiWindow* window = GetCurrentWindow();
    if (window->SkipItems)
        return false;

    ImGuiContext& g = *GImGui;
    bool value_changed = false;
    BeginGroup();
    PushID(label);
    PushMultiItemsWidths(components, CalcItemWidth());
    size_t type_size = GDataTypeInfo[data_type].Size;
    for (int i = 0; i < components; i++)
    {
        PushID(i);
        if (i > 0)
            SameLine(0, g.Style.ItemInnerSpacing.x);
        value_changed |= InputScalar("", data_type, p_data, p_step, p_step_fast, format, flags);
        PopID();
        PopItemWidth();
        p_data = (void*)((char*)p_data + type_size);
    }
    PopID();

    const char* label_end = FindRenderedTextEnd(label);
    if (label != label_end)
    {
        SameLine(0.0f, g.Style.ItemInnerSpacing.x);
        TextEx(label, label_end);
    }

    EndGroup();
    return value_changed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, -0x50(%rbp)
movq %r8, -0x48(%rbp)
movl %esi, -0x2c(%rbp)
leaq 0x60e80(%rip), %rax     # 0xfdcd0
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq 0x1ae0(%rax), %rax
movb $0x1, 0x90(%rax)
cmpb $0x0, 0x93(%rax)
je 0x9ce76
xorl %r14d, %r14d
jmp 0x9cf5e
movl %ecx, %r13d
movq %rdx, %rbx
movq %rdi, %r14
callq 0x5752d
movq %r14, -0x40(%rbp)
movq %r14, %rdi
callq 0x55c36
callq 0x57252
movl %r13d, %edi
callq 0x56ef3
xorl %r12d, %r12d
testl %r13d, %r13d
jle 0x9cf1a
movslq -0x2c(%rbp), %rax
shlq $0x5, %rax
leaq 0x5bb5c(%rip), %rcx     # 0xf8a10
movq (%rax,%rcx), %r15
xorl %r14d, %r14d
movl %r12d, %edi
callq 0x55f53
testl %r12d, %r12d
je 0x9cedc
movq -0x38(%rbp), %rax
movss 0x15b0(%rax), %xmm1
xorps %xmm0, %xmm0
callq 0x569e1
movl 0x18(%rbp), %eax
movl %eax, (%rsp)
leaq 0x1a034(%rip), %rdi     # 0xb6f1d
movl -0x2c(%rbp), %esi
movq %rbx, %rdx
movq -0x48(%rbp), %rcx
movq -0x50(%rbp), %r8
movq 0x10(%rbp), %r9
callq 0x9cabf
orb %al, %r14b
callq 0x56188
callq 0x571b8
addq %r15, %rbx
incl %r12d
cmpl %r12d, %r13d
jne 0x9cebb
jmp 0x9cf1d
xorl %r14d, %r14d
callq 0x56188
movq -0x40(%rbp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x44e8b
cmpq %r15, %rax
je 0x9cf59
movq %rax, %rbx
movq -0x38(%rbp), %rax
movss 0x15b0(%rax), %xmm1
xorps %xmm0, %xmm0
callq 0x569e1
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x91b8c
callq 0x56723
andb $0x1, %r14b
movl %r14d, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGuiInputTextCallbackData::DeleteChars(int, int)
void ImGuiInputTextCallbackData::DeleteChars(int pos, int bytes_count)
{
    IM_ASSERT(pos + bytes_count <= BufTextLen);
    char* dst = Buf + pos;
    const char* src = Buf + pos + bytes_count;
    while (char c = *src++)
        *dst++ = c;
    *dst = '\0';

    if (CursorPos >= pos + bytes_count)
        CursorPos -= bytes_count;
    else if (CursorPos >= pos)
        CursorPos = pos;
    SelectionStart = SelectionEnd = CursorPos;
    BufDirty = true;
    BufTextLen -= bytes_count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leal (%rdx,%rsi), %eax
cmpl 0x20(%rdi), %eax
jg 0x9e0c2
movslq %esi, %rcx
addq 0x18(%rdi), %rcx
movslq %edx, %r8
addq %rcx, %r8
movb (%r8), %r9b
testb %r9b, %r9b
je 0x9e091
movb %r9b, (%rcx)
incq %rcx
incq %r8
testb %r9b, %r9b
jne 0x9e083
movb $0x0, (%rcx)
movl 0x2c(%rdi), %ecx
cmpl %eax, %ecx
jge 0x9e0a9
cmpl %esi, %ecx
jge 0x9e0ad
jmp 0x9e0b0
subl %edx, %ecx
movl %ecx, %esi
movl %esi, 0x2c(%rdi)
movl 0x2c(%rdi), %eax
movl %eax, 0x34(%rdi)
movl %eax, 0x30(%rdi)
movb $0x1, 0x28(%rdi)
subl %edx, 0x20(%rdi)
popq %rbp
retq
leaq 0x36003(%rip), %rdi     # 0xd40cc
leaq 0x35078(%rip), %rsi     # 0xd3148
leaq 0x36015(%rip), %rcx     # 0xd40ec
movl $0xe56, %edx            # imm = 0xE56
callq 0xc140
nop
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imstb_textedit.h
// Function: ImStb::stb_textedit_click(ImGuiInputTextState*, ImStb::STB_TexteditState*, float, float)
static void stb_textedit_click(STB_TEXTEDIT_STRING *str, STB_TexteditState *state, float x, float y)
{
   // In single-line mode, just always make y = 0. This lets the drag keep working if the mouse
   // goes off the top or bottom of the text
   if( state->single_line )
   {
      StbTexteditRow r;
      STB_TEXTEDIT_LAYOUTROW(&r, str, 0);
      y = r.ymin;
   }

   state->cursor = stb_text_locate_coord(str, x, y);
   state->select_start = state->cursor;
   state->select_end = state->cursor;
   state->has_preferred_x = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x0, 0x17(%rsi)
je 0x9e301
movq 0x18(%r14), %rdi
leaq -0x20(%rbp), %rdx
movq $0x0, (%rdx)
movslq 0x4(%r14), %rax
leaq (%rdi,%rax,2), %rsi
movl $0x1, %ecx
movss %xmm0, -0x14(%rbp)
callq 0x9e5cc
movss -0x14(%rbp), %xmm0
xorps %xmm1, %xmm1
movq %r14, %rdi
callq 0xa8b5d
movl %eax, (%rbx)
movl %eax, 0x4(%rbx)
movl %eax, 0x8(%rbx)
movb $0x0, 0x16(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imstb_textedit.h
// Function: ImStb::stb_textedit_drag(ImGuiInputTextState*, ImStb::STB_TexteditState*, float, float)
static void stb_textedit_drag(STB_TEXTEDIT_STRING *str, STB_TexteditState *state, float x, float y)
{
   int p = 0;

   // In single-line mode, just always make y = 0. This lets the drag keep working if the mouse
   // goes off the top or bottom of the text
   if( state->single_line )
   {
      StbTexteditRow r;
      STB_TEXTEDIT_LAYOUTROW(&r, str, 0);
      y = r.ymin;
   }

   if (state->select_start == state->select_end)
      state->select_start = state->cursor;

   p = stb_text_locate_coord(str, x, y);
   state->cursor = state->select_end = p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x0, 0x17(%rsi)
je 0x9e363
movq 0x18(%r14), %rdi
leaq -0x20(%rbp), %rdx
movq $0x0, (%rdx)
movslq 0x4(%r14), %rax
leaq (%rdi,%rax,2), %rsi
movl $0x1, %ecx
movss %xmm0, -0x14(%rbp)
callq 0x9e5cc
movss -0x14(%rbp), %xmm0
xorps %xmm1, %xmm1
movl 0x4(%rbx), %eax
cmpl 0x8(%rbx), %eax
jne 0x9e370
movl (%rbx), %eax
movl %eax, 0x4(%rbx)
movq %r14, %rdi
callq 0xa8b5d
movl %eax, 0x8(%rbx)
movl %eax, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: InputTextCalcTextSizeW(unsigned short const*, unsigned short const*, unsigned short const**, ImVec2*, bool)
static ImVec2 InputTextCalcTextSizeW(const ImWchar* text_begin, const ImWchar* text_end, const ImWchar** remaining, ImVec2* out_offset, bool stop_on_new_line)
{
    ImGuiContext& g = *GImGui;
    ImFont* font = g.Font;
    const float line_height = g.FontSize;
    const float scale = line_height / font->FontSize;

    ImVec2 text_size = ImVec2(0, 0);
    float line_width = 0.0f;

    const ImWchar* s = text_begin;
    while (s < text_end)
    {
        unsigned int c = (unsigned int)(*s++);
        if (c == '\n')
        {
            text_size.x = ImMax(text_size.x, line_width);
            text_size.y += line_height;
            line_width = 0.0f;
            if (stop_on_new_line)
                break;
            continue;
        }
        if (c == '\r')
            continue;

        const float char_width = font->GetCharAdvance((ImWchar)c) * scale;
        line_width += char_width;
    }

    if (text_size.x < line_width)
        text_size.x = line_width;

    if (out_offset)
        *out_offset = ImVec2(line_width, text_size.y + line_height);  // offset allow for the possibility of sitting after a trailing \n

    if (line_width > 0 || text_size.y == 0.0f)                        // whereas size.y will ignore the trailing \n
        text_size.y += line_height;

    if (remaining)
        *remaining = s;

    return text_size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x5f6f9(%rip), %rax     # 0xfdcd0
movq (%rax), %r8
movq 0x1978(%r8), %rax
movss 0x1980(%r8), %xmm0
movaps %xmm0, %xmm3
divss 0x14(%rax), %xmm3
leaq 0x10(%rax), %r8
xorps %xmm2, %xmm2
xorps %xmm1, %xmm1
cmpq %rsi, %rdi
jae 0x9e667
movzwl (%rdi), %r9d
cmpl $0xd, %r9d
je 0x9e65b
cmpl $0xa, %r9d
jne 0x9e63b
movaps %xmm2, %xmm4
cmpless %xmm1, %xmm4
movaps %xmm4, %xmm5
andps %xmm1, %xmm5
andnps %xmm2, %xmm4
orps %xmm5, %xmm4
shufps $0x55, %xmm1, %xmm1     # xmm1 = xmm1[1,1,1,1]
addss %xmm0, %xmm1
unpcklps %xmm1, %xmm4            # xmm4 = xmm4[0],xmm1[0],xmm4[1],xmm1[1]
xorps %xmm2, %xmm2
movaps %xmm4, %xmm1
movl %ecx, %r9d
jmp 0x9e65e
leal (,%r9,4), %r10d
addq 0x8(%rax), %r10
cmpl %r9d, (%rax)
cmovleq %r8, %r10
movss (%r10), %xmm4
mulss %xmm3, %xmm4
addss %xmm4, %xmm2
xorl %r9d, %r9d
addq $0x2, %rdi
testb %r9b, %r9b
je 0x9e5fc
testq %rdx, %rdx
je 0x9e66f
movq %rdi, (%rdx)
ucomiss %xmm1, %xmm2
jbe 0x9e678
movss %xmm2, %xmm1            # xmm1 = xmm2[0],xmm1[1,2,3]
movaps %xmm1, %xmm3
shufps $0x55, %xmm1, %xmm3     # xmm3 = xmm3[1,1],xmm1[1,1]
xorps %xmm4, %xmm4
movaps %xmm3, %xmm5
cmpeqps %xmm4, %xmm5
cmpltps %xmm2, %xmm4
orps %xmm5, %xmm4
movd %xmm4, %eax
testb $0x1, %al
jne 0x9e69d
movaps %xmm1, %xmm0
jmp 0x9e6a8
addss %xmm3, %xmm0
movlhps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
shufps $0xe2, %xmm1, %xmm0     # xmm0 = xmm0[2,0],xmm1[2,3]
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: RenderArrowsForVerticalBar(ImDrawList*, ImVec2, ImVec2, float, float)
static void RenderArrowsForVerticalBar(ImDrawList* draw_list, ImVec2 pos, ImVec2 half_sz, float bar_w, float alpha)
{
    ImU32 alpha8 = IM_F32_TO_INT8_SAT(alpha);
    ImGui::RenderArrowPointingAt(draw_list, ImVec2(pos.x + half_sz.x + 1,         pos.y), ImVec2(half_sz.x + 2, half_sz.y + 1), ImGuiDir_Right, IM_COL32(0,0,0,alpha8));
    ImGui::RenderArrowPointingAt(draw_list, ImVec2(pos.x + half_sz.x,             pos.y), half_sz,                              ImGuiDir_Right, IM_COL32(255,255,255,alpha8));
    ImGui::RenderArrowPointingAt(draw_list, ImVec2(pos.x + bar_w - half_sz.x - 1, pos.y), ImVec2(half_sz.x + 2, half_sz.y + 1), ImGuiDir_Left,  IM_COL32(0,0,0,alpha8));
    ImGui::RenderArrowPointingAt(draw_list, ImVec2(pos.x + bar_w - half_sz.x,     pos.y), half_sz,                              ImGuiDir_Left,  IM_COL32(255,255,255,alpha8));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x58, %rsp
movaps %xmm2, -0x50(%rbp)
movaps %xmm1, -0x40(%rbp)
movaps %xmm0, %xmm2
movq %rdi, %rbx
movss 0x153ce(%rip), %xmm0    # 0xb6fe4
movaps %xmm2, %xmm5
movaps %xmm2, %xmm6
movaps %xmm2, -0x30(%rbp)
addps %xmm1, %xmm5
movaps %xmm5, -0x70(%rbp)
addss %xmm0, %xmm5
movaps %xmm1, %xmm2
shufps $0x55, %xmm1, %xmm2     # xmm2 = xmm2[1,1],xmm1[1,1]
addss %xmm0, %xmm2
minss %xmm3, %xmm0
xorps %xmm4, %xmm4
cmpltss %xmm4, %xmm3
andnps %xmm0, %xmm3
mulss 0x15bfb(%rip), %xmm3    # 0xb7848
addss 0x153af(%rip), %xmm3    # 0xb7004
cvttss2si %xmm3, %r14d
movss 0x15c06(%rip), %xmm0    # 0xb7868
addss %xmm1, %xmm0
unpcklps %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
movaps %xmm0, %xmm1
movaps %xmm0, -0x60(%rbp)
shll $0x18, %r14d
movaps %xmm6, %xmm0
movss %xmm5, %xmm0            # xmm0 = xmm5[0],xmm0[1,2,3]
movl $0x1, %esi
movl %r14d, %edx
callq 0x8403d
movaps -0x30(%rbp), %xmm0
movaps -0x70(%rbp), %xmm1
shufps $0x1, %xmm1, %xmm0      # xmm0 = xmm0[1,0],xmm1[0,0]
shufps $0xe2, %xmm1, %xmm0     # xmm0 = xmm0[2,0],xmm1[2,3]
leal 0xffffff(%r14), %r15d
movq %rbx, %rdi
movaps -0x40(%rbp), %xmm1
movl $0x1, %esi
movl %r15d, %edx
callq 0x8403d
movaps -0x50(%rbp), %xmm0
movaps -0x30(%rbp), %xmm2
addss %xmm2, %xmm0
subss -0x40(%rbp), %xmm0
movaps %xmm0, -0x50(%rbp)
movss 0x15300(%rip), %xmm1    # 0xb6fd0
addss %xmm0, %xmm1
movaps %xmm2, %xmm0
movss %xmm1, %xmm0            # xmm0 = xmm1[0],xmm0[1,2,3]
movq %rbx, %rdi
movaps -0x60(%rbp), %xmm1
xorl %esi, %esi
movl %r14d, %edx
callq 0x8403d
movaps -0x30(%rbp), %xmm0
movaps -0x50(%rbp), %xmm1
movss %xmm1, %xmm0            # xmm0 = xmm1[0],xmm0[1,2,3]
movq %rbx, %rdi
movaps -0x40(%rbp), %xmm1
xorl %esi, %esi
movl %r15d, %edx
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x8403d
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::SetColorEditOptions(int)
void ImGui::SetColorEditOptions(ImGuiColorEditFlags flags)
{
    ImGuiContext& g = *GImGui;
    if ((flags & ImGuiColorEditFlags__DisplayMask) == 0)
        flags |= ImGuiColorEditFlags__OptionsDefault & ImGuiColorEditFlags__DisplayMask;
    if ((flags & ImGuiColorEditFlags__DataTypeMask) == 0)
        flags |= ImGuiColorEditFlags__OptionsDefault & ImGuiColorEditFlags__DataTypeMask;
    if ((flags & ImGuiColorEditFlags__PickerMask) == 0)
        flags |= ImGuiColorEditFlags__OptionsDefault & ImGuiColorEditFlags__PickerMask;
    if ((flags & ImGuiColorEditFlags__InputMask) == 0)
        flags |= ImGuiColorEditFlags__OptionsDefault & ImGuiColorEditFlags__InputMask;
    IM_ASSERT(ImIsPowerOfTwo(flags & ImGuiColorEditFlags__DisplayMask));    // Check only 1 option is selected
    IM_ASSERT(ImIsPowerOfTwo(flags & ImGuiColorEditFlags__DataTypeMask));   // Check only 1 option is selected
    IM_ASSERT(ImIsPowerOfTwo(flags & ImGuiColorEditFlags__PickerMask));     // Check only 1 option is selected
    IM_ASSERT(ImIsPowerOfTwo(flags & ImGuiColorEditFlags__InputMask));      // Check only 1 option is selected
    g.ColorEditOptions = flags;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, %eax
orl $0x100000, %eax         # imm = 0x100000
testl $0x700000, %edi         # imm = 0x700000
cmovnel %edi, %eax
movl %eax, %ecx
orl $0x800000, %ecx         # imm = 0x800000
testl $0x1800000, %eax        # imm = 0x1800000
cmovnel %eax, %ecx
movl %ecx, %edx
orl $0x2000000, %edx        # imm = 0x2000000
testl $0x6000000, %ecx        # imm = 0x6000000
cmovnel %ecx, %edx
movl %edx, %eax
orl $0x8000000, %eax        # imm = 0x8000000
testl $0x18000000, %edx       # imm = 0x18000000
cmovnel %edx, %eax
movl %eax, %ecx
andl $0x700000, %ecx         # imm = 0x700000
leal -0x1(%rcx), %edx
xorl %edx, %ecx
cmpl %edx, %ecx
jbe 0xa203d
movl %eax, %ecx
andl $0x1800000, %ecx        # imm = 0x1800000
leal -0x1(%rcx), %edx
xorl %edx, %ecx
cmpl %edx, %ecx
jbe 0xa205c
movl %eax, %ecx
andl $0x6000000, %ecx        # imm = 0x6000000
leal -0x1(%rcx), %edx
xorl %edx, %ecx
cmpl %edx, %ecx
jbe 0xa207b
movl %eax, %ecx
andl $0x18000000, %ecx       # imm = 0x18000000
leal -0x1(%rcx), %edx
xorl %edx, %ecx
cmpl %edx, %ecx
jbe 0xa209a
leaq 0x5bc9e(%rip), %rcx     # 0xfdcd0
movq (%rcx), %rcx
movl %eax, 0x306c(%rcx)
popq %rbp
retq
leaq 0x324c3(%rip), %rdi     # 0xd4507
leaq 0x310fd(%rip), %rsi     # 0xd3148
leaq 0x326d9(%rip), %rcx     # 0xd472b
movl $0x14f4, %edx           # imm = 0x14F4
callq 0xc140
leaq 0x326fd(%rip), %rdi     # 0xd4760
leaq 0x310de(%rip), %rsi     # 0xd3148
leaq 0x326ba(%rip), %rcx     # 0xd472b
movl $0x14f5, %edx           # imm = 0x14F5
callq 0xc140
leaq 0x325ed(%rip), %rdi     # 0xd466f
leaq 0x310bf(%rip), %rsi     # 0xd3148
leaq 0x3269b(%rip), %rcx     # 0xd472b
movl $0x14f6, %edx           # imm = 0x14F6
callq 0xc140
leaq 0x324e2(%rip), %rdi     # 0xd4583
leaq 0x310a0(%rip), %rsi     # 0xd3148
leaq 0x3267c(%rip), %rcx     # 0xd472b
movl $0x14f7, %edx           # imm = 0x14F7
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::TreeNodeExV(char const*, int, char const*, __va_list_tag*)
bool ImGui::TreeNodeExV(const char* str_id, ImGuiTreeNodeFlags flags, const char* fmt, va_list args)
{
    ImGuiWindow* window = GetCurrentWindow();
    if (window->SkipItems)
        return false;

    ImGuiContext& g = *GImGui;
    const char* label_end = g.TempBuffer + ImFormatStringV(g.TempBuffer, IM_ARRAYSIZE(g.TempBuffer), fmt, args);
    return TreeNodeBehavior(window->GetID(str_id), flags, g.TempBuffer, label_end);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x5bb83(%rip), %rax     # 0xfdcd0
movq (%rax), %r13
movq 0x1ae0(%r13), %r15
movb $0x1, 0x90(%r15)
cmpb $0x0, 0x93(%r15)
je 0xa217a
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %esi, %ebx
movq %rdi, %r14
leaq 0x3378(%r13), %r12
movl $0xc01, %esi            # imm = 0xC01
movq %r12, %rdi
callq 0x42870
cltq
addq %rax, %r13
addq $0x3378, %r13           # imm = 0x3378
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x46258
movl %eax, %edi
movl %ebx, %esi
movq %r12, %rdx
movq %r13, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa2328
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::TreeNodeExV(void const*, int, char const*, __va_list_tag*)
bool ImGui::TreeNodeExV(const void* ptr_id, ImGuiTreeNodeFlags flags, const char* fmt, va_list args)
{
    ImGuiWindow* window = GetCurrentWindow();
    if (window->SkipItems)
        return false;

    ImGuiContext& g = *GImGui;
    const char* label_end = g.TempBuffer + ImFormatStringV(g.TempBuffer, IM_ARRAYSIZE(g.TempBuffer), fmt, args);
    return TreeNodeBehavior(window->GetID(ptr_id), flags, g.TempBuffer, label_end);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x5ba73(%rip), %rax     # 0xfdcd0
movq (%rax), %r13
movq 0x1ae0(%r13), %r15
movb $0x1, 0x90(%r15)
cmpb $0x0, 0x93(%r15)
je 0xa228a
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %esi, %ebx
movq %rdi, %r14
leaq 0x3378(%r13), %r12
movl $0xc01, %esi            # imm = 0xC01
movq %r12, %rdi
callq 0x42870
cltq
addq %rax, %r13
addq $0x3378, %r13           # imm = 0x3378
movq %r15, %rdi
movq %r14, %rsi
callq 0x4655a
movl %eax, %edi
movl %ebx, %esi
movq %r12, %rdx
movq %r13, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa2328
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::TreeNodeBehaviorIsOpen(unsigned int, int)
bool ImGui::TreeNodeBehaviorIsOpen(ImGuiID id, ImGuiTreeNodeFlags flags)
{
    if (flags & ImGuiTreeNodeFlags_Leaf)
        return true;

    // We only write to the tree storage if the user clicks (or explicitly use the SetNextItemOpen function)
    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = g.CurrentWindow;
    ImGuiStorage* storage = window->DC.StateStorage;

    bool is_open;
    if (g.NextItemData.Flags & ImGuiNextItemDataFlags_HasOpen)
    {
        if (g.NextItemData.OpenCond & ImGuiCond_Always)
        {
            is_open = g.NextItemData.OpenVal;
            storage->SetInt(id, is_open);
        }
        else
        {
            // We treat ImGuiCond_Once and ImGuiCond_FirstUseEver the same because tree node state are not saved persistently.
            const int stored_value = storage->GetInt(id, -1);
            if (stored_value == -1)
            {
                is_open = g.NextItemData.OpenVal;
                storage->SetInt(id, is_open);
            }
            else
            {
                is_open = stored_value != 0;
            }
        }
    }
    else
    {
        is_open = storage->GetInt(id, (flags & ImGuiTreeNodeFlags_DefaultOpen) ? 1 : 0) != 0;
    }

    // When logging is enabled, we automatically expand tree nodes (but *NOT* collapsing headers.. seems like sensible behavior).
    // NB- If we are above max depth we still allow manually opened nodes to be logged.
    if (g.LogEnabled && !(flags & ImGuiTreeNodeFlags_NoAutoOpenOnLog) && (window->DC.TreeDepth - g.LogDepthRef) < g.LogDepthToExpand)
        is_open = true;

    return is_open;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movb $0x1, %r14b
btl $0x8, %esi
jb 0xa2ddc
movl %esi, %ebx
movl %edi, %r15d
leaq 0x5af9a(%rip), %rax     # 0xfdcd0
movq (%rax), %r13
movq 0x1ae0(%r13), %rax
movq %rax, -0x30(%rbp)
movq 0x1a8(%rax), %r12
testb $0x2, 0x1bf8(%r13)
jne 0xa2d6a
movl %ebx, %edx
shrl $0x5, %edx
andl $0x1, %edx
movq %r12, %rdi
movl %r15d, %esi
callq 0x43148
jmp 0xa2d89
testb $0x1, 0x1c04(%r13)
jne 0xa2d91
movq %r12, %rdi
movl %r15d, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x43148
cmpl $-0x1, %eax
je 0xa2d91
testl %eax, %eax
setne %r14b
jmp 0xa2da7
movb 0x1c08(%r13), %r14b
movzbl %r14b, %edx
movq %r12, %rdi
movl %r15d, %esi
callq 0x433c8
testb $0x10, %bl
jne 0xa2ddc
cmpb $0x0, 0x3138(%r13)
je 0xa2ddc
movq -0x30(%rbp), %rax
movl 0x18c(%rax), %eax
subl 0x3160(%r13), %eax
cmpl 0x3164(%r13), %eax
movzbl %r14b, %eax
movl $0x1, %r14d
cmovgel %eax, %r14d
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::TreePushOverrideID(unsigned int)
void ImGui::TreePushOverrideID(ImGuiID id)
{
    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = g.CurrentWindow;
    Indent();
    window->DC.TreeDepth++;
    window->IDStack.push_back(id);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edi, %ebx
leaq 0x5aece(%rip), %rax     # 0xfdcd0
movq (%rax), %rax
movq 0x1ae0(%rax), %r15
xorps %xmm0, %xmm0
callq 0x56d2f
incl 0x18c(%r15)
movl 0xc8(%r15), %r12d
movl 0xcc(%r15), %eax
cmpl %eax, %r12d
jne 0xa2e9b
incl %r12d
testl %eax, %eax
je 0xa2e42
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
addl %eax, %ecx
jmp 0xa2e47
movl $0x8, %ecx
cmpl %r12d, %ecx
cmovgl %ecx, %r12d
cmpl %r12d, %eax
jge 0xa2e9b
movslq %r12d, %rdi
shlq $0x2, %rdi
callq 0x424fb
movq %rax, %r14
movq 0xd0(%r15), %rsi
testq %rsi, %rsi
je 0xa2e8d
movslq 0xc8(%r15), %rdx
shlq $0x2, %rdx
movq %r14, %rdi
callq 0xc080
movq 0xd0(%r15), %rdi
callq 0x425d4
movq %r14, 0xd0(%r15)
movl %r12d, 0xcc(%r15)
movq 0xd0(%r15), %rax
movslq 0xc8(%r15), %rcx
movl %ebx, (%rax,%rcx,4)
incl 0xc8(%r15)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::TreePush(char const*)
void ImGui::TreePush(const char* str_id)
{
    ImGuiWindow* window = GetCurrentWindow();
    Indent();
    window->DC.TreeDepth++;
    PushID(str_id ? str_id : "#TreePush");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x5ae03(%rip), %rax     # 0xfdcd0
movq (%rax), %rax
movq 0x1ae0(%rax), %r14
movb $0x1, 0x90(%r14)
xorps %xmm0, %xmm0
callq 0x56d2f
incl 0x18c(%r14)
testq %rbx, %rbx
leaq 0x31a5c(%rip), %rdi     # 0xd4954
cmovneq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x55c36
// File: /workspace/github_cpp_makefile_star2_O1/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::TreePush(void const*)
void ImGui::TreePush(const void* ptr_id)
{
    ImGuiWindow* window = GetCurrentWindow();
    Indent();
    window->DC.TreeDepth++;
    PushID(ptr_id ? ptr_id : (const void*)"#TreePush");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x5adba(%rip), %rax     # 0xfdcd0
movq (%rax), %rax
movq 0x1ae0(%rax), %r14
movb $0x1, 0x90(%r14)
xorps %xmm0, %xmm0
callq 0x56d2f
incl 0x18c(%r14)
testq %rbx, %rbx
leaq 0x31a13(%rip), %rdi     # 0xd4954
cmovneq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x55e4b