// File: /workspace/github_cpp_makefile_star2_O3/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 0x88(%rsp), %rdi
callq 0x4466
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 0x6000
leaq 0x60(%rsp), %rdi
callq 0x57a8
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x46c0
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
callq 0x4608
leaq 0x18(%rsp), %rbx
movq -0x10(%rbx), %rcx
movq -0x8(%rbx), %r8
movq 0x38(%rsp), %rdx
leaq (%rdx,%r8), %rax
movl $0xf, %edi
cmpq %rbx, %rcx
je 0x4812
movq 0x18(%rsp), %rdi
movq 0x30(%rsp), %rsi
cmpq %rdi, %rax
jbe 0x4835
leaq 0x40(%rsp), %r9
movl $0xf, %edi
cmpq %r9, %rsi
je 0x4830
movq 0x40(%rsp), %rdi
cmpq %rdi, %rax
jbe 0x4841
leaq 0x8(%rsp), %rdi
callq 0x20a0
jmp 0x484f
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 0x4873
movq %rsi, 0x60(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x70(%rsp)
jmp 0x4879
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 0x48b1
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x21b0
movq %r14, 0xa0(%rsp)
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x48d0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21b0
cmpq $0x0, 0x68(%rsp)
je 0x49ba
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 0x494b
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x4951
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 0x6228
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4990
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21b0
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x49ac
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x21b0
incq %rbx
cmpq %rbx, 0x68(%rsp)
ja 0x48e8
movq 0x88(%rsp), %rax
movq 0x90(%rsp), %rcx
movabsq $-0x5555555555555555, %r14 # imm = 0xAAAAAAAAAAAAAAAB
cmpq %rax, %rcx
je 0x4c4d
movq 0xa0(%rsp), %rax
addq $0x20, %rax
movq %rax, 0x80(%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 0x4bf2
movq 0x50(%rsp), %rax
leaq (%rax,%rax,2), %rax
shlq $0x3, %rax
movq %rax, 0xb0(%rsp)
xorl %r12d, %r12d
movq 0x88(%rsp), %rsi
addq 0xb0(%rsp), %rsi
movq 0x60(%rsp), %rax
movsbl (%rax,%r12), %edx
movq %r13, %rdi
movq 0x80(%rsp), %rcx
callq 0x2b2e
movq %r13, %rdi
callq 0x2db8
movq %r15, %r14
movq 0x8(%rax), %rcx
cmpq (%rax), %rcx
je 0x4adf
movq 0x88(%rsp), %rdi
cmpq %rdi, 0x90(%rsp)
je 0x4bd9
xorl %ebx, %ebx
xorl %ebp, %ebp
addq %rbx, %rdi
movq %r13, %rsi
callq 0x2dbc
testb %al, %al
jne 0x4b28
incq %rbp
movq 0x88(%rsp), %rdi
movq 0x90(%rsp), %rax
subq %rdi, %rax
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
addq $0x18, %rbx
cmpq %rbp, %rax
ja 0x4a9a
jmp 0x4bd9
leaq 0x18(%rsp), %rbx
movq %rbx, 0x8(%rsp)
leaq 0x8(%rsp), %rbp
movq %rbp, %rdi
leaq 0xb75e(%rip), %rdx      # 0x10256
movq %rdx, %rsi
callq 0x2892
leaq 0xc0(%rsp), %rdi
movq %rbp, %rsi
callq 0x6228
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x4bd9
movq 0x18(%rsp), %rsi
jmp 0x4bd1
movq %r14, %r15
movq %r14, %rdi
movl %ebp, %esi
callq 0x2802
leaq 0x18(%rsp), %rbx
movl $0x1, %r8d
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0xb775(%rip), %rcx      # 0x102c3
callq 0x21f0
movq %rbx, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x4b76
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x4b7c
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 0x6228
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x4bbd
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21b0
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x4bd9
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x21b0
movq %r13, %rdi
callq 0x3190
incq %r12
cmpq %r12, 0x68(%rsp)
movq %r14, %r15
ja 0x4a42
movq 0x28(%rsp), %rdi
leaq 0xc0(%rsp), %rbx
movq %rbx, %rsi
callq 0x5806
movq %rbx, %rdi
callq 0x57a8
movq 0x50(%rsp), %rdi
incq %rdi
movq 0x88(%rsp), %rax
movq 0x90(%rsp), %rcx
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x5555555555555555, %r14 # imm = 0xAAAAAAAAAAAAAAAB
imulq %r14, %rdx
movq %rdi, 0x50(%rsp)
cmpq %rdi, %rdx
ja 0x4a07
cmpq %rax, %rcx
movq 0xa0(%rsp), %r15
je 0x4fa1
xorl %edx, %edx
leaq 0xb5ef(%rip), %r13      # 0x10256
leaq 0x30(%rsp), %rbp
movq %rdx, 0xb8(%rsp)
leaq (%rdx,%rdx,2), %rcx
movq %rcx, 0x80(%rsp)
leaq (%rax,%rcx,8), %rdi
callq 0x2db8
movq %rax, %rbx
movq (%rax), %rax
movq 0x8(%rbx), %rcx
cmpq %rax, %rcx
je 0x4f69
movq 0xb8(%rsp), %rdx
incq %rdx
movq %rdx, 0xb0(%rsp)
xorl %edi, %edi
movl $0x0, 0x5c(%rsp)
movq %rbx, 0xa8(%rsp)
leaq (%rdi,%rdi,2), %r8
shlq $0x4, %r8
movslq 0x28(%rax,%r8), %rdx
cmpq %rdx, 0x10(%rax,%r8)
jne 0x4f48
movq 0x20(%r15), %rsi
cmpq %rsi, 0x28(%r15)
je 0x4f48
movq %r8, 0x50(%rsp)
movq %rdi, 0xd8(%rsp)
xorl %r12d, %r12d
movq (%rbx), %rax
movq 0x50(%rsp), %rdi
movb (%rax,%rdi), %dl
leaq (%r12,%r12,2), %rcx
shlq $0x4, %rcx
cmpb (%rsi,%rcx), %dl
jne 0x4f1a
addq %rdi, %rax
addq %rcx, %rsi
movq 0x10(%rax), %rdx
cmpq 0x10(%rsi), %rdx
jne 0x4f1a
testq %rdx, %rdx
je 0x4d41
movq 0x8(%rsi), %rsi
movq 0x8(%rax), %rdi
callq 0x21c0
testl %eax, %eax
jne 0x4f1a
incl 0x5c(%rsp)
testq %r12, %r12
je 0x4e92
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x46c0
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rbx
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4d7c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21b0
testl %ebx, %ebx
jle 0x4f12
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 0x4e7b
movq %rbp, %rdi
movl %r12d, %esi
callq 0x2802
movl $0x1, %r8d
movq %rbp, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0xb300(%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 0x4e07
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x4e0f
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 0x4e57
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21b0
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
movq %rbp, %r13
je 0x4e76
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x21b0
leaq 0x30(%rsp), %rbp
addq $0x20, %r15
decq %rbx
jne 0x4d8d
movq 0xa0(%rsp), %r15
jmp 0x4f08
movq 0x28(%rsp), %rax
movq (%rax), %rax
movq 0x80(%rsp), %rcx
movq 0x18(%rax,%rcx,8), %rdi
cmpq %rdi, 0x20(%rax,%rcx,8)
je 0x4f1a
xorl %ebx, %ebx
xorl %r14d, %r14d
movq 0x60(%rsp), %rcx
cmpb $0x24, (%rcx,%r14)
jne 0x4ee3
movq 0x8(%rdi,%rbx), %rdx
addq %rbx, %rdi
movl $0x3, %r8d
xorl %esi, %esi
leaq 0xb1fd(%rip), %rcx      # 0x100d3
callq 0x2270
movq 0x28(%rsp), %rax
movq (%rax), %rax
incq %r14
movq 0x80(%rsp), %rcx
movq 0x18(%rax,%rcx,8), %rdi
movq 0x20(%rax,%rcx,8), %rcx
subq %rdi, %rcx
sarq $0x5, %rcx
addq $0x20, %rbx
cmpq %r14, %rcx
ja 0x4eb3
movabsq $-0x5555555555555555, %r14 # imm = 0xAAAAAAAAAAAAAAAB
movq 0xa8(%rsp), %rbx
incq %r12
movq 0x20(%r15), %rsi
movq 0x28(%r15), %rax
subq %rsi, %rax
sarq $0x4, %rax
imulq %r14, %rax
cmpq %r12, %rax
ja 0x4cf7
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movq 0xd8(%rsp), %rdi
incq %rdi
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x4, %rdx
imulq %r14, %rdx
cmpq %rdi, %rdx
ja 0x4cc1
cmpl $0x1, 0x5c(%rsp)
jg 0x4f9a
movq 0xb8(%rsp), %rdx
incq %rdx
movq 0x88(%rsp), %rax
movq 0x90(%rsp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
imulq %r14, %rcx
cmpq %rdx, %rcx
ja 0x4c6c
jmp 0x4fa1
callq 0x23b4
jmp 0x4f69
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4fbc
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x21b0
leaq 0x88(%rsp), %rdi
callq 0x5760
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 0x5003
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x21b0
jmp 0x5003
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x512e
movq 0x18(%rsp), %rsi
jmp 0x5126
movq %rax, %r14
jmp 0x512e
movq %rax, %r14
leaq 0x60(%rsp), %rdi
callq 0x57a8
jmp 0x512e
jmp 0x50ef
jmp 0x50c7
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x50f7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21b0
jmp 0x50f7
jmp 0x50f4
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x508f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21b0
jmp 0x508f
movq %rax, %r14
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x50d3
movq 0x40(%rsp), %rsi
jmp 0x50b9
jmp 0x50d0
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x50d3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21b0
jmp 0x50d3
jmp 0x50d0
jmp 0x50ef
movq %rax, %r14
jmp 0x50e0
jmp 0x50d0
jmp 0x50ef
movq %rax, %r14
leaq 0xe0(%rsp), %rdi
callq 0x3190
leaq 0xc0(%rsp), %rdi
callq 0x57a8
jmp 0x5113
movq %rax, %r14
jmp 0x5113
movq %rax, %r14
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x5113
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x21b0
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x512e
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x21b0
movq 0x28(%rsp), %rdi
callq 0x5832
leaq 0x88(%rsp), %rdi
callq 0x5760
movq %r14, %rdi
callq 0x22f0
nop