// File: carlos-urena[P]svg-gen/svgobjects.cpp
// Function: ZAxisCylinder::ZAxisCylinder(Camera const&)
ZAxisCylinder::ZAxisCylinder( const Camera & cam )
{

  // circunferencia inferior
  Ellipse * pcinf = new Ellipse( 64, vec3(0.0,0.0,-1.0), vec3(1.0,0.0,0.0), vec3(0.0,1.0,0.0));
  pcinf->style.draw_filled = false ;
  pcinf->style.lines_color = vec3(1.0,0.0,0.0) ;

  // circunferencia ecuador
  Ellipse * pcecu = new Ellipse( 64, vec3(0.0,0.0,0.0), vec3(1.0,0.0,0.0), vec3(0.0,1.0,0.0));
  pcecu->style.draw_filled = false ;
  pcecu->style.close_lines = true ;
  pcecu->style.lines_color = vec3(0.4,0.4,0.4) ;
  pcecu->style.lines_width = 0.002 ;

  // circunferencia superior
  Ellipse * pcsup = new Ellipse( 64, vec3(0.0,0.0,1.0), vec3(1.0,0.0,0.0), vec3(0.0,1.0,0.0));
  pcsup->style.draw_filled = false ;
  pcsup->style.lines_color = vec3(1.0,0.0,0.0) ;

  // segmentos verticales que delimitan el cilindro
  const vec3 v  = cam.src.zAxis.normalized() ;
  const real s  = sqrt(v[0]*v[0]+v[1]*v[1]);
  const vec3 n1 = vec3(  v[1]/s, -v[0]/s, -1.0 ),
             n2 = vec3( -v[1]/s,  v[0]/s, -1.0 );
  Segment
    * s1 = new Segment( n1, vec3(0.0,0.0,2.0), vec3(1.0,0.0,0.0), pcinf->style.lines_width ),
    * s2 = new Segment( n2, vec3(0.0,0.0,2.0), vec3(1.0,0.0,0.0), pcinf->style.lines_width );

    add( pcinf );
    add( pcecu );
    add( pcsup );
    add( s1 );
    add( s2 );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x300, %rsp            # imm = 0x300
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x268(%rbp)
callq 0xb5b0
movq -0x268(%rbp), %rax
leaq 0xdc47(%rip), %rcx      # 0x1da28
movq %rcx, (%rax)
movl $0x98, %edi
callq 0x31b0
movq %rax, -0x260(%rbp)
jmp 0xfdf7
movl $0x0, -0x34(%rbp)
movl $0x0, -0x38(%rbp)
movl $0xbf800000, -0x3c(%rbp) # imm = 0xBF800000
leaq -0x30(%rbp), %rdi
leaq -0x34(%rbp), %rsi
leaq -0x38(%rbp), %rdx
leaq -0x3c(%rbp), %rcx
callq 0x8c30
jmp 0xfe23
movl $0x3f800000, -0x4c(%rbp) # imm = 0x3F800000
movl $0x0, -0x50(%rbp)
movl $0x0, -0x54(%rbp)
leaq -0x48(%rbp), %rdi
leaq -0x4c(%rbp), %rsi
leaq -0x50(%rbp), %rdx
leaq -0x54(%rbp), %rcx
callq 0x8c30
jmp 0xfe4f
movl $0x0, -0x64(%rbp)
movl $0x3f800000, -0x68(%rbp) # imm = 0x3F800000
movl $0x0, -0x6c(%rbp)
leaq -0x60(%rbp), %rdi
leaq -0x64(%rbp), %rsi
leaq -0x68(%rbp), %rdx
leaq -0x6c(%rbp), %rcx
callq 0x8c30
jmp 0xfe7b
movq -0x260(%rbp), %rdi
movl -0x58(%rbp), %eax
movl %eax, -0x78(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x80(%rbp)
movsd -0x80(%rbp), %xmm0
movss -0x78(%rbp), %xmm1
movl $0x40, %esi
leaq -0x30(%rbp), %rdx
leaq -0x48(%rbp), %rcx
callq 0xcd30
jmp 0xfeae
movq -0x260(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movb $0x0, 0x3a(%rax)
movl $0x3f800000, -0x90(%rbp) # imm = 0x3F800000
movl $0x0, -0x94(%rbp)
movl $0x0, -0x98(%rbp)
leaq -0x8c(%rbp), %rdi
leaq -0x90(%rbp), %rsi
leaq -0x94(%rbp), %rdx
leaq -0x98(%rbp), %rcx
callq 0x8c30
jmp 0xff02
movq -0x18(%rbp), %rax
movl -0x84(%rbp), %ecx
movl %ecx, 0x28(%rax)
movq -0x8c(%rbp), %rcx
movq %rcx, 0x20(%rax)
movl $0x98, %edi
callq 0x31b0
movq %rax, -0x270(%rbp)
jmp 0xff2d
movl $0x0, -0xb0(%rbp)
movl $0x0, -0xb4(%rbp)
movl $0x0, -0xb8(%rbp)
leaq -0xac(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
leaq -0xb4(%rbp), %rdx
leaq -0xb8(%rbp), %rcx
callq 0x8c30
jmp 0xff6e
movl $0x3f800000, -0xc8(%rbp) # imm = 0x3F800000
movl $0x0, -0xcc(%rbp)
movl $0x0, -0xd0(%rbp)
leaq -0xc4(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
leaq -0xcc(%rbp), %rdx
leaq -0xd0(%rbp), %rcx
callq 0x8c30
jmp 0xffaf
movl $0x0, -0xe0(%rbp)
movl $0x3f800000, -0xe4(%rbp) # imm = 0x3F800000
movl $0x0, -0xe8(%rbp)
leaq -0xdc(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
leaq -0xe4(%rbp), %rdx
leaq -0xe8(%rbp), %rcx
callq 0x8c30
jmp 0xfff0
movq -0x270(%rbp), %rdi
movl -0xd4(%rbp), %eax
movl %eax, -0xf0(%rbp)
movq -0xdc(%rbp), %rax
movq %rax, -0xf8(%rbp)
movsd -0xf8(%rbp), %xmm0
movss -0xf0(%rbp), %xmm1
movl $0x40, %esi
leaq -0xac(%rbp), %rdx
leaq -0xc4(%rbp), %rcx
callq 0xcd30
jmp 0x1003b
movq -0x270(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
movb $0x0, 0x3a(%rax)
movq -0xa0(%rbp), %rax
movb $0x1, 0x39(%rax)
movl $0x3ecccccd, -0x108(%rbp) # imm = 0x3ECCCCCD
movl $0x3ecccccd, -0x10c(%rbp) # imm = 0x3ECCCCCD
movl $0x3ecccccd, -0x110(%rbp) # imm = 0x3ECCCCCD
leaq -0x104(%rbp), %rdi
leaq -0x108(%rbp), %rsi
leaq -0x10c(%rbp), %rdx
leaq -0x110(%rbp), %rcx
callq 0x8c30
jmp 0x100a0
movq -0xa0(%rbp), %rax
movl -0xfc(%rbp), %ecx
movl %ecx, 0x28(%rax)
movq -0x104(%rbp), %rcx
movq %rcx, 0x20(%rax)
movq -0xa0(%rbp), %rax
movl $0x3b03126f, 0x3c(%rax) # imm = 0x3B03126F
movl $0x98, %edi
callq 0x31b0
movq %rax, -0x278(%rbp)
jmp 0x100dc
movl $0x0, -0x128(%rbp)
movl $0x0, -0x12c(%rbp)
movl $0x3f800000, -0x130(%rbp) # imm = 0x3F800000
leaq -0x124(%rbp), %rdi
leaq -0x128(%rbp), %rsi
leaq -0x12c(%rbp), %rdx
leaq -0x130(%rbp), %rcx
callq 0x8c30
jmp 0x1011d
movl $0x3f800000, -0x140(%rbp) # imm = 0x3F800000
movl $0x0, -0x144(%rbp)
movl $0x0, -0x148(%rbp)
leaq -0x13c(%rbp), %rdi
leaq -0x140(%rbp), %rsi
leaq -0x144(%rbp), %rdx
leaq -0x148(%rbp), %rcx
callq 0x8c30
jmp 0x1015e
movl $0x0, -0x158(%rbp)
movl $0x3f800000, -0x15c(%rbp) # imm = 0x3F800000
movl $0x0, -0x160(%rbp)
leaq -0x154(%rbp), %rdi
leaq -0x158(%rbp), %rsi
leaq -0x15c(%rbp), %rdx
leaq -0x160(%rbp), %rcx
callq 0x8c30
jmp 0x1019f
movq -0x278(%rbp), %rdi
movl -0x14c(%rbp), %eax
movl %eax, -0x168(%rbp)
movq -0x154(%rbp), %rax
movq %rax, -0x170(%rbp)
movsd -0x170(%rbp), %xmm0
movss -0x168(%rbp), %xmm1
movl $0x40, %esi
leaq -0x124(%rbp), %rdx
leaq -0x13c(%rbp), %rcx
callq 0xcd30
jmp 0x101ea
movq -0x278(%rbp), %rax
movq %rax, -0x118(%rbp)
movq -0x118(%rbp), %rax
movb $0x0, 0x3a(%rax)
movl $0x3f800000, -0x180(%rbp) # imm = 0x3F800000
movl $0x0, -0x184(%rbp)
movl $0x0, -0x188(%rbp)
leaq -0x17c(%rbp), %rdi
leaq -0x180(%rbp), %rsi
leaq -0x184(%rbp), %rdx
leaq -0x188(%rbp), %rcx
callq 0x8c30
jmp 0x10244
movq -0x118(%rbp), %rax
movl -0x174(%rbp), %ecx
movl %ecx, 0x28(%rax)
movq -0x17c(%rbp), %rcx
movq %rcx, 0x20(%rax)
movq -0x10(%rbp), %rdi
addq $0x24, %rdi
callq 0x8ea0
movss %xmm1, -0x294(%rbp)
movaps %xmm0, -0x290(%rbp)
jmp 0x1027d
movss -0x294(%rbp), %xmm0
movaps -0x290(%rbp), %xmm1
movlpd %xmm1, -0x1b0(%rbp)
movss %xmm0, -0x1a8(%rbp)
movl -0x1a8(%rbp), %eax
movl %eax, -0x198(%rbp)
movq -0x1b0(%rbp), %rax
movq %rax, -0x1a0(%rbp)
leaq -0x194(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
callq 0x8e00
jmp 0x102cb
leaq -0x194(%rbp), %rdi
callq 0x8f10
movq %rax, -0x2a0(%rbp)
jmp 0x102e0
movq -0x2a0(%rbp), %rax
movss (%rax), %xmm0
movss %xmm0, -0x2ac(%rbp)
leaq -0x194(%rbp), %rdi
callq 0x8f10
movq %rax, -0x2a8(%rbp)
jmp 0x10308
movq -0x2a8(%rbp), %rax
movss (%rax), %xmm0
movss %xmm0, -0x2bc(%rbp)
leaq -0x194(%rbp), %rdi
callq 0x8f10
movq %rax, -0x2b8(%rbp)
jmp 0x10330
movq -0x2b8(%rbp), %rax
movss 0x4(%rax), %xmm0
movss %xmm0, -0x2cc(%rbp)
leaq -0x194(%rbp), %rdi
callq 0x8f10
movq %rax, -0x2c8(%rbp)
jmp 0x10359
movss -0x2bc(%rbp), %xmm2
movss -0x2ac(%rbp), %xmm0
movss -0x2cc(%rbp), %xmm1
movq -0x2c8(%rbp), %rax
movss 0x4(%rax), %xmm3
mulss %xmm3, %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x3140
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x1b4(%rbp)
leaq -0x194(%rbp), %rdi
callq 0x8f10
movq %rax, -0x2d8(%rbp)
jmp 0x103b3
movq -0x2d8(%rbp), %rax
movss 0x4(%rax), %xmm0
movss -0x1b4(%rbp), %xmm1
divss %xmm1, %xmm0
movss %xmm0, -0x1c4(%rbp)
leaq -0x194(%rbp), %rdi
callq 0x8f10
movq %rax, -0x2e0(%rbp)
jmp 0x103e8
movq -0x2e0(%rbp), %rax
movss (%rax), %xmm0
movaps 0x6c46(%rip), %xmm1     # 0x17040
pxor %xmm1, %xmm0
movss -0x1b4(%rbp), %xmm1
divss %xmm1, %xmm0
movss %xmm0, -0x1c8(%rbp)
movl $0xbf800000, -0x1cc(%rbp) # imm = 0xBF800000
leaq -0x1c0(%rbp), %rdi
leaq -0x1c4(%rbp), %rsi
leaq -0x1c8(%rbp), %rdx
leaq -0x1cc(%rbp), %rcx
callq 0x8c30
jmp 0x1043f
leaq -0x194(%rbp), %rdi
callq 0x8f10
movq %rax, -0x2e8(%rbp)
jmp 0x10454
movq -0x2e8(%rbp), %rax
movss 0x4(%rax), %xmm0
movaps 0x6bd9(%rip), %xmm1     # 0x17040
pxor %xmm1, %xmm0
movss -0x1b4(%rbp), %xmm1
divss %xmm1, %xmm0
movss %xmm0, -0x1dc(%rbp)
leaq -0x194(%rbp), %rdi
callq 0x8f10
movq %rax, -0x2f0(%rbp)
jmp 0x10494
movq -0x2f0(%rbp), %rax
movss (%rax), %xmm0
movss -0x1b4(%rbp), %xmm1
divss %xmm1, %xmm0
movss %xmm0, -0x1e0(%rbp)
movl $0xbf800000, -0x1e4(%rbp) # imm = 0xBF800000
leaq -0x1d8(%rbp), %rdi
leaq -0x1dc(%rbp), %rsi
leaq -0x1e0(%rbp), %rdx
leaq -0x1e4(%rbp), %rcx
callq 0x8c30
jmp 0x104e0
movl $0x98, %edi
callq 0x31b0
movq %rax, -0x2f8(%rbp)
jmp 0x104f3
movl $0x0, -0x200(%rbp)
movl $0x0, -0x204(%rbp)
movl $0x40000000, -0x208(%rbp) # imm = 0x40000000
leaq -0x1fc(%rbp), %rdi
leaq -0x200(%rbp), %rsi
leaq -0x204(%rbp), %rdx
leaq -0x208(%rbp), %rcx
callq 0x8c30
jmp 0x10534
movl $0x3f800000, -0x218(%rbp) # imm = 0x3F800000
movl $0x0, -0x21c(%rbp)
movl $0x0, -0x220(%rbp)
leaq -0x214(%rbp), %rdi
leaq -0x218(%rbp), %rsi
leaq -0x21c(%rbp), %rdx
leaq -0x220(%rbp), %rcx
callq 0x8c30
jmp 0x10575
movq -0x2f8(%rbp), %rdi
movq -0x18(%rbp), %rax
movss 0x3c(%rax), %xmm0
leaq -0x1c0(%rbp), %rsi
leaq -0x1fc(%rbp), %rdx
leaq -0x214(%rbp), %rcx
callq 0xcaa0
jmp 0x105a1
movq -0x2f8(%rbp), %rax
movq %rax, -0x1f0(%rbp)
movl $0x98, %edi
callq 0x31b0
movq %rax, -0x300(%rbp)
jmp 0x105c2
movl $0x0, -0x238(%rbp)
movl $0x0, -0x23c(%rbp)
movl $0x40000000, -0x240(%rbp) # imm = 0x40000000
leaq -0x234(%rbp), %rdi
leaq -0x238(%rbp), %rsi
leaq -0x23c(%rbp), %rdx
leaq -0x240(%rbp), %rcx
callq 0x8c30
jmp 0x10603
movl $0x3f800000, -0x250(%rbp) # imm = 0x3F800000
movl $0x0, -0x254(%rbp)
movl $0x0, -0x258(%rbp)
leaq -0x24c(%rbp), %rdi
leaq -0x250(%rbp), %rsi
leaq -0x254(%rbp), %rdx
leaq -0x258(%rbp), %rcx
callq 0x8c30
jmp 0x10644
movq -0x300(%rbp), %rdi
movq -0x18(%rbp), %rax
movss 0x3c(%rax), %xmm0
leaq -0x1d8(%rbp), %rsi
leaq -0x234(%rbp), %rdx
leaq -0x24c(%rbp), %rcx
callq 0xcaa0
jmp 0x10670
movq -0x268(%rbp), %rdi
movq -0x300(%rbp), %rax
movq %rax, -0x228(%rbp)
movq -0x18(%rbp), %rsi
callq 0xb660
jmp 0x10690
movq -0x268(%rbp), %rdi
movq -0xa0(%rbp), %rsi
callq 0xb660
jmp 0x106a5
movq -0x268(%rbp), %rdi
movq -0x118(%rbp), %rsi
callq 0xb660
jmp 0x106ba
movq -0x268(%rbp), %rdi
movq -0x1f0(%rbp), %rsi
callq 0xb660
jmp 0x106cf
movq -0x268(%rbp), %rdi
movq -0x228(%rbp), %rsi
callq 0xb660
jmp 0x106e4
addq $0x300, %rsp            # imm = 0x300
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x1077e
movq -0x260(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x3190
jmp 0x1077e
movq -0x270(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x3190
jmp 0x1077e
movq -0x278(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x3190
jmp 0x1077e
movq -0x2f8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x3190
jmp 0x1077e
movq -0x300(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x3190
movq -0x268(%rbp), %rdi
callq 0xb5f0
movq -0x20(%rbp), %rdi
callq 0x3280
nopw %cs:(%rax,%rax)