// File: /workspace/github_cpp_makefile_star2_O1/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 0x17cd9(%rip), %rsi     # 0x314d5
leaq 0x17cd6(%rip), %rdx     # 0x314d9
leaq -0x40(%rbp), %rdi
callq 0x1a774
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x1a420
movq %rax, %r14
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0x19830
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x52e0
leaq -0x68(%rbp), %rsi
movq %r14, %rdi
callq 0x28bac
testb %al, %al
je 0x199b6
leaq 0x17c8f(%rip), %rsi     # 0x314da
leaq -0x68(%rbp), %rdi
callq 0x50c0
testl %eax, %eax
je 0x19860
xorl %r14d, %r14d
jmp 0x19942
xorps %xmm0, %xmm0
movaps %xmm0, -0x80(%rbp)
movq $0x0, -0x70(%rbp)
leaq -0x40(%rbp), %rdi
movq %r15, (%rdi)
leaq 0x17c64(%rip), %rsi     # 0x314e1
leaq 0x17c65(%rip), %rdx     # 0x314e9
callq 0x1a774
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x1a420
movq %rax, %r14
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0x198ad
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x52e0
leaq -0x80(%rbp), %rsi
movq %r14, %rdi
callq 0x192cc
leaq -0x40(%rbp), %rdi
movq %r15, (%rdi)
leaq 0x17c23(%rip), %rsi     # 0x314ea
leaq 0x17c22(%rip), %rdx     # 0x314f0
callq 0x1a774
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x1a420
movq %rax, %r14
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0x198f7
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x52e0
leaq -0x48(%rbp), %rsi
movq %r14, %rdi
callq 0x28c3c
testb %al, %al
je 0x199f9
movl $0x30, %edi
callq 0x52d0
movq %rax, %r14
movq -0x70(%rbp), %rax
movq %rax, 0x20(%r14)
movaps -0x80(%rbp), %xmm0
movups %xmm0, 0x10(%r14)
movsd -0x48(%rbp), %xmm0
leaq 0x21e3b(%rip), %rax     # 0x3b770
addq $0x10, %rax
movq %rax, (%r14)
movsd %xmm0, 0x28(%r14)
testq %r14, %r14
je 0x19991
leaq -0x40(%rbp), %rdi
movq %r15, (%rdi)
leaq 0x17b9c(%rip), %rsi     # 0x314f1
leaq 0x17b9d(%rip), %rdx     # 0x314f9
callq 0x1a774
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x1a420
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0x19985
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x52e0
movq %rbx, %rsi
callq 0x19506
movq %rax, 0x8(%r14)
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x199a6
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x52e0
movq %r14, %rax
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl $0x30, %edi
callq 0x5140
movq %rax, %r15
movl (%r14), %esi
movl 0x4(%r14), %edx
leaq 0x23147(%rip), %rcx     # 0x3cb18
movq %rax, %rdi
callq 0x1a648
leaq 0x21d78(%rip), %rax     # 0x3b758
movq %rax, (%r15)
leaq 0x21d46(%rip), %rsi     # 0x3b730
leaq 0xe43(%rip), %rdx       # 0x1a834
movq %r15, %rdi
callq 0x5520
movl $0x30, %edi
callq 0x5140
movq %rax, %r15
movl (%r14), %esi
movl 0x4(%r14), %edx
leaq 0x23104(%rip), %rcx     # 0x3cb18
movq %rax, %rdi
callq 0x1a648
leaq 0x21d35(%rip), %rax     # 0x3b758
movq %rax, (%r15)
leaq 0x21d03(%rip), %rsi     # 0x3b730
leaq 0xe00(%rip), %rdx       # 0x1a834
movq %r15, %rdi
callq 0x5520
jmp 0x19a44
jmp 0x19a71
jmp 0x19a57
jmp 0x19a57
movq %rax, %rbx
movq %r15, %rdi
callq 0x5230
jmp 0x19a74
jmp 0x19a57
jmp 0x19a71
jmp 0x19a71
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0x19a74
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x52e0
jmp 0x19a74
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x19a89
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x52e0
movq %rbx, %rdi
callq 0x5560
nop