// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0xe0, %rsp
movq %rdi, %r14
cmpb $0x1, (%rdi)
jne 0x86276
leaq 0xcac8(%rip), %rsi      # 0x92cd0
movq %r14, %rdi
callq 0x56e34
cmpb $0x0, (%rax)
je 0x86323
leaq 0xcab0(%rip), %rsi      # 0x92cd0
movq %r14, %rdi
callq 0x56e34
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x56f56
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
callq 0x7e90c
leaq 0x10(%rsp), %rdi
callq 0x56fca
pushq $0x30
popq %rdi
callq 0x52470
movq %rax, %rbx
leaq 0x20(%rsp), %rsi
movq %rax, %rdi
callq 0x86040
movq %rbx, %rax
addq $0xe0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl $0x88, %edi
callq 0x52220
movq %rax, %rbx
leaq 0xca4d(%rip), %rsi      # 0x92cd7
leaq 0xc0(%rsp), %rdi
leaq 0xd(%rsp), %rdx
callq 0x56548
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x8067c
leaq 0x20(%rsp), %rdi
callq 0x6f406
leaq 0xa0(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq %rax, %rsi
callq 0x56548
movq %r14, %rdi
callq 0x6f406
leaq 0x80(%rsp), %rdi
leaq 0xe(%rsp), %rdx
movq %rax, %rsi
callq 0x56548
movb $0x1, %bpl
leaq 0xc0(%rsp), %rsi
leaq 0xa0(%rsp), %rdx
leaq 0x80(%rsp), %rcx
movq %rbx, %rdi
callq 0x7f052
xorl %ebp, %ebp
leaq 0x2b1a6(%rip), %rsi     # 0xb14b8
leaq -0x7173(%rip), %rdx     # 0x7f1a6
movq %rbx, %rdi
callq 0x52760
jmp 0x86387
pushq $0x68
popq %rdi
callq 0x52220
movq %rax, %rbx
leaq 0xc9a2(%rip), %rsi      # 0x92cd7
leaq 0x60(%rsp), %rdi
leaq 0x20(%rsp), %rdx
callq 0x56548
leaq 0xc985(%rip), %rsi      # 0x92cd0
leaq 0x40(%rsp), %rdi
leaq 0xd(%rsp), %rdx
callq 0x56548
movb $0x1, %bpl
leaq 0x60(%rsp), %rsi
leaq 0x40(%rsp), %rdx
movq %rbx, %rdi
callq 0x80690
xorl %ebp, %ebp
leaq 0x2b290(%rip), %rsi     # 0xb1608
leaq -0x5c1f(%rip), %rdx     # 0x80760
movq %rbx, %rdi
callq 0x52760
movq %rax, %r14
leaq 0x80(%rsp), %rdi
callq 0x52888
jmp 0x8639f
movq %rax, %r14
movb $0x1, %bpl
leaq 0xa0(%rsp), %rdi
callq 0x52888
jmp 0x863b4
movq %rax, %r14
movb $0x1, %bpl
leaq 0x20(%rsp), %rdi
callq 0x56fca
jmp 0x863e2
movq %rax, %r14
leaq 0x40(%rsp), %rdi
callq 0x52888
jmp 0x863d5
movq %rax, %r14
movb $0x1, %bpl
leaq 0x60(%rsp), %rdi
jmp 0x863ea
movq %rax, %r14
movb $0x1, %bpl
leaq 0xc0(%rsp), %rdi
callq 0x52888
testb %bpl, %bpl
jne 0x863fb
jmp 0x86422
jmp 0x863f8
movq %rax, %r14
movq %rbx, %rdi
callq 0x52350
jmp 0x86422
movq %rax, %r14
pushq $0x30
popq %rsi
movq %rbx, %rdi
callq 0x52480
jmp 0x86422
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x56fca
movq %r14, %rdi
callq 0x527a0