// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0xcd47(%rip), %rsi      # 0x36cd8
movq %rbx, %rdi
callq 0x8420
leaq 0xcc6a(%rip), %rsi      # 0x36c0a
movq %rbx, %rdi
callq 0x8420
movq %rax, %rdi
callq 0x8200
leaq 0xca6e(%rip), %rsi      # 0x36a25
movq %rbx, %rdi
callq 0x8420
movq %rax, %rdi
callq 0x8200
leaq 0xcc67(%rip), %rsi      # 0x36c35
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), %r12
addq $0x10, %r12
leaq 0xc9b0(%rip), %rbp      # 0x369c1
leaq 0xa8a0(%rip), %r15      # 0x348b8
movq (%r12), %r12
testq %r12, %r12
je 0x2a1dd
leaq 0xf0(%r12), %r13
xorl %eax, %eax
movq %r12, 0x10(%rsp)
movq (%r13), %r13
testq %r13, %r13
je 0x2a1d1
movq 0x78(%r13), %r14
testq %r14, %r14
je 0x2a1c6
movl %eax, 0xc(%rsp)
movq %rbx, %rdi
leaq 0xc918(%rip), %rsi      # 0x36974
callq 0x8420
movq %rax, %rdi
callq 0x8200
movq %rbx, %rdi
leaq 0xcbe3(%rip), %rsi      # 0x36c56
callq 0x8420
movsd 0x68(%r12), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
movq %rbp, %rsi
callq 0x8420
movq %rax, %rdi
callq 0x8200
movq %rbx, %rdi
leaq 0xc8fb(%rip), %rsi      # 0x3699f
callq 0x8420
movq 0x10(%r14), %rcx
movsd (%rcx), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
movq %r15, %rsi
callq 0x8420
movq 0x10(%r14), %rcx
movsd 0x8(%rcx), %xmm0
movq %rax, %rdi
callq 0x86b0
xorl %ebp, %ebp
pushq $0x1
popq %r12
movslq 0x8(%r14), %rax
cmpq %rax, %r12
jge 0x2a12b
movq %rbx, %rdi
leaq 0xc8c2(%rip), %rsi      # 0x369b0
callq 0x8420
movq 0x10(%r14), %rcx
movsd 0x10(%rcx,%rbp), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
movq %r15, %rsi
callq 0x8420
movq 0x10(%r14), %rcx
movsd 0x18(%rcx,%rbp), %xmm0
movq %rax, %rdi
callq 0x86b0
incq %r12
addq $0x10, %rbp
jmp 0x2a0db
cmpl $0x1, 0x1c(%r13)
jne 0x2a141
movq %rbx, %rdi
leaq 0xc878(%rip), %rsi      # 0x369b4
callq 0x8420
movq %rbx, %rdi
leaq 0xc876(%rip), %rbp      # 0x369c1
movq %rbp, %rsi
callq 0x8420
movq %rax, %rdi
callq 0x8200
movq %rbx, %rdi
leaq 0xcb26(%rip), %rsi      # 0x36c8b
callq 0x8420
movq %rax, %rdi
movq 0x10(%rsp), %r12
movq %r12, %rsi
callq 0x8420
movq %rax, %rdi
leaq 0xcb14(%rip), %rsi      # 0x36c98
callq 0x8420
movq %rax, %rdi
movl 0xc(%rsp), %r14d
movl %r14d, %esi
callq 0x8740
movq %rax, %rdi
movq %rbp, %rsi
callq 0x8420
movq %rax, %rdi
callq 0x8200
movq %rbx, %rdi
leaq 0xc80d(%rip), %rsi      # 0x369c3
callq 0x8420
movq %rax, %rdi
callq 0x8200
movl %r14d, %eax
addq $0x48, %r13
incl %eax
jmp 0x2a034
addq $0xf8, %r12
jmp 0x2a018
leaq 0xc87b(%rip), %rsi      # 0x36a5f
movq %rbx, %rdi
callq 0x8420
movq %rax, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8200