// File: /workspace/github_cpp_makefile_star2_O3/Lut99[P]RayTracer/src/lib/materials/Lambertian.cpp
// Function: RayTracer::Lambertian::from_json(nlohmann::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, long, unsigned long, double, std::allocator, nlohmann::adl_serializer>)
Lambertian* Lambertian::from_json(nlohmann::json json_obj) {
    // Check if the object has an object type
    if (!json_obj.is_object()) {
        throw InvalidObjectFormat("Lambertian", json::object().type_name(), json_obj.type_name());
    }

    // Check if there is an albedo field
    if (json_obj["albedo"].is_null()) {
        throw MissingFieldException("Lambertian", "albedo");
    }

    // Parse it with the Vec3 parser
    Vec3 albedo = Vec3::from_json(json_obj["albedo"]);

    return new Lambertian(albedo);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0x7d942
leaq 0xd0d8(%rip), %rsi      # 0x8a96e
movq %r14, %rdi
callq 0x41392
cmpb $0x0, (%rax)
je 0x7d9a6
leaq 0xd0c0(%rip), %rsi      # 0x8a96e
movq %r14, %rdi
callq 0x41392
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4155c
leaq 0x58(%rsp), %rdi
movq %rbx, %rsi
callq 0x725c2
leaq 0x8(%rsp), %rdi
callq 0x4861e
leaq 0x10(%rsp), %rdi
movzbl -0x8(%rdi), %esi
callq 0x486c0
movl $0x30, %edi
callq 0x3a470
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
callq 0x7cf68
leaq 0x25f8f(%rip), %rax     # 0xa3898
movq %rax, (%rbx)
leaq 0x2579d(%rip), %rax     # 0xa30b0
addq $0x10, %rax
movq %rax, 0x10(%rbx)
movups 0x60(%rsp), %xmm0
movups %xmm0, 0x18(%rbx)
movq 0x70(%rsp), %rax
movq %rax, 0x28(%rbx)
movq %rbx, %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x88, %edi
callq 0x3a210
movq %rax, %rbx
leaq 0x48(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xd015(%rip), %rsi      # 0x8a975
leaq 0xd018(%rip), %rdx      # 0x8a97f
leaq 0x38(%rsp), %rdi
callq 0x44390
leaq 0x58(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x73c9e
movzbl 0x58(%rsp), %eax
cmpq $0x8, %rax
ja 0x7da2b
leaq 0x25f43(%rip), %rcx     # 0xa38e0
movq (%rcx,%rax,8), %r15
jmp 0x7da32
movl $0x68, %edi
callq 0x3a210
movq %rax, %rbx
leaq 0x28(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xcfb2(%rip), %rsi      # 0x8a975
leaq 0xcfb5(%rip), %rdx      # 0x8a97f
leaq 0x18(%rsp), %rdi
callq 0x44390
leaq 0x88(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xcf86(%rip), %rsi      # 0x8a96e
leaq 0xcf85(%rip), %rdx      # 0x8a974
leaq 0x78(%rsp), %rdi
callq 0x44390
movb $0x1, %bpl
leaq 0x18(%rsp), %rsi
leaq 0x78(%rsp), %rdx
movq %rbx, %rdi
callq 0x75298
xorl %ebp, %ebp
leaq 0x258b9(%rip), %rsi     # 0xa32d0
leaq -0x85f2(%rip), %rdx     # 0x7542c
movq %rbx, %rdi
callq 0x3a760
jmp 0x7dad8
leaq 0x87c9(%rip), %r15      # 0x861fb
leaq 0xc8(%rsp), %r13
movq %r13, -0x10(%r13)
movq %r15, %rdi
callq 0x3a1f0
leaq (%rax,%r15), %rdx
leaq 0xb8(%rsp), %rdi
movq %r15, %rsi
callq 0x44390
movzbl (%r14), %eax
cmpq $0x8, %rax
ja 0x7da71
leaq 0x25e75(%rip), %rcx     # 0xa38e0
movq (%rcx,%rax,8), %r14
jmp 0x7da78
leaq 0x8783(%rip), %r14      # 0x861fb
leaq 0xa8(%rsp), %r15
movq %r15, -0x10(%r15)
movq %r14, %rdi
callq 0x3a1f0
leaq (%rax,%r14), %rdx
leaq 0x98(%rsp), %rdi
movq %r14, %rsi
callq 0x44390
movb $0x1, %bpl
leaq 0x38(%rsp), %rsi
leaq 0xb8(%rsp), %rdx
leaq 0x98(%rsp), %rcx
movq %rbx, %rdi
callq 0x72fb0
xorl %ebp, %ebp
leaq 0x2566f(%rip), %rsi     # 0xa3138
leaq -0xa84c(%rip), %rdx     # 0x73284
movq %rbx, %rdi
callq 0x3a760
movq %rax, %r14
movq 0x98(%rsp), %rdi
cmpq %r15, %rdi
je 0x7db00
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x3a480
jmp 0x7db00
movq %rax, %r14
movb $0x1, %bpl
movq 0xb8(%rsp), %rdi
cmpq %r13, %rdi
je 0x7db25
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x3a480
jmp 0x7db25
movq %rax, %r14
movb $0x1, %bpl
leaq 0x58(%rsp), %rdi
callq 0x415d4
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x7db74
movq 0x48(%rsp), %rsi
jmp 0x7db6c
movq %rax, %r14
movq 0x78(%rsp), %rdi
cmpq %r12, %rdi
je 0x7db5d
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x3a480
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0x7db74
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x3a480
testb %bpl, %bpl
jne 0x7dbb0
jmp 0x7dbd9
movq %rax, %r14
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0x7dbb0
movq 0x28(%rsp), %rsi
jmp 0x7dba1
movq %rax, %r14
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x7dbb0
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3a480
jmp 0x7dbb0
jmp 0x7dbad
movq %rax, %r14
movq %rbx, %rdi
callq 0x3a340
jmp 0x7dbd9
movq %rax, %r14
movl $0x30, %esi
movq %rbx, %rdi
callq 0x3a480
jmp 0x7dbd9
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x415d4
movq %r14, %rdi
callq 0x3a790
nop