// File: thierry7100[P]CutOptim/src/SvgDoc.cpp
// Function: SvgDoc::WritePolygonLayer(std::ostream&)
void SvgDoc::WritePolygonLayer(ostream& Out)
{

    //  Then the data, begin with original layer
    Out << "  <g\n";
    Out << "     inkscape:label=\"Polygon_Layer\"" << endl;
    Out << "     inkscape:groupmode=\"layer\"" << endl;
    Out << "     id=\"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->ClosePolygon;
            if ( poly_path == NULL ) continue;
            Out << "    <path" << endl;
            //  Line style : cyan
            Out << "       style=\"fill:none;stroke:#00FFFF;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=\"poly_" << path->id << "\"" << 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 0x18af4(%rip), %rsi     # 0x84d07
callq 0x9530
movq -0x10(%rbp), %rdi
leaq 0x18872(%rip), %rsi     # 0x84a95
callq 0x9530
movq %rax, %rdi
movq 0x4bd16(%rip), %rsi     # 0xb7f48
callq 0x9590
movq -0x10(%rbp), %rdi
leaq 0x18812(%rip), %rsi     # 0x84a54
callq 0x9530
movq %rax, %rdi
movq 0x4bcf7(%rip), %rsi     # 0xb7f48
callq 0x9590
movq -0x10(%rbp), %rdi
leaq 0x18858(%rip), %rsi     # 0x84ab9
callq 0x9530
movq %rax, %rdi
movq 0x4bcd8(%rip), %rsi     # 0xb7f48
callq 0x9590
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x13c69(%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 0x6c501
movl $0x0, -0x24(%rbp)
movq -0x20(%rbp), %rax
movq 0xf0(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x6c4e2
movq -0x30(%rbp), %rax
movq 0x60(%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x6c301
jmp 0x6c4c8
movq -0x10(%rbp), %rdi
leaq 0x18697(%rip), %rsi     # 0x849a3
callq 0x9530
movq %rax, %rdi
movq 0x4bc2d(%rip), %rsi     # 0xb7f48
callq 0x9590
movq -0x10(%rbp), %rdi
leaq 0x187a8(%rip), %rsi     # 0x84ad3
callq 0x9530
movq %rax, %rdi
movq -0x20(%rbp), %rax
movsd 0x68(%rax), %xmm0
callq 0x9a30
movq %rax, %rdi
leaq 0x186a5(%rip), %rsi     # 0x849f0
callq 0x9530
movq %rax, %rdi
movq 0x4bbee(%rip), %rsi     # 0xb7f48
callq 0x9590
movq -0x10(%rbp), %rdi
leaq 0x18664(%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 0x1658f(%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 0x6c42f
movq -0x10(%rbp), %rdi
leaq 0x1860a(%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 0x16523(%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 0x6c3be
movq -0x30(%rbp), %rax
cmpl $0x1, 0x1c(%rax)
jne 0x6c449
movq -0x10(%rbp), %rdi
leaq 0x1859f(%rip), %rsi     # 0x849e3
callq 0x9530
movq -0x10(%rbp), %rdi
leaq 0x1859c(%rip), %rsi     # 0x849f0
callq 0x9530
movq %rax, %rdi
movq 0x4bae5(%rip), %rsi     # 0xb7f48
callq 0x9590
movq -0x10(%rbp), %rdi
leaq 0x18695(%rip), %rsi     # 0x84b08
callq 0x9530
movq %rax, %rdi
movq -0x30(%rbp), %rsi
addq $0x90, %rsi
callq 0x9530
movq %rax, %rdi
leaq 0x1855b(%rip), %rsi     # 0x849f0
callq 0x9530
movq %rax, %rdi
movq 0x4baa4(%rip), %rsi     # 0xb7f48
callq 0x9590
movq -0x10(%rbp), %rdi
leaq 0x1853e(%rip), %rsi     # 0x849f2
callq 0x9530
movq %rax, %rdi
movq 0x4ba85(%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 0x6c2de
jmp 0x6c4e4
movq -0x20(%rbp), %rax
movq 0xf8(%rax), %rax
movq %rax, -0x20(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x6c2bd
movq -0x10(%rbp), %rdi
leaq 0x18582(%rip), %rsi     # 0x84a8e
callq 0x9530
movq %rax, %rdi
movq 0x4ba2d(%rip), %rsi     # 0xb7f48
callq 0x9590
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)