// File: /workspace/github_cpp_makefile_star2_O3/aalto-speech[P]ftk/src/Bigrams.cc
// Function: Bigrams::update_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>>>>>> 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>>>>>>&, 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::update_trans_stats(const transitions_t &collected_stats,
                            flt_type weight,
                            transitions_t &trans_stats,
                            map<string, flt_type> &unigram_stats)
{
    for (auto srcit = collected_stats.cbegin(); srcit != collected_stats.cend(); ++srcit) {
        for (auto tgtit = srcit->second.cbegin(); tgtit != srcit->second.cend(); ++tgtit) {
            trans_stats[srcit->first][tgtit->first] += weight * tgtit->second;
            unigram_stats[tgtit->first] += weight * tgtit->second;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, -0x58(%rbp)
movq %rsi, -0x50(%rbp)
movsd %xmm0, -0x38(%rbp)
movq 0x18(%rdi), %rax
addq $0x8, %rdi
movq %rdi, -0x48(%rbp)
cmpq %rdi, %rax
je 0x21d76
movq -0x50(%rbp), %r14
movq 0x58(%rax), %r13
movq %rax, -0x40(%rbp)
leaq 0x48(%rax), %rbx
cmpq %rbx, %r13
movsd -0x38(%rbp), %xmm0
je 0x21d63
movq -0x40(%rbp), %rax
leaq 0x20(%rax), %r15
leaq 0x20(%r13), %r12
movsd 0x40(%r13), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, -0x30(%rbp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x1b318
movq %rax, %rdi
movq %r12, %rsi
callq 0x1af86
movsd -0x30(%rbp), %xmm0
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
movsd 0x40(%r13), %xmm0
mulsd -0x38(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
movq -0x58(%rbp), %rdi
movq %r12, %rsi
callq 0x1af86
movsd -0x30(%rbp), %xmm0
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
movq %r13, %rdi
callq 0x4410
movsd -0x38(%rbp), %xmm0
movq %rax, %r13
cmpq %rbx, %rax
jne 0x21cef
movq -0x40(%rbp), %rdi
callq 0x4410
cmpq -0x48(%rbp), %rax
jne 0x21cd1
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop