// File: /workspace/github_cpp_makefile_star2_O2/aalto-speech[P]ftk/test/emtest.cc
// Function: viterbiChecks(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&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&, double, bool)
void
viterbiChecks(const map<string, flt_type> &vocab,
              int maxlen,
              string &sentence,
              vector<string> &correct_path,
              flt_type correct_lp,
              bool utf8=true)
{
    vector<string> result_path;
    flt_type result_lp = viterbi(vocab, maxlen, sentence, result_path, true, utf8);
    BOOST_CHECK_EQUAL( correct_path.size(), result_path.size() );
    BOOST_CHECK_EQUAL( correct_lp, result_lp );
    for (unsigned int i=0; i<correct_path.size(); i++)
        BOOST_CHECK_EQUAL( correct_path[i], result_path[i] );

    result_path.clear();
    StringSet ssvocab(vocab);
    result_lp = viterbi(ssvocab, sentence, result_path, true, utf8);
    BOOST_CHECK_EQUAL( correct_path.size(), result_path.size() );
    BOOST_CHECK_EQUAL( correct_lp, result_lp );
    for (unsigned int i=0; i<correct_path.size(); i++)
        BOOST_CHECK_EQUAL( correct_path[i], result_path[i] );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2b8, %rsp            # imm = 0x2B8
movl %r8d, %r13d
movq %rcx, %rbx
movq %rdx, %r12
movsd %xmm0, -0x58(%rbp)
xorps %xmm0, %xmm0
leaq -0x50(%rbp), %rcx
movaps %xmm0, (%rcx)
andq $0x0, 0x10(%rcx)
pushq $0x1
popq %r8
movq %rdi, -0x68(%rbp)
movl %r13d, %r9d
callq 0x17784
movsd %xmm0, -0x30(%rbp)
movq 0x46f1b(%rip), %rdi     # 0x70540
leaq 0x2a554(%rip), %r14     # 0x53b80
leaq -0x1b8(%rbp), %rsi
movq %r14, (%rsi)
leaq 0x2a551(%rip), %r15     # 0x53b8e
movq %r15, 0x8(%rsi)
leaq 0x2a3cd(%rip), %rax     # 0x53a15
leaq -0x1a8(%rbp), %rcx
movq %rax, (%rcx)
movq %rax, 0x8(%rcx)
pushq $0x16
popq %rdx
callq 0x5710
leaq -0x2d8(%rbp), %rdi
movb $0x0, 0x8(%rdi)
leaq 0x46470(%rip), %rax     # 0x6fae0
movq %rax, (%rdi)
movq 0x46936(%rip), %rax     # 0x6ffb0
movq %rax, 0x10(%rdi)
leaq 0x29cd2(%rip), %rax     # 0x53357
movq %rax, 0x18(%rdi)
leaq -0x198(%rbp), %rsi
movq %r14, (%rsi)
movq %r15, 0x8(%rsi)
movq 0x8(%rbx), %rax
subq (%rbx), %rax
sarq $0x5, %rax
leaq -0x88(%rbp), %r9
movq -0x48(%rbp), %rcx
subq -0x50(%rbp), %rcx
movq %rax, (%r9)
sarq $0x5, %rcx
leaq -0x90(%rbp), %rax
movq %rcx, (%rax)
subq $0x8, %rsp
leaq 0x2a4d6(%rip), %r11     # 0x53ba3
leaq 0x2a4bb(%rip), %r10     # 0x53b8f
pushq $0x16
popq %rdx
pushq $0x1
popq %rcx
pushq $0x2
popq %r8
pushq %r11
pushq %rax
pushq %r10
callq 0x4e82a
addq $0x20, %rsp
movq 0x46e4d(%rip), %rdi     # 0x70540
leaq -0x188(%rbp), %rsi
movq %r14, (%rsi)
movq %r15, 0x8(%rsi)
leaq -0x178(%rbp), %rcx
leaq 0x2a306(%rip), %rax     # 0x53a15
movq %rax, (%rcx)
movq %rax, 0x8(%rcx)
pushq $0x17
popq %rdx
callq 0x5710
movl %r13d, -0x34(%rbp)
movq %r12, -0x60(%rbp)
leaq -0x2d8(%rbp), %rdi
movb $0x0, 0x8(%rdi)
leaq 0x463a8(%rip), %rax     # 0x6fae0
movq %rax, (%rdi)
movq 0x4686e(%rip), %rax     # 0x6ffb0
movq %rax, 0x10(%rdi)
leaq 0x29c0a(%rip), %rax     # 0x53357
movq %rax, 0x18(%rdi)
leaq -0x168(%rbp), %rsi
movq %r14, (%rsi)
movq %r15, 0x8(%rsi)
subq $0x8, %rsp
leaq 0x2a457(%rip), %rax     # 0x53bc1
leaq -0x30(%rbp), %r10
leaq 0x2a441(%rip), %r11     # 0x53bb6
pushq $0x17
popq %rdx
pushq $0x1
popq %rcx
pushq $0x2
popq %r8
leaq -0x58(%rbp), %r9
pushq %rax
pushq %r10
pushq %r11
callq 0x2903d
addq $0x20, %rsp
xorl %r13d, %r13d
pushq $0x19
popq %r14
movl %r13d, %r13d
movq 0x8(%rbx), %rax
subq (%rbx), %rax
sarq $0x5, %rax
cmpq %r13, %rax
jbe 0x2988c
movq 0x46d8a(%rip), %rdi     # 0x70540
leaq 0x2a3c3(%rip), %r15     # 0x53b80
movq %r15, -0xf0(%rbp)
leaq 0x2a3c3(%rip), %r12     # 0x53b8e
movq %r12, -0xe8(%rbp)
leaq 0x2a23c(%rip), %rax     # 0x53a15
movq %rax, -0xe0(%rbp)
movq %rax, -0xd8(%rbp)
leaq -0xf0(%rbp), %rsi
movq %r14, %rdx
leaq -0xe0(%rbp), %rcx
callq 0x5710
movb $0x0, -0x2d0(%rbp)
leaq 0x462d5(%rip), %rax     # 0x6fae0
movq %rax, -0x2d8(%rbp)
movq 0x46797(%rip), %rax     # 0x6ffb0
movq %rax, -0x2c8(%rbp)
leaq 0x29b30(%rip), %rax     # 0x53357
movq %rax, -0x2c0(%rbp)
movq %r15, -0xd0(%rbp)
movq %r12, -0xc8(%rbp)
movq %r13, %rax
shlq $0x5, %rax
movq (%rbx), %r9
addq %rax, %r9
addq -0x50(%rbp), %rax
subq $0x8, %rsp
leaq -0x2d8(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
movq %r14, %rdx
pushq $0x1
popq %rcx
pushq $0x2
popq %r8
leaq 0x2a36b(%rip), %r10     # 0x53bdb
pushq %r10
pushq %rax
leaq 0x2a351(%rip), %rax     # 0x53bcb
pushq %rax
callq 0x4e913
addq $0x20, %rsp
incl %r13d
jmp 0x29798
leaq -0x50(%rbp), %rdi
callq 0x9a04
leaq -0x2d8(%rbp), %rdi
movq -0x68(%rbp), %rsi
callq 0xdbec
movzbl -0x34(%rbp), %r8d
leaq -0x2d8(%rbp), %rdi
leaq -0x50(%rbp), %rdx
pushq $0x1
popq %rcx
movq -0x60(%rbp), %rsi
callq 0x17b3b
leaq 0x2a2b8(%rip), %r14     # 0x53b80
leaq 0x2a2bf(%rip), %r13     # 0x53b8e
movsd %xmm0, -0x30(%rbp)
movq 0x46c65(%rip), %rdi     # 0x70540
leaq -0x158(%rbp), %rsi
movq %r14, (%rsi)
movq %r13, 0x8(%rsi)
leaq -0x148(%rbp), %rcx
leaq 0x2a11e(%rip), %rax     # 0x53a15
movq %rax, (%rcx)
movq %rax, 0x8(%rcx)
pushq $0x1e
popq %rdx
callq 0x5710
leaq -0x88(%rbp), %rdi
movb $0x0, 0x8(%rdi)
leaq 0x461c8(%rip), %rax     # 0x6fae0
movq %rax, (%rdi)
movq 0x4668e(%rip), %rax     # 0x6ffb0
movq %rax, 0x10(%rdi)
leaq 0x29a2a(%rip), %rax     # 0x53357
movq %rax, 0x18(%rdi)
leaq -0x138(%rbp), %rsi
movq %r14, (%rsi)
movq %r13, 0x8(%rsi)
movq 0x8(%rbx), %rax
subq (%rbx), %rax
sarq $0x5, %rax
leaq -0x90(%rbp), %r9
movq -0x48(%rbp), %rcx
subq -0x50(%rbp), %rcx
movq %rax, (%r9)
sarq $0x5, %rcx
leaq -0xf8(%rbp), %rax
movq %rcx, (%rax)
subq $0x8, %rsp
pushq $0x1e
popq %rdx
pushq $0x1
popq %rcx
pushq $0x2
popq %r8
leaq 0x2a224(%rip), %r10     # 0x53ba3
pushq %r10
pushq %rax
leaq 0x2a206(%rip), %rax     # 0x53b8f
pushq %rax
callq 0x4e82a
addq $0x20, %rsp
movq 0x46ba6(%rip), %rdi     # 0x70540
leaq -0x128(%rbp), %rsi
movq %r14, (%rsi)
movq %r13, 0x8(%rsi)
leaq -0x118(%rbp), %rcx
leaq 0x2a05f(%rip), %rax     # 0x53a15
movq %rax, (%rcx)
movq %rax, 0x8(%rcx)
pushq $0x1f
popq %rdx
callq 0x5710
leaq -0x88(%rbp), %rdi
movb $0x0, 0x8(%rdi)
leaq 0x46109(%rip), %rax     # 0x6fae0
movq %rax, (%rdi)
movq 0x465cf(%rip), %rax     # 0x6ffb0
movq %rax, 0x10(%rdi)
leaq 0x2996b(%rip), %rax     # 0x53357
movq %rax, 0x18(%rdi)
leaq -0x108(%rbp), %rsi
movq %r14, (%rsi)
movq %r13, 0x8(%rsi)
subq $0x8, %rsp
pushq $0x1f
popq %rdx
pushq $0x1
popq %rcx
pushq $0x2
popq %r8
leaq -0x58(%rbp), %r9
leaq 0x2a1aa(%rip), %rax     # 0x53bc1
pushq %rax
leaq -0x30(%rbp), %rax
pushq %rax
leaq 0x2a192(%rip), %rax     # 0x53bb6
pushq %rax
callq 0x2903d
addq $0x20, %rsp
xorl %r14d, %r14d
pushq $0x21
popq %r15
movl %r14d, %r14d
movq 0x8(%rbx), %rax
subq (%rbx), %rax
sarq $0x5, %rax
cmpq %r14, %rax
jbe 0x29b19
movq 0x46aed(%rip), %rdi     # 0x70540
leaq 0x2a126(%rip), %r12     # 0x53b80
movq %r12, -0xc0(%rbp)
movq %r13, -0xb8(%rbp)
leaq 0x29fa6(%rip), %rax     # 0x53a15
movq %rax, -0xb0(%rbp)
movq %rax, -0xa8(%rbp)
leaq -0xc0(%rbp), %rsi
movq %r15, %rdx
leaq -0xb0(%rbp), %rcx
callq 0x5710
movb $0x0, -0x80(%rbp)
leaq 0x46042(%rip), %rax     # 0x6fae0
movq %rax, -0x88(%rbp)
movq 0x46504(%rip), %rax     # 0x6ffb0
movq %rax, -0x78(%rbp)
leaq 0x298a0(%rip), %rax     # 0x53357
movq %rax, -0x70(%rbp)
movq %r12, -0xa0(%rbp)
movq %r13, -0x98(%rbp)
movq %r14, %rax
shlq $0x5, %rax
movq (%rbx), %r9
addq %rax, %r9
addq -0x50(%rbp), %rax
subq $0x8, %rsp
leaq -0x88(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
movq %r15, %rdx
pushq $0x1
popq %rcx
pushq $0x2
popq %r8
leaq 0x2a0de(%rip), %r10     # 0x53bdb
pushq %r10
pushq %rax
leaq 0x2a0c4(%rip), %rax     # 0x53bcb
pushq %rax
callq 0x4e913
addq $0x20, %rsp
incl %r14d
jmp 0x29a35
leaq -0x2d8(%rbp), %rdi
callq 0xdea0
leaq -0x50(%rbp), %rdi
callq 0x9574
addq $0x2b8, %rsp            # imm = 0x2B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x29b50
jmp 0x29b50
jmp 0x29b63
jmp 0x29b63
jmp 0x29b63
jmp 0x29b50
jmp 0x29b63
jmp 0x29b50
movq %rax, %rbx
leaq -0x2d8(%rbp), %rdi
callq 0xdea0
jmp 0x29b66
jmp 0x29b63
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x9574
movq %rbx, %rdi
callq 0x56b0