// File: carlos-urena[P]svg-gen/svgobjects.cpp
// Function: YCylinderPolygon::YCylinderPolygon(Polygon const&)
YCylinderPolygon::YCylinderPolygon( const Polygon & orig )
{
  style.draw_lines    = true ;
  style.draw_filled     = true ;
  style.close_lines = true ;
  style.lines_width  = 0.015 ;
  style.fill_opacity = 0.2 ;
  style.lines_color   = vec3( 1.0, 0.0, 0.0 );
  style.fill_color    = vec3( 1.0, 0.0, 0.0 );

  assert( orig.points3D.size() > 0 );
  for( unsigned i = 0 ; i < orig.points3D.size() ; i++ )
  {
    vec3       pesf = orig.points3D[i].normalized();
    const real f    = real(1.0)/real(sqrt( double( pesf[0]*pesf[0]+pesf[2]*pesf[2] )));
    vec3       pcil = vec3(  f*pesf[0], pesf[1], f*pesf[2]) ;

    points3D.push_back( pcil );
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0xb040
movq -0x98(%rbp), %rax
leaq 0xb8a7(%rip), %rcx      # 0x1db48
movq %rcx, (%rax)
movb $0x1, 0x38(%rax)
movb $0x1, 0x3a(%rax)
movb $0x1, 0x39(%rax)
movl $0x3c75c28f, 0x3c(%rax) # imm = 0x3C75C28F
movl $0x3e4ccccd, 0x40(%rax) # imm = 0x3E4CCCCD
movl $0x3f800000, -0x20(%rbp) # imm = 0x3F800000
movl $0x0, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
leaq -0x1c(%rbp), %rdi
leaq -0x20(%rbp), %rsi
leaq -0x24(%rbp), %rdx
leaq -0x28(%rbp), %rcx
callq 0x8c30
jmp 0x122ea
movq -0x98(%rbp), %rax
movl -0x14(%rbp), %ecx
movl %ecx, 0x28(%rax)
movq -0x1c(%rbp), %rcx
movq %rcx, 0x20(%rax)
movl $0x3f800000, -0x44(%rbp) # imm = 0x3F800000
movl $0x0, -0x48(%rbp)
movl $0x0, -0x4c(%rbp)
leaq -0x40(%rbp), %rdi
leaq -0x44(%rbp), %rsi
leaq -0x48(%rbp), %rdx
leaq -0x4c(%rbp), %rcx
callq 0x8c30
jmp 0x1232b
movq -0x98(%rbp), %rax
movq -0x40(%rbp), %rcx
movq %rcx, 0x2c(%rax)
movl -0x38(%rbp), %ecx
movl %ecx, 0x34(%rax)
movq -0x10(%rbp), %rdi
addq $0x68, %rdi
callq 0x13790
cmpq $0x0, %rax
jbe 0x12355
jmp 0x12391
leaq 0x56bc(%rip), %rdi      # 0x17a18
leaq 0x510d(%rip), %rsi      # 0x17470
movl $0x45c, %edx            # imm = 0x45C
leaq 0x581c(%rip), %rcx      # 0x17b8b
callq 0x3100
movq -0x98(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0xb2d0
jmp 0x125e9
movl $0x0, -0x50(%rbp)
movl -0x50(%rbp), %eax
movq %rax, -0xa0(%rbp)
movq -0x10(%rbp), %rdi
addq $0x68, %rdi
callq 0x13790
movq %rax, %rcx
movq -0xa0(%rbp), %rax
cmpq %rcx, %rax
jae 0x125e0
movq -0x10(%rbp), %rdi
addq $0x68, %rdi
movl -0x50(%rbp), %eax
movl %eax, %esi
callq 0x13d30
movq %rax, %rdi
callq 0x8ea0
movss %xmm1, -0xb4(%rbp)
movaps %xmm0, -0xb0(%rbp)
jmp 0x123ed
movss -0xb4(%rbp), %xmm0
movaps -0xb0(%rbp), %xmm1
movlpd %xmm1, -0x78(%rbp)
movss %xmm0, -0x70(%rbp)
movl -0x70(%rbp), %eax
movl %eax, -0x60(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq -0x5c(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x8e00
jmp 0x12423
leaq -0x5c(%rbp), %rdi
callq 0x93d0
movq %rax, -0xc0(%rbp)
jmp 0x12435
movq -0xc0(%rbp), %rax
movss (%rax), %xmm0
movss %xmm0, -0xcc(%rbp)
leaq -0x5c(%rbp), %rdi
callq 0x93d0
movq %rax, -0xc8(%rbp)
jmp 0x1245a
movq -0xc8(%rbp), %rax
movss (%rax), %xmm0
movss %xmm0, -0xdc(%rbp)
leaq -0x5c(%rbp), %rdi
callq 0x93d0
movq %rax, -0xd8(%rbp)
jmp 0x1247f
movq -0xd8(%rbp), %rax
movss 0x8(%rax), %xmm0
movss %xmm0, -0xec(%rbp)
leaq -0x5c(%rbp), %rdi
callq 0x93d0
movq %rax, -0xe8(%rbp)
jmp 0x124a5
movss -0xdc(%rbp), %xmm2
movss -0xcc(%rbp), %xmm0
movss -0xec(%rbp), %xmm1
movq -0xe8(%rbp), %rax
movss 0x8(%rax), %xmm3
mulss %xmm3, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x3140
cvtsd2ss %xmm0, %xmm1
movss 0x4b1a(%rip), %xmm0     # 0x17004
divss %xmm1, %xmm0
movss %xmm0, -0x7c(%rbp)
movss -0x7c(%rbp), %xmm0
movss %xmm0, -0xfc(%rbp)
leaq -0x5c(%rbp), %rdi
callq 0x93d0
movq %rax, -0xf8(%rbp)
jmp 0x12512
movss -0xfc(%rbp), %xmm0
movq -0xf8(%rbp), %rax
movss (%rax), %xmm1
mulss %xmm1, %xmm0
movss %xmm0, -0x8c(%rbp)
leaq -0x5c(%rbp), %rdi
callq 0x93d0
movq %rax, -0x108(%rbp)
jmp 0x12543
movq -0x108(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x120(%rbp)
movss -0x7c(%rbp), %xmm0
movss %xmm0, -0x114(%rbp)
leaq -0x5c(%rbp), %rdi
callq 0x93d0
movq %rax, -0x110(%rbp)
jmp 0x12574
movq -0x120(%rbp), %rdx
movss -0x114(%rbp), %xmm0
movq -0x110(%rbp), %rax
movss 0x8(%rax), %xmm1
mulss %xmm1, %xmm0
movss %xmm0, -0x90(%rbp)
leaq -0x88(%rbp), %rdi
leaq -0x8c(%rbp), %rsi
leaq -0x90(%rbp), %rcx
callq 0x8c30
jmp 0x125b7
movq -0x98(%rbp), %rdi
addq $0x68, %rdi
leaq -0x88(%rbp), %rsi
callq 0x13cc0
jmp 0x125d0
jmp 0x125d2
movl -0x50(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x12398
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x3280
nopw %cs:(%rax,%rax)