// File: /workspace/github_cpp_makefile_star2_O2/aalto-speech[P]ftk/src/Bigrams.cc
// Function: Bigrams::collect_trans_stats(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::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>>, FactorGraph*, 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, FactorGraph*>>>&, 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::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)
void
Bigrams::collect_trans_stats(transitions_t &transitions,
                             const map<string, flt_type> &words,
                             map<string, FactorGraph*> &fg_words,
                             transitions_t &trans_stats,
                             map<string, flt_type> &unigram_stats,
                             bool fb)
{
    trans_stats.clear();
    unigram_stats.clear();

    for (auto it = fg_words.begin(); it != fg_words.end(); ++it) {
        transitions_t word_stats;
        if (fb)
            forward_backward(transitions, *it->second, word_stats);
        else
            viterbi(transitions, *it->second, word_stats);
        update_trans_stats(word_stats, words.at(it->first), trans_stats, unigram_stats);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %r9d, -0x2c(%rbp)
movq %r8, %rbx
movq %rdx, %r12
movq %rsi, -0x48(%rbp)
movq %rdi, -0x38(%rbp)
movq %rcx, -0x40(%rbp)
movq %rcx, %rdi
callq 0x1a3dc
movq %rbx, %r15
movq %rbx, %rdi
callq 0x19cca
movq 0x18(%r12), %r13
addq $0x8, %r12
leaq -0x70(%rbp), %rbx
leaq -0x78(%rbp), %r14
cmpq %r12, %r13
je 0x1f9f5
andl $0x0, -0x70(%rbp)
andq $0x0, -0x68(%rbp)
movq %rbx, -0x60(%rbp)
movq %rbx, -0x58(%rbp)
andq $0x0, -0x50(%rbp)
movq 0x40(%r13), %rsi
cmpb $0x0, -0x2c(%rbp)
je 0x1f9ac
movq -0x38(%rbp), %rdi
movq %r14, %rdx
callq 0x167c9
jmp 0x1f9c0
movq -0x38(%rbp), %rdi
movq %r14, %rdx
movsd 0x3ddd(%rip), %xmm0     # 0x23798
callq 0x16384
leaq 0x20(%r13), %rsi
movq -0x48(%rbp), %rdi
callq 0x19102
movsd (%rax), %xmm0
movq %r14, %rdi
movq -0x40(%rbp), %rsi
movq %r15, %rdx
callq 0x1f7be
movq %r14, %rdi
callq 0x19564
movq %r13, %rdi
callq 0x4270
movq %rax, %r13
jmp 0x1f979
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
callq 0x19564
movq %rbx, %rdi
callq 0x45f0