// File: /workspace/github_cpp_makefile_star2_O3/thierry7100[P]CutOptim/src/SvgDoc.cpp
// Function: SvgDoc::WritePlacedPath(std::ostream&, NSVGpath*, NSVGpath*, NSVGshape*, int)
void SvgDoc::WritePlacedPath(ostream &Out, NSVGpath *ref_path, NSVGpath *out_path, NSVGshape *shape, int hasgroup)
{
    if (hasgroup)
        Out << "   ";
    Out << "    <path" << endl;
    //  Line style from SVG file
    Out << std::hex;
    if (hasgroup)
        Out << "   ";
    Out << "       style=\"fill:none;stroke:#" << setw(6) << setfill('0') << std::hex << (shape->stroke.color&0xFFFFFF);
    Out << std::dec;
    Out << ";stroke-width:" << shape->strokeWidth << "\"" << endl;
    // Get transformation values (rotation and translation) from reference path
    double angle = ref_path->PlacedPolygon->getRotation();
    Point PtTrans = ref_path->PlacedPolygon->getTranslation();
    Point Centroid = ref_path->PlacedPolygon->getCentroid() - PtTrans;      //  Should get centroid of unplaced polygon
    //  Then write path
    Point Start = Point(out_path->StartX, out_path->StartY);
    Start.Transform(angle, Centroid, PtTrans);
    if ( hasgroup )
        Out << "   ";
    Out << "       d=\"M " << Start.x << "," << Start.y;
    NSVGPathElt *Elt = out_path->PathElts;
    for (int i = 0; i < out_path->nElts; i++)
    {
        if ( Elt->Type == NSVG_PATH_BEZIER_C )
        {
            Point EltEnd = Point(Elt->EndX, Elt->EndY);
            EltEnd.Transform(angle, Centroid, PtTrans);
            Point EltBzCtrl1 = Point(Elt->BzCtrl1X, Elt->BzCtrl1Y);
            EltBzCtrl1.Transform(angle, Centroid, PtTrans);
            Point EltBzCtrl2 = Point(Elt->BzCtrl2X, Elt->BzCtrl2Y);
            EltBzCtrl2.Transform(angle, Centroid, PtTrans);
            Out << " C " << EltBzCtrl1.x << "," << EltBzCtrl1.y << "," << EltBzCtrl2.x << "," << EltBzCtrl2.y << "," << EltEnd.x << "," << EltEnd.y;
        }
        else
        {
            Point EltEnd = Point(Elt->EndX, Elt->EndY);
            EltEnd.Transform(angle, Centroid, PtTrans);
            Out << " L " << EltEnd.x << "," << EltEnd.y;
        }
        Elt = Elt->next;
    }
    if ( out_path->closed == 1 )
    {
        Out << " z";
    }
    Out << "\"" << endl;
    if ( hasgroup )
        Out << "   ";
    Out << "       id=\"Placed_" << out_path->id << "\"" << endl;
    if ( hasgroup )
        Out << "   ";
    Out << "       inkscape:connector-curvature=\"0\" />" << endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r8, %r12
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %rbp
movl %r9d, 0x3c(%rsp)
testl %r9d, %r9d
je 0x2e945
leaq 0xdfe9(%rip), %r13      # 0x3c8ba
movl $0x3, %edx
movq %rbp, %rdi
movq %r13, %rsi
callq 0x74e0
leaq 0x100cc(%rip), %rsi     # 0x3e9b4
movl $0x9, %edx
movq %rbp, %rdi
callq 0x74e0
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x7400
movsbl %al, %esi
movq %rbp, %rdi
callq 0x7050
movq %rax, %rdi
callq 0x7310
movq (%rbp), %rax
movq -0x18(%rax), %rax
movl 0x18(%rbp,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x18(%rbp,%rax)
movl $0x3, %edx
movq %rbp, %rdi
movq %r13, %rsi
callq 0x74e0
jmp 0x2e997
leaq 0x10068(%rip), %rsi     # 0x3e9b4
movl $0x9, %edx
movq %rbp, %rdi
callq 0x74e0
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x7400
movsbl %al, %esi
movq %rbp, %rdi
callq 0x7050
movq %rax, %rdi
callq 0x7310
movq (%rbp), %rax
movq -0x18(%rax), %rax
movl 0x18(%rbp,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x18(%rbp,%rax)
leaq 0x10020(%rip), %rsi     # 0x3e9be
movl $0x20, %edx
movq %rbp, %rdi
callq 0x74e0
movq (%rbp), %rax
movq -0x18(%rax), %rcx
movq $0x6, 0x10(%rbp,%rcx)
movq -0x18(%rax), %rcx
leaq (%rcx,%rbp), %rbx
cmpb $0x0, 0xe1(%rbp,%rcx)
jne 0x2e9e6
movq %rbx, %rdi
movl $0x20, %esi
callq 0x7400
movb $0x1, 0xe1(%rbx)
movq (%rbp), %rax
movb $0x30, 0xe0(%rbx)
movq -0x18(%rax), %rax
movl 0x18(%rbp,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x18(%rbp,%rax)
movl 0x58(%r12), %esi
andl $0xffffff, %esi         # imm = 0xFFFFFF
movq %rbp, %rdi
callq 0x7300
movq (%rbp), %rax
movq -0x18(%rax), %rax
movl 0x18(%rbp,%rax), %ecx
andl $-0x4b, %ecx
orl $0x2, %ecx
movl %ecx, 0x18(%rbp,%rax)
leaq 0x101fb(%rip), %rsi     # 0x3ec2a
movl $0xe, %edx
movq %rbp, %rdi
callq 0x74e0
movsd 0x68(%r12), %xmm0
movq %rbp, %rdi
callq 0x7690
movq %rax, %rbx
leaq 0xffac(%rip), %rsi      # 0x3ea01
movl $0x1, %edx
movq %rax, %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 0x78(%r15), %rdi
movsd 0xa8(%rdi), %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0xb0(%rdi), %xmm0
movsd %xmm0, 0x30(%rsp)
movsd 0xb8(%rdi), %xmm0
movsd %xmm0, 0x28(%rsp)
callq 0x27d5c
subsd 0x30(%rsp), %xmm0
movsd %xmm0, 0x48(%rsp)
subsd 0x28(%rsp), %xmm1
movsd %xmm1, 0x40(%rsp)
movsd (%r14), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x8(%r14), %xmm0
movsd %xmm0, (%rsp)
movsd 0x18(%rsp), %xmm0
callq 0x77a0
movsd %xmm0, 0x10(%rsp)
movsd 0x18(%rsp), %xmm0
callq 0x70f0
movapd %xmm0, %xmm2
movsd 0x8(%rsp), %xmm5
movsd 0x48(%rsp), %xmm6
subsd %xmm6, %xmm5
movsd 0x40(%rsp), %xmm3
movsd (%rsp), %xmm0
subsd %xmm3, %xmm0
movapd %xmm2, %xmm1
mulsd %xmm0, %xmm1
movapd %xmm0, %xmm4
movapd %xmm5, %xmm0
movsd 0x10(%rsp), %xmm7
mulsd %xmm7, %xmm0
subsd %xmm1, %xmm0
addsd %xmm6, %xmm0
addsd 0x30(%rsp), %xmm0
mulsd %xmm7, %xmm4
mulsd %xmm5, %xmm2
addsd %xmm4, %xmm2
addsd %xmm3, %xmm2
addsd 0x28(%rsp), %xmm2
movsd %xmm2, 0x10(%rsp)
divsd 0xf4eb(%rip), %xmm0     # 0x3e060
callq 0x71c0
movsd %xmm0, (%rsp)
movsd 0x10(%rsp), %xmm0
divsd 0xf4d3(%rip), %xmm0     # 0x3e060
callq 0x71c0
movsd 0xf4c6(%rip), %xmm1     # 0x3e060
movsd (%rsp), %xmm2
mulsd %xmm1, %xmm2
movsd %xmm2, (%rsp)
mulsd %xmm1, %xmm0
movsd %xmm0, 0x10(%rsp)
cmpl $0x0, 0x3c(%rsp)
je 0x2ebcd
leaq 0xdcfa(%rip), %rsi      # 0x3c8ba
movl $0x3, %edx
movq %rbp, %rdi
callq 0x74e0
leaq 0xfe0b(%rip), %rsi      # 0x3e9df
movl $0xc, %edx
movq %rbp, %rdi
callq 0x74e0
movq %rbp, %rdi
movsd (%rsp), %xmm0
callq 0x7690
movq %rax, %rbx
leaq 0xdcc0(%rip), %rsi      # 0x3c8b8
movl $0x1, %edx
movq %rax, %rdi
callq 0x74e0
movq %rbx, %rdi
movsd 0x10(%rsp), %xmm0
callq 0x7690
cmpl $0x0, 0x18(%r14)
jle 0x2efc8
leaq 0x10(%r14), %r15
xorl %r13d, %r13d
leaq 0xdc8c(%rip), %r12      # 0x3c8b8
movq (%r15), %r15
movl (%r15), %ebx
movsd 0x8(%r15), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x10(%r15), %xmm0
movsd %xmm0, (%rsp)
movsd 0x18(%rsp), %xmm0
callq 0x77a0
movsd %xmm0, 0x8(%rsp)
movsd 0x18(%rsp), %xmm0
callq 0x70f0
movapd %xmm0, %xmm4
movsd 0x48(%rsp), %xmm3
movsd 0x10(%rsp), %xmm6
subsd %xmm3, %xmm6
movsd 0x40(%rsp), %xmm2
movsd (%rsp), %xmm0
subsd %xmm2, %xmm0
movapd %xmm4, %xmm1
mulsd %xmm0, %xmm1
movapd %xmm0, %xmm5
movapd %xmm6, %xmm0
movsd 0x8(%rsp), %xmm7
mulsd %xmm7, %xmm0
subsd %xmm1, %xmm0
addsd %xmm3, %xmm0
addsd 0x30(%rsp), %xmm0
mulsd %xmm7, %xmm5
mulsd %xmm6, %xmm4
addsd %xmm5, %xmm4
addsd %xmm2, %xmm4
addsd 0x28(%rsp), %xmm4
movsd %xmm4, (%rsp)
movsd 0xf38d(%rip), %xmm1     # 0x3e060
divsd %xmm1, %xmm0
callq 0x71c0
movsd %xmm0, 0x10(%rsp)
movsd (%rsp), %xmm0
divsd 0xf371(%rip), %xmm0     # 0x3e060
callq 0x71c0
movsd %xmm0, (%rsp)
cmpl $0x1, %ebx
jne 0x2ef58
movsd 0x18(%r15), %xmm0
movsd %xmm0, 0x58(%rsp)
movsd 0x20(%r15), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x18(%rsp), %xmm0
callq 0x77a0
movsd %xmm0, 0x20(%rsp)
movsd 0x18(%rsp), %xmm0
callq 0x70f0
movapd %xmm0, %xmm4
movsd 0x48(%rsp), %xmm0
movsd 0x58(%rsp), %xmm6
subsd %xmm0, %xmm6
movapd %xmm0, %xmm3
movsd 0x40(%rsp), %xmm0
movsd 0x8(%rsp), %xmm5
subsd %xmm0, %xmm5
movapd %xmm0, %xmm2
movapd %xmm4, %xmm1
mulsd %xmm5, %xmm1
movapd %xmm6, %xmm0
movsd 0x20(%rsp), %xmm7
mulsd %xmm7, %xmm0
subsd %xmm1, %xmm0
addsd %xmm3, %xmm0
addsd 0x30(%rsp), %xmm0
mulsd %xmm7, %xmm5
mulsd %xmm6, %xmm4
addsd %xmm5, %xmm4
addsd %xmm2, %xmm4
addsd 0x28(%rsp), %xmm4
movsd %xmm4, 0x8(%rsp)
movsd 0xf2b6(%rip), %xmm1     # 0x3e060
divsd %xmm1, %xmm0
callq 0x71c0
movsd 0xf2a5(%rip), %xmm1     # 0x3e060
mulsd %xmm1, %xmm0
movsd %xmm0, 0x58(%rsp)
movsd 0x8(%rsp), %xmm0
divsd %xmm1, %xmm0
callq 0x71c0
mulsd 0xf284(%rip), %xmm0     # 0x3e060
movsd %xmm0, 0x8(%rsp)
movsd 0x28(%r15), %xmm0
movsd %xmm0, 0x50(%rsp)
movsd 0x30(%r15), %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x18(%rsp), %xmm0
callq 0x77a0
movsd %xmm0, 0x60(%rsp)
movsd 0x18(%rsp), %xmm0
callq 0x70f0
movapd %xmm0, %xmm4
movsd 0x48(%rsp), %xmm3
movsd 0x50(%rsp), %xmm6
subsd %xmm3, %xmm6
movsd 0x40(%rsp), %xmm2
movsd 0x20(%rsp), %xmm0
subsd %xmm2, %xmm0
movapd %xmm4, %xmm1
mulsd %xmm0, %xmm1
movapd %xmm0, %xmm5
movapd %xmm6, %xmm0
movsd 0x60(%rsp), %xmm7
mulsd %xmm7, %xmm0
subsd %xmm1, %xmm0
addsd %xmm3, %xmm0
addsd 0x30(%rsp), %xmm0
mulsd %xmm7, %xmm5
mulsd %xmm6, %xmm4
addsd %xmm5, %xmm4
addsd %xmm2, %xmm4
addsd 0x28(%rsp), %xmm4
movsd %xmm4, 0x20(%rsp)
divsd 0xf1da(%rip), %xmm0     # 0x3e060
callq 0x71c0
movapd %xmm0, %xmm1
movsd 0xf1c9(%rip), %xmm2     # 0x3e060
mulsd %xmm2, %xmm1
movsd %xmm1, 0x50(%rsp)
movsd 0x20(%rsp), %xmm0
divsd %xmm2, %xmm0
callq 0x71c0
mulsd 0xf1a8(%rip), %xmm0     # 0x3e060
movsd %xmm0, 0x20(%rsp)
movl $0x3, %edx
movq %rbp, %rdi
leaq 0xfb1f(%rip), %rsi      # 0x3e9ec
callq 0x74e0
movq %rbp, %rdi
movsd 0x58(%rsp), %xmm0
callq 0x7690
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x74e0
movq %rbx, %rdi
movsd 0x8(%rsp), %xmm0
callq 0x7690
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x74e0
movq %rbx, %rdi
movsd 0x50(%rsp), %xmm0
callq 0x7690
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x74e0
movq %rbx, %rdi
movsd 0x20(%rsp), %xmm0
callq 0x7690
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x74e0
jmp 0x2ef6f
movl $0x3, %edx
movq %rbp, %rdi
leaq 0xfa89(%rip), %rsi      # 0x3e9f0
callq 0x74e0
movq %rbp, %rbx
movsd 0xf0e9(%rip), %xmm1     # 0x3e060
movsd 0x10(%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd (%rsp), %xmm2
mulsd %xmm1, %xmm2
movsd %xmm2, (%rsp)
movq %rbx, %rdi
callq 0x7690
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x74e0
movq %rbx, %rdi
movsd (%rsp), %xmm0
callq 0x7690
addq $0x38, %r15
incl %r13d
cmpl 0x18(%r14), %r13d
jl 0x2ec2c
cmpl $0x1, 0x1c(%r14)
jne 0x2efe3
leaq 0xfa1e(%rip), %rsi      # 0x3e9f4
movl $0x2, %edx
movq %rbp, %rdi
callq 0x74e0
leaq 0xfa17(%rip), %rsi      # 0x3ea01
movl $0x1, %edx
movq %rbp, %rdi
callq 0x74e0
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x7400
movsbl %al, %esi
movq %rbp, %rdi
callq 0x7050
movq %rax, %rdi
callq 0x7310
cmpl $0x0, 0x3c(%rsp)
je 0x2f0c0
leaq 0xd889(%rip), %r15      # 0x3c8ba
movl $0x3, %edx
movq %rbp, %rdi
movq %r15, %rsi
callq 0x74e0
leaq 0xf9e6(%rip), %rsi      # 0x3ea2e
movl $0x12, %edx
movq %rbp, %rdi
callq 0x74e0
addq $0x90, %r14
movq %r14, %rdi
callq 0x71d0
movq %rbp, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x74e0
leaq 0xf988(%rip), %rsi      # 0x3ea01
movl $0x1, %edx
movq %rbp, %rdi
callq 0x74e0
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x7400
movsbl %al, %esi
movq %rbp, %rdi
callq 0x7050
movq %rax, %rdi
callq 0x7310
movl $0x3, %edx
movq %rbp, %rdi
movq %r15, %rsi
callq 0x74e0
jmp 0x2f12d
leaq 0xf967(%rip), %rsi      # 0x3ea2e
movl $0x12, %edx
movq %rbp, %rdi
callq 0x74e0
addq $0x90, %r14
movq %r14, %rdi
callq 0x71d0
movq %rbp, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x74e0
leaq 0xf909(%rip), %rsi      # 0x3ea01
movl $0x1, %edx
movq %rbp, %rdi
callq 0x74e0
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x7400
movsbl %al, %esi
movq %rbp, %rdi
callq 0x7050
movq %rax, %rdi
callq 0x7310
leaq 0xf8cf(%rip), %rsi      # 0x3ea03
movl $0x2a, %edx
movq %rbp, %rdi
callq 0x74e0
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x7400
movsbl %al, %esi
movq %rbp, %rdi
callq 0x7050
movq %rax, %rdi
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7310
nop