// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui_widgets.cpp
// Function: ImGui::ColorPicker4(char const*, float*, int, float const*)
bool ImGui::ColorPicker4(const char* label, float col[4], ImGuiColorEditFlags flags, const float* ref_col)
{
    ImGuiContext& g = *GImGui;
    ImGuiWindow* window = GetCurrentWindow();
    if (window->SkipItems)
        return false;

    ImDrawList* draw_list = window->DrawList;
    ImGuiStyle& style = g.Style;
    ImGuiIO& io = g.IO;

    const float width = CalcItemWidth();
    g.NextItemData.ClearFlags();

    PushID(label);
    BeginGroup();

    if (!(flags & ImGuiColorEditFlags_NoSidePreview))
        flags |= ImGuiColorEditFlags_NoSmallPreview;

    // Context menu: display and store options.
    if (!(flags & ImGuiColorEditFlags_NoOptions))
        ColorPickerOptionsPopup(col, flags);

    // Read stored options
    if (!(flags & ImGuiColorEditFlags__PickerMask))
        flags |= ((g.ColorEditOptions & ImGuiColorEditFlags__PickerMask) ? g.ColorEditOptions : ImGuiColorEditFlags__OptionsDefault) & ImGuiColorEditFlags__PickerMask;
    if (!(flags & ImGuiColorEditFlags__InputMask))
        flags |= ((g.ColorEditOptions & ImGuiColorEditFlags__InputMask) ? g.ColorEditOptions : ImGuiColorEditFlags__OptionsDefault) & ImGuiColorEditFlags__InputMask;
    IM_ASSERT(ImIsPowerOfTwo(flags & ImGuiColorEditFlags__PickerMask)); // Check that only 1 is selected
    IM_ASSERT(ImIsPowerOfTwo(flags & ImGuiColorEditFlags__InputMask));  // Check that only 1 is selected
    if (!(flags & ImGuiColorEditFlags_NoOptions))
        flags |= (g.ColorEditOptions & ImGuiColorEditFlags_AlphaBar);

    // Setup
    int components = (flags & ImGuiColorEditFlags_NoAlpha) ? 3 : 4;
    bool alpha_bar = (flags & ImGuiColorEditFlags_AlphaBar) && !(flags & ImGuiColorEditFlags_NoAlpha);
    ImVec2 picker_pos = window->DC.CursorPos;
    float square_sz = GetFrameHeight();
    float bars_width = square_sz; // Arbitrary smallish width of Hue/Alpha picking bars
    float sv_picker_size = ImMax(bars_width * 1, width - (alpha_bar ? 2 : 1) * (bars_width + style.ItemInnerSpacing.x)); // Saturation/Value picking box
    float bar0_pos_x = picker_pos.x + sv_picker_size + style.ItemInnerSpacing.x;
    float bar1_pos_x = bar0_pos_x + bars_width + style.ItemInnerSpacing.x;
    float bars_triangles_half_sz = IM_FLOOR(bars_width * 0.20f);

    float backup_initial_col[4];
    memcpy(backup_initial_col, col, components * sizeof(float));

    float wheel_thickness = sv_picker_size * 0.08f;
    float wheel_r_outer = sv_picker_size * 0.50f;
    float wheel_r_inner = wheel_r_outer - wheel_thickness;
    ImVec2 wheel_center(picker_pos.x + (sv_picker_size + bars_width)*0.5f, picker_pos.y + sv_picker_size * 0.5f);

    // Note: the triangle is displayed rotated with triangle_pa pointing to Hue, but most coordinates stays unrotated for logic.
    float triangle_r = wheel_r_inner - (int)(sv_picker_size * 0.027f);
    ImVec2 triangle_pa = ImVec2(triangle_r, 0.0f); // Hue point.
    ImVec2 triangle_pb = ImVec2(triangle_r * -0.5f, triangle_r * -0.866025f); // Black point.
    ImVec2 triangle_pc = ImVec2(triangle_r * -0.5f, triangle_r * +0.866025f); // White point.

    float H = col[0], S = col[1], V = col[2];
    float R = col[0], G = col[1], B = col[2];
    if (flags & ImGuiColorEditFlags_InputRGB)
    {
        // Hue is lost when converting from greyscale rgb (saturation=0). Restore it.
        ColorConvertRGBtoHSV(R, G, B, H, S, V);
        if (memcmp(g.ColorEditLastColor, col, sizeof(float) * 3) == 0)
        {
            if (S == 0)
                H = g.ColorEditLastHue;
            if (V == 0)
                S = g.ColorEditLastSat;
        }
    }
    else if (flags & ImGuiColorEditFlags_InputHSV)
    {
        ColorConvertHSVtoRGB(H, S, V, R, G, B);
    }

    bool value_changed = false, value_changed_h = false, value_changed_sv = false;

    PushItemFlag(ImGuiItemFlags_NoNav, true);
    if (flags & ImGuiColorEditFlags_PickerHueWheel)
    {
        // Hue wheel + SV triangle logic
        InvisibleButton("hsv", ImVec2(sv_picker_size + style.ItemInnerSpacing.x + bars_width, sv_picker_size));
        if (IsItemActive())
        {
            ImVec2 initial_off = g.IO.MouseClickedPos[0] - wheel_center;
            ImVec2 current_off = g.IO.MousePos - wheel_center;
            float initial_dist2 = ImLengthSqr(initial_off);
            if (initial_dist2 >= (wheel_r_inner - 1) * (wheel_r_inner - 1) && initial_dist2 <= (wheel_r_outer + 1) * (wheel_r_outer + 1))
            {
                // Interactive with Hue wheel
                H = ImAtan2(current_off.y, current_off.x) / IM_PI * 0.5f;
                if (H < 0.0f)
                    H += 1.0f;
                value_changed = value_changed_h = true;
            }
            float cos_hue_angle = ImCos(-H * 2.0f * IM_PI);
            float sin_hue_angle = ImSin(-H * 2.0f * IM_PI);
            if (ImTriangleContainsPoint(triangle_pa, triangle_pb, triangle_pc, ImRotate(initial_off, cos_hue_angle, sin_hue_angle)))
            {
                // Interacting with SV triangle
                ImVec2 current_off_unrotated = ImRotate(current_off, cos_hue_angle, sin_hue_angle);
                if (!ImTriangleContainsPoint(triangle_pa, triangle_pb, triangle_pc, current_off_unrotated))
                    current_off_unrotated = ImTriangleClosestPoint(triangle_pa, triangle_pb, triangle_pc, current_off_unrotated);
                float uu, vv, ww;
                ImTriangleBarycentricCoords(triangle_pa, triangle_pb, triangle_pc, current_off_unrotated, uu, vv, ww);
                V = ImClamp(1.0f - vv, 0.0001f, 1.0f);
                S = ImClamp(uu / V, 0.0001f, 1.0f);
                value_changed = value_changed_sv = true;
            }
        }
        if (!(flags & ImGuiColorEditFlags_NoOptions))
            OpenPopupOnItemClick("context");
    }
    else if (flags & ImGuiColorEditFlags_PickerHueBar)
    {
        // SV rectangle logic
        InvisibleButton("sv", ImVec2(sv_picker_size, sv_picker_size));
        if (IsItemActive())
        {
            S = ImSaturate((io.MousePos.x - picker_pos.x) / (sv_picker_size - 1));
            V = 1.0f - ImSaturate((io.MousePos.y - picker_pos.y) / (sv_picker_size - 1));
            value_changed = value_changed_sv = true;
        }
        if (!(flags & ImGuiColorEditFlags_NoOptions))
            OpenPopupOnItemClick("context");

        // Hue bar logic
        SetCursorScreenPos(ImVec2(bar0_pos_x, picker_pos.y));
        InvisibleButton("hue", ImVec2(bars_width, sv_picker_size));
        if (IsItemActive())
        {
            H = ImSaturate((io.MousePos.y - picker_pos.y) / (sv_picker_size - 1));
            value_changed = value_changed_h = true;
        }
    }

    // Alpha bar logic
    if (alpha_bar)
    {
        SetCursorScreenPos(ImVec2(bar1_pos_x, picker_pos.y));
        InvisibleButton("alpha", ImVec2(bars_width, sv_picker_size));
        if (IsItemActive())
        {
            col[3] = 1.0f - ImSaturate((io.MousePos.y - picker_pos.y) / (sv_picker_size - 1));
            value_changed = true;
        }
    }
    PopItemFlag(); // ImGuiItemFlags_NoNav

    if (!(flags & ImGuiColorEditFlags_NoSidePreview))
    {
        SameLine(0, style.ItemInnerSpacing.x);
        BeginGroup();
    }

    if (!(flags & ImGuiColorEditFlags_NoLabel))
    {
        const char* label_display_end = FindRenderedTextEnd(label);
        if (label != label_display_end)
        {
            if ((flags & ImGuiColorEditFlags_NoSidePreview))
                SameLine(0, style.ItemInnerSpacing.x);
            TextEx(label, label_display_end);
        }
    }

    if (!(flags & ImGuiColorEditFlags_NoSidePreview))
    {
        PushItemFlag(ImGuiItemFlags_NoNavDefaultFocus, true);
        ImVec4 col_v4(col[0], col[1], col[2], (flags & ImGuiColorEditFlags_NoAlpha) ? 1.0f : col[3]);
        if ((flags & ImGuiColorEditFlags_NoLabel))
            Text("Current");

        ImGuiColorEditFlags sub_flags_to_forward = ImGuiColorEditFlags__InputMask | ImGuiColorEditFlags_HDR | ImGuiColorEditFlags_AlphaPreview | ImGuiColorEditFlags_AlphaPreviewHalf | ImGuiColorEditFlags_NoTooltip;
        ColorButton("##current", col_v4, (flags & sub_flags_to_forward), ImVec2(square_sz * 3, square_sz * 2));
        if (ref_col != NULL)
        {
            Text("Original");
            ImVec4 ref_col_v4(ref_col[0], ref_col[1], ref_col[2], (flags & ImGuiColorEditFlags_NoAlpha) ? 1.0f : ref_col[3]);
            if (ColorButton("##original", ref_col_v4, (flags & sub_flags_to_forward), ImVec2(square_sz * 3, square_sz * 2)))
            {
                memcpy(col, ref_col, components * sizeof(float));
                value_changed = true;
            }
        }
        PopItemFlag();
        EndGroup();
    }

    // Convert back color to RGB
    if (value_changed_h || value_changed_sv)
    {
        if (flags & ImGuiColorEditFlags_InputRGB)
        {
            ColorConvertHSVtoRGB(H >= 1.0f ? H - 10 * 1e-6f : H, S > 0.0f ? S : 10 * 1e-6f, V > 0.0f ? V : 1e-6f, col[0], col[1], col[2]);
            g.ColorEditLastHue = H;
            g.ColorEditLastSat = S;
            memcpy(g.ColorEditLastColor, col, sizeof(float) * 3);
        }
        else if (flags & ImGuiColorEditFlags_InputHSV)
        {
            col[0] = H;
            col[1] = S;
            col[2] = V;
        }
    }

    // R,G,B and H,S,V slider color editor
    bool value_changed_fix_hue_wrap = false;
    if ((flags & ImGuiColorEditFlags_NoInputs) == 0)
    {
        PushItemWidth((alpha_bar ? bar1_pos_x : bar0_pos_x) + bars_width - picker_pos.x);
        ImGuiColorEditFlags sub_flags_to_forward = ImGuiColorEditFlags__DataTypeMask | ImGuiColorEditFlags__InputMask | ImGuiColorEditFlags_HDR | ImGuiColorEditFlags_NoAlpha | ImGuiColorEditFlags_NoOptions | ImGuiColorEditFlags_NoSmallPreview | ImGuiColorEditFlags_AlphaPreview | ImGuiColorEditFlags_AlphaPreviewHalf;
        ImGuiColorEditFlags sub_flags = (flags & sub_flags_to_forward) | ImGuiColorEditFlags_NoPicker;
        if (flags & ImGuiColorEditFlags_DisplayRGB || (flags & ImGuiColorEditFlags__DisplayMask) == 0)
            if (ColorEdit4("##rgb", col, sub_flags | ImGuiColorEditFlags_DisplayRGB))
            {
                // FIXME: Hackily differentiating using the DragInt (ActiveId != 0 && !ActiveIdAllowOverlap) vs. using the InputText or DropTarget.
                // For the later we don't want to run the hue-wrap canceling code. If you are well versed in HSV picker please provide your input! (See #2050)
                value_changed_fix_hue_wrap = (g.ActiveId != 0 && !g.ActiveIdAllowOverlap);
                value_changed = true;
            }
        if (flags & ImGuiColorEditFlags_DisplayHSV || (flags & ImGuiColorEditFlags__DisplayMask) == 0)
            value_changed |= ColorEdit4("##hsv", col, sub_flags | ImGuiColorEditFlags_DisplayHSV);
        if (flags & ImGuiColorEditFlags_DisplayHex || (flags & ImGuiColorEditFlags__DisplayMask) == 0)
            value_changed |= ColorEdit4("##hex", col, sub_flags | ImGuiColorEditFlags_DisplayHex);
        PopItemWidth();
    }

    // Try to cancel hue wrap (after ColorEdit4 call), if any
    if (value_changed_fix_hue_wrap && (flags & ImGuiColorEditFlags_InputRGB))
    {
        float new_H, new_S, new_V;
        ColorConvertRGBtoHSV(col[0], col[1], col[2], new_H, new_S, new_V);
        if (new_H <= 0 && H > 0)
        {
            if (new_V <= 0 && V != new_V)
                ColorConvertHSVtoRGB(H, S, new_V <= 0 ? V * 0.5f : new_V, col[0], col[1], col[2]);
            else if (new_S <= 0)
                ColorConvertHSVtoRGB(H, new_S <= 0 ? S * 0.5f : new_S, new_V, col[0], col[1], col[2]);
        }
    }

    if (value_changed)
    {
        if (flags & ImGuiColorEditFlags_InputRGB)
        {
            R = col[0];
            G = col[1];
            B = col[2];
            ColorConvertRGBtoHSV(R, G, B, H, S, V);
            if (memcmp(g.ColorEditLastColor, col, sizeof(float) * 3) == 0) // Fix local Hue as display below will use it immediately.
            {
                if (S == 0)
                    H = g.ColorEditLastHue;
                if (V == 0)
                    S = g.ColorEditLastSat;
            }
        }
        else if (flags & ImGuiColorEditFlags_InputHSV)
        {
            H = col[0];
            S = col[1];
            V = col[2];
            ColorConvertHSVtoRGB(H, S, V, R, G, B);
        }
    }

    const int style_alpha8 = IM_F32_TO_INT8_SAT(style.Alpha);
    const ImU32 col_black = IM_COL32(0,0,0,style_alpha8);
    const ImU32 col_white = IM_COL32(255,255,255,style_alpha8);
    const ImU32 col_midgrey = IM_COL32(128,128,128,style_alpha8);
    const ImU32 col_hues[6 + 1] = { IM_COL32(255,0,0,style_alpha8), IM_COL32(255,255,0,style_alpha8), IM_COL32(0,255,0,style_alpha8), IM_COL32(0,255,255,style_alpha8), IM_COL32(0,0,255,style_alpha8), IM_COL32(255,0,255,style_alpha8), IM_COL32(255,0,0,style_alpha8) };

    ImVec4 hue_color_f(1, 1, 1, style.Alpha); ColorConvertHSVtoRGB(H, 1, 1, hue_color_f.x, hue_color_f.y, hue_color_f.z);
    ImU32 hue_color32 = ColorConvertFloat4ToU32(hue_color_f);
    ImU32 user_col32_striped_of_alpha = ColorConvertFloat4ToU32(ImVec4(R, G, B, style.Alpha)); // Important: this is still including the main rendering/style alpha!!

    ImVec2 sv_cursor_pos;

    if (flags & ImGuiColorEditFlags_PickerHueWheel)
    {
        // Render Hue Wheel
        const float aeps = 0.5f / wheel_r_outer; // Half a pixel arc length in radians (2pi cancels out).
        const int segment_per_arc = ImMax(4, (int)wheel_r_outer / 12);
        for (int n = 0; n < 6; n++)
        {
            const float a0 = (n)     /6.0f * 2.0f * IM_PI - aeps;
            const float a1 = (n+1.0f)/6.0f * 2.0f * IM_PI + aeps;
            const int vert_start_idx = draw_list->VtxBuffer.Size;
            draw_list->PathArcTo(wheel_center, (wheel_r_inner + wheel_r_outer)*0.5f, a0, a1, segment_per_arc);
            draw_list->PathStroke(col_white, false, wheel_thickness);
            const int vert_end_idx = draw_list->VtxBuffer.Size;

            // Paint colors over existing vertices
            ImVec2 gradient_p0(wheel_center.x + ImCos(a0) * wheel_r_inner, wheel_center.y + ImSin(a0) * wheel_r_inner);
            ImVec2 gradient_p1(wheel_center.x + ImCos(a1) * wheel_r_inner, wheel_center.y + ImSin(a1) * wheel_r_inner);
            ShadeVertsLinearColorGradientKeepAlpha(draw_list, vert_start_idx, vert_end_idx, gradient_p0, gradient_p1, col_hues[n], col_hues[n + 1]);
        }

        // Render Cursor + preview on Hue Wheel
        float cos_hue_angle = ImCos(H * 2.0f * IM_PI);
        float sin_hue_angle = ImSin(H * 2.0f * IM_PI);
        ImVec2 hue_cursor_pos(wheel_center.x + cos_hue_angle * (wheel_r_inner + wheel_r_outer) * 0.5f, wheel_center.y + sin_hue_angle * (wheel_r_inner + wheel_r_outer) * 0.5f);
        float hue_cursor_rad = value_changed_h ? wheel_thickness * 0.65f : wheel_thickness * 0.55f;
        int hue_cursor_segments = ImClamp((int)(hue_cursor_rad / 1.4f), 9, 32);
        draw_list->AddCircleFilled(hue_cursor_pos, hue_cursor_rad, hue_color32, hue_cursor_segments);
        draw_list->AddCircle(hue_cursor_pos, hue_cursor_rad + 1, col_midgrey, hue_cursor_segments);
        draw_list->AddCircle(hue_cursor_pos, hue_cursor_rad, col_white, hue_cursor_segments);

        // Render SV triangle (rotated according to hue)
        ImVec2 tra = wheel_center + ImRotate(triangle_pa, cos_hue_angle, sin_hue_angle);
        ImVec2 trb = wheel_center + ImRotate(triangle_pb, cos_hue_angle, sin_hue_angle);
        ImVec2 trc = wheel_center + ImRotate(triangle_pc, cos_hue_angle, sin_hue_angle);
        ImVec2 uv_white = GetFontTexUvWhitePixel();
        draw_list->PrimReserve(6, 6);
        draw_list->PrimVtx(tra, uv_white, hue_color32);
        draw_list->PrimVtx(trb, uv_white, hue_color32);
        draw_list->PrimVtx(trc, uv_white, col_white);
        draw_list->PrimVtx(tra, uv_white, 0);
        draw_list->PrimVtx(trb, uv_white, col_black);
        draw_list->PrimVtx(trc, uv_white, 0);
        draw_list->AddTriangle(tra, trb, trc, col_midgrey, 1.5f);
        sv_cursor_pos = ImLerp(ImLerp(trc, tra, ImSaturate(S)), trb, ImSaturate(1 - V));
    }
    else if (flags & ImGuiColorEditFlags_PickerHueBar)
    {
        // Render SV Square
        draw_list->AddRectFilledMultiColor(picker_pos, picker_pos + ImVec2(sv_picker_size, sv_picker_size), col_white, hue_color32, hue_color32, col_white);
        draw_list->AddRectFilledMultiColor(picker_pos, picker_pos + ImVec2(sv_picker_size, sv_picker_size), 0, 0, col_black, col_black);
        RenderFrameBorder(picker_pos, picker_pos + ImVec2(sv_picker_size, sv_picker_size), 0.0f);
        sv_cursor_pos.x = ImClamp(IM_ROUND(picker_pos.x + ImSaturate(S)     * sv_picker_size), picker_pos.x + 2, picker_pos.x + sv_picker_size - 2); // Sneakily prevent the circle to stick out too much
        sv_cursor_pos.y = ImClamp(IM_ROUND(picker_pos.y + ImSaturate(1 - V) * sv_picker_size), picker_pos.y + 2, picker_pos.y + sv_picker_size - 2);

        // Render Hue Bar
        for (int i = 0; i < 6; ++i)
            draw_list->AddRectFilledMultiColor(ImVec2(bar0_pos_x, picker_pos.y + i * (sv_picker_size / 6)), ImVec2(bar0_pos_x + bars_width, picker_pos.y + (i + 1) * (sv_picker_size / 6)), col_hues[i], col_hues[i], col_hues[i + 1], col_hues[i + 1]);
        float bar0_line_y = IM_ROUND(picker_pos.y + H * sv_picker_size);
        RenderFrameBorder(ImVec2(bar0_pos_x, picker_pos.y), ImVec2(bar0_pos_x + bars_width, picker_pos.y + sv_picker_size), 0.0f);
        RenderArrowsForVerticalBar(draw_list, ImVec2(bar0_pos_x - 1, bar0_line_y), ImVec2(bars_triangles_half_sz + 1, bars_triangles_half_sz), bars_width + 2.0f, style.Alpha);
    }

    // Render cursor/preview circle (clamp S/V within 0..1 range because floating points colors may lead HSV values to be out of range)
    float sv_cursor_rad = value_changed_sv ? 10.0f : 6.0f;
    draw_list->AddCircleFilled(sv_cursor_pos, sv_cursor_rad, user_col32_striped_of_alpha, 12);
    draw_list->AddCircle(sv_cursor_pos, sv_cursor_rad + 1, col_midgrey, 12);
    draw_list->AddCircle(sv_cursor_pos, sv_cursor_rad, col_white, 12);

    // Render alpha bar
    if (alpha_bar)
    {
        float alpha = ImSaturate(col[3]);
        ImRect bar1_bb(bar1_pos_x, picker_pos.y, bar1_pos_x + bars_width, picker_pos.y + sv_picker_size);
        RenderColorRectWithAlphaCheckerboard(draw_list, bar1_bb.Min, bar1_bb.Max, 0, bar1_bb.GetWidth() / 2.0f, ImVec2(0.0f, 0.0f));
        draw_list->AddRectFilledMultiColor(bar1_bb.Min, bar1_bb.Max, user_col32_striped_of_alpha, user_col32_striped_of_alpha, user_col32_striped_of_alpha & ~IM_COL32_A_MASK, user_col32_striped_of_alpha & ~IM_COL32_A_MASK);
        float bar1_line_y = IM_ROUND(picker_pos.y + (1.0f - alpha) * sv_picker_size);
        RenderFrameBorder(bar1_bb.Min, bar1_bb.Max, 0.0f);
        RenderArrowsForVerticalBar(draw_list, ImVec2(bar1_pos_x - 1, bar1_line_y), ImVec2(bars_triangles_half_sz + 1, bars_triangles_half_sz), bars_width + 2.0f, style.Alpha);
    }

    EndGroup();

    if (value_changed && memcmp(backup_initial_col, col, components * sizeof(float)) == 0)
        value_changed = false;
    if (value_changed)
        MarkItemEdited(window->DC.LastItemId);

    PopID();

    return value_changed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
movq %rsi, -0x50(%rbp)
leaq 0x5d71e(%rip), %rax     # 0xe3ce0
movq (%rax), %r15
movq 0x1ae0(%r15), %r14
movb $0x1, 0x90(%r14)
cmpb $0x0, 0x93(%r14)
je 0x865e5
xorl %ebx, %ebx
jmp 0x880fd
movq %rcx, %r12
movl %edx, %ebx
movq %rdi, %r13
movq 0x2b8(%r14), %rax
movq %rax, -0x90(%rbp)
callq 0x43d17
movaps %xmm0, -0x70(%rbp)
movq %r15, -0x40(%rbp)
andl $0x0, 0x1bf8(%r15)
movq %r13, -0x180(%rbp)
movq %r13, %rdi
callq 0x42ea4
callq 0x43ff2
movl %ebx, %r13d
notl %r13d
shrl $0x4, %r13d
andl $0x10, %r13d
orl %ebx, %r13d
testb $0x8, %bl
jne 0x86646
movq -0x50(%rbp), %rdi
movl %r13d, %esi
callq 0x881b7
testl $0x6000000, %ebx        # imm = 0x6000000
jne 0x86668
movl $0x6000000, %eax        # imm = 0x6000000
movq -0x40(%rbp), %rcx
andl 0x306c(%rcx), %eax
movl $0x2000000, %ecx        # imm = 0x2000000
cmovnel %eax, %ecx
orl %ecx, %r13d
testl $0x18000000, %r13d      # imm = 0x18000000
jne 0x8668b
movl $0x18000000, %eax       # imm = 0x18000000
movq -0x40(%rbp), %rcx
andl 0x306c(%rcx), %eax
movl $0x8000000, %ecx        # imm = 0x8000000
cmovnel %eax, %ecx
orl %ecx, %r13d
movl %r13d, %eax
andl $0x6000000, %eax        # imm = 0x6000000
leal -0x1(%rax), %ecx
xorl %ecx, %eax
cmpl %ecx, %eax
jbe 0x88114
movl %r13d, %eax
andl $0x18000000, %eax       # imm = 0x18000000
leal -0x1(%rax), %ecx
xorl %ecx, %eax
cmpl %ecx, %eax
jbe 0x88133
testb $0x8, %r13b
movq %r14, -0x188(%rbp)
movq %r12, -0x100(%rbp)
jne 0x866de
movl $0x10000, %eax          # imm = 0x10000
movq -0x40(%rbp), %r15
andl 0x306c(%r15), %eax
orl %eax, %r13d
jmp 0x866e2
movq -0x40(%rbp), %r15
xorl %ebx, %ebx
testb $0x2, %r13b
sete %bl
movl %r13d, %eax
andl $0x10002, %eax          # imm = 0x10002
xorl %r14d, %r14d
movl %eax, -0xb8(%rbp)
cmpl $0x10000, %eax          # imm = 0x10000
sete %r14b
movq -0x188(%rbp), %rax
movq 0xd8(%rax), %r12
movq %r12, -0x140(%rbp)
callq 0x43ec9
movaps %xmm0, -0x130(%rbp)
incl %r14d
cvtsi2ss %r14d, %xmm3
movss 0x15b0(%r15), %xmm2
movaps %xmm0, %xmm1
addss %xmm2, %xmm1
mulss %xmm3, %xmm1
movaps -0x70(%rbp), %xmm3
subss %xmm1, %xmm3
movaps %xmm3, %xmm1
cmpless %xmm0, %xmm1
movaps %xmm1, %xmm4
andnps %xmm3, %xmm4
andps %xmm0, %xmm1
orps %xmm4, %xmm1
movaps %xmm1, -0xb0(%rbp)
movd %r12d, %xmm3
movd %xmm3, -0x54(%rbp)
movaps %xmm1, %xmm0
addss %xmm3, %xmm0
movaps %xmm2, -0x170(%rbp)
movaps %xmm0, -0x210(%rbp)
addss %xmm0, %xmm2
movaps %xmm2, -0xa0(%rbp)
leaq 0xc(,%rbx,4), %rdx
leaq -0x240(%rbp), %rdi
movq -0x50(%rbp), %r14
movq %r14, %rsi
movq %rdx, -0x1e8(%rbp)
callq 0xc080
movss 0x31953(%rip), %xmm1    # 0xb810c
movaps -0xb0(%rbp), %xmm4
mulss %xmm4, %xmm1
movss 0x1584c(%rip), %xmm0    # 0x9c018
movaps %xmm4, %xmm2
mulss %xmm0, %xmm2
movaps %xmm2, %xmm3
movss %xmm1, -0x58(%rbp)
subss %xmm1, %xmm3
movaps -0x130(%rbp), %xmm1
addss %xmm4, %xmm1
mulss %xmm0, %xmm1
addss -0x54(%rbp), %xmm1
shrq $0x20, %r12
movd %r12d, %xmm0
movaps %xmm2, -0x200(%rbp)
movdqa %xmm0, -0x1b0(%rbp)
addss %xmm0, %xmm2
movaps %xmm1, -0x150(%rbp)
movss %xmm1, -0x78(%rbp)
movaps %xmm2, -0x1e0(%rbp)
movss %xmm2, -0x74(%rbp)
movaps %xmm4, %xmm0
mulss 0x318de(%rip), %xmm0    # 0xb8110
cvttps2dq %xmm0, %xmm0
cvtdq2ps %xmm0, %xmm0
movaps %xmm3, -0x70(%rbp)
movaps %xmm3, %xmm1
subss %xmm0, %xmm1
movss %xmm1, -0xd0(%rbp)
andl $0x0, -0xcc(%rbp)
movss 0x16099(%rip), %xmm0    # 0x9c8f4
mulss %xmm1, %xmm0
movss 0x318ad(%rip), %xmm2    # 0xb8114
mulss %xmm1, %xmm2
movss %xmm0, -0xc8(%rbp)
movss %xmm2, -0xc4(%rbp)
mulss 0x31895(%rip), %xmm1    # 0xb8118
movss %xmm0, -0xc0(%rbp)
movss %xmm1, -0xbc(%rbp)
movss (%r14), %xmm0
movss %xmm0, -0x2c(%rbp)
movss 0x4(%r14), %xmm1
movss %xmm1, -0x30(%rbp)
movss 0x8(%r14), %xmm2
movss %xmm2, -0x34(%rbp)
movss %xmm0, -0x84(%rbp)
movss %xmm1, -0x80(%rbp)
movss %xmm2, -0x7c(%rbp)
btl $0x1b, %r13d
jb 0x868e9
btl $0x1c, %r13d
jae 0x8694d
leaq -0x84(%rbp), %rdi
leaq -0x80(%rbp), %rsi
leaq -0x7c(%rbp), %rdx
callq 0x34e2e
jmp 0x8694d
leaq -0x2c(%rbp), %rdi
leaq -0x30(%rbp), %rsi
leaq -0x34(%rbp), %rdx
callq 0x34d92
leaq 0x3078(%r15), %rdi
pushq $0xc
popq %rdx
movq %r14, %rsi
callq 0xc5f0
testl %eax, %eax
jne 0x8694d
movss -0x30(%rbp), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm1
jne 0x86930
jp 0x86930
movq -0x40(%rbp), %rax
movss 0x3070(%rax), %xmm1
movss %xmm1, -0x2c(%rbp)
movss -0x34(%rbp), %xmm1
ucomiss %xmm0, %xmm1
jne 0x8694d
jp 0x8694d
movq -0x40(%rbp), %rax
movss 0x3074(%rax), %xmm0
movss %xmm0, -0x30(%rbp)
movaps -0x130(%rbp), %xmm0
addss -0xa0(%rbp), %xmm0
movaps %xmm0, -0x160(%rbp)
pushq $0x8
popq %rdi
pushq $0x1
popq %rsi
callq 0x423da
btl $0x1a, %r13d
jb 0x8699d
btl $0x19, %r13d
movaps -0xb0(%rbp), %xmm1
jb 0x86aa9
movl $0x0, -0x44(%rbp)
movl $0x0, -0x48(%rbp)
xorl %r15d, %r15d
jmp 0x86e59
movq -0x40(%rbp), %rax
movss 0x15b0(%rax), %xmm0
movaps -0xb0(%rbp), %xmm1
addss %xmm1, %xmm0
addss -0x130(%rbp), %xmm0
leaq -0xf0(%rbp), %rsi
movss %xmm0, (%rsi)
movss %xmm1, 0x4(%rsi)
leaq 0x32f6b(%rip), %rdi     # 0xb993e
movl $0x0, -0x44(%rbp)
xorl %edx, %edx
callq 0x7a6a4
callq 0x40529
movl $0x0, -0x48(%rbp)
movl $0x0, %r15d
testb %al, %al
je 0x86e44
movq -0x40(%rbp), %rax
movss 0x3cc(%rax), %xmm4
movaps -0x150(%rbp), %xmm3
subss %xmm3, %xmm4
movss 0x3d0(%rax), %xmm5
movaps -0x1e0(%rbp), %xmm2
subss %xmm2, %xmm5
movss 0x128(%rax), %xmm1
movss 0x12c(%rax), %xmm0
subss %xmm3, %xmm1
subss %xmm2, %xmm0
movss %xmm5, -0x1d0(%rbp)
movaps %xmm5, %xmm2
mulss %xmm5, %xmm2
movaps %xmm4, -0x1e0(%rbp)
movaps %xmm4, %xmm3
mulss %xmm4, %xmm3
addss %xmm2, %xmm3
movss 0x1558a(%rip), %xmm2    # 0x9bff0
addss -0x70(%rbp), %xmm2
mulss %xmm2, %xmm2
ucomiss %xmm2, %xmm3
movaps %xmm1, -0x120(%rbp)
movss %xmm0, -0x44(%rbp)
jb 0x86a9d
movss 0x15570(%rip), %xmm2    # 0x9bff8
addss -0x200(%rbp), %xmm2
mulss %xmm2, %xmm2
ucomiss %xmm3, %xmm2
jae 0x86c21
movl $0x0, -0x48(%rbp)
jmp 0x86c60
leaq -0xf0(%rbp), %rsi
movss %xmm1, (%rsi)
movss %xmm1, 0x4(%rsi)
leaq 0x32e7f(%rip), %rdi     # 0xb993f
movl $0x0, -0x44(%rbp)
xorl %edx, %edx
callq 0x7a6a4
callq 0x40529
testb %al, %al
je 0x86b55
movq -0x40(%rbp), %rax
movss 0x128(%rax), %xmm0
subss -0x54(%rbp), %xmm0
movss 0x15500(%rip), %xmm1    # 0x9bff0
addss -0xb0(%rbp), %xmm1
divss %xmm1, %xmm0
movss 0x154f4(%rip), %xmm2    # 0x9bff8
movaps %xmm2, %xmm3
minss %xmm0, %xmm3
xorps %xmm4, %xmm4
cmpltss %xmm4, %xmm0
andnps %xmm3, %xmm0
movss %xmm0, -0x30(%rbp)
movss 0x12c(%rax), %xmm0
subss -0x1b0(%rbp), %xmm0
divss %xmm1, %xmm0
movaps %xmm2, %xmm1
minss %xmm0, %xmm1
cmpltss %xmm4, %xmm0
movaps %xmm0, %xmm3
andps %xmm2, %xmm0
subss %xmm1, %xmm2
andnps %xmm2, %xmm3
orps %xmm3, %xmm0
movss %xmm0, -0x34(%rbp)
movb $0x1, %al
movl %eax, -0x44(%rbp)
testb $0x8, %r13b
jne 0x86b6a
leaq 0x18757(%rip), %rdi     # 0x9f2b9
pushq $0x1
popq %rsi
callq 0x44dd8
leaq -0xf0(%rbp), %rbx
movaps -0xa0(%rbp), %xmm0
movss %xmm0, (%rbx)
movl %r12d, 0x4(%rbx)
movq %rbx, %rdi
callq 0x438d9
movaps -0x130(%rbp), %xmm0
movss %xmm0, (%rbx)
movaps -0xb0(%rbp), %xmm0
movss %xmm0, 0x4(%rbx)
leaq 0x32d72(%rip), %rdi     # 0xb9918
leaq -0xf0(%rbp), %rsi
movl $0x0, -0x48(%rbp)
xorl %edx, %edx
callq 0x7a6a4
callq 0x40529
testb %al, %al
je 0x86c18
movq -0x40(%rbp), %rax
movss 0x12c(%rax), %xmm0
subss -0x1b0(%rbp), %xmm0
movss 0x15410(%rip), %xmm1    # 0x9bff0
movaps -0xb0(%rbp), %xmm3
addss %xmm3, %xmm1
divss %xmm1, %xmm0
movss 0x15401(%rip), %xmm1    # 0x9bff8
minss %xmm0, %xmm1
xorps %xmm2, %xmm2
cmpltss %xmm2, %xmm0
andnps %xmm1, %xmm0
movss %xmm0, -0x2c(%rbp)
movb $0x1, %al
movl %eax, -0x48(%rbp)
movb $0x1, %r15b
jmp 0x86e59
movl -0x44(%rbp), %r15d
jmp 0x86e59
callq 0xc250
divss 0x27052(%rip), %xmm0    # 0xadc80
mulss 0x153e2(%rip), %xmm0    # 0x9c018
movss 0x153ba(%rip), %xmm1    # 0x9bff8
addss %xmm0, %xmm1
xorps %xmm2, %xmm2
movaps %xmm0, %xmm3
cmpltss %xmm2, %xmm3
andps %xmm3, %xmm1
andnps %xmm0, %xmm3
orps %xmm1, %xmm3
movss %xmm3, -0x2c(%rbp)
movb $0x1, %al
movl %eax, -0x48(%rbp)
movss -0x2c(%rbp), %xmm0
mulss 0x15c4b(%rip), %xmm0    # 0x9c8b8
mulss 0x2700b(%rip), %xmm0    # 0xadc80
callq 0xc610
movss %xmm0, -0x150(%rbp)
movss 0x15c2e(%rip), %xmm0    # 0x9c8b8
mulss -0x2c(%rbp), %xmm0
mulss 0x26fe9(%rip), %xmm0    # 0xadc80
callq 0xc050
movaps %xmm0, %xmm4
movss -0x1d0(%rbp), %xmm3
mulss %xmm3, %xmm4
movaps -0x1e0(%rbp), %xmm2
movaps %xmm2, %xmm1
movss -0x150(%rbp), %xmm5
mulss %xmm5, %xmm1
subss %xmm4, %xmm1
mulss %xmm5, %xmm3
movss %xmm0, -0x1d0(%rbp)
mulss %xmm0, %xmm2
addss %xmm3, %xmm2
unpcklps %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
leaq -0xf0(%rbp), %rcx
movlps %xmm1, (%rcx)
leaq -0xd0(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
leaq -0xc0(%rbp), %rdx
callq 0x340b7
testb %al, %al
je 0x86e39
movss -0x1d0(%rbp), %xmm5
movaps %xmm5, %xmm0
movss -0x44(%rbp), %xmm3
mulss %xmm3, %xmm0
movaps -0x120(%rbp), %xmm2
movaps %xmm2, %xmm1
movss -0x150(%rbp), %xmm4
mulss %xmm4, %xmm1
subss %xmm0, %xmm1
mulss %xmm4, %xmm3
mulss %xmm5, %xmm2
addss %xmm3, %xmm2
unpcklps %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
leaq -0xf0(%rbp), %rcx
movlps %xmm1, (%rcx)
leaq -0xd0(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
leaq -0xc0(%rbp), %rdx
callq 0x340b7
testb %al, %al
jne 0x86d94
leaq -0xd0(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
leaq -0xc0(%rbp), %rdx
leaq -0xf0(%rbp), %rbx
movq %rbx, %rcx
callq 0x34211
movlps %xmm0, (%rbx)
leaq -0x138(%rbp), %rax
movq %rax, (%rsp)
leaq -0xd0(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
leaq -0xc0(%rbp), %rdx
leaq -0xf0(%rbp), %rcx
leaq -0x1c0(%rbp), %rbx
leaq -0x110(%rbp), %r14
movq %rbx, %r8
movq %r14, %r9
callq 0x3417d
movss 0x1521c(%rip), %xmm0    # 0x9bff8
movaps %xmm0, %xmm1
subss (%r14), %xmm1
movaps %xmm0, %xmm2
minss %xmm1, %xmm2
movss 0x15b09(%rip), %xmm3    # 0x9c8fc
cmpltss %xmm3, %xmm1
movaps %xmm1, %xmm4
andnps %xmm2, %xmm4
andps %xmm3, %xmm1
orps %xmm4, %xmm1
movss %xmm1, -0x34(%rbp)
movss (%rbx), %xmm2
divss %xmm1, %xmm2
minss %xmm2, %xmm0
cmpltss %xmm3, %xmm2
movaps %xmm2, %xmm1
andnps %xmm0, %xmm1
andps %xmm3, %xmm2
orps %xmm1, %xmm2
movss %xmm2, -0x30(%rbp)
movb $0x1, %al
movl %eax, -0x44(%rbp)
movb $0x1, %r15b
movq -0x50(%rbp), %r14
jmp 0x86e44
movl $0x0, -0x44(%rbp)
movl -0x48(%rbp), %r15d
testb $0x8, %r13b
jne 0x86e59
leaq 0x18468(%rip), %rdi     # 0x9f2b9
pushq $0x1
popq %rsi
callq 0x44dd8
movaps -0x170(%rbp), %xmm0
addss -0x160(%rbp), %xmm0
cmpl $0x10000, -0xb8(%rbp)   # imm = 0x10000
movaps %xmm0, -0x170(%rbp)
jne 0x86f2c
leaq -0xf0(%rbp), %rbx
movss %xmm0, (%rbx)
movl %r12d, 0x4(%rbx)
movq %rbx, %rdi
callq 0x438d9
movaps -0x130(%rbp), %xmm0
movss %xmm0, (%rbx)
movaps -0xb0(%rbp), %xmm0
movss %xmm0, 0x4(%rbx)
leaq 0x32a68(%rip), %rdi     # 0xb991c
leaq -0xf0(%rbp), %rsi
xorl %edx, %edx
callq 0x7a6a4
callq 0x40529
testb %al, %al
movq -0x100(%rbp), %r12
je 0x86f33
movq -0x40(%rbp), %rax
movss 0x12c(%rax), %xmm0
subss -0x1b0(%rbp), %xmm0
movss 0x15102(%rip), %xmm1    # 0x9bff0
addss -0xb0(%rbp), %xmm1
divss %xmm1, %xmm0
movss 0x150f6(%rip), %xmm1    # 0x9bff8
movaps %xmm1, %xmm2
minss %xmm0, %xmm2
xorps %xmm3, %xmm3
cmpltss %xmm3, %xmm0
movaps %xmm0, %xmm3
andps %xmm1, %xmm0
subss %xmm2, %xmm1
andnps %xmm1, %xmm3
orps %xmm3, %xmm0
movss %xmm0, 0xc(%r14)
movb $0x1, %r15b
jmp 0x86f33
movq -0x100(%rbp), %r12
callq 0x4246f
btl $0x8, %r13d
jb 0x86f58
movq -0x40(%rbp), %rax
movss 0x15b0(%rax), %xmm1
xorps %xmm0, %xmm0
callq 0x437ec
callq 0x43ff2
testb %r13b, %r13b
js 0x86fbd
movl %r13d, %ebx
movq %r14, %r13
movq %r12, %r14
movl %r15d, %r12d
movq -0x180(%rbp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x36123
cmpq %r15, %rax
movl %r12d, %r15d
movq %r14, %r12
movq %r13, %r14
movl %ebx, %r13d
je 0x86fbd
btl $0x8, %r13d
jae 0x86fac
movq %rax, %rbx
movq -0x40(%rbp), %rax
movss 0x15b0(%rax), %xmm1
xorps %xmm0, %xmm0
callq 0x437ec
movq %rbx, %rax
movq -0x180(%rbp), %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x7911c
btl $0x8, %r13d
jb 0x86fee
pushq $0x10
popq %rdi
pushq $0x1
popq %rsi
callq 0x423da
movss (%r14), %xmm0
movss 0x4(%r14), %xmm1
movss 0x8(%r14), %xmm2
testb $0x2, %r13b
jne 0x86ffa
movss 0xc(%r14), %xmm3
jmp 0x87002
movl %r15d, -0x120(%rbp)
jmp 0x87112
movss 0x14ff6(%rip), %xmm3    # 0x9bff8
movss %xmm0, -0xf0(%rbp)
movss %xmm1, -0xec(%rbp)
movss %xmm2, -0xe8(%rbp)
movss %xmm3, -0xe4(%rbp)
testb %r13b, %r13b
jns 0x87035
leaq 0x1f07d(%rip), %rdi     # 0xa60ab
xorl %eax, %eax
callq 0x795ac
movl %r13d, %ebx
andl $0x180e0040, %ebx       # imm = 0x180E0040
movss 0x14fbe(%rip), %xmm1    # 0x9c004
movaps -0x130(%rbp), %xmm0
mulss %xmm0, %xmm1
addss %xmm0, %xmm0
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
leaq 0x1f054(%rip), %rdi     # 0xa60b3
leaq -0xf0(%rbp), %rsi
movl %ebx, %edx
movaps %xmm1, -0x180(%rbp)
movaps %xmm1, %xmm0
callq 0x86066
testq %r12, %r12
je 0x87101
leaq 0x3289b(%rip), %rdi     # 0xb9922
xorl %eax, %eax
callq 0x795ac
movss (%r12), %xmm0
movss 0x4(%r12), %xmm1
movss 0x8(%r12), %xmm2
testb $0x2, %r13b
jne 0x870b1
movss 0xc(%r12), %xmm3
jmp 0x870b9
movss 0x14f3f(%rip), %xmm3    # 0x9bff8
leaq -0x1c0(%rbp), %rsi
movss %xmm0, (%rsi)
movss %xmm1, 0x4(%rsi)
movss %xmm2, 0x8(%rsi)
movss %xmm3, 0xc(%rsi)
leaq 0x32851(%rip), %rdi     # 0xb992b
movl %ebx, %edx
movaps -0x180(%rbp), %xmm0
callq 0x86066
testb %al, %al
je 0x87101
movq %r14, %rdi
movq %r12, %rsi
movq -0x1e8(%rbp), %rdx
callq 0xc080
movb $0x1, %r15b
movl %r15d, -0x120(%rbp)
callq 0x4246f
callq 0x4352b
movss 0x14efa(%rip), %xmm2    # 0x9c014
movaps -0x130(%rbp), %xmm1
mulss %xmm1, %xmm2
leaq 0x4(%r14), %r15
leaq 0x8(%r14), %rbx
cmpb $0x0, -0x48(%rbp)
jne 0x8713d
cmpb $0x0, -0x44(%rbp)
je 0x8722c
btl $0x1b, %r13d
jb 0x87174
btl $0x1c, %r13d
jae 0x8722c
movss -0x2c(%rbp), %xmm0
movss %xmm0, (%r14)
movss -0x30(%rbp), %xmm0
movss %xmm0, 0x4(%r14)
movss -0x34(%rbp), %xmm0
movss %xmm0, 0x8(%r14)
jmp 0x8722c
movss -0x2c(%rbp), %xmm1
movaps %xmm2, -0x100(%rbp)
movss 0x30f94(%rip), %xmm2    # 0xb811c
addss %xmm1, %xmm2
movss 0x14e64(%rip), %xmm0    # 0x9bff8
cmpless %xmm1, %xmm0
andps %xmm0, %xmm2
andnps %xmm1, %xmm0
orps %xmm2, %xmm0
movss -0x30(%rbp), %xmm3
xorps %xmm2, %xmm2
xorps %xmm1, %xmm1
cmpltss %xmm3, %xmm1
andps %xmm1, %xmm3
movss 0x1570b(%rip), %xmm4    # 0x9c8c8
andnps %xmm4, %xmm1
orps %xmm3, %xmm1
movss -0x34(%rbp), %xmm3
cmpltss %xmm3, %xmm2
andps %xmm2, %xmm3
movss 0x30f1c(%rip), %xmm4    # 0xb80f4
andnps %xmm4, %xmm2
orps %xmm3, %xmm2
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x34e2e
movaps -0x100(%rbp), %xmm2
movaps -0x130(%rbp), %xmm1
movss -0x2c(%rbp), %xmm0
movq -0x40(%rbp), %rcx
movss %xmm0, 0x3070(%rcx)
movss -0x30(%rbp), %xmm0
movss %xmm0, 0x3074(%rcx)
movq (%r14), %rax
movq %rax, 0x3078(%rcx)
movl 0x8(%r14), %eax
movl %eax, 0x3080(%rcx)
cvttps2dq %xmm2, %xmm0
testb $0x20, %r13b
jne 0x873f4
movaps %xmm0, -0x100(%rbp)
movaps -0x170(%rbp), %xmm0
cmpl $0x10000, -0xb8(%rbp)   # imm = 0x10000
je 0x8725b
movaps -0xa0(%rbp), %xmm0
addss %xmm1, %xmm0
subss -0x54(%rbp), %xmm0
callq 0x43b8c
movl %r13d, %r12d
andl $0x198e001a, %r12d      # imm = 0x198E001A
btl $0x14, %r13d
setae %al
testl $0x600000, %r13d        # imm = 0x600000
setne %cl
movb $0x1, %r14b
testb %cl, %al
jne 0x872c5
movl %r12d, %edx
orl $0x100004, %edx         # imm = 0x100004
leaq 0x3269a(%rip), %rdi     # 0xb9936
movq -0x50(%rbp), %rsi
callq 0x850a1
testb %al, %al
je 0x872c5
movb $0x1, %al
movl %eax, -0x120(%rbp)
movq -0x40(%rbp), %rax
cmpl $0x0, 0x1b30(%rax)
je 0x872c5
movb 0x1b3d(%rax), %r14b
btl $0x15, %r13d
setae %al
testl $0x500000, %r13d        # imm = 0x500000
setne %cl
testb %cl, %al
jne 0x87302
movl %r12d, %edx
orl $0x200004, %edx         # imm = 0x200004
leaq 0x32651(%rip), %rdi     # 0xb993c
movq -0x50(%rbp), %rsi
callq 0x850a1
movl -0x120(%rbp), %ecx
orb %al, %cl
movl %ecx, -0x120(%rbp)
btl $0x16, %r13d
setae %al
testl $0x300000, %r13d        # imm = 0x300000
setne %cl
testb %cl, %al
jne 0x87340
orl $0x400004, %r12d        # imm = 0x400004
leaq 0x3261c(%rip), %rdi     # 0xb9942
movq -0x50(%rbp), %rsi
movl %r12d, %edx
callq 0x850a1
movl -0x120(%rbp), %ecx
orb %al, %cl
movl %ecx, -0x120(%rbp)
btl $0x1b, %r13d
setae %r12b
callq 0x43cbe
orb %r14b, %r12b
jne 0x873e9
movq -0x50(%rbp), %rax
movss (%rax), %xmm0
movss 0x4(%rax), %xmm1
movss 0x8(%rax), %xmm2
leaq -0xf0(%rbp), %r14
leaq -0x1c0(%rbp), %rsi
leaq -0x110(%rbp), %rdx
movq %r14, %rdi
callq 0x34d92
xorps %xmm1, %xmm1
ucomiss (%r14), %xmm1
jb 0x873e9
movss -0x2c(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x873e9
movss -0x110(%rbp), %xmm2
ucomiss %xmm2, %xmm1
jb 0x873c4
movss -0x34(%rbp), %xmm3
ucomiss %xmm2, %xmm3
jne 0x873b2
jnp 0x873c4
movss -0x30(%rbp), %xmm1
mulss 0x14c59(%rip), %xmm3    # 0x9c018
movaps %xmm3, %xmm2
jmp 0x873da
ucomiss -0x1c0(%rbp), %xmm1
jb 0x873e9
movss -0x30(%rbp), %xmm1
mulss 0x14c3e(%rip), %xmm1    # 0x9c018
movq -0x50(%rbp), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x34e2e
movq -0x50(%rbp), %r14
movaps -0x100(%rbp), %xmm0
cvtdq2ps %xmm0, %xmm0
movaps %xmm0, -0x230(%rbp)
cmpb $0x0, -0x120(%rbp)
je 0x874e1
btl $0x1b, %r13d
jb 0x87456
btl $0x1c, %r13d
jae 0x874e1
movss (%r14), %xmm0
movss %xmm0, -0x2c(%rbp)
movss 0x4(%r14), %xmm1
movss %xmm1, -0x30(%rbp)
movss 0x8(%r14), %xmm2
movss %xmm2, -0x34(%rbp)
leaq -0x84(%rbp), %rdi
leaq -0x80(%rbp), %rsi
leaq -0x7c(%rbp), %rdx
callq 0x34e2e
jmp 0x874e1
movss (%r14), %xmm0
movss %xmm0, -0x84(%rbp)
movss 0x4(%r14), %xmm1
movss %xmm1, -0x80(%rbp)
movss 0x8(%r14), %xmm2
movss %xmm2, -0x7c(%rbp)
leaq -0x2c(%rbp), %rdi
leaq -0x30(%rbp), %rsi
leaq -0x34(%rbp), %rdx
callq 0x34d92
movq -0x40(%rbp), %rax
leaq 0x3078(%rax), %rdi
pushq $0xc
popq %rdx
movq %r14, %rsi
callq 0xc5f0
testl %eax, %eax
jne 0x874e1
movss -0x30(%rbp), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm1
jne 0x874c4
jp 0x874c4
movq -0x40(%rbp), %rax
movss 0x3070(%rax), %xmm1
movss %xmm1, -0x2c(%rbp)
movss -0x34(%rbp), %xmm1
ucomiss %xmm0, %xmm1
jne 0x874e1
jp 0x874e1
movq -0x40(%rbp), %rax
movss 0x3074(%rax), %xmm0
movss %xmm0, -0x30(%rbp)
movq -0x40(%rbp), %r14
movss 0x1560(%r14), %xmm0
movss 0x14b02(%rip), %xmm1    # 0x9bff8
movaps %xmm1, %xmm2
minss %xmm0, %xmm2
xorps %xmm3, %xmm3
movaps %xmm0, %xmm4
cmpltss %xmm3, %xmm4
andnps %xmm2, %xmm4
mulss 0x15361(%rip), %xmm4    # 0x9c874
addss 0x14afd(%rip), %xmm4    # 0x9c018
movabsq $0x3f8000003f800000, %rax # imm = 0x3F8000003F800000
leaq -0x1bc(%rbp), %rsi
movq %rax, -0x4(%rsi)
leaq -0x1b8(%rbp), %rdx
movl $0x3f800000, (%rdx)     # imm = 0x3F800000
movss %xmm0, 0x4(%rdx)
cvttss2si %xmm4, %r12d
shll $0x18, %r12d
leal 0xff0000(%r12), %eax
leal 0xffff00(%r12), %ecx
leal 0xffffff(%r12), %edi
movl %edi, -0x150(%rbp)
leal 0xff(%r12), %r15d
movl %r15d, -0xf0(%rbp)
leal 0xffff(%r12), %edi
movl %edi, -0xec(%rbp)
leal 0xff00(%r12), %edi
movl %edi, -0xe8(%rbp)
leal 0x808080(%r12), %edi
movl %edi, -0xb4(%rbp)
movl %ecx, -0xe4(%rbp)
movl %eax, -0xe0(%rbp)
leal 0xff00ff(%r12), %eax
movl %eax, -0xdc(%rbp)
movl %r15d, -0xd8(%rbp)
movss -0x2c(%rbp), %xmm0
leaq -0x1c0(%rbp), %rbx
movaps %xmm1, %xmm2
movq %rbx, %rdi
callq 0x34e2e
movq %rbx, %rdi
callq 0x34ce6
movl %eax, %ebx
movss -0x84(%rbp), %xmm0
movss -0x80(%rbp), %xmm1
movss -0x7c(%rbp), %xmm2
movss 0x1560(%r14), %xmm3
leaq -0x110(%rbp), %rdi
movss %xmm0, (%rdi)
movss %xmm1, 0x4(%rdi)
movss %xmm2, 0x8(%rdi)
movss %xmm3, 0xc(%rdi)
callq 0x34ce6
movl %eax, -0x198(%rbp)
andq $0x0, -0x138(%rbp)
btl $0x1a, %r13d
jb 0x878a6
btl $0x19, %r13d
jae 0x87eb0
movaps -0x1b0(%rbp), %xmm1
addss -0xb0(%rbp), %xmm1
movaps -0x210(%rbp), %xmm0
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
leaq -0x110(%rbp), %r13
movlps %xmm0, (%r13)
movl -0x150(%rbp), %ecx
movl %ecx, (%rsp)
movl %ebx, %r8d
leaq -0x140(%rbp), %rbx
movl %r15d, -0x100(%rbp)
movq -0x90(%rbp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movl %r8d, %r9d
callq 0x64098
movss (%rbx), %xmm0
movaps -0xb0(%rbp), %xmm2
addss %xmm2, %xmm0
movss 0x4(%rbx), %xmm1
addss %xmm2, %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movlps %xmm0, (%r13)
movl %r12d, (%rsp)
leaq -0x110(%rbp), %rdx
xorl %r14d, %r14d
movq %r15, %rdi
movl -0x100(%rbp), %r15d
movq %rbx, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
movl %r12d, %r9d
callq 0x64098
movsd (%rbx), %xmm0
movaps -0xb0(%rbp), %xmm3
movaps %xmm3, %xmm1
addss %xmm0, %xmm1
movaps %xmm0, %xmm2
shufps $0x55, %xmm0, %xmm2     # xmm2 = xmm2[1,1],xmm0[1,1]
addss %xmm3, %xmm2
unpcklps %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
xorps %xmm2, %xmm2
callq 0x36b98
movss -0x30(%rbp), %xmm1
movss 0x148e1(%rip), %xmm8    # 0x9bff8
movaps %xmm8, %xmm0
minss %xmm1, %xmm0
xorps %xmm10, %xmm10
cmpltss %xmm10, %xmm1
andnps %xmm0, %xmm1
movaps -0xb0(%rbp), %xmm9
mulss %xmm9, %xmm1
movss (%rbx), %xmm3
movss 0x4(%rbx), %xmm0
addss %xmm3, %xmm1
movss 0x148ca(%rip), %xmm7    # 0x9c018
addss %xmm7, %xmm1
cvttps2dq %xmm1, %xmm1
cvtdq2ps %xmm1, %xmm4
movss 0x15133(%rip), %xmm1    # 0x9c894
movaps %xmm9, %xmm5
addss %xmm3, %xmm5
addss %xmm1, %xmm3
movss 0x15143(%rip), %xmm2    # 0x9c8b8
addss %xmm2, %xmm5
minss %xmm4, %xmm5
cmpltss %xmm3, %xmm4
movaps %xmm4, %xmm6
andnps %xmm5, %xmm6
andps %xmm3, %xmm4
orps %xmm6, %xmm4
movaps %xmm8, %xmm3
subss -0x34(%rbp), %xmm3
movss %xmm4, -0x138(%rbp)
movaps %xmm8, %xmm4
minss %xmm3, %xmm4
cmpltss %xmm10, %xmm3
andnps %xmm4, %xmm3
mulss %xmm9, %xmm3
addss %xmm0, %xmm3
addss %xmm7, %xmm3
cvttps2dq %xmm3, %xmm3
cvtdq2ps %xmm3, %xmm3
addss %xmm0, %xmm1
addss %xmm9, %xmm0
addss %xmm2, %xmm0
minss %xmm3, %xmm0
cmpltss %xmm1, %xmm3
movaps %xmm3, %xmm2
andnps %xmm0, %xmm2
andps %xmm1, %xmm3
orps %xmm2, %xmm3
movaps %xmm9, %xmm2
movss %xmm3, -0x134(%rbp)
movaps %xmm9, %xmm0
divss 0x14822(%rip), %xmm0    # 0x9c020
movss %xmm0, -0x70(%rbp)
leaq -0x190(%rbp), %rbx
cmpq $0x6, %r14
je 0x87b47
movss -0x13c(%rbp), %xmm0
cvtsi2ss %r14d, %xmm1
movss -0x70(%rbp), %xmm3
mulss %xmm3, %xmm1
addss %xmm0, %xmm1
movaps -0xa0(%rbp), %xmm2
movss %xmm2, -0x110(%rbp)
movss %xmm1, -0x10c(%rbp)
leaq 0x1(%r14), %r12
cvtsi2ss %r12d, %xmm1
mulss %xmm3, %xmm1
addss %xmm0, %xmm1
movaps -0x160(%rbp), %xmm0
movss %xmm0, -0x190(%rbp)
movss %xmm1, -0x18c(%rbp)
movl -0xec(%rbp,%r14,4), %r14d
movl %r14d, (%rsp)
movq -0x90(%rbp), %rdi
movq %r13, %rsi
movq %rbx, %rdx
movl %r15d, %ecx
movl %r15d, %r8d
movl %r14d, %r9d
callq 0x64098
movaps -0xb0(%rbp), %xmm2
movl %r14d, %r15d
movq %r12, %r14
jmp 0x8780a
movl %r15d, -0x100(%rbp)
movl %ebx, -0x194(%rbp)
movq %r12, -0x218(%rbp)
movss 0x14756(%rip), %xmm0    # 0x9c018
movaps %xmm0, %xmm2
movaps -0x200(%rbp), %xmm1
divss %xmm1, %xmm2
cvttss2si %xmm1, %eax
pushq $0xc
popq %rcx
cltd
idivl %ecx
cmpl $0x5, %eax
pushq $0x4
popq %rcx
cmovgel %eax, %ecx
movl %ecx, -0x210(%rbp)
movaps 0x146f0(%rip), %xmm3    # 0x9bfe0
movaps %xmm2, -0x1b0(%rbp)
xorps %xmm2, %xmm3
movaps %xmm3, -0x1e0(%rbp)
addss -0x70(%rbp), %xmm1
movaps %xmm1, -0x200(%rbp)
mulss %xmm0, %xmm1
movaps %xmm1, -0x1d0(%rbp)
xorl %r13d, %r13d
movq -0x90(%rbp), %r15
cmpq $0x6, %r13
movss 0x146ca(%rip), %xmm0    # 0x9bff8
je 0x87ab6
cvtsi2ss %r13d, %xmm3
movaps %xmm3, %xmm4
movss 0x146dc(%rip), %xmm2    # 0x9c020
divss %xmm2, %xmm4
addss %xmm4, %xmm4
movss 0x2632c(%rip), %xmm1    # 0xadc80
mulss %xmm1, %xmm4
addss -0x1e0(%rbp), %xmm4
movss %xmm4, -0x160(%rbp)
addss %xmm0, %xmm3
divss %xmm2, %xmm3
addss %xmm3, %xmm3
mulss %xmm1, %xmm3
addss -0x1b0(%rbp), %xmm3
movaps %xmm3, %xmm2
movss %xmm3, -0x54(%rbp)
movl 0x20(%r15), %ebx
movq %r15, %rdi
leaq -0x78(%rbp), %rsi
movaps -0x1d0(%rbp), %xmm0
movaps %xmm4, %xmm1
movl -0x210(%rbp), %edx
callq 0x63550
movq %r15, %rdi
movl -0x150(%rbp), %esi
xorl %edx, %edx
movss -0x58(%rbp), %xmm0
callq 0x4c428
movl 0x20(%r15), %r14d
movss -0x78(%rbp), %xmm0
movss %xmm0, -0xa0(%rbp)
movss -0x160(%rbp), %xmm0
callq 0xc610
mulss -0x70(%rbp), %xmm0
addss -0xa0(%rbp), %xmm0
movaps %xmm0, -0xa0(%rbp)
movss -0x74(%rbp), %xmm0
movss %xmm0, -0x180(%rbp)
movss -0x160(%rbp), %xmm0
callq 0xc050
mulss -0x70(%rbp), %xmm0
addss -0x180(%rbp), %xmm0
movaps -0xa0(%rbp), %xmm1
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movaps %xmm1, -0xa0(%rbp)
movss -0x78(%rbp), %xmm0
movaps %xmm0, -0x160(%rbp)
movss -0x54(%rbp), %xmm0
callq 0xc610
mulss -0x70(%rbp), %xmm0
movaps -0x160(%rbp), %xmm1
addss %xmm0, %xmm1
movaps %xmm1, -0x160(%rbp)
movss -0x74(%rbp), %xmm0
movss %xmm0, -0x180(%rbp)
movss -0x54(%rbp), %xmm0
callq 0xc050
mulss -0x70(%rbp), %xmm0
addss -0x180(%rbp), %xmm0
movaps -0x160(%rbp), %xmm1
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movl -0xec(%rbp,%r13,4), %r12d
incq %r13
movq %r15, %rdi
movl %ebx, %esi
movl %r14d, %edx
movaps -0xa0(%rbp), %xmm0
movl -0x100(%rbp), %ecx
movl %r12d, %r8d
callq 0x65953
movl %r12d, -0x100(%rbp)
jmp 0x87922
movss -0x2c(%rbp), %xmm0
addss %xmm0, %xmm0
movss 0x261b9(%rip), %xmm1    # 0xadc80
mulss %xmm1, %xmm0
callq 0xc610
movss %xmm0, -0x70(%rbp)
movss -0x2c(%rbp), %xmm0
addss %xmm0, %xmm0
mulss 0x2619a(%rip), %xmm0    # 0xadc80
callq 0xc050
movaps -0x200(%rbp), %xmm2
movaps %xmm2, %xmm3
mulss -0x70(%rbp), %xmm3
movss 0x14516(%rip), %xmm1    # 0x9c018
mulss %xmm1, %xmm3
addss -0x78(%rbp), %xmm3
movss %xmm0, -0xa0(%rbp)
mulss %xmm0, %xmm2
mulss %xmm1, %xmm2
addss -0x74(%rbp), %xmm2
movss %xmm3, -0x110(%rbp)
movss %xmm2, -0x10c(%rbp)
cmpb $0x0, -0x48(%rbp)
jne 0x87be5
movss 0x305de(%rip), %xmm0    # 0xb8120
jmp 0x87bed
movss -0x13c(%rbp), %xmm1
movss -0x2c(%rbp), %xmm0
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
addss 0x144b4(%rip), %xmm0    # 0x9c018
cvttps2dq %xmm0, %xmm0
cvtdq2ps %xmm0, %xmm0
movaps %xmm0, -0x70(%rbp)
addss %xmm1, %xmm2
movaps -0xa0(%rbp), %xmm0
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movaps -0x160(%rbp), %xmm1
unpcklps %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
xorps %xmm2, %xmm2
callq 0x36b98
movaps -0xa0(%rbp), %xmm0
addss 0x14452(%rip), %xmm0    # 0x9bff0
unpcklps -0x70(%rbp), %xmm0      # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
movss 0x1444e(%rip), %xmm1    # 0x9bff8
movaps -0x230(%rbp), %xmm4
addss %xmm4, %xmm1
movss 0x14cd7(%rip), %xmm2    # 0x9c894
addss -0x130(%rbp), %xmm2
movq -0x40(%rbp), %rax
movss 0x1560(%rax), %xmm3
unpcklps %xmm4, %xmm1            # xmm1 = xmm1[0],xmm4[0],xmm1[1],xmm4[1]
movq -0x90(%rbp), %rdi
callq 0x883a5
jmp 0x87eb0
movss 0x14cf7(%rip), %xmm0    # 0x9c8e4
movq -0x90(%rbp), %r15
movss -0x58(%rbp), %xmm1
mulss %xmm0, %xmm1
movaps %xmm1, %xmm0
movss %xmm1, -0x58(%rbp)
divss 0x30517(%rip), %xmm0    # 0xb8124
cvttss2si %xmm0, %eax
cmpl $0x20, %eax
pushq $0x20
popq %rcx
cmovll %eax, %ecx
cmpl $0xa, %ecx
pushq $0x9
popq %rbx
cmovgel %ecx, %ebx
leaq -0x110(%rbp), %r14
movq %r15, %rdi
movq %r14, %rsi
movaps %xmm1, %xmm0
movl -0x194(%rbp), %r12d
movl %r12d, %edx
movl %ebx, %ecx
callq 0x64486
movss -0x58(%rbp), %xmm0
movss 0x143a7(%rip), %xmm1    # 0x9bff8
addss %xmm1, %xmm0
movq %r15, %rdi
movq %r14, %rsi
movl -0xb4(%rbp), %edx
movl %ebx, %ecx
callq 0x6436a
movq %r15, %rdi
movq %r14, %rsi
movss -0x58(%rbp), %xmm0
movl -0x150(%rbp), %edx
movl %ebx, %ecx
movss 0x14375(%rip), %xmm1    # 0x9bff8
callq 0x6436a
movss -0xd0(%rbp), %xmm2
movss -0xcc(%rbp), %xmm0
movss -0xa0(%rbp), %xmm7
movaps %xmm7, %xmm1
mulss %xmm0, %xmm1
movaps %xmm2, %xmm3
movss -0x70(%rbp), %xmm6
mulss %xmm6, %xmm3
subss %xmm1, %xmm3
mulss %xmm6, %xmm0
mulss %xmm7, %xmm2
addss %xmm0, %xmm2
movss -0x78(%rbp), %xmm1
movss -0x74(%rbp), %xmm0
addss %xmm1, %xmm3
addss %xmm0, %xmm2
unpcklps %xmm2, %xmm3            # xmm3 = xmm3[0],xmm2[0],xmm3[1],xmm2[1]
leaq -0x190(%rbp), %r13
movlps %xmm3, (%r13)
movss -0xc8(%rbp), %xmm2
movss -0xc4(%rbp), %xmm3
movaps %xmm7, %xmm4
mulss %xmm3, %xmm4
movaps %xmm2, %xmm5
mulss %xmm6, %xmm5
subss %xmm4, %xmm5
mulss %xmm6, %xmm3
mulss %xmm7, %xmm2
addss %xmm3, %xmm2
addss %xmm1, %xmm5
addss %xmm0, %xmm2
unpcklps %xmm2, %xmm5            # xmm5 = xmm5[0],xmm2[0],xmm5[1],xmm2[1]
movq %r15, %r14
leaq -0x250(%rbp), %r15
movlps %xmm5, (%r15)
movss -0xc0(%rbp), %xmm2
movss -0xbc(%rbp), %xmm3
movaps %xmm7, %xmm4
mulss %xmm3, %xmm4
movaps %xmm2, %xmm5
mulss %xmm6, %xmm5
subss %xmm4, %xmm5
mulss %xmm3, %xmm6
mulss %xmm7, %xmm2
addss %xmm6, %xmm2
addss %xmm1, %xmm5
addss %xmm0, %xmm2
unpcklps %xmm2, %xmm5            # xmm5 = xmm5[0],xmm2[0],xmm5[1],xmm2[1]
leaq -0x220(%rbp), %rax
movlps %xmm5, (%rax)
callq 0x42b43
leaq -0x248(%rbp), %rbx
movlps %xmm0, (%rbx)
pushq $0x6
popq %rdx
movq %r14, %rdi
movl %edx, %esi
callq 0x623b8
movq %r14, %rdi
movq %r13, %rsi
movq %rbx, %rdx
movl %r12d, %ecx
callq 0x9313a
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movl %r12d, %ecx
callq 0x9313a
movq %r14, %rdi
leaq -0x220(%rbp), %r12
movq %r12, %rsi
movq %rbx, %rdx
movl -0x150(%rbp), %ecx
callq 0x9313a
movq %r14, %rdi
movq %r13, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x9313a
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq -0x218(%rbp), %rcx
callq 0x9313a
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x9313a
movss 0x1a484(%rip), %xmm0    # 0xa2288
movq %r14, %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %r12, %rcx
movl -0xb4(%rbp), %r8d
callq 0x642a0
movss -0x30(%rbp), %xmm1
movss 0x141cf(%rip), %xmm6    # 0x9bff8
movaps %xmm6, %xmm0
minss %xmm1, %xmm0
xorps %xmm2, %xmm2
cmpltss %xmm2, %xmm1
andnps %xmm0, %xmm1
movss (%r12), %xmm3
movss 0x4(%r12), %xmm4
movss (%r13), %xmm5
movss 0x4(%r13), %xmm0
subss %xmm3, %xmm5
mulss %xmm1, %xmm5
addss %xmm3, %xmm5
subss %xmm4, %xmm0
mulss %xmm1, %xmm0
addss %xmm4, %xmm0
movaps %xmm6, %xmm3
movaps %xmm6, %xmm1
subss -0x34(%rbp), %xmm1
minss %xmm1, %xmm3
cmpltss %xmm2, %xmm1
andnps %xmm3, %xmm1
movss (%r15), %xmm2
movss 0x4(%r15), %xmm3
subss %xmm5, %xmm2
mulss %xmm1, %xmm2
addss %xmm5, %xmm2
subss %xmm0, %xmm3
mulss %xmm1, %xmm3
addss %xmm0, %xmm3
unpcklps %xmm3, %xmm2            # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
movlps %xmm2, -0x138(%rbp)
cmpb $0x0, -0x44(%rbp)
movq -0x40(%rbp), %r15
movl -0x198(%rbp), %r13d
jne 0x87ecb
movss 0x14157(%rip), %xmm0    # 0x9c020
jmp 0x87ed3
movss 0x14149(%rip), %xmm0    # 0x9c01c
movq -0x90(%rbp), %r12
leaq -0x138(%rbp), %rbx
pushq $0xc
popq %r14
movq %r12, %rdi
movq %rbx, %rsi
movss %xmm0, -0x70(%rbp)
movl %r13d, %edx
movl %r14d, %ecx
callq 0x64486
movss -0x70(%rbp), %xmm0
movss 0x140f0(%rip), %xmm1    # 0x9bff8
addss %xmm1, %xmm0
movq %r12, %rdi
movq %rbx, %rsi
movl -0xb4(%rbp), %edx
movl %r14d, %ecx
callq 0x6436a
movq %r12, %rdi
movq %rbx, %rsi
movss -0x70(%rbp), %xmm0
movl -0x150(%rbp), %edx
movl %r14d, %ecx
movss 0x140bc(%rip), %xmm1    # 0x9bff8
callq 0x6436a
cmpl $0x10000, -0xb8(%rbp)   # imm = 0x10000
jne 0x880b3
movq -0x50(%rbp), %rax
movss 0xc(%rax), %xmm2
movaps %xmm2, -0xa0(%rbp)
movss 0x1408f(%rip), %xmm1    # 0x9bff8
movaps %xmm1, %xmm0
minss %xmm2, %xmm0
subss %xmm0, %xmm1
movaps %xmm1, -0x70(%rbp)
movss -0x13c(%rbp), %xmm0
movaps -0x130(%rbp), %xmm2
movaps -0x170(%rbp), %xmm3
addss %xmm3, %xmm2
movaps -0xb0(%rbp), %xmm1
addss %xmm0, %xmm1
leaq -0x108(%rbp), %rbx
movss %xmm3, -0x8(%rbx)
movss %xmm0, -0x4(%rbx)
movss %xmm2, (%rbx)
movss %xmm1, 0x4(%rbx)
movsd -0x8(%rbx), %xmm0
movsd (%rbx), %xmm1
subss %xmm0, %xmm2
movss 0x1404c(%rip), %xmm3    # 0x9c018
mulss %xmm3, %xmm2
pushq $-0x1
popq %rdx
xorps %xmm3, %xmm3
xorps %xmm4, %xmm4
movq %r12, %rdi
xorl %esi, %esi
callq 0x6c6fc
movl %r13d, %r9d
andl $0xffffff, %r9d         # imm = 0xFFFFFF
movl %r9d, (%rsp)
leaq -0x110(%rbp), %r14
movq %r12, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl %r13d, %ecx
movl %r13d, %r8d
callq 0x64098
movaps -0xa0(%rbp), %xmm2
cmpltss 0x148a8(%rip), %xmm2    # 0x9c8c4
movaps %xmm2, %xmm0
andnps -0x70(%rbp), %xmm0
movss 0x13fcd(%rip), %xmm1    # 0x9bff8
andps %xmm1, %xmm2
orps %xmm0, %xmm2
mulss -0xb0(%rbp), %xmm2
addss -0x13c(%rbp), %xmm2
addss 0x13fcf(%rip), %xmm2    # 0x9c018
cvttps2dq %xmm2, %xmm0
cvtdq2ps %xmm0, %xmm0
movaps %xmm0, -0x70(%rbp)
movsd (%r14), %xmm0
movsd 0x8(%r14), %xmm1
xorps %xmm2, %xmm2
callq 0x36b98
movaps -0x170(%rbp), %xmm0
addss 0x13f7a(%rip), %xmm0    # 0x9bff0
unpcklps -0x70(%rbp), %xmm0      # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
movaps -0x230(%rbp), %xmm4
movaps %xmm4, %xmm1
movss 0x13f6c(%rip), %xmm2    # 0x9bff8
addss %xmm2, %xmm1
movaps -0x130(%rbp), %xmm2
addss 0x147f5(%rip), %xmm2    # 0x9c894
movss 0x1560(%r15), %xmm3
unpcklps %xmm4, %xmm1            # xmm1 = xmm1[0],xmm4[0],xmm1[1],xmm4[1]
movq %r12, %rdi
callq 0x883a5
callq 0x4352b
movl -0x120(%rbp), %ebx
testb %bl, %bl
movq -0x50(%rbp), %rsi
je 0x880e1
leaq -0x240(%rbp), %rdi
movq -0x1e8(%rbp), %rdx
callq 0xc5f0
testl %eax, %eax
movzbl %bl, %ebx
cmovel %eax, %ebx
movq -0x188(%rbp), %rax
testb $0x1, %bl
je 0x880f8
movl 0x124(%rax), %edi
callq 0x3749e
callq 0x42fea
andb $0x1, %bl
movl %ebx, %eax
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x31771(%rip), %rdi     # 0xb988c
leaq 0x30266(%rip), %rsi     # 0xb8388
leaq 0x3179b(%rip), %rcx     # 0xb98c4
movl $0x1337, %edx           # imm = 0x1337
callq 0xc140
leaq 0x31666(%rip), %rdi     # 0xb97a0
leaq 0x30247(%rip), %rsi     # 0xb8388
leaq 0x3177c(%rip), %rcx     # 0xb98c4
movl $0x1338, %edx           # imm = 0x1338
callq 0xc140