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

    Out << "  <g\n";
    Out << "     inkscape:label=\"Placed_Layer\"" << endl;
    Out << "     inkscape:groupmode=\"layer\"" << endl;
    Out << "     id=\"Placed_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++)
        {
            int hasgroup = 0;
            if ( path->PlacedPolygon == NULL ) continue;        //  Not placed, skip this one
            if ( path->child != NULL )          //  There is at least one child, build a group
            {
                Out << "    <g\n";
                Out << "       id=\"group_" << shape->id << "\">\n";
                hasgroup = 1;
            }
            WritePlacedPath(Out, path, path, shape, hasgroup);
            for ( NSVGpath *path_child = path->child; path_child != NULL; path_child = path_child->next)
            {
                WritePlacedPath(Out, path, path_child, shape, 1);
            }
            if ( hasgroup )
            {
                Out << "    </g>\n";
            }
        }
    }
    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 0xe964(%rip), %rsi      # 0x3ed18
movl $0x5, %edx
movq %rbx, %rdi
callq 0x74e0
leaq 0xe912(%rip), %rsi      # 0x3ecda
movl $0x22, %edx
movq %rbx, %rdi
callq 0x74e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x7400
movsbl %al, %esi
movq %rbx, %rdi
callq 0x7050
movq %rax, %rdi
callq 0x7310
leaq 0xe662(%rip), %rsi      # 0x3ea65
movl $0x1f, %edx
movq %rbx, %rdi
callq 0x74e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x7400
movsbl %al, %esi
movq %rbx, %rdi
callq 0x7050
movq %rax, %rdi
callq 0x7310
leaq 0xe8bf(%rip), %rsi      # 0x3ecfd
movl $0x18, %edx
movq %rbx, %rdi
callq 0x74e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x7400
movsbl %al, %esi
movq %rbx, %rdi
callq 0x7050
movq %rax, %rdi
callq 0x7310
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), %rax
movq 0x10(%rax), %r14
testq %r14, %r14
je 0x30595
leaq 0xec9c(%rip), %rbp      # 0x3f14a
movq 0xf0(%r14), %r15
testq %r15, %r15
je 0x30585
cmpq $0x0, 0x78(%r15)
je 0x3057c
movq 0x58(%r15), %r13
testq %r13, %r13
je 0x30528
movl $0x7, %edx
movq %rbx, %rdi
leaq 0xe835(%rip), %rsi      # 0x3ed16
callq 0x74e0
movl $0x11, %edx
movq %rbx, %rdi
leaq 0xe829(%rip), %rsi      # 0x3ed1e
callq 0x74e0
movq %r14, %rdi
callq 0x71d0
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x74e0
movl $0x3, %edx
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x74e0
movl $0x1, %r9d
jmp 0x3052b
xorl %r9d, %r9d
movq %rbx, %rsi
movq %r15, %rdx
movq %r15, %rcx
movq %r14, %r8
callq 0x2e8a6
movq 0x58(%r15), %r12
testq %r12, %r12
je 0x30563
movq %rbx, %rsi
movq %r15, %rdx
movq %r12, %rcx
movq %r14, %r8
movl $0x1, %r9d
callq 0x2e8a6
movq 0x48(%r12), %r12
jmp 0x30540
testq %r13, %r13
je 0x3057c
movl $0x9, %edx
movq %rbx, %rdi
leaq 0xe7b9(%rip), %rsi      # 0x3ed30
callq 0x74e0
movq 0x48(%r15), %r15
jmp 0x304b5
movq 0xf8(%r14), %r14
testq %r14, %r14
jne 0x304ae
leaq 0xe503(%rip), %rsi      # 0x3ea9f
movl $0x6, %edx
movq %rbx, %rdi
callq 0x74e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x7400
movsbl %al, %esi
movq %rbx, %rdi
callq 0x7050
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7310