// File: /workspace/github_cpp_makefile_star2_O1/acliusBackHome[P]kamaya/dist/ParseType.cpp
// Function: ParseType::init()
void ParseType::init() {
//    T_UNKNOWN = 0,
//    T_BOOL = 1,
//    T_CHAR = 2,
//    T_SHORT = 3,
//    T_INT = 4,
//    T_LONG = 5,
//    T_FLOAT = 6,
//    T_DOUBLE = 7,
//    T_ENUM = 8,
//    T_VOID = 9,
    vector<ParseType> bases;
    bases.emplace_back(T_UNKNOWN);
    bases.emplace_back(T_BOOL);
    bases.emplace_back(T_CHAR);
    bases.emplace_back(T_SHORT);
    bases.emplace_back(T_INT);
    bases.emplace_back(T_LONG);
    bases.emplace_back(T_FLOAT);
    bases.emplace_back(T_DOUBLE);
    bases.emplace_back(T_ENUM);
    bases.emplace_back(T_VOID);
    for (const auto &each : bases) {
        type2id[each] = id2type.size();
        id2info.emplace_back(get_base_type_name((BaseType) id2type.size(), 0));
        id2type.emplace_back(each);
    }

    // 初始化可进行的自动类型转换
    // 普通运算
    for (size_t i = T_BOOL; i <= T_DOUBLE; ++i) {
        // 单目运算符
        for(size_t j = E_NOT; i <= E_BIT_NOT; ++i) {
            op_able.insert(pair<OpAble, size_t>(OpAble((ExpressionType)j, j, 0), j));
        }
        // 双目运算符, 只有相同类型的运算, 不同类型的运算可以通过搜索得知
        for (size_t j = E_ADD; j <= E_POW; ++j) {
            op_able.insert(pair<OpAble, size_t>(OpAble((ExpressionType) j, i, i), i));
        }
        // undefined表示可以直接自动类型转换
        for (size_t j = T_BOOL; j <= T_DOUBLE; ++j) {
            op_able.insert(pair<OpAble, size_t>(OpAble(E_UNDEFINED, i, j), j));
            // 赋值运算符赋值后的返回值是i
            op_able.insert(pair<OpAble, size_t>(OpAble(E_ASSIGN, i, j), i));
        }
    }
    // 逻辑运算符运算
    for (size_t i = E_LOGIC_OR; i <= E_LE; ++i) {
        op_able.insert(pair<OpAble, size_t>(OpAble((ExpressionType) i, T_BOOL, T_BOOL), T_BOOL));
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
xorps %xmm0, %xmm0
leaq -0x60(%rbp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq -0x48(%rbp), %rsi
movl $0x0, (%rsi)
callq 0x294c6
leaq -0x48(%rbp), %rsi
movl $0x1, (%rsi)
leaq -0x60(%rbp), %rdi
callq 0x294c6
leaq -0x48(%rbp), %rsi
movl $0x2, (%rsi)
leaq -0x60(%rbp), %rdi
callq 0x294c6
leaq -0x48(%rbp), %rsi
movl $0x3, (%rsi)
leaq -0x60(%rbp), %rdi
callq 0x294c6
leaq -0x48(%rbp), %rsi
movl $0x4, (%rsi)
leaq -0x60(%rbp), %rdi
callq 0x294c6
leaq -0x48(%rbp), %rsi
movl $0x5, (%rsi)
leaq -0x60(%rbp), %rdi
callq 0x294c6
leaq -0x48(%rbp), %rsi
movl $0x6, (%rsi)
leaq -0x60(%rbp), %rdi
callq 0x294c6
leaq -0x48(%rbp), %rsi
movl $0x7, (%rsi)
leaq -0x60(%rbp), %rdi
callq 0x294c6
leaq -0x48(%rbp), %rsi
movl $0x8, (%rsi)
leaq -0x60(%rbp), %rdi
callq 0x294c6
leaq -0x48(%rbp), %rsi
movl $0x9, (%rsi)
leaq -0x60(%rbp), %rdi
callq 0x294c6
movq -0x60(%rbp), %rbx
movq -0x58(%rbp), %r14
cmpq %r14, %rbx
je 0x28844
leaq -0x48(%rbp), %r15
movq 0x34b49(%rip), %r12     # 0x5d300
movq 0x34b3a(%rip), %r13     # 0x5d2f8
leaq 0x34b03(%rip), %rdi     # 0x5d2c8
movq %rbx, %rsi
callq 0x29506
subq %r13, %r12
sarq $0x3, %r12
movabsq $0x6db6db6db6db6db7, %rcx # imm = 0x6DB6DB6DB6DB6DB7
imulq %rcx, %r12
movq %r12, (%rax)
movq 0x34b14(%rip), %rax     # 0x5d300
subq 0x34b05(%rip), %rax     # 0x5d2f8
shrq $0x3, %rax
imull $0xb6db6db7, %eax, %esi # imm = 0xB6DB6DB7
movq %r15, %rdi
xorl %edx, %edx
callq 0x28072
leaq 0x34b02(%rip), %rdi     # 0x5d310
movq %r15, %rsi
callq 0x153ae
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x28828
callq 0x42b0
leaq 0x34ac9(%rip), %rdi     # 0x5d2f8
movq %rbx, %rsi
callq 0x2959a
addq $0x38, %rbx
cmpq %r14, %rbx
jne 0x287b0
movl $0x10, %r15d
movl $0xb, %r12d
leaq 0x34b01(%rip), %rbx     # 0x5d358
leaq -0x48(%rbp), %r14
movq $0x0, -0x48(%rbp)
movq %r12, -0x40(%rbp)
movl $0xb, -0x38(%rbp)
movq %r12, -0x30(%rbp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x29a08
decq %r15
jne 0x2885b
movq $-0x6, %r15
movl $0x11, %r12d
leaq 0x34ac2(%rip), %rbx     # 0x5d358
leaq -0x48(%rbp), %r14
leal 0xb(%r15), %eax
movq %r12, -0x48(%rbp)
movq %r12, -0x40(%rbp)
movl %eax, -0x38(%rbp)
movq %r12, -0x30(%rbp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x29a08
incq %r15
jne 0x2889a
movl $0x1, %r15d
leaq 0x34a8e(%rip), %rbx     # 0x5d358
leaq -0x48(%rbp), %r14
movl $0x11, %r12d
movq %r15, -0x48(%rbp)
movq $0x11, -0x40(%rbp)
movl $0x0, -0x38(%rbp)
movq %r15, -0x30(%rbp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x29a08
movq %r15, -0x48(%rbp)
movq %r12, -0x40(%rbp)
movl $0x19, -0x38(%rbp)
movq %r12, -0x30(%rbp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x29a08
incq %r15
cmpq $0x8, %r15
jne 0x288d4
movq $-0x8, %r15
movl $0x1, %r12d
leaq 0x34a27(%rip), %rbx     # 0x5d358
leaq -0x48(%rbp), %r14
leal 0x19(%r15), %eax
movq %r12, -0x48(%rbp)
movq %r12, -0x40(%rbp)
movl %eax, -0x38(%rbp)
movq %r12, -0x30(%rbp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x29a08
incq %r15
jne 0x28935
leaq -0x60(%rbp), %rdi
callq 0x2940c
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x289a7
jmp 0x289a7
jmp 0x289a7
jmp 0x289a7
jmp 0x289a7
jmp 0x289a7
jmp 0x289a7
jmp 0x289a7
jmp 0x289a7
jmp 0x289a7
jmp 0x289a7
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x289aa
callq 0x42b0
jmp 0x289aa
jmp 0x289a7
jmp 0x289a7
jmp 0x289a7
jmp 0x289a7
jmp 0x289a7
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x2940c
movq %rbx, %rdi
callq 0x4560
nop