// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xd4c4(%rip), %rsi      # 0x36cd8
movq %rbx, %rdi
callq 0x8420
leaq 0xd243(%rip), %rsi      # 0x36a66
movq %rbx, %rdi
callq 0x8420
movq %rax, %rdi
callq 0x8200
leaq 0xd1eb(%rip), %rsi      # 0x36a25
movq %rbx, %rdi
callq 0x8420
movq %rax, %rdi
callq 0x8200
leaq 0xd239(%rip), %rsi      # 0x36a8a
movq %rbx, %rdi
callq 0x8420
movq %rax, %rdi
callq 0x8200
movq (%rbx), %rax
movq -0x18(%rax), %rcx
movl $0xfffffefb, %edx       # imm = 0xFFFFFEFB
andl 0x18(%rbx,%rcx), %edx
orl $0x4, %edx
movl %edx, 0x18(%rbx,%rcx)
movq -0x18(%rax), %rax
movq $0x6, 0x8(%rbx,%rax)
movq 0x8(%r14), %r14
addq $0x10, %r14
leaq 0xd12d(%rip), %r12      # 0x369c1
leaq 0xb01d(%rip), %rbp      # 0x348b8
movq (%r14), %r14
testq %r14, %r14
je 0x29a38
leaq 0xf0(%r14), %r13
movq %r14, (%rsp)
movq (%r13), %r13
testq %r13, %r13
je 0x29a2c
movq 0x60(%r13), %r15
testq %r15, %r15
je 0x29a23
movq %rbx, %rdi
leaq 0xd09e(%rip), %rsi      # 0x36974
callq 0x8420
movq %rax, %rdi
callq 0x8200
movq %rbx, %rdi
leaq 0xd1b7(%rip), %rsi      # 0x36aa4
callq 0x8420
movsd 0x68(%r14), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
movq %r12, %rsi
callq 0x8420
movq %rax, %rdi
callq 0x8200
movq %rbx, %rdi
leaq 0xd082(%rip), %rsi      # 0x3699f
callq 0x8420
movq 0x10(%r15), %rcx
movsd (%rcx), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
movq %rbp, %rsi
callq 0x8420
movq 0x10(%r15), %rcx
movsd 0x8(%rcx), %xmm0
movq %rax, %rdi
callq 0x86b0
xorl %r12d, %r12d
pushq $0x1
popq %r14
movslq 0x8(%r15), %rax
cmpq %rax, %r14
jge 0x299a7
movq %rbx, %rdi
leaq 0xd048(%rip), %rsi      # 0x369b0
callq 0x8420
movq 0x10(%r15), %rcx
movsd 0x10(%rcx,%r12), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
movq %rbp, %rsi
callq 0x8420
movq 0x10(%r15), %rcx
movsd 0x18(%rcx,%r12), %xmm0
movq %rax, %rdi
callq 0x86b0
incq %r14
addq $0x10, %r12
jmp 0x29955
cmpl $0x1, 0x1c(%r13)
jne 0x299bd
movq %rbx, %rdi
leaq 0xcffc(%rip), %rsi      # 0x369b4
callq 0x8420
movq %rbx, %rdi
leaq 0xcffa(%rip), %r12      # 0x369c1
movq %r12, %rsi
callq 0x8420
movq %rax, %rdi
callq 0x8200
movq %rbx, %rdi
leaq 0xd0f8(%rip), %rsi      # 0x36ad9
callq 0x8420
leaq 0x90(%r13), %rsi
movq %rax, %rdi
callq 0x8420
movq %rax, %rdi
movq %r12, %rsi
callq 0x8420
movq %rax, %rdi
callq 0x8200
movq %rbx, %rdi
leaq 0xcfb1(%rip), %rsi      # 0x369c3
callq 0x8420
movq %rax, %rdi
callq 0x8200
movq (%rsp), %r14
addq $0x48, %r13
jmp 0x298b2
addq $0xf8, %r14
jmp 0x2989b
leaq 0xd020(%rip), %rsi      # 0x36a5f
movq %rbx, %rdi
callq 0x8420
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8200
nop