// File: /workspace/github_cpp_makefile_star2_O2/Ciaxur[P]yagb-emu/include/imgui/imgui_draw.cpp
// Function: ImDrawList::AddPolyline(ImVec2 const*, int, unsigned int, bool, float)
void ImDrawList::AddPolyline(const ImVec2* points, const int points_count, ImU32 col, bool closed, float thickness)
{
    if (points_count < 2)
        return;

    const ImVec2 opaque_uv = _Data->TexUvWhitePixel;
    const int count = closed ? points_count : points_count - 1; // The number of line segments we need to draw
    const bool thick_line = (thickness > _FringeScale);

    if (Flags & ImDrawListFlags_AntiAliasedLines)
    {
        // Anti-aliased stroke
        const float AA_SIZE = _FringeScale;
        const ImU32 col_trans = col & ~IM_COL32_A_MASK;

        // Thicknesses <1.0 should behave like thickness 1.0
        thickness = ImMax(thickness, 1.0f);
        const int integer_thickness = (int)thickness;
        const float fractional_thickness = thickness - integer_thickness;

        // Do we want to draw this line using a texture?
        // - For now, only draw integer-width lines using textures to avoid issues with the way scaling occurs, could be improved.
        // - If AA_SIZE is not 1.0f we cannot use the texture path.
        const bool use_texture = (Flags & ImDrawListFlags_AntiAliasedLinesUseTex) && (integer_thickness < IM_DRAWLIST_TEX_LINES_WIDTH_MAX) && (fractional_thickness <= 0.00001f) && (AA_SIZE == 1.0f);

        // We should never hit this, because NewFrame() doesn't set ImDrawListFlags_AntiAliasedLinesUseTex unless ImFontAtlasFlags_NoBakedLines is off
        IM_ASSERT_PARANOID(!use_texture || !(_Data->Font->ContainerAtlas->Flags & ImFontAtlasFlags_NoBakedLines));

        const int idx_count = use_texture ? (count * 6) : (thick_line ? count * 18 : count * 12);
        const int vtx_count = use_texture ? (points_count * 2) : (thick_line ? points_count * 4 : points_count * 3);
        PrimReserve(idx_count, vtx_count);

        // Temporary buffer
        // The first <points_count> items are normals at each line point, then after that there are either 2 or 4 temp points for each line point
        ImVec2* temp_normals = (ImVec2*)alloca(points_count * ((use_texture || !thick_line) ? 3 : 5) * sizeof(ImVec2)); //-V630
        ImVec2* temp_points = temp_normals + points_count;

        // Calculate normals (tangents) for each line segment
        for (int i1 = 0; i1 < count; i1++)
        {
            const int i2 = (i1 + 1) == points_count ? 0 : i1 + 1;
            float dx = points[i2].x - points[i1].x;
            float dy = points[i2].y - points[i1].y;
            IM_NORMALIZE2F_OVER_ZERO(dx, dy);
            temp_normals[i1].x = dy;
            temp_normals[i1].y = -dx;
        }
        if (!closed)
            temp_normals[points_count - 1] = temp_normals[points_count - 2];

        // If we are drawing a one-pixel-wide line without a texture, or a textured line of any width, we only need 2 or 3 vertices per point
        if (use_texture || !thick_line)
        {
            // [PATH 1] Texture-based lines (thick or non-thick)
            // [PATH 2] Non texture-based lines (non-thick)

            // The width of the geometry we need to draw - this is essentially <thickness> pixels for the line itself, plus "one pixel" for AA.
            // - In the texture-based path, we don't use AA_SIZE here because the +1 is tied to the generated texture
            //   (see ImFontAtlasBuildRenderLinesTexData() function), and so alternate values won't work without changes to that code.
            // - In the non texture-based paths, we would allow AA_SIZE to potentially be != 1.0f with a patch (e.g. fringe_scale patch to
            //   allow scaling geometry while preserving one-screen-pixel AA fringe).
            const float half_draw_size = use_texture ? ((thickness * 0.5f) + 1) : AA_SIZE;

            // If line is not closed, the first and last points need to be generated differently as there are no normals to blend
            if (!closed)
            {
                temp_points[0] = points[0] + temp_normals[0] * half_draw_size;
                temp_points[1] = points[0] - temp_normals[0] * half_draw_size;
                temp_points[(points_count-1)*2+0] = points[points_count-1] + temp_normals[points_count-1] * half_draw_size;
                temp_points[(points_count-1)*2+1] = points[points_count-1] - temp_normals[points_count-1] * half_draw_size;
            }

            // Generate the indices to form a number of triangles for each line segment, and the vertices for the line edges
            // This takes points n and n+1 and writes into n+1, with the first point in a closed line being generated from the final one (as n+1 wraps)
            // FIXME-OPT: Merge the different loops, possibly remove the temporary buffer.
            unsigned int idx1 = _VtxCurrentIdx; // Vertex index for start of line segment
            for (int i1 = 0; i1 < count; i1++) // i1 is the first point of the line segment
            {
                const int i2 = (i1 + 1) == points_count ? 0 : i1 + 1; // i2 is the second point of the line segment
                const unsigned int idx2 = ((i1 + 1) == points_count) ? _VtxCurrentIdx : (idx1 + (use_texture ? 2 : 3)); // Vertex index for end of segment

                // Average normals
                float dm_x = (temp_normals[i1].x + temp_normals[i2].x) * 0.5f;
                float dm_y = (temp_normals[i1].y + temp_normals[i2].y) * 0.5f;
                IM_FIXNORMAL2F(dm_x, dm_y);
                dm_x *= half_draw_size; // dm_x, dm_y are offset to the outer edge of the AA area
                dm_y *= half_draw_size;

                // Add temporary vertexes for the outer edges
                ImVec2* out_vtx = &temp_points[i2 * 2];
                out_vtx[0].x = points[i2].x + dm_x;
                out_vtx[0].y = points[i2].y + dm_y;
                out_vtx[1].x = points[i2].x - dm_x;
                out_vtx[1].y = points[i2].y - dm_y;

                if (use_texture)
                {
                    // Add indices for two triangles
                    _IdxWritePtr[0] = (ImDrawIdx)(idx2 + 0); _IdxWritePtr[1] = (ImDrawIdx)(idx1 + 0); _IdxWritePtr[2] = (ImDrawIdx)(idx1 + 1); // Right tri
                    _IdxWritePtr[3] = (ImDrawIdx)(idx2 + 1); _IdxWritePtr[4] = (ImDrawIdx)(idx1 + 1); _IdxWritePtr[5] = (ImDrawIdx)(idx2 + 0); // Left tri
                    _IdxWritePtr += 6;
                }
                else
                {
                    // Add indexes for four triangles
                    _IdxWritePtr[0] = (ImDrawIdx)(idx2 + 0); _IdxWritePtr[1] = (ImDrawIdx)(idx1 + 0); _IdxWritePtr[2] = (ImDrawIdx)(idx1 + 2); // Right tri 1
                    _IdxWritePtr[3] = (ImDrawIdx)(idx1 + 2); _IdxWritePtr[4] = (ImDrawIdx)(idx2 + 2); _IdxWritePtr[5] = (ImDrawIdx)(idx2 + 0); // Right tri 2
                    _IdxWritePtr[6] = (ImDrawIdx)(idx2 + 1); _IdxWritePtr[7] = (ImDrawIdx)(idx1 + 1); _IdxWritePtr[8] = (ImDrawIdx)(idx1 + 0); // Left tri 1
                    _IdxWritePtr[9] = (ImDrawIdx)(idx1 + 0); _IdxWritePtr[10] = (ImDrawIdx)(idx2 + 0); _IdxWritePtr[11] = (ImDrawIdx)(idx2 + 1); // Left tri 2
                    _IdxWritePtr += 12;
                }

                idx1 = idx2;
            }

            // Add vertexes for each point on the line
            if (use_texture)
            {
                // If we're using textures we only need to emit the left/right edge vertices
                ImVec4 tex_uvs = _Data->TexUvLines[integer_thickness];
                /*if (fractional_thickness != 0.0f) // Currently always zero when use_texture==false!
                {
                    const ImVec4 tex_uvs_1 = _Data->TexUvLines[integer_thickness + 1];
                    tex_uvs.x = tex_uvs.x + (tex_uvs_1.x - tex_uvs.x) * fractional_thickness; // inlined ImLerp()
                    tex_uvs.y = tex_uvs.y + (tex_uvs_1.y - tex_uvs.y) * fractional_thickness;
                    tex_uvs.z = tex_uvs.z + (tex_uvs_1.z - tex_uvs.z) * fractional_thickness;
                    tex_uvs.w = tex_uvs.w + (tex_uvs_1.w - tex_uvs.w) * fractional_thickness;
                }*/
                ImVec2 tex_uv0(tex_uvs.x, tex_uvs.y);
                ImVec2 tex_uv1(tex_uvs.z, tex_uvs.w);
                for (int i = 0; i < points_count; i++)
                {
                    _VtxWritePtr[0].pos = temp_points[i * 2 + 0]; _VtxWritePtr[0].uv = tex_uv0; _VtxWritePtr[0].col = col; // Left-side outer edge
                    _VtxWritePtr[1].pos = temp_points[i * 2 + 1]; _VtxWritePtr[1].uv = tex_uv1; _VtxWritePtr[1].col = col; // Right-side outer edge
                    _VtxWritePtr += 2;
                }
            }
            else
            {
                // If we're not using a texture, we need the center vertex as well
                for (int i = 0; i < points_count; i++)
                {
                    _VtxWritePtr[0].pos = points[i];              _VtxWritePtr[0].uv = opaque_uv; _VtxWritePtr[0].col = col;       // Center of line
                    _VtxWritePtr[1].pos = temp_points[i * 2 + 0]; _VtxWritePtr[1].uv = opaque_uv; _VtxWritePtr[1].col = col_trans; // Left-side outer edge
                    _VtxWritePtr[2].pos = temp_points[i * 2 + 1]; _VtxWritePtr[2].uv = opaque_uv; _VtxWritePtr[2].col = col_trans; // Right-side outer edge
                    _VtxWritePtr += 3;
                }
            }
        }
        else
        {
            // [PATH 2] Non texture-based lines (thick): we need to draw the solid line core and thus require four vertices per point
            const float half_inner_thickness = (thickness - AA_SIZE) * 0.5f;

            // If line is not closed, the first and last points need to be generated differently as there are no normals to blend
            if (!closed)
            {
                const int points_last = points_count - 1;
                temp_points[0] = points[0] + temp_normals[0] * (half_inner_thickness + AA_SIZE);
                temp_points[1] = points[0] + temp_normals[0] * (half_inner_thickness);
                temp_points[2] = points[0] - temp_normals[0] * (half_inner_thickness);
                temp_points[3] = points[0] - temp_normals[0] * (half_inner_thickness + AA_SIZE);
                temp_points[points_last * 4 + 0] = points[points_last] + temp_normals[points_last] * (half_inner_thickness + AA_SIZE);
                temp_points[points_last * 4 + 1] = points[points_last] + temp_normals[points_last] * (half_inner_thickness);
                temp_points[points_last * 4 + 2] = points[points_last] - temp_normals[points_last] * (half_inner_thickness);
                temp_points[points_last * 4 + 3] = points[points_last] - temp_normals[points_last] * (half_inner_thickness + AA_SIZE);
            }

            // Generate the indices to form a number of triangles for each line segment, and the vertices for the line edges
            // This takes points n and n+1 and writes into n+1, with the first point in a closed line being generated from the final one (as n+1 wraps)
            // FIXME-OPT: Merge the different loops, possibly remove the temporary buffer.
            unsigned int idx1 = _VtxCurrentIdx; // Vertex index for start of line segment
            for (int i1 = 0; i1 < count; i1++) // i1 is the first point of the line segment
            {
                const int i2 = (i1 + 1) == points_count ? 0 : (i1 + 1); // i2 is the second point of the line segment
                const unsigned int idx2 = (i1 + 1) == points_count ? _VtxCurrentIdx : (idx1 + 4); // Vertex index for end of segment

                // Average normals
                float dm_x = (temp_normals[i1].x + temp_normals[i2].x) * 0.5f;
                float dm_y = (temp_normals[i1].y + temp_normals[i2].y) * 0.5f;
                IM_FIXNORMAL2F(dm_x, dm_y);
                float dm_out_x = dm_x * (half_inner_thickness + AA_SIZE);
                float dm_out_y = dm_y * (half_inner_thickness + AA_SIZE);
                float dm_in_x = dm_x * half_inner_thickness;
                float dm_in_y = dm_y * half_inner_thickness;

                // Add temporary vertices
                ImVec2* out_vtx = &temp_points[i2 * 4];
                out_vtx[0].x = points[i2].x + dm_out_x;
                out_vtx[0].y = points[i2].y + dm_out_y;
                out_vtx[1].x = points[i2].x + dm_in_x;
                out_vtx[1].y = points[i2].y + dm_in_y;
                out_vtx[2].x = points[i2].x - dm_in_x;
                out_vtx[2].y = points[i2].y - dm_in_y;
                out_vtx[3].x = points[i2].x - dm_out_x;
                out_vtx[3].y = points[i2].y - dm_out_y;

                // Add indexes
                _IdxWritePtr[0]  = (ImDrawIdx)(idx2 + 1); _IdxWritePtr[1]  = (ImDrawIdx)(idx1 + 1); _IdxWritePtr[2]  = (ImDrawIdx)(idx1 + 2);
                _IdxWritePtr[3]  = (ImDrawIdx)(idx1 + 2); _IdxWritePtr[4]  = (ImDrawIdx)(idx2 + 2); _IdxWritePtr[5]  = (ImDrawIdx)(idx2 + 1);
                _IdxWritePtr[6]  = (ImDrawIdx)(idx2 + 1); _IdxWritePtr[7]  = (ImDrawIdx)(idx1 + 1); _IdxWritePtr[8]  = (ImDrawIdx)(idx1 + 0);
                _IdxWritePtr[9]  = (ImDrawIdx)(idx1 + 0); _IdxWritePtr[10] = (ImDrawIdx)(idx2 + 0); _IdxWritePtr[11] = (ImDrawIdx)(idx2 + 1);
                _IdxWritePtr[12] = (ImDrawIdx)(idx2 + 2); _IdxWritePtr[13] = (ImDrawIdx)(idx1 + 2); _IdxWritePtr[14] = (ImDrawIdx)(idx1 + 3);
                _IdxWritePtr[15] = (ImDrawIdx)(idx1 + 3); _IdxWritePtr[16] = (ImDrawIdx)(idx2 + 3); _IdxWritePtr[17] = (ImDrawIdx)(idx2 + 2);
                _IdxWritePtr += 18;

                idx1 = idx2;
            }

            // Add vertices
            for (int i = 0; i < points_count; i++)
            {
                _VtxWritePtr[0].pos = temp_points[i * 4 + 0]; _VtxWritePtr[0].uv = opaque_uv; _VtxWritePtr[0].col = col_trans;
                _VtxWritePtr[1].pos = temp_points[i * 4 + 1]; _VtxWritePtr[1].uv = opaque_uv; _VtxWritePtr[1].col = col;
                _VtxWritePtr[2].pos = temp_points[i * 4 + 2]; _VtxWritePtr[2].uv = opaque_uv; _VtxWritePtr[2].col = col;
                _VtxWritePtr[3].pos = temp_points[i * 4 + 3]; _VtxWritePtr[3].uv = opaque_uv; _VtxWritePtr[3].col = col_trans;
                _VtxWritePtr += 4;
            }
        }
        _VtxCurrentIdx += (ImDrawIdx)vtx_count;
    }
    else
    {
        // [PATH 4] Non texture-based, Non anti-aliased lines
        const int idx_count = count * 6;
        const int vtx_count = count * 4;    // FIXME-OPT: Not sharing edges
        PrimReserve(idx_count, vtx_count);

        for (int i1 = 0; i1 < count; i1++)
        {
            const int i2 = (i1 + 1) == points_count ? 0 : i1 + 1;
            const ImVec2& p1 = points[i1];
            const ImVec2& p2 = points[i2];

            float dx = p2.x - p1.x;
            float dy = p2.y - p1.y;
            IM_NORMALIZE2F_OVER_ZERO(dx, dy);
            dx *= (thickness * 0.5f);
            dy *= (thickness * 0.5f);

            _VtxWritePtr[0].pos.x = p1.x + dy; _VtxWritePtr[0].pos.y = p1.y - dx; _VtxWritePtr[0].uv = opaque_uv; _VtxWritePtr[0].col = col;
            _VtxWritePtr[1].pos.x = p2.x + dy; _VtxWritePtr[1].pos.y = p2.y - dx; _VtxWritePtr[1].uv = opaque_uv; _VtxWritePtr[1].col = col;
            _VtxWritePtr[2].pos.x = p2.x - dy; _VtxWritePtr[2].pos.y = p2.y + dx; _VtxWritePtr[2].uv = opaque_uv; _VtxWritePtr[2].col = col;
            _VtxWritePtr[3].pos.x = p1.x - dy; _VtxWritePtr[3].pos.y = p1.y + dx; _VtxWritePtr[3].uv = opaque_uv; _VtxWritePtr[3].col = col;
            _VtxWritePtr += 4;

            _IdxWritePtr[0] = (ImDrawIdx)(_VtxCurrentIdx); _IdxWritePtr[1] = (ImDrawIdx)(_VtxCurrentIdx + 1); _IdxWritePtr[2] = (ImDrawIdx)(_VtxCurrentIdx + 2);
            _IdxWritePtr[3] = (ImDrawIdx)(_VtxCurrentIdx); _IdxWritePtr[4] = (ImDrawIdx)(_VtxCurrentIdx + 2); _IdxWritePtr[5] = (ImDrawIdx)(_VtxCurrentIdx + 3);
            _IdxWritePtr += 6;
            _VtxCurrentIdx += 4;
        }
    }
}

