// File: /workspace/github_cpp_makefile_star2_O2/aalto-speech[P]ftk/test/emtest.cc
// Function: TransitionForwardBackwardTest1::test_method()
BOOST_AUTO_TEST_CASE(TransitionForwardBackwardTest1)
{
    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);
    transitions_t stats;
    flt_type lp = forward_backward(transitions, fg, stats);
    BOOST_CHECK_EQUAL(3, transition_count(stats));
    BOOST_CHECK_EQUAL(1.0, stats[start_end][str1]);
    BOOST_CHECK_EQUAL(1.0, stats[str1][str2]);
    BOOST_CHECK_EQUAL(1.0, stats[str2][start_end]);
    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 $0x298, %rsp            # imm = 0x298
leaq 0x1618b(%rip), %rsi     # 0x53f2c
leaq -0xa0(%rbp), %rdi
leaq -0x1c8(%rbp), %rdx
callq 0x5160
leaq 0x15e3d(%rip), %rsi     # 0x53bf8
leaq -0x80(%rbp), %rdi
leaq -0x1c8(%rbp), %rdx
callq 0x5160
leaq 0x327b6(%rip), %rsi     # 0x70588
leaq -0x1c8(%rbp), %r14
movq %r14, %rdi
callq 0x54f0
leaq -0x1a8(%rbp), %r15
leaq -0xa0(%rbp), %rsi
movq %r15, %rdi
callq 0x54f0
leaq -0x188(%rbp), %r15
leaq -0x80(%rbp), %rsi
movq %r15, %rdi
callq 0x54f0
leaq -0x1f8(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
pushq $0x3
popq %rdx
leaq -0x130(%rbp), %rcx
leaq -0x100(%rbp), %r8
callq 0x4ed0a
pushq $0x40
popq %rbx
leaq (%rbx,%rbp), %rdi
addq $-0x1c8, %rdi           # imm = 0xFE38
callq 0x57b8
addq $-0x20, %rbx
cmpq $-0x20, %rbx
jne 0x3de31
leaq -0x128(%rbp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq -0x130(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x1b5f0
leaq -0x80(%rbp), %rsi
movq %rax, %rdi
callq 0x1b338
movabsq $-0x4010000000000000, %rbx # imm = 0xBFF0000000000000
movq %rbx, (%rax)
leaq 0x326ee(%rip), %rsi     # 0x70588
leaq -0x130(%rbp), %rdi
callq 0x1b5f0
leaq -0xa0(%rbp), %rsi
movq %rax, %rdi
callq 0x1b338
movq %rbx, (%rax)
leaq -0x130(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x1b5f0
leaq 0x326b9(%rip), %rsi     # 0x70588
movq %rax, %rdi
callq 0x1b338
movq %rbx, (%rax)
leaq 0x15d16(%rip), %rsi     # 0x53bf7
leaq -0x150(%rbp), %rdi
leaq -0x1c8(%rbp), %rdx
callq 0x5160
leaq 0x3268d(%rip), %rdx     # 0x70588
leaq -0x1c8(%rbp), %rdi
leaq -0x150(%rbp), %rsi
leaq -0x1f8(%rbp), %rcx
pushq $0x2
popq %r8
xorl %r9d, %r9d
callq 0xf742
leaq -0xf8(%rbp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq -0x130(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
leaq -0x100(%rbp), %rdx
callq 0x18d71
movsd %xmm0, -0x60(%rbp)
movq 0x325e2(%rip), %rdi     # 0x70540
leaq 0x15c1b(%rip), %r13     # 0x53b80
leaq -0x2b8(%rbp), %rsi
movq %r13, (%rsi)
leaq 0x15c18(%rip), %r12     # 0x53b8e
movq %r12, 0x8(%rsi)
leaq 0x15a94(%rip), %rax     # 0x53a15
leaq -0x2a8(%rbp), %rcx
movq %rax, (%rcx)
movq %rax, 0x8(%rcx)
movl $0x34d, %edx            # imm = 0x34D
callq 0x5710
leaq -0x50(%rbp), %rbx
movb $0x0, 0x8(%rbx)
leaq 0x31b38(%rip), %rax     # 0x6fae0
movq %rax, (%rbx)
movq 0x31ffe(%rip), %rax     # 0x6ffb0
movq %rax, 0x10(%rbx)
leaq 0x1539a(%rip), %rax     # 0x53357
movq %rax, 0x18(%rbx)
leaq -0x298(%rbp), %r14
movq %r13, (%r14)
movq %r12, 0x8(%r14)
leaq -0x30(%rbp), %r15
movl $0x3, (%r15)
leaq -0x100(%rbp), %rdi
callq 0x38334
leaq -0x58(%rbp), %r11
movl %eax, (%r11)
subq $0x8, %rsp
leaq 0x1624e(%rip), %rax     # 0x54246
leaq 0x15f88(%rip), %r10     # 0x53f87
pushq $0x1
popq %rcx
pushq $0x2
popq %r8
movl $0x34d, %edx            # imm = 0x34D
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %r9
pushq %rax
pushq %r11
pushq %r10
callq 0x4ea09
addq $0x20, %rsp
movq 0x32517(%rip), %rdi     # 0x70540
leaq -0x288(%rbp), %rsi
movq %r13, (%rsi)
movq %r12, 0x8(%rsi)
leaq -0x278(%rbp), %rcx
leaq 0x159d0(%rip), %rax     # 0x53a15
movq %rax, (%rcx)
movq %rax, 0x8(%rcx)
movl $0x34e, %edx            # imm = 0x34E
callq 0x5710
movq %r13, %r15
leaq 0x31a80(%rip), %r13     # 0x6fae0
movb $0x0, -0x48(%rbp)
movq %r13, -0x50(%rbp)
movq 0x31f41(%rip), %rax     # 0x6ffb0
movq %rax, -0x40(%rbp)
leaq 0x152dd(%rip), %rax     # 0x53357
movq %rax, -0x38(%rbp)
movq %r15, -0xd0(%rbp)
movq %r12, -0xc8(%rbp)
movabsq $0x3ff0000000000000, %r14 # imm = 0x3FF0000000000000
movq %r14, -0x30(%rbp)
leaq 0x324e7(%rip), %rsi     # 0x70588
leaq -0x100(%rbp), %rdi
callq 0x1b5f0
leaq -0xa0(%rbp), %rsi
movq %rax, %rdi
callq 0x1b338
subq $0x8, %rsp
leaq 0x16197(%rip), %r10     # 0x5425e
leaq 0x15bfa(%rip), %rbx     # 0x53cc8
leaq -0x50(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
pushq $0x1
popq %rcx
pushq $0x2
popq %r8
leaq -0x30(%rbp), %r9
movl $0x34e, %edx            # imm = 0x34E
pushq %r10
pushq %rax
pushq %rbx
callq 0x2903d
addq $0x20, %rsp
movq 0x32443(%rip), %rdi     # 0x70540
leaq -0x268(%rbp), %rsi
movq %r15, (%rsi)
movq %r12, 0x8(%rsi)
leaq -0x258(%rbp), %rcx
leaq 0x158fc(%rip), %rax     # 0x53a15
movq %rax, (%rcx)
movq %rax, 0x8(%rcx)
movl $0x34f, %edx            # imm = 0x34F
callq 0x5710
movb $0x0, -0x48(%rbp)
movq %r13, -0x50(%rbp)
movq 0x31e77(%rip), %rax     # 0x6ffb0
movq %rax, -0x40(%rbp)
leaq 0x15213(%rip), %rax     # 0x53357
movq %rax, -0x38(%rbp)
movq %r15, -0xc0(%rbp)
movq %r12, -0xb8(%rbp)
movq %r14, -0x30(%rbp)
leaq -0x100(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x1b5f0
leaq -0x80(%rbp), %rsi
movq %rax, %rdi
callq 0x1b338
subq $0x8, %rsp
leaq 0x160f1(%rip), %r10     # 0x54275
leaq -0x50(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
pushq $0x1
popq %rcx
pushq $0x2
popq %r8
leaq -0x30(%rbp), %r9
movl $0x34f, %edx            # imm = 0x34F
pushq %r10
pushq %rax
pushq %rbx
callq 0x2903d
addq $0x20, %rsp
movq 0x3238d(%rip), %rdi     # 0x70540
leaq -0x248(%rbp), %rsi
movq %r15, (%rsi)
movq %r12, 0x8(%rsi)
leaq -0x238(%rbp), %rcx
leaq 0x15846(%rip), %rax     # 0x53a15
movq %rax, (%rcx)
movq %rax, 0x8(%rcx)
movl $0x350, %edx            # imm = 0x350
callq 0x5710
movb $0x0, -0x48(%rbp)
movq %r13, -0x50(%rbp)
movq 0x31dc1(%rip), %rax     # 0x6ffb0
movq %rax, -0x40(%rbp)
leaq 0x1515d(%rip), %rax     # 0x53357
movq %rax, -0x38(%rbp)
movq %r15, -0xb0(%rbp)
movq %r12, -0xa8(%rbp)
movq %r14, -0x30(%rbp)
leaq -0x100(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x1b5f0
leaq 0x32361(%rip), %rsi     # 0x70588
movq %rax, %rdi
callq 0x1b338
subq $0x8, %rsp
leaq 0x1604d(%rip), %r10     # 0x54287
leaq -0x50(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
pushq $0x1
popq %rcx
pushq $0x2
popq %r8
leaq -0x30(%rbp), %r9
movl $0x350, %edx            # imm = 0x350
pushq %r10
pushq %rax
pushq %rbx
callq 0x2903d
addq $0x20, %rsp
movq 0x322d7(%rip), %rdi     # 0x70540
leaq -0x228(%rbp), %rsi
movq %r15, (%rsi)
movq %r12, 0x8(%rsi)
leaq -0x218(%rbp), %rcx
leaq 0x15790(%rip), %rax     # 0x53a15
movq %rax, (%rcx)
movq %rax, 0x8(%rcx)
movl $0x351, %edx            # imm = 0x351
callq 0x5710
leaq -0x50(%rbp), %rdi
movb $0x0, 0x8(%rdi)
movq %r13, (%rdi)
movq 0x31d08(%rip), %rax     # 0x6ffb0
movq %rax, 0x10(%rdi)
leaq 0x150a4(%rip), %rax     # 0x53357
movq %rax, 0x18(%rdi)
leaq -0x208(%rbp), %rsi
movq %r15, (%rsi)
movq %r12, 0x8(%rsi)
movabsq $-0x3ff8000000000000, %rax # imm = 0xC008000000000000
leaq -0x30(%rbp), %r9
movq %rax, (%r9)
movsd 0x32122(%rip), %xmm0    # 0x70400
movsd %xmm0, -0x58(%rbp)
subq $0x8, %rsp
leaq 0x15a0f(%rip), %rax     # 0x53cfd
leaq 0x16499(%rip), %r10     # 0x5478e
leaq -0x60(%rbp), %r11
leaq 0x1557d(%rip), %rbx     # 0x5387d
pushq $0x1
popq %rcx
pushq $0x8
popq %r8
movl $0x351, %edx            # imm = 0x351
pushq %rax
leaq -0x58(%rbp), %rax
pushq %rax
pushq %r10
pushq %r11
pushq %rbx
callq 0x4eaf1
addq $0x30, %rsp
leaq -0x100(%rbp), %rdi
callq 0x1bb0c
leaq -0x1c8(%rbp), %rdi
callq 0x10c24
leaq -0x150(%rbp), %rdi
callq 0x57b8
leaq -0x130(%rbp), %rdi
callq 0x1bb0c
leaq -0x1f8(%rbp), %rdi
callq 0x200e8
leaq -0x80(%rbp), %rdi
callq 0x57b8
leaq -0xa0(%rbp), %rdi
callq 0x57b8
addq $0x298, %rsp            # imm = 0x298
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3e3d7
jmp 0x3e3d7
movq %rax, %rbx
jmp 0x3e3f2
jmp 0x3e400
movq %rax, %rbx
pushq $0x40
popq %r14
leaq (%r14,%rbp), %rdi
addq $-0x1c8, %rdi           # imm = 0xFE38
callq 0x57b8
addq $-0x20, %r14
cmpq $-0x20, %r14
jne 0x3e395
jmp 0x3e41b
movq %rax, %rbx
jmp 0x3e41b
movq %rax, %rbx
jmp 0x3e424
movq %rax, %rbx
addq $-0x20, %r15
movq %r15, %rdi
callq 0x57b8
cmpq %r14, %r15
jne 0x3e3be
jmp 0x3e41b
jmp 0x3e3d7
jmp 0x3e3d7
jmp 0x3e3d7
movq %rax, %rbx
leaq -0x100(%rbp), %rdi
callq 0x1bb0c
leaq -0x1c8(%rbp), %rdi
callq 0x10c24
leaq -0x150(%rbp), %rdi
callq 0x57b8
jmp 0x3e403
movq %rax, %rbx
leaq -0x130(%rbp), %rdi
callq 0x1bb0c
leaq -0x1f8(%rbp), %rdi
callq 0x200e8
leaq -0x80(%rbp), %rdi
callq 0x57b8
leaq -0xa0(%rbp), %rdi
callq 0x57b8
movq %rbx, %rdi
callq 0x56b0