// File: Heptagon196[P]Gos/Reflection/ReflMgrInit.cpp
// Function: ReflMgrTool::InitBaseTypes()
void InitBaseTypes() {
        auto& mgr = ReflMgr::Instance();
#define DEFTYPE(type)                                           \
        ReflMgrTool::AutoRegister<type>();                      \
        DEFCTOR(type)                                           \

#define DEFSINGLE_BASE(type, op, meta) DEFSINGLE(type, { return op; }, meta)

#define DEFCTOR(type) DEFDOUBLE(type, { *self = other; return; }, ctor)

#define DEFDOUBLE(type, func, meta)                                                     \
        mgr.AddMethod<type>(                                                            \
            std::function([](type* self, const type& other) -> decltype(auto) func),    \
            MetaMethods::operator_ ## meta                                              \
        );

#define DEFSINGLE(type, func, meta)                                                     \
        mgr.AddMethod<type>(                                                            \
            std::function([](type* self) -> decltype(auto) func),                       \
            MetaMethods::operator_ ## meta                                              \
        );                                                                              \

        DEFTYPE(ObjectPtr);
        DEFTYPE(SharedObject);

#define DEFINT(num)                                                                     \
        DEFTYPE(num);                                                                   \

        DEFINT(int);
        DEFINT(char);
        DEFINT(size_t);
        DEFINT(int64_t);
        DEFTYPE(float);
        DEFTYPE(double);
        DEFTYPE(bool);

#define DEFVEC(type) DEFVEC_BASE(std::vector<type>, type)
#define DEFVEC_BASE(type, elem)                                         \
        ReflMgrTool::AutoRegister<type>();                              \
        AutoRegister<type::iterator>();                                 \
        DEFCTOR(type);                                                  \
        DEFSINGLE(type, {                                               \
            std::stringstream ss;                                       \
            printVec(ss, *self);                                        \
            return (std::string)(ss.str());                             \
        }, tostring)                                                    \

        /*
        DEFVEC(ObjectPtr);
        DEFVEC(SharedObject);
        DEFVEC(int);
        DEFVEC(float);
        DEFVEC(std::string);
        */
        DEFVEC(ReflMgr::Any);
        AutoRegister<std::string>();
        AutoRegister<std::string::iterator>();
        DEFSINGLE(std::string, {
            return std::string(*self);
        }, tostring);
        DEFCTOR(std::string);

        ReflMgrTool::AutoRegister<std::string_view>();
        ReflMgrTool::AutoRegister<std::string_view::iterator>();

#define DEFMAP(key, value)                                                      \
        do {                                                                    \
            using type = std::map<key, value>;                                  \
            AutoRegister<type>();                                               \
            AutoRegister<type::iterator>();                                     \
            DEFSINGLE(type, {                                                   \
                std::stringstream ss;                                           \
                printMap(ss, *self);                                            \
                return (std::string)(ss.str());                                 \
            }, tostring)                                                        \
        } while (0)

        DEFMAP(ReflMgr::Any, ReflMgr::Any);
        /*
#define DEFHASHMAP(key, value)                                                  \
        do {                                                                    \
            using type = std::unordered_map<key, value>;                        \
            AutoRegister<type>();                                               \
            AutoRegister<type::iterator>();                                     \
            DEFSINGLE(type, {                                                   \
                std::stringstream ss;                                           \
                printMap(ss, *self);                                            \
                return (std::string)(ss.str());                                 \
            }, tostring)                                                        \
        } while (0)

#define DEFMAP_FOR(type)                                \
        DEFMAP(type, int);                              \
        DEFMAP(type, float);                            \
        DEFMAP(type, std::string);                      \
        DEFMAP(type, SharedObject);                     \
        DEFMAP(type, ObjectPtr);                        \
        DEFMAP(type, ReflMgr::Any)

#define DEFHASHMAP_FOR(type)                            \
        DEFHASHMAP(type, int);                          \
        DEFHASHMAP(type, float);                        \
        DEFHASHMAP(type, std::string);                  \
        DEFHASHMAP(type, SharedObject);                 \
        DEFHASHMAP(type, ObjectPtr);                    \
        DEFHASHMAP(type, ReflMgr::Any)

        DEFMAP_FOR(int);
        DEFMAP_FOR(float);
        DEFMAP_FOR(std::string);
        DEFMAP_FOR(SharedObject);
        DEFMAP_FOR(ObjectPtr);

        DEFHASHMAP_FOR(int);
        DEFHASHMAP_FOR(float);
        DEFHASHMAP_FOR(std::string);
        */

#undef DEFMAP_FOR
#undef DEFMAP
#undef DEFINT
#undef DEFVEC_BASE
#undef DEFVEC
#undef DEFOBJ
#undef DEFSINGLE
#undef DEFDOUBLE
#undef DEFSINGLE_BASE
#undef DEFTYPE
#undef DEFCTOR
    }

