// File: /workspace/github_cpp_makefile_star2_O2/Lut99[P]RayTracer/src/lib/Vec3.cpp
// Function: RayTracer::Vec3::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>)
Vec3 Vec3::from_json(json json_obj) {
    // First, check if the json_obj is an array
    if (!json_obj.is_array()) {
        throw InvalidObjectFormat("Vec3", json::array().type_name(), json_obj.type_name());
    }

    // Next, check for the array length
    if (json_obj.size() != 3) {
        throw InvalidLengthException("Vec3", 3, json_obj.size());
    }

    // Then, try to parse it as three doubles
    Vec3 to_return;
    try {
        to_return.x = json_obj[0].get<double>();
        to_return.y = json_obj[1].get<double>();
        to_return.z = json_obj[2].get<double>();
    } catch (nlohmann::detail::type_error&) {
        throw InvalidObjectFormat("Vec3", "double", json_obj[0].type_name());
    }
    return to_return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xf8, %rsp
movq %rsi, %r14
cmpb $0x2, (%rsi)
jne 0x7e9ab
movq %rdi, %rbx
movq %r14, %rdi
callq 0x6ec2e
cmpq $0x3, %rax
jne 0x7ea5b
leaq 0x32b47(%rip), %rax     # 0xb1488
movq %rax, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
andq $0x0, 0x18(%rbx)
movq %r14, %rdi
xorl %esi, %esi
callq 0x7eefe
movq %rax, %rdi
callq 0x7f350
leaq 0x8(%rbx), %rax
movsd %xmm0, (%rax)
pushq $0x1
popq %rsi
movq %r14, %rdi
callq 0x7eefe
movq %rax, %rdi
callq 0x7f350
movsd %xmm0, 0x10(%rbx)
pushq $0x2
popq %rsi
movq %r14, %rdi
callq 0x7eefe
movq %rax, %rdi
callq 0x7f350
movsd %xmm0, 0x18(%rbx)
movq %rbx, %rax
addq $0xf8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x88, %edi
callq 0x52220
movq %rax, %rbx
leaq 0x1385d(%rip), %rsi     # 0x9221c
leaq 0xd8(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0x56548
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x7eed0
leaq 0x8(%rsp), %rdi
callq 0x6f406
leaq 0xb8(%rsp), %rdi
leaq 0x5(%rsp), %rdx
movq %rax, %rsi
callq 0x56548
movq %r14, %rdi
callq 0x6f406
leaq 0x98(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %rax, %rsi
callq 0x56548
movb $0x1, %bpl
leaq 0xd8(%rsp), %rsi
leaq 0xb8(%rsp), %rdx
leaq 0x98(%rsp), %rcx
movq %rbx, %rdi
callq 0x7f052
xorl %ebp, %ebp
leaq 0x32a71(%rip), %rsi     # 0xb14b8
leaq 0x758(%rip), %rdx       # 0x7f1a6
movq %rbx, %rdi
callq 0x52760
jmp 0x7ebcc
pushq $0x58
popq %rdi
callq 0x52220
movq %rax, %rbx
leaq 0x137af(%rip), %rsi     # 0x9221c
leaq 0x78(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x56548
movq %r14, %rdi
callq 0x6ec2e
movb $0x1, %bpl
leaq 0x78(%rsp), %rsi
pushq $0x3
popq %rdx
movq %rbx, %rdi
movq %rax, %rcx
callq 0x7f1d0
xorl %ebp, %ebp
leaq 0x32a2d(%rip), %rsi     # 0xb14d0
leaq 0x87c(%rip), %rdx       # 0x7f326
movq %rbx, %rdi
callq 0x52760
jmp 0x7ebcc
movq %rax, %r15
leaq 0x98(%rsp), %rdi
callq 0x52888
jmp 0x7eacf
movq %rax, %r15
movb $0x1, %bpl
leaq 0xb8(%rsp), %rdi
callq 0x52888
jmp 0x7eae4
movq %rax, %r15
movb $0x1, %bpl
leaq 0x8(%rsp), %rdi
callq 0x56fca
jmp 0x7eaf6
movq %rax, %r15
movb $0x1, %bpl
leaq 0xd8(%rsp), %rdi
jmp 0x7eb08
movq %rax, %r15
leaq 0x78(%rsp), %rdi
callq 0x52888
testb %bpl, %bpl
jne 0x7eb1c
jmp 0x7ec16
jmp 0x7eb19
movq %rax, %r15
movq %rbx, %rdi
callq 0x52350
jmp 0x7ec16
movq %rax, %r15
cmpl $0x1, %edx
jne 0x7ec16
movq %r15, %rdi
callq 0x521b0
movl $0x88, %edi
callq 0x52220
movq %rax, %rbx
leaq 0x136cb(%rip), %rsi     # 0x9221c
leaq 0x58(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x56548
leaq 0x136ba(%rip), %rsi     # 0x92221
leaq 0x38(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0x56548
movq %r14, %rdi
xorl %esi, %esi
callq 0x7eefe
movq %rax, %rdi
callq 0x6f406
leaq 0x18(%rsp), %rdi
leaq 0x5(%rsp), %rdx
movq %rax, %rsi
callq 0x56548
movb $0x1, %bpl
leaq 0x58(%rsp), %rsi
leaq 0x38(%rsp), %rdx
leaq 0x18(%rsp), %rcx
movq %rbx, %rdi
callq 0x7f052
xorl %ebp, %ebp
leaq 0x328fb(%rip), %rsi     # 0xb14b8
leaq 0x5e2(%rip), %rdx       # 0x7f1a6
movq %rbx, %rdi
callq 0x52760
movq %rax, %r15
leaq 0x18(%rsp), %rdi
callq 0x52888
jmp 0x7ebe3
jmp 0x7ebdd
movq %rax, %r15
movb $0x1, %bpl
leaq 0x38(%rsp), %rdi
callq 0x52888
jmp 0x7ebf5
movq %rax, %r15
movb $0x1, %bpl
leaq 0x58(%rsp), %rdi
callq 0x52888
testb %bpl, %bpl
jne 0x7ec09
jmp 0x7ec11
movq %rax, %r15
movq %rbx, %rdi
callq 0x52350
callq 0x52720
movq %r15, %rdi
callq 0x527a0
movq %rax, %rdi
callq 0x56ca4