// File: aalto-speech[P]ftk/test/emtest.cc
// Function: TransitionForwardBackwardTest5::test_method()
BOOST_AUTO_TEST_CASE(TransitionForwardBackwardTest5)
{
    transitions_t transitions;
    string str1("a");
    set<string> vocab = {start_end,str1};
    transitions[start_end][str1] = -1.0;
    transitions[str1][start_end] = -1.0;
    string sentence("a");
    FactorGraph fg(sentence, start_end, vocab, 1);
    transitions_t stats;
    flt_type lp = forward_backward(transitions, fg, stats);
    BOOST_CHECK_EQUAL(2, (int)stats.size());
    BOOST_CHECK_EQUAL( 1.0, stats[start_end][str1] );
    BOOST_CHECK_EQUAL( 1.0, stats[str1][start_end] );
    BOOST_CHECK_CLOSE( -2.0, lp, DBL_ACCURACY );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x4a0, %rsp            # imm = 0x4A0
movq %rdi, -0x8(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x4bd30
leaq -0x59(%rbp), %rdi
movq %rdi, -0x368(%rbp)
callq 0x67b0
movq -0x368(%rbp), %rdx
leaq 0x2c5fe(%rip), %rsi     # 0xcbf14
leaq -0x58(%rbp), %rdi
callq 0x65e0
jmp 0x9f921
leaq -0x59(%rbp), %rdi
callq 0x6470
leaq -0xf0(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
leaq 0x67cf9(%rip), %rsi     # 0x107638
callq 0x61c0
jmp 0x9f946
leaq -0xd0(%rbp), %rdi
movq %rdi, -0xf8(%rbp)
leaq -0x58(%rbp), %rsi
callq 0x61c0
jmp 0x9f95f
leaq -0xf0(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq $0x2, -0xa8(%rbp)
leaq -0xfa(%rbp), %rdi
movq %rdi, -0x370(%rbp)
callq 0xdab0
movq -0x370(%rbp), %r8
movq -0xb0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
leaq -0xa0(%rbp), %rdi
leaq -0xf9(%rbp), %rcx
callq 0xbfde0
jmp 0x9f9b5
leaq -0xfa(%rbp), %rdi
callq 0xdb50
leaq -0xf0(%rbp), %rax
movq %rax, -0x380(%rbp)
addq $0x40, %rax
movq %rax, -0x378(%rbp)
movq -0x378(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x388(%rbp)
callq 0x6908
movq -0x380(%rbp), %rcx
movq -0x388(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x378(%rbp)
jne 0x9f9da
leaq 0x67c26(%rip), %rsi     # 0x107638
leaq -0x38(%rbp), %rdi
callq 0x4b980
movq %rax, -0x390(%rbp)
jmp 0x9fa24
movq -0x390(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x4b030
movq %rax, -0x398(%rbp)
jmp 0x9fa3d
movq -0x398(%rbp), %rax
movabsq $-0x4010000000000000, %rcx # imm = 0xBFF0000000000000
movq %rcx, (%rax)
leaq -0x38(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x4b980
movq %rax, -0x3a0(%rbp)
jmp 0x9fa67
movq -0x3a0(%rbp), %rdi
leaq 0x67bc3(%rip), %rsi     # 0x107638
callq 0x4b030
movq %rax, -0x3a8(%rbp)
jmp 0x9fa83
movq -0x3a8(%rbp), %rax
movabsq $-0x4010000000000000, %rcx # imm = 0xBFF0000000000000
movq %rcx, (%rax)
leaq -0x121(%rbp), %rdi
movq %rdi, -0x3b0(%rbp)
callq 0x67b0
movq -0x3b0(%rbp), %rdx
leaq 0x2c45c(%rip), %rsi     # 0xcbf14
leaq -0x120(%rbp), %rdi
callq 0x65e0
jmp 0x9fac6
leaq -0x121(%rbp), %rdi
callq 0x6470
leaq 0x67b5f(%rip), %rdx     # 0x107638
leaq -0x1a0(%rbp), %rdi
leaq -0x120(%rbp), %rsi
leaq -0xa0(%rbp), %rcx
movl $0x1, %r8d
xorl %r9d, %r9d
callq 0x239b0
jmp 0x9fafe
leaq -0x1d0(%rbp), %rdi
movq %rdi, -0x3c0(%rbp)
callq 0x4bd30
movq -0x3c0(%rbp), %rdx
leaq -0x38(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
callq 0x45f80
movsd %xmm0, -0x3b8(%rbp)
jmp 0x9fb32
movsd -0x3b8(%rbp), %xmm0
movsd %xmm0, -0x1d8(%rbp)
movq 0x67aa7(%rip), %rax     # 0x1075f0
movq %rax, -0x3c8(%rbp)
leaq 0x2c011(%rip), %rsi     # 0xcbb68
leaq -0x1e8(%rbp), %rdi
movl $0xe, %edx
callq 0x70bd0
jmp 0x9fb6a
leaq -0x1f8(%rbp), %rdi
callq 0x70c00
jmp 0x9fb78
movq -0x3c8(%rbp), %rdi
leaq -0x1e8(%rbp), %rsi
movl $0x39d, %edx            # imm = 0x39D
leaq -0x1f8(%rbp), %rcx
callq 0x6840
jmp 0x9fb99
callq 0x70e90
movq %rax, -0x3d0(%rbp)
jmp 0x9fba7
movq -0x3d0(%rbp), %rsi
leaq 0x2b775(%rip), %rdx     # 0xcb32a
leaq -0x220(%rbp), %rdi
callq 0x70e50
jmp 0x9fbc3
leaq 0x2bf9e(%rip), %rsi     # 0xcbb68
leaq -0x230(%rbp), %rdi
movl $0xe, %edx
callq 0x70bd0
jmp 0x9fbdd
movl $0x2, -0x234(%rbp)
leaq -0x1d0(%rbp), %rdi
callq 0x34310
movl %eax, -0x238(%rbp)
leaq 0x2c06e(%rip), %rcx     # 0xcbc6e
movq %rsp, %rax
movq %rcx, 0x10(%rax)
leaq -0x238(%rbp), %rcx
movq %rcx, 0x8(%rax)
leaq 0x2ca7d(%rip), %rcx     # 0xcc696
movq %rcx, (%rax)
leaq -0x220(%rbp), %rdi
leaq -0x230(%rbp), %rsi
movl $0x39d, %edx            # imm = 0x39D
movl $0x1, %ecx
movl $0x2, %r8d
leaq -0x234(%rbp), %r9
callq 0xbf480
jmp 0x9fc48
leaq -0x220(%rbp), %rdi
callq 0x70ea0
callq 0x70ec0
movb %al, -0x3d1(%rbp)
jmp 0x9fc61
movb -0x3d1(%rbp), %al
testb $0x1, %al
jne 0x9fb42
jmp 0x9fc71
jmp 0x9fc73
movq 0x67976(%rip), %rax     # 0x1075f0
movq %rax, -0x3e0(%rbp)
leaq 0x2bee0(%rip), %rsi     # 0xcbb68
leaq -0x248(%rbp), %rdi
movl $0xe, %edx
callq 0x70bd0
jmp 0x9fc9b
leaq -0x258(%rbp), %rdi
callq 0x70c00
jmp 0x9fca9
movq -0x3e0(%rbp), %rdi
leaq -0x248(%rbp), %rsi
movl $0x39e, %edx            # imm = 0x39E
leaq -0x258(%rbp), %rcx
callq 0x6840
jmp 0x9fcca
callq 0x70e90
movq %rax, -0x3e8(%rbp)
jmp 0x9fcd8
movq -0x3e8(%rbp), %rsi
leaq 0x2b644(%rip), %rdx     # 0xcb32a
leaq -0x280(%rbp), %rdi
callq 0x70e50
jmp 0x9fcf4
leaq 0x2be6d(%rip), %rsi     # 0xcbb68
leaq -0x290(%rbp), %rdi
movl $0xe, %edx
callq 0x70bd0
jmp 0x9fd0e
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, -0x298(%rbp)
leaq 0x67912(%rip), %rsi     # 0x107638
leaq -0x1d0(%rbp), %rdi
callq 0x4b980
movq %rax, -0x3f0(%rbp)
jmp 0x9fd3b
movq -0x3f0(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x4b030
movq %rax, -0x3f8(%rbp)
jmp 0x9fd54
movq -0x3f8(%rbp), %rcx
leaq 0x2c4e4(%rip), %rdx     # 0xcc246
movq %rsp, %rax
movq %rdx, 0x10(%rax)
movq %rcx, 0x8(%rax)
leaq 0x2bf3c(%rip), %rcx     # 0xcbcb0
movq %rcx, (%rax)
leaq -0x280(%rbp), %rdi
leaq -0x290(%rbp), %rsi
movl $0x39e, %edx            # imm = 0x39E
movl $0x1, %ecx
movl $0x2, %r8d
leaq -0x298(%rbp), %r9
callq 0x70c30
jmp 0x9fda3
leaq -0x280(%rbp), %rdi
callq 0x70ea0
callq 0x70ec0
movb %al, -0x3f9(%rbp)
jmp 0x9fdbc
movb -0x3f9(%rbp), %al
testb $0x1, %al
jne 0x9fc73
jmp 0x9fdcc
jmp 0x9fdce
movq 0x6781b(%rip), %rax     # 0x1075f0
movq %rax, -0x408(%rbp)
leaq 0x2bd85(%rip), %rsi     # 0xcbb68
leaq -0x2a8(%rbp), %rdi
movl $0xe, %edx
callq 0x70bd0
jmp 0x9fdf6
leaq -0x2b8(%rbp), %rdi
callq 0x70c00
jmp 0x9fe04
movq -0x408(%rbp), %rdi
leaq -0x2a8(%rbp), %rsi
movl $0x39f, %edx            # imm = 0x39F
leaq -0x2b8(%rbp), %rcx
callq 0x6840
jmp 0x9fe25
callq 0x70e90
movq %rax, -0x410(%rbp)
jmp 0x9fe33
movq -0x410(%rbp), %rsi
leaq 0x2b4e9(%rip), %rdx     # 0xcb32a
leaq -0x2e0(%rbp), %rdi
callq 0x70e50
jmp 0x9fe4f
leaq 0x2bd12(%rip), %rsi     # 0xcbb68
leaq -0x2f0(%rbp), %rdi
movl $0xe, %edx
callq 0x70bd0
jmp 0x9fe69
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, -0x2f8(%rbp)
leaq -0x1d0(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x4b980
movq %rax, -0x418(%rbp)
jmp 0x9fe93
movq -0x418(%rbp), %rdi
leaq 0x67797(%rip), %rsi     # 0x107638
callq 0x4b030
movq %rax, -0x420(%rbp)
jmp 0x9feaf
movq -0x420(%rbp), %rcx
leaq 0x2c4ae(%rip), %rdx     # 0xcc36b
movq %rsp, %rax
movq %rdx, 0x10(%rax)
movq %rcx, 0x8(%rax)
leaq 0x2bde1(%rip), %rcx     # 0xcbcb0
movq %rcx, (%rax)
leaq -0x2e0(%rbp), %rdi
leaq -0x2f0(%rbp), %rsi
movl $0x39f, %edx            # imm = 0x39F
movl $0x1, %ecx
movl $0x2, %r8d
leaq -0x2f8(%rbp), %r9
callq 0x70c30
jmp 0x9fefe
leaq -0x2e0(%rbp), %rdi
callq 0x70ea0
callq 0x70ec0
movb %al, -0x421(%rbp)
jmp 0x9ff17
movb -0x421(%rbp), %al
testb $0x1, %al
jne 0x9fdce
jmp 0x9ff27
jmp 0x9ff29
movq 0x676c0(%rip), %rax     # 0x1075f0
movq %rax, -0x430(%rbp)
leaq 0x2bc2a(%rip), %rsi     # 0xcbb68
leaq -0x308(%rbp), %rdi
movl $0xe, %edx
callq 0x70bd0
jmp 0x9ff51
leaq -0x318(%rbp), %rdi
callq 0x70c00
jmp 0x9ff5f
movq -0x430(%rbp), %rdi
leaq -0x308(%rbp), %rsi
movl $0x3a0, %edx            # imm = 0x3A0
leaq -0x318(%rbp), %rcx
callq 0x6840
jmp 0x9ff80
callq 0x70e90
movq %rax, -0x438(%rbp)
jmp 0x9ff8e
movq -0x438(%rbp), %rsi
leaq 0x2b38e(%rip), %rdx     # 0xcb32a
leaq -0x340(%rbp), %rdi
callq 0x70e50
jmp 0x9ffaa
leaq 0x2bbb7(%rip), %rsi     # 0xcbb68
leaq -0x350(%rbp), %rdi
movl $0xe, %edx
callq 0x70bd0
jmp 0x9ffc4
movabsq $-0x4000000000000000, %rax # imm = 0xC000000000000000
movq %rax, -0x358(%rbp)
movsd 0x674d3(%rip), %xmm0    # 0x1074b0
callq 0xbf970
movsd %xmm0, -0x440(%rbp)
jmp 0x9ffec
movsd -0x440(%rbp), %xmm0
movsd %xmm0, -0x360(%rbp)
leaq 0x2bce2(%rip), %rcx     # 0xcbce5
movq %rsp, %rax
movq %rcx, 0x20(%rax)
leaq -0x360(%rbp), %rcx
movq %rcx, 0x18(%rax)
leaq 0x2c75a(%rip), %rcx     # 0xcc776
movq %rcx, 0x10(%rax)
leaq -0x1d8(%rbp), %rcx
movq %rcx, 0x8(%rax)
leaq 0x2b7ff(%rip), %rcx     # 0xcb831
movq %rcx, (%rax)
leaq -0x340(%rbp), %rdi
leaq -0x350(%rbp), %rsi
movl $0x3a0, %edx            # imm = 0x3A0
movl $0x1, %ecx
movl $0x8, %r8d
leaq -0x358(%rbp), %r9
callq 0xbf6a0
jmp 0xa0061
leaq -0x340(%rbp), %rdi
callq 0x70ea0
callq 0x70ec0
movb %al, -0x441(%rbp)
jmp 0xa007a
movb -0x441(%rbp), %al
testb $0x1, %al
jne 0x9ff29
jmp 0xa008a
leaq -0x1d0(%rbp), %rdi
callq 0x4bd50
leaq -0x1a0(%rbp), %rdi
callq 0x26180
leaq -0x120(%rbp), %rdi
callq 0x6908
leaq -0xa0(%rbp), %rdi
callq 0x5c1b0
leaq -0x58(%rbp), %rdi
callq 0x6908
leaq -0x38(%rbp), %rdi
callq 0x4bd50
addq $0x4a0, %rsp            # imm = 0x4A0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x59(%rbp), %rdi
callq 0x6470
jmp 0xa029e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
movq -0xf8(%rbp), %rax
leaq -0xf0(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x450(%rbp)
je 0xa0146
movq -0x450(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x458(%rbp)
callq 0x6908
movq -0x458(%rbp), %rax
leaq -0xf0(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x450(%rbp)
jne 0xa0115
jmp 0xa0295
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xfa(%rbp), %rdi
callq 0xdb50
leaq -0xf0(%rbp), %rax
movq %rax, -0x468(%rbp)
addq $0x40, %rax
movq %rax, -0x460(%rbp)
movq -0x460(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x470(%rbp)
callq 0x6908
movq -0x468(%rbp), %rcx
movq -0x470(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x460(%rbp)
jne 0xa017c
jmp 0xa0295
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0xa0289
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x121(%rbp), %rdi
callq 0x6470
jmp 0xa0289
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0xa027d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0xa0265
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x220(%rbp), %rdi
callq 0x70ea0
jmp 0xa0265
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x280(%rbp), %rdi
callq 0x70ea0
jmp 0xa0265
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x2e0(%rbp), %rdi
callq 0x70ea0
jmp 0xa0265
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x340(%rbp), %rdi
callq 0x70ea0
leaq -0x1d0(%rbp), %rdi
callq 0x4bd50
leaq -0x1a0(%rbp), %rdi
callq 0x26180
leaq -0x120(%rbp), %rdi
callq 0x6908
leaq -0xa0(%rbp), %rdi
callq 0x5c1b0
leaq -0x58(%rbp), %rdi
callq 0x6908
leaq -0x38(%rbp), %rdi
callq 0x4bd50
movq -0x68(%rbp), %rdi
callq 0x67a0