// File: 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
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x17dc4(%rip), %rsi     # 0x84d07
callq 0x9530
movq -0x10(%rbp), %rdi
leaq 0x17d76(%rip), %rsi     # 0x84cc9
callq 0x9530
movq %rax, %rdi
movq 0x4afe6(%rip), %rsi     # 0xb7f48
callq 0x9590
movq -0x10(%rbp), %rdi
leaq 0x17ae2(%rip), %rsi     # 0x84a54
callq 0x9530
movq %rax, %rdi
movq 0x4afc7(%rip), %rsi     # 0xb7f48
callq 0x9590
movq -0x10(%rbp), %rdi
leaq 0x17d5b(%rip), %rsi     # 0x84cec
callq 0x9530
movq %rax, %rdi
movq 0x4afa8(%rip), %rsi     # 0xb7f48
callq 0x9590
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x12f39(%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 0x6d12b
movl $0x0, -0x24(%rbp)
movq -0x20(%rbp), %rax
movq 0xf0(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x6d10c
movl $0x0, -0x34(%rbp)
movq -0x30(%rbp), %rax
cmpq $0x0, 0x78(%rax)
jne 0x6d030
jmp 0x6d0f2
movq -0x30(%rbp), %rax
cmpq $0x0, 0x58(%rax)
je 0x6d07d
movq -0x10(%rbp), %rdi
leaq 0x17cbf(%rip), %rsi     # 0x84d05
callq 0x9530
movq -0x10(%rbp), %rdi
leaq 0x17cb7(%rip), %rsi     # 0x84d0d
callq 0x9530
movq %rax, %rdi
movq -0x20(%rbp), %rsi
callq 0x9530
movq %rax, %rdi
leaq 0x180c8(%rip), %rsi     # 0x85139
callq 0x9530
movl $0x1, -0x34(%rbp)
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %r8
movl -0x34(%rbp), %r9d
callq 0x6b9b0
movq -0x30(%rbp), %rax
movq 0x58(%rax), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
je 0x6d0da
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x40(%rbp), %rcx
movq -0x20(%rbp), %r8
movl $0x1, %r9d
callq 0x6b9b0
movq -0x40(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x6d0a6
cmpl $0x0, -0x34(%rbp)
je 0x6d0f0
movq -0x10(%rbp), %rdi
leaq 0x17c34(%rip), %rsi     # 0x84d1f
callq 0x9530
jmp 0x6d0f2
movq -0x30(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x30(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x6d00e
jmp 0x6d10e
movq -0x20(%rbp), %rax
movq 0xf8(%rax), %rax
movq %rax, -0x20(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x6cfed
movq -0x10(%rbp), %rdi
leaq 0x17958(%rip), %rsi     # 0x84a8e
callq 0x9530
movq %rax, %rdi
movq 0x4ae03(%rip), %rsi     # 0xb7f48
callq 0x9590
addq $0x50, %rsp
popq %rbp
retq