LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/WinChua[P]MLDemo/DecisionTree.cpp
// Function: TreeNode::show_tree()
void TreeNode::show_tree()
{
    std::vector<TreeNode *> current_level = {this};
    while(!current_level.empty())
    {
        std::cout << std::endl;
        std::vector<TreeNode *> next_level;
        for(auto it : current_level)
        {
            std::cout << it->attr << ":" << it->gain <<":" << it->label << " ";
//            if(it->lchild == nullptr && it->rchild == nullptr) {
//                std::cout << "the size of the leaf is " << it->record_index.size() << std::endl;
//            }
            if(it->lchild != nullptr)
            {
                next_level.push_back(it->lchild);
            }
            if(it->rchild != nullptr)
            {
                next_level.push_back(it->rchild);
            }
        }
        swap(current_level, next_level);
        next_level.clear();
    }
    return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
leaq 0x30(%rsp), %rbx
movq %rdi, (%rbx)
leaq 0x10(%rsp), %rdi
pushq $0x1
popq %rdx
leaq 0xf(%rsp), %rcx
movq %rbx, %rsi
callq 0x31ba
movq 0x5230(%rip), %r14      # 0x7fd8
leaq 0x23ed(%rip), %r15      # 0x519c
movq 0x10(%rsp), %rax
cmpq 0x18(%rsp), %rax
je 0x2ebe
movq %r14, %rdi
callq 0x20d0
andq $0x0, 0x40(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movq 0x10(%rsp), %rbp
movq 0x18(%rsp), %r12
cmpq %r12, %rbp
je 0x2e75
movq (%rbp), %r13
leaq 0x20(%r13), %rsi
movq %r14, %rdi
callq 0x2190
movq %rax, %rdi
movq %r15, %rsi
callq 0x21a0
movsd 0x40(%r13), %xmm0
movq %rax, %rdi
callq 0x2260
movq %rax, %rdi
movq %r15, %rsi
callq 0x21a0
movl 0x78(%r13), %esi
movq %rax, %rdi
callq 0x2290
movq %rax, %rdi
leaq 0x22f9(%rip), %rsi      # 0x512b
callq 0x21a0
cmpq $0x0, 0x80(%r13)
je 0x2e50
leaq 0x80(%r13), %rsi
movq %rbx, %rdi
callq 0x31f0
cmpq $0x0, 0x88(%r13)
je 0x2e6c
addq $0x88, %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x31f0
addq $0x8, %rbp
jmp 0x2ddf
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
movq 0x20(%rsp), %rdx
movaps 0x30(%rsp), %xmm0
movaps %xmm0, 0x10(%rsp)
movq 0x40(%rsp), %rsi
movq %rsi, 0x20(%rsp)
movq %rax, 0x30(%rsp)
movq %rcx, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
cmpq %rax, %rcx
je 0x2eb1
movq %rax, 0x38(%rsp)
movq %rbx, %rdi
callq 0x3c4a
jmp 0x2daf
leaq 0x10(%rsp), %rdi
callq 0x3c4a
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x2ee9
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x3c4a
leaq 0x10(%rsp), %rdi
callq 0x3c4a
movq %rbx, %rdi
callq 0x22a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/WinChua[P]MLDemo/DecisionTree.cpp
// Function: TreeNode::gain_of_attr(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<int, std::allocator<int>>&, std::vector<int, std::allocator<int>>&)
double TreeNode::gain_of_attr(std::string attr, std::vector<int> &l_index, std::vector<int> &r_index)
{
    double en = entropy();
    float index_size = record_index.size();
    for(auto ri : record_index)
    {
        if(data.records[ri].data.find(attr) == data.records[ri].data.end())
        {
            r_index.push_back(ri);
        }
        else l_index.push_back(ri);
    }
    double r_entropy = _entropy(r_index);
    double l_entropy = _entropy(l_index);
    double div = r_index.size()/index_size* r_entropy + l_index.size() / index_size* l_entropy;
    double gain = en - div;
    return gain;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r14
movq %rdx, 0x10(%rsp)
movq %rsi, %r12
movq %rdi, %r15
callq 0x30e4
movsd %xmm0, 0x20(%rsp)
movq 0x8(%r15), %rbx
movq 0x10(%r15), %rbp
leaq 0xc(%rsp), %r13
movq %rbx, (%rsp)
cmpq %rbp, %rbx
je 0x2f8c
movslq (%rbx), %rax
movl %eax, 0xc(%rsp)
movq (%r15), %rcx
movq 0x20(%rcx), %rcx
imulq $0x38, %rax, %rax
leaq (%rcx,%rax), %rdi
addq $0x8, %rdi
movq %r12, %rsi
callq 0x3b78
movq (%r15), %rcx
movslq 0xc(%rsp), %rdx
movq 0x20(%rcx), %rcx
imulq $0x38, %rdx, %rdx
addq %rdx, %rcx
addq $0x10, %rcx
cmpq %rcx, %rax
movq 0x10(%rsp), %rdi
cmoveq %r14, %rdi
movq %r13, %rsi
callq 0x3132
addq $0x4, %rbx
jmp 0x2f34
subq (%rsp), %rbp
sarq $0x2, %rbp
js 0x2f9d
cvtsi2ss %rbp, %xmm0
jmp 0x2fb2
movq %rbp, %rax
shrq %rax
andl $0x1, %ebp
orq %rax, %rbp
cvtsi2ss %rbp, %xmm0
addss %xmm0, %xmm0
movss %xmm0, (%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x30ee
movsd %xmm0, 0x18(%rsp)
movq %r15, %rdi
movq 0x10(%rsp), %rsi
callq 0x30ee
movq 0x8(%r14), %rax
subq (%r14), %rax
sarq $0x2, %rax
js 0x2fe9
cvtsi2ss %rax, %xmm1
jmp 0x2ffe
movq %rax, %rcx
shrq %rcx
andl $0x1, %eax
orq %rcx, %rax
cvtsi2ss %rax, %xmm1
addss %xmm1, %xmm1
movss (%rsp), %xmm3
divss %xmm3, %xmm1
cvtss2sd %xmm1, %xmm1
movq 0x10(%rsp), %rcx
movq 0x8(%rcx), %rax
subq (%rcx), %rax
sarq $0x2, %rax
js 0x3024
cvtsi2ss %rax, %xmm2
jmp 0x3039
movq %rax, %rcx
shrq %rcx
andl $0x1, %eax
orq %rcx, %rax
cvtsi2ss %rax, %xmm2
addss %xmm2, %xmm2
divss %xmm3, %xmm2
cvtss2sd %xmm2, %xmm2
mulsd %xmm2, %xmm0
mulsd 0x18(%rsp), %xmm1
addsd %xmm0, %xmm1
movsd 0x20(%rsp), %xmm0
subsd %xmm1, %xmm0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/WinChua[P]MLDemo/DecisionTree.cpp
// Function: get_entropy(double, double)
double get_entropy(double pos, double neg)
{
    if(pos == 0 || neg == 0) return 0.0;
    pos = pos/(pos+neg);
    neg = 1 - pos;
    return -pos*std::log2(pos)-neg*std::log2(neg);
}

// Assembly:
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm0
jne 0x3074
jnp 0x30de
ucomisd %xmm2, %xmm1
jne 0x307c
jnp 0x30de
subq $0x28, %rsp
addsd %xmm0, %xmm1
divsd %xmm1, %xmm0
movsd 0x1fa8(%rip), %xmm1     # 0x5038
subsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
movapd 0x1f7f(%rip), %xmm1     # 0x5020
xorpd %xmm0, %xmm1
movapd %xmm1, 0x10(%rsp)
callq 0x22b0
movsd %xmm0, 0x8(%rsp)
movsd (%rsp), %xmm0
callq 0x22b0
mulsd (%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
mulsd 0x10(%rsp), %xmm1
subsd %xmm0, %xmm1
movapd %xmm1, %xmm0
addq $0x28, %rsp
retq
xorpd %xmm0, %xmm0
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/WinChua[P]MLDemo/data.cpp
// Function: File::show_features() const
void File::show_features() const
{
    for(auto it=featureset.begin(); it != featureset.end(); ++it)
    {
        std::cout << *it << " ";
    }
    std::cout << std::endl;
    return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x50(%rdi), %r15
addq $0x40, %rbx
movq 0x414a(%rip), %r14      # 0x7fd8
leaq 0x1296(%rip), %r12      # 0x512b
cmpq %rbx, %r15
je 0x3ebe
leaq 0x20(%r15), %rsi
movq %r14, %rdi
callq 0x2190
movq %rax, %rdi
movq %r12, %rsi
callq 0x21a0
movq %r15, %rdi
callq 0x21f0
movq %rax, %r15
jmp 0x3e95
movq 0x4113(%rip), %rdi      # 0x7fd8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x20d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/WinChua[P]MLDemo/data.cpp
// Function: File::File(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
File::File(std::string f): filename(f), positive_case(0), negative_case(0)
{
    std::ifstream fin(filename.c_str());
    std::string line;
    while(std::getline(fin, line))
    {
        records.emplace(records.end(), line, featureset);
        if((records.end()-1)->label == 1)
            positive_case += 1;
        else
            negative_case += 1;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x230, %rsp            # imm = 0x230
movq %rdi, %rbx
callq 0x2220
leaq 0x20(%rbx), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rbx)
andq $0x0, 0x30(%rbx)
leaq 0x38(%rbx), %r15
andl $0x0, 0x40(%rbx)
leaq 0x40(%rbx), %rax
andq $0x0, 0x48(%rbx)
movq %rax, 0x50(%rbx)
movq %rax, 0x58(%rbx)
movups %xmm0, 0x60(%rbx)
movq (%rbx), %rsi
leaq 0x28(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x22d0
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x28(%rsp), %r12
leaq 0x8(%rsp), %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x2050
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x4001
movq 0x28(%rbx), %rsi
movq %r14, %rdi
movq %r13, %rdx
movq %r15, %rcx
callq 0x40e8
movq 0x28(%rbx), %rax
cmpl $0x1, -0x38(%rax)
jne 0x3ffc
incl 0x68(%rbx)
jmp 0x3fc2
incl 0x6c(%rbx)
jmp 0x3fc2
leaq 0x8(%rsp), %rdi
callq 0x20c0
leaq 0x28(%rsp), %rdi
callq 0x2060
addq $0x230, %rsp            # imm = 0x230
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r12
jmp 0x4044
jmp 0x402d
movq %rax, %r12
leaq 0x8(%rsp), %rdi
callq 0x20c0
leaq 0x28(%rsp), %rdi
callq 0x2060
movq %r15, %rdi
callq 0x34ea
movq %r14, %rdi
callq 0x4064
movq %rbx, %rdi
callq 0x20c0
movq %r12, %rdi
callq 0x22a0
// File: /workspace/github_cpp_makefile_star2_O2/WinChua[P]MLDemo/Include/data.hpp
// Function: Record::Record(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&)
Record(std::string field_values, File::FeatureSet & featuresets)
    {
        std::stringstream ss(field_values);
        ss >> label;
        std::string field_value;
        while(ss)
        {
            ss >> field_value;
            std::string field = field_value.substr(0, field_value.find(":"));
            featuresets.insert(field);
            float value = atof(field_value.substr(field_value.find(":")+1,
                                                  field_value.size()).c_str());
            data.emplace(field, value);
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1f8, %rsp            # imm = 0x1F8
movq %rdx, %r14
movq %rdi, %r15
leaq 0x8(%rdi), %rbx
leaq 0x10(%rdi), %rax
andl $0x0, 0x10(%rdi)
andq $0x0, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movq %rax, 0x28(%rdi)
andq $0x0, 0x30(%rdi)
leaq 0x70(%rsp), %rdi
pushq $0x18
popq %rdx
callq 0x2250
leaq 0x70(%rsp), %rdi
movq %r15, %rsi
callq 0x2110
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x10(%rsp), %r12
leaq 0xdee(%rip), %r13       # 0x519c
leaq 0x50(%rsp), %rbp
leaq 0x30(%rsp), %r15
movq 0x70(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x90(%rsp,%rax)
jne 0x446a
leaq 0x70(%rsp), %rdi
movq %r12, %rsi
callq 0x2210
movq %r12, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x22e0
movq %rbp, %rdi
movq %r12, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x21d0
movq %r14, %rdi
movq %rbp, %rsi
callq 0x44d6
movq %r12, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x22e0
leaq 0x1(%rax), %rdx
movq 0x18(%rsp), %rcx
movq %r15, %rdi
movq %r12, %rsi
callq 0x21d0
movq 0x30(%rsp), %rdi
callq 0x2200
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x8(%rsp)
movq %r15, %rdi
callq 0x20c0
movss 0x8(%rsp), %xmm0
movss %xmm0, 0xc(%rsp)
movq %rbx, %rdi
movq %rbp, %rsi
leaq 0xc(%rsp), %rdx
callq 0x4608
movq %rbp, %rdi
callq 0x20c0
jmp 0x43b8
leaq 0x10(%rsp), %rdi
callq 0x20c0
leaq 0x70(%rsp), %rdi
callq 0x2150
addq $0x1f8, %rsp            # imm = 0x1F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x44bc
movq %rax, %r14
jmp 0x44c6
jmp 0x44a0
jmp 0x44a0
jmp 0x44af
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0x20c0
jmp 0x44b2
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x20c0
leaq 0x70(%rsp), %rdi
callq 0x2150
movq %rbx, %rdi
callq 0x37a4
movq %r14, %rdi
callq 0x22a0
// File: /workspace/github_cpp_makefile_star2_O2/WinChua[P]MLDemo/main.cpp
// Function: main
int main(int argc, char* argv[])
{
    if(argc < 3)
    {
        std::cout << "you should specify the train and test file like:" << std::endl;
        std::cout << "MLDemo train.file test.file" << std::endl;
        return 1;
    }
    std::string trainfile(argv[1]), testfile(argv[2]);
    File train(trainfile);
    File test(testfile);
    //train.show_features();
    TreeNode root(train);
    train.show_statistic();
    test.show_statistic();
    root.test(test);
    return 0;
}

// Assembly:
pushq %rbx
subq $0x1f0, %rsp            # imm = 0x1F0
cmpl $0x2, %edi
jg 0x4a86
movq 0x3588(%rip), %rbx      # 0x7fd8
leaq 0x716(%rip), %rsi       # 0x516d
movq %rbx, %rdi
callq 0x21a0
movq %rax, %rdi
callq 0x20d0
leaq 0x730(%rip), %rsi       # 0x519e
movq %rbx, %rdi
callq 0x21a0
movq %rax, %rdi
callq 0x20d0
pushq $0x1
popq %rax
jmp 0x4b86
movq %rsi, %rbx
movq 0x8(%rsi), %rsi
leaq 0x60(%rsp), %rdi
leaq 0x160(%rsp), %rdx
callq 0x320e
movq 0x10(%rbx), %rsi
leaq 0x40(%rsp), %rdi
leaq 0x160(%rsp), %rdx
callq 0x320e
leaq 0x20(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x2220
leaq 0xf0(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x3f52
leaq 0x20(%rsp), %rdi
callq 0x20c0
movq %rsp, %rdi
leaq 0x40(%rsp), %rsi
callq 0x2220
leaq 0x80(%rsp), %rdi
movq %rsp, %rsi
callq 0x3f52
movq %rsp, %rdi
callq 0x20c0
leaq 0x160(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0x246c
leaq 0xf0(%rsp), %rdi
callq 0x3ed6
leaq 0x80(%rsp), %rdi
callq 0x3ed6
leaq 0x160(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x2b8e
leaq 0x160(%rsp), %rdi
callq 0x4c06
leaq 0x80(%rsp), %rdi
callq 0x4c74
leaq 0xf0(%rsp), %rdi
callq 0x4c74
leaq 0x40(%rsp), %rdi
callq 0x20c0
leaq 0x60(%rsp), %rdi
callq 0x20c0
xorl %eax, %eax
addq $0x1f0, %rsp            # imm = 0x1F0
popq %rbx
retq
movq %rax, %rbx
jmp 0x4bcf
movq %rax, %rbx
movq %rsp, %rdi
callq 0x20c0
jmp 0x4bdc
movq %rax, %rbx
jmp 0x4bdc
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x20c0
jmp 0x4be9
movq %rax, %rbx
jmp 0x4be9
movq %rax, %rbx
jmp 0x4bf3
movq %rax, %rbx
leaq 0x160(%rsp), %rdi
callq 0x4c06
leaq 0x80(%rsp), %rdi
callq 0x4c74
leaq 0xf0(%rsp), %rdi
callq 0x4c74
leaq 0x40(%rsp), %rdi
callq 0x20c0
leaq 0x60(%rsp), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x22a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/flastest[P]HeterogeneousParallelDijkstra/dijkstra_nanosleep.cc
// Function: relax_vertex(unsigned long, unsigned long, float, std::priority_queue<std::pair<unsigned long, float>, std::vector<std::pair<unsigned long, float>, std::allocator<std::pair<unsigned long, float>>>, Offer_Comparator>&, std::map<unsigned long, std::shared_ptr<std::mutex>, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, std::shared_ptr<std::mutex>>>>, std::map<unsigned long, float, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, float>>>&, std::map<unsigned long, std::shared_ptr<std::mutex>, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, std::shared_ptr<std::mutex>>>>&, std::map<unsigned long, unsigned long, std::less<unsigned long>, std::allocator<std::pair<unsigned long const, unsigned long>>>&, int)
void relax_vertex(vertex_descriptor v,
			vertex_descriptor origin, 
		   float vd,
		   offer_pqueue_t& offer_pq, 
		   mutex_map_t distance_mutexes,
		   distance_map_t& distances,
		   mutex_map_t& predecessor_mutexes,
		   predecessor_map_t& predecessors,
		   int thread_id )
{
	std::lock_guard<std::mutex> guard(*distance_mutexes[v]);
	if (vd < distances[v]) 
	{

		{
//			if (DEBUG_THREAD) print_thread_debug(thread_id, "ADDING AN OFFER TO " + std::to_string(v) + "!!! distnace is " + std::to_string(vd) , debug_file_stream);
			std::lock_guard<std::mutex> guard2(pq_mutex);
			offer_pq.push(offer_t(v,vd));
//			if (DEBUG_THREAD) print_thread_debug(thread_id, "updating "+ std::to_string(v) +"'s predecessor", debug_file_stream);
			std::lock_guard<std::mutex> guard(*predecessor_mutexes[v]);
			//now update this node's predecessor 
			predecessors[v] = origin;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %r15
movq %r8, %r13
movq %rdx, %r12
movss %xmm0, 0xc(%rsp)
movq %rsi, %r14
leaq 0x10(%rsp), %rbp
movq %rdi, (%rbp)
movq %rcx, %rdi
movq %rbp, %rsi
callq 0xac9e
movq (%rax), %rbx
movq %rbx, %rdi
callq 0xb41e
movq %r13, %rdi
movq %rbp, %rsi
callq 0xacee
movss (%rax), %xmm0
ucomiss 0xc(%rsp), %xmm0
jbe 0xa56b
leaq 0xcda8(%rip), %rdi      # 0x172b0
callq 0xb41e
movq 0x10(%rsp), %rax
leaq 0x18(%rsp), %rsi
movq %rax, (%rsi)
movss 0xc(%rsp), %xmm0
movss %xmm0, 0x8(%rsi)
movq %r12, %rdi
callq 0xad3e
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0xac9e
movq (%rax), %r15
movq %r15, %rdi
callq 0xb41e
movq 0x60(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xad54
movq %r14, (%rax)
movq %r15, %rdi
callq 0x3210
leaq 0xcd4a(%rip), %rdi      # 0x172b0
callq 0x3210
movq %rbx, %rdi
callq 0x3210
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %r15, %rdi
callq 0x3210
jmp 0xa596
jmp 0xa593
jmp 0xa5a4
movq %rax, %r14
leaq 0xcd13(%rip), %rdi      # 0x172b0
callq 0x3210
jmp 0xa5a7
movq %rax, %r14
movq %rbx, %rdi
callq 0x3210
movq %r14, %rdi
callq 0x3450
// File: /workspace/github_cpp_makefile_star2_O2/yanlinlin82[P]icpp/icpp.cpp
// Function: dump_enum()
void dump_enum()
{
	for (auto it = enum_values.begin(); it != enum_values.end(); ++it) {
		log("[DEBUG] enum '%s': [ ", it->first.c_str());
		size_t i = 0;
		for (auto e : it->second) {
			log("%s%s = %d", (++i == 1 ? "" : ", "), e.first.c_str(), e.second);
		}
		log(" ]\n");
	}
	for (auto it = enum_types.begin(); it != enum_types.end(); ++it) {
		log("[DEBUG] '%s' => [ '%s', %d ]\n", it->first.c_str(),
				it->second.first.c_str(), it->second.second);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
leaq 0x1d58c(%rip), %rbx     # 0x21570
leaq -0x58(%rbp), %r15
leaq 0x12263(%rip), %r14     # 0x16252
leaq 0x12252(%rip), %r12     # 0x16248
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x4070
movq 0x8(%rbx), %rsi
leaq 0x12229(%rip), %rdi     # 0x16232
xorl %eax, %eax
callq 0xf09e
movq %rbx, -0x30(%rbp)
leaq 0x38(%rbx), %r13
xorl %ebx, %ebx
movq (%r13), %r13
testq %r13, %r13
je 0x405c
leaq 0x8(%r13), %rsi
movq %r15, %rdi
callq 0xf11a
subq $0x1, %rbx
movq %r14, %rsi
leaq 0x13447(%rip), %rax     # 0x17484
cmovbq %rax, %rsi
movq -0x58(%rbp), %rdx
movl -0x38(%rbp), %ecx
movq %r12, %rdi
xorl %eax, %eax
callq 0xf09e
movq %r15, %rdi
callq 0x3368
jmp 0x401a
leaq 0x133a3(%rip), %rdi     # 0x17406
xorl %eax, %eax
callq 0xf09e
movq -0x30(%rbp), %rbx
jmp 0x3ff6
leaq 0x1d531(%rip), %r14     # 0x215a8
leaq 0x121d7(%rip), %rbx     # 0x16255
movq (%r14), %r14
testq %r14, %r14
je 0x409e
movq 0x8(%r14), %rsi
movq 0x28(%r14), %rdx
movl 0x48(%r14), %ecx
movq %rbx, %rdi
xorl %eax, %eax
callq 0xf09e
jmp 0x407e
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/yanlinlin82[P]icpp/icpp.cpp
// Function: print_source_code_line(unsigned long)
void print_source_code_line(size_t n)
{
	log("%4zd ", n + 1);
	for (const char* p = src[n].c_str(); *p; ++p) {
		if (*p == '\t') log("    "); else log("%c", *p);
	}
	log("\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1(%rdi), %rsi
leaq 0x121ae(%rip), %rdi     # 0x16273
xorl %eax, %eax
callq 0xf09e
movq 0x1d18d(%rip), %rax     # 0x21260
shlq $0x5, %rbx
movq (%rax,%rbx), %r15
leaq 0x1219b(%rip), %rbx     # 0x1627d
leaq 0x12190(%rip), %r14     # 0x16279
movzbl (%r15), %eax
cmpl $0x9, %eax
je 0x4105
testl %eax, %eax
je 0x4114
movsbl %al, %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0xf09e
jmp 0x410f
movq %rbx, %rdi
xorl %eax, %eax
callq 0xf09e
incq %r15
jmp 0x40e9
leaq 0x131fa(%rip), %rdi     # 0x17315
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xf09e
// File: /workspace/github_cpp_makefile_star2_O2/yanlinlin82[P]icpp/icpp.cpp
// Function: print_current(bool)
void print_current(bool with_source_code = true)
{
	if (with_source_code) {
		print_source_code_line(line_no - 1);
	}
	log("     ");
	for (const char* q = src[line_no - 1].c_str(); *q && q + token.size() != p; ++q) {
		if (*q == '\t') log("    "); else log(" ");
	}
	for (size_t i = 0; i < token.size(); ++i) {
		log("^");
	}
	log("--(token='%s',type='%s')\n", token.c_str(), token_type_text[type]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testl %edi, %edi
je 0x4149
movq 0x1d13f(%rip), %rdi     # 0x21280
decq %rdi
callq 0x40ad
leaq 0x1212c(%rip), %rdi     # 0x1627c
xorl %eax, %eax
callq 0xf09e
movq 0x1d122(%rip), %rax     # 0x21280
movq 0x1d0fb(%rip), %rcx     # 0x21260
shlq $0x5, %rax
movq -0x20(%rcx,%rax), %rbx
leaq 0x12108(%rip), %r14     # 0x1627d
leaq 0x12104(%rip), %r15     # 0x16280
movb (%rbx), %al
testb %al, %al
je 0x41aa
movq 0x1d10f(%rip), %rcx     # 0x21298
addq %rbx, %rcx
cmpq 0x1d0e5(%rip), %rcx     # 0x21278
je 0x41aa
cmpb $0x9, %al
movq %r15, %rdi
cmoveq %r14, %rdi
xorl %eax, %eax
callq 0xf09e
incq %rbx
jmp 0x417c
leaq 0x12037(%rip), %rbx     # 0x161e8
xorl %r14d, %r14d
cmpq 0x1d0dd(%rip), %r14     # 0x21298
jae 0x41cc
movq %rbx, %rdi
xorl %eax, %eax
callq 0xf09e
incq %r14
jmp 0x41b4
movq 0x1d0bd(%rip), %rsi     # 0x21290
movl 0x1d0af(%rip), %eax     # 0x21288
leaq 0x1cff0(%rip), %rcx     # 0x211d0
movq (%rcx,%rax,8), %rdx
leaq 0x12097(%rip), %rdi     # 0x16282
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xf09e
// File: /workspace/github_cpp_makefile_star2_O2/yanlinlin82[P]icpp/icpp.cpp
// Function: add_symbol(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, unsigned long, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
void add_symbol(string name, bool is_code, size_t offset, size_t size, string type, string ret_type, int arg_count)
{
	log<3>("[DEBUG] add %s symbol: '%s', offset=%zd, size=%zd, type='%s', ret_type='%s', arg_count = %d\n",
			(is_code ? "code" : "data"), name.c_str(),
			offset, size, type.c_str(), ret_type.c_str(), arg_count);
	symbols[name] = make_tuple(is_code, offset, size, type, ret_type, arg_count);
	if (is_code) {
		code_symbol_dict.insert(make_pair(offset, name));
	} else {
		data_symbol_dict.insert(make_pair(offset, name));
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %r9, %r13
movq %r8, %rbx
movq %rcx, %r12
movq %rdx, %rcx
movq %rdx, -0x30(%rbp)
movl %esi, %r15d
movq %rdi, -0x38(%rbp)
leaq 0x10(%rbp), %rax
movl (%rax), %r10d
leaq 0x120b0(%rip), %rax     # 0x162f9
leaq 0x120ae(%rip), %rsi     # 0x162fe
testl %r15d, %r15d
cmovneq %rax, %rsi
movq (%rdi), %rdx
movq (%r8), %r9
leaq 0x12038(%rip), %rdi     # 0x1629c
movq %r12, %r8
xorl %eax, %eax
pushq %r10
pushq (%r13)
callq 0xf138
addq $0x10, %rsp
leaq -0x98(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rdx
leaq 0x10(%rbp), %rcx
callq 0x102d6
movq %r12, 0x48(%r14)
movq -0x30(%rbp), %r12
movq %r12, 0x50(%r14)
movb %r15b, 0x58(%r14)
movq -0x38(%rbp), %r14
leaq 0x1d0e4(%rip), %rdi     # 0x21390
movq %r14, %rsi
callq 0x11408
leaq -0x98(%rbp), %rbx
movq %rax, %rdi
movq %rbx, %rsi
callq 0xf1b4
movq %rbx, %rdi
callq 0xf1d4
testb %r15b, %r15b
je 0x42fe
leaq -0x90(%rbp), %r15
movq %r12, -0x8(%r15)
movq %r15, %rdi
movq %r14, %rsi
callq 0x3270
leaq 0x1d110(%rip), %rdi     # 0x21400
leaq -0x98(%rbp), %rsi
callq 0x1197c
jmp 0x4327
leaq -0x90(%rbp), %r15
movq %r12, -0x8(%r15)
movq %r15, %rdi
movq %r14, %rsi
callq 0x3270
leaq 0x1d0ad(%rip), %rdi     # 0x213c8
leaq -0x98(%rbp), %rsi
callq 0x1197c
movq %r15, %rdi
callq 0x3368
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4340
movq %rax, %rbx
movq %r15, %rdi
callq 0x3368
jmp 0x435c
movq %rax, %rbx
leaq -0x98(%rbp), %rdi
callq 0xf1d4
movq %rbx, %rdi
callq 0x3310
// File: /workspace/github_cpp_makefile_star2_O2/yanlinlin82[P]icpp/icpp.cpp
// Function: add_const_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<int, std::allocator<int>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
size_t add_const_string(string name, vector<int> val, string type)
{
	size_t offset = data_sec.size();
	add_symbol(name, false, offset, val.size(), type, "", 0);
	data_sec.insert(data_sec.end(), val.begin(), val.end());
	return offset;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x70, %rsp
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rsi
movq 0x1cf9d(%rip), %rbx     # 0x21320
subq 0x1cf8e(%rip), %rbx     # 0x21318
leaq -0x88(%rbp), %rdi
callq 0x3270
movq 0x8(%r14), %r15
subq (%r14), %r15
leaq -0x68(%rbp), %rdi
movq %r12, %rsi
callq 0x3270
leaq 0x130d4(%rip), %rsi     # 0x17484
leaq -0x48(%rbp), %rdi
leaq -0x21(%rbp), %rdx
callq 0xf1f8
sarq $0x2, %rbx
sarq $0x2, %r15
andl $0x0, (%rsp)
leaq -0x88(%rbp), %rdi
leaq -0x68(%rbp), %r8
leaq -0x48(%rbp), %r9
xorl %esi, %esi
movq %rbx, %rdx
movq %r15, %rcx
callq 0x4213
leaq -0x48(%rbp), %rdi
callq 0x3368
leaq -0x68(%rbp), %rdi
callq 0x3368
leaq -0x88(%rbp), %rdi
callq 0x3368
movq 0x1cf16(%rip), %rsi     # 0x21320
leaq 0x1cf07(%rip), %rdi     # 0x21318
movq (%r14), %rdx
movq 0x8(%r14), %rcx
callq 0xf234
movq %rbx, %rax
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x3368
jmp 0x443e
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x3368
jmp 0x444c
movq %rax, %rbx
leaq -0x88(%rbp), %rdi
callq 0x3368
movq %rbx, %rdi
callq 0x3310
// File: /workspace/github_cpp_makefile_star2_O2/yanlinlin82[P]icpp/icpp.cpp
// Function: add_variable(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
auto add_variable(string name, int size, string type) -> pair<bool, size_t> // { is-global, offset }
{
	log<3>("[DEBUG] add variable '%s', size = %d, type = '%s'\n",
			name.c_str(), size, type.c_str());
	if (stack_frame_table.empty()) {
		size_t offset = data_sec.size();
		add_symbol(name, false, offset, size, type, "", 0);
		data_sec.resize(data_sec.size() + size);
		return make_pair(true, offset);
	} else {
		size_t stack_frame_offset = stack_frame_table.back().first;
		code_sec[stack_frame_offset] += size;
		size_t symbol_offset = -code_sec[stack_frame_offset];
		stack_frame_table.back().second.insert(make_pair(name, make_tuple(symbol_offset, size, type)));
		return make_pair(false, symbol_offset);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rdx, %r12
movl %esi, %r14d
movq %rdi, %r15
movq (%rdi), %rsi
movq (%rdx), %rcx
leaq 0x11e62(%rip), %rdi     # 0x16303
movl %r14d, %edx
xorl %eax, %eax
callq 0xf138
movq 0x1ce96(%rip), %r13     # 0x21348
cmpq %r13, 0x1ce87(%rip)     # 0x21340
je 0x453f
movslq -0x40(%r13), %rax
movq 0x1ce36(%rip), %rcx     # 0x21300
movslq (%rcx,%rax,4), %rdx
movslq %r14d, %rbx
addq %rdx, %rbx
movl %ebx, (%rcx,%rax,4)
negq %rbx
movl %r14d, -0x2c(%rbp)
leaq -0xc0(%rbp), %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x3270
movl -0x2c(%rbp), %eax
movl %eax, 0x20(%r14)
movq %rbx, 0x28(%r14)
leaq -0x110(%rbp), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x10328
addq $-0x38, %r13
leaq -0x110(%rbp), %rsi
movq %r13, %rdi
callq 0x1202c
leaq -0x110(%rbp), %rdi
callq 0xf28c
leaq -0xc0(%rbp), %rdi
callq 0x3368
xorl %eax, %eax
jmp 0x45e7
movq 0x1cdda(%rip), %rbx     # 0x21320
subq 0x1cdcb(%rip), %rbx     # 0x21318
leaq -0x90(%rbp), %rdi
movq %r15, %rsi
callq 0x3270
leaq -0x70(%rbp), %rdi
movq %r12, %rsi
callq 0x3270
leaq 0x12f15(%rip), %rsi     # 0x17484
leaq -0x50(%rbp), %rdi
leaq -0x110(%rbp), %rdx
callq 0xf1f8
sarq $0x2, %rbx
movslq %r14d, %r14
andl $0x0, (%rsp)
leaq -0x90(%rbp), %rdi
leaq -0x70(%rbp), %r8
leaq -0x50(%rbp), %r9
xorl %esi, %esi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x4213
leaq -0x50(%rbp), %rdi
callq 0x3368
leaq -0x70(%rbp), %rdi
callq 0x3368
leaq -0x90(%rbp), %rdi
callq 0x3368
leaq 0x1cd4d(%rip), %rdi     # 0x21318
movq 0x1cd4e(%rip), %rsi     # 0x21320
subq 0x1cd3f(%rip), %rsi     # 0x21318
sarq $0x2, %rsi
addq %r14, %rsi
callq 0xf254
movb $0x1, %al
movq %rbx, %rdx
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x3368
jmp 0x460d
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x3368
jmp 0x461b
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
jmp 0x463f
movq %rax, %rbx
leaq -0x110(%rbp), %rdi
callq 0xf28c
jmp 0x4638
movq %rax, %rbx
leaq -0xc0(%rbp), %rdi
callq 0x3368
movq %rbx, %rdi
callq 0x3310
// File: /workspace/github_cpp_makefile_star2_O2/yanlinlin82[P]icpp/icpp.cpp
// Function: print_stack_frame()
void print_stack_frame()
{
	if (verbose >= 4) {
		log("[DEBUG] current stack frame has %zd variable\n", stack_frame_table.back().second.size());
		size_t i = 0;
		for (auto it = stack_frame_table.back().second.begin();
				it != stack_frame_table.back().second.end();
				++it) {
			auto [ offset, size, type ] = it->second;
			log("[DEBUG] [%zd] '%s': offset=%d, size=%d, type='%s'\n", i++, it->first.c_str(), offset, size, type.c_str());
		}
	}
}

// Assembly:
cmpl $0x4, 0x1cf7d(%rip)     # 0x215d0
jl 0x46ee
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq 0x1ccd7(%rip), %rax     # 0x21348
movq -0x20(%rax), %rsi
leaq 0x11cba(%rip), %rdi     # 0x16336
xorl %eax, %eax
callq 0xf09e
movq 0x1ccbe(%rip), %r12     # 0x21348
addq $-0x28, %r12
leaq -0x50(%rbp), %rbx
leaq 0x11ccb(%rip), %r14     # 0x16364
xorl %r15d, %r15d
movq (%r12), %r12
testq %r12, %r12
je 0x46e0
leaq 0x28(%r12), %rsi
movq %rbx, %rdi
callq 0x1038c
leaq 0x1(%r15), %r13
movq 0x8(%r12), %rdx
movl -0x2c(%rbp), %ecx
movl -0x30(%rbp), %r8d
movq -0x50(%rbp), %r9
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0xf09e
movq %rbx, %rdi
callq 0x3368
movq %r13, %r15
jmp 0x469c
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/yanlinlin82[P]icpp/icpp.cpp
// Function: add_argument(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, unsigned long)
void add_argument(string name, string type, size_t offset)
{
	log<3>("[DEBUG] add argument '%s', type = '%s'\n", name.c_str(), type.c_str());
	auto& stack_frame = stack_frame_table.back().second;
	stack_frame.insert(make_pair(name, make_tuple(offset, 1, type)));
	print_stack_frame();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq (%rdi), %rsi
movq (%r15), %rdx
leaq 0x11c7e(%rip), %rdi     # 0x16397
xorl %eax, %eax
callq 0xf138
movq 0x1cc21(%rip), %rbx     # 0x21348
leaq -0x58(%rbp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x3270
movl $0x1, 0x20(%r13)
movq %r14, 0x28(%r13)
leaq -0xa8(%rbp), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x10328
addq $-0x38, %rbx
leaq -0xa8(%rbp), %rsi
movq %rbx, %rdi
callq 0x1202c
leaq -0xa8(%rbp), %rdi
callq 0xf28c
leaq -0x58(%rbp), %rdi
callq 0x3368
callq 0x464c
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0xa8(%rbp), %rdi
callq 0xf28c
jmp 0x47a7
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x3368
movq %rbx, %rdi
callq 0x3310
// File: /workspace/github_cpp_makefile_star2_O2/yanlinlin82[P]icpp/icpp.cpp
// Function: print_code(std::vector<int, std::allocator<int>> const&, unsigned long, unsigned long)
size_t print_code(const vector<int>& mem, size_t ip, size_t code_loading_position = 0)
{
	size_t code_offset = ip;
	log(COLOR_YELLOW "%-10zd" COLOR_BLUE, ip);
	size_t i = mem[ip++];
	if (i < INVALID) {
		log("%-14.6s", &instruction_name[i * 6]);
	} else {
		log("<0x%08zX>  ", i);
	}
	if (instruction_has_parameter(i)) {
		int v = mem[ip++];
		char buf[64];
		snprintf(buf, sizeof(buf), "0x%08X (%d)", v, v);
		log("%-25s", buf);
		auto it = comments.find(code_offset - code_loading_position);
		if (it != comments.end()) {
			log(" ; %s", it->second.c_str());
		} else if (i == CALL || i == JMP || i == JZ || i == JNZ) {
			log(" ; address %d", ip + v);
		}
	}
	log(COLOR_NORMAL "\n");
	return ip;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r13
leaq 0x11abb(%rip), %rdi     # 0x163bf
xorl %eax, %eax
callq 0xf09e
movq (%r13), %rax
movslq (%rax,%r15,4), %r14
cmpq $0x29, %r14
ja 0x492d
imulq $0x6, %r14, %rsi
addq 0x1c89c(%rip), %rsi     # 0x211c0
leaq 0x11aa5(%rip), %rdi     # 0x163d0
jmp 0x4937
leaq 0x11aa4(%rip), %rdi     # 0x163d8
movq %r14, %rsi
xorl %eax, %eax
callq 0xf09e
leaq 0x1(%r15), %rbx
cmpl $0x29, %r14d
ja 0x4a07
movl %r14d, %eax
movabsq $0x3e8000007f8, %rcx    # imm = 0x3E8000007F8
btq %rax, %rcx
jae 0x4a07
leaq 0x2(%r15), %rax
movq %rax, -0x30(%rbp)
movq (%r13), %rax
movl 0x4(%rax,%r15,4), %r13d
leaq 0x11a69(%rip), %rdx     # 0x163e4
leaq -0x80(%rbp), %rbx
pushq $0x40
popq %rsi
movq %rbx, %rdi
movl %r13d, %ecx
movl %r13d, %r8d
xorl %eax, %eax
callq 0x32b0
leaq 0x11a57(%rip), %rdi     # 0x163f0
movq %rbx, %rsi
xorl %eax, %eax
callq 0xf09e
subq %r12, %r15
leaq -0x38(%rbp), %rsi
movq %r15, (%rsi)
leaq 0x1c9a4(%rip), %rdi     # 0x21358
callq 0x12cf6
testq %rax, %rax
je 0x49d6
movq 0x10(%rax), %rsi
leaq 0x11a2d(%rip), %rdi     # 0x163f6
xorl %eax, %eax
callq 0xf09e
movq -0x30(%rbp), %rbx
jmp 0x4a07
cmpl $0x29, %r14d
movq -0x30(%rbp), %rbx
ja 0x4a07
movl %r14d, %eax
movabsq $0x3a000000000, %rcx    # imm = 0x3A000000000
btq %rax, %rcx
jae 0x4a07
movslq %r13d, %rsi
addq %rbx, %rsi
leaq 0x119fc(%rip), %rdi     # 0x163fc
xorl %eax, %eax
callq 0xf09e
leaq 0x12710(%rip), %rdi     # 0x1711e
xorl %eax, %eax
callq 0xf09e
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/yanlinlin82[P]icpp/icpp.cpp
// Function: prepare_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
vector<int> prepare_string(const string& s)
{
	size_t bytes = s.size() + 1;
	size_t size = (bytes + sizeof(int) - 1) / sizeof(int);
	vector<int> a(size);
	memcpy(&a[0], s.c_str(), bytes);
	return a;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rsi), %r15
leaq 0x4(%r15), %rsi
shrq $0x2, %rsi
leaq -0x19(%rbp), %rdx
callq 0xef3a
incq %r15
movq (%r14), %rdi
movq (%rbx), %rsi
movq %r15, %rdx
callq 0x3190
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/yanlinlin82[P]icpp/icpp.cpp
// Function: skip_until(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void skip_until(string expected_token, string stat)
{
	next();
	while (!token.empty() && token != expected_token) {
		next();
	}
	if (token.empty()) {
		expect_token(expected_token, stat);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x1be26(%rip), %r15     # 0x21290
callq 0x4fdf
cmpq $0x0, 0x1be21(%rip)     # 0x21298
je 0x5492
movq %r15, %rdi
movq %r14, %rsi
callq 0xf403
testb %al, %al
jne 0x546a
cmpq $0x0, 0x1be08(%rip)     # 0x21298
jne 0x54c9
leaq -0x58(%rbp), %rdi
movq %r14, %rsi
callq 0x3270
leaq -0x38(%rbp), %rdi
movq %rbx, %rsi
callq 0x3270
leaq -0x58(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x540c
leaq -0x38(%rbp), %rdi
callq 0x3368
leaq -0x58(%rbp), %rdi
callq 0x3368
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x3368
jmp 0x54e5
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x3368
movq %rbx, %rdi
callq 0x3310
// File: /workspace/github_cpp_makefile_star2_O2/yanlinlin82[P]icpp/icpp.cpp
// Function: precedence(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int precedence(string token)
{
	auto it = operator_precedence.find(token);
	if (it == operator_precedence.end()) {
		err("unknown operator '%s'!\n", token.c_str());
	}
	return it->second;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x1bd09(%rip), %rdi     # 0x21210
movq %r14, %rsi
callq 0x133c2
movq %rax, %rbx
testq %rax, %rax
jne 0x5528
movq (%r14), %rsi
leaq 0x10fb9(%rip), %rdi     # 0x164da
xorl %eax, %eax
callq 0xf410
movl 0x28(%rbx), %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/yanlinlin82[P]icpp/icpp.cpp
// Function: eval_number(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int eval_number(string s) // TODO: support long long and float/double
{
	int n = 0;
	bool minus = false;
	const char* p = s.c_str();
	if (*p == '-') { ++p; minus = true; }
	int base = 10;
	if (*p == '0') {
		++p; base = 8;
		if (*p == 'x') {
			++p; base = 16;
		}
	}
	for (; *p; ++p) {
		if (*p == '.') break;
		if (!((*p >= '0' && *p <= '9') || (*p >= 'A' && *p <= 'F') || (*p >= 'a' && *p <= 'f'))) {
			err("unexpected character '%c' in number '%s'!", *p, s.c_str());
		}
		int x = *p - (*p >= 'a' ? ('a' - 10) : (*p >= 'A' ? ('A' - 10) : '0'));
		if (x >= base) err("Invalid number '%s'!", s.c_str());
		n = n * base + x;
	}
	return (minus ? -n : n);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, -0x38(%rbp)
movq (%rdi), %rax
movb (%rax), %dl
xorl %ecx, %ecx
movb %dl, -0x29(%rbp)
cmpb $0x2d, %dl
sete %cl
leaq (%rax,%rcx), %r13
cmpb $0x30, (%rax,%rcx)
jne 0x569f
leaq 0x2(%r13), %rax
xorl %ecx, %ecx
cmpb $0x78, 0x1(%r13)
leaq 0x1(%r13), %r13
sete %cl
cmoveq %rax, %r13
leal 0x8(,%rcx,8), %r15d
jmp 0x56a3
pushq $0xa
popq %r15
pushq $-0x57
popq %rbx
xorl %r14d, %r14d
movsbl (%r13), %esi
testl %esi, %esi
je 0x573d
movzbl %sil, %eax
cmpl $0x2e, %eax
je 0x573d
leal -0x30(%rsi), %ecx
cmpb $0xa, %cl
jb 0x56df
addl $-0x41, %eax
cmpl $0x25, %eax
ja 0x5722
movabsq $0x3f0000003f, %rcx     # imm = 0x3F0000003F
btq %rax, %rcx
jae 0x5722
pushq $-0x37
popq %r12
cmpb $0x41, %sil
jge 0x56ed
pushq $-0x30
popq %r12
movsbl %sil, %eax
cmpb $0x61, %sil
cmovgel %ebx, %r12d
addl %eax, %r12d
cmpl %r15d, %r12d
jl 0x5716
movq -0x38(%rbp), %rax
movq (%rax), %rsi
leaq 0x10e0d(%rip), %rdi     # 0x1651c
xorl %eax, %eax
callq 0xf410
imull %r15d, %r14d
addl %r12d, %r14d
incq %r13
jmp 0x56a9
movq -0x38(%rbp), %rax
movq (%rax), %rdx
leaq 0x10dc2(%rip), %rdi     # 0x164f2
xorl %eax, %eax
callq 0xf410
movb (%r13), %sil
jmp 0x56df
movl %r14d, %eax
negl %eax
cmpb $0x2d, -0x29(%rbp)
cmovnel %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/yanlinlin82[P]icpp/icpp.cpp
// Function: eval_string(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string eval_string(string s)
{
	string r;
	for (size_t i = 1; i + 1 < s.size(); ++i) {
		if (s[i] != '\\') {
			r += s[i];
		} else {
			char c = s[++i];
			switch (c) {
			default: r += c; break;
			case 'r': r += '\r'; break;
			case 'n': r += '\n'; break;
			case 't': r += '\t'; break;
			case '\'': r += '\''; break;
			case '\"': r += '\"'; break;
			}
		}
	}
	return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movq %rsi, %r14
movb $0x0, 0x10(%rdi)
pushq $0x1
popq %r12
leaq 0x1(%r12), %r15
cmpq 0x8(%r14), %r15
jae 0x57d5
movq (%r14), %rcx
movb (%rcx,%r12), %al
cmpb $0x5c, %al
jne 0x57ac
movzbl (%rcx,%r15), %eax
cmpl $0x6e, %eax
je 0x57c0
cmpl $0x72, %eax
je 0x57bc
cmpl $0x74, %eax
jne 0x57c2
movb $0x9, %al
jmp 0x57c2
movsbl %al, %esi
movq %rbx, %rdi
callq 0x31a0
movq %r12, %r15
jmp 0x57cd
movb $0xd, %al
jmp 0x57c2
movb $0xa, %al
movsbl %al, %esi
movq %rbx, %rdi
callq 0x31a0
incq %r15
movq %r15, %r12
jmp 0x577e
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x57e3
movq %rax, %r14
movq %rbx, %rdi
callq 0x3368
movq %r14, %rdi
callq 0x3310
// File: /workspace/github_cpp_makefile_star2_O2/yanlinlin82[P]icpp/icpp.cpp
// Function: is_built_in_type()
bool is_built_in_type()
{
	return (token == "char" || token == "short" || token == "int" ||
			token == "long" || token == "longlong" ||
			token == "float" || token == "double" ||
			token == "signed" || token == "unsigned" ||
			token == "size_t");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x1ba8f(%rip), %rdi     # 0x21290
leaq 0x10d29(%rip), %rsi     # 0x16531
callq 0xf4c8
testb %al, %al
jne 0x58d5
leaq 0x1ba74(%rip), %rdi     # 0x21290
leaq 0x10d13(%rip), %rsi     # 0x16536
callq 0xf4c8
testb %al, %al
jne 0x58d5
leaq 0x1ba59(%rip), %rdi     # 0x21290
leaq 0x116a6(%rip), %rsi     # 0x16ee4
callq 0xf4c8
testb %al, %al
jne 0x58d5
leaq 0x1ba3e(%rip), %rdi     # 0x21290
leaq 0x10ce7(%rip), %rsi     # 0x16540
callq 0xf4c8
testb %al, %al
jne 0x58d5
leaq 0x1ba27(%rip), %rdi     # 0x21290
leaq 0x10ccc(%rip), %rsi     # 0x1653c
callq 0xf4c8
testb %al, %al
jne 0x58d5
leaq 0x1ba10(%rip), %rdi     # 0x21290
leaq 0x10cbe(%rip), %rsi     # 0x16545
callq 0xf4c8
testb %al, %al
jne 0x58d5
leaq 0x1b9f9(%rip), %rdi     # 0x21290
leaq 0x11652(%rip), %rsi     # 0x16ef0
callq 0xf4c8
testb %al, %al
jne 0x58d5
leaq 0x1b9e2(%rip), %rdi     # 0x21290
leaq 0x10c98(%rip), %rsi     # 0x1654d
callq 0xf4c8
testb %al, %al
jne 0x58d5
leaq 0x1b9cb(%rip), %rdi     # 0x21290
leaq 0x10c7f(%rip), %rsi     # 0x1654b
callq 0xf4c8
testb %al, %al
je 0x58d9
movb $0x1, %al
popq %rbp
retq
leaq 0x1b9b0(%rip), %rdi     # 0x21290
leaq 0x10c6d(%rip), %rsi     # 0x16554
popq %rbp
jmp 0xf4c8
// File: /workspace/github_cpp_makefile_star2_O2/yanlinlin82[P]icpp/icpp.cpp
// Function: parse_init_statement()
void parse_init_statement()
{
	log<3>("[DEBUG] > %s:\n", __FUNCTION__);

	if (token == "auto" || token == "const" || token == "static" ||
				token == "extern" || is_built_in_type()) { // start as type
		parse_declare();
	} else {
		parse_expression();
		expect_token(";", "statement");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x88, %rsp
leaq 0xb5bb(%rip), %rdi      # 0x16bc3
leaq 0xb5c3(%rip), %rsi      # 0x16bd2
xorl %eax, %eax
callq 0xf138
leaq 0x15c73(%rip), %rdi     # 0x21290
leaq 0xaf45(%rip), %rsi      # 0x16569
callq 0xf4c8
testb %al, %al
jne 0xb67b
leaq 0x15c5c(%rip), %rdi     # 0x21290
leaq 0xaf33(%rip), %rsi      # 0x1656e
callq 0xf4c8
testb %al, %al
jne 0xb67b
leaq 0x15c45(%rip), %rdi     # 0x21290
leaq 0xaf09(%rip), %rsi      # 0x1655b
callq 0xf4c8
testb %al, %al
jne 0xb67b
leaq 0x15c2e(%rip), %rdi     # 0x21290
leaq 0xaef9(%rip), %rsi      # 0x16562
callq 0xf4c8
testb %al, %al
jne 0xb67b
callq 0x57f6
testb %al, %al
je 0xb689
addq $0x88, %rsp
popq %rbx
popq %rbp
jmp 0xa1f5
leaq 0xab82(%rip), %rsi      # 0x16212
leaq -0x70(%rbp), %rdi
leaq -0x9(%rbp), %rdx
callq 0xf1f8
leaq -0x90(%rbp), %rdi
leaq -0x70(%rbp), %rsi
pushq $0x1
popq %rcx
xorl %edx, %edx
callq 0x7431
leaq -0x90(%rbp), %rdi
callq 0x3368
leaq -0x70(%rbp), %rdi
callq 0x3368
leaq 0xab44(%rip), %rsi      # 0x16212
leaq -0x50(%rbp), %rdi
leaq -0x9(%rbp), %rdx
callq 0xf1f8
leaq 0xb4fb(%rip), %rsi      # 0x16bdd
leaq -0x30(%rbp), %rdi
leaq -0xa(%rbp), %rdx
callq 0xf1f8
leaq -0x50(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x540c
leaq -0x30(%rbp), %rdi
callq 0x3368
leaq -0x50(%rbp), %rdi
callq 0x3368
addq $0x88, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x3368
jmp 0xb729
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
jmp 0xb738
jmp 0xb73f
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x3368
jmp 0xb742
movq %rax, %rbx
movq %rbx, %rdi
callq 0x3310
// File: /workspace/github_cpp_makefile_star2_O2/yanlinlin82[P]icpp/icpp.cpp
// Function: load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool load(string filename)
{
	ifstream file(filename);
	if (!file.is_open()) {
		err("failed to open file '%s'!\n", filename.c_str());
		return false;
	}
	string line;
	while (getline(file, line)) {
		src.push_back(line);
	}
	file.close();
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x230, %rsp            # imm = 0x230
movq %rdi, %r14
leaq -0x248(%rbp), %rdi
pushq $0x8
popq %rdx
movq %r14, %rsi
callq 0x32c0
leaq -0x1d0(%rbp), %rdi
callq 0x3080
movl %eax, %ebx
testb %al, %al
je 0xcf49
leaq -0x30(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x248(%rbp), %r14
leaq -0x40(%rbp), %r15
leaq 0x1433d(%rip), %r12     # 0x21260
movq %r14, %rdi
movq %r15, %rsi
callq 0x3050
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0xcf5c
movq %r12, %rdi
movq %r15, %rsi
callq 0xf668
jmp 0xcf23
movq (%r14), %rsi
leaq 0x9f1e(%rip), %rdi      # 0x16e71
xorl %eax, %eax
callq 0xf410
jmp 0xcf71
leaq -0x248(%rbp), %rdi
callq 0x3070
leaq -0x40(%rbp), %rdi
callq 0x3368
leaq -0x248(%rbp), %rdi
callq 0x30a0
movl %ebx, %eax
addq $0x230, %rsp            # imm = 0x230
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0xcf96
movq %rax, %rbx
jmp 0xcfa2
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x3368
leaq -0x248(%rbp), %rdi
callq 0x30a0
movq %rbx, %rdi
callq 0x3310
// File: /workspace/github_cpp_makefile_star2_O2/yanlinlin82[P]icpp/icpp.cpp
// Function: print_vm_env(int, int, int, int)
void print_vm_env(int ax, int ip, int sp, int bp)
{
	log("\tax = %08X, ip = %08X, sp = %08X, bp = %08X\n", ax, ip, sp, bp);
	log("\t[stack]: ");
	size_t i = 0;
	for (; i < 6 && sp + i < MEM_SIZE; ++i) {
		if (i > 0) { log(", "); }
		log("0x%08X", m[sp + i]);
	}
	if (sp + i < MEM_SIZE) {
		log(", ...");
	}
	log("\n");
	for (size_t i = 0; i < 10 && bp != MEM_SIZE; ++i) {
		log("\t[#%zd backtrace]: bp = %08X", i, bp);
		if (bp == m[bp]) break;
		log("\tm[bp] = %08X", m[bp]);
		log("\tm[bp+1] = %08X", m[bp+1]);
		log("\tm[bp+2] = %08X", m[bp+2]);
		log("\tm[bp+3] = %08X", m[bp+3]);
		log("\tm[bp+4] = %08X", m[bp+4]);
		bp = m[bp];
		log("\n");
	}
	if (i == 10) {
		log("...\n");
	}
	log("\n");
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %edx, %r14d
movl %esi, %edx
movl %edi, %esi
leaq 0x90a4(%rip), %rdi      # 0x17124
movl %r14d, %ecx
movl %ebx, %r8d
xorl %eax, %eax
callq 0xf09e
leaq 0x90bd(%rip), %rdi      # 0x17151
xorl %eax, %eax
callq 0xf09e
movslq %r14d, %r13
leaq (,%r13,4), %r15
leaq 0x905d(%rip), %r14      # 0x1710a
xorl %r12d, %r12d
leaq (%r12,%r13), %rax
cmpq $0x5, %r12
ja 0xe0f2
cmpq $0xfffff, %rax          # imm = 0xFFFFF
ja 0xe0f2
testq %r12, %r12
je 0xe0d5
leaq 0x8184(%rip), %rdi      # 0x16252
xorl %eax, %eax
callq 0xf09e
movq 0x1316c(%rip), %rax     # 0x21248
addq %r15, %rax
movl (%rax,%r12,4), %esi
movq %r14, %rdi
xorl %eax, %eax
callq 0xf09e
incq %r12
jmp 0xe0b0
cmpq $0xfffff, %rax          # imm = 0xFFFFF
ja 0xe108
leaq 0x905b(%rip), %rdi      # 0x1715c
xorl %eax, %eax
callq 0xf09e
leaq 0x9206(%rip), %rdi      # 0x17315
xorl %eax, %eax
callq 0xf09e
leaq 0x90a0(%rip), %r13      # 0x171bd
xorl %r14d, %r14d
cmpq $0x9, %r14
ja 0xe1f2
cmpl $0x100000, %ebx         # imm = 0x100000
je 0xe1f2
leaq 0x9025(%rip), %rdi      # 0x17162
movq %r14, %rsi
movl %ebx, %edx
xorl %eax, %eax
callq 0xf09e
movslq %ebx, %r15
movq 0x130f5(%rip), %rax     # 0x21248
movl (%rax,%r15,4), %esi
cmpl %esi, %ebx
je 0xe1f2
leaq 0x9019(%rip), %rdi      # 0x1717f
xorl %eax, %eax
callq 0xf09e
movq 0x130d4(%rip), %rax     # 0x21248
movl 0x4(%rax,%r15,4), %esi
leaq 0x900d(%rip), %rdi      # 0x1718d
xorl %eax, %eax
callq 0xf09e
movq 0x130ba(%rip), %rax     # 0x21248
movl 0x8(%rax,%r15,4), %esi
leaq 0x9003(%rip), %rdi      # 0x1719d
xorl %eax, %eax
callq 0xf09e
movq 0x130a0(%rip), %rax     # 0x21248
movl 0xc(%rax,%r15,4), %esi
leaq 0x8ff9(%rip), %rdi      # 0x171ad
xorl %eax, %eax
callq 0xf09e
movq 0x13086(%rip), %rax     # 0x21248
movl 0x10(%rax,%r15,4), %esi
movq %r13, %rdi
xorl %eax, %eax
callq 0xf09e
movq 0x13070(%rip), %rax     # 0x21248
movl (%rax,%r15,4), %ebx
leaq 0x9132(%rip), %rdi      # 0x17315
xorl %eax, %eax
callq 0xf09e
incq %r14
jmp 0xe120
cmpq $0xa, %r12
jne 0xe206
leaq 0x92eb(%rip), %rdi      # 0x174ea
xorl %eax, %eax
callq 0xf09e
leaq 0x9108(%rip), %rdi      # 0x17315
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xf09e