// File: /workspace/github_cpp_makefile_star2_O2/aalto-speech[P]ftk/test/emtest.cc
// Function: ForwardBackwardTest5::test_method()
BOOST_AUTO_TEST_CASE(ForwardBackwardTest5)
{
    map<string, flt_type> vocab;
    vocab["a"] = -1.0;
    vocab["b"] = -1.0;
    vocab["ab"] = -2.0;
    string sentence("ab");
    map<string, flt_type> stats;
    flt_type lp = forward_backward(vocab, sentence, stats);
    BOOST_CHECK_EQUAL(3, (int)stats.size());
    BOOST_CHECK_CLOSE( (flt_type)0.50, stats["ab"], DBL_ACCURACY );
    BOOST_CHECK_CLOSE( (flt_type)0.50, stats["b"], DBL_ACCURACY );
    BOOST_CHECK_CLOSE( (flt_type)0.50, stats["a"], DBL_ACCURACY );
    // -2.0 + math.log(1+math.exp(-2.0-(-2.0)))
    BOOST_CHECK_CLOSE( (flt_type)-1.3068528194400546, lp, DBL_ACCURACY );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1d8, %rsp            # imm = 0x1D8
leaq -0x130(%rbp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq 0x25a25(%rip), %rsi     # 0x53f2c
leaq -0xa8(%rbp), %rdi
leaq -0xd8(%rbp), %rdx
callq 0x5160
leaq -0x138(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x1b3d2
movabsq $-0x4010000000000000, %rbx # imm = 0xBFF0000000000000
movq %rbx, (%rax)
leaq -0xa8(%rbp), %rdi
callq 0x57b8
leaq 0x256bc(%rip), %rsi     # 0x53c09
leaq -0xa8(%rbp), %rdi
leaq -0xd8(%rbp), %rdx
callq 0x5160
leaq -0x138(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x1b3d2
movq %rbx, (%rax)
leaq -0xa8(%rbp), %rdi
callq 0x57b8
leaq 0x2567f(%rip), %rsi     # 0x53c08
leaq -0xa8(%rbp), %rdi
leaq -0xd8(%rbp), %rdx
callq 0x5160
leaq -0x138(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x1b3d2
movabsq $-0x4000000000000000, %rcx # imm = 0xC000000000000000
movq %rcx, (%rax)
leaq -0xa8(%rbp), %rdi
callq 0x57b8
leaq 0x25639(%rip), %rsi     # 0x53c08
leaq -0xd8(%rbp), %rdi
leaq -0xa8(%rbp), %rdx
callq 0x5160
leaq -0xa0(%rbp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
leaq -0x138(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
leaq -0xa8(%rbp), %rdx
xorl %ecx, %ecx
callq 0x184bb
movsd %xmm0, -0xb8(%rbp)
movq 0x41f17(%rip), %rdi     # 0x70540
leaq 0x25550(%rip), %r14     # 0x53b80
leaq -0x1f8(%rbp), %rsi
movq %r14, (%rsi)
leaq 0x2554d(%rip), %r15     # 0x53b8e
movq %r15, 0x8(%rsi)
leaq 0x253c9(%rip), %r12     # 0x53a15
leaq -0x1e8(%rbp), %rcx
movq %r12, (%rcx)
movq %r12, 0x8(%rcx)
movl $0x101, %edx            # imm = 0x101
callq 0x5710
leaq -0x58(%rbp), %rdi
movb $0x0, 0x8(%rdi)
leaq 0x4146d(%rip), %rax     # 0x6fae0
movq %rax, (%rdi)
movq 0x41933(%rip), %rax     # 0x6ffb0
movq %rax, 0x10(%rdi)
leaq 0x24ccf(%rip), %rax     # 0x53357
movq %rax, 0x18(%rdi)
leaq -0x1d8(%rbp), %rsi
movq %r14, (%rsi)
movq %r15, 0x8(%rsi)
leaq -0x78(%rbp), %r9
movl $0x3, (%r9)
movl -0x80(%rbp), %eax
leaq -0x38(%rbp), %r10
movl %eax, (%r10)
subq $0x8, %rsp
leaq 0x255cc(%rip), %rax     # 0x53c86
leaq 0x258c6(%rip), %r11     # 0x53f87
pushq $0x1
popq %rcx
pushq $0x2
popq %r8
movl $0x101, %edx            # imm = 0x101
pushq %rax
pushq %r10
pushq %r11
callq 0x4ea09
addq $0x20, %rsp
movq 0x41e5e(%rip), %rdi     # 0x70540
leaq -0x1c8(%rbp), %rsi
movq %r14, (%rsi)
movq %r15, 0x8(%rsi)
leaq -0x1b8(%rbp), %rcx
movq %r12, (%rcx)
movq %r12, 0x8(%rcx)
movl $0x102, %edx            # imm = 0x102
callq 0x5710
movb $0x0, -0x50(%rbp)
leaq 0x413cd(%rip), %rax     # 0x6fae0
movq %rax, -0x58(%rbp)
movq 0x41892(%rip), %rax     # 0x6ffb0
movq %rax, -0x48(%rbp)
leaq 0x24c2e(%rip), %rax     # 0x53357
movq %rax, -0x40(%rbp)
movq %r14, -0x108(%rbp)
movq %r15, -0x100(%rbp)
movabsq $0x3fe0000000000000, %rax # imm = 0x3FE0000000000000
movq %rax, -0x38(%rbp)
leaq 0x254b8(%rip), %rsi     # 0x53c08
leaq -0x78(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x5160
leaq -0xa8(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x1b3d2
movsd 0x41c8b(%rip), %xmm0    # 0x70400
leaq -0xb0(%rbp), %r13
movsd %xmm0, (%r13)
subq $0x8, %rsp
leaq 0x25570(%rip), %r11     # 0x53cfd
leaq 0x2555d(%rip), %r10     # 0x53cf1
leaq 0x25547(%rip), %rbx     # 0x53ce2
leaq -0x58(%rbp), %rdi
leaq -0x108(%rbp), %rsi
pushq $0x1
popq %rcx
pushq $0x8
popq %r8
leaq -0x38(%rbp), %r9
movl $0x102, %edx            # imm = 0x102
pushq %r11
pushq %r13
pushq %r10
pushq %rax
pushq %rbx
callq 0x4eaf1
addq $0x30, %rsp
leaq -0x78(%rbp), %rdi
callq 0x57b8
movq 0x41d69(%rip), %rdi     # 0x70540
leaq -0x1a8(%rbp), %rsi
movq %r14, (%rsi)
movq %r15, 0x8(%rsi)
leaq -0x198(%rbp), %rcx
movq %r12, (%rcx)
movq %r12, 0x8(%rcx)
movl $0x103, %edx            # imm = 0x103
callq 0x5710
movabsq $0x3fe0000000000000, %rbx # imm = 0x3FE0000000000000
movb $0x0, -0x50(%rbp)
leaq 0x412ce(%rip), %rax     # 0x6fae0
movq %rax, -0x58(%rbp)
movq 0x41793(%rip), %rax     # 0x6ffb0
movq %rax, -0x48(%rbp)
leaq 0x24b2f(%rip), %rax     # 0x53357
movq %rax, -0x40(%rbp)
movq %r14, -0xf8(%rbp)
movq %r15, -0xf0(%rbp)
movq %rbx, -0x38(%rbp)
leaq 0x253c4(%rip), %rsi     # 0x53c09
leaq -0x78(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x5160
leaq -0xa8(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x1b3d2
movsd 0x41b96(%rip), %xmm0    # 0x70400
movsd %xmm0, -0xb0(%rbp)
subq $0x8, %rsp
leaq 0x2545a(%rip), %r10     # 0x53cd7
leaq -0x58(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
pushq $0x1
popq %rcx
pushq $0x8
popq %r8
leaq -0x38(%rbp), %r9
movl $0x103, %edx            # imm = 0x103
leaq 0x2545e(%rip), %r11     # 0x53cfd
pushq %r11
pushq %r13
pushq %r10
pushq %rax
leaq 0x25435(%rip), %rax     # 0x53ce2
pushq %rax
callq 0x4eaf1
addq $0x30, %rsp
leaq -0x78(%rbp), %rdi
callq 0x57b8
movq 0x41c79(%rip), %rdi     # 0x70540
leaq -0x188(%rbp), %rsi
movq %r14, (%rsi)
movq %r15, 0x8(%rsi)
leaq -0x178(%rbp), %rcx
movq %r12, (%rcx)
movq %r12, 0x8(%rcx)
movl $0x104, %edx            # imm = 0x104
callq 0x5710
movb $0x0, -0x50(%rbp)
leaq 0x411e8(%rip), %rax     # 0x6fae0
movq %rax, -0x58(%rbp)
movq 0x416ad(%rip), %rax     # 0x6ffb0
movq %rax, -0x48(%rbp)
leaq 0x24a49(%rip), %rax     # 0x53357
movq %rax, -0x40(%rbp)
movq %r14, -0xe8(%rbp)
movq %r15, -0xe0(%rbp)
movq %rbx, -0x38(%rbp)
leaq 0x25601(%rip), %rsi     # 0x53f2c
leaq -0x78(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x5160
leaq -0xa8(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x1b3d2
movsd 0x41ab0(%rip), %xmm0    # 0x70400
movsd %xmm0, -0xb0(%rbp)
subq $0x8, %rsp
leaq 0x25369(%rip), %r10     # 0x53ccc
leaq -0x58(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
pushq $0x1
popq %rcx
pushq $0x8
popq %r8
leaq -0x38(%rbp), %rbx
movl $0x104, %edx            # imm = 0x104
movq %rbx, %r9
leaq 0x25375(%rip), %r11     # 0x53cfd
pushq %r11
pushq %r13
pushq %r10
pushq %rax
leaq 0x2534c(%rip), %rax     # 0x53ce2
pushq %rax
callq 0x4eaf1
addq $0x30, %rsp
leaq -0x78(%rbp), %rdi
callq 0x57b8
movq 0x41b90(%rip), %rdi     # 0x70540
leaq -0x168(%rbp), %rsi
movq %r14, (%rsi)
movq %r15, 0x8(%rsi)
leaq -0x158(%rbp), %rcx
movq %r12, (%rcx)
movq %r12, 0x8(%rcx)
movl $0x106, %edx            # imm = 0x106
callq 0x5710
leaq -0x58(%rbp), %rdi
movb $0x0, 0x8(%rdi)
leaq 0x410fb(%rip), %rax     # 0x6fae0
movq %rax, (%rdi)
movq 0x415c1(%rip), %rax     # 0x6ffb0
movq %rax, 0x10(%rdi)
leaq 0x2495d(%rip), %rax     # 0x53357
movq %rax, 0x18(%rdi)
leaq -0x148(%rbp), %rsi
movq %r14, (%rsi)
movq %r15, 0x8(%rsi)
movabsq $-0x400b17217f7d1cf8, %rax # imm = 0xBFF4E8DE8082E308
leaq -0x78(%rbp), %r9
movq %rax, (%r9)
movsd 0x419db(%rip), %xmm0    # 0x70400
movsd %xmm0, -0x38(%rbp)
subq $0x8, %rsp
leaq 0x25d59(%rip), %rax     # 0x5478e
leaq -0xb8(%rbp), %r10
leaq 0x252ee(%rip), %r11     # 0x53d31
pushq $0x1
popq %rcx
pushq $0x8
popq %r8
movl $0x106, %edx            # imm = 0x106
leaq 0x252a7(%rip), %r14     # 0x53cfd
pushq %r14
pushq %rbx
pushq %rax
pushq %r10
pushq %r11
callq 0x4eaf1
addq $0x30, %rsp
leaq -0xa8(%rbp), %rdi
callq 0x1bba4
leaq -0xd8(%rbp), %rdi
callq 0x57b8
leaq -0x138(%rbp), %rdi
callq 0x1bba4
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2eada
jmp 0x2eaad
jmp 0x2eaad
jmp 0x2eada
jmp 0x2eaad
jmp 0x2eaad
jmp 0x2eada
jmp 0x2eaad
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
callq 0x57b8
jmp 0x2eadd
jmp 0x2eada
jmp 0x2eada
jmp 0x2ead5
jmp 0x2eac9
jmp 0x2ead5
jmp 0x2eac9
jmp 0x2ead5
movq %rax, %rbx
leaq -0xa8(%rbp), %rdi
jmp 0x2eaf0
movq %rax, %rbx
jmp 0x2eaf5
movq %rax, %rbx
leaq -0xa8(%rbp), %rdi
callq 0x1bba4
leaq -0xd8(%rbp), %rdi
callq 0x57b8
leaq -0x138(%rbp), %rdi
callq 0x1bba4
movq %rbx, %rdi
callq 0x56b0