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

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x4d0, %rsp            # imm = 0x4D0
movq %rdi, -0x8(%rbp)
leaq -0x29(%rbp), %rdi
movq %rdi, -0x398(%rbp)
callq 0x67b0
movq -0x398(%rbp), %rdx
leaq 0x36d67(%rip), %rsi     # 0xcbf14
leaq -0x28(%rbp), %rdi
callq 0x65e0
jmp 0x951b8
leaq -0x29(%rbp), %rdi
callq 0x6470
leaq -0xc0(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
leaq 0x72462(%rip), %rsi     # 0x107638
callq 0x61c0
jmp 0x951dd
leaq -0xa0(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
leaq -0x28(%rbp), %rsi
callq 0x61c0
jmp 0x951f6
leaq -0xc0(%rbp), %rax
movq %rax, -0x80(%rbp)
movq $0x2, -0x78(%rbp)
leaq -0xca(%rbp), %rdi
movq %rdi, -0x3a0(%rbp)
callq 0xdab0
movq -0x3a0(%rbp), %r8
movq -0x80(%rbp), %rsi
movq -0x78(%rbp), %rdx
leaq -0x70(%rbp), %rdi
leaq -0xc9(%rbp), %rcx
callq 0xbfde0
jmp 0x9523d
leaq -0xca(%rbp), %rdi
callq 0xdb50
leaq -0xc0(%rbp), %rax
movq %rax, -0x3b0(%rbp)
addq $0x40, %rax
movq %rax, -0x3a8(%rbp)
movq -0x3a8(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x3b8(%rbp)
callq 0x6908
movq -0x3b0(%rbp), %rcx
movq -0x3b8(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x3a8(%rbp)
jne 0x95262
leaq -0x100(%rbp), %rdi
movq %rdi, -0x3c8(%rbp)
callq 0x4bd30
movq -0x3c8(%rbp), %rdi
leaq 0x72384(%rip), %rsi     # 0x107638
callq 0x4b980
movq %rax, -0x3c0(%rbp)
jmp 0x952c2
movq -0x3c0(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x4b030
movq %rax, -0x3d0(%rbp)
jmp 0x952db
movq -0x3d0(%rbp), %rax
movabsq $-0x4010000000000000, %rcx # imm = 0xBFF0000000000000
movq %rcx, (%rax)
leaq -0x100(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x4b980
movq %rax, -0x3d8(%rbp)
jmp 0x95308
movq -0x3d8(%rbp), %rdi
leaq 0x72322(%rip), %rsi     # 0x107638
callq 0x4b030
movq %rax, -0x3e0(%rbp)
jmp 0x95324
movq -0x3e0(%rbp), %rax
movabsq $-0x4010000000000000, %rcx # imm = 0xBFF0000000000000
movq %rcx, (%rax)
leaq -0x121(%rbp), %rdi
movq %rdi, -0x3e8(%rbp)
callq 0x67b0
movq -0x3e8(%rbp), %rdx
leaq 0x36bbb(%rip), %rsi     # 0xcbf14
leaq -0x120(%rbp), %rdi
callq 0x65e0
jmp 0x95367
leaq -0x121(%rbp), %rdi
callq 0x6470
leaq 0x722be(%rip), %rdx     # 0x107638
leaq -0x1a0(%rbp), %rdi
leaq -0x120(%rbp), %rsi
leaq -0x70(%rbp), %rcx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x239b0
jmp 0x9539c
leaq -0x1b8(%rbp), %rdi
movq %rdi, -0x3f8(%rbp)
callq 0xc7d0
movq -0x3f8(%rbp), %rdx
leaq -0x100(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
movl $0x1, %ecx
callq 0x45140
movsd %xmm0, -0x3f0(%rbp)
jmp 0x953d8
movsd -0x3f0(%rbp), %xmm0
movsd %xmm0, -0x1c0(%rbp)
movq 0x72201(%rip), %rax     # 0x1075f0
movq %rax, -0x400(%rbp)
leaq 0x3676b(%rip), %rsi     # 0xcbb68
leaq -0x1d0(%rbp), %rdi
movl $0xe, %edx
callq 0x70bd0
jmp 0x95410
leaq -0x1e0(%rbp), %rdi
callq 0x70c00
jmp 0x9541e
movq -0x400(%rbp), %rdi
leaq -0x1d0(%rbp), %rsi
movl $0x2c7, %edx            # imm = 0x2C7
leaq -0x1e0(%rbp), %rcx
callq 0x6840
jmp 0x9543f
callq 0x70e90
movq %rax, -0x408(%rbp)
jmp 0x9544d
movq -0x408(%rbp), %rsi
leaq 0x35ecf(%rip), %rdx     # 0xcb32a
leaq -0x208(%rbp), %rdi
callq 0x70e50
jmp 0x95469
leaq 0x366f8(%rip), %rsi     # 0xcbb68
leaq -0x218(%rbp), %rdi
movl $0xe, %edx
callq 0x70bd0
jmp 0x95483
movl $0x3, -0x21c(%rbp)
leaq -0x1b8(%rbp), %rdi
callq 0xcba0
movl %eax, -0x220(%rbp)
leaq 0x36c37(%rip), %rcx     # 0xcc0dd
movq %rsp, %rax
movq %rcx, 0x10(%rax)
leaq -0x220(%rbp), %rcx
movq %rcx, 0x8(%rax)
leaq 0x36ab0(%rip), %rcx     # 0xcbf6f
movq %rcx, (%rax)
leaq -0x208(%rbp), %rdi
leaq -0x218(%rbp), %rsi
movl $0x2c7, %edx            # imm = 0x2C7
movl $0x1, %ecx
movl $0x2, %r8d
leaq -0x21c(%rbp), %r9
callq 0xbf480
jmp 0x954ee
leaq -0x208(%rbp), %rdi
callq 0x70ea0
callq 0x70ec0
movb %al, -0x409(%rbp)
jmp 0x95507
movb -0x409(%rbp), %al
testb $0x1, %al
jne 0x953e8
jmp 0x95517
jmp 0x95519
movq 0x720d0(%rip), %rax     # 0x1075f0
movq %rax, -0x418(%rbp)
leaq 0x3663a(%rip), %rsi     # 0xcbb68
leaq -0x230(%rbp), %rdi
movl $0xe, %edx
callq 0x70bd0
jmp 0x95541
leaq -0x240(%rbp), %rdi
callq 0x70c00
jmp 0x9554f
movq -0x418(%rbp), %rdi
leaq -0x230(%rbp), %rsi
movl $0x2c8, %edx            # imm = 0x2C8
leaq -0x240(%rbp), %rcx
callq 0x6840
jmp 0x95570
callq 0x70e90
movq %rax, -0x420(%rbp)
jmp 0x9557e
movq -0x420(%rbp), %rsi
leaq 0x35d9e(%rip), %rdx     # 0xcb32a
leaq -0x268(%rbp), %rdi
callq 0x70e50
jmp 0x9559a
leaq 0x365c7(%rip), %rsi     # 0xcbb68
leaq -0x278(%rbp), %rdi
movl $0xe, %edx
callq 0x70bd0
jmp 0x955b4
xorl %eax, %eax
movl %eax, %esi
leaq -0x1b8(%rbp), %rdi
callq 0xcbf0
movq %rax, %rcx
leaq 0x36b2f(%rip), %rdx     # 0xcc0fd
movq %rsp, %rax
movq %rdx, 0x10(%rax)
movq %rcx, 0x8(%rax)
leaq 0x36b13(%rip), %rcx     # 0xcc0f3
movq %rcx, (%rax)
leaq 0x7204e(%rip), %r9      # 0x107638
leaq -0x268(%rbp), %rdi
leaq -0x278(%rbp), %rsi
movl $0x2c8, %edx            # imm = 0x2C8
movl $0x1, %ecx
movl $0x2, %r8d
callq 0xbf260
jmp 0x9560f
leaq -0x268(%rbp), %rdi
callq 0x70ea0
callq 0x70ec0
movb %al, -0x421(%rbp)
jmp 0x95628
movb -0x421(%rbp), %al
testb $0x1, %al
jne 0x95519
jmp 0x95638
jmp 0x9563a
movq 0x71faf(%rip), %rax     # 0x1075f0
movq %rax, -0x430(%rbp)
leaq 0x36519(%rip), %rsi     # 0xcbb68
leaq -0x288(%rbp), %rdi
movl $0xe, %edx
callq 0x70bd0
jmp 0x95662
leaq -0x298(%rbp), %rdi
callq 0x70c00
jmp 0x95670
movq -0x430(%rbp), %rdi
leaq -0x288(%rbp), %rsi
movl $0x2c9, %edx            # imm = 0x2C9
leaq -0x298(%rbp), %rcx
callq 0x6840
jmp 0x95691
callq 0x70e90
movq %rax, -0x438(%rbp)
jmp 0x9569f
movq -0x438(%rbp), %rsi
leaq 0x35c7d(%rip), %rdx     # 0xcb32a
leaq -0x2c0(%rbp), %rdi
callq 0x70e50
jmp 0x956bb
leaq 0x364a6(%rip), %rsi     # 0xcbb68
leaq -0x2d0(%rbp), %rdi
movl $0xe, %edx
callq 0x70bd0
jmp 0x956d5
leaq -0x1b8(%rbp), %rdi
movl $0x1, %esi
callq 0xcbf0
movq %rax, %rcx
leaq 0x36a1f(%rip), %rdx     # 0xcc10f
movq %rsp, %rax
movq %rdx, 0x10(%rax)
movq %rcx, 0x8(%rax)
leaq 0x36a08(%rip), %rcx     # 0xcc10a
movq %rcx, (%rax)
leaq -0x2c0(%rbp), %rdi
leaq -0x2d0(%rbp), %rsi
movl $0x2c9, %edx            # imm = 0x2C9
movl $0x1, %ecx
movl $0x2, %r8d
leaq -0x28(%rbp), %r9
callq 0xbf260
jmp 0x9572e
leaq -0x2c0(%rbp), %rdi
callq 0x70ea0
callq 0x70ec0
movb %al, -0x439(%rbp)
jmp 0x95747
movb -0x439(%rbp), %al
testb $0x1, %al
jne 0x9563a
jmp 0x95757
jmp 0x95759
movq 0x71e90(%rip), %rax     # 0x1075f0
movq %rax, -0x448(%rbp)
leaq 0x363fa(%rip), %rsi     # 0xcbb68
leaq -0x2e0(%rbp), %rdi
movl $0xe, %edx
callq 0x70bd0
jmp 0x95781
leaq -0x2f0(%rbp), %rdi
callq 0x70c00
jmp 0x9578f
movq -0x448(%rbp), %rdi
leaq -0x2e0(%rbp), %rsi
movl $0x2ca, %edx            # imm = 0x2CA
leaq -0x2f0(%rbp), %rcx
callq 0x6840
jmp 0x957b0
callq 0x70e90
movq %rax, -0x450(%rbp)
jmp 0x957be
movq -0x450(%rbp), %rsi
leaq 0x35b5e(%rip), %rdx     # 0xcb32a
leaq -0x318(%rbp), %rdi
callq 0x70e50
jmp 0x957da
leaq 0x36387(%rip), %rsi     # 0xcbb68
leaq -0x328(%rbp), %rdi
movl $0xe, %edx
callq 0x70bd0
jmp 0x957f4
leaq -0x1b8(%rbp), %rdi
movl $0x2, %esi
callq 0xcbf0
movq %rax, %rcx
leaq 0x36912(%rip), %rdx     # 0xcc121
movq %rsp, %rax
movq %rdx, 0x10(%rax)
movq %rcx, 0x8(%rax)
leaq 0x368d2(%rip), %rcx     # 0xcc0f3
movq %rcx, (%rax)
leaq 0x71e0d(%rip), %r9      # 0x107638
leaq -0x318(%rbp), %rdi
leaq -0x328(%rbp), %rsi
movl $0x2ca, %edx            # imm = 0x2CA
movl $0x1, %ecx
movl $0x2, %r8d
callq 0xbf260
jmp 0x95850
leaq -0x318(%rbp), %rdi
callq 0x70ea0
callq 0x70ec0
movb %al, -0x451(%rbp)
jmp 0x95869
movb -0x451(%rbp), %al
testb $0x1, %al
jne 0x95759
jmp 0x95879
jmp 0x9587b
movq 0x71d6e(%rip), %rax     # 0x1075f0
movq %rax, -0x460(%rbp)
leaq 0x362d8(%rip), %rsi     # 0xcbb68
leaq -0x338(%rbp), %rdi
movl $0xe, %edx
callq 0x70bd0
jmp 0x958a3
leaq -0x348(%rbp), %rdi
callq 0x70c00
jmp 0x958b1
movq -0x460(%rbp), %rdi
leaq -0x338(%rbp), %rsi
movl $0x2cb, %edx            # imm = 0x2CB
leaq -0x348(%rbp), %rcx
callq 0x6840
jmp 0x958d2
callq 0x70e90
movq %rax, -0x468(%rbp)
jmp 0x958e0
movq -0x468(%rbp), %rsi
leaq 0x35a3c(%rip), %rdx     # 0xcb32a
leaq -0x370(%rbp), %rdi
callq 0x70e50
jmp 0x958fc
leaq 0x36265(%rip), %rsi     # 0xcbb68
leaq -0x380(%rbp), %rdi
movl $0xe, %edx
callq 0x70bd0
jmp 0x95916
movabsq $-0x4000000000000000, %rax # imm = 0xC000000000000000
movq %rax, -0x388(%rbp)
movsd 0x71b81(%rip), %xmm0    # 0x1074b0
callq 0xbf970
movsd %xmm0, -0x470(%rbp)
jmp 0x9593e
movsd -0x470(%rbp), %xmm0
movsd %xmm0, -0x390(%rbp)
leaq 0x36390(%rip), %rcx     # 0xcbce5
movq %rsp, %rax
movq %rcx, 0x20(%rax)
leaq -0x390(%rbp), %rcx
movq %rcx, 0x18(%rax)
leaq 0x36e08(%rip), %rcx     # 0xcc776
movq %rcx, 0x10(%rax)
leaq -0x1c0(%rbp), %rcx
movq %rcx, 0x8(%rax)
leaq 0x35ead(%rip), %rcx     # 0xcb831
movq %rcx, (%rax)
leaq -0x370(%rbp), %rdi
leaq -0x380(%rbp), %rsi
movl $0x2cb, %edx            # imm = 0x2CB
movl $0x1, %ecx
movl $0x8, %r8d
leaq -0x388(%rbp), %r9
callq 0xbf6a0
jmp 0x959b3
leaq -0x370(%rbp), %rdi
callq 0x70ea0
callq 0x70ec0
movb %al, -0x471(%rbp)
jmp 0x959cc
movb -0x471(%rbp), %al
testb $0x1, %al
jne 0x9587b
jmp 0x959dc
leaq -0x1b8(%rbp), %rdi
callq 0xcfc0
leaq -0x1a0(%rbp), %rdi
callq 0x26180
leaq -0x120(%rbp), %rdi
callq 0x6908
leaq -0x100(%rbp), %rdi
callq 0x4bd50
leaq -0x70(%rbp), %rdi
callq 0x5c1b0
leaq -0x28(%rbp), %rdi
callq 0x6908
addq $0x4d0, %rsp            # imm = 0x4D0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x29(%rbp), %rdi
callq 0x6470
jmp 0x95c16
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
movq -0xc8(%rbp), %rax
leaq -0xc0(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x480(%rbp)
je 0x95a98
movq -0x480(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x488(%rbp)
callq 0x6908
movq -0x488(%rbp), %rax
leaq -0xc0(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x480(%rbp)
jne 0x95a67
jmp 0x95c0d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xca(%rbp), %rdi
callq 0xdb50
leaq -0xc0(%rbp), %rax
movq %rax, -0x498(%rbp)
addq $0x40, %rax
movq %rax, -0x490(%rbp)
movq -0x490(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x4a0(%rbp)
callq 0x6908
movq -0x498(%rbp), %rcx
movq -0x4a0(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x490(%rbp)
jne 0x95ace
jmp 0x95c0d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x95bf8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x121(%rbp), %rdi
callq 0x6470
jmp 0x95bf8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x95bec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x95bd4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x208(%rbp), %rdi
callq 0x70ea0
jmp 0x95bd4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x268(%rbp), %rdi
callq 0x70ea0
jmp 0x95bd4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x2c0(%rbp), %rdi
callq 0x70ea0
jmp 0x95bd4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x318(%rbp), %rdi
callq 0x70ea0
jmp 0x95bd4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x370(%rbp), %rdi
callq 0x70ea0
leaq -0x1b8(%rbp), %rdi
callq 0xcfc0
leaq -0x1a0(%rbp), %rdi
callq 0x26180
leaq -0x120(%rbp), %rdi
callq 0x6908
leaq -0x100(%rbp), %rdi
callq 0x4bd50
leaq -0x70(%rbp), %rdi
callq 0x5c1b0
leaq -0x28(%rbp), %rdi
callq 0x6908
movq -0x38(%rbp), %rdi
callq 0x67a0
nop