// File: 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
movq %rsp, %rbp
subq $0xe0, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xc0(%rbp)
movl $0x0, -0x18(%rbp)
cmpq $0x0, 0x8(%rax)
jne 0x693ba
jmp 0x6a36a
movq -0xc0(%rbp), %rax
cmpl $0x0, 0x60(%rax)
jle 0x693ed
movq -0xc0(%rbp), %rdi
addq $0x68, %rdi
leaq 0x1b0ef(%rip), %rsi     # 0x844c8
callq 0x9530
movq %rax, %rdi
movq 0x4ebb0(%rip), %rsi     # 0xb7f98
callq 0x9590
movq -0xc0(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x6a212
movq -0xc0(%rbp), %rax
movl $0x0, -0x1c(%rbp)
cmpl $0x0, 0x60(%rax)
jle 0x69546
movq -0xc0(%rbp), %rdi
addq $0x68, %rdi
leaq 0x1b113(%rip), %rsi     # 0x84548
callq 0x9530
movq %rax, %rdi
movl -0x18(%rbp), %esi
callq 0x9930
movq %rax, %rdi
leaq 0x1b092(%rip), %rsi     # 0x844e1
callq 0x9530
movq %rax, %rdi
movq -0x28(%rbp), %rsi
callq 0x9530
movq %rax, %rdi
leaq 0x1b07c(%rip), %rsi     # 0x844e6
callq 0x9530
movq %rax, %rdi
movq -0x28(%rbp), %rax
movsbl 0x50(%rax), %esi
callq 0x9930
movq %rax, %rdi
leaq 0x1947e(%rip), %rsi     # 0x82907
callq 0x9530
movq %rax, -0xd0(%rbp)
movl $0x6, %edi
callq 0x7fc70
movq -0xd0(%rbp), %rdi
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %esi
callq 0x9640
movq %rax, -0xc8(%rbp)
movl $0x30, %edi
callq 0x7fc90
movq -0xc8(%rbp), %rdi
movb %al, -0x2d(%rbp)
movzbl -0x2d(%rbp), %esi
callq 0x9830
movq %rax, %rdi
leaq -0x3399f(%rip), %rsi    # 0x35b40
callq 0x91a0
movq %rax, %rdi
movq -0x28(%rbp), %rax
movl 0x58(%rax), %esi
andl $0xffffff, %esi         # imm = 0xFFFFFF
callq 0x9740
movq %rax, %rdi
leaq 0x167ad(%rip), %rsi     # 0x7fcb0
callq 0x91a0
movq %rax, %rdi
leaq 0x1afdd(%rip), %rsi     # 0x844ef
callq 0x9530
movq %rax, %rdi
movq -0x28(%rbp), %rax
movsd 0x68(%rax), %xmm0
callq 0x9a30
movq %rax, %rdi
leaq 0x1bd89(%rip), %rsi     # 0x852bb
callq 0x9530
movq %rax, %rdi
movq 0x4ea57(%rip), %rsi     # 0xb7f98
callq 0x9590
movq -0x28(%rbp), %rax
movq 0xf0(%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x6a1cf
movq -0x38(%rbp), %rdi
addq $0x90, %rdi
movq -0x28(%rbp), %rcx
movl -0x1c(%rbp), %r8d
movl $0x63, %esi
leaq 0x1af79(%rip), %rdx     # 0x844f8
movb $0x0, %al
callq 0x9860
movq -0x38(%rbp), %rax
movb $0x0, 0xf3(%rax)
movl $0x0, -0x3c(%rbp)
movl $0x0, -0x40(%rbp)
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
movl $0x0, -0x54(%rbp)
movl -0x54(%rbp), %eax
movq -0x38(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jge 0x696fc
movl $0x0, -0x58(%rbp)
movq -0x48(%rbp), %rax
movsd 0x8(%rax), %xmm0
callq 0x7fce0
testb $0x1, %al
jne 0x695f7
movq -0x48(%rbp), %rax
movsd 0x10(%rax), %xmm0
callq 0x7fce0
testb $0x1, %al
jne 0x695f7
jmp 0x69607
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
movl $0x1, -0x58(%rbp)
movq -0x48(%rbp), %rax
movsd 0x18(%rax), %xmm0
callq 0x7fce0
testb $0x1, %al
jne 0x69651
movq -0x48(%rbp), %rax
movsd 0x20(%rax), %xmm0
callq 0x7fce0
testb $0x1, %al
jne 0x69651
movq -0x48(%rbp), %rax
movsd 0x28(%rax), %xmm0
callq 0x7fce0
testb $0x1, %al
jne 0x69651
movq -0x48(%rbp), %rax
movsd 0x30(%rax), %xmm0
callq 0x7fce0
testb $0x1, %al
jne 0x69651
jmp 0x69661
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
movl $0x1, -0x58(%rbp)
cmpl $0x0, -0x58(%rbp)
je 0x696da
cmpq $0x0, -0x50(%rbp)
jne 0x696af
movq -0xc0(%rbp), %rax
cmpl $0x0, 0x60(%rax)
jle 0x69692
movq -0xc0(%rbp), %rdi
addq $0x68, %rdi
leaq 0x1ae71(%rip), %rsi     # 0x844fe
callq 0x9530
movq 0x4e94f(%rip), %rdi     # 0xb7fe8
leaq 0x1ae5e(%rip), %rsi     # 0x844fe
callq 0x9530
movl $0x1, %edi
callq 0x96a0
movq -0x38(%rbp), %rax
movl 0x18(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x18(%rax)
movq -0x48(%rbp), %rax
movq 0x38(%rax), %rcx
movq -0x50(%rbp), %rax
movq %rcx, 0x38(%rax)
movq -0x48(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x48(%rbp)
jmp 0x696ee
movq -0x48(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x48(%rbp)
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x695ba
movq -0xc0(%rbp), %rax
cmpl $0x2, 0x60(%rax)
jle 0x69a36
movq -0xc0(%rbp), %rdi
addq $0x68, %rdi
leaq 0x1ae12(%rip), %rsi     # 0x84531
callq 0x9530
movq %rax, %rdi
movl -0x18(%rbp), %esi
callq 0x9930
movq %rax, %rdi
leaq 0x1bb26(%rip), %rsi     # 0x8525f
callq 0x9530
movq %rax, %rdi
movl -0x1c(%rbp), %esi
callq 0x9930
movq %rax, %rdi
leaq 0x1bf58(%rip), %rsi     # 0x856ab
callq 0x9530
movq %rax, %rdi
movq -0x38(%rbp), %rax
movl 0x18(%rax), %esi
callq 0x9930
movq %rax, %rdi
leaq 0x1adde(%rip), %rsi     # 0x8454f
callq 0x9530
movq %rax, %rdi
movq -0x38(%rbp), %rax
movl 0x20(%rax), %esi
callq 0x9930
movq %rax, %rdi
leaq 0x1bb2c(%rip), %rsi     # 0x852bb
callq 0x9530
movq -0xc0(%rbp), %rdi
addq $0x68, %rdi
leaq 0x1adb5(%rip), %rsi     # 0x8455b
callq 0x9530
movq %rax, %rdi
movl -0x40(%rbp), %esi
callq 0x9930
movq %rax, %rdi
leaq 0x1ada5(%rip), %rsi     # 0x84565
callq 0x9530
movq %rax, %rdi
movl -0x3c(%rbp), %esi
callq 0x9930
movq %rax, %rdi
leaq 0x1ada2(%rip), %rsi     # 0x8457c
callq 0x9530
movq -0xc0(%rbp), %rdi
addq $0x68, %rdi
leaq 0x1adac(%rip), %rsi     # 0x8459d
callq 0x9530
movq %rax, %rdi
movq -0x38(%rbp), %rax
movsd (%rax), %xmm0
callq 0x9a30
movq %rax, %rdi
leaq 0x19114(%rip), %rsi     # 0x82924
callq 0x9530
movq %rax, %rdi
movq -0x38(%rbp), %rax
movsd 0x8(%rax), %xmm0
callq 0x9a30
movq %rax, %rdi
leaq 0x1ba8b(%rip), %rsi     # 0x852bb
callq 0x9530
movq -0xc0(%rbp), %rdi
addq $0x68, %rdi
leaq 0x1ad66(%rip), %rsi     # 0x845ad
callq 0x9530
movq %rax, %rdi
movq -0x38(%rbp), %rax
movsd 0x28(%rax), %xmm0
callq 0x9a30
movq %rax, %rdi
leaq 0x190bd(%rip), %rsi     # 0x82924
callq 0x9530
movq %rax, %rdi
movq -0x38(%rbp), %rax
movsd 0x30(%rax), %xmm0
callq 0x9a30
movq %rax, %rdi
leaq 0x1ad31(%rip), %rsi     # 0x845b8
callq 0x9530
movq %rax, %rdi
movq -0x38(%rbp), %rax
movsd 0x38(%rax), %xmm0
callq 0x9a30
movq %rax, %rdi
leaq 0x1907d(%rip), %rsi     # 0x82924
callq 0x9530
movq %rax, %rdi
movq -0x38(%rbp), %rax
movsd 0x40(%rax), %xmm0
callq 0x9a30
movq %rax, %rdi
leaq 0x1b9f4(%rip), %rsi     # 0x852bb
callq 0x9530
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x60(%rbp)
movl $0x0, -0x64(%rbp)
movl -0x64(%rbp), %eax
movq -0x38(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jge 0x69a1f
movq -0xc0(%rbp), %rdi
addq $0x68, %rdi
leaq 0x1acbf(%rip), %rsi     # 0x845c0
callq 0x9530
movq %rax, %rdi
movl -0x64(%rbp), %esi
callq 0x9930
movq %rax, %rdi
leaq 0x1acad(%rip), %rsi     # 0x845c8
callq 0x9530
movq %rax, %rdi
movq -0x60(%rbp), %rax
movl (%rax), %esi
callq 0x9930
movq %rax, %rdi
leaq 0x1ac97(%rip), %rsi     # 0x845cf
callq 0x9530
movq %rax, %rdi
movq -0x60(%rbp), %rax
movsd 0x8(%rax), %xmm0
callq 0x9a30
movq %rax, %rdi
leaq 0x18fcc(%rip), %rsi     # 0x82924
callq 0x9530
movq %rax, %rdi
movq -0x60(%rbp), %rax
movsd 0x10(%rax), %xmm0
callq 0x9a30
movq -0xc0(%rbp), %rdi
addq $0x68, %rdi
leaq 0x1ac5b(%rip), %rsi     # 0x845db
callq 0x9530
movq %rax, %rdi
movq -0x60(%rbp), %rax
movsd 0x18(%rax), %xmm0
callq 0x9a30
movq %rax, %rdi
leaq 0x18f84(%rip), %rsi     # 0x82924
callq 0x9530
movq %rax, %rdi
movq -0x60(%rbp), %rax
movsd 0x20(%rax), %xmm0
callq 0x9a30
movq %rax, %rdi
leaq 0x1ac2f(%rip), %rsi     # 0x845ef
callq 0x9530
movq %rax, %rdi
movq -0x60(%rbp), %rax
movsd 0x28(%rax), %xmm0
callq 0x9a30
movq %rax, %rdi
leaq 0x18f44(%rip), %rsi     # 0x82924
callq 0x9530
movq %rax, %rdi
movq -0x60(%rbp), %rax
movsd 0x30(%rax), %xmm0
callq 0x9a30
movq %rax, %rdi
leaq 0x1ab9a(%rip), %rsi     # 0x8459a
callq 0x9530
movq -0x60(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x60(%rbp)
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0x698df
movq -0xc0(%rbp), %rdi
addq $0x68, %rdi
movq 0x4e567(%rip), %rsi     # 0xb7f98
callq 0x9590
movq -0x38(%rbp), %rax
cmpl $0x0, 0x1c(%rax)
jne 0x69a69
movq -0xc0(%rbp), %rax
cmpl $0x0, 0x60(%rax)
jle 0x69a64
movq -0xc0(%rbp), %rdi
addq $0x68, %rdi
leaq 0x1ab98(%rip), %rsi     # 0x845f7
callq 0x9530
jmp 0x6a1b5
movq -0x38(%rbp), %rdi
movsd -0x10(%rbp), %xmm0
mulsd -0x10(%rbp), %xmm0
callq 0x6a380
movq -0xc0(%rbp), %rax
cmpl $0x2, 0x60(%rax)
jle 0x69d4f
movq -0xc0(%rbp), %rdi
addq $0x68, %rdi
leaq 0x1ab74(%rip), %rsi     # 0x84613
callq 0x9530
movq %rax, %rdi
movl -0x18(%rbp), %esi
callq 0x9930
movq %rax, %rdi
leaq 0x1b7a6(%rip), %rsi     # 0x8525f
callq 0x9530
movq %rax, %rdi
movl -0x1c(%rbp), %esi
callq 0x9930
movq %rax, %rdi
leaq 0x1bbd8(%rip), %rsi     # 0x856ab
callq 0x9530
movq %rax, %rdi
movq -0x38(%rbp), %rax
movl 0x18(%rax), %esi
callq 0x9930
movq %rax, %rdi
leaq 0x1aa5e(%rip), %rsi     # 0x8454f
callq 0x9530
movq %rax, %rdi
movq -0x38(%rbp), %rax
movl 0x20(%rax), %esi
callq 0x9930
movq %rax, %rdi
leaq 0x1b7ac(%rip), %rsi     # 0x852bb
callq 0x9530
movq -0xc0(%rbp), %rdi
addq $0x68, %rdi
leaq 0x1ab0c(%rip), %rsi     # 0x84632
callq 0x9530
movq %rax, %rdi
movq -0x38(%rbp), %rax
movq 0x50(%rax), %rax
movsd (%rax), %xmm0
callq 0x9a30
movq %rax, %rdi
leaq 0x18ddb(%rip), %rsi     # 0x82924
callq 0x9530
movq %rax, %rdi
movq -0x38(%rbp), %rax
movq 0x50(%rax), %rax
movsd 0x8(%rax), %xmm0
callq 0x9a30
movq %rax, %rdi
leaq 0x1aacf(%rip), %rsi     # 0x8463c
callq 0x9530
movq %rax, %rdi
movq -0x38(%rbp), %rax
movsd 0x28(%rax), %xmm0
callq 0x9a30
movq %rax, %rdi
leaq 0x18d97(%rip), %rsi     # 0x82924
callq 0x9530
movq %rax, %rdi
movq -0x38(%rbp), %rax
movsd 0x30(%rax), %xmm0
callq 0x9a30
movq %rax, %rdi
leaq 0x1aa0b(%rip), %rsi     # 0x845b8
callq 0x9530
movq %rax, %rdi
movq -0x38(%rbp), %rax
movsd 0x38(%rax), %xmm0
callq 0x9a30
movq %rax, %rdi
leaq 0x18d57(%rip), %rsi     # 0x82924
callq 0x9530
movq %rax, %rdi
movq -0x38(%rbp), %rax
movsd 0x40(%rax), %xmm0
callq 0x9a30
movq %rax, %rdi
leaq 0x1b6ce(%rip), %rsi     # 0x852bb
callq 0x9530
movq -0x38(%rbp), %rax
movq 0x50(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x70(%rbp)
movl $0x0, -0x74(%rbp)
movl -0x74(%rbp), %eax
movq -0x38(%rbp), %rcx
movq 0x50(%rcx), %rcx
cmpl 0x18(%rcx), %eax
jge 0x69d4d
movq -0xc0(%rbp), %rdi
addq $0x68, %rdi
leaq 0x1a991(%rip), %rsi     # 0x845c0
callq 0x9530
movq %rax, %rdi
movl -0x74(%rbp), %esi
callq 0x9930
movq %rax, %rdi
leaq 0x1a97f(%rip), %rsi     # 0x845c8
callq 0x9530
movq %rax, %rdi
movq -0x70(%rbp), %rax
movl (%rax), %esi
callq 0x9930
movq %rax, %rdi
leaq 0x1a969(%rip), %rsi     # 0x845cf
callq 0x9530
movq %rax, %rdi
movq -0x70(%rbp), %rax
movsd 0x8(%rax), %xmm0
callq 0x9a30
movq %rax, %rdi
leaq 0x18c9e(%rip), %rsi     # 0x82924
callq 0x9530
movq %rax, %rdi
movq -0x70(%rbp), %rax
movsd 0x10(%rax), %xmm0
callq 0x9a30
movq -0xc0(%rbp), %rdi
addq $0x68, %rdi
leaq 0x1a92d(%rip), %rsi     # 0x845db
callq 0x9530
movq %rax, %rdi
movq -0x70(%rbp), %rax
movsd 0x18(%rax), %xmm0
callq 0x9a30
movq %rax, %rdi
leaq 0x18c56(%rip), %rsi     # 0x82924
callq 0x9530
movq %rax, %rdi
movq -0x70(%rbp), %rax
movsd 0x20(%rax), %xmm0
callq 0x9a30
movq %rax, %rdi
leaq 0x1a901(%rip), %rsi     # 0x845ef
callq 0x9530
movq %rax, %rdi
movq -0x70(%rbp), %rax
movsd 0x28(%rax), %xmm0
callq 0x9a30
movq %rax, %rdi
leaq 0x18c16(%rip), %rsi     # 0x82924
callq 0x9530
movq %rax, %rdi
movq -0x70(%rbp), %rax
movsd 0x30(%rax), %xmm0
callq 0x9a30
movq %rax, %rdi
leaq 0x1a86c(%rip), %rsi     # 0x8459a
callq 0x9530
movq -0x70(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x70(%rbp)
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0x69c09
jmp 0x69d4f
movq -0xc0(%rbp), %rdi
movq -0x38(%rbp), %rax
movq 0x50(%rax), %rsi
movsd -0x10(%rbp), %xmm0
mulsd -0x10(%rbp), %xmm0
callq 0x690d0
movq -0xc0(%rbp), %rax
cmpl $0x2, 0x60(%rax)
jle 0x6a04f
movq -0xc0(%rbp), %rdi
addq $0x68, %rdi
leaq 0x1a8b7(%rip), %rsi     # 0x84647
callq 0x9530
movq %rax, %rdi
movl -0x18(%rbp), %esi
callq 0x9930
movq %rax, %rdi
leaq 0x1b4b5(%rip), %rsi     # 0x8525f
callq 0x9530
movq %rax, %rdi
movl -0x1c(%rbp), %esi
callq 0x9930
movq %rax, %rdi
leaq 0x1b8e7(%rip), %rsi     # 0x856ab
callq 0x9530
movq %rax, %rdi
movq -0x38(%rbp), %rax
movl 0x18(%rax), %esi
callq 0x9930
movq %rax, %rdi
leaq 0x1a76d(%rip), %rsi     # 0x8454f
callq 0x9530
movq %rax, %rdi
movq -0x38(%rbp), %rax
movl 0x20(%rax), %esi
callq 0x9930
movq %rax, %rdi
leaq 0x1b4bb(%rip), %rsi     # 0x852bb
callq 0x9530
movq -0xc0(%rbp), %rdi
addq $0x68, %rdi
leaq 0x1a81b(%rip), %rsi     # 0x84632
callq 0x9530
movq %rax, %rdi
movq -0x38(%rbp), %rax
movq 0x50(%rax), %rax
movsd (%rax), %xmm0
callq 0x9a30
movq %rax, %rdi
leaq 0x18aea(%rip), %rsi     # 0x82924
callq 0x9530
movq %rax, %rdi
movq -0x38(%rbp), %rax
movq 0x50(%rax), %rax
movsd 0x8(%rax), %xmm0
callq 0x9a30
movq %rax, %rdi
leaq 0x1a7de(%rip), %rsi     # 0x8463c
callq 0x9530
movq %rax, %rdi
movq -0x38(%rbp), %rax
movsd 0x28(%rax), %xmm0
callq 0x9a30
movq %rax, %rdi
leaq 0x18aa6(%rip), %rsi     # 0x82924
callq 0x9530
movq %rax, %rdi
movq -0x38(%rbp), %rax
movsd 0x30(%rax), %xmm0
callq 0x9a30
movq %rax, %rdi
leaq 0x1a71a(%rip), %rsi     # 0x845b8
callq 0x9530
movq %rax, %rdi
movq -0x38(%rbp), %rax
movsd 0x38(%rax), %xmm0
callq 0x9a30
movq %rax, %rdi
leaq 0x18a66(%rip), %rsi     # 0x82924
callq 0x9530
movq %rax, %rdi
movq -0x38(%rbp), %rax
movsd 0x40(%rax), %xmm0
callq 0x9a30
movq %rax, %rdi
leaq 0x1b3dd(%rip), %rsi     # 0x852bb
callq 0x9530
movq -0x38(%rbp), %rax
movq 0x50(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x80(%rbp)
movl $0x0, -0x84(%rbp)
movl -0x84(%rbp), %eax
movq -0x38(%rbp), %rcx
movq 0x50(%rcx), %rcx
cmpl 0x18(%rcx), %eax
jge 0x6a04d
movq -0xc0(%rbp), %rdi
addq $0x68, %rdi
leaq 0x1a69a(%rip), %rsi     # 0x845c0
callq 0x9530
movq %rax, %rdi
movl -0x84(%rbp), %esi
callq 0x9930
movq %rax, %rdi
leaq 0x1a685(%rip), %rsi     # 0x845c8
callq 0x9530
movq %rax, %rdi
movq -0x80(%rbp), %rax
movl (%rax), %esi
callq 0x9930
movq %rax, %rdi
leaq 0x1a66f(%rip), %rsi     # 0x845cf
callq 0x9530
movq %rax, %rdi
movq -0x80(%rbp), %rax
movsd 0x8(%rax), %xmm0
callq 0x9a30
movq %rax, %rdi
leaq 0x189a4(%rip), %rsi     # 0x82924
callq 0x9530
movq %rax, %rdi
movq -0x80(%rbp), %rax
movsd 0x10(%rax), %xmm0
callq 0x9a30
movq -0xc0(%rbp), %rdi
addq $0x68, %rdi
leaq 0x1a633(%rip), %rsi     # 0x845db
callq 0x9530
movq %rax, %rdi
movq -0x80(%rbp), %rax
movsd 0x18(%rax), %xmm0
callq 0x9a30
movq %rax, %rdi
leaq 0x1895c(%rip), %rsi     # 0x82924
callq 0x9530
movq %rax, %rdi
movq -0x80(%rbp), %rax
movsd 0x20(%rax), %xmm0
callq 0x9a30
movq %rax, %rdi
leaq 0x1a607(%rip), %rsi     # 0x845ef
callq 0x9530
movq %rax, %rdi
movq -0x80(%rbp), %rax
movsd 0x28(%rax), %xmm0
callq 0x9a30
movq %rax, %rdi
leaq 0x1891c(%rip), %rsi     # 0x82924
callq 0x9530
movq %rax, %rdi
movq -0x80(%rbp), %rax
movsd 0x30(%rax), %xmm0
callq 0x9a30
movq %rax, %rdi
leaq 0x1a572(%rip), %rsi     # 0x8459a
callq 0x9530
movq -0x80(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x80(%rbp)
movl -0x84(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x84(%rbp)
jmp 0x69efd
jmp 0x6a04f
movl $0xc0, %edi
callq 0x9550
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xd8(%rbp)
callq 0x5e600
jmp 0x6a06d
movq -0xd8(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x60(%rax)
movq -0x38(%rbp), %rax
movq 0x60(%rax), %rdi
movq -0x38(%rbp), %rax
movq 0x50(%rax), %rsi
callq 0x6a900
movq -0xc0(%rbp), %rax
cmpl $0x1, 0x60(%rax)
jle 0x6a170
movq -0xc0(%rbp), %rdi
addq $0x68, %rdi
leaq 0x1a5b0(%rip), %rsi     # 0x84664
callq 0x9530
movq %rax, %rdi
movl -0x1c(%rbp), %esi
callq 0x9930
movq %rax, %rdi
leaq 0x1a5a6(%rip), %rsi     # 0x84674
callq 0x9530
movq %rax, %rdi
movq -0x38(%rbp), %rsi
addq $0x90, %rsi
callq 0x9530
movq %rax, %rdi
leaq 0x1b5bb(%rip), %rsi     # 0x856ab
callq 0x9530
movq %rax, %rdi
movq -0x38(%rbp), %rax
movq 0x60(%rax), %rax
movl 0x8(%rax), %esi
callq 0x9930
movq %rax, %rdi
leaq 0x1a56d(%rip), %rsi     # 0x8467f
callq 0x9530
movq %rax, -0xe0(%rbp)
movq -0x38(%rbp), %rax
movq 0x60(%rax), %rdi
callq 0x5ed10
movq -0xe0(%rbp), %rdi
callq 0x9a30
movq %rax, %rdi
leaq 0x1a54f(%rip), %rsi     # 0x84690
callq 0x9530
jmp 0x6a170
movq -0xd8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
movl $0xc0, %esi
callq 0x9560
jmp 0x6a373
movq -0x38(%rbp), %rax
movq 0x60(%rax), %rdi
callq 0x7fd00
cmpl $0x0, %eax
je 0x6a1b3
movq -0xc0(%rbp), %rax
cmpl $0x1, 0x60(%rax)
jle 0x6a1a6
movq -0xc0(%rbp), %rdi
addq $0x68, %rdi
leaq 0x1a4f5(%rip), %rsi     # 0x84696
callq 0x9530
movq -0x38(%rbp), %rax
movq 0x60(%rax), %rdi
callq 0x5f5a0
jmp 0x6a1b5
movq -0x38(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x38(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x69555
movq -0xc0(%rbp), %rax
cmpl $0x0, 0x60(%rax)
jle 0x6a1f3
movq -0xc0(%rbp), %rdi
addq $0x68, %rdi
movq 0x4ddaa(%rip), %rsi     # 0xb7f98
callq 0x9590
jmp 0x6a1f5
movq -0x28(%rbp), %rax
movq 0xf8(%rax), %rax
movq %rax, -0x28(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x69400
testb $0x1, -0x11(%rbp)
je 0x6a337
movq -0xc0(%rbp), %rax
movl $0x0, -0x18(%rbp)
cmpl $0x0, 0x60(%rax)
jle 0x6a247
movq -0xc0(%rbp), %rdi
addq $0x68, %rdi
leaq 0x1a485(%rip), %rsi     # 0x846c7
callq 0x9530
movq -0xc0(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0xa0(%rbp)
cmpq $0x0, -0xa0(%rbp)
je 0x6a335
movl $0x0, -0x1c(%rbp)
movq $0x0, -0xa8(%rbp)
movq $0x0, -0xb0(%rbp)
movq -0xa0(%rbp), %rax
movq 0xf0(%rax), %rax
movq %rax, -0xb8(%rbp)
cmpq $0x0, -0xb8(%rbp)
je 0x6a310
movq -0xc0(%rbp), %rdi
movq -0xb8(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0xb0(%rbp)
movq -0xb8(%rbp), %rsi
movq -0xa0(%rbp), %rdx
movq -0xa8(%rbp), %rcx
movl -0x18(%rbp), %r8d
movl -0x1c(%rbp), %r9d
callq 0x6a9d0
cmpl $0x0, %eax
jne 0x6a2f5
movq -0xb8(%rbp), %rax
movq %rax, -0xa8(%rbp)
jmp 0x6a2f7
movq -0xb0(%rbp), %rax
movq %rax, -0xb8(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x6a29d
jmp 0x6a312
movq -0xa0(%rbp), %rax
movq 0xf8(%rax), %rax
movq %rax, -0xa0(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x6a25d
jmp 0x6a337
movq -0xc0(%rbp), %rax
cmpl $0x0, 0x60(%rax)
jle 0x6a36a
movq -0xc0(%rbp), %rdi
addq $0x68, %rdi
leaq 0x1a3b8(%rip), %rsi     # 0x8470e
callq 0x9530
movq %rax, %rdi
movq 0x4dc33(%rip), %rsi     # 0xb7f98
callq 0x9590
addq $0xe0, %rsp
popq %rbp
retq
movq -0x90(%rbp), %rdi
callq 0x9960
nop