// File: /workspace/github_cpp_makefile_star2_O1/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 0x2ec52
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r15
movq %rdi, %rbx
movl %ecx, -0x2c(%rbp)
movq %rdx, %r12
leaq 0x2726f(%rip), %rax     # 0x55490
movq (%rax), %rax
movq 0x1720(%rax), %r13
cmpb $0x0, 0x1458(%rax)
sete %al
xorb $0x1, %r9b
leal -0x1(%rdx), %ecx
movl %r8d, -0x58(%rbp)
testb %r8b, %r8b
movl %ecx, %r14d
cmovnel %r12d, %r14d
orb %al, %r9b
movss %xmm0, -0x3c(%rbp)
jne 0x2e7c2
movq %rcx, -0x68(%rbp)
leal (,%r12,4), %eax
movq %r14, %rdi
movq %r14, -0x50(%rbp)
xorl %r14d, %r14d
ucomiss 0xf10b(%rip), %xmm0     # 0x3d380
seta %r14b
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, -0x54(%rbp)
callq 0x2def2
leal 0x3(,%r14,2), %eax
imull %r12d, %eax
leaq 0xf(,%rax,8), %rax
andq $-0x10, %rax
movq %rsp, %rcx
subq %rax, %rcx
movq %rcx, -0x38(%rbp)
movq %rcx, %rsp
movq %r12, -0x70(%rbp)
movl %r12d, %r8d
cmpl $0x0, -0x50(%rbp)
movl -0x2c(%rbp), %r9d
movq %r8, -0x48(%rbp)
jle 0x2e3ac
movl -0x50(%rbp), %r14d
negq %r14
movl $0x1, %r12d
xorl %ecx, %ecx
movss 0xf090(%rip), %xmm2     # 0x3d380
xorps %xmm3, %xmm3
movaps 0xf026(%rip), %xmm4     # 0x3d320
cmpq %r12, %r8
movq %r12, %rax
cmoveq %rcx, %rax
movss (%r15,%rax,8), %xmm5
movss 0x4(%r15,%rax,8), %xmm6
subss -0x8(%r15,%r12,8), %xmm5
subss -0x4(%r15,%r12,8), %xmm6
movaps %xmm6, %xmm1
mulss %xmm6, %xmm1
movaps %xmm5, %xmm0
mulss %xmm5, %xmm0
addss %xmm1, %xmm0
ucomiss %xmm3, %xmm0
movaps %xmm2, %xmm1
jbe 0x2e37b
jb 0x2e341
sqrtss %xmm0, %xmm0
jmp 0x2e374
movaps %xmm5, -0x80(%rbp)
movss %xmm6, -0x5c(%rbp)
callq 0x7740
movss -0x5c(%rbp), %xmm6
movaps -0x80(%rbp), %xmm5
movaps 0xefc1(%rip), %xmm4     # 0x3d320
xorps %xmm3, %xmm3
movss 0xf016(%rip), %xmm2     # 0x3d380
xorl %ecx, %ecx
movq -0x48(%rbp), %r8
movl -0x2c(%rbp), %r9d
movaps %xmm2, %xmm1
divss %xmm0, %xmm1
mulss %xmm1, %xmm6
movq -0x38(%rbp), %rax
movss %xmm6, -0x8(%rax,%r12,8)
xorps %xmm4, %xmm5
mulss %xmm1, %xmm5
movss %xmm5, -0x4(%rax,%r12,8)
leaq (%r14,%r12), %rax
incq %rax
incq %r12
cmpq $0x1, %rax
jne 0x2e2fa
movq -0x38(%rbp), %rax
leaq (%rax,%r8,8), %rcx
movl -0x58(%rbp), %edx
testb %dl, %dl
jne 0x2e3c3
movq -0x10(%rcx), %rax
movq %rax, -0x8(%rcx)
movl %r9d, %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
movss -0x3c(%rbp), %xmm13
ucomiss 0xefa7(%rip), %xmm13    # 0x3d380
movq -0x50(%rbp), %rdi
jbe 0x2e9bc
addss 0xefa0(%rip), %xmm13    # 0x3d38c
mulss 0xefc7(%rip), %xmm13    # 0x3d3bc
testb %dl, %dl
jne 0x2e536
movss 0xef7b(%rip), %xmm0     # 0x3d380
addss %xmm13, %xmm0
movq -0x38(%rbp), %rsi
movss (%rsi), %xmm2
movss 0x4(%rsi), %xmm3
movaps %xmm0, %xmm4
mulss %xmm2, %xmm4
movaps %xmm0, %xmm5
mulss %xmm3, %xmm5
movss (%r15), %xmm1
movss 0x4(%r15), %xmm6
movaps %xmm4, %xmm7
addss %xmm1, %xmm7
movaps %xmm5, %xmm8
addss %xmm6, %xmm8
unpcklps %xmm8, %xmm7            # xmm7 = xmm7[0],xmm8[0],xmm7[1],xmm8[1]
mulss %xmm13, %xmm2
mulss %xmm13, %xmm3
movaps %xmm1, %xmm8
subss %xmm2, %xmm8
addss %xmm1, %xmm2
movaps %xmm6, %xmm9
subss %xmm3, %xmm9
addss %xmm6, %xmm3
unpcklps %xmm3, %xmm2            # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
movlhps %xmm2, %xmm7            # xmm7 = xmm7[0],xmm2[0]
movups %xmm7, (%rcx)
unpcklps %xmm9, %xmm8            # xmm8 = xmm8[0],xmm9[0],xmm8[1],xmm9[1]
subss %xmm4, %xmm1
subss %xmm5, %xmm6
unpcklps %xmm6, %xmm1            # xmm1 = xmm1[0],xmm6[0],xmm1[1],xmm6[1]
movlhps %xmm1, %xmm8            # xmm8 = xmm8[0],xmm1[0]
movups %xmm8, 0x10(%rcx)
movq -0x68(%rbp), %r10
movl %r10d, %edx
movss (%rsi,%rdx,8), %xmm3
mulss %xmm0, %xmm3
movss 0x4(%rsi,%rdx,8), %xmm4
mulss %xmm0, %xmm4
movss (%r15,%rdx,8), %xmm1
movss 0x4(%r15,%rdx,8), %xmm2
addss %xmm1, %xmm3
addss %xmm2, %xmm4
unpcklps %xmm4, %xmm3            # xmm3 = xmm3[0],xmm4[0],xmm3[1],xmm4[1]
shll $0x2, %r10d
movlps %xmm3, (%rcx,%r10,8)
movss (%rsi,%rdx,8), %xmm3
mulss %xmm13, %xmm3
movss 0x4(%rsi,%rdx,8), %xmm4
mulss %xmm13, %xmm4
addss %xmm1, %xmm3
addss %xmm2, %xmm4
unpcklps %xmm4, %xmm3            # xmm3 = xmm3[0],xmm4[0],xmm3[1],xmm4[1]
movlps %xmm3, 0x8(%rcx,%r10,8)
movss (%rsi,%rdx,8), %xmm3
mulss %xmm13, %xmm3
movss 0x4(%rsi,%rdx,8), %xmm4
mulss %xmm13, %xmm4
movaps %xmm1, %xmm5
subss %xmm3, %xmm5
movaps %xmm2, %xmm3
subss %xmm4, %xmm3
unpcklps %xmm3, %xmm5            # xmm5 = xmm5[0],xmm3[0],xmm5[1],xmm3[1]
movlps %xmm5, 0x10(%rcx,%r10,8)
movss (%rsi,%rdx,8), %xmm3
mulss %xmm0, %xmm3
mulss 0x4(%rsi,%rdx,8), %xmm0
subss %xmm3, %xmm1
subss %xmm0, %xmm2
unpcklps %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movlps %xmm1, 0x18(%rcx,%r10,8)
testl %edi, %edi
jle 0x2e727
movl 0x38(%rbx), %r9d
movss 0xee36(%rip), %xmm0     # 0x3d380
addss %xmm13, %xmm0
movq 0x48(%rbx), %rdx
movl %edi, %esi
negq %rsi
movl $0x1, %edi
movss 0xee57(%rip), %xmm1     # 0x3d3bc
movss 0x142cf(%rip), %xmm2    # 0x4283c
movss 0xee0b(%rip), %xmm3     # 0x3d380
movss 0xeeeb(%rip), %xmm4     # 0x3d468
cmpq %rdi, %r8
movl %edi, %r11d
movl $0x0, %r8d
cmovel %r8d, %r11d
leal 0x4(%r9), %r10d
cmovel 0x38(%rbx), %r10d
movq -0x38(%rbp), %r8
movss -0x8(%r8,%rdi,8), %xmm5
addss (%r8,%r11,8), %xmm5
movss -0x4(%r8,%rdi,8), %xmm6
addss 0x4(%r8,%r11,8), %xmm6
mulss %xmm1, %xmm5
mulss %xmm1, %xmm6
movaps %xmm6, %xmm8
mulss %xmm6, %xmm8
movaps %xmm5, %xmm7
mulss %xmm5, %xmm7
addss %xmm8, %xmm7
ucomiss %xmm2, %xmm7
jbe 0x2e5f0
movaps %xmm3, %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]
movaps %xmm0, %xmm6
mulss %xmm5, %xmm6
movaps %xmm13, %xmm8
mulss %xmm5, %xmm8
shufps $0x55, %xmm5, %xmm5     # xmm5 = xmm5[1,1,1,1]
movaps %xmm0, %xmm7
mulss %xmm5, %xmm7
mulss %xmm13, %xmm5
movss (%r15,%r11,8), %xmm9
movss 0x4(%r15,%r11,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 (,%r11,4), %r11d
movlps %xmm11, (%rcx,%r11,8)
movaps %xmm9, %xmm11
addss %xmm8, %xmm11
movaps %xmm10, %xmm12
addss %xmm5, %xmm12
unpcklps %xmm12, %xmm11          # xmm11 = xmm11[0],xmm12[0],xmm11[1],xmm12[1]
movlps %xmm11, 0x8(%rcx,%r11,8)
movaps %xmm9, %xmm11
subss %xmm8, %xmm11
movaps %xmm10, %xmm8
subss %xmm5, %xmm8
unpcklps %xmm8, %xmm11           # xmm11 = xmm11[0],xmm8[0],xmm11[1],xmm8[1]
movlps %xmm11, 0x10(%rcx,%r11,8)
subss %xmm6, %xmm9
subss %xmm7, %xmm10
unpcklps %xmm10, %xmm9           # xmm9 = xmm9[0],xmm10[0],xmm9[1],xmm10[1]
movlps %xmm9, 0x18(%rcx,%r11,8)
leal 0x1(%r10), %r11d
movw %r11w, (%rdx)
leal 0x1(%r9), %r14d
movw %r14w, 0x2(%rdx)
leal 0x2(%r9), %r12d
movw %r12w, 0x4(%rdx)
movw %r12w, 0x6(%rdx)
leal 0x2(%r10), %r8d
movw %r8w, 0x8(%rdx)
movw %r11w, 0xa(%rdx)
movw %r11w, 0xc(%rdx)
movw %r14w, 0xe(%rdx)
movw %r9w, 0x10(%rdx)
movw %r9w, 0x12(%rdx)
movw %r10w, 0x14(%rdx)
movw %r11w, 0x16(%rdx)
movw %r8w, 0x18(%rdx)
movw %r12w, 0x1a(%rdx)
addl $0x3, %r9d
movw %r9w, 0x1c(%rdx)
movw %r9w, 0x1e(%rdx)
leal 0x3(%r10), %r9d
movw %r9w, 0x20(%rdx)
movw %r8w, 0x22(%rdx)
addq $0x24, %rdx
leaq (%rsi,%rdi), %r8
incq %r8
incq %rdi
movl %r10d, %r9d
cmpq $0x1, %r8
movq -0x48(%rbp), %r8
jne 0x2e57d
movq %rdx, 0x48(%rbx)
movl -0x2c(%rbp), %r9d
movq -0x70(%rbp), %rdx
cmpl $0x2, %edx
movl $0x1, %ecx
cmovgel %edx, %ecx
movq -0x38(%rbp), %rdx
leaq (%rdx,%r8,8), %rdx
addq $0x18, %rdx
shlq $0x5, %rcx
xorl %esi, %esi
movq 0x40(%rbx), %rdi
movq -0x18(%rdx,%rsi), %r8
movq %r8, (%rdi)
movq 0x40(%rbx), %rdi
movq %r13, 0x8(%rdi)
movq 0x40(%rbx), %rdi
movl %eax, 0x10(%rdi)
movq -0x10(%rdx,%rsi), %r8
movq %r8, 0x14(%rdi)
movq 0x40(%rbx), %rdi
movq %r13, 0x1c(%rdi)
movq 0x40(%rbx), %rdi
movl %r9d, 0x24(%rdi)
movq -0x8(%rdx,%rsi), %r8
movq %r8, 0x28(%rdi)
movq 0x40(%rbx), %rdi
movq %r13, 0x30(%rdi)
movq 0x40(%rbx), %rdi
movl %r9d, 0x38(%rdi)
movq (%rdx,%rsi), %r8
movq %r8, 0x3c(%rdi)
movq 0x40(%rbx), %rdi
movq %r13, 0x44(%rdi)
movq 0x40(%rbx), %rdi
movl %eax, 0x4c(%rdi)
addq $0x50, %rdi
movq %rdi, 0x40(%rbx)
addq $0x20, %rsi
cmpq %rsi, %rcx
jne 0x2e748
jmp 0x2ec3d
leal (%r14,%r14), %eax
leal (%rax,%rax,2), %esi
leal (,%r14,4), %edx
movq %rbx, %rdi
callq 0x2def2
movss -0x3c(%rbp), %xmm2
testl %r14d, %r14d
movl -0x2c(%rbp), %esi
jle 0x2ec44
mulss 0xebca(%rip), %xmm2     # 0x3d3bc
movl %r12d, %edi
movl %r14d, %r8d
negq %r8
movl $0x1, %r12d
xorl %r9d, %r9d
movss 0xeb74(%rip), %xmm3     # 0x3d380
xorps %xmm4, %xmm4
movss %xmm2, -0x3c(%rbp)
movq %r13, -0x88(%rbp)
movq %rdi, -0x80(%rbp)
cmpq %r12, %rdi
movq %r12, %r14
cmoveq %r9, %r14
movss (%r15,%r14,8), %xmm5
movss 0x4(%r15,%r14,8), %xmm6
subss -0x8(%r15,%r12,8), %xmm5
subss -0x4(%r15,%r12,8), %xmm6
movaps %xmm6, %xmm1
mulss %xmm6, %xmm1
movaps %xmm5, %xmm0
mulss %xmm5, %xmm0
addss %xmm1, %xmm0
ucomiss %xmm4, %xmm0
movaps %xmm3, %xmm1
jbe 0x2e8ad
jb 0x2e866
sqrtss %xmm0, %xmm0
jmp 0x2e8a6
movq %r8, %r13
movss %xmm5, -0x38(%rbp)
movss %xmm6, -0x48(%rbp)
callq 0x7740
movss -0x48(%rbp), %xmm6
movss -0x38(%rbp), %xmm5
xorps %xmm4, %xmm4
movss 0xeaf3(%rip), %xmm3     # 0x3d380
xorl %r9d, %r9d
movq %r13, %r8
movq -0x80(%rbp), %rdi
movq -0x88(%rbp), %r13
movss -0x3c(%rbp), %xmm2
movl -0x2c(%rbp), %esi
movaps %xmm3, %xmm1
divss %xmm0, %xmm1
mulss %xmm1, %xmm5
mulss %xmm1, %xmm6
mulss %xmm2, %xmm5
mulss %xmm2, %xmm6
movss -0x8(%r15,%r12,8), %xmm0
addss %xmm6, %xmm0
movq 0x40(%rbx), %rax
movss %xmm0, (%rax)
movss -0x4(%r15,%r12,8), %xmm0
subss %xmm5, %xmm0
movss %xmm0, 0x4(%rax)
movq %r13, 0x8(%rax)
movq 0x40(%rbx), %rax
movl %esi, 0x10(%rax)
movss (%r15,%r14,8), %xmm0
addss %xmm6, %xmm0
movss %xmm0, 0x14(%rax)
movss 0x4(%r15,%r14,8), %xmm0
subss %xmm5, %xmm0
movss %xmm0, 0x18(%rax)
movq %r13, 0x1c(%rax)
movq 0x40(%rbx), %rax
movl %esi, 0x24(%rax)
movss (%r15,%r14,8), %xmm0
subss %xmm6, %xmm0
movss %xmm0, 0x28(%rax)
movss 0x4(%r15,%r14,8), %xmm0
addss %xmm5, %xmm0
movss %xmm0, 0x2c(%rax)
movq %r13, 0x30(%rax)
movq 0x40(%rbx), %rax
movl %esi, 0x38(%rax)
movss -0x8(%r15,%r12,8), %xmm0
subss %xmm6, %xmm0
movss %xmm0, 0x3c(%rax)
addss -0x4(%r15,%r12,8), %xmm5
movss %xmm5, 0x40(%rax)
movq %r13, 0x44(%rax)
movq 0x40(%rbx), %rax
movl %esi, 0x4c(%rax)
addq $0x50, %rax
movq %rax, 0x40(%rbx)
movl 0x38(%rbx), %eax
movq 0x48(%rbx), %rcx
movw %ax, (%rcx)
leal 0x1(%rax), %edx
movw %dx, 0x2(%rcx)
leal 0x2(%rax), %edx
movw %dx, 0x4(%rcx)
movw %ax, 0x6(%rcx)
movw %dx, 0x8(%rcx)
leal 0x3(%rax), %edx
movw %dx, 0xa(%rcx)
addq $0xc, %rcx
movq %rcx, 0x48(%rbx)
addl $0x4, %eax
movl %eax, 0x38(%rbx)
leaq (%r8,%r12), %rax
incq %rax
incq %r12
cmpq $0x1, %rax
jne 0x2e81f
jmp 0x2ec44
testb %dl, %dl
jne 0x2ea44
movq -0x38(%rbp), %rsi
movss (%rsi), %xmm0
movss 0x4(%rsi), %xmm1
movss (%r15), %xmm2
movss 0x4(%r15), %xmm3
movaps %xmm0, %xmm4
addss %xmm2, %xmm4
movaps %xmm1, %xmm5
addss %xmm3, %xmm5
unpcklps %xmm5, %xmm4            # xmm4 = xmm4[0],xmm5[0],xmm4[1],xmm5[1]
subss %xmm0, %xmm2
subss %xmm1, %xmm3
unpcklps %xmm3, %xmm2            # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
movlhps %xmm2, %xmm4            # xmm4 = xmm4[0],xmm2[0]
movups %xmm4, (%rcx)
movq -0x68(%rbp), %r10
movl %r10d, %edx
movss (%r15,%rdx,8), %xmm0
movss 0x4(%r15,%rdx,8), %xmm1
movss (%rsi,%rdx,8), %xmm2
addss %xmm0, %xmm2
movss 0x4(%rsi,%rdx,8), %xmm3
addss %xmm1, %xmm3
unpcklps %xmm3, %xmm2            # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
addl %r10d, %r10d
movlps %xmm2, (%rcx,%r10,8)
subss (%rsi,%rdx,8), %xmm0
subss 0x4(%rsi,%rdx,8), %xmm1
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movlps %xmm0, 0x8(%rcx,%r10,8)
testl %edi, %edi
jle 0x2ebc1
movl 0x38(%rbx), %r9d
movq 0x48(%rbx), %rdx
movl %edi, %esi
shlq $0x3, %rsi
leaq (%rsi,%rsi,2), %rsi
leaq (%r8,%r8,2), %rdi
leaq -0x18(,%rdi,8), %rdi
movl $0x1, %r8d
movss 0xe944(%rip), %xmm0     # 0x3d3bc
movss 0x13dbc(%rip), %xmm1    # 0x4283c
movss 0xe8f8(%rip), %xmm2     # 0x3d380
movss 0xe9d8(%rip), %xmm3     # 0x3d468
xorl %r11d, %r11d
cmpq %r11, %rdi
movl %r8d, %r14d
movl $0x0, %r10d
cmovel %r10d, %r14d
leal 0x3(%r9), %r10d
cmovel 0x38(%rbx), %r10d
movq -0x38(%rbp), %r12
movss -0x8(%r12,%r8,8), %xmm4
addss (%r12,%r14,8), %xmm4
movss -0x4(%r12,%r8,8), %xmm5
addss 0x4(%r12,%r14,8), %xmm5
mulss %xmm0, %xmm4
mulss %xmm0, %xmm5
movaps %xmm5, %xmm7
mulss %xmm5, %xmm7
movaps %xmm4, %xmm6
mulss %xmm4, %xmm6
addss %xmm7, %xmm6
ucomiss %xmm1, %xmm6
jbe 0x2eb00
movaps %xmm2, %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,%r14,8), %xmm6
movss 0x4(%r15,%r14,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 %r14d, %r14d
movlps %xmm8, (%rcx,%r14,8)
subss %xmm4, %xmm6
subss %xmm5, %xmm7
unpcklps %xmm7, %xmm6            # xmm6 = xmm6[0],xmm7[0],xmm6[1],xmm7[1]
movlps %xmm6, 0x8(%rcx,%r14,8)
movw %r10w, (%rdx,%r11)
movw %r9w, 0x2(%rdx,%r11)
leal 0x2(%r9), %r14d
movw %r14w, 0x4(%rdx,%r11)
movw %r14w, 0x6(%rdx,%r11)
leal 0x2(%r10), %r14d
movw %r14w, 0x8(%rdx,%r11)
movw %r10w, 0xa(%rdx,%r11)
leal 0x1(%r10), %r14d
movw %r14w, 0xc(%rdx,%r11)
movl %r9d, %r12d
incl %r12d
movw %r12w, 0xe(%rdx,%r11)
movw %r9w, 0x10(%rdx,%r11)
movw %r9w, 0x12(%rdx,%r11)
movw %r10w, 0x14(%rdx,%r11)
movw %r14w, 0x16(%rdx,%r11)
incq %r8
addq $0x18, %r11
movl %r10d, %r9d
cmpq %r11, %rsi
jne 0x2ea93
addq %r11, %rdx
movq %rdx, 0x48(%rbx)
movl -0x2c(%rbp), %r9d
movq -0x48(%rbp), %r8
movq -0x70(%rbp), %rdx
cmpl $0x2, %edx
movl $0x1, %ecx
cmovgel %edx, %ecx
movq -0x38(%rbp), %rdx
leaq (%rdx,%r8,8), %rdx
addq $0x8, %rdx
shlq $0x3, %rcx
xorl %esi, %esi
movq 0x40(%rbx), %rdi
movq (%r15,%rsi), %r8
movq %r8, (%rdi)
movq 0x40(%rbx), %rdi
movq %r13, 0x8(%rdi)
movq 0x40(%rbx), %rdi
movl %r9d, 0x10(%rdi)
movq -0x8(%rdx,%rsi,2), %r8
movq %r8, 0x14(%rdi)
movq 0x40(%rbx), %rdi
movq %r13, 0x1c(%rdi)
movq 0x40(%rbx), %rdi
movl %eax, 0x24(%rdi)
movq (%rdx,%rsi,2), %r8
movq %r8, 0x28(%rdi)
movq 0x40(%rbx), %rdi
movq %r13, 0x30(%rdi)
movq 0x40(%rbx), %rdi
movl %eax, 0x38(%rdi)
addq $0x3c, %rdi
movq %rdi, 0x40(%rbx)
addq $0x8, %rsi
cmpq %rsi, %rcx
jne 0x2ebe2
movzwl -0x54(%rbp), %eax
addl %eax, 0x38(%rbx)
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop