LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImTriangleClosestPoint(ImVec2 const&, ImVec2 const&, ImVec2 const&, ImVec2 const&)
ImVec2 ImTriangleClosestPoint(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& p)
{
    ImVec2 proj_ab = ImLineClosestPoint(a, b, p);
    ImVec2 proj_bc = ImLineClosestPoint(b, c, p);
    ImVec2 proj_ca = ImLineClosestPoint(c, a, p);
    float dist2_ab = ImLengthSqr(p - proj_ab);
    float dist2_bc = ImLengthSqr(p - proj_bc);
    float dist2_ca = ImLengthSqr(p - proj_ca);
    float m = ImMin(dist2_ab, ImMin(dist2_bc, dist2_ca));
    if (m == dist2_ab)
        return proj_ab;
    if (m == dist2_bc)
        return proj_bc;
    return proj_ca;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq %rcx, %rdx
callq 0x33d25
movaps %xmm0, -0x40(%rbp)
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x33d25
movaps %xmm0, -0x30(%rbp)
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x33d25
movaps -0x30(%rbp), %xmm8
movaps -0x40(%rbp), %xmm7
movss (%rbx), %xmm2
movss 0x4(%rbx), %xmm3
movaps %xmm2, %xmm1
subss %xmm7, %xmm1
movaps %xmm7, %xmm4
shufps $0x55, %xmm7, %xmm4     # xmm4 = xmm4[1,1],xmm7[1,1]
movaps %xmm3, %xmm5
subss %xmm4, %xmm5
mulss %xmm5, %xmm5
mulss %xmm1, %xmm1
addss %xmm5, %xmm1
movaps %xmm2, %xmm4
subss %xmm8, %xmm4
movaps %xmm8, %xmm5
shufps $0x55, %xmm8, %xmm5     # xmm5 = xmm5[1,1],xmm8[1,1]
movaps %xmm3, %xmm6
subss %xmm5, %xmm6
mulss %xmm6, %xmm6
mulss %xmm4, %xmm4
addss %xmm6, %xmm4
subss %xmm0, %xmm2
movaps %xmm0, %xmm5
shufps $0x55, %xmm0, %xmm5     # xmm5 = xmm5[1,1],xmm0[1,1]
subss %xmm5, %xmm3
mulss %xmm3, %xmm3
mulss %xmm2, %xmm2
addss %xmm3, %xmm2
movaps %xmm4, %xmm3
minss %xmm2, %xmm3
movaps %xmm1, %xmm2
minss %xmm3, %xmm2
ucomiss %xmm4, %xmm2
jne 0x342e3
jp 0x342e3
movaps %xmm8, %xmm0
ucomiss %xmm1, %xmm2
jne 0x342ed
jp 0x342ed
movaps %xmm7, %xmm0
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImStrncpy(char*, char const*, unsigned long)
void ImStrncpy(char* dst, const char* src, size_t count)
{
    if (count < 1)
        return;
    if (count > 1)
        strncpy(dst, src, count - 1);
    dst[count - 1] = 0;
}

// Assembly:
testq %rdx, %rdx
je 0x343df
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r14
cmpq $0x1, %rdx
je 0x343d5
leaq -0x1(%rbx), %rdx
movq %r14, %rdi
callq 0xc110
movb $0x0, -0x1(%r14,%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImStrdupcpy(char*, unsigned long*, char const*)
char* ImStrdupcpy(char* dst, size_t* p_dst_size, const char* src)
{
    size_t dst_buf_size = p_dst_size ? *p_dst_size : strlen(dst) + 1;
    size_t src_size = strlen(src) + 1;
    if (dst_buf_size < src_size)
    {
        IM_FREE(dst);
        dst = (char*)IM_ALLOC(src_size);
        if (p_dst_size)
            *p_dst_size = src_size;
    }
    return (char*)memcpy(dst, (const void*)src, src_size);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
testq %rsi, %rsi
je 0x34455
movq (%r15), %r13
jmp 0x34463
movq %r14, %rdi
callq 0xc380
movq %rax, %r13
incq %r13
movq %rbx, %rdi
callq 0xc380
movq %rax, %r12
incq %r12
cmpq %r12, %r13
jae 0x34491
movq %r14, %rdi
callq 0x344ad
movq %r12, %rdi
callq 0x3440d
movq %rax, %r14
testq %r15, %r15
je 0x34491
movq %r12, (%r15)
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xc080
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::MemFree(void*)
void ImGui::MemFree(void* ptr)
{
    if (ptr)
        if (ImGuiContext* ctx = GImGui)
            ctx->IO.MetricsActiveAllocations--;
    return GImAllocatorFreeFunc(ptr, GImAllocatorUserData);
}

// Assembly:
testq %rdi, %rdi
je 0x344c9
movq 0xaf827(%rip), %rax     # 0xe3ce0
testq %rax, %rax
je 0x344c9
pushq %rbp
movq %rsp, %rbp
decl 0x3b4(%rax)
popq %rbp
movq 0xab058(%rip), %rax     # 0xdf528
movq 0xaf819(%rip), %rsi     # 0xe3cf0
jmpq *%rax
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImStristr(char const*, char const*, char const*, char const*)
const char* ImStristr(const char* haystack, const char* haystack_end, const char* needle, const char* needle_end)
{
    if (!needle_end)
        needle_end = needle + strlen(needle);

    const char un0 = (char)toupper(*needle);
    while ((!haystack_end && *haystack) || (haystack_end && haystack < haystack_end))
    {
        if (toupper(*haystack) == un0)
        {
            const char* b = needle + 1;
            for (const char* a = haystack + 1; b < needle_end; a++, b++)
                if (toupper(*a) != toupper(*b))
                    break;
            if (b == needle_end)
                return haystack;
        }
        haystack++;
    }
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
movq %rcx, -0x30(%rbp)
testq %rcx, %rcx
jne 0x34572
movq %r12, %rdi
callq 0xc380
addq %r12, %rax
movq %rax, -0x30(%rbp)
movsbl (%r12), %edi
callq 0xc160
movsbl %al, %r15d
movq %r14, -0x40(%rbp)
movl %r15d, -0x34(%rbp)
testq %r14, %r14
je 0x34596
cmpq %r14, %rbx
jae 0x345e8
movb (%rbx), %al
jmp 0x3459c
movb (%rbx), %al
testb %al, %al
je 0x345e8
movsbl %al, %edi
callq 0xc160
cmpl %r15d, %eax
jne 0x345e3
pushq $0x1
popq %r15
leaq (%r12,%r15), %r14
cmpq -0x30(%rbp), %r14
jae 0x345d5
movsbl (%rbx,%r15), %edi
callq 0xc160
movl %eax, %r13d
movsbl (%r14), %edi
callq 0xc160
incq %r15
cmpl %eax, %r13d
je 0x345ad
cmpq -0x30(%rbp), %r14
movq -0x40(%rbp), %r14
movl -0x34(%rbp), %r15d
je 0x345ea
incq %rbx
jmp 0x34588
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImStrTrimBlanks(char*)
void ImStrTrimBlanks(char* buf)
{
    char* p = buf;
    while (p[0] == ' ' || p[0] == '\t')     // Leading blanks
        p++;
    char* p_start = p;
    while (*p != 0)                         // Find end of string
        p++;
    while (p > p_start && (p[-1] == ' ' || p[-1] == '\t'))  // Trailing blanks
        p--;
    if (p_start != buf)                     // Copy memory if we had leading blanks
        memmove(buf, p_start, p - p_start);
    buf[p - p_start] = 0;                   // Zero terminate
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorl %eax, %eax
movq %rdi, %rsi
movzbl (%rsi), %ecx
cmpl $0x9, %ecx
je 0x34618
cmpl $0x20, %ecx
jne 0x34620
incq %rsi
decq %rax
jmp 0x3460b
xorl %r14d, %r14d
testb %cl, %cl
je 0x34631
movb 0x1(%rsi,%r14), %cl
incq %r14
jmp 0x34623
movq %r14, %rcx
subq %rax, %rcx
leaq (%rbx,%rcx), %rdx
cmpq %rsi, %rdx
jbe 0x34657
movzbl -0x1(%rbx,%rcx), %edx
cmpl $0x20, %edx
je 0x3464f
cmpl $0x9, %edx
jne 0x34657
decq %r14
decq %rcx
jmp 0x34637
testq %rax, %rax
je 0x34667
movq %rbx, %rdi
movq %r14, %rdx
callq 0xc130
movb $0x0, (%rbx,%r14)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImFormatString(char*, unsigned long, char const*, ...)
int ImFormatString(char* buf, size_t buf_size, const char* fmt, ...)
{
    va_list args;
    va_start(args, fmt);
#ifdef IMGUI_USE_STB_SPRINTF
    int w = stbsp_vsnprintf(buf, (int)buf_size, fmt, args);
#else
    int w = vsnprintf(buf, buf_size, fmt, args);
#endif
    va_end(args);
    if (buf == NULL)
        return w;
    if (w == -1 || w >= (int)buf_size)
        w = (int)buf_size - 1;
    buf[w] = 0;
    return w;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq -0xe0(%rbp), %rsi
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x346e0
movaps %xmm0, -0xb0(%rbp)
movaps %xmm1, -0xa0(%rbp)
movaps %xmm2, -0x90(%rbp)
movaps %xmm3, -0x80(%rbp)
movaps %xmm4, -0x70(%rbp)
movaps %xmm5, -0x60(%rbp)
movaps %xmm6, -0x50(%rbp)
movaps %xmm7, -0x40(%rbp)
leaq -0x30(%rbp), %rcx
movq %rsi, 0x10(%rcx)
leaq 0x10(%rbp), %rax
movq %rax, 0x8(%rcx)
movabsq $0x3000000018, %rax     # imm = 0x3000000018
movq %rax, (%rcx)
movq %r14, %rsi
callq 0xc600
testq %rbx, %rbx
je 0x34725
leal -0x1(%r14), %ecx
cmpl %r14d, %eax
movl %ecx, %edx
cmovll %eax, %edx
cmpl $-0x1, %eax
cmovel %ecx, %edx
movslq %edx, %rax
movb $0x0, (%rbx,%rax)
movl %edx, %eax
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImFormatStringV(char*, unsigned long, char const*, __va_list_tag*)
int ImFormatStringV(char* buf, size_t buf_size, const char* fmt, va_list args)
{
#ifdef IMGUI_USE_STB_SPRINTF
    int w = stbsp_vsnprintf(buf, (int)buf_size, fmt, args);
#else
    int w = vsnprintf(buf, buf_size, fmt, args);
#endif
    if (buf == NULL)
        return w;
    if (w == -1 || w >= (int)buf_size)
        w = (int)buf_size - 1;
    buf[w] = 0;
    return w;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
callq 0xc600
testq %rbx, %rbx
je 0x34763
leal -0x1(%r14), %ecx
cmpl %r14d, %eax
movl %ecx, %edx
cmovll %eax, %edx
cmpl $-0x1, %eax
cmovel %ecx, %edx
movslq %edx, %rax
movb $0x0, (%rbx,%rax)
movl %edx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImHashData(void const*, unsigned long, unsigned int)
ImGuiID ImHashData(const void* data_p, size_t data_size, ImU32 seed)
{
    ImU32 crc = ~seed;
    const unsigned char* data = (const unsigned char*)data_p;
    const ImU32* crc32_lut = GCrc32LookupTable;
    while (data_size-- != 0)
        crc = (crc >> 8) ^ crc32_lut[(crc & 0xFF) ^ *data++];
    return ~crc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edx, %eax
notl %eax
xorl %ecx, %ecx
leaq 0x68297(%rip), %rdx     # 0x9ca10
cmpq %rcx, %rsi
je 0x34796
movzbl %al, %r8d
shrl $0x8, %eax
movzbl (%rdi,%rcx), %r9d
xorl %r8d, %r9d
xorl (%rdx,%r9,4), %eax
incq %rcx
jmp 0x34779
notl %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImHashStr(char const*, unsigned long, unsigned int)
ImGuiID ImHashStr(const char* data_p, size_t data_size, ImU32 seed)
{
    seed = ~seed;
    ImU32 crc = seed;
    const unsigned char* data = (const unsigned char*)data_p;
    const ImU32* crc32_lut = GCrc32LookupTable;
    if (data_size != 0)
    {
        while (data_size-- != 0)
        {
            unsigned char c = *data++;
            if (c == '#' && data_size >= 2 && data[0] == '#' && data[1] == '#')
                crc = seed;
            crc = (crc >> 8) ^ crc32_lut[(crc & 0xFF) ^ c];
        }
    }
    else
    {
        while (unsigned char c = *data++)
        {
            if (c == '#' && data[0] == '#' && data[1] == '#')
                crc = seed;
            crc = (crc >> 8) ^ crc32_lut[(crc & 0xFF) ^ c];
        }
    }
    return ~crc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
notl %edx
addq $0x2, %rdi
testq %rsi, %rsi
je 0x347f7
decq %rsi
leaq 0x6825d(%rip), %rcx     # 0x9ca10
movl %edx, %eax
cmpq $-0x1, %rsi
je 0x3482c
movzbl -0x2(%rdi), %r8d
cmpl $0x23, %r8d
setne %r9b
cmpq $0x2, %rsi
setb %r10b
orb %r9b, %r10b
jne 0x347e1
cmpb $0x23, -0x1(%rdi)
jne 0x347e1
cmpb $0x23, (%rdi)
cmovel %edx, %eax
movzbl %al, %r9d
shrl $0x8, %eax
xorl %r8d, %r9d
xorl (%rcx,%r9,4), %eax
incq %rdi
decq %rsi
jmp 0x347b5
leaq 0x68212(%rip), %rcx     # 0x9ca10
movl %edx, %eax
movzbl -0x2(%rdi), %esi
testl %esi, %esi
je 0x3482c
cmpl $0x23, %esi
jne 0x34819
cmpb $0x23, -0x1(%rdi)
jne 0x34819
cmpb $0x23, (%rdi)
cmovel %edx, %eax
movzbl %al, %r8d
shrl $0x8, %eax
xorl %esi, %r8d
xorl (%rcx,%r8,4), %eax
incq %rdi
jmp 0x34800
notl %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImFileLoadToMemory(char const*, char const*, unsigned long*, int)
void*   ImFileLoadToMemory(const char* filename, const char* mode, size_t* out_file_size, int padding_bytes)
{
    IM_ASSERT(filename && mode);
    if (out_file_size)
        *out_file_size = 0;

    ImFileHandle f;
    if ((f = ImFileOpen(filename, mode)) == NULL)
        return NULL;

    size_t file_size = (size_t)ImFileGetSize(f);
    if (file_size == (size_t)-1)
    {
        ImFileClose(f);
        return NULL;
    }

    void* file_data = IM_ALLOC(file_size + padding_bytes);
    if (file_data == NULL)
    {
        ImFileClose(f);
        return NULL;
    }
    if (ImFileRead(file_data, 1, file_size, f) != file_size)
    {
        ImFileClose(f);
        IM_FREE(file_data);
        return NULL;
    }
    if (padding_bytes > 0)
        memset((void*)(((char*)file_data) + file_size), 0, (size_t)padding_bytes);

    ImFileClose(f);
    if (out_file_size)
        *out_file_size = file_size;

    return file_data;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x34998
testq %rsi, %rsi
je 0x34998
movl %ecx, %r15d
movq %rdx, %rbx
testq %rdx, %rdx
je 0x348f1
andq $0x0, (%rbx)
callq 0xc9d0
testq %rax, %rax
je 0x34983
movq %rax, %r12
movq %rax, %rdi
callq 0x3484a
cmpq $-0x1, %rax
je 0x34969
movq %rax, %r13
movslq %r15d, %rax
movq %rax, -0x30(%rbp)
leaq (%rax,%r13), %rdi
callq 0x3440d
testq %rax, %rax
je 0x34969
movq %rax, %r14
pushq $0x1
popq %rsi
movq %rax, %rdi
movq %r13, %rdx
movq %r12, %rcx
callq 0xc4b0
cmpq %r13, %rax
jne 0x34973
testl %r15d, %r15d
jle 0x34957
movq %r14, %rdi
addq %r13, %rdi
xorl %esi, %esi
movq -0x30(%rbp), %rdx
callq 0xc270
movq %r12, %rdi
callq 0x3483a
testq %rbx, %rbx
je 0x34986
movq %r13, (%rbx)
jmp 0x34986
movq %r12, %rdi
callq 0x3483a
jmp 0x34983
movq %r12, %rdi
callq 0x3483a
movq %r14, %rdi
callq 0x344ad
xorl %r14d, %r14d
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x68915(%rip), %rdi     # 0x9d2b4
leaq 0x687ef(%rip), %rsi     # 0x9d195
leaq 0x68918(%rip), %rcx     # 0x9d2c5
movl $0x5f7, %edx            # imm = 0x5F7
callq 0xc140
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImTextStrFromUtf8(unsigned short*, int, char const*, char const*, char const**)
int ImTextStrFromUtf8(ImWchar* buf, int buf_size, const char* in_text, const char* in_text_end, const char** in_text_remaining)
{
    ImWchar* buf_out = buf;
    ImWchar* buf_end = buf + buf_size;
    while (buf_out < buf_end - 1 && (!in_text_end || in_text < in_text_end) && *in_text)
    {
        unsigned int c;
        in_text += ImTextCharFromUtf8(&c, in_text, in_text_end);
        if (c == 0)
            break;
        *buf_out++ = (ImWchar)c;
    }
    *buf_out = 0;
    if (in_text_remaining)
        *in_text_remaining = in_text;
    return (int)(buf_out - buf);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, -0x38(%rbp)
movq %rcx, %r13
movq %rdx, %r14
movq %rdi, %r12
movslq %esi, %rax
leaq (%rdi,%rax,2), %rbx
addq $-0x2, %rbx
xorl %r15d, %r15d
testq %r13, %r13
sete %al
cmpq %r13, %r14
setb %cl
cmpq %rbx, %r12
jae 0x34a27
orb %cl, %al
je 0x34a27
cmpb $0x0, (%r14)
je 0x34a27
leaq -0x2c(%rbp), %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x33a81
cltq
addq %rax, %r14
movl -0x2c(%rbp), %eax
testl %eax, %eax
je 0x34a27
movw %ax, (%r12)
addq $0x2, %r12
incl %r15d
jmp 0x349e3
andw $0x0, (%r12)
movq -0x38(%rbp), %rax
testq %rax, %rax
je 0x34a39
movq %r14, (%rax)
movl %r15d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImTextCountCharsFromUtf8(char const*, char const*)
int ImTextCountCharsFromUtf8(const char* in_text, const char* in_text_end)
{
    int char_count = 0;
    while ((!in_text_end || in_text < in_text_end) && *in_text)
    {
        unsigned int c;
        in_text += ImTextCharFromUtf8(&c, in_text, in_text_end);
        if (c == 0)
            break;
        char_count++;
    }
    return char_count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorl %eax, %eax
leaq -0x24(%rbp), %r15
movl %eax, %r12d
testq %rbx, %rbx
je 0x34a73
cmpq %rbx, %r14
jae 0x34a97
cmpb $0x0, (%r14)
je 0x34a97
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x33a81
cltq
addq %rax, %r14
leal 0x1(%r12), %eax
cmpl $0x0, -0x24(%rbp)
jne 0x34a66
movl %r12d, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImTextStrToUtf8(char*, int, unsigned short const*, unsigned short const*)
int ImTextStrToUtf8(char* buf, int buf_size, const ImWchar* in_text, const ImWchar* in_text_end)
{
    char* buf_out = buf;
    const char* buf_end = buf + buf_size;
    while (buf_out < buf_end - 1 && (!in_text_end || in_text < in_text_end) && *in_text)
    {
        unsigned int c = (unsigned int)(*in_text++);
        if (c < 0x80)
            *buf_out++ = (char)c;
        else
            buf_out += ImTextCharToUtf8(buf_out, (int)(buf_end - buf_out - 1), c);
    }
    *buf_out = 0;
    return (int)(buf_out - buf);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
movslq %esi, %rax
leaq (%rdi,%rax), %rsi
leaq -0x1(%rdi,%rax), %r8
movabsq $0x2, %r9
movabsq $0x1, %r10
movabsq $0x3, %r11
movq %rdi, %rax
testq %rcx, %rcx
sete %bl
cmpq %rcx, %rdx
setb %r14b
cmpq %r8, %rax
jae 0x34ba7
orb %r14b, %bl
je 0x34ba7
movzwl (%rdx), %ebx
testw %bx, %bx
je 0x34ba7
addq $0x2, %rdx
cmpw $0x7f, %bx
ja 0x34b36
movb %bl, (%rax)
incq %rax
jmp 0x34afa
movl %eax, %r14d
notl %r14d
addl %esi, %r14d
cmpw $0x7ff, %bx             # imm = 0x7FF
ja 0x34b62
cmpl $0x2, %r14d
jl 0x34b68
movl %ebx, %r14d
shrl $0x6, %r14d
orb $-0x40, %r14b
movb %r14b, (%rax)
movq %r10, %r15
movq %r9, %r14
jmp 0x34b95
cmpl $0x3, %r14d
jge 0x34b6d
xorl %r14d, %r14d
jmp 0x34b9f
movzwl %bx, %r14d
movl %r14d, %r15d
shrl $0xc, %r15d
orb $-0x20, %r15b
movb %r15b, (%rax)
shrl $0x6, %r14d
andb $0x3f, %r14b
orb $-0x80, %r14b
movb %r14b, 0x1(%rax)
movq %r9, %r15
movq %r11, %r14
andb $0x3f, %bl
orb $-0x80, %bl
movb %bl, (%rax,%r15)
addq %r14, %rax
jmp 0x34afa
movb $0x0, (%rax)
subl %edi, %eax
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImTextCountUtf8BytesFromStr(unsigned short const*, unsigned short const*)
int ImTextCountUtf8BytesFromStr(const ImWchar* in_text, const ImWchar* in_text_end)
{
    int bytes_count = 0;
    while ((!in_text_end || in_text < in_text_end) && *in_text)
    {
        unsigned int c = (unsigned int)(*in_text++);
        if (c < 0x80)
            bytes_count++;
        else
            bytes_count += ImTextCountUtf8BytesFromChar(c);
    }
    return bytes_count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movl $0x3, %ecx
movl $0x1, %edx
testq %rsi, %rsi
sete %r8b
cmpq %rsi, %rdi
setb %r9b
orb %r8b, %r9b
cmpb $0x1, %r9b
jne 0x34c04
movzwl (%rdi), %r8d
testw %r8w, %r8w
je 0x34c04
addq $0x2, %rdi
cmpw $0x800, %r8w            # imm = 0x800
movl %ecx, %r9d
sbbl $0x0, %r9d
cmpw $0x80, %r8w
cmovbl %edx, %r9d
addl %r9d, %eax
jmp 0x34bc3
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImAlphaBlendColors(unsigned int, unsigned int)
IMGUI_API ImU32 ImAlphaBlendColors(ImU32 col_a, ImU32 col_b)
{
    float t = ((col_b >> IM_COL32_A_SHIFT) & 0xFF) / 255.f;
    int r = ImLerp((int)(col_a >> IM_COL32_R_SHIFT) & 0xFF, (int)(col_b >> IM_COL32_R_SHIFT) & 0xFF, t);
    int g = ImLerp((int)(col_a >> IM_COL32_G_SHIFT) & 0xFF, (int)(col_b >> IM_COL32_G_SHIFT) & 0xFF, t);
    int b = ImLerp((int)(col_a >> IM_COL32_B_SHIFT) & 0xFF, (int)(col_b >> IM_COL32_B_SHIFT) & 0xFF, t);
    return IM_COL32(r, g, b, 0xFF);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %esi, %eax
shrl $0x18, %eax
cvtsi2ss %eax, %xmm0
movl $0xff, %eax
movl %edi, %ecx
andl %eax, %ecx
movl %esi, %edx
andl %eax, %edx
cvtsi2ss %ecx, %xmm1
subl %ecx, %edx
cvtsi2ss %edx, %xmm2
divss 0x67c42(%rip), %xmm0    # 0x9c874
mulss %xmm0, %xmm2
addss %xmm1, %xmm2
cvttss2si %xmm2, %ecx
movl %edi, %edx
shrl $0x8, %edx
andl %eax, %edx
movl %esi, %r8d
shrl $0x8, %r8d
andl %eax, %r8d
cvtsi2ss %edx, %xmm1
subl %edx, %r8d
cvtsi2ss %r8d, %xmm2
mulss %xmm0, %xmm2
addss %xmm1, %xmm2
shrl $0x10, %edi
andl %eax, %edi
shrl $0x10, %esi
andl %eax, %esi
cvtsi2ss %edi, %xmm1
subl %edi, %esi
cvtsi2ss %esi, %xmm3
cvttss2si %xmm2, %eax
mulss %xmm0, %xmm3
addss %xmm1, %xmm3
cvttss2si %xmm3, %edx
shll $0x10, %edx
shll $0x8, %eax
orl %ecx, %eax
orl %edx, %eax
orl $0xff000000, %eax       # imm = 0xFF000000
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::ColorConvertU32ToFloat4(unsigned int)
ImVec4 ImGui::ColorConvertU32ToFloat4(ImU32 in)
{
    float s = 1.0f / 255.0f;
    return ImVec4(
        ((in >> IM_COL32_R_SHIFT) & 0xFF) * s,
        ((in >> IM_COL32_G_SHIFT) & 0xFF) * s,
        ((in >> IM_COL32_B_SHIFT) & 0xFF) * s,
        ((in >> IM_COL32_A_SHIFT) & 0xFF) * s);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0xff, %eax
movl %edi, %ecx
andl %eax, %ecx
cvtsi2ss %ecx, %xmm0
movss 0x67bc7(%rip), %xmm2    # 0x9c878
mulss %xmm2, %xmm0
movl %edi, %ecx
shrl $0x8, %ecx
andl %eax, %ecx
cvtsi2ss %ecx, %xmm1
mulss %xmm2, %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movl %edi, %ecx
shrl $0x10, %ecx
andl %eax, %ecx
cvtsi2ss %ecx, %xmm1
mulss %xmm2, %xmm1
shrl $0x18, %edi
cvtsi2ss %edi, %xmm3
mulss %xmm2, %xmm3
unpcklps %xmm3, %xmm1            # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::ColorConvertFloat4ToU32(ImVec4 const&)
ImU32 ImGui::ColorConvertFloat4ToU32(const ImVec4& in)
{
    ImU32 out;
    out  = ((ImU32)IM_F32_TO_INT8_SAT(in.x)) << IM_COL32_R_SHIFT;
    out |= ((ImU32)IM_F32_TO_INT8_SAT(in.y)) << IM_COL32_G_SHIFT;
    out |= ((ImU32)IM_F32_TO_INT8_SAT(in.z)) << IM_COL32_B_SHIFT;
    out |= ((ImU32)IM_F32_TO_INT8_SAT(in.w)) << IM_COL32_A_SHIFT;
    return out;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movss (%rdi), %xmm4
movss 0x4(%rdi), %xmm5
movss 0x672fd(%rip), %xmm0    # 0x9bff8
movaps %xmm0, %xmm2
minss %xmm4, %xmm2
xorps %xmm1, %xmm1
cmpltss %xmm1, %xmm4
andnps %xmm2, %xmm4
movss 0x67b5f(%rip), %xmm2    # 0x9c874
mulss %xmm2, %xmm4
movss 0x672f7(%rip), %xmm3    # 0x9c018
addss %xmm3, %xmm4
cvttss2si %xmm4, %eax
movaps %xmm0, %xmm4
minss %xmm5, %xmm4
cmpltss %xmm1, %xmm5
andnps %xmm4, %xmm5
mulss %xmm2, %xmm5
addss %xmm3, %xmm5
cvttss2si %xmm5, %ecx
shll $0x8, %ecx
orl %eax, %ecx
movss 0x8(%rdi), %xmm4
movaps %xmm0, %xmm5
minss %xmm4, %xmm5
cmpltss %xmm1, %xmm4
andnps %xmm5, %xmm4
mulss %xmm2, %xmm4
addss %xmm3, %xmm4
cvttss2si %xmm4, %edx
shll $0x10, %edx
movss 0xc(%rdi), %xmm4
minss %xmm4, %xmm0
cmpltss %xmm1, %xmm4
andnps %xmm0, %xmm4
mulss %xmm2, %xmm4
addss %xmm3, %xmm4
cvttss2si %xmm4, %eax
shll $0x18, %eax
orl %edx, %eax
orl %ecx, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::ColorConvertRGBtoHSV(float, float, float, float&, float&, float&)
void ImGui::ColorConvertRGBtoHSV(float r, float g, float b, float& out_h, float& out_s, float& out_v)
{
    float K = 0.f;
    if (g < b)
    {
        ImSwap(g, b);
        K = -1.f;
    }
    if (r < g)
    {
        ImSwap(r, g);
        K = -2.f / 6.f - K;
    }

    const float chroma = r - (g < b ? g : b);
    out_h = ImFabs(K + (g - b) / (6.f * chroma + 1e-20f));
    out_s = chroma / (r + 1e-20f);
    out_v = r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movaps %xmm2, %xmm3
maxss %xmm1, %xmm3
movaps %xmm1, %xmm4
minss %xmm2, %xmm4
cmpltss %xmm2, %xmm1
movss 0x6723f(%rip), %xmm2    # 0x9bff0
andps %xmm1, %xmm2
movss 0x67ac0(%rip), %xmm5    # 0x9c87c
subss %xmm2, %xmm5
movaps %xmm3, %xmm1
maxss %xmm0, %xmm1
movaps %xmm0, %xmm6
minss %xmm3, %xmm6
cmpltss %xmm3, %xmm0
movaps %xmm0, %xmm3
andnps %xmm2, %xmm3
andps %xmm5, %xmm0
orps %xmm3, %xmm0
movaps %xmm6, %xmm2
minss %xmm4, %xmm2
movaps %xmm1, %xmm3
subss %xmm2, %xmm3
subss %xmm4, %xmm6
movss 0x67227(%rip), %xmm2    # 0x9c020
mulss %xmm3, %xmm2
movss 0x67a7b(%rip), %xmm4    # 0x9c880
addss %xmm4, %xmm2
divss %xmm2, %xmm6
addss %xmm0, %xmm6
andps 0x679d8(%rip), %xmm6    # 0x9c7f0
movss %xmm6, (%rdi)
addss %xmm1, %xmm4
divss %xmm4, %xmm3
movss %xmm3, (%rsi)
movss %xmm1, (%rdx)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGui::ColorConvertHSVtoRGB(float, float, float, float&, float&, float&)
void ImGui::ColorConvertHSVtoRGB(float h, float s, float v, float& out_r, float& out_g, float& out_b)
{
    if (s == 0.0f)
    {
        // gray
        out_r = out_g = out_b = v;
        return;
    }

    h = ImFmod(h, 1.0f) / (60.0f / 360.0f);
    int   i = (int)h;
    float f = h - (float)i;
    float p = v * (1.0f - s);
    float q = v * (1.0f - s * f);
    float t = v * (1.0f - s * (1.0f - f));

    switch (i)
    {
    case 0: out_r = v; out_g = t; out_b = p; break;
    case 1: out_r = q; out_g = v; out_b = p; break;
    case 2: out_r = p; out_g = v; out_b = t; break;
    case 3: out_r = p; out_g = q; out_b = v; break;
    case 4: out_r = t; out_g = p; out_b = v; break;
    case 5: default: out_r = v; out_g = p; out_b = q; break;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movaps %xmm1, %xmm3
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm3
jne 0x34e67
jp 0x34e67
movss %xmm2, (%rbx)
movss %xmm2, (%r14)
movss %xmm2, (%r15)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movss 0x67189(%rip), %xmm1    # 0x9bff8
movss %xmm2, -0x20(%rbp)
movss %xmm3, -0x1c(%rbp)
callq 0xc9f0
movss -0x1c(%rbp), %xmm6
movss 0x6716d(%rip), %xmm5    # 0x9bff8
movss -0x20(%rbp), %xmm4
divss 0x679ec(%rip), %xmm0    # 0x9c884
cvttss2si %xmm0, %eax
cvttps2dq %xmm0, %xmm1
cvtdq2ps %xmm1, %xmm1
subss %xmm1, %xmm0
movaps %xmm5, %xmm1
subss %xmm6, %xmm1
mulss %xmm4, %xmm1
movaps %xmm6, %xmm3
mulss %xmm0, %xmm3
movaps %xmm5, %xmm2
subss %xmm3, %xmm2
mulss %xmm4, %xmm2
cmpl $0x4, %eax
ja 0x34f3d
movaps %xmm5, %xmm3
subss %xmm0, %xmm3
mulss %xmm3, %xmm6
subss %xmm6, %xmm5
mulss %xmm4, %xmm5
leaq 0x67a5d(%rip), %rcx     # 0x9c940
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movss %xmm4, (%r15)
movss %xmm5, (%r14)
jmp 0x34f34
movss %xmm5, (%r15)
movss %xmm1, (%r14)
jmp 0x34f21
movss %xmm1, (%r15)
movss %xmm4, (%r14)
movss %xmm5, (%rbx)
jmp 0x34e5c
movss %xmm1, (%r15)
movss %xmm2, (%r14)
movss %xmm4, (%rbx)
jmp 0x34e5c
movss %xmm2, (%r15)
movss %xmm4, (%r14)
movss %xmm1, (%rbx)
jmp 0x34e5c
movss %xmm4, (%r15)
movss %xmm1, (%r14)
movss %xmm2, (%rbx)
jmp 0x34e5c
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGuiStorage::GetInt(unsigned int, int) const
int ImGuiStorage::GetInt(ImGuiID key, int default_val) const
{
    ImGuiStoragePair* it = LowerBound(const_cast<ImVector<ImGuiStoragePair>&>(Data), key);
    if (it == Data.end() || it->key != key)
        return default_val;
    return it->val_i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movl %esi, %r14d
movq %rdi, %r15
callq 0x34fd0
movslq (%r15), %rcx
shlq $0x4, %rcx
addq 0x8(%r15), %rcx
cmpq %rcx, %rax
je 0x34fc3
cmpl %r14d, (%rax)
jne 0x34fc3
movl 0x8(%rax), %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: LowerBound(ImVector<ImGuiStorage::ImGuiStoragePair>&, unsigned int)
static ImGuiStorage::ImGuiStoragePair* LowerBound(ImVector<ImGuiStorage::ImGuiStoragePair>& data, ImGuiID key)
{
    ImGuiStorage::ImGuiStoragePair* first = data.Data;
    ImGuiStorage::ImGuiStoragePair* last = data.Data + data.Size;
    size_t count = (size_t)(last - first);
    while (count > 0)
    {
        size_t count2 = count >> 1;
        ImGuiStorage::ImGuiStoragePair* mid = first + count2;
        if (mid->key < key)
        {
            first = ++mid;
            count -= count2 + 1;
        }
        else
        {
            count = count2;
        }
    }
    return first;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x8(%rdi), %rax
movslq (%rdi), %rcx
testq %rcx, %rcx
je 0x35004
movq %rcx, %rdx
shrq %rdx
movq %rdx, %rdi
shlq $0x4, %rdi
cmpl %esi, (%rax,%rdi)
jae 0x34fff
notq %rdx
addq %rcx, %rdx
addq %rdi, %rax
addq $0x10, %rax
movq %rdx, %rcx
jmp 0x34fdb
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGuiStorage::GetFloat(unsigned int, float) const
float ImGuiStorage::GetFloat(ImGuiID key, float default_val) const
{
    ImGuiStoragePair* it = LowerBound(const_cast<ImVector<ImGuiStoragePair>&>(Data), key);
    if (it == Data.end() || it->key != key)
        return default_val;
    return it->val_f;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movss %xmm0, -0x14(%rbp)
movl %esi, %ebx
movq %rdi, %r14
callq 0x34fd0
movslq (%r14), %rcx
shlq $0x4, %rcx
addq 0x8(%r14), %rcx
cmpq %rcx, %rax
je 0x35050
cmpl %ebx, (%rax)
movss -0x14(%rbp), %xmm0
jne 0x35055
movss 0x8(%rax), %xmm0
jmp 0x35055
movss -0x14(%rbp), %xmm0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGuiStorage::GetVoidPtr(unsigned int) const
void* ImGuiStorage::GetVoidPtr(ImGuiID key) const
{
    ImGuiStoragePair* it = LowerBound(const_cast<ImVector<ImGuiStoragePair>&>(Data), key);
    if (it == Data.end() || it->key != key)
        return NULL;
    return it->val_p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
callq 0x34fd0
movslq (%r14), %rcx
shlq $0x4, %rcx
addq 0x8(%r14), %rcx
cmpq %rcx, %rax
je 0x35089
cmpl %ebx, (%rax)
jne 0x35089
movq 0x8(%rax), %rax
jmp 0x3508b
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGuiStorage::GetIntRef(unsigned int, int)
int* ImGuiStorage::GetIntRef(ImGuiID key, int default_val)
{
    ImGuiStoragePair* it = LowerBound(Data, key);
    if (it == Data.end() || it->key != key)
        it = Data.insert(it, ImGuiStoragePair(key, default_val));
    return &it->val_i;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %edx, %r14d
movl %esi, %r15d
movq %rdi, %rbx
callq 0x34fd0
movslq (%rbx), %rcx
shlq $0x4, %rcx
addq 0x8(%rbx), %rcx
cmpq %rcx, %rax
je 0x350c0
cmpl %r15d, (%rax)
je 0x350d6
leaq -0x28(%rbp), %rdx
movl %r15d, (%rdx)
movl %r14d, 0x8(%rdx)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x49a4e
addq $0x8, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGuiStorage::GetFloatRef(unsigned int, float)
float* ImGuiStorage::GetFloatRef(ImGuiID key, float default_val)
{
    ImGuiStoragePair* it = LowerBound(Data, key);
    if (it == Data.end() || it->key != key)
        it = Data.insert(it, ImGuiStoragePair(key, default_val));
    return &it->val_f;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movss %xmm0, -0x14(%rbp)
movl %esi, %r14d
movq %rdi, %rbx
callq 0x34fd0
movslq (%rbx), %rcx
shlq $0x4, %rcx
addq 0x8(%rbx), %rcx
cmpq %rcx, %rax
je 0x35120
cmpl %r14d, (%rax)
je 0x3513c
leaq -0x28(%rbp), %rdx
movl %r14d, (%rdx)
movss -0x14(%rbp), %xmm0
movss %xmm0, 0x8(%rdx)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x49a4e
addq $0x8, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGuiStorage::GetVoidPtrRef(unsigned int, void*)
void** ImGuiStorage::GetVoidPtrRef(ImGuiID key, void* default_val)
{
    ImGuiStoragePair* it = LowerBound(Data, key);
    if (it == Data.end() || it->key != key)
        it = Data.insert(it, ImGuiStoragePair(key, default_val));
    return &it->val_p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movl %esi, %r15d
movq %rdi, %rbx
callq 0x34fd0
movslq (%rbx), %rcx
shlq $0x4, %rcx
addq 0x8(%rbx), %rcx
cmpq %rcx, %rax
je 0x3517a
cmpl %r15d, (%rax)
je 0x35190
leaq -0x28(%rbp), %rdx
movl %r15d, (%rdx)
movq %r14, 0x8(%rdx)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x49a4e
addq $0x8, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGuiStorage::SetInt(unsigned int, int)
void ImGuiStorage::SetInt(ImGuiID key, int val)
{
    ImGuiStoragePair* it = LowerBound(Data, key);
    if (it == Data.end() || it->key != key)
    {
        Data.insert(it, ImGuiStoragePair(key, val));
        return;
    }
    it->val_i = val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebx
movl %esi, %r15d
movq %rdi, %r14
callq 0x34fd0
movslq (%r14), %rcx
shlq $0x4, %rcx
addq 0x8(%r14), %rcx
cmpq %rcx, %rax
je 0x351d4
cmpl %r15d, (%rax)
jne 0x351d4
movl %ebx, 0x8(%rax)
jmp 0x351e9
leaq -0x28(%rbp), %rdx
movl %r15d, (%rdx)
movl %ebx, 0x8(%rdx)
movq %r14, %rdi
movq %rax, %rsi
callq 0x49a4e
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGuiStorage::SetFloat(unsigned int, float)
void ImGuiStorage::SetFloat(ImGuiID key, float val)
{
    ImGuiStoragePair* it = LowerBound(Data, key);
    if (it == Data.end() || it->key != key)
    {
        Data.insert(it, ImGuiStoragePair(key, val));
        return;
    }
    it->val_f = val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movss %xmm0, -0x14(%rbp)
movl %esi, %r14d
movq %rdi, %rbx
callq 0x34fd0
movslq (%rbx), %rcx
shlq $0x4, %rcx
addq 0x8(%rbx), %rcx
cmpq %rcx, %rax
je 0x3523a
cmpl %r14d, (%rax)
jne 0x3523a
movss -0x14(%rbp), %xmm0
movss %xmm0, 0x8(%rax)
jmp 0x35256
leaq -0x28(%rbp), %rdx
movl %r14d, (%rdx)
movss -0x14(%rbp), %xmm0
movss %xmm0, 0x8(%rdx)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x49a4e
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGuiStorage::SetVoidPtr(unsigned int, void*)
void ImGuiStorage::SetVoidPtr(ImGuiID key, void* val)
{
    ImGuiStoragePair* it = LowerBound(Data, key);
    if (it == Data.end() || it->key != key)
    {
        Data.insert(it, ImGuiStoragePair(key, val));
        return;
    }
    it->val_p = val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movl %esi, %r15d
movq %rdi, %r14
callq 0x34fd0
movslq (%r14), %rcx
shlq $0x4, %rcx
addq 0x8(%r14), %rcx
cmpq %rcx, %rax
je 0x35296
cmpl %r15d, (%rax)
jne 0x35296
movq %rbx, 0x8(%rax)
jmp 0x352ac
leaq -0x28(%rbp), %rdx
movl %r15d, (%rdx)
movq %rbx, 0x8(%rdx)
movq %r14, %rdi
movq %rax, %rsi
callq 0x49a4e
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGuiTextFilter::ImGuiTextFilter(char const*)
ImGuiTextFilter::ImGuiTextFilter(const char* default_filter)
{
    if (default_filter)
    {
        ImStrncpy(InputBuf, default_filter, IM_ARRAYSIZE(InputBuf));
        Build();
    }
    else
    {
        InputBuf[0] = 0;
        CountGrep = 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x100(%rdi)
testq %rsi, %rsi
je 0x35325
leaq 0x100(%rbx), %r14
movl $0x100, %edx            # imm = 0x100
movq %rbx, %rdi
callq 0x343b1
movq %rbx, %rdi
callq 0x35348
jmp 0x3532f
movb $0x0, (%rbx)
andl $0x0, 0x110(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq %r14, %rdi
callq 0x49b4c
movq %rbx, %rdi
callq 0xc580
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
xorl %r15d, %r15d
movq %r14, %rdi
xorl %esi, %esi
callq 0x49b68
movq %rbx, %rdi
callq 0xc380
addq %rbx, %rax
leaq -0x28(%rbp), %rdi
movq %rbx, (%rdi)
movq %rax, 0x8(%rdi)
pushq $0x2c
popq %rsi
movq %r14, %rdx
callq 0x35486
andl $0x0, 0x110(%rbx)
cmpl (%r14), %r15d
je 0x35405
movq %r14, %rdi
movl %r15d, %esi
callq 0x49bfa
movq (%rax), %rcx
movq 0x8(%rax), %rdx
cmpq %rdx, %rcx
jae 0x353c9
movzbl (%rcx), %esi
cmpl $0x20, %esi
je 0x353bd
cmpl $0x9, %esi
jne 0x353c9
incq %rcx
movq %rcx, (%rax)
jmp 0x353ab
movq %rdx, 0x8(%rax)
decq %rdx
leaq 0x1(%rdx), %rsi
cmpq %rcx, %rsi
jbe 0x353e2
movzbl (%rdx), %edi
cmpl $0x20, %edi
je 0x353c5
cmpl $0x9, %edi
je 0x353c5
cmpq %rcx, %rsi
je 0x35400
movq %r14, %rdi
movl %r15d, %esi
callq 0x49bfa
movq (%rax), %rax
cmpb $0x2d, (%rax)
je 0x35400
incl 0x110(%rbx)
incl %r15d
jmp 0x35394
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x35424
jnp 0x3543a
movq 0xae8b5(%rip), %rax     # 0xe3ce0
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 0x83c1c
movl %eax, %r14d
testb %al, %al
je 0x35461
movq %rbx, %rdi
callq 0x35348
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGuiTextFilter::ImGuiTextRange::split(char, ImVector<ImGuiTextFilter::ImGuiTextRange>*) const
void ImGuiTextFilter::ImGuiTextRange::split(char separator, ImVector<ImGuiTextRange>* out) const
{
    out->resize(0);
    const char* wb = b;
    const char* we = wb;
    while (we < e)
    {
        if (*we == separator)
        {
            out->push_back(ImGuiTextRange(wb, we));
            wb = we + 1;
        }
        we++;
    }
    if (wb != we)
        out->push_back(ImGuiTextRange(wb, we));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movl %esi, %r14d
movq %rdi, %r15
movq %rdx, %rdi
xorl %esi, %esi
callq 0x49b68
movq (%r15), %rax
leaq -0x38(%rbp), %r12
movq %rax, %r13
cmpq 0x8(%r15), %r13
jae 0x354dc
cmpb %r14b, (%r13)
jne 0x354d7
movq %rax, -0x38(%rbp)
movq %r13, -0x30(%rbp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x49ba6
leaq 0x1(%r13), %rax
incq %r13
jmp 0x354b4
cmpq %rax, %r13
je 0x354f4
leaq -0x38(%rbp), %rsi
movq %rax, (%rsi)
movq %r13, 0x8(%rsi)
movq %rbx, %rdi
callq 0x49ba6
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %rax
movl 0x100(%rdi), %eax
testl %eax, %eax
je 0x3558c
movq %rdx, %rbx
movq %rdi, -0x30(%rbp)
leaq 0x100(%rdi), %r15
testq %rsi, %rsi
leaq 0x669ed(%rip), %r12     # 0x9bf21
cmovneq %rsi, %r12
xorl %r13d, %r13d
cmpl %eax, %r13d
je 0x3557b
movq %r15, %rdi
movl %r13d, %esi
callq 0x49c30
movq (%rax), %rdx
movq 0x8(%rax), %rcx
cmpq %rcx, %rdx
je 0x35573
cmpb $0x2d, (%rdx)
setne %r14b
jne 0x35563
incq %rdx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x34540
testq %rax, %rax
jne 0x3558f
incl %r13d
movl (%r15), %eax
jmp 0x3553b
movq -0x30(%rbp), %rax
cmpl $0x0, 0x110(%rax)
sete %r14b
jmp 0x3558f
movb $0x1, %r14b
movl %r14d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
testq %rdx, %rdx
je 0x355c3
movq %rdx, %r14
subq %r15, %r14
jmp 0x355ce
movq %r15, %rdi
callq 0xc380
movq %rax, %r14
movl (%rbx), %r13d
movl 0x4(%rbx), %esi
cmpl $0x1, %r13d
adcl $0x0, %r13d
leal (%r14,%r13), %r12d
cmpl %esi, %r12d
jl 0x355f6
addl %esi, %esi
cmpl %esi, %r12d
cmovgl %r12d, %esi
movq %rbx, %rdi
callq 0x49c66
movq %rbx, %rdi
movl %r12d, %esi
callq 0x49cb6
leal -0x1(%r13), %esi
movq %rbx, %rdi
callq 0x49cf4
movslq %r14d, %rdx
movq %rax, %rdi
movq %r15, %rsi
callq 0xc080
leal (%r14,%r13), %esi
decl %esi
movq %rbx, %rdi
callq 0x49cf4
movb $0x0, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 $0x18, %rsp
movq %rdx, %rcx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x10(%rdx), %rax
movq %rax, -0x30(%rbp)
movups (%rdx), %xmm0
movaps %xmm0, -0x40(%rbp)
xorl %edi, %edi
xorl %esi, %esi
movq %rbx, %rdx
callq 0xc600
testl %eax, %eax
jle 0x35747
movl %eax, %r15d
movl (%r14), %r12d
movl 0x4(%r14), %esi
cmpl $0x1, %r12d
adcl $0x0, %r12d
leal (%r12,%r15), %r13d
cmpl %esi, %r13d
jl 0x35719
addl %esi, %esi
cmpl %esi, %r13d
cmovgl %r13d, %esi
movq %r14, %rdi
callq 0x49c66
movq %r14, %rdi
movl %r13d, %esi
callq 0x49cb6
decl %r12d
movq %r14, %rdi
movl %r12d, %esi
callq 0x49cf4
incl %r15d
leaq -0x40(%rbp), %rcx
movq %rax, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x34731
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0xae3c5(%rip), %rax     # 0xe3ce0
movq 0x1ae0(%rax), %r15
movq 0x20a8(%rax), %rdi
testq %rdi, %rdi
je 0x35946
cmpb $0x1, 0x249(%rdi)
jne 0x35946
movss %xmm0, -0x1c(%rbp)
callq 0x733b7
movss -0x1c(%rbp), %xmm0
movss 0xdc(%r15), %xmm1
movss %xmm1, 0x18(%rbx)
movss %xmm0, 0x14(%rbx)
movl %r14d, 0x8(%rbx)
andq $0x0, 0xc(%rbx)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x359c0
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
je 0x359ac
cmpl $0x0, (%rbx)
js 0x359ac
subl 0x10(%rbx), %eax
cvtsi2ss %eax, %xmm0
movss 0x14(%rbx), %xmm1
mulss %xmm1, %xmm0
addss 0x18(%rbx), %xmm0
callq 0x359c1
movabsq $0x3ffffffff, %rax      # imm = 0x3FFFFFFFF
movq %rax, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq