// File: 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
subq $0xf0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
addq $0x20, %rdi
callq 0x315f0
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
addq $0x20, %rdi
callq 0x31660
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x31620
testb $0x1, %al
jne 0x5dacb
jmp 0x5dcfa
leaq -0x18(%rbp), %rdi
callq 0x31690
movq %rax, %rsi
leaq -0x40(%rbp), %rdi
callq 0x41a0
leaq -0x18(%rbp), %rdi
callq 0x31690
movq %rax, %rdi
addq $0x50, %rdi
callq 0x30260
movq %rax, -0x48(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x31690
movq %rax, %rdi
addq $0x50, %rdi
callq 0x302c0
movq %rax, -0x50(%rbp)
leaq -0x48(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x30290
testb $0x1, %al
jne 0x5db28
jmp 0x5dcd8
movq -0x8(%rbp), %rax
addq $0x20, %rax
movq %rax, -0xa8(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x302f0
movq -0xa8(%rbp), %rdi
movq (%rax), %rax
movl 0x4(%rax), %eax
movl %eax, %esi
callq 0x30c00
movq %rax, %rsi
leaq -0x70(%rbp), %rdi
callq 0x41a0
jmp 0x5db62
movq -0x10(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x31310
movq %rax, -0xb0(%rbp)
jmp 0x5db78
movq -0xb0(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x10(%rbp), %rdi
callq 0x31360
movq %rax, -0x90(%rbp)
leaq -0x88(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x312e0
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, -0xb1(%rbp)
jne 0x5dc37
movq -0x10(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x60990
movq %rax, -0xc0(%rbp)
jmp 0x5dbce
movq -0xc0(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x48c60
movq %rax, -0xc8(%rbp)
jmp 0x5dbe7
movq -0xc8(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x60990
movq %rax, -0xd0(%rbp)
jmp 0x5dc0b
movq -0xd0(%rbp), %rdi
callq 0x48c90
movq %rax, -0xa0(%rbp)
leaq -0x98(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x48d90
movb %al, -0xb1(%rbp)
movb -0xb1(%rbp), %al
testb $0x1, %al
jne 0x5dc43
jmp 0x5dcc1
movsd 0x8bcd(%rip), %xmm0     # 0x66818
callq 0x4710
movsd %xmm0, -0xe0(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x48700
movq %rax, -0xd8(%rbp)
jmp 0x5dc6e
movq -0xd8(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x47db0
movq %rax, -0xe8(%rbp)
jmp 0x5dc87
movq -0xe8(%rbp), %rax
movsd -0xe0(%rbp), %xmm0
movsd %xmm0, (%rax)
jmp 0x5dcc1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x5dcef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x4828
jmp 0x5dcef
leaq -0x70(%rbp), %rdi
callq 0x4828
leaq -0x48(%rbp), %rdi
callq 0x30320
jmp 0x5daf9
leaq -0x40(%rbp), %rdi
callq 0x4828
leaq -0x18(%rbp), %rdi
callq 0x31720
jmp 0x5daa4
leaq -0x40(%rbp), %rdi
callq 0x4828
jmp 0x5dd03
addq $0xf0, %rsp
popq %rbp
retq
movq -0x78(%rbp), %rdi
callq 0x46e0
nopl (%rax)