// File: /workspace/github_cpp_makefile_star2_O1/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 0x104487(%rip), %rsi    # 0x1544de
movq %r14, %rdi
movl $0x10, %edx
callq 0x4070
movq 0x38(%rsp), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x58(%rsp,%rax)
jne 0x502e2
movq 0x146f41(%rip), %rdi    # 0x196fc0
leaq 0x104465(%rip), %rsi    # 0x1544eb
movl $0x15, %edx
callq 0x44e0
movq 0x8(%rbx), %rsi
subq (%rbx), %rsi
sarq $0x4, %rsi
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rsi
movq 0x146f10(%rip), %rdi    # 0x196fc0
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 0x10441b(%rip), %rsi    # 0x154501
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 0x50294
movl $0x1, %ebp
leaq 0x18(%rsp), %r14
xorl %ecx, %ecx
leaq 0x38(%rsp), %r15
leaq 0x10733e(%rip), %r12    # 0x157486
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 0x8555a
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 0x50148
leaq 0x38(%rsp), %rdi
callq 0x45d0
movq 0x146cfb(%rip), %rax    # 0x196fa0
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 0x146d07(%rip), %rdi    # 0x196ff0
leaq 0x10422a(%rip), %rsi    # 0x15451a
movl $0x24, %edx
callq 0x44e0
movq 0x146cef(%rip), %rdi    # 0x196ff0
callq 0x41f0
callq 0x4260
jmp 0x5030d
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x4620
movq %rbx, %rdi
callq 0x4780