// File: /workspace/github_cpp_makefile_star2_O2/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 0xcabe(%rip), %rsi      # 0x36cd8
movq %rbx, %rdi
callq 0x8420
leaq 0xca71(%rip), %rsi      # 0x36c9a
movq %rbx, %rdi
callq 0x8420
movq %rax, %rdi
callq 0x8200
leaq 0xc7e5(%rip), %rsi      # 0x36a25
movq %rbx, %rdi
callq 0x8420
movq %rax, %rdi
callq 0x8200
leaq 0xca66(%rip), %rsi      # 0x36cbd
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
pushq $0x1
popq %rbp
movq (%r14), %r14
testq %r14, %r14
je 0x2a36e
leaq 0xf0(%r14), %r12
movq (%r12), %r12
testq %r12, %r12
je 0x2a362
cmpq $0x0, 0x78(%r12)
je 0x2a359
movq 0x58(%r12), %r15
testq %r15, %r15
je 0x2a309
movq %rbx, %rdi
leaq 0xca00(%rip), %rsi      # 0x36cd6
callq 0x8420
movq %rbx, %rdi
leaq 0xc9f9(%rip), %rsi      # 0x36cde
callq 0x8420
movq %rax, %rdi
movq %r14, %rsi
callq 0x8420
movq %rax, %rdi
leaq 0xce0b(%rip), %rsi      # 0x3710a
callq 0x8420
movl %ebp, %r9d
jmp 0x2a30c
xorl %r9d, %r9d
leaq 0x58(%r12), %r13
movq %rbx, %rsi
movq %r12, %rdx
movq %r12, %rcx
movq %r14, %r8
callq 0x29272
movq (%r13), %r13
testq %r13, %r13
je 0x2a345
movq %rbx, %rsi
movq %r12, %rdx
movq %r13, %rcx
movq %r14, %r8
movl %ebp, %r9d
callq 0x29272
addq $0x48, %r13
jmp 0x2a322
testq %r15, %r15
je 0x2a359
movq %rbx, %rdi
leaq 0xc99c(%rip), %rsi      # 0x36cf0
callq 0x8420
addq $0x48, %r12
jmp 0x2a2a9
addq $0xf8, %r14
jmp 0x2a296
leaq 0xc6ea(%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