// File: carlos-urena[P]svg-gen/svgobjects.cpp
// Function: Polygon::drawSVG(SVGContext&)
void Polygon::drawSVG( SVGContext & ctx )
{
   using namespace std ;
   assert( ctx.os != nullptr );


   if ( points3D.size() == 0 )
   {
      cout << "WARNING: attempting to draw an empty Polygon object" << endl ;
      return ;
   }

  assert( projected );
  assert( points3D.size() == points2D.size() );

  using namespace std ;
  std::ostream & os = *(ctx.os) ;

  os << "<path " << endl
     << "   stroke-linecap='round' stroke-linejoin='round'" << endl ;

  style.writeSVG( ctx );

  os << "   d=' M " ;
  write_coord2( os, points2D[0] );
  for( unsigned i = 1 ; i < points2D.size() ; i++ )
  {
      os << " L " ;
      write_coord2( os, points2D[i] );
      os << " " ;
      //cout << points_proy[i] << endl ;
  }
  if ( style.close_lines )
    os << " Z" ;

  os << "'/>" << endl;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0xb384
jmp 0xb3a3
leaq 0xc28b(%rip), %rdi      # 0x17616
leaq 0xc0de(%rip), %rsi      # 0x17470
movl $0x141, %edx            # imm = 0x141
leaq 0xc2a4(%rip), %rcx      # 0x17642
callq 0x3100
movq -0x28(%rbp), %rdi
addq $0x68, %rdi
callq 0x13790
cmpq $0x0, %rax
jne 0xb3dd
movq 0x12c03(%rip), %rdi     # 0x1dfc0
leaq 0xc2aa(%rip), %rsi      # 0x1766e
callq 0x31a0
movq %rax, %rdi
movq 0x12bd5(%rip), %rsi     # 0x1dfa8
callq 0x31c0
jmp 0xb59e
movq -0x28(%rbp), %rax
testb $0x1, 0x8(%rax)
je 0xb3e9
jmp 0xb408
leaq 0xc769(%rip), %rdi      # 0x17b59
leaq 0xc079(%rip), %rsi      # 0x17470
movl $0x14a, %edx            # imm = 0x14A
leaq 0xc23f(%rip), %rcx      # 0x17642
callq 0x3100
movq -0x28(%rbp), %rdi
addq $0x68, %rdi
callq 0x13790
movq -0x28(%rbp), %rdi
movq %rax, -0x30(%rbp)
addq $0x80, %rdi
callq 0x137c0
movq %rax, %rcx
movq -0x30(%rbp), %rax
cmpq %rcx, %rax
jne 0xb437
jmp 0xb456
leaq 0xc264(%rip), %rdi      # 0x176a2
leaq 0xc02b(%rip), %rsi      # 0x17470
movl $0x14b, %edx            # imm = 0x14B
leaq 0xc1f1(%rip), %rcx      # 0x17642
callq 0x3100
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
leaq 0xc259(%rip), %rsi      # 0x176c5
callq 0x31a0
movq %rax, %rdi
movq 0x12b2d(%rip), %rsi     # 0x1dfa8
callq 0x31c0
movq %rax, %rdi
leaq 0xc242(%rip), %rsi      # 0x176cc
callq 0x31a0
movq %rax, %rdi
movq 0x12b0f(%rip), %rsi     # 0x1dfa8
callq 0x31c0
movq -0x28(%rbp), %rdi
addq $0x20, %rdi
movq -0x10(%rbp), %rsi
callq 0xaa90
movq -0x18(%rbp), %rdi
leaq 0xc244(%rip), %rsi      # 0x176fe
callq 0x31a0
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
addq $0x80, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x137e0
movq -0x38(%rbp), %rdi
movq %rax, %rsi
callq 0xa200
movl $0x1, -0x1c(%rbp)
movq -0x28(%rbp), %rdi
movl -0x1c(%rbp), %eax
movq %rax, -0x40(%rbp)
addq $0x80, %rdi
callq 0x137c0
movq %rax, %rcx
movq -0x40(%rbp), %rax
cmpq %rcx, %rax
jae 0xb565
movq -0x18(%rbp), %rdi
leaq 0xc1ec(%rip), %rsi      # 0x17708
callq 0x31a0
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
addq $0x80, %rdi
movl -0x1c(%rbp), %eax
movl %eax, %esi
callq 0x137e0
movq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0xa200
movq -0x18(%rbp), %rdi
leaq 0xbead(%rip), %rsi      # 0x17402
callq 0x31a0
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xb4ee
movq -0x28(%rbp), %rax
testb $0x1, 0x39(%rax)
je 0xb57f
movq -0x18(%rbp), %rdi
leaq 0xc192(%rip), %rsi      # 0x1770c
callq 0x31a0
movq -0x18(%rbp), %rdi
leaq 0xc185(%rip), %rsi      # 0x1770f
callq 0x31a0
movq %rax, %rdi
movq 0x12a0f(%rip), %rsi     # 0x1dfa8
callq 0x31c0
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)