// File: /workspace/github_cpp_makefile_star2_O3/hamikm[P]Raytracer/src/scene.hh
// Function: scene<double, double, double, 3>::renderPPM(camera<double, double, 3> const&, int, int, std::ostream&) const
void renderPPM(const camera<vec_T, time_T, dim> &cam,
			int width, int height,
			std::ostream &os) const {
		os << "P3 " << width << " " << height << " "
				<< COLORMAX << std::endl;
		for (int y = 0; y < height; y++) {
			for (int x = 0; x < width; x++) {
				ray<vec_T, time_T, dim> pixelRay = cam.getRayForPixel(
						x, y, width, height);
				rgbcolor<color_T> c = traceRay(pixelRay);
				c *= COLORMAX;
				c.clamp(0, COLORMAX);
				os << (int)c.getR() << " " << (int)c.getG() << " " <<
						(int)c.getB() << std::endl;
			}
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %r8, %rbx
movl %ecx, %r12d
movl %edx, %r15d
movq %rsi, -0x58(%rbp)
movq %rdi, -0x50(%rbp)
leaq 0x4a20(%rip), %rsi      # 0x9f3d
movl $0x3, %edx
movq %r8, %rdi
callq 0x31f0
movq %rbx, -0x60(%rbp)
movq %rbx, %rdi
movl %r15d, %esi
callq 0x3290
movq %rax, %rbx
leaq 0x3c9e(%rip), %r14      # 0x91e1
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x31f0
movq %rbx, %rdi
movl %r12d, %esi
callq 0x3290
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x31f0
movq %rbx, %rdi
movl $0xff, %esi
callq 0x3290
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x31b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3110
movl %r12d, -0x2c(%rbp)
testl %r12d, %r12d
jle 0x5735
xorl %ebx, %ebx
leaq 0x3c23(%rip), %r13      # 0x91e1
testl %r15d, %r15d
jle 0x572a
xorl %r14d, %r14d
leaq -0x90(%rbp), %r12
movq %r12, %rdi
movq -0x58(%rbp), %rsi
movl %r14d, %edx
movl %ebx, %ecx
movl %r15d, %r8d
movl -0x2c(%rbp), %r9d
callq 0x7e12
leaq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x7fb6
movsd -0x48(%rbp), %xmm0
movsd 0x3a20(%rip), %xmm3     # 0x9028
mulsd %xmm3, %xmm0
movsd %xmm0, -0x48(%rbp)
movsd -0x40(%rbp), %xmm2
mulsd %xmm3, %xmm2
movsd %xmm2, -0x40(%rbp)
movsd -0x38(%rbp), %xmm1
mulsd %xmm3, %xmm1
movsd %xmm1, -0x38(%rbp)
xorpd %xmm4, %xmm4
ucomisd %xmm0, %xmm4
jbe 0x5643
movq $0x0, -0x48(%rbp)
xorpd %xmm0, %xmm0
ucomisd %xmm2, %xmm4
jbe 0x5655
movq $0x0, -0x40(%rbp)
xorpd %xmm2, %xmm2
ucomisd %xmm1, %xmm4
jbe 0x5667
movq $0x0, -0x38(%rbp)
xorpd %xmm1, %xmm1
ucomisd %xmm3, %xmm0
jbe 0x567f
movabsq $0x406fe00000000000, %rax # imm = 0x406FE00000000000
movq %rax, -0x48(%rbp)
movapd %xmm3, %xmm0
ucomisd %xmm3, %xmm2
jbe 0x5693
movabsq $0x406fe00000000000, %rax # imm = 0x406FE00000000000
movq %rax, -0x40(%rbp)
ucomisd %xmm3, %xmm1
jbe 0x56a7
movabsq $0x406fe00000000000, %rax # imm = 0x406FE00000000000
movq %rax, -0x38(%rbp)
cvttsd2si %xmm0, %esi
movq -0x60(%rbp), %rdi
callq 0x3290
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x31f0
cvttsd2si -0x40(%rbp), %esi
movq %r12, %rdi
callq 0x3290
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x31f0
cvttsd2si -0x38(%rbp), %esi
movq %r12, %rdi
callq 0x3290
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x31b0
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3110
incl %r14d
cmpl %r14d, %r15d
jne 0x55ca
incl %ebx
cmpl -0x2c(%rbp), %ebx
jne 0x55be
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq