// File: hamikm[P]Raytracer/src/arealight.hh
// Function: arealight<double, double, double, 3>::arealight(rgbcolor<double> const&, mvector<double, 3> const&, mvector<double, 3> const&, mvector<double, 3> const&, double, double, double, double)
arealight(const rgbcolor<color_T> &color, const mvector<vec_T, dim> &center,
			const mvector<vec_T, dim> &surfaceNormal,
			const mvector<vec_T, dim> &upDirection,
			vec_T horizontalSpacing, vec_T verticalSpacing,
			vec_T width, vec_T height) :
				light<vec_T, color_T, time_T, dim>(color, center),
				norm(surfaceNormal.norm()),
				horizontalSpacing(horizontalSpacing),
				verticalSpacing(verticalSpacing),
				width(width), height(height) {

		// After the initializer list ends we still need to deal with
		// vhat, uhat, and the lights collection.
		assert(dim > 0);
		assert(horizontalSpacing > 0);
		assert(verticalSpacing > 0);
		assert(horizontalSpacing < width);
		assert(verticalSpacing < height);

		constructorHelper(upDirection);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movsd %xmm0, -0x30(%rbp)
movsd %xmm1, -0x38(%rbp)
movsd %xmm2, -0x40(%rbp)
movsd %xmm3, -0x48(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x60(%rbp)
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x5200
movq -0x60(%rbp), %rdi
leaq 0x13648(%rip), %rax     # 0x18ca8
movq %rax, (%rdi)
addq $0x38, %rdi
movq -0x20(%rbp), %rsi
callq 0x5420
jmp 0x5672
movq -0x60(%rbp), %rdi
movsd -0x30(%rbp), %xmm0
movsd %xmm0, 0x50(%rdi)
movsd -0x38(%rbp), %xmm0
movsd %xmm0, 0x58(%rdi)
movsd -0x40(%rbp), %xmm0
movsd %xmm0, 0x60(%rdi)
movsd -0x48(%rbp), %xmm0
movsd %xmm0, 0x68(%rdi)
addq $0x70, %rdi
callq 0x4aa0
jmp 0x56a9
movq -0x60(%rbp), %rdi
addq $0x88, %rdi
callq 0x4aa0
jmp 0x56bb
movq -0x60(%rbp), %rdi
addq $0xa0, %rdi
movq %rdi, -0x68(%rbp)
callq 0x9630
movsd -0x30(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x56df
jmp 0x570f
leaq 0xb2e4(%rip), %rdi      # 0x109ca
leaq 0xb2f3(%rip), %rsi      # 0x109e0
movl $0xb5, %edx
leaq 0xb2f8(%rip), %rcx      # 0x109f1
callq 0x3140
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x57ca
movsd -0x38(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x571f
jmp 0x573e
leaq 0xb3c6(%rip), %rdi      # 0x10aec
leaq 0xb2b3(%rip), %rsi      # 0x109e0
movl $0xb6, %edx
leaq 0xb2b8(%rip), %rcx      # 0x109f1
callq 0x3140
movsd -0x30(%rbp), %xmm1
movsd -0x40(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x5750
jmp 0x576f
leaq 0xb3a9(%rip), %rdi      # 0x10b00
leaq 0xb282(%rip), %rsi      # 0x109e0
movl $0xb7, %edx
leaq 0xb287(%rip), %rcx      # 0x109f1
callq 0x3140
movsd -0x38(%rbp), %xmm1
movsd -0x48(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x5781
jmp 0x57a0
leaq 0xb392(%rip), %rdi      # 0x10b1a
leaq 0xb251(%rip), %rsi      # 0x109e0
movl $0xb8, %edx
leaq 0xb256(%rip), %rcx      # 0x109f1
callq 0x3140
movq -0x60(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x9650
jmp 0x57af
addq $0x70, %rsp
popq %rbp
retq
movq -0x68(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
callq 0x6cc0
movq -0x60(%rbp), %rdi
callq 0x9050
movq -0x50(%rbp), %rdi
callq 0x3380
nopl (%rax)