// File: /workspace/github_cpp_makefile_star2_O2/aalto-speech[P]ftk/test/emtest.cc
// Function: ForwardBackwardTest8::test_method()
BOOST_AUTO_TEST_CASE(ForwardBackwardTest8)
{
    map<string, flt_type> vocab;
    vocab["a"] = log(0.25);
    vocab["sa"] = log(0.25);
    vocab["s"] = log(0.25);
    vocab["ki"] = log(0.50);
    vocab["kis"] = log(0.50);
    vocab["kissa"] = log(0.1953125);
    vocab["k"] = log(0.00000001);
    string sentence("kissa");
    map<string, flt_type> stats;
    flt_type lp = forward_backward(vocab, sentence, stats);
    BOOST_CHECK_EQUAL(6, (int)stats.size());
    BOOST_CHECK_CLOSE( 0.5, stats["kissa"], DBL_ACCURACY );
    BOOST_CHECK_CLOSE( 0.80/2.0, stats["kis"], DBL_ACCURACY );
    BOOST_CHECK_CLOSE( 0.20/2.0, stats["ki"], DBL_ACCURACY );
    BOOST_CHECK_CLOSE( 0.8/2.0, stats["sa"], DBL_ACCURACY );
    BOOST_CHECK_CLOSE( (0.2+0.2)/2.0, stats["s"], DBL_ACCURACY );
    BOOST_CHECK_CLOSE( 0.2/2.0, stats["a"], DBL_ACCURACY );
    BOOST_CHECK_CLOSE( (flt_type)-0.940007258491, lp, DBL_ACCURACY);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x268, %rsp            # imm = 0x268
leaq -0x100(%rbp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x2397f(%rip), %rsi     # 0x53f2c
leaq -0x88(%rbp), %rdi
leaq -0xd0(%rbp), %rdx
callq 0x5160
leaq -0x108(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x1b3d2
movabsq $-0x4009d1bd0105c611, %rbx # imm = 0xBFF62E42FEFA39EF
movq %rbx, (%rax)
leaq -0x88(%rbp), %rdi
callq 0x57b8
leaq 0x241cd(%rip), %rsi     # 0x547c0
leaq -0x88(%rbp), %rdi
leaq -0xd0(%rbp), %rdx
callq 0x5160
leaq -0x108(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x1b3d2
movq %rbx, (%rax)
leaq -0x88(%rbp), %rdi
callq 0x57b8
leaq 0x229df(%rip), %rsi     # 0x5300e
leaq -0x88(%rbp), %rdi
leaq -0xd0(%rbp), %rdx
callq 0x5160
leaq -0x108(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x1b3d2
movq %rbx, (%rax)
leaq -0x88(%rbp), %rdi
callq 0x57b8
leaq 0x23719(%rip), %rsi     # 0x53d84
leaq -0x88(%rbp), %rdi
leaq -0xd0(%rbp), %rdx
callq 0x5160
leaq -0x108(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x1b3d2
movabsq $-0x4019d1bd0105c611, %rbx # imm = 0xBFE62E42FEFA39EF
movq %rbx, (%rax)
leaq -0x88(%rbp), %rdi
callq 0x57b8
leaq 0x236d6(%rip), %rsi     # 0x53d87
leaq -0x88(%rbp), %rdi
leaq -0xd0(%rbp), %rdx
callq 0x5160
leaq -0x108(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x1b3d2
movq %rbx, (%rax)
leaq -0x88(%rbp), %rdi
callq 0x57b8
leaq 0x23567(%rip), %rsi     # 0x53c54
leaq -0x88(%rbp), %rdi
leaq -0xd0(%rbp), %rdx
callq 0x5160
leaq -0x108(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x1b3d2
movabsq $-0x4005de99736f4fa2, %rcx # imm = 0xBFFA21668C90B05E
movq %rcx, (%rax)
leaq -0x88(%rbp), %rdi
callq 0x57b8
leaq 0x2351f(%rip), %rsi     # 0x53c52
leaq -0x88(%rbp), %rdi
leaq -0xd0(%rbp), %rdx
callq 0x5160
leaq -0x108(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x1b3d2
movabsq $-0x3fcd944e444aaaea, %rcx # imm = 0xC0326BB1BBB55516
movq %rcx, (%rax)
leaq -0x88(%rbp), %rdi
callq 0x57b8
leaq 0x234db(%rip), %rsi     # 0x53c54
leaq -0xd0(%rbp), %rdi
leaq -0x88(%rbp), %rdx
callq 0x5160
leaq -0x80(%rbp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq -0x108(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
leaq -0x88(%rbp), %rdx
xorl %ecx, %ecx
callq 0x184bb
movsd %xmm0, -0xd8(%rbp)
movq 0x3fd70(%rip), %rdi     # 0x70540
leaq 0x233a9(%rip), %rbx     # 0x53b80
leaq -0x288(%rbp), %rsi
movq %rbx, (%rsi)
leaq 0x233a6(%rip), %r15     # 0x53b8e
movq %r15, 0x8(%rsi)
leaq 0x23222(%rip), %r12     # 0x53a15
leaq -0x278(%rbp), %rcx
movq %r12, (%rcx)
movq %r12, 0x8(%rcx)
movl $0x142, %edx            # imm = 0x142
callq 0x5710
leaq -0x58(%rbp), %rdi
movb $0x0, 0x8(%rdi)
leaq 0x3f2c6(%rip), %rax     # 0x6fae0
movq %rax, (%rdi)
movq 0x3f78c(%rip), %rax     # 0x6ffb0
movq %rax, 0x10(%rdi)
leaq 0x22b28(%rip), %rax     # 0x53357
movq %rax, 0x18(%rdi)
leaq -0x268(%rbp), %rsi
movq %rbx, (%rsi)
movq %r15, 0x8(%rsi)
leaq -0xa8(%rbp), %r9
movl $0x6, (%r9)
movl -0x60(%rbp), %eax
leaq -0x38(%rbp), %r10
movl %eax, (%r10)
subq $0x8, %rsp
leaq 0x23422(%rip), %rax     # 0x53c86
leaq 0x23e6a(%rip), %r11     # 0x546d5
pushq $0x1
popq %rcx
pushq $0x2
popq %r8
movl $0x142, %edx            # imm = 0x142
pushq %rax
pushq %r10
pushq %r11
callq 0x4ea09
addq $0x20, %rsp
movq 0x3fcb4(%rip), %rdi     # 0x70540
leaq -0x258(%rbp), %rsi
movq %rbx, (%rsi)
movq %r15, 0x8(%rsi)
leaq -0x248(%rbp), %rcx
movq %r12, (%rcx)
movq %r12, 0x8(%rcx)
movl $0x143, %edx            # imm = 0x143
callq 0x5710
movb $0x0, -0x50(%rbp)
leaq 0x3f223(%rip), %rax     # 0x6fae0
movq %rax, -0x58(%rbp)
movq 0x3f6e8(%rip), %rax     # 0x6ffb0
movq %rax, -0x48(%rbp)
leaq 0x22a84(%rip), %rax     # 0x53357
movq %rax, -0x40(%rbp)
movq %rbx, -0x168(%rbp)
movq %r15, -0x160(%rbp)
movabsq $0x3fe0000000000000, %rax # imm = 0x3FE0000000000000
movq %rax, -0x38(%rbp)
leaq 0x2335a(%rip), %rsi     # 0x53c54
leaq -0xa8(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x5160
leaq -0x88(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x1b3d2
movsd 0x3fadb(%rip), %xmm0    # 0x70400
leaq -0xb0(%rbp), %r13
movsd %xmm0, (%r13)
subq $0x8, %rsp
leaq 0x233c0(%rip), %rbx     # 0x53cfd
leaq 0x234a3(%rip), %r10     # 0x53de7
leaq 0x23498(%rip), %r11     # 0x53de3
leaq -0x58(%rbp), %rdi
leaq -0x168(%rbp), %rsi
pushq $0x1
popq %rcx
pushq $0x8
popq %r8
leaq -0x38(%rbp), %r9
movl $0x143, %edx            # imm = 0x143
pushq %rbx
pushq %r13
pushq %r10
pushq %rax
pushq %r11
callq 0x4eaf1
addq $0x30, %rsp
leaq -0xa8(%rbp), %rdi
callq 0x57b8
movq 0x3fbb6(%rip), %rdi     # 0x70540
leaq -0x238(%rbp), %rsi
leaq 0x231e8(%rip), %rbx     # 0x53b80
movq %rbx, (%rsi)
movq %r15, 0x8(%rsi)
leaq -0x228(%rbp), %rcx
movq %r12, (%rcx)
movq %r12, 0x8(%rcx)
movl $0x144, %edx            # imm = 0x144
callq 0x5710
movb $0x0, -0x50(%rbp)
leaq 0x3f11e(%rip), %rax     # 0x6fae0
movq %rax, -0x58(%rbp)
movq 0x3f5e3(%rip), %rax     # 0x6ffb0
movq %rax, -0x48(%rbp)
leaq 0x2297f(%rip), %rax     # 0x53357
movq %rax, -0x40(%rbp)
movq %rbx, -0x158(%rbp)
movq %r15, -0x150(%rbp)
movabsq $0x3fd999999999999a, %r14 # imm = 0x3FD999999999999A
movq %r14, -0x38(%rbp)
leaq 0x23388(%rip), %rsi     # 0x53d87
leaq -0xa8(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x5160
leaq -0x88(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x1b3d2
movsd 0x3f9d6(%rip), %xmm0    # 0x70400
movsd %xmm0, -0xb0(%rbp)
subq $0x8, %rsp
leaq 0x23353(%rip), %r10     # 0x53d90
leaq 0x233b2(%rip), %r11     # 0x53df6
leaq -0x58(%rbp), %rdi
leaq -0x158(%rbp), %rsi
pushq $0x1
popq %rcx
pushq $0x8
popq %r8
leaq -0x38(%rbp), %r9
movl $0x144, %edx            # imm = 0x144
leaq 0x23297(%rip), %rbx     # 0x53cfd
pushq %rbx
pushq %r13
pushq %r10
pushq %rax
pushq %r11
callq 0x4eaf1
addq $0x30, %rsp
leaq -0xa8(%rbp), %rdi
callq 0x57b8
movq 0x3fab6(%rip), %rdi     # 0x70540
leaq -0x218(%rbp), %rsi
leaq 0x230e8(%rip), %rbx     # 0x53b80
movq %rbx, (%rsi)
movq %r15, 0x8(%rsi)
leaq -0x208(%rbp), %rcx
movq %r12, (%rcx)
movq %r12, 0x8(%rcx)
movl $0x145, %edx            # imm = 0x145
callq 0x5710
movb $0x0, -0x50(%rbp)
leaq 0x3f01e(%rip), %rax     # 0x6fae0
movq %rax, -0x58(%rbp)
movq 0x3f4e3(%rip), %rax     # 0x6ffb0
movq %rax, -0x48(%rbp)
leaq 0x2287f(%rip), %rax     # 0x53357
movq %rax, -0x40(%rbp)
movq %rbx, -0x148(%rbp)
movq %r15, -0x140(%rbp)
movabsq $0x3fb999999999999a, %rax # imm = 0x3FB999999999999A
movq %rax, -0x38(%rbp)
leaq 0x23285(%rip), %rsi     # 0x53d84
leaq -0xa8(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x5160
leaq -0x88(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x1b3d2
movsd 0x3f8d6(%rip), %xmm0    # 0x70400
movsd %xmm0, -0xb0(%rbp)
subq $0x8, %rsp
leaq 0x23260(%rip), %r10     # 0x53d9d
leaq 0x232bb(%rip), %r11     # 0x53dff
leaq -0x58(%rbp), %rdi
leaq -0x148(%rbp), %rsi
pushq $0x1
popq %rcx
pushq $0x8
popq %r8
leaq -0x38(%rbp), %r9
movl $0x145, %edx            # imm = 0x145
leaq 0x23197(%rip), %rbx     # 0x53cfd
pushq %rbx
pushq %r13
pushq %r10
pushq %rax
pushq %r11
callq 0x4eaf1
addq $0x30, %rsp
leaq -0xa8(%rbp), %rdi
callq 0x57b8
movq 0x3f9b6(%rip), %rdi     # 0x70540
leaq -0x1f8(%rbp), %rsi
leaq 0x22fe8(%rip), %rbx     # 0x53b80
movq %rbx, (%rsi)
movq %r15, 0x8(%rsi)
leaq -0x1e8(%rbp), %rcx
movq %r12, (%rcx)
movq %r12, 0x8(%rcx)
movl $0x146, %edx            # imm = 0x146
callq 0x5710
movb $0x0, -0x50(%rbp)
leaq 0x3ef1e(%rip), %rax     # 0x6fae0
movq %rax, -0x58(%rbp)
movq 0x3f3e3(%rip), %rax     # 0x6ffb0
movq %rax, -0x48(%rbp)
leaq 0x2277f(%rip), %rax     # 0x53357
movq %rax, -0x40(%rbp)
movq %rbx, -0x138(%rbp)
movq %r15, -0x130(%rbp)
movq %r14, -0x38(%rbp)
leaq 0x23bcb(%rip), %rsi     # 0x547c0
leaq -0xa8(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x5160
leaq -0x88(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x1b3d2
movsd 0x3f7e0(%rip), %xmm0    # 0x70400
movsd %xmm0, -0xb0(%rbp)
subq $0x8, %rsp
leaq 0x23176(%rip), %r10     # 0x53da9
leaq 0x231ce(%rip), %r11     # 0x53e08
leaq -0x58(%rbp), %rdi
leaq -0x138(%rbp), %rsi
pushq $0x1
popq %rcx
pushq $0x8
popq %r8
leaq -0x38(%rbp), %r9
movl $0x146, %edx            # imm = 0x146
leaq 0x230a1(%rip), %rbx     # 0x53cfd
pushq %rbx
pushq %r13
pushq %r10
pushq %rax
pushq %r11
callq 0x4eaf1
addq $0x30, %rsp
leaq -0xa8(%rbp), %rdi
callq 0x57b8
movq 0x3f8c0(%rip), %rdi     # 0x70540
leaq -0x1d8(%rbp), %rsi
leaq 0x22ef2(%rip), %rbx     # 0x53b80
movq %rbx, (%rsi)
movq %r15, 0x8(%rsi)
leaq -0x1c8(%rbp), %rcx
movq %r12, (%rcx)
movq %r12, 0x8(%rcx)
movl $0x147, %edx            # imm = 0x147
callq 0x5710
movb $0x0, -0x50(%rbp)
leaq 0x3ee28(%rip), %rax     # 0x6fae0
movq %rax, -0x58(%rbp)
movq 0x3f2ed(%rip), %rax     # 0x6ffb0
movq %rax, -0x48(%rbp)
leaq 0x22689(%rip), %rax     # 0x53357
movq %rax, -0x40(%rbp)
movq %rbx, -0x128(%rbp)
movq %r15, -0x120(%rbp)
movabsq $0x3fc999999999999a, %rax # imm = 0x3FC999999999999A
movq %rax, -0x38(%rbp)
leaq 0x22319(%rip), %rsi     # 0x5300e
leaq -0xa8(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x5160
leaq -0x88(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x1b3d2
movsd 0x3f6e0(%rip), %xmm0    # 0x70400
movsd %xmm0, -0xb0(%rbp)
subq $0x8, %rsp
leaq 0x2308c(%rip), %r10     # 0x53dbf
leaq 0x230d6(%rip), %r11     # 0x53e10
leaq -0x58(%rbp), %rdi
leaq -0x128(%rbp), %rsi
pushq $0x1
popq %rcx
pushq $0x8
popq %r8
leaq -0x38(%rbp), %r9
movl $0x147, %edx            # imm = 0x147
leaq 0x22fa1(%rip), %rbx     # 0x53cfd
pushq %rbx
pushq %r13
pushq %r10
pushq %rax
pushq %r11
callq 0x4eaf1
addq $0x30, %rsp
leaq -0xa8(%rbp), %rdi
callq 0x57b8
movq 0x3f7c0(%rip), %rdi     # 0x70540
leaq -0x1b8(%rbp), %rsi
leaq 0x22df2(%rip), %rbx     # 0x53b80
movq %rbx, (%rsi)
movq %r15, 0x8(%rsi)
leaq -0x1a8(%rbp), %rcx
movq %r12, (%rcx)
movq %r12, 0x8(%rcx)
movl $0x148, %edx            # imm = 0x148
callq 0x5710
movb $0x0, -0x50(%rbp)
leaq 0x3ed28(%rip), %rax     # 0x6fae0
movq %rax, -0x58(%rbp)
movq 0x3f1ed(%rip), %rax     # 0x6ffb0
movq %rax, -0x48(%rbp)
leaq 0x22589(%rip), %rax     # 0x53357
movq %rax, -0x40(%rbp)
movq %rbx, -0x118(%rbp)
movq %r15, -0x110(%rbp)
movabsq $0x3fb999999999999a, %rax # imm = 0x3FB999999999999A
movq %rax, -0x38(%rbp)
leaq 0x23137(%rip), %rsi     # 0x53f2c
leaq -0xa8(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x5160
movq %r13, %r14
leaq -0x88(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x1b3d2
movsd 0x3f5dd(%rip), %xmm0    # 0x70400
movsd %xmm0, -0xb0(%rbp)
subq $0x8, %rsp
leaq 0x22e96(%rip), %r10     # 0x53ccc
leaq 0x22fe1(%rip), %r11     # 0x53e1e
leaq -0x58(%rbp), %rdi
leaq -0x118(%rbp), %rsi
pushq $0x1
popq %rcx
pushq $0x8
popq %r8
leaq -0x38(%rbp), %rbx
movl $0x148, %edx            # imm = 0x148
movq %rbx, %r9
leaq 0x22e9b(%rip), %r13     # 0x53cfd
pushq %r13
pushq %r14
pushq %r10
pushq %rax
pushq %r11
callq 0x4eaf1
addq $0x30, %rsp
leaq -0xa8(%rbp), %rdi
callq 0x57b8
movq 0x3f6b9(%rip), %rdi     # 0x70540
leaq -0x198(%rbp), %rsi
leaq 0x22ceb(%rip), %r14     # 0x53b80
movq %r14, (%rsi)
movq %r15, 0x8(%rsi)
leaq -0x188(%rbp), %rcx
movq %r12, (%rcx)
movq %r12, 0x8(%rcx)
movl $0x149, %edx            # imm = 0x149
callq 0x5710
leaq -0x58(%rbp), %rdi
movb $0x0, 0x8(%rdi)
leaq 0x3ec1d(%rip), %rax     # 0x6fae0
movq %rax, (%rdi)
movq 0x3f0e3(%rip), %rax     # 0x6ffb0
movq %rax, 0x10(%rdi)
leaq 0x2247f(%rip), %rax     # 0x53357
movq %rax, 0x18(%rdi)
leaq -0x178(%rbp), %rsi
movq %r14, (%rsi)
movq %r15, 0x8(%rsi)
movabsq $-0x4011eb75e5d8e9c6, %rax # imm = 0xBFEE148A1A27163A
leaq -0xa8(%rbp), %r9
movq %rax, (%r9)
movsd 0x3f4fa(%rip), %xmm0    # 0x70400
movsd %xmm0, -0x38(%rbp)
subq $0x8, %rsp
leaq 0x23878(%rip), %rax     # 0x5478e
leaq -0xd8(%rbp), %r10
leaq 0x22f02(%rip), %r11     # 0x53e26
pushq $0x1
popq %rcx
pushq $0x8
popq %r8
movl $0x149, %edx            # imm = 0x149
leaq 0x22dc6(%rip), %r14     # 0x53cfd
pushq %r14
pushq %rbx
pushq %rax
pushq %r10
pushq %r11
callq 0x4eaf1
addq $0x30, %rsp
leaq -0x88(%rbp), %rdi
callq 0x1bba4
leaq -0xd0(%rbp), %rdi
callq 0x57b8
leaq -0x108(%rbp), %rdi
callq 0x1bba4
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x30fe0
jmp 0x30fa0
jmp 0x30fa0
jmp 0x30fe0
jmp 0x30fa0
jmp 0x30fa0
jmp 0x30fe0
jmp 0x30fa0
jmp 0x30fa0
jmp 0x30fe0
jmp 0x30fa0
jmp 0x30fa0
jmp 0x30fe0
jmp 0x30fa0
jmp 0x30fa0
jmp 0x30fe0
jmp 0x30fa0
movq %rax, %rbx
leaq -0xa8(%rbp), %rdi
callq 0x57b8
jmp 0x30fe3
jmp 0x30fe0
jmp 0x30fe0
jmp 0x30fdb
jmp 0x30fcf
jmp 0x30fdb
jmp 0x30fcf
jmp 0x30fdb
jmp 0x30fcf
jmp 0x30fdb
jmp 0x30fcf
jmp 0x30fdb
jmp 0x30fcf
jmp 0x30fdb
jmp 0x30fcf
jmp 0x30fdb
movq %rax, %rbx
leaq -0x88(%rbp), %rdi
jmp 0x30ff6
movq %rax, %rbx
jmp 0x30ffb
movq %rax, %rbx
leaq -0x88(%rbp), %rdi
callq 0x1bba4
leaq -0xd0(%rbp), %rdi
callq 0x57b8
leaq -0x108(%rbp), %rdi
callq 0x1bba4
movq %rbx, %rdi
callq 0x56b0