// File: /workspace/github_cpp_makefile_star2_O3/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 $0x58, %rsp
movq 0x20(%rdi), %r14
movq %rdi, -0x30(%rbp)
cmpq 0x28(%rdi), %r14
je 0x22074
movq %rsi, %rbx
leaq 0x8(%rsi), %rax
movq %rax, -0x60(%rbp)
leaq -0x80(%rbp), %r15
leaq -0x70(%rbp), %rax
movq %rax, -0x80(%rbp)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x5f0e
movq 0x68(%r14), %r13
movq %r14, -0x58(%rbp)
leaq 0x58(%r14), %r12
cmpq %r12, %r13
je 0x2204c
movq 0x20(%r13), %rax
movl 0x4(%rax), %eax
movq -0x30(%rbp), %rcx
movq 0x20(%rcx), %rcx
shlq $0x7, %rax
leaq -0x40(%rbp), %rdx
movq %rdx, -0x50(%rbp)
movq (%rcx,%rax), %rsi
movq 0x8(%rcx,%rax), %rdx
addq %rsi, %rdx
leaq -0x50(%rbp), %rdi
callq 0x5f0e
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1604a
cmpq -0x60(%rbp), %rax
je 0x22002
movq %rbx, %rdi
movq %r15, %rsi
callq 0x23abe
movq %rax, %rdi
leaq -0x50(%rbp), %rsi
callq 0x1bb6a
movq %rax, %r14
movq %rbx, %rdi
movq %r15, %rsi
callq 0x23abe
addq $0x8, %rax
cmpq %rax, %r14
jne 0x22026
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1b318
movq %rax, %rdi
leaq -0x50(%rbp), %rsi
callq 0x1af86
movabsq $0x3e21b48655f37267, %rcx # imm = 0x3E21B48655F37267
movq %rcx, (%rax)
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x22038
callq 0x4350
movq %r13, %rdi
callq 0x4410
movq %rax, %r13
cmpq %r12, %rax
jne 0x21f93
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
je 0x2205e
callq 0x4350
movq -0x58(%rbp), %r14
subq $-0x80, %r14
movq -0x30(%rbp), %rax
cmpq 0x28(%rax), %r14
jne 0x21f64
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2208e
movq %rax, %rbx
jmp 0x220a3
jmp 0x2208e
jmp 0x2208e
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x220a3
callq 0x4350
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
je 0x220b5
callq 0x4350
movq %rbx, %rdi
callq 0x4650
nop