// File: 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
subq $0x340, %rsp            # imm = 0x340
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x1a8(%rbp)
cmpl $0x1, 0x4(%rax)
jge 0xbfaaa
movq -0x1a8(%rbp), %rax
movl $0x1, 0x4(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq -0x50(%rbp), %rdi
callq 0xbf810
movq -0x1a8(%rbp), %rdi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq -0x50(%rbp), %rsi
callq 0xbf840
callq 0xc7680
movq %rax, %rcx
movq -0x1a8(%rbp), %rax
movq %rcx, -0x58(%rbp)
movq -0x58(%rbp), %rcx
movss 0x4c(%rcx), %xmm0
movss %xmm0, -0x5c(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x60(%rbp)
testb $0x1, 0x8(%rax)
je 0xbfb2a
movss -0x5c(%rbp), %xmm0
movss %xmm0, -0x1ac(%rbp)
callq 0xdd090
movss -0x1ac(%rbp), %xmm1
addss %xmm1, %xmm0
addss -0x60(%rbp), %xmm0
movss %xmm0, -0x60(%rbp)
movq -0x1a8(%rbp), %rax
testb $0x1, 0x9(%rax)
je 0xbfb84
movss -0x5c(%rbp), %xmm0
movss %xmm0, -0x1b4(%rbp)
callq 0xdd090
movss -0x1b4(%rbp), %xmm1
addss %xmm1, %xmm0
movss %xmm0, -0x1b0(%rbp)
callq 0xdd020
movss -0x1b0(%rbp), %xmm1
movss 0xb244e(%rip), %xmm2    # 0x171fc0
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
addss -0x60(%rbp), %xmm0
movss %xmm0, -0x60(%rbp)
movaps 0xb2465(%rip), %xmm0    # 0x171ff0
movss -0x60(%rbp), %xmm1
pxor %xmm0, %xmm1
leaq -0x68(%rbp), %rdi
movq %rdi, -0x1e8(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x1d4(%rbp)
callq 0xbf4c0
movq -0x1e8(%rbp), %rsi
leaq 0xb2755(%rip), %rdi     # 0x172312
xorl %edx, %edx
movl %edx, -0x1c4(%rbp)
movl $0xc0004, %ecx          # imm = 0xC0004
callq 0xd5cc0
callq 0xdae40
movss -0x1d4(%rbp), %xmm1
movq %rax, -0x70(%rbp)
leaq -0x78(%rbp), %rdi
movq %rdi, -0x1e0(%rbp)
movaps %xmm1, %xmm0
callq 0xbf4c0
movq -0x1e0(%rbp), %rsi
movl $0xa, %edi
callq 0xc7b50
movss -0x1d4(%rbp), %xmm1
leaq -0x80(%rbp), %rdi
movq %rdi, -0x1d0(%rbp)
movaps %xmm1, %xmm0
callq 0xbf4c0
movq -0x1d0(%rbp), %rsi
movl $0xd, %edi
callq 0xc7b50
movq -0x1a8(%rbp), %rcx
movl -0x1c4(%rbp), %edx
movq -0x18(%rbp), %rax
movslq 0x4(%rcx), %rcx
leaq -0x1(%rax,%rcx), %rax
divq %rcx
movl %eax, -0x84(%rbp)
leaq -0xa0(%rbp), %rdi
movq %rdi, -0x1c0(%rbp)
callq 0xc6ff0
movq -0x1c0(%rbp), %rdi
movl -0x84(%rbp), %esi
movss -0x4c(%rbp), %xmm0
callq 0xc7090
jmp 0xbfc7f
leaq -0xa0(%rbp), %rdi
callq 0xc7320
jmp 0xbfc8d
movq -0x1a8(%rbp), %rax
movl -0xa0(%rbp), %ecx
imull 0x4(%rax), %ecx
movslq %ecx, %rcx
movq %rcx, -0xb8(%rbp)
movl -0x9c(%rbp), %ecx
imull 0x4(%rax), %ecx
movslq %ecx, %rcx
movq %rcx, -0xc0(%rbp)
movb $0x0, -0xc1(%rbp)
testb $0x1, 0x1(%rax)
jne 0xbfcda
movq -0x1a8(%rbp), %rax
movq 0x48(%rax), %rax
cmpq -0x18(%rbp), %rax
jb 0xbfd0e
movq -0x1a8(%rbp), %rax
movq $-0x1, 0x48(%rax)
jmp 0xbfd0e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa8(%rbp)
movl %eax, -0xac(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0xc7030
jmp 0xc1130
movq -0x1a8(%rbp), %rax
movq 0x40(%rax), %rax
cmpq -0x18(%rbp), %rax
jb 0xbfd2e
movq -0x1a8(%rbp), %rax
movq $-0x1, 0x40(%rax)
movq -0x1a8(%rbp), %rax
testb $0x1, 0x9(%rax)
je 0xbfd66
movq -0x1a8(%rbp), %rdi
movl 0xb4(%rdi), %esi
callq 0xc1140
movq %rax, -0x1f0(%rbp)
jmp 0xbfd56
movq -0x1f0(%rbp), %rax
movq %rax, -0x1f8(%rbp)
jmp 0xbfd71
xorl %eax, %eax
movq %rax, -0x1f8(%rbp)
jmp 0xbfd71
movq -0x1a8(%rbp), %rax
movq -0x1f8(%rbp), %rcx
movq %rcx, -0xd0(%rbp)
movq 0x48(%rax), %rcx
movq %rcx, -0xd8(%rbp)
movq $-0x1, -0xe0(%rbp)
cmpq $-0x1, 0x48(%rax)
je 0xbff56
movl $0x3, %edi
callq 0xd48f0
movl %eax, -0x1fc(%rbp)
jmp 0xbfdb9
movl -0x1fc(%rbp), %edi
movl $0x1, %esi
callq 0xd4bc0
movb %al, -0x1fd(%rbp)
jmp 0xbfdd1
movb -0x1fd(%rbp), %al
testb $0x1, %al
jne 0xbfddd
jmp 0xbfe13
movq -0x1a8(%rbp), %rcx
movq 0x48(%rcx), %rax
movslq 0x4(%rcx), %rcx
cmpq %rcx, %rax
jb 0xbfe13
movq -0x1a8(%rbp), %rax
movq 0x48(%rax), %rcx
movslq 0x4(%rax), %rdx
subq %rdx, %rcx
movq %rcx, -0xe0(%rbp)
movb $0x1, 0x50(%rax)
jmp 0xbff54
movl $0x4, %edi
callq 0xd48f0
movl %eax, -0x204(%rbp)
jmp 0xbfe25
movl -0x204(%rbp), %edi
movl $0x1, %esi
callq 0xd4bc0
movb %al, -0x205(%rbp)
jmp 0xbfe3d
movb -0x205(%rbp), %al
testb $0x1, %al
jne 0xbfe49
jmp 0xbfe86
movq -0x1a8(%rbp), %rdx
movq 0x48(%rdx), %rax
movq -0x18(%rbp), %rcx
movslq 0x4(%rdx), %rdx
subq %rdx, %rcx
cmpq %rcx, %rax
jae 0xbfe86
movq -0x1a8(%rbp), %rax
movq 0x48(%rax), %rcx
movslq 0x4(%rax), %rdx
addq %rdx, %rcx
movq %rcx, -0xe0(%rbp)
movb $0x1, 0x50(%rax)
jmp 0xbff52
movl $0x1, %edi
callq 0xd48f0
movl %eax, -0x20c(%rbp)
jmp 0xbfe98
movl -0x20c(%rbp), %edi
movl $0x1, %esi
callq 0xd4bc0
movb %al, -0x20d(%rbp)
jmp 0xbfeb0
movb -0x20d(%rbp), %al
testb $0x1, %al
jne 0xbfebc
jmp 0xbfee6
movq -0x1a8(%rbp), %rax
cmpq $0x0, 0x48(%rax)
jbe 0xbfee6
movq -0x1a8(%rbp), %rax
movq 0x48(%rax), %rcx
subq $0x1, %rcx
movq %rcx, -0xe0(%rbp)
movb $0x1, 0x50(%rax)
jmp 0xbff50
movl $0x2, %edi
callq 0xd48f0
movl %eax, -0x214(%rbp)
jmp 0xbfef8
movl -0x214(%rbp), %edi
movl $0x1, %esi
callq 0xd4bc0
movb %al, -0x215(%rbp)
jmp 0xbff10
movb -0x215(%rbp), %al
testb $0x1, %al
jne 0xbff1c
jmp 0xbff4e
movq -0x1a8(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x18(%rbp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0xbff4e
movq -0x1a8(%rbp), %rax
movq 0x48(%rax), %rcx
addq $0x1, %rcx
movq %rcx, -0xe0(%rbp)
movb $0x1, 0x50(%rax)
jmp 0xbff50
jmp 0xbff52
jmp 0xbff54
jmp 0xbff56
cmpq $-0x1, -0xe0(%rbp)
je 0xc00af
movq -0x1a8(%rbp), %rcx
movq -0xe0(%rbp), %rax
movslq 0x4(%rcx), %rsi
xorl %edx, %edx
divq %rsi
movq %rax, -0x220(%rbp)
movq -0xd8(%rbp), %rax
movslq 0x4(%rcx), %rcx
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
movq -0x220(%rbp), %rax
cmpq %rcx, %rax
je 0xc00af
movq -0x1a8(%rbp), %rcx
movq -0xe0(%rbp), %rax
movslq 0x4(%rcx), %rsi
xorl %edx, %edx
divq %rsi
movl %eax, -0x224(%rbp)
movq -0xd8(%rbp), %rax
movslq 0x4(%rcx), %rcx
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
movl -0x224(%rbp), %eax
subl %ecx, %eax
movl %eax, -0xe4(%rbp)
cmpl $0x0, -0xe4(%rbp)
jge 0xc0018
movq -0x1a8(%rbp), %rax
movq -0xe0(%rbp), %rcx
movq -0xb8(%rbp), %rdx
movl 0x4(%rax), %eax
shll %eax
cltq
addq %rax, %rdx
movb $0x1, %al
cmpq %rdx, %rcx
movb %al, -0x225(%rbp)
jb 0xc0061
xorl %eax, %eax
cmpl $0x0, -0xe4(%rbp)
movb %al, -0x226(%rbp)
jle 0xc0055
movq -0x1a8(%rbp), %rdx
movq -0xe0(%rbp), %rax
movq -0xc0(%rbp), %rcx
movl 0x4(%rdx), %edx
shll %edx
movslq %edx, %rdx
subq %rdx, %rcx
cmpq %rcx, %rax
seta %al
movb %al, -0x226(%rbp)
movb -0x226(%rbp), %al
movb %al, -0x225(%rbp)
movb -0x225(%rbp), %al
andb $0x1, %al
movb %al, -0xe5(%rbp)
testb $0x1, -0xe5(%rbp)
je 0xc00ad
callq 0xdd850
movss %xmm0, -0x22c(%rbp)
jmp 0xc0087
movss -0x22c(%rbp), %xmm1
cvtsi2ssl -0xe4(%rbp), %xmm0
movss -0x4c(%rbp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
callq 0xdd9a0
jmp 0xc00ab
jmp 0xc00ad
jmp 0xc00af
callq 0xda780
movaps %xmm0, -0x240(%rbp)
jmp 0xc00bd
movq -0x1a8(%rbp), %rax
movaps -0x240(%rbp), %xmm0
movlpd %xmm0, -0xf0(%rbp)
testb $0x1, 0xb(%rax)
je 0xc019a
movq -0x70(%rbp), %rax
movq %rax, -0x248(%rbp)
movss -0x48(%rbp), %xmm2
movss -0x34(%rbp), %xmm3
movss -0xf0(%rbp), %xmm0
movss -0xec(%rbp), %xmm1
addss %xmm3, %xmm0
subss %xmm2, %xmm0
leaq -0xf8(%rbp), %rdi
callq 0xbf4c0
jmp 0xc0118
movss -0x48(%rbp), %xmm2
movss -0x34(%rbp), %xmm3
movss -0xf0(%rbp), %xmm0
movss -0xec(%rbp), %xmm1
addss %xmm3, %xmm0
subss %xmm2, %xmm0
movss 0xb1e82(%rip), %xmm2    # 0x171fc4
addss %xmm2, %xmm1
leaq -0x100(%rbp), %rdi
callq 0xbf4c0
jmp 0xc0154
movl $0x5, %edi
movss 0xb0adb(%rip), %xmm0    # 0x170c3c
callq 0xc76e0
movl %eax, -0x24c(%rbp)
jmp 0xc016e
movl -0x24c(%rbp), %ecx
movq -0x248(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
leaq -0x100(%rbp), %rdx
movss 0xb0aab(%rip), %xmm0    # 0x170c3c
callq 0x112e20
jmp 0xc0198
jmp 0xc019a
xorl %edi, %edi
movss 0xb0a98(%rip), %xmm0    # 0x170c3c
callq 0xc76e0
movl %eax, -0x250(%rbp)
jmp 0xc01b1
movq -0x1a8(%rbp), %rax
movl -0x250(%rbp), %ecx
movl %ecx, -0x104(%rbp)
testb $0x1, 0xc(%rax)
je 0xc01f2
movl $0x1, %edi
movss 0xb0a65(%rip), %xmm0    # 0x170c3c
callq 0xc76e0
movl %eax, -0x254(%rbp)
jmp 0xc01e4
movl -0x254(%rbp), %eax
movl %eax, -0x258(%rbp)
jmp 0xc01fe
movl -0x104(%rbp), %eax
movl %eax, -0x258(%rbp)
movq -0x1a8(%rbp), %rax
movl -0x258(%rbp), %ecx
movl %ecx, -0x108(%rbp)
testb $0x1, 0xd(%rax)
je 0xc0227
leaq 0xb2100(%rip), %rax     # 0x17231e
movq %rax, -0x260(%rbp)
jmp 0xc0237
leaq 0xb20f8(%rip), %rax     # 0x172326
movq %rax, -0x260(%rbp)
jmp 0xc0237
movq -0x1a8(%rbp), %rax
movq -0x260(%rbp), %rcx
movq %rcx, -0x110(%rbp)
testb $0x1, 0xd(%rax)
je 0xc0262
leaq 0xb2208(%rip), %rax     # 0x172461
movq %rax, -0x268(%rbp)
jmp 0xc0272
leaq 0xb220b(%rip), %rax     # 0x172474
movq %rax, -0x268(%rbp)
jmp 0xc0272
movq -0x1a8(%rbp), %rax
movq -0x268(%rbp), %rcx
movq %rcx, -0x118(%rbp)
testb $0x1, 0xd(%rax)
je 0xc029d
leaq 0xcf81c(%rip), %rax     # 0x18fab0
movq %rax, -0x270(%rbp)
jmp 0xc02ad
leaq 0xb22f4(%rip), %rax     # 0x172598
movq %rax, -0x270(%rbp)
jmp 0xc02ad
movq -0x1a8(%rbp), %rax
movq -0x270(%rbp), %rcx
movq %rcx, -0x120(%rbp)
testb $0x1, 0xd(%rax)
je 0xc02d8
leaq 0xb205f(%rip), %rax     # 0x17232e
movq %rax, -0x278(%rbp)
jmp 0xc02e8
leaq 0xb2055(%rip), %rax     # 0x172334
movq %rax, -0x278(%rbp)
jmp 0xc02e8
movq -0x278(%rbp), %rax
movq %rax, -0x128(%rbp)
movl -0xa0(%rbp), %eax
movl %eax, -0x12c(%rbp)
movl -0x12c(%rbp), %eax
cmpl -0x9c(%rbp), %eax
jge 0xc0fe0
movq -0x1a8(%rbp), %rcx
movl -0x12c(%rbp), %eax
movl 0x4(%rcx), %ecx
imull %ecx, %eax
cltq
movq %rax, -0x138(%rbp)
movq -0x110(%rbp), %rdi
movl -0x50(%rbp), %esi
movq -0x20(%rbp), %rdx
movq -0x138(%rbp), %rax
addq %rax, %rdx
xorl %eax, %eax
callq 0x139160
jmp 0xc0351
movl $0x0, -0x13c(%rbp)
movq -0x1a8(%rbp), %rdx
movl -0x13c(%rbp), %ecx
xorl %eax, %eax
cmpl 0x4(%rdx), %ecx
movb %al, -0x279(%rbp)
jge 0xc0389
movq -0x138(%rbp), %rax
cmpq -0x18(%rbp), %rax
setb %al
movb %al, -0x279(%rbp)
movb -0x279(%rbp), %al
testb $0x1, %al
jne 0xc0398
jmp 0xc0bee
movq -0x1a8(%rbp), %rax
movss -0x3c(%rbp), %xmm1
movss -0x44(%rbp), %xmm0
cvtsi2ssl -0x13c(%rbp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x140(%rbp)
cmpl $0x0, 0x10(%rax)
jle 0xc03f9
movq -0x1a8(%rbp), %rcx
movl -0x13c(%rbp), %eax
cltd
idivl 0x10(%rcx)
cvtsi2ss %eax, %xmm0
movss -0x40(%rbp), %xmm2
movss -0x140(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x140(%rbp)
movss -0x140(%rbp), %xmm0
movss 0xb1b77(%rip), %xmm1    # 0x171f80
callq 0xdc1c0
jmp 0xc0410
movq -0x1a8(%rbp), %rdx
movq -0x138(%rbp), %rcx
xorl %eax, %eax
cmpq 0xa0(%rdx), %rcx
movb %al, -0x27a(%rbp)
jb 0xc044d
movq -0x1a8(%rbp), %rcx
movq -0x138(%rbp), %rax
cmpq 0xa8(%rcx), %rax
setb %al
movb %al, -0x27a(%rbp)
movq -0x1a8(%rbp), %rcx
movb -0x27a(%rbp), %al
andb $0x1, %al
movb %al, -0x141(%rbp)
xorl %eax, %eax
cmpq $0x0, 0x30(%rcx)
movb %al, -0x27b(%rbp)
je 0xc049f
movq -0x1a8(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x138(%rbp), %rsi
callq *%rax
movb %al, -0x27c(%rbp)
jmp 0xc0491
movb -0x27c(%rbp), %al
movb %al, -0x27b(%rbp)
jmp 0xc049f
movq -0x1a8(%rbp), %rdx
movb -0x27b(%rbp), %al
andb $0x1, %al
movb %al, -0x142(%rbp)
movq -0x138(%rbp), %rcx
xorl %eax, %eax
cmpq 0x40(%rdx), %rcx
movb %al, -0x27d(%rbp)
jb 0xc04ee
movq -0x1a8(%rbp), %rcx
movq -0x138(%rbp), %rax
movq 0x40(%rcx), %rcx
addq -0xd0(%rbp), %rcx
cmpq %rcx, %rax
setb %al
movb %al, -0x27d(%rbp)
movb -0x27d(%rbp), %al
andb $0x1, %al
movb %al, -0x143(%rbp)
testb $0x1, -0x141(%rbp)
jne 0xc051b
testb $0x1, -0x142(%rbp)
jne 0xc051b
testb $0x1, -0x143(%rbp)
je 0xc0700
callq 0xdc6c0
movaps %xmm0, -0x290(%rbp)
jmp 0xc0529
movaps -0x290(%rbp), %xmm0
movlpd %xmm0, -0x14c(%rbp)
movss 0xb1a8c(%rip), %xmm0    # 0x171fcc
mulss -0x48(%rbp), %xmm0
movss %xmm0, -0x150(%rbp)
movq -0x138(%rbp), %rcx
addq $0x1, %rcx
xorl %eax, %eax
cmpq -0x18(%rbp), %rcx
movb %al, -0x291(%rbp)
jae 0xc05fd
movq -0x1a8(%rbp), %rax
cmpq $-0x1, 0xa8(%rax)
je 0xc059e
movq -0x1a8(%rbp), %rdx
movq -0x138(%rbp), %rcx
addq $0x1, %rcx
movb $0x1, %al
cmpq 0xa8(%rdx), %rcx
movb %al, -0x292(%rbp)
jb 0xc05f1
movq -0x1a8(%rbp), %rcx
xorl %eax, %eax
cmpq $0x0, 0x30(%rcx)
movb %al, -0x293(%rbp)
je 0xc05e5
movq -0x1a8(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x138(%rbp), %rsi
incq %rsi
callq *%rax
movb %al, -0x294(%rbp)
jmp 0xc05d7
movb -0x294(%rbp), %al
movb %al, -0x293(%rbp)
jmp 0xc05e5
movb -0x293(%rbp), %al
movb %al, -0x292(%rbp)
movb -0x292(%rbp), %al
movb %al, -0x291(%rbp)
movb -0x291(%rbp), %al
andb $0x1, %al
movb %al, -0x151(%rbp)
testb $0x1, -0x151(%rbp)
jne 0xc0629
movq -0x1a8(%rbp), %rcx
movl -0x13c(%rbp), %eax
addl $0x1, %eax
cmpl 0x4(%rcx), %eax
jne 0xc0691
movq -0x1a8(%rbp), %rax
movss -0x44(%rbp), %xmm0
movss %xmm0, -0x150(%rbp)
cmpl $0x0, 0x10(%rax)
jle 0xc068f
cmpl $0x0, -0x13c(%rbp)
jle 0xc068f
movq -0x1a8(%rbp), %rcx
movl -0x13c(%rbp), %eax
addl $0x1, %eax
cmpl 0x4(%rcx), %eax
jge 0xc068f
movq -0x1a8(%rbp), %rcx
movl -0x13c(%rbp), %eax
addl $0x1, %eax
cltd
idivl 0x10(%rcx)
cmpl $0x0, %edx
jne 0xc068f
movss -0x40(%rbp), %xmm0
addss -0x150(%rbp), %xmm0
movss %xmm0, -0x150(%rbp)
jmp 0xc0691
movq -0x70(%rbp), %rax
movq %rax, -0x2a0(%rbp)
movss -0x150(%rbp), %xmm2
movss -0x14c(%rbp), %xmm0
movss -0x148(%rbp), %xmm1
addss %xmm2, %xmm0
movss -0x4c(%rbp), %xmm2
addss %xmm2, %xmm1
leaq -0x15c(%rbp), %rdi
callq 0xbf4c0
jmp 0xc06cf
movq -0x2a0(%rbp), %rdi
movq -0x1a8(%rbp), %rax
movl 0x18(%rax), %ecx
leaq -0x14c(%rbp), %rsi
leaq -0x15c(%rbp), %rdx
xorps %xmm0, %xmm0
movl $0xf, %r8d
callq 0x113090
jmp 0xc06fe
jmp 0xc0700
movq -0x1a8(%rbp), %rax
movq 0x48(%rax), %rax
cmpq -0x138(%rbp), %rax
jne 0xc0a16
movb $0x0, -0x15d(%rbp)
movq -0x138(%rbp), %rdi
callq 0xdb500
jmp 0xc072d
movq -0x1a8(%rbp), %rax
testb $0x1, 0x50(%rax)
je 0xc0804
xorl %edi, %edi
callq 0xdb080
jmp 0xc0747
movl $0x1, %edi
callq 0xd5360
jmp 0xc0753
movq -0x1a8(%rbp), %rdi
addq $0x71, %rdi
movq -0x118(%rbp), %rsi
movl -0x50(%rbp), %edx
movq -0x20(%rbp), %rcx
addq -0x138(%rbp), %rcx
movb $0x0, %al
callq 0xd990
movq -0x1a8(%rbp), %rax
movq %rax, %rcx
addq $0x51, %rcx
movq %rcx, -0x2b0(%rbp)
movq -0x120(%rbp), %rcx
movq %rcx, -0x2a8(%rbp)
cmpq $0x0, 0x20(%rax)
je 0xc07d2
movq -0x1a8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x138(%rbp), %rsi
callq *%rax
movb %al, -0x2b1(%rbp)
jmp 0xc07c4
movb -0x2b1(%rbp), %al
movb %al, -0x2b2(%rbp)
jmp 0xc07e6
movq -0x28(%rbp), %rax
movq -0x138(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x2b2(%rbp)
movq -0x2a8(%rbp), %rsi
movq -0x2b0(%rbp), %rdi
movb -0x2b2(%rbp), %al
movzbl %al, %edx
movb $0x0, %al
callq 0xd990
movss -0x48(%rbp), %xmm0
addss %xmm0, %xmm0
callq 0xdcb10
jmp 0xc0814
movq -0x1a8(%rbp), %rax
movl $0xffffffff, -0x164(%rbp) # imm = 0xFFFFFFFF
leaq -0x168(%rbp), %rcx
movq %rcx, -0x2c8(%rbp)
movq -0x120(%rbp), %rcx
movq %rcx, -0x2c0(%rbp)
cmpq $0x0, 0x20(%rax)
je 0xc0876
movq -0x1a8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x138(%rbp), %rsi
callq *%rax
movb %al, -0x2c9(%rbp)
jmp 0xc0868
movb -0x2c9(%rbp), %al
movb %al, -0x2ca(%rbp)
jmp 0xc088a
movq -0x28(%rbp), %rax
movq -0x138(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x2ca(%rbp)
movq -0x2c0(%rbp), %rsi
movq -0x2c8(%rbp), %rdi
movb -0x2ca(%rbp), %al
movzbl %al, %edx
xorl %eax, %eax
callq 0xd990
movq -0x1a8(%rbp), %rsi
movl $0x3132, -0x16c(%rbp)   # imm = 0x3132
addq $0x51, %rsi
movl -0x16c(%rbp), %ecx
leaq 0xb1a70(%rip), %rdi     # 0x17233a
leaq 0x8ef(%rip), %r8        # 0xc11c0
movl $0x20, %edx
leaq -0x168(%rbp), %r9
callq 0x149cd0
movb %al, -0x2cb(%rbp)
jmp 0xc08ea
movb -0x2cb(%rbp), %al
testb $0x1, %al
jne 0xc08f6
jmp 0xc0906
movb $0x1, -0xc1(%rbp)
movb $0x1, -0x15d(%rbp)
jmp 0xc0948
movq -0x1a8(%rbp), %rax
testb $0x1, 0x50(%rax)
jne 0xc0946
callq 0xd53c0
movb %al, -0x2cc(%rbp)
jmp 0xc0920
movb -0x2cc(%rbp), %al
testb $0x1, %al
jne 0xc0946
jmp 0xc092c
movq -0x1a8(%rbp), %rax
movq $-0x1, -0xe0(%rbp)
movq $-0x1, 0x48(%rax)
jmp 0xc0948
movq -0x1a8(%rbp), %rax
movb $0x0, 0x50(%rax)
callq 0xdcd30
jmp 0xc095a
cmpl $0x2, -0x164(%rbp)
jl 0xc0971
movb $0x1, -0xc1(%rbp)
movb $0x1, -0x15d(%rbp)
cmpq $-0x1, -0xe0(%rbp)
je 0xc0989
movb $0x0, -0xc1(%rbp)
movb $0x0, -0x15d(%rbp)
movl $0x0, -0x170(%rbp)
testb $0x1, -0x15d(%rbp)
je 0xc0a0a
movq -0x1a8(%rbp), %rdi
addq $0x51, %rdi
leaq 0xb5bd7(%rip), %rsi     # 0x176585
leaq -0x170(%rbp), %rdx
movb $0x0, %al
callq 0xd0d0
cmpl $0x1, %eax
jne 0xc0a0a
movq -0x1a8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0xc09f2
movq -0x1a8(%rbp), %rax
movq 0x28(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x138(%rbp), %rsi
movzbl -0x170(%rbp), %edx
callq *%rax
jmp 0xc09f0
jmp 0xc0a08
movl -0x170(%rbp), %eax
movb %al, %dl
movq -0x28(%rbp), %rax
movq -0x138(%rbp), %rcx
movb %dl, (%rax,%rcx)
jmp 0xc0a0a
callq 0xdb640
jmp 0xc0a11
jmp 0xc0bc6
movq -0x1a8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0xc0a52
movq -0x1a8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x138(%rbp), %rsi
callq *%rax
movb %al, -0x2cd(%rbp)
jmp 0xc0a44
movb -0x2cd(%rbp), %al
movb %al, -0x2ce(%rbp)
jmp 0xc0a66
movq -0x28(%rbp), %rax
movq -0x138(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x2ce(%rbp)
movq -0x1a8(%rbp), %rax
movb -0x2ce(%rbp), %cl
movb %cl, -0x171(%rbp)
testb $0x1, 0xa(%rax)
je 0xc0b20
movzbl -0x171(%rbp), %eax
cmpl $0x20, %eax
jl 0xc0ab6
movzbl -0x171(%rbp), %eax
cmpl $0x80, %eax
jge 0xc0ab6
movzbl -0x171(%rbp), %esi
leaq 0xb1896(%rip), %rdi     # 0x172341
xorl %eax, %eax
callq 0x139160
jmp 0xc0ab4
jmp 0xc0b1e
movzbl -0x171(%rbp), %eax
cmpl $0xff, %eax
jne 0xc0ae3
movq -0x1a8(%rbp), %rax
testb $0x1, 0xc(%rax)
je 0xc0ae3
leaq 0xb186e(%rip), %rdi     # 0x172346
xorl %eax, %eax
callq 0x1393f0
jmp 0xc0ae1
jmp 0xc0b1c
movzbl -0x171(%rbp), %eax
cmpl $0x0, %eax
jne 0xc0b01
leaq 0xb5778(%rip), %rdi     # 0x17626e
xorl %eax, %eax
callq 0x139160
jmp 0xc0aff
jmp 0xc0b1a
movq -0x128(%rbp), %rdi
movzbl -0x171(%rbp), %esi
xorl %eax, %eax
callq 0x139160
jmp 0xc0b18
jmp 0xc0b1a
jmp 0xc0b1c
jmp 0xc0b1e
jmp 0xc0b66
movzbl -0x171(%rbp), %eax
cmpl $0x0, %eax
jne 0xc0b4b
movq -0x1a8(%rbp), %rax
testb $0x1, 0xc(%rax)
je 0xc0b4b
leaq 0xb180a(%rip), %rdi     # 0x17234a
xorl %eax, %eax
callq 0x1393f0
jmp 0xc0b49
jmp 0xc0b64
movq -0x128(%rbp), %rdi
movzbl -0x171(%rbp), %esi
xorl %eax, %eax
callq 0x139160
jmp 0xc0b62
jmp 0xc0b64
jmp 0xc0b66
movq -0x1a8(%rbp), %rax
testb $0x1, 0x1(%rax)
jne 0xc0bc4
xorl %edi, %edi
callq 0xca1c0
movb %al, -0x2cf(%rbp)
jmp 0xc0b82
movb -0x2cf(%rbp), %al
testb $0x1, %al
jne 0xc0b8e
jmp 0xc0bc4
xorl %esi, %esi
movl %esi, %edi
callq 0xd4d60
movb %al, -0x2d0(%rbp)
jmp 0xc0b9f
movb -0x2d0(%rbp), %al
testb $0x1, %al
jne 0xc0bab
jmp 0xc0bc4
movq -0x1a8(%rbp), %rax
movb $0x1, 0x50(%rax)
movq -0x138(%rbp), %rax
movq %rax, -0xe0(%rbp)
jmp 0xc0bc6
jmp 0xc0bc8
movl -0x13c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x13c(%rbp)
movq -0x138(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x138(%rbp)
jmp 0xc035b
movq -0x1a8(%rbp), %rax
testb $0x1, 0xb(%rax)
je 0xc0fca
movss -0x34(%rbp), %xmm0
movss 0xb1374(%rip), %xmm1    # 0x171f80
callq 0xdc1c0
jmp 0xc0c13
callq 0xdc6c0
movaps %xmm0, -0x2e0(%rbp)
jmp 0xc0c21
movq -0x1a8(%rbp), %rcx
movaps -0x2e0(%rbp), %xmm0
movlpd %xmm0, -0x17c(%rbp)
movl -0x12c(%rbp), %eax
movl 0x4(%rcx), %ecx
imull %ecx, %eax
cltq
movq %rax, -0x138(%rbp)
movl -0x12c(%rbp), %edi
callq 0xdb550
jmp 0xc0c59
movss -0x30(%rbp), %xmm0
movss -0x4c(%rbp), %xmm1
movss -0x34(%rbp), %xmm2
subss %xmm2, %xmm0
leaq -0x184(%rbp), %rdi
callq 0xbf4c0
jmp 0xc0c7a
leaq 0xb16cd(%rip), %rdi     # 0x17234e
leaq -0x184(%rbp), %rsi
xorl %edx, %edx
callq 0x13a9f0
movb %al, -0x2e1(%rbp)
jmp 0xc0c97
movb -0x2e1(%rbp), %al
testb $0x1, %al
jne 0xc0ca6
jmp 0xc0d29
movq -0x138(%rbp), %rax
movq %rax, -0x2f8(%rbp)
callq 0xcb1a0
movq %rax, -0x2f0(%rbp)
jmp 0xc0cc2
movq -0x1a8(%rbp), %rax
movq -0x2f8(%rbp), %rcx
movq -0x2f0(%rbp), %rdx
movss 0x120(%rdx), %xmm0
movss -0x17c(%rbp), %xmm1
subss %xmm1, %xmm0
movss -0x48(%rbp), %xmm1
divss %xmm1, %xmm0
movaps %xmm0, %xmm1
cvttss2si %xmm1, %rdx
movq %rdx, %rdi
sarq $0x3f, %rdi
movss 0xb12bd(%rip), %xmm1    # 0x171fc8
subss %xmm1, %xmm0
cvttss2si %xmm0, %rsi
andq %rdi, %rsi
orq %rsi, %rdx
addq %rdx, %rcx
movq %rcx, 0x40(%rax)
movq %rcx, 0x48(%rax)
movb $0x1, 0x50(%rax)
callq 0xdb640
jmp 0xc0d30
movl $0x0, -0x188(%rbp)
movq -0x1a8(%rbp), %rdx
movl -0x188(%rbp), %ecx
xorl %eax, %eax
cmpl 0x4(%rdx), %ecx
movb %al, -0x2f9(%rbp)
jge 0xc0d68
movq -0x138(%rbp), %rax
cmpq -0x18(%rbp), %rax
setb %al
movb %al, -0x2f9(%rbp)
movb -0x2f9(%rbp), %al
testb $0x1, %al
jne 0xc0d77
jmp 0xc0fc8
movq -0x1a8(%rbp), %rcx
movq -0x138(%rbp), %rax
cmpq 0x48(%rcx), %rax
jne 0xc0e91
movq -0x70(%rbp), %rax
movq %rax, -0x308(%rbp)
movss -0x4c(%rbp), %xmm2
movss -0x48(%rbp), %xmm3
movss -0x17c(%rbp), %xmm0
movss -0x178(%rbp), %xmm1
addss %xmm3, %xmm0
addss %xmm2, %xmm1
leaq -0x190(%rbp), %rdi
callq 0xbf4c0
jmp 0xc0dca
movl $0x7, %edi
movss 0xafe65(%rip), %xmm0    # 0x170c3c
callq 0xc76e0
movl %eax, -0x30c(%rbp)
jmp 0xc0de4
movl -0x30c(%rbp), %ecx
movq -0x308(%rbp), %rdi
leaq -0x17c(%rbp), %rsi
leaq -0x190(%rbp), %rdx
xorps %xmm0, %xmm0
movl $0xf, %r8d
callq 0x113090
jmp 0xc0e0f
movq -0x70(%rbp), %rax
movq %rax, -0x318(%rbp)
movss -0x4c(%rbp), %xmm2
movss -0x48(%rbp), %xmm3
movss -0x17c(%rbp), %xmm0
movss -0x178(%rbp), %xmm1
addss %xmm3, %xmm0
addss %xmm2, %xmm1
leaq -0x198(%rbp), %rdi
callq 0xbf4c0
jmp 0xc0e4a
movl $0x2f, %edi
movss 0xafde5(%rip), %xmm0    # 0x170c3c
callq 0xc76e0
movl %eax, -0x31c(%rbp)
jmp 0xc0e64
movl -0x31c(%rbp), %ecx
movq -0x318(%rbp), %rdi
leaq -0x17c(%rbp), %rsi
leaq -0x198(%rbp), %rdx
xorps %xmm0, %xmm0
movl $0xf, %r8d
callq 0x113090
jmp 0xc0e8f
jmp 0xc0e91
movq -0x1a8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0xc0ecd
movq -0x1a8(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x28(%rbp), %rdi
movq -0x138(%rbp), %rsi
callq *%rax
movb %al, -0x31d(%rbp)
jmp 0xc0ebf
movb -0x31d(%rbp), %al
movb %al, -0x31e(%rbp)
jmp 0xc0ee1
movq -0x28(%rbp), %rax
movq -0x138(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x31e(%rbp)
movb -0x31e(%rbp), %al
movb %al, -0x199(%rbp)
movzbl -0x199(%rbp), %eax
cmpl $0x20, %eax
jl 0xc0f07
movzbl -0x199(%rbp), %eax
cmpl $0x80, %eax
jl 0xc0f14
movl $0x2e, %eax
movl %eax, -0x324(%rbp)
jmp 0xc0f21
movzbl -0x199(%rbp), %eax
movl %eax, -0x324(%rbp)
movl -0x324(%rbp), %eax
movb %al, -0x19a(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x330(%rbp)
movsbl -0x19a(%rbp), %eax
movzbl -0x199(%rbp), %ecx
cmpl %ecx, %eax
jne 0xc0f58
movl -0x104(%rbp), %eax
movl %eax, -0x334(%rbp)
jmp 0xc0f64
movl -0x108(%rbp), %eax
movl %eax, -0x334(%rbp)
movq -0x330(%rbp), %rdi
movl -0x334(%rbp), %edx
leaq -0x199(%rbp), %r8
leaq -0x17c(%rbp), %rsi
leaq -0x19a(%rbp), %rcx
callq 0x114680
jmp 0xc0f8d
movss -0x48(%rbp), %xmm0
addss -0x17c(%rbp), %xmm0
movss %xmm0, -0x17c(%rbp)
movl -0x188(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x188(%rbp)
movq -0x138(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x138(%rbp)
jmp 0xc0d3a
jmp 0xc0fca
jmp 0xc0fcc
movl -0x12c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x12c(%rbp)
jmp 0xc0302
leaq -0xa0(%rbp), %rdi
callq 0xc7320
movb %al, -0x335(%rbp)
jmp 0xc0ff4
movb -0x335(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0xc1006
jmp 0xc1025
leaq 0xb1347(%rip), %rdi     # 0x172354
leaq 0xb1358(%rip), %rsi     # 0x17236c
movl $0x1a8, %edx            # imm = 0x1A8
leaq 0xb1390(%rip), %rcx     # 0x1723b0
callq 0xd180
leaq -0xa0(%rbp), %rdi
callq 0xc7140
jmp 0xc1033
movl $0x2, %edi
callq 0xc7c10
jmp 0xc103f
callq 0xd5d90
jmp 0xc1046
testb $0x1, -0xc1(%rbp)
je 0xc107d
movq -0x1a8(%rbp), %rax
movq 0x48(%rax), %rax
cmpq -0x18(%rbp), %rax
jae 0xc107d
movq -0x1a8(%rbp), %rax
movq 0x48(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x40(%rax)
movq %rcx, 0x48(%rax)
movb $0x1, 0x50(%rax)
jmp 0xc109f
cmpq $-0x1, -0xe0(%rbp)
je 0xc109d
movq -0x1a8(%rbp), %rax
movq -0xe0(%rbp), %rcx
movq %rcx, 0x40(%rax)
movq %rcx, 0x48(%rax)
jmp 0xc109f
movq -0x1a8(%rbp), %rax
movb 0x9(%rax), %cl
andb $0x1, %cl
movb %cl, -0x19b(%rbp)
testb $0x1, 0x8(%rax)
je 0xc10df
callq 0x13dec0
jmp 0xc10bf
movq -0x1a8(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %r8
leaq -0x50(%rbp), %rsi
callq 0xc1260
jmp 0xc10dd
jmp 0xc10df
testb $0x1, -0x19b(%rbp)
je 0xc110f
callq 0x13dec0
jmp 0xc10ef
movq -0x1a8(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %r8
leaq -0x50(%rbp), %rsi
callq 0xc1600
jmp 0xc110d
jmp 0xc110f
movss -0x2c(%rbp), %xmm0
callq 0xdc8b0
jmp 0xc111b
leaq -0xa0(%rbp), %rdi
callq 0xc7030
addq $0x340, %rsp            # imm = 0x340
popq %rbp
retq
movq -0xa8(%rbp), %rdi
callq 0xd620
nopl (%rax)