// File: 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:
subq $0x298, %rsp            # imm = 0x298
movq %rdi, 0xb0(%rsp)
movq %rdi, 0x290(%rsp)
callq 0xd9b20
testb $0x1, %al
jne 0x169619
movb $0x1, 0x1ee(%rsp)
movl $0x88, %edi
callq 0xd02b0
movq %rax, 0xa0(%rsp)
leaq 0x26f(%rsp), %rdi
movq %rdi, 0xa8(%rsp)
callq 0xd0a20
movq 0xa8(%rsp), %rdx
leaq 0xf01c(%rip), %rsi      # 0x17842e
leaq 0x270(%rsp), %rdi
callq 0xd8b80
jmp 0x169421
leaq 0x218(%rsp), %rdi
callq 0x155e60
movq 0x218(%rsp), %rsi
movq 0x220(%rsp), %rdx
leaq 0x228(%rsp), %rdi
callq 0x15a2a0
jmp 0x16944d
leaq 0x228(%rsp), %rdi
callq 0x1302d0
movq %rax, 0x90(%rsp)
leaq 0x217(%rsp), %rdi
movq %rdi, 0x98(%rsp)
callq 0xd0a20
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rdx
leaq 0x238(%rsp), %rdi
callq 0xd8b80
jmp 0x169496
movq 0xb0(%rsp), %rdi
callq 0x1302d0
movq %rax, 0x80(%rsp)
leaq 0x1ef(%rsp), %rdi
movq %rdi, 0x88(%rsp)
callq 0xd0a20
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
leaq 0x1f0(%rsp), %rdi
callq 0xd8b80
jmp 0x1694df
movq 0xa0(%rsp), %rdi
leaq 0x270(%rsp), %rsi
leaq 0x238(%rsp), %rdx
leaq 0x1f0(%rsp), %rcx
callq 0x156180
jmp 0x169506
movq 0xa0(%rsp), %rdi
movb $0x0, 0x1ee(%rsp)
leaq 0x41f53(%rip), %rsi     # 0x1ab470
leaq -0x13194(%rip), %rdx    # 0x156390
callq 0xd09b0
jmp 0x169bb4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x260(%rsp)
movl %eax, 0x25c(%rsp)
jmp 0x1695ee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x260(%rsp)
movl %eax, 0x25c(%rsp)
jmp 0x1695e1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x260(%rsp)
movl %eax, 0x25c(%rsp)
jmp 0x1695c7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x260(%rsp)
movl %eax, 0x25c(%rsp)
jmp 0x1695ad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x260(%rsp)
movl %eax, 0x25c(%rsp)
leaq 0x1f0(%rsp), %rdi
callq 0xd0b38
leaq 0x1ef(%rsp), %rdi
callq 0xd0630
leaq 0x238(%rsp), %rdi
callq 0xd0b38
leaq 0x217(%rsp), %rdi
callq 0xd0630
leaq 0x228(%rsp), %rdi
callq 0xd9f30
leaq 0x270(%rsp), %rdi
callq 0xd0b38
leaq 0x26f(%rsp), %rdi
callq 0xd0630
testb $0x1, 0x1ee(%rsp)
jne 0x169607
jmp 0x169614
movq 0xa0(%rsp), %rdi
callq 0xd0430
jmp 0x169b9f
movq 0xb0(%rsp), %rdi
leaq 0xd60b(%rip), %rsi      # 0x176c33
callq 0xd9b40
movq %rax, %rdi
callq 0xd9da0
testb $0x1, %al
jne 0x16963e
jmp 0x16977f
movb $0x1, 0x19e(%rsp)
movl $0x68, %edi
callq 0xd02b0
movq %rax, 0x70(%rsp)
leaq 0x1c7(%rsp), %rdi
movq %rdi, 0x78(%rsp)
callq 0xd0a20
movq 0x78(%rsp), %rdx
leaq 0xedbb(%rip), %rsi      # 0x17842e
leaq 0x1c8(%rsp), %rdi
callq 0xd8b80
jmp 0x169682
leaq 0x19f(%rsp), %rdi
movq %rdi, 0x68(%rsp)
callq 0xd0a20
movq 0x68(%rsp), %rdx
leaq 0xd593(%rip), %rsi      # 0x176c33
leaq 0x1a0(%rsp), %rdi
callq 0xd8b80
jmp 0x1696af
movq 0x70(%rsp), %rdi
leaq 0x1c8(%rsp), %rsi
leaq 0x1a0(%rsp), %rdx
callq 0x15a2f0
jmp 0x1696cb
movq 0x70(%rsp), %rdi
movb $0x0, 0x19e(%rsp)
leaq 0x41ee1(%rip), %rsi     # 0x1ab5c0
leaq -0xf2b6(%rip), %rdx     # 0x15a430
callq 0xd09b0
jmp 0x169bb4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x260(%rsp)
movl %eax, 0x25c(%rsp)
jmp 0x169757
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x260(%rsp)
movl %eax, 0x25c(%rsp)
jmp 0x16973d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x260(%rsp)
movl %eax, 0x25c(%rsp)
leaq 0x1a0(%rsp), %rdi
callq 0xd0b38
leaq 0x19f(%rsp), %rdi
callq 0xd0630
leaq 0x1c8(%rsp), %rdi
callq 0xd0b38
leaq 0x1c7(%rsp), %rdi
callq 0xd0630
testb $0x1, 0x19e(%rsp)
jne 0x169770
jmp 0x16977a
movq 0x70(%rsp), %rdi
callq 0xd0430
jmp 0x169b9f
movq 0xb0(%rsp), %rdi
leaq 0xd4a5(%rip), %rsi      # 0x176c33
callq 0xd9b40
movq %rax, 0x60(%rsp)
jmp 0x16979a
movq 0x60(%rsp), %rdi
callq 0x15a470
movq %rax, 0x58(%rsp)
jmp 0x1697ab
movq 0x58(%rsp), %rax
movl %eax, 0x198(%rsp)
jmp 0x169a4f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x260(%rsp)
movl %eax, 0x25c(%rsp)
movl 0x25c(%rsp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x169b9f
movq 0x260(%rsp), %rdi
callq 0xd0210
movq %rax, 0x190(%rsp)
movb $0x1, 0xf6(%rsp)
movl $0xa8, %edi
callq 0xd02b0
movq %rax, 0x48(%rsp)
leaq 0x16f(%rsp), %rdi
movq %rdi, 0x50(%rsp)
callq 0xd0a20
movq 0x50(%rsp), %rdx
leaq 0xec00(%rip), %rsi      # 0x17842e
leaq 0x170(%rsp), %rdi
callq 0xd8b80
jmp 0x16983d
leaq 0x147(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0xd0a20
movq 0x40(%rsp), %rdx
leaq 0xd3d8(%rip), %rsi      # 0x176c33
leaq 0x148(%rsp), %rdi
callq 0xd8b80
jmp 0x16986a
leaq 0x11f(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0xd0a20
movq 0x38(%rsp), %rdx
leaq 0xe47d(%rip), %rsi      # 0x177d05
leaq 0x120(%rsp), %rdi
callq 0xd8b80
jmp 0x169897
movq 0xb0(%rsp), %rdi
leaq 0xd38d(%rip), %rsi      # 0x176c33
callq 0xd9b40
movq %rax, 0x30(%rsp)
jmp 0x1698b2
movq 0x30(%rsp), %rdi
callq 0x1302d0
movq %rax, 0x20(%rsp)
leaq 0xf7(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0xd0a20
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
leaq 0xf8(%rsp), %rdi
callq 0xd8b80
jmp 0x1698ec
movq 0x48(%rsp), %rdi
leaq 0x170(%rsp), %rsi
leaq 0x148(%rsp), %rdx
leaq 0x120(%rsp), %rcx
leaq 0xf8(%rsp), %r8
callq 0x15a4a0
jmp 0x169918
movq 0x48(%rsp), %rdi
movb $0x0, 0xf6(%rsp)
leaq 0x41cac(%rip), %rsi     # 0x1ab5d8
leaq -0xf193(%rip), %rdx     # 0x15a7a0
callq 0xd09b0
jmp 0x169bb4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x260(%rsp)
movl %eax, 0x25c(%rsp)
jmp 0x169a20
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x260(%rsp)
movl %eax, 0x25c(%rsp)
jmp 0x169a06
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x260(%rsp)
movl %eax, 0x25c(%rsp)
jmp 0x1699ec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x260(%rsp)
movl %eax, 0x25c(%rsp)
jmp 0x1699df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x260(%rsp)
movl %eax, 0x25c(%rsp)
jmp 0x1699d2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x260(%rsp)
movl %eax, 0x25c(%rsp)
leaq 0xf8(%rsp), %rdi
callq 0xd0b38
leaq 0xf7(%rsp), %rdi
callq 0xd0630
leaq 0x120(%rsp), %rdi
callq 0xd0b38
leaq 0x11f(%rsp), %rdi
callq 0xd0630
leaq 0x148(%rsp), %rdi
callq 0xd0b38
leaq 0x147(%rsp), %rdi
callq 0xd0630
leaq 0x170(%rsp), %rdi
callq 0xd0b38
leaq 0x16f(%rsp), %rdi
callq 0xd0630
testb $0x1, 0xf6(%rsp)
jne 0x169a39
jmp 0x169a43
movq 0x48(%rsp), %rdi
callq 0xd0430
callq 0xd0940
jmp 0x169a4a
jmp 0x169b9f
cmpl $0x0, 0x198(%rsp)
jne 0x169ac4
movq 0xb0(%rsp), %rsi
leaq 0xe0(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0xd9dc0
movq 0x10(%rsp), %rdi
callq 0x16a070
movq %rax, 0x18(%rsp)
jmp 0x169a84
leaq 0xe0(%rsp), %rdi
callq 0xd9f30
movq 0x18(%rsp), %rax
addq $0x298, %rsp            # imm = 0x298
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x260(%rsp)
movl %eax, 0x25c(%rsp)
leaq 0xe0(%rsp), %rdi
callq 0xd9f30
jmp 0x169b9f
movb $0x1, 0xbe(%rsp)
movl $0x50, %edi
callq 0xd02b0
movq %rax, (%rsp)
leaq 0xbf(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0xd0a20
movq 0x8(%rsp), %rdx
leaq 0xe936(%rip), %rsi      # 0x17842e
leaq 0xc0(%rsp), %rdi
callq 0xd8b80
jmp 0x169b07
movq (%rsp), %rdi
movl 0x198(%rsp), %eax
movl %eax, %edx
leaq 0xc0(%rsp), %rsi
callq 0x15a7e0
jmp 0x169b23
movq (%rsp), %rdi
movb $0x0, 0xbe(%rsp)
leaq 0x41aba(%rip), %rsi     # 0x1ab5f0
leaq -0xf1fd(%rip), %rdx     # 0x15a940
callq 0xd09b0
jmp 0x169bb4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x260(%rsp)
movl %eax, 0x25c(%rsp)
jmp 0x169b7b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x260(%rsp)
movl %eax, 0x25c(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0xd0b38
leaq 0xbf(%rsp), %rdi
callq 0xd0630
testb $0x1, 0xbe(%rsp)
jne 0x169b94
jmp 0x169b9d
movq (%rsp), %rdi
callq 0xd0430
jmp 0x169b9f
movq 0x260(%rsp), %rdi
callq 0xd0a10
movq %rax, %rdi
callq 0xd9890
nopw %cs:(%rax,%rax)
nop