// File: /workspace/github_cpp_makefile_star2_O2/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 $0xe8, %rsp
movsd %xmm0, 0x18(%rsp)
movq 0x8(%rdi), %rbx
testq %rbx, %rbx
je 0x285fb
movq %rdi, %r15
movl %esi, 0x44(%rsp)
cmpl $0x0, 0x60(%rdi)
jle 0x27705
leaq 0x68(%r15), %rdi
leaq 0xeda8(%rip), %rsi      # 0x3649c
callq 0x8420
movq %rax, %rdi
callq 0x8320
movq 0x8(%r15), %rbx
addq $0x10, %rbx
leaq 0x68(%r15), %r14
movsd 0x18(%rsp), %xmm0
mulsd %xmm0, %xmm0
movsd %xmm0, 0x18(%rsp)
movq $0x0, 0x10(%rsp)
movq %r15, 0x30(%rsp)
movq %r14, 0x38(%rsp)
movq (%rbx), %rbx
movl 0x60(%r15), %eax
testq %rbx, %rbx
je 0x28555
testl %eax, %eax
jle 0x27831
movq %r14, %rdi
leaq 0xedca(%rip), %rsi      # 0x3651c
callq 0x8420
movq %rax, %rdi
movq 0x10(%rsp), %rsi
callq 0x8740
movq %rax, %rdi
leaq 0xed47(%rip), %rsi      # 0x364b5
callq 0x8420
movq %rax, %rdi
movq %rbx, %rsi
callq 0x8420
movq %rax, %rdi
leaq 0xed32(%rip), %rsi      # 0x364ba
callq 0x8420
movsbl 0x50(%rbx), %esi
movq %rax, %rdi
callq 0x8740
movq %rax, %rdi
leaq 0xd0f8(%rip), %rsi      # 0x3489b
callq 0x8420
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x6, 0x10(%rax,%rcx)
movq %rax, %rdi
pushq $0x30
popq %rsi
callq 0x8680
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rax,%rcx)
movl 0x58(%rbx), %esi
andl $0xffffff, %esi         # imm = 0xFFFFFF
movq %rax, %rdi
callq 0x8310
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x2, %edx
movl %edx, 0x18(%rax,%rcx)
movq %rax, %rdi
leaq 0xecbb(%rip), %rsi      # 0x364c3
callq 0x8420
movsd 0x68(%rbx), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
leaq 0xfa68(%rip), %rsi      # 0x3728c
callq 0x8420
movq %rax, %rdi
callq 0x8320
leaq 0xf0(%rbx), %rbp
xorl %r12d, %r12d
movq %rbx, 0x48(%rsp)
movq (%rbp), %rbp
testq %rbp, %rbp
je 0x2852e
leaq 0x90(%rbp), %rdi
movq $0x0, 0x20(%rsp)
movq %rdi, 0x68(%rsp)
pushq $0x63
popq %rsi
leaq 0xec60(%rip), %rdx      # 0x364cc
movq %rbx, %rcx
movl %r12d, %r8d
xorl %eax, %eax
callq 0x86a0
movb $0x0, 0xf3(%rbp)
leaq 0x10(%rbp), %r13
movl 0x18(%rbp), %eax
xorl %ebx, %ebx
movq %r13, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
cmpl %eax, %ecx
jge 0x27924
movq (%rdi), %rsi
movsd 0x8(%rsi), %xmm0
ucomisd %xmm0, %xmm0
jp 0x2791e
movsd 0x10(%rsi), %xmm0
movb $0x1, %dil
ucomisd %xmm0, %xmm0
jp 0x2791e
movsd 0x18(%rsi), %xmm0
ucomisd %xmm0, %xmm0
jp 0x278ee
movsd 0x20(%rsi), %xmm0
ucomisd %xmm0, %xmm0
jp 0x278ee
movsd 0x28(%rsi), %xmm0
ucomisd %xmm0, %xmm0
jp 0x278ee
movsd 0x30(%rsi), %xmm0
ucomisd %xmm0, %xmm0
jp 0x278ee
testb %dil, %dil
je 0x278fa
leaq 0x38(%rsi), %rdi
movq %rsi, %rdx
jmp 0x27917
movq 0x20(%rsp), %rdi
incl %edi
movq %rdi, 0x20(%rsp)
testq %rdx, %rdx
je 0x2860d
decl %eax
movl %eax, 0x18(%rbp)
movq 0x38(%rsi), %rdi
addq $0x38, %rsi
movq %rdi, 0x38(%rdx)
movq %rsi, %rdi
incl %ecx
jmp 0x27890
incl %ebx
xorl %edi, %edi
jmp 0x278b4
movl %r12d, 0x4(%rsp)
movq %r15, %r12
cmpl $0x2, 0x60(%r15)
movq %rbp, 0x8(%rsp)
jle 0x27bd2
movq %r14, %rdi
leaq 0xebbf(%rip), %rsi      # 0x36505
callq 0x8420
movq %rax, %rdi
movq 0x10(%rsp), %rsi
callq 0x8740
movq %rax, %rdi
leaq 0xf8ce(%rip), %rsi      # 0x37230
callq 0x8420
movq %rax, %rdi
movl 0x4(%rsp), %esi
callq 0x8740
movq %rax, %rdi
leaq 0xfcec(%rip), %rsi      # 0x37669
callq 0x8420
movl 0x18(%rbp), %esi
movq %rax, %rdi
callq 0x8740
movq %rax, %rdi
leaq 0xeb8c(%rip), %rsi      # 0x36523
callq 0x8420
movl 0x20(%rbp), %esi
movq %rax, %rdi
callq 0x8740
movq %rax, %rdi
movq %rbp, %r15
leaq 0xf8d8(%rip), %rbp      # 0x3728c
movq %rbp, %rsi
callq 0x8420
movq %r14, %rdi
leaq 0xeb69(%rip), %rsi      # 0x3652f
callq 0x8420
movq %rax, %rdi
movl %ebx, %esi
callq 0x8740
movq %rax, %rdi
leaq 0xeb5a(%rip), %rsi      # 0x36539
callq 0x8420
movq %rax, %rdi
movq 0x20(%rsp), %rsi
callq 0x8740
movq %rax, %rdi
leaq 0xeb55(%rip), %rsi      # 0x36550
callq 0x8420
movq %r14, %rdi
leaq 0xeb67(%rip), %rsi      # 0x36571
callq 0x8420
movsd (%r15), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
leaq 0xce92(%rip), %rbx      # 0x348b8
movq %rbx, %rsi
callq 0x8420
movsd 0x8(%r15), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
movq %rbp, %rsi
callq 0x8420
movq %r14, %rdi
leaq 0xeb30(%rip), %rsi      # 0x36581
callq 0x8420
movsd 0x28(%r15), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x8420
movsd 0x30(%r15), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
leaq 0xeb05(%rip), %rsi      # 0x3658c
callq 0x8420
movsd 0x38(%r15), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x8420
movsd 0x40(%r15), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
movq %rbp, %rsi
movq %rbx, %rbp
callq 0x8420
xorl %ebx, %ebx
movq 0x8(%rsp), %rax
cmpl 0x18(%rax), %ebx
jge 0x27bc5
movq (%r13), %r13
movq %r14, %rdi
leaq 0xeab5(%rip), %rsi      # 0x36594
callq 0x8420
movq %rax, %rdi
movl %ebx, %esi
callq 0x8740
movq %rax, %rdi
leaq 0xeaa4(%rip), %rsi      # 0x3659c
callq 0x8420
movl (%r13), %esi
movq %rax, %rdi
callq 0x8740
movq %rax, %rdi
leaq 0xea90(%rip), %rsi      # 0x365a3
callq 0x8420
movsd 0x8(%r13), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
movq %rbp, %rsi
callq 0x8420
movsd 0x10(%r13), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %r14, %rdi
leaq 0xea66(%rip), %rsi      # 0x365af
callq 0x8420
movsd 0x18(%r13), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
movq %rbp, %rsi
callq 0x8420
movsd 0x20(%r13), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
leaq 0xea44(%rip), %rsi      # 0x365c3
callq 0x8420
movsd 0x28(%r13), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
movq %rbp, %rsi
callq 0x8420
movsd 0x30(%r13), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
leaq 0xe9b9(%rip), %rsi      # 0x3656e
callq 0x8420
addq $0x38, %r13
incl %ebx
jmp 0x27ac3
movq %r14, %rdi
callq 0x8320
movq 0x8(%rsp), %rbp
movq %rbp, %r15
movl 0x1c(%rbp), %ebp
testl %ebp, %ebp
je 0x2813f
movq 0x10(%r15), %r14
movl $0xf8, %edi
callq 0x85b0
movq %rax, %rbx
movq %rax, 0x50(%r15)
movups (%r15), %xmm0
movaps %xmm0, 0x20(%rsp)
movups %xmm0, (%rax)
movl 0x18(%r15), %r13d
movl %r13d, 0x18(%rax)
andq $0x0, 0x48(%rax)
movq %rax, 0x50(%rax)
andq $0x0, 0x60(%rax)
andl $0x0, 0x20(%rax)
movl %ebp, 0x1c(%rax)
movq %rax, %r12
addq $0x10, %r12
xorl %r15d, %r15d
testq %r14, %r14
je 0x27c78
pushq $0x40
popq %rdi
callq 0x85b0
movupd (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups 0x20(%r14), %xmm2
movupd %xmm0, (%rax)
movups %xmm1, 0x10(%rax)
movups %xmm2, 0x20(%rax)
movq 0x30(%r14), %rcx
movq %rcx, 0x30(%rax)
andq $0x0, 0x38(%rax)
leaq 0x38(%r15), %rcx
testq %r15, %r15
cmoveq %r12, %rcx
cmoveq %rax, %rbp
movq %rax, (%rcx)
movq 0x38(%r14), %r14
movq %rax, %r15
jmp 0x27c28
cvtpd2ps 0x20(%rsp), %xmm0
movapd %xmm0, %xmm3
movapd %xmm0, 0x50(%rsp)
movq 0x30(%rsp), %r15
movq 0x38(%rsp), %r14
pushq $0x40
popq %r12
testq %rbp, %rbp
je 0x27ed4
movapd %xmm3, 0x90(%rsp)
cvtps2pd %xmm0, %xmm5
movapd %xmm5, %xmm0
unpckhpd %xmm5, %xmm0            # xmm0 = xmm0[1],xmm5[1]
movapd %xmm0, 0xb0(%rsp)
movapd %xmm5, 0xa0(%rsp)
cmpl $0x1, (%rbp)
movsd 0x8(%rbp), %xmm0
jne 0x27e6c
movapd %xmm0, %xmm2
subsd %xmm5, %xmm2
movsd 0x10(%rbp), %xmm6
movapd 0xb0(%rsp), %xmm1
subsd %xmm6, %xmm1
movapd %xmm0, 0x20(%rsp)
xorpd 0xe3c4(%rip), %xmm0     # 0x360c0
unpcklpd %xmm2, %xmm0            # xmm0 = xmm0[0],xmm2[0]
movupd 0x28(%rbp), %xmm8
movapd %xmm8, %xmm3
unpckhpd %xmm8, %xmm3            # xmm3 = xmm3[1],xmm8[1]
mulsd %xmm2, %xmm3
mulsd %xmm2, %xmm2
movapd %xmm1, %xmm4
mulsd %xmm1, %xmm4
addsd %xmm2, %xmm4
movupd 0x18(%rbp), %xmm7
movapd %xmm5, %xmm2
unpckhpd %xmm7, %xmm2            # xmm2 = xmm2[1],xmm7[1]
mulpd %xmm2, %xmm0
movapd %xmm5, %xmm2
movapd %xmm7, 0xd0(%rsp)
unpcklpd %xmm7, %xmm2            # xmm2 = xmm2[0],xmm7[0]
movapd %xmm6, 0x70(%rsp)
movapd %xmm6, %xmm5
unpcklpd %xmm1, %xmm5            # xmm5 = xmm5[0],xmm1[0]
mulpd %xmm2, %xmm5
addpd %xmm0, %xmm5
movapd %xmm5, %xmm0
unpckhpd %xmm5, %xmm0            # xmm0 = xmm0[1],xmm5[1]
addsd %xmm5, %xmm0
mulsd %xmm0, %xmm0
divsd %xmm4, %xmm0
movapd %xmm8, 0xc0(%rsp)
mulsd %xmm8, %xmm1
addsd %xmm3, %xmm1
addsd %xmm5, %xmm1
mulsd %xmm1, %xmm1
divsd %xmm4, %xmm1
callq 0x8560
movsd 0x18(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jae 0x27e73
movq %r12, %rdi
callq 0x85b0
movq 0x38(%rbp), %rcx
movq %rcx, 0x38(%rax)
movq %rax, 0x38(%rbp)
movl $0x1, (%rax)
movaps 0x20(%rsp), %xmm0
movsd %xmm0, 0x8(%rax)
movaps 0x70(%rsp), %xmm0
movsd %xmm0, 0x10(%rax)
movapd 0xd0(%rsp), %xmm3
movapd %xmm3, %xmm0
movapd 0xc0(%rsp), %xmm4
addpd %xmm4, %xmm0
movapd 0xe35c(%rip), %xmm2     # 0x36150
mulpd %xmm2, %xmm0
cvtpd2ps %xmm0, %xmm0
movupd 0x8(%rbp), %xmm1
addpd %xmm4, %xmm1
mulpd %xmm2, %xmm1
cvtpd2ps %xmm1, %xmm1
movapd 0xa0(%rsp), %xmm5
addpd %xmm5, %xmm3
mulpd %xmm2, %xmm3
cvtpd2ps %xmm3, %xmm2
cvtps2pd %xmm2, %xmm3
addps %xmm0, %xmm2
addps %xmm1, %xmm0
movaps 0xe32e(%rip), %xmm4     # 0x36160
mulps %xmm4, %xmm0
movups %xmm3, 0x18(%rbp)
mulps %xmm4, %xmm2
cvtps2pd %xmm2, %xmm3
addps %xmm0, %xmm2
mulps %xmm4, %xmm2
cvtps2pd %xmm2, %xmm2
movups %xmm2, 0x8(%rbp)
movupd %xmm3, 0x28(%rbp)
cvtps2pd %xmm0, %xmm0
cvtps2pd %xmm1, %xmm1
movupd %xmm0, 0x18(%rax)
movups %xmm1, 0x28(%rax)
incl %r13d
movl %r13d, 0x18(%rbx)
jmp 0x27cc5
movhpd 0x10(%rbp), %xmm0       # xmm0 = xmm0[0],mem[0]
jmp 0x27e83
andl $0x0, (%rbp)
movapd 0x20(%rsp), %xmm0
unpcklpd 0x70(%rsp), %xmm0       # xmm0 = xmm0[0],mem[0]
cvtpd2ps %xmm0, %xmm0
movapd %xmm0, %xmm1
movaps 0x50(%rsp), %xmm3
minps %xmm3, %xmm1
cmpunordps %xmm3, %xmm3
movapd %xmm0, %xmm2
andpd %xmm3, %xmm2
andnps %xmm1, %xmm3
orps %xmm2, %xmm3
movaps %xmm3, 0x50(%rsp)
movapd %xmm0, %xmm1
movaps 0x90(%rsp), %xmm3
maxps %xmm3, %xmm1
cmpunordps %xmm3, %xmm3
movapd %xmm0, %xmm2
andpd %xmm3, %xmm2
andnps %xmm1, %xmm3
orps %xmm2, %xmm3
movq 0x38(%rbp), %rbp
jmp 0x27c96
cvtps2pd 0x50(%rsp), %xmm0
cvtps2pd %xmm3, %xmm1
movups %xmm0, 0x28(%rbx)
movups %xmm1, 0x38(%rbx)
cmpl $0x2, 0x60(%r15)
jle 0x2816f
movq %r14, %rdi
leaq 0xe6ee(%rip), %rsi      # 0x365e7
callq 0x8420
movq %rax, %rdi
movq 0x10(%rsp), %rsi
callq 0x8740
movq %rax, %rdi
leaq 0xf31b(%rip), %rsi      # 0x37230
callq 0x8420
movq %rax, %rdi
movl 0x4(%rsp), %esi
callq 0x8740
movq %rax, %rdi
leaq 0xf739(%rip), %rsi      # 0x37669
callq 0x8420
movq 0x8(%rsp), %r13
movl 0x18(%r13), %esi
movq %rax, %rdi
callq 0x8740
movq %rax, %rdi
leaq 0xe5d3(%rip), %rsi      # 0x36523
callq 0x8420
movl 0x20(%r13), %esi
movq %rax, %rdi
callq 0x8740
movq %rax, %rdi
leaq 0xf321(%rip), %rbx      # 0x3728c
movq %rbx, %rsi
callq 0x8420
movq %r14, %rdi
leaq 0xe689(%rip), %rsi      # 0x36606
callq 0x8420
movq 0x50(%r13), %rcx
movsd (%rcx), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
leaq 0xc91c(%rip), %r12      # 0x348b8
movq %r12, %rsi
callq 0x8420
movq 0x50(%r13), %rcx
movsd 0x8(%rcx), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
leaq 0xe651(%rip), %rsi      # 0x36610
callq 0x8420
movsd 0x28(%r13), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
movq %r12, %rsi
callq 0x8420
movsd 0x30(%r13), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
leaq 0xe597(%rip), %rsi      # 0x3658c
callq 0x8420
movsd 0x38(%r13), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
movq %r12, %rsi
callq 0x8420
movsd 0x40(%r13), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x8420
movq 0x50(%r13), %rsi
leaq 0x10(%rsi), %r13
xorl %ebx, %ebx
leaq 0xe557(%rip), %rbp      # 0x36594
cmpl 0x18(%rsi), %ebx
jge 0x28186
movq (%r13), %r13
movq %r14, %rdi
movq %rbp, %rsi
callq 0x8420
movq %rax, %rdi
movl %ebx, %esi
callq 0x8740
movq %rax, %rdi
leaq 0xe533(%rip), %rsi      # 0x3659c
callq 0x8420
movl (%r13), %esi
movq %rax, %rdi
callq 0x8740
movq %rax, %rdi
leaq 0xe51f(%rip), %rsi      # 0x365a3
callq 0x8420
movsd 0x8(%r13), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
movq %r12, %rsi
callq 0x8420
movsd 0x10(%r13), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %r14, %rdi
leaq 0xe4f5(%rip), %rsi      # 0x365af
callq 0x8420
movsd 0x18(%r13), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
movq %r12, %rsi
callq 0x8420
movsd 0x20(%r13), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
leaq 0xe4d3(%rip), %rsi      # 0x365c3
callq 0x8420
movsd 0x28(%r13), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
movq %r12, %rsi
callq 0x8420
movsd 0x30(%r13), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
leaq 0xe448(%rip), %rsi      # 0x3656e
callq 0x8420
addq $0x38, %r13
incl %ebx
movq 0x8(%rsp), %rax
movq 0x50(%rax), %rsi
jmp 0x2803d
cmpl $0x0, 0x60(%r12)
movq %r15, %rbp
movq %r12, %r15
movl 0x4(%rsp), %r12d
movq 0x48(%rsp), %rbx
jle 0x28522
movq %r14, %rdi
leaq 0xe466(%rip), %rsi      # 0x365cb
callq 0x8420
jmp 0x28522
movq 0x8(%rsp), %rax
movq 0x50(%rax), %rsi
leaq 0xc739(%rip), %r12      # 0x348b8
leaq 0xe40e(%rip), %rbp      # 0x36594
movsd 0x18(%rsp), %xmm0
callq 0x2758e
cmpl $0x3, 0x60(%r15)
jl 0x283de
movq %r14, %rdi
leaq 0xe475(%rip), %rsi      # 0x3661b
callq 0x8420
movq %rax, %rdi
movq 0x10(%rsp), %rsi
callq 0x8740
movq %rax, %rdi
leaq 0xf06e(%rip), %rsi      # 0x37230
callq 0x8420
movq %rax, %rdi
movl 0x4(%rsp), %esi
callq 0x8740
movq %rax, %rdi
leaq 0xf48c(%rip), %rsi      # 0x37669
callq 0x8420
movq 0x8(%rsp), %r13
movl 0x18(%r13), %esi
movq %rax, %rdi
callq 0x8740
movq %rax, %rdi
leaq 0xe326(%rip), %rsi      # 0x36523
callq 0x8420
movl 0x20(%r13), %esi
movq %rax, %rdi
callq 0x8740
movq %rax, %rdi
leaq 0xf074(%rip), %rbx      # 0x3728c
movq %rbx, %rsi
callq 0x8420
movq %r14, %rdi
leaq 0xe3dc(%rip), %rsi      # 0x36606
callq 0x8420
movq 0x50(%r13), %rcx
movsd (%rcx), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
movq %r12, %rsi
callq 0x8420
movq 0x50(%r13), %rcx
movsd 0x8(%rcx), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
leaq 0xe3ab(%rip), %rsi      # 0x36610
callq 0x8420
movsd 0x28(%r13), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
movq %r12, %rsi
callq 0x8420
movsd 0x30(%r13), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
leaq 0xe2f1(%rip), %rsi      # 0x3658c
callq 0x8420
movsd 0x38(%r13), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
movq %r12, %rsi
callq 0x8420
movsd 0x40(%r13), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x8420
movq 0x50(%r13), %rax
leaq 0x10(%rax), %r13
xorl %ebx, %ebx
cmpl 0x18(%rax), %ebx
jge 0x283de
movq (%r13), %r13
movq %r14, %rdi
movq %rbp, %rsi
callq 0x8420
movq %rax, %rdi
movl %ebx, %esi
callq 0x8740
movq %rax, %rdi
leaq 0xe294(%rip), %rsi      # 0x3659c
callq 0x8420
movl (%r13), %esi
movq %rax, %rdi
callq 0x8740
movq %rax, %rdi
leaq 0xe280(%rip), %rsi      # 0x365a3
callq 0x8420
movsd 0x8(%r13), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
movq %r12, %rsi
callq 0x8420
movsd 0x10(%r13), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %r14, %rdi
leaq 0xe256(%rip), %rsi      # 0x365af
callq 0x8420
movsd 0x18(%r13), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
movq %r12, %rsi
callq 0x8420
movsd 0x20(%r13), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
leaq 0xe234(%rip), %rsi      # 0x365c3
callq 0x8420
movsd 0x28(%r13), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
movq %r12, %rsi
callq 0x8420
movsd 0x30(%r13), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
leaq 0xe1a9(%rip), %rsi      # 0x3656e
callq 0x8420
addq $0x38, %r13
incl %ebx
movq 0x8(%rsp), %rax
movq 0x50(%rax), %rax
jmp 0x282dc
movl $0xc0, %edi
callq 0x8440
movq %rax, %rbx
movq %rax, %rdi
callq 0x21f2c
movq 0x8(%rsp), %rax
movq %rbx, 0x60(%rax)
movq 0x50(%rax), %r14
movq 0x10(%r14), %r12
movupd (%r14), %xmm0
movapd %xmm0, 0x80(%rsp)
movq %rbx, %rdi
leaq 0x80(%rsp), %r13
movq %r13, %rsi
callq 0x22084
xorl %ebp, %ebp
cmpl 0x18(%r14), %ebp
jge 0x28451
movupd 0x8(%r12), %xmm0
movapd %xmm0, 0x80(%rsp)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x22084
movq 0x38(%r12), %r12
incl %ebp
jmp 0x28427
cmpl $0x2, 0x60(%r15)
movq 0x38(%rsp), %r14
movq 0x8(%rsp), %rbp
movl 0x4(%rsp), %r12d
jl 0x284f1
movq %r14, %rdi
leaq 0xe1c3(%rip), %rsi      # 0x36638
callq 0x8420
movq %rax, %rdi
movl %r12d, %esi
callq 0x8740
movq %rax, %rdi
leaq 0xe1b9(%rip), %rsi      # 0x36648
callq 0x8420
movq %rax, %rdi
movq 0x68(%rsp), %rsi
callq 0x8420
movq %rax, %rdi
leaq 0xf1be(%rip), %rsi      # 0x37669
callq 0x8420
movq 0x60(%rbp), %rcx
movl 0x8(%rcx), %esi
movq %rax, %rdi
callq 0x8740
movq %rax, %rdi
leaq 0xe18a(%rip), %rsi      # 0x36653
callq 0x8420
movq %rax, %rbx
movq 0x60(%rbp), %rdi
callq 0x22296
movq %rbx, %rdi
callq 0x86b0
movq %rax, %rdi
leaq 0xe178(%rip), %rsi      # 0x36664
callq 0x8420
movq 0x60(%rbp), %rdi
cmpl $0x0, 0x94(%rdi)
movq 0x48(%rsp), %rbx
je 0x28522
cmpl $0x2, 0x60(%r15)
jl 0x2851d
movq %r14, %rdi
leaq 0xe156(%rip), %rsi      # 0x3666a
callq 0x8420
movq 0x60(%rbp), %rdi
callq 0x22500
addq $0x48, %rbp
incl %r12d
jmp 0x27840
cmpl $0x0, 0x60(%r15)
jle 0x2853d
movq %r14, %rdi
callq 0x8320
addq $0xf8, %rbx
movq 0x10(%rsp), %rax
incl %eax
movq %rax, 0x10(%rsp)
jmp 0x27730
cmpb $0x0, 0x44(%rsp)
je 0x285e0
testl %eax, %eax
jle 0x28573
leaq 0xe130(%rip), %rsi      # 0x3669b
movq %r14, %rdi
callq 0x8420
movq 0x8(%r15), %rbx
addq $0x10, %rbx
xorl %ebp, %ebp
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x285dc
movq 0xf0(%rbx), %r12
xorl %r15d, %r15d
xorl %r13d, %r13d
testq %r12, %r12
je 0x285c7
movq 0x48(%r12), %r14
movq 0x30(%rsp), %rdi
movq %r12, %rsi
movq %rbx, %rdx
movq %r13, %rcx
movl %ebp, %r8d
movl %r15d, %r9d
callq 0x28656
testl %eax, %eax
je 0x285bc
movq %r13, %r12
incl %r15d
movq %r12, %r13
movq %r14, %r12
jmp 0x28592
addq $0xf8, %rbx
incl %ebp
movq 0x30(%rsp), %r15
movq 0x38(%rsp), %r14
jmp 0x2857d
movl 0x60(%r15), %eax
testl %eax, %eax
jle 0x285fb
leaq 0xe0f7(%rip), %rsi      # 0x366e2
movq %r14, %rdi
callq 0x8420
movq %rax, %rdi
callq 0x8320
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, 0x60(%r15)
jle 0x28623
leaq 0xdeb7(%rip), %rsi      # 0x364d2
movq %r14, %rdi
callq 0x8420
movq 0x249be(%rip), %rdi     # 0x4cfe8
leaq 0xdea1(%rip), %rsi      # 0x364d2
callq 0x8420
pushq $0x1
popq %rdi
callq 0x8540
movq %rax, %r14
movl $0xc0, %esi
movq %rbx, %rdi
callq 0x8450
movq %r14, %rdi
callq 0x8770