LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/aalto-speech[P]ftk/src/Unigrams.cc
// Function: Unigrams::resegment_sents(std::vector<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>>>> const&, StringSet const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, double, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, double>>>&)
flt_type
Unigrams::resegment_sents(const vector<string> &sents,
                          const StringSet &vocab,
                          map<string, flt_type> &new_freqs)
{
    new_freqs.clear();
    flt_type ll = 0.0;

    for (auto sent = sents.begin(); sent != sents.end(); ++sent) {

        map<string, flt_type> stats;
        flt_type curr_ll = segf(vocab, *sent, stats, this->utf8);

        if (stats.size() == 0) {
            cerr << "warning, no segmentation for sentence: " << *sent << endl;
            continue;
        }

        ll += curr_ll;

        // Update statistics
        for (auto it = stats.begin(); it != stats.end(); ++it)
            new_freqs[it->first] += it->second;
    }

    return ll;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, %rbx
movq %rdx, -0x40(%rbp)
movq %rsi, %r14
movq %rdi, -0x38(%rbp)
movq %rcx, %rdi
callq 0x19cca
movq %r14, -0x48(%rbp)
movq (%r14), %r13
xorpd %xmm0, %xmm0
movsd %xmm0, -0x30(%rbp)
leaq -0x78(%rbp), %r15
leaq -0x80(%rbp), %r12
movq -0x48(%rbp), %rax
cmpq 0x8(%rax), %r13
je 0x1c797
andl $0x0, -0x78(%rbp)
andq $0x0, -0x70(%rbp)
movq %r15, -0x68(%rbp)
movq %r15, -0x60(%rbp)
andq $0x0, -0x58(%rbp)
movq -0x38(%rbp), %rax
movzbl 0x8(%rax), %ecx
movq -0x40(%rbp), %rdi
movq %r13, %rsi
movq %r12, %rdx
callq *(%rax)
cmpq $0x0, -0x58(%rbp)
je 0x1c760
movsd -0x30(%rbp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, -0x30(%rbp)
movq -0x68(%rbp), %r14
cmpq %r15, %r14
je 0x1c786
leaq 0x20(%r14), %rsi
movsd 0x40(%r14), %xmm0
movsd %xmm0, -0x50(%rbp)
movq %rbx, %rdi
callq 0x18d90
movsd -0x50(%rbp), %xmm0
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
movq %r14, %rdi
callq 0x4270
movq %rax, %r14
jmp 0x1c72a
movq 0x18881(%rip), %rdi     # 0x34fe8
leaq 0x7116(%rip), %rsi      # 0x23884
callq 0x4340
movq %rax, %rdi
movq %r13, %rsi
callq 0x4300
movq %rax, %rdi
callq 0x4180
movq %r12, %rdi
callq 0x543e
addq $0x20, %r13
jmp 0x1c6d9
movsd -0x30(%rbp), %xmm0
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1c7ad
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
callq 0x543e
movq %rbx, %rdi
callq 0x45f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/aalto-speech[P]ftk/src/Unigrams.cc
// Function: Unigrams::get_sum(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, double, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, double>>> const&)
flt_type
Unigrams::get_sum(const map<string, flt_type> &freqs)
{
    flt_type total = 0.0;
    for (auto iter = freqs.cbegin(); iter != freqs.cend(); ++iter) {
        if (std::isinf(iter->second) || std::isnan(iter->second)) continue;
        total += iter->second;
    }
    return total;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x18(%rdi), %rax
addq $0x8, %rbx
xorpd %xmm0, %xmm0
movsd %xmm0, -0x18(%rbp)
movabsq $0x7ff0000000000000, %r14 # imm = 0x7FF0000000000000
cmpq %rbx, %rax
je 0x1c81c
movq 0x40(%rax), %xmm0
movq %xmm0, %rcx
btrq $0x3f, %rcx
cmpq %r14, %rcx
jge 0x1c812
movsd -0x18(%rbp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, -0x18(%rbp)
movq %rax, %rdi
callq 0x43b0
jmp 0x1c7eb
movsd -0x18(%rbp), %xmm0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/aalto-speech[P]ftk/src/Unigrams.cc
// Function: Unigrams::get_cost(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, double, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, double>>> const&, double)
flt_type
Unigrams::get_cost(const map<string, flt_type> &freqs,
                   flt_type densum)
{
    flt_type total = 0.0;
    flt_type tmp = 0.0;
    densum = log(densum);
    for (auto iter = freqs.cbegin(); iter != freqs.cend(); ++iter) {
        tmp = iter->second * (log(iter->second)-densum);
        if (!std::isnan(tmp)) total += tmp;
    }
    return total;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
callq 0x42e0
movsd %xmm0, -0x28(%rbp)
movq 0x18(%rbx), %r14
addq $0x8, %rbx
xorps %xmm0, %xmm0
cmpq %rbx, %r14
je 0x1c8ac
movsd 0x40(%r14), %xmm1
movsd %xmm1, -0x30(%rbp)
movaps %xmm0, -0x20(%rbp)
movapd %xmm1, %xmm0
callq 0x42e0
subsd -0x28(%rbp), %xmm0
mulsd -0x30(%rbp), %xmm0
movapd -0x20(%rbp), %xmm3
movapd %xmm3, %xmm2
addsd %xmm0, %xmm2
cmpunordsd %xmm0, %xmm0
movapd %xmm0, %xmm1
andnpd %xmm2, %xmm1
andpd %xmm3, %xmm0
orpd %xmm1, %xmm0
movapd %xmm0, -0x20(%rbp)
movq %r14, %rdi
callq 0x43b0
movq %rax, %r14
movaps -0x20(%rbp), %xmm0
jmp 0x1c84d
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/aalto-speech[P]ftk/src/Unigrams.cc
// Function: Unigrams::cutoff(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, double, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, double>>>&, double, 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>>>> const&, unsigned int)
int
Unigrams::cutoff(map<string, flt_type> &vocab,
                 flt_type limit,
                 const set<string> &stoplist,
                 unsigned int min_length)
{
    int nremovals = 0;
    auto iter = vocab.begin();
    while (iter != vocab.end()) {
        if (iter->second <= limit
            && get_factor_length(iter->first, this->utf8) >= min_length
            && stoplist.find(iter->first) == stoplist.end()) {
                vocab.erase(iter++);
                nremovals++;
        }
        else ++iter;
    }
    return nremovals;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %ebx
movsd %xmm0, -0x50(%rbp)
movq %rdi, %r12
movq 0x18(%rsi), %r13
movq %rsi, -0x38(%rbp)
leaq 0x8(%rsi), %r14
movq %rdx, -0x48(%rbp)
leaq 0x8(%rdx), %rax
movq %rax, -0x40(%rbp)
movl $0x0, -0x2c(%rbp)
cmpq %r14, %r13
je 0x1c956
movsd -0x50(%rbp), %xmm0
ucomisd 0x40(%r13), %xmm0
jb 0x1c92a
leaq 0x20(%r13), %r15
movzbl 0x8(%r12), %esi
movq %r15, %rdi
callq 0x1bb8e
cmpl %ebx, %eax
jb 0x1c92a
movq -0x48(%rbp), %rdi
movq %r15, %rsi
callq 0xf572
cmpq -0x40(%rbp), %rax
je 0x1c937
movq %r13, %rdi
callq 0x4270
movq %rax, %r13
jmp 0x1c8f0
movq %r13, %rdi
callq 0x4270
movq %rax, %r15
movq -0x38(%rbp), %rdi
movq %r13, %rsi
callq 0x1ee78
incl -0x2c(%rbp)
movq %r15, %r13
jmp 0x1c8f0
movl -0x2c(%rbp), %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/aalto-speech[P]ftk/src/Unigrams.cc
// Function: Unigrams::init_candidates(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, double, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, double>>> const&, 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>>>>&, unsigned int, 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>>>> const&, unsigned int)
int
Unigrams::init_candidates(const map<string, flt_type> &vocab,
                          set<string> &candidates,
                          unsigned int n_candidates,
                          const set<string> &stoplist,
                          unsigned int min_length)
{

    vector<pair<string, flt_type> > sorted_vocab;
    sort_vocab(vocab, sorted_vocab, false);

    int selected_candidates = 0;
    for (auto it = sorted_vocab.cbegin(); it != sorted_vocab.cend(); ++it) {
        const string &subword = it->first;
        if (get_factor_length(subword, this->utf8) < min_length) continue;
        if (candidates.find(subword) != candidates.end()) continue;
        if (stoplist.find(subword) != stoplist.end()) continue;
        candidates.insert(subword);
        selected_candidates++;
        if (candidates.size() >= n_candidates) break;
    }

    return selected_candidates;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r9d, %ebx
movq %r8, -0x40(%rbp)
movl %ecx, -0x38(%rbp)
movq %rdx, %r12
movq %rsi, %rax
movq %rdi, %r13
xorps %xmm0, %xmm0
leaq -0x60(%rbp), %rsi
movaps %xmm0, (%rsi)
andq $0x0, 0x10(%rsi)
movl $0x0, -0x2c(%rbp)
movq %rax, %rdi
xorl %edx, %edx
callq 0x1bfa0
movq -0x60(%rbp), %r14
leaq 0x8(%r12), %r15
movq -0x40(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x48(%rbp)
movl -0x38(%rbp), %eax
movq %rax, -0x38(%rbp)
cmpq -0x58(%rbp), %r14
je 0x1ca6c
movzbl 0x8(%r13), %esi
movq %r14, %rdi
callq 0x1bb8e
cmpl %ebx, %eax
jb 0x1ca66
movq %r12, %rdi
movq %r14, %rsi
callq 0x1edee
cmpq %r15, %rax
jne 0x1ca66
movq -0x40(%rbp), %rdi
movq %r14, %rsi
callq 0xf572
cmpq -0x48(%rbp), %rax
jne 0x1ca66
movq %r12, %rdi
movq %r14, %rsi
callq 0x123ba
incl -0x2c(%rbp)
movq -0x38(%rbp), %rax
cmpq %rax, 0x28(%r12)
jae 0x1ca6c
addq $0x28, %r14
jmp 0x1ca14
leaq -0x60(%rbp), %rdi
callq 0x1d9d2
movl -0x2c(%rbp), %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1ca8d
jmp 0x1ca8d
jmp 0x1ca8d
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x1d9d2
movq %rbx, %rdi
callq 0x45f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/aalto-speech[P]ftk/src/defs.hh
// Function: sub_log_domain_probs(double, double)
static flt_type sub_log_domain_probs(flt_type a, flt_type b) {
    flt_type delta = b - a;
    if (delta > 0) {
      fprintf(stderr, "invalid call to sub_log_domain_probs, a should be bigger than b (a=%f,b=%f)\n",a,b);
      exit(1);
    }
    return a + log1p(-exp(delta));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movapd %xmm0, %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
ja 0x1d45a
movapd %xmm1, %xmm0
callq 0x4600
xorpd 0x6365(%rip), %xmm0     # 0x237b0
callq 0x4670
addsd 0x5fe8(%rip), %xmm0     # 0x23440
popq %rbp
retq
movq 0x17b5f(%rip), %rax     # 0x34fc0
movq (%rax), %rdi
leaq 0x6441(%rip), %rsi      # 0x238ac
movb $0x2, %al
callq 0x4480
pushq $0x1
popq %rdi
callq 0x43c0
// File: /workspace/github_cpp_makefile_star2_O2/aalto-speech[P]ftk/src/Bigrams.cc
// Function: Bigrams::finalize_viterbi_stats(MultiStringFactorGraph const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, double, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, double>>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, double, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, double>>>>>>&)
void
Bigrams::finalize_viterbi_stats(const MultiStringFactorGraph &msfg,
                                transitions_t &stats)
{
    for (auto nit = msfg.nodes.begin(); nit != msfg.nodes.end(); ++nit) {
        string srcstr = nit->factor;
        for (auto ait=nit->outgoing.begin(); ait != nit->outgoing.end(); ++ait) {
            string tgtstr = msfg.nodes[(*ait)->target_node].factor;
            if (stats.find(srcstr) == stats.end()
                || stats.at(srcstr).find(tgtstr) == stats.at(srcstr).end())
                stats[srcstr][tgtstr] = exp(FLOOR_LP);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
movq %rdi, -0x30(%rbp)
movq 0x20(%rdi), %r14
leaq 0x8(%rsi), %rax
movq %rax, -0x40(%rbp)
leaq -0x88(%rbp), %r12
leaq -0x68(%rbp), %r13
movq -0x30(%rbp), %rax
cmpq 0x28(%rax), %r14
je 0x1fb23
movq %r12, %rdi
movq %r14, %rsi
callq 0x4460
movq 0x68(%r14), %r15
movq %r14, -0x38(%rbp)
leaq 0x58(%r14), %rax
movq %rax, -0x48(%rbp)
cmpq -0x48(%rbp), %r15
je 0x1fb0e
movq 0x20(%r15), %rax
movl 0x4(%rax), %esi
shlq $0x7, %rsi
movq -0x30(%rbp), %rax
addq 0x20(%rax), %rsi
movq %r13, %rdi
callq 0x4460
movq %rbx, %rdi
movq %r12, %rsi
callq 0x14b00
cmpq -0x40(%rbp), %rax
je 0x1fad3
movq %rbx, %rdi
movq %r12, %rsi
callq 0x21204
movq %rax, %rdi
movq %r13, %rsi
callq 0x197ac
movq %rax, %r14
movq %rbx, %rdi
movq %r12, %rsi
callq 0x21204
addq $0x8, %rax
cmpq %rax, %r14
jne 0x1faf6
movq %rbx, %rdi
movq %r12, %rsi
callq 0x19048
movq %rax, %rdi
movq %r13, %rsi
callq 0x18d90
movabsq $0x3e21b48655f37267, %rcx # imm = 0x3E21B48655F37267
movq %rcx, (%rax)
movq %r13, %rdi
callq 0x46b8
movq %r15, %rdi
callq 0x43b0
movq %rax, %r15
jmp 0x1fa70
movq %r12, %rdi
callq 0x46b8
movq -0x38(%rbp), %r14
subq $-0x80, %r14
jmp 0x1fa47
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1fb3d
movq %rax, %rbx
jmp 0x1fb49
jmp 0x1fb3d
jmp 0x1fb3d
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x46b8
leaq -0x88(%rbp), %rdi
callq 0x46b8
movq %rbx, %rdi
callq 0x45f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/aalto-speech[P]ftk/src/Bigrams.cc
// Function: Bigrams::normalize(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, double, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, double>>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, double, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, double>>>>>>&)
void
Bigrams::normalize(transitions_t &trans_stats)
{
    for (auto srcit = trans_stats.begin(); srcit != trans_stats.end(); ++srcit) {
        flt_type normalizer = MIN_FLOAT;
        for (auto tgtit = srcit->second.begin(); tgtit != srcit->second.end(); ++tgtit)
            if (normalizer == MIN_FLOAT) normalizer = tgtit->second;
            else normalizer = add_log_domain_probs(normalizer, tgtit->second);
        for (auto tgtit = srcit->second.begin(); tgtit != srcit->second.end(); ++tgtit)
            tgtit->second -= normalizer;
     }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x18(%rdi), %r14
addq $0x8, %rbx
cmpq %rbx, %r14
je 0x1fcd6
movq 0x58(%r14), %r15
leaq 0x48(%r14), %r12
movsd 0x3b2f(%rip), %xmm0     # 0x23790
cmpq %r12, %r15
je 0x1fc9b
ucomisd 0x3b22(%rip), %xmm0     # 0x23790
movsd 0x40(%r15), %xmm1
jne 0x1fc7f
jp 0x1fc7f
movsd %xmm1, -0x28(%rbp)
jmp 0x1fc89
callq 0x1fbdb
movsd %xmm0, -0x28(%rbp)
movq %r15, %rdi
callq 0x4270
movq %rax, %r15
movsd -0x28(%rbp), %xmm0
jmp 0x1fc61
movq 0x58(%r14), %rax
movsd %xmm0, -0x28(%rbp)
cmpq %r12, %rax
je 0x1fcc6
movsd 0x40(%rax), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, 0x40(%rax)
movq %rax, %rdi
callq 0x4270
movsd -0x28(%rbp), %xmm0
jmp 0x1fca4
movq %r14, %rdi
callq 0x4270
movq %rax, %r14
jmp 0x1fc48
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/aalto-speech[P]ftk/src/Bigrams.cc
// Function: Bigrams::remove_transitions(std::vector<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>>>>&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, double, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, double>>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, double, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, double>>>>>>&)
void
Bigrams::remove_transitions(vector<string> &to_remove,
                            transitions_t &transitions)
{
    for (auto it = to_remove.begin(); it != to_remove.end(); ++it)
        transitions.erase(*it);

    for (auto srcit = transitions.begin(); srcit != transitions.end(); ++srcit)
        for (auto it = to_remove.begin(); it != to_remove.end(); ++it)
            srcit->second.erase(*it);

    for (auto srcit = transitions.begin(); srcit != transitions.end();)
        if (srcit->second.size() == 0) transitions.erase(srcit++);
        else ++srcit;

    normalize(transitions);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdi), %r15
cmpq 0x8(%r14), %r15
je 0x2012d
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2147a
addq $0x20, %r15
jmp 0x20116
movq 0x18(%rbx), %r12
movq %rbx, -0x30(%rbp)
leaq 0x8(%rbx), %r13
movq %r13, -0x38(%rbp)
cmpq %r13, %r12
je 0x20175
movq (%r14), %r13
leaq 0x40(%r12), %rbx
cmpq %r15, %r13
je 0x20164
movq %rbx, %rdi
movq %r13, %rsi
callq 0x21626
addq $0x20, %r13
movq 0x8(%r14), %r15
jmp 0x2014a
movq %r12, %rdi
callq 0x4270
movq %rax, %r12
movq -0x38(%rbp), %r13
jmp 0x2013d
movq -0x30(%rbp), %r12
movq 0x18(%r12), %r14
cmpq %r13, %r14
je 0x201a7
movq %r14, %rbx
movq 0x68(%r14), %r15
movq %r14, %rdi
callq 0x4270
movq %rax, %r14
testq %r15, %r15
jne 0x2017e
movq %r12, %rdi
movq %rbx, %rsi
callq 0x217a4
jmp 0x2017e
movq %r12, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1fc2e
nop
// File: /workspace/github_cpp_makefile_star2_O2/aalto-speech[P]ftk/src/Bigrams.cc
// Function: Bigrams::cutoff(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, double, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, double>>> const&, double, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, double, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, double>>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, double, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, double>>>>>>&, MultiStringFactorGraph&)
int
Bigrams::cutoff(const map<string, flt_type> &unigram_stats,
                flt_type cutoff,
                transitions_t &transitions,
                MultiStringFactorGraph &msfg)
{
    vector<string> to_remove;
    for (auto it = unigram_stats.begin(); it != unigram_stats.end(); ++it)
        if (it->second < cutoff && it->first.length() > 2) to_remove.push_back(it->first);

    remove_transitions(to_remove, transitions);

    for (unsigned int i=0; i<to_remove.size(); i++)
        msfg.remove_arcs(to_remove[i]);

    return to_remove.size();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movsd %xmm0, -0x48(%rbp)
movq %rdi, %r15
leaq -0x40(%rbp), %r12
andq $0x0, 0x10(%r12)
xorpd %xmm0, %xmm0
movapd %xmm0, (%r12)
movq 0x18(%rdi), %r13
addq $0x8, %r15
cmpq %r15, %r13
je 0x20349
movsd -0x48(%rbp), %xmm0
ucomisd 0x40(%r13), %xmm0
jbe 0x2033c
cmpq $0x3, 0x28(%r13)
jb 0x2033c
leaq 0x20(%r13), %rsi
movq %r12, %rdi
callq 0x719e
movq %r13, %rdi
callq 0x43b0
movq %rax, %r13
jmp 0x20317
leaq -0x40(%rbp), %rdi
movq %r14, %rsi
callq 0x200fc
xorl %r15d, %r15d
movl %r15d, %r15d
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %r14
subq %rsi, %r14
sarq $0x5, %r14
cmpq %r15, %r14
jbe 0x20386
movq %r15, %rax
shlq $0x5, %rax
addq %rax, %rsi
movq %rbx, %rdi
callq 0x10d32
incl %r15d
jmp 0x20358
leaq -0x40(%rbp), %rdi
callq 0x54b6
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x203a5
jmp 0x203a5
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x54b6
movq %rbx, %rdi
callq 0x45f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/aalto-speech[P]ftk/src/Bigrams.cc
// Function: Bigrams::transition_count(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, double, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, double>>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, double, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, double>>>>>> const&)
int
Bigrams::transition_count(const transitions_t &transitions)
{
    int count = 0;
    for (auto srcit = transitions.cbegin(); srcit != transitions.cend(); ++srcit)
        for (auto tgtit = srcit->second.cbegin(); tgtit != srcit->second.cend(); ++tgtit)
            count++;
    return count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %r15
addq $0x8, %rbx
xorl %r14d, %r14d
cmpq %rbx, %r15
je 0x2062b
movq 0x58(%r15), %rax
leaq 0x48(%r15), %r12
cmpq %r12, %rax
je 0x2061e
incl %r14d
movq %rax, %rdi
callq 0x43b0
jmp 0x2060c
movq %r15, %rdi
callq 0x43b0
movq %rax, %r15
jmp 0x205ff
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/aalto-speech[P]ftk/src/Bigrams.cc
// Function: Bigrams::reverse_transitions(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, double, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, double>>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, double, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, double>>>>>> const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, double, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, double>>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, double, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, double>>>>>>&)
void
Bigrams::reverse_transitions(const transitions_t &transitions,
                             transitions_t &reverse_transitions)
{
    reverse_transitions.clear();
    for (auto srcit = transitions.cbegin(); srcit != transitions.cend(); ++srcit)
        for (auto tgtit = srcit->second.cbegin(); tgtit != srcit->second.cend(); ++tgtit)
            reverse_transitions[tgtit->first][srcit->first] = tgtit->second;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x1a3dc
movq 0x18(%r14), %r15
addq $0x8, %r14
movq %r14, -0x30(%rbp)
cmpq -0x30(%rbp), %r15
je 0x2070d
leaq 0x20(%r15), %r12
movq 0x58(%r15), %r13
leaq 0x48(%r15), %r14
cmpq %r14, %r13
je 0x20700
leaq 0x20(%r13), %rsi
movsd 0x40(%r13), %xmm0
movsd %xmm0, -0x38(%rbp)
movq %rbx, %rdi
callq 0x19048
movq %rax, %rdi
movq %r12, %rsi
callq 0x18d90
movsd -0x38(%rbp), %xmm0
movsd %xmm0, (%rax)
movq %r13, %rdi
callq 0x43b0
movq %rax, %r13
jmp 0x206c3
movq %r15, %rdi
callq 0x43b0
movq %rax, %r15
jmp 0x206b1
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/aalto-speech[P]ftk/src/Bigrams.cc
// Function: Bigrams::get_backpointers(MultiStringFactorGraph const&, std::map<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>>>>, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, 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>>>>>>>&, unsigned int)
void
Bigrams::get_backpointers(const MultiStringFactorGraph &msfg,
                          map<string, set<string> > &backpointers,
                          unsigned int minlen)
{
    backpointers.clear();
    for (auto it = msfg.string_end_nodes.begin(); it != msfg.string_end_nodes.end(); ++it) {
        set<string> factors;
        msfg.collect_factors(it->first, factors);
        for (auto fit = factors.begin(); fit != factors.end(); ++fit) {
            if ((*fit).length() < minlen) continue;
            backpointers[*fit].insert(it->first);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %edx, %r14d
movq %rsi, %rbx
movq %rdi, %r15
movq %rsi, %rdi
callq 0x217d8
movq 0x50(%r15), %rcx
movq %r15, -0x30(%rbp)
leaq 0x40(%r15), %rax
movq %rax, -0x38(%rbp)
leaq -0x68(%rbp), %r12
movl %r14d, %r15d
leaq -0x70(%rbp), %r14
cmpq -0x38(%rbp), %rcx
je 0x20d09
andl $0x0, -0x68(%rbp)
andq $0x0, -0x60(%rbp)
movq %r12, -0x58(%rbp)
movq %r12, -0x50(%rbp)
andq $0x0, -0x48(%rbp)
movq %rcx, -0x40(%rbp)
leaq 0x20(%rcx), %r13
movq -0x30(%rbp), %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x11744
movq -0x58(%rbp), %r14
cmpq %r12, %r14
je 0x20cef
cmpq %r15, 0x28(%r14)
jb 0x20ce2
leaq 0x20(%r14), %rsi
movq %rbx, %rdi
callq 0x21254
movq %rax, %rdi
movq %r13, %rsi
callq 0x123ba
movq %r14, %rdi
callq 0x43b0
movq %rax, %r14
jmp 0x20cc0
leaq -0x70(%rbp), %r14
movq %r14, %rdi
callq 0x53c6
movq -0x40(%rbp), %rdi
callq 0x43b0
movq %rax, %rcx
jmp 0x20c89
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x20d1a
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x53c6
movq %rbx, %rdi
callq 0x45f0
// File: /workspace/github_cpp_makefile_star2_O2/aalto-speech[P]ftk/src/Bigrams.cc
// Function: Bigrams::init_candidates_freq(unsigned int, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, double, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, double>>> const&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, double, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, double>>>&, 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>>>> const&)
int
Bigrams::init_candidates_freq(unsigned int n_candidates,
                              const map<string, flt_type> &unigram_stats,
                              map<string, flt_type> &candidates,
                              const set<string> &stoplist)
{
    vector<pair<string, flt_type> > sorted_stats;
    Unigrams::sort_vocab(unigram_stats, sorted_stats, false);

    for (auto it = sorted_stats.begin(); it != sorted_stats.end(); ++it) {
        if (stoplist.find(it->first) != stoplist.end()) continue;
        candidates[it->first] = 0.0;
        if (candidates.size() >= n_candidates) break;
    }

    return candidates.size();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %rax
movl %edi, %r12d
xorps %xmm0, %xmm0
leaq -0x50(%rbp), %rsi
movaps %xmm0, (%rsi)
andq $0x0, 0x10(%rsi)
movq %rax, %rdi
xorl %edx, %edx
callq 0x1bfa0
movq -0x50(%rbp), %r15
leaq 0x8(%r14), %r13
movl %r12d, %eax
movq %rax, -0x30(%rbp)
cmpq -0x48(%rbp), %r15
je 0x20da8
movq %r14, %rdi
movq %r15, %rsi
callq 0xf572
cmpq %r13, %rax
jne 0x20da2
movq %rbx, %rdi
movq %r15, %rsi
callq 0x18d90
andq $0x0, (%rax)
movq 0x28(%rbx), %r12
cmpq -0x30(%rbp), %r12
jae 0x20dac
addq $0x28, %r15
jmp 0x20d73
movq 0x28(%rbx), %r12
leaq -0x50(%rbp), %rdi
callq 0x1d9d2
movl %r12d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x20dcb
jmp 0x20dcb
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x1d9d2
movq %rbx, %rdi
callq 0x45f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/ELD[P]HackAssembler/src/main.cpp
// Function: main
int main(int argc, char* argv[])
{
    if (argc <= 1) {
        std::cout << "No target file specified!" << std::endl << "Example usage: ./hackasm [file]" << std::endl;
        return -1;
    }

    std::string file(argv[1]);
    std::ifstream fileHandle(file);

    hack::Parser parser(fileHandle);
    std::string outFileName = file.substr(0, file.find_last_of('.'));
    std::ofstream ofs(outFileName + ".hack");
    parser.translateAssembly(ofs);
    ofs.close();

    return 0;
}

// Assembly:
pushq %rbx
subq $0x510, %rsp            # imm = 0x510
cmpl $0x1, %edi
jg 0x6693
movq 0x1a958(%rip), %rdi     # 0x20fb8
leaq 0xe99d(%rip), %rsi      # 0x15004
callq 0x5300
movq %rax, %rdi
callq 0x5190
leaq 0xe9a3(%rip), %rsi      # 0x1501e
movq %rax, %rdi
callq 0x5300
movq %rax, %rdi
callq 0x5190
pushq $-0x1
popq %rax
jmp 0x677e
movq 0x8(%rsi), %rsi
leaq 0x40(%rsp), %rbx
leaq 0x308(%rsp), %rdx
movq %rbx, %rdi
callq 0x67ec
leaq 0x308(%rsp), %rdi
pushq $0x8
popq %rdx
movq %rbx, %rsi
callq 0x54a0
leaq 0x60(%rsp), %rdi
leaq 0x308(%rsp), %rsi
callq 0x6f70
leaq 0x40(%rsp), %rbx
pushq $0x2e
popq %rsi
pushq $-0x1
popq %rdx
movq %rbx, %rdi
callq 0x55e0
leaq 0x20(%rsp), %rdi
movq %rbx, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x5350
leaq 0xe941(%rip), %rdx      # 0x1503e
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x6827
leaq 0x108(%rsp), %rdi
movq %rsp, %rsi
pushq $0x10
popq %rdx
callq 0x55c0
movq %rsp, %rdi
callq 0x5170
leaq 0x60(%rsp), %rdi
leaq 0x108(%rsp), %rsi
callq 0x780c
leaq 0x108(%rsp), %rdi
callq 0x5440
leaq 0x108(%rsp), %rdi
callq 0x5470
leaq 0x20(%rsp), %rdi
callq 0x5170
leaq 0x60(%rsp), %rdi
callq 0x6860
leaq 0x308(%rsp), %rdi
callq 0x50c0
leaq 0x40(%rsp), %rdi
callq 0x5170
xorl %eax, %eax
addq $0x510, %rsp            # imm = 0x510
popq %rbx
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5170
jmp 0x67b8
movq %rax, %rbx
jmp 0x67b8
movq %rax, %rbx
jmp 0x67c2
movq %rax, %rbx
jmp 0x67cc
movq %rax, %rbx
jmp 0x67d9
movq %rax, %rbx
leaq 0x108(%rsp), %rdi
callq 0x5470
leaq 0x20(%rsp), %rdi
callq 0x5170
leaq 0x60(%rsp), %rdi
callq 0x6860
leaq 0x308(%rsp), %rdi
callq 0x50c0
leaq 0x40(%rsp), %rdi
callq 0x5170
movq %rbx, %rdi
callq 0x5540
nop
// File: /workspace/github_cpp_makefile_star2_O2/ELD[P]HackAssembler/src/parser.cpp
// Function: hack::Parser::Parser(std::istream&)
Parser::Parser(std::istream& file) : _file(file)
    {
        _pc = -1;
        _mem = 16;
        _currentCommand = "";
        _fileHead = _file.tellg();
        _lCommand.assign("\\((.*)\\)", std::regex_constants::icase);
        _aCommand.assign("\\@([\\w*|\\d*]*).*", std::regex_constants::icase);
    }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %r13
movq %rsi, (%rdi)
leaq 0x18(%rdi), %rax
movq %rax, 0x8(%rdi)
andq $0x0, 0x10(%rdi)
leaq 0x8(%rdi), %rbx
movb $0x0, 0x18(%rdi)
leaq 0x28(%rdi), %r14
movq %r14, %rdi
callq 0x7b76
leaq 0x48(%r13), %r15
movq %r15, %rdi
callq 0x7b76
leaq 0x78(%r13), %r12
movq %r12, %rdi
callq 0x14504
movabsq $0x10ffffffff, %rax     # imm = 0x10FFFFFFFF
movq %rax, 0x70(%r13)
leaq 0xe213(%rip), %rsi      # 0x151e0
movq %rbx, %rdi
callq 0x55b0
movq (%r13), %rdi
callq 0x5520
movq %rax, 0x68(%r13)
leaq 0xe17f(%rip), %rsi      # 0x15168
pushq $0x1
popq %rdx
movq %r14, %rdi
callq 0x7b92
leaq 0xe176(%rip), %rsi      # 0x15171
pushq $0x1
popq %rdx
movq %r15, %rdi
callq 0x7b92
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x7017
movq %rax, %r13
jmp 0x7022
movq %rax, %r13
movq %r12, %rdi
callq 0x68a6
movq %r15, %rdi
callq 0x688c
movq %r14, %rdi
callq 0x688c
movq %rbx, %rdi
callq 0x5170
movq %r13, %rdi
callq 0x5540
// File: /workspace/github_cpp_makefile_star2_O2/ELD[P]HackAssembler/src/parser.cpp
// Function: hack::Parser::trimCommand(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
void Parser::trimCommand(std::string& commandToTrim)
    {
        if (commandToTrim.size() > 0) {
            auto firstPos = commandToTrim.find_first_not_of(' ');
            auto lastPos = commandToTrim.find_last_not_of(' ');
            commandToTrim = commandToTrim.substr(firstPos, (lastPos - firstPos + 1));

            commandToTrim.erase(std::remove(commandToTrim.begin(), commandToTrim.end(), '\r'), commandToTrim.end());
        }
    }

// Assembly:
cmpq $0x0, 0x8(%rsi)
je 0x727a
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
pushq $0x20
popq %rbp
movq %rsi, %rdi
movl %ebp, %esi
xorl %edx, %edx
callq 0x52e0
movq %rax, %r14
pushq $-0x1
popq %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5250
subq %r14, %rax
leaq 0x1(%rax), %rcx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x5350
movq %rbx, %rdi
movq %r15, %rsi
callq 0x53b0
movq %r15, %rdi
callq 0x5170
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
addq %rdi, %rsi
movb $0xd, (%r15)
leaq 0x8(%rsp), %rdx
callq 0x1410c
movq (%rbx), %rdx
addq 0x8(%rbx), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5090
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ELD[P]HackAssembler/src/parser.cpp
// Function: hack::Parser::getSymbol[abi:cxx11]()
std::string Parser::getSymbol()
    {
        if (commandType() == A_COMMAND) {
            auto first = _currentCommand.find_first_not_of("@");
            return _currentCommand.substr(first);
        } else if (commandType() == L_COMMAND) {
            auto first = _currentCommand.find_first_not_of("(");
            auto second = _currentCommand.find_last_not_of(")");
            return _currentCommand.substr(first, second - first + 1);
        }

        return "";
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x71a2
cmpl $0x1, %eax
jne 0x7353
addq $0x8, %r14
leaq 0xde52(%rip), %rsi      # 0x1518d
movq %r14, %rdi
xorl %edx, %edx
callq 0x5200
pushq $-0x1
popq %rcx
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
jmp 0x73af
movq %r14, %rdi
callq 0x71a2
testl %eax, %eax
je 0x7375
leaq 0xde7a(%rip), %rsi      # 0x151e0
leaq 0xf(%rsp), %rdx
movq %rbx, %rdi
callq 0x67ec
jmp 0x73b4
addq $0x8, %r14
leaq 0xde0f(%rip), %rsi      # 0x1518f
movq %r14, %rdi
xorl %edx, %edx
callq 0x5200
movq %rax, %r15
leaq 0xe6ae(%rip), %rsi      # 0x15a42
pushq $-0x1
popq %rdx
movq %r14, %rdi
callq 0x5560
subq %r15, %rax
leaq 0x1(%rax), %rcx
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x5350
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/ELD[P]HackAssembler/src/parser.cpp
// Function: hack::Parser::getDestBits[abi:cxx11]()
std::string Parser::getDestBits()
    {
        if (commandType() != C_COMMAND) {
            return "";
        }


        auto index = _currentCommand.find("=");

        if (index == std::string::npos) {
            return DestTable::lookup[""];
        }

        auto dest = _currentCommand.substr(0, index);

        return DestTable::lookup[dest];
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x71a2
cmpl $0x2, %eax
jne 0x742a
addq $0x8, %r14
leaq 0xdda8(%rip), %rsi      # 0x15191
movq %r14, %rdi
xorl %edx, %edx
callq 0x55f0
cmpq $-0x1, %rax
je 0x7440
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x5350
leaq 0x1a333(%rip), %rdi     # 0x21748
movq %r15, %rsi
callq 0x7c56
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5410
jmp 0x7472
leaq 0xddaf(%rip), %rsi      # 0x151e0
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x67ec
jmp 0x747c
leaq 0xdd99(%rip), %rsi      # 0x151e0
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x67ec
leaq 0x1a2eb(%rip), %rdi     # 0x21748
leaq 0x10(%rsp), %rsi
callq 0x7bf0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5410
leaq 0x10(%rsp), %rdi
callq 0x5170
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
jmp 0x749d
jmp 0x7490
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x5170
movq %rbx, %rdi
callq 0x5540
nop
// File: /workspace/github_cpp_makefile_star2_O2/ELD[P]HackAssembler/src/parser.cpp
// Function: hack::Parser::getCompBits[abi:cxx11]()
std::string Parser::getCompBits()
    {
        if (commandType() != C_COMMAND) {
            return "";
        }

        auto equalPos = _currentCommand.find("=");
        auto semiColonPos = _currentCommand.find(";");

        if (equalPos == std::string::npos && semiColonPos == std::string::npos) {
            return "";
        }

        std::string comp;
        if (equalPos != std::string::npos) {
            comp = _currentCommand.substr(equalPos + 1);
            auto bitPair = CompTable::lookup[comp];
            return bitPair.first + bitPair.second;
        } else if (semiColonPos != std::string::npos) {
            comp = _currentCommand.substr(0, semiColonPos);
            auto bitPair = CompTable::lookup[comp];
            return bitPair.first + bitPair.second;
        }

        return "";
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x71a2
cmpl $0x2, %eax
jne 0x756d
addq $0x8, %r14
leaq 0xdcc0(%rip), %rsi      # 0x15191
movq %r14, %rdi
xorl %edx, %edx
callq 0x55f0
movq %rax, %r15
leaq 0xdcae(%rip), %rsi      # 0x15193
movq %r14, %rdi
xorl %edx, %edx
callq 0x55f0
movq %rax, %rcx
andq %r15, %rcx
cmpq $-0x1, %rcx
je 0x756d
leaq 0x50(%rsp), %rcx
movq %rcx, -0x10(%rcx)
andq $0x0, -0x8(%rcx)
movb $0x0, (%rcx)
cmpq $-0x1, %r15
je 0x7581
incq %r15
movq %rsp, %rdi
pushq $-0x1
popq %rcx
movq %r14, %rsi
movq %r15, %rdx
callq 0x5350
leaq 0x40(%rsp), %r14
movq %rsp, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x53b0
movq %r15, %rdi
callq 0x5170
leaq 0x1a278(%rip), %rdi     # 0x217c0
movq %r14, %rsi
callq 0x7cbc
movq %rsp, %rdi
movq %rax, %rsi
callq 0x7d22
leaq 0x20(%rsp), %rdx
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x7d5c
jmp 0x75dc
leaq 0xdc6c(%rip), %rsi      # 0x151e0
movq %rsp, %rdx
movq %rbx, %rdi
callq 0x67ec
jmp 0x75ee
cmpq $-0x1, %rax
je 0x75fb
movq %rsp, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x5350
leaq 0x40(%rsp), %r14
movq %rsp, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x53b0
movq %r15, %rdi
callq 0x5170
leaq 0x1a207(%rip), %rdi     # 0x217c0
movq %r14, %rsi
callq 0x7cbc
movq %rsp, %rdi
movq %rax, %rsi
callq 0x7d22
leaq 0x20(%rsp), %rdx
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x7d5c
movq %rsp, %rdi
callq 0x7d94
leaq 0x40(%rsp), %rdi
callq 0x5170
movq %rbx, %rax
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0xdbde(%rip), %rsi      # 0x151e0
movq %rsp, %rdx
movq %rbx, %rdi
callq 0x67ec
jmp 0x75e4
jmp 0x7626
jmp 0x7617
jmp 0x7626
jmp 0x7626
movq %rax, %rbx
movq %rsp, %rdi
callq 0x7d94
jmp 0x7629
jmp 0x7626
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x5170
movq %rbx, %rdi
callq 0x5540
nop
// File: /workspace/github_cpp_makefile_star2_O2/ELD[P]HackAssembler/src/parser.cpp
// Function: hack::Parser::getJumpBits[abi:cxx11]()
std::string Parser::getJumpBits()
    {
        if (commandType() != C_COMMAND) {
            return "";
        }

        auto semiColonPos = _currentCommand.find(";");

        if (semiColonPos == std::string::npos) {
            return JumpTable::lookup[""];
        }

        auto jump = _currentCommand.substr(semiColonPos + 1);

        return JumpTable::lookup[jump];
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x71a2
cmpl $0x2, %eax
jne 0x76a8
addq $0x8, %r14
leaq 0xdb30(%rip), %rsi      # 0x15193
movq %r14, %rdi
xorl %edx, %edx
callq 0x55f0
cmpq $-0x1, %rax
je 0x76be
incq %rax
leaq 0x10(%rsp), %r15
pushq $-0x1
popq %rcx
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x5350
leaq 0x1a16d(%rip), %rdi     # 0x21800
movq %r15, %rsi
callq 0x7c56
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5410
jmp 0x76f0
leaq 0xdb31(%rip), %rsi      # 0x151e0
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x67ec
jmp 0x76fa
leaq 0xdb1b(%rip), %rsi      # 0x151e0
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x67ec
leaq 0x1a125(%rip), %rdi     # 0x21800
leaq 0x10(%rsp), %rsi
callq 0x7bf0
movq %rbx, %rdi
movq %rax, %rsi
callq 0x5410
leaq 0x10(%rsp), %rdi
callq 0x5170
movq %rbx, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
jmp 0x771b
jmp 0x770e
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x5170
movq %rbx, %rdi
callq 0x5540
nop
// File: /workspace/github_cpp_makefile_star2_O2/ELD[P]HackAssembler/src/parser.cpp
// Function: hack::Parser::collectLabels()
void Parser::collectLabels()
    {
        while (advance()) {
            if (commandType() == L_COMMAND) {
                if (_symbols.contains(getSymbol())) {
                    continue;
                }

                _symbols.addSymbol(getSymbol(), _pc);
            }
        }

        rewind();
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x78(%rdi), %r14
leaq 0x8(%rsp), %r15
movq %rbx, %rdi
callq 0x7056
testb %al, %al
je 0x77e2
movq %rbx, %rdi
callq 0x71a2
testl %eax, %eax
jne 0x7782
movq %r15, %rdi
movq %rbx, %rsi
callq 0x7314
movq %r14, %rdi
movq %r15, %rsi
callq 0x1486c
movl %eax, %ebp
movq %r15, %rdi
callq 0x5170
testb %bpl, %bpl
jne 0x7782
movq %r15, %rdi
movq %rbx, %rsi
callq 0x7314
movl 0x70(%rbx), %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x14818
movq %r15, %rdi
callq 0x5170
jmp 0x7782
movq %rbx, %rdi
callq 0x7748
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x77f7
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5170
movq %rbx, %rdi
callq 0x5540
// File: /workspace/github_cpp_makefile_star2_O2/Thomas1995[P]Rentz/src/bots/bot.cpp
// Function: Bot::Init(int, int)
void Bot::Init(int index, int players) {
	debug("Getting initialized\n");

	this->index = index;
	this->playersCount = players;
	scores.resize(players, 0);

	if(games.empty())
	for(int i = 1; i <= MinigameCount; ++i)
		games.push_back(static_cast<Minigame>(i));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
movq 0xf45e(%rip), %r15      # 0x12fd0
movq (%r15), %rcx
leaq 0x84cc(%rip), %rdi      # 0xc048
pushq $0x14
popq %rsi
pushq $0x1
popq %rdx
callq 0x33f0
movq (%r15), %rdi
callq 0x32a0
movl %r14d, 0xc(%rbx)
movl %ebp, 0x8(%rbx)
leaq 0x38(%rbx), %rdi
movslq %ebp, %rsi
leaq 0x4(%rsp), %rdx
andl $0x0, (%rdx)
callq 0x409e
movq 0x68(%rbx), %rax
cmpq 0x70(%rbx), %rax
je 0x3bbf
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
addq $0x68, %rbx
pushq $0x1
popq %rbp
movq %rsp, %r14
cmpl $0x8, %ebp
je 0x3bb4
movl %ebp, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x48ec
incl %ebp
jmp 0x3bc9