// Assembly:
subq $0x478, %rsp            # imm = 0x478
callq 0x4a240
movq %rax, 0x470(%rsp)
callq 0x5b870
movq 0x470(%rsp), %rax
movq %rax, 0xd0(%rsp)
leaq 0x450(%rsp), %rdi
movq %rdi, 0xd8(%rsp)
leaq 0x44f(%rsp), %rsi
callq 0x244a0
movq 0xd0(%rsp), %rdi
movq 0xd8(%rsp), %rsi
movups 0x2d77f3(%rip), %xmm0   # 0x2fb4a0
movaps %xmm0, 0x430(%rsp)
movq 0x430(%rsp), %rdx
movq 0x438(%rsp), %rcx
callq 0x5c510
jmp 0x23ccc
leaq 0x450(%rsp), %rdi
callq 0x5c760
callq 0x5c770
movq 0x470(%rsp), %rax
movq %rax, 0xc0(%rsp)
leaq 0x400(%rsp), %rdi
movq %rdi, 0xc8(%rsp)
leaq 0x3ff(%rsp), %rsi
callq 0x24530
movq 0xc0(%rsp), %rdi
movq 0xc8(%rsp), %rsi
movups 0x2d777e(%rip), %xmm0   # 0x2fb4a0
movaps %xmm0, 0x3e0(%rsp)
movq 0x3e0(%rsp), %rdx
movq 0x3e8(%rsp), %rcx
callq 0x5d4b0
jmp 0x23d41
leaq 0x400(%rsp), %rdi
callq 0x5d700
callq 0x5d710
movq 0x470(%rsp), %rax
movq %rax, 0xb0(%rsp)
leaq 0x3c0(%rsp), %rdi
movq %rdi, 0xb8(%rsp)
leaq 0x3bf(%rsp), %rsi
callq 0x245c0
movq 0xb0(%rsp), %rdi
movq 0xb8(%rsp), %rsi
movups 0x2d7709(%rip), %xmm0   # 0x2fb4a0
movaps %xmm0, 0x3a0(%rsp)
movq 0x3a0(%rsp), %rdx
movq 0x3a8(%rsp), %rcx
callq 0x5e290
jmp 0x23db6
leaq 0x3c0(%rsp), %rdi
callq 0x5e4e0
callq 0x5e4f0
movq 0x470(%rsp), %rax
movq %rax, 0xa0(%rsp)
leaq 0x380(%rsp), %rdi
movq %rdi, 0xa8(%rsp)
leaq 0x37f(%rsp), %rsi
callq 0x24650
movq 0xa0(%rsp), %rdi
movq 0xa8(%rsp), %rsi
movups 0x2d7694(%rip), %xmm0   # 0x2fb4a0
movaps %xmm0, 0x360(%rsp)
movq 0x360(%rsp), %rdx
movq 0x368(%rsp), %rcx
callq 0x5efd0
jmp 0x23e2b
leaq 0x380(%rsp), %rdi
callq 0x5f220
callq 0x5f230
movq 0x470(%rsp), %rax
movq %rax, 0x90(%rsp)
leaq 0x340(%rsp), %rdi
movq %rdi, 0x98(%rsp)
leaq 0x33f(%rsp), %rsi
callq 0x246e0
movq 0x90(%rsp), %rdi
movq 0x98(%rsp), %rsi
movups 0x2d761f(%rip), %xmm0   # 0x2fb4a0
movaps %xmm0, 0x320(%rsp)
movq 0x320(%rsp), %rdx
movq 0x328(%rsp), %rcx
callq 0x5fdb0
jmp 0x23ea0
leaq 0x340(%rsp), %rdi
callq 0x60000
callq 0x60010
movq 0x470(%rsp), %rax
movq %rax, 0x80(%rsp)
leaq 0x300(%rsp), %rdi
movq %rdi, 0x88(%rsp)
leaq 0x2ff(%rsp), %rsi
callq 0x24770
movq 0x80(%rsp), %rdi
movq 0x88(%rsp), %rsi
movups 0x2d75aa(%rip), %xmm0   # 0x2fb4a0
movaps %xmm0, 0x2e0(%rsp)
movq 0x2e0(%rsp), %rdx
movq 0x2e8(%rsp), %rcx
callq 0x60b90
jmp 0x23f15
leaq 0x300(%rsp), %rdi
callq 0x60de0
callq 0x60df0
movq 0x470(%rsp), %rax
movq %rax, 0x70(%rsp)
leaq 0x2c0(%rsp), %rdi
movq %rdi, 0x78(%rsp)
leaq 0x2bf(%rsp), %rsi
callq 0x24800
movq 0x70(%rsp), %rdi
movq 0x78(%rsp), %rsi
movups 0x2d7541(%rip), %xmm0   # 0x2fb4a0
movaps %xmm0, 0x2a0(%rsp)
movq 0x2a0(%rsp), %rdx
movq 0x2a8(%rsp), %rcx
callq 0x618d0
jmp 0x23f7e
leaq 0x2c0(%rsp), %rdi
callq 0x61b20
callq 0x61b30
movq 0x470(%rsp), %rax
movq %rax, 0x60(%rsp)
leaq 0x280(%rsp), %rdi
movq %rdi, 0x68(%rsp)
leaq 0x27f(%rsp), %rsi
callq 0x24890
movq 0x60(%rsp), %rdi
movq 0x68(%rsp), %rsi
movups 0x2d74d8(%rip), %xmm0   # 0x2fb4a0
movaps %xmm0, 0x260(%rsp)
movq 0x260(%rsp), %rdx
movq 0x268(%rsp), %rcx
callq 0x62610
jmp 0x23fe7
leaq 0x280(%rsp), %rdi
callq 0x62860
callq 0x62870
movq 0x470(%rsp), %rax
movq %rax, 0x50(%rsp)
leaq 0x240(%rsp), %rdi
movq %rdi, 0x58(%rsp)
leaq 0x23f(%rsp), %rsi
callq 0x24920
movq 0x50(%rsp), %rdi
movq 0x58(%rsp), %rsi
movups 0x2d746f(%rip), %xmm0   # 0x2fb4a0
movaps %xmm0, 0x220(%rsp)
movq 0x220(%rsp), %rdx
movq 0x228(%rsp), %rcx
callq 0x63100
jmp 0x24050
leaq 0x240(%rsp), %rdi
callq 0x63350
callq 0x63360
callq 0x63c00
movq 0x470(%rsp), %rax
movq %rax, 0x40(%rsp)
leaq 0x200(%rsp), %rdi
movq %rdi, 0x48(%rsp)
leaq 0x1ff(%rsp), %rsi
callq 0x249b0
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
movups 0x2d7401(%rip), %xmm0   # 0x2fb4a0
movaps %xmm0, 0x1e0(%rsp)
movq 0x1e0(%rsp), %rdx
movq 0x1e8(%rsp), %rcx
callq 0x64490
jmp 0x240be
leaq 0x200(%rsp), %rdi
callq 0x646e0
movq 0x470(%rsp), %rax
movq %rax, 0x30(%rsp)
leaq 0x1c0(%rsp), %rdi
movq %rdi, 0x38(%rsp)
leaq 0x1bf(%rsp), %rsi
callq 0x24a40
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
movups 0x2d73ad(%rip), %xmm0   # 0x2fb4b0
movaps %xmm0, 0x1a0(%rsp)
movq 0x1a0(%rsp), %rdx
movq 0x1a8(%rsp), %rcx
callq 0x646f0
jmp 0x24122
leaq 0x1c0(%rsp), %rdi
callq 0x64940
callq 0x64950
callq 0x65320
movq 0x470(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x180(%rsp), %rdi
movq %rdi, 0x28(%rsp)
leaq 0x17f(%rsp), %rsi
callq 0x24ad0
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
movups 0x2d733f(%rip), %xmm0   # 0x2fb4b0
movaps %xmm0, 0x160(%rsp)
movq 0x160(%rsp), %rdx
movq 0x168(%rsp), %rcx
callq 0x65bb0
jmp 0x24190
leaq 0x180(%rsp), %rdi
callq 0x65e00
movq 0x470(%rsp), %rax
movq %rax, 0x10(%rsp)
leaq 0x140(%rsp), %rdi
movq %rdi, 0x18(%rsp)
leaq 0x13f(%rsp), %rsi
callq 0x24b60
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
movups 0x2d72cb(%rip), %xmm0   # 0x2fb4a0
movaps %xmm0, 0x120(%rsp)
movq 0x120(%rsp), %rdx
movq 0x128(%rsp), %rcx
callq 0x65e10
jmp 0x241f4
leaq 0x140(%rsp), %rdi
callq 0x66060
callq 0x66070
callq 0x66870
callq 0x67190
callq 0x679a0
movq 0x470(%rsp), %rax
movq %rax, (%rsp)
leaq 0x100(%rsp), %rdi
movq %rdi, 0x8(%rsp)
leaq 0xff(%rsp), %rsi
callq 0x24bf0
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
movups 0x2d7265(%rip), %xmm0   # 0x2fb4b0
movaps %xmm0, 0xe0(%rsp)
movq 0xe0(%rsp), %rdx
movq 0xe8(%rsp), %rcx
callq 0x67ea0
jmp 0x2426a
leaq 0x100(%rsp), %rdi
callq 0x680f0
addq $0x478, %rsp            # imm = 0x478
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
leaq 0x450(%rsp), %rdi
callq 0x5c760
jmp 0x24485
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
leaq 0x400(%rsp), %rdi
callq 0x5d700
jmp 0x24485
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
leaq 0x3c0(%rsp), %rdi
callq 0x5e4e0
jmp 0x24485
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
leaq 0x380(%rsp), %rdi
callq 0x5f220
jmp 0x24485
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
leaq 0x340(%rsp), %rdi
callq 0x60000
jmp 0x24485
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
leaq 0x300(%rsp), %rdi
callq 0x60de0
jmp 0x24485
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
leaq 0x2c0(%rsp), %rdi
callq 0x61b20
jmp 0x24485
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
leaq 0x280(%rsp), %rdi
callq 0x62860
jmp 0x24485
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
leaq 0x240(%rsp), %rdi
callq 0x63350
jmp 0x24485
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
leaq 0x200(%rsp), %rdi
callq 0x646e0
jmp 0x24485
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
leaq 0x1c0(%rsp), %rdi
callq 0x64940
jmp 0x24485
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
leaq 0x180(%rsp), %rdi
callq 0x65e00
jmp 0x24485
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
leaq 0x140(%rsp), %rdi
callq 0x66060
jmp 0x24485
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
leaq 0x100(%rsp), %rdi
callq 0x680f0
movq 0x428(%rsp), %rdi
callq 0x133f0
nopw %cs:(%rax,%rax)