LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: Ciaxur[P]yagb-emu/src/../include/imgui_club/imgui_memory_editor/imgui_memory_editor.h
// Function: MemoryEditor::DrawWindow(char const*, void*, unsigned long, unsigned long)
void DrawWindow(const char* title, void* mem_data, size_t mem_size, size_t base_display_addr = 0x0000)
    {
        Sizes s;
        CalcSizes(s, mem_size, base_display_addr);
        ImGui::SetNextWindowSizeConstraints(ImVec2(0.0f, 0.0f), ImVec2(s.WindowWidth, FLT_MAX));

        Open = true;
        if (ImGui::Begin(title, &Open, ImGuiWindowFlags_NoScrollbar))
        {
            if (ImGui::IsWindowHovered(ImGuiHoveredFlags_RootAndChildWindows) && ImGui::IsMouseReleased(ImGuiMouseButton_Right))
                ImGui::OpenPopup("context");
            DrawContents(mem_data, mem_size, base_display_addr);
            if (ContentsWidthChanged)
            {
                CalcSizes(s, mem_size, base_display_addr);
                ImGui::SetWindowSize(ImVec2(s.WindowWidth, ImGui::GetWindowSize().y));
            }
        }
        ImGui::End();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x78(%rbp)
leaq -0x50(%rbp), %rdi
callq 0xbf810
movq -0x78(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
leaq -0x50(%rbp), %rsi
callq 0xbf840
leaq -0x58(%rbp), %rdi
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0xbf4c0
movss -0x2c(%rbp), %xmm0
leaq -0x60(%rbp), %rdi
movss 0xb2a0f(%rip), %xmm1    # 0x171fb4
callq 0xbf4c0
leaq -0x58(%rbp), %rdi
leaq -0x60(%rbp), %rsi
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0xdac00
movq -0x78(%rbp), %rsi
movb $0x1, (%rsi)
movq -0x10(%rbp), %rdi
movl $0x8, %edx
callq 0xd0170
testb $0x1, %al
jne 0xbf5dc
jmp 0xbf675
movl $0x3, %edi
callq 0xda3a0
testb $0x1, %al
jne 0xbf5ec
jmp 0xbf60a
movl $0x1, %edi
callq 0xd4e60
testb $0x1, %al
jne 0xbf5fc
jmp 0xbf60a
leaq 0xb5ca4(%rip), %rdi     # 0x1752a7
xorl %esi, %esi
callq 0xdde00
movq -0x78(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0xbfa70
movq -0x78(%rbp), %rax
testb $0x1, 0x38(%rax)
je 0xbf673
movq -0x78(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
leaq -0x50(%rbp), %rsi
callq 0xbf840
movss -0x2c(%rbp), %xmm0
movss %xmm0, -0x7c(%rbp)
callq 0xda8a0
movaps %xmm0, %xmm1
movss -0x7c(%rbp), %xmm0
movlpd %xmm1, -0x70(%rbp)
movss -0x6c(%rbp), %xmm1
leaq -0x68(%rbp), %rdi
callq 0xbf4c0
leaq -0x68(%rbp), %rdi
xorl %esi, %esi
callq 0xda8d0
jmp 0xbf675
callq 0xd3b60
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: Ciaxur[P]yagb-emu/src/main.cc
// Function: render(ImVec4, ImGuiIO&)
inline void render(ImVec4 clear_color, ImGuiIO& io) {
  ImGui::Render();
  glViewport(0, 0, (int)io.DisplaySize.x, (int)io.DisplaySize.y);
  glClearColor(clear_color.x, clear_color.y, clear_color.z, clear_color.w);
  glClear(GL_COLOR_BUFFER_BIT);
  ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
  SDL_GL_SwapWindow(window);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movlpd %xmm0, -0x10(%rbp)
movlpd %xmm1, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
callq 0xd42d0
movq -0x18(%rbp), %rax
cvttss2si 0x8(%rax), %edx
movq -0x18(%rbp), %rax
cvttss2si 0xc(%rax), %ecx
xorl %esi, %esi
movl %esi, %edi
callq 0xd440
movss -0x10(%rbp), %xmm0
movss -0xc(%rbp), %xmm1
movss -0x8(%rbp), %xmm2
movss -0x4(%rbp), %xmm3
callq 0xd140
movl $0x4000, %edi           # imm = 0x4000
callq 0xd5b0
callq 0xcb200
movq %rax, %rdi
callq 0x169590
movq 0x1535cb(%rip), %rdi    # 0x212dc8
callq 0xd360
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: Ciaxur[P]yagb-emu/src/../include/imgui_club/imgui_memory_editor/imgui_memory_editor.h
// Function: MemoryEditor::DrawContents(void*, unsigned long, unsigned long)::UserData::Callback(ImGuiInputTextCallbackData*)
static int Callback(ImGuiInputTextCallbackData* data)
                        {
                            UserData* user_data = (UserData*)data->UserData;
                            if (!data->HasSelection())
                                user_data->CursorPos = data->CursorPos;
                            if (data->SelectionStart == 0 && data->SelectionEnd == data->BufTextLen)
                            {
                                // When not editing a byte, always rewrite its content (this is a bit tricky, since InputText technically "owns" the master copy of the buffer we edit it in there)
                                data->DeleteChars(0, data->BufTextLen);
                                data->InsertChars(0, user_data->CurrentBufOverwrite);
                                data->SelectionStart = 0;
                                data->SelectionEnd = 2;
                                data->CursorPos = 0;
                            }
                            return 0;
                        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0xc1a00
testb $0x1, %al
jne 0xc11f3
movq -0x8(%rbp), %rax
movl 0x2c(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x30(%rax)
jne 0xc1253
movq -0x8(%rbp), %rax
movl 0x34(%rax), %eax
movq -0x8(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jne 0xc1253
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x20(%rax), %edx
xorl %esi, %esi
callq 0x14b3d0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
xorl %esi, %esi
xorl %eax, %eax
movl %eax, %ecx
callq 0x14b4e0
movq -0x8(%rbp), %rax
movl $0x0, 0x30(%rax)
movq -0x8(%rbp), %rax
movl $0x2, 0x34(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x2c(%rax)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: Ciaxur[P]yagb-emu/src/../include/imgui_club/imgui_memory_editor/imgui_memory_editor.h
// Function: MemoryEditor::EndianessCopy(void*, void*, unsigned long) const
void* EndianessCopy(void* dst, void* src, size_t size) const
    {
        static void* (*fp)(void*, void*, size_t, int) = NULL;
        if (fp == NULL)
            fp = IsBigEndian() ? EndianessCopyBigEndian : EndianessCopyLittleEndian;
        return fp(dst, src, size, PreviewEndianess);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, 0x150e08(%rip)    # 0x212ee0
jne 0xc210e
movq -0x28(%rbp), %rdi
callq 0xc2280
testb $0x1, %al
jne 0xc20e9
jmp 0xc20f6
leaq 0x1c0(%rip), %rax       # 0xc22b0
movq %rax, -0x30(%rbp)
jmp 0xc2103
leaq 0x263(%rip), %rax       # 0xc2360
movq %rax, -0x30(%rbp)
jmp 0xc2103
movq -0x30(%rbp), %rax
movq %rax, 0x150dd2(%rip)    # 0x212ee0
movq -0x28(%rbp), %rcx
movq 0x150dc7(%rip), %rax    # 0x212ee0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl 0xb0(%rcx), %ecx
callq *%rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: Ciaxur[P]yagb-emu/src/../include/imgui_club/imgui_memory_editor/imgui_memory_editor.h
// Function: MemoryEditor::FormatBinary(unsigned char const*, int) const
const char* FormatBinary(const uint8_t* buf, int width) const
    {
        IM_ASSERT(width <= 64);
        size_t out_n = 0;
        static char out_buf[64 + 8 + 1];
        int n = width / 8;
        for (int j = n - 1; j >= 0; --j)
        {
            for (int i = 0; i < 8; ++i)
                out_buf[out_n++] = (buf[j] & (1 << (7 - i))) ? '1' : '0';
            out_buf[out_n++] = ' ';
        }
        IM_ASSERT(out_n < IM_ARRAYSIZE(out_buf));
        out_buf[out_n] = 0;
        return out_buf;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
cmpl $0x40, -0x14(%rbp)
jg 0xc215b
jmp 0xc217a
leaq 0xb04df(%rip), %rdi     # 0x172641
leaq 0xb0203(%rip), %rsi     # 0x17236c
movl $0x269, %edx            # imm = 0x269
leaq 0xb04d8(%rip), %rcx     # 0x17264d
callq 0xd180
movq $0x0, -0x20(%rbp)
movl -0x14(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
jl 0xc2237
movl $0x0, -0x2c(%rbp)
cmpl $0x8, -0x2c(%rbp)
jge 0xc220f
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0x34(%rbp)
movl $0x7, %ecx
subl -0x2c(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl -0x34(%rbp), %ecx
andl %eax, %ecx
movb $0x31, %al
movb $0x30, %dl
movb %dl, -0x2e(%rbp)
cmpl $0x0, %ecx
movb %al, -0x2d(%rbp)
jne 0xc21e8
movb -0x2e(%rbp), %al
movb %al, -0x2d(%rbp)
movb -0x2d(%rbp), %dl
movq -0x20(%rbp), %rcx
movq %rcx, %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
leaq 0x150cef(%rip), %rax    # 0x212ef0
movb %dl, (%rax,%rcx)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xc21aa
movq -0x20(%rbp), %rcx
movq %rcx, %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
leaq 0x150ccb(%rip), %rax    # 0x212ef0
movb $0x20, (%rax,%rcx)
movl -0x28(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0xc2199
cmpq $0x49, -0x20(%rbp)
jae 0xc2240
jmp 0xc225f
leaq 0xb0449(%rip), %rdi     # 0x172690
leaq 0xb011e(%rip), %rsi     # 0x17236c
movl $0x273, %edx            # imm = 0x273
leaq 0xb03f3(%rip), %rcx     # 0x17264d
callq 0xd180
movq -0x20(%rbp), %rcx
leaq 0x150c86(%rip), %rax    # 0x212ef0
movb $0x0, (%rax,%rcx)
leaq 0x150c7b(%rip), %rax    # 0x212ef0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: Ciaxur[P]yagb-emu/src/../include/imgui_club/imgui_memory_editor/imgui_memory_editor.h
// Function: MemoryEditor::EndianessCopyBigEndian(void*, void*, unsigned long, int)
static void* EndianessCopyBigEndian(void* _dst, void* _src, size_t s, int is_little_endian)
    {
        if (is_little_endian)
        {
            uint8_t* dst = (uint8_t*)_dst;
            uint8_t* src = (uint8_t*)_src + s - 1;
            for (int i = 0, n = (int)s; i < n; ++i)
                memcpy(dst++, src--, 1);
            return _dst;
        }
        else
        {
            return memcpy(_dst, _src, s);
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0xc2332
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
addq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movq -0x20(%rbp), %rax
movl %eax, -0x40(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x40(%rbp), %eax
jge 0xc2328
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rbp)
movq -0x38(%rbp), %rcx
movq %rcx, %rdx
addq $-0x1, %rdx
movq %rdx, -0x38(%rbp)
movb (%rcx), %cl
movb %cl, (%rax)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0xc22f3
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xc234f
movq -0x10(%rbp), %rdi
movq %rdi, -0x48(%rbp)
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0xd0a0
movq -0x48(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: SetClipboardTextFn_DefaultImpl(void*, char const*)
static void SetClipboardTextFn_DefaultImpl(void*, const char* text)
{
    ImGuiContext& g = *GImGui;
    g.ClipboardHandlerData.clear();
    const char* text_end = text + strlen(text);
    g.ClipboardHandlerData.resize((int)(text_end - text) + 1);
    memcpy(&g.ClipboardHandlerData[0], text, (size_t)(text_end - text));
    g.ClipboardHandlerData[(int)(text_end - text)] = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq 0x14fb19(%rip), %rax    # 0x212f40
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
addq $0x30b0, %rdi           # imm = 0x30B0
callq 0xeb060
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0xd410
movq %rax, %rcx
movq -0x28(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
addq $0x30b0, %rdi           # imm = 0x30B0
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
movl %eax, %esi
addl $0x1, %esi
callq 0xe84f0
movq -0x18(%rbp), %rdi
addq $0x30b0, %rdi           # imm = 0x30B0
xorl %esi, %esi
callq 0xe8540
movq %rax, %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x10(%rbp), %rax
subq %rax, %rdx
callq 0xd0a0
movq -0x18(%rbp), %rdi
addq $0x30b0, %rdi           # imm = 0x30B0
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
movl %eax, %esi
callq 0xe8540
movb $0x0, (%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGuiIO::AddInputCharacterUTF16(unsigned short)
void ImGuiIO::AddInputCharacterUTF16(ImWchar16 c)
{
    if (c == 0 && InputQueueSurrogate == 0)
        return;

    if ((c & 0xFC00) == 0xD800) // High surrogate, must save
    {
        if (InputQueueSurrogate != 0)
            InputQueueCharacters.push_back(IM_UNICODE_CODEPOINT_INVALID);
        InputQueueSurrogate = c;
        return;
    }

    ImWchar cp = c;
    if (InputQueueSurrogate != 0)
    {
        if ((c & 0xFC00) != 0xDC00) // Invalid low surrogate
            InputQueueCharacters.push_back(IM_UNICODE_CODEPOINT_INVALID);
        else if (IM_UNICODE_CODEPOINT_MAX == (0xFFFF)) // Codepoint will not fit in ImWchar (extra parenthesis around 0xFFFF somehow fixes -Wunreachable-code with Clang)
            cp = IM_UNICODE_CODEPOINT_INVALID;
        else
            cp = (ImWchar)(((InputQueueSurrogate - 0xD800) << 10) + (c - 0xDC00) + 0x10000);
        InputQueueSurrogate = 0;
    }
    InputQueueCharacters.push_back(cp);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movzwl -0xa(%rbp), %eax
cmpl $0x0, %eax
jne 0xc3589
movq -0x18(%rbp), %rax
movzwl 0x1544(%rax), %eax
cmpl $0x0, %eax
jne 0xc3589
jmp 0xc363f
movzwl -0xa(%rbp), %eax
andl $0xfc00, %eax           # imm = 0xFC00
cmpl $0xd800, %eax           # imm = 0xD800
jne 0xc35d4
movq -0x18(%rbp), %rax
movzwl 0x1544(%rax), %eax
cmpl $0x0, %eax
je 0xc35c3
movq -0x18(%rbp), %rdi
addq $0x1548, %rdi           # imm = 0x1548
movw $0xfffd, -0xc(%rbp)     # imm = 0xFFFD
leaq -0xc(%rbp), %rsi
callq 0xe7ea0
movq -0x18(%rbp), %rax
movw -0xa(%rbp), %cx
movw %cx, 0x1544(%rax)
jmp 0xc363f
movq -0x18(%rbp), %rax
movw -0xa(%rbp), %cx
movw %cx, -0xe(%rbp)
movzwl 0x1544(%rax), %eax
cmpl $0x0, %eax
je 0xc362b
movzwl -0xa(%rbp), %eax
andl $0xfc00, %eax           # imm = 0xFC00
cmpl $0xdc00, %eax           # imm = 0xDC00
je 0xc3618
movq -0x18(%rbp), %rdi
addq $0x1548, %rdi           # imm = 0x1548
movw $0xfffd, -0x10(%rbp)    # imm = 0xFFFD
leaq -0x10(%rbp), %rsi
callq 0xe7ea0
jmp 0xc361e
movw $0xfffd, -0xe(%rbp)     # imm = 0xFFFD
movq -0x18(%rbp), %rax
movw $0x0, 0x1544(%rax)
movq -0x18(%rbp), %rdi
addq $0x1548, %rdi           # imm = 0x1548
leaq -0xe(%rbp), %rsi
callq 0xe7ea0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImGuiIO::AddInputCharactersUTF8(char const*)
void ImGuiIO::AddInputCharactersUTF8(const char* utf8_chars)
{
    while (*utf8_chars != 0)
    {
        unsigned int c = 0;
        utf8_chars += ImTextCharFromUtf8(&c, utf8_chars, NULL);
        if (c != 0)
            InputQueueCharacters.push_back((ImWchar)c);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0xc36bf
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rsi
leaq -0x14(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
callq 0xc36d0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0xc36bd
movq -0x20(%rbp), %rdi
addq $0x1548, %rdi           # imm = 0x1548
movl -0x14(%rbp), %eax
movw %ax, -0x16(%rbp)
leaq -0x16(%rbp), %rsi
callq 0xe7ea0
jmp 0xc3668
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImBezierCubicClosestPoint(ImVec2 const&, ImVec2 const&, ImVec2 const&, ImVec2 const&, ImVec2 const&, int)
ImVec2 ImBezierCubicClosestPoint(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, const ImVec2& p, int num_segments)
{
    IM_ASSERT(num_segments > 0); // Use ImBezierCubicClosestPointCasteljau()
    ImVec2 p_last = p1;
    ImVec2 p_closest;
    float p_closest_dist2 = FLT_MAX;
    float t_step = 1.0f / (float)num_segments;
    for (int i_step = 1; i_step <= num_segments; i_step++)
    {
        ImVec2 p_current = ImBezierCubicCalc(p1, p2, p3, p4, t_step * i_step);
        ImVec2 p_line = ImLineClosestPoint(p_last, p_current, p);
        float dist2 = ImLengthSqr(p - p_line);
        if (dist2 < p_closest_dist2)
        {
            p_closest = p_line;
            p_closest_dist2 = dist2;
        }
        p_last = p_current;
    }
    return p_closest;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movl %r9d, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jle 0xc39a8
jmp 0xc39c7
leaq 0xaf549(%rip), %rdi     # 0x172ef8
leaq 0xaf553(%rip), %rsi     # 0x172f09
movl $0x46d, %edx            # imm = 0x46D
leaq 0xaf55f(%rip), %rcx     # 0x172f21
callq 0xd180
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x3c(%rbp)
leaq -0x8(%rbp), %rdi
callq 0xe7de0
movss 0xae5d1(%rip), %xmm0    # 0x171fb4
movss %xmm0, -0x40(%rbp)
cvtsi2ssl -0x34(%rbp), %xmm1
movss 0xad247(%rip), %xmm0    # 0x170c3c
divss %xmm1, %xmm0
movss %xmm0, -0x44(%rbp)
movl $0x1, -0x48(%rbp)
movl -0x48(%rbp), %eax
cmpl -0x34(%rbp), %eax
jg 0xc3aa6
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movss -0x44(%rbp), %xmm0
cvtsi2ssl -0x48(%rbp), %xmm1
mulss %xmm1, %xmm0
callq 0x112000
movlpd %xmm0, -0x50(%rbp)
movq -0x30(%rbp), %rdx
leaq -0x3c(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0xc3ac0
movlpd %xmm0, -0x58(%rbp)
movq -0x30(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0xc3c00
movlpd %xmm0, -0x64(%rbp)
leaq -0x64(%rbp), %rdi
callq 0xc3bc0
movss %xmm0, -0x5c(%rbp)
movss -0x5c(%rbp), %xmm1
movss -0x40(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0xc3a90
movq -0x58(%rbp), %rax
movq %rax, -0x8(%rbp)
movss -0x5c(%rbp), %xmm0
movss %xmm0, -0x40(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x3c(%rbp)
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0xc3a05
movsd -0x8(%rbp), %xmm0
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImLineClosestPoint(ImVec2 const&, ImVec2 const&, ImVec2 const&)
ImVec2 ImLineClosestPoint(const ImVec2& a, const ImVec2& b, const ImVec2& p)
{
    ImVec2 ap = p - a;
    ImVec2 ab_dir = b - a;
    float dot = ap.x * ab_dir.x + ap.y * ab_dir.y;
    if (dot < 0.0f)
        return a;
    float ab_len_sqr = ab_dir.x * ab_dir.x + ab_dir.y * ab_dir.y;
    if (dot > ab_len_sqr)
        return b;
    return a + ab_dir * dot / ab_len_sqr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xc3c00
movlpd %xmm0, -0x28(%rbp)
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xc3c00
movlpd %xmm0, -0x30(%rbp)
movss -0x28(%rbp), %xmm0
movss -0x30(%rbp), %xmm2
movss -0x24(%rbp), %xmm1
mulss -0x2c(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x34(%rbp)
xorps %xmm0, %xmm0
ucomiss -0x34(%rbp), %xmm0
jbe 0xc3b2f
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0xc3ba8
movss -0x30(%rbp), %xmm0
movss -0x30(%rbp), %xmm2
movss -0x2c(%rbp), %xmm1
mulss -0x2c(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x38(%rbp)
movss -0x34(%rbp), %xmm0
ucomiss -0x38(%rbp), %xmm0
jbe 0xc3b68
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0xc3ba8
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movss -0x34(%rbp), %xmm0
leaq -0x30(%rbp), %rdi
callq 0xc2f50
movlpd %xmm0, -0x48(%rbp)
movss -0x38(%rbp), %xmm0
leaq -0x48(%rbp), %rdi
callq 0xc4200
movq -0x50(%rbp), %rdi
movlpd %xmm0, -0x40(%rbp)
leaq -0x40(%rbp), %rsi
callq 0xc41b0
movlpd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImBezierCubicClosestPointCasteljau(ImVec2 const&, ImVec2 const&, ImVec2 const&, ImVec2 const&, ImVec2 const&, float)
ImVec2 ImBezierCubicClosestPointCasteljau(const ImVec2& p1, const ImVec2& p2, const ImVec2& p3, const ImVec2& p4, const ImVec2& p, float tess_tol)
{
    IM_ASSERT(tess_tol > 0.0f);
    ImVec2 p_last = p1;
    ImVec2 p_closest;
    float p_closest_dist2 = FLT_MAX;
    ImBezierCubicClosestPointCasteljauStep(p, p_closest, p_last, p_closest_dist2, p1.x, p1.y, p2.x, p2.y, p3.x, p3.y, p4.x, p4.y, tess_tol, 0);
    return p_closest;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movss %xmm0, -0x34(%rbp)
movss -0x34(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0xc3c80
jmp 0xc3c9f
leaq 0xaf310(%rip), %rdi     # 0x172f97
leaq 0xaf27b(%rip), %rsi     # 0x172f09
movl $0x4a7, %edx            # imm = 0x4A7
leaq 0xaf30d(%rip), %rcx     # 0x172fa7
callq 0xd180
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
leaq -0x8(%rbp), %rdi
movq %rdi, -0x50(%rbp)
callq 0xe7de0
movq -0x50(%rbp), %rsi
movl $0x7f7fffff, -0x44(%rbp) # imm = 0x7F7FFFFF
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rax
movss (%rax), %xmm0
movss 0x4(%rax), %xmm1
movq -0x18(%rbp), %rax
movss (%rax), %xmm2
movss 0x4(%rax), %xmm3
movq -0x20(%rbp), %rax
movss (%rax), %xmm4
movss 0x4(%rax), %xmm5
movq -0x28(%rbp), %rax
movss (%rax), %xmm6
movss 0x4(%rax), %xmm7
movss -0x34(%rbp), %xmm8
movq %rsp, %rax
movss %xmm8, (%rax)
leaq -0x40(%rbp), %rdx
leaq -0x44(%rbp), %rcx
xorl %r8d, %r8d
callq 0xc3d30
movsd -0x8(%rbp), %xmm0
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImTriangleContainsPoint(ImVec2 const&, ImVec2 const&, ImVec2 const&, ImVec2 const&)
bool ImTriangleContainsPoint(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& p)
{
    bool b1 = ((p.x - b.x) * (a.y - b.y) - (p.y - b.y) * (a.x - b.x)) < 0.0f;
    bool b2 = ((p.x - c.x) * (b.y - c.y) - (p.y - c.y) * (b.x - c.x)) < 0.0f;
    bool b3 = ((p.x - a.x) * (c.y - a.y) - (p.y - a.y) * (c.x - a.x)) < 0.0f;
    return ((b1 == b2) && (b2 == b3));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x20(%rbp), %rax
movss (%rax), %xmm1
movq -0x10(%rbp), %rax
subss (%rax), %xmm1
movq -0x8(%rbp), %rax
movss 0x4(%rax), %xmm2
movq -0x10(%rbp), %rax
subss 0x4(%rax), %xmm2
movq -0x20(%rbp), %rax
movss 0x4(%rax), %xmm0
movq -0x10(%rbp), %rax
subss 0x4(%rax), %xmm0
movq -0x8(%rbp), %rax
movss (%rax), %xmm3
movq -0x10(%rbp), %rax
subss (%rax), %xmm3
mulss %xmm3, %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
mulss %xmm2, %xmm1
addss %xmm0, %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm1, %xmm0
seta %al
andb $0x1, %al
movb %al, -0x21(%rbp)
movq -0x20(%rbp), %rax
movss (%rax), %xmm1
movq -0x18(%rbp), %rax
subss (%rax), %xmm1
movq -0x10(%rbp), %rax
movss 0x4(%rax), %xmm2
movq -0x18(%rbp), %rax
subss 0x4(%rax), %xmm2
movq -0x20(%rbp), %rax
movss 0x4(%rax), %xmm0
movq -0x18(%rbp), %rax
subss 0x4(%rax), %xmm0
movq -0x10(%rbp), %rax
movss (%rax), %xmm3
movq -0x18(%rbp), %rax
subss (%rax), %xmm3
mulss %xmm3, %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
mulss %xmm2, %xmm1
addss %xmm0, %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm1, %xmm0
seta %al
andb $0x1, %al
movb %al, -0x22(%rbp)
movq -0x20(%rbp), %rax
movss (%rax), %xmm1
movq -0x8(%rbp), %rax
subss (%rax), %xmm1
movq -0x18(%rbp), %rax
movss 0x4(%rax), %xmm2
movq -0x8(%rbp), %rax
subss 0x4(%rax), %xmm2
movq -0x20(%rbp), %rax
movss 0x4(%rax), %xmm0
movq -0x8(%rbp), %rax
subss 0x4(%rax), %xmm0
movq -0x18(%rbp), %rax
movss (%rax), %xmm3
movq -0x8(%rbp), %rax
subss (%rax), %xmm3
mulss %xmm3, %xmm0
movd %xmm0, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm0
mulss %xmm2, %xmm1
addss %xmm0, %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm1, %xmm0
seta %al
andb $0x1, %al
movb %al, -0x23(%rbp)
movb -0x21(%rbp), %al
andb $0x1, %al
movzbl %al, %ecx
movb -0x22(%rbp), %al
andb $0x1, %al
movzbl %al, %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x24(%rbp)
jne 0xc43c7
movb -0x22(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movb -0x23(%rbp), %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
sete %al
movb %al, -0x24(%rbp)
movb -0x24(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nop
// File: Ciaxur[P]yagb-emu/include/imgui/imgui.cpp
// Function: ImTriangleBarycentricCoords(ImVec2 const&, ImVec2 const&, ImVec2 const&, ImVec2 const&, float&, float&, float&)
void ImTriangleBarycentricCoords(const ImVec2& a, const ImVec2& b, const ImVec2& c, const ImVec2& p, float& out_u, float& out_v, float& out_w)
{
    ImVec2 v0 = b - a;
    ImVec2 v1 = c - a;
    ImVec2 v2 = p - a;
    const float denom = v0.x * v1.y - v1.x * v0.y;
    out_v = (v2.x * v1.y - v1.x * v2.y) / denom;
    out_w = (v0.x * v2.y - v2.x * v0.y) / denom;
    out_u = 1.0f - out_v - out_w;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0xc3c00
movlpd %xmm0, -0x38(%rbp)
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0xc3c00
movlpd %xmm0, -0x40(%rbp)
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0xc3c00
movlpd %xmm0, -0x48(%rbp)
movss -0x38(%rbp), %xmm0
movss -0x3c(%rbp), %xmm2
movss -0x40(%rbp), %xmm1
mulss -0x34(%rbp), %xmm1
movd %xmm1, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x4c(%rbp)
movss -0x48(%rbp), %xmm0
movss -0x3c(%rbp), %xmm2
movss -0x40(%rbp), %xmm1
mulss -0x44(%rbp), %xmm1
movd %xmm1, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
divss -0x4c(%rbp), %xmm0
movq -0x30(%rbp), %rax
movss %xmm0, (%rax)
movss -0x38(%rbp), %xmm0
movss -0x44(%rbp), %xmm2
movss -0x48(%rbp), %xmm1
mulss -0x34(%rbp), %xmm1
movd %xmm1, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
divss -0x4c(%rbp), %xmm0
movq 0x10(%rbp), %rax
movss %xmm0, (%rax)
movq -0x30(%rbp), %rax
movss 0xac76c(%rip), %xmm0    # 0x170c3c
subss (%rax), %xmm0
movq 0x10(%rbp), %rax
subss (%rax), %xmm0
movq -0x28(%rbp), %rax
movss %xmm0, (%rax)
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0xc3ac0
movlpd %xmm0, -0x30(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0xc3ac0
movlpd %xmm0, -0x38(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0xc3ac0
movlpd %xmm0, -0x40(%rbp)
movq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0xc3c00
movlpd %xmm0, -0x4c(%rbp)
leaq -0x4c(%rbp), %rdi
callq 0xc3bc0
movss %xmm0, -0x44(%rbp)
movq -0x28(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0xc3c00
movlpd %xmm0, -0x58(%rbp)
leaq -0x58(%rbp), %rdi
callq 0xc3bc0
movss %xmm0, -0x50(%rbp)
movq -0x28(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0xc3c00
movlpd %xmm0, -0x64(%rbp)
leaq -0x64(%rbp), %rdi
callq 0xc3bc0
movss %xmm0, -0x5c(%rbp)
movss -0x44(%rbp), %xmm0
movss %xmm0, -0x6c(%rbp)
movss -0x50(%rbp), %xmm0
movss -0x5c(%rbp), %xmm1
callq 0xc4620
movaps %xmm0, %xmm1
movss -0x6c(%rbp), %xmm0
callq 0xc4620
movss %xmm0, -0x68(%rbp)
movss -0x68(%rbp), %xmm0
ucomiss -0x44(%rbp), %xmm0
jne 0xc45ec
jp 0xc45ec
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xc460b
movss -0x68(%rbp), %xmm0
ucomiss -0x50(%rbp), %xmm0
jne 0xc4603
jp 0xc4603
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xc460b
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x1, -0x18(%rbp)
jae 0xc479d
jmp 0xc47c9
cmpq $0x1, -0x18(%rbp)
jbe 0xc47b9
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
subq $0x1, %rdx
callq 0xd150
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rcx
subq $0x1, %rcx
movb $0x0, (%rax,%rcx)
addq $0x20, %rsp
popq %rbp
retq
nop
// File: 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
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xc4898
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0xc48a9
movq -0x8(%rbp), %rdi
callq 0xd410
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0xd410
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0xc48f6
movq -0x8(%rbp), %rdi
callq 0xc4920
movq -0x28(%rbp), %rdi
callq 0xc4820
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xc48f4
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0xc48f6
movq -0x8(%rbp), %rdi
movq %rdi, -0x38(%rbp)
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0xd0a0
movq -0x38(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xc495a
movq 0x14e606(%rip), %rax    # 0x212f40
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xc4958
movq -0x10(%rbp), %rax
movl 0x3b4(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x3b4(%rax)
jmp 0xc495a
movq 0x149c77(%rip), %rax    # 0x20e5d8
movq -0x8(%rbp), %rdi
movq 0x14e5e4(%rip), %rsi    # 0x212f50
callq *%rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0xc4ade
movq -0x20(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rdi
callq 0xd410
movq %rax, %rcx
movq -0x48(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movsbl (%rax), %edi
callq 0xd1a0
movb %al, -0x29(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0xc4b02
movq -0x10(%rbp), %rcx
movb $0x1, %al
cmpb $0x0, (%rcx)
movb %al, -0x49(%rbp)
jne 0xc4b22
xorl %eax, %eax
cmpq $0x0, -0x18(%rbp)
movb %al, -0x4a(%rbp)
je 0xc4b1c
movq -0x10(%rbp), %rax
cmpq -0x18(%rbp), %rax
setb %al
movb %al, -0x4a(%rbp)
movb -0x4a(%rbp), %al
movb %al, -0x49(%rbp)
movb -0x49(%rbp), %al
testb $0x1, %al
jne 0xc4b2e
jmp 0xc4bcd
movq -0x10(%rbp), %rax
movsbl (%rax), %edi
callq 0xd1a0
movsbl -0x29(%rbp), %ecx
cmpl %ecx, %eax
jne 0xc4bbc
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0xc4ba6
movq -0x40(%rbp), %rax
movsbl (%rax), %edi
callq 0xd1a0
movl %eax, -0x50(%rbp)
movq -0x38(%rbp), %rax
movsbl (%rax), %edi
callq 0xd1a0
movl %eax, %ecx
movl -0x50(%rbp), %eax
cmpl %ecx, %eax
je 0xc4b8a
jmp 0xc4ba6
jmp 0xc4b8c
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0xc4b5a
movq -0x38(%rbp), %rax
cmpq -0x28(%rbp), %rax
jne 0xc4bba
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xc4bd5
jmp 0xc4bbc
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0xc4aed
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nop
// File: 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
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %ecx
movb $0x1, %al
cmpl $0x20, %ecx
movb %al, -0x19(%rbp)
je 0xc4c15
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x9, %eax
sete %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0xc4c1e
jmp 0xc4c2c
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0xc4bf4
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0xc4c4e
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0xc4c34
jmp 0xc4c50
movq -0x10(%rbp), %rcx
xorl %eax, %eax
cmpq -0x18(%rbp), %rcx
movb %al, -0x1a(%rbp)
jbe 0xc4c88
movq -0x10(%rbp), %rax
movsbl -0x1(%rax), %ecx
movb $0x1, %al
cmpl $0x20, %ecx
movb %al, -0x1b(%rbp)
je 0xc4c82
movq -0x10(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0x9, %eax
sete %al
movb %al, -0x1b(%rbp)
movb -0x1b(%rbp), %al
movb %al, -0x1a(%rbp)
movb -0x1a(%rbp), %al
testb $0x1, %al
jne 0xc4c91
jmp 0xc4c9f
movq -0x10(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0xc4c50
movq -0x18(%rbp), %rax
cmpq -0x8(%rbp), %rax
je 0xc4cc1
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x10(%rbp), %rdx
movq -0x18(%rbp), %rax
subq %rax, %rdx
callq 0xd170
movq -0x8(%rbp), %rax
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rdx
subq %rdx, %rcx
movb $0x0, (%rax,%rcx)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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
subq $0x100, %rsp            # imm = 0x100
testb %al, %al
je 0xc4d6e
movaps %xmm0, -0xd0(%rbp)
movaps %xmm1, -0xc0(%rbp)
movaps %xmm2, -0xb0(%rbp)
movaps %xmm3, -0xa0(%rbp)
movaps %xmm4, -0x90(%rbp)
movaps %xmm5, -0x80(%rbp)
movaps %xmm6, -0x70(%rbp)
movaps %xmm7, -0x60(%rbp)
movq %r9, -0xd8(%rbp)
movq %r8, -0xe0(%rbp)
movq %rcx, -0xe8(%rbp)
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
leaq -0x40(%rbp), %rax
leaq -0x100(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x18, (%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x40(%rbp), %rcx
callq 0xd690
movl %eax, -0x44(%rbp)
leaq -0x40(%rbp), %rax
cmpq $0x0, -0x10(%rbp)
jne 0xc4dde
movl -0x44(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xc4e0b
cmpl $-0x1, -0x44(%rbp)
je 0xc4def
movl -0x44(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl %ecx, %eax
jl 0xc4df9
movq -0x18(%rbp), %rax
subl $0x1, %eax
movl %eax, -0x44(%rbp)
movq -0x10(%rbp), %rax
movslq -0x44(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movl -0x44(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
nopw (%rax,%rax)
// File: 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
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0xd690
movl %eax, -0x2c(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0xc4e5f
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0xc4e8c
cmpl $-0x1, -0x2c(%rbp)
je 0xc4e70
movl -0x2c(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl %ecx, %eax
jl 0xc4e7a
movq -0x18(%rbp), %rax
subl $0x1, %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl -0x14(%rbp), %eax
xorl $-0x1, %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0xada59(%rip), %rax     # 0x172920
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x10(%rbp)
cmpq $0x0, %rax
je 0xc4f11
movl -0x18(%rbp), %eax
shrl $0x8, %eax
movq -0x28(%rbp), %rcx
movl -0x18(%rbp), %edx
andl $0xff, %edx
movq -0x20(%rbp), %rsi
movq %rsi, %rdi
addq $0x1, %rdi
movq %rdi, -0x20(%rbp)
movzbl (%rsi), %esi
xorl %esi, %edx
movl %edx, %edx
xorl (%rcx,%rdx,4), %eax
movl %eax, -0x18(%rbp)
jmp 0xc4ecb
movl -0x18(%rbp), %eax
xorl $-0x1, %eax
popq %rbp
retq
nopl (%rax)
// File: 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
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl -0x14(%rbp), %eax
xorl $-0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0xad9d3(%rip), %rax     # 0x172920
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0xc4fd7
jmp 0xc4f5a
movq -0x10(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x10(%rbp)
cmpq $0x0, %rax
je 0xc4fd5
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb (%rax), %al
movb %al, -0x29(%rbp)
movzbl -0x29(%rbp), %eax
cmpl $0x23, %eax
jne 0xc4fb2
cmpq $0x2, -0x10(%rbp)
jb 0xc4fb2
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x23, %eax
jne 0xc4fb2
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x23, %eax
jne 0xc4fb2
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
shrl $0x8, %eax
movq -0x28(%rbp), %rcx
movl -0x18(%rbp), %edx
andl $0xff, %edx
movzbl -0x29(%rbp), %esi
xorl %esi, %edx
movl %edx, %edx
xorl (%rcx,%rdx,4), %eax
movl %eax, -0x18(%rbp)
jmp 0xc4f5a
jmp 0xc5040
jmp 0xc4fd9
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movb (%rax), %al
movb %al, -0x2a(%rbp)
cmpb $0x0, -0x2a(%rbp)
je 0xc503e
movzbl -0x2a(%rbp), %eax
cmpl $0x23, %eax
jne 0xc501b
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x23, %eax
jne 0xc501b
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
cmpl $0x23, %eax
jne 0xc501b
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
shrl $0x8, %eax
movq -0x28(%rbp), %rcx
movl -0x18(%rbp), %edx
andl $0xff, %edx
movzbl -0x2a(%rbp), %esi
xorl %esi, %edx
movl %edx, %edx
xorl (%rcx,%rdx,4), %eax
movl %eax, -0x18(%rbp)
jmp 0xc4fd9
jmp 0xc5040
movl -0x18(%rbp), %eax
xorl $-0x1, %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: 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
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x10(%rbp)
movb %al, -0x41(%rbp)
je 0xc51ee
cmpq $0x0, -0x18(%rbp)
setne %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0xc51f7
jmp 0xc51f9
jmp 0xc5218
leaq 0xade28(%rip), %rdi     # 0x173028
leaq 0xadd02(%rip), %rsi     # 0x172f09
movl $0x5f7, %edx            # imm = 0x5F7
leaq 0xade26(%rip), %rcx     # 0x173039
callq 0xd180
cmpq $0x0, -0x20(%rbp)
je 0xc522a
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xc5050
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0xc524e
movq $0x0, -0x8(%rbp)
jmp 0xc531a
movq -0x30(%rbp), %rdi
callq 0xc50b0
movq %rax, -0x38(%rbp)
cmpq $-0x1, -0x38(%rbp)
jne 0xc5278
movq -0x30(%rbp), %rdi
callq 0xc5080
movq $0x0, -0x8(%rbp)
jmp 0xc531a
movq -0x38(%rbp), %rdi
movslq -0x24(%rbp), %rax
addq %rax, %rdi
callq 0xc4820
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0xc52a6
movq -0x30(%rbp), %rdi
callq 0xc5080
movq $0x0, -0x8(%rbp)
jmp 0xc531a
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rdx
movq -0x30(%rbp), %rcx
movl $0x1, %esi
callq 0xc5140
cmpq -0x38(%rbp), %rax
je 0xc52de
movq -0x30(%rbp), %rdi
callq 0xc5080
movq -0x40(%rbp), %rdi
callq 0xc4920
movq $0x0, -0x8(%rbp)
jmp 0xc531a
cmpl $0x0, -0x24(%rbp)
jle 0xc52f7
movq -0x40(%rbp), %rdi
addq -0x38(%rbp), %rdi
movslq -0x24(%rbp), %rdx
xorl %esi, %esi
callq 0xd2f0
movq -0x30(%rbp), %rdi
callq 0xc5080
cmpq $0x0, -0x20(%rbp)
je 0xc5312
movq -0x38(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %rdx
addq $-0x2, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0x3d(%rbp)
jae 0xc53ce
cmpq $0x0, -0x20(%rbp)
je 0xc53c1
movq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpq -0x20(%rbp), %rcx
movb %al, -0x3d(%rbp)
jae 0xc53ce
movq -0x18(%rbp), %rax
cmpb $0x0, (%rax)
setne %al
movb %al, -0x3d(%rbp)
movb -0x3d(%rbp), %al
testb $0x1, %al
jne 0xc53d7
jmp 0xc541d
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x3c(%rbp), %rdi
callq 0xc36d0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
cmpl $0x0, -0x3c(%rbp)
jne 0xc5400
jmp 0xc541d
movl -0x3c(%rbp), %eax
movw %ax, %cx
movq -0x30(%rbp), %rax
movq %rax, %rdx
addq $0x2, %rdx
movq %rdx, -0x30(%rbp)
movw %cx, (%rax)
jmp 0xc5395
movq -0x30(%rbp), %rax
movw $0x0, (%rax)
cmpq $0x0, -0x28(%rbp)
je 0xc5438
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
sarq %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)