// File: /workspace/github_cpp_makefile_star2_O3/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 $0x258, %rsp            # imm = 0x258
leaq 0x5d9e8(%rip), %rax     # 0xfbcd0
movq (%rax), %r15
movq 0x1ae0(%r15), %r14
movb $0x1, 0x90(%r14)
cmpb $0x0, 0x93(%r14)
je 0x9e30b
xorl %ebx, %ebx
jmp 0x9ffa2
movl %edx, %ebx
movq %rsi, %r12
movq %rdi, %r13
movq %rcx, -0x170(%rbp)
movq 0x2b8(%r14), %rax
movq %rax, -0x108(%rbp)
callq 0x5614d
movaps %xmm0, -0x70(%rbp)
movq %r15, -0x40(%rbp)
movl $0x0, 0x1bf8(%r15)
movq %r13, -0x1b0(%rbp)
movq %r13, %rdi
callq 0x54b5f
callq 0x56428
movl %ebx, %r13d
notl %r13d
shrl $0x4, %r13d
andl $0x10, %r13d
orl %ebx, %r13d
testb $0x8, %bl
jne 0x9e375
movq %r12, %rdi
movl %r13d, %esi
callq 0xa005c
testl $0x6000000, %ebx        # imm = 0x6000000
jne 0x9e397
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 0x9e3ba
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 0x9ffb9
movl %r13d, %eax
andl $0x18000000, %eax       # imm = 0x18000000
leal -0x1(%rax), %ecx
xorl %ecx, %eax
cmpl %ecx, %eax
jbe 0x9ffd8
testb $0x8, %r13b
movq %r12, -0x58(%rbp)
jne 0x9e403
movl $0x10000, %eax          # imm = 0x10000
movq -0x40(%rbp), %r15
andl 0x306c(%r15), %eax
orl %eax, %r13d
jmp 0x9e407
movq -0x40(%rbp), %r15
xorl %ebx, %ebx
testb $0x2, %r13b
sete %bl
movl %r13d, %eax
andl $0x10002, %eax          # imm = 0x10002
xorl %r12d, %r12d
movl %eax, -0xcc(%rbp)
cmpl $0x10000, %eax          # imm = 0x10000
sete %r12b
movq %r14, -0x1b8(%rbp)
movq 0xd8(%r14), %r14
movq %r14, -0x150(%rbp)
callq 0x562ff
movaps %xmm0, -0x130(%rbp)
incl %r12d
cvtsi2ss %r12d, %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, -0xc0(%rbp)
movd %r14d, %xmm3
movd %xmm3, -0x140(%rbp)
movaps %xmm1, %xmm0
addss %xmm3, %xmm0
movaps %xmm2, -0x180(%rbp)
movaps %xmm0, -0x230(%rbp)
addss %xmm0, %xmm2
movaps %xmm2, -0x90(%rbp)
leaq 0xc(,%rbx,4), %rdx
leaq -0x260(%rbp), %rdi
movq -0x58(%rbp), %r12
movq %r12, %rsi
movq %rdx, -0x208(%rbp)
callq 0xc080
movss 0x328c3(%rip), %xmm1    # 0xd0da4
movaps -0xc0(%rbp), %xmm4
mulss %xmm4, %xmm1
movss 0x16b10(%rip), %xmm0    # 0xb5004
movaps %xmm4, %xmm2
mulss %xmm0, %xmm2
movaps %xmm2, %xmm3
movss %xmm1, -0x4c(%rbp)
subss %xmm1, %xmm3
movaps -0x130(%rbp), %xmm1
addss %xmm4, %xmm1
mulss %xmm0, %xmm1
addss -0x140(%rbp), %xmm1
shrq $0x20, %r14
movd %r14d, %xmm0
movaps %xmm2, -0x220(%rbp)
movdqa %xmm0, -0x1d0(%rbp)
addss %xmm0, %xmm2
movaps %xmm1, -0x190(%rbp)
movss %xmm1, -0x78(%rbp)
movaps %xmm2, -0x200(%rbp)
movss %xmm2, -0x74(%rbp)
movaps %xmm4, %xmm0
mulss 0x3284b(%rip), %xmm0    # 0xd0da8
cvttps2dq %xmm0, %xmm0
cvtdq2ps %xmm0, %xmm0
movaps %xmm3, -0x70(%rbp)
movaps %xmm3, %xmm1
subss %xmm0, %xmm1
movss %xmm1, -0xe4(%rbp)
movl $0x0, -0xe0(%rbp)
movss 0x1733b(%rip), %xmm0    # 0xb58c4
mulss %xmm1, %xmm0
movss 0x32817(%rip), %xmm2    # 0xd0dac
mulss %xmm1, %xmm2
movss %xmm0, -0xdc(%rbp)
movss %xmm2, -0xd8(%rbp)
mulss 0x327ff(%rip), %xmm1    # 0xd0db0
movss %xmm0, -0xd4(%rbp)
movss %xmm1, -0xd0(%rbp)
movss (%r12), %xmm0
movss %xmm0, -0x2c(%rbp)
movss 0x4(%r12), %xmm1
movss %xmm1, -0x30(%rbp)
movss 0x8(%r12), %xmm2
movss %xmm2, -0x34(%rbp)
movss %xmm0, -0x9c(%rbp)
movss %xmm1, -0x98(%rbp)
movss %xmm2, -0x94(%rbp)
btl $0x1b, %r13d
jb 0x9e62a
btl $0x1c, %r13d
jae 0x9e694
leaq -0x9c(%rbp), %rdi
leaq -0x98(%rbp), %rsi
leaq -0x94(%rbp), %rdx
callq 0x42749
jmp 0x9e694
leaq -0x2c(%rbp), %rdi
leaq -0x30(%rbp), %rsi
leaq -0x34(%rbp), %rdx
callq 0x426ad
movq 0x3078(%r15), %rax
xorq (%r12), %rax
movl 0x3080(%r15), %ecx
xorl 0x8(%r12), %ecx
orq %rax, %rcx
jne 0x9e694
movss -0x30(%rbp), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm1
jne 0x9e677
jp 0x9e677
movq -0x40(%rbp), %rax
movss 0x3070(%rax), %xmm1
movss %xmm1, -0x2c(%rbp)
movss -0x34(%rbp), %xmm1
ucomiss %xmm0, %xmm1
jne 0x9e694
jp 0x9e694
movq -0x40(%rbp), %rax
movss 0x3074(%rax), %xmm0
movss %xmm0, -0x30(%rbp)
movaps -0x130(%rbp), %xmm0
addss -0x90(%rbp), %xmm0
movaps %xmm0, -0xb0(%rbp)
movl $0x8, %edi
movl $0x1, %esi
callq 0x53d92
btl $0x1a, %r13d
jb 0x9e6e8
btl $0x19, %r13d
movaps -0xc0(%rbp), %xmm1
jb 0x9e7f4
movl $0x0, -0x44(%rbp)
movl $0x0, -0x48(%rbp)
xorl %r15d, %r15d
jmp 0x9ebb0
movq -0x40(%rbp), %rax
movss 0x15b0(%rax), %xmm0
movaps -0xc0(%rbp), %xmm1
addss %xmm1, %xmm0
addss -0x130(%rbp), %xmm0
leaq -0x100(%rbp), %rsi
movss %xmm0, (%rsi)
movss %xmm1, 0x4(%rsi)
leaq 0x33eb0(%rip), %rdi     # 0xd25ce
movl $0x0, -0x44(%rbp)
xorl %edx, %edx
callq 0x9147d
callq 0x519e4
movl $0x0, -0x48(%rbp)
movl $0x0, %r15d
testb %al, %al
je 0x9eb99
movq -0x40(%rbp), %rax
movss 0x3cc(%rax), %xmm4
movss 0x3d0(%rax), %xmm5
movaps -0x190(%rbp), %xmm3
subss %xmm3, %xmm4
movaps -0x200(%rbp), %xmm2
subss %xmm2, %xmm5
movss 0x128(%rax), %xmm1
movss 0x12c(%rax), %xmm0
subss %xmm3, %xmm1
subss %xmm2, %xmm0
movss %xmm5, -0x1f0(%rbp)
movaps %xmm5, %xmm2
mulss %xmm5, %xmm2
movaps %xmm4, -0x200(%rbp)
movaps %xmm4, %xmm3
mulss %xmm4, %xmm3
addss %xmm2, %xmm3
movss 0x1681f(%rip), %xmm2    # 0xb4fd0
addss -0x70(%rbp), %xmm2
mulss %xmm2, %xmm2
ucomiss %xmm2, %xmm3
movaps %xmm1, -0x160(%rbp)
movss %xmm0, -0x44(%rbp)
jb 0x9e7e8
movss 0x16811(%rip), %xmm2    # 0xb4fe4
addss -0x220(%rbp), %xmm2
mulss %xmm2, %xmm2
ucomiss %xmm3, %xmm2
jae 0x9e975
movl $0x0, -0x48(%rbp)
jmp 0x9e9b4
leaq -0x100(%rbp), %rsi
movss %xmm1, (%rsi)
movss %xmm1, 0x4(%rsi)
leaq 0x33dc4(%rip), %rdi     # 0xd25cf
movl $0x0, -0x44(%rbp)
xorl %edx, %edx
callq 0x9147d
callq 0x519e4
testb %al, %al
je 0x9e8a7
movq -0x40(%rbp), %rax
movss 0x128(%rax), %xmm0
subss -0x140(%rbp), %xmm0
movss 0x1678e(%rip), %xmm1    # 0xb4fd0
addss -0xc0(%rbp), %xmm1
divss %xmm1, %xmm0
movss 0x1678e(%rip), %xmm2    # 0xb4fe4
movaps %xmm2, %xmm3
minss %xmm0, %xmm3
xorps %xmm4, %xmm4
cmpltss %xmm4, %xmm0
andnps %xmm3, %xmm0
movss %xmm0, -0x30(%rbp)
movss 0x12c(%rax), %xmm0
subss -0x1d0(%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 0x9e8be
leaq 0x199d5(%rip), %rdi     # 0xb8289
movl $0x1, %esi
callq 0x57551
leaq -0x100(%rbp), %rbx
movaps -0x90(%rbp), %xmm0
movss %xmm0, (%rbx)
movl %r14d, 0x4(%rbx)
movq %rbx, %rdi
callq 0x55a0a
movaps -0x130(%rbp), %xmm0
movss %xmm0, (%rbx)
movaps -0xc0(%rbp), %xmm0
movss %xmm0, 0x4(%rbx)
leaq 0x33cae(%rip), %rdi     # 0xd25a8
leaq -0x100(%rbp), %rsi
movl $0x0, -0x48(%rbp)
xorl %edx, %edx
callq 0x9147d
callq 0x519e4
testb %al, %al
je 0x9e96c
movq -0x40(%rbp), %rax
movss 0x12c(%rax), %xmm0
subss -0x1d0(%rbp), %xmm0
movss 0x1669c(%rip), %xmm1    # 0xb4fd0
movaps -0xc0(%rbp), %xmm3
addss %xmm3, %xmm1
divss %xmm1, %xmm0
movss 0x16699(%rip), %xmm1    # 0xb4fe4
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 0x9ebb0
movl -0x44(%rbp), %r15d
jmp 0x9ebb0
callq 0xc240
divss 0x27fce(%rip), %xmm0    # 0xc6950
mulss 0x1667a(%rip), %xmm0    # 0xb5004
movss 0x16652(%rip), %xmm1    # 0xb4fe4
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 0x16ecb(%rip), %xmm0    # 0xb588c
mulss 0x27f87(%rip), %xmm0    # 0xc6950
callq 0xc5d0
movss %xmm0, -0x190(%rbp)
movss 0x16eae(%rip), %xmm0    # 0xb588c
mulss -0x2c(%rbp), %xmm0
mulss 0x27f65(%rip), %xmm0    # 0xc6950
callq 0xc050
movaps %xmm0, %xmm4
movss -0x1f0(%rbp), %xmm3
mulss %xmm3, %xmm4
movaps -0x200(%rbp), %xmm2
movaps %xmm2, %xmm1
movss -0x190(%rbp), %xmm5
mulss %xmm5, %xmm1
subss %xmm4, %xmm1
mulss %xmm5, %xmm3
movss %xmm0, -0x1f0(%rbp)
mulss %xmm0, %xmm2
addss %xmm3, %xmm2
unpcklps %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
leaq -0x100(%rbp), %rcx
movlps %xmm1, (%rcx)
leaq -0xe4(%rbp), %rdi
leaq -0xdc(%rbp), %rsi
leaq -0xd4(%rbp), %rdx
callq 0x41776
testb %al, %al
je 0x9eb8e
movss -0x1f0(%rbp), %xmm5
movaps %xmm5, %xmm0
movss -0x44(%rbp), %xmm3
mulss %xmm3, %xmm0
movaps -0x160(%rbp), %xmm2
movaps %xmm2, %xmm1
movss -0x190(%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 -0x100(%rbp), %rcx
movlps %xmm1, (%rcx)
leaq -0xe4(%rbp), %rdi
leaq -0xdc(%rbp), %rsi
leaq -0xd4(%rbp), %rdx
callq 0x41776
testb %al, %al
jne 0x9eae8
leaq -0xe4(%rbp), %rdi
leaq -0xdc(%rbp), %rsi
leaq -0xd4(%rbp), %rdx
leaq -0x100(%rbp), %rbx
movq %rbx, %rcx
callq 0x418d0
movlps %xmm0, (%rbx)
leaq -0x148(%rbp), %rax
movq %rax, (%rsp)
leaq -0xe4(%rbp), %rdi
leaq -0xdc(%rbp), %rsi
leaq -0xd4(%rbp), %rdx
leaq -0x100(%rbp), %rcx
leaq -0x1e0(%rbp), %rbx
leaq -0x118(%rbp), %r12
movq %rbx, %r8
movq %r12, %r9
callq 0x4183c
movss 0x164b4(%rip), %xmm0    # 0xb4fe4
movaps %xmm0, %xmm1
subss (%r12), %xmm1
movaps %xmm0, %xmm2
minss %xmm1, %xmm2
movss 0x16d84(%rip), %xmm3    # 0xb58cc
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 -0x58(%rbp), %r12
jmp 0x9eb99
movl $0x0, -0x44(%rbp)
movl -0x48(%rbp), %r15d
testb $0x8, %r13b
jne 0x9ebb0
leaq 0x196e3(%rip), %rdi     # 0xb8289
movl $0x1, %esi
callq 0x57551
movaps -0x180(%rbp), %xmm0
movaps -0xb0(%rbp), %xmm2
addss %xmm2, %xmm0
cmpl $0x10000, -0xcc(%rbp)   # imm = 0x10000
movaps %xmm0, -0x180(%rbp)
jne 0x9ec7e
leaq -0x100(%rbp), %rbx
movss %xmm0, (%rbx)
movl %r14d, 0x4(%rbx)
movq %rbx, %rdi
callq 0x55a0a
movaps -0x130(%rbp), %xmm0
movss %xmm0, (%rbx)
movaps -0xc0(%rbp), %xmm0
movss %xmm0, 0x4(%rbx)
leaq 0x3399e(%rip), %rdi     # 0xd25ac
leaq -0x100(%rbp), %rsi
xorl %edx, %edx
callq 0x9147d
callq 0x519e4
testb %al, %al
je 0x9ec7e
movq -0x40(%rbp), %rax
movss 0x12c(%rax), %xmm0
subss -0x1d0(%rbp), %xmm0
movss 0x1638f(%rip), %xmm1    # 0xb4fd0
addss -0xc0(%rbp), %xmm1
divss %xmm1, %xmm0
movss 0x1638f(%rip), %xmm1    # 0xb4fe4
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(%r12)
movb $0x1, %r15b
callq 0x53ede
btl $0x8, %r13d
jb 0x9eca3
movq -0x40(%rbp), %rax
movss 0x15b0(%rax), %xmm1
xorps %xmm0, %xmm0
callq 0x5591d
callq 0x56428
testb %r13b, %r13b
js 0x9eced
movq -0x1b0(%rbp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x4443d
cmpq %r14, %rax
je 0x9eced
movq %rax, %rbx
btl $0x8, %r13d
jae 0x9ecdc
movq -0x40(%rbp), %rax
movss 0x15b0(%rax), %xmm1
xorps %xmm0, %xmm0
callq 0x5591d
movq -0x1b0(%rbp), %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x8fe70
btl $0x8, %r13d
jb 0x9ed26
movl $0x10, %edi
movl $0x1, %esi
callq 0x53d92
movss (%r12), %xmm0
movss 0x4(%r12), %xmm1
movss 0x8(%r12), %xmm2
testb $0x2, %r13b
jne 0x9ed32
movss 0xc(%r12), %xmm3
jmp 0x9ed3a
movl %r15d, -0x160(%rbp)
jmp 0x9ee52
movss 0x162aa(%rip), %xmm3    # 0xb4fe4
movss %xmm0, -0x100(%rbp)
movss %xmm1, -0xfc(%rbp)
movss %xmm2, -0xf8(%rbp)
movss %xmm3, -0xf4(%rbp)
testb %r13b, %r13b
jns 0x9ed6d
leaq 0x20015(%rip), %rdi     # 0xbed7b
xorl %eax, %eax
callq 0x90323
movl %r13d, %ebx
andl $0x180e0040, %ebx       # imm = 0x180E0040
movss 0x16272(%rip), %xmm1    # 0xb4ff0
movaps -0x130(%rbp), %xmm0
mulss %xmm0, %xmm1
addss %xmm0, %xmm0
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
leaq 0x1ffec(%rip), %rdi     # 0xbed83
leaq -0x100(%rbp), %rsi
movl %ebx, %edx
movaps %xmm1, -0x1b0(%rbp)
movaps %xmm1, %xmm0
callq 0x9dd70
cmpq $0x0, -0x170(%rbp)
je 0x9ee41
leaq 0x337ee(%rip), %rdi     # 0xd25b2
xorl %eax, %eax
callq 0x90323
movq -0x170(%rbp), %rax
movss (%rax), %xmm0
movss 0x4(%rax), %xmm1
movss 0x8(%rax), %xmm2
testb $0x2, %r13b
jne 0x9eded
movss 0xc(%rax), %xmm3
jmp 0x9edf5
movss 0x161ef(%rip), %xmm3    # 0xb4fe4
leaq -0x1e0(%rbp), %rsi
movss %xmm0, (%rsi)
movss %xmm1, 0x4(%rsi)
movss %xmm2, 0x8(%rsi)
movss %xmm3, 0xc(%rsi)
leaq 0x337a5(%rip), %rdi     # 0xd25bb
movl %ebx, %edx
movaps -0x1b0(%rbp), %xmm0
callq 0x9dd70
testb %al, %al
je 0x9ee41
movq %r12, %rdi
movq -0x170(%rbp), %rsi
movq -0x208(%rbp), %rdx
callq 0xc080
movb $0x1, %r15b
movl %r15d, -0x160(%rbp)
callq 0x53ede
callq 0x55617
movss 0x161a6(%rip), %xmm3    # 0xb5000
movaps -0x130(%rbp), %xmm1
mulss %xmm1, %xmm3
leaq 0x4(%r12), %r15
leaq 0x8(%r12), %rbx
cmpb $0x0, -0x48(%rbp)
movaps -0x90(%rbp), %xmm2
jne 0x9ee86
cmpb $0x0, -0x44(%rbp)
je 0x9ef81
btl $0x1b, %r13d
jb 0x9eec0
btl $0x1c, %r13d
jae 0x9ef81
movss -0x2c(%rbp), %xmm0
movss %xmm0, (%r12)
movss -0x30(%rbp), %xmm0
movss %xmm0, 0x4(%r12)
movss -0x34(%rbp), %xmm0
movss %xmm0, 0x8(%r12)
jmp 0x9ef81
movss -0x2c(%rbp), %xmm1
movss 0x31ee7(%rip), %xmm2    # 0xd0db4
addss %xmm1, %xmm2
movss 0x1610b(%rip), %xmm0    # 0xb4fe4
cmpless %xmm1, %xmm0
andps %xmm0, %xmm2
andnps %xmm1, %xmm0
orps %xmm2, %xmm0
movaps %xmm3, -0x170(%rbp)
movss -0x30(%rbp), %xmm3
xorps %xmm2, %xmm2
xorps %xmm1, %xmm1
cmpltss %xmm3, %xmm1
andps %xmm1, %xmm3
movss 0x1698f(%rip), %xmm4    # 0xb5898
andnps %xmm4, %xmm1
orps %xmm3, %xmm1
movss -0x34(%rbp), %xmm3
cmpltss %xmm3, %xmm2
andps %xmm2, %xmm3
movss 0x31e68(%rip), %xmm4    # 0xd0d8c
andnps %xmm4, %xmm2
orps %xmm3, %xmm2
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x42749
movaps -0x170(%rbp), %xmm3
movaps -0x90(%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 (%r12), %rax
movq %rax, 0x3078(%rcx)
movl 0x8(%r12), %eax
movl %eax, 0x3080(%rcx)
cvttps2dq %xmm3, %xmm0
testb $0x20, %r13b
jne 0x9f149
movaps %xmm0, -0x170(%rbp)
movaps -0x180(%rbp), %xmm0
cmpl $0x10000, -0xcc(%rbp)   # imm = 0x10000
je 0x9efac
movaps %xmm2, %xmm0
addss %xmm1, %xmm0
subss -0x140(%rbp), %xmm0
callq 0x55d0a
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 0x9f019
movl %r12d, %edx
orl $0x100004, %edx         # imm = 0x100004
leaq 0x335d6(%rip), %rdi     # 0xd25c6
movq -0x58(%rbp), %rsi
callq 0x9cc78
testb %al, %al
je 0x9f019
movb $0x1, %al
movl %eax, -0x160(%rbp)
movq -0x40(%rbp), %rax
cmpl $0x0, 0x1b30(%rax)
je 0x9f019
movb 0x1b3d(%rax), %r14b
btl $0x15, %r13d
setae %al
testl $0x500000, %r13d        # imm = 0x500000
setne %cl
testb %cl, %al
jne 0x9f056
movl %r12d, %edx
orl $0x200004, %edx         # imm = 0x200004
leaq 0x3358d(%rip), %rdi     # 0xd25cc
movq -0x58(%rbp), %rsi
callq 0x9cc78
movl -0x160(%rbp), %ecx
orb %al, %cl
movl %ecx, -0x160(%rbp)
btl $0x16, %r13d
setae %al
testl $0x300000, %r13d        # imm = 0x300000
setne %cl
testb %cl, %al
jne 0x9f094
orl $0x400004, %r12d        # imm = 0x400004
leaq 0x33558(%rip), %rdi     # 0xd25d2
movq -0x58(%rbp), %rsi
movl %r12d, %edx
callq 0x9cc78
movl -0x160(%rbp), %ecx
orb %al, %cl
movl %ecx, -0x160(%rbp)
btl $0x1b, %r13d
setae %r12b
callq 0x560da
orb %r14b, %r12b
jne 0x9f13e
movq -0x58(%rbp), %rax
movss (%rax), %xmm0
movss 0x4(%rax), %xmm1
movss 0x8(%rax), %xmm2
leaq -0x100(%rbp), %r12
leaq -0x1e0(%rbp), %rsi
leaq -0x118(%rbp), %rdx
movq %r12, %rdi
callq 0x426ad
xorps %xmm1, %xmm1
ucomiss (%r12), %xmm1
jb 0x9f13e
movss -0x2c(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0x9f13e
movss -0x118(%rbp), %xmm2
ucomiss %xmm2, %xmm1
jb 0x9f119
movss -0x34(%rbp), %xmm3
ucomiss %xmm2, %xmm3
jne 0x9f107
jnp 0x9f119
movss -0x30(%rbp), %xmm1
mulss 0x15ef0(%rip), %xmm3    # 0xb5004
movaps %xmm3, %xmm2
jmp 0x9f12f
ucomiss -0x1e0(%rbp), %xmm1
jb 0x9f13e
movss -0x30(%rbp), %xmm1
mulss 0x15ed5(%rip), %xmm1    # 0xb5004
movq -0x58(%rbp), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x42749
movq -0x58(%rbp), %r12
movaps -0x170(%rbp), %xmm0
cvtdq2ps %xmm0, %xmm0
movaps %xmm0, -0x250(%rbp)
cmpb $0x0, -0x160(%rbp)
je 0x9f24d
btl $0x1b, %r13d
jb 0x9f1b4
btl $0x1c, %r13d
jae 0x9f24d
movss (%r12), %xmm0
movss %xmm0, -0x2c(%rbp)
movss 0x4(%r12), %xmm1
movss %xmm1, -0x30(%rbp)
movss 0x8(%r12), %xmm2
movss %xmm2, -0x34(%rbp)
leaq -0x9c(%rbp), %rdi
leaq -0x98(%rbp), %rsi
leaq -0x94(%rbp), %rdx
callq 0x42749
jmp 0x9f24d
movss (%r12), %xmm0
movss %xmm0, -0x9c(%rbp)
movss 0x4(%r12), %xmm1
movss %xmm1, -0x98(%rbp)
movss 0x8(%r12), %xmm2
movss %xmm2, -0x94(%rbp)
leaq -0x2c(%rbp), %rdi
leaq -0x30(%rbp), %rsi
leaq -0x34(%rbp), %rdx
callq 0x426ad
movq -0x40(%rbp), %rcx
movq 0x3078(%rcx), %rax
xorq (%r12), %rax
movl 0x3080(%rcx), %ecx
xorl 0x8(%r12), %ecx
orq %rax, %rcx
jne 0x9f24d
movss -0x30(%rbp), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm1
jne 0x9f230
jp 0x9f230
movq -0x40(%rbp), %rax
movss 0x3070(%rax), %xmm1
movss %xmm1, -0x2c(%rbp)
movss -0x34(%rbp), %xmm1
ucomiss %xmm0, %xmm1
jne 0x9f24d
jp 0x9f24d
movq -0x40(%rbp), %rax
movss 0x3074(%rax), %xmm0
movss %xmm0, -0x30(%rbp)
movq -0x40(%rbp), %r15
movss 0x1560(%r15), %xmm0
movss 0x15d82(%rip), %xmm1    # 0xb4fe4
movaps %xmm1, %xmm2
minss %xmm0, %xmm2
xorps %xmm3, %xmm3
movaps %xmm0, %xmm4
cmpltss %xmm3, %xmm4
andnps %xmm2, %xmm4
mulss 0x165c9(%rip), %xmm4    # 0xb5848
addss 0x15d7d(%rip), %xmm4    # 0xb5004
movabsq $0x3f8000003f800000, %rax # imm = 0x3F8000003F800000
leaq -0x1dc(%rbp), %rsi
movq %rax, -0x4(%rsi)
leaq -0x1d8(%rbp), %rdx
movl $0x3f800000, (%rdx)     # imm = 0x3F800000
movss %xmm0, 0x4(%rdx)
cvttss2si %xmm4, %r14d
shll $0x18, %r14d
leal 0xff0000(%r14), %eax
leal 0xffff00(%r14), %ecx
leal 0xffffff(%r14), %edi
movl %edi, -0x190(%rbp)
leal 0xff(%r14), %r8d
movl %r8d, -0x100(%rbp)
leal 0xffff(%r14), %edi
movl %edi, -0xfc(%rbp)
leal 0xff00(%r14), %edi
movl %edi, -0xf8(%rbp)
leal 0x808080(%r14), %edi
movl %edi, -0xc8(%rbp)
movl %ecx, -0xf4(%rbp)
movl %eax, -0xf0(%rbp)
leal 0xff00ff(%r14), %eax
movl %eax, -0xec(%rbp)
movl %r8d, -0x140(%rbp)
movl %r8d, -0xe8(%rbp)
movss -0x2c(%rbp), %xmm0
leaq -0x1e0(%rbp), %rbx
movaps %xmm1, %xmm2
movq %rbx, %rdi
callq 0x42749
movq %rbx, %rdi
callq 0x42601
movl %eax, %ebx
movss -0x9c(%rbp), %xmm0
movss -0x98(%rbp), %xmm1
movss -0x94(%rbp), %xmm2
movss 0x1560(%r15), %xmm3
leaq -0x118(%rbp), %rdi
movss %xmm0, (%rdi)
movss %xmm1, 0x4(%rdi)
movss %xmm2, 0x8(%rdi)
movss %xmm3, 0xc(%rdi)
callq 0x42601
movl %eax, %r15d
btl $0x1a, %r13d
movq $0x0, -0x148(%rbp)
jb 0x9f6a9
btl $0x19, %r13d
jae 0x9fd54
movq %r14, %r12
movl %r15d, -0xc4(%rbp)
movaps -0x1d0(%rbp), %xmm1
addss -0xc0(%rbp), %xmm1
movaps -0x230(%rbp), %xmm0
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
leaq -0x118(%rbp), %r15
movlps %xmm0, (%r15)
movl -0x190(%rbp), %ecx
movl %ecx, (%rsp)
movl %ebx, %r8d
leaq -0x150(%rbp), %rbx
movq -0x108(%rbp), %r13
movq %r13, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movl %r8d, %r9d
callq 0x78668
movss (%rbx), %xmm0
movaps -0xc0(%rbp), %xmm2
addss %xmm2, %xmm0
movss 0x4(%rbx), %xmm1
addss %xmm2, %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movq %r15, %r14
movlps %xmm0, (%r15)
movl %r12d, (%rsp)
leaq -0x118(%rbp), %rdx
xorl %r15d, %r15d
movq %r13, %rdi
movq %rbx, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
movl %r12d, %r9d
callq 0x78668
movsd (%rbx), %xmm0
movaps %xmm0, %xmm2
shufps $0x55, %xmm0, %xmm2     # xmm2 = xmm2[1,1],xmm0[1,1]
movaps -0xc0(%rbp), %xmm3
movaps %xmm3, %xmm1
addss %xmm0, %xmm1
addss %xmm3, %xmm2
unpcklps %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
xorps %xmm2, %xmm2
callq 0x450e0
movss -0x30(%rbp), %xmm1
movss 0x15b5f(%rip), %xmm9    # 0xb4fe4
movaps %xmm9, %xmm0
minss %xmm1, %xmm0
xorps %xmm10, %xmm10
cmpltss %xmm10, %xmm1
andnps %xmm0, %xmm1
movaps -0xc0(%rbp), %xmm2
mulss %xmm2, %xmm1
movss (%rbx), %xmm3
movss 0x4(%rbx), %xmm0
addss %xmm3, %xmm1
movss 0x15b4a(%rip), %xmm7    # 0xb5004
addss %xmm7, %xmm1
cvttps2dq %xmm1, %xmm1
cvtdq2ps %xmm1, %xmm4
movss 0x1639b(%rip), %xmm1    # 0xb5868
movaps %xmm2, %xmm5
movaps %xmm2, %xmm8
addss %xmm3, %xmm5
addss %xmm1, %xmm3
movss 0x163a8(%rip), %xmm2    # 0xb588c
addss %xmm2, %xmm5
minss %xmm4, %xmm5
cmpltss %xmm3, %xmm4
movaps %xmm4, %xmm6
andnps %xmm5, %xmm6
andps %xmm3, %xmm4
orps %xmm6, %xmm4
movaps %xmm9, %xmm3
subss -0x34(%rbp), %xmm3
movss %xmm4, -0x148(%rbp)
movaps %xmm9, %xmm4
minss %xmm3, %xmm4
cmpltss %xmm10, %xmm3
andnps %xmm4, %xmm3
mulss %xmm8, %xmm3
addss %xmm0, %xmm3
addss %xmm7, %xmm3
cvttps2dq %xmm3, %xmm3
cvtdq2ps %xmm3, %xmm3
addss %xmm0, %xmm1
addss %xmm8, %xmm0
addss %xmm2, %xmm0
minss %xmm3, %xmm0
cmpltss %xmm1, %xmm3
movaps %xmm3, %xmm2
andnps %xmm0, %xmm2
andps %xmm1, %xmm3
orps %xmm2, %xmm3
movss %xmm3, -0x144(%rbp)
divss 0x15aa6(%rip), %xmm8    # 0xb500c
movss %xmm8, -0x70(%rbp)
leaq -0x198(%rbp), %rbx
movl -0x140(%rbp), %ecx
movss -0x14c(%rbp), %xmm0
xorps %xmm1, %xmm1
cvtsi2ss %r15d, %xmm1
movss -0x70(%rbp), %xmm3
mulss %xmm3, %xmm1
addss %xmm0, %xmm1
movaps -0x90(%rbp), %xmm2
movss %xmm2, -0x118(%rbp)
movss %xmm1, -0x114(%rbp)
leaq 0x1(%r15), %r12
xorps %xmm1, %xmm1
cvtsi2ss %r12d, %xmm1
mulss %xmm3, %xmm1
addss %xmm0, %xmm1
movaps -0xb0(%rbp), %xmm0
movss %xmm0, -0x198(%rbp)
movss %xmm1, -0x194(%rbp)
movl -0xfc(%rbp,%r15,4), %r15d
movl %r15d, (%rsp)
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl %ecx, %r8d
movl %r15d, %r9d
callq 0x78668
movl %r15d, %ecx
movq %r12, %r15
cmpq $0x6, %r12
jne 0x9f579
movss -0x14c(%rbp), %xmm1
movss -0x2c(%rbp), %xmm0
movaps -0xc0(%rbp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
addss 0x159d8(%rip), %xmm0    # 0xb5004
cvttps2dq %xmm0, %xmm0
cvtdq2ps %xmm0, %xmm0
movaps %xmm0, -0x70(%rbp)
addss %xmm1, %xmm2
movaps -0x90(%rbp), %xmm0
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movaps -0xb0(%rbp), %xmm1
unpcklps %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
xorps %xmm2, %xmm2
callq 0x450e0
movaps -0x90(%rbp), %xmm0
addss 0x1596a(%rip), %xmm0    # 0xb4fd0
unpcklps -0x70(%rbp), %xmm0      # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
movss 0x15972(%rip), %xmm1    # 0xb4fe4
movaps -0x250(%rbp), %xmm4
addss %xmm4, %xmm1
movss 0x161e3(%rip), %xmm2    # 0xb5868
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 %r13, %rdi
callq 0xa02a9
jmp 0x9fd49
movl %ebx, -0x1bc(%rbp)
movq %r14, -0x238(%rbp)
movl %r15d, -0xc4(%rbp)
movss 0x1593f(%rip), %xmm0    # 0xb5004
movaps %xmm0, %xmm2
movaps -0x220(%rbp), %xmm1
cvttss2si %xmm1, %eax
divss %xmm1, %xmm2
cltq
imulq $0x2aaaaaab, %rax, %rax # imm = 0x2AAAAAAB
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x21, %rax
addl %ecx, %eax
cmpl $0x5, %eax
movl $0x4, %ecx
cmovgel %eax, %ecx
movl %ecx, -0x230(%rbp)
movaps 0x158bb(%rip), %xmm3    # 0xb4fc0
movaps %xmm2, -0x1d0(%rbp)
xorps %xmm2, %xmm3
movaps %xmm3, -0x200(%rbp)
addss -0x70(%rbp), %xmm1
movaps %xmm1, -0x220(%rbp)
mulss %xmm0, %xmm1
movaps %xmm1, -0x1f0(%rbp)
xorl %r13d, %r13d
movq -0x108(%rbp), %r14
movl -0x140(%rbp), %r15d
xorps %xmm3, %xmm3
cvtsi2ss %r13d, %xmm3
movaps %xmm3, %xmm2
movss 0x158bb(%rip), %xmm4    # 0xb500c
divss %xmm4, %xmm2
addss %xmm2, %xmm2
movss 0x271ef(%rip), %xmm0    # 0xc6950
mulss %xmm0, %xmm2
addss -0x200(%rbp), %xmm2
movaps %xmm2, %xmm1
movss %xmm2, -0xb0(%rbp)
movss 0x15864(%rip), %xmm2    # 0xb4fe4
addss %xmm2, %xmm3
divss %xmm4, %xmm3
addss %xmm3, %xmm3
mulss %xmm0, %xmm3
addss -0x1d0(%rbp), %xmm3
movaps %xmm3, %xmm2
movss %xmm3, -0x140(%rbp)
movl 0x20(%r14), %eax
movl %eax, -0x170(%rbp)
movq %r14, %rdi
leaq -0x78(%rbp), %rsi
movaps -0x1f0(%rbp), %xmm0
movl -0x230(%rbp), %edx
callq 0x7724e
movq 0x80(%r14), %rsi
movl 0x78(%r14), %edx
movq %r14, %rdi
movl -0x190(%rbp), %ecx
xorl %r8d, %r8d
movss -0x4c(%rbp), %xmm0
callq 0x76296
movl $0x0, 0x78(%r14)
movl 0x20(%r14), %ebx
movss -0x78(%rbp), %xmm0
movss %xmm0, -0x90(%rbp)
movss -0xb0(%rbp), %xmm0
callq 0xc5d0
mulss -0x70(%rbp), %xmm0
addss -0x90(%rbp), %xmm0
movaps %xmm0, -0x90(%rbp)
movss -0x74(%rbp), %xmm0
movss %xmm0, -0x1b0(%rbp)
movss -0xb0(%rbp), %xmm0
callq 0xc050
mulss -0x70(%rbp), %xmm0
addss -0x1b0(%rbp), %xmm0
movaps -0x90(%rbp), %xmm1
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movaps %xmm1, -0x90(%rbp)
movss -0x78(%rbp), %xmm0
movaps %xmm0, -0xb0(%rbp)
movss -0x140(%rbp), %xmm0
callq 0xc5d0
mulss -0x70(%rbp), %xmm0
movaps -0xb0(%rbp), %xmm1
addss %xmm0, %xmm1
movaps %xmm1, -0xb0(%rbp)
movss -0x74(%rbp), %xmm0
movss %xmm0, -0x1b0(%rbp)
movss -0x140(%rbp), %xmm0
callq 0xc050
mulss -0x70(%rbp), %xmm0
addss -0x1b0(%rbp), %xmm0
movaps -0xb0(%rbp), %xmm1
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movl -0xfc(%rbp,%r13,4), %r12d
incq %r13
movq %r14, %rdi
movl -0x170(%rbp), %esi
movl %ebx, %edx
movaps -0x90(%rbp), %xmm0
movl %r15d, %ecx
movl %r12d, %r8d
callq 0x7ad2a
movl %r12d, %r15d
cmpq $0x6, %r13
jne 0x9f73e
movss -0x2c(%rbp), %xmm0
addss %xmm0, %xmm0
movss 0x27050(%rip), %xmm1    # 0xc6950
mulss %xmm1, %xmm0
callq 0xc5d0
movss %xmm0, -0x70(%rbp)
movss -0x2c(%rbp), %xmm0
addss %xmm0, %xmm0
mulss 0x27031(%rip), %xmm0    # 0xc6950
callq 0xc050
movaps -0x220(%rbp), %xmm2
movaps %xmm2, %xmm3
mulss -0x70(%rbp), %xmm3
movss 0x156c9(%rip), %xmm1    # 0xb5004
mulss %xmm1, %xmm3
addss -0x78(%rbp), %xmm3
movss %xmm0, -0x90(%rbp)
mulss %xmm0, %xmm2
mulss %xmm1, %xmm2
addss -0x74(%rbp), %xmm2
movss %xmm3, -0x118(%rbp)
movss %xmm2, -0x114(%rbp)
cmpb $0x0, -0x48(%rbp)
movl -0x190(%rbp), %r12d
jne 0x9f980
movss 0x1565e(%rip), %xmm1    # 0xb4fdc
jmp 0x9f988
movss 0x15f2c(%rip), %xmm1    # 0xb58b4
movq -0x108(%rbp), %r14
movss -0x4c(%rbp), %xmm0
mulss %xmm1, %xmm0
movss %xmm0, -0x4c(%rbp)
movaps %xmm0, %xmm1
divss 0x31410(%rip), %xmm1    # 0xd0db8
cvttss2si %xmm1, %eax
cmpl $0x20, %eax
movl $0x20, %ecx
cmovll %eax, %ecx
cmpl $0xa, %ecx
movl $0x9, %ebx
cmovgel %ecx, %ebx
leaq -0x118(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
movl -0x1bc(%rbp), %r13d
movl %r13d, %edx
movl %ebx, %ecx
callq 0x79212
movss -0x4c(%rbp), %xmm0
movss 0x155f7(%rip), %xmm1    # 0xb4fe4
addss %xmm1, %xmm0
movq %r14, %rdi
movq %r15, %rsi
movl -0xc8(%rbp), %edx
movl %ebx, %ecx
callq 0x790dc
movq %r14, %rdi
movq %r15, %rsi
movss -0x4c(%rbp), %xmm0
movl %r12d, %edx
movl %ebx, %ecx
movss 0x155c8(%rip), %xmm1    # 0xb4fe4
callq 0x790dc
movss -0xe4(%rbp), %xmm2
movss -0xe0(%rbp), %xmm0
movss -0x90(%rbp), %xmm7
movaps %xmm7, %xmm1
mulss %xmm0, %xmm1
movaps %xmm2, %xmm3
movss -0x70(%rbp), %xmm5
mulss %xmm5, %xmm3
subss %xmm1, %xmm3
mulss %xmm5, %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]
movaps %xmm3, -0xb0(%rbp)
leaq -0x198(%rbp), %rax
movlps %xmm3, (%rax)
movss -0xdc(%rbp), %xmm2
movss -0xd8(%rbp), %xmm3
movaps %xmm7, %xmm4
mulss %xmm3, %xmm4
movaps %xmm2, %xmm6
mulss %xmm5, %xmm6
subss %xmm4, %xmm6
mulss %xmm5, %xmm3
mulss %xmm7, %xmm2
addss %xmm3, %xmm2
addss %xmm1, %xmm6
addss %xmm0, %xmm2
unpcklps %xmm2, %xmm6            # xmm6 = xmm6[0],xmm2[0],xmm6[1],xmm2[1]
movaps %xmm6, -0x140(%rbp)
movq %r14, %rbx
leaq -0x270(%rbp), %r15
movlps %xmm6, (%r15)
movss -0xd4(%rbp), %xmm2
movss -0xd0(%rbp), %xmm3
movaps %xmm7, %xmm4
mulss %xmm3, %xmm4
movaps %xmm2, %xmm6
mulss %xmm5, %xmm6
subss %xmm4, %xmm6
mulss %xmm3, %xmm5
mulss %xmm7, %xmm2
addss %xmm5, %xmm2
addss %xmm1, %xmm6
addss %xmm0, %xmm2
unpcklps %xmm2, %xmm6            # xmm6 = xmm6[0],xmm2[0],xmm6[1],xmm2[1]
movaps %xmm6, -0x70(%rbp)
movl %r12d, %r14d
leaq -0x268(%rbp), %r12
movlps %xmm6, (%r12)
callq 0x5477b
movaps %xmm0, -0x90(%rbp)
movq %rbx, %rdi
movl $0x6, %esi
movl $0x6, %edx
callq 0x75e52
movzwl 0x34(%rbx), %eax
movq 0x50(%rbx), %rcx
movw %ax, (%rcx)
addq $0x2, %rcx
movq %rcx, 0x50(%rbx)
movq 0x48(%rbx), %rax
movaps -0xb0(%rbp), %xmm0
movlps %xmm0, (%rax)
movq 0x48(%rbx), %rax
movaps -0x90(%rbp), %xmm2
movlps %xmm2, 0x8(%rax)
movq 0x48(%rbx), %rax
movl %r13d, 0x10(%rax)
leaq 0x14(%rax), %rcx
movq %rcx, 0x48(%rbx)
movl 0x34(%rbx), %ecx
incl %ecx
movl %ecx, 0x34(%rbx)
movq 0x50(%rbx), %rdx
movw %cx, (%rdx)
addq $0x2, %rdx
movq %rdx, 0x50(%rbx)
movaps -0x140(%rbp), %xmm1
movlps %xmm1, 0x14(%rax)
movq 0x48(%rbx), %rax
movlps %xmm2, 0x8(%rax)
movq 0x48(%rbx), %rax
movl %r13d, 0x10(%rax)
leaq 0x14(%rax), %rcx
movq %rcx, 0x48(%rbx)
movl 0x34(%rbx), %ecx
incl %ecx
movl %ecx, 0x34(%rbx)
movq 0x50(%rbx), %rdx
movw %cx, (%rdx)
addq $0x2, %rdx
movq %rdx, 0x50(%rbx)
movaps -0x70(%rbp), %xmm3
movlps %xmm3, 0x14(%rax)
movq 0x48(%rbx), %rax
movlps %xmm2, 0x8(%rax)
movq 0x48(%rbx), %rax
movl %r14d, 0x10(%rax)
leaq 0x14(%rax), %rcx
movq %rcx, 0x48(%rbx)
movl 0x34(%rbx), %ecx
incl %ecx
movl %ecx, 0x34(%rbx)
movq 0x50(%rbx), %rdx
movw %cx, (%rdx)
addq $0x2, %rdx
movq %rdx, 0x50(%rbx)
movlps %xmm0, 0x14(%rax)
movq 0x48(%rbx), %rax
movlps %xmm2, 0x8(%rax)
movq 0x48(%rbx), %rcx
xorl %eax, %eax
movl %eax, 0x10(%rcx)
leaq 0x14(%rcx), %rdx
movq %rdx, 0x48(%rbx)
movl 0x34(%rbx), %edx
incl %edx
movl %edx, 0x34(%rbx)
movq 0x50(%rbx), %rsi
movw %dx, (%rsi)
addq $0x2, %rsi
movq %rsi, 0x50(%rbx)
movlps %xmm1, 0x14(%rcx)
movq 0x48(%rbx), %rcx
movlps %xmm2, 0x8(%rcx)
movq 0x48(%rbx), %rcx
movq -0x238(%rbp), %rdx
movl %edx, 0x10(%rcx)
leaq 0x14(%rcx), %rdx
movq %rdx, 0x48(%rbx)
movl 0x34(%rbx), %edx
incl %edx
movl %edx, 0x34(%rbx)
movq 0x50(%rbx), %rsi
movw %dx, (%rsi)
addq $0x2, %rsi
movq %rsi, 0x50(%rbx)
movq (%r12), %rdx
movq %rdx, 0x14(%rcx)
movq 0x48(%rbx), %rcx
movlps %xmm2, 0x8(%rcx)
movq 0x48(%rbx), %rcx
movl %eax, 0x10(%rcx)
addq $0x14, %rcx
movq %rcx, 0x48(%rbx)
incl 0x34(%rbx)
movss 0x1b2af(%rip), %xmm0    # 0xbaf48
movq %rbx, %rdi
leaq -0x198(%rbp), %rbx
movq %rbx, %rsi
movq %r15, %rdx
movq %r12, %rcx
movl -0xc8(%rbp), %r8d
callq 0x78cc8
movss -0x30(%rbp), %xmm1
movss 0x1531f(%rip), %xmm6    # 0xb4fe4
movaps %xmm6, %xmm0
minss %xmm1, %xmm0
xorps %xmm2, %xmm2
cmpltss %xmm2, %xmm1
andnps %xmm0, %xmm1
movss (%r12), %xmm3
movss 0x4(%r12), %xmm4
movss (%rbx), %xmm5
movss 0x4(%rbx), %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, -0x148(%rbp)
movq -0x58(%rbp), %r12
movl -0xc4(%rbp), %r15d
cmpb $0x0, -0x44(%rbp)
jne 0x9fd64
movss 0x152aa(%rip), %xmm0    # 0xb500c
jmp 0x9fd6c
movss 0x1529c(%rip), %xmm0    # 0xb5008
movq -0x1b8(%rbp), %r14
movq -0x108(%rbp), %r13
leaq -0x148(%rbp), %rbx
movq %r13, %rdi
movq %rbx, %rsi
movss %xmm0, -0x70(%rbp)
movl %r15d, %edx
movl $0xc, %ecx
callq 0x79212
movss -0x70(%rbp), %xmm0
movss 0x1523e(%rip), %xmm1    # 0xb4fe4
addss %xmm1, %xmm0
movq %r13, %rdi
movq %rbx, %rsi
movl -0xc8(%rbp), %edx
movl $0xc, %ecx
callq 0x790dc
movq %r13, %rdi
movq %rbx, %rsi
movss -0x70(%rbp), %xmm0
movl -0x190(%rbp), %edx
movl $0xc, %ecx
movss 0x15206(%rip), %xmm1    # 0xb4fe4
callq 0x790dc
cmpl $0x10000, -0xcc(%rbp)   # imm = 0x10000
jne 0x9ff5f
movss 0xc(%r12), %xmm2
movaps %xmm2, -0x90(%rbp)
movss 0x151db(%rip), %xmm1    # 0xb4fe4
movaps %xmm1, %xmm0
minss %xmm2, %xmm0
subss %xmm0, %xmm1
movaps %xmm1, -0x70(%rbp)
movss -0x14c(%rbp), %xmm0
movaps -0x130(%rbp), %xmm2
movaps -0x180(%rbp), %xmm3
addss %xmm3, %xmm2
movaps -0xc0(%rbp), %xmm1
addss %xmm0, %xmm1
leaq -0x110(%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 0x15198(%rip), %xmm3    # 0xb5004
mulss %xmm3, %xmm2
xorps %xmm3, %xmm3
xorps %xmm4, %xmm4
movq %r13, %rdi
xorl %esi, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x830fd
movl %r15d, %r9d
andl $0xffffff, %r9d         # imm = 0xFFFFFF
movl %r9d, (%rsp)
leaq -0x118(%rbp), %r14
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl %r15d, %ecx
movl %r15d, %r8d
callq 0x78668
movaps -0x90(%rbp), %xmm2
cmpltss 0x15986(%rip), %xmm2    # 0xb5844
movaps %xmm2, %xmm0
andnps -0x70(%rbp), %xmm0
movss 0x15117(%rip), %xmm1    # 0xb4fe4
andps %xmm1, %xmm2
orps %xmm0, %xmm2
mulss -0xc0(%rbp), %xmm2
addss -0x14c(%rbp), %xmm2
addss 0x15119(%rip), %xmm2    # 0xb5004
cvttps2dq %xmm2, %xmm0
cvtdq2ps %xmm0, %xmm0
movaps %xmm0, -0x70(%rbp)
movsd (%r14), %xmm0
movsd 0x8(%r14), %xmm1
movq -0x1b8(%rbp), %r14
xorps %xmm2, %xmm2
callq 0x450e0
movaps -0x180(%rbp), %xmm0
addss 0x150b1(%rip), %xmm0    # 0xb4fd0
unpcklps -0x70(%rbp), %xmm0      # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
movaps -0x250(%rbp), %xmm4
movaps %xmm4, %xmm1
movss 0x150af(%rip), %xmm2    # 0xb4fe4
addss %xmm2, %xmm1
movaps -0x130(%rbp), %xmm2
addss 0x15920(%rip), %xmm2    # 0xb5868
movq -0x40(%rbp), %rax
movss 0x1560(%rax), %xmm3
unpcklps %xmm4, %xmm1            # xmm1 = xmm1[0],xmm4[0],xmm1[1],xmm4[1]
movq %r13, %rdi
callq 0xa02a9
callq 0x55617
movl -0x160(%rbp), %ebx
testb %bl, %bl
je 0x9ff8c
leaq -0x260(%rbp), %rdi
movq %r12, %rsi
movq -0x208(%rbp), %rdx
callq 0xc5b0
testl %eax, %eax
movzbl %bl, %ebx
cmovel %eax, %ebx
testb $0x1, %bl
je 0x9ff9d
movl 0x124(%r14), %edi
callq 0x4618e
callq 0x55082
andb $0x1, %bl
movl %ebx, %eax
addq $0x258, %rsp            # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3255c(%rip), %rdi     # 0xd251c
leaq 0x31051(%rip), %rsi     # 0xd1018
leaq 0x32586(%rip), %rcx     # 0xd2554
movl $0x1337, %edx           # imm = 0x1337
callq 0xc140
leaq 0x32451(%rip), %rdi     # 0xd2430
leaq 0x31032(%rip), %rsi     # 0xd1018
leaq 0x32567(%rip), %rcx     # 0xd2554
movl $0x1338, %edx           # imm = 0x1338
callq 0xc140