// File: /workspace/github_cpp_makefile_star2_O2/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)
andq $0x0, 0x10(%rdi)
leaq -0x48(%rbp), %rsi
andl $0x0, (%rsi)
callq 0x22a0e
leaq -0x48(%rbp), %rsi
movl $0x1, (%rsi)
leaq -0x60(%rbp), %rdi
callq 0x22a0e
leaq -0x48(%rbp), %rsi
movl $0x2, (%rsi)
leaq -0x60(%rbp), %rdi
callq 0x22a0e
leaq -0x48(%rbp), %rsi
movl $0x3, (%rsi)
leaq -0x60(%rbp), %rdi
callq 0x22a0e
leaq -0x48(%rbp), %rsi
movl $0x4, (%rsi)
leaq -0x60(%rbp), %rdi
callq 0x22a0e
leaq -0x48(%rbp), %rsi
movl $0x5, (%rsi)
leaq -0x60(%rbp), %rdi
callq 0x22a0e
leaq -0x48(%rbp), %rsi
movl $0x6, (%rsi)
leaq -0x60(%rbp), %rdi
callq 0x22a0e
leaq -0x48(%rbp), %rsi
movl $0x7, (%rsi)
leaq -0x60(%rbp), %rdi
callq 0x22a0e
leaq -0x48(%rbp), %rsi
movl $0x8, (%rsi)
leaq -0x60(%rbp), %rdi
callq 0x22a0e
leaq -0x48(%rbp), %rsi
movl $0x9, (%rsi)
leaq -0x60(%rbp), %rdi
callq 0x22a0e
movq -0x60(%rbp), %rbx
movq -0x58(%rbp), %r12
leaq -0x48(%rbp), %r15
cmpq %r12, %rbx
je 0x21fe3
movq 0x32365(%rip), %r14     # 0x542d0
movq 0x32356(%rip), %r13     # 0x542c8
leaq 0x3231f(%rip), %rdi     # 0x54298
movq %rbx, %rsi
callq 0x22a46
movq %rax, %rcx
subq %r13, %r14
movq %r14, %rax
cqto
pushq $0x38
popq %rsi
idivq %rsi
movq %rax, (%rcx)
movq 0x32334(%rip), %rax     # 0x542d0
subq 0x32325(%rip), %rax     # 0x542c8
cqto
idivq %rsi
movq %r15, %rdi
movl %eax, %esi
xorl %edx, %edx
callq 0x21a90
leaq 0x32325(%rip), %rdi     # 0x542e0
movq %r15, %rsi
callq 0x12f32
movq %r15, %rdi
callq 0x4598
leaq 0x322f6(%rip), %rdi     # 0x542c8
movq %rbx, %rsi
callq 0x22ab0
addq $0x38, %rbx
jmp 0x21f5f
pushq $0x1
popq %r15
movb $0x1, %al
leaq 0x32338(%rip), %rbx     # 0x54328
leaq -0x48(%rbp), %r14
pushq $0x11
popq %r12
pushq $0xb
popq %r13
testb $0x1, %al
je 0x220b4
addq $-0x11, %r15
testq %r15, %r15
je 0x22031
andq $0x0, -0x48(%rbp)
movq %r13, -0x40(%rbp)
movl $0xb, -0x38(%rbp)
movq %r13, -0x30(%rbp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x22fca
incq %r15
jmp 0x22008
pushq $-0x6
popq %r15
testq %r15, %r15
je 0x2205d
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 0x22fca
incq %r15
jmp 0x22035
pushq $0x1
popq %r15
cmpq $0x8, %r15
je 0x220a9
movq %r15, -0x48(%rbp)
movq $0x11, -0x40(%rbp)
andl $0x0, -0x38(%rbp)
movq %r15, -0x30(%rbp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x22fca
movq %r15, -0x48(%rbp)
movq %r12, -0x40(%rbp)
movl $0x19, -0x38(%rbp)
movq %r12, -0x30(%rbp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x22fca
incq %r15
jmp 0x22061
xorl %eax, %eax
pushq $0x12
popq %r15
jmp 0x21ffc
pushq $-0x8
popq %r15
pushq $0x1
popq %r12
leaq 0x32265(%rip), %rbx     # 0x54328
leaq -0x48(%rbp), %r14
testq %r15, %r15
je 0x220ef
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 0x22fca
incq %r15
jmp 0x220c7
leaq -0x60(%rbp), %rdi
callq 0x22996
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x22135
jmp 0x22135
jmp 0x22135
jmp 0x22135
jmp 0x22135
jmp 0x22135
jmp 0x22135
jmp 0x22135
jmp 0x22135
jmp 0x22135
jmp 0x22135
jmp 0x22135
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x4598
jmp 0x22138
jmp 0x22135
jmp 0x22135
jmp 0x22135
jmp 0x22135
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x22996
movq %rbx, %rdi
callq 0x4500
nop