// File: /workspace/github_cpp_makefile_star2_O1/aalto-speech[P]ftk/src/EM.cc
// Function: viterbi(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&, 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>>>>>>&, double)
flt_type viterbi(const transitions_t &transitions,
                 FactorGraph &text,
                 transitions_t &stats,
                 flt_type multiplier)
{
    vector<string> best_path;
    flt_type lp = viterbi(transitions, text, best_path, true);
    if (best_path.size() < 2) return MIN_FLOAT;
    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)
movl $0x1, %ecx
callq 0x179a1
movq -0x28(%rbp), %rax
subq -0x30(%rbp), %rax
cmpq $0x21, %rax
jae 0x17dc7
movsd 0xea40(%rip), %xmm0     # 0x26800
movsd %xmm0, -0x38(%rbp)
jmp 0x17e36
movsd %xmm0, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
subq %rax, %rcx
cmpq $0x21, %rcx
jb 0x17e36
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 0x17de9
leaq -0x30(%rbp), %rdi
callq 0x5d54
movsd -0x38(%rbp), %xmm0
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x17e51
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x5d54
movq %rbx, %rdi
callq 0x4650