// File: /workspace/github_cpp_makefile_star2_O1/davidsun[P]TinyCompiler/LRAnalytics.cpp
// Function: LRAnalytics::genTable[abi:cxx11]() const
vector <vector <string> > LRAnalytics::genTable() const{
    vector <ItemSet> states = genStates();
    vector <vector <string> > ret;
    ret.push_back(vector <string>());
    const string &str = getTerminals() + getNonTerminals();
    for (int i = 0; i < str.size(); i ++) ret[0].push_back(string() + str[i]);
    for (int i = 0; i < states.size(); i ++){
        vector <string> newJump;
        for (int j = 0; j < str.size(); j ++){
            ItemSet newSet = states[i].advance(str[j], _rules);
            if (newSet.getItems().size() > 0){
                for (int k = 0; k < states.size(); k ++){
                    if (states[k] == newSet){
                        newJump.push_back("s" + Utils::toString(k));
                        break;
                    }
                }
            }  else {
                newJump.push_back("");
            }
        }
        ret.push_back(newJump);
    }
    for (int i = 0; i < states.size(); i ++){
        const vector <Item> &items = states[i].getItems();
        int found = 0;
        for (int j = 0; j < items.size(); j ++){
            if (items[j].position != items[j].right_side.length()) continue;
            for (int k = 0; k < _rules.size(); k ++){
                if (items[j].left_side == _rules[k].left_side && items[j].right_side == _rules[k].right_side){
                    found ++;
                    if (k == 0){
                        for (int l = 0; l < ret[i + 1].size(); l ++)
                            if (str[l] == INPUT_END_LETTER) ret[i + 1][l] = "acc";
                    }  else {
                        /*
                         * Notice here, here r is added to all items in this row for convenience, but not to FOLLOW(state) in normal cases.
                         */
                        int t_size = getTerminals().size();
                        for (int l = 0; l < t_size; l ++) 
                            if (ret[i + 1][l] == "") ret[i + 1][l] = "r" + Utils::toString(k);
                    }
                }
            }
        }
        if (found > 1) fprintf(stderr, "WARNING: wrong grammar!\n");
    }
    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x80(%rsp), %rdi
callq 0x44be
xorl %eax, %eax
movq %rax, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
leaq 0x60(%rsp), %rsi
movq %rax, 0x10(%rsi)
movaps %xmm0, (%rsi)
movq %rbx, 0x28(%rsp)
movq %rbx, %rdi
callq 0x6010
leaq 0x60(%rsp), %rdi
callq 0x5840
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x4710
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
callq 0x4658
leaq 0x18(%rsp), %rbx
movq -0x10(%rbx), %rcx
movq -0x8(%rbx), %r8
movq 0x38(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %esi
cmpq %rbx, %rcx
je 0x4862
movq 0x18(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x4881
leaq 0x40(%rsp), %rdi
movl $0xf, %esi
cmpq %rdi, -0x10(%rdi)
je 0x487c
movq 0x40(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x4892
movq 0x30(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x20a0
jmp 0x48a0
leaq 0x30(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x21f0
leaq 0x70(%rsp), %rdx
movq %rdx, -0x10(%rdx)
movq (%rax), %rsi
leaq 0x10(%rax), %rcx
cmpq %rcx, %rsi
je 0x48c4
movq %rsi, 0x60(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x70(%rsp)
jmp 0x48ca
movups (%rcx), %xmm0
movups %xmm0, (%rdx)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x68(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4902
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x21b0
movq %r14, 0xa0(%rsp)
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x4921
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21b0
cmpq $0x0, 0x68(%rsp)
je 0x4a0b
xorl %ebx, %ebx
leaq 0x30(%rsp), %r15
leaq 0x8(%rsp), %r12
movq 0x28(%rsp), %rax
movq (%rax), %r13
leaq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
movq $0x0, 0x38(%rsp)
movb $0x0, 0x40(%rsp)
movq 0x60(%rsp), %rax
movsbl (%rax,%rbx), %r8d
movl $0x1, %ecx
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2320
leaq 0x18(%rsp), %rsi
movq %rsi, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x499c
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x49a2
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %r13, %rdi
movq %r12, %rsi
callq 0x624e
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x49e1
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21b0
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x49fd
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x21b0
incq %rbx
cmpq %rbx, 0x68(%rsp)
ja 0x4939
movq 0x88(%rsp), %rax
movabsq $-0x5555555555555555, %r14 # imm = 0xAAAAAAAAAAAAAAAB
cmpq 0x80(%rsp), %rax
je 0x4c95
movq 0xa0(%rsp), %rax
addq $0x20, %rax
movq %rax, 0x98(%rsp)
movq $0x0, 0x50(%rsp)
leaq 0xe0(%rsp), %r13
leaq 0x30(%rsp), %r15
xorps %xmm0, %xmm0
movaps %xmm0, 0xc0(%rsp)
movq $0x0, 0xd0(%rsp)
cmpq $0x0, 0x68(%rsp)
je 0x4c40
movq 0x50(%rsp), %rax
leaq (%rax,%rax,2), %rax
shlq $0x3, %rax
movq %rax, 0xb0(%rsp)
xorl %r12d, %r12d
movq 0x80(%rsp), %rsi
addq 0xb0(%rsp), %rsi
movq 0x60(%rsp), %rax
movsbl (%rax,%r12), %edx
movq %r13, %rdi
movq 0x98(%rsp), %rcx
callq 0x2c32
movq %r13, %rdi
callq 0x2f14
movq %r15, %r14
movq 0x8(%rax), %rcx
cmpq (%rax), %rcx
je 0x4b2d
movq 0x80(%rsp), %rdi
cmpq %rdi, 0x88(%rsp)
je 0x4c27
xorl %ebx, %ebx
xorl %ebp, %ebp
addq %rbx, %rdi
movq %r13, %rsi
callq 0x2f18
testb %al, %al
jne 0x4b76
incq %rbp
movq 0x80(%rsp), %rdi
movq 0x88(%rsp), %rax
subq %rdi, %rax
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
addq $0x18, %rbx
cmpq %rbp, %rax
ja 0x4ae8
jmp 0x4c27
leaq 0x18(%rsp), %rbx
movq %rbx, 0x8(%rsp)
leaq 0x8(%rsp), %rbp
movq %rbp, %rdi
leaq 0xb710(%rip), %rdx      # 0x10256
movq %rdx, %rsi
callq 0x299a
leaq 0xc0(%rsp), %rdi
movq %rbp, %rsi
callq 0x624e
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x4c27
movq 0x18(%rsp), %rsi
jmp 0x4c1f
movq %r14, %r15
movq %r14, %rdi
movl %ebp, %esi
callq 0x290a
leaq 0x18(%rsp), %rbx
movl $0x1, %r8d
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0xb727(%rip), %rcx      # 0x102c3
callq 0x21f0
movq %rbx, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x4bc4
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x4bca
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0xc0(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x624e
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x4c0b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21b0
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x4c27
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x21b0
movq %r13, %rdi
callq 0x32c8
incq %r12
cmpq %r12, 0x68(%rsp)
movq %r14, %r15
ja 0x4a90
movq 0x28(%rsp), %rdi
leaq 0xc0(%rsp), %rbx
movq %rbx, %rsi
callq 0x589c
movq %rbx, %rdi
callq 0x5840
movq 0x88(%rsp), %rax
subq 0x80(%rsp), %rax
movq 0x50(%rsp), %rdx
incq %rdx
sarq $0x3, %rax
movabsq $-0x5555555555555555, %r14 # imm = 0xAAAAAAAAAAAAAAAB
imulq %r14, %rax
movq %rdx, 0x50(%rsp)
cmpq %rdx, %rax
ja 0x4a55
movq 0x80(%rsp), %rax
cmpq %rax, 0x88(%rsp)
movq 0xa0(%rsp), %r15
je 0x4ff2
xorl %edx, %edx
leaq 0xb59a(%rip), %r13      # 0x10256
leaq 0x30(%rsp), %rbp
movq %rdx, 0xb8(%rsp)
leaq (%rdx,%rdx,2), %rcx
movq %rcx, 0x98(%rsp)
leaq (%rax,%rcx,8), %rdi
callq 0x2f14
movq %rax, %rbx
movq (%rax), %rax
cmpq %rax, 0x8(%rbx)
je 0x4fba
movq 0xb8(%rsp), %rcx
incq %rcx
movq %rcx, 0xb0(%rsp)
xorl %edx, %edx
movl $0x0, 0x5c(%rsp)
movq %rbx, 0xa8(%rsp)
leaq (%rdx,%rdx,2), %rsi
shlq $0x4, %rsi
movslq 0x28(%rax,%rsi), %rcx
cmpq %rcx, 0x10(%rax,%rsi)
movq %rdx, 0xd8(%rsp)
jne 0x4f8d
movq 0x20(%r15), %rax
cmpq %rax, 0x28(%r15)
je 0x4f8d
movq %rsi, 0x50(%rsp)
xorl %r12d, %r12d
movq (%rbx), %rcx
movq 0x50(%rsp), %rdi
movb (%rcx,%rdi), %sil
leaq (%r12,%r12,2), %rdx
shlq $0x4, %rdx
cmpb (%rax,%rdx), %sil
jne 0x4f6e
addq %rdi, %rcx
addq %rdx, %rax
movq 0x10(%rcx), %rdx
cmpq 0x10(%rax), %rdx
jne 0x4f6e
testq %rdx, %rdx
je 0x4d95
movq 0x8(%rax), %rsi
movq 0x8(%rcx), %rdi
callq 0x21c0
testl %eax, %eax
jne 0x4f6e
incl 0x5c(%rsp)
testq %r12, %r12
je 0x4ee6
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x4710
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rbx
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4dd0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21b0
testl %ebx, %ebx
jle 0x4f66
andl $0x7fffffff, %ebx       # imm = 0x7FFFFFFF
xorl %r15d, %r15d
movq 0x28(%rsp), %rax
movq (%rax), %rax
movq 0xb0(%rsp), %rcx
leaq (%rcx,%rcx,2), %r14
movq (%rax,%r14,8), %rdi
addq %r15, %rdi
movq %r13, %rsi
callq 0x2090
testl %eax, %eax
jne 0x4ecf
movq %rbp, %rdi
movl %r12d, %esi
callq 0x290a
movl $0x1, %r8d
movq %rbp, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0xb2ac(%rip), %rcx      # 0x100d7
callq 0x21f0
movq %r13, %rbp
leaq 0x18(%rsp), %r13
movq %r13, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x4e5b
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x4e63
movups (%rcx), %xmm0
movups %xmm0, (%r13)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x28(%rsp), %rax
movq (%rax), %rax
movq (%rax,%r14,8), %rdi
addq %r15, %rdi
leaq 0x8(%rsp), %rsi
callq 0x2210
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x4eab
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21b0
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
movq %rbp, %r13
je 0x4eca
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x21b0
leaq 0x30(%rsp), %rbp
addq $0x20, %r15
decq %rbx
jne 0x4de1
movq 0xa0(%rsp), %r15
jmp 0x4f5c
movq 0x28(%rsp), %rax
movq (%rax), %rax
movq 0x98(%rsp), %rcx
movq 0x18(%rax,%rcx,8), %rdi
cmpq %rdi, 0x20(%rax,%rcx,8)
je 0x4f6e
xorl %ebx, %ebx
xorl %r14d, %r14d
movq 0x60(%rsp), %rax
cmpb $0x24, (%rax,%r14)
jne 0x4f2f
movq 0x8(%rdi,%rbx), %rdx
addq %rbx, %rdi
movl $0x3, %r8d
xorl %esi, %esi
leaq 0xb1a9(%rip), %rcx      # 0x100d3
callq 0x2270
incq %r14
movq 0x28(%rsp), %rax
movq (%rax), %rax
movq 0x98(%rsp), %rcx
movq 0x18(%rax,%rcx,8), %rdi
movq 0x20(%rax,%rcx,8), %rax
subq %rdi, %rax
sarq $0x5, %rax
addq $0x20, %rbx
cmpq %r14, %rax
ja 0x4f07
movabsq $-0x5555555555555555, %r14 # imm = 0xAAAAAAAAAAAAAAAB
movq 0xa8(%rsp), %rbx
incq %r12
movq 0x20(%r15), %rax
movq 0x28(%r15), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
imulq %r14, %rcx
cmpq %r12, %rcx
ja 0x4d49
movq 0xd8(%rsp), %rdx
incq %rdx
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
imulq %r14, %rcx
cmpq %rdx, %rcx
ja 0x4d13
cmpl $0x1, 0x5c(%rsp)
jg 0x4feb
movq 0xb8(%rsp), %rdx
incq %rdx
movq 0x80(%rsp), %rax
movq 0x88(%rsp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
imulq %r14, %rcx
cmpq %rdx, %rcx
ja 0x4cc1
jmp 0x4ff2
callq 0x240f
jmp 0x4fba
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x500d
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x21b0
leaq 0x80(%rsp), %rdi
callq 0x57fe
movq 0x28(%rsp), %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5054
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x21b0
jmp 0x5054
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x517f
movq 0x18(%rsp), %rsi
jmp 0x5177
movq %rax, %r14
jmp 0x517f
movq %rax, %r14
leaq 0x60(%rsp), %rdi
callq 0x5840
jmp 0x517f
jmp 0x5140
jmp 0x5118
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x5148
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21b0
jmp 0x5148
jmp 0x5145
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x50e0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21b0
jmp 0x50e0
movq %rax, %r14
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x5124
movq 0x40(%rsp), %rsi
jmp 0x510a
jmp 0x5121
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x5124
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21b0
jmp 0x5124
jmp 0x5121
jmp 0x5140
movq %rax, %r14
jmp 0x5131
jmp 0x5121
jmp 0x5140
movq %rax, %r14
leaq 0xe0(%rsp), %rdi
callq 0x32c8
leaq 0xc0(%rsp), %rdi
callq 0x5840
jmp 0x5164
movq %rax, %r14
jmp 0x5164
movq %rax, %r14
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x5164
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x21b0
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x517f
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x21b0
movq 0x28(%rsp), %rdi
callq 0x58c8
leaq 0x80(%rsp), %rdi
callq 0x57fe
movq %r14, %rdi
callq 0x22f0