// File: /workspace/github_cpp_makefile_star2_O3/Ciaxur[P]yagb-emu/src/../include/imgui_club/imgui_memory_editor/imgui_memory_editor.h
// Function: MemoryEditor::DrawContents(void*, unsigned long, unsigned long)
void DrawContents(void* mem_data_void, size_t mem_size, size_t base_display_addr = 0x0000)
    {
        if (Cols < 1)
            Cols = 1;

        ImU8* mem_data = (ImU8*)mem_data_void;
        Sizes s;
        CalcSizes(s, mem_size, base_display_addr);
        ImGuiStyle& style = ImGui::GetStyle();

        // We begin into our scrolling region with the 'ImGuiWindowFlags_NoMove' in order to prevent click from moving the window.
        // This is used as a facility since our main click detection code doesn't assign an ActiveId so the click would normally be caught as a window-move.
        const float height_separator = style.ItemSpacing.y;
        float footer_height = 0;
        if (OptShowOptions)
            footer_height += height_separator + ImGui::GetFrameHeightWithSpacing() * 1;
        if (OptShowDataPreview)
            footer_height += height_separator + ImGui::GetFrameHeightWithSpacing() * 1 + ImGui::GetTextLineHeightWithSpacing() * 3;
        ImGui::BeginChild("##scrolling", ImVec2(0, -footer_height), false, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoNav);
        ImDrawList* draw_list = ImGui::GetWindowDrawList();

        ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(0, 0));
        ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0, 0));

        // We are not really using the clipper API correctly here, because we rely on visible_start_addr/visible_end_addr for our scrolling function.
        const int line_total_count = (int)((mem_size + Cols - 1) / Cols);
        ImGuiListClipper clipper;
        clipper.Begin(line_total_count, s.LineHeight);
        clipper.Step();
        const size_t visible_start_addr = clipper.DisplayStart * Cols;
        const size_t visible_end_addr = clipper.DisplayEnd * Cols;

        bool data_next = false;

        if (ReadOnly || DataEditingAddr >= mem_size)
            DataEditingAddr = (size_t)-1;
        if (DataPreviewAddr >= mem_size)
            DataPreviewAddr = (size_t)-1;

        size_t preview_data_type_size = OptShowDataPreview ? DataTypeGetSize(PreviewDataType) : 0;

        size_t data_editing_addr_backup = DataEditingAddr;
        size_t data_editing_addr_next = (size_t)-1;
        if (DataEditingAddr != (size_t)-1)
        {
            // Move cursor but only apply on next frame so scrolling with be synchronized (because currently we can't change the scrolling while the window is being rendered)
            if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_UpArrow)) && DataEditingAddr >= (size_t)Cols)          { data_editing_addr_next = DataEditingAddr - Cols; DataEditingTakeFocus = true; }
            else if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_DownArrow)) && DataEditingAddr < mem_size - Cols) { data_editing_addr_next = DataEditingAddr + Cols; DataEditingTakeFocus = true; }
            else if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_LeftArrow)) && DataEditingAddr > 0)               { data_editing_addr_next = DataEditingAddr - 1; DataEditingTakeFocus = true; }
            else if (ImGui::IsKeyPressed(ImGui::GetKeyIndex(ImGuiKey_RightArrow)) && DataEditingAddr < mem_size - 1)   { data_editing_addr_next = DataEditingAddr + 1; DataEditingTakeFocus = true; }
        }
        if (data_editing_addr_next != (size_t)-1 && (data_editing_addr_next / Cols) != (data_editing_addr_backup / Cols))
        {
            // Track cursor movements
            const int scroll_offset = ((int)(data_editing_addr_next / Cols) - (int)(data_editing_addr_backup / Cols));
            const bool scroll_desired = (scroll_offset < 0 && data_editing_addr_next < visible_start_addr + Cols * 2) || (scroll_offset > 0 && data_editing_addr_next > visible_end_addr - Cols * 2);
            if (scroll_desired)
                ImGui::SetScrollY(ImGui::GetScrollY() + scroll_offset * s.LineHeight);
        }

        // Draw vertical separator
        ImVec2 window_pos = ImGui::GetWindowPos();
        if (OptShowAscii)
            draw_list->AddLine(ImVec2(window_pos.x + s.PosAsciiStart - s.GlyphWidth, window_pos.y), ImVec2(window_pos.x + s.PosAsciiStart - s.GlyphWidth, window_pos.y + 9999), ImGui::GetColorU32(ImGuiCol_Border));

        const ImU32 color_text = ImGui::GetColorU32(ImGuiCol_Text);
        const ImU32 color_disabled = OptGreyOutZeroes ? ImGui::GetColorU32(ImGuiCol_TextDisabled) : color_text;

        const char* format_address = OptUpperCaseHex ? "%0*" _PRISizeT "X: " : "%0*" _PRISizeT "x: ";
        const char* format_data = OptUpperCaseHex ? "%0*" _PRISizeT "X" : "%0*" _PRISizeT "x";
        const char* format_byte = OptUpperCaseHex ? "%02X" : "%02x";
        const char* format_byte_space = OptUpperCaseHex ? "%02X " : "%02x ";

        for (int line_i = clipper.DisplayStart; line_i < clipper.DisplayEnd; line_i++) // display only visible lines
        {
            size_t addr = (size_t)(line_i * Cols);
            ImGui::Text(format_address, s.AddrDigitsCount, base_display_addr + addr);

            // Draw Hexadecimal
            for (int n = 0; n < Cols && addr < mem_size; n++, addr++)
            {
                float byte_pos_x = s.PosHexStart + s.HexCellWidth * n;
                if (OptMidColsCount > 0)
                    byte_pos_x += (float)(n / OptMidColsCount) * s.SpacingBetweenMidCols;
                ImGui::SameLine(byte_pos_x);

                // Draw highlight
                bool is_highlight_from_user_range = (addr >= HighlightMin && addr < HighlightMax);
                bool is_highlight_from_user_func = (HighlightFn && HighlightFn(mem_data, addr));
                bool is_highlight_from_preview = (addr >= DataPreviewAddr && addr < DataPreviewAddr + preview_data_type_size);
                if (is_highlight_from_user_range || is_highlight_from_user_func || is_highlight_from_preview)
                {
                    ImVec2 pos = ImGui::GetCursorScreenPos();
                    float highlight_width = s.GlyphWidth * 2;
                    bool is_next_byte_highlighted =  (addr + 1 < mem_size) && ((HighlightMax != (size_t)-1 && addr + 1 < HighlightMax) || (HighlightFn && HighlightFn(mem_data, addr + 1)));
                    if (is_next_byte_highlighted || (n + 1 == Cols))
                    {
                        highlight_width = s.HexCellWidth;
                        if (OptMidColsCount > 0 && n > 0 && (n + 1) < Cols && ((n + 1) % OptMidColsCount) == 0)
                            highlight_width += s.SpacingBetweenMidCols;
                    }
                    draw_list->AddRectFilled(pos, ImVec2(pos.x + highlight_width, pos.y + s.LineHeight), HighlightColor);
                }

                if (DataEditingAddr == addr)
                {
                    // Display text input on current byte
                    bool data_write = false;
                    ImGui::PushID((void*)addr);
                    if (DataEditingTakeFocus)
                    {
                        ImGui::SetKeyboardFocusHere();
                        ImGui::CaptureKeyboardFromApp(true);
                        sprintf(AddrInputBuf, format_data, s.AddrDigitsCount, base_display_addr + addr);
                        sprintf(DataInputBuf, format_byte, ReadFn ? ReadFn(mem_data, addr) : mem_data[addr]);
                    }
                    ImGui::PushItemWidth(s.GlyphWidth * 2);
                    struct UserData
                    {
                        // FIXME: We should have a way to retrieve the text edit cursor position more easily in the API, this is rather tedious. This is such a ugly mess we may be better off not using InputText() at all here.
                        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;
                        }
                        char   CurrentBufOverwrite[3];  // Input
                        int    CursorPos;               // Output
                    };
                    UserData user_data;
                    user_data.CursorPos = -1;
                    sprintf(user_data.CurrentBufOverwrite, format_byte, ReadFn ? ReadFn(mem_data, addr) : mem_data[addr]);
                    ImGuiInputTextFlags flags = ImGuiInputTextFlags_CharsHexadecimal | ImGuiInputTextFlags_EnterReturnsTrue | ImGuiInputTextFlags_AutoSelectAll | ImGuiInputTextFlags_NoHorizontalScroll | ImGuiInputTextFlags_AlwaysInsertMode | ImGuiInputTextFlags_CallbackAlways;
                    if (ImGui::InputText("##data", DataInputBuf, 32, flags, UserData::Callback, &user_data))
                        data_write = data_next = true;
                    else if (!DataEditingTakeFocus && !ImGui::IsItemActive())
                        DataEditingAddr = data_editing_addr_next = (size_t)-1;
                    DataEditingTakeFocus = false;
                    ImGui::PopItemWidth();
                    if (user_data.CursorPos >= 2)
                        data_write = data_next = true;
                    if (data_editing_addr_next != (size_t)-1)
                        data_write = data_next = false;
                    unsigned int data_input_value = 0;
                    if (data_write && sscanf(DataInputBuf, "%X", &data_input_value) == 1)
                    {
                        if (WriteFn)
                            WriteFn(mem_data, addr, (ImU8)data_input_value);
                        else
                            mem_data[addr] = (ImU8)data_input_value;
                    }
                    ImGui::PopID();
                }
                else
                {
                    // NB: The trailing space is not visible but ensure there's no gap that the mouse cannot click on.
                    ImU8 b = ReadFn ? ReadFn(mem_data, addr) : mem_data[addr];

                    if (OptShowHexII)
                    {
                        if ((b >= 32 && b < 128))
                            ImGui::Text(".%c ", b);
                        else if (b == 0xFF && OptGreyOutZeroes)
                            ImGui::TextDisabled("## ");
                        else if (b == 0x00)
                            ImGui::Text("   ");
                        else
                            ImGui::Text(format_byte_space, b);
                    }
                    else
                    {
                        if (b == 0 && OptGreyOutZeroes)
                            ImGui::TextDisabled("00 ");
                        else
                            ImGui::Text(format_byte_space, b);
                    }
                    if (!ReadOnly && ImGui::IsItemHovered() && ImGui::IsMouseClicked(0))
                    {
                        DataEditingTakeFocus = true;
                        data_editing_addr_next = addr;
                    }
                }
            }

            if (OptShowAscii)
            {
                // Draw ASCII values
                ImGui::SameLine(s.PosAsciiStart);
                ImVec2 pos = ImGui::GetCursorScreenPos();
                addr = line_i * Cols;
                ImGui::PushID(line_i);
                if (ImGui::InvisibleButton("ascii", ImVec2(s.PosAsciiEnd - s.PosAsciiStart, s.LineHeight)))
                {
                    DataEditingAddr = DataPreviewAddr = addr + (size_t)((ImGui::GetIO().MousePos.x - pos.x) / s.GlyphWidth);
                    DataEditingTakeFocus = true;
                }
                ImGui::PopID();
                for (int n = 0; n < Cols && addr < mem_size; n++, addr++)
                {
                    if (addr == DataEditingAddr)
                    {
                        draw_list->AddRectFilled(pos, ImVec2(pos.x + s.GlyphWidth, pos.y + s.LineHeight), ImGui::GetColorU32(ImGuiCol_FrameBg));
                        draw_list->AddRectFilled(pos, ImVec2(pos.x + s.GlyphWidth, pos.y + s.LineHeight), ImGui::GetColorU32(ImGuiCol_TextSelectedBg));
                    }
                    unsigned char c = ReadFn ? ReadFn(mem_data, addr) : mem_data[addr];
                    char display_c = (c < 32 || c >= 128) ? '.' : c;
                    draw_list->AddText(pos, (display_c == c) ? color_text : color_disabled, &display_c, &display_c + 1);
                    pos.x += s.GlyphWidth;
                }
            }
        }
        IM_ASSERT(clipper.Step() == false);
        clipper.End();
        ImGui::PopStyleVar(2);
        ImGui::EndChild();

        if (data_next && DataEditingAddr < mem_size)
        {
            DataEditingAddr = DataPreviewAddr = DataEditingAddr + 1;
            DataEditingTakeFocus = true;
        }
        else if (data_editing_addr_next != (size_t)-1)
        {
            DataEditingAddr = DataPreviewAddr = data_editing_addr_next;
        }

        const bool lock_show_data_preview = OptShowDataPreview;
        if (OptShowOptions)
        {
            ImGui::Separator();
            DrawOptionsLine(s, mem_data, mem_size, base_display_addr);
        }

        if (lock_show_data_preview)
        {
            ImGui::Separator();
            DrawPreviewLine(s, mem_data, mem_size, base_display_addr);
        }

        // Notify the main window of our ideal child content size (FIXME: we are missing an API to get the contents size from the child)
        ImGui::SetCursorPosX(s.WindowWidth);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rcx, %r12
movq %rdx, %r15
movq %rsi, -0x48(%rbp)
movq %rdi, %r13
cmpl $0x0, 0x4(%rdi)
jg 0x3e97f
movl $0x1, 0x4(%r13)
xorps %xmm0, %xmm0
leaq -0xa0(%rbp), %rsi
movaps %xmm0, 0x10(%rsi)
movaps %xmm0, (%rsi)
movq $0x0, 0x20(%rsi)
movq %r13, %rdi
movq %r15, %rdx
movq %r12, %rcx
callq 0x3e806
callq 0x43b94
movss 0x4c(%rax), %xmm0
movss %xmm0, -0x30(%rbp)
xorps %xmm1, %xmm1
cmpb $0x1, 0x8(%r13)
jne 0x3e9d0
callq 0x56320
addss -0x30(%rbp), %xmm0
xorps %xmm1, %xmm1
addss %xmm0, %xmm1
cmpb $0x1, 0x9(%r13)
jne 0x3ea0e
movaps %xmm1, -0xc0(%rbp)
callq 0x56320
movss -0x30(%rbp), %xmm1
addss %xmm0, %xmm1
movss %xmm1, -0x30(%rbp)
callq 0x562e2
movaps -0xc0(%rbp), %xmm1
mulss 0x765eb(%rip), %xmm0    # 0xb4ff0
addss -0x30(%rbp), %xmm0
addss %xmm0, %xmm1
xorps 0x765ab(%rip), %xmm1    # 0xb4fc0
leaq -0xe4(%rbp), %rbx
movl $0x0, (%rbx)
movss %xmm1, 0x4(%rbx)
leaq 0x768f0(%rip), %rdi     # 0xb531e
xorl %r14d, %r14d
movq %rbx, %rsi
xorl %edx, %edx
movl $0xc0004, %ecx          # imm = 0xC0004
callq 0x5207d
callq 0x54730
movq %rax, -0xc0(%rbp)
movq %r14, (%rbx)
movl $0xa, %edi
movq %rbx, %rsi
callq 0x4417f
movq %r14, (%rbx)
leaq -0xe4(%rbp), %rsi
movl $0xd, %edi
callq 0x4417f
movslq 0x4(%r13), %rcx
leaq (%r15,%rcx), %rax
decq %rax
xorl %edx, %edx
divq %rcx
movq %rax, %rbx
leaq -0xe4(%rbp), %r14
movq %r14, %rdi
callq 0x4374c
movss -0x9c(%rbp), %xmm0
movq %r14, %rdi
movl %ebx, %esi
callq 0x4378e
leaq -0xe4(%rbp), %rdi
callq 0x43932
movq 0x48(%r13), %rbx
cmpq %r15, %rbx
setae %al
orb 0x1(%r13), %al
cmpb $0x1, %al
jne 0x3ead1
movq $-0x1, 0x48(%r13)
movq $-0x1, %rbx
cmpq %r15, 0x40(%r13)
jb 0x3eadf
movq $-0x1, 0x40(%r13)
movslq -0xe4(%rbp), %rax
movq %rax, -0x68(%rbp)
movslq 0x4(%r13), %rax
movq %rax, -0x58(%rbp)
movslq -0xe0(%rbp), %r14
cmpb $0x1, 0x9(%r13)
jne 0x3eb25
movl 0xb4(%r13), %eax
cmpq $0xa, %rax
jae 0x3f5c2
leaq 0x76bc8(%rip), %rcx     # 0xb56e0
movq (%rcx,%rax,8), %rax
movq %rax, -0xf8(%rbp)
jmp 0x3eb30
movq $0x0, -0xf8(%rbp)
movq %r13, -0x30(%rbp)
movq $-0x1, -0x50(%rbp)
cmpq $-0x1, %rbx
je 0x3ec66
movl $0x3, %edi
callq 0x51450
movl %eax, %edi
movl $0x1, %esi
callq 0x51580
testb %al, %al
je 0x3eb75
movq -0x30(%rbp), %rax
movq 0x48(%rax), %r13
movslq 0x4(%rax), %rax
subq %rax, %r13
jae 0x3ec0d
movl $0x4, %edi
callq 0x51450
movl %eax, %edi
movl $0x1, %esi
callq 0x51580
testb %al, %al
je 0x3ebab
movq -0x30(%rbp), %rax
movq 0x48(%rax), %r13
movslq 0x4(%rax), %rax
movq %r15, %rcx
subq %rax, %rcx
cmpq %rcx, %r13
jae 0x3ebab
addq %rax, %r13
jmp 0x3ec0d
movl $0x1, %edi
callq 0x51450
movl %eax, %edi
movl $0x1, %esi
callq 0x51580
testb %al, %al
je 0x3ebdf
movq -0x30(%rbp), %rax
movq 0x48(%rax), %r13
testq %r13, %r13
je 0x3ebdf
decq %r13
movq -0x30(%rbp), %rax
movb $0x1, 0x50(%rax)
jmp 0x3ec1b
movl $0x2, %edi
callq 0x51450
movl %eax, %edi
movl $0x1, %esi
callq 0x51580
testb %al, %al
je 0x3ec66
leaq -0x1(%r15), %rax
movq -0x30(%rbp), %rcx
movq 0x48(%rcx), %r13
cmpq %rax, %r13
jae 0x3ec66
incq %r13
movq -0x30(%rbp), %rax
movb $0x1, 0x50(%rax)
cmpq $-0x1, %r13
je 0x3ec66
movq %r14, %rsi
movq -0x30(%rbp), %rax
movslq 0x4(%rax), %rcx
movq %r13, %rax
xorl %edx, %edx
divq %rcx
movq %rax, %r14
movq %rbx, %rax
xorl %edx, %edx
divq %rcx
cmpq %rax, %r14
je 0x3ec62
movq -0x58(%rbp), %rdx
imulq %rdx, %rsi
subl %eax, %r14d
js 0x3f56a
je 0x3ec62
addl %ecx, %ecx
movslq %ecx, %rax
subq %rax, %rsi
cmpq %rsi, %r13
ja 0x3f57c
movq %r13, -0x50(%rbp)
callq 0x5434c
movq -0x30(%rbp), %r13
cmpb $0x1, 0xb(%r13)
jne 0x3ecda
movss -0x84(%rbp), %xmm1
addss %xmm0, %xmm1
subss -0x98(%rbp), %xmm1
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movss %xmm1, -0x38(%rbp)
movss %xmm0, -0x34(%rbp)
addss 0x76354(%rip), %xmm0    # 0xb4ff4
movss %xmm1, -0x40(%rbp)
movss %xmm0, -0x3c(%rbp)
movss 0x76332(%rip), %xmm0    # 0xb4fe4
movl $0x5, %edi
callq 0x43bca
leaq -0x38(%rbp), %rsi
leaq -0x40(%rbp), %rdx
movss 0x76318(%rip), %xmm0    # 0xb4fe4
movq -0xc0(%rbp), %rdi
movl %eax, %ecx
callq 0x78368
movss 0x76302(%rip), %xmm0    # 0xb4fe4
xorl %edi, %edi
callq 0x43bca
movl %eax, %ebx
cmpb $0x1, 0xc(%r13)
movl %eax, -0x6c(%rbp)
jne 0x3ed0a
movss 0x762e7(%rip), %xmm0    # 0xb4fe4
movl $0x1, %edi
callq 0x43bca
movl %eax, -0x6c(%rbp)
leaq 0x76619(%rip), %rax     # 0xb532a
leaq 0x7661a(%rip), %rcx     # 0xb5332
cmpb $0x0, 0xd(%r13)
cmovneq %rax, %rcx
movq %rcx, -0x108(%rbp)
leaq 0x7673e(%rip), %rax     # 0xb546d
leaq 0x7674a(%rip), %rcx     # 0xb5480
cmovneq %rax, %rcx
movq %rcx, -0x118(%rbp)
leaq 0x937ba(%rip), %rax     # 0xd2502
leaq 0x76855(%rip), %rcx     # 0xb55a4
cmovneq %rax, %rcx
movq %rcx, -0xf0(%rbp)
leaq 0x765d9(%rip), %rax     # 0xb533a
leaq 0x765d8(%rip), %rcx     # 0xb5340
cmovneq %rax, %rcx
movq %rcx, -0xa8(%rbp)
movl -0xe4(%rbp), %eax
cmpl -0xe0(%rbp), %eax
jge 0x3f48e
movl %eax, %ecx
leaq 0x71(%r13), %rax
movq %rax, -0x110(%rbp)
leaq 0x51(%r13), %rax
movq %rax, -0x68(%rbp)
movl 0x4(%r13), %eax
movl $0x0, -0x58(%rbp)
movl %ebx, -0xc4(%rbp)
movl %ecx, %ebx
movq %r12, -0x120(%rbp)
movq %r15, -0x100(%rbp)
imull %ebx, %eax
movslq %eax, %r13
movl -0xa0(%rbp), %esi
leaq (%r12,%r13), %rdx
movq -0x108(%rbp), %rdi
xorl %eax, %eax
callq 0x90323
movq -0x30(%rbp), %rax
movl 0x4(%rax), %eax
testl %eax, %eax
movl %ebx, -0x5c(%rbp)
jle 0x3f265
cmpq %r15, %r13
jae 0x3f265
xorl %ebx, %ebx
xorps %xmm0, %xmm0
cvtsi2ss %ebx, %xmm0
mulss -0x94(%rbp), %xmm0
addss -0x8c(%rbp), %xmm0
movq -0x30(%rbp), %rax
movl 0x10(%rax), %ecx
testl %ecx, %ecx
jle 0x3ee31
movl %ebx, %eax
xorl %edx, %edx
divl %ecx
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
mulss -0x90(%rbp), %xmm1
addss %xmm1, %xmm0
movss 0x76197(%rip), %xmm1    # 0xb4fd0
callq 0x5591d
movq -0x30(%rbp), %rcx
cmpq 0xa0(%rcx), %r13
setae %r14b
movq 0x30(%rcx), %rax
cmpq 0xa8(%rcx), %r13
setb %r15b
testq %rax, %rax
je 0x3ee6c
movq -0x48(%rbp), %rdi
movq %r13, %rsi
callq *%rax
jmp 0x3ee6e
xorl %eax, %eax
andb %r15b, %r14b
movq -0x30(%rbp), %rcx
movq 0x40(%rcx), %rdx
cmpq %rdx, %r13
setae %cl
addq -0xf8(%rbp), %rdx
cmpq %rdx, %r13
setb %dl
orb %al, %r14b
movq -0x100(%rbp), %r15
jne 0x3eea0
andb %dl, %cl
je 0x3ef7d
callq 0x559ee
movlps %xmm0, -0x38(%rbp)
movss -0x98(%rbp), %xmm0
movss %xmm0, -0xc8(%rbp)
leaq 0x1(%r13), %rsi
cmpq %r15, %rsi
jae 0x3eeef
movq -0x30(%rbp), %rax
movq 0xa8(%rax), %rax
cmpq $-0x1, %rax
je 0x3eed8
cmpq %rax, %rsi
jb 0x3eefb
movq -0x30(%rbp), %rax
movq 0x30(%rax), %rax
testq %rax, %rax
je 0x3eeef
movq -0x48(%rbp), %rdi
callq *%rax
testb %al, %al
jne 0x3eefb
leal 0x1(%rbx), %eax
movq -0x30(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jne 0x3ef31
movss -0x94(%rbp), %xmm0
movq -0x30(%rbp), %rsi
movl 0x10(%rsi), %ecx
testl %ecx, %ecx
setle %al
testl %ebx, %ebx
sete %dl
orb %al, %dl
jne 0x3ef2c
leal 0x1(%rbx), %eax
cmpl 0x4(%rsi), %eax
jge 0x3ef2c
xorl %edx, %edx
divl %ecx
testl %edx, %edx
je 0x3f255
movaps %xmm0, %xmm1
jmp 0x3ef3d
movss -0xc8(%rbp), %xmm1
addss %xmm1, %xmm1
addss -0x38(%rbp), %xmm1
movss -0x34(%rbp), %xmm0
addss -0x9c(%rbp), %xmm0
movss %xmm1, -0x40(%rbp)
movss %xmm0, -0x3c(%rbp)
movq -0x30(%rbp), %rax
movl 0x18(%rax), %ecx
xorps %xmm0, %xmm0
movq -0xc0(%rbp), %rdi
leaq -0x38(%rbp), %rsi
leaq -0x40(%rbp), %rdx
movl $0xf, %r8d
callq 0x785e6
movq -0x30(%rbp), %rax
cmpq 0x48(%rax), %r13
jne 0x3eff0
movq %r13, %rdi
callq 0x54d60
movq -0x50(%rbp), %r15
movq -0x30(%rbp), %rax
cmpb $0x1, 0x50(%rax)
jne 0x3f0e7
xorl %edi, %edi
callq 0x54973
movl $0x1, %edi
callq 0x519be
movl -0xa0(%rbp), %edx
leaq (%r12,%r13), %rcx
movq -0x110(%rbp), %rdi
movq -0x118(%rbp), %rsi
xorl %eax, %eax
callq 0xc880
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
testq %rax, %rax
je 0x3f0ca
movq -0x48(%rbp), %rdi
movq %r13, %rsi
callq *%rax
jmp 0x3f0d2
movq 0x20(%rax), %rax
testq %rax, %rax
je 0x3f004
movq -0x48(%rbp), %rdi
movq %r13, %rsi
callq *%rax
jmp 0x3f00c
movq -0x48(%rbp), %rax
movb (%rax,%r13), %al
movzbl %al, %esi
movq -0x30(%rbp), %rcx
cmpb $0x1, 0xa(%rcx)
jne 0x3f055
leaq 0x7632d(%rip), %rdi     # 0xb534d
cmpb $0x1f, %al
jg 0x3f084
testl %esi, %esi
je 0x3f242
movq -0xa8(%rbp), %rdi
cmpl $0xff, %esi
jne 0x3f084
movq -0x30(%rbp), %rax
cmpb $0x0, 0xc(%rax)
leaq 0x76308(%rip), %rax     # 0xb5352
movq -0xa8(%rbp), %rdi
jne 0x3f078
jmp 0x3f084
movq -0xa8(%rbp), %rdi
testl %esi, %esi
jne 0x3f084
movq -0x30(%rbp), %rax
cmpb $0x1, 0xc(%rax)
leaq 0x762e7(%rip), %rax     # 0xb5356
movq -0xa8(%rbp), %rdi
jne 0x3f084
movq %rax, %rdi
xorl %eax, %eax
callq 0x904f1
jmp 0x3f08b
xorl %eax, %eax
callq 0x90323
movq -0x30(%rbp), %rax
cmpb $0x0, 0x1(%rax)
jne 0x3f227
xorl %edi, %edi
callq 0x461ed
testb %al, %al
je 0x3f227
xorl %edi, %edi
xorl %esi, %esi
callq 0x51653
testb %al, %al
je 0x3f227
movq -0x30(%rbp), %rax
movb $0x1, 0x50(%rax)
movq %r13, -0x50(%rbp)
jmp 0x3f227
movq -0x48(%rbp), %rax
movb (%rax,%r13), %al
movzbl %al, %edx
movq -0x68(%rbp), %rdi
movq -0xf0(%rbp), %rsi
xorl %eax, %eax
callq 0xc880
movss -0x98(%rbp), %xmm0
addss %xmm0, %xmm0
callq 0x55d0a
movl $0xffffffff, -0x34(%rbp) # imm = 0xFFFFFFFF
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
testq %rax, %rax
je 0x3f117
movq -0x48(%rbp), %rdi
movq %r13, %rsi
callq *%rax
jmp 0x3f11f
movq -0x48(%rbp), %rax
movb (%rax,%r13), %al
movzbl %al, %edx
leaq -0x38(%rbp), %r14
movq %r14, %rdi
movq -0xf0(%rbp), %rsi
xorl %eax, %eax
callq 0xc880
movl $0x20, %edx
leaq 0x76203(%rip), %rdi     # 0xb5346
movq -0x68(%rbp), %rsi
movl $0x3132, %ecx           # imm = 0x3132
leaq 0x4d7(%rip), %r8        # 0x3f62a
movq %r14, %r9
callq 0x9b17a
movl %eax, %r14d
testb %al, %al
je 0x3f169
movb $0x1, %al
movl %eax, -0x58(%rbp)
jmp 0x3f18f
movq -0x30(%rbp), %rax
cmpb $0x0, 0x50(%rax)
jne 0x3f18f
callq 0x519e4
testb %al, %al
jne 0x3f18f
movq -0x30(%rbp), %rax
movq $-0x1, 0x48(%rax)
movq $-0x1, %r15
movq -0x30(%rbp), %rax
movb $0x0, 0x50(%rax)
callq 0x560da
cmpl $0x2, -0x34(%rbp)
movq %r15, %rax
setge %r15b
orb %r15b, %r14b
movq %rax, -0x50(%rbp)
cmpq $-0x1, %rax
sete %r12b
andb %r12b, %r14b
movl $0x0, -0x40(%rbp)
cmpb $0x1, %r14b
jne 0x3f207
movq -0x68(%rbp), %rdi
leaq 0x7a344(%rip), %rsi     # 0xb9515
leaq -0x40(%rbp), %rdx
xorl %eax, %eax
callq 0xc0c0
cmpl $0x1, %eax
jne 0x3f207
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rax
movb -0x40(%rbp), %cl
testq %rax, %rax
je 0x3f1ff
movzbl %cl, %edx
movq -0x48(%rbp), %rdi
movq %r13, %rsi
callq *%rax
jmp 0x3f207
movq -0x48(%rbp), %rax
movb %cl, (%rax,%r13)
callq 0x55082
orb -0x58(%rbp), %r15b
andb %r15b, %r12b
movl %r12d, %eax
movl %eax, -0x58(%rbp)
movq -0x120(%rbp), %r12
movq -0x100(%rbp), %r15
incl %ebx
movq -0x30(%rbp), %rax
movl 0x4(%rax), %eax
cmpl %eax, %ebx
jge 0x3f265
incq %r13
cmpq %r15, %r13
jb 0x3edf6
jmp 0x3f265
leaq 0x79fb5(%rip), %rdi     # 0xb91fe
xorl %eax, %eax
callq 0x90323
jmp 0x3f08b
movaps %xmm0, %xmm1
addss -0x90(%rbp), %xmm1
jmp 0x3ef3d
movq -0x30(%rbp), %r13
cmpb $0x0, 0xb(%r13)
je 0x3f47b
movss -0x84(%rbp), %xmm0
movss 0x75d4c(%rip), %xmm1    # 0xb4fd0
callq 0x5591d
callq 0x559ee
movq -0x30(%rbp), %r13
movlps %xmm0, -0x38(%rbp)
movslq 0x4(%r13), %rbx
movl -0x5c(%rbp), %edi
callq 0x54e5e
movss -0x9c(%rbp), %xmm0
movss -0x80(%rbp), %xmm1
subss -0x84(%rbp), %xmm1
movss %xmm1, -0x40(%rbp)
movss %xmm0, -0x3c(%rbp)
leaq 0x76092(%rip), %rdi     # 0xb535a
leaq -0x40(%rbp), %rsi
xorl %edx, %edx
callq 0x9147d
movslq -0x5c(%rbp), %rcx
imulq %rcx, %rbx
testb %al, %al
je 0x3f328
callq 0x4714d
movss 0x120(%rax), %xmm0
subss -0x38(%rbp), %xmm0
divss -0x98(%rbp), %xmm0
cvttss2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subss 0x75ceb(%rip), %xmm0    # 0xb4ff8
cvttss2si %xmm0, %rdx
andq %rcx, %rdx
orq %rax, %rdx
addq %rbx, %rdx
movq %rdx, 0x40(%r13)
movq %rdx, 0x48(%r13)
movb $0x1, 0x50(%r13)
callq 0x55082
movl 0x4(%r13), %eax
testl %eax, %eax
jle 0x3f47b
cmpq %r15, %rbx
jae 0x3f47b
movl $0x1, %r14d
cmpq 0x48(%r13), %rbx
jne 0x3f3fc
movss -0x38(%rbp), %xmm0
movss -0x34(%rbp), %xmm1
addss -0x98(%rbp), %xmm0
addss -0x9c(%rbp), %xmm1
movss %xmm0, -0x40(%rbp)
movss %xmm1, -0x3c(%rbp)
movl $0x7, %edi
movss 0x75c61(%rip), %xmm0    # 0xb4fe4
callq 0x43bca
xorps %xmm0, %xmm0
movq -0xc0(%rbp), %rdi
leaq -0x38(%rbp), %rsi
leaq -0x40(%rbp), %rdx
movl %eax, %ecx
movl $0xf, %r8d
callq 0x785e6
movss -0x38(%rbp), %xmm0
movss -0x34(%rbp), %xmm1
addss -0x98(%rbp), %xmm0
addss -0x9c(%rbp), %xmm1
movss %xmm0, -0x40(%rbp)
movss %xmm1, -0x3c(%rbp)
movl $0x2f, %edi
movss 0x75c0c(%rip), %xmm0    # 0xb4fe4
callq 0x43bca
xorps %xmm0, %xmm0
movq -0xc0(%rbp), %rdi
leaq -0x38(%rbp), %rsi
leaq -0x40(%rbp), %rdx
movl %eax, %ecx
movl $0xf, %r8d
callq 0x785e6
movq 0x20(%r13), %rax
testq %rax, %rax
je 0x3f410
movq -0x48(%rbp), %rdi
movq %rbx, %rsi
callq *%rax
jmp 0x3f417
movq -0x48(%rbp), %rax
movb (%rax,%rbx), %al
movzbl %al, %eax
cmpb $0x20, %al
movl %eax, %ecx
movl $0x2e, %edx
cmovll %edx, %ecx
movb %cl, -0x40(%rbp)
movsbl %cl, %ecx
movl -0xc4(%rbp), %edx
cmpl %eax, %ecx
je 0x3f439
movl -0x6c(%rbp), %edx
movq -0xc0(%rbp), %rdi
leaq -0x38(%rbp), %rsi
leaq -0x40(%rbp), %rcx
leaq -0x3f(%rbp), %r8
callq 0x79e70
movss -0x98(%rbp), %xmm0
addss -0x38(%rbp), %xmm0
movss %xmm0, -0x38(%rbp)
movl 0x4(%r13), %eax
cmpl %eax, %r14d
jge 0x3f47b
incq %rbx
incl %r14d
cmpq %r15, %rbx
jb 0x3f348
movl -0x5c(%rbp), %ebx
incl %ebx
cmpl -0xe0(%rbp), %ebx
jl 0x3edbb
jmp 0x3f495
movl $0x0, -0x58(%rbp)
leaq -0xe4(%rbp), %rdi
callq 0x43932
testb %al, %al
jne 0x3f5a3
leaq -0xe4(%rbp), %rdi
callq 0x43802
movl $0x2, %edi
callq 0x44325
callq 0x52109
testb $0x1, -0x58(%rbp)
je 0x3f4e5
movq 0x48(%r13), %rax
cmpq %r15, %rax
jae 0x3f4e5
incq %rax
movq %rax, 0x40(%r13)
movq %rax, 0x48(%r13)
movb $0x1, 0x50(%r13)
jmp 0x3f4f7
movq -0x50(%rbp), %rax
cmpq $-0x1, %rax
je 0x3f4f7
movq %rax, 0x40(%r13)
movq %rax, 0x48(%r13)
movb 0x9(%r13), %bl
cmpb $0x1, 0x8(%r13)
jne 0x3f520
callq 0x93890
leaq -0xa0(%rbp), %rsi
movq %r13, %rdi
movq -0x48(%rbp), %rdx
movq %r15, %rcx
movq %r12, %r8
callq 0x3f682
testb %bl, %bl
je 0x3f542
callq 0x93890
leaq -0xa0(%rbp), %rsi
movq %r13, %rdi
movq -0x48(%rbp), %rdx
movq %r15, %rcx
movq %r12, %r8
callq 0x3f94c
movss -0x7c(%rbp), %xmm0
callq 0x55b87
leaq -0xe4(%rbp), %rdi
callq 0x43764
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
imulq -0x68(%rbp), %rdx
leaq (%rdx,%rcx,2), %rax
cmpq %rax, %r13
jae 0x3ec62
callq 0x56910
cvtsi2ss %r14d, %xmm1
mulss -0x9c(%rbp), %xmm1
addss %xmm0, %xmm1
movaps %xmm1, %xmm0
callq 0x569a5
movq %r13, -0x50(%rbp)
jmp 0x3ec66
leaq 0x75db6(%rip), %rdi     # 0xb5360
leaq 0x75dc7(%rip), %rsi     # 0xb5378
leaq 0x75e04(%rip), %rcx     # 0xb53bc
movl $0x1a8, %edx            # imm = 0x1A8
callq 0xc140
leaq 0x75e2b(%rip), %rdi     # 0xb53f4
leaq 0x75da8(%rip), %rsi     # 0xb5378
leaq 0x75e4f(%rip), %rcx     # 0xb5426
movl $0x22c, %edx            # imm = 0x22C
callq 0xc140
jmp 0x3f613
jmp 0x3f613
jmp 0x3f613
jmp 0x3f613
jmp 0x3f613
jmp 0x3f613
jmp 0x3f613
jmp 0x3f613
jmp 0x3f613
jmp 0x3f613
jmp 0x3f613
jmp 0x3f613
jmp 0x3f613
jmp 0x3f613
jmp 0x3f613
jmp 0x3f613
jmp 0x3f613
jmp 0x3f613
jmp 0x3f613
jmp 0x3f613
jmp 0x3f613
jmp 0x3f613
jmp 0x3f613
jmp 0x3f613
jmp 0x3f613
movq %rax, %rbx
leaq -0xe4(%rbp), %rdi
callq 0x43764
movq %rbx, %rdi
callq 0xc560