// File: /workspace/github_cpp_makefile_star2_O3/GUI-Graphics[P]cpuraytracing/main.cpp
// Function: initScene(gui::Scene&)
void initScene(Scene& scene) {
	auto& shapes = scene.shapes;
	for(int i = -11; i < 11; ++i) {
		for(int j = -11; j < 11; ++j) {
			Vector3 c(i + 0.9f * Math::random(), 0.2f, j + 0.9f * Math::random());
			float p = Math::random();
			if(p < 0.8f) {
				shapes.push_back(new Sphere(c, 0.2f, new Diffuse(Vector3(Math::random(), Math::random(), Math::random()))));
			} else if(p < 0.95f) {
				float r = 0.5f * (1 + Math::random());
				float g = 0.5f * (1 + Math::random());
				float b = 0.5f * (1 + Math::random());
				shapes.push_back(new Sphere(c, 0.2f, new Metal(Vector3(r, g, b), 0.5f * Math::random())));
			} else {
				shapes.push_back(new Sphere(c, 0.2f, new Dielectric(1.5f)));
			}
		}
	}
	shapes.push_back(new Sphere(Vector3(0, 1, 0), 1, new Dielectric(1.5f)));
	shapes.push_back(new Sphere(Vector3(-4, 1, 0), 1, new Diffuse(Vector3(0.4f, 0.2f, 0.1f))));
	shapes.push_back(new Sphere(Vector3(4, 1, 0), 1, new Metal(Vector3(0.7f, 0.6f, 0.5f))));
	shapes.push_back(new Sphere(Vector3(0, -1000, 0), 1000, new Diffuse(Vector3(0.5f))));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
addq $0x10, %rdi
movq %rdi, 0x18(%rsp)
movl $0xfffffff5, %ecx       # imm = 0xFFFFFFF5
leaq 0x70b6(%rip), %r14      # 0x94d8
leaq 0x8437(%rip), %r15      # 0xa860
leaq 0x58b8(%rip), %rax      # 0x7ce8
addq $0x10, %rax
movq %rax, 0x28(%rsp)
leaq 0x5828(%rip), %rax      # 0x7c68
addq $0x10, %rax
movq %rax, 0x10(%rsp)
movl $0x3e4ccccd, %ebx       # imm = 0x3E4CCCCD
leaq 0x58e3(%rip), %rax      # 0x7d38
addq $0x10, %rax
movq %rax, 0x40(%rsp)
leaq 0x5913(%rip), %rax      # 0x7d78
addq $0x10, %rax
movq %rax, 0x48(%rsp)
movl %ecx, 0x34(%rsp)
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
movss %xmm0, 0x3c(%rsp)
movl $0xfffffff5, %ebp       # imm = 0xFFFFFFF5
movq %r14, %rdi
callq 0x2b9c
movss (%r15), %xmm1
movss 0x4(%r15), %xmm2
subss %xmm1, %xmm2
mulss %xmm0, %xmm2
addss %xmm1, %xmm2
movss 0x2b59(%rip), %xmm0     # 0x5004
mulss %xmm0, %xmm2
addss 0x3c(%rsp), %xmm2
movss %xmm2, 0x24(%rsp)
xorps %xmm0, %xmm0
cvtsi2ss %ebp, %xmm0
movss %xmm0, 0x4(%rsp)
movq %r14, %rdi
callq 0x2b9c
movss (%r15), %xmm1
movss 0x4(%r15), %xmm2
subss %xmm1, %xmm2
mulss %xmm0, %xmm2
addss %xmm1, %xmm2
mulss 0x2b15(%rip), %xmm2     # 0x5004
addss 0x4(%rsp), %xmm2
movss %xmm2, 0x4(%rsp)
movq %r14, %rdi
callq 0x2b9c
movss (%r15), %xmm2
movss 0x4(%r15), %xmm1
subss %xmm2, %xmm1
mulss %xmm0, %xmm1
addss %xmm2, %xmm1
movss 0x2ae6(%rip), %xmm0     # 0x5008
ucomiss %xmm1, %xmm0
jbe 0x264f
movl $0x20, %edi
callq 0x2140
movq %rax, %r12
movl $0x18, %edi
callq 0x2140
movq %rax, %r13
movq %r14, %rdi
callq 0x2b9c
movss %xmm0, 0xa0(%rsp)
movss (%r15), %xmm0
movss %xmm0, 0x80(%rsp)
movss 0x4(%r15), %xmm0
movss %xmm0, 0x70(%rsp)
movq %r14, %rdi
callq 0x2b9c
movaps %xmm0, 0x90(%rsp)
movss (%r15), %xmm0
movaps %xmm0, 0x60(%rsp)
movss 0x4(%r15), %xmm0
movaps %xmm0, 0x50(%rsp)
movq %r14, %rdi
callq 0x2b9c
movss 0x80(%rsp), %xmm1
movss 0x70(%rsp), %xmm3
subss %xmm1, %xmm3
movss 0xa0(%rsp), %xmm2
mulss %xmm3, %xmm2
addss %xmm1, %xmm2
movss (%r15), %xmm1
movaps 0x60(%rsp), %xmm3
unpcklps %xmm1, %xmm3            # xmm3 = xmm3[0],xmm1[0],xmm3[1],xmm1[1]
movss 0x4(%r15), %xmm1
movaps 0x50(%rsp), %xmm4
unpcklps %xmm1, %xmm4            # xmm4 = xmm4[0],xmm1[0],xmm4[1],xmm1[1]
movq 0x28(%rsp), %rax
movq %rax, (%r13)
movss %xmm2, 0x8(%r13)
subps %xmm3, %xmm4
movaps 0x90(%rsp), %xmm1
unpcklps %xmm0, %xmm1            # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
mulps %xmm4, %xmm1
addps %xmm3, %xmm1
movlps %xmm1, 0xc(%r13)
movq %r13, 0x8(%r12)
movq 0x10(%rsp), %rax
movq %rax, (%r12)
movss 0x24(%rsp), %xmm0
movss %xmm0, 0x10(%r12)
movl %ebx, 0x14(%r12)
movss 0x4(%rsp), %xmm0
movss %xmm0, 0x18(%r12)
movl %ebx, 0x1c(%r12)
movq %r12, 0x8(%rsp)
movq 0x18(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x2e3c
jmp 0x2846
movss 0x29b5(%rip), %xmm0     # 0x500c
ucomiss %xmm1, %xmm0
jbe 0x27da
movq %r14, %rdi
callq 0x2b9c
movaps %xmm0, 0xa0(%rsp)
movss (%r15), %xmm0
movss %xmm0, 0x60(%rsp)
movss 0x4(%r15), %xmm0
movss %xmm0, 0x38(%rsp)
movq %r14, %rdi
callq 0x2b9c
movaps %xmm0, 0x90(%rsp)
movss (%r15), %xmm0
movaps %xmm0, 0x80(%rsp)
movss 0x4(%r15), %xmm0
movaps %xmm0, 0x70(%rsp)
movq %r14, %rdi
callq 0x2b9c
movaps %xmm0, 0x50(%rsp)
movss (%r15), %xmm0
movaps %xmm0, 0xc0(%rsp)
movss 0x4(%r15), %xmm0
movaps %xmm0, 0xb0(%rsp)
movl $0x20, %edi
callq 0x2140
movq %rax, %r12
movl $0x18, %edi
callq 0x2140
movq %rax, %r13
movq %r14, %rdi
callq 0x2b9c
movss 0x60(%rsp), %xmm1
movss 0x38(%rsp), %xmm2
subss %xmm1, %xmm2
movaps 0xa0(%rsp), %xmm3
mulss %xmm2, %xmm3
addss %xmm1, %xmm3
addss 0x28ef(%rip), %xmm3     # 0x5010
movaps 0x70(%rsp), %xmm2
unpcklps 0xb0(%rsp), %xmm2       # xmm2 = xmm2[0],mem[0],xmm2[1],mem[1]
movaps 0x80(%rsp), %xmm1
unpcklps 0xc0(%rsp), %xmm1       # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subps %xmm1, %xmm2
movaps 0x90(%rsp), %xmm4
unpcklps 0x50(%rsp), %xmm4       # xmm4 = xmm4[0],mem[0],xmm4[1],mem[1]
mulps %xmm2, %xmm4
addps %xmm1, %xmm4
addps 0x28d5(%rip), %xmm4     # 0x5030
movss (%r15), %xmm1
movss 0x4(%r15), %xmm2
subss %xmm1, %xmm2
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movq 0x40(%rsp), %rax
movq %rax, (%r13)
movlhps %xmm4, %xmm3            # xmm3 = xmm3[0],xmm4[0]
shufps $0xd4, %xmm4, %xmm0     # xmm0 = xmm0[0,1],xmm4[1,3]
shufps $0x28, %xmm0, %xmm3     # xmm3 = xmm3[0,2],xmm0[2,0]
mulps 0x28b3(%rip), %xmm3     # 0x5040
movups %xmm3, 0x8(%r13)
movq %r13, 0x8(%r12)
movq 0x10(%rsp), %rax
movq %rax, (%r12)
movss 0x24(%rsp), %xmm0
movss %xmm0, 0x10(%r12)
movl %ebx, 0x14(%r12)
movss 0x4(%rsp), %xmm0
movss %xmm0, 0x18(%r12)
movl %ebx, 0x1c(%r12)
movq %r12, 0x8(%rsp)
movq 0x18(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x2e3c
jmp 0x2846
movl $0x20, %edi
callq 0x2140
movq %rax, %r12
movl $0x10, %edi
callq 0x2140
movq 0x48(%rsp), %rcx
movq %rcx, (%rax)
movl $0x3fc00000, 0x8(%rax)  # imm = 0x3FC00000
movq %rax, 0x8(%r12)
movq 0x10(%rsp), %rax
movq %rax, (%r12)
movss 0x24(%rsp), %xmm0
movss %xmm0, 0x10(%r12)
movl %ebx, 0x14(%r12)
movss 0x4(%rsp), %xmm0
movss %xmm0, 0x18(%r12)
movl %ebx, 0x1c(%r12)
movq %r12, 0x8(%rsp)
movq 0x18(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x2e3c
incl %ebp
cmpl $0xb, %ebp
jne 0x2484
movl 0x34(%rsp), %ecx
incl %ecx
cmpl $0xb, %ecx
jne 0x246e
movl $0x20, %edi
callq 0x2140
movq %rax, %r14
movl $0x10, %edi
callq 0x2140
movq 0x48(%rsp), %rcx
movq %rcx, (%rax)
movl $0x3fc00000, 0x8(%rax)  # imm = 0x3FC00000
movq %rax, 0x8(%r14)
movq 0x10(%rsp), %rax
movq %rax, (%r14)
movaps 0x27b7(%rip), %xmm0     # 0x5050
movups %xmm0, 0x10(%r14)
leaq 0x8(%rsp), %rsi
movq %r14, (%rsi)
movq 0x18(%rsp), %rdi
callq 0x2e3c
movl $0x20, %edi
callq 0x2140
movq %rax, %r14
movl $0x18, %edi
callq 0x2140
movq 0x28(%rsp), %rcx
movq %rcx, (%rax)
movsd 0x2789(%rip), %xmm0     # 0x5060
movsd %xmm0, 0x8(%rax)
movl $0x3dcccccd, 0x10(%rax) # imm = 0x3DCCCCCD
movq %rax, 0x8(%r14)
movq 0x10(%rsp), %rax
movq %rax, (%r14)
movaps 0x277a(%rip), %xmm0     # 0x5070
movups %xmm0, 0x10(%r14)
leaq 0x8(%rsp), %rsi
movq %r14, (%rsi)
movq 0x18(%rsp), %rdi
callq 0x2e3c
movl $0x20, %edi
callq 0x2140
movq %rax, %r14
movl $0x18, %edi
callq 0x2140
movq 0x40(%rsp), %rcx
movq %rcx, (%rax)
movaps 0x274d(%rip), %xmm0     # 0x5080
movups %xmm0, 0x8(%rax)
movq %rax, 0x8(%r14)
movq 0x10(%rsp), %rax
movq %rax, (%r14)
movaps 0x2746(%rip), %xmm0     # 0x5090
movups %xmm0, 0x10(%r14)
leaq 0x8(%rsp), %rsi
movq %r14, (%rsi)
movq 0x18(%rsp), %rdi
callq 0x2e3c
movl $0x20, %edi
callq 0x2140
movq %rax, %r14
movl $0x18, %edi
callq 0x2140
movq 0x28(%rsp), %rcx
movq %rcx, (%rax)
movsd 0x2718(%rip), %xmm0     # 0x50a0
movsd %xmm0, 0x8(%rax)
movl $0x3f000000, 0x10(%rax) # imm = 0x3F000000
movq %rax, 0x8(%r14)
movq 0x10(%rsp), %rax
movq %rax, (%r14)
movaps 0x2709(%rip), %xmm0     # 0x50b0
movups %xmm0, 0x10(%r14)
leaq 0x8(%rsp), %rsi
movq %r14, (%rsi)
movq 0x18(%rsp), %rdi
callq 0x2e3c
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x29f3
jmp 0x29de
jmp 0x29f3
jmp 0x29de
jmp 0x29f3
jmp 0x29de
jmp 0x29f3
movq %rax, %rbx
movl $0x20, %esi
movq %r14, %rdi
jmp 0x2a15
jmp 0x29f8
jmp 0x29f8
jmp 0x29f3
jmp 0x29fd
movq %rax, %rbx
jmp 0x2a1a
movq %rax, %rbx
jmp 0x2a0d
movq %rax, %rbx
movl $0x18, %esi
movq %r13, %rdi
callq 0x2150
movl $0x20, %esi
movq %r12, %rdi
callq 0x2150
movq %rbx, %rdi
callq 0x2230