// File: /workspace/github_cpp_makefile_star2_O1/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 $0x1f8, %rsp            # imm = 0x1F8
leaq 0x5e014(%rip), %rax     # 0xfdcd0
movq (%rax), %r15
movq 0x1ae0(%r15), %r14
movb $0x1, 0x90(%r14)
cmpb $0x0, 0x93(%r14)
je 0x9fcdf
xorl %ebx, %ebx
jmp 0xa18ff
movl %edx, %ebx
movq %rsi, %r12
movq %rdi, %r13
movq %rcx, -0xa8(%rbp)
movq 0x2b8(%r14), %rax
movq %rax, -0x148(%rbp)
callq 0x57252
movaps %xmm0, -0x70(%rbp)
movq %r15, -0x40(%rbp)
movl $0x0, 0x1bf8(%r15)
movq %r13, -0x120(%rbp)
movq %r13, %rdi
callq 0x55c36
callq 0x5752d
movl %ebx, %r13d
notl %r13d
shrl $0x4, %r13d
andl $0x10, %r13d
orl %ebx, %r13d
testb $0x8, %bl
jne 0x9fd49
movq %r12, %rdi
movl %r13d, %esi
callq 0xa19b9
testl $0x6000000, %ebx        # imm = 0x6000000
jne 0x9fd6b
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 0x9fd8e
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 0xa1916
movl %r13d, %eax
andl $0x18000000, %eax       # imm = 0x18000000
leal -0x1(%rax), %ecx
xorl %ecx, %eax
cmpl %ecx, %eax
jbe 0xa1935
testb $0x8, %r13b
movq %r12, -0x80(%rbp)
jne 0x9fdd7
movl $0x10000, %eax          # imm = 0x10000
movq -0x40(%rbp), %r15
andl 0x306c(%r15), %eax
orl %eax, %r13d
jmp 0x9fddb
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 0xd8(%r14), %rax
movq %rax, -0x58(%rbp)
callq 0x57404
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, %xmm4
movaps %xmm0, %xmm1
movaps %xmm0, -0x140(%rbp)
cmpless %xmm0, %xmm4
movaps %xmm4, %xmm0
andnps %xmm3, %xmm0
andps %xmm1, %xmm4
orps %xmm0, %xmm4
movaps %xmm4, -0xc0(%rbp)
movss -0x58(%rbp), %xmm0
movss %xmm0, -0x70(%rbp)
addss %xmm4, %xmm0
movaps %xmm2, -0x160(%rbp)
addss %xmm2, %xmm0
movaps %xmm0, -0xa0(%rbp)
leaq 0xc(,%rbx,4), %rdx
leaq -0x210(%rbp), %rdi
movq -0x80(%rbp), %r12
movq %r12, %rsi
movq %rdx, -0x190(%rbp)
callq 0xc080
movss 0x3302f(%rip), %xmm0    # 0xd2ed0
movaps -0xc0(%rbp), %xmm4
mulss %xmm4, %xmm0
movss 0x17150(%rip), %xmm1    # 0xb7004
movaps %xmm4, %xmm2
mulss %xmm1, %xmm2
movaps %xmm2, %xmm3
movss %xmm0, -0x5c(%rbp)
subss %xmm0, %xmm3
movaps -0x140(%rbp), %xmm0
addss %xmm4, %xmm0
mulss %xmm1, %xmm0
addss -0x70(%rbp), %xmm0
movss -0x54(%rbp), %xmm1
movaps %xmm2, -0x1b0(%rbp)
addss %xmm2, %xmm1
movss %xmm0, -0x78(%rbp)
movss %xmm1, -0x74(%rbp)
movaps %xmm4, %xmm0
mulss 0x32fd4(%rip), %xmm0    # 0xd2ed4
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 0x17998(%rip), %xmm0    # 0xb78c4
mulss %xmm1, %xmm0
movss 0x32fa0(%rip), %xmm2    # 0xd2ed8
mulss %xmm1, %xmm2
movss %xmm0, -0xdc(%rbp)
movss %xmm2, -0xd8(%rbp)
mulss 0x32f88(%rip), %xmm1    # 0xd2edc
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, -0x38(%rbp)
movss %xmm0, -0x90(%rbp)
movss %xmm1, -0x8c(%rbp)
movss %xmm2, -0x88(%rbp)
btl $0x1b, %r13d
jb 0x9ffcd
btl $0x1c, %r13d
jae 0xa0037
leaq -0x90(%rbp), %rdi
leaq -0x8c(%rbp), %rsi
leaq -0x88(%rbp), %rdx
callq 0x42fe6
jmp 0xa0037
leaq -0x2c(%rbp), %rdi
leaq -0x30(%rbp), %rsi
leaq -0x38(%rbp), %rdx
callq 0x42f4a
movq 0x3078(%r15), %rax
xorq (%r12), %rax
movl 0x3080(%r15), %ecx
xorl 0x8(%r12), %ecx
orq %rax, %rcx
jne 0xa0037
movss -0x30(%rbp), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm1
jne 0xa001a
jp 0xa001a
movq -0x40(%rbp), %rax
movss 0x3070(%rax), %xmm1
movss %xmm1, -0x2c(%rbp)
movss -0x38(%rbp), %xmm1
ucomiss %xmm0, %xmm1
jne 0xa0037
jp 0xa0037
movq -0x40(%rbp), %rax
movss 0x3074(%rax), %xmm0
movss %xmm0, -0x30(%rbp)
movaps -0x140(%rbp), %xmm0
addss -0xa0(%rbp), %xmm0
movaps %xmm0, -0x110(%rbp)
movl $0x8, %edi
movl $0x1, %esi
callq 0x54e0c
btl $0x1a, %r13d
jb 0xa008f
btl $0x19, %r13d
movaps -0xc0(%rbp), %xmm2
jb 0xa019b
movl $0x0, -0x48(%rbp)
movl $0x0, -0x44(%rbp)
movl $0x0, -0x34(%rbp)
jmp 0xa054c
movq -0x40(%rbp), %rax
movss 0x15b0(%rax), %xmm0
movaps -0xc0(%rbp), %xmm1
addss %xmm1, %xmm0
addss -0x140(%rbp), %xmm0
leaq -0x100(%rbp), %rsi
movss %xmm0, (%rsi)
movss %xmm1, 0x4(%rsi)
leaq 0x3465c(%rip), %rdi     # 0xd4721
movl $0x0, -0x48(%rbp)
xorl %edx, %edx
callq 0x93187
callq 0x529d2
movl $0x0, -0x44(%rbp)
movl $0x0, -0x34(%rbp)
testb %al, %al
je 0xa0535
movq -0x40(%rbp), %rax
movss 0x3cc(%rax), %xmm4
movss -0x78(%rbp), %xmm3
movss -0x74(%rbp), %xmm2
subss %xmm3, %xmm4
movss 0x3d0(%rax), %xmm5
subss %xmm2, %xmm5
movss 0x128(%rax), %xmm1
movss 0x12c(%rax), %xmm0
subss %xmm3, %xmm1
subss %xmm2, %xmm0
movss %xmm5, -0x84(%rbp)
movaps %xmm5, %xmm2
mulss %xmm5, %xmm2
movaps %xmm4, -0x1e0(%rbp)
movaps %xmm4, %xmm3
mulss %xmm4, %xmm3
addss %xmm2, %xmm3
movss 0x16e7b(%rip), %xmm2    # 0xb6fd0
addss -0x70(%rbp), %xmm2
mulss %xmm2, %xmm2
ucomiss %xmm2, %xmm3
movaps %xmm1, -0x1d0(%rbp)
movss %xmm0, -0x1c0(%rbp)
jb 0xa018f
movss 0x16e6a(%rip), %xmm2    # 0xb6fe4
addss -0x1b0(%rbp), %xmm2
mulss %xmm2, %xmm2
ucomiss %xmm3, %xmm2
jae 0xa0313
movl $0x0, -0x44(%rbp)
jmp 0xa0352
leaq -0x100(%rbp), %rsi
movss %xmm2, (%rsi)
movss %xmm2, 0x4(%rsi)
leaq 0x34570(%rip), %rdi     # 0xd4722
movl $0x0, -0x48(%rbp)
xorl %edx, %edx
callq 0x93187
callq 0x529d2
testb %al, %al
je 0xa0244
movq -0x40(%rbp), %rax
movss 0x128(%rax), %xmm0
subss -0x58(%rbp), %xmm0
movss 0x16dee(%rip), %xmm1    # 0xb6fd0
addss -0xc0(%rbp), %xmm1
divss %xmm1, %xmm0
movss 0x16dee(%rip), %xmm2    # 0xb6fe4
movaps %xmm2, %xmm3
minss %xmm0, %xmm3
xorps %xmm4, %xmm4
cmpltss %xmm4, %xmm0
andnps %xmm3, %xmm0
movss %xmm0, -0x30(%rbp)
movss 0x12c(%rax), %xmm0
subss -0x54(%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, -0x38(%rbp)
movb $0x1, %al
movl %eax, -0x48(%rbp)
testb $0x8, %r13b
jne 0xa025b
leaq 0x1a038(%rip), %rdi     # 0xba289
movl $0x1, %esi
callq 0x586a5
movss -0x54(%rbp), %xmm0
leaq -0x100(%rbp), %rbx
movaps -0xa0(%rbp), %xmm1
movss %xmm1, (%rbx)
movss %xmm0, 0x4(%rbx)
movq %rbx, %rdi
callq 0x56ace
movaps -0x140(%rbp), %xmm0
movss %xmm0, (%rbx)
movaps -0xc0(%rbp), %xmm0
movss %xmm0, 0x4(%rbx)
leaq 0x3445e(%rip), %rdi     # 0xd46fb
leaq -0x100(%rbp), %rsi
movl $0x0, -0x44(%rbp)
xorl %edx, %edx
callq 0x93187
callq 0x529d2
testb %al, %al
je 0xa0308
movq -0x40(%rbp), %rax
movss 0x12c(%rax), %xmm0
subss -0x54(%rbp), %xmm0
movss 0x16cfc(%rip), %xmm1    # 0xb6fd0
movaps -0xc0(%rbp), %xmm3
addss %xmm3, %xmm1
divss %xmm1, %xmm0
movss 0x16cf9(%rip), %xmm1    # 0xb6fe4
minss %xmm0, %xmm1
xorps %xmm2, %xmm2
cmpltss %xmm2, %xmm0
andnps %xmm1, %xmm0
movss %xmm0, -0x2c(%rbp)
movb $0x1, %al
movl %eax, -0x44(%rbp)
movb $0x1, %al
jmp 0xa030b
movl -0x48(%rbp), %eax
movl %eax, -0x34(%rbp)
jmp 0xa054c
callq 0xc240
divss 0x28660(%rip), %xmm0    # 0xc8980
mulss 0x16cdc(%rip), %xmm0    # 0xb7004
movss 0x16cb4(%rip), %xmm1    # 0xb6fe4
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, -0x44(%rbp)
movss -0x2c(%rbp), %xmm0
mulss 0x1752d(%rip), %xmm0    # 0xb788c
mulss 0x28619(%rip), %xmm0    # 0xc8980
callq 0xc5d0
movss %xmm0, -0x4c(%rbp)
movss 0x17513(%rip), %xmm0    # 0xb788c
mulss -0x2c(%rbp), %xmm0
mulss 0x285fa(%rip), %xmm0    # 0xc8980
callq 0xc050
movaps %xmm0, %xmm4
movss -0x84(%rbp), %xmm3
mulss %xmm3, %xmm4
movaps -0x1e0(%rbp), %xmm2
movaps %xmm2, %xmm1
movss -0x4c(%rbp), %xmm5
mulss %xmm5, %xmm1
subss %xmm4, %xmm1
mulss %xmm5, %xmm3
movss %xmm0, -0x84(%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 0x4200e
testb %al, %al
je 0xa0528
movss -0x84(%rbp), %xmm5
movaps %xmm5, %xmm0
movss -0x1c0(%rbp), %xmm3
mulss %xmm3, %xmm0
movaps -0x1d0(%rbp), %xmm2
movaps %xmm2, %xmm1
movss -0x4c(%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 0x4200e
testb %al, %al
jne 0xa0480
leaq -0xe4(%rbp), %rdi
leaq -0xdc(%rbp), %rsi
leaq -0xd4(%rbp), %rdx
leaq -0x100(%rbp), %rbx
movq %rbx, %rcx
callq 0x42168
movlps %xmm0, (%rbx)
leaq -0x150(%rbp), %rax
movq %rax, (%rsp)
leaq -0xe4(%rbp), %rdi
leaq -0xdc(%rbp), %rsi
leaq -0xd4(%rbp), %rdx
leaq -0x100(%rbp), %rcx
leaq -0x184(%rbp), %rbx
leaq -0x130(%rbp), %r12
movq %rbx, %r8
movq %r12, %r9
callq 0x420d4
movss 0x16b1c(%rip), %xmm0    # 0xb6fe4
movaps %xmm0, %xmm1
subss (%r12), %xmm1
movaps %xmm0, %xmm2
minss %xmm1, %xmm2
movss 0x173ec(%rip), %xmm3    # 0xb78cc
cmpltss %xmm3, %xmm1
movaps %xmm1, %xmm4
andnps %xmm2, %xmm4
andps %xmm3, %xmm1
orps %xmm4, %xmm1
movss %xmm1, -0x38(%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, -0x48(%rbp)
movb $0x1, %al
movl %eax, -0x34(%rbp)
movq -0x80(%rbp), %r12
jmp 0xa0535
movl $0x0, -0x48(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x34(%rbp)
testb $0x8, %r13b
jne 0xa054c
leaq 0x19d47(%rip), %rdi     # 0xba289
movl $0x1, %esi
callq 0x586a5
movaps -0x160(%rbp), %xmm1
movaps -0x110(%rbp), %xmm0
addss %xmm0, %xmm1
cmpl $0x10000, -0xcc(%rbp)   # imm = 0x10000
movaps %xmm1, -0x160(%rbp)
jne 0xa061f
movss -0x54(%rbp), %xmm0
leaq -0x100(%rbp), %rbx
movss %xmm1, (%rbx)
movss %xmm0, 0x4(%rbx)
movq %rbx, %rdi
callq 0x56ace
movaps -0x140(%rbp), %xmm0
movss %xmm0, (%rbx)
movaps -0xc0(%rbp), %xmm0
movss %xmm0, 0x4(%rbx)
leaq 0x3414f(%rip), %rdi     # 0xd46ff
leaq -0x100(%rbp), %rsi
xorl %edx, %edx
callq 0x93187
callq 0x529d2
testb %al, %al
je 0xa061f
movq -0x40(%rbp), %rax
movss 0x12c(%rax), %xmm0
subss -0x54(%rbp), %xmm0
movss 0x169f0(%rip), %xmm1    # 0xb6fd0
addss -0xc0(%rbp), %xmm1
divss %xmm1, %xmm0
movss 0x169f0(%rip), %xmm1    # 0xb6fe4
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, %al
movl %eax, -0x34(%rbp)
callq 0x54f76
btl $0x8, %r13d
jb 0xa0644
movq -0x40(%rbp), %rax
movss 0x15b0(%rax), %xmm1
xorps %xmm0, %xmm0
callq 0x569e1
callq 0x5752d
testb %r13b, %r13b
js 0xa068e
movq -0x120(%rbp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x44e8b
cmpq %r15, %rax
je 0xa068e
movq %rax, %rbx
btl $0x8, %r13d
jae 0xa067d
movq -0x40(%rbp), %rax
movss 0x15b0(%rax), %xmm1
xorps %xmm0, %xmm0
callq 0x569e1
movq -0x120(%rbp), %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x91b8c
btl $0x8, %r13d
jb 0xa07e6
movl $0x10, %edi
movl $0x1, %esi
callq 0x54e0c
movss (%r12), %xmm0
movss 0x4(%r12), %xmm1
movss 0x8(%r12), %xmm2
testb $0x2, %r13b
jne 0xa06cb
movss 0xc(%r12), %xmm3
jmp 0xa06d3
movss 0x16911(%rip), %xmm3    # 0xb6fe4
movss %xmm0, -0x100(%rbp)
movss %xmm1, -0xfc(%rbp)
movss %xmm2, -0xf8(%rbp)
movss %xmm3, -0xf4(%rbp)
testb %r13b, %r13b
jns 0xa0706
leaq 0x206ac(%rip), %rdi     # 0xc0dab
xorl %eax, %eax
callq 0x92024
movl %r13d, %ebx
andl $0x180e0040, %ebx       # imm = 0x180E0040
movss 0x168d9(%rip), %xmm1    # 0xb6ff0
movaps -0x140(%rbp), %xmm0
mulss %xmm0, %xmm1
addss %xmm0, %xmm0
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
leaq 0x20683(%rip), %rdi     # 0xc0db3
leaq -0x100(%rbp), %rsi
movl %ebx, %edx
movaps %xmm1, -0x120(%rbp)
movaps %xmm1, %xmm0
callq 0x9f744
cmpq $0x0, -0xa8(%rbp)
je 0xa07dc
leaq 0x33fa8(%rip), %rdi     # 0xd4705
xorl %eax, %eax
callq 0x92024
movq -0xa8(%rbp), %rax
movss (%rax), %xmm0
movss 0x4(%rax), %xmm1
movss 0x8(%rax), %xmm2
testb $0x2, %r13b
jne 0xa0786
movss 0xc(%rax), %xmm3
jmp 0xa078e
movss 0x16856(%rip), %xmm3    # 0xb6fe4
leaq -0x184(%rbp), %rsi
movss %xmm0, (%rsi)
movss %xmm1, 0x4(%rsi)
movss %xmm2, 0x8(%rsi)
movss %xmm3, 0xc(%rsi)
leaq 0x33f5f(%rip), %rdi     # 0xd470e
movl %ebx, %edx
movaps -0x120(%rbp), %xmm0
callq 0x9f744
testb %al, %al
je 0xa07dc
movq %r12, %rdi
movq -0xa8(%rbp), %rsi
movq -0x190(%rbp), %rdx
callq 0xc080
movb $0x1, %al
movl %eax, -0x34(%rbp)
callq 0x54f76
callq 0x56723
leaq 0x4(%r12), %r15
leaq 0x8(%r12), %rbx
cmpb $0x0, -0x44(%rbp)
movaps -0x140(%rbp), %xmm1
movaps -0xa0(%rbp), %xmm2
jne 0xa080e
cmpb $0x0, -0x48(%rbp)
je 0xa08fb
btl $0x1b, %r13d
jb 0xa0848
btl $0x1c, %r13d
jae 0xa08fb
movss -0x2c(%rbp), %xmm0
movss %xmm0, (%r12)
movss -0x30(%rbp), %xmm0
movss %xmm0, 0x4(%r12)
movss -0x38(%rbp), %xmm0
movss %xmm0, 0x8(%r12)
jmp 0xa08fb
movss -0x2c(%rbp), %xmm1
movss 0x3268b(%rip), %xmm2    # 0xd2ee0
addss %xmm1, %xmm2
movss 0x16783(%rip), %xmm0    # 0xb6fe4
cmpless %xmm1, %xmm0
andps %xmm0, %xmm2
andnps %xmm1, %xmm0
orps %xmm2, %xmm0
movss -0x30(%rbp), %xmm3
xorps %xmm2, %xmm2
xorps %xmm1, %xmm1
cmpltss %xmm3, %xmm1
andps %xmm1, %xmm3
movss 0x1700e(%rip), %xmm4    # 0xb7898
andnps %xmm4, %xmm1
orps %xmm3, %xmm1
movss -0x38(%rbp), %xmm3
cmpltss %xmm3, %xmm2
andps %xmm2, %xmm3
movss 0x32613(%rip), %xmm4    # 0xd2eb8
andnps %xmm4, %xmm2
orps %xmm3, %xmm2
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x42fe6
movaps -0xa0(%rbp), %xmm2
movaps -0x140(%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)
movq %r15, -0xa8(%rbp)
movq %rbx, %r15
movss 0x166f3(%rip), %xmm0    # 0xb7000
mulss %xmm1, %xmm0
movb $0x1, %bl
testb $0x20, %r13b
jne 0xa0a1c
movaps %xmm0, -0x120(%rbp)
movaps -0x160(%rbp), %xmm0
cmpl $0x10000, -0xcc(%rbp)   # imm = 0x10000
je 0xa093a
movaps %xmm2, %xmm0
addss %xmm1, %xmm0
subss -0x58(%rbp), %xmm0
callq 0x56dd7
movl %r13d, %r12d
andl $0x198e001a, %r12d      # imm = 0x198E001A
btl $0x14, %r13d
setae %al
testl $0x600000, %r13d        # imm = 0x600000
setne %cl
testb %cl, %al
jne 0xa099d
movl %r12d, %edx
orl $0x100004, %edx         # imm = 0x100004
leaq 0x33da1(%rip), %rdi     # 0xd4719
movq -0x80(%rbp), %rsi
callq 0x9e6b7
testb %al, %al
je 0xa099d
movb $0x1, %al
movl %eax, -0x34(%rbp)
movq -0x40(%rbp), %rax
cmpl $0x0, 0x1b30(%rax)
je 0xa099d
movb 0x1b3d(%rax), %bl
btl $0x15, %r13d
setae %al
testl $0x500000, %r13d        # imm = 0x500000
setne %cl
testb %cl, %al
jne 0xa09d4
movl %r12d, %edx
orl $0x200004, %edx         # imm = 0x200004
leaq 0x33d5c(%rip), %rdi     # 0xd471f
movq -0x80(%rbp), %rsi
callq 0x9e6b7
movl -0x34(%rbp), %ecx
orb %al, %cl
movl %ecx, -0x34(%rbp)
btl $0x16, %r13d
setae %al
testl $0x300000, %r13d        # imm = 0x300000
setne %cl
testb %cl, %al
jne 0xa0a0c
orl $0x400004, %r12d        # imm = 0x400004
leaq 0x33d2d(%rip), %rdi     # 0xd4725
movq -0x80(%rbp), %rsi
movl %r12d, %edx
callq 0x9e6b7
movl -0x34(%rbp), %ecx
orb %al, %cl
movl %ecx, -0x34(%rbp)
callq 0x571b8
movq -0x80(%rbp), %r12
movaps -0x120(%rbp), %xmm0
cvttps2dq %xmm0, %xmm0
btl $0x1b, %r13d
jae 0xa0ade
testb %bl, %bl
jne 0xa0ade
movaps %xmm0, -0x120(%rbp)
movss (%r12), %xmm0
movss 0x4(%r12), %xmm1
movss 0x8(%r12), %xmm2
leaq -0x100(%rbp), %r12
leaq -0x184(%rbp), %rsi
leaq -0x130(%rbp), %rdx
movq %r12, %rdi
callq 0x42f4a
xorps %xmm1, %xmm1
ucomiss (%r12), %xmm1
movq -0xa8(%rbp), %rsi
jb 0xa0ad3
movss -0x2c(%rbp), %xmm0
ucomiss %xmm1, %xmm0
jbe 0xa0ad3
movss -0x130(%rbp), %xmm2
ucomiss %xmm2, %xmm1
jb 0xa0ab1
movss -0x38(%rbp), %xmm3
ucomiss %xmm2, %xmm3
jne 0xa0a9f
jnp 0xa0ab1
movss -0x30(%rbp), %xmm1
mulss 0x16558(%rip), %xmm3    # 0xb7004
movaps %xmm3, %xmm2
jmp 0xa0ac7
ucomiss -0x184(%rbp), %xmm1
jb 0xa0ad3
movss -0x30(%rbp), %xmm1
mulss 0x1653d(%rip), %xmm1    # 0xb7004
movq -0x80(%rbp), %rdi
movq %r15, %rdx
callq 0x42fe6
movq -0x80(%rbp), %r12
movaps -0x120(%rbp), %xmm0
cvtdq2ps %xmm0, %xmm0
movaps %xmm0, -0x200(%rbp)
cmpb $0x0, -0x34(%rbp)
je 0xa0bdf
btl $0x1b, %r13d
jb 0xa0b46
btl $0x1c, %r13d
jae 0xa0bdf
movss (%r12), %xmm0
movss %xmm0, -0x2c(%rbp)
movss 0x4(%r12), %xmm1
movss %xmm1, -0x30(%rbp)
movss 0x8(%r12), %xmm2
movss %xmm2, -0x38(%rbp)
leaq -0x90(%rbp), %rdi
leaq -0x8c(%rbp), %rsi
leaq -0x88(%rbp), %rdx
callq 0x42fe6
jmp 0xa0bdf
movss (%r12), %xmm0
movss %xmm0, -0x90(%rbp)
movss 0x4(%r12), %xmm1
movss %xmm1, -0x8c(%rbp)
movss 0x8(%r12), %xmm2
movss %xmm2, -0x88(%rbp)
leaq -0x2c(%rbp), %rdi
leaq -0x30(%rbp), %rsi
leaq -0x38(%rbp), %rdx
callq 0x42f4a
movq -0x40(%rbp), %rcx
movq 0x3078(%rcx), %rax
xorq (%r12), %rax
movl 0x3080(%rcx), %ecx
xorl 0x8(%r12), %ecx
orq %rax, %rcx
jne 0xa0bdf
movss -0x30(%rbp), %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm1
jne 0xa0bc2
jp 0xa0bc2
movq -0x40(%rbp), %rax
movss 0x3070(%rax), %xmm1
movss %xmm1, -0x2c(%rbp)
movss -0x38(%rbp), %xmm1
ucomiss %xmm0, %xmm1
jne 0xa0bdf
jp 0xa0bdf
movq -0x40(%rbp), %rax
movss 0x3074(%rax), %xmm0
movss %xmm0, -0x30(%rbp)
movq -0x40(%rbp), %r15
movss 0x1560(%r15), %xmm0
movss 0x163f0(%rip), %xmm1    # 0xb6fe4
movaps %xmm1, %xmm2
minss %xmm0, %xmm2
xorps %xmm3, %xmm3
movaps %xmm0, %xmm4
cmpltss %xmm3, %xmm4
andnps %xmm2, %xmm4
mulss 0x16c37(%rip), %xmm4    # 0xb7848
addss 0x163eb(%rip), %xmm4    # 0xb7004
movabsq $0x3f8000003f800000, %rax # imm = 0x3F8000003F800000
leaq -0x180(%rbp), %rsi
movq %rax, -0x4(%rsi)
leaq -0x17c(%rbp), %rdx
movl $0x3f800000, (%rdx)     # imm = 0x3F800000
movss %xmm0, 0x4(%rdx)
cvttss2si %xmm4, %r9d
shll $0x18, %r9d
leal 0xff0000(%r9), %eax
leal 0xffff00(%r9), %ecx
leal 0xffffff(%r9), %edi
movl %edi, -0x4c(%rbp)
leal 0xff(%r9), %edi
movl %edi, -0x100(%rbp)
leal 0xffff(%r9), %r8d
movl %r8d, -0xfc(%rbp)
leal 0xff00(%r9), %r8d
movl %r8d, -0xf8(%rbp)
leal 0x808080(%r9), %r8d
movl %r8d, -0xc8(%rbp)
movl %ecx, -0xf4(%rbp)
movl %eax, -0xf0(%rbp)
movq %r9, -0x198(%rbp)
leal 0xff00ff(%r9), %eax
movl %eax, -0xec(%rbp)
movl %edi, -0xe8(%rbp)
movss -0x2c(%rbp), %xmm0
leaq -0x184(%rbp), %rbx
movaps %xmm1, %xmm2
movq %rbx, %rdi
callq 0x42fe6
movq %rbx, %rdi
callq 0x42e9e
movl %eax, %ebx
movss -0x90(%rbp), %xmm0
movss -0x8c(%rbp), %xmm1
movss -0x88(%rbp), %xmm2
movss 0x1560(%r15), %xmm3
leaq -0x130(%rbp), %rdi
movss %xmm0, (%rdi)
movss %xmm1, 0x4(%rdi)
movss %xmm2, 0x8(%rdi)
movss %xmm3, 0xc(%rdi)
callq 0x42e9e
movl %eax, %r15d
btl $0x1a, %r13d
movq $0x0, -0x150(%rbp)
jb 0xa103c
btl $0x19, %r13d
jae 0xa16c5
movl %r15d, -0xc4(%rbp)
movq %r14, -0x170(%rbp)
movl %ebx, %r8d
leaq -0x58(%rbp), %rbx
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]
leaq -0x130(%rbp), %r13
movlps %xmm0, (%r13)
movl -0x4c(%rbp), %ecx
movl %ecx, (%rsp)
movq -0x148(%rbp), %r12
movq %r12, %rdi
movq %rbx, %rsi
movq %r13, %rdx
movl %r8d, %r9d
callq 0x79dcc
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]
movlps %xmm0, (%r13)
movq -0x198(%rbp), %r9
movl %r9d, (%rsp)
leaq -0x130(%rbp), %rdx
xorl %r15d, %r15d
movq %r12, %rdi
movq %rbx, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x79dcc
movsd (%rbx), %xmm0
movss (%rbx), %xmm1
movaps -0xc0(%rbp), %xmm3
addss %xmm3, %xmm1
movss 0x4(%rbx), %xmm2
addss %xmm3, %xmm2
unpcklps %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
xorps %xmm2, %xmm2
callq 0x45b5c
movss -0x30(%rbp), %xmm1
movss 0x161cd(%rip), %xmm9    # 0xb6fe4
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 0x161b8(%rip), %xmm7    # 0xb7004
addss %xmm7, %xmm1
cvttps2dq %xmm1, %xmm1
cvtdq2ps %xmm1, %xmm4
movss 0x16a09(%rip), %xmm1    # 0xb7868
movaps %xmm2, %xmm5
movaps %xmm2, %xmm8
addss %xmm3, %xmm5
addss %xmm1, %xmm3
movss 0x16a16(%rip), %xmm2    # 0xb788c
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 -0x38(%rbp), %xmm3
movss %xmm4, -0x150(%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, -0x14c(%rbp)
divss 0x16114(%rip), %xmm8    # 0xb700c
movss %xmm8, -0x70(%rbp)
leaq -0x168(%rbp), %rbx
xorps %xmm0, %xmm0
cvtsi2ss %r15d, %xmm0
movss -0x54(%rbp), %xmm1
movss -0x70(%rbp), %xmm4
mulss %xmm4, %xmm0
addss %xmm1, %xmm0
leaq 0x1(%r15), %r14
xorps %xmm2, %xmm2
cvtsi2ss %r14d, %xmm2
movaps -0xa0(%rbp), %xmm3
movss %xmm3, -0x130(%rbp)
movss %xmm0, -0x12c(%rbp)
mulss %xmm4, %xmm2
addss %xmm1, %xmm2
movaps -0x110(%rbp), %xmm0
movss %xmm0, -0x168(%rbp)
movss %xmm2, -0x164(%rbp)
movl -0x100(%rbp,%r15,4), %ecx
movl -0xfc(%rbp,%r15,4), %r9d
movl %r9d, (%rsp)
movq %r12, %rdi
movq %r13, %rsi
movq %rbx, %rdx
movl %ecx, %r8d
callq 0x79dcc
movq %r14, %r15
cmpq $0x6, %r14
jne 0xa0f05
movss -0x54(%rbp), %xmm1
movss -0x2c(%rbp), %xmm0
movaps -0xc0(%rbp), %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
addss 0x16050(%rip), %xmm0    # 0xb7004
cvttps2dq %xmm0, %xmm0
cvtdq2ps %xmm0, %xmm0
movaps %xmm0, -0x70(%rbp)
addss %xmm1, %xmm2
movaps -0xa0(%rbp), %xmm0
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movaps -0x110(%rbp), %xmm1
unpcklps %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
xorps %xmm2, %xmm2
callq 0x45b5c
movaps -0xa0(%rbp), %xmm0
addss 0x15fe2(%rip), %xmm0    # 0xb6fd0
unpcklps -0x70(%rbp), %xmm0      # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
movss 0x15fea(%rip), %xmm1    # 0xb6fe4
movaps -0x200(%rbp), %xmm4
addss %xmm4, %xmm1
movss 0x1685b(%rip), %xmm2    # 0xb7868
addss -0x140(%rbp), %xmm2
movq -0x40(%rbp), %rax
movss 0x1560(%rax), %xmm3
unpcklps %xmm4, %xmm1            # xmm1 = xmm1[0],xmm4[0],xmm1[1],xmm4[1]
movq %r12, %rdi
callq 0xa1bf3
movq -0x170(%rbp), %r14
movq -0x80(%rbp), %r12
jmp 0xa16be
movl %ebx, -0x174(%rbp)
movl %r15d, -0xc4(%rbp)
movq %r14, -0x170(%rbp)
movss 0x15fac(%rip), %xmm0    # 0xb7004
movaps %xmm0, %xmm2
movaps -0x1b0(%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, -0x84(%rbp)
movaps 0x15f28(%rip), %xmm3    # 0xb6fc0
movaps %xmm2, -0x1e0(%rbp)
xorps %xmm2, %xmm3
movaps %xmm3, -0x1d0(%rbp)
addss -0x70(%rbp), %xmm1
movaps %xmm1, -0x1b0(%rbp)
mulss %xmm0, %xmm1
movaps %xmm1, -0x1c0(%rbp)
xorl %r14d, %r14d
movq -0x148(%rbp), %r13
xorps %xmm3, %xmm3
cvtsi2ss %r14d, %xmm3
movaps %xmm3, %xmm2
movss 0x15f2f(%rip), %xmm4    # 0xb700c
divss %xmm4, %xmm2
addss %xmm2, %xmm2
movss 0x27893(%rip), %xmm0    # 0xc8980
mulss %xmm0, %xmm2
addss -0x1d0(%rbp), %xmm2
movaps %xmm2, %xmm1
movss %xmm2, -0x110(%rbp)
movss 0x15ed8(%rip), %xmm2    # 0xb6fe4
addss %xmm2, %xmm3
divss %xmm4, %xmm3
addss %xmm3, %xmm3
mulss %xmm0, %xmm3
addss -0x1e0(%rbp), %xmm3
movaps %xmm3, %xmm2
movss %xmm3, -0xa8(%rbp)
movl 0x20(%r13), %ebx
movq %r13, %rdi
leaq -0x78(%rbp), %rsi
movaps -0x1c0(%rbp), %xmm0
movl -0x84(%rbp), %edx
callq 0x789ee
movq 0x80(%r13), %rsi
movl 0x78(%r13), %edx
movq %r13, %rdi
movl -0x4c(%rbp), %ecx
xorl %r8d, %r8d
movss -0x5c(%rbp), %xmm0
callq 0x77886
movl $0x0, 0x78(%r13)
movl 0x20(%r13), %r15d
movss -0x78(%rbp), %xmm0
movss %xmm0, -0xa0(%rbp)
movss -0x110(%rbp), %xmm0
callq 0xc5d0
mulss -0x70(%rbp), %xmm0
addss -0xa0(%rbp), %xmm0
movaps %xmm0, -0xa0(%rbp)
movss -0x74(%rbp), %xmm0
movss %xmm0, -0x120(%rbp)
movss -0x110(%rbp), %xmm0
callq 0xc050
mulss -0x70(%rbp), %xmm0
addss -0x120(%rbp), %xmm0
movaps -0xa0(%rbp), %xmm1
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movaps %xmm1, -0xa0(%rbp)
movss -0x78(%rbp), %xmm0
movaps %xmm0, -0x110(%rbp)
movss -0xa8(%rbp), %xmm0
callq 0xc5d0
mulss -0x70(%rbp), %xmm0
movaps -0x110(%rbp), %xmm1
addss %xmm0, %xmm1
movaps %xmm1, -0x110(%rbp)
movss -0x74(%rbp), %xmm0
movss %xmm0, -0x120(%rbp)
movss -0xa8(%rbp), %xmm0
callq 0xc050
mulss -0x70(%rbp), %xmm0
addss -0x120(%rbp), %xmm0
movaps -0x110(%rbp), %xmm1
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
leaq 0x1(%r14), %r12
movl -0x100(%rbp,%r14,4), %ecx
movl -0xfc(%rbp,%r14,4), %r8d
movq %r13, %rdi
movl %ebx, %esi
movl %r15d, %edx
movaps -0xa0(%rbp), %xmm0
callq 0x7c63e
movq %r12, %r14
cmpq $0x6, %r12
jne 0xa10ca
movss -0x2c(%rbp), %xmm0
addss %xmm0, %xmm0
movss 0x276fd(%rip), %xmm1    # 0xc8980
mulss %xmm1, %xmm0
callq 0xc5d0
movss %xmm0, -0x70(%rbp)
movss -0x2c(%rbp), %xmm0
addss %xmm0, %xmm0
mulss 0x276de(%rip), %xmm0    # 0xc8980
callq 0xc050
movaps -0x1b0(%rbp), %xmm2
movaps %xmm2, %xmm3
mulss -0x70(%rbp), %xmm3
movss 0x15d46(%rip), %xmm1    # 0xb7004
mulss %xmm1, %xmm3
addss -0x78(%rbp), %xmm3
movss %xmm0, -0xa0(%rbp)
mulss %xmm0, %xmm2
mulss %xmm1, %xmm2
addss -0x74(%rbp), %xmm2
movss %xmm3, -0x130(%rbp)
movss %xmm2, -0x12c(%rbp)
cmpb $0x0, -0x44(%rbp)
movl -0x4c(%rbp), %r13d
jne 0xa1300
movss 0x15cde(%rip), %xmm1    # 0xb6fdc
jmp 0xa1308
movss 0x165ac(%rip), %xmm1    # 0xb78b4
movq -0x148(%rbp), %r14
movss -0x5c(%rbp), %xmm0
mulss %xmm1, %xmm0
movss %xmm0, -0x5c(%rbp)
movaps %xmm0, %xmm1
divss 0x31bbc(%rip), %xmm1    # 0xd2ee4
cvttss2si %xmm1, %eax
cmpl $0x20, %eax
movl $0x20, %ecx
cmovll %eax, %ecx
cmpl $0xa, %ecx
movl $0x9, %ebx
cmovgel %ecx, %ebx
leaq -0x130(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
movl -0x174(%rbp), %r12d
movl %r12d, %edx
movl %ebx, %ecx
callq 0x7aa54
movss -0x5c(%rbp), %xmm0
movss 0x15c77(%rip), %xmm1    # 0xb6fe4
addss %xmm1, %xmm0
movq %r14, %rdi
movq %r15, %rsi
movl -0xc8(%rbp), %edx
movl %ebx, %ecx
callq 0x7a922
movq %r14, %rdi
movq %r15, %rsi
movss -0x5c(%rbp), %xmm0
movl %r13d, %edx
movl %ebx, %ecx
movss 0x15c48(%rip), %xmm1    # 0xb6fe4
callq 0x7a922
movss -0xe4(%rbp), %xmm2
movss -0xe0(%rbp), %xmm0
movss -0xa0(%rbp), %xmm7
movaps %xmm7, %xmm1
mulss %xmm0, %xmm1
movaps %xmm2, %xmm3
movss -0x70(%rbp), %xmm6
mulss %xmm6, %xmm3
subss %xmm1, %xmm3
mulss %xmm6, %xmm0
mulss %xmm7, %xmm2
addss %xmm0, %xmm2
movss -0x78(%rbp), %xmm1
movss -0x74(%rbp), %xmm0
addss %xmm1, %xmm3
addss %xmm0, %xmm2
unpcklps %xmm2, %xmm3            # xmm3 = xmm3[0],xmm2[0],xmm3[1],xmm2[1]
leaq -0x168(%rbp), %rax
movlps %xmm3, (%rax)
movss -0xdc(%rbp), %xmm2
movss -0xd8(%rbp), %xmm3
movaps %xmm7, %xmm4
mulss %xmm3, %xmm4
movaps %xmm2, %xmm5
mulss %xmm6, %xmm5
subss %xmm4, %xmm5
mulss %xmm6, %xmm3
mulss %xmm7, %xmm2
addss %xmm3, %xmm2
addss %xmm1, %xmm5
addss %xmm0, %xmm2
unpcklps %xmm2, %xmm5            # xmm5 = xmm5[0],xmm2[0],xmm5[1],xmm2[1]
leaq -0x1e8(%rbp), %rax
movlps %xmm5, (%rax)
movss -0xd4(%rbp), %xmm2
movss -0xd0(%rbp), %xmm3
movaps %xmm7, %xmm4
mulss %xmm3, %xmm4
movaps %xmm2, %xmm5
mulss %xmm6, %xmm5
subss %xmm4, %xmm5
mulss %xmm3, %xmm6
mulss %xmm7, %xmm2
addss %xmm6, %xmm2
addss %xmm1, %xmm5
addss %xmm0, %xmm2
unpcklps %xmm2, %xmm5            # xmm5 = xmm5[0],xmm2[0],xmm5[1],xmm2[1]
movq %r14, %rbx
leaq -0x218(%rbp), %r15
movlps %xmm5, (%r15)
callq 0x55816
movaps %xmm0, -0x70(%rbp)
movq %r14, %rdi
movl $0x6, %esi
movl $0x6, %edx
callq 0x77438
movzwl 0x34(%r14), %eax
movq 0x50(%r14), %rcx
movw %ax, (%rcx)
addq $0x2, %rcx
movq %rcx, 0x50(%r14)
movq 0x48(%r14), %rax
leaq -0x168(%rbp), %r8
movq (%r8), %rcx
movq %rcx, (%rax)
movq 0x48(%r14), %rax
movaps -0x70(%rbp), %xmm0
movlps %xmm0, 0x8(%rax)
movq 0x48(%r14), %rax
movl %r12d, 0x10(%rax)
leaq 0x14(%rax), %rcx
movq %rcx, 0x48(%r14)
movl 0x34(%r14), %ecx
incl %ecx
movl %ecx, 0x34(%r14)
movq 0x50(%r14), %rdx
movw %cx, (%rdx)
addq $0x2, %rdx
movq %rdx, 0x50(%r14)
leaq -0x1e8(%rbp), %r14
movq (%r14), %rcx
movq %rcx, 0x14(%rax)
movq 0x48(%rbx), %rax
movlps %xmm0, 0x8(%rax)
movq 0x48(%rbx), %rax
movl %r12d, 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)
movq (%r15), %rcx
movq %rcx, 0x14(%rax)
movq 0x48(%rbx), %rax
movlps %xmm0, 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)
movq (%r8), %rcx
movq %rcx, 0x14(%rax)
movq 0x48(%rbx), %rax
movlps %xmm0, 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)
movq (%r14), %rdx
movq %rdx, 0x14(%rcx)
movq 0x48(%rbx), %rcx
movlps %xmm0, 0x8(%rcx)
movq 0x48(%rbx), %rcx
movq -0x198(%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 (%r15), %rdx
movq %rdx, 0x14(%rcx)
movq 0x48(%rbx), %rcx
movlps %xmm0, 0x8(%rcx)
movq 0x48(%rbx), %rcx
movl %eax, 0x10(%rcx)
addq $0x14, %rcx
movq %rcx, 0x48(%rbx)
incl 0x34(%rbx)
movss 0x1b96f(%rip), %xmm0    # 0xbcf78
movq %rbx, %rdi
movq %r8, %rbx
movq %r8, %rsi
movq %r14, %rdx
movq %r15, %rcx
movl -0xc8(%rbp), %r8d
callq 0x7a4cc
movss -0x30(%rbp), %xmm1
movss 0x159b3(%rip), %xmm6    # 0xb6fe4
movaps %xmm6, %xmm0
minss %xmm1, %xmm0
xorps %xmm2, %xmm2
cmpltss %xmm2, %xmm1
andnps %xmm0, %xmm1
movss (%r15), %xmm3
movss 0x4(%r15), %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 -0x38(%rbp), %xmm1
minss %xmm1, %xmm3
cmpltss %xmm2, %xmm1
andnps %xmm3, %xmm1
movss (%r14), %xmm2
movss 0x4(%r14), %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, -0x150(%rbp)
movq -0x80(%rbp), %r12
movq -0x170(%rbp), %r14
movl -0xc4(%rbp), %r15d
cmpb $0x0, -0x48(%rbp)
jne 0xa16d8
movq %r14, %r13
movss 0x15936(%rip), %xmm0    # 0xb700c
jmp 0xa16e3
movq %r14, %r13
movss 0x15925(%rip), %xmm0    # 0xb7008
leaq -0x150(%rbp), %rbx
movq -0x148(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movss %xmm0, -0x70(%rbp)
movl %r15d, %edx
movl $0xc, %ecx
callq 0x7aa54
movss -0x70(%rbp), %xmm0
movss 0x158ce(%rip), %xmm1    # 0xb6fe4
addss %xmm1, %xmm0
movq %r14, %rdi
movq %rbx, %rsi
movl -0xc8(%rbp), %edx
movl $0xc, %ecx
callq 0x7a922
movq %r14, %rdi
movq %rbx, %rsi
movss -0x70(%rbp), %xmm0
movl -0x4c(%rbp), %edx
movl $0xc, %ecx
movss 0x15899(%rip), %xmm1    # 0xb6fe4
callq 0x7a922
cmpl $0x10000, -0xcc(%rbp)   # imm = 0x10000
jne 0xa18bf
movss 0xc(%r12), %xmm2
movaps %xmm2, -0xa0(%rbp)
movss 0x1586e(%rip), %xmm1    # 0xb6fe4
movaps %xmm1, %xmm0
minss %xmm2, %xmm0
subss %xmm0, %xmm1
movaps %xmm1, -0x70(%rbp)
movss -0x54(%rbp), %xmm0
movaps -0x140(%rbp), %xmm2
movaps -0x160(%rbp), %xmm3
addss %xmm3, %xmm2
movaps -0xc0(%rbp), %xmm1
addss %xmm0, %xmm1
leaq -0x128(%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 %xmm3, %xmm2
movss 0x1582e(%rip), %xmm3    # 0xb7004
mulss %xmm3, %xmm2
xorps %xmm3, %xmm3
xorps %xmm4, %xmm4
movq %r14, %rdi
xorl %esi, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x84cf6
movl %r15d, %r9d
andl $0xffffff, %r9d         # imm = 0xFFFFFF
movl %r9d, (%rsp)
movl %r15d, %ecx
leaq -0x130(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movl %ecx, %r8d
callq 0x79dcc
movaps -0xa0(%rbp), %xmm2
cmpltss 0x1601c(%rip), %xmm2    # 0xb7844
movaps %xmm2, %xmm0
andnps -0x70(%rbp), %xmm0
movss 0x157ad(%rip), %xmm1    # 0xb6fe4
andps %xmm1, %xmm2
orps %xmm0, %xmm2
mulss -0xc0(%rbp), %xmm2
addss -0x54(%rbp), %xmm2
addss 0x157b2(%rip), %xmm2    # 0xb7004
cvttps2dq %xmm2, %xmm0
cvtdq2ps %xmm0, %xmm0
movaps %xmm0, -0x70(%rbp)
movsd (%r15), %xmm0
movsd 0x8(%r15), %xmm1
xorps %xmm2, %xmm2
callq 0x45b5c
movaps -0x160(%rbp), %xmm0
addss 0x15751(%rip), %xmm0    # 0xb6fd0
unpcklps -0x70(%rbp), %xmm0      # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
movaps -0x200(%rbp), %xmm4
movaps %xmm4, %xmm1
movss 0x1574f(%rip), %xmm2    # 0xb6fe4
addss %xmm2, %xmm1
movaps -0x140(%rbp), %xmm2
addss 0x15fc0(%rip), %xmm2    # 0xb7868
movq -0x40(%rbp), %rax
movss 0x1560(%rax), %xmm3
unpcklps %xmm4, %xmm1            # xmm1 = xmm1[0],xmm4[0],xmm1[1],xmm4[1]
movq %r14, %rdi
callq 0xa1bf3
callq 0x56723
movl -0x34(%rbp), %ebx
testb %bl, %bl
je 0xa18e9
leaq -0x210(%rbp), %rdi
movq %r12, %rsi
movq -0x190(%rbp), %rdx
callq 0xc5b0
testl %eax, %eax
movzbl %bl, %ebx
cmovel %eax, %ebx
testb $0x1, %bl
je 0xa18fa
movl 0x124(%r13), %edi
callq 0x46ca4
callq 0x56188
andb $0x1, %bl
movl %ebx, %eax
addq $0x1f8, %rsp            # imm = 0x1F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x32d52(%rip), %rdi     # 0xd466f
leaq 0x31824(%rip), %rsi     # 0xd3148
leaq 0x32d7c(%rip), %rcx     # 0xd46a7
movl $0x1337, %edx           # imm = 0x1337
callq 0xc140
leaq 0x32c47(%rip), %rdi     # 0xd4583
leaq 0x31805(%rip), %rsi     # 0xd3148
leaq 0x32d5d(%rip), %rcx     # 0xd46a7
movl $0x1338, %edx           # imm = 0x1338
callq 0xc140