// File: /workspace/github_cpp_makefile_star2_O1/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 0x4976(%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 0x3bf4(%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, -0x44(%rbp)
testl %r12d, %r12d
jle 0x57e3
xorl %ebx, %ebx
leaq 0x3b79(%rip), %r13      # 0x91e1
testl %r15d, %r15d
jle 0x57d8
xorl %r14d, %r14d
leaq -0x90(%rbp), %r12
movq %r12, %rdi
movq -0x58(%rbp), %rsi
movl %r14d, %edx
movl %ebx, %ecx
movl %r15d, %r8d
movl -0x44(%rbp), %r9d
callq 0x7ec6
leaq -0x40(%rbp), %rdi
movq -0x50(%rbp), %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x806a
movsd -0x40(%rbp), %xmm2
movsd 0x3976(%rip), %xmm3     # 0x9028
mulsd %xmm3, %xmm2
movsd %xmm2, -0x40(%rbp)
movsd -0x38(%rbp), %xmm1
mulsd %xmm3, %xmm1
movsd %xmm1, -0x38(%rbp)
movsd -0x30(%rbp), %xmm0
mulsd %xmm3, %xmm0
movsd %xmm0, -0x30(%rbp)
xorpd %xmm4, %xmm4
ucomisd %xmm2, %xmm4
xorpd %xmm2, %xmm2
jbe 0x56ed
movq $0x0, -0x40(%rbp)
ucomisd %xmm1, %xmm2
jbe 0x56fb
movq $0x0, -0x38(%rbp)
ucomisd %xmm0, %xmm2
jbe 0x5709
movq $0x0, -0x30(%rbp)
movsd -0x40(%rbp), %xmm0
ucomisd %xmm3, %xmm0
jbe 0x5722
movabsq $0x406fe00000000000, %rax # imm = 0x406FE00000000000
movq %rax, -0x40(%rbp)
movsd -0x38(%rbp), %xmm0
ucomisd %xmm3, %xmm0
jbe 0x573b
movabsq $0x406fe00000000000, %rax # imm = 0x406FE00000000000
movq %rax, -0x38(%rbp)
movsd -0x30(%rbp), %xmm0
ucomisd %xmm3, %xmm0
jbe 0x5754
movabsq $0x406fe00000000000, %rax # imm = 0x406FE00000000000
movq %rax, -0x30(%rbp)
cvttsd2si -0x40(%rbp), %esi
movq -0x60(%rbp), %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
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x31f0
cvttsd2si -0x30(%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 0x5674
incl %ebx
cmpl -0x44(%rbp), %ebx
jne 0x5668
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq