// File: /workspace/github_cpp_makefile_star2_O2/Luthaf[P]zeopp/ray.cc
// Function: reportRays(std::ostream&, std::vector<ray, std::allocator<ray>>&, std::vector<ray, std::allocator<ray>>&, bool)
void reportRays(ostream &output, vector<ray>& axsray, vector<ray>& inaxsray, bool colors){
  if (colors == true)
    {
      //Colors are in order of the rainbow
      output << "{color purple}" << "\n";
      for(unsigned int i = 0; i < axsray.size(); i++)
	{
	  if (axsray[i].vector.magnitude() < 3)
	    {
	      ray rand_ray = axsray.at(i);
	      Point addition = rand_ray.base + rand_ray.vector;
	      output << "{line {" << rand_ray.base << "} {" << addition << "}}" << "\n";
	    }
	}
      output << "{color blue}" << "\n";
      for(unsigned int i = 0; i < axsray.size(); i++)
	{
	  if (axsray[i].vector.magnitude() < 6 && axsray[i].vector.magnitude() >= 3)
	    {
	      ray rand_ray = axsray.at(i);
	      Point addition = rand_ray.base + rand_ray.vector;
	      output << "{line {" << rand_ray.base << "} {" << addition << "}}" << "\n";
	    }
	}
      output << "{color cyan}" << "\n";
      for(unsigned int i = 0; i < axsray.size(); i++)
	{
	  if (axsray[i].vector.magnitude() >= 6 && axsray[i].vector.magnitude() < 9)
	    {
	      ray rand_ray = axsray.at(i);
	      Point addition = rand_ray.base + rand_ray.vector;
	      output << "{line {" << rand_ray.base << "} {" << addition << "}}" << "\n";
	    }
	}
      output << "{color lime}" << "\n";
      for(unsigned int i = 0; i < axsray.size(); i++)
	{
	  if (axsray[i].vector.magnitude() >= 9 && axsray[i].vector.magnitude() < 12)
	    {
	      ray rand_ray = axsray.at(i);
	      Point addition = rand_ray.base + rand_ray.vector;
	      output << "{line {" << rand_ray.base << "} {" << addition << "}}" << "\n";
	    }
	}
      output << "{color orange}" << "\n";
      for(unsigned int i = 0; i < axsray.size(); i++)
	{
	  if (axsray[i].vector.magnitude() >= 12 && axsray[i].vector.magnitude() < 20)
	    {
	      ray rand_ray = axsray.at(i);
	      Point addition = rand_ray.base + rand_ray.vector;
	      output << "{line {" << rand_ray.base << "} {" << addition << "}}" << "\n";
	    }
	}
      output << "{color red}" << "\n";
      for(unsigned int i = 0; i < axsray.size(); i++)
	{
	  if (axsray[i].vector.magnitude() >= 20)
	    {
	      ray rand_ray = axsray.at(i);
	      Point addition = rand_ray.base + rand_ray.vector;
	      output << "{line {" << rand_ray.base << "} {" << addition << "}}" << "\n";
	    }
	}
    }
  else //colors if false
    {
      output << "{color blue}" << "\n";
      for(unsigned int i = 0; i < axsray.size(); i++){
	ray rand_ray = axsray.at(i);
	Point addition = rand_ray.base + rand_ray.vector;
	output << "{line {" << rand_ray.base << "} {" << addition << "}}" << "\n";
      }  
      output << "{color red}" << "\n";
      for(unsigned int i = 0; i < inaxsray.size(); i++){
	ray rand_ray = inaxsray.at(i);
	Point addition = rand_ray.base + rand_ray.vector;
	output << "{line {" <<  rand_ray.base << "} {" << addition << "}}" << "\n";
      }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %r14
testl %ecx, %ecx
je 0x3c5bb
leaq 0xc5659(%rip), %rsi     # 0x10155f
movq %rdi, %r15
callq 0x4480
leaq 0xc6669(%rip), %rsi     # 0x10257e
movq %rax, %rdi
callq 0x4480
xorl %r12d, %r12d
leaq 0x50(%rsp), %r13
leaq 0x20(%rsp), %rbp
leaq 0xc46ce(%rip), %rbx     # 0x1005ff
movl %r12d, %r12d
movq (%r14), %rcx
movq 0x8(%r14), %rax
subq %rcx, %rax
cqto
pushq $0x30
popq %rsi
idivq %rsi
cmpq %r12, %rax
jbe 0x3c00d
imulq $0x30, %r12, %rax
leaq (%rcx,%rax), %rdi
addq $0x18, %rdi
callq 0x63d48
movsd 0xc52b0(%rip), %xmm1    # 0x101218
ucomisd %xmm0, %xmm1
jbe 0x3c005
movq %r14, %rdi
movq %r12, %rsi
callq 0x3cdc8
movups (%rax), %xmm0
movupd 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movaps %xmm0, 0x20(%rsp)
movapd %xmm1, 0x30(%rsp)
movaps %xmm2, 0x40(%rsp)
movq 0x28(%rax), %rcx
movq %rcx, 0x10(%rsp)
movupd 0x18(%rax), %xmm0
movupd %xmm0, (%rsp)
movq %r13, %rdi
movq %rbp, %rsi
callq 0x63e70
movq %r15, %rdi
leaq 0xc456f(%rip), %rsi     # 0x100530
callq 0x4480
movq %rax, %rdi
movq %rbp, %rsi
callq 0x63f0d
movq %rax, %rdi
leaq 0xc53c0(%rip), %rsi     # 0x10139b
callq 0x4480
movq %rax, %rdi
movq %r13, %rsi
callq 0x63f0d
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4480
movq %rax, %rdi
leaq 0xc657e(%rip), %rsi     # 0x10257e
callq 0x4480
incl %r12d
jmp 0x3bf31
leaq 0xc555a(%rip), %rsi     # 0x10156e
movq %r15, %rdi
callq 0x4480
leaq 0xc655b(%rip), %rsi     # 0x10257e
movq %rax, %rdi
callq 0x4480
xorl %r12d, %r12d
leaq 0x50(%rsp), %r13
leaq 0x20(%rsp), %rbp
movl %r12d, %r12d
movq (%r14), %rcx
movq 0x8(%r14), %rax
subq %rcx, %rax
cqto
pushq $0x30
popq %rsi
idivq %rsi
cmpq %r12, %rax
jbe 0x3c136
imulq $0x30, %r12, %rbx
leaq (%rcx,%rbx), %rdi
addq $0x18, %rdi
callq 0x63d48
movsd 0xc51a1(%rip), %xmm1    # 0x101210
ucomisd %xmm0, %xmm1
jbe 0x3c12e
movq (%r14), %rax
leaq (%rax,%rbx), %rdi
addq $0x18, %rdi
callq 0x63d48
ucomisd 0xc5187(%rip), %xmm0    # 0x101218
jb 0x3c12e
movq %r14, %rdi
movq %r12, %rsi
callq 0x3cdc8
movups (%rax), %xmm0
movupd 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movaps %xmm0, 0x20(%rsp)
movapd %xmm1, 0x30(%rsp)
movaps %xmm2, 0x40(%rsp)
movq 0x28(%rax), %rcx
movq %rcx, 0x10(%rsp)
movupd 0x18(%rax), %xmm0
movupd %xmm0, (%rsp)
movq %r13, %rdi
movq %rbp, %rsi
callq 0x63e70
movq %r15, %rdi
leaq 0xc444a(%rip), %rsi     # 0x100530
callq 0x4480
movq %rax, %rdi
movq %rbp, %rsi
callq 0x63f0d
movq %rax, %rdi
leaq 0xc529b(%rip), %rsi     # 0x10139b
callq 0x4480
movq %rax, %rdi
movq %r13, %rsi
callq 0x63f0d
movq %rax, %rdi
leaq 0xc44e5(%rip), %rsi     # 0x1005ff
callq 0x4480
movq %rax, %rdi
leaq 0xc6455(%rip), %rsi     # 0x10257e
callq 0x4480
incl %r12d
jmp 0x3c038
leaq 0xc543e(%rip), %rsi     # 0x10157b
movq %r15, %rdi
callq 0x4480
leaq 0xc6432(%rip), %rsi     # 0x10257e
movq %rax, %rdi
callq 0x4480
xorl %r12d, %r12d
leaq 0x50(%rsp), %r13
leaq 0x20(%rsp), %rbp
movl %r12d, %r12d
movq (%r14), %rcx
movq 0x8(%r14), %rax
subq %rcx, %rax
cqto
pushq $0x30
popq %rsi
idivq %rsi
cmpq %r12, %rax
jbe 0x3c25f
imulq $0x30, %r12, %rbx
leaq (%rcx,%rbx), %rdi
addq $0x18, %rdi
callq 0x63d48
ucomisd 0xc5078(%rip), %xmm0    # 0x101210
jb 0x3c257
movq (%r14), %rax
leaq (%rax,%rbx), %rdi
addq $0x18, %rdi
callq 0x63d48
movsd 0xbfe5a(%rip), %xmm1    # 0xfc010
ucomisd %xmm0, %xmm1
jbe 0x3c257
movq %r14, %rdi
movq %r12, %rsi
callq 0x3cdc8
movups (%rax), %xmm0
movupd 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movaps %xmm0, 0x20(%rsp)
movapd %xmm1, 0x30(%rsp)
movaps %xmm2, 0x40(%rsp)
movq 0x28(%rax), %rcx
movq %rcx, 0x10(%rsp)
movupd 0x18(%rax), %xmm0
movupd %xmm0, (%rsp)
movq %r13, %rdi
movq %rbp, %rsi
callq 0x63e70
movq %r15, %rdi
leaq 0xc4321(%rip), %rsi     # 0x100530
callq 0x4480
movq %rax, %rdi
movq %rbp, %rsi
callq 0x63f0d
movq %rax, %rdi
leaq 0xc5172(%rip), %rsi     # 0x10139b
callq 0x4480
movq %rax, %rdi
movq %r13, %rsi
callq 0x63f0d
movq %rax, %rdi
leaq 0xc43bc(%rip), %rsi     # 0x1005ff
callq 0x4480
movq %rax, %rdi
leaq 0xc632c(%rip), %rsi     # 0x10257e
callq 0x4480
incl %r12d
jmp 0x3c161
leaq 0xc5322(%rip), %rsi     # 0x101588
movq %r15, %rdi
callq 0x4480
leaq 0xc6309(%rip), %rsi     # 0x10257e
movq %rax, %rdi
callq 0x4480
xorl %r12d, %r12d
leaq 0x50(%rsp), %r13
leaq 0x20(%rsp), %rbp
movl %r12d, %r12d
movq (%r14), %rcx
movq 0x8(%r14), %rax
subq %rcx, %rax
cqto
pushq $0x30
popq %rsi
idivq %rsi
cmpq %r12, %rax
jbe 0x3c388
imulq $0x30, %r12, %rbx
leaq (%rcx,%rbx), %rdi
addq $0x18, %rdi
callq 0x63d48
ucomisd 0xbfd4f(%rip), %xmm0    # 0xfc010
jb 0x3c380
movq (%r14), %rax
leaq (%rax,%rbx), %rdi
addq $0x18, %rdi
callq 0x63d48
movsd 0xc4f29(%rip), %xmm1    # 0x101208
ucomisd %xmm0, %xmm1
jbe 0x3c380
movq %r14, %rdi
movq %r12, %rsi
callq 0x3cdc8
movups (%rax), %xmm0
movupd 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movaps %xmm0, 0x20(%rsp)
movapd %xmm1, 0x30(%rsp)
movaps %xmm2, 0x40(%rsp)
movq 0x28(%rax), %rcx
movq %rcx, 0x10(%rsp)
movupd 0x18(%rax), %xmm0
movupd %xmm0, (%rsp)
movq %r13, %rdi
movq %rbp, %rsi
callq 0x63e70
movq %r15, %rdi
leaq 0xc41f8(%rip), %rsi     # 0x100530
callq 0x4480
movq %rax, %rdi
movq %rbp, %rsi
callq 0x63f0d
movq %rax, %rdi
leaq 0xc5049(%rip), %rsi     # 0x10139b
callq 0x4480
movq %rax, %rdi
movq %r13, %rsi
callq 0x63f0d
movq %rax, %rdi
leaq 0xc4293(%rip), %rsi     # 0x1005ff
callq 0x4480
movq %rax, %rdi
leaq 0xc6203(%rip), %rsi     # 0x10257e
callq 0x4480
incl %r12d
jmp 0x3c28a
leaq 0xc5206(%rip), %rsi     # 0x101595
movq %r15, %rdi
callq 0x4480
leaq 0xc61e0(%rip), %rsi     # 0x10257e
movq %rax, %rdi
callq 0x4480
xorl %r12d, %r12d
leaq 0x50(%rsp), %r13
leaq 0x20(%rsp), %rbp
movl %r12d, %r12d
movq (%r14), %rcx
movq 0x8(%r14), %rax
subq %rcx, %rax
cqto
pushq $0x30
popq %rsi
idivq %rsi
cmpq %r12, %rax
jbe 0x3c4b1
imulq $0x30, %r12, %rbx
leaq (%rcx,%rbx), %rdi
addq $0x18, %rdi
callq 0x63d48
ucomisd 0xc4e1e(%rip), %xmm0    # 0x101208
jb 0x3c4a9
movq (%r14), %rax
leaq (%rax,%rbx), %rdi
addq $0x18, %rdi
callq 0x63d48
movsd 0xc4df8(%rip), %xmm1    # 0x101200
ucomisd %xmm0, %xmm1
jbe 0x3c4a9
movq %r14, %rdi
movq %r12, %rsi
callq 0x3cdc8
movups (%rax), %xmm0
movupd 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movaps %xmm0, 0x20(%rsp)
movapd %xmm1, 0x30(%rsp)
movaps %xmm2, 0x40(%rsp)
movq 0x28(%rax), %rcx
movq %rcx, 0x10(%rsp)
movupd 0x18(%rax), %xmm0
movupd %xmm0, (%rsp)
movq %r13, %rdi
movq %rbp, %rsi
callq 0x63e70
movq %r15, %rdi
leaq 0xc40cf(%rip), %rsi     # 0x100530
callq 0x4480
movq %rax, %rdi
movq %rbp, %rsi
callq 0x63f0d
movq %rax, %rdi
leaq 0xc4f20(%rip), %rsi     # 0x10139b
callq 0x4480
movq %rax, %rdi
movq %r13, %rsi
callq 0x63f0d
movq %rax, %rdi
leaq 0xc416a(%rip), %rsi     # 0x1005ff
callq 0x4480
movq %rax, %rdi
leaq 0xc60da(%rip), %rsi     # 0x10257e
callq 0x4480
incl %r12d
jmp 0x3c3b3
leaq 0xc414a(%rip), %rsi     # 0x100602
movq %r15, %rdi
callq 0x4480
leaq 0xc60b7(%rip), %rsi     # 0x10257e
movq %rax, %rdi
callq 0x4480
xorl %r12d, %r12d
leaq 0x50(%rsp), %r13
leaq 0x20(%rsp), %rbp
leaq 0xc411c(%rip), %rbx     # 0x1005ff
movl %r12d, %r12d
movq (%r14), %rcx
movq 0x8(%r14), %rax
subq %rcx, %rax
cqto
pushq $0x30
popq %rsi
idivq %rsi
cmpq %r12, %rax
jbe 0x3c78a
imulq $0x30, %r12, %rax
leaq (%rcx,%rax), %rdi
addq $0x18, %rdi
callq 0x63d48
ucomisd 0xc4ce6(%rip), %xmm0    # 0x101200
jb 0x3c5b3
movq %r14, %rdi
movq %r12, %rsi
callq 0x3cdc8
movups (%rax), %xmm0
movupd 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movaps %xmm0, 0x20(%rsp)
movapd %xmm1, 0x30(%rsp)
movaps %xmm2, 0x40(%rsp)
movq 0x28(%rax), %rcx
movq %rcx, 0x10(%rsp)
movupd 0x18(%rax), %xmm0
movupd %xmm0, (%rsp)
movq %r13, %rdi
movq %rbp, %rsi
callq 0x63e70
movq %r15, %rdi
leaq 0xc3fc1(%rip), %rsi     # 0x100530
callq 0x4480
movq %rax, %rdi
movq %rbp, %rsi
callq 0x63f0d
movq %rax, %rdi
leaq 0xc4e12(%rip), %rsi     # 0x10139b
callq 0x4480
movq %rax, %rdi
movq %r13, %rsi
callq 0x63f0d
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4480
movq %rax, %rdi
leaq 0xc5fd0(%rip), %rsi     # 0x10257e
callq 0x4480
incl %r12d
jmp 0x3c4e3
movq %rdx, %r15
leaq 0xc4fa9(%rip), %rsi     # 0x10156e
movq %rdi, %rbx
callq 0x4480
leaq 0xc5faa(%rip), %rsi     # 0x10257e
movq %rax, %rdi
callq 0x4480
xorl %eax, %eax
leaq 0x50(%rsp), %r13
leaq 0x20(%rsp), %rbp
movl %eax, %r12d
movq 0x8(%r14), %rax
subq (%r14), %rax
cqto
pushq $0x30
popq %rcx
idivq %rcx
cmpq %r12, %rax
jbe 0x3c6a4
movq %r14, %rdi
movq %r12, %rsi
callq 0x3cdc8
movups (%rax), %xmm0
movupd 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movaps %xmm0, 0x20(%rsp)
movapd %xmm1, 0x30(%rsp)
movaps %xmm2, 0x40(%rsp)
movq 0x28(%rax), %rcx
movq %rcx, 0x10(%rsp)
movupd 0x18(%rax), %xmm0
movupd %xmm0, (%rsp)
movq %r13, %rdi
movq %rbp, %rsi
callq 0x63e70
movq %rbx, %rdi
leaq 0xc3ede(%rip), %rsi     # 0x100530
callq 0x4480
movq %rax, %rdi
movq %rbp, %rsi
callq 0x63f0d
movq %rax, %rdi
leaq 0xc4d2f(%rip), %rsi     # 0x10139b
callq 0x4480
movq %rax, %rdi
movq %r13, %rsi
callq 0x63f0d
movq %rax, %rdi
leaq 0xc3f79(%rip), %rsi     # 0x1005ff
callq 0x4480
movq %rax, %rdi
leaq 0xc5ee9(%rip), %rsi     # 0x10257e
callq 0x4480
leal 0x1(%r12), %eax
jmp 0x3c5e8
leaq 0xc3f57(%rip), %rsi     # 0x100602
movq %rbx, %rdi
callq 0x4480
leaq 0xc5ec4(%rip), %rsi     # 0x10257e
movq %rax, %rdi
callq 0x4480
xorl %eax, %eax
leaq 0x50(%rsp), %r12
leaq 0x20(%rsp), %r13
leaq 0xc3f2a(%rip), %r14     # 0x1005ff
movl %eax, %ebp
movq 0x8(%r15), %rax
subq (%r15), %rax
cqto
pushq $0x30
popq %rcx
idivq %rcx
cmpq %rbp, %rax
jbe 0x3c78a
movq %r15, %rdi
movq %rbp, %rsi
callq 0x3cdc8
movups (%rax), %xmm0
movupd 0x10(%rax), %xmm1
movups 0x20(%rax), %xmm2
movaps %xmm0, 0x20(%rsp)
movapd %xmm1, 0x30(%rsp)
movaps %xmm2, 0x40(%rsp)
movq 0x28(%rax), %rcx
movq %rcx, 0x10(%rsp)
movupd 0x18(%rax), %xmm0
movupd %xmm0, (%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x63e70
movq %rbx, %rdi
leaq 0xc3df2(%rip), %rsi     # 0x100530
callq 0x4480
movq %rax, %rdi
movq %r13, %rsi
callq 0x63f0d
movq %rax, %rdi
leaq 0xc4c43(%rip), %rsi     # 0x10139b
callq 0x4480
movq %rax, %rdi
movq %r12, %rsi
callq 0x63f0d
movq %rax, %rdi
movq %r14, %rsi
callq 0x4480
movq %rax, %rdi
leaq 0xc5e01(%rip), %rsi     # 0x10257e
callq 0x4480
leal 0x1(%rbp), %eax
jmp 0x3c6d5
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq