// File: /workspace/github_cpp_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rsi, %r15
cmpb $0x2, (%rsi)
jne 0x72694
movq 0x8(%r15), %rax
movq 0x8(%rax), %rcx
subq (%rax), %rcx
cmpq $0x30, %rcx
jne 0x726f1
movq %rdi, %rbx
leaq 0x30ac2(%rip), %rax     # 0xa30c0
movq %rax, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movq $0x0, 0x18(%rdi)
movq %r15, %rdi
xorl %esi, %esi
callq 0x72dc4
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x748f1
leaq 0x8(%rbx), %rax
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rax)
movl $0x1, %esi
movq %r15, %rdi
callq 0x72dc4
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x748f1
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x10(%rbx)
movl $0x2, %esi
movq %r15, %rdi
callq 0x72dc4
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x748f1
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x18(%rbx)
movq %rbx, %rax
addq $0xf8, %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 0x17aca(%rip), %rsi     # 0x8a17c
leaq 0x17ac7(%rip), %rdx     # 0x8a180
leaq 0x38(%rsp), %rdi
callq 0x44390
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x2, %r8d
callq 0x73c9e
movzbl 0x8(%rsp), %eax
cmpq $0x8, %rax
ja 0x72749
leaq 0x309ed(%rip), %rcx     # 0xa30d8
movq (%rcx,%rax,8), %r14
jmp 0x72750
movl $0x58, %edi
callq 0x3a210
movq %rax, %rbx
leaq 0xa8(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x17a6a(%rip), %rsi     # 0x8a17c
leaq 0x17a67(%rip), %rdx     # 0x8a180
leaq 0x98(%rsp), %rdi
callq 0x44390
movzbl (%r15), %ecx
testl %ecx, %ecx
je 0x7279e
cmpl $0x1, %ecx
je 0x7278f
cmpl $0x2, %ecx
jne 0x72799
movq 0x8(%r15), %rax
movq 0x8(%rax), %rcx
subq (%rax), %rcx
sarq $0x4, %rcx
jmp 0x7279e
leaq 0x13aab(%rip), %r14     # 0x861fb
leaq 0xe8(%rsp), %r13
movq %r13, -0x10(%r13)
movq %r14, %rdi
callq 0x3a1f0
leaq (%rax,%r14), %rdx
leaq 0xd8(%rsp), %rdi
movq %r14, %rsi
callq 0x44390
movzbl (%r15), %eax
cmpq $0x8, %rax
ja 0x727d3
leaq 0x3094f(%rip), %rcx     # 0xa30d8
movq (%rcx,%rax,8), %r14
jmp 0x727da
movq 0x8(%r15), %rax
movq 0x28(%rax), %rcx
jmp 0x7279e
movl $0x1, %ecx
movb $0x1, %bpl
leaq 0x98(%rsp), %rsi
movl $0x3, %edx
movq %rbx, %rdi
callq 0x73306
xorl %ebp, %ebp
leaq 0x30991(%rip), %rsi     # 0xa3150
leaq 0xfa0(%rip), %rdx       # 0x73766
movq %rbx, %rdi
callq 0x3a760
jmp 0x729e1
leaq 0x13a21(%rip), %r14     # 0x861fb
leaq 0xc8(%rsp), %r15
movq %r15, -0x10(%r15)
movq %r14, %rdi
callq 0x3a1f0
leaq (%rax,%r14), %rdx
leaq 0xb8(%rsp), %rdi
movq %r14, %rsi
callq 0x44390
movb $0x1, %bpl
leaq 0x38(%rsp), %rsi
leaq 0xd8(%rsp), %rdx
leaq 0xb8(%rsp), %rcx
movq %rbx, %rdi
callq 0x72fb0
xorl %ebp, %ebp
leaq 0x3090d(%rip), %rsi     # 0xa3138
leaq 0xa52(%rip), %rdx       # 0x73284
movq %rbx, %rdi
callq 0x3a760
jmp 0x729e1
movq %rax, %r14
movq 0xb8(%rsp), %rdi
cmpq %r15, %rdi
je 0x72867
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x3a480
jmp 0x72867
movq %rax, %r14
movb $0x1, %bpl
movq 0xd8(%rsp), %rdi
cmpq %r13, %rdi
je 0x7288c
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x3a480
jmp 0x7288c
movq %rax, %r14
movb $0x1, %bpl
leaq 0x8(%rsp), %rdi
callq 0x415d4
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x728e3
movq 0x48(%rsp), %rsi
jmp 0x728db
movq %rax, %r14
movq 0x38(%rsp), %rdi
cmpq %r12, %rdi
je 0x728f2
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3a480
jmp 0x728f2
movq %rax, %r14
movq 0x98(%rsp), %rdi
cmpq %r12, %rdi
je 0x728e3
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x3a480
testb %bpl, %bpl
jne 0x728f2
jmp 0x72a69
jmp 0x728ef
movq %rax, %r14
movq %rbx, %rdi
callq 0x3a340
jmp 0x72a69
movq %rax, %r14
cmpl $0x1, %edx
jne 0x72a69
movq %r14, %rdi
callq 0x3a1c0
movl $0x88, %edi
callq 0x3a210
movq %rax, %rbx
leaq 0x28(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x1784b(%rip), %rsi     # 0x8a17c
leaq 0x17848(%rip), %rdx     # 0x8a180
leaq 0x18(%rsp), %rdi
callq 0x44390
leaq 0x88(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x1782c(%rip), %rsi     # 0x8a181
leaq 0x1782b(%rip), %rdx     # 0x8a187
leaq 0x78(%rsp), %rdi
callq 0x44390
movq %r15, %rdi
xorl %esi, %esi
callq 0x72dc4
movzbl (%rax), %eax
cmpq $0x8, %rax
ja 0x72986
leaq 0x30758(%rip), %rcx     # 0xa30d8
movq (%rcx,%rax,8), %r14
jmp 0x7298d
leaq 0x1386e(%rip), %r14     # 0x861fb
leaq 0x68(%rsp), %r15
movq %r15, -0x10(%r15)
movq %r14, %rdi
callq 0x3a1f0
leaq (%rax,%r14), %rdx
leaq 0x58(%rsp), %rdi
movq %r14, %rsi
callq 0x44390
movb $0x1, %bpl
leaq 0x18(%rsp), %rsi
leaq 0x78(%rsp), %rdx
leaq 0x58(%rsp), %rcx
movq %rbx, %rdi
callq 0x72fb0
xorl %ebp, %ebp
leaq 0x30766(%rip), %rsi     # 0xa3138
leaq 0x8ab(%rip), %rdx       # 0x73284
movq %rbx, %rdi
callq 0x3a760
movq %rax, %r14
movq 0x58(%rsp), %rdi
cmpq %r15, %rdi
je 0x72a05
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x3a480
jmp 0x72a05
jmp 0x729ff
movq %rax, %r14
movb $0x1, %bpl
movq 0x78(%rsp), %rdi
cmpq %r13, %rdi
je 0x72a1f
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x3a480
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x72a36
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x3a480
testb %bpl, %bpl
jne 0x72a5c
jmp 0x72a64
movq %rax, %r14
movq 0x18(%rsp), %rdi
cmpq %r12, %rdi
je 0x72a5c
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x3a480
jmp 0x72a5c
movq %rax, %r14
movq %rbx, %rdi
callq 0x3a340
callq 0x3a720
movq %r14, %rdi
callq 0x3a790
movq %rax, %rdi
callq 0x4116b