// File: /workspace/github_cpp_makefile_star2_O3/donfreiday[P]gb/./imgui/imgui_draw.cpp
// Function: ImDrawList::AddPolyline(ImVec2 const*, int, unsigned int, bool, float, bool)
void ImDrawList::AddPolyline(const ImVec2* points, const int points_count, ImU32 col, bool closed, float thickness, bool anti_aliased)
{
    if (points_count < 2)
        return;

    const ImVec2 uv = GImGui->FontTexUvWhitePixel;
    anti_aliased &= GImGui->Style.AntiAliasedLines;
    //if (ImGui::GetIO().KeyCtrl) anti_aliased = false; // Debug

    int count = points_count;
    if (!closed)
        count = points_count-1;

    const bool thick_line = thickness > 1.0f;
    if (anti_aliased)
    {
        // Anti-aliased stroke
        const float AA_SIZE = 1.0f;
        const ImU32 col_trans = col & 0x00ffffff;

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

        // Temporary buffer
        ImVec2* temp_normals = (ImVec2*)alloca(points_count * (thick_line ? 5 : 3) * sizeof(ImVec2));
        ImVec2* temp_points = temp_normals + points_count;

        for (int i1 = 0; i1 < count; i1++)
        {
            const int i2 = (i1+1) == points_count ? 0 : i1+1;
            ImVec2 diff = points[i2] - points[i1];
            diff *= ImInvLength(diff, 1.0f);
            temp_normals[i1].x = diff.y;
            temp_normals[i1].y = -diff.x;
        }
        if (!closed)
            temp_normals[points_count-1] = temp_normals[points_count-2];

        if (!thick_line)
        {
            if (!closed)
            {
                temp_points[0] = points[0] + temp_normals[0] * AA_SIZE;
                temp_points[1] = points[0] - temp_normals[0] * AA_SIZE;
                temp_points[(points_count-1)*2+0] = points[points_count-1] + temp_normals[points_count-1] * AA_SIZE;
                temp_points[(points_count-1)*2+1] = points[points_count-1] - temp_normals[points_count-1] * AA_SIZE;
            }

            // FIXME-OPT: Merge the different loops, possibly remove the temporary buffer.
            unsigned int idx1 = _VtxCurrentIdx;
            for (int i1 = 0; i1 < count; i1++)
            {
                const int i2 = (i1+1) == points_count ? 0 : i1+1;
                unsigned int idx2 = (i1+1) == points_count ? _VtxCurrentIdx : idx1+3;

                // Average normals
                ImVec2 dm = (temp_normals[i1] + temp_normals[i2]) * 0.5f;
                float dmr2 = dm.x*dm.x + dm.y*dm.y;
                if (dmr2 > 0.000001f)
                {
                    float scale = 1.0f / dmr2;
                    if (scale > 100.0f) scale = 100.0f;
                    dm *= scale;
                }
                dm *= AA_SIZE;
                temp_points[i2*2+0] = points[i2] + dm;
                temp_points[i2*2+1] = points[i2] - dm;

                // Add indexes
                _IdxWritePtr[0] = (ImDrawIdx)(idx2+0); _IdxWritePtr[1] = (ImDrawIdx)(idx1+0); _IdxWritePtr[2] = (ImDrawIdx)(idx1+2);
                _IdxWritePtr[3] = (ImDrawIdx)(idx1+2); _IdxWritePtr[4] = (ImDrawIdx)(idx2+2); _IdxWritePtr[5] = (ImDrawIdx)(idx2+0);
                _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;

                idx1 = idx2;
            }

            // Add vertexes
            for (int i = 0; i < points_count; i++)
            {
                _VtxWritePtr[0].pos = points[i];          _VtxWritePtr[0].uv = uv; _VtxWritePtr[0].col = col;
                _VtxWritePtr[1].pos = temp_points[i*2+0]; _VtxWritePtr[1].uv = uv; _VtxWritePtr[1].col = col_trans;
                _VtxWritePtr[2].pos = temp_points[i*2+1]; _VtxWritePtr[2].uv = uv; _VtxWritePtr[2].col = col_trans;
                _VtxWritePtr += 3;
            }
        }
        else
        {
            const float half_inner_thickness = (thickness - AA_SIZE) * 0.5f;
            if (!closed)
            {
                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_count-1)*4+0] = points[points_count-1] + temp_normals[points_count-1] * (half_inner_thickness + AA_SIZE);
                temp_points[(points_count-1)*4+1] = points[points_count-1] + temp_normals[points_count-1] * (half_inner_thickness);
                temp_points[(points_count-1)*4+2] = points[points_count-1] - temp_normals[points_count-1] * (half_inner_thickness);
                temp_points[(points_count-1)*4+3] = points[points_count-1] - temp_normals[points_count-1] * (half_inner_thickness + AA_SIZE);
            }

            // FIXME-OPT: Merge the different loops, possibly remove the temporary buffer.
            unsigned int idx1 = _VtxCurrentIdx;
            for (int i1 = 0; i1 < count; i1++)
            {
                const int i2 = (i1+1) == points_count ? 0 : i1+1;
                unsigned int idx2 = (i1+1) == points_count ? _VtxCurrentIdx : idx1+4;

                // Average normals
                ImVec2 dm = (temp_normals[i1] + temp_normals[i2]) * 0.5f;
                float dmr2 = dm.x*dm.x + dm.y*dm.y;
                if (dmr2 > 0.000001f)
                {
                    float scale = 1.0f / dmr2;
                    if (scale > 100.0f) scale = 100.0f;
                    dm *= scale;
                }
                ImVec2 dm_out = dm * (half_inner_thickness + AA_SIZE);
                ImVec2 dm_in = dm * half_inner_thickness;
                temp_points[i2*4+0] = points[i2] + dm_out;
                temp_points[i2*4+1] = points[i2] + dm_in;
                temp_points[i2*4+2] = points[i2] - dm_in;
                temp_points[i2*4+3] = points[i2] - dm_out;

                // 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 vertexes
            for (int i = 0; i < points_count; i++)
            {
                _VtxWritePtr[0].pos = temp_points[i*4+0]; _VtxWritePtr[0].uv = uv; _VtxWritePtr[0].col = col_trans;
                _VtxWritePtr[1].pos = temp_points[i*4+1]; _VtxWritePtr[1].uv = uv; _VtxWritePtr[1].col = col;
                _VtxWritePtr[2].pos = temp_points[i*4+2]; _VtxWritePtr[2].uv = uv; _VtxWritePtr[2].col = col;
                _VtxWritePtr[3].pos = temp_points[i*4+3]; _VtxWritePtr[3].uv = uv; _VtxWritePtr[3].col = col_trans;
                _VtxWritePtr += 4;
            }
        }
        _VtxCurrentIdx += (ImDrawIdx)vtx_count;
    }
    else
    {
        // Non Anti-aliased Stroke
        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];
            ImVec2 diff = p2 - p1;
            diff *= ImInvLength(diff, 1.0f);

            const float dx = diff.x * (thickness * 0.5f);
            const float dy = diff.y * (thickness * 0.5f);
            _VtxWritePtr[0].pos.x = p1.x + dy; _VtxWritePtr[0].pos.y = p1.y - dx; _VtxWritePtr[0].uv = uv; _VtxWritePtr[0].col = col;
            _VtxWritePtr[1].pos.x = p2.x + dy; _VtxWritePtr[1].pos.y = p2.y - dx; _VtxWritePtr[1].uv = uv; _VtxWritePtr[1].col = col;
            _VtxWritePtr[2].pos.x = p2.x - dy; _VtxWritePtr[2].pos.y = p2.y + dx; _VtxWritePtr[2].uv = uv; _VtxWritePtr[2].col = col;
            _VtxWritePtr[3].pos.x = p1.x - dy; _VtxWritePtr[3].pos.y = p1.y + dx; _VtxWritePtr[3].uv = 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 0x2e5da
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, %r14d
movl %edx, %r12d
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x277dd(%rip), %rax     # 0x55480
movq (%rax), %rax
movq 0x1720(%rax), %r13
cmpb $0x0, 0x1458(%rax)
sete %al
xorb $0x1, %r9b
leal -0x1(%r12), %ecx
testb %r8b, %r8b
movl %ecx, %edi
cmovnel %edx, %edi
orb %al, %r9b
movss %xmm0, -0x30(%rbp)
movq %rdi, -0x38(%rbp)
jne 0x2de2b
movl %r8d, -0x40(%rbp)
movq %rcx, -0x50(%rbp)
movl %r14d, %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
movl %eax, -0x3c(%rbp)
leal (,%r12,4), %eax
xorl %ecx, %ecx
ucomiss 0xf692(%rip), %xmm0     # 0x3d390
seta %cl
movq %rcx, -0x58(%rbp)
movl $0x12, %ecx
movl $0xc, %esi
cmoval %ecx, %esi
leal (%r12,%r12,2), %edx
cmoval %eax, %edx
imull %edi, %esi
movq %rbx, %rdi
movl %edx, -0x44(%rbp)
callq 0x2d97a
movq -0x58(%rbp), %rax
leal 0x3(,%rax,2), %eax
imull %r12d, %eax
leaq 0xf(,%rax,8), %rax
andq $-0x10, %rax
movq %rsp, %rcx
subq %rax, %rcx
movq %rcx, %rsp
movl %r12d, %eax
leaq (%rcx,%rax,8), %rdx
movl -0x38(%rbp), %esi
movq %rsi, %rdi
negq %rdi
movl $0x1, %r8d
xorl %r9d, %r9d
movss 0xf624(%rip), %xmm0     # 0x3d390
movaps 0xf5bd(%rip), %xmm1     # 0x3d330
cmpq %r8, %rax
movl %r8d, %r10d
cmoveq %r9, %r10
movss (%r15,%r10,8), %xmm2
subss -0x8(%r15,%r8,8), %xmm2
movss 0x4(%r15,%r10,8), %xmm3
subss -0x4(%r15,%r8,8), %xmm3
movaps %xmm3, %xmm4
mulss %xmm3, %xmm4
movaps %xmm2, %xmm5
mulss %xmm2, %xmm5
addss %xmm4, %xmm5
xorps %xmm4, %xmm4
sqrtss %xmm5, %xmm4
movaps %xmm0, %xmm6
divss %xmm4, %xmm6
xorps %xmm4, %xmm4
cmpltss %xmm5, %xmm4
andps %xmm4, %xmm6
andnps %xmm0, %xmm4
orps %xmm6, %xmm4
mulss %xmm4, %xmm3
movss %xmm3, -0x8(%rcx,%r8,8)
xorps %xmm1, %xmm2
mulss %xmm4, %xmm2
movss %xmm2, -0x4(%rcx,%r8,8)
leaq (%rdi,%r8), %r10
incq %r10
incq %r8
cmpq $0x1, %r10
jne 0x2dd73
cmpb $0x0, -0x40(%rbp)
movq %rdx, -0x38(%rbp)
je 0x2dfd8
movss -0x30(%rbp), %xmm13
ucomiss 0xf582(%rip), %xmm13    # 0x3d390
jbe 0x2e415
addss 0xf57f(%rip), %xmm13    # 0x3d39c
mulss 0xf5a6(%rip), %xmm13    # 0x3d3cc
jmp 0x2e13f
leal (%rdi,%rdi), %eax
leal (%rax,%rax,2), %esi
leal (,%rdi,4), %edx
movq %rbx, %rdi
callq 0x2d97a
movss -0x30(%rbp), %xmm8
mulss 0xf57d(%rip), %xmm8     # 0x3d3cc
movl %r12d, %eax
movl -0x38(%rbp), %ecx
movq 0x40(%rbx), %rdi
negq %rcx
movl $0x1, %edx
xorl %esi, %esi
movss 0xf525(%rip), %xmm0     # 0x3d390
cmpq %rdx, %rax
movl %edx, %r8d
cmoveq %rsi, %r8
movss (%r15,%r8,8), %xmm1
movss 0x4(%r15,%r8,8), %xmm5
movss -0x8(%r15,%rdx,8), %xmm4
movss -0x4(%r15,%rdx,8), %xmm3
subss %xmm4, %xmm1
subss %xmm3, %xmm5
movaps %xmm5, %xmm2
mulss %xmm5, %xmm2
movaps %xmm1, %xmm6
mulss %xmm1, %xmm6
addss %xmm2, %xmm6
xorps %xmm2, %xmm2
sqrtss %xmm6, %xmm2
movaps %xmm0, %xmm7
divss %xmm2, %xmm7
xorps %xmm2, %xmm2
cmpltss %xmm6, %xmm2
andps %xmm2, %xmm7
andnps %xmm0, %xmm2
orps %xmm7, %xmm2
mulss %xmm2, %xmm1
mulss %xmm5, %xmm2
mulss %xmm8, %xmm1
mulss %xmm8, %xmm2
addss %xmm2, %xmm4
movss %xmm4, (%rdi)
subss %xmm1, %xmm3
movss %xmm3, 0x4(%rdi)
movq %r13, 0x8(%rdi)
movq 0x40(%rbx), %rdi
movl %r14d, 0x10(%rdi)
movss (%r15,%r8,8), %xmm3
addss %xmm2, %xmm3
movss %xmm3, 0x14(%rdi)
movss 0x4(%r15,%r8,8), %xmm3
subss %xmm1, %xmm3
movss %xmm3, 0x18(%rdi)
movq %r13, 0x1c(%rdi)
movq 0x40(%rbx), %rdi
movl %r14d, 0x24(%rdi)
movss (%r15,%r8,8), %xmm3
subss %xmm2, %xmm3
movss %xmm3, 0x28(%rdi)
movss 0x4(%r15,%r8,8), %xmm3
addss %xmm1, %xmm3
movss %xmm3, 0x2c(%rdi)
movq %r13, 0x30(%rdi)
movq 0x40(%rbx), %rdi
movl %r14d, 0x38(%rdi)
movss -0x8(%r15,%rdx,8), %xmm3
subss %xmm2, %xmm3
movss %xmm3, 0x3c(%rdi)
addss -0x4(%r15,%rdx,8), %xmm1
movss %xmm1, 0x40(%rdi)
movq %r13, 0x44(%rdi)
movq 0x40(%rbx), %rdi
movl %r14d, 0x4c(%rdi)
addq $0x50, %rdi
movq %rdi, 0x40(%rbx)
movl 0x38(%rbx), %r8d
movq 0x48(%rbx), %r9
movw %r8w, (%r9)
leal 0x1(%r8), %r10d
movw %r10w, 0x2(%r9)
leal 0x2(%r8), %r10d
movw %r10w, 0x4(%r9)
movw %r8w, 0x6(%r9)
movw %r10w, 0x8(%r9)
leal 0x3(%r8), %r10d
movw %r10w, 0xa(%r9)
addq $0xc, %r9
movq %r9, 0x48(%rbx)
addl $0x4, %r8d
movl %r8d, 0x38(%rbx)
leaq (%rcx,%rdx), %r8
incq %r8
incq %rdx
cmpq $0x1, %r8
jne 0x2de6b
jmp 0x2e5cc
movss -0x30(%rbp), %xmm13
ucomiss 0xf3aa(%rip), %xmm13    # 0x3d390
movq -0x10(%rdx), %rdi
movq %rdi, -0x8(%rdx)
jbe 0x2e399
addss 0xf39f(%rip), %xmm13    # 0x3d39c
mulss 0xf3c6(%rip), %xmm13    # 0x3d3cc
movss 0xf382(%rip), %xmm1     # 0x3d390
addss %xmm13, %xmm1
movss (%rcx), %xmm2
movss 0x4(%rcx), %xmm3
movaps %xmm13, %xmm4
mulss %xmm2, %xmm4
mulss %xmm1, %xmm2
movaps %xmm1, %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, (%rdx)
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(%rdx)
movq -0x50(%rbp), %r8
movl %r8d, %edi
movss (%rcx,%rdi,8), %xmm4
mulss %xmm1, %xmm4
movss 0x4(%rcx,%rdi,8), %xmm5
mulss %xmm1, %xmm5
movss (%r15,%rdi,8), %xmm2
movss 0x4(%r15,%rdi,8), %xmm3
addss %xmm2, %xmm4
addss %xmm3, %xmm5
unpcklps %xmm5, %xmm4            # xmm4 = xmm4[0],xmm5[0],xmm4[1],xmm5[1]
shll $0x2, %r8d
movlps %xmm4, (%rdx,%r8,8)
movss (%rcx,%rdi,8), %xmm4
mulss %xmm13, %xmm4
movss 0x4(%rcx,%rdi,8), %xmm5
mulss %xmm13, %xmm5
addss %xmm2, %xmm4
addss %xmm3, %xmm5
unpcklps %xmm5, %xmm4            # xmm4 = xmm4[0],xmm5[0],xmm4[1],xmm5[1]
movlps %xmm4, 0x8(%rdx,%r8,8)
movss (%rcx,%rdi,8), %xmm4
mulss %xmm13, %xmm4
movss 0x4(%rcx,%rdi,8), %xmm5
mulss %xmm13, %xmm5
movaps %xmm2, %xmm6
subss %xmm4, %xmm6
movaps %xmm3, %xmm4
subss %xmm5, %xmm4
unpcklps %xmm4, %xmm6            # xmm6 = xmm6[0],xmm4[0],xmm6[1],xmm4[1]
movlps %xmm6, 0x10(%rdx,%r8,8)
movss (%rcx,%rdi,8), %xmm4
mulss %xmm1, %xmm4
mulss 0x4(%rcx,%rdi,8), %xmm1
subss %xmm4, %xmm2
subss %xmm1, %xmm3
unpcklps %xmm3, %xmm2            # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
movlps %xmm2, 0x18(%rdx,%r8,8)
movl 0x38(%rbx), %r10d
movss 0xf245(%rip), %xmm1     # 0x3d390
addss %xmm13, %xmm1
movq 0x48(%rbx), %rdi
negq %rsi
movq %rsi, -0x30(%rbp)
movl $0x1, %r8d
movss 0xf263(%rip), %xmm2     # 0x3d3cc
movss 0x1464f(%rip), %xmm3    # 0x427c0
movss 0xf2ff(%rip), %xmm4     # 0x3d478
cmpq %r8, %rax
movl %r8d, %r12d
movl $0x0, %edx
cmovel %edx, %r12d
leal 0x4(%r10), %r11d
cmovel 0x38(%rbx), %r11d
movss -0x8(%rcx,%r8,8), %xmm5
addss (%rcx,%r12,8), %xmm5
movss -0x4(%rcx,%r8,8), %xmm6
addss 0x4(%rcx,%r12,8), %xmm6
mulss %xmm2, %xmm5
mulss %xmm2, %xmm6
movaps %xmm6, %xmm8
mulss %xmm6, %xmm8
movaps %xmm5, %xmm7
mulss %xmm5, %xmm7
addss %xmm8, %xmm7
ucomiss %xmm3, %xmm7
jbe 0x2e1e7
movaps %xmm0, %xmm8
divss %xmm7, %xmm8
movaps %xmm4, %xmm7
minss %xmm8, %xmm7
mulss %xmm7, %xmm5
mulss %xmm7, %xmm6
unpcklps %xmm6, %xmm5            # xmm5 = xmm5[0],xmm6[0],xmm5[1],xmm6[1]
movq -0x38(%rbp), %rdx
movaps %xmm5, %xmm8
shufps $0x55, %xmm5, %xmm8     # xmm8 = xmm8[1,1],xmm5[1,1]
movaps %xmm1, %xmm6
mulss %xmm5, %xmm6
movaps %xmm1, %xmm7
mulss %xmm8, %xmm7
mulss %xmm13, %xmm5
mulss %xmm13, %xmm8
movss (%r15,%r12,8), %xmm9
movss 0x4(%r15,%r12,8), %xmm10
movaps %xmm9, %xmm11
addss %xmm6, %xmm11
movaps %xmm10, %xmm12
addss %xmm7, %xmm12
unpcklps %xmm12, %xmm11          # xmm11 = xmm11[0],xmm12[0],xmm11[1],xmm12[1]
leal (,%r12,4), %r12d
movlps %xmm11, (%rdx,%r12,8)
movaps %xmm9, %xmm11
addss %xmm5, %xmm11
movaps %xmm10, %xmm12
addss %xmm8, %xmm12
unpcklps %xmm12, %xmm11          # xmm11 = xmm11[0],xmm12[0],xmm11[1],xmm12[1]
movlps %xmm11, 0x8(%rdx,%r12,8)
movaps %xmm9, %xmm11
subss %xmm5, %xmm11
movaps %xmm10, %xmm5
subss %xmm8, %xmm5
unpcklps %xmm5, %xmm11           # xmm11 = xmm11[0],xmm5[0],xmm11[1],xmm5[1]
movlps %xmm11, 0x10(%rdx,%r12,8)
subss %xmm6, %xmm9
subss %xmm7, %xmm10
unpcklps %xmm10, %xmm9           # xmm9 = xmm9[0],xmm10[0],xmm9[1],xmm10[1]
movlps %xmm9, 0x18(%rdx,%r12,8)
leal 0x1(%r11), %r12d
movw %r12w, (%rdi)
leal 0x1(%r10), %r9d
movw %r9w, 0x2(%rdi)
leal 0x2(%r10), %esi
movw %si, 0x4(%rdi)
movw %si, 0x6(%rdi)
leal 0x2(%r11), %edx
movw %dx, 0x8(%rdi)
movw %r12w, 0xa(%rdi)
movw %r12w, 0xc(%rdi)
movw %r9w, 0xe(%rdi)
movw %r10w, 0x10(%rdi)
movw %r10w, 0x12(%rdi)
movw %r11w, 0x14(%rdi)
movw %r12w, 0x16(%rdi)
movw %dx, 0x18(%rdi)
movw %si, 0x1a(%rdi)
addl $0x3, %r10d
movw %r10w, 0x1c(%rdi)
movw %r10w, 0x1e(%rdi)
leal 0x3(%r11), %esi
movw %si, 0x20(%rdi)
movw %dx, 0x22(%rdi)
addq $0x24, %rdi
movq -0x30(%rbp), %rdx
addq %r8, %rdx
incq %rdx
incq %r8
movl %r11d, %r10d
cmpq $0x1, %rdx
jne 0x2e179
movq %rdi, 0x48(%rbx)
movq 0x40(%rbx), %rdx
leaq (%rcx,%rax,8), %rcx
addq $0x18, %rcx
movl -0x3c(%rbp), %edi
movq -0x18(%rcx), %rsi
movq %rsi, (%rdx)
movq 0x40(%rbx), %rdx
movq %r13, 0x8(%rdx)
movq 0x40(%rbx), %rdx
movl %edi, 0x10(%rdx)
movq -0x10(%rcx), %rsi
movq %rsi, 0x14(%rdx)
movq 0x40(%rbx), %rdx
movq %r13, 0x1c(%rdx)
movq 0x40(%rbx), %rdx
movl %r14d, 0x24(%rdx)
movq -0x8(%rcx), %rsi
movq %rsi, 0x28(%rdx)
movq 0x40(%rbx), %rdx
movq %r13, 0x30(%rdx)
movq 0x40(%rbx), %rdx
movl %r14d, 0x38(%rdx)
movq (%rcx), %rsi
movq %rsi, 0x3c(%rdx)
movq 0x40(%rbx), %rdx
movq %r13, 0x44(%rdx)
movq 0x40(%rbx), %rdx
movl %edi, 0x4c(%rdx)
addq $0x50, %rdx
movq %rdx, 0x40(%rbx)
addq $0x20, %rcx
decq %rax
jne 0x2e327
jmp 0x2e5c5
movss (%rcx), %xmm1
movss 0x4(%rcx), %xmm2
movss (%r15), %xmm3
movss 0x4(%r15), %xmm4
movaps %xmm1, %xmm5
addss %xmm3, %xmm5
movaps %xmm2, %xmm6
addss %xmm4, %xmm6
unpcklps %xmm6, %xmm5            # xmm5 = xmm5[0],xmm6[0],xmm5[1],xmm6[1]
subss %xmm1, %xmm3
subss %xmm2, %xmm4
unpcklps %xmm4, %xmm3            # xmm3 = xmm3[0],xmm4[0],xmm3[1],xmm4[1]
movlhps %xmm3, %xmm5            # xmm5 = xmm5[0],xmm3[0]
movups %xmm5, (%rdx)
movq -0x50(%rbp), %r8
movl %r8d, %edi
movss (%r15,%rdi,8), %xmm1
movss 0x4(%r15,%rdi,8), %xmm2
movss (%rcx,%rdi,8), %xmm3
addss %xmm1, %xmm3
movss 0x4(%rcx,%rdi,8), %xmm4
addss %xmm2, %xmm4
unpcklps %xmm4, %xmm3            # xmm3 = xmm3[0],xmm4[0],xmm3[1],xmm4[1]
addl %r8d, %r8d
movlps %xmm3, (%rdx,%r8,8)
subss (%rcx,%rdi,8), %xmm1
subss 0x4(%rcx,%rdi,8), %xmm2
unpcklps %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movlps %xmm1, 0x8(%rdx,%r8,8)
movl 0x38(%rbx), %r10d
movq 0x48(%rbx), %rdi
negq %rsi
movl $0x1, %r8d
movss 0xef9e(%rip), %xmm1     # 0x3d3cc
movss 0x1438a(%rip), %xmm2    # 0x427c0
movss 0xf03a(%rip), %xmm3     # 0x3d478
cmpq %r8, %rax
movl %r8d, %r12d
movl $0x0, %r9d
cmovel %r9d, %r12d
leal 0x3(%r10), %r11d
cmovel 0x38(%rbx), %r11d
movss -0x8(%rcx,%r8,8), %xmm4
addss (%rcx,%r12,8), %xmm4
movss -0x4(%rcx,%r8,8), %xmm5
addss 0x4(%rcx,%r12,8), %xmm5
mulss %xmm1, %xmm4
mulss %xmm1, %xmm5
movaps %xmm5, %xmm7
mulss %xmm5, %xmm7
movaps %xmm4, %xmm6
mulss %xmm4, %xmm6
addss %xmm7, %xmm6
ucomiss %xmm2, %xmm6
jbe 0x2e4a7
movaps %xmm0, %xmm7
divss %xmm6, %xmm7
movaps %xmm3, %xmm6
minss %xmm7, %xmm6
mulss %xmm6, %xmm4
mulss %xmm6, %xmm5
unpcklps %xmm5, %xmm4            # xmm4 = xmm4[0],xmm5[0],xmm4[1],xmm5[1]
movaps %xmm4, %xmm5
shufps $0x55, %xmm4, %xmm5     # xmm5 = xmm5[1,1],xmm4[1,1]
movss (%r15,%r12,8), %xmm6
movss 0x4(%r15,%r12,8), %xmm7
movaps %xmm6, %xmm8
addss %xmm4, %xmm8
movaps %xmm5, %xmm9
addss %xmm7, %xmm9
unpcklps %xmm9, %xmm8            # xmm8 = xmm8[0],xmm9[0],xmm8[1],xmm9[1]
addl %r12d, %r12d
movlps %xmm8, (%rdx,%r12,8)
subss %xmm4, %xmm6
subss %xmm5, %xmm7
unpcklps %xmm7, %xmm6            # xmm6 = xmm6[0],xmm7[0],xmm6[1],xmm7[1]
movlps %xmm6, 0x8(%rdx,%r12,8)
movw %r11w, (%rdi)
movw %r10w, 0x2(%rdi)
leal 0x2(%r10), %r12d
movw %r12w, 0x4(%rdi)
movw %r12w, 0x6(%rdi)
leal 0x2(%r11), %r12d
movw %r12w, 0x8(%rdi)
movw %r11w, 0xa(%rdi)
leal 0x1(%r11), %r12d
movw %r12w, 0xc(%rdi)
movl %r10d, %r9d
incl %r9d
movw %r9w, 0xe(%rdi)
movw %r10w, 0x10(%rdi)
movw %r10w, 0x12(%rdi)
movw %r11w, 0x14(%rdi)
movw %r12w, 0x16(%rdi)
addq $0x18, %rdi
leaq (%rsi,%r8), %r9
incq %r9
incq %r8
movl %r11d, %r10d
cmpq $0x1, %r9
jne 0x2e43e
movq %rdi, 0x48(%rbx)
movq 0x40(%rbx), %rsi
leaq (%rcx,%rax,8), %rcx
addq $0x8, %rcx
xorl %edx, %edx
movl -0x3c(%rbp), %r8d
movq (%r15,%rdx,8), %rdi
movq %rdi, (%rsi)
movq 0x40(%rbx), %rsi
movq %r13, 0x8(%rsi)
movq 0x40(%rbx), %rsi
movl %r14d, 0x10(%rsi)
movq -0x8(%rcx), %rdi
movq %rdi, 0x14(%rsi)
movq 0x40(%rbx), %rsi
movq %r13, 0x1c(%rsi)
movq 0x40(%rbx), %rsi
movl %r8d, 0x24(%rsi)
movq (%rcx), %rdi
movq %rdi, 0x28(%rsi)
movq 0x40(%rbx), %rsi
movq %r13, 0x30(%rsi)
movq 0x40(%rbx), %rsi
movl %r8d, 0x38(%rsi)
addq $0x3c, %rsi
movq %rsi, 0x40(%rbx)
incq %rdx
addq $0x10, %rcx
cmpq %rdx, %rax
jne 0x2e56b
movzwl -0x44(%rbp), %eax
addl %eax, 0x38(%rbx)
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop