// File: thierry7100[P]CutOptim/src/SvgDoc.cpp
// Function: SvgDoc::WritePlacedPolygonLayer(std::ostream&)
void SvgDoc::WritePlacedPolygonLayer(ostream& Out)
{
    //  Then the data, begin with original layer
    Out << "  <g\n";
    Out << "     inkscape:label=\"Placed_Polygon_Layer\"" << endl;
    Out << "     inkscape:groupmode=\"layer\"" << endl;
    Out << "     id=\"Placed_Polygon_Layer1\">" << endl;

    int nShape = 0;
    Out << std::fixed;
    Out << std::setprecision(6);
	for (NSVGshape *shape = SvgData->shapes; shape != NULL; shape = shape->next, nShape++)
	{
        //  Then for each path in the shape
        int iPath = 0;
        for (NSVGpath *path = shape->paths; path != NULL; path = path->next, iPath++)
        {
            Polygon *poly_path = path->PlacedPolygon;
            if ( poly_path == NULL ) continue;
            Out << "    <path" << endl;
            //  Line style : Magenta
            Out << "       style=\"fill:none;stroke:#FF00FF;stroke-width:" << shape->strokeWidth << "\"" << endl;
            // Then path itself
            Out << "       d=\"M " << poly_path->GetVertex(0)->x << "," << poly_path->GetVertex(0)->y;
			for (int i = 1; i < poly_path->nVertices; i++)
			{
                Out << " L " << poly_path->GetVertex(i)->x << "," << poly_path->GetVertex(i)->y;
			}
			if ( path->closed == 1 )
			{
                Out << " z";
			}
			Out << "\"" << endl;
            Out << "       id=\"PP_" << shape->id << "_" << iPath << "\"" << endl;
            Out << "       inkscape:connector-curvature=\"0\" />" << endl;
        }
    }
    Out << "  </g>" << endl;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x18114(%rip), %rsi     # 0x84d07
callq 0x9530
movq -0x10(%rbp), %rdi
leaq 0x18036(%rip), %rsi     # 0x84c39
callq 0x9530
movq %rax, %rdi
movq 0x4b336(%rip), %rsi     # 0xb7f48
callq 0x9590
movq -0x10(%rbp), %rdi
leaq 0x17e32(%rip), %rsi     # 0x84a54
callq 0x9530
movq %rax, %rdi
movq 0x4b317(%rip), %rsi     # 0xb7f48
callq 0x9590
movq -0x10(%rbp), %rdi
leaq 0x18023(%rip), %rsi     # 0x84c64
callq 0x9530
movq %rax, %rdi
movq 0x4b2f8(%rip), %rsi     # 0xb7f48
callq 0x9590
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x13289(%rip), %rsi     # 0x7fef0
callq 0x91a0
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movl $0x6, %edi
callq 0x7ff20
movq -0x50(%rbp), %rdi
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %esi
callq 0x9840
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x6cef4
movl $0x0, -0x24(%rbp)
movq -0x20(%rbp), %rax
movq 0xf0(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x6ced5
movq -0x30(%rbp), %rax
movq 0x78(%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x6cce1
jmp 0x6cebb
movq -0x10(%rbp), %rdi
leaq 0x17cb7(%rip), %rsi     # 0x849a3
callq 0x9530
movq %rax, %rdi
movq 0x4b24d(%rip), %rsi     # 0xb7f48
callq 0x9590
movq -0x10(%rbp), %rdi
leaq 0x17f7a(%rip), %rsi     # 0x84c85
callq 0x9530
movq %rax, %rdi
movq -0x20(%rbp), %rax
movsd 0x68(%rax), %xmm0
callq 0x9a30
movq %rax, %rdi
leaq 0x17cc5(%rip), %rsi     # 0x849f0
callq 0x9530
movq %rax, %rdi
movq 0x4b20e(%rip), %rsi     # 0xb7f48
callq 0x9590
movq -0x10(%rbp), %rdi
leaq 0x17c84(%rip), %rsi     # 0x849ce
callq 0x9530
movq %rax, -0x60(%rbp)
movq -0x38(%rbp), %rdi
xorl %esi, %esi
callq 0x7ff40
movq -0x60(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x9a30
movq %rax, %rdi
leaq 0x15baf(%rip), %rsi     # 0x82924
callq 0x9530
movq %rax, -0x58(%rbp)
movq -0x38(%rbp), %rdi
xorl %esi, %esi
callq 0x7ff40
movq -0x58(%rbp), %rdi
movsd 0x8(%rax), %xmm0
callq 0x9a30
movl $0x1, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movq -0x38(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x6ce0f
movq -0x10(%rbp), %rdi
leaq 0x17c2a(%rip), %rsi     # 0x849df
callq 0x9530
movq %rax, -0x70(%rbp)
movq -0x38(%rbp), %rdi
movl -0x3c(%rbp), %esi
callq 0x7ff40
movq -0x70(%rbp), %rdi
movsd (%rax), %xmm0
callq 0x9a30
movq %rax, %rdi
leaq 0x15b43(%rip), %rsi     # 0x82924
callq 0x9530
movq %rax, -0x68(%rbp)
movq -0x38(%rbp), %rdi
movl -0x3c(%rbp), %esi
callq 0x7ff40
movq -0x68(%rbp), %rdi
movsd 0x8(%rax), %xmm0
callq 0x9a30
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x6cd9e
movq -0x30(%rbp), %rax
cmpl $0x1, 0x1c(%rax)
jne 0x6ce29
movq -0x10(%rbp), %rdi
leaq 0x17bbf(%rip), %rsi     # 0x849e3
callq 0x9530
movq -0x10(%rbp), %rdi
leaq 0x17bbc(%rip), %rsi     # 0x849f0
callq 0x9530
movq %rax, %rdi
movq 0x4b105(%rip), %rsi     # 0xb7f48
callq 0x9590
movq -0x10(%rbp), %rdi
leaq 0x17e67(%rip), %rsi     # 0x84cba
callq 0x9530
movq %rax, %rdi
movq -0x20(%rbp), %rsi
callq 0x9530
movq %rax, %rdi
leaq 0x17e59(%rip), %rsi     # 0x84cc7
callq 0x9530
movq %rax, %rdi
movl -0x24(%rbp), %esi
callq 0x9930
movq %rax, %rdi
leaq 0x17b68(%rip), %rsi     # 0x849f0
callq 0x9530
movq %rax, %rdi
movq 0x4b0b1(%rip), %rsi     # 0xb7f48
callq 0x9590
movq -0x10(%rbp), %rdi
leaq 0x17b4b(%rip), %rsi     # 0x849f2
callq 0x9530
movq %rax, %rdi
movq 0x4b092(%rip), %rsi     # 0xb7f48
callq 0x9590
movq -0x30(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x30(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x6ccbe
jmp 0x6ced7
movq -0x20(%rbp), %rax
movq 0xf8(%rax), %rax
movq %rax, -0x20(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x6cc9d
movq -0x10(%rbp), %rdi
leaq 0x17b8f(%rip), %rsi     # 0x84a8e
callq 0x9530
movq %rax, %rdi
movq 0x4b03a(%rip), %rsi     # 0xb7f48
callq 0x9590
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)