// File: /workspace/github_cpp_makefile_star2_O3/thierry7100[P]CutOptim/src/SvgDoc.cpp
// Function: SvgDoc::TransformPaths(double, bool)
void SvgDoc::TransformPaths(double flat_factor, bool KeepNested)
{
    int nShape, nPath;

    nShape = 0;
    if ( SvgData == NULL ) return;
    if ( debug_level > 0 )
    {
        OutDebug << "Entering TransformPaths\n" << std::flush;
    }
	for (NSVGshape *shape = SvgData->shapes; shape != NULL; shape = shape->next, nShape++)
	{
        nPath = 0;
        if ( debug_level > 0 )
        {
            OutDebug << "Shape " << nShape << " id:" << shape->id << " Stroke[" << (int) shape->stroke.type << " " << setw(6) << setfill('0') << std::hex << (shape->stroke.color&0xFFFFFF) << std::dec << "] width:" << shape->strokeWidth << "\n" << std::flush;
        }
        //  Transform each path to a polygon
		for (NSVGpath *path = shape->paths; path != NULL; path = path->next, nPath++)
		{
            snprintf(path->id, 99, "%s_%d", shape->id, nPath);
            path->id[99] = 0;
            //  Walk through the path and delete vertices which have trange coordinates (nan)
            //  This has been observed in some cases.
            //  Indeed vertices are very close in these cases, so it is safe to remove vertex with nan coordinates.
            //  However, this can't be the first one.
            int StrangeControlPoints = 0;
            int StrangeEndPoints = 0;
            NSVGPathElt *Elt = path->PathElts;
            NSVGPathElt *PrevElt = NULL;
            for (int i = 0; i < path->nElts; i++)
            {
                int ShouldDelete = 0;
                if ( isnan(Elt->EndX) || isnan(Elt->EndY) )
                {
                    StrangeEndPoints++;
                    ShouldDelete = 1;
                }
                if ( isnan(Elt->BzCtrl1X) || isnan(Elt->BzCtrl1Y) || isnan(Elt->BzCtrl2X) || isnan(Elt->BzCtrl2Y) )
                {
                    StrangeControlPoints++;
                    ShouldDelete = 1;
                }
                if ( ShouldDelete )
                {
                    if ( PrevElt == NULL )
                    {
                        if ( debug_level > 0 )OutDebug << "nan encoutered as first element in path, aborting\n";
                        cerr << "nan encoutered as first element in path, aborting\n";
                        exit(1);
                    }
                    //  Remove vertex
                    path->nElts--;
                    PrevElt->next = Elt->next;
                    Elt = Elt->next;
                    continue;
                }
                PrevElt = Elt;
                Elt = Elt->next;
            }

            if ( debug_level > 2)
            {
                OutDebug << "Before Transform path, Shape " << nShape << " Path " << nPath << " with " << path->nElts << " HasBezier:" << path->hasBezier << "\n";
                OutDebug << "Path has " << StrangeEndPoints << " StrangeEndPoints and "<< StrangeControlPoints << " StrangeControlPoints (removed)\n";
                OutDebug << "Starting point=" << path->StartX << "," << path->StartY << "\n";
                OutDebug << "  Bounds (" << path->bounds[0] << "," << path->bounds[1] << ") --> (" << path->bounds[2] << "," << path->bounds[3] << "\n";
                NSVGPathElt *Elt = path->PathElts;
                for (int i = 0; i < path->nElts; i++)
                {
                    OutDebug << "   Elt " << i << " type " << Elt->Type << " EndPoint=(" << Elt->EndX << "," << Elt->EndY;
                    OutDebug << ")  Control points (" << Elt->BzCtrl1X << "," << Elt->BzCtrl1Y << ") and (" << Elt->BzCtrl2X << "," <<  Elt->BzCtrl2Y << ")\n";
                    Elt = Elt->next;
                }
                OutDebug << std::flush;
            }
			if ( path->closed == 0 )
			{
                if ( debug_level > 0 )
                {
                    OutDebug << "Path is NOT closed, skip !\n";
                }
                //  Path is not closed, do NOT process
                continue;
			}
            //  If path has bezier curves, break them in small segments, if not copy data to polyline path
            SplitBezierCurves(path, flat_factor*flat_factor);
            if ( debug_level > 2 )
            {
                OutDebug << "After flatening bezier, Shape " << nShape << " Path " << nPath << " with " << path->nElts << " HasBezier:" << path->hasBezier << "\n";
                OutDebug << "  Start (" << path->PolyLine->StartX << "," << path->PolyLine->StartY << ") Bounds (" << path->bounds[0] << "," << path->bounds[1] << ") --> (" << path->bounds[2] << "," << path->bounds[3] << "\n";
                NSVGPathElt *Elt = path->PolyLine->PathElts;
                for (int i = 0; i < path->PolyLine->nElts; i++)
                {
                    OutDebug << "   Elt " << i << " type " << Elt->Type << " EndPoint=(" << Elt->EndX << "," << Elt->EndY;
                    OutDebug << ")  Control points (" << Elt->BzCtrl1X << "," << Elt->BzCtrl1Y << ") and (" << Elt->BzCtrl2X << "," <<  Elt->BzCtrl2Y << ")\n";
                    Elt = Elt->next;
                }
            }

            SimplifyPath(path->PolyLine, flat_factor*flat_factor);

            if ( debug_level > 2 )
            {
                OutDebug << "After Simplification, Shape " << nShape << " Path " << nPath << " with " << path->nElts << " HasBezier:" << path->hasBezier << "\n";
                OutDebug << "  Start (" << path->PolyLine->StartX << "," << path->PolyLine->StartY << ") Bounds (" << path->bounds[0] << "," << path->bounds[1] << ") --> (" << path->bounds[2] << "," << path->bounds[3] << "\n";
                NSVGPathElt *Elt = path->PolyLine->PathElts;
                for (int i = 0; i < path->PolyLine->nElts; i++)
                {
                    OutDebug << "   Elt " << i << " type " << Elt->Type << " EndPoint=(" << Elt->EndX << "," << Elt->EndY;
                    OutDebug << ")  Control points (" << Elt->BzCtrl1X << "," << Elt->BzCtrl1Y << ") and (" << Elt->BzCtrl2X << "," <<  Elt->BzCtrl2Y << ")\n";
                    Elt = Elt->next;
                }
            }
            //  Create polygon structure
            path->ClosePolygon = new Polygon();
            Path2Polygon(path->ClosePolygon, path->PolyLine);
            if ( debug_level > 1 )
            {
                OutDebug << "Adding polygon " << nPath << " new name " << path->id << " with " << path->ClosePolygon->nVertices << " vertices, area:" << path->ClosePolygon->area() << "mm²\n";
            }
            if ( path->ClosePolygon->isClockWise() )
            {
                if ( debug_level  > 1 )
                {
                    OutDebug << "Polygon is clockwise, make it counter clockwise\n";
                }
                path->ClosePolygon->Reverse();
            }
		}
		if ( debug_level > 0)
            OutDebug << std::flush;
	}
	if ( KeepNested )
	{
        nShape = 0;
        //  Second pass, check if a path is included in an other one
        if ( debug_level > 0 )
        {
            OutDebug << "Transform paths pass 2 : checking if paths are included in other ones\n";
        }
        for (NSVGshape *shape = SvgData->shapes; shape != NULL; shape = shape->next, nShape++)
        {
            nPath = 0;
            NSVGpath *OldPath = NULL;
            NSVGpath *next_path = NULL;
            //  For each path of the shape, check if it is included in a larger o
            for (NSVGpath *path = shape->paths; path != NULL; path = next_path, nPath++)
            {
                next_path = path->next;     //  Memorize value, because will be modified if path is removed
                if ( RemoveIfIncluded(path, shape, OldPath, nShape, nPath) == 0 )
                {
                //  Not removed, new OldPath now. IF removed, DO NOT change OldPath, as the current entry has been moved
                    OldPath = path;
                }
            }
        }
	}
    if ( debug_level > 0 )
    {
        OutDebug << "End of Transform paths\n" << std::flush;
    }

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movsd %xmm0, 0x28(%rsp)
movq 0x8(%rdi), %rax
testq %rax, %rax
je 0x2d921
movl %esi, 0x34(%rsp)
cmpl $0x0, 0x60(%rdi)
jle 0x2c764
leaq 0x68(%rdi), %rbx
leaq 0x11d97(%rip), %rsi     # 0x3e4dc
movl $0x18, %edx
movq %rdi, %r14
movq %rbx, %rdi
callq 0x74e0
movq %rbx, %rdi
callq 0x7310
movq %r14, %rdi
movq 0x8(%r14), %rax
movq 0x10(%rax), %r12
testq %r12, %r12
movq %rdi, 0x8(%rsp)
je 0x2d86a
leaq 0x68(%rdi), %r13
movsd 0x28(%rsp), %xmm0
mulsd %xmm0, %xmm0
movsd %xmm0, 0x28(%rsp)
movl $0x0, 0x10(%rsp)
movq %r13, 0x20(%rsp)
cmpl $0x0, 0x60(%rdi)
jle 0x2c8e8
movl $0x6, %edx
movq %r13, %rdi
leaq 0x11dac(%rip), %rsi     # 0x3e55c
callq 0x74e0
movq %r13, %rdi
movl 0x10(%rsp), %esi
callq 0x7720
movq %rax, %rbx
movl $0x4, %edx
movq %rax, %rdi
leaq 0x11d22(%rip), %rsi     # 0x3e4f5
callq 0x74e0
movq %r12, %rdi
callq 0x71d0
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x74e0
movl $0x8, %edx
movq %rbx, %rdi
leaq 0x11cfd(%rip), %rsi     # 0x3e4fa
callq 0x74e0
movsbl 0x50(%r12), %esi
movq %rbx, %rdi
callq 0x7720
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x10079(%rip), %rsi     # 0x3c89b
callq 0x74e0
movq (%rbx), %rax
movq -0x18(%rax), %rcx
movq $0x6, 0x10(%rbx,%rcx)
movq -0x18(%rax), %rcx
leaq (%rbx,%rcx), %r15
cmpb $0x0, 0xe1(%rbx,%rcx)
jne 0x2c861
movq %r15, %rdi
movl $0x20, %esi
callq 0x7400
movb $0x1, 0xe1(%r15)
movq (%rbx), %rax
movb $0x30, 0xe0(%r15)
movq -0x18(%rax), %rax
movl 0x18(%rbx,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x18(%rbx,%rax)
movl 0x58(%r12), %esi
andl $0xffffff, %esi         # imm = 0xFFFFFF
movq %rbx, %rdi
callq 0x7300
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rax
movl 0x18(%rbx,%rax), %ecx
andl $-0x4b, %ecx
orl $0x2, %ecx
movl %ecx, 0x18(%rbx,%rax)
movl $0x8, %edx
movq %rbx, %rdi
leaq 0x11c4e(%rip), %rsi     # 0x3e503
callq 0x74e0
movsd 0x68(%r12), %xmm0
movq %rbx, %rdi
callq 0x7690
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
leaq 0x129f1(%rip), %rsi     # 0x3f2cc
callq 0x74e0
movq %rbx, %rdi
callq 0x7310
movq 0xf0(%r12), %r14
testq %r14, %r14
je 0x2d83d
xorl %ebp, %ebp
movq %r12, 0x38(%rsp)
leaq 0x90(%r14), %rdi
movl $0x63, %esi
movq %rdi, 0x58(%rsp)
leaq 0x11bf4(%rip), %rdx     # 0x3e50c
movq %r12, %rcx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x7680
movb $0x0, 0xf3(%r14)
leaq 0x10(%r14), %r13
movl 0x18(%r14), %eax
movl $0x0, %r15d
movl $0x0, %ebx
testl %eax, %eax
jle 0x2c9d9
xorl %ecx, %ecx
movq %r13, %rdi
xorl %edx, %edx
xorl %ebx, %ebx
xorl %r15d, %r15d
movq (%rdi), %rsi
movsd 0x8(%rsi), %xmm0
ucomisd %xmm0, %xmm0
jp 0x2c9d3
movsd 0x10(%rsi), %xmm0
movb $0x1, %dil
ucomisd %xmm0, %xmm0
jp 0x2c9d3
movsd 0x18(%rsi), %xmm0
ucomisd %xmm0, %xmm0
jp 0x2c9aa
movsd 0x20(%rsi), %xmm0
ucomisd %xmm0, %xmm0
jp 0x2c9aa
movsd 0x28(%rsi), %xmm0
ucomisd %xmm0, %xmm0
jp 0x2c9aa
movsd 0x30(%rsi), %xmm0
ucomisd %xmm0, %xmm0
jp 0x2c9aa
testb %dil, %dil
je 0x2c9ad
leaq 0x38(%rsi), %rdi
movq %rsi, %rdx
jmp 0x2c9cb
incl %r15d
testq %rdx, %rdx
je 0x2d933
decl %eax
movl %eax, 0x18(%r14)
movq 0x38(%rsi), %rdi
addq $0x38, %rsi
movq %rdi, 0x38(%rdx)
movq %rsi, %rdi
incl %ecx
cmpl %eax, %ecx
jl 0x2c954
jmp 0x2c9d9
incl %ebx
xorl %edi, %edi
jmp 0x2c970
movl %ebp, 0x14(%rsp)
movq 0x8(%rsp), %rax
cmpl $0x2, 0x60(%rax)
movq %r14, 0x18(%rsp)
jle 0x2cd4a
movl $0x1d, %edx
movq 0x20(%rsp), %rbp
movq %rbp, %rdi
leaq 0x11b40(%rip), %rsi     # 0x3e545
callq 0x74e0
movq %rbp, %rdi
movl 0x10(%rsp), %esi
callq 0x7720
movq %rax, %r12
movl $0x6, %edx
movq %rax, %rdi
leaq 0x12848(%rip), %rsi     # 0x3f270
callq 0x74e0
movq %r12, %rdi
movl 0x14(%rsp), %esi
callq 0x7720
movq %rax, %r12
movl $0x6, %edx
movq %rax, %rdi
leaq 0x12c5e(%rip), %rsi     # 0x3f6a9
callq 0x74e0
movl 0x18(%r14), %esi
movq %r12, %rdi
callq 0x7720
movq %rax, %r12
movl $0xb, %edx
movq %rax, %rdi
leaq 0x11af5(%rip), %rsi     # 0x3e563
callq 0x74e0
movl 0x20(%r14), %esi
movq %r12, %rdi
callq 0x7720
movl $0x1, %edx
movq %rax, %rdi
leaq 0x1283e(%rip), %r12     # 0x3f2cc
movq %r12, %rsi
callq 0x74e0
movl $0x9, %edx
movq %rbp, %rdi
leaq 0x11aca(%rip), %rsi     # 0x3e56f
callq 0x74e0
movq %rbp, %rdi
movl %ebx, %esi
callq 0x7720
movq %rax, %rbx
movl $0x16, %edx
movq %rax, %rdi
leaq 0x11ab3(%rip), %rsi     # 0x3e579
callq 0x74e0
movq %rbx, %rdi
movl %r15d, %esi
movq %rbp, %r15
callq 0x7720
movl $0x20, %edx
movq %rax, %rdi
leaq 0x11aa8(%rip), %rsi     # 0x3e590
callq 0x74e0
movl $0xf, %edx
movq %rbp, %rdi
leaq 0x11ab5(%rip), %rsi     # 0x3e5b1
callq 0x74e0
movsd (%r14), %xmm0
movq %rbp, %rdi
callq 0x7690
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rbp
leaq 0xfd95(%rip), %r14      # 0x3c8b8
movq %r14, %rsi
callq 0x74e0
movsd 0x8(%rbp), %xmm0
movq %rbx, %rdi
callq 0x7690
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x74e0
movl $0xa, %edx
movq %r15, %rdi
leaq 0x11a6a(%rip), %rsi     # 0x3e5c1
callq 0x74e0
movsd 0x28(%rbp), %xmm0
movq %r15, %rdi
callq 0x7690
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x74e0
movsd 0x30(%rbp), %xmm0
movq %rbx, %rdi
callq 0x7690
movq %rax, %rbx
movl $0x7, %edx
movq %rax, %rdi
leaq 0x11a31(%rip), %rsi     # 0x3e5cc
callq 0x74e0
movsd 0x38(%rbp), %xmm0
movq %rbx, %rdi
callq 0x7690
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x74e0
movsd 0x40(%rbp), %xmm0
movq %rbx, %rdi
callq 0x7690
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x74e0
cmpl $0x0, 0x18(%rbp)
leaq 0x119ec(%rip), %r14     # 0x3e5d4
jle 0x2cd38
xorl %ebx, %ebx
movq (%r13), %r13
movl $0x7, %edx
movq %r15, %rdi
movq %r14, %rsi
callq 0x74e0
movq %r15, %rdi
movl %ebx, %esi
callq 0x7720
movq %r15, %r12
movq %rax, %r15
movl $0x6, %edx
movq %rax, %rdi
leaq 0x119b9(%rip), %rsi     # 0x3e5dc
callq 0x74e0
movl (%r13), %esi
movq %r15, %rdi
callq 0x7720
movq %rax, %r15
movl $0xb, %edx
movq %rax, %rdi
leaq 0x1199d(%rip), %rsi     # 0x3e5e3
callq 0x74e0
movsd 0x8(%r13), %xmm0
movq %r15, %rdi
callq 0x7690
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
leaq 0xfc4d(%rip), %rbp      # 0x3c8b8
movq %rbp, %rsi
callq 0x74e0
movsd 0x10(%r13), %xmm0
movq %r15, %rdi
callq 0x7690
movl $0x13, %edx
movq %r12, %rdi
leaq 0x1195f(%rip), %rsi     # 0x3e5ef
callq 0x74e0
movsd 0x18(%r13), %xmm0
movq %r12, %rdi
callq 0x7690
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x74e0
movsd 0x20(%r13), %xmm0
movq %r15, %rdi
callq 0x7690
movq %rax, %r15
movl $0x7, %edx
movq %rax, %rdi
leaq 0x1192d(%rip), %rsi     # 0x3e603
callq 0x74e0
movsd 0x28(%r13), %xmm0
movq %r15, %rdi
callq 0x7690
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x74e0
movsd 0x30(%r13), %xmm0
movq %r15, %rdi
movq %r12, %r15
leaq 0x1189f(%rip), %r12     # 0x3e5ae
callq 0x7690
movl $0x2, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x74e0
addq $0x38, %r13
incl %ebx
movq 0x18(%rsp), %rax
cmpl 0x18(%rax), %ebx
jl 0x2cbf0
movq %r15, %rdi
callq 0x7310
movq 0x8(%rsp), %rax
movq 0x18(%rsp), %r14
movl 0x1c(%r14), %ebp
testl %ebp, %ebp
je 0x2d061
movq 0x10(%r14), %r13
movl $0xf8, %edi
callq 0x7590
movq %rax, %r15
movq %rax, 0x50(%r14)
movups (%r14), %xmm0
movaps %xmm0, 0x40(%rsp)
movups %xmm0, (%rax)
movl 0x18(%r14), %ebx
movl %ebx, 0x18(%rax)
xorl %eax, %eax
movq %rax, 0x48(%r15)
movq %r15, 0x50(%r15)
movq %rax, 0x60(%r15)
movl $0x0, 0x20(%r15)
movl %ebp, 0x1c(%r15)
movq %r15, %rbp
addq $0x10, %rbp
xorl %r14d, %r14d
movl $0x40, %edi
callq 0x7590
leaq 0x38(%r14), %rcx
testq %r14, %r14
movupd (%r13), %xmm0
movupd 0x10(%r13), %xmm1
movupd 0x20(%r13), %xmm2
movupd %xmm0, (%rax)
movupd %xmm1, 0x10(%rax)
movupd %xmm2, 0x20(%rax)
movq 0x30(%r13), %rdx
movq %rdx, 0x30(%rax)
movq $0x0, 0x38(%rax)
cmoveq %rbp, %rcx
cmoveq %rax, %r12
movq %rax, (%rcx)
movq 0x38(%r13), %r13
movq %rax, %r14
testq %r13, %r13
jne 0x2cda2
cvtpd2ps 0x40(%rsp), %xmm3
movapd %xmm3, %xmm4
testq %r12, %r12
je 0x2d092
movapd %xmm3, %xmm0
movq 0x20(%rsp), %r13
leaq 0xfa9b(%rip), %rbp      # 0x3c8b8
movq 0x18(%rsp), %r14
movapd %xmm4, 0x70(%rsp)
movapd %xmm3, 0x80(%rsp)
cmpl $0x1, (%r12)
movupd 0x8(%r12), %xmm7
jne 0x2d00e
cvtps2pd %xmm0, %xmm6
movapd %xmm6, 0x90(%rsp)
movapd %xmm7, %xmm2
subpd %xmm6, %xmm2
movapd %xmm6, %xmm1
subpd %xmm7, %xmm1
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
movapd %xmm7, %xmm4
xorpd 0x1124d(%rip), %xmm4    # 0x3e0c0
movupd 0x18(%r12), %xmm9
movupd 0x28(%r12), %xmm8
movapd %xmm6, %xmm3
unpckhpd %xmm9, %xmm3            # xmm3 = xmm3[1],xmm9[1]
unpcklpd %xmm2, %xmm4            # xmm4 = xmm4[0],xmm2[0]
mulpd %xmm3, %xmm4
movsd %xmm6, %xmm1            # xmm1 = xmm6[0],xmm1[1]
movapd %xmm7, %xmm3
shufpd $0x1, %xmm9, %xmm3      # xmm3 = xmm3[1],xmm9[0]
mulpd %xmm1, %xmm3
addpd %xmm4, %xmm3
movapd %xmm3, %xmm1
unpckhpd %xmm3, %xmm1            # xmm1 = xmm1[1],xmm3[1]
addsd %xmm3, %xmm1
mulsd %xmm1, %xmm1
movapd %xmm8, %xmm4
unpckhpd %xmm8, %xmm4            # xmm4 = xmm4[1],xmm8[1]
mulsd %xmm2, %xmm4
mulsd %xmm2, %xmm2
movapd %xmm0, %xmm5
mulsd %xmm0, %xmm5
addsd %xmm2, %xmm5
divsd %xmm5, %xmm1
mulsd %xmm8, %xmm0
addsd %xmm4, %xmm0
addsd %xmm3, %xmm0
mulsd %xmm0, %xmm0
divsd %xmm5, %xmm0
movapd %xmm0, %xmm2
maxsd %xmm1, %xmm2
cmpunordsd %xmm1, %xmm1
movapd %xmm1, %xmm3
andnpd %xmm2, %xmm3
andpd %xmm0, %xmm1
orpd %xmm3, %xmm1
movsd 0x28(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jae 0x2d006
movl $0x40, %edi
movapd %xmm7, 0x40(%rsp)
movapd %xmm8, 0xb0(%rsp)
movapd %xmm9, 0xa0(%rsp)
callq 0x7590
movapd 0x90(%rsp), %xmm6
movq 0x38(%r12), %rcx
movq %rcx, 0x38(%rax)
movq %rax, 0x38(%r12)
movl $0x1, (%rax)
movapd 0xa0(%rsp), %xmm2
movapd %xmm2, %xmm0
movapd 0xb0(%rsp), %xmm5
addpd %xmm5, %xmm2
movapd 0x11211(%rip), %xmm3    # 0x3e190
mulpd %xmm3, %xmm2
cvtpd2ps %xmm2, %xmm1
addpd %xmm6, %xmm0
mulpd %xmm3, %xmm0
cvtpd2ps %xmm0, %xmm0
movaps 0x40(%rsp), %xmm2
movups %xmm2, 0x8(%rax)
cvtps2pd %xmm0, %xmm2
addps %xmm1, %xmm0
movaps 0x11207(%rip), %xmm4    # 0x3e1b0
mulps %xmm4, %xmm0
movups %xmm2, 0x18(%r12)
cvtps2pd %xmm0, %xmm2
movups %xmm2, 0x28(%r12)
movupd 0x8(%r12), %xmm2
addpd %xmm5, %xmm2
mulpd %xmm3, %xmm2
cvtpd2ps %xmm2, %xmm2
addps %xmm2, %xmm1
mulps %xmm4, %xmm1
addps %xmm1, %xmm0
mulps %xmm4, %xmm0
cvtps2pd %xmm0, %xmm7
movupd %xmm7, 0x8(%r12)
cvtps2pd %xmm1, %xmm0
movups %xmm0, 0x18(%rax)
cvtps2pd %xmm2, %xmm0
movupd %xmm0, 0x28(%rax)
incl %ebx
movl %ebx, 0x18(%r15)
cmpl $0x1, (%r12)
je 0x2ce4f
jmp 0x2d00e
movl $0x0, (%r12)
cvtpd2ps %xmm7, %xmm0
movapd %xmm0, %xmm1
movaps 0x80(%rsp), %xmm3
minps %xmm3, %xmm1
cmpunordps %xmm3, %xmm3
movapd %xmm0, %xmm2
andpd %xmm3, %xmm2
andnps %xmm1, %xmm3
orps %xmm2, %xmm3
movapd %xmm0, %xmm1
movaps 0x70(%rsp), %xmm4
maxps %xmm4, %xmm1
cmpunordps %xmm4, %xmm4
movapd %xmm0, %xmm2
andpd %xmm4, %xmm2
andnps %xmm1, %xmm4
orps %xmm2, %xmm4
movq 0x38(%r12), %r12
testq %r12, %r12
jne 0x2ce22
jmp 0x2d0a3
cmpl $0x0, 0x60(%rax)
movq 0x20(%rsp), %r13
movq 0x38(%rsp), %r12
movl 0x14(%rsp), %ebp
jle 0x2d82e
movl $0x1b, %edx
movq %r13, %rdi
leaq 0x11583(%rip), %rsi     # 0x3e60b
callq 0x74e0
jmp 0x2d82e
movq 0x20(%rsp), %r13
leaq 0xf81a(%rip), %rbp      # 0x3c8b8
movq 0x18(%rsp), %r14
cvtps2pd %xmm3, %xmm0
cvtps2pd %xmm4, %xmm1
movupd %xmm0, 0x28(%r15)
movupd %xmm1, 0x38(%r15)
movq 0x8(%rsp), %rax
cmpl $0x2, 0x60(%rax)
jle 0x2d3aa
movl $0x1e, %edx
movq %r13, %rdi
leaq 0x11554(%rip), %rsi     # 0x3e627
callq 0x74e0
movq %r13, %rdi
movl 0x10(%rsp), %esi
callq 0x7720
movq %rax, %rbx
movl $0x6, %edx
movq %rax, %rdi
leaq 0x1217a(%rip), %rsi     # 0x3f270
callq 0x74e0
movq %rbx, %rdi
movl 0x14(%rsp), %esi
callq 0x7720
movq %rax, %rbx
movl $0x6, %edx
movq %rax, %rdi
leaq 0x12590(%rip), %rsi     # 0x3f6a9
callq 0x74e0
movl 0x18(%r14), %esi
movq %rbx, %rdi
callq 0x7720
movq %rax, %rbx
movl $0xb, %edx
movq %rax, %rdi
leaq 0x11427(%rip), %rsi     # 0x3e563
callq 0x74e0
movl 0x20(%r14), %esi
movq %rbx, %rdi
callq 0x7720
movl $0x1, %edx
movq %rax, %rdi
leaq 0x12170(%rip), %r15     # 0x3f2cc
movq %r15, %rsi
callq 0x74e0
movl $0x9, %edx
movq %r13, %rdi
leaq 0x114d3(%rip), %rsi     # 0x3e646
callq 0x74e0
movq 0x50(%r14), %rax
movsd (%rax), %xmm0
movq %r13, %rdi
callq 0x7690
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x74e0
movq 0x50(%r14), %rax
movsd 0x8(%rax), %xmm0
movq %rbx, %rdi
callq 0x7690
movq %rax, %rbx
movl $0xa, %edx
movq %rax, %rdi
leaq 0x11492(%rip), %rsi     # 0x3e650
callq 0x74e0
movsd 0x28(%r14), %xmm0
movq %rbx, %rdi
callq 0x7690
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x74e0
movsd 0x30(%r14), %xmm0
movq %rbx, %rdi
callq 0x7690
movq %rax, %rbx
movl $0x7, %edx
movq %rax, %rdi
leaq 0x113c8(%rip), %rsi     # 0x3e5cc
callq 0x74e0
movsd 0x38(%r14), %xmm0
movq %rbx, %rdi
callq 0x7690
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x74e0
movsd 0x40(%r14), %xmm0
movq %rbx, %rdi
callq 0x7690
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x74e0
movq 0x50(%r14), %rsi
cmpl $0x0, 0x18(%rsi)
jle 0x2d3ae
addq $0x10, %rsi
xorl %ebx, %ebx
movq %rsi, %r12
leaq 0x1136e(%rip), %r14     # 0x3e5d4
movq (%r12), %r12
movl $0x7, %edx
movq %r13, %rdi
movq %r14, %rsi
callq 0x74e0
movq %r13, %rdi
movl %ebx, %esi
callq 0x7720
movq %rax, %r15
movl $0x6, %edx
movq %rax, %rdi
leaq 0x11346(%rip), %rsi     # 0x3e5dc
callq 0x74e0
movl (%r12), %esi
movq %r15, %rdi
callq 0x7720
movq %rax, %r15
movl $0xb, %edx
movq %rax, %rdi
leaq 0x1132a(%rip), %rsi     # 0x3e5e3
callq 0x74e0
movsd 0x8(%r12), %xmm0
movq %r15, %rdi
callq 0x7690
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x74e0
movsd 0x10(%r12), %xmm0
movq %r15, %rdi
callq 0x7690
movl $0x13, %edx
movq %r13, %rdi
leaq 0x112f1(%rip), %rsi     # 0x3e5ef
callq 0x74e0
movsd 0x18(%r12), %xmm0
movq %r13, %rdi
callq 0x7690
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x74e0
movsd 0x20(%r12), %xmm0
movq %r15, %rdi
callq 0x7690
movq %rax, %r15
movl $0x7, %edx
movq %rax, %rdi
leaq 0x112bd(%rip), %rsi     # 0x3e603
callq 0x74e0
movsd 0x28(%r12), %xmm0
movq %r15, %rdi
callq 0x7690
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x74e0
movsd 0x30(%r12), %xmm0
movq %r15, %rdi
callq 0x7690
movl $0x2, %edx
movq %rax, %rdi
leaq 0x11223(%rip), %rsi     # 0x3e5ae
callq 0x74e0
addq $0x38, %r12
incl %ebx
movq 0x18(%rsp), %rax
movq 0x50(%rax), %rsi
cmpl 0x18(%rsi), %ebx
jl 0x2d266
jmp 0x2d3ae
movq 0x50(%r14), %rsi
movsd 0x28(%rsp), %xmm0
callq 0x2c5ce
movq 0x8(%rsp), %rax
cmpl $0x3, 0x60(%rax)
leaq 0x11213(%rip), %r14     # 0x3e5dc
jl 0x2d6b9
movl $0x1c, %edx
movq %r13, %rdi
leaq 0x1127d(%rip), %rsi     # 0x3e65b
callq 0x74e0
movq %r13, %rdi
movl 0x10(%rsp), %esi
callq 0x7720
movq %rax, %rbx
movl $0x6, %edx
movq %rax, %rdi
leaq 0x11e6f(%rip), %rsi     # 0x3f270
callq 0x74e0
movq %rbx, %rdi
movl 0x14(%rsp), %esi
callq 0x7720
movq %rax, %rbx
movl $0x6, %edx
movq %rax, %rdi
leaq 0x12285(%rip), %rsi     # 0x3f6a9
callq 0x74e0
movq 0x18(%rsp), %r12
movl 0x18(%r12), %esi
movq %rbx, %rdi
callq 0x7720
movq %rax, %rbx
movl $0xb, %edx
movq %rax, %rdi
leaq 0x11116(%rip), %rsi     # 0x3e563
callq 0x74e0
movl 0x20(%r12), %esi
movq %rbx, %rdi
callq 0x7720
movl $0x1, %edx
movq %rax, %rdi
leaq 0x11e5e(%rip), %r15     # 0x3f2cc
movq %r15, %rsi
callq 0x74e0
movl $0x9, %edx
movq %r13, %rdi
leaq 0x111c1(%rip), %rsi     # 0x3e646
callq 0x74e0
movq 0x50(%r12), %rax
movsd (%rax), %xmm0
movq %r13, %rdi
callq 0x7690
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x74e0
movq 0x50(%r12), %rax
movsd 0x8(%rax), %xmm0
movq %rbx, %rdi
callq 0x7690
movq %rax, %rbx
movl $0xa, %edx
movq %rax, %rdi
leaq 0x1117e(%rip), %rsi     # 0x3e650
callq 0x74e0
movsd 0x28(%r12), %xmm0
movq %rbx, %rdi
callq 0x7690
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x74e0
movsd 0x30(%r12), %xmm0
movq %rbx, %rdi
callq 0x7690
movq %rax, %rbx
movl $0x7, %edx
movq %rax, %rdi
leaq 0x110b2(%rip), %rsi     # 0x3e5cc
callq 0x74e0
movsd 0x38(%r12), %xmm0
movq %rbx, %rdi
callq 0x7690
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x74e0
movsd 0x40(%r12), %xmm0
movq %rbx, %rdi
callq 0x7690
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x74e0
movq 0x50(%r12), %r12
cmpl $0x0, 0x18(%r12)
jle 0x2d6b9
addq $0x10, %r12
xorl %ebx, %ebx
movq (%r12), %r12
movl $0x7, %edx
movq %r13, %rdi
leaq 0x1104a(%rip), %rsi     # 0x3e5d4
callq 0x74e0
movq %r13, %rdi
movl %ebx, %esi
callq 0x7720
movq %rax, %r15
movl $0x6, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x74e0
movl (%r12), %esi
movq %r15, %rdi
callq 0x7720
movq %rax, %r15
movl $0xb, %edx
movq %rax, %rdi
leaq 0x11019(%rip), %rsi     # 0x3e5e3
callq 0x74e0
movsd 0x8(%r12), %xmm0
movq %r15, %rdi
callq 0x7690
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x74e0
movsd 0x10(%r12), %xmm0
movq %r15, %rdi
callq 0x7690
movl $0x13, %edx
movq %r13, %rdi
leaq 0x10fe0(%rip), %rsi     # 0x3e5ef
callq 0x74e0
movsd 0x18(%r12), %xmm0
movq %r13, %rdi
callq 0x7690
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x74e0
movsd 0x20(%r12), %xmm0
movq %r15, %rdi
callq 0x7690
movq %rax, %r15
movl $0x7, %edx
movq %rax, %rdi
leaq 0x10fac(%rip), %rsi     # 0x3e603
callq 0x74e0
movsd 0x28(%r12), %xmm0
movq %r15, %rdi
callq 0x7690
movq %rax, %r15
movl $0x1, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x74e0
movsd 0x30(%r12), %xmm0
movq %r15, %rdi
callq 0x7690
movl $0x2, %edx
movq %rax, %rdi
leaq 0x10f12(%rip), %rsi     # 0x3e5ae
callq 0x74e0
addq $0x38, %r12
incl %ebx
movq 0x18(%rsp), %rax
movq 0x50(%rax), %rax
cmpl 0x18(%rax), %ebx
jl 0x2d577
movl $0xc0, %edi
callq 0x7440
movq %rax, %rbx
movq %rax, %rdi
callq 0x262e0
movq 0x18(%rsp), %rax
movq %rbx, 0x60(%rax)
movq 0x50(%rax), %r15
movq 0x10(%r15), %r12
movupd (%r15), %xmm0
movapd %xmm0, 0x60(%rsp)
movq %rbx, %rdi
leaq 0x60(%rsp), %r14
movq %r14, %rsi
callq 0x26468
cmpl $0x0, 0x18(%r15)
jle 0x2d728
xorl %ebp, %ebp
movupd 0x8(%r12), %xmm0
movapd %xmm0, 0x60(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x26468
movq 0x38(%r12), %r12
incl %ebp
cmpl 0x18(%r15), %ebp
jl 0x2d703
movq 0x8(%rsp), %rax
cmpl $0x2, 0x60(%rax)
movq 0x20(%rsp), %r13
movq 0x38(%rsp), %r12
movq 0x18(%rsp), %r14
movl 0x14(%rsp), %ebp
jl 0x2d7f9
movl $0xf, %edx
movq %r13, %rdi
leaq 0x10f1f(%rip), %rsi     # 0x3e678
callq 0x74e0
movq %r13, %rdi
movl %ebp, %esi
callq 0x7720
movq %rax, %rbx
movl $0xa, %edx
movq %rax, %rdi
leaq 0x10f0e(%rip), %rsi     # 0x3e688
callq 0x74e0
movq 0x58(%rsp), %r15
movq %r15, %rdi
callq 0x71d0
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x74e0
movl $0x6, %edx
movq %rbx, %rdi
leaq 0x11f00(%rip), %rsi     # 0x3f6a9
callq 0x74e0
movq 0x60(%r14), %rax
movl 0x8(%rax), %esi
movq %rbx, %rdi
callq 0x7720
movq %rax, %rbx
movl $0x10, %edx
movq %rax, %rdi
leaq 0x10ec4(%rip), %rsi     # 0x3e693
callq 0x74e0
movq 0x60(%r14), %rdi
callq 0x266bc
movq %rbx, %rdi
callq 0x7690
movl $0x5, %edx
movq %rax, %rdi
leaq 0x10eb0(%rip), %rsi     # 0x3e6a4
callq 0x74e0
movq 0x60(%r14), %rdi
cmpl $0x0, 0x94(%rdi)
je 0x2d82e
movq 0x8(%rsp), %rax
cmpl $0x2, 0x60(%rax)
jl 0x2d829
movl $0x30, %edx
movq %r13, %rdi
leaq 0x10e8a(%rip), %rsi     # 0x3e6aa
callq 0x74e0
movq 0x60(%r14), %rdi
callq 0x26958
incl %ebp
movq 0x48(%r14), %r14
testq %r14, %r14
jne 0x2c900
movq 0x8(%rsp), %rdi
cmpl $0x0, 0x60(%rdi)
jle 0x2d855
movq %r13, %rdi
callq 0x7310
movq 0x8(%rsp), %rdi
incl 0x10(%rsp)
movq 0xf8(%r12), %r12
testq %r12, %r12
jne 0x2c797
cmpb $0x0, 0x34(%rsp)
je 0x2d8f6
movq 0x8(%rsp), %rbx
cmpl $0x0, 0x60(%rbx)
jle 0x2d895
leaq 0x68(%rbx), %rdi
leaq 0x10e50(%rip), %rsi     # 0x3e6db
movl $0x46, %edx
callq 0x74e0
movq 0x8(%rbx), %rax
movq 0x10(%rax), %rbx
testq %rbx, %rbx
je 0x2d8f6
xorl %ebp, %ebp
movq 0xf0(%rbx), %r13
testq %r13, %r13
je 0x2d8e8
xorl %r15d, %r15d
xorl %r14d, %r14d
movq %r13, %r12
movq 0x48(%r13), %r13
movq 0x8(%rsp), %rdi
movq %r12, %rsi
movq %rbx, %rdx
movq %r15, %rcx
movl %ebp, %r8d
movl %r14d, %r9d
callq 0x2d98a
testl %eax, %eax
je 0x2d8dd
movq %r15, %r12
incl %r14d
movq %r12, %r15
testq %r13, %r13
jne 0x2d8b6
incl %ebp
movq 0xf8(%rbx), %rbx
testq %rbx, %rbx
jne 0x2d8a4
movq 0x8(%rsp), %rbx
cmpl $0x0, 0x60(%rbx)
jle 0x2d921
addq $0x68, %rbx
leaq 0x10e16(%rip), %rsi     # 0x3e722
movl $0x17, %edx
movq %rbx, %rdi
callq 0x74e0
movq %rbx, %rdi
callq 0x7310
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rsp), %rax
cmpl $0x0, 0x60(%rax)
jle 0x2d954
leaq 0x10bcd(%rip), %rsi     # 0x3e512
movl $0x32, %edx
movq 0x20(%rsp), %rdi
callq 0x74e0
movq 0x23685(%rip), %rdi     # 0x50fe0
leaq 0x10bb0(%rip), %rsi     # 0x3e512
callq 0x7420
movl $0x1, %edi
callq 0x7540
movq %rax, %r14
movl $0xc0, %esi
movq %rbx, %rdi
callq 0x7450
movq %r14, %rdi
callq 0x7740
nop