// File: 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
subq $0x4f0, %rsp            # imm = 0x4F0
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
leaq 0xc51ff(%rip), %rax     # 0x212f40
movq (%rax), %rax
movq %rax, -0x30(%rbp)
callq 0xeb270
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
testb $0x1, 0x93(%rax)
je 0x14dd67
movb $0x0, -0x1(%rbp)
jmp 0x15025a
movq -0x38(%rbp), %rax
movq 0x2b8(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
addq $0x1560, %rax           # imm = 0x1560
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x50(%rbp)
callq 0xdcdc0
movss %xmm0, -0x54(%rbp)
movq -0x30(%rbp), %rdi
addq $0x1bf8, %rdi           # imm = 0x1BF8
callq 0x162560
movq -0x10(%rbp), %rdi
callq 0xdb440
callq 0xdd220
movl -0x1c(%rbp), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
jne 0x14ddce
movl -0x1c(%rbp), %eax
orl $0x10, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0x14dde5
movq -0x18(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x150320
movl -0x1c(%rbp), %eax
andl $0x6000000, %eax        # imm = 0x6000000
cmpl $0x0, %eax
jne 0x14de36
movq -0x30(%rbp), %rax
movl 0x306c(%rax), %eax
andl $0x6000000, %eax        # imm = 0x6000000
cmpl $0x0, %eax
je 0x14de18
movq -0x30(%rbp), %rax
movl 0x306c(%rax), %eax
movl %eax, -0x36c(%rbp)
jmp 0x14de25
movl $0xa900000, %eax        # imm = 0xA900000
movl %eax, -0x36c(%rbp)
jmp 0x14de25
movl -0x36c(%rbp), %eax
andl $0x6000000, %eax        # imm = 0x6000000
orl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
andl $0x18000000, %eax       # imm = 0x18000000
cmpl $0x0, %eax
jne 0x14de87
movq -0x30(%rbp), %rax
movl 0x306c(%rax), %eax
andl $0x18000000, %eax       # imm = 0x18000000
cmpl $0x0, %eax
je 0x14de69
movq -0x30(%rbp), %rax
movl 0x306c(%rax), %eax
movl %eax, -0x370(%rbp)
jmp 0x14de76
movl $0xa900000, %eax        # imm = 0xA900000
movl %eax, -0x370(%rbp)
jmp 0x14de76
movl -0x370(%rbp), %eax
andl $0x18000000, %eax       # imm = 0x18000000
orl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %edi
andl $0x6000000, %edi        # imm = 0x6000000
callq 0x13de90
testb $0x1, %al
jne 0x14de9b
jmp 0x14de9d
jmp 0x14debc
leaq 0x41c26(%rip), %rdi     # 0x18faca
leaq 0x40535(%rip), %rsi     # 0x18e3e0
movl $0x1337, %edx           # imm = 0x1337
leaq 0x41c4b(%rip), %rcx     # 0x18fb02
callq 0xd180
movl -0x1c(%rbp), %edi
andl $0x18000000, %edi       # imm = 0x18000000
callq 0x13de90
testb $0x1, %al
jne 0x14ded0
jmp 0x14ded2
jmp 0x14def1
leaq 0x41b05(%rip), %rdi     # 0x18f9de
leaq 0x40500(%rip), %rsi     # 0x18e3e0
movl $0x1338, %edx           # imm = 0x1338
leaq 0x41c16(%rip), %rcx     # 0x18fb02
callq 0xd180
movl -0x1c(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0x14df11
movq -0x30(%rbp), %rax
movl 0x306c(%rax), %eax
andl $0x10000, %eax          # imm = 0x10000
orl -0x1c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %edx
andl $0x2, %edx
movl $0x4, %eax
movl $0x3, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -0x58(%rbp)
movl -0x1c(%rbp), %ecx
andl $0x10000, %ecx          # imm = 0x10000
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x371(%rbp)
je 0x14df54
movl -0x1c(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
movb %al, -0x371(%rbp)
movb -0x371(%rbp), %al
andb $0x1, %al
movb %al, -0x59(%rbp)
movq -0x38(%rbp), %rax
movq 0xd8(%rax), %rax
movq %rax, -0x64(%rbp)
callq 0xdd050
movss %xmm0, -0x68(%rbp)
movss -0x68(%rbp), %xmm0
movss %xmm0, -0x6c(%rbp)
movss 0x22cb2(%rip), %xmm0    # 0x170c3c
mulss -0x6c(%rbp), %xmm0
movss -0x54(%rbp), %xmm2
movb -0x59(%rbp), %dl
movl $0x1, %eax
movl $0x2, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
cvtsi2ss %eax, %xmm1
movss -0x6c(%rbp), %xmm3
movq -0x48(%rbp), %rax
addss 0x50(%rax), %xmm3
movd %xmm1, %eax
xorl $0x80000000, %eax       # imm = 0x80000000
movd %eax, %xmm1
mulss %xmm3, %xmm1
addss %xmm2, %xmm1
callq 0x139050
movss %xmm0, -0x70(%rbp)
movss -0x64(%rbp), %xmm0
addss -0x70(%rbp), %xmm0
movq -0x48(%rbp), %rax
addss 0x50(%rax), %xmm0
movss %xmm0, -0x74(%rbp)
movss -0x74(%rbp), %xmm0
addss -0x6c(%rbp), %xmm0
movq -0x48(%rbp), %rax
addss 0x50(%rax), %xmm0
movss %xmm0, -0x78(%rbp)
movss 0x23fc0(%rip), %xmm0    # 0x171fd0
mulss -0x6c(%rbp), %xmm0
cvttss2si %xmm0, %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x7c(%rbp)
leaq -0x90(%rbp), %rdi
movq -0x18(%rbp), %rsi
movslq -0x58(%rbp), %rdx
shlq $0x2, %rdx
callq 0xd0a0
movss 0x3591a(%rip), %xmm0    # 0x18395c
mulss -0x70(%rbp), %xmm0
movss %xmm0, -0x94(%rbp)
movss 0x23f81(%rip), %xmm0    # 0x171fd8
mulss -0x70(%rbp), %xmm0
movss %xmm0, -0x98(%rbp)
movss -0x98(%rbp), %xmm0
subss -0x94(%rbp), %xmm0
movss %xmm0, -0x9c(%rbp)
movss -0x64(%rbp), %xmm1
movss -0x70(%rbp), %xmm0
addss -0x6c(%rbp), %xmm0
movss 0x23f45(%rip), %xmm2    # 0x171fd8
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss -0x60(%rbp), %xmm2
movss -0x70(%rbp), %xmm1
movss 0x23f2b(%rip), %xmm3    # 0x171fd8
mulss %xmm3, %xmm1
addss %xmm2, %xmm1
leaq -0xa4(%rbp), %rdi
callq 0xbf4c0
movss -0x9c(%rbp), %xmm0
movss 0x4013f(%rip), %xmm1    # 0x18e210
mulss -0x70(%rbp), %xmm1
cvttss2si %xmm1, %eax
cvtsi2ss %eax, %xmm1
subss %xmm1, %xmm0
movss %xmm0, -0xa8(%rbp)
movss -0xa8(%rbp), %xmm0
leaq -0xb0(%rbp), %rdi
xorps %xmm1, %xmm1
callq 0xbf4c0
movss 0x400f3(%rip), %xmm0    # 0x18e1fc
mulss -0xa8(%rbp), %xmm0
movss 0x400f3(%rip), %xmm1    # 0x18e20c
mulss -0xa8(%rbp), %xmm1
leaq -0xb8(%rbp), %rdi
callq 0xbf4c0
movss 0x400c7(%rip), %xmm0    # 0x18e1fc
mulss -0xa8(%rbp), %xmm0
movss 0x400c3(%rip), %xmm1    # 0x18e208
mulss -0xa8(%rbp), %xmm1
leaq -0xc0(%rbp), %rdi
callq 0xbf4c0
movq -0x18(%rbp), %rax
movss (%rax), %xmm0
movss %xmm0, -0xc4(%rbp)
movq -0x18(%rbp), %rax
movss 0x4(%rax), %xmm0
movss %xmm0, -0xc8(%rbp)
movq -0x18(%rbp), %rax
movss 0x8(%rax), %xmm0
movss %xmm0, -0xcc(%rbp)
movq -0x18(%rbp), %rax
movss (%rax), %xmm0
movss %xmm0, -0xd0(%rbp)
movq -0x18(%rbp), %rax
movss 0x4(%rax), %xmm0
movss %xmm0, -0xd4(%rbp)
movq -0x18(%rbp), %rax
movss 0x8(%rax), %xmm0
movss %xmm0, -0xd8(%rbp)
movl -0x1c(%rbp), %eax
andl $0x8000000, %eax        # imm = 0x8000000
cmpl $0x0, %eax
je 0x14e26e
movss -0xd0(%rbp), %xmm0
movss -0xd4(%rbp), %xmm1
movss -0xd8(%rbp), %xmm2
leaq -0xc4(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
leaq -0xcc(%rbp), %rdx
callq 0xc5b00
movq -0x30(%rbp), %rdi
addq $0x3078, %rdi           # imm = 0x3078
movq -0x18(%rbp), %rsi
movl $0xc, %edx
callq 0xd9f0
cmpl $0x0, %eax
jne 0x14e26c
movss -0xc8(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x14e244
jp 0x14e244
movq -0x30(%rbp), %rax
movss 0x3070(%rax), %xmm0
movss %xmm0, -0xc4(%rbp)
movss -0xcc(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x14e26a
jp 0x14e26a
movq -0x30(%rbp), %rax
movss 0x3074(%rax), %xmm0
movss %xmm0, -0xc8(%rbp)
jmp 0x14e26c
jmp 0x14e2af
movl -0x1c(%rbp), %eax
andl $0x10000000, %eax       # imm = 0x10000000
cmpl $0x0, %eax
je 0x14e2ad
movss -0xc4(%rbp), %xmm0
movss -0xc8(%rbp), %xmm1
movss -0xcc(%rbp), %xmm2
leaq -0xd0(%rbp), %rdi
leaq -0xd4(%rbp), %rsi
leaq -0xd8(%rbp), %rdx
callq 0xc5c80
jmp 0x14e2af
movb $0x0, -0xd9(%rbp)
movb $0x0, -0xda(%rbp)
movb $0x0, -0xdb(%rbp)
movl $0x8, %edi
movl $0x1, %esi
callq 0xda0f0
movl -0x1c(%rbp), %eax
andl $0x4000000, %eax        # imm = 0x4000000
cmpl $0x0, %eax
je 0x14e661
movss -0x70(%rbp), %xmm0
movq -0x48(%rbp), %rax
addss 0x50(%rax), %xmm0
addss -0x6c(%rbp), %xmm0
movss -0x70(%rbp), %xmm1
leaq -0xe4(%rbp), %rdi
callq 0xbf4c0
leaq 0x4186d(%rip), %rdi     # 0x18fb7c
leaq -0xe4(%rbp), %rsi
xorl %edx, %edx
callq 0x13a9f0
callq 0xd53c0
testb $0x1, %al
jne 0x14e32b
jmp 0x14e640
movq -0x30(%rbp), %rdi
addq $0x3cc, %rdi            # imm = 0x3CC
leaq -0xa4(%rbp), %rsi
movq %rsi, -0x380(%rbp)
callq 0x1390e0
movq -0x380(%rbp), %rsi
movlpd %xmm0, -0xec(%rbp)
movq -0x30(%rbp), %rdi
addq $0x128, %rdi            # imm = 0x128
callq 0x1390e0
movlpd %xmm0, -0xf4(%rbp)
leaq -0xec(%rbp), %rdi
callq 0x150580
movss %xmm0, -0xf8(%rbp)
movss -0xf8(%rbp), %xmm0
movss -0x9c(%rbp), %xmm1
movss 0x228a0(%rip), %xmm2    # 0x170c3c
subss %xmm2, %xmm1
movss -0x9c(%rbp), %xmm2
movss 0x2288c(%rip), %xmm3    # 0x170c3c
subss %xmm3, %xmm2
mulss %xmm2, %xmm1
ucomiss %xmm1, %xmm0
jb 0x14e459
movss -0xf8(%rbp), %xmm1
movss 0x2286b(%rip), %xmm0    # 0x170c3c
addss -0x98(%rbp), %xmm0
movss 0x2285b(%rip), %xmm2    # 0x170c3c
addss -0x98(%rbp), %xmm2
mulss %xmm2, %xmm0
ucomiss %xmm1, %xmm0
jb 0x14e459
movss -0xf0(%rbp), %xmm0
movss -0xf4(%rbp), %xmm1
callq 0xd2c0
movss 0x24389(%rip), %xmm1    # 0x172798
divss %xmm1, %xmm0
movss 0x23bbd(%rip), %xmm1    # 0x171fd8
mulss %xmm1, %xmm0
movss %xmm0, -0xc4(%rbp)
xorps %xmm0, %xmm0
ucomiss -0xc4(%rbp), %xmm0
jbe 0x14e44b
movss 0x22801(%rip), %xmm0    # 0x170c3c
addss -0xc4(%rbp), %xmm0
movss %xmm0, -0xc4(%rbp)
movb $0x1, -0xda(%rbp)
movb $0x1, -0xd9(%rbp)
movss -0xc4(%rbp), %xmm1
movaps %xmm1, %xmm0
movaps 0x23b85(%rip), %xmm2    # 0x171ff0
movaps %xmm2, -0x3a0(%rbp)
pxor %xmm2, %xmm0
subss %xmm1, %xmm0
movss 0x24316(%rip), %xmm1    # 0x172798
movss %xmm1, -0x384(%rbp)
mulss %xmm1, %xmm0
callq 0xd6a0
movaps -0x3a0(%rbp), %xmm3
movss -0x384(%rbp), %xmm1
movss %xmm0, -0xfc(%rbp)
movss -0xc4(%rbp), %xmm2
movaps %xmm2, %xmm0
pxor %xmm3, %xmm0
subss %xmm2, %xmm0
mulss %xmm1, %xmm0
callq 0xd070
movss %xmm0, -0x100(%rbp)
movss -0xfc(%rbp), %xmm0
movss -0x100(%rbp), %xmm1
leaq -0xec(%rbp), %rdi
callq 0x1505c0
movlpd %xmm0, -0x108(%rbp)
leaq -0xb0(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
leaq -0xc0(%rbp), %rdx
leaq -0x108(%rbp), %rcx
callq 0xc4240
testb $0x1, %al
jne 0x14e51c
jmp 0x14e63e
movss -0xfc(%rbp), %xmm0
movss -0x100(%rbp), %xmm1
leaq -0xf4(%rbp), %rdi
callq 0x1505c0
movlpd %xmm0, -0x110(%rbp)
leaq -0xb0(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
leaq -0xc0(%rbp), %rdx
leaq -0x110(%rbp), %rcx
callq 0xc4240
testb $0x1, %al
jne 0x14e59c
leaq -0xb0(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
leaq -0xc0(%rbp), %rdx
leaq -0x110(%rbp), %rcx
callq 0xc44f0
movlpd %xmm0, -0x118(%rbp)
movq -0x118(%rbp), %rax
movq %rax, -0x110(%rbp)
leaq -0xb0(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
leaq -0xc0(%rbp), %rdx
leaq -0x110(%rbp), %rcx
leaq -0x11c(%rbp), %r8
leaq -0x120(%rbp), %r9
leaq -0x124(%rbp), %rax
movq %rax, (%rsp)
callq 0xc43d0
movss 0x2265e(%rip), %xmm0    # 0x170c3c
subss -0x120(%rbp), %xmm0
movss 0x241a6(%rip), %xmm1    # 0x172794
movss 0x22646(%rip), %xmm2    # 0x170c3c
callq 0x13c020
movss %xmm0, -0xcc(%rbp)
movss -0x11c(%rbp), %xmm0
divss -0xcc(%rbp), %xmm0
movss 0x24179(%rip), %xmm1    # 0x172794
movss 0x22619(%rip), %xmm2    # 0x170c3c
callq 0x13c020
movss %xmm0, -0xc8(%rbp)
movb $0x1, -0xdb(%rbp)
movb $0x1, -0xd9(%rbp)
jmp 0x14e640
movl -0x1c(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0x14e65c
leaq 0x26c55(%rip), %rdi     # 0x1752a7
movl $0x1, %esi
callq 0xde7f0
jmp 0x14e7e7
movl -0x1c(%rbp), %eax
andl $0x2000000, %eax        # imm = 0x2000000
cmpl $0x0, %eax
je 0x14e7e5
movss -0x70(%rbp), %xmm0
movss -0x70(%rbp), %xmm1
leaq -0x12c(%rbp), %rdi
callq 0xbf4c0
leaq 0x414ee(%rip), %rdi     # 0x18fb7d
leaq -0x12c(%rbp), %rsi
xorl %edx, %edx
callq 0x13a9f0
callq 0xd53c0
testb $0x1, %al
jne 0x14e6ab
jmp 0x14e72e
movq -0x50(%rbp), %rax
movss 0x120(%rax), %xmm0
subss -0x64(%rbp), %xmm0
movss -0x70(%rbp), %xmm1
movss 0x22573(%rip), %xmm2    # 0x170c3c
subss %xmm2, %xmm1
divss %xmm1, %xmm0
callq 0x13bfc0
movss %xmm0, -0xc8(%rbp)
movq -0x50(%rbp), %rax
movss 0x124(%rax), %xmm0
subss -0x60(%rbp), %xmm0
movss -0x70(%rbp), %xmm1
movss 0x22540(%rip), %xmm2    # 0x170c3c
subss %xmm2, %xmm1
divss %xmm1, %xmm0
callq 0x13bfc0
movaps %xmm0, %xmm1
movss 0x22528(%rip), %xmm0    # 0x170c3c
subss %xmm1, %xmm0
movss %xmm0, -0xcc(%rbp)
movb $0x1, -0xdb(%rbp)
movb $0x1, -0xd9(%rbp)
movl -0x1c(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0x14e74a
leaq 0x26b67(%rip), %rdi     # 0x1752a7
movl $0x1, %esi
callq 0xde7f0
movss -0x74(%rbp), %xmm0
movss -0x60(%rbp), %xmm1
leaq -0x134(%rbp), %rdi
callq 0xbf4c0
leaq -0x134(%rbp), %rdi
callq 0xdc6f0
movss -0x6c(%rbp), %xmm0
movss -0x70(%rbp), %xmm1
leaq -0x13c(%rbp), %rdi
callq 0xbf4c0
leaq 0x413cd(%rip), %rdi     # 0x18fb56
leaq -0x13c(%rbp), %rsi
xorl %edx, %edx
callq 0x13a9f0
callq 0xd53c0
testb $0x1, %al
jne 0x14e7a2
jmp 0x14e7e3
movq -0x50(%rbp), %rax
movss 0x124(%rax), %xmm0
subss -0x60(%rbp), %xmm0
movss -0x70(%rbp), %xmm1
movss 0x2247c(%rip), %xmm2    # 0x170c3c
subss %xmm2, %xmm1
divss %xmm1, %xmm0
callq 0x13bfc0
movss %xmm0, -0xc4(%rbp)
movb $0x1, -0xda(%rbp)
movb $0x1, -0xd9(%rbp)
jmp 0x14e7e5
jmp 0x14e7e7
testb $0x1, -0x59(%rbp)
je 0x14e895
movss -0x78(%rbp), %xmm0
movss -0x60(%rbp), %xmm1
leaq -0x144(%rbp), %rdi
callq 0xbf4c0
leaq -0x144(%rbp), %rdi
callq 0xdc6f0
movss -0x6c(%rbp), %xmm0
movss -0x70(%rbp), %xmm1
leaq -0x14c(%rbp), %rdi
callq 0xbf4c0
leaq 0x4132a(%rip), %rdi     # 0x18fb5a
leaq -0x14c(%rbp), %rsi
xorl %edx, %edx
callq 0x13a9f0
callq 0xd53c0
testb $0x1, %al
jne 0x14e849
jmp 0x14e893
movq -0x50(%rbp), %rax
movss 0x124(%rax), %xmm0
subss -0x60(%rbp), %xmm0
movss -0x70(%rbp), %xmm1
movss 0x223d5(%rip), %xmm2    # 0x170c3c
subss %xmm2, %xmm1
divss %xmm1, %xmm0
callq 0x13bfc0
movaps %xmm0, %xmm1
movss 0x223bd(%rip), %xmm0    # 0x170c3c
subss %xmm1, %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0xc(%rax)
movb $0x1, -0xd9(%rbp)
jmp 0x14e895
callq 0xda1b0
movl -0x1c(%rbp), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
jne 0x14e8bd
movq -0x48(%rbp), %rax
movss 0x50(%rax), %xmm1
xorps %xmm0, %xmm0
callq 0xdc1c0
callq 0xdd220
movl -0x1c(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
jne 0x14e91d
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xc8090
movq %rax, -0x158(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x158(%rbp), %rax
je 0x14e91b
movl -0x1c(%rbp), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x14e909
movq -0x48(%rbp), %rax
movss 0x50(%rax), %xmm1
xorps %xmm0, %xmm0
callq 0xdc1c0
movq -0x10(%rbp), %rdi
movq -0x158(%rbp), %rsi
xorl %edx, %edx
callq 0x138a30
jmp 0x14e91d
movl -0x1c(%rbp), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
jne 0x14eb6d
movl $0x10, %edi
movl $0x1, %esi
callq 0xda0f0
movq -0x18(%rbp), %rax
movss (%rax), %xmm0
movss %xmm0, -0x3ac(%rbp)
movq -0x18(%rbp), %rax
movss 0x4(%rax), %xmm0
movss %xmm0, -0x3a8(%rbp)
movq -0x18(%rbp), %rax
movss 0x8(%rax), %xmm0
movss %xmm0, -0x3a4(%rbp)
movl -0x1c(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x14e98c
movss 0x222ba(%rip), %xmm0    # 0x170c3c
movss %xmm0, -0x3b0(%rbp)
jmp 0x14e99d
movq -0x18(%rbp), %rax
movss 0xc(%rax), %xmm0
movss %xmm0, -0x3b0(%rbp)
movss -0x3a4(%rbp), %xmm2
movss -0x3a8(%rbp), %xmm1
movss -0x3ac(%rbp), %xmm0
movss -0x3b0(%rbp), %xmm3
leaq -0x168(%rbp), %rdi
callq 0xbf4f0
movl -0x1c(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x14e9e4
leaq 0x2d913(%rip), %rdi     # 0x17c2f0
movb $0x0, %al
callq 0x139160
movl $0x180e0040, -0x16c(%rbp) # imm = 0x180E0040
movl -0x1c(%rbp), %eax
movl -0x16c(%rbp), %ecx
andl %ecx, %eax
movl %eax, -0x3b4(%rbp)
movss -0x68(%rbp), %xmm1
movss 0x235b4(%rip), %xmm2    # 0x171fc0
movaps %xmm1, %xmm0
mulss %xmm2, %xmm0
addss %xmm1, %xmm1
leaq -0x174(%rbp), %rdi
callq 0xbf4c0
movl -0x3b4(%rbp), %edx
movsd -0x174(%rbp), %xmm0
leaq 0x2d8c0(%rip), %rdi     # 0x17c2f8
leaq -0x168(%rbp), %rsi
callq 0x14d5d0
cmpq $0x0, -0x28(%rbp)
je 0x14eb63
leaq 0x4110a(%rip), %rdi     # 0x18fb60
movb $0x0, %al
callq 0x139160
movq -0x28(%rbp), %rax
movss (%rax), %xmm0
movss %xmm0, -0x3c0(%rbp)
movq -0x28(%rbp), %rax
movss 0x4(%rax), %xmm0
movss %xmm0, -0x3bc(%rbp)
movq -0x28(%rbp), %rax
movss 0x8(%rax), %xmm0
movss %xmm0, -0x3b8(%rbp)
movl -0x1c(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x14eaac
movss 0x2219a(%rip), %xmm0    # 0x170c3c
movss %xmm0, -0x3c4(%rbp)
jmp 0x14eabd
movq -0x28(%rbp), %rax
movss 0xc(%rax), %xmm0
movss %xmm0, -0x3c4(%rbp)
movss -0x3b8(%rbp), %xmm2
movss -0x3bc(%rbp), %xmm1
movss -0x3c0(%rbp), %xmm0
movss -0x3c4(%rbp), %xmm3
leaq -0x184(%rbp), %rdi
callq 0xbf4f0
movl -0x1c(%rbp), %eax
movl -0x16c(%rbp), %ecx
andl %ecx, %eax
movl %eax, -0x3c8(%rbp)
movss -0x68(%rbp), %xmm1
movss 0x234b9(%rip), %xmm2    # 0x171fc0
movaps %xmm1, %xmm0
mulss %xmm2, %xmm0
addss %xmm1, %xmm1
leaq -0x18c(%rbp), %rdi
callq 0xbf4c0
movl -0x3c8(%rbp), %edx
movsd -0x18c(%rbp), %xmm0
leaq 0x41036(%rip), %rdi     # 0x18fb69
leaq -0x184(%rbp), %rsi
callq 0x14d5d0
testb $0x1, %al
jne 0x14eb45
jmp 0x14eb61
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
movslq -0x58(%rbp), %rdx
shlq $0x2, %rdx
callq 0xd0a0
movb $0x1, -0xd9(%rbp)
jmp 0x14eb63
callq 0xda1b0
callq 0xdbe80
testb $0x1, -0xda(%rbp)
jne 0x14eb83
testb $0x1, -0xdb(%rbp)
je 0x14ed18
movl -0x1c(%rbp), %eax
andl $0x8000000, %eax        # imm = 0x8000000
cmpl $0x0, %eax
je 0x14ecd5
movss -0xc4(%rbp), %xmm0
movss 0x22098(%rip), %xmm1    # 0x170c3c
ucomiss %xmm1, %xmm0
jb 0x14ebc7
movss -0xc4(%rbp), %xmm0
movss 0x23bcb(%rip), %xmm1    # 0x172784
subss %xmm1, %xmm0
movss %xmm0, -0x3cc(%rbp)
jmp 0x14ebd7
movss -0xc4(%rbp), %xmm0
movss %xmm0, -0x3cc(%rbp)
movss -0x3cc(%rbp), %xmm0
movss %xmm0, -0x3d0(%rbp)
movss -0xc8(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x14ec09
movss -0xc8(%rbp), %xmm0
movss %xmm0, -0x3d4(%rbp)
jmp 0x14ec1b
movss 0x23b73(%rip), %xmm0    # 0x172784
movss %xmm0, -0x3d4(%rbp)
jmp 0x14ec1b
movss -0x3d4(%rbp), %xmm0
movss %xmm0, -0x3d8(%rbp)
movss -0xcc(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x14ec4d
movss -0xcc(%rbp), %xmm0
movss %xmm0, -0x3dc(%rbp)
jmp 0x14ec5f
movss 0x3f593(%rip), %xmm0    # 0x18e1e8
movss %xmm0, -0x3dc(%rbp)
jmp 0x14ec5f
movss -0x3d8(%rbp), %xmm1
movss -0x3d0(%rbp), %xmm0
movss -0x3dc(%rbp), %xmm2
movq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x4, %rsi
movq -0x18(%rbp), %rdx
addq $0x8, %rdx
callq 0xc5c80
movss -0xc4(%rbp), %xmm0
movq -0x30(%rbp), %rax
movss %xmm0, 0x3070(%rax)
movss -0xc8(%rbp), %xmm0
movq -0x30(%rbp), %rax
movss %xmm0, 0x3074(%rax)
movq -0x30(%rbp), %rax
movq -0x18(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, 0x3078(%rax)
movl 0x8(%rcx), %ecx
movl %ecx, 0x3080(%rax)
jmp 0x14ed16
movl -0x1c(%rbp), %eax
andl $0x10000000, %eax       # imm = 0x10000000
cmpl $0x0, %eax
je 0x14ed14
movss -0xc4(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, (%rax)
movss -0xc8(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x4(%rax)
movss -0xcc(%rbp), %xmm0
movq -0x18(%rbp), %rax
movss %xmm0, 0x8(%rax)
jmp 0x14ed16
jmp 0x14ed18
movb $0x0, -0x18d(%rbp)
movl -0x1c(%rbp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
jne 0x14eeae
testb $0x1, -0x59(%rbp)
je 0x14ed43
movss -0x78(%rbp), %xmm0
movss %xmm0, -0x3e0(%rbp)
jmp 0x14ed50
movss -0x74(%rbp), %xmm0
movss %xmm0, -0x3e0(%rbp)
movss -0x3e0(%rbp), %xmm0
addss -0x6c(%rbp), %xmm0
subss -0x64(%rbp), %xmm0
callq 0xdcb10
movl $0x198e001a, -0x194(%rbp) # imm = 0x198E001A
movl -0x1c(%rbp), %eax
andl -0x194(%rbp), %eax
orl $0x4, %eax
movl %eax, -0x198(%rbp)
movl -0x1c(%rbp), %eax
andl $0x100000, %eax         # imm = 0x100000
cmpl $0x0, %eax
jne 0x14ed9d
movl -0x1c(%rbp), %eax
andl $0x700000, %eax         # imm = 0x700000
cmpl $0x0, %eax
jne 0x14edfd
movq -0x18(%rbp), %rsi
movl -0x198(%rbp), %edx
orl $0x100000, %edx         # imm = 0x100000
leaq 0x40dc0(%rip), %rdi     # 0x18fb74
callq 0x14bea0
testb $0x1, %al
jne 0x14edbf
jmp 0x14edfb
movq -0x30(%rbp), %rcx
xorl %eax, %eax
cmpl $0x0, 0x1b30(%rcx)
movb %al, -0x3e1(%rbp)
je 0x14ede6
movq -0x30(%rbp), %rax
movb 0x1b3d(%rax), %al
xorb $-0x1, %al
movb %al, -0x3e1(%rbp)
movb -0x3e1(%rbp), %al
andb $0x1, %al
movb %al, -0x18d(%rbp)
movb $0x1, -0xd9(%rbp)
jmp 0x14edfd
movl -0x1c(%rbp), %eax
andl $0x200000, %eax         # imm = 0x200000
cmpl $0x0, %eax
jne 0x14ee17
movl -0x1c(%rbp), %eax
andl $0x700000, %eax         # imm = 0x700000
cmpl $0x0, %eax
jne 0x14ee53
movq -0x18(%rbp), %rsi
movl -0x198(%rbp), %edx
orl $0x200000, %edx         # imm = 0x200000
leaq 0x40d4c(%rip), %rdi     # 0x18fb7a
callq 0x14bea0
andb $0x1, %al
movzbl %al, %ecx
movb -0xd9(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
orl %ecx, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, -0xd9(%rbp)
movl -0x1c(%rbp), %eax
andl $0x400000, %eax         # imm = 0x400000
cmpl $0x0, %eax
jne 0x14ee6d
movl -0x1c(%rbp), %eax
andl $0x700000, %eax         # imm = 0x700000
cmpl $0x0, %eax
jne 0x14eea9
movq -0x18(%rbp), %rsi
movl -0x198(%rbp), %edx
orl $0x400000, %edx         # imm = 0x400000
leaq 0x40cfc(%rip), %rdi     # 0x18fb80
callq 0x14bea0
andb $0x1, %al
movzbl %al, %ecx
movb -0xd9(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
orl %ecx, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, -0xd9(%rbp)
callq 0xdcd30
testb $0x1, -0x18d(%rbp)
je 0x14f061
movl -0x1c(%rbp), %eax
andl $0x8000000, %eax        # imm = 0x8000000
cmpl $0x0, %eax
je 0x14f061
movq -0x18(%rbp), %rax
movss (%rax), %xmm0
movq -0x18(%rbp), %rax
movss 0x4(%rax), %xmm1
movq -0x18(%rbp), %rax
movss 0x8(%rax), %xmm2
leaq -0x19c(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
leaq -0x1a4(%rbp), %rdx
callq 0xc5b00
xorps %xmm0, %xmm0
ucomiss -0x19c(%rbp), %xmm0
jb 0x14f05f
movss -0xc4(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jbe 0x14f05f
xorps %xmm0, %xmm0
ucomiss -0x1a4(%rbp), %xmm0
jb 0x14efd8
movss -0xcc(%rbp), %xmm0
ucomiss -0x1a4(%rbp), %xmm0
jne 0x14ef4c
jp 0x14ef4c
jmp 0x14efd8
movss -0xc4(%rbp), %xmm0
movss %xmm0, -0x3ec(%rbp)
movss -0xc8(%rbp), %xmm0
movss %xmm0, -0x3e8(%rbp)
xorps %xmm0, %xmm0
ucomiss -0x1a4(%rbp), %xmm0
jb 0x14ef92
movss 0x23058(%rip), %xmm0    # 0x171fd8
mulss -0xcc(%rbp), %xmm0
movss %xmm0, -0x3f0(%rbp)
jmp 0x14efa2
movss -0x1a4(%rbp), %xmm0
movss %xmm0, -0x3f0(%rbp)
movss -0x3e8(%rbp), %xmm1
movss -0x3ec(%rbp), %xmm0
movss -0x3f0(%rbp), %xmm2
movq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x4, %rsi
movq -0x18(%rbp), %rdx
addq $0x8, %rdx
callq 0xc5c80
jmp 0x14f05d
xorps %xmm0, %xmm0
ucomiss -0x1a0(%rbp), %xmm0
jb 0x14f05b
movss -0xc4(%rbp), %xmm0
movss %xmm0, -0x3f4(%rbp)
xorps %xmm0, %xmm0
ucomiss -0x1a0(%rbp), %xmm0
jb 0x14f01a
movss 0x22fd0(%rip), %xmm0    # 0x171fd8
mulss -0xc8(%rbp), %xmm0
movss %xmm0, -0x3f8(%rbp)
jmp 0x14f02a
movss -0x1a0(%rbp), %xmm0
movss %xmm0, -0x3f8(%rbp)
movss -0x3f4(%rbp), %xmm0
movss -0x3f8(%rbp), %xmm1
movss -0x1a4(%rbp), %xmm2
movq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rsi
addq $0x4, %rsi
movq -0x18(%rbp), %rdx
addq $0x8, %rdx
callq 0xc5c80
jmp 0x14f05d
jmp 0x14f05f
jmp 0x14f061
testb $0x1, -0xd9(%rbp)
je 0x14f1c6
movl -0x1c(%rbp), %eax
andl $0x8000000, %eax        # imm = 0x8000000
cmpl $0x0, %eax
je 0x14f151
movq -0x18(%rbp), %rax
movss (%rax), %xmm0
movss %xmm0, -0xd0(%rbp)
movq -0x18(%rbp), %rax
movss 0x4(%rax), %xmm0
movss %xmm0, -0xd4(%rbp)
movq -0x18(%rbp), %rax
movss 0x8(%rax), %xmm0
movss %xmm0, -0xd8(%rbp)
movss -0xd0(%rbp), %xmm0
movss -0xd4(%rbp), %xmm1
movss -0xd8(%rbp), %xmm2
leaq -0xc4(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
leaq -0xcc(%rbp), %rdx
callq 0xc5b00
movq -0x30(%rbp), %rdi
addq $0x3078, %rdi           # imm = 0x3078
movq -0x18(%rbp), %rsi
movl $0xc, %edx
callq 0xd9f0
cmpl $0x0, %eax
jne 0x14f14f
movss -0xc8(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x14f127
jp 0x14f127
movq -0x30(%rbp), %rax
movss 0x3070(%rax), %xmm0
movss %xmm0, -0xc4(%rbp)
movss -0xcc(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x14f14d
jp 0x14f14d
movq -0x30(%rbp), %rax
movss 0x3074(%rax), %xmm0
movss %xmm0, -0xc8(%rbp)
jmp 0x14f14f
jmp 0x14f1c4
movl -0x1c(%rbp), %eax
andl $0x10000000, %eax       # imm = 0x10000000
cmpl $0x0, %eax
je 0x14f1c2
movq -0x18(%rbp), %rax
movss (%rax), %xmm0
movss %xmm0, -0xc4(%rbp)
movq -0x18(%rbp), %rax
movss 0x4(%rax), %xmm0
movss %xmm0, -0xc8(%rbp)
movq -0x18(%rbp), %rax
movss 0x8(%rax), %xmm0
movss %xmm0, -0xcc(%rbp)
movss -0xc4(%rbp), %xmm0
movss -0xc8(%rbp), %xmm1
movss -0xcc(%rbp), %xmm2
leaq -0xd0(%rbp), %rdi
leaq -0xd4(%rbp), %rsi
leaq -0xd8(%rbp), %rdx
callq 0xc5c80
jmp 0x14f1c4
jmp 0x14f1c6
movq -0x48(%rbp), %rax
movss (%rax), %xmm0
callq 0x13bfc0
movss 0x23581(%rip), %xmm1    # 0x17275c
mulss %xmm1, %xmm0
movss 0x22df1(%rip), %xmm1    # 0x171fd8
addss %xmm1, %xmm0
cvttss2si %xmm0, %eax
movl %eax, -0x1a8(%rbp)
movl -0x1a8(%rbp), %eax
shll $0x18, %eax
orl $0x0, %eax
orl $0x0, %eax
orl $0x0, %eax
movl %eax, -0x1ac(%rbp)
movl -0x1a8(%rbp), %eax
shll $0x18, %eax
orl $0xff0000, %eax         # imm = 0xFF0000
orl $0xff00, %eax           # imm = 0xFF00
orl $0xff, %eax
movl %eax, -0x1b0(%rbp)
movl -0x1a8(%rbp), %eax
shll $0x18, %eax
orl $0x800000, %eax         # imm = 0x800000
orl $0x8000, %eax           # imm = 0x8000
orl $0x80, %eax
movl %eax, -0x1b4(%rbp)
movl -0x1a8(%rbp), %eax
shll $0x18, %eax
orl $0x0, %eax
orl $0x0, %eax
orl $0xff, %eax
movl %eax, -0x1d0(%rbp)
movl -0x1a8(%rbp), %eax
shll $0x18, %eax
orl $0x0, %eax
orl $0xff00, %eax           # imm = 0xFF00
orl $0xff, %eax
movl %eax, -0x1cc(%rbp)
movl -0x1a8(%rbp), %eax
shll $0x18, %eax
orl $0x0, %eax
orl $0xff00, %eax           # imm = 0xFF00
orl $0x0, %eax
movl %eax, -0x1c8(%rbp)
movl -0x1a8(%rbp), %eax
shll $0x18, %eax
orl $0xff0000, %eax         # imm = 0xFF0000
orl $0xff00, %eax           # imm = 0xFF00
orl $0x0, %eax
movl %eax, -0x1c4(%rbp)
movl -0x1a8(%rbp), %eax
shll $0x18, %eax
orl $0xff0000, %eax         # imm = 0xFF0000
orl $0x0, %eax
orl $0x0, %eax
movl %eax, -0x1c0(%rbp)
movl -0x1a8(%rbp), %eax
shll $0x18, %eax
orl $0xff0000, %eax         # imm = 0xFF0000
orl $0x0, %eax
orl $0xff, %eax
movl %eax, -0x1bc(%rbp)
movl -0x1a8(%rbp), %eax
shll $0x18, %eax
orl $0x0, %eax
orl $0x0, %eax
orl $0xff, %eax
movl %eax, -0x1b8(%rbp)
movq -0x48(%rbp), %rax
movss (%rax), %xmm3
leaq -0x1e0(%rbp), %rdi
movss 0x21920(%rip), %xmm2    # 0x170c3c
movaps %xmm2, %xmm0
movaps %xmm2, %xmm1
callq 0xbf4f0
movss -0xc4(%rbp), %xmm0
leaq -0x1e0(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
addq $0x4, %rsi
leaq -0x1e0(%rbp), %rdx
addq $0x8, %rdx
movss 0x218e8(%rip), %xmm2    # 0x170c3c
movaps %xmm2, %xmm1
callq 0xc5c80
leaq -0x1e0(%rbp), %rdi
callq 0xc59c0
movl %eax, -0x1e4(%rbp)
movss -0xd0(%rbp), %xmm0
movss -0xd4(%rbp), %xmm1
movss -0xd8(%rbp), %xmm2
movq -0x48(%rbp), %rax
movss (%rax), %xmm3
leaq -0x1f8(%rbp), %rdi
callq 0xbf4f0
leaq -0x1f8(%rbp), %rdi
callq 0xc59c0
movl %eax, -0x1e8(%rbp)
leaq -0x200(%rbp), %rdi
callq 0xe7de0
movl -0x1c(%rbp), %eax
andl $0x4000000, %eax        # imm = 0x4000000
cmpl $0x0, %eax
je 0x14fa95
movss 0x22c07(%rip), %xmm0    # 0x171fd8
divss -0x98(%rbp), %xmm0
movss %xmm0, -0x204(%rbp)
cvttss2si -0x98(%rbp), %eax
movl $0xc, %ecx
cltd
idivl %ecx
movl %eax, %esi
movl $0x4, %edi
callq 0x1437b0
movl %eax, -0x208(%rbp)
movl $0x0, -0x20c(%rbp)
cmpl $0x6, -0x20c(%rbp)
jge 0x14f67c
cvtsi2ssl -0x20c(%rbp), %xmm0
movss 0x22bb6(%rip), %xmm1    # 0x171fe0
divss %xmm1, %xmm0
addss %xmm0, %xmm0
movss -0x204(%rbp), %xmm3
movss 0x23356(%rip), %xmm2    # 0x172798
mulss %xmm2, %xmm0
subss %xmm3, %xmm0
movss %xmm0, -0x210(%rbp)
cvtsi2ssl -0x20c(%rbp), %xmm0
movss 0x217da(%rip), %xmm3    # 0x170c3c
addss %xmm3, %xmm0
divss %xmm1, %xmm0
addss %xmm0, %xmm0
movss -0x204(%rbp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x214(%rbp)
movq -0x40(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x218(%rbp)
movq -0x40(%rbp), %rdi
movss -0x9c(%rbp), %xmm0
movss -0x98(%rbp), %xmm1
addss %xmm1, %xmm0
movss 0x22b25(%rip), %xmm1    # 0x171fd8
mulss %xmm1, %xmm0
movss -0x210(%rbp), %xmm1
movss -0x214(%rbp), %xmm2
movl -0x208(%rbp), %edx
leaq -0xa4(%rbp), %rsi
callq 0x111ec0
movq -0x40(%rbp), %rdi
movl -0x1b0(%rbp), %esi
movss -0x94(%rbp), %xmm0
xorl %edx, %edx
callq 0xee720
movq -0x40(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x21c(%rbp)
movss -0xa4(%rbp), %xmm0
movss %xmm0, -0x410(%rbp)
movss -0x210(%rbp), %xmm0
callq 0xd6a0
movss -0x410(%rbp), %xmm1
movss -0x9c(%rbp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x408(%rbp)
movss -0xa0(%rbp), %xmm0
movss %xmm0, -0x40c(%rbp)
movss -0x210(%rbp), %xmm0
callq 0xd070
movss -0x40c(%rbp), %xmm2
movaps %xmm0, %xmm1
movss -0x408(%rbp), %xmm0
movss -0x9c(%rbp), %xmm3
mulss %xmm3, %xmm1
addss %xmm2, %xmm1
leaq -0x224(%rbp), %rdi
callq 0xbf4c0
movss -0xa4(%rbp), %xmm0
movss %xmm0, -0x404(%rbp)
movss -0x214(%rbp), %xmm0
callq 0xd6a0
movss -0x404(%rbp), %xmm1
movss -0x9c(%rbp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x3fc(%rbp)
movss -0xa0(%rbp), %xmm0
movss %xmm0, -0x400(%rbp)
movss -0x214(%rbp), %xmm0
callq 0xd070
movss -0x400(%rbp), %xmm2
movaps %xmm0, %xmm1
movss -0x3fc(%rbp), %xmm0
movss -0x9c(%rbp), %xmm3
mulss %xmm3, %xmm1
addss %xmm2, %xmm1
leaq -0x22c(%rbp), %rdi
callq 0xbf4c0
movq -0x40(%rbp), %rdi
movl -0x218(%rbp), %esi
movl -0x21c(%rbp), %edx
movq -0x224(%rbp), %rax
movq %rax, -0x238(%rbp)
movq -0x22c(%rbp), %rax
movq %rax, -0x240(%rbp)
movslq -0x20c(%rbp), %rax
movl -0x1d0(%rbp,%rax,4), %ecx
movl -0x1cc(%rbp,%rax,4), %r8d
movsd -0x238(%rbp), %xmm0
movsd -0x240(%rbp), %xmm1
callq 0x115680
movl -0x20c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20c(%rbp)
jmp 0x14f40d
movss 0x22948(%rip), %xmm0    # 0x171fcc
mulss -0xc4(%rbp), %xmm0
movss 0x23104(%rip), %xmm1    # 0x172798
mulss %xmm1, %xmm0
callq 0xd6a0
movss %xmm0, -0x244(%rbp)
movss 0x2291f(%rip), %xmm0    # 0x171fcc
mulss -0xc4(%rbp), %xmm0
movss 0x230db(%rip), %xmm1    # 0x172798
mulss %xmm1, %xmm0
callq 0xd070
movss %xmm0, -0x248(%rbp)
movss -0xa4(%rbp), %xmm1
movss -0x244(%rbp), %xmm0
movss -0x9c(%rbp), %xmm2
addss -0x98(%rbp), %xmm2
mulss %xmm2, %xmm0
movss 0x228de(%rip), %xmm2    # 0x171fd8
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss -0xa0(%rbp), %xmm2
movss -0x248(%rbp), %xmm1
movss -0x9c(%rbp), %xmm3
addss -0x98(%rbp), %xmm3
mulss %xmm3, %xmm1
movss 0x228aa(%rip), %xmm3    # 0x171fd8
mulss %xmm3, %xmm1
addss %xmm2, %xmm1
leaq -0x250(%rbp), %rdi
callq 0xbf4c0
testb $0x1, -0xda(%rbp)
je 0x14f765
movss 0x23039(%rip), %xmm0    # 0x17278c
mulss -0x94(%rbp), %xmm0
movss %xmm0, -0x414(%rbp)
jmp 0x14f77d
movss 0x22843(%rip), %xmm0    # 0x171fb0
mulss -0x94(%rbp), %xmm0
movss %xmm0, -0x414(%rbp)
movss -0x414(%rbp), %xmm0
movss %xmm0, -0x254(%rbp)
movss -0x254(%rbp), %xmm0
movss 0x3ea77(%rip), %xmm1    # 0x18e214
divss %xmm1, %xmm0
cvttss2si %xmm0, %edi
movl $0x9, %esi
movl $0x20, %edx
callq 0x140f50
movl %eax, -0x258(%rbp)
movq -0x40(%rbp), %rdi
movss -0x254(%rbp), %xmm0
movl -0x1e4(%rbp), %edx
movl -0x258(%rbp), %ecx
leaq -0x250(%rbp), %rsi
movq %rsi, -0x458(%rbp)
callq 0x113600
movq -0x458(%rbp), %rsi
movq -0x40(%rbp), %rdi
movss -0x254(%rbp), %xmm0
movss 0x2143c(%rip), %xmm1    # 0x170c3c
movss %xmm1, -0x424(%rbp)
addss %xmm1, %xmm0
movl -0x1b4(%rbp), %edx
movl -0x258(%rbp), %ecx
callq 0x113490
movq -0x458(%rbp), %rsi
movss -0x424(%rbp), %xmm1
movq -0x40(%rbp), %rdi
movss -0x254(%rbp), %xmm0
movl -0x1b0(%rbp), %edx
movl -0x258(%rbp), %ecx
callq 0x113490
movss -0x244(%rbp), %xmm0
movss -0x248(%rbp), %xmm1
leaq -0xb0(%rbp), %rdi
callq 0x1505c0
movlpd %xmm0, -0x268(%rbp)
leaq -0xa4(%rbp), %rdi
movq %rdi, -0x450(%rbp)
leaq -0x268(%rbp), %rsi
callq 0x139090
movlpd %xmm0, -0x260(%rbp)
movss -0x244(%rbp), %xmm0
movss -0x248(%rbp), %xmm1
leaq -0xb8(%rbp), %rdi
callq 0x1505c0
movq -0x450(%rbp), %rdi
movlpd %xmm0, -0x278(%rbp)
leaq -0x278(%rbp), %rsi
callq 0x139090
movlpd %xmm0, -0x270(%rbp)
movss -0x244(%rbp), %xmm0
movss -0x248(%rbp), %xmm1
leaq -0xc0(%rbp), %rdi
callq 0x1505c0
movq -0x450(%rbp), %rdi
movlpd %xmm0, -0x288(%rbp)
leaq -0x288(%rbp), %rsi
callq 0x139090
movlpd %xmm0, -0x280(%rbp)
callq 0xdaeb0
movlpd %xmm0, -0x290(%rbp)
movq -0x40(%rbp), %rdi
movl $0x6, %edx
movl %edx, %esi
callq 0x10f7f0
movq -0x40(%rbp), %rdi
movl -0x1e4(%rbp), %ecx
leaq -0x260(%rbp), %rsi
movq %rsi, -0x430(%rbp)
leaq -0x290(%rbp), %rdx
movq %rdx, -0x448(%rbp)
callq 0x162580
movq -0x448(%rbp), %rdx
movq -0x40(%rbp), %rdi
movl -0x1e4(%rbp), %ecx
leaq -0x270(%rbp), %rsi
movq %rsi, -0x420(%rbp)
callq 0x162580
movq -0x448(%rbp), %rdx
movq -0x40(%rbp), %rdi
movl -0x1b0(%rbp), %ecx
leaq -0x280(%rbp), %rsi
movq %rsi, -0x438(%rbp)
callq 0x162580
movq -0x448(%rbp), %rdx
movq -0x430(%rbp), %rsi
movq -0x40(%rbp), %rdi
xorl %ecx, %ecx
movl %ecx, -0x43c(%rbp)
callq 0x162580
movq -0x448(%rbp), %rdx
movq -0x420(%rbp), %rsi
movq -0x40(%rbp), %rdi
movl -0x1ac(%rbp), %ecx
callq 0x162580
movq -0x448(%rbp), %rdx
movl -0x43c(%rbp), %ecx
movq -0x438(%rbp), %rsi
movq -0x40(%rbp), %rdi
callq 0x162580
movq -0x438(%rbp), %rcx
movq -0x430(%rbp), %rsi
movq -0x420(%rbp), %rdx
movq -0x40(%rbp), %rdi
movl -0x1b4(%rbp), %r8d
movss 0x28c12(%rip), %xmm0    # 0x178630
callq 0x1133a0
movss -0xc8(%rbp), %xmm0
callq 0x13bfc0
movq -0x438(%rbp), %rdi
movq -0x430(%rbp), %rsi
callq 0x150620
movaps %xmm0, %xmm1
movss -0x424(%rbp), %xmm0
movlpd %xmm1, -0x2a0(%rbp)
movss -0xcc(%rbp), %xmm1
subss %xmm1, %xmm0
callq 0x13bfc0
movq -0x420(%rbp), %rsi
leaq -0x2a0(%rbp), %rdi
callq 0x150620
movlpd %xmm0, -0x298(%rbp)
movq -0x298(%rbp), %rax
movq %rax, -0x200(%rbp)
jmp 0x14fef6
movl -0x1c(%rbp), %eax
andl $0x2000000, %eax        # imm = 0x2000000
cmpl $0x0, %eax
je 0x14fef4
movq -0x40(%rbp), %rax
movq %rax, -0x488(%rbp)
movss -0x70(%rbp), %xmm1
leaq -0x2b0(%rbp), %rdi
movq %rdi, -0x490(%rbp)
movaps %xmm1, %xmm0
callq 0xbf4c0
movq -0x490(%rbp), %rsi
leaq -0x64(%rbp), %rdi
movq %rdi, -0x470(%rbp)
callq 0x139090
movq -0x488(%rbp), %rdi
movq -0x470(%rbp), %rsi
movlpd %xmm0, -0x2a8(%rbp)
movl -0x1b0(%rbp), %ecx
movl -0x1e4(%rbp), %r9d
movq %rsp, %rax
movl %ecx, (%rax)
leaq -0x2a8(%rbp), %rdx
movl %r9d, %r8d
callq 0x113130
movq -0x40(%rbp), %rax
movq %rax, -0x478(%rbp)
movss -0x70(%rbp), %xmm1
leaq -0x2c0(%rbp), %rdi
movq %rdi, -0x480(%rbp)
movaps %xmm1, %xmm0
callq 0xbf4c0
movq -0x480(%rbp), %rsi
movq -0x470(%rbp), %rdi
callq 0x139090
movq -0x478(%rbp), %rdi
movq -0x470(%rbp), %rsi
movlpd %xmm0, -0x2b8(%rbp)
movl -0x1ac(%rbp), %r9d
movq %rsp, %rax
movl %r9d, (%rax)
leaq -0x2b8(%rbp), %rdx
xorl %r8d, %r8d
movl %r8d, %ecx
callq 0x113130
movq -0x64(%rbp), %rax
movq %rax, -0x2c8(%rbp)
movss -0x70(%rbp), %xmm1
leaq -0x2d8(%rbp), %rdi
movq %rdi, -0x468(%rbp)
movaps %xmm1, %xmm0
callq 0xbf4c0
movq -0x470(%rbp), %rdi
movq -0x468(%rbp), %rsi
callq 0x139090
movlpd %xmm0, -0x2d0(%rbp)
movsd -0x2c8(%rbp), %xmm0
movsd -0x2d0(%rbp), %xmm1
xorps %xmm2, %xmm2
callq 0xc90a0
movss -0x64(%rbp), %xmm0
movss %xmm0, -0x460(%rbp)
movss -0xc8(%rbp), %xmm0
callq 0x13bfc0
movss -0x460(%rbp), %xmm1
movss -0x70(%rbp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss 0x223c0(%rip), %xmm1    # 0x171fd8
addss %xmm1, %xmm0
cvttss2si %xmm0, %eax
cvtsi2ss %eax, %xmm0
movss 0x223a0(%rip), %xmm1    # 0x171fcc
addss -0x64(%rbp), %xmm1
movss -0x64(%rbp), %xmm2
addss -0x70(%rbp), %xmm2
movss 0x22389(%rip), %xmm3    # 0x171fcc
subss %xmm3, %xmm2
callq 0x13c020
movss %xmm0, -0x200(%rbp)
movss -0x60(%rbp), %xmm0
movss %xmm0, -0x45c(%rbp)
movss 0x20fd3(%rip), %xmm0    # 0x170c3c
subss -0xcc(%rbp), %xmm0
callq 0x13bfc0
movss -0x45c(%rbp), %xmm1
movss -0x70(%rbp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss 0x22345(%rip), %xmm1    # 0x171fd8
addss %xmm1, %xmm0
cvttss2si %xmm0, %eax
cvtsi2ss %eax, %xmm0
movss 0x22325(%rip), %xmm1    # 0x171fcc
addss -0x60(%rbp), %xmm1
movss -0x60(%rbp), %xmm2
addss -0x70(%rbp), %xmm2
movss 0x2230e(%rip), %xmm3    # 0x171fcc
subss %xmm3, %xmm2
callq 0x13c020
movss %xmm0, -0x1fc(%rbp)
movl $0x0, -0x2dc(%rbp)
cmpl $0x6, -0x2dc(%rbp)
jge 0x14fddc
movq -0x40(%rbp), %rax
movq %rax, -0x498(%rbp)
movss -0x74(%rbp), %xmm0
movss -0x60(%rbp), %xmm2
cvtsi2ssl -0x2dc(%rbp), %xmm1
movss -0x70(%rbp), %xmm3
movss 0x222d0(%rip), %xmm4    # 0x171fe0
divss %xmm4, %xmm3
mulss %xmm3, %xmm1
addss %xmm2, %xmm1
leaq -0x2e4(%rbp), %rdi
callq 0xbf4c0
movss -0x74(%rbp), %xmm0
addss -0x6c(%rbp), %xmm0
movss -0x60(%rbp), %xmm2
movl -0x2dc(%rbp), %eax
addl $0x1, %eax
cvtsi2ss %eax, %xmm1
movss -0x70(%rbp), %xmm3
movss 0x2228f(%rip), %xmm4    # 0x171fe0
divss %xmm4, %xmm3
mulss %xmm3, %xmm1
addss %xmm2, %xmm1
leaq -0x2ec(%rbp), %rdi
callq 0xbf4c0
movq -0x498(%rbp), %rdi
movslq -0x2dc(%rbp), %rax
movl -0x1d0(%rbp,%rax,4), %ecx
movslq -0x2dc(%rbp), %rax
movl -0x1d0(%rbp,%rax,4), %r8d
movl -0x2dc(%rbp), %eax
addl $0x1, %eax
cltq
movl -0x1d0(%rbp,%rax,4), %r9d
movl -0x2dc(%rbp), %eax
addl $0x1, %eax
cltq
movl -0x1d0(%rbp,%rax,4), %eax
leaq -0x2e4(%rbp), %rsi
leaq -0x2ec(%rbp), %rdx
movl %eax, (%rsp)
callq 0x113130
movl -0x2dc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2dc(%rbp)
jmp 0x14fcd9
movss -0x60(%rbp), %xmm1
movss -0xc4(%rbp), %xmm0
movss -0x70(%rbp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss 0x221da(%rip), %xmm1    # 0x171fd8
addss %xmm1, %xmm0
cvttps2dq %xmm0, %xmm0
cvtdq2ps %xmm0, %xmm0
movss %xmm0, -0x2f0(%rbp)
movss -0x74(%rbp), %xmm0
movss -0x60(%rbp), %xmm1
leaq -0x2f8(%rbp), %rdi
callq 0xbf4c0
movss -0x74(%rbp), %xmm0
movss -0x6c(%rbp), %xmm1
addss %xmm1, %xmm0
movss -0x60(%rbp), %xmm1
movss -0x70(%rbp), %xmm2
addss %xmm2, %xmm1
leaq -0x300(%rbp), %rdi
callq 0xbf4c0
movsd -0x2f8(%rbp), %xmm0
movsd -0x300(%rbp), %xmm1
xorps %xmm2, %xmm2
callq 0xc90a0
movq -0x40(%rbp), %rax
movq %rax, -0x4a0(%rbp)
movss -0x74(%rbp), %xmm0
movss 0x20dbd(%rip), %xmm1    # 0x170c3c
movss %xmm1, -0x4a4(%rbp)
subss %xmm1, %xmm0
movss -0x2f0(%rbp), %xmm1
leaq -0x308(%rbp), %rdi
callq 0xbf4c0
movss -0x4a4(%rbp), %xmm2
movss -0x7c(%rbp), %xmm1
movaps %xmm1, %xmm0
addss %xmm2, %xmm0
leaq -0x310(%rbp), %rdi
callq 0xbf4c0
movq -0x4a0(%rbp), %rdi
movss -0x6c(%rbp), %xmm2
movss 0x220f9(%rip), %xmm0    # 0x171fcc
addss %xmm0, %xmm2
movq -0x48(%rbp), %rax
movss (%rax), %xmm3
movsd -0x308(%rbp), %xmm0
movsd -0x310(%rbp), %xmm1
callq 0x150680
jmp 0x14fef6
movb -0xdb(%rbp), %al
movss 0x220d8(%rip), %xmm0    # 0x171fdc
movss 0x220d4(%rip), %xmm1    # 0x171fe0
movss %xmm1, -0x4ac(%rbp)
testb $0x1, %al
movss %xmm0, -0x4a8(%rbp)
jne 0x14ff30
movss -0x4ac(%rbp), %xmm0
movss %xmm0, -0x4a8(%rbp)
movss -0x4a8(%rbp), %xmm0
movss %xmm0, -0x314(%rbp)
movq -0x40(%rbp), %rdi
movss -0x314(%rbp), %xmm0
movl -0x1e8(%rbp), %edx
leaq -0x200(%rbp), %rsi
movl $0xc, %ecx
callq 0x113600
movq -0x40(%rbp), %rdi
movss 0x20ccd(%rip), %xmm0    # 0x170c3c
addss -0x314(%rbp), %xmm0
movl -0x1b4(%rbp), %edx
leaq -0x200(%rbp), %rsi
movl $0xc, %ecx
movss 0x20cab(%rip), %xmm1    # 0x170c3c
callq 0x113490
movq -0x40(%rbp), %rdi
movss -0x314(%rbp), %xmm0
movl -0x1b0(%rbp), %edx
leaq -0x200(%rbp), %rsi
movl $0xc, %ecx
movss 0x20c80(%rip), %xmm1    # 0x170c3c
callq 0x113490
testb $0x1, -0x59(%rbp)
je 0x150200
movq -0x18(%rbp), %rax
movss 0xc(%rax), %xmm0
callq 0x13bfc0
movss %xmm0, -0x318(%rbp)
movss -0x78(%rbp), %xmm0
movss -0x60(%rbp), %xmm1
movss -0x6c(%rbp), %xmm3
movaps %xmm0, %xmm2
addss %xmm3, %xmm2
movss -0x70(%rbp), %xmm4
movaps %xmm1, %xmm3
addss %xmm4, %xmm3
leaq -0x328(%rbp), %rdi
movq %rdi, -0x4d8(%rbp)
callq 0xec090
movq -0x4d8(%rbp), %rdi
movq -0x40(%rbp), %rax
movq %rax, -0x4e8(%rbp)
movq -0x328(%rbp), %rax
movq %rax, -0x330(%rbp)
leaq -0x320(%rbp), %rax
movq %rax, -0x4d0(%rbp)
movq -0x320(%rbp), %rax
movq %rax, -0x338(%rbp)
callq 0xeb840
movss 0x21f79(%rip), %xmm1    # 0x171fd8
movss %xmm1, -0x4c4(%rbp)
mulss %xmm1, %xmm0
movss %xmm0, -0x4dc(%rbp)
leaq -0x340(%rbp), %rdi
xorps %xmm1, %xmm1
movss %xmm1, -0x4c0(%rbp)
movaps %xmm1, %xmm0
callq 0xbf4c0
movq -0x4e8(%rbp), %rdi
movss -0x4dc(%rbp), %xmm2
movss -0x4c0(%rbp), %xmm4
movsd -0x330(%rbp), %xmm0
movsd -0x338(%rbp), %xmm1
movsd -0x340(%rbp), %xmm3
xorl %esi, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x11e200
movq -0x4d8(%rbp), %rsi
movq -0x4d0(%rbp), %rdx
movq -0x40(%rbp), %rdi
movl -0x1e8(%rbp), %r8d
movl %r8d, %r9d
andl $0xffffff, %r9d         # imm = 0xFFFFFF
movq %rsp, %rax
movl %r9d, (%rax)
movl %r8d, %ecx
callq 0x113130
movss -0x4c4(%rbp), %xmm1
movss -0x4c0(%rbp), %xmm2
movss -0x60(%rbp), %xmm3
movss -0x318(%rbp), %xmm4
movss 0x20b1e(%rip), %xmm0    # 0x170c3c
movss %xmm0, -0x4bc(%rbp)
subss %xmm4, %xmm0
movss -0x70(%rbp), %xmm4
mulss %xmm4, %xmm0
addss %xmm3, %xmm0
addss %xmm1, %xmm0
cvttps2dq %xmm0, %xmm0
cvtdq2ps %xmm0, %xmm0
movss %xmm0, -0x344(%rbp)
movq -0x328(%rbp), %rax
movq %rax, -0x350(%rbp)
movq -0x320(%rbp), %rax
movq %rax, -0x358(%rbp)
movsd -0x350(%rbp), %xmm0
movsd -0x358(%rbp), %xmm1
callq 0xc90a0
movss -0x4bc(%rbp), %xmm1
movq -0x40(%rbp), %rax
movq %rax, -0x4b8(%rbp)
movss -0x78(%rbp), %xmm0
subss %xmm1, %xmm0
movss -0x344(%rbp), %xmm1
leaq -0x360(%rbp), %rdi
callq 0xbf4c0
movss -0x4bc(%rbp), %xmm2
movss -0x7c(%rbp), %xmm1
movaps %xmm1, %xmm0
addss %xmm2, %xmm0
leaq -0x368(%rbp), %rdi
callq 0xbf4c0
movq -0x4b8(%rbp), %rdi
movss -0x6c(%rbp), %xmm2
movss 0x21ded(%rip), %xmm0    # 0x171fcc
addss %xmm0, %xmm2
movq -0x48(%rbp), %rax
movss (%rax), %xmm3
movsd -0x360(%rbp), %xmm0
movsd -0x368(%rbp), %xmm1
callq 0x150680
callq 0xdbe80
testb $0x1, -0xd9(%rbp)
je 0x150232
leaq -0x90(%rbp), %rdi
movq -0x18(%rbp), %rsi
movslq -0x58(%rbp), %rdx
shlq $0x2, %rdx
callq 0xd9f0
cmpl $0x0, %eax
jne 0x150232
movb $0x0, -0xd9(%rbp)
testb $0x1, -0xd9(%rbp)
je 0x15024a
movq -0x38(%rbp), %rax
movl 0x124(%rax), %edi
callq 0xca110
callq 0xdb640
movb -0xd9(%rbp), %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x4f0, %rsp            # imm = 0x4F0
popq %rbp
retq
nopl (%rax,%rax)