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

    transitions_t transitions;
    transitions[start_end][str1] = -1.0;
    transitions[start_end][str3] = -1.0;
    transitions[str2][start_end] = -1.0;
    transitions[str4][start_end] = -1.0;
    transitions[str1][str2] = -2.0;
    transitions[str3][str4] = -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(str3, best_path[1]);
    BOOST_CHECK_EQUAL(str4, 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 $0x318, %rsp            # imm = 0x318
leaq 0x1ae75(%rip), %rsi     # 0x53f2c
leaq -0x128(%rbp), %rdi
leaq -0x1e8(%rbp), %rdx
callq 0x5160
leaq 0x1ab27(%rip), %rsi     # 0x53bf8
leaq -0x108(%rbp), %rdi
leaq -0x1e8(%rbp), %rdx
callq 0x5160
leaq 0x1ab1d(%rip), %rsi     # 0x53c08
leaq -0xc8(%rbp), %rdi
leaq -0x1e8(%rbp), %rdx
callq 0x5160
leaq 0x1aaf4(%rip), %rsi     # 0x53bf9
leaq -0xa8(%rbp), %rdi
leaq -0x1e8(%rbp), %rdx
callq 0x5160
leaq 0x37469(%rip), %rsi     # 0x70588
leaq -0x1e8(%rbp), %r14
movq %r14, %rdi
callq 0x54f0
leaq -0x1c8(%rbp), %r15
leaq -0x128(%rbp), %rsi
movq %r15, %rdi
callq 0x54f0
leaq -0x1a8(%rbp), %r15
leaq -0x108(%rbp), %rsi
movq %r15, %rdi
callq 0x54f0
leaq -0x188(%rbp), %r15
leaq -0xc8(%rbp), %rsi
movq %r15, %rdi
callq 0x54f0
leaq -0x168(%rbp), %r15
leaq -0xa8(%rbp), %rsi
movq %r15, %rdi
callq 0x54f0
leaq -0x218(%rbp), %rdi
leaq -0x1e8(%rbp), %rsi
pushq $0x5
popq %rdx
leaq -0x88(%rbp), %rcx
leaq -0x148(%rbp), %r8
callq 0x4ed0a
movl $0x80, %ebx
leaq (%rbx,%rbp), %rdi
addq $-0x1e8, %rdi           # imm = 0xFE18
callq 0x57b8
addq $-0x20, %rbx
cmpq $-0x20, %rbx
jne 0x391af
leaq -0x80(%rbp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x3739f(%rip), %rsi     # 0x70588
leaq -0x88(%rbp), %rdi
callq 0x1b5f0
leaq -0x128(%rbp), %rsi
movq %rax, %rdi
callq 0x1b338
movabsq $-0x4010000000000000, %rbx # imm = 0xBFF0000000000000
movq %rbx, (%rax)
leaq 0x37370(%rip), %rsi     # 0x70588
leaq -0x88(%rbp), %rdi
callq 0x1b5f0
leaq -0xc8(%rbp), %rsi
movq %rax, %rdi
callq 0x1b338
movq %rbx, (%rax)
leaq -0x88(%rbp), %rdi
leaq -0x108(%rbp), %rsi
callq 0x1b5f0
leaq 0x37338(%rip), %rsi     # 0x70588
movq %rax, %rdi
callq 0x1b338
movq %rbx, (%rax)
leaq -0x88(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x1b5f0
leaq 0x37313(%rip), %rsi     # 0x70588
movq %rax, %rdi
callq 0x1b338
movq %rbx, (%rax)
leaq -0x88(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0x1b5f0
leaq -0x108(%rbp), %rsi
movq %rax, %rdi
callq 0x1b338
movabsq $-0x4000000000000000, %rcx # imm = 0xC000000000000000
movq %rcx, (%rax)
leaq -0x88(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x1b5f0
leaq -0xa8(%rbp), %rsi
movq %rax, %rdi
callq 0x1b338
movq %rbx, (%rax)
leaq 0x1a91c(%rip), %rsi     # 0x53bf7
leaq -0x148(%rbp), %rdi
leaq -0x1e8(%rbp), %rdx
callq 0x5160
leaq 0x37293(%rip), %rdx     # 0x70588
leaq -0x1e8(%rbp), %rdi
leaq -0x148(%rbp), %rsi
leaq -0x218(%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 -0x88(%rbp), %rdi
leaq -0x1e8(%rbp), %rsi
pushq $0x1
popq %rcx
callq 0x18633
movsd %xmm0, -0x58(%rbp)
movq 0x371f9(%rip), %rdi     # 0x70540
leaq 0x1a832(%rip), %rbx     # 0x53b80
leaq -0x338(%rbp), %rsi
movq %rbx, (%rsi)
leaq 0x1a82f(%rip), %r14     # 0x53b8e
movq %r14, 0x8(%rsi)
leaq 0x1a6ab(%rip), %r12     # 0x53a15
leaq -0x328(%rbp), %rcx
movq %r12, (%rcx)
movq %r12, 0x8(%rcx)
movl $0x292, %edx            # imm = 0x292
callq 0x5710
leaq -0xe8(%rbp), %rdi
movb $0x0, 0x8(%rdi)
leaq 0x3674c(%rip), %rax     # 0x6fae0
movq %rax, (%rdi)
movq 0x36c12(%rip), %r15     # 0x6ffb0
movq %r15, 0x10(%rdi)
leaq 0x19fae(%rip), %r13     # 0x53357
movq %r13, 0x18(%rdi)
leaq -0x318(%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 0x1ad11(%rip), %rax     # 0x540f5
leaq 0x1b277(%rip), %r10     # 0x54662
pushq $0x1
popq %rcx
pushq $0x2
popq %r8
movl $0x292, %edx            # imm = 0x292
pushq %rax
pushq %r11
pushq %r10
callq 0x4ea09
addq $0x20, %rsp
movq 0x37134(%rip), %rdi     # 0x70540
leaq -0x308(%rbp), %rsi
movq %rbx, (%rsi)
movq %r14, 0x8(%rsi)
leaq -0x2f8(%rbp), %rcx
movq %r12, (%rcx)
movq %r12, 0x8(%rcx)
movl $0x293, %edx            # imm = 0x293
callq 0x5710
leaq -0xe8(%rbp), %rdi
movb $0x0, 0x8(%rdi)
leaq 0x3669c(%rip), %rax     # 0x6fae0
movq %rax, (%rdi)
movq %r15, 0x10(%rdi)
movq %r13, 0x18(%rdi)
leaq -0x2e8(%rbp), %rsi
movq %rbx, (%rsi)
movq %r14, 0x8(%rsi)
subq $0x8, %rsp
leaq 0x1acad(%rip), %rax     # 0x54115
leaq 0x1ac9c(%rip), %r10     # 0x5410b
leaq 0x37112(%rip), %r9      # 0x70588
pushq $0x1
popq %rcx
pushq $0x2
popq %r8
movl $0x293, %edx            # imm = 0x293
pushq %rax
pushq -0x40(%rbp)
pushq %r10
callq 0x4e913
addq $0x20, %rsp
movq 0x370a8(%rip), %rdi     # 0x70540
leaq -0x2d8(%rbp), %rsi
movq %rbx, (%rsi)
movq %r14, 0x8(%rsi)
leaq -0x2c8(%rbp), %rcx
movq %r12, (%rcx)
movq %r12, 0x8(%rcx)
movl $0x294, %edx            # imm = 0x294
callq 0x5710
leaq -0xe8(%rbp), %rdi
movb $0x0, 0x8(%rdi)
leaq 0x36610(%rip), %rax     # 0x6fae0
movq %rax, (%rdi)
movq %r15, 0x10(%rdi)
movq %r13, 0x18(%rdi)
leaq -0x2b8(%rbp), %rsi
movq %rbx, (%rsi)
movq %r14, 0x8(%rsi)
movq -0x40(%rbp), %rax
addq $0x20, %rax
subq $0x8, %rsp
leaq 0x1ac2b(%rip), %r10     # 0x54127
leaq 0x1ac67(%rip), %r11     # 0x5416a
pushq $0x1
popq %rcx
pushq $0x2
popq %r8
leaq -0xc8(%rbp), %r9
movl $0x294, %edx            # imm = 0x294
pushq %r10
pushq %rax
pushq %r11
callq 0x4e913
addq $0x20, %rsp
movq 0x37015(%rip), %rdi     # 0x70540
leaq -0x2a8(%rbp), %rsi
movq %rbx, (%rsi)
movq %r14, 0x8(%rsi)
leaq -0x298(%rbp), %rcx
movq %r12, (%rcx)
movq %r12, 0x8(%rcx)
movl $0x295, %edx            # imm = 0x295
callq 0x5710
leaq -0xe8(%rbp), %rdi
movb $0x0, 0x8(%rdi)
leaq 0x3657d(%rip), %rax     # 0x6fae0
movq %rax, (%rdi)
movq %r15, 0x10(%rdi)
movq %r13, 0x18(%rdi)
leaq -0x288(%rbp), %rsi
movq %rbx, (%rsi)
movq %r14, 0x8(%rsi)
movq -0x40(%rbp), %rax
addq $0x40, %rax
subq $0x8, %rsp
leaq 0x1abaa(%rip), %r10     # 0x54139
leaq 0x1abd9(%rip), %r11     # 0x5416f
pushq $0x1
popq %rcx
pushq $0x2
popq %r8
leaq -0xa8(%rbp), %r9
movl $0x295, %edx            # imm = 0x295
pushq %r10
pushq %rax
pushq %r11
callq 0x4e913
addq $0x20, %rsp
movq 0x36f82(%rip), %rdi     # 0x70540
leaq -0x278(%rbp), %rsi
movq %rbx, (%rsi)
movq %r14, 0x8(%rsi)
leaq -0x268(%rbp), %rcx
movq %r12, (%rcx)
movq %r12, 0x8(%rcx)
movl $0x296, %edx            # imm = 0x296
callq 0x5710
leaq -0xe8(%rbp), %rdi
movb $0x0, 0x8(%rdi)
leaq 0x364ea(%rip), %rax     # 0x6fae0
movq %rax, (%rdi)
movq %r15, 0x10(%rdi)
movq %r13, 0x18(%rdi)
leaq -0x258(%rbp), %rsi
movq %rbx, (%rsi)
movq %r14, 0x8(%rsi)
movq -0x40(%rbp), %rax
addq $0x60, %rax
subq $0x8, %rsp
leaq 0x1ab24(%rip), %r10     # 0x54146
leaq 0x36f5f(%rip), %r9      # 0x70588
pushq $0x1
popq %rcx
pushq $0x2
popq %r8
movl $0x296, %edx            # imm = 0x296
pushq %r10
pushq %rax
leaq 0x1aacc(%rip), %rax     # 0x5410b
pushq %rax
callq 0x4e913
addq $0x20, %rsp
movq 0x36ef0(%rip), %rdi     # 0x70540
leaq -0x248(%rbp), %rsi
movq %rbx, (%rsi)
movq %r14, 0x8(%rsi)
leaq -0x238(%rbp), %rcx
movq %r12, (%rcx)
movq %r12, 0x8(%rcx)
movl $0x297, %edx            # imm = 0x297
callq 0x5710
leaq -0xe8(%rbp), %rdi
movb $0x0, 0x8(%rdi)
leaq 0x36458(%rip), %rax     # 0x6fae0
movq %rax, (%rdi)
movq %r15, 0x10(%rdi)
movq %r13, 0x18(%rdi)
leaq -0x228(%rbp), %rsi
movq %rbx, (%rsi)
movq %r14, 0x8(%rsi)
movabsq $-0x3ff8000000000000, %rax # imm = 0xC008000000000000
leaq -0x50(%rbp), %r9
movq %rax, (%r9)
movsd 0x36d46(%rip), %xmm0    # 0x70400
movsd %xmm0, -0x48(%rbp)
subq $0x8, %rsp
leaq 0x1a633(%rip), %rax     # 0x53cfd
leaq 0x1b0bd(%rip), %r10     # 0x5478e
leaq -0x58(%rbp), %r11
leaq 0x1a1a1(%rip), %rbx     # 0x5387d
pushq $0x1
popq %rcx
pushq $0x8
popq %r8
movl $0x297, %edx            # imm = 0x297
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 -0x1e8(%rbp), %rdi
callq 0x10c24
leaq -0x148(%rbp), %rdi
callq 0x57b8
leaq -0x88(%rbp), %rdi
callq 0x1bb0c
leaq -0x218(%rbp), %rdi
callq 0x200e8
leaq -0xa8(%rbp), %rdi
callq 0x57b8
leaq -0xc8(%rbp), %rdi
callq 0x57b8
leaq -0x108(%rbp), %rdi
callq 0x57b8
leaq -0x128(%rbp), %rdi
callq 0x57b8
addq $0x318, %rsp            # imm = 0x318
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x397d9
jmp 0x397d9
jmp 0x397d9
jmp 0x397d9
jmp 0x397d9
jmp 0x397d9
movq %rax, %rbx
jmp 0x397f1
jmp 0x397ff
movq %rax, %rbx
movl $0x80, %r14d
leaq (%r14,%rbp), %rdi
addq $-0x1e8, %rdi           # imm = 0xFE18
callq 0x57b8
addq $-0x20, %r14
cmpq $-0x20, %r14
jne 0x39793
jmp 0x3981a
movq %rax, %rbx
jmp 0x3981a
movq %rax, %rbx
jmp 0x39826
movq %rax, %rbx
jmp 0x39832
movq %rax, %rbx
jmp 0x3983e
movq %rax, %rbx
addq $-0x20, %r15
movq %r15, %rdi
callq 0x57b8
cmpq %r14, %r15
jne 0x397c6
jmp 0x3981a
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x9574
leaq -0x1e8(%rbp), %rdi
callq 0x10c24
leaq -0x148(%rbp), %rdi
callq 0x57b8
jmp 0x39802
movq %rax, %rbx
leaq -0x88(%rbp), %rdi
callq 0x1bb0c
leaq -0x218(%rbp), %rdi
callq 0x200e8
leaq -0xa8(%rbp), %rdi
callq 0x57b8
leaq -0xc8(%rbp), %rdi
callq 0x57b8
leaq -0x108(%rbp), %rdi
callq 0x57b8
leaq -0x128(%rbp), %rdi
callq 0x57b8
movq %rbx, %rdi
callq 0x56b0