// Assembly:
cmpl $0x2, %edx
jl 0x631a8
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %ecx, %r9d
movl %edx, %r11d
movq %rsi, %r15
movq %rdi, %rbx
movq 0x38(%rdi), %rax
movq (%rax), %r13
leal -0x1(%r11), %r10d
testb %r8b, %r8b
movl %r10d, %edx
cmovnel %r11d, %edx
movl 0x30(%rdi), %eax
movl %r11d, %ecx
movq %rcx, -0x38(%rbp)
movl %edx, %r14d
testb $0x1, %al
movl %r9d, -0x30(%rbp)
movss %xmm0, -0x40(%rbp)
jne 0x628f0
imull $0x6, %edx, %esi
shll $0x2, %edx
movq %rbx, %rdi
callq 0x623b8
movss -0x40(%rbp), %xmm8
movl -0x30(%rbp), %r10d
movq %r14, %r9
movq -0x38(%rbp), %r8
mulss 0x3988d(%rip), %xmm8    # 0x9c018
negq %r9
pushq $0x1
popq %rax
xorl %ecx, %ecx
xorps %xmm0, %xmm0
movss 0x3985a(%rip), %xmm1    # 0x9bff8
leaq (%r9,%rax), %rdx
cmpq $0x1, %rdx
je 0x6319a
cmpq %rax, %r8
movl %eax, %edx
cmoveq %rcx, %rdx
movss -0x8(%r15,%rax,8), %xmm5
movss -0x4(%r15,%rax,8), %xmm4
movss (%r15,%rdx,8), %xmm2
movss 0x4(%r15,%rdx,8), %xmm3
subss %xmm5, %xmm2
subss %xmm4, %xmm3
movaps %xmm3, %xmm7
mulss %xmm3, %xmm7
movaps %xmm2, %xmm6
mulss %xmm2, %xmm6
addss %xmm7, %xmm6
ucomiss %xmm0, %xmm6
jbe 0x62802
sqrtss %xmm6, %xmm6
movaps %xmm1, %xmm7
divss %xmm6, %xmm7
mulss %xmm7, %xmm2
mulss %xmm7, %xmm3
mulss %xmm8, %xmm2
mulss %xmm8, %xmm3
addss %xmm3, %xmm5
movq 0x48(%rbx), %rsi
movss %xmm5, (%rsi)
subss %xmm2, %xmm4
movss %xmm4, 0x4(%rsi)
movq %r13, 0x8(%rsi)
movq 0x48(%rbx), %rsi
movl %r10d, 0x10(%rsi)
movss (%r15,%rdx,8), %xmm4
addss %xmm3, %xmm4
movss %xmm4, 0x14(%rsi)
movss 0x4(%r15,%rdx,8), %xmm4
subss %xmm2, %xmm4
movss %xmm4, 0x18(%rsi)
movq %r13, 0x1c(%rsi)
movq 0x48(%rbx), %rsi
movl %r10d, 0x24(%rsi)
movss (%r15,%rdx,8), %xmm4
subss %xmm3, %xmm4
movss %xmm4, 0x28(%rsi)
movss 0x4(%r15,%rdx,8), %xmm4
addss %xmm2, %xmm4
movss %xmm4, 0x2c(%rsi)
movq %r13, 0x30(%rsi)
movq 0x48(%rbx), %rdx
movl %r10d, 0x38(%rdx)
movss -0x8(%r15,%rax,8), %xmm4
subss %xmm3, %xmm4
movss %xmm4, 0x3c(%rdx)
addss -0x4(%r15,%rax,8), %xmm2
movss %xmm2, 0x40(%rdx)
movq %r13, 0x44(%rdx)
movq 0x48(%rbx), %rdx
movl %r10d, 0x4c(%rdx)
addq $0x50, %rdx
movq %rdx, 0x48(%rbx)
movl 0x34(%rbx), %edx
movq 0x50(%rbx), %rsi
movw %dx, (%rsi)
leal 0x1(%rdx), %edi
movw %di, 0x2(%rsi)
leal 0x2(%rdx), %edi
movw %di, 0x4(%rsi)
movw %dx, 0x6(%rsi)
movw %di, 0x8(%rsi)
leal 0x3(%rdx), %edi
movw %di, 0xa(%rsi)
addq $0xc, %rsi
movq %rsi, 0x50(%rbx)
addl $0x4, %edx
movl %edx, 0x34(%rbx)
incq %rax
jmp 0x6279e
movss 0x39700(%rip), %xmm2    # 0x9bff8
movaps %xmm0, %xmm3
maxss %xmm2, %xmm3
cvttss2si %xmm3, %ecx
cvtsi2ss %ecx, %xmm4
movaps %xmm3, %xmm1
subss %xmm4, %xmm1
shrb %al
movl %ecx, -0x44(%rbp)
cmpl $0x3f, %ecx
setl %cl
andb %al, %cl
movss 0x39fa5(%rip), %xmm4    # 0x9c8c8
ucomiss %xmm1, %xmm4
movss 0xc0(%rbx), %xmm1
setae %al
ucomiss %xmm2, %xmm1
setnp %sil
sete %dil
andb %sil, %dil
andb %cl, %dil
andb %al, %dil
ucomiss %xmm1, %xmm0
pushq $0xc
popq %rax
pushq $0x12
popq %rcx
cmovbel %eax, %ecx
testb %dil, %dil
pushq $0x6
popq %rsi
cmovel %ecx, %esi
imull %edx, %esi
movb %dil, -0x29(%rbp)
cmpb $0x1, %dil
movss %xmm1, -0x50(%rbp)
movss %xmm3, -0x4c(%rbp)
movq %r10, -0x68(%rbp)
movl %r8d, -0x48(%rbp)
movq %r14, -0x70(%rbp)
jne 0x62986
leal (%r11,%r11), %edx
pushq $0x3
popq %rax
jmp 0x629a4
xorl %eax, %eax
ucomiss %xmm1, %xmm0
leal (,%r11,4), %ecx
seta %al
leal (%r11,%r11,2), %edx
cmoval %ecx, %edx
leal 0x3(,%rax,2), %eax
movq %rax, -0x60(%rbp)
movq %r11, %r14
pushq $0x1
popq %r12
andl $0xffffff, %r9d         # imm = 0xFFFFFF
movl %r9d, -0x3c(%rbp)
movq %rbx, %rdi
movl %edx, -0x54(%rbp)
callq 0x623b8
movq -0x60(%rbp), %rax
imull %r14d, %eax
leaq 0xf(,%rax,8), %rcx
andq $-0x10, %rcx
movq %rsp, %rax
subq %rcx, %rax
movq %rax, %rsp
movq -0x70(%rbp), %r10
negq %r10
xorl %ecx, %ecx
xorps %xmm0, %xmm0
movaps 0x395eb(%rip), %xmm1    # 0x9bfe0
movq -0x38(%rbp), %r11
movss 0x395f6(%rip), %xmm11   # 0x9bff8
movb -0x29(%rbp), %r14b
leaq (%r10,%r12), %rdx
cmpq $0x1, %rdx
je 0x62a76
cmpq %r12, %r11
movl %r12d, %edx
cmoveq %rcx, %rdx
movss (%r15,%rdx,8), %xmm2
movss 0x4(%r15,%rdx,8), %xmm3
subss -0x8(%r15,%r12,8), %xmm2
subss -0x4(%r15,%r12,8), %xmm3
movaps %xmm3, %xmm5
mulss %xmm3, %xmm5
movaps %xmm2, %xmm4
mulss %xmm2, %xmm4
addss %xmm5, %xmm4
ucomiss %xmm0, %xmm4
jbe 0x62a60
sqrtss %xmm4, %xmm4
movaps %xmm11, %xmm5
divss %xmm4, %xmm5
mulss %xmm5, %xmm2
mulss %xmm5, %xmm3
xorps %xmm1, %xmm2
movss %xmm3, -0x8(%rax,%r12,8)
movss %xmm2, -0x4(%rax,%r12,8)
incq %r12
jmp 0x62a06
leaq (%rax,%r11,8), %rcx
cmpb $0x0, -0x48(%rbp)
movss -0x50(%rbp), %xmm12
movss -0x4c(%rbp), %xmm13
movss -0x40(%rbp), %xmm0
je 0x62ac4
ucomiss %xmm12, %xmm0
setbe %dl
orb %r14b, %dl
je 0x62d94
testb %r14b, %r14b
je 0x62abc
mulss 0x39569(%rip), %xmm13   # 0x9c018
addss 0x39540(%rip), %xmm13   # 0x9bff8
movaps %xmm13, %xmm12
movq %r10, %r8
jmp 0x62b9d
ucomiss %xmm12, %xmm0
setbe %sil
movq -0x68(%rbp), %r9
movl %r9d, %edx
movq -0x10(%rcx), %rdi
movq %rdi, (%rax,%rdx,8)
orb %r14b, %sil
movss (%r15,%rdx,8), %xmm0
movss 0x4(%r15,%rdx,8), %xmm1
je 0x62dac
testb %r14b, %r14b
je 0x62b0c
mulss 0x39519(%rip), %xmm13   # 0x9c018
addss 0x394f0(%rip), %xmm13   # 0x9bff8
movaps %xmm13, %xmm12
movq %r10, %r8
movss (%rax), %xmm2
mulss %xmm12, %xmm2
movss 0x4(%rax), %xmm3
mulss %xmm12, %xmm3
movss (%r15), %xmm4
movss 0x4(%r15), %xmm5
movaps %xmm2, %xmm6
addss %xmm4, %xmm6
movaps %xmm3, %xmm7
addss %xmm5, %xmm7
unpcklps %xmm7, %xmm6            # xmm6 = xmm6[0],xmm7[0],xmm6[1],xmm7[1]
subss %xmm2, %xmm4
subss %xmm3, %xmm5
unpcklps %xmm5, %xmm4            # xmm4 = xmm4[0],xmm5[0],xmm4[1],xmm5[1]
movlhps %xmm4, %xmm6            # xmm6 = xmm6[0],xmm4[0]
movups %xmm6, (%rcx)
movss (%rax,%rdx,8), %xmm2
mulss %xmm12, %xmm2
movss 0x4(%rax,%rdx,8), %xmm3
mulss %xmm12, %xmm3
addss %xmm0, %xmm2
addss %xmm1, %xmm3
unpcklps %xmm3, %xmm2            # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
addl %r9d, %r9d
movlps %xmm2, (%rcx,%r9,8)
movss (%rax,%rdx,8), %xmm2
mulss %xmm12, %xmm2
movss 0x4(%rax,%rdx,8), %xmm3
mulss %xmm12, %xmm3
subss %xmm2, %xmm0
subss %xmm3, %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movlps %xmm0, 0x8(%rcx,%r9,8)
movl 0x34(%rbx), %r9d
movzbl %r14b, %edx
xorl $0x3, %edx
movq 0x50(%rbx), %rsi
pushq $0x1
popq %r10
movss 0x39460(%rip), %xmm0    # 0x9c018
leaq (%r8,%r10), %r11
cmpq $0x1, %r11
je 0x62cf7
leal (%r9,%rdx), %r11d
cmpq %r10, -0x38(%rbp)
movl %r10d, %edi
cmovel 0x34(%rbx), %r11d
movl $0x0, %r12d
cmovel %r12d, %edi
movss -0x8(%rax,%r10,8), %xmm1
movss -0x4(%rax,%r10,8), %xmm2
addss (%rax,%rdi,8), %xmm1
addss 0x4(%rax,%rdi,8), %xmm2
mulss %xmm0, %xmm1
mulss %xmm0, %xmm2
movaps %xmm2, %xmm3
mulss %xmm2, %xmm3
movaps %xmm1, %xmm4
mulss %xmm1, %xmm4
addss %xmm3, %xmm4
movaps %xmm0, %xmm3
maxss %xmm4, %xmm3
movaps %xmm11, %xmm4
divss %xmm3, %xmm4
mulss %xmm4, %xmm1
mulss %xmm12, %xmm1
movl %edi, %r12d
addl %r12d, %r12d
movss (%r15,%rdi,8), %xmm3
movaps %xmm3, %xmm5
addss %xmm1, %xmm5
movss %xmm5, (%rcx,%r12,8)
movss 0x4(%r15,%rdi,8), %xmm5
mulss %xmm2, %xmm4
mulss %xmm12, %xmm4
movaps %xmm5, %xmm2
addss %xmm4, %xmm2
movss %xmm2, 0x4(%rcx,%r12,8)
subss %xmm1, %xmm3
movss %xmm3, 0x8(%rcx,%r12,8)
subss %xmm4, %xmm5
movss %xmm5, 0xc(%rcx,%r12,8)
movw %r11w, (%rsi)
movw %r9w, 0x2(%rsi)
testb %r14b, %r14b
je 0x62ca4
incl %r9d
movw %r9w, 0x4(%rsi)
leal 0x1(%r11), %edi
movw %di, 0x6(%rsi)
movw %r9w, 0x8(%rsi)
movw %r11w, 0xa(%rsi)
pushq $0xc
jmp 0x62ce3
leal 0x2(%r9), %edi
movw %di, 0x4(%rsi)
movw %di, 0x6(%rsi)
leal 0x2(%r11), %edi
movw %di, 0x8(%rsi)
movw %r11w, 0xa(%rsi)
leal 0x1(%r11), %edi
movw %di, 0xc(%rsi)
leal 0x1(%r9), %r12d
movw %r12w, 0xe(%rsi)
movw %r9w, 0x10(%rsi)
movw %r9w, 0x12(%rsi)
movw %r11w, 0x14(%rsi)
movw %di, 0x16(%rsi)
pushq $0x18
popq %r9
addq %r9, %rsi
movq %rsi, 0x50(%rbx)
incq %r10
movl %r11d, %r9d
jmp 0x62bb8
testb %r14b, %r14b
je 0x63116
movq 0x38(%rbx), %rcx
movq 0xd0(%rcx), %rdi
movslq -0x44(%rbp), %r8
shlq $0x4, %r8
movl (%rdi,%r8), %ecx
movl 0x4(%rdi,%r8), %edx
movl 0x8(%rdi,%r8), %esi
movl 0xc(%rdi,%r8), %edi
movq -0x38(%rbp), %r11
leaq (%rax,%r11,8), %rax
addq $0x8, %rax
shlq $0x4, %r11
xorl %r8d, %r8d
cmpq %r8, %r11
je 0x63193
movq 0x48(%rbx), %r9
movq -0x8(%rax,%r8), %r10
movq %r10, (%r9)
movq 0x48(%rbx), %r9
movl %ecx, 0x8(%r9)
movl %edx, 0xc(%r9)
movq 0x48(%rbx), %r9
movl -0x30(%rbp), %r10d
movl %r10d, 0x10(%r9)
movq (%rax,%r8), %r10
movq %r10, 0x14(%r9)
movq 0x48(%rbx), %r9
movl %esi, 0x1c(%r9)
movl %edi, 0x20(%r9)
movq 0x48(%rbx), %r9
movl -0x30(%rbp), %r10d
movl %r10d, 0x24(%r9)
addq $0x28, %r9
movq %r9, 0x48(%rbx)
addq $0x10, %r8
jmp 0x62d39
subss %xmm12, %xmm13
mulss 0x39276(%rip), %xmm13   # 0x9c018
addss %xmm13, %xmm12
jmp 0x62ee1
subss %xmm12, %xmm13
mulss 0x3925e(%rip), %xmm13   # 0x9c018
addss %xmm13, %xmm12
movss (%rax), %xmm2
movss 0x4(%rax), %xmm3
movaps %xmm13, %xmm4
mulss %xmm2, %xmm4
mulss %xmm12, %xmm2
movaps %xmm12, %xmm5
mulss %xmm3, %xmm5
movss (%r15), %xmm6
movss 0x4(%r15), %xmm7
movaps %xmm2, %xmm8
addss %xmm6, %xmm8
movaps %xmm5, %xmm9
addss %xmm7, %xmm9
unpcklps %xmm9, %xmm8            # xmm8 = xmm8[0],xmm9[0],xmm8[1],xmm9[1]
mulss %xmm13, %xmm3
movaps %xmm6, %xmm9
subss %xmm4, %xmm9
addss %xmm6, %xmm4
movaps %xmm7, %xmm10
subss %xmm3, %xmm10
addss %xmm7, %xmm3
unpcklps %xmm3, %xmm4            # xmm4 = xmm4[0],xmm3[0],xmm4[1],xmm3[1]
movlhps %xmm4, %xmm8            # xmm8 = xmm8[0],xmm4[0]
movups %xmm8, (%rcx)
unpcklps %xmm10, %xmm9           # xmm9 = xmm9[0],xmm10[0],xmm9[1],xmm10[1]
subss %xmm2, %xmm6
subss %xmm5, %xmm7
unpcklps %xmm7, %xmm6            # xmm6 = xmm6[0],xmm7[0],xmm6[1],xmm7[1]
movlhps %xmm6, %xmm9            # xmm9 = xmm9[0],xmm6[0]
movups %xmm9, 0x10(%rcx)
movss (%rax,%rdx,8), %xmm2
mulss %xmm12, %xmm2
movss 0x4(%rax,%rdx,8), %xmm3
mulss %xmm12, %xmm3
addss %xmm0, %xmm2
addss %xmm1, %xmm3
unpcklps %xmm3, %xmm2            # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
shll $0x2, %r9d
movlps %xmm2, (%rcx,%r9,8)
movss (%rax,%rdx,8), %xmm2
mulss %xmm13, %xmm2
movss 0x4(%rax,%rdx,8), %xmm3
mulss %xmm13, %xmm3
addss %xmm0, %xmm2
addss %xmm1, %xmm3
unpcklps %xmm3, %xmm2            # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
movlps %xmm2, 0x8(%rcx,%r9,8)
movss (%rax,%rdx,8), %xmm2
mulss %xmm13, %xmm2
movss 0x4(%rax,%rdx,8), %xmm3
mulss %xmm13, %xmm3
movaps %xmm0, %xmm4
subss %xmm2, %xmm4
movaps %xmm1, %xmm2
subss %xmm3, %xmm2
unpcklps %xmm2, %xmm4            # xmm4 = xmm4[0],xmm2[0],xmm4[1],xmm2[1]
movlps %xmm4, 0x10(%rcx,%r9,8)
movss (%rax,%rdx,8), %xmm2
mulss %xmm12, %xmm2
movss 0x4(%rax,%rdx,8), %xmm3
mulss %xmm12, %xmm3
subss %xmm2, %xmm0
subss %xmm3, %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movlps %xmm0, 0x18(%rcx,%r9,8)
movl 0x34(%rbx), %r8d
movq 0x50(%rbx), %rdx
pushq $0x1
popq %rsi
movss 0x39124(%rip), %xmm0    # 0x9c018
leaq (%r10,%rsi), %r9
cmpq $0x1, %r9
je 0x63086
cmpq %rsi, %r11
movq %r10, %r14
movl %esi, %r10d
movl $0x0, %edi
cmovel %edi, %r10d
leal 0x4(%r8), %r9d
cmovel 0x34(%rbx), %r9d
movss -0x8(%rax,%rsi,8), %xmm1
addss (%rax,%r10,8), %xmm1
movss -0x4(%rax,%rsi,8), %xmm3
mulss %xmm0, %xmm1
addss 0x4(%rax,%r10,8), %xmm3
mulss %xmm0, %xmm3
movaps %xmm3, %xmm2
mulss %xmm3, %xmm2
movaps %xmm1, %xmm4
mulss %xmm1, %xmm4
addss %xmm2, %xmm4
movaps %xmm0, %xmm5
maxss %xmm4, %xmm5
movaps %xmm11, %xmm2
divss %xmm5, %xmm2
mulss %xmm2, %xmm1
mulss %xmm3, %xmm2
movaps %xmm12, %xmm4
mulss %xmm1, %xmm4
movaps %xmm12, %xmm3
mulss %xmm2, %xmm3
mulss %xmm13, %xmm1
mulss %xmm13, %xmm2
movl %r10d, %r11d
shll $0x2, %r11d
movss (%r15,%r10,8), %xmm5
movaps %xmm5, %xmm6
addss %xmm4, %xmm6
movss %xmm6, (%rcx,%r11,8)
movss 0x4(%r15,%r10,8), %xmm6
movaps %xmm6, %xmm7
addss %xmm3, %xmm7
movss %xmm7, 0x4(%rcx,%r11,8)
movaps %xmm5, %xmm7
addss %xmm1, %xmm7
movss %xmm7, 0x8(%rcx,%r11,8)
movaps %xmm6, %xmm7
addss %xmm2, %xmm7
movss %xmm7, 0xc(%rcx,%r11,8)
movaps %xmm5, %xmm7
subss %xmm1, %xmm7
movss %xmm7, 0x10(%rcx,%r11,8)
movaps %xmm6, %xmm1
subss %xmm2, %xmm1
movss %xmm1, 0x14(%rcx,%r11,8)
subss %xmm4, %xmm5
movss %xmm5, 0x18(%rcx,%r11,8)
subss %xmm3, %xmm6
movss %xmm6, 0x1c(%rcx,%r11,8)
leal 0x1(%r9), %r10d
movw %r10w, (%rdx)
leal 0x1(%r8), %r11d
movw %r11w, 0x2(%rdx)
leal 0x2(%r8), %r12d
movw %r12w, 0x4(%rdx)
movw %r12w, 0x6(%rdx)
leal 0x2(%r9), %edi
movw %di, 0x8(%rdx)
movw %r10w, 0xa(%rdx)
movw %r10w, 0xc(%rdx)
movw %r11w, 0xe(%rdx)
movq -0x38(%rbp), %r11
movw %r8w, 0x10(%rdx)
movw %r8w, 0x12(%rdx)
movw %r9w, 0x14(%rdx)
movw %r10w, 0x16(%rdx)
movq %r14, %r10
movw %di, 0x18(%rdx)
movw %r12w, 0x1a(%rdx)
addl $0x3, %r8d
movw %r8w, 0x1c(%rdx)
movw %r8w, 0x1e(%rdx)
leal 0x3(%r9), %r8d
movw %r8w, 0x20(%rdx)
movw %di, 0x22(%rdx)
addq $0x24, %rdx
movq %rdx, 0x50(%rbx)
incq %rsi
movl %r9d, %r8d
jmp 0x62ef4
leaq (%rax,%r11,8), %rax
addq $0x18, %rax
shlq $0x5, %r11
xorl %ecx, %ecx
movl -0x30(%rbp), %edi
movl -0x3c(%rbp), %r8d
cmpq %rcx, %r11
je 0x63193
movq 0x48(%rbx), %rdx
movq -0x18(%rax,%rcx), %rsi
movq %rsi, (%rdx)
movq 0x48(%rbx), %rdx
movq %r13, 0x8(%rdx)
movq 0x48(%rbx), %rdx
movl %r8d, 0x10(%rdx)
movq -0x10(%rax,%rcx), %rsi
movq %rsi, 0x14(%rdx)
movq 0x48(%rbx), %rdx
movq %r13, 0x1c(%rdx)
movq 0x48(%rbx), %rdx
movl %edi, 0x24(%rdx)
movq -0x8(%rax,%rcx), %rsi
movq %rsi, 0x28(%rdx)
movq 0x48(%rbx), %rdx
movq %r13, 0x30(%rdx)
movq 0x48(%rbx), %rdx
movl %edi, 0x38(%rdx)
movq (%rax,%rcx), %rsi
movq %rsi, 0x3c(%rdx)
movq 0x48(%rbx), %rdx
movq %r13, 0x44(%rdx)
movq 0x48(%rbx), %rdx
movl %r8d, 0x4c(%rdx)
addq $0x50, %rdx
movq %rdx, 0x48(%rbx)
addq $0x20, %rcx
jmp 0x6309b
movq -0x38(%rbp), %rcx
leaq (%rax,%rcx,8), %rax
addq $0x8, %rax
leaq (,%rcx,8), %rcx
xorl %edx, %edx
movl -0x30(%rbp), %r8d
movl -0x3c(%rbp), %r9d
cmpq %rdx, %rcx
je 0x63193
movq 0x48(%rbx), %rsi
movq (%r15,%rdx), %rdi
movq %rdi, (%rsi)
movq 0x48(%rbx), %rsi
movq %r13, 0x8(%rsi)
movq 0x48(%rbx), %rsi
movl %r8d, 0x10(%rsi)
movq -0x8(%rax,%rdx,2), %rdi
movq %rdi, 0x14(%rsi)
movq 0x48(%rbx), %rsi
movq %r13, 0x1c(%rsi)
movq 0x48(%rbx), %rsi
movl %r9d, 0x24(%rsi)
movq (%rax,%rdx,2), %rdi
movq %rdi, 0x28(%rsi)
movq 0x48(%rbx), %rsi
movq %r13, 0x30(%rsi)
movq 0x48(%rbx), %rsi
movl %r9d, 0x38(%rsi)
addq $0x3c, %rsi
movq %rsi, 0x48(%rbx)
addq $0x8, %rdx
jmp 0x63134
movzwl -0x54(%rbp), %eax
addl %eax, 0x34(%rbx)
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop