// File: /workspace/github_cpp_makefile_star2_O2/carlos-urena[P]svg-gen/svgobjects.cpp
// Function: CamRefSys::initialize(VectorTempl3<float> const&, VectorTempl3<float> const&, VectorTempl3<float> const&)
void CamRefSys::initialize( const vec3 & look_at, const vec3 & observer, const vec3 & p_vup )
{
  constexpr real epsilon = 1e-5 ;

  assert( epsilon <= (observer-look_at).length() ) ;

  origin = observer ;
  zAxis = (observer-look_at).normalized();
  xAxis = (p_vup.cross(zAxis)).normalized();  assert( fabs(xAxis.length()-1.0) < epsilon );
  yAxis = (zAxis.cross(xAxis)).normalized() ; assert( fabs(yAxis.length()-1.0) < epsilon );

  assert( xAxis.dot(yAxis) < epsilon );
  assert( yAxis.dot(zAxis) < epsilon );
  assert( zAxis.dot(xAxis) < epsilon );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
movq %rdx, %rdi
callq 0x530c
leaq -0x30(%rbp), %rdi
movlps %xmm0, (%rdi)
movss %xmm1, 0x8(%rdi)
callq 0x554a
ucomiss 0x5673(%rip), %xmm0     # 0xb300
jb 0x5e04
movl 0x8(%r12), %eax
movl %eax, 0x8(%rbx)
movq (%r12), %rax
movq %rax, (%rbx)
movq %r12, %rdi
movq %r14, %rsi
callq 0x530c
leaq -0x30(%rbp), %r12
movlps %xmm0, (%r12)
movss %xmm1, 0x8(%r12)
movq %r12, %rdi
callq 0x5372
leaq 0x24(%rbx), %r14
movss %xmm0, 0x24(%rbx)
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movss %xmm0, 0x28(%rbx)
movss %xmm1, 0x2c(%rbx)
movq %r15, %rdi
movq %r14, %rsi
callq 0x5398
movlps %xmm0, (%r12)
movss %xmm1, 0x8(%r12)
leaq -0x30(%rbp), %rdi
callq 0x5372
leaq 0xc(%rbx), %r15
movss %xmm0, 0xc(%rbx)
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movss %xmm0, 0x10(%rbx)
movss %xmm1, 0x14(%rbx)
movq %r15, %rdi
callq 0x554a
cvtss2sd %xmm0, %xmm0
addsd 0x5529(%rip), %xmm0     # 0xb250
andpd 0x5571(%rip), %xmm0     # 0xb2a0
movsd 0x5521(%rip), %xmm1     # 0xb258
ucomisd %xmm0, %xmm1
jbe 0x5e1d
movq %r14, %rdi
movq %r15, %rsi
callq 0x5398
leaq -0x30(%rbp), %rdi
movlpd %xmm0, (%rdi)
movss %xmm1, 0x8(%rdi)
callq 0x5372
leaq 0x18(%rbx), %r12
movss %xmm0, 0x18(%rbx)
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movss %xmm0, 0x1c(%rbx)
movss %xmm1, 0x20(%rbx)
movq %r12, %rdi
callq 0x554a
cvtss2sd %xmm0, %xmm0
addsd 0x54c7(%rip), %xmm0     # 0xb250
andpd 0x550f(%rip), %xmm0     # 0xb2a0
movsd 0x54bf(%rip), %xmm1     # 0xb258
ucomisd %xmm0, %xmm1
jbe 0x5e36
movq %r15, %rdi
movq %r12, %rsi
callq 0x5576
movss 0x554a(%rip), %xmm1     # 0xb300
ucomiss %xmm0, %xmm1
jbe 0x5e4f
movq %r12, %rdi
movq %r14, %rsi
callq 0x5576
movss 0x552e(%rip), %xmm1     # 0xb300
ucomiss %xmm0, %xmm1
jbe 0x5e68
movq %r14, %rdi
movq %r15, %rsi
callq 0x5576
movss 0x5512(%rip), %xmm1     # 0xb300
ucomiss %xmm0, %xmm1
jbe 0x5e81
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x56f2(%rip), %rdi      # 0xb4fd
leaq 0x5712(%rip), %rsi      # 0xb524
leaq 0x571a(%rip), %rcx      # 0xb533
pushq $0x68
jmp 0x5e98
leaq 0x5754(%rip), %rdi      # 0xb578
leaq 0x56f9(%rip), %rsi      # 0xb524
leaq 0x5701(%rip), %rcx      # 0xb533
pushq $0x6c
jmp 0x5e98
leaq 0x575e(%rip), %rdi      # 0xb59b
leaq 0x56e0(%rip), %rsi      # 0xb524
leaq 0x56e8(%rip), %rcx      # 0xb533
pushq $0x6d
jmp 0x5e98
leaq 0x5768(%rip), %rdi      # 0xb5be
leaq 0x56c7(%rip), %rsi      # 0xb524
leaq 0x56cf(%rip), %rcx      # 0xb533
pushq $0x6f
jmp 0x5e98
leaq 0x576a(%rip), %rdi      # 0xb5d9
leaq 0x56ae(%rip), %rsi      # 0xb524
leaq 0x56b6(%rip), %rcx      # 0xb533
pushq $0x70
jmp 0x5e98
leaq 0x576c(%rip), %rdi      # 0xb5f4
leaq 0x5695(%rip), %rsi      # 0xb524
leaq 0x569d(%rip), %rcx      # 0xb533
pushq $0x71
popq %rdx
callq 0x3110