// File: /workspace/github_cpp_makefile_star2_O1/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 0x731ea
movq 0x8(%r15), %rax
movq 0x8(%rax), %rcx
subq (%rax), %rcx
cmpq $0x30, %rcx
jne 0x7324d
movq %rdi, %rbx
leaq 0x30f3c(%rip), %rax     # 0xa4090
movq %rax, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movq $0x0, 0x18(%rdi)
movq %r15, %rdi
xorl %esi, %esi
callq 0x738fa
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x753fb
leaq 0x8(%rbx), %rax
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rax)
movl $0x1, %esi
movq %r15, %rdi
callq 0x738fa
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x753fb
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x10(%rbx)
movl $0x2, %esi
movq %r15, %rdi
callq 0x738fa
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x753fb
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 0xe8(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x17f51(%rip), %rsi     # 0x8b15c
leaq 0x17f4e(%rip), %rdx     # 0x8b160
leaq 0xd8(%rsp), %rdi
callq 0x44728
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x2, %r8d
callq 0x747bc
movzbl 0x8(%rsp), %eax
cmpq $0x8, %rax
ja 0x732a2
leaq 0x30e61(%rip), %rcx     # 0xa40a8
movq (%rcx,%rax,8), %r14
jmp 0x732a9
movl $0x58, %edi
callq 0x3a210
movq %rax, %rbx
leaq 0x88(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x17eee(%rip), %rsi     # 0x8b15c
leaq 0x17eeb(%rip), %rdx     # 0x8b160
leaq 0x78(%rsp), %rdi
callq 0x44728
movzbl (%r15), %ecx
testl %ecx, %ecx
je 0x732f7
cmpl $0x1, %ecx
je 0x732e8
cmpl $0x2, %ecx
jne 0x732f2
movq 0x8(%r15), %rax
movq 0x8(%rax), %rcx
subq (%rax), %rcx
sarq $0x4, %rcx
jmp 0x732f7
leaq 0x13f55(%rip), %r14     # 0x871fe
leaq 0xc8(%rsp), %r13
movq %r13, -0x10(%r13)
movq %r14, %rdi
callq 0x3a1f0
leaq (%rax,%r14), %rdx
leaq 0xb8(%rsp), %rdi
movq %r14, %rsi
callq 0x44728
movzbl (%r15), %eax
cmpq $0x8, %rax
ja 0x73329
leaq 0x30dc6(%rip), %rcx     # 0xa40a8
movq (%rcx,%rax,8), %r14
jmp 0x73330
movq 0x8(%r15), %rax
movq 0x28(%rax), %rcx
jmp 0x732f7
movl $0x1, %ecx
movb $0x1, %bpl
leaq 0x78(%rsp), %rsi
movl $0x3, %edx
movq %rbx, %rdi
callq 0x73e22
xorl %ebp, %ebp
leaq 0x30e0b(%rip), %rsi     # 0xa4120
leaq 0xf68(%rip), %rdx       # 0x74284
movq %rbx, %rdi
callq 0x3a750
jmp 0x7352a
leaq 0x13ece(%rip), %r14     # 0x871fe
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 0x44728
movb $0x1, %bpl
leaq 0xd8(%rsp), %rsi
leaq 0xb8(%rsp), %rdx
leaq 0x98(%rsp), %rcx
movq %rbx, %rdi
callq 0x73acc
xorl %ebp, %ebp
leaq 0x30d84(%rip), %rsi     # 0xa4108
leaq 0xa15(%rip), %rdx       # 0x73da0
movq %rbx, %rdi
callq 0x3a750
jmp 0x7352a
movq %rax, %r14
movq 0x98(%rsp), %rdi
cmpq %r15, %rdi
je 0x733c0
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x733c0
movq %rax, %r14
movb $0x1, %bpl
movq 0xb8(%rsp), %rdi
cmpq %r13, %rdi
je 0x733e5
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x733e5
movq %rax, %r14
movb $0x1, %bpl
leaq 0x8(%rsp), %rdi
callq 0x4191c
jmp 0x733f7
movq %rax, %r14
movb $0x1, %bpl
movq 0xd8(%rsp), %rdi
cmpq %r12, %rdi
je 0x73435
movq 0xe8(%rsp), %rsi
jmp 0x73423
movq %rax, %r14
movq 0x78(%rsp), %rdi
cmpq %r12, %rdi
je 0x73435
movq 0x88(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x73435
jmp 0x7342f
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x7359e
movq %rbx, %rdi
callq 0x3a330
jmp 0x7359e
movq %rax, %r14
cmpl $0x1, %edx
jne 0x7359e
movq %r14, %rdi
callq 0x3a1c0
movl $0x88, %edi
callq 0x3a210
movq %rax, %rbx
leaq 0x68(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x17cdf(%rip), %rsi     # 0x8b15c
leaq 0x17cdc(%rip), %rdx     # 0x8b160
leaq 0x58(%rsp), %rdi
callq 0x44728
leaq 0x48(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x17cc3(%rip), %rsi     # 0x8b161
leaq 0x17cc2(%rip), %rdx     # 0x8b167
leaq 0x38(%rsp), %rdi
callq 0x44728
movq %r15, %rdi
xorl %esi, %esi
callq 0x738fa
movzbl (%rax), %eax
cmpq $0x8, %rax
ja 0x734cf
leaq 0x30bdf(%rip), %rcx     # 0xa40a8
movq (%rcx,%rax,8), %r14
jmp 0x734d6
leaq 0x13d28(%rip), %r14     # 0x871fe
leaq 0x28(%rsp), %r15
movq %r15, -0x10(%r15)
movq %r14, %rdi
callq 0x3a1f0
leaq (%rax,%r14), %rdx
leaq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0x44728
movb $0x1, %bpl
leaq 0x58(%rsp), %rsi
leaq 0x38(%rsp), %rdx
leaq 0x18(%rsp), %rcx
movq %rbx, %rdi
callq 0x73acc
xorl %ebp, %ebp
leaq 0x30bed(%rip), %rsi     # 0xa4108
leaq 0x87e(%rip), %rdx       # 0x73da0
movq %rbx, %rdi
callq 0x3a750
movq %rax, %r14
movq 0x18(%rsp), %rdi
cmpq %r15, %rdi
je 0x7354e
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x7354e
jmp 0x73548
movq %rax, %r14
movb $0x1, %bpl
movq 0x38(%rsp), %rdi
cmpq %r13, %rdi
je 0x7356d
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x7356d
movq %rax, %r14
movb $0x1, %bpl
movq 0x58(%rsp), %rdi
cmpq %r12, %rdi
je 0x7358c
movq 0x68(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x7358c
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x73599
movq %rbx, %rdi
callq 0x3a330
callq 0x3a710
movq %r14, %rdi
callq 0x3a780
movq %rax, %rdi
callq 0x414b1