// File: /workspace/github_cpp_makefile_star2_O3/mhe[P]raytracerframework_cpp/raytracer.cpp
// Function: Raytracer::parseObject(YAML::Node const&)
Object* Raytracer::parseObject(const YAML::Node& node)
{
	Object *returnObject = NULL;
	std::string objectType;
	node["type"] >> objectType;
	if (objectType.compare("sphere") == 0) {
		
		Point pos;
		node["position"] >> pos;
		double r;
		node["radius"] >> r;
		Sphere *sphere = new Sphere(pos,r);		
		returnObject = sphere;
	}
	if (returnObject) {
		// read the material and attach to object
		returnObject->material = parseMaterial(node["material"]);
	}
	return returnObject;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movq %rsi, %rbx
leaq -0x58(%rbp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
leaq -0x30(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x17cf9(%rip), %rsi     # 0x304d5
leaq 0x17cf6(%rip), %rdx     # 0x304d9
leaq -0x40(%rbp), %rdi
callq 0x1973e
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x193ea
movq %rax, %r14
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0x18810
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x42d0
leaq -0x68(%rbp), %rsi
movq %r14, %rdi
callq 0x27600
testb %al, %al
je 0x18991
leaq 0x17caf(%rip), %rsi     # 0x304da
leaq -0x68(%rbp), %rdi
callq 0x40c0
testl %eax, %eax
je 0x18840
xorl %r14d, %r14d
jmp 0x1896c
xorps %xmm0, %xmm0
movaps %xmm0, -0x80(%rbp)
movq $0x0, -0x70(%rbp)
leaq -0x40(%rbp), %rdi
movq %r15, (%rdi)
leaq 0x17c84(%rip), %rsi     # 0x304e1
leaq 0x17c85(%rip), %rdx     # 0x304e9
callq 0x1973e
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x193ea
movq %rax, %r14
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0x1888d
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x42d0
leaq -0x80(%rbp), %rsi
movq %r14, %rdi
callq 0x182ac
leaq -0x40(%rbp), %rdi
movq %r15, (%rdi)
leaq 0x17c43(%rip), %rsi     # 0x304ea
leaq 0x17c42(%rip), %rdx     # 0x304f0
callq 0x1973e
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x193ea
movq %rax, %r14
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0x188d7
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x42d0
leaq -0x48(%rbp), %rsi
movq %r14, %rdi
callq 0x27690
testb %al, %al
je 0x189d4
movl $0x30, %edi
callq 0x42c0
movq %rax, %r14
movq -0x70(%rbp), %rax
movq %rax, 0x20(%r14)
movaps -0x80(%rbp), %xmm0
movups %xmm0, 0x10(%r14)
movsd -0x48(%rbp), %xmm0
leaq 0x21e5b(%rip), %rax     # 0x3a770
addq $0x10, %rax
movq %rax, (%r14)
movsd %xmm0, 0x28(%r14)
leaq -0x40(%rbp), %rdi
movq %r15, (%rdi)
leaq 0x17bc1(%rip), %rsi     # 0x304f1
leaq 0x17bc2(%rip), %rdx     # 0x304f9
callq 0x1973e
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x193ea
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0x18960
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x42d0
movq %rbx, %rsi
callq 0x184e6
movq %rax, 0x8(%r14)
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x18981
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x42d0
movq %r14, %rax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x30, %edi
callq 0x4140
movq %rax, %r15
movl (%r14), %esi
movl 0x4(%r14), %edx
leaq 0x2315c(%rip), %rcx     # 0x3bb08
movq %rax, %rdi
callq 0x1960e
leaq 0x21d9d(%rip), %rax     # 0x3a758
movq %rax, (%r15)
leaq 0x21d6b(%rip), %rsi     # 0x3a730
leaq 0xe36(%rip), %rdx       # 0x19802
movq %r15, %rdi
callq 0x4510
movl $0x30, %edi
callq 0x4140
movq %rax, %r15
movl (%r14), %esi
movl 0x4(%r14), %edx
leaq 0x23119(%rip), %rcx     # 0x3bb08
movq %rax, %rdi
callq 0x1960e
leaq 0x21d5a(%rip), %rax     # 0x3a758
movq %rax, (%r15)
leaq 0x21d28(%rip), %rsi     # 0x3a730
leaq 0xdf3(%rip), %rdx       # 0x19802
movq %r15, %rdi
callq 0x4510
jmp 0x18a21
jmp 0x18a32
jmp 0x18a4c
jmp 0x18a32
jmp 0x18a32
movq %rax, %rbx
movq %r15, %rdi
callq 0x4230
jmp 0x18a4f
jmp 0x18a4c
jmp 0x18a4c
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0x18a4f
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x42d0
jmp 0x18a4f
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x18a64
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x42d0
movq %rbx, %rdi
callq 0x4550