LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/MSFG.cc
// Function: MultiStringFactorGraph::advance(std::vector<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::allocator<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::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>>>>&, unsigned int) const
void
MultiStringFactorGraph::advance(vector<vector<string> > &paths,
                                vector<string> &curr_string,
                                msfg_node_idx_t node_idx) const
{
    const MultiStringFactorGraph::Node &node = nodes[node_idx];
    curr_string.push_back(node.factor);

    if (node_idx == 0) {
        paths.push_back(curr_string);
        return;
    }

    for (auto arc = node.incoming.begin(); arc != node.incoming.end(); ++arc) {
        vector<string> curr_copy(curr_string);
        advance(paths, curr_copy, (**arc).source_node);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %r14d
movq %rdx, %r15
movq %rsi, %rbx
movl %ecx, %r12d
shlq $0x7, %r12
movq %rdi, -0x30(%rbp)
addq 0x20(%rdi), %r12
movq %rdx, %rdi
movq %r12, %rsi
callq 0x7f8c
testl %r14d, %r14d
je 0x1218c
movq 0x38(%r12), %r13
addq $0x28, %r12
cmpq %r12, %r13
je 0x1217d
leaq -0x48(%rbp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x102a4
movq 0x20(%r13), %rax
movl (%rax), %ecx
movq -0x30(%rbp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x120fa
movq %r14, %rdi
callq 0x5d54
movq %r13, %rdi
callq 0x4410
movq %rax, %r13
cmpq %r12, %rax
jne 0x12145
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movq %r15, %rsi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10268
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x5d54
movq %rbx, %rdi
callq 0x4650
nop
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/MSFG.cc
// Function: MultiStringFactorGraph::print_paths(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&) const
void
MultiStringFactorGraph::print_paths(const string &text) const
{
    vector<vector<string> > paths;
    get_paths(text, paths);

    for (auto pathit = paths.begin(); pathit != paths.end(); ++pathit) {
        for (auto it = pathit->begin(); it != pathit->end(); ++it)
            cout << *it << " ";
        cout << endl;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
xorps %xmm0, %xmm0
leaq -0x40(%rbp), %rdx
movaps %xmm0, (%rdx)
movq $0x0, 0x10(%rdx)
callq 0x12032
movq -0x40(%rbp), %r15
cmpq -0x38(%rbp), %r15
je 0x12259
movq 0x21dcf(%rip), %rbx     # 0x33fc0
leaq 0x14198(%rip), %r14     # 0x26390
movq (%r15), %r12
cmpq 0x8(%r15), %r12
je 0x12228
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %rbx, %rdi
callq 0x4400
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x4400
addq $0x20, %r12
jmp 0x121fb
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4370
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4260
addq $0x18, %r15
cmpq -0x38(%rbp), %r15
jne 0x121f8
leaq -0x40(%rbp), %rdi
callq 0x13aea
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x12273
jmp 0x12273
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x13aea
movq %rbx, %rdi
callq 0x4650
nop
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/MSFG.cc
// Function: MultiStringFactorGraph::remove_arc(MultiStringFactorGraph::Arc*)
void
MultiStringFactorGraph::remove_arc(Arc *arc)
{
    Node &src_node = nodes[(*arc).source_node];
    src_node.outgoing.erase(arc);

    Node &tgt_node = nodes[(*arc).target_node];
    tgt_node.incoming.erase(arc);

    delete arc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
leaq -0x20(%rbp), %rbx
movq %rsi, (%rbx)
movl (%rsi), %eax
movq 0x20(%rdi), %rcx
shlq $0x7, %rax
leaq (%rcx,%rax), %r15
addq $0x50, %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x15af4
movq %r15, %rdi
movq %rax, %rsi
callq 0x15b76
movq (%rbx), %rax
movl 0x4(%rax), %eax
movq 0x20(%r14), %rcx
shlq $0x7, %rax
leaq (%rcx,%rax), %r14
addq $0x20, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x15af4
movq %r14, %rdi
movq %rax, %rsi
callq 0x15b76
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x122fd
callq 0x4350
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/MSFG.cc
// Function: MultiStringFactorGraph::remove_arcs(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void
MultiStringFactorGraph::remove_arcs(const std::string &factor)
{
    if (factor.length() < 2) {
        cerr << "Trying to remove factor of length 1: " << factor << endl;
        exit(EXIT_FAILURE);
    }

    for (auto ndit = factor_node_map[factor].begin(); ndit != factor_node_map[factor].end(); ++ndit) {
        Node &node = nodes[*ndit];
        while (node.incoming.size() > 0)
            remove_arc(*(node.incoming.begin()));
        while (node.outgoing.size() > 0)
            remove_arc(*(node.outgoing.begin()));
    }

    factor_node_map.erase(factor);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
cmpq $0x1, 0x8(%rsi)
jbe 0x123bf
movq %rdi, %r15
leaq 0x98(%rdi), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x13b30
movq (%rax), %r12
movq %r14, %rdi
movq %rbx, %rsi
callq 0x13b30
cmpq 0x8(%rax), %r12
je 0x1239b
movl (%r12), %eax
movq 0x20(%r15), %rcx
shlq $0x7, %rax
leaq (%rcx,%rax), %r13
cmpq $0x0, 0x48(%rcx,%rax)
je 0x1238e
movq 0x38(%r13), %rax
movq 0x20(%rax), %rsi
movq %r15, %rdi
callq 0x12288
cmpq $0x0, 0x48(%r13)
jne 0x12365
jmp 0x1238e
movq 0x68(%r13), %rax
movq 0x20(%rax), %rsi
movq %r15, %rdi
callq 0x12288
cmpq $0x0, 0x78(%r13)
jne 0x1237e
addq $0x4, %r12
jmp 0x1233c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x15f86
movq %r14, %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x16038
movq 0x21c22(%rip), %rdi     # 0x33fe8
leaq 0x14392(%rip), %rsi     # 0x2675f
callq 0x4380
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4330
movq %rax, %rdi
callq 0x4180
movl $0x1, %edi
callq 0x4420
nop
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/MSFG.cc
// Function: MultiStringFactorGraph::prune_unreachable()
void
MultiStringFactorGraph::prune_unreachable()
{
    for (auto it = nodes.begin(); it != nodes.end(); it++) {

        if (it->factor == start_end_symbol) continue;

        if (it->incoming.size() == 0)
            while (it->outgoing.size() > 0)
                remove_arc(*(it->outgoing.begin()));

        if (it->outgoing.size() == 0)
            while (it->incoming.size() > 0)
                remove_arc(*(it->incoming.begin()));
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0x20(%rdi), %r14
cmpq 0x28(%rdi), %r14
je 0x1246c
movq %rdi, %rbx
movq 0x8(%r14), %rdx
cmpq 0x8(%rbx), %rdx
jne 0x12422
testq %rdx, %rdx
je 0x12462
movq (%rbx), %rsi
movq (%r14), %rdi
callq 0x43a0
testl %eax, %eax
je 0x12462
cmpq $0x0, 0x48(%r14)
jne 0x12442
jmp 0x1243b
movq 0x68(%r14), %rax
movq 0x20(%rax), %rsi
movq %rbx, %rdi
callq 0x12288
cmpq $0x0, 0x78(%r14)
jne 0x1242b
cmpq $0x0, 0x78(%r14)
jne 0x12462
jmp 0x1245b
movq 0x38(%r14), %rax
movq 0x20(%rax), %rsi
movq %rbx, %rdi
callq 0x12288
cmpq $0x0, 0x48(%r14)
jne 0x1244b
subq $-0x80, %r14
cmpq 0x28(%rbx), %r14
jne 0x12404
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/MSFG.cc
// Function: MultiStringFactorGraph::prune_unused(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
MultiStringFactorGraph::prune_unused(transitions_t &transitions)
{
    if (transitions.size() < factor_node_map.size()) {
        vector<string> to_remove;
        cerr << "Pruning " << factor_node_map.size()-transitions.size() << " unused factors from msfg." << endl;
        for (auto it = factor_node_map.begin(); it != factor_node_map.end(); ++it)
            if (transitions.find(it->first) == transitions.end())
                to_remove.push_back(it->first);
        for (auto it = to_remove.begin(); it != to_remove.end(); ++it)
            remove_arcs(*it);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq 0x28(%rsi), %rax
cmpq 0xc0(%rdi), %rax
jae 0x1258d
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
movq $0x0, -0x30(%rbp)
movq 0x21b38(%rip), %rdi     # 0x33fe8
leaq 0x142ce(%rip), %rsi     # 0x26785
movl $0x8, %edx
callq 0x4400
movq 0xc0(%rbx), %rsi
subq 0x28(%r14), %rsi
movq 0x21b15(%rip), %rdi     # 0x33fe8
callq 0x4250
movq %rax, %r15
leaq 0x142ac(%rip), %rsi     # 0x2678e
movl $0x1a, %edx
movq %rax, %rdi
callq 0x4400
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x4370
movsbl %al, %esi
movq %r15, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4260
movq 0xb0(%rbx), %r15
movq %rbx, -0x48(%rbp)
leaq 0xa0(%rbx), %r12
cmpq %r12, %r15
je 0x12561
leaq 0x8(%r14), %rbx
leaq 0x20(%r15), %r13
movq %r14, %rdi
movq %r13, %rsi
callq 0x1615e
cmpq %rbx, %rax
jne 0x12551
leaq -0x40(%rbp), %rdi
movq %r13, %rsi
callq 0x7f8c
movq %r15, %rdi
callq 0x4280
movq %rax, %r15
cmpq %r12, %rax
jne 0x12531
movq -0x40(%rbp), %r14
cmpq -0x38(%rbp), %r14
movq -0x48(%rbp), %rbx
je 0x12584
movq %rbx, %rdi
movq %r14, %rsi
callq 0x12308
addq $0x20, %r14
cmpq -0x38(%rbp), %r14
jne 0x1256f
leaq -0x40(%rbp), %rdi
callq 0x5d54
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x125a2
jmp 0x125a2
jmp 0x125a2
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x5d54
movq %rbx, %rdi
callq 0x4650
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/MSFG.cc
// Function: MultiStringFactorGraph::update_factor_node_map()
void
MultiStringFactorGraph::update_factor_node_map()
{
    factor_node_map.clear();
    for (msfg_node_idx_t idx=0; idx < nodes.size(); idx++) {
        Node &nd = nodes[idx];
        factor_node_map[nd.factor].push_back(idx);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x98(%rdi), %r14
movq %r14, %rdi
callq 0x160ec
movl $0x0, -0x1c(%rbp)
movq 0x20(%rbx), %rax
cmpq %rax, 0x28(%rbx)
je 0x12f62
xorl %esi, %esi
leaq -0x1c(%rbp), %r15
shlq $0x7, %rsi
addq %rax, %rsi
movq %r14, %rdi
callq 0x13b30
movq 0x8(%rax), %rsi
cmpq 0x10(%rax), %rsi
je 0x12f3b
movl -0x1c(%rbp), %ecx
movl %ecx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rax)
jmp 0x12f46
movq %rax, %rdi
movq %r15, %rdx
callq 0x1057c
movl -0x1c(%rbp), %esi
incl %esi
movl %esi, -0x1c(%rbp)
movq 0x20(%rbx), %rax
movq 0x28(%rbx), %rcx
subq %rax, %rcx
sarq $0x7, %rcx
cmpq %rsi, %rcx
ja 0x12f13
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/MSFG.cc
// Function: MultiStringFactorGraph::collect_arcs(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::map<unsigned int, std::vector<MultiStringFactorGraph::Arc*, std::allocator<MultiStringFactorGraph::Arc*>>, std::less<unsigned int>, std::allocator<std::pair<unsigned int const, std::vector<MultiStringFactorGraph::Arc*, std::allocator<MultiStringFactorGraph::Arc*>>>>>&) const
void
MultiStringFactorGraph::collect_arcs(const string &text,
                                     map<msfg_node_idx_t, vector<Arc*> > &arcs) const
{
    msfg_node_idx_t end_node = string_end_nodes.at(text);
    set<msfg_node_idx_t> nodes_to_process; nodes_to_process.insert(end_node);

    while(nodes_to_process.size() > 0) {

        msfg_node_idx_t i = *(nodes_to_process.rbegin());

        const Node &node = nodes[i];
        for (auto arc = node.incoming.begin(); arc != node.incoming.end(); ++arc) {
            arcs[(**arc).source_node].push_back(*arc);
            nodes_to_process.insert((**arc).source_node);
        }

        nodes_to_process.erase(i);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %rbx
movq %rdi, -0x38(%rbp)
addq $0x38, %rdi
callq 0x139bc
movl (%rax), %eax
leaq -0x3c(%rbp), %rsi
movl %eax, (%rsi)
leaq -0x68(%rbp), %rcx
movl $0x0, (%rcx)
xorl %eax, %eax
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq -0x70(%rbp), %rdi
callq 0x156ce
cmpq $0x0, -0x48(%rbp)
je 0x13066
leaq -0x70(%rbp), %r12
leaq -0x68(%rbp), %rdi
callq 0x4210
movl 0x20(%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x38(%rbp), %rcx
movq 0x20(%rcx), %rcx
shlq $0x7, %rax
leaq (%rcx,%rax), %r14
addq $0x28, %r14
movq 0x10(%r14), %r13
cmpq %r14, %r13
je 0x13044
movq 0x20(%r13), %rsi
movq %rbx, %rdi
callq 0x13c1a
leaq 0x20(%r13), %r15
movq 0x8(%rax), %rsi
cmpq 0x10(%rax), %rsi
je 0x1301e
movq (%r15), %rcx
movq %rcx, (%rsi)
addq $0x8, 0x8(%rax)
jmp 0x13029
movq %rax, %rdi
movq %r15, %rdx
callq 0x16412
movq (%r15), %rsi
movq %r12, %rdi
callq 0x156ce
movq %r13, %rdi
callq 0x4410
movq %rax, %r13
cmpq %r14, %rax
jne 0x12ff7
movq %r12, %rdi
leaq -0x2c(%rbp), %rsi
callq 0x157f6
movq %r12, %rdi
movq %rax, %rsi
callq 0x15872
cmpq $0x0, -0x48(%rbp)
jne 0x12fcb
leaq -0x70(%rbp), %rdi
callq 0x13fe2
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x13082
jmp 0x13082
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x13fe2
movq %rbx, %rdi
callq 0x4650
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/MSFG.cc
// Function: MultiStringFactorGraph::collect_factors(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>>>>&) const
void
MultiStringFactorGraph::collect_factors(const string &text,
                                        set<string> &factors) const
{
    msfg_node_idx_t end_node = string_end_nodes.at(text);
    set<msfg_node_idx_t> nodes_to_process; nodes_to_process.insert(end_node);

    while(nodes_to_process.size() > 0) {

        msfg_node_idx_t i = *(nodes_to_process.rbegin());

        const Node &node = nodes[i];
        factors.insert(node.factor);
        for (auto arc = node.incoming.begin(); arc != node.incoming.end(); ++arc)
            nodes_to_process.insert((**arc).source_node);

        nodes_to_process.erase(i);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movq %rdi, %r14
addq $0x38, %rdi
callq 0x139bc
movl (%rax), %eax
leaq -0x30(%rbp), %rsi
movl %eax, (%rsi)
leaq -0x58(%rbp), %rcx
movl $0x0, (%rcx)
xorl %eax, %eax
movq %rax, 0x8(%rcx)
movq %rcx, 0x10(%rcx)
movq %rcx, 0x18(%rcx)
movq %rax, 0x20(%rcx)
leaq -0x60(%rbp), %rdi
callq 0x156ce
cmpq $0x0, -0x38(%rbp)
je 0x13159
leaq -0x60(%rbp), %r12
leaq -0x58(%rbp), %rdi
callq 0x4210
movl 0x20(%rax), %r13d
movl %r13d, -0x2c(%rbp)
shlq $0x7, %r13
addq 0x20(%r14), %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x14092
movq 0x38(%r13), %r15
addq $0x28, %r13
cmpq %r13, %r15
je 0x1313b
movq 0x20(%r15), %rsi
movq %r12, %rdi
callq 0x156ce
movq %r15, %rdi
callq 0x4410
movq %rax, %r15
cmpq %r13, %rax
jne 0x1311f
movq %r12, %rdi
leaq -0x2c(%rbp), %rsi
callq 0x157f6
movq %r12, %rdi
movq %rax, %rsi
callq 0x15872
cmpq $0x0, -0x38(%rbp)
jne 0x130ee
leaq -0x60(%rbp), %rdi
callq 0x13fe2
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x13175
jmp 0x13175
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x13fe2
movq %rbx, %rdi
callq 0x4650
nop
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/EM.cc
// Function: viterbi(StringSet const&, 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>>>&, bool)
flt_type viterbi(const StringSet &vocab,
                 const string &text,
                 map<string, flt_type> &stats,
                 bool utf8)
{
    stats.clear();
    vector<string> best_path;
    flt_type lp = viterbi(vocab, text, best_path, false, utf8);
    for (auto it = best_path.begin(); it != best_path.end(); ++it)
        stats[*it] += 1.0;
    return lp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movl %ecx, %r14d
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movq %rdx, %rdi
callq 0x1c04a
xorpd %xmm0, %xmm0
leaq -0x40(%rbp), %rdx
movapd %xmm0, (%rdx)
movq $0x0, 0x10(%rdx)
movq %r12, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
movl %r14d, %r8d
callq 0x16c65
movsd %xmm0, -0x48(%rbp)
movq -0x40(%rbp), %r14
cmpq -0x38(%rbp), %r14
je 0x16f74
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1b05e
movsd (%rax), %xmm0
addsd 0xf89e(%rip), %xmm0     # 0x26808
movsd %xmm0, (%rax)
addq $0x20, %r14
jmp 0x16f4d
leaq -0x40(%rbp), %rdi
callq 0x5d54
movsd -0x48(%rbp), %xmm0
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x16f91
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x5d54
movq %rbx, %rdi
callq 0x4650
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/EM.cc
// Function: forward_backward(StringSet const&, 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>>>&, bool)
flt_type forward_backward(const StringSet &vocab,
                          const string &text,
                          map<string, flt_type> &stats,
                          bool utf8)
{
    int len = text.length();
    if (len == 0) return MIN_FLOAT;

    stats.clear();
    vector<vector<Token> > search(len);
    vector<flt_type> fw(len, SMALL_LP); fw[0] = 0.0;
    vector<flt_type> bw(len, SMALL_LP); bw.back() = 0.0;

    forward(vocab, text, search, fw, utf8);
    backward(vocab, text, search, fw, bw, stats);

    if (search[len-1].size() == 0) return MIN_FLOAT;
    return fw.back();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl 0x8(%rsi), %r15d
testq %r15, %r15
je 0x17609
movq %rdx, %rbx
movq %rsi, %r14
movl %ecx, -0x3c(%rbp)
movq %rdi, -0x38(%rbp)
movq %rdx, %rdi
callq 0x1c04a
movslq %r15d, %r13
leaq -0x90(%rbp), %rdi
leaq -0x58(%rbp), %rdx
movq %r13, %rsi
callq 0x1b18e
movabsq $-0x3fa7000000000000, %r12 # imm = 0xC059000000000000
leaq -0x78(%rbp), %rdx
movq %r12, (%rdx)
leaq -0x58(%rbp), %rdi
leaq -0x60(%rbp), %rcx
movq %r13, %rsi
callq 0x1b220
movq -0x58(%rbp), %rax
movq $0x0, (%rax)
leaq -0x60(%rbp), %rdx
movq %r12, (%rdx)
leaq -0x78(%rbp), %rdi
leaq -0x29(%rbp), %rcx
movq %r13, %rsi
callq 0x1b220
movq -0x70(%rbp), %rax
movq $0x0, -0x8(%rax)
movzbl -0x3c(%rbp), %r8d
leaq -0x90(%rbp), %rdx
leaq -0x58(%rbp), %rcx
movq -0x38(%rbp), %rdi
movq %r14, %rsi
callq 0x16fa5
leaq -0x90(%rbp), %rdx
leaq -0x58(%rbp), %rcx
leaq -0x78(%rbp), %r8
movq %r14, %rsi
movq %rbx, %r9
callq 0x172fc
shlq $0x20, %r15
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
addq %r15, %rax
sarq $0x20, %rax
movq -0x90(%rbp), %rcx
leaq (%rax,%rax,2), %rax
movq 0x8(%rcx,%rax,8), %rdx
cmpq (%rcx,%rax,8), %rdx
je 0x17613
movq -0x50(%rbp), %rax
movsd -0x8(%rax), %xmm0
jmp 0x1761b
movsd 0xf1ef(%rip), %xmm0     # 0x26800
jmp 0x1764d
movsd 0xf1e5(%rip), %xmm0     # 0x26800
movsd %xmm0, -0x38(%rbp)
movq -0x78(%rbp), %rdi
testq %rdi, %rdi
je 0x1762e
callq 0x4350
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x1763c
callq 0x4350
leaq -0x90(%rbp), %rdi
callq 0x1b2ac
movsd -0x38(%rbp), %xmm0
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x17677
movq %rax, %rbx
jmp 0x17685
movq %rax, %rbx
movq -0x78(%rbp), %rdi
testq %rdi, %rdi
je 0x17677
callq 0x4350
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x17685
callq 0x4350
leaq -0x90(%rbp), %rdi
callq 0x1b2ac
movq %rbx, %rdi
callq 0x4650
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/EM.cc
// Function: forward_backward(StringSet const&, 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>>>&, std::vector<double, std::allocator<double>>&, bool)
flt_type forward_backward(const StringSet &vocab,
                          const string &text,
                          map<string, flt_type> &stats,
                          vector<flt_type> &bw,
                          bool utf8)
{
    int len = text.length();
    if (len == 0) return MIN_FLOAT;

    stats.clear();
    vector<vector<Token> > search(len);
    vector<flt_type> fw(len, SMALL_LP); fw[0] = 0.0;
    bw.resize(len, SMALL_LP); bw.back() = 0.0;

    forward(vocab, text, search, fw, utf8);
    backward(vocab, text, search, fw, bw, stats);

    if (search[len-1].size() == 0) return MIN_FLOAT;
    return fw.back();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl 0x8(%rsi), %r13d
testq %r13, %r13
je 0x17799
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, -0x58(%rbp)
movl %r8d, -0x38(%rbp)
movq %rdx, %rdi
callq 0x1c04a
movslq %r13d, %r12
leaq -0x78(%rbp), %rdi
leaq -0x50(%rbp), %rdx
movq %r12, %rsi
callq 0x1b18e
movabsq $-0x3fa7000000000000, %rax # imm = 0xC059000000000000
leaq -0x60(%rbp), %rdx
movq %rax, (%rdx)
leaq -0x50(%rbp), %rdi
leaq -0x29(%rbp), %rcx
movq %r12, %rsi
callq 0x1b220
movq -0x50(%rbp), %rax
movq $0x0, (%rax)
leaq -0x60(%rbp), %rdx
movabsq $-0x3fa7000000000000, %rax # imm = 0xC059000000000000
movq %rax, (%rdx)
movq %r14, %rdi
movq %r12, %rsi
callq 0x1b2f6
movq 0x8(%r14), %rax
movq $0x0, -0x8(%rax)
movzbl -0x38(%rbp), %r8d
leaq -0x78(%rbp), %rdx
leaq -0x50(%rbp), %rcx
movq -0x58(%rbp), %rdi
movq %r15, %rsi
callq 0x16fa5
leaq -0x78(%rbp), %rdx
leaq -0x50(%rbp), %rcx
movq %r15, %rsi
movq %r14, %r8
movq %rbx, %r9
callq 0x172fc
shlq $0x20, %r13
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
addq %r13, %rax
sarq $0x20, %rax
movq -0x78(%rbp), %rcx
leaq (%rax,%rax,2), %rax
movq 0x8(%rcx,%rax,8), %rdx
cmpq (%rcx,%rax,8), %rdx
je 0x177a3
movq -0x48(%rbp), %rax
movsd -0x8(%rax), %xmm0
jmp 0x177ab
movsd 0xf05f(%rip), %xmm0     # 0x26800
jmp 0x177cc
movsd 0xf055(%rip), %xmm0     # 0x26800
movsd %xmm0, -0x38(%rbp)
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x177be
callq 0x4350
leaq -0x78(%rbp), %rdi
callq 0x1b2ac
movsd -0x38(%rbp), %xmm0
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x177e2
movq %rax, %rbx
jmp 0x177f3
movq %rax, %rbx
movq -0x50(%rbp), %rdi
testq %rdi, %rdi
je 0x177f3
callq 0x4350
leaq -0x78(%rbp), %rdi
callq 0x1b2ac
movq %rbx, %rdi
callq 0x4650
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/EM.cc
// Function: viterbi(StringSet const&, 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>>, 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>>>>>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
flt_type viterbi(const StringSet &vocab,
                 const string &text,
                 transitions_t &stats,
                 const string &start_end_symbol)
{
    stats.clear();
    vector<string> best_path;
    flt_type lp = viterbi(vocab, text, best_path, true);
    if (best_path.size() == 0) return MIN_FLOAT;
    best_path.insert(best_path.begin(), start_end_symbol);
    best_path.push_back(start_end_symbol);
    for (unsigned int i=1; i<best_path.size(); i++)
        stats[best_path[i-1]][best_path[i]] += 1.0;
    return lp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
movq %rdx, %rdi
callq 0x1c532
xorpd %xmm0, %xmm0
leaq -0x40(%rbp), %rdx
movapd %xmm0, (%rdx)
movq $0x0, 0x10(%rdx)
movq %r12, %rdi
movq %r15, %rsi
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0x16c65
movsd %xmm0, -0x48(%rbp)
movq -0x40(%rbp), %rsi
cmpq %rsi, -0x38(%rbp)
je 0x17961
leaq -0x40(%rbp), %rdi
movq %r14, %rdx
callq 0x1b330
leaq -0x40(%rbp), %rdi
movq %r14, %rsi
callq 0x7f8c
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rcx
subq %rax, %rcx
cmpq $0x21, %rcx
jb 0x1796e
movl $0x1, %r14d
movl $0x2, %r15d
leal -0x2(%r15), %esi
shlq $0x5, %rsi
addq %rax, %rsi
movq %rbx, %rdi
callq 0x1b3fa
shlq $0x5, %r14
addq -0x40(%rbp), %r14
movq %rax, %rdi
movq %r14, %rsi
callq 0x1b05e
movsd (%rax), %xmm0
addsd 0xeec7(%rip), %xmm0     # 0x26808
movsd %xmm0, (%rax)
movl %r15d, %r14d
movq -0x40(%rbp), %rax
movq -0x38(%rbp), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
incl %r15d
cmpq %r14, %rcx
ja 0x1790f
jmp 0x1796e
movsd 0xee97(%rip), %xmm0     # 0x26800
movsd %xmm0, -0x48(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x5d54
movsd -0x48(%rbp), %xmm0
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1798d
jmp 0x1798d
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x5d54
movq %rbx, %rdi
callq 0x4650
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/EM.cc
// Function: forward(MultiStringFactorGraph const&, std::vector<double, std::allocator<double>>&)
void
forward(const MultiStringFactorGraph &msfg,
        vector<flt_type> &fw)
{
    for (unsigned int i=0; i<msfg.nodes.size(); i++) {

        if (fw[i] == MIN_FLOAT) continue;

        const MultiStringFactorGraph::Node &node = msfg.nodes[i];
        for (auto arc = node.outgoing.begin(); arc != node.outgoing.end(); ++arc) {
            int tgt_node = (**arc).target_node;
            flt_type cost = fw[i] + *(**arc).cost;
            if (fw[tgt_node] == MIN_FLOAT) fw[tgt_node] = cost;
            else fw[tgt_node] = add_log_domain_probs(fw[tgt_node], cost);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0x20(%rdi), %rax
movq %rdi, -0x30(%rbp)
cmpq %rax, 0x28(%rdi)
je 0x195da
movq %rsi, %rbx
xorl %r12d, %r12d
movq (%rbx), %rcx
movsd (%rcx,%r12,8), %xmm0
ucomisd 0xd2fa(%rip), %xmm0     # 0x26800
jne 0x1950e
jnp 0x195bb
movq %r12, %rcx
shlq $0x7, %rcx
leaq (%rax,%rcx), %r13
addq $0x58, %r13
movq 0x10(%r13), %r15
cmpq %r13, %r15
je 0x195bb
movq 0x20(%r15), %rcx
movq (%rbx), %rax
movsd (%rax,%r12,8), %xmm1
movq 0x8(%rcx), %rdx
addsd (%rdx), %xmm1
movslq 0x4(%rcx), %r14
movsd (%rax,%r14,8), %xmm2
ucomisd 0xd2af(%rip), %xmm2     # 0x26800
jne 0x1955d
jp 0x1955d
movsd %xmm1, (%rax,%r14,8)
jmp 0x195a7
movapd %xmm2, %xmm3
subsd %xmm1, %xmm3
movapd %xmm3, %xmm0
xorpd 0xd2af(%rip), %xmm0     # 0x26820
movapd %xmm0, %xmm4
cmpltsd %xmm3, %xmm4
andpd %xmm4, %xmm2
andnpd %xmm1, %xmm4
orpd %xmm2, %xmm4
movapd %xmm4, -0x40(%rbp)
minsd %xmm3, %xmm0
callq 0x4660
callq 0x46e0
addsd -0x40(%rbp), %xmm0
movq (%rbx), %rax
movsd %xmm0, (%rax,%r14,8)
movq %r15, %rdi
callq 0x4410
movq %rax, %r15
cmpq %r13, %rax
jne 0x1952a
incl %r12d
movq -0x30(%rbp), %rcx
movq 0x20(%rcx), %rax
movq 0x28(%rcx), %rcx
subq %rax, %rcx
sarq $0x7, %rcx
cmpq %r12, %rcx
ja 0x194f5
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/EM.cc
// Function: likelihood(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>>>> const&, MultiStringFactorGraph const&, bool)
flt_type
likelihood(const map<string, flt_type> &words,
           const set<string> &selected_words,
           const MultiStringFactorGraph &msfg,
           bool forward_backward)
{
    flt_type total_lp = 0.0;

    for (auto it = selected_words.cbegin(); it != selected_words.cend(); ++it)
        if (forward_backward)
            total_lp += words.at(*it) * likelihood_fb(*it, msfg);
        else
            total_lp += words.at(*it) * likelihood_viterbi(*it, msfg);

    return total_lp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, -0x34(%rbp)
movq %rsi, %r15
movq 0x18(%rsi), %r13
addq $0x8, %r15
cmpq %r15, %r13
je 0x19fb4
movq %rdx, %r14
movq %rdi, %r12
xorpd %xmm0, %xmm0
movsd %xmm0, -0x30(%rbp)
leaq 0x20(%r13), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1b4d8
movsd (%rax), %xmm0
movsd %xmm0, -0x40(%rbp)
cmpb $0x0, -0x34(%rbp)
je 0x19f80
movq %rbx, %rdi
movq %r14, %rsi
callq 0x199f4
jmp 0x19f8b
movq %rbx, %rdi
movq %r14, %rsi
callq 0x19cbc
movsd -0x40(%rbp), %xmm1
mulsd %xmm0, %xmm1
movsd -0x30(%rbp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
movq %r13, %rdi
callq 0x4410
movq %rax, %r13
cmpq %r15, %rax
jne 0x19f55
jmp 0x19fbd
xorpd %xmm0, %xmm0
movsd %xmm0, -0x30(%rbp)
movsd -0x30(%rbp), %xmm0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/EM.cc
// Function: forward_backward(MultiStringFactorGraph const&, 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>>, 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>>>>>>&)
flt_type
forward_backward(const MultiStringFactorGraph &msfg,
                 const string &text,
                 transitions_t &stats)
{
    if (msfg.nodes.size() == 0) return MIN_FLOAT;

    map<msfg_node_idx_t, flt_type> fw;
    fw[0] = 0.0;

    forward(text, msfg, fw);
    backward(msfg, text, fw, stats);

    return fw[msfg.string_end_nodes.at(text)];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq 0x28(%rdi), %rax
cmpq 0x20(%rdi), %rax
je 0x1a8c2
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x50(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, (%rax)
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
leaq -0x24(%rbp), %rsi
movl %ecx, (%rsi)
leaq -0x58(%rbp), %rdi
callq 0x1b712
movq $0x0, (%rax)
leaq -0x58(%rbp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x195e9
leaq -0x58(%rbp), %rdx
movsd 0xbf88(%rip), %xmm0     # 0x26808
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
callq 0x1a36b
addq $0x38, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x139bc
leaq -0x58(%rbp), %rdi
movq %rax, %rsi
callq 0x1b6aa
movsd (%rax), %xmm0
movsd %xmm0, -0x20(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x1baf8
movsd -0x20(%rbp), %xmm0
jmp 0x1a8ca
movsd 0xbf36(%rip), %xmm0     # 0x26800
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1a8d7
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x1baf8
movq %rbx, %rdi
callq 0x4650
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/EM.cc
// Function: viterbi(MultiStringFactorGraph const&, 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>>, 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>>>>>>&, double)
flt_type
viterbi(const MultiStringFactorGraph &msfg,
        const string &text,
        transitions_t &stats,
        flt_type multiplier)
{
    vector<string> best_path;
    flt_type lp = viterbi(msfg, text, best_path);
    for (unsigned int i=1; i<best_path.size(); i++)
        stats[best_path[i-1]][best_path[i]] += multiplier;
    return lp;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movsd %xmm0, -0x40(%rbp)
movq %rdx, %rbx
xorpd %xmm0, %xmm0
leaq -0x30(%rbp), %rdx
movapd %xmm0, (%rdx)
movq $0x0, 0x10(%rdx)
callq 0x1a8eb
movsd %xmm0, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rax, %rcx
cmpq $0x21, %rcx
jb 0x1ac74
movl $0x1, %r14d
movl $0x2, %r15d
leal -0x2(%r15), %esi
shlq $0x5, %rsi
addq %rax, %rsi
movq %rbx, %rdi
callq 0x1b3fa
shlq $0x5, %r14
addq -0x30(%rbp), %r14
movq %rax, %rdi
movq %r14, %rsi
callq 0x1b05e
movsd (%rax), %xmm0
addsd -0x40(%rbp), %xmm0
movsd %xmm0, (%rax)
movl %r15d, %r14d
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
incl %r15d
cmpq %r14, %rcx
ja 0x1ac27
leaq -0x30(%rbp), %rdi
callq 0x5d54
movsd -0x38(%rbp), %xmm0
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1ac8f
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x5d54
movq %rbx, %rdi
callq 0x4650
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/Unigrams.cc
// Function: Unigrams::sort_vocab(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::vector<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, double>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, double>>>&, bool)
void
Unigrams::sort_vocab(const map<string, flt_type> &vocab,
                     vector<pair<string, flt_type> > &sorted_vocab,
                     bool descending)
{
    sorted_vocab.clear();
    for (auto it = vocab.cbegin(); it != vocab.cend(); it++) {
        pair<string, flt_type> curr_pair(it->first, it->second);
        sorted_vocab.push_back(curr_pair);
    }
    if (descending)
        sort(sorted_vocab.begin(), sorted_vocab.end(), descending_sort);
    else
        sort(sorted_vocab.begin(), sorted_vocab.end(), ascending_sort);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, -0x2c(%rbp)
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
callq 0x1fdd8
movq 0x18(%r15), %r12
addq $0x8, %r15
cmpq %r15, %r12
je 0x1dded
leaq -0x48(%rbp), %rbx
leaq -0x58(%rbp), %r13
movq %rbx, -0x58(%rbp)
movq 0x20(%r12), %rsi
movq 0x28(%r12), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x5f0a
movsd 0x40(%r12), %xmm0
movsd %xmm0, -0x38(%rbp)
movq %r14, %rdi
movq %r13, %rsi
callq 0x1fe1e
movq -0x58(%rbp), %rdi
cmpq %rbx, %rdi
je 0x1dddd
callq 0x4350
movq %r12, %rdi
callq 0x4410
movq %rax, %r12
cmpq %r15, %rax
jne 0x1dd9f
movq (%r14), %r15
movq 0x8(%r14), %r14
cmpq %r14, %r15
je 0x1de50
leaq -0x7d4(%rip), %rax      # 0x1d62c
leaq -0x7c8(%rip), %r12      # 0x1d63f
cmpb $0x0, -0x2c(%rbp)
cmovneq %rax, %r12
movq %r14, %rax
subq %r15, %rax
sarq $0x3, %rax
movabsq $-0x3333333333333333, %rcx # imm = 0xCCCCCCCCCCCCCCCD
imulq %rax, %rcx
bsrq %rcx, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rcx
callq 0x207e0
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x208dc
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq -0x58(%rbp), %rdi
cmpq %rbx, %rdi
je 0x1de70
callq 0x4350
movq %r14, %rdi
callq 0x4650
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/Unigrams.cc
// Function: Unigrams::read_sents(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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>>>>&)
int
Unigrams::read_sents(string fname,
                     vector<string> &sents)
{
    sents.clear();
    SimpleFileInput sfi(fname);

    int lc = 0;
    string line;
    while (sfi.getline(line)) {
        trim(line, '\n');
        sents.push_back(line);
        lc++;
    }

    return lc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x82e8
leaq -0x58(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq -0x68(%rbp), %r14
movq %r14, %rdi
callq 0x5f0a
leaq -0x28(%rbp), %rdi
movq %r14, %rsi
callq 0x6040
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x1decd
callq 0x4350
leaq -0x38(%rbp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
xorl %r14d, %r14d
leaq -0x48(%rbp), %r15
movq -0x28(%rbp), %rdi
movq (%rdi), %rax
movq %r15, %rsi
callq *(%rax)
testb %al, %al
je 0x1df74
movq %r15, %rdi
movl $0xa, %esi
movq $-0x1, %rdx
callq 0x4270
cmpq $-0x1, %rax
je 0x1df52
leaq 0x1(%rax), %rdx
movq -0x40(%rbp), %rcx
cmpq %rax, %rcx
jbe 0x1df9b
movq %rdx, -0x40(%rbp)
movq -0x48(%rbp), %rax
movb $0x0, (%rax,%rdx)
movq %r15, %rdi
movl $0xa, %esi
xorl %edx, %edx
callq 0x4340
cmpq $-0x1, %rax
je 0x1df61
movq %r15, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x40b0
jmp 0x1df61
movq -0x48(%rbp), %rax
movq $0x0, -0x40(%rbp)
movb $0x0, (%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7f8c
incl %r14d
jmp 0x1deeb
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x1df82
callq 0x4350
leaq -0x28(%rbp), %rdi
callq 0x6192
movl %r14d, %eax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x8481(%rip), %rdi      # 0x26423
leaq 0x8466(%rip), %rsi      # 0x2640f
xorl %eax, %eax
callq 0x4530
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r15, %rdi
je 0x1dfdf
callq 0x4350
jmp 0x1dfdf
jmp 0x1dfc5
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x1dfd6
callq 0x4350
leaq -0x28(%rbp), %rdi
callq 0x6192
movq %rbx, %rdi
callq 0x4650
nop
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/Unigrams.cc
// Function: Unigrams::iterate(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>>>&, unsigned int)
flt_type
Unigrams::iterate(const map<string, flt_type> &words,
                  map<string, flt_type> &vocab,
                  unsigned int iterations)
{
    map<string, flt_type> freqs;
    flt_type ll = 0.0;

    for (unsigned int i=0; i<iterations; i++) {
        ll = resegment_words(words, vocab, freqs);
        vocab = freqs;
        freqs_to_logprobs(vocab);
    }

    return ll;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl %ecx, %ebx
movq %rsi, -0x40(%rbp)
movq %rdi, -0x38(%rbp)
leaq -0x98(%rbp), %rax
movl $0x0, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
testl %ebx, %ebx
je 0x1e09b
movq %rdx, %r14
leaq -0x68(%rbp), %r12
leaq -0xa0(%rbp), %r13
leaq -0x70(%rbp), %r15
xorps %xmm0, %xmm0
movaps %xmm0, -0x60(%rbp)
movaps %xmm0, -0x50(%rbp)
movaps %xmm0, -0x70(%rbp)
movq %r12, -0x58(%rbp)
movq %r12, -0x50(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq %r14, %rdx
movq %r13, %rcx
movq %r15, %r8
callq 0x1e0e8
movsd %xmm0, -0x30(%rbp)
movq %r15, %rdi
callq 0x5c80
movq %r14, %rdi
movq %r13, %rsi
callq 0x1fe84
movq %r14, %rdi
movsd 0x8818(%rip), %xmm0     # 0x268a8
callq 0x1e18e
decl %ebx
jne 0x1e038
jmp 0x1e0a3
xorps %xmm0, %xmm0
movsd %xmm0, -0x30(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x5cea
movsd -0x30(%rbp), %xmm0
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x5c80
jmp 0x1e0d4
movq %rax, %rbx
leaq -0xa0(%rbp), %rdi
callq 0x5cea
movq %rbx, %rdi
callq 0x4650
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/Unigrams.cc
// Function: Unigrams::freqs_to_logprobs(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)
void
Unigrams::freqs_to_logprobs(map<string, flt_type> &vocab,
                            flt_type min_lp)
{
    flt_type densum = Unigrams::get_sum(vocab);
    densum = log(densum);
    for (auto iter = vocab.begin(); iter != vocab.end(); ++iter) {
        iter->second = (log(iter->second)-densum);
        if (iter->second < min_lp || std::isinf(iter->second) || std::isnan(iter->second))
            iter->second = min_lp;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movapd %xmm0, -0x30(%rbp)
movq %rdi, %rbx
callq 0x1e6ec
callq 0x42f0
movsd %xmm0, -0x20(%rbp)
movq 0x18(%rbx), %r14
addq $0x8, %rbx
cmpq %rbx, %r14
je 0x1e23d
movabsq $0x7ff0000000000000, %r15 # imm = 0x7FF0000000000000
movsd 0x40(%r14), %xmm0
callq 0x42f0
subsd -0x20(%rbp), %xmm0
movq %xmm0, %rax
btrq $0x3f, %rax
movapd -0x30(%rbp), %xmm2
movapd %xmm2, %xmm1
cmpq %r15, %rax
movapd %xmm2, %xmm4
je 0x1e1f9
movapd %xmm0, %xmm1
movapd %xmm0, %xmm2
cmpltsd %xmm4, %xmm2
movapd %xmm2, %xmm3
andnpd %xmm1, %xmm3
andpd %xmm4, %xmm2
orpd %xmm3, %xmm2
cmpunordsd %xmm0, %xmm0
movapd %xmm0, %xmm1
andnpd %xmm2, %xmm1
andpd %xmm4, %xmm0
orpd %xmm1, %xmm0
movlpd %xmm0, 0x40(%r14)
movq %r14, %rdi
callq 0x4280
movq %rax, %r14
cmpq %rbx, %rax
jne 0x1e1c9
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/Unigrams.cc
// Function: Unigrams::iterate(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&, 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>>>&, unsigned int)
flt_type
Unigrams::iterate(const vector<string> &sents,
                  map<string, flt_type> &vocab,
                  unsigned int iterations)
{
    map<string, flt_type> freqs;
    flt_type ll = 0.0;

    for (unsigned int i=0; i<iterations; i++) {
        ll = resegment_sents(sents, vocab, freqs);
        vocab = freqs;
        freqs_to_logprobs(vocab);
    }

    return ll;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, %ebx
leaq -0x58(%rbp), %rax
movl $0x0, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
testl %ebx, %ebx
je 0x1e2bf
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq -0x60(%rbp), %r13
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %r13, %rcx
callq 0x1e2f8
movsd %xmm0, -0x30(%rbp)
movq %r14, %rdi
movq %r13, %rsi
callq 0x1fe84
movq %r14, %rdi
movsd 0x85f4(%rip), %xmm0     # 0x268a8
callq 0x1e18e
decl %ebx
jne 0x1e288
jmp 0x1e2c7
xorps %xmm0, %xmm0
movsd %xmm0, -0x30(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x5cea
movsd -0x30(%rbp), %xmm0
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x5cea
movq %rbx, %rdi
callq 0x4650