// File: 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
subq $0x5a0, %rsp            # imm = 0x5A0
movq %rdi, -0x8(%rbp)
leaq -0x29(%rbp), %rdi
movq %rdi, -0x438(%rbp)
callq 0x67b0
movq -0x438(%rbp), %rdx
leaq 0x3aeb7(%rip), %rsi     # 0xcbf14
leaq -0x28(%rbp), %rdi
callq 0x65e0
jmp 0x91068
leaq -0x29(%rbp), %rdi
callq 0x6470
leaq -0x61(%rbp), %rdi
movq %rdi, -0x440(%rbp)
callq 0x67b0
movq -0x440(%rbp), %rdx
leaq 0x3ab51(%rip), %rsi     # 0xcbbe0
leaq -0x60(%rbp), %rdi
callq 0x65e0
jmp 0x9109a
leaq -0x61(%rbp), %rdi
callq 0x6470
leaq -0x108(%rbp), %rdi
movq %rdi, -0x110(%rbp)
leaq 0x76580(%rip), %rsi     # 0x107638
callq 0x61c0
jmp 0x910bf
leaq -0xe8(%rbp), %rdi
movq %rdi, -0x110(%rbp)
leaq -0x28(%rbp), %rsi
callq 0x61c0
jmp 0x910d8
leaq -0xc8(%rbp), %rdi
movq %rdi, -0x110(%rbp)
leaq -0x60(%rbp), %rsi
callq 0x61c0
jmp 0x910f1
leaq -0x108(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq $0x3, -0xa0(%rbp)
leaq -0x112(%rbp), %rdi
movq %rdi, -0x448(%rbp)
callq 0xdab0
movq -0x448(%rbp), %r8
movq -0xa8(%rbp), %rsi
movq -0xa0(%rbp), %rdx
leaq -0x98(%rbp), %rdi
leaq -0x111(%rbp), %rcx
callq 0xbfde0
jmp 0x91147
leaq -0x112(%rbp), %rdi
callq 0xdb50
leaq -0x108(%rbp), %rax
movq %rax, -0x458(%rbp)
addq $0x60, %rax
movq %rax, -0x450(%rbp)
movq -0x450(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x460(%rbp)
callq 0x6908
movq -0x458(%rbp), %rcx
movq -0x460(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x450(%rbp)
jne 0x9116c
leaq -0x148(%rbp), %rdi
movq %rdi, -0x470(%rbp)
callq 0x4bd30
movq -0x470(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x4b980
movq %rax, -0x468(%rbp)
jmp 0x911c9
movq -0x468(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x4b030
movq %rax, -0x478(%rbp)
jmp 0x911e2
movq -0x478(%rbp), %rax
movabsq $-0x4010000000000000, %rcx # imm = 0xBFF0000000000000
movq %rcx, (%rax)
leaq 0x7643b(%rip), %rsi     # 0x107638
leaq -0x148(%rbp), %rdi
callq 0x4b980
movq %rax, -0x480(%rbp)
jmp 0x91212
movq -0x480(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x4b030
movq %rax, -0x488(%rbp)
jmp 0x9122b
movq -0x488(%rbp), %rax
movabsq $-0x4010000000000000, %rcx # imm = 0xBFF0000000000000
movq %rcx, (%rax)
leaq -0x148(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x4b980
movq %rax, -0x490(%rbp)
jmp 0x91258
movq -0x490(%rbp), %rdi
leaq 0x763d2(%rip), %rsi     # 0x107638
callq 0x4b030
movq %rax, -0x498(%rbp)
jmp 0x91274
movq -0x498(%rbp), %rax
movabsq $-0x4010000000000000, %rcx # imm = 0xBFF0000000000000
movq %rcx, (%rax)
leaq -0x169(%rbp), %rdi
movq %rdi, -0x4a0(%rbp)
callq 0x67b0
movq -0x4a0(%rbp), %rdx
leaq 0x3a936(%rip), %rsi     # 0xcbbdf
leaq -0x168(%rbp), %rdi
callq 0x65e0
jmp 0x912b7
leaq -0x169(%rbp), %rdi
callq 0x6470
leaq 0x7636e(%rip), %rdx     # 0x107638
leaq -0x1e8(%rbp), %rdi
leaq -0x168(%rbp), %rsi
leaq -0x98(%rbp), %rcx
movl $0x2, %r8d
xorl %r9d, %r9d
callq 0x239b0
jmp 0x912ef
leaq -0x200(%rbp), %rdi
movq %rdi, -0x4b0(%rbp)
callq 0xc7d0
movq -0x4b0(%rbp), %rdx
leaq -0x148(%rbp), %rdi
leaq -0x1e8(%rbp), %rsi
movl $0x1, %ecx
callq 0x45140
movsd %xmm0, -0x4a8(%rbp)
jmp 0x9132b
movsd -0x4a8(%rbp), %xmm0
movsd %xmm0, -0x208(%rbp)
movq 0x762ae(%rip), %rax     # 0x1075f0
movq %rax, -0x4b8(%rbp)
leaq 0x3a818(%rip), %rsi     # 0xcbb68
leaq -0x218(%rbp), %rdi
movl $0xe, %edx
callq 0x70bd0
jmp 0x91363
leaq -0x228(%rbp), %rdi
callq 0x70c00
jmp 0x91371
movq -0x4b8(%rbp), %rdi
leaq -0x218(%rbp), %rsi
movl $0x279, %edx            # imm = 0x279
leaq -0x228(%rbp), %rcx
callq 0x6840
jmp 0x91392
callq 0x70e90
movq %rax, -0x4c0(%rbp)
jmp 0x913a0
movq -0x4c0(%rbp), %rsi
leaq 0x39f7c(%rip), %rdx     # 0xcb32a
leaq -0x250(%rbp), %rdi
callq 0x70e50
jmp 0x913bc
leaq 0x3a7a5(%rip), %rsi     # 0xcbb68
leaq -0x260(%rbp), %rdi
movl $0xe, %edx
callq 0x70bd0
jmp 0x913d6
movl $0x4, -0x264(%rbp)
leaq -0x200(%rbp), %rdi
callq 0xcba0
movl %eax, -0x268(%rbp)
leaq 0x3ace4(%rip), %rcx     # 0xcc0dd
movq %rsp, %rax
movq %rcx, 0x10(%rax)
leaq -0x268(%rbp), %rcx
movq %rcx, 0x8(%rax)
leaq 0x3b238(%rip), %rcx     # 0xcc64a
movq %rcx, (%rax)
leaq -0x250(%rbp), %rdi
leaq -0x260(%rbp), %rsi
movl $0x279, %edx            # imm = 0x279
movl $0x1, %ecx
movl $0x2, %r8d
leaq -0x264(%rbp), %r9
callq 0xbf480
jmp 0x91441
leaq -0x250(%rbp), %rdi
callq 0x70ea0
callq 0x70ec0
movb %al, -0x4c1(%rbp)
jmp 0x9145a
movb -0x4c1(%rbp), %al
testb $0x1, %al
jne 0x9133b
jmp 0x9146a
jmp 0x9146c
movq 0x7617d(%rip), %rax     # 0x1075f0
movq %rax, -0x4d0(%rbp)
leaq 0x3a6e7(%rip), %rsi     # 0xcbb68
leaq -0x278(%rbp), %rdi
movl $0xe, %edx
callq 0x70bd0
jmp 0x91494
leaq -0x288(%rbp), %rdi
callq 0x70c00
jmp 0x914a2
movq -0x4d0(%rbp), %rdi
leaq -0x278(%rbp), %rsi
movl $0x27a, %edx            # imm = 0x27A
leaq -0x288(%rbp), %rcx
callq 0x6840
jmp 0x914c3
callq 0x70e90
movq %rax, -0x4d8(%rbp)
jmp 0x914d1
movq -0x4d8(%rbp), %rsi
leaq 0x39e4b(%rip), %rdx     # 0xcb32a
leaq -0x2b0(%rbp), %rdi
callq 0x70e50
jmp 0x914ed
leaq 0x3a674(%rip), %rsi     # 0xcbb68
leaq -0x2c0(%rbp), %rdi
movl $0xe, %edx
callq 0x70bd0
jmp 0x91507
xorl %eax, %eax
movl %eax, %esi
leaq -0x200(%rbp), %rdi
callq 0xcbf0
movq %rax, %rcx
leaq 0x3abdc(%rip), %rdx     # 0xcc0fd
movq %rsp, %rax
movq %rdx, 0x10(%rax)
movq %rcx, 0x8(%rax)
leaq 0x3abc0(%rip), %rcx     # 0xcc0f3
movq %rcx, (%rax)
leaq 0x760fb(%rip), %r9      # 0x107638
leaq -0x2b0(%rbp), %rdi
leaq -0x2c0(%rbp), %rsi
movl $0x27a, %edx            # imm = 0x27A
movl $0x1, %ecx
movl $0x2, %r8d
callq 0xbf260
jmp 0x91562
leaq -0x2b0(%rbp), %rdi
callq 0x70ea0
callq 0x70ec0
movb %al, -0x4d9(%rbp)
jmp 0x9157b
movb -0x4d9(%rbp), %al
testb $0x1, %al
jne 0x9146c
jmp 0x9158b
jmp 0x9158d
movq 0x7605c(%rip), %rax     # 0x1075f0
movq %rax, -0x4e8(%rbp)
leaq 0x3a5c6(%rip), %rsi     # 0xcbb68
leaq -0x2d0(%rbp), %rdi
movl $0xe, %edx
callq 0x70bd0
jmp 0x915b5
leaq -0x2e0(%rbp), %rdi
callq 0x70c00
jmp 0x915c3
movq -0x4e8(%rbp), %rdi
leaq -0x2d0(%rbp), %rsi
movl $0x27b, %edx            # imm = 0x27B
leaq -0x2e0(%rbp), %rcx
callq 0x6840
jmp 0x915e4
callq 0x70e90
movq %rax, -0x4f0(%rbp)
jmp 0x915f2
movq -0x4f0(%rbp), %rsi
leaq 0x39d2a(%rip), %rdx     # 0xcb32a
leaq -0x308(%rbp), %rdi
callq 0x70e50
jmp 0x9160e
leaq 0x3a553(%rip), %rsi     # 0xcbb68
leaq -0x318(%rbp), %rdi
movl $0xe, %edx
callq 0x70bd0
jmp 0x91628
leaq -0x200(%rbp), %rdi
movl $0x1, %esi
callq 0xcbf0
movq %rax, %rcx
leaq 0x3aacc(%rip), %rdx     # 0xcc10f
movq %rsp, %rax
movq %rdx, 0x10(%rax)
movq %rcx, 0x8(%rax)
leaq 0x3aab5(%rip), %rcx     # 0xcc10a
movq %rcx, (%rax)
leaq -0x308(%rbp), %rdi
leaq -0x318(%rbp), %rsi
movl $0x27b, %edx            # imm = 0x27B
movl $0x1, %ecx
movl $0x2, %r8d
leaq -0x28(%rbp), %r9
callq 0xbf260
jmp 0x91681
leaq -0x308(%rbp), %rdi
callq 0x70ea0
callq 0x70ec0
movb %al, -0x4f1(%rbp)
jmp 0x9169a
movb -0x4f1(%rbp), %al
testb $0x1, %al
jne 0x9158d
jmp 0x916aa
jmp 0x916ac
movq 0x75f3d(%rip), %rax     # 0x1075f0
movq %rax, -0x500(%rbp)
leaq 0x3a4a7(%rip), %rsi     # 0xcbb68
leaq -0x328(%rbp), %rdi
movl $0xe, %edx
callq 0x70bd0
jmp 0x916d4
leaq -0x338(%rbp), %rdi
callq 0x70c00
jmp 0x916e2
movq -0x500(%rbp), %rdi
leaq -0x328(%rbp), %rsi
movl $0x27c, %edx            # imm = 0x27C
leaq -0x338(%rbp), %rcx
callq 0x6840
jmp 0x91703
callq 0x70e90
movq %rax, -0x508(%rbp)
jmp 0x91711
movq -0x508(%rbp), %rsi
leaq 0x39c0b(%rip), %rdx     # 0xcb32a
leaq -0x360(%rbp), %rdi
callq 0x70e50
jmp 0x9172d
leaq 0x3a434(%rip), %rsi     # 0xcbb68
leaq -0x370(%rbp), %rdi
movl $0xe, %edx
callq 0x70bd0
jmp 0x91747
leaq -0x200(%rbp), %rdi
movl $0x2, %esi
callq 0xcbf0
movq %rax, %rcx
leaq 0x3a9bf(%rip), %rdx     # 0xcc121
movq %rsp, %rax
movq %rdx, 0x10(%rax)
movq %rcx, 0x8(%rax)
leaq 0x3a9a8(%rip), %rcx     # 0xcc11c
movq %rcx, (%rax)
leaq -0x360(%rbp), %rdi
leaq -0x370(%rbp), %rsi
movl $0x27c, %edx            # imm = 0x27C
movl $0x1, %ecx
movl $0x2, %r8d
leaq -0x60(%rbp), %r9
callq 0xbf260
jmp 0x917a0
leaq -0x360(%rbp), %rdi
callq 0x70ea0
callq 0x70ec0
movb %al, -0x509(%rbp)
jmp 0x917b9
movb -0x509(%rbp), %al
testb $0x1, %al
jne 0x916ac
jmp 0x917c9
jmp 0x917cb
movq 0x75e1e(%rip), %rax     # 0x1075f0
movq %rax, -0x518(%rbp)
leaq 0x3a388(%rip), %rsi     # 0xcbb68
leaq -0x380(%rbp), %rdi
movl $0xe, %edx
callq 0x70bd0
jmp 0x917f3
leaq -0x390(%rbp), %rdi
callq 0x70c00
jmp 0x91801
movq -0x518(%rbp), %rdi
leaq -0x380(%rbp), %rsi
movl $0x27d, %edx            # imm = 0x27D
leaq -0x390(%rbp), %rcx
callq 0x6840
jmp 0x91822
callq 0x70e90
movq %rax, -0x520(%rbp)
jmp 0x91830
movq -0x520(%rbp), %rsi
leaq 0x39aec(%rip), %rdx     # 0xcb32a
leaq -0x3b8(%rbp), %rdi
callq 0x70e50
jmp 0x9184c
leaq 0x3a315(%rip), %rsi     # 0xcbb68
leaq -0x3c8(%rbp), %rdi
movl $0xe, %edx
callq 0x70bd0
jmp 0x91866
leaq -0x200(%rbp), %rdi
movl $0x3, %esi
callq 0xcbf0
movq %rax, %rcx
leaq 0x3a8ad(%rip), %rdx     # 0xcc12e
movq %rsp, %rax
movq %rdx, 0x10(%rax)
movq %rcx, 0x8(%rax)
leaq 0x3a860(%rip), %rcx     # 0xcc0f3
movq %rcx, (%rax)
leaq 0x75d9b(%rip), %r9      # 0x107638
leaq -0x3b8(%rbp), %rdi
leaq -0x3c8(%rbp), %rsi
movl $0x27d, %edx            # imm = 0x27D
movl $0x1, %ecx
movl $0x2, %r8d
callq 0xbf260
jmp 0x918c2
leaq -0x3b8(%rbp), %rdi
callq 0x70ea0
callq 0x70ec0
movb %al, -0x521(%rbp)
jmp 0x918db
movb -0x521(%rbp), %al
testb $0x1, %al
jne 0x917cb
jmp 0x918eb
jmp 0x918ed
movq 0x75cfc(%rip), %rax     # 0x1075f0
movq %rax, -0x530(%rbp)
leaq 0x3a266(%rip), %rsi     # 0xcbb68
leaq -0x3d8(%rbp), %rdi
movl $0xe, %edx
callq 0x70bd0
jmp 0x91915
leaq -0x3e8(%rbp), %rdi
callq 0x70c00
jmp 0x91923
movq -0x530(%rbp), %rdi
leaq -0x3d8(%rbp), %rsi
movl $0x27e, %edx            # imm = 0x27E
leaq -0x3e8(%rbp), %rcx
callq 0x6840
jmp 0x91944
callq 0x70e90
movq %rax, -0x538(%rbp)
jmp 0x91952
movq -0x538(%rbp), %rsi
leaq 0x399ca(%rip), %rdx     # 0xcb32a
leaq -0x410(%rbp), %rdi
callq 0x70e50
jmp 0x9196e
leaq 0x3a1f3(%rip), %rsi     # 0xcbb68
leaq -0x420(%rbp), %rdi
movl $0xe, %edx
callq 0x70bd0
jmp 0x91988
movabsq $-0x3ff8000000000000, %rax # imm = 0xC008000000000000
movq %rax, -0x428(%rbp)
movsd 0x75b0f(%rip), %xmm0    # 0x1074b0
callq 0xbf970
movsd %xmm0, -0x540(%rbp)
jmp 0x919b0
movsd -0x540(%rbp), %xmm0
movsd %xmm0, -0x430(%rbp)
leaq 0x3a31e(%rip), %rcx     # 0xcbce5
movq %rsp, %rax
movq %rcx, 0x20(%rax)
leaq -0x430(%rbp), %rcx
movq %rcx, 0x18(%rax)
leaq 0x3ad96(%rip), %rcx     # 0xcc776
movq %rcx, 0x10(%rax)
leaq -0x208(%rbp), %rcx
movq %rcx, 0x8(%rax)
leaq 0x39e57(%rip), %rcx     # 0xcb84d
movq %rcx, (%rax)
leaq -0x410(%rbp), %rdi
leaq -0x420(%rbp), %rsi
movl $0x27e, %edx            # imm = 0x27E
movl $0x1, %ecx
movl $0x8, %r8d
leaq -0x428(%rbp), %r9
callq 0xbf6a0
jmp 0x91a25
leaq -0x410(%rbp), %rdi
callq 0x70ea0
callq 0x70ec0
movb %al, -0x541(%rbp)
jmp 0x91a3e
movb -0x541(%rbp), %al
testb $0x1, %al
jne 0x918ed
jmp 0x91a4e
leaq -0x200(%rbp), %rdi
callq 0xcfc0
leaq -0x1e8(%rbp), %rdi
callq 0x26180
leaq -0x168(%rbp), %rdi
callq 0x6908
leaq -0x148(%rbp), %rdi
callq 0x4bd50
leaq -0x98(%rbp), %rdi
callq 0x5c1b0
leaq -0x60(%rbp), %rdi
callq 0x6908
leaq -0x28(%rbp), %rdi
callq 0x6908
addq $0x5a0, %rsp            # imm = 0x5A0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x29(%rbp), %rdi
callq 0x6470
jmp 0x91cd7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x61(%rbp), %rdi
callq 0x6470
jmp 0x91cce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
movq -0x110(%rbp), %rax
leaq -0x108(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x550(%rbp)
je 0x91b30
movq -0x550(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x558(%rbp)
callq 0x6908
movq -0x558(%rbp), %rax
leaq -0x108(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x550(%rbp)
jne 0x91aff
jmp 0x91cc5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x112(%rbp), %rdi
callq 0xdb50
leaq -0x108(%rbp), %rax
movq %rax, -0x568(%rbp)
addq $0x60, %rax
movq %rax, -0x560(%rbp)
movq -0x560(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x570(%rbp)
callq 0x6908
movq -0x568(%rbp), %rcx
movq -0x570(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x560(%rbp)
jne 0x91b66
jmp 0x91cc5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x91cad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x169(%rbp), %rdi
callq 0x6470
jmp 0x91cad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x91ca1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x91c89
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x250(%rbp), %rdi
callq 0x70ea0
jmp 0x91c89
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x2b0(%rbp), %rdi
callq 0x70ea0
jmp 0x91c89
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x308(%rbp), %rdi
callq 0x70ea0
jmp 0x91c89
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x360(%rbp), %rdi
callq 0x70ea0
jmp 0x91c89
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x3b8(%rbp), %rdi
callq 0x70ea0
jmp 0x91c89
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x410(%rbp), %rdi
callq 0x70ea0
leaq -0x200(%rbp), %rdi
callq 0xcfc0
leaq -0x1e8(%rbp), %rdi
callq 0x26180
leaq -0x168(%rbp), %rdi
callq 0x6908
leaq -0x148(%rbp), %rdi
callq 0x4bd50
leaq -0x98(%rbp), %rdi
callq 0x5c1b0
leaq -0x60(%rbp), %rdi
callq 0x6908
leaq -0x28(%rbp), %rdi
callq 0x6908
movq -0x38(%rbp), %rdi
callq 0x67a0