// File: /workspace/github_cpp_makefile_star2_O3/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 0x7fade
leaq 0x99d3(%rip), %rsi      # 0x8942f
movq %r15, %rdi
callq 0x41392
cmpb $0x0, (%rax)
je 0x7fb42
leaq 0x99bb(%rip), %rsi      # 0x8942f
movq %r15, %rdi
callq 0x41392
leaq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x75d4a
movl 0x8(%rsp), %ebx
testq %rbx, %rbx
jne 0x7fbcd
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x4155c
movq %rbx, %rdi
callq 0x8032e
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x4861e
leaq 0x20(%rsp), %rdi
movzbl -0x8(%rdi), %esi
callq 0x486c0
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 0x78(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xaf8b(%rip), %rsi      # 0x8aa87
leaq 0xaf92(%rip), %rdx      # 0x8aa95
leaq 0x68(%rsp), %rdi
callq 0x44390
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x73c9e
movzbl 0x8(%rsp), %eax
cmpq $0x8, %rax
ja 0x7fc34
leaq 0x24037(%rip), %rcx     # 0xa3b70
movq (%rcx,%rax,8), %rbx
jmp 0x7fc3b
movl $0x68, %edi
callq 0x3a210
movq %rax, %r14
leaq 0x58(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xaf28(%rip), %rsi      # 0x8aa87
leaq 0xaf2f(%rip), %rdx      # 0x8aa95
leaq 0x48(%rsp), %rdi
callq 0x44390
leaq 0x118(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x98ab(%rip), %rsi      # 0x8942f
leaq 0x98a8(%rip), %rdx      # 0x89433
leaq 0x108(%rsp), %rdi
callq 0x44390
movb $0x1, %bpl
leaq 0x48(%rsp), %rsi
leaq 0x108(%rsp), %rdx
movq %r14, %rdi
callq 0x75298
xorl %ebp, %ebp
leaq 0x23717(%rip), %rsi     # 0xa32d0
leaq -0xa794(%rip), %rdx     # 0x7542c
movq %r14, %rdi
callq 0x3a760
jmp 0x7ff29
movl $0x50, %edi
callq 0x3a210
movq %rax, %r14
leaq 0xb8(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xae9a(%rip), %rsi      # 0x8aa87
leaq 0xaea1(%rip), %rdx      # 0x8aa95
leaq 0xa8(%rsp), %rdi
callq 0x44390
movb $0x1, %bpl
leaq 0xa8(%rsp), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x759b0
xorl %ebp, %ebp
leaq 0x236e0(%rip), %rsi     # 0xa3300
leaq -0xc4c1(%rip), %rdx     # 0x73766
movq %r14, %rdi
callq 0x3a760
jmp 0x7ff29
leaq 0x65c0(%rip), %rbx      # 0x861fb
leaq 0x158(%rsp), %r13
movq %r13, -0x10(%r13)
movq %rbx, %rdi
callq 0x3a1f0
leaq (%rax,%rbx), %rdx
leaq 0x148(%rsp), %rdi
movq %rbx, %rsi
callq 0x44390
movzbl (%r15), %eax
cmpq $0x8, %rax
ja 0x7fc7a
leaq 0x23efc(%rip), %rcx     # 0xa3b70
movq (%rcx,%rax,8), %rbx
jmp 0x7fc81
leaq 0x657a(%rip), %rbx      # 0x861fb
leaq 0x138(%rsp), %r15
movq %r15, -0x10(%r15)
movq %rbx, %rdi
callq 0x3a1f0
leaq (%rax,%rbx), %rdx
leaq 0x128(%rsp), %rdi
movq %rbx, %rsi
callq 0x44390
movb $0x1, %bpl
leaq 0x68(%rsp), %rsi
leaq 0x148(%rsp), %rdx
leaq 0x128(%rsp), %rcx
movq %r14, %rdi
callq 0x72fb0
xorl %ebp, %ebp
leaq 0x23466(%rip), %rsi     # 0xa3138
leaq -0xca55(%rip), %rdx     # 0x73284
movq %r14, %rdi
callq 0x3a760
jmp 0x7ff29
movq %rax, %rbx
movq 0x128(%rsp), %rdi
cmpq %r15, %rdi
je 0x7fd0e
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x3a480
jmp 0x7fd0e
movq %rax, %rbx
movb $0x1, %bpl
movq 0x148(%rsp), %rdi
cmpq %r13, %rdi
je 0x7fd33
movq 0x158(%rsp), %rsi
incq %rsi
callq 0x3a480
jmp 0x7fd33
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x8(%rsp), %rdi
callq 0x415d4
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x7fdd3
movq 0x78(%rsp), %rsi
jmp 0x7fdcb
movq %rax, %rbx
movq 0x108(%rsp), %rdi
cmpq %r12, %rdi
je 0x7fd72
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x3a480
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0x7fdd3
movq 0x58(%rsp), %rsi
jmp 0x7fdcb
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r15, %rdi
je 0x7fde4
movq 0x58(%rsp), %rsi
jmp 0x7fda9
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r12, %rdi
je 0x7fde4
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3a480
jmp 0x7fde4
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
cmpq %r15, %rdi
je 0x7fdd3
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x3a480
testb %bpl, %bpl
jne 0x7fde4
jmp 0x7ffe7
jmp 0x7fde1
jmp 0x7fde1
movq %rax, %rbx
movq %r14, %rdi
callq 0x3a340
jmp 0x7ffe7
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x415d4
jmp 0x7ffe7
movq %rax, %rbx
cmpl $0x1, %edx
jne 0x7ffe7
movq %rbx, %rdi
callq 0x3a1c0
movl $0xa8, %edi
callq 0x3a210
movq %rax, %r14
leaq 0x38(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xac52(%rip), %rsi      # 0x8aa87
leaq 0xac59(%rip), %rdx      # 0x8aa95
leaq 0x28(%rsp), %rdi
callq 0x44390
leaq 0xf8(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x95d6(%rip), %rsi      # 0x8942f
leaq 0x95d3(%rip), %rdx      # 0x89433
leaq 0xe8(%rsp), %rdi
callq 0x44390
leaq 0xd8(%rsp), %rbp
movq %rbp, -0x10(%rbp)
leaq 0xa4a5(%rip), %rsi      # 0x8a325
leaq 0xa4ab(%rip), %rdx      # 0x8a332
leaq 0xc8(%rsp), %rdi
callq 0x44390
leaq 0x9594(%rip), %rsi      # 0x8942f
movq %r15, %rdi
callq 0x41392
movzbl (%rax), %eax
cmpq $0x8, %rax
ja 0x7feb9
leaq 0x23cbd(%rip), %rcx     # 0xa3b70
movq (%rcx,%rax,8), %rbx
jmp 0x7fec0
leaq 0x633b(%rip), %rbx      # 0x861fb
leaq 0x98(%rsp), %rax
movq %rax, -0x10(%rax)
movq %rbx, %rdi
callq 0x3a1f0
leaq (%rax,%rbx), %rdx
leaq 0x88(%rsp), %rdi
movq %rbx, %rsi
callq 0x44390
movb $0x1, %r15b
leaq 0x28(%rsp), %rsi
leaq 0xe8(%rsp), %rdx
leaq 0xc8(%rsp), %rcx
leaq 0x88(%rsp), %r8
movq %r14, %rdi
callq 0x75496
xorl %r15d, %r15d
leaq 0x233ce(%rip), %rsi     # 0xa32e8
leaq -0xa61b(%rip), %rdx     # 0x75906
movq %r14, %rdi
callq 0x3a760
movq %rax, %rbx
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x7ff5b
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x3a480
jmp 0x7ff5b
jmp 0x7ff55
movq %rax, %rbx
movb $0x1, %r15b
movq 0xc8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x7ff80
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x3a480
jmp 0x7ff80
movq %rax, %rbx
movb $0x1, %r15b
movq 0xe8(%rsp), %rdi
cmpq %r13, %rdi
je 0x7ff9d
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x3a480
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x7ffb4
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3a480
testb %r15b, %r15b
jne 0x7ffda
jmp 0x7ffe2
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x7ffda
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3a480
jmp 0x7ffda
movq %rax, %rbx
movq %r14, %rdi
callq 0x3a340
callq 0x3a720
movq %rbx, %rdi
callq 0x3a790
movq %rax, %rdi
callq 0x4116b
nop