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

  // circunferencia inferior
  Ellipse * pcinf = new Ellipse( 64, vec3(0.0,-1.0,0.0), vec3(1.0,0.0,0.0), vec3(0.0,0.0,1.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,0.0,1.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,1.0,0.0), vec3(1.0,0.0,0.0), vec3(0.0,0.0,1.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[2]*v[2]);
  const vec3 n1 = vec3(  v[2]/s, -1.0, -v[0]/s ),
             n2 = vec3( -v[2]/s, -1.0,  v[0]/s );
  Segment
    * s1 = new Segment( n1, vec3(0.0,2.0,0.0), vec3(1.0,0.0,0.0), pcinf->style.lines_width ),
    * s2 = new Segment( n2, vec3(0.0,2.0,0.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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r13
movq %rdi, %rbx
movb $0x0, 0x8(%rdi)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x20(%rdi)
movq $0x0, 0x30(%rdi)
leaq 0x7d3f(%rip), %rax      # 0x11a10
movq %rax, (%rdi)
movl $0x98, %edi
movq %rbx, -0x50(%rbp)
callq 0x31d0
movq %rax, %r14
movabsq $-0x4080000000000000, %rax # imm = 0xBF80000000000000
leaq -0x38(%rbp), %rdx
movq %rax, (%rdx)
xorl %eax, %eax
movl %eax, 0x8(%rdx)
leaq -0x44(%rbp), %rcx
movq $0x3f800000, (%rcx)     # imm = 0x3F800000
movl %eax, 0x8(%rcx)
movss 0x32f7(%rip), %xmm1     # 0xd008
xorpd %xmm0, %xmm0
movq %r14, %rdi
movl $0x40, %esi
callq 0x8636
movb $0x0, 0x3a(%r14)
movq $0x3f800000, 0x20(%r14) # imm = 0x3F800000
movl $0x0, 0x28(%r14)
movl $0x98, %edi
callq 0x31d0
movq %rax, %r15
leaq -0x38(%rbp), %rdx
movq $0x0, (%rdx)
xorl %eax, %eax
movl %eax, 0x8(%rdx)
leaq -0x44(%rbp), %rcx
movq $0x3f800000, (%rcx)     # imm = 0x3F800000
movl %eax, 0x8(%rcx)
movss 0x329e(%rip), %xmm1     # 0xd008
xorpd %xmm0, %xmm0
movq %r15, %rdi
movl $0x40, %esi
callq 0x8636
movw $0x1, 0x39(%r15)
movabsq $0x3ecccccd3ecccccd, %rax # imm = 0x3ECCCCCD3ECCCCCD
movq %rax, 0x20(%r15)
movl $0x3ecccccd, 0x28(%r15) # imm = 0x3ECCCCCD
movl $0x3b03126f, 0x3c(%r15) # imm = 0x3B03126F
movl $0x98, %edi
callq 0x31d0
movq %rax, %rbx
movabsq $0x3f80000000000000, %rax # imm = 0x3F80000000000000
leaq -0x38(%rbp), %rdx
movq %rax, (%rdx)
xorl %eax, %eax
movl %eax, 0x8(%rdx)
leaq -0x44(%rbp), %rcx
movq $0x3f800000, (%rcx)     # imm = 0x3F800000
movl %eax, 0x8(%rcx)
movss 0x322f(%rip), %xmm1     # 0xd008
xorpd %xmm0, %xmm0
movq %rbx, %rdi
movl $0x40, %esi
callq 0x8636
movb $0x0, 0x3a(%rbx)
movq $0x3f800000, 0x20(%rbx) # imm = 0x3F800000
movl $0x0, 0x28(%rbx)
xorpd %xmm0, %xmm0
xorl %eax, %eax
xorps %xmm1, %xmm1
cvtss2sd 0x24(%r13,%rax,4), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %rax
cmpq $0x3, %rax
jne 0x9e03
cvtsd2ss %xmm0, %xmm0
xorpd %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jb 0x9e31
sqrtss %xmm0, %xmm0
jmp 0x9e36
callq 0x32d0
xorl %eax, %eax
movss 0x24(%r13,%rax,4), %xmm1
divss %xmm0, %xmm1
movss %xmm1, -0x38(%rbp,%rax,4)
incq %rax
cmpq $0x3, %rax
jne 0x9e38
movss -0x38(%rbp), %xmm4
movss -0x30(%rbp), %xmm5
movaps %xmm5, %xmm1
mulss %xmm5, %xmm1
movaps %xmm4, %xmm0
mulss %xmm4, %xmm0
addss %xmm1, %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jb 0x9e7c
sqrtss %xmm0, %xmm0
jmp 0x9e97
movaps %xmm4, -0x60(%rbp)
movaps %xmm5, -0x90(%rbp)
callq 0x32d0
movaps -0x90(%rbp), %xmm5
movaps -0x60(%rbp), %xmm4
movq %rbx, -0x60(%rbp)
movaps %xmm5, %xmm1
divss %xmm0, %xmm1
movaps 0x3397(%rip), %xmm2     # 0xd240
movaps %xmm4, %xmm3
xorps %xmm2, %xmm3
divss %xmm0, %xmm3
movss %xmm1, -0x38(%rbp)
movl $0xbf800000, %eax       # imm = 0xBF800000
movl %eax, -0x34(%rbp)
movss %xmm3, -0x30(%rbp)
xorps %xmm2, %xmm5
divss %xmm0, %xmm5
divss %xmm0, %xmm4
movss %xmm5, -0x44(%rbp)
movl %eax, -0x40(%rbp)
movss %xmm4, -0x3c(%rbp)
movl $0x98, %edi
callq 0x31d0
movq %rax, %r13
movabsq $0x4000000000000000, %r12 # imm = 0x4000000000000000
leaq -0x78(%rbp), %rdx
movq %r12, (%rdx)
xorl %eax, %eax
movl %eax, 0x8(%rdx)
leaq -0x6c(%rbp), %rcx
movq $0x3f800000, (%rcx)     # imm = 0x3F800000
movl %eax, 0x8(%rcx)
movss 0x3c(%r14), %xmm0
leaq -0x38(%rbp), %rsi
movq %r13, %rdi
callq 0x8322
movl $0x98, %edi
callq 0x31d0
movq %rax, %rbx
leaq -0x78(%rbp), %rdx
movq %r12, (%rdx)
xorl %eax, %eax
movl %eax, 0x8(%rdx)
leaq -0x6c(%rbp), %rcx
movq $0x3f800000, (%rcx)     # imm = 0x3F800000
movl %eax, 0x8(%rcx)
movss 0x3c(%r14), %xmm0
leaq -0x44(%rbp), %rsi
movq %rbx, %rdi
callq 0x8322
movq -0x50(%rbp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x7568
movq %r12, %rdi
movq %r15, %rsi
callq 0x7568
movq %r12, %rdi
movq -0x60(%rbp), %rsi
callq 0x7568
movq %r12, %rdi
movq %r13, %rsi
callq 0x7568
movq %r12, %rdi
movq %rbx, %rsi
callq 0x7568
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9fb0
movq %rax, %r12
movq %r13, %rdi
jmp 0x9fca
jmp 0x9fd3
movq %rax, %r12
movq %rbx, %rdi
jmp 0x9fca
jmp 0x9fd3
movq %rax, %r12
movq %r15, %rdi
jmp 0x9fca
jmp 0x9fd3
movq %rax, %r12
movq %r14, %rdi
callq 0x31a0
jmp 0x9fd6
jmp 0x9fd3
movq %rax, %r12
leaq 0x77b3(%rip), %rax      # 0x11790
movq -0x50(%rbp), %rcx
movq %rax, (%rcx)
movq 0x20(%rcx), %rdi
testq %rdi, %rdi
je 0x9ff2
callq 0x31a0
movq %r12, %rdi
callq 0x32b0