// File: /workspace/github_cpp_makefile_star2_O2/thierry7100[P]CutOptim/src/SvgDoc.cpp
// Function: SvgDoc::WritePath(std::ostream&, NSVGpath*, NSVGshape*)
void SvgDoc::WritePath(ostream &Out, NSVGpath *path, NSVGshape *shape)
{
    Out << "    <path" << endl;
    //  Line style from SVG file
    Out << std::hex;
    Out << "       style=\"fill:none;stroke:#" << setw(6) << setfill('0') << std::hex << (shape->stroke.color&0xFFFFFF);
    Out << std::dec;
    Out << ";stroke-width:" << shape->strokeWidth << "\"" << endl;
    // Then path itself
    Out << "       d=\"M " << path->StartX << "," << path->StartY;
    NSVGPathElt *Elt = path->PathElts;
    for (int i = 0; i < path->nElts; i++)
    {
        if ( Elt->Type == NSVG_PATH_BEZIER_C )
            Out << " C " << Elt->BzCtrl1X << "," << Elt->BzCtrl1Y << "," << Elt->BzCtrl2X << "," << Elt->BzCtrl2Y << "," << Elt->EndX << "," << Elt->EndY;
        else
            Out << " L " << Elt->EndX << "," << Elt->EndY;
        Elt = Elt->next;
    }
    if ( path->closed == 1 )
    {
        Out << " z";
    }
    Out << "\"" << endl;
    Out << "       id=\"" << path->id << "\"" << endl;
    Out << "       inkscape:connector-curvature=\"0\" />" << endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %rbx
leaq 0xd951(%rip), %rsi      # 0x36974
movq %rbx, %rdi
callq 0x8420
movq %rax, %rdi
callq 0x8200
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl 0x18(%rbx,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x18(%rbx,%rax)
leaq 0xd92f(%rip), %rsi      # 0x3697e
movq %rbx, %rdi
callq 0x8420
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0x6, 0x10(%rax,%rcx)
pushq $0x30
popq %rsi
movq %rax, %rdi
callq 0x8680
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movl 0x18(%rax,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rax,%rcx)
movl 0x58(%r15), %esi
andl $0xffffff, %esi         # imm = 0xFFFFFF
movq %rax, %rdi
callq 0x8310
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl 0x18(%rbx,%rax), %ecx
andl $-0x4b, %ecx
orl $0x2, %ecx
movl %ecx, 0x18(%rbx,%rax)
leaq 0xdb35(%rip), %rsi      # 0x36bea
movq %rbx, %rdi
callq 0x8420
movsd 0x68(%r15), %xmm0
movq %rax, %rdi
callq 0x86b0
leaq 0xd8ef(%rip), %rsi      # 0x369c1
movq %rax, %rdi
callq 0x8420
movq %rax, %rdi
callq 0x8200
leaq 0xd8b6(%rip), %rsi      # 0x3699f
movq %rbx, %rdi
callq 0x8420
movsd (%r14), %xmm0
movq %rax, %rdi
callq 0x86b0
leaq 0xb7b3(%rip), %r15      # 0x348b8
movq %rax, %rdi
movq %r15, %rsi
callq 0x8420
movsd 0x8(%r14), %xmm0
movq %rax, %rdi
callq 0x86b0
leaq 0x10(%r14), %rbp
xorl %r12d, %r12d
leaq 0xd884(%rip), %r13      # 0x369b0
cmpl 0x18(%r14), %r12d
jge 0x291e8
movq (%rbp), %rbp
cmpl $0x1, (%rbp)
jne 0x291ac
movq %rbx, %rdi
leaq 0xd862(%rip), %rsi      # 0x369ac
callq 0x8420
movsd 0x18(%rbp), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
movq %r15, %rsi
callq 0x8420
movsd 0x20(%rbp), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
movq %r15, %rsi
callq 0x8420
movsd 0x28(%rbp), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
movq %r15, %rsi
callq 0x8420
movsd 0x30(%rbp), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
movq %r15, %rsi
jmp 0x291b2
movq %rbx, %rdi
movq %r13, %rsi
callq 0x8420
movsd 0x8(%rbp), %xmm0
movq %rax, %rdi
callq 0x86b0
movq %rax, %rdi
movq %r15, %rsi
callq 0x8420
movsd 0x10(%rbp), %xmm0
movq %rax, %rdi
callq 0x86b0
addq $0x38, %rbp
incl %r12d
jmp 0x2912c
cmpl $0x1, 0x1c(%r14)
jne 0x291fe
leaq 0xd7be(%rip), %rsi      # 0x369b4
movq %rbx, %rdi
callq 0x8420
leaq 0xd7bc(%rip), %r15      # 0x369c1
movq %rbx, %rdi
movq %r15, %rsi
callq 0x8420
movq %rax, %rdi
callq 0x8200
leaq 0xd798(%rip), %rsi      # 0x369b7
movq %rbx, %rdi
callq 0x8420
addq $0x90, %r14
movq %rax, %rdi
movq %r14, %rsi
callq 0x8420
movq %rax, %rdi
movq %r15, %rsi
callq 0x8420
movq %rax, %rdi
callq 0x8200
leaq 0xd770(%rip), %rsi      # 0x369c3
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