// File: /workspace/github_cpp_makefile_star2_O3/Luthaf[P]zeopp/ray.cc
// Function: reportRayInfo(std::vector<ray, std::allocator<ray>>&)
void reportRayInfo(vector<ray>& axsray){
  ofstream rayinfo;
  rayinfo.open ("Ray_Info.txt");
  if (rayinfo.good() == true){  
    cout << "Ray_Info.txt: size = " << axsray.size() << endl; 
    rayinfo << "x y z dx dy dz magnitude" << endl;
    for (unsigned int i=0;i<axsray.size();i++){
      ray rand_ray = axsray.at(i);
//      rayinfo << rand_ray.base << " "<< rand_ray.vector << " " << rand_ray.vector.magnitude()  << endl;
      rayinfo << rand_ray.base.vals[0] << " " << rand_ray.base.vals[1] << " "<< rand_ray.base.vals[2] << " "
              << rand_ray.vector.vals[0] << " " << rand_ray.vector.vals[1] << " " << rand_ray.vector.vals[2] << " " 
	      << rand_ray.vector.magnitude()  << endl;
      }
  }
  else {
    cerr << "Ray_Info.txt ran into errors opening" << endl;
    abort();
  }
  rayinfo.close();
  return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
movq %rdi, %rbx
leaq 0x38(%rsp), %r14
movq %r14, %rdi
callq 0x4720
leaq 0x102860(%rip), %rsi    # 0x15258e
movq %r14, %rdi
movl $0x10, %edx
callq 0x4070
movq 0x38(%rsp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x58(%rsp,%rax)
jne 0x4ffb9
movq 0x14526a(%rip), %rdi    # 0x194fc0
leaq 0x10283e(%rip), %rsi    # 0x15259b
movl $0x15, %edx
callq 0x44e0
movq 0x8(%rbx), %rsi
subq (%rbx), %rsi
sarq $0x4, %rsi
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rsi
movq 0x145239(%rip), %rdi    # 0x194fc0
callq 0x42b0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x4420
movsbl %al, %esi
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x42c0
leaq 0x1027f4(%rip), %rsi    # 0x1525b1
leaq 0x38(%rsp), %r14
movl $0x18, %edx
movq %r14, %rdi
callq 0x44e0
movq 0x38(%rsp), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x4420
movsbl %al, %esi
leaq 0x38(%rsp), %rdi
callq 0x4040
movq %rax, %rdi
callq 0x42c0
movq (%rbx), %rax
cmpq %rax, 0x8(%rbx)
je 0x4ff6b
movl $0x1, %ebp
leaq 0x18(%rsp), %r14
xorl %ecx, %ecx
leaq 0x38(%rsp), %r15
leaq 0x1057b7(%rip), %r12    # 0x1555d6
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movups (%rax,%rcx), %xmm0
movups 0x10(%rax,%rcx), %xmm1
movups 0x20(%rax,%rcx), %xmm2
movaps %xmm0, (%rsp)
movaps %xmm2, 0x20(%rsp)
movaps %xmm1, 0x10(%rsp)
movsd (%rsp), %xmm0
movq %r15, %rdi
callq 0x46b0
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x44e0
movsd 0x8(%rsp), %xmm0
movq %r13, %rdi
callq 0x46b0
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x44e0
movsd 0x10(%rsp), %xmm0
movq %r13, %rdi
callq 0x46b0
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x44e0
movsd 0x18(%rsp), %xmm0
movq %r13, %rdi
callq 0x46b0
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x44e0
movsd 0x20(%rsp), %xmm0
movq %r13, %rdi
callq 0x46b0
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x44e0
movsd 0x28(%rsp), %xmm0
movq %r13, %rdi
callq 0x46b0
movq %rax, %r13
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x44e0
movq %r14, %rdi
callq 0x8406c
movq %r13, %rdi
callq 0x46b0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x4420
movsbl %al, %esi
movq %r13, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x42c0
movl %ebp, %ecx
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
subq %rax, %rdx
sarq $0x4, %rdx
movabsq $-0x5555555555555555, %rsi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rsi, %rdx
incl %ebp
cmpq %rcx, %rdx
ja 0x4fe1f
leaq 0x38(%rsp), %rdi
callq 0x45d0
movq 0x145024(%rip), %rax    # 0x194fa0
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x40(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x38(%rsp,%rcx)
callq 0x4390
leaq 0x130(%rsp), %rdi
callq 0x41a0
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x145030(%rip), %rdi    # 0x194ff0
leaq 0x102603(%rip), %rsi    # 0x1525ca
movl $0x24, %edx
callq 0x44e0
movq 0x145018(%rip), %rdi    # 0x194ff0
callq 0x41f0
callq 0x4260
jmp 0x4ffe4
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x4620
movq %rbx, %rdi
callq 0x4780