// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0x168, %rsp            # imm = 0x168
movq %rdi, %r15
cmpb $0x1, (%rdi)
jne 0x87acd
leaq 0x9a71(%rip), %rsi      # 0x914cf
movq %r15, %rdi
callq 0x56e34
cmpb $0x0, (%rax)
je 0x87b7d
leaq 0x9a59(%rip), %rsi      # 0x914cf
movq %r15, %rdi
callq 0x56e34
movq %rax, %rdi
callq 0x80780
movq %rax, %rbx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
andq %rax, %rbx
jne 0x87bf2
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x56f56
movq %rbx, %rdi
callq 0x880f2
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x56fca
movq %rbx, %rax
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x88, %edi
callq 0x52220
movq %rax, %r14
leaq 0xb3a5(%rip), %rsi      # 0x92e86
leaq 0x148(%rsp), %rdi
leaq 0x5(%rsp), %rdx
callq 0x56548
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x8067c
leaq 0x8(%rsp), %rdi
callq 0x6f406
leaq 0x128(%rsp), %rdi
leaq 0x7(%rsp), %rdx
movq %rax, %rsi
callq 0x56548
movq %r15, %rdi
callq 0x6f406
leaq 0x108(%rsp), %rdi
leaq 0x6(%rsp), %rdx
movq %rax, %rsi
callq 0x56548
movb $0x1, %bpl
leaq 0x148(%rsp), %rsi
leaq 0x128(%rsp), %rdx
leaq 0x108(%rsp), %rcx
movq %r14, %rdi
callq 0x7f052
xorl %ebp, %ebp
leaq 0x2994f(%rip), %rsi     # 0xb14b8
leaq -0x89ca(%rip), %rdx     # 0x7f1a6
movq %r14, %rdi
callq 0x52760
jmp 0x87dba
pushq $0x68
popq %rdi
callq 0x52220
movq %rax, %r14
leaq 0xb2f7(%rip), %rsi      # 0x92e86
leaq 0xe8(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x56548
leaq 0x9927(%rip), %rsi      # 0x914cf
leaq 0xc8(%rsp), %rdi
leaq 0x5(%rsp), %rdx
callq 0x56548
movb $0x1, %bpl
leaq 0xe8(%rsp), %rsi
leaq 0xc8(%rsp), %rdx
movq %r14, %rdi
callq 0x80690
xorl %ebp, %ebp
leaq 0x29a2a(%rip), %rsi     # 0xb1608
leaq -0x7485(%rip), %rdx     # 0x80760
movq %r14, %rdi
callq 0x52760
jmp 0x87dba
pushq $0x50
popq %rdi
callq 0x52220
movq %rax, %r14
leaq 0xb282(%rip), %rsi      # 0x92e86
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x56548
movb $0x1, %bpl
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x809b2
xorl %ebp, %ebp
leaq 0x29a09(%rip), %rsi     # 0xb1638
leaq -0x8910(%rip), %rdx     # 0x7f326
movq %r14, %rdi
callq 0x52760
jmp 0x87dba
movq %rax, %rbx
leaq 0x108(%rsp), %rdi
callq 0x52888
jmp 0x87c5b
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x128(%rsp), %rdi
callq 0x52888
jmp 0x87c70
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x8(%rsp), %rdi
callq 0x56fca
jmp 0x87ca4
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
callq 0x52888
jmp 0x87c94
movq %rax, %rbx
movb $0x1, %bpl
leaq 0xe8(%rsp), %rdi
jmp 0x87cb6
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x148(%rsp), %rdi
jmp 0x87cb6
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x52888
testb %bpl, %bpl
jne 0x87ccc
jmp 0x87e1c
jmp 0x87cc9
jmp 0x87cc9
movq %rax, %rbx
movq %r14, %rdi
callq 0x52350
jmp 0x87e1c
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x56fca
jmp 0x87e1c
movq %rax, %rbx
cmpl $0x1, %edx
jne 0x87e1c
movq %rbx, %rdi
callq 0x521b0
movl $0xa8, %edi
callq 0x52220
movq %rax, %r14
leaq 0xb173(%rip), %rsi      # 0x92e86
leaq 0xa8(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x56548
leaq 0x97a3(%rip), %rsi      # 0x914cf
leaq 0x88(%rsp), %rdi
leaq 0x5(%rsp), %rdx
callq 0x56548
leaq 0xa890(%rip), %rsi      # 0x925d5
leaq 0x68(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x56548
leaq 0x9774(%rip), %rsi      # 0x914cf
movq %r15, %rdi
callq 0x56e34
movq %rax, %rdi
callq 0x6f406
leaq 0x48(%rsp), %rdi
leaq 0x6(%rsp), %rdx
movq %rax, %rsi
callq 0x56548
movb $0x1, %bpl
leaq 0xa8(%rsp), %rsi
leaq 0x88(%rsp), %rdx
leaq 0x68(%rsp), %rcx
leaq 0x48(%rsp), %r8
movq %r14, %rdi
callq 0x8079c
xorl %ebp, %ebp
leaq 0x29875(%rip), %rsi     # 0xb1620
leaq -0x7424(%rip), %rdx     # 0x8098e
movq %r14, %rdi
callq 0x52760
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x52888
jmp 0x87dd1
jmp 0x87dcb
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x68(%rsp), %rdi
callq 0x52888
jmp 0x87de3
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x88(%rsp), %rdi
callq 0x52888
jmp 0x87df8
movq %rax, %rbx
movb $0x1, %bpl
leaq 0xa8(%rsp), %rdi
callq 0x52888
testb %bpl, %bpl
jne 0x87e0f
jmp 0x87e17
movq %rax, %rbx
movq %r14, %rdi
callq 0x52350
callq 0x52720
movq %rbx, %rdi
callq 0x527a0
movq %rax, %rdi
callq 0x56ca4