// File: /workspace/github_cpp_makefile_star2_O2/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 $0x78, %rsp
movq %rdi, %rbx
addq $0x10, %rbx
pushq $-0xb
popq %rcx
leaq 0x5925(%rip), %rax      # 0x7cf0
addq $0x10, %rax
movq %rax, 0x20(%rsp)
leaq 0x5895(%rip), %r15      # 0x7c70
addq $0x10, %r15
movl $0x3e4ccccd, %r14d      # imm = 0x3E4CCCCD
leaq 0x5954(%rip), %rax      # 0x7d40
addq $0x10, %rax
movq %rax, 0x30(%rsp)
leaq 0x5984(%rip), %rax      # 0x7d80
addq $0x10, %rax
movq %rax, 0x38(%rsp)
cmpl $0xb, %ecx
je 0x264a
movl %ecx, 0x28(%rsp)
cvtsi2ss %ecx, %xmm0
movss %xmm0, 0x2c(%rsp)
pushq $-0xb
popq %r12
cmpl $0xb, %r12d
je 0x263f
callq 0x28e2
movaps %xmm0, %xmm1
movss 0x2bca(%rip), %xmm0     # 0x5004
mulss %xmm0, %xmm1
addss 0x2c(%rsp), %xmm1
movss %xmm1, 0x1c(%rsp)
cvtsi2ss %r12d, %xmm0
movss %xmm0, 0xc(%rsp)
callq 0x28e2
mulss 0x2ba2(%rip), %xmm0     # 0x5004
addss 0xc(%rsp), %xmm0
movss %xmm0, 0xc(%rsp)
callq 0x28e2
movss 0x2b8d(%rip), %xmm1     # 0x5008
ucomiss %xmm0, %xmm1
jbe 0x2519
pushq $0x20
popq %rdi
callq 0x2140
movq %rax, %rbp
pushq $0x18
popq %rdi
callq 0x2140
movq %rax, %r13
callq 0x28e2
movss %xmm0, 0x50(%rsp)
callq 0x28e2
movss %xmm0, 0x40(%rsp)
callq 0x28e2
movq 0x20(%rsp), %rax
movq %rax, (%r13)
movss 0x50(%rsp), %xmm1
movss %xmm1, 0x8(%r13)
movss 0x40(%rsp), %xmm1
movss %xmm1, 0xc(%r13)
movss %xmm0, 0x10(%r13)
movq %r13, 0x8(%rbp)
movq %r15, (%rbp)
movss 0x1c(%rsp), %xmm0
movss %xmm0, 0x10(%rbp)
movl %r14d, 0x14(%rbp)
movss 0xc(%rsp), %xmm0
movss %xmm0, 0x18(%rbp)
movl %r14d, 0x1c(%rbp)
movq %rbp, 0x10(%rsp)
movq %rbx, %rdi
leaq 0x10(%rsp), %rsi
callq 0x2c3e
jmp 0x2637
movss 0x2aeb(%rip), %xmm1     # 0x500c
ucomiss %xmm0, %xmm1
jbe 0x25db
callq 0x28e2
movaps %xmm0, 0x50(%rsp)
callq 0x28e2
movaps %xmm0, 0x40(%rsp)
callq 0x28e2
movaps %xmm0, 0x60(%rsp)
pushq $0x20
popq %rdi
callq 0x2140
movq %rax, %rbp
pushq $0x18
popq %rdi
callq 0x2140
movq %rax, %r13
callq 0x28e2
movaps 0x50(%rsp), %xmm1
addss 0x2aa0(%rip), %xmm1     # 0x5010
movaps 0x40(%rsp), %xmm2
unpcklps 0x60(%rsp), %xmm2       # xmm2 = xmm2[0],mem[0],xmm2[1],mem[1]
addps 0x2aaf(%rip), %xmm2     # 0x5030
movq 0x30(%rsp), %rax
movq %rax, (%r13)
movlhps %xmm2, %xmm1            # xmm1 = xmm1[0],xmm2[0]
shufps $0xd4, %xmm2, %xmm0     # xmm0 = xmm0[0,1],xmm2[1,3]
shufps $0x28, %xmm0, %xmm1     # xmm1 = xmm1[0,2],xmm0[2,0]
mulps 0x2aa4(%rip), %xmm1     # 0x5040
movups %xmm1, 0x8(%r13)
movq %r13, 0x8(%rbp)
movq %r15, (%rbp)
movss 0x1c(%rsp), %xmm0
movss %xmm0, 0x10(%rbp)
movl %r14d, 0x14(%rbp)
movss 0xc(%rsp), %xmm0
movss %xmm0, 0x18(%rbp)
movl %r14d, 0x1c(%rbp)
movq %rbp, 0x10(%rsp)
movq %rbx, %rdi
leaq 0x10(%rsp), %rsi
callq 0x2c3e
jmp 0x2637
pushq $0x20
popq %rdi
callq 0x2140
movq %rax, %r13
pushq $0x10
popq %rdi
callq 0x2140
movq 0x38(%rsp), %rcx
movq %rcx, (%rax)
movl $0x3fc00000, 0x8(%rax)  # imm = 0x3FC00000
movq %rax, 0x8(%r13)
movq %r15, (%r13)
movss 0x1c(%rsp), %xmm0
movss %xmm0, 0x10(%r13)
movl %r14d, 0x14(%r13)
movss 0xc(%rsp), %xmm0
movss %xmm0, 0x18(%r13)
movl %r14d, 0x1c(%r13)
movq %r13, 0x10(%rsp)
movq %rbx, %rdi
leaq 0x10(%rsp), %rsi
callq 0x2c3e
incl %r12d
jmp 0x2420
movl 0x28(%rsp), %ecx
incl %ecx
jmp 0x2405
pushq $0x20
popq %rdi
callq 0x2140
movq %rax, %r14
pushq $0x10
popq %rdi
callq 0x2140
movq 0x38(%rsp), %rcx
movq %rcx, (%rax)
movl $0x3fc00000, 0x8(%rax)  # imm = 0x3FC00000
movq %rax, 0x8(%r14)
movq %r15, (%r14)
movaps 0x29d6(%rip), %xmm0     # 0x5050
movups %xmm0, 0x10(%r14)
leaq 0x10(%rsp), %rsi
movq %r14, (%rsi)
movq %rbx, %rdi
callq 0x2c3e
pushq $0x20
popq %rdi
callq 0x2140
movq %rax, %r14
pushq $0x18
popq %rdi
callq 0x2140
movq 0x20(%rsp), %rcx
movq %rcx, (%rax)
movsd 0x29ae(%rip), %xmm0     # 0x5060
movsd %xmm0, 0x8(%rax)
movl $0x3dcccccd, 0x10(%rax) # imm = 0x3DCCCCCD
movq %rax, 0x8(%r14)
movq %r15, (%r14)
movaps 0x29a4(%rip), %xmm0     # 0x5070
movups %xmm0, 0x10(%r14)
leaq 0x10(%rsp), %rsi
movq %r14, (%rsi)
movq %rbx, %rdi
callq 0x2c3e
pushq $0x20
popq %rdi
callq 0x2140
movq %rax, %r14
pushq $0x18
popq %rdi
callq 0x2140
movq 0x30(%rsp), %rcx
movq %rcx, (%rax)
movaps 0x297d(%rip), %xmm0     # 0x5080
movups %xmm0, 0x8(%rax)
movq %rax, 0x8(%r14)
movq %r15, (%r14)
movaps 0x297b(%rip), %xmm0     # 0x5090
movups %xmm0, 0x10(%r14)
leaq 0x10(%rsp), %rsi
movq %r14, (%rsi)
movq %rbx, %rdi
callq 0x2c3e
pushq $0x20
popq %rdi
callq 0x2140
movq %rax, %r14
pushq $0x18
popq %rdi
callq 0x2140
movq 0x20(%rsp), %rcx
movq %rcx, (%rax)
movsd 0x2953(%rip), %xmm0     # 0x50a0
movsd %xmm0, 0x8(%rax)
movl $0x3f000000, 0x10(%rax) # imm = 0x3F000000
movq %rax, 0x8(%r14)
movq %r15, (%r14)
movaps 0x2949(%rip), %xmm0     # 0x50b0
movups %xmm0, 0x10(%r14)
leaq 0x10(%rsp), %rsi
movq %r14, (%rsi)
movq %rbx, %rdi
callq 0x2c3e
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x27ba
jmp 0x2799
jmp 0x27ba
jmp 0x2799
jmp 0x27ba
jmp 0x2799
jmp 0x27ba
movq %rax, %rbx
pushq $0x20
popq %rsi
movq %r14, %rdi
jmp 0x27d3
jmp 0x27b5
movq %rax, %rbx
pushq $0x20
popq %rsi
movq %r13, %rdi
jmp 0x27d3
jmp 0x27ba
jmp 0x27bf
movq %rax, %rbx
jmp 0x27cd
movq %rax, %rbx
jmp 0x27d8
movq %rax, %rbx
pushq $0x18
popq %rsi
movq %r13, %rdi
callq 0x2150
pushq $0x20
popq %rsi
movq %rbp, %rdi
callq 0x2150
movq %rbx, %rdi
callq 0x2230