// File: /workspace/github_cpp_makefile_star2_O1/Lut99[P]RayTracer/src/lib/CameraMovement.cpp
// Function: RayTracer::CameraMovement::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>)
CameraMovement* CameraMovement::from_json(json json_obj) {
    // Check if the object has an object type
    if (!json_obj.is_object()) {
        throw InvalidObjectFormat("CameraMovement", json::object().type_name(), json_obj.type_name());
    }

    // Check if the required type field exists and is an array
    if (json_obj["type"].is_null()) {
        throw MissingFieldException("CameraMovement", "type");
    }
    
    // Parse the raw type
    CameraMovementType cam_type;
    try {
        cam_type = (CameraMovementType) json_obj["type"].get<unsigned long>();
    } catch (nlohmann::detail::type_error&) {
        throw InvalidFieldFormat("CameraMovement", "type", "unsigned long", json_obj["type"].type_name());
    }

    // Decide how to parse the rest of the JSON
    if (cam_type == rotation) {
        return (CameraMovement*) CameraRotation::from_json(json_obj);
    } else {
        throw UnknownSubtypeException("CameraMovement", cam_type);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
movq %rdi, %r15
cmpb $0x1, (%rdi)
jne 0x802da
leaq 0xa1b7(%rip), %rsi      # 0x8a40f
movq %r15, %rdi
callq 0x416d6
cmpb $0x0, (%rax)
je 0x80344
leaq 0xa19f(%rip), %rsi      # 0x8a40f
movq %r15, %rdi
callq 0x416d6
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x7680c
movl 0x8(%rsp), %ebx
testq %rbx, %rbx
jne 0x803d8
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x41894
movq %rbx, %rdi
callq 0x80af2
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x48a06
leaq 0x20(%rsp), %rdi
movzbl -0x8(%rdi), %esi
callq 0x48aa8
movq %rbx, %rax
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x88, %edi
callq 0x3a210
movq %rax, %r14
leaq 0x158(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xb76c(%rip), %rsi      # 0x8ba67
leaq 0xb773(%rip), %rdx      # 0x8ba75
leaq 0x148(%rsp), %rdi
callq 0x44728
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x747bc
movzbl 0x8(%rsp), %eax
cmpq $0x8, %rax
ja 0x80436
leaq 0x24805(%rip), %rcx     # 0xa4b40
movq (%rcx,%rax,8), %rbx
jmp 0x8043d
movl $0x68, %edi
callq 0x3a210
movq %rax, %r14
leaq 0xf8(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xb703(%rip), %rsi      # 0x8ba67
leaq 0xb70a(%rip), %rdx      # 0x8ba75
leaq 0xe8(%rsp), %rdi
callq 0x44728
leaq 0xd8(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xa083(%rip), %rsi      # 0x8a40f
leaq 0xa080(%rip), %rdx      # 0x8a413
leaq 0xc8(%rsp), %rdi
callq 0x44728
movb $0x1, %bpl
leaq 0xe8(%rsp), %rsi
leaq 0xc8(%rsp), %rdx
movq %r14, %rdi
callq 0x75d5a
xorl %ebp, %ebp
leaq 0x23edc(%rip), %rsi     # 0xa42a0
leaq -0xa4dd(%rip), %rdx     # 0x75eee
movq %r14, %rdi
callq 0x3a750
jmp 0x8070a
movl $0x50, %edi
callq 0x3a210
movq %rax, %r14
leaq 0x58(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xb672(%rip), %rsi      # 0x8ba67
leaq 0xb679(%rip), %rdx      # 0x8ba75
leaq 0x48(%rsp), %rdi
callq 0x44728
movb $0x1, %bpl
leaq 0x48(%rsp), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x76472
xorl %ebp, %ebp
leaq 0x23eae(%rip), %rsi     # 0xa42d0
leaq -0xc1a5(%rip), %rdx     # 0x74284
movq %r14, %rdi
callq 0x3a750
jmp 0x8070a
leaq 0x6dc1(%rip), %rbx      # 0x871fe
leaq 0x138(%rsp), %r13
movq %r13, -0x10(%r13)
movq %rbx, %rdi
callq 0x3a1f0
leaq (%rax,%rbx), %rdx
leaq 0x128(%rsp), %rdi
movq %rbx, %rsi
callq 0x44728
movzbl (%r15), %eax
cmpq $0x8, %rax
ja 0x8047c
leaq 0x246ca(%rip), %rcx     # 0xa4b40
movq (%rcx,%rax,8), %rbx
jmp 0x80483
leaq 0x6d7b(%rip), %rbx      # 0x871fe
leaq 0x118(%rsp), %r15
movq %r15, -0x10(%r15)
movq %rbx, %rdi
callq 0x3a1f0
leaq (%rax,%rbx), %rdx
leaq 0x108(%rsp), %rdi
movq %rbx, %rsi
callq 0x44728
movb $0x1, %bpl
leaq 0x148(%rsp), %rsi
leaq 0x128(%rsp), %rdx
leaq 0x108(%rsp), %rcx
movq %r14, %rdi
callq 0x73acc
xorl %ebp, %ebp
leaq 0x23c31(%rip), %rsi     # 0xa4108
leaq -0xc73e(%rip), %rdx     # 0x73da0
movq %r14, %rdi
callq 0x3a750
jmp 0x8070a
movq %rax, %rbx
movq 0x108(%rsp), %rdi
cmpq %r15, %rdi
je 0x80513
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x80513
movq %rax, %rbx
movb $0x1, %bpl
movq 0x128(%rsp), %rdi
cmpq %r13, %rdi
je 0x80538
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x80538
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x8(%rsp), %rdi
callq 0x4191c
jmp 0x80589
movq %rax, %rbx
movq 0xc8(%rsp), %rdi
cmpq %r12, %rdi
je 0x8056c
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x8056c
movq %rax, %rbx
movb $0x1, %bpl
movq 0xe8(%rsp), %rdi
cmpq %r15, %rdi
je 0x805c6
movq 0xf8(%rsp), %rsi
jmp 0x805b2
movq %rax, %rbx
movb $0x1, %bpl
movq 0x148(%rsp), %rdi
cmpq %r12, %rdi
je 0x805c6
movq 0x158(%rsp), %rsi
jmp 0x805b2
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0x805c6
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x805c6
jmp 0x805c0
jmp 0x805c0
movq %rax, %rbx
movb $0x1, %bpl
testb %bpl, %bpl
je 0x807ae
movq %r14, %rdi
callq 0x3a330
jmp 0x807ae
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x4191c
jmp 0x807ae
movq %rax, %rbx
cmpl $0x1, %edx
jne 0x807ae
movq %rbx, %rdi
callq 0x3a1c0
movl $0xa8, %edi
callq 0x3a210
movq %rax, %r14
leaq 0xb8(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xb444(%rip), %rsi      # 0x8ba67
leaq 0xb44b(%rip), %rdx      # 0x8ba75
leaq 0xa8(%rsp), %rdi
callq 0x44728
leaq 0x98(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x9dc5(%rip), %rsi      # 0x8a40f
leaq 0x9dc2(%rip), %rdx      # 0x8a413
leaq 0x88(%rsp), %rdi
callq 0x44728
leaq 0x38(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0xac97(%rip), %rsi      # 0x8b305
leaq 0xac9d(%rip), %rdx      # 0x8b312
leaq 0x28(%rsp), %rdi
callq 0x44728
leaq 0x9d89(%rip), %rsi      # 0x8a40f
movq %r15, %rdi
callq 0x416d6
movzbl (%rax), %eax
cmpq $0x8, %rax
ja 0x806a4
leaq 0x244a2(%rip), %rcx     # 0xa4b40
movq (%rcx,%rax,8), %rbx
jmp 0x806ab
leaq 0x6b53(%rip), %rbx      # 0x871fe
leaq 0x78(%rsp), %r15
movq %r15, -0x10(%r15)
movq %rbx, %rdi
callq 0x3a1f0
leaq (%rax,%rbx), %rdx
leaq 0x68(%rsp), %rdi
movq %rbx, %rsi
callq 0x44728
movb $0x1, %bpl
leaq 0xa8(%rsp), %rsi
leaq 0x88(%rsp), %rdx
leaq 0x28(%rsp), %rcx
leaq 0x68(%rsp), %r8
movq %r14, %rdi
callq 0x75f58
xorl %ebp, %ebp
leaq 0x23bbd(%rip), %rsi     # 0xa42b8
leaq -0xa33a(%rip), %rdx     # 0x763c8
movq %r14, %rdi
callq 0x3a750
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x8072e
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x8072e
jmp 0x80728
movq %rax, %rbx
movb $0x1, %bpl
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x80752
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x80752
movq %rax, %rbx
movb $0x1, %bpl
movq 0x88(%rsp), %rdi
cmpq %r13, %rdi
je 0x80777
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x80777
movq %rax, %rbx
movb $0x1, %bpl
movq 0xa8(%rsp), %rdi
cmpq %r12, %rdi
je 0x8079c
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x3a470
jmp 0x8079c
movq %rax, %rbx
movb $0x1, %bpl
testb %bpl, %bpl
je 0x807a9
movq %r14, %rdi
callq 0x3a330
callq 0x3a710
movq %rbx, %rdi
callq 0x3a780
movq %rax, %rdi
callq 0x414b1