LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/jeffreyan11[P]go-engine/mctree.cpp
// Function: MCTree::findLeaf(int&, Board&, int&)
MCNode *MCTree::findLeaf(Player &p, Board &b, int &depth) {
    MCNode *node = root;

    // Keep going until we either decide to split another child, or find a leaf
    while (node->size > 0) {
        std::uniform_int_distribution<int> distribution(0, b.getLegalMoves(p).size() / 2);
        // Create a new child for this node with some probability
        if (node != root && distribution(mc_rng) > node->size)
            break;

        // Otherwise, choose a child to follow
        double bestScore = 0.0;
        int bestIndex = 0;
        double logD = std::log(node->denominator);
        for (int i = 0; i < node->size; i++) {
            double score = (double) node->children[i]->numerator / (double) node->children[i]->denominator
                + std::sqrt(logD / (double) node->children[i]->denominator);
            if (score > bestScore) {
                bestScore = score;
                bestIndex = i;
            }
        }

        node = node->children[bestIndex];
        b.doMove(p, node->m);
        p = otherPlayer(p);
        depth++;
    }

    return node;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x458, %rsp            # imm = 0x458
movq %rcx, 0x10(%rsp)
movq %rdi, 0x18(%rsp)
movq (%rdi), %rbx
cmpw $0x0, 0x12(%rbx)
jle 0x59d1
movq %rdx, %r15
movq %rsi, %r12
leaq 0x12(%rbx), %rbp
movl (%r12), %edx
leaq 0x54(%rsp), %rdi
movq %r15, %rsi
callq 0x40dc
movl 0x454(%rsp), %eax
shrl %eax
movl $0x0, 0x8(%rsp)
movl %eax, 0xc(%rsp)
movq 0x18(%rsp), %rax
cmpq (%rax), %rbx
je 0x58e3
leaq 0x8(%rsp), %rdi
leaq 0x9011(%rip), %rsi      # 0xe8e0
movq %rdi, %rdx
callq 0x5a12
movswl (%rbp), %ecx
cmpl %ecx, %eax
jg 0x59d1
xorps %xmm0, %xmm0
cvtsi2sdl 0x4(%rbx), %xmm0
callq 0x2160
cmpw $0x0, (%rbp)
jle 0x5994
movapd %xmm0, %xmm1
xorpd %xmm2, %xmm2
xorl %r14d, %r14d
xorl %r13d, %r13d
movsd %xmm0, 0x20(%rsp)
movq 0x20(%rbx), %rax
movq (%rax,%r14,8), %rax
cvtdq2pd (%rax), %xmm3
movapd %xmm3, %xmm4
unpckhpd %xmm3, %xmm4            # xmm4 = xmm4[1],xmm3[1]
movapd %xmm1, %xmm0
divsd %xmm4, %xmm0
ucomisd 0x371d(%rip), %xmm0     # 0x9050
jb 0x593b
sqrtsd %xmm0, %xmm0
jmp 0x596a
movsd %xmm2, 0x28(%rsp)
movapd %xmm3, 0x40(%rsp)
movapd %xmm4, 0x30(%rsp)
callq 0x2150
movapd 0x30(%rsp), %xmm4
movapd 0x40(%rsp), %xmm3
movsd 0x28(%rsp), %xmm2
movsd 0x20(%rsp), %xmm1
divsd %xmm4, %xmm3
addsd %xmm0, %xmm3
ucomisd %xmm2, %xmm3
maxsd %xmm2, %xmm3
cmoval %r14d, %r13d
incq %r14
movswq (%rbp), %rax
movapd %xmm3, %xmm2
cmpq %rax, %r14
jl 0x590f
movslq %r13d, %rax
jmp 0x5996
xorl %eax, %eax
movq 0x20(%rbx), %rcx
movq (%rcx,%rax,8), %rbx
movl (%r12), %esi
movzwl 0x10(%rbx), %edx
movq %r15, %rdi
callq 0x3030
movl $0x3, %eax
subl (%r12), %eax
movl %eax, (%r12)
movq 0x10(%rsp), %rax
incl (%rax)
leaq 0x12(%rbx), %rbp
cmpw $0x0, 0x12(%rbx)
jg 0x5893
movq %rbx, %rax
addq $0x458, %rsp            # imm = 0x458
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jeffreyan11[P]go-engine/search.cpp
// Function: scoreGame(int, Board&, float&, float&)
void scoreGame(Player p, Board &b, float &myScore, float &oppScore) {
    int whiteTerritory = 0, blackTerritory = 0;
    b.countTerritory(whiteTerritory, blackTerritory);

    myScore = b.getCapturedStones(p)
        + ((p == BLACK) ? blackTerritory : whiteTerritory);
    oppScore = b.getCapturedStones(otherPlayer(p))
        + ((p == BLACK) ? whiteTerritory : blackTerritory);

    if (p == WHITE)
        myScore += komi;
    else
        oppScore += komi;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movl %edi, %ebp
xorl %eax, %eax
leaq 0x4(%rsp), %r13
movl %eax, (%r13)
movq %rsp, %r15
movl %eax, (%r15)
movq %rsi, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x4406
movq %r12, %rdi
movl %ebp, %esi
callq 0x5282
cmpl $0x1, %ebp
movq %r13, %rcx
cmoveq %r15, %rcx
cmoveq %r13, %r15
addl (%rcx), %eax
cvtsi2ss %eax, %xmm0
movss %xmm0, (%r14)
movl $0x3, %esi
subl %ebp, %esi
movq %r12, %rdi
callq 0x5282
addl (%r15), %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movss %xmm0, (%rbx)
cmpl $0x2, %ebp
jne 0x694e
movss (%r14), %xmm0
cmoveq %r14, %rbx
addss 0x583e(%rip), %xmm0     # 0xc198
movss %xmm0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jeffreyan11[P]go-engine/./mctree.h
// Function: MCNode::cleanup()
void cleanup() {
        for (int i = 0; i < size; i++) {
            children[i]->cleanup();
            delete children[i];
        }
        delete[] children;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpw $0x0, 0x12(%rdi)
jle 0x6a43
xorl %r14d, %r14d
movq 0x20(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x6a06
movq 0x20(%rbx), %rax
movq (%rax,%r14,8), %rdi
movl $0x28, %esi
callq 0x21c0
incq %r14
movswq 0x12(%rbx), %rax
cmpq %rax, %r14
jl 0x6a17
movq 0x20(%rbx), %rdi
addq $0x8, %rsp
testq %rdi, %rdi
je 0x6a58
popq %rbx
popq %r14
jmp 0x2200
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/jeffreyan11[P]go-engine/gtp.cpp
// Function: split(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, char)
vector<string> split(const string &s, char d) {
    vector<string> v;
    stringstream ss(s);
    string item;
    while (getline(ss, item, d)) {
        v.push_back(item);
    }
    return v;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1b0, %rsp            # imm = 0x1B0
movl %edx, %ebp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq 0x28(%rsp), %rdi
movl $0x18, %edx
callq 0x2270
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
movsbl %bpl, %ebp
leaq 0x28(%rsp), %r14
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x22e0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x897c
movq %rbx, %rdi
movq %r15, %rsi
callq 0x8b3c
jmp 0x8954
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x8993
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21c0
movq 0x360e(%rip), %rsi      # 0xbfa8
leaq 0x28(%rsp), %rdi
callq 0x2130
leaq 0xa8(%rsp), %rdi
callq 0x2090
movq %rbx, %rax
addq $0x1b0, %rsp            # imm = 0x1B0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x8a01
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x89e3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21c0
movq 0x35be(%rip), %rsi      # 0xbfa8
leaq 0x28(%rsp), %rdi
callq 0x2130
leaq 0xa8(%rsp), %rdi
callq 0x2090
movq %rbx, %rdi
callq 0x8ade
movq %r14, %rdi
callq 0x22c0
// File: /workspace/github_cpp_makefile_star2_O3/jeffreyan11[P]go-engine/gtp.cpp
// Function: stringToColor(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Player stringToColor(string colorString) {
    if (colorString == "black" || colorString == "b" || colorString == "B")
        return BLACK;
    else if (colorString == "white" || colorString == "w" || colorString == "W")
        return WHITE;
    else
        return EMPTY;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x7d2(%rip), %rsi       # 0x91f0
callq 0x2080
movl $0x1, %ebp
testl %eax, %eax
je 0x8a96
leaq 0x7c3(%rip), %rsi       # 0x91f6
movq %rbx, %rdi
callq 0x2080
testl %eax, %eax
je 0x8a96
leaq 0x6ec(%rip), %rsi       # 0x9132
movq %rbx, %rdi
callq 0x2080
testl %eax, %eax
je 0x8a96
leaq 0x79f(%rip), %rsi       # 0x91f8
movq %rbx, %rdi
callq 0x2080
movl $0x2, %ebp
testl %eax, %eax
je 0x8a96
leaq 0x78d(%rip), %rsi       # 0x91fe
movq %rbx, %rdi
callq 0x2080
testl %eax, %eax
je 0x8a96
leaq 0x6b0(%rip), %rsi       # 0x9134
movq %rbx, %rdi
callq 0x2080
xorl %ebp, %ebp
testl %eax, %eax
sete %bpl
addl %ebp, %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/willprice[P]parallel-cpp-workshop/map.cpp
// Function: auto map_fn<int (*)(int, int), int>(int (*)(int, int), std::vector<int, std::allocator<int>>&, std::vector<int, std::allocator<int>>&)
auto map_fn(Fn fn, std::vector<T> &xs, std::vector<T> &ys)
{
    int len = std::min(xs.size(), ys.size());
    auto result = std::vector<T>(len);

    for (int i = 0; i < len; i++) {
      result[i] = fn(xs[i], ys[i]);
    }

    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq 0x8(%rdx), %rax
subq (%rdx), %rax
sarq $0x2, %rax
movq 0x8(%rcx), %rbp
subq (%rcx), %rbp
sarq $0x2, %rbp
cmpq %rax, %rbp
cmovaeq %rax, %rbp
movslq %ebp, %r13
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
movq %r13, %rsi
callq 0x15c6
testl %r13d, %r13d
jle 0x1581
andl $0x7fffffff, %ebp       # imm = 0x7FFFFFFF
xorl %r13d, %r13d
movq (%r15), %rax
movl (%rax,%r13,4), %edi
movq (%r14), %rax
movl (%rax,%r13,4), %esi
callq *%r12
movq 0x10(%rsp), %rcx
movl %eax, (%rcx,%r13,4)
incq %r13
cmpq %r13, %rbp
jne 0x155d
jmp 0x1586
movq 0x10(%rsp), %rcx
movq %rcx, (%rbx)
movups 0x18(%rsp), %xmm0
movups %xmm0, 0x8(%rbx)
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x15be
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x10c0
movq %rbx, %rdi
callq 0x1110
// File: /workspace/github_cpp_makefile_star2_O3/kiven-li[P]xbytes/main.cpp
// Function: main
int main(int argc, char *argv[])
{
	if(argc < 2)
	{
		std::cout << "x-bytes: need rule file name." << std::endl;
		return 1;
	}

    xbytes::xbytes x;
    x.make_parser(argv[1]);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x6d8, %rsp            # imm = 0x6D8
cmpl $0x1, %edi
jg 0x3686
movq 0xd994(%rip), %rbx      # 0x10fd8
leaq 0x99b9(%rip), %rsi      # 0xd004
movl $0x1d, %edx
movq %rbx, %rdi
callq 0x32b0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
movl $0x1, %eax
jmp 0x36dd
movq %rsi, %rbx
leaq -0x6e0(%rbp), %rdi
callq 0x37f8
movq 0x8(%rbx), %rsi
leaq -0x30(%rbp), %rdi
leaq -0x9(%rbp), %rdx
callq 0x371c
leaq -0x6e0(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x3fe4
leaq -0x20(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x36cf
movq -0x20(%rbp), %rsi
incq %rsi
callq 0x3260
leaq -0x6e0(%rbp), %rdi
callq 0x3b80
xorl %eax, %eax
addq $0x6d8, %rsp            # imm = 0x6D8
popq %rbx
popq %rbp
retq
movq %rax, %rbx
leaq -0x20(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3708
movq -0x20(%rbp), %rsi
incq %rsi
callq 0x3260
jmp 0x3708
movq %rax, %rbx
leaq -0x6e0(%rbp), %rdi
callq 0x3b80
movq %rbx, %rdi
callq 0x33d0
// File: /workspace/github_cpp_makefile_star2_O3/kiven-li[P]xbytes/xbytes.cpp
// Function: xbytes::xbytes::error_on_line(char const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int)
void xbytes::error_on_line(const char* line, const string& error, int space)
{
	std::cout << "ERROR:" << std::endl;
	std::cout << "  line: " << line_count+1 << std::endl;
	std::cout << "  info: Don't parse program file, There is an error:[[" << std::endl;
	std::cout << line << std::endl;
	for(int i = 0; i < space; ++i)
	{
		std::cout << ' ';
	}
	std::cout << "^" << std::endl;
	std::cout << "  " << error << "]]" << std::endl;

	exit(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r14d
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r13
movq 0xc2ab(%rip), %r15      # 0x10fd8
leaq 0x8857(%rip), %rsi      # 0xd58b
movl $0x6, %edx
movq %r15, %rdi
callq 0x32b0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
leaq 0x8823(%rip), %rsi      # 0xd592
movl $0x8, %edx
movq %r15, %rdi
callq 0x32b0
movl 0x60c(%r13), %esi
incl %esi
movq %r15, %rdi
callq 0x33b0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %r13, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
leaq 0x87dd(%rip), %rsi      # 0xd59b
movl $0x36, %edx
movq %r15, %rdi
callq 0x32b0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
testq %r12, %r12
jne 0x4e11
movq (%r15), %rax
movq -0x18(%rax), %rax
leaq (%r15,%rax), %rdi
movl 0x20(%r15,%rax), %esi
orl $0x1, %esi
callq 0x3390
jmp 0x4e2b
movq %r12, %rdi
callq 0x30f0
movq 0xc1b8(%rip), %rdi      # 0x10fd8
movq %r12, %rsi
movq %rax, %rdx
callq 0x32b0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %r15, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
testl %r14d, %r14d
jle 0x4e7b
movq 0xc17a(%rip), %r15      # 0x10fd8
leaq -0x29(%rbp), %r12
movb $0x20, -0x29(%rbp)
movl $0x1, %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x32b0
decl %r14d
jne 0x4e62
movq 0xc156(%rip), %r14      # 0x10fd8
leaq 0x8749(%rip), %rsi      # 0xd5d2
movq %r14, %rdi
callq 0x3240
movq %rax, %rdi
callq 0x3100
leaq 0x8734(%rip), %rsi      # 0xd5d4
movq %r14, %rdi
callq 0x3240
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3210
leaq 0x871d(%rip), %rsi      # 0xd5d7
movq %rax, %rdi
callq 0x3240
movq %rax, %rdi
callq 0x3100
movl $0x1, %edi
callq 0x32c0
// File: /workspace/github_cpp_makefile_star2_O3/kiven-li[P]xbytes/xbytes.cpp
// Function: xbytes::xbytes::sort_symbol()
void xbytes::sort_symbol()
{
	symbol_array terminals;
	symbol_array nonterminals;

	for(int i = 0; i < symbols.size(); ++i)
	{
		symbol* s = symbols[i];
		if(s->type == ST_TERMINAL) 
			terminals.push_back(s);
		else
			nonterminals.push_back(s);
	}
	for(int i = 0; i < terminals.size(); ++i)
	{
		symbols[i] = terminals[i];
		symbols[i]->index = i;
	}
	for(int i = 0; i < nonterminals.size(); ++i)
	{
		int index = terminals.size() + i;
		symbols[index] = nonterminals[i];
		symbols[index]->index = index;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
xorl %eax, %eax
movq %rax, -0x30(%rbp)
movq %rax, -0x50(%rbp)
movaps %xmm0, -0x60(%rbp)
movq 0x8(%rdi), %rax
cmpq %rax, 0x10(%rdi)
je 0x4fa7
leaq -0x38(%rbp), %r12
xorl %r13d, %r13d
leaq -0x40(%rbp), %r14
leaq -0x60(%rbp), %r15
movq (%rax,%r13,8), %rax
movq %rax, -0x68(%rbp)
cmpl $0x1, 0x48(%rax)
jne 0x4f41
movq -0x38(%rbp), %rsi
movq %r14, %rdi
movq %r12, %rcx
cmpq -0x30(%rbp), %rsi
je 0x4f52
movq %rax, (%rsi)
addq $0x8, (%rcx)
jmp 0x4f5b
movq -0x58(%rbp), %rsi
movq %r15, %rdi
leaq -0x58(%rbp), %rcx
cmpq -0x50(%rbp), %rsi
jne 0x4f38
leaq -0x68(%rbp), %rdx
callq 0xb088
incq %r13
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r13, %rcx
ja 0x4f1a
movq -0x40(%rbp), %rdx
cmpq %rdx, -0x38(%rbp)
je 0x4fa7
xorl %ecx, %ecx
movq (%rdx,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq 0x8(%rbx), %rax
movq (%rax,%rcx,8), %rdx
movl %ecx, (%rdx)
incq %rcx
movq -0x40(%rbp), %rdx
movq -0x38(%rbp), %rsi
subq %rdx, %rsi
sarq $0x3, %rsi
cmpq %rcx, %rsi
ja 0x4f7e
movq -0x60(%rbp), %rdi
cmpq %rdi, -0x58(%rbp)
je 0x4fed
xorl %ecx, %ecx
movq -0x38(%rbp), %rdx
subq -0x40(%rbp), %rdx
shrq $0x3, %rdx
addl %ecx, %edx
movq (%rdi,%rcx,8), %rsi
movslq %edx, %rdx
movq %rsi, (%rax,%rdx,8)
movq 0x8(%rbx), %rax
movq (%rax,%rdx,8), %rsi
movl %edx, (%rsi)
incq %rcx
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rdx
subq %rdi, %rdx
sarq $0x3, %rdx
cmpq %rcx, %rdx
ja 0x4fb3
testq %rdi, %rdi
je 0x4ffe
movq -0x50(%rbp), %rsi
subq %rdi, %rsi
callq 0x3260
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x5013
movq -0x30(%rbp), %rsi
subq %rdi, %rsi
callq 0x3260
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x60(%rbp), %rdi
testq %rdi, %rdi
je 0x503a
movq -0x50(%rbp), %rsi
subq %rdi, %rsi
callq 0x3260
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x504f
movq -0x30(%rbp), %rsi
subq %rdi, %rsi
callq 0x3260
movq %rbx, %rdi
callq 0x33d0
nop
// File: /workspace/github_cpp_makefile_star2_O3/kiven-li[P]xbytes/xbytes.cpp
// Function: xbytes::xbytes::find_symbol_precedence()
void xbytes::find_symbol_precedence()
{
	//make symbol's precedence & associativity
	for(int i = 0; i < assoc_precs.size(); ++i)
	{
		int ass = assoc_precs[i].associativity;
		string_array& sa = assoc_precs[i].symbol_names;
		for(int m = 0; m < sa.size(); ++m)
		{
			symbol* s = find_symbol(sa[m]);
			if(s)
			{
				s->associativity = ass;
				s->precedence = i;
			}
		}
	}	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0x698(%rdi), %rax
movq 0x6a0(%rdi), %rcx
movq %rax, -0x30(%rbp)
subq %rax, %rcx
je 0x50f7
movq %rdi, %rbx
movq %rcx, %rax
sarq $0x5, %rax
cmpq $0x1, %rax
adcq $0x0, %rax
movq %rax, -0x38(%rbp)
xorl %r13d, %r13d
movq %r13, %rax
shlq $0x5, %rax
movq -0x30(%rbp), %rcx
movq 0x10(%rcx,%rax), %r12
movq 0x8(%rcx,%rax), %r14
subq %r14, %r12
je 0x50ee
movq -0x30(%rbp), %rcx
movl (%rcx,%rax), %r15d
sarq $0x5, %r12
cmpq $0x1, %r12
adcq $0x0, %r12
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7c9e
testq %rax, %rax
je 0x50e5
movl %r15d, 0xa4(%rax)
movl %r13d, 0xa0(%rax)
addq $0x20, %r14
decq %r12
jne 0x50c7
incq %r13
cmpq -0x38(%rbp), %r13
jne 0x5099
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/kiven-li[P]xbytes/xbytes.cpp
// Function: xbytes::xbytes::find_rule_precedence()
void xbytes::find_rule_precedence()
{


	//make rule's precedence
	for(int i = 0; i < rules.size(); ++i)
	{
		rule* r = rules[i];
		if(r->precedence_symbol != NULL) continue;

		for(int m = 0; m < r->rights.size() && r->precedence_symbol == NULL; ++m)
		{
			symbol* s = r->rights[m];
			if(s->type != ST_TERMINAL) continue;
			
			if(s->precedence >= 0)
			{
				r->precedence_symbol = s;
				break;
			}
		}
	}
}

// Assembly:
movq 0x20(%rdi), %rax
movq 0x28(%rdi), %rcx
subq %rax, %rcx
je 0x5182
pushq %rbp
movq %rsp, %rbp
sarq $0x3, %rcx
cmpq $0x1, %rcx
adcq $0x0, %rcx
xorl %edx, %edx
movq (%rax,%rdx,8), %rsi
cmpq $0x0, 0xa0(%rsi)
je 0x513d
incq %rdx
cmpq %rcx, %rdx
jne 0x5125
jmp 0x5181
movq 0x30(%rsi), %rdi
movq 0x38(%rsi), %r8
subq %rdi, %r8
je 0x5133
sarq $0x3, %r8
cmpq $0x1, %r8
adcq $0x0, %r8
xorl %r9d, %r9d
movq (%rdi,%r9,8), %r10
cmpl $0x1, 0x48(%r10)
jne 0x516e
cmpl $0x0, 0xa0(%r10)
jns 0x5178
incq %r9
cmpq %r9, %r8
jne 0x5159
jmp 0x5133
movq %r10, 0xa0(%rsi)
jmp 0x5133
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/kiven-li[P]xbytes/xbytes.cpp
// Function: xbytes::xbytes::find_nullable()
void xbytes::find_nullable()
{
	for(int i = 0; i < symbols.size(); ++i)
	{
		symbols[i]->is_nullable = false;
	}

	while(true)
	{
		bool is_change = false;
		for(int i = 0; i < rules.size(); ++i)
		{
			rule* r = rules[i];
			if(r->left->is_nullable) continue;
			if(r->rights.size() == 0)
			{
				r->left->is_nullable = true;
				is_change = true;
				continue;
			}

			bool is_all_nullable = true;
			for(int j = 0; j < r->rights.size(); ++j)
			{
				if(!r->rights[j]->is_nullable)
				{
					is_all_nullable = false;
					break;
				}
			}

			if(is_all_nullable)
			{
				r->left->is_nullable = true;
				is_change = true;
			}
		}

		if(!is_change) break;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
movq 0x8(%rdi), %rax
movq 0x10(%rdi), %rcx
subq %rax, %rcx
je 0x51b4
sarq $0x3, %rcx
cmpq $0x1, %rcx
adcq $0x0, %rcx
xorl %edx, %edx
movq (%rax,%rdx,8), %rsi
movb $0x0, 0x68(%rsi)
incq %rdx
cmpq %rdx, %rcx
jne 0x51a4
movq 0x20(%rdi), %rax
movq 0x28(%rdi), %rcx
subq %rax, %rcx
je 0x5238
sarq $0x3, %rcx
xorl %edx, %edx
xorl %r8d, %r8d
xorl %esi, %esi
xorl %edi, %edi
movq (%rax,%r8,8), %r10
movq 0x8(%r10), %r8
cmpb $0x0, 0x68(%r8)
jne 0x5213
movq 0x30(%r10), %r9
movq 0x38(%r10), %r10
subq %r9, %r10
je 0x520b
sarq $0x3, %r10
cmpq $0x1, %r10
adcq $0x0, %r10
xorl %r11d, %r11d
movq (%r9,%r11,8), %rbx
cmpb $0x0, 0x68(%rbx)
je 0x5213
incq %r11
cmpq %r11, %r10
jne 0x51f9
movb $0x1, 0x68(%r8)
movb $0x1, %dil
incl %esi
cmpq %rsi, %rcx
seta %r9b
movl $0x0, %r8d
cmovaq %rsi, %r8
cmovbel %edx, %esi
movl %r9d, %r10d
orb %dil, %r10b
andb %r9b, %dil
testb $0x1, %r10b
jne 0x51ce
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/kiven-li[P]xbytes/xbytes.cpp
// Function: xbytes::xbytes::find_first_set()
void xbytes::find_first_set()
{
	for(int i = 0; i < symbols.size(); ++i)
	{
		if(symbols[i]->type == ST_TERMINAL)
		{
			symbols[i]->first_set.push_back(symbols[i]);
		}
	}

	while(true)
	{
		int change_count = 0;
		for(int i = 0; i < rules.size(); ++i)
		{
			rule* r = rules[i];
			if(r->rights.size() == 0) continue;

			change_count += merge_symbol_set(r->left->first_set, r->rights[0]->first_set);
			for(int j = 0; j < r->rights.size() - 1; ++j)
			{
				if(!r->rights[j]->is_nullable) break;
				change_count += merge_symbol_set(r->left->first_set, r->rights[j+1]->first_set);
			}
		}

		if(!change_count) break;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdx
cmpq %rdx, 0x10(%rdi)
je 0x52a5
xorl %r14d, %r14d
xorl %r15d, %r15d
movq (%rdx,%r14), %rdi
cmpl $0x1, 0x48(%rdi)
jne 0x528a
movq 0x78(%rdi), %rsi
cmpq 0x80(%rdi), %rsi
je 0x527e
movq %rdi, (%rsi)
addq $0x8, 0x78(%rdi)
jmp 0x528a
addq %r14, %rdx
addq $0x70, %rdi
callq 0xb088
incq %r15
movq 0x8(%rbx), %rdx
movq 0x10(%rbx), %rax
subq %rdx, %rax
sarq $0x3, %rax
addq $0x8, %r14
cmpq %r15, %rax
ja 0x525d
movq 0x20(%rbx), %rax
movq 0x28(%rbx), %rcx
cmpq %rax, %rcx
je 0x5361
xorl %r14d, %r14d
xorl %r15d, %r15d
movq (%rax,%r14,8), %r12
movq 0x30(%r12), %rax
cmpq %rax, 0x38(%r12)
je 0x533a
movq 0x8(%r12), %rsi
addq $0x70, %rsi
movq (%rax), %rdx
addq $0x70, %rdx
callq 0x6c34
addl %eax, %r15d
movq 0x30(%r12), %rax
movq 0x38(%r12), %rcx
subq %rax, %rcx
cmpq $0x8, %rcx
je 0x533a
xorl %r13d, %r13d
movq (%rax,%r13,8), %rcx
cmpb $0x1, 0x68(%rcx)
jne 0x533a
movq 0x8(%r12), %rsi
addq $0x70, %rsi
movq 0x8(%rax,%r13,8), %rdx
incq %r13
addq $0x70, %rdx
callq 0x6c34
addl %eax, %r15d
movq 0x30(%r12), %rax
movq 0x38(%r12), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
decq %rcx
cmpq %r13, %rcx
ja 0x52fa
incq %r14
movq 0x20(%rbx), %rax
movq 0x28(%rbx), %rcx
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %r14, %rdx
ja 0x52bc
testl %r15d, %r15d
jne 0x52ad
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/kiven-li[P]xbytes/xbytes.cpp
// Function: xbytes::xbytes::find_lr_state()
void xbytes::find_lr_state()
{
	//set first state
	make_first_state();

	//set follow state and goto
	while(true)
	{
		int change_count = 0;

		for(int i = 0; i < states.size(); ++i)
		{
			lr_state* ls = states[i];
			if(ls->is_completed) continue;
			for(int j = 0; j < ls->terms.size(); ++j)
			{
				term* t = ls->terms[j];
				if(t->dot >= t->r->rights.size()) continue;

				symbol* s = t->r->rights[t->dot];
				if(s->name == ACCEPT_TERMINAL) continue;

				lr_state ns = lr_goto(*ls, s);
				change_count += add_lr_state(ns);
				change_count += add_lr_goto(*ls, s, ns.state);		
			}
			if(!change_count) ls->is_completed = true;
		}

		if(!change_count) break;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rdi, %rsi
leaq -0x120(%rbp), %rdi
movq %rsi, -0x30(%rbp)
callq 0x6d1a
leaq -0xd0(%rbp), %rdi
callq 0xa652
leaq -0x100(%rbp), %r14
movq %r14, %rdi
callq 0xa6e8
movq -0x18(%r14), %rdi
testq %rdi, %rdi
je 0x5610
movq -0x108(%rbp), %rsi
subq %rdi, %rsi
callq 0x3260
movq -0x30(%rbp), %rcx
movq 0x38(%rcx), %rax
movq 0x40(%rcx), %rcx
cmpq %rax, %rcx
je 0x5759
xorl %esi, %esi
xorl %r15d, %r15d
movq (%rax,%rsi,8), %r14
cmpb $0x0, 0x68(%r14)
jne 0x572e
movq %rsi, -0x40(%rbp)
movq 0x8(%r14), %rax
cmpq %rax, 0x10(%r14)
je 0x571d
xorl %ebx, %ebx
movq (%rax,%rbx,8), %rcx
movslq 0x8(%rcx), %rax
movq (%rcx), %rdx
movq 0x30(%rdx), %rcx
movq 0x38(%rdx), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
cmpq %rax, %rdx
jbe 0x5702
movq (%rcx,%rax,8), %r12
leaq 0x8(%r12), %rdi
leaq 0x7b19(%rip), %rsi      # 0xd199
callq 0x30a0
testl %eax, %eax
je 0x5702
movl %r15d, -0x34(%rbp)
leaq -0xb0(%rbp), %r13
movq %r13, %rdi
movq -0x30(%rbp), %r15
movq %r15, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x6dba
movq %r15, %rdi
movq %r13, %rsi
callq 0x6f20
movl %eax, %r15d
movl -0xb0(%rbp), %ecx
movq %r14, %rsi
movq %r12, %rdx
callq 0x707a
movl %eax, %r12d
leaq -0x60(%rbp), %rdi
callq 0xa652
leaq -0x90(%rbp), %rdi
callq 0xa6e8
movq -0xa8(%rbp), %rdi
testq %rdi, %rdi
je 0x56fb
movq -0x98(%rbp), %rsi
subq %rdi, %rsi
callq 0x3260
addl -0x34(%rbp), %r15d
addl %r12d, %r15d
incq %rbx
movq 0x8(%r14), %rax
movq 0x10(%r14), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rbx, %rcx
ja 0x564d
testl %r15d, %r15d
movq -0x40(%rbp), %rsi
jne 0x572e
movb $0x1, 0x68(%r14)
xorl %r15d, %r15d
incq %rsi
movq -0x30(%rbp), %rcx
movq 0x38(%rcx), %rax
movq 0x40(%rcx), %rcx
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %rsi, %rdx
ja 0x562a
testl %r15d, %r15d
jne 0x561c
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
callq 0xa094
movq %rbx, %rdi
callq 0x33d0
// File: /workspace/github_cpp_makefile_star2_O3/kiven-li[P]xbytes/xbytes.cpp
// Function: xbytes::xbytes::merge_symbol_set(std::vector<xbytes::symbol*, std::allocator<xbytes::symbol*>>&, std::vector<xbytes::symbol*, std::allocator<xbytes::symbol*>>&)
int xbytes::merge_symbol_set(symbol_array& s1, symbol_array& s2)
{
	int insert_count = 0;
	for(int i = 0; i < s2.size(); ++i)
	{
		bool is_add = true;
		for(int j = 0; j < s1.size(); ++j)
		{
			if(s2[i] == s1[j])
			{
				is_add = false;
				break;
			}
		}
		if(is_add)
		{
			insert_count++;
			s1.push_back(s2[i]);
		}
	}

	return insert_count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq (%rdx), %rax
cmpq %rax, 0x8(%rdx)
je 0x6cbe
movq %rdx, %rbx
movq %rsi, %r14
xorl %r12d, %r12d
xorl %r15d, %r15d
movq (%r14), %rcx
movq 0x8(%r14), %rsi
movq %rsi, %rdx
subq %rcx, %rdx
je 0x6c84
sarq $0x3, %rdx
movq (%rax,%r12,8), %rdi
cmpq $0x1, %rdx
adcq $0x0, %rdx
xorl %r8d, %r8d
cmpq (%rcx,%r8,8), %rdi
je 0x6ca6
incq %r8
cmpq %r8, %rdx
jne 0x6c76
incl %r15d
leaq (%rax,%r12,8), %rdx
cmpq 0x10(%r14), %rsi
je 0x6c9e
movq (%rdx), %rax
movq %rax, (%rsi)
addq $0x8, 0x8(%r14)
jmp 0x6ca6
movq %r14, %rdi
callq 0xb088
incq %r12
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r12, %rcx
ja 0x6c54
jmp 0x6cc1
xorl %r15d, %r15d
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/kiven-li[P]xbytes/xbytes.cpp
// Function: xbytes::xbytes::make_first_state()
lr_state xbytes::make_first_state()
{
	lr_state start_state;
	start_state.state = 0;

	term* t = new term();
	t->r = start;
	t->dot = 0;

	start_state.terms.push_back(t);

	closure(start_state);

	add_lr_state(start_state);

	return start_state;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorl %eax, %eax
movq %rax, 0x18(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
leaq 0x28(%rdi), %rcx
movl %eax, 0x28(%rdi)
movq %rax, 0x30(%rdi)
movq %rcx, 0x38(%rdi)
movq %rcx, 0x40(%rdi)
movups %xmm0, 0x48(%rdi)
movups %xmm0, 0x58(%rdi)
movl %eax, (%rdi)
movl $0x30, %edi
callq 0x3250
leaq 0x8(%rbx), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rax)
movaps %xmm0, 0x10(%rax)
movaps %xmm0, (%rax)
leaq -0x18(%rbp), %rdx
movq %rax, (%rdx)
movq (%r14), %rcx
movq %rcx, (%rax)
xorl %esi, %esi
callq 0xb1c8
movq %r14, %rdi
movq %rbx, %rsi
callq 0x70da
movq %r14, %rdi
movq %rbx, %rsi
callq 0x6f20
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0xa094
movq %r14, %rdi
callq 0x33d0
// File: /workspace/github_cpp_makefile_star2_O3/kiven-li[P]xbytes/xbytes.cpp
// Function: xbytes::xbytes::lr_goto(xbytes::lr_state&, xbytes::symbol*)
lr_state xbytes::lr_goto(lr_state& state, symbol* s)
{
	lr_state next_state;
	for(int i = 0; i < state.terms.size(); ++i)
	{
		term* t = state.terms[i];
		assert(t->r != NULL);
		if(t->dot >= t->r->rights.size()) continue;
		if(t->r->rights[t->dot] == s)
		{
			term tt;
			tt.r = t->r;
			tt.dot = t->dot + 1;
			tt.forwards = t->forwards;
			add_term(next_state, tt);
		}
	}

	closure(next_state);
	return next_state;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r15
movq %rsi, -0x30(%rbp)
movq %rdi, %rbx
xorl %eax, %eax
movq %rax, 0x18(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
leaq 0x28(%rdi), %rcx
movl $0x0, 0x28(%rdi)
movq %rax, 0x30(%rdi)
movq %rcx, 0x38(%rdi)
movq %rcx, 0x40(%rdi)
movups %xmm0, 0x48(%rdi)
movups %xmm0, 0x58(%rdi)
movq 0x8(%rdx), %rax
movq 0x10(%rdx), %rcx
cmpq %rax, %rcx
je 0x6eb6
movq %rdx, %r12
leaq -0x50(%rbp), %r13
xorl %r14d, %r14d
movq (%rax,%r14,8), %rsi
movq (%rsi), %r8
testq %r8, %r8
je 0x6ed4
movslq 0x8(%rsi), %rdx
movq 0x30(%r8), %rdi
movq 0x38(%r8), %r8
subq %rdi, %r8
sarq $0x3, %r8
cmpq %rdx, %r8
jbe 0x6ea0
cmpq %r15, (%rdi,%rdx,8)
jne 0x6ea0
xorps %xmm0, %xmm0
movups %xmm0, (%r13)
movq $0x0, 0x10(%r13)
movq (%rsi), %rax
movq %rax, -0x60(%rbp)
movl 0x8(%rsi), %eax
incl %eax
movl %eax, -0x58(%rbp)
addq $0x10, %rsi
movq %r13, %rdi
callq 0xa192
movq %rbx, %rsi
leaq -0x60(%rbp), %rdx
callq 0x7534
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x6e96
movq -0x40(%rbp), %rsi
subq %rdi, %rsi
callq 0x3260
movq 0x8(%r12), %rax
movq 0x10(%r12), %rcx
incq %r14
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %r14, %rdx
ja 0x6e1c
movq -0x30(%rbp), %rdi
movq %rbx, %rsi
callq 0x70da
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x62c0(%rip), %rdi      # 0xd19b
leaq 0x62c6(%rip), %rsi      # 0xd1a8
leaq 0x62ca(%rip), %rcx      # 0xd1b3
movl $0x20e, %edx            # imm = 0x20E
callq 0x3150
movq %rax, %r14
jmp 0x6f10
movq %rax, %r14
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x6f10
movq -0x40(%rbp), %rsi
subq %rdi, %rsi
callq 0x3260
movq %rbx, %rdi
callq 0xa094
movq %r14, %rdi
callq 0x33d0
// File: /workspace/github_cpp_makefile_star2_O3/kiven-li[P]xbytes/xbytes.cpp
// Function: xbytes::xbytes::add_lr_state(xbytes::lr_state&)
int xbytes::add_lr_state(lr_state& s)
{
	for(int i = 0; i < states.size(); ++i)
	{
		lr_state& ls = *(states[i]);
		if(is_merge_lr_state(ls, s))
		{
			s.state = states[i]->state;
			if(is_same_lr_state(ls, s)) return 0;
			return merge_lr_state(ls, s);
		}
	}

	s.state = states.size();

	lr_state* ls = new lr_state();
	*ls = s;
	ls->is_completed = false;
	states.push_back(ls);

	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq 0x38(%rdi), %r13
movq %rdi, -0x30(%rbp)
movq 0x40(%rdi), %rax
subq %r13, %rax
movq %rax, -0x38(%rbp)
je 0x6f7b
movq -0x38(%rbp), %r12
sarq $0x3, %r12
cmpq $0x1, %r12
adcq $0x0, %r12
xorl %ebx, %ebx
movq (%r13,%rbx,8), %r15
movq %r15, %rsi
movq %r14, %rdx
callq 0x737c
testb %al, %al
jne 0x7022
incq %rbx
cmpq %rbx, %r12
jne 0x6f5b
movq -0x38(%rbp), %rbx
shrq $0x3, %rbx
movl %ebx, (%r14)
movl $0x70, %edi
callq 0x3250
movq %rax, %r15
leaq 0x8(%rax), %rdi
addq $0x28, %rax
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%r15)
movaps %xmm0, 0x40(%r15)
movaps %xmm0, 0x50(%r15)
movaps %xmm0, 0x60(%r15)
movaps %xmm0, (%r15)
movaps %xmm0, 0x10(%r15)
movaps %xmm0, 0x20(%r15)
leaq 0x50(%r15), %r12
leaq 0x20(%r15), %r13
movq %rax, 0x38(%r15)
movq %rax, 0x40(%r15)
movups %xmm0, 0x48(%r15)
movups %xmm0, 0x58(%r15)
movq %r15, -0x40(%rbp)
movl %ebx, (%r15)
leaq 0x8(%r14), %rsi
callq 0xa746
leaq 0x20(%r14), %rsi
movq %r13, %rdi
callq 0xaa14
addq $0x50, %r14
movq %r12, %rdi
movq %r14, %rsi
callq 0xa834
movb $0x0, 0x68(%r15)
movq -0x30(%rbp), %rdi
movq 0x40(%rdi), %rsi
cmpq 0x48(%rdi), %rsi
je 0x7058
movq %r15, (%rsi)
addq $0x8, 0x40(%rdi)
jmp 0x7065
movl (%r15), %eax
movl %eax, (%r14)
movq -0x30(%rbp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x73e8
movl %eax, %ecx
xorl %eax, %eax
testb %cl, %cl
jne 0x706a
movq %r15, %rsi
movq %r14, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x7462
addq $0x38, %rdi
leaq -0x40(%rbp), %rdx
callq 0xb2ea
movl $0x1, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/kiven-li[P]xbytes/xbytes.cpp
// Function: xbytes::xbytes::is_same_lr_state(xbytes::lr_state&, xbytes::lr_state&)
bool xbytes::is_same_lr_state(lr_state& l, lr_state& r)
{
	if(l.terms.size() != r.terms.size()) return false;
	
	for(int i = 0; i < l.terms.size(); ++i)
	{
		if(!is_same_term(*(l.terms[i]), *(r.terms[i]))) return false;
	}

	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x8(%rsi), %rbx
movq 0x10(%rsi), %rax
movq %rax, %r14
subq %rbx, %r14
movq 0x8(%rdx), %r15
movq 0x10(%rdx), %rcx
subq %r15, %rcx
cmpq %rcx, %r14
jne 0x744c
cmpq %rbx, %rax
je 0x7450
sarq $0x3, %r14
cmpq $0x1, %r14
movq %r14, %r12
adcq $0x0, %r12
xorl %r13d, %r13d
movq (%rbx,%r13,8), %rsi
movq (%r15,%r13,8), %rdx
callq 0x74c8
testb %al, %al
je 0x744c
incq %r13
cmpq %r13, %r12
jne 0x742b
cmpq %r13, %r14
setbe %al
jmp 0x7452
xorl %eax, %eax
jmp 0x7452
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/kiven-li[P]xbytes/xbytes.cpp
// Function: xbytes::xbytes::merge_lr_state(xbytes::lr_state&, xbytes::lr_state&)
int xbytes::merge_lr_state(lr_state& l, lr_state& r)
{
	int cc = 0;
	for(int i = 0; i < l.terms.size(); ++i)
	{
		term* lt = l.terms[i];
		term* rt = r.terms[i];

		cc += merge_symbol_set(lt->forwards, rt->forwards);
	}

	return cc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0x8(%rsi), %rax
cmpq %rax, 0x10(%rsi)
je 0x74b8
movq %rdx, %rbx
movq %rsi, %r14
xorl %r12d, %r12d
xorl %r15d, %r15d
movq (%rax,%r12,8), %rsi
movq 0x8(%rbx), %rax
movq (%rax,%r12,8), %rdx
addq $0x10, %rsi
addq $0x10, %rdx
callq 0x6c34
addl %eax, %r15d
incq %r12
movq 0x8(%r14), %rax
movq 0x10(%r14), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r12, %rcx
ja 0x7483
jmp 0x74bb
xorl %r15d, %r15d
movl %r15d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/kiven-li[P]xbytes/xbytes.cpp
// Function: xbytes::xbytes::is_same_term(xbytes::term&, xbytes::term&)
bool xbytes::is_same_term(term& l, term& r)
{
	if(l.r != r.r || l.dot != r.dot || l.forwards.size() != r.forwards.size()) return false;
	for(int i = 0; i < l.forwards.size(); ++i)
	{
		if(l.forwards[i] != r.forwards[i]) return false;
	}
	return true;
}

// Assembly:
movq (%rsi), %rax
cmpq (%rdx), %rax
jne 0x752a
movl 0x8(%rsi), %eax
cmpl 0x8(%rdx), %eax
jne 0x752a
movq 0x10(%rsi), %rax
movq 0x18(%rsi), %rdi
movq %rdi, %rcx
subq %rax, %rcx
movq 0x10(%rdx), %rsi
movq 0x18(%rdx), %rdx
subq %rsi, %rdx
cmpq %rdx, %rcx
jne 0x752a
cmpq %rax, %rdi
je 0x752d
pushq %rbp
movq %rsp, %rbp
sarq $0x3, %rcx
cmpq $0x1, %rcx
movq %rcx, %rdx
adcq $0x0, %rdx
xorl %edi, %edi
movq (%rax,%rdi,8), %r8
cmpq (%rsi,%rdi,8), %r8
jne 0x7530
incq %rdi
cmpq %rdi, %rdx
jne 0x7510
cmpq %rdi, %rcx
setbe %al
jmp 0x7532
xorl %eax, %eax
retq
movb $0x1, %al
retq
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/kiven-li[P]xbytes/xbytes.cpp
// Function: xbytes::xbytes::add_term(xbytes::lr_state&, xbytes::term&)
int xbytes::add_term(lr_state& s, term& tt)
{	
	for(int i = 0; i < s.terms.size(); ++i)
	{
		//完全一样则返回
		term& t = *(s.terms[i]);
		if(is_same_term(t, tt)) return 0;

		//如果是向前看符号集不一样则合并向前看符号集
		if(t.r == tt.r && t.dot == tt.dot)
		{
			return merge_symbol_set(t.forwards, tt.forwards);
		}
	}

	term* t = new term();
	*t = tt;
	t->is_completed = false;
	s.terms.push_back(t);
	return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, -0x30(%rbp)
movq 0x8(%rsi), %r13
movq %rsi, -0x40(%rbp)
movq 0x10(%rsi), %r15
subq %r13, %r15
je 0x75a7
sarq $0x3, %r15
movq -0x30(%rbp), %rax
movq (%rax), %rbx
movl 0x8(%rax), %eax
movl %eax, -0x34(%rbp)
cmpq $0x1, %r15
adcq $0x0, %r15
xorl %r14d, %r14d
movq (%r13,%r14,8), %r12
movq %r12, %rsi
movq -0x30(%rbp), %rdx
callq 0x74c8
testb %al, %al
jne 0x7605
cmpq %rbx, (%r12)
jne 0x759f
movl -0x34(%rbp), %eax
cmpl %eax, 0x8(%r12)
je 0x762a
incq %r14
cmpq %r14, %r15
jne 0x7576
movl $0x30, %edi
callq 0x3250
movq %rax, %r15
leaq 0x10(%rax), %rdi
movq %rax, -0x48(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, 0xc(%rax)
movups %xmm0, 0x1c(%rax)
movl $0x0, 0x2c(%rax)
movq -0x30(%rbp), %rsi
movl 0x8(%rsi), %eax
movl %eax, 0x8(%r15)
movq (%rsi), %rax
movq %rax, (%r15)
addq $0x10, %rsi
callq 0xa192
movb $0x0, 0x28(%r15)
movq -0x40(%rbp), %rdi
movq 0x10(%rdi), %rsi
cmpq 0x18(%rdi), %rsi
je 0x7609
movq %r15, (%rsi)
addq $0x8, 0x10(%rdi)
jmp 0x7616
xorl %eax, %eax
jmp 0x761b
addq $0x8, %rdi
leaq -0x48(%rbp), %rdx
callq 0xb1c8
movl $0x1, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq $0x10, %r12
movq -0x30(%rbp), %rdx
addq $0x10, %rdx
movq %r12, %rsi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x6c34
// File: /workspace/github_cpp_makefile_star2_O3/kiven-li[P]xbytes/xbytes.cpp
// Function: xbytes::xbytes::make_symbol(xbytes::rule&, xbytes::symbol&)
void xbytes::make_symbol(rule& r, symbol& s)
{
	if(s.name.size() == 0) return;

	//add to symbol table
	symbol* ss = find_symbol(s.name);
	if(ss == NULL)
	{
		ss = new symbol();
		ss->index = symbols.size();
		ss->name = s.name;
		ss->alias = s.alias;
		ss->type = ss->name[0] >= 'a' && ss->name[0] <= 'z' ? ST_NONTERMINAL : ST_TERMINAL;
		ss->precedence = -1;
		ss->associativity = AT_NONE;
		symbols.push_back(ss);
	}
	assert(ss != NULL);

	//attach to rule
	if(r.left == NULL)
	{
		r.left = ss;
		r.left_alias = s.alias;
	}
	else
	{
		r.rights.push_back(ss);
		r.right_alias.push_back(s.alias);
	}

	//clear symbol
	s.name.clear();
	s.alias.clear();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpq $0x0, 0x10(%rdx)
je 0x796e
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x8(%rdx), %r12
movq %r12, %rsi
callq 0x7c9e
movq %rax, -0x30(%rbp)
testq %rax, %rax
jne 0x790a
movl $0xa8, %edi
callq 0x3250
movq %r12, %rsi
movq %rax, %r12
leaq 0x8(%rax), %rdi
addq $0x18, %rax
movq %rax, 0x8(%r12)
xorl %r13d, %r13d
movq %r13, 0x10(%r12)
movb %r13b, 0x18(%r12)
leaq 0x28(%r12), %rax
movq %rax, -0x38(%rbp)
leaq 0x38(%r12), %rax
movq %rax, 0x28(%r12)
movq %r13, 0x30(%r12)
movb %r13b, 0x38(%r12)
movl %r13d, 0x48(%r12)
xorps %xmm0, %xmm0
movups %xmm0, 0x50(%r12)
movq %r13, 0x60(%r12)
movups %xmm0, 0x70(%r12)
movups %xmm0, 0x80(%r12)
movups %xmm0, 0x90(%r12)
movq %r12, -0x30(%rbp)
movq 0x10(%r15), %rax
subq 0x8(%r15), %rax
shrq $0x3, %rax
movl %eax, (%r12)
callq 0x3120
leaq 0x28(%rbx), %rsi
movq -0x38(%rbp), %rdi
callq 0x3120
movq 0x8(%r12), %rax
movb (%rax), %al
addb $-0x61, %al
cmpb $0x1a, %al
adcl $0x1, %r13d
movl %r13d, 0x48(%r12)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, 0xa0(%r12)
movq 0x10(%r15), %rsi
cmpq 0x18(%r15), %rsi
je 0x78f1
movq %r12, (%rsi)
addq $0x8, 0x10(%r15)
jmp 0x7901
addq $0x8, %r15
leaq -0x30(%rbp), %rdx
movq %r15, %rdi
callq 0xb088
movq -0x30(%rbp), %rax
testq %rax, %rax
je 0x797d
cmpq $0x0, 0x8(%r14)
je 0x7925
movq 0x38(%r14), %rsi
cmpq 0x40(%r14), %rsi
je 0x793b
movq %rax, (%rsi)
addq $0x8, 0x38(%r14)
jmp 0x7948
movq %rax, 0x8(%r14)
leaq 0x28(%rbx), %rsi
addq $0x10, %r14
movq %r14, %rdi
callq 0x3120
jmp 0x7958
leaq 0x30(%r14), %rdi
leaq -0x30(%rbp), %rdx
callq 0xb088
addq $0x48, %r14
leaq 0x28(%rbx), %rsi
movq %r14, %rdi
callq 0xa30c
xorl %eax, %eax
movq %rax, 0x10(%rbx)
movq 0x8(%rbx), %rcx
movb %al, (%rcx)
movq %rax, 0x30(%rbx)
movq 0x28(%rbx), %rcx
movb %al, (%rcx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x5b65(%rip), %rdi      # 0xd4e9
leaq 0x581d(%rip), %rsi      # 0xd1a8
leaq 0x5b62(%rip), %rcx      # 0xd4f4
movl $0x45a, %edx            # imm = 0x45A
callq 0x3150
// File: /workspace/github_cpp_makefile_star2_O3/kiven-li[P]xbytes/xbytes.cpp
// Function: xbytes::xbytes::find_symbol(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
symbol* xbytes::find_symbol(const string& name)
{
	for(int i = 0; i < symbols.size(); ++i)
	{
		if(symbols[i]->name == name)
		{
			return symbols[i];
		}
	}

	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x8(%rdi), %r12
movq 0x10(%rdi), %r13
subq %r12, %r13
je 0x7cfd
sarq $0x3, %r13
movq (%rsi), %rax
movq %rax, -0x30(%rbp)
movq 0x8(%rsi), %r14
cmpq $0x1, %r13
adcq $0x0, %r13
xorl %ebx, %ebx
movq (%r12,%rbx,8), %r15
cmpq %r14, 0x10(%r15)
jne 0x7cf5
testq %r14, %r14
je 0x7d00
movq 0x8(%r15), %rdi
movq -0x30(%rbp), %rsi
movq %r14, %rdx
callq 0x3270
testl %eax, %eax
je 0x7d00
incq %rbx
cmpq %rbx, %r13
jne 0x7cd2
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/kiven-li[P]xbytes/xbytes.cpp
// Function: xbytes::xbytes::dump()
void xbytes::dump()
{
	dump_symbol();
	dump_rule();
	dump_first_set();
	dump_follow_set();
	dump_lr_state();
	dump_action_table();
	dump_associativity();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x8068
movq %rbx, %rdi
callq 0x83e8
movq %rbx, %rdi
callq 0x852c
movq %rbx, %rdi
callq 0x86dc
movq %rbx, %rdi
callq 0x8898
movq %rbx, %rdi
callq 0x8d1e
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x915a
// File: /workspace/github_cpp_makefile_star2_O3/kiven-li[P]xbytes/xbytes.cpp
// Function: xbytes::xbytes::dump_rule()
void xbytes::dump_rule()
{
	std::cout << "==============RULE============" << std::endl;
	for(int i = 0; i < rules.size(); ++i)
	{	
		std::cout << i << ": " << rules[i]->str_rule;

		if(rules[i]->code.size() > 0)
		{
			std::cout << "	[" << rules[i]->code << "].";
		}
		std::cout << std::endl;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8bd8(%rip), %r14      # 0x10fd8
leaq 0x524a(%rip), %rsi      # 0xd651
movl $0x1e, %edx
movq %r14, %rdi
callq 0x32b0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
movq 0x28(%rbx), %rax
cmpq 0x20(%rbx), %rax
je 0x851d
xorl %r15d, %r15d
leaq 0x5145(%rip), %r12      # 0xd598
movq %r14, %rdi
movl %r15d, %esi
callq 0x33b0
movq %rax, %r13
movl $0x2, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x32b0
movq 0x20(%rbx), %rax
movq (%rax,%r15,8), %rax
movq 0x80(%rax), %rsi
movq 0x88(%rax), %rdx
movq %r13, %rdi
callq 0x32b0
movq 0x20(%rbx), %rax
movq (%rax,%r15,8), %rax
cmpq $0x0, 0x68(%rax)
je 0x84de
movl $0x2, %edx
movq %r14, %rdi
leaq 0x51c3(%rip), %rsi      # 0xd670
callq 0x32b0
movq 0x20(%rbx), %rax
movq (%rax,%r15,8), %rax
movq 0x60(%rax), %rsi
movq 0x68(%rax), %rdx
movq %r14, %rdi
callq 0x32b0
movl $0x2, %edx
movq %rax, %rdi
leaq 0x519a(%rip), %rsi      # 0xd673
callq 0x32b0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
incq %r15
movq 0x28(%rbx), %rax
subq 0x20(%rbx), %rax
sarq $0x3, %rax
cmpq %r15, %rax
ja 0x8453
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/kiven-li[P]xbytes/xbytes.cpp
// Function: xbytes::xbytes::dump_first_set()
void xbytes::dump_first_set()
{
	std::cout << "==============FIRST SET============" << std::endl;
	for(int i = 0; i < symbols.size(); ++i)
	{
		symbol* s = symbols[i];
		if(s->type == ST_TERMINAL) continue;

		std::cout << s->name << "[";
		for(int j = 0; j < s->first_set.size(); ++j)
		{
			std::cout << s->first_set[j]->name << ",";
		}
		std::cout << "]" << std::endl;
	}
	std::cout << std::endl << std::endl;	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x8a94(%rip), %rbx      # 0x10fd8
leaq 0x512b(%rip), %rsi      # 0xd676
movl $0x23, %edx
movq %rbx, %rdi
callq 0x32b0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
movq 0x8(%r14), %rax
movq %r14, -0x30(%rbp)
movq 0x10(%r14), %rcx
cmpq %rax, %rcx
je 0x867d
xorl %r15d, %r15d
leaq 0x5279(%rip), %r13      # 0xd817
movq (%rax,%r15,8), %r12
cmpl $0x1, 0x48(%r12)
je 0x8667
movq 0x8(%r12), %rsi
movq 0x10(%r12), %rdx
movq %rbx, %rdi
callq 0x32b0
movl $0x1, %edx
movq %rax, %rdi
leaq 0x50a2(%rip), %rsi      # 0xd671
callq 0x32b0
movq 0x70(%r12), %rax
cmpq %rax, 0x78(%r12)
je 0x8620
xorl %r14d, %r14d
movq (%rax,%r14,8), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
movq %rbx, %rdi
callq 0x32b0
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x32b0
incq %r14
movq 0x70(%r12), %rax
movq 0x78(%r12), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r14, %rcx
ja 0x85e3
movl $0x1, %edx
movq %rbx, %rdi
leaq 0x4fa9(%rip), %rsi      # 0xd5d8
callq 0x32b0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
movq -0x30(%rbp), %rcx
movq 0x8(%rcx), %rax
movq 0x10(%rcx), %rcx
incq %r15
movq %rcx, %rdx
subq %rax, %rdx
sarq $0x3, %rdx
cmpq %r15, %rdx
ja 0x859e
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3170