// File: /workspace/github_cpp_makefile_star2_O2/aalto-speech[P]ftk/test/emtest.cc
// Function: TransitionViterbiTest1::test_method()
BOOST_AUTO_TEST_CASE(TransitionViterbiTest1)
{
    string str1("a"); string str2("bc");
    set<string> vocab = {start_end,str1,str2};

    transitions_t transitions;
    transitions[str1][str2] = -1.0;
    transitions[start_end][str1] = -1.0;
    transitions[str2][start_end] = -1.0;
    string sentence("abc");
    FactorGraph fg(sentence, start_end, vocab, 2);
    vector<string> best_path;
    flt_type lp = viterbi(transitions, fg, best_path);
    BOOST_CHECK_EQUAL(4, (int)best_path.size());
    BOOST_CHECK_EQUAL(start_end, best_path[0]);
    BOOST_CHECK_EQUAL(str1, best_path[1]);
    BOOST_CHECK_EQUAL(str2, best_path[2]);
    BOOST_CHECK_EQUAL(start_end, best_path[3]);
    BOOST_CHECK_CLOSE( -3.0, lp, DBL_ACCURACY );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2a8, %rsp            # imm = 0x2A8
leaq 0x1b847(%rip), %rsi     # 0x53f2c
leaq -0x98(%rbp), %rdi
leaq -0x180(%rbp), %rdx
callq 0x5160
leaq 0x1b4f9(%rip), %rsi     # 0x53bf8
leaq -0x78(%rbp), %rdi
leaq -0x180(%rbp), %rdx
callq 0x5160
leaq 0x37e72(%rip), %rsi     # 0x70588
leaq -0x180(%rbp), %r14
movq %r14, %rdi
callq 0x54f0
leaq -0x160(%rbp), %r15
leaq -0x98(%rbp), %rsi
movq %r15, %rdi
callq 0x54f0
leaq -0x140(%rbp), %r15
leaq -0x78(%rbp), %rsi
movq %r15, %rdi
callq 0x54f0
leaq -0x1b0(%rbp), %rdi
leaq -0x180(%rbp), %rsi
pushq $0x3
popq %rdx
leaq -0xe8(%rbp), %rcx
leaq -0x108(%rbp), %r8
callq 0x4ed0a
pushq $0x40
popq %rbx
leaq (%rbx,%rbp), %rdi
addq $-0x180, %rdi           # imm = 0xFE80
callq 0x57b8
addq $-0x20, %rbx
cmpq $-0x20, %rbx
jne 0x38775
leaq -0xe0(%rbp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq -0xe8(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x1b5f0
leaq -0x78(%rbp), %rsi
movq %rax, %rdi
callq 0x1b338
movabsq $-0x4010000000000000, %rbx # imm = 0xBFF0000000000000
movq %rbx, (%rax)
leaq 0x37daa(%rip), %rsi     # 0x70588
leaq -0xe8(%rbp), %rdi
callq 0x1b5f0
leaq -0x98(%rbp), %rsi
movq %rax, %rdi
callq 0x1b338
movq %rbx, (%rax)
leaq -0xe8(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x1b5f0
leaq 0x37d75(%rip), %rsi     # 0x70588
movq %rax, %rdi
callq 0x1b338
movq %rbx, (%rax)
leaq 0x1b3d2(%rip), %rsi     # 0x53bf7
leaq -0x108(%rbp), %rdi
leaq -0x180(%rbp), %rdx
callq 0x5160
leaq 0x37d49(%rip), %rdx     # 0x70588
leaq -0x180(%rbp), %rdi
leaq -0x108(%rbp), %rsi
leaq -0x1b0(%rbp), %rcx
pushq $0x2
popq %r8
xorl %r9d, %r9d
callq 0xf742
xorps %xmm0, %xmm0
leaq -0x40(%rbp), %rdx
movaps %xmm0, (%rdx)
andq $0x0, 0x10(%rdx)
leaq -0xe8(%rbp), %rdi
leaq -0x180(%rbp), %rsi
pushq $0x1
popq %rcx
callq 0x18633
movsd %xmm0, -0x58(%rbp)
movq 0x37caf(%rip), %rdi     # 0x70540
leaq 0x1b2e8(%rip), %rbx     # 0x53b80
leaq -0x2d0(%rbp), %rsi
movq %rbx, (%rsi)
leaq 0x1b2e5(%rip), %r14     # 0x53b8e
movq %r14, 0x8(%rsi)
leaq 0x1b161(%rip), %r12     # 0x53a15
leaq -0x2c0(%rbp), %rcx
movq %r12, (%rcx)
movq %r12, 0x8(%rcx)
movl $0x279, %edx            # imm = 0x279
callq 0x5710
leaq -0xb8(%rbp), %rdi
movb $0x0, 0x8(%rdi)
leaq 0x37202(%rip), %rax     # 0x6fae0
movq %rax, (%rdi)
movq 0x376c8(%rip), %r15     # 0x6ffb0
movq %r15, 0x10(%rdi)
leaq 0x1aa64(%rip), %r13     # 0x53357
movq %r13, 0x18(%rdi)
leaq -0x2b0(%rbp), %rsi
movq %rbx, (%rsi)
movq %r14, 0x8(%rsi)
leaq -0x50(%rbp), %r9
movq -0x38(%rbp), %rax
subq -0x40(%rbp), %rax
movl $0x4, (%r9)
shrq $0x5, %rax
leaq -0x48(%rbp), %r11
movl %eax, (%r11)
subq $0x8, %rsp
leaq 0x1b7c7(%rip), %rax     # 0x540f5
leaq 0x1bd2d(%rip), %r10     # 0x54662
pushq $0x1
popq %rcx
pushq $0x2
popq %r8
movl $0x279, %edx            # imm = 0x279
pushq %rax
pushq %r11
pushq %r10
callq 0x4ea09
addq $0x20, %rsp
movq 0x37bea(%rip), %rdi     # 0x70540
leaq -0x2a0(%rbp), %rsi
movq %rbx, (%rsi)
movq %r14, 0x8(%rsi)
leaq -0x290(%rbp), %rcx
movq %r12, (%rcx)
movq %r12, 0x8(%rcx)
movl $0x27a, %edx            # imm = 0x27A
callq 0x5710
leaq -0xb8(%rbp), %rdi
movb $0x0, 0x8(%rdi)
leaq 0x37152(%rip), %rax     # 0x6fae0
movq %rax, (%rdi)
movq %r15, 0x10(%rdi)
movq %r13, 0x18(%rdi)
leaq -0x280(%rbp), %rsi
movq %rbx, (%rsi)
movq %r14, 0x8(%rsi)
subq $0x8, %rsp
leaq 0x1b763(%rip), %rax     # 0x54115
leaq 0x1b752(%rip), %r10     # 0x5410b
leaq 0x37bc8(%rip), %r9      # 0x70588
pushq $0x1
popq %rcx
pushq $0x2
popq %r8
movl $0x27a, %edx            # imm = 0x27A
pushq %rax
pushq -0x40(%rbp)
pushq %r10
callq 0x4e913
addq $0x20, %rsp
movq 0x37b5e(%rip), %rdi     # 0x70540
leaq -0x270(%rbp), %rsi
movq %rbx, (%rsi)
movq %r14, 0x8(%rsi)
leaq -0x260(%rbp), %rcx
movq %r12, (%rcx)
movq %r12, 0x8(%rcx)
movl $0x27b, %edx            # imm = 0x27B
callq 0x5710
leaq -0xb8(%rbp), %rdi
movb $0x0, 0x8(%rdi)
leaq 0x370c6(%rip), %rax     # 0x6fae0
movq %rax, (%rdi)
movq %r15, 0x10(%rdi)
movq %r13, 0x18(%rdi)
leaq -0x250(%rbp), %rsi
movq %rbx, (%rsi)
movq %r14, 0x8(%rsi)
movq -0x40(%rbp), %rax
addq $0x20, %rax
subq $0x8, %rsp
leaq 0x1b6e1(%rip), %r10     # 0x54127
leaq 0x1b6d5(%rip), %r11     # 0x54122
pushq $0x1
popq %rcx
pushq $0x2
popq %r8
leaq -0x98(%rbp), %r9
movl $0x27b, %edx            # imm = 0x27B
pushq %r10
pushq %rax
pushq %r11
callq 0x4e913
addq $0x20, %rsp
movq 0x37acb(%rip), %rdi     # 0x70540
leaq -0x240(%rbp), %rsi
movq %rbx, (%rsi)
movq %r14, 0x8(%rsi)
leaq -0x230(%rbp), %rcx
movq %r12, (%rcx)
movq %r12, 0x8(%rcx)
movl $0x27c, %edx            # imm = 0x27C
callq 0x5710
leaq -0xb8(%rbp), %rdi
movb $0x0, 0x8(%rdi)
leaq 0x37033(%rip), %rax     # 0x6fae0
movq %rax, (%rdi)
movq %r15, 0x10(%rdi)
movq %r13, 0x18(%rdi)
leaq -0x220(%rbp), %rsi
movq %rbx, (%rsi)
movq %r14, 0x8(%rsi)
movq -0x40(%rbp), %rax
addq $0x40, %rax
subq $0x8, %rsp
leaq 0x1b660(%rip), %r10     # 0x54139
leaq 0x1b654(%rip), %r11     # 0x54134
pushq $0x1
popq %rcx
pushq $0x2
popq %r8
leaq -0x78(%rbp), %r9
movl $0x27c, %edx            # imm = 0x27C
pushq %r10
pushq %rax
pushq %r11
callq 0x4e913
addq $0x20, %rsp
movq 0x37a3b(%rip), %rdi     # 0x70540
leaq -0x210(%rbp), %rsi
movq %rbx, (%rsi)
movq %r14, 0x8(%rsi)
leaq -0x200(%rbp), %rcx
movq %r12, (%rcx)
movq %r12, 0x8(%rcx)
movl $0x27d, %edx            # imm = 0x27D
callq 0x5710
leaq -0xb8(%rbp), %rdi
movb $0x0, 0x8(%rdi)
leaq 0x36fa3(%rip), %rax     # 0x6fae0
movq %rax, (%rdi)
movq %r15, 0x10(%rdi)
movq %r13, 0x18(%rdi)
leaq -0x1f0(%rbp), %rsi
movq %rbx, (%rsi)
movq %r14, 0x8(%rsi)
movq -0x40(%rbp), %rax
addq $0x60, %rax
subq $0x8, %rsp
leaq 0x1b5dd(%rip), %r10     # 0x54146
leaq 0x37a18(%rip), %r9      # 0x70588
pushq $0x1
popq %rcx
pushq $0x2
popq %r8
movl $0x27d, %edx            # imm = 0x27D
pushq %r10
pushq %rax
leaq 0x1b585(%rip), %rax     # 0x5410b
pushq %rax
callq 0x4e913
addq $0x20, %rsp
movq 0x379a9(%rip), %rdi     # 0x70540
leaq -0x1e0(%rbp), %rsi
movq %rbx, (%rsi)
movq %r14, 0x8(%rsi)
leaq -0x1d0(%rbp), %rcx
movq %r12, (%rcx)
movq %r12, 0x8(%rcx)
movl $0x27e, %edx            # imm = 0x27E
callq 0x5710
leaq -0xb8(%rbp), %rdi
movb $0x0, 0x8(%rdi)
leaq 0x36f11(%rip), %rax     # 0x6fae0
movq %rax, (%rdi)
movq %r15, 0x10(%rdi)
movq %r13, 0x18(%rdi)
leaq -0x1c0(%rbp), %rsi
movq %rbx, (%rsi)
movq %r14, 0x8(%rsi)
movabsq $-0x3ff8000000000000, %rax # imm = 0xC008000000000000
leaq -0x50(%rbp), %r9
movq %rax, (%r9)
movsd 0x377ff(%rip), %xmm0    # 0x70400
movsd %xmm0, -0x48(%rbp)
subq $0x8, %rsp
leaq 0x1b0ec(%rip), %rax     # 0x53cfd
leaq 0x1bb76(%rip), %r10     # 0x5478e
leaq -0x58(%rbp), %r11
leaq 0x1ac5a(%rip), %rbx     # 0x5387d
pushq $0x1
popq %rcx
pushq $0x8
popq %r8
movl $0x27e, %edx            # imm = 0x27E
pushq %rax
leaq -0x48(%rbp), %rax
pushq %rax
pushq %r10
pushq %r11
pushq %rbx
callq 0x4eaf1
addq $0x30, %rsp
leaq -0x40(%rbp), %rdi
callq 0x9574
leaq -0x180(%rbp), %rdi
callq 0x10c24
leaq -0x108(%rbp), %rdi
callq 0x57b8
leaq -0xe8(%rbp), %rdi
callq 0x1bb0c
leaq -0x1b0(%rbp), %rdi
callq 0x200e8
leaq -0x78(%rbp), %rdi
callq 0x57b8
leaq -0x98(%rbp), %rdi
callq 0x57b8
addq $0x2a8, %rsp            # imm = 0x2A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x38cfe
jmp 0x38cfe
jmp 0x38cfe
jmp 0x38cfe
jmp 0x38cfe
jmp 0x38cfe
movq %rax, %rbx
jmp 0x38d16
jmp 0x38cf9
movq %rax, %rbx
pushq $0x40
popq %r14
leaq (%r14,%rbp), %rdi
addq $-0x180, %rdi           # imm = 0xFE80
callq 0x57b8
addq $-0x20, %r14
cmpq $-0x20, %r14
jne 0x38cbd
jmp 0x38d3a
movq %rax, %rbx
jmp 0x38d3a
movq %rax, %rbx
jmp 0x38d43
movq %rax, %rbx
addq $-0x20, %r15
movq %r15, %rdi
callq 0x57b8
cmpq %r14, %r15
jne 0x38ce6
jmp 0x38d3a
movq %rax, %rbx
jmp 0x38d22
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x9574
leaq -0x180(%rbp), %rdi
callq 0x10c24
leaq -0x108(%rbp), %rdi
callq 0x57b8
leaq -0xe8(%rbp), %rdi
callq 0x1bb0c
leaq -0x1b0(%rbp), %rdi
callq 0x200e8
leaq -0x78(%rbp), %rdi
callq 0x57b8
leaq -0x98(%rbp), %rdi
callq 0x57b8
movq %rbx, %rdi
callq 0x56b0