// File: /workspace/github_cpp_makefile_star2_O1/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 0x7e1d8
leaq 0xd822(%rip), %rsi      # 0x8b94e
movq %r14, %rdi
callq 0x416d6
cmpb $0x0, (%rax)
je 0x7e242
leaq 0xd80a(%rip), %rsi      # 0x8b94e
movq %r14, %rdi
callq 0x416d6
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x41894
leaq 0x18(%rsp), %rdi
movq %rbx, %rsi
callq 0x73118
leaq 0x8(%rsp), %rdi
callq 0x48a06
leaq 0x10(%rsp), %rdi
movzbl -0x8(%rdi), %esi
callq 0x48aa8
movl $0x30, %edi
callq 0x3a460
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
callq 0x7d820
leaq 0x266c9(%rip), %rax     # 0xa4868
movq %rax, (%rbx)
leaq 0x25ed7(%rip), %rax     # 0xa4080
addq $0x10, %rax
movq %rax, 0x10(%rbx)
movups 0x20(%rsp), %xmm0
movups %xmm0, 0x18(%rbx)
movq 0x30(%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 0xc8(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xd75c(%rip), %rsi      # 0x8b955
leaq 0xd75f(%rip), %rdx      # 0x8b95f
leaq 0xb8(%rsp), %rdi
callq 0x44728
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x747bc
movzbl 0x18(%rsp), %eax
cmpq $0x8, %rax
ja 0x7e2c4
leaq 0x26677(%rip), %rcx     # 0xa48b0
movq (%rcx,%rax,8), %r15
jmp 0x7e2cb
movl $0x68, %edi
callq 0x3a210
movq %rax, %rbx
leaq 0x68(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xd6f6(%rip), %rsi      # 0x8b955
leaq 0xd6f9(%rip), %rdx      # 0x8b95f
leaq 0x58(%rsp), %rdi
callq 0x44728
leaq 0x48(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xd6cd(%rip), %rsi      # 0x8b94e
leaq 0xd6cc(%rip), %rdx      # 0x8b954
leaq 0x38(%rsp), %rdi
callq 0x44728
movb $0x1, %bpl
leaq 0x58(%rsp), %rsi
leaq 0x38(%rsp), %rdx
movq %rbx, %rdi
callq 0x75d5a
xorl %ebp, %ebp
leaq 0x25ff0(%rip), %rsi     # 0xa42a0
leaq -0x83c9(%rip), %rdx     # 0x75eee
movq %rbx, %rdi
callq 0x3a750
jmp 0x7e36e
leaq 0x8f33(%rip), %r15      # 0x871fe
leaq 0xa8(%rsp), %r13
movq %r13, -0x10(%r13)
movq %r15, %rdi
callq 0x3a1f0
leaq (%rax,%r15), %rdx
leaq 0x98(%rsp), %rdi
movq %r15, %rsi
callq 0x44728
movzbl (%r14), %eax
cmpq $0x8, %rax
ja 0x7e30a
leaq 0x265ac(%rip), %rcx     # 0xa48b0
movq (%rcx,%rax,8), %r14
jmp 0x7e311
leaq 0x8eed(%rip), %r14      # 0x871fe
leaq 0x88(%rsp), %r15
movq %r15, -0x10(%r15)
movq %r14, %rdi
callq 0x3a1f0
leaq (%rax,%r14), %rdx
leaq 0x78(%rsp), %rdi
movq %r14, %rsi
callq 0x44728
movb $0x1, %bpl
leaq 0xb8(%rsp), %rsi
leaq 0x98(%rsp), %rdx
leaq 0x78(%rsp), %rcx
movq %rbx, %rdi
callq 0x73acc
xorl %ebp, %ebp
leaq 0x25da9(%rip), %rsi     # 0xa4108
leaq -0xa5c6(%rip), %rdx     # 0x73da0
movq %rbx, %rdi
callq 0x3a750
movq %rax, %r14
movq 0x78(%rsp), %rdi
cmpq %r15, %rdi
je 0x7e393
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x7e393
movq %rax, %r14
movb $0x1, %bpl
movq 0x98(%rsp), %rdi
cmpq %r13, %rdi
je 0x7e3b8
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x7e3b8
movq %rax, %r14
movb $0x1, %bpl
leaq 0x18(%rsp), %rdi
callq 0x4191c
jmp 0x7e3fd
movq %rax, %r14
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x7e3e6
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x7e3e6
movq %rax, %r14
movb $0x1, %bpl
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x7e424
movq 0x68(%rsp), %rsi
jmp 0x7e412
movq %rax, %r14
movb $0x1, %bpl
movq 0xb8(%rsp), %rdi
cmpq %r12, %rdi
je 0x7e424
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x7e424
jmp 0x7e41e
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x7e452
movq %rbx, %rdi
callq 0x3a330
jmp 0x7e452
movq %rax, %r14
movl $0x30, %esi
movq %rbx, %rdi
callq 0x3a470
jmp 0x7e452
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x4191c
movq %r14, %rdi
callq 0x3a780