// File: /workspace/github_cpp_makefile_star2_O1/adamiaonr[P]rid-analytics/src/prob.cpp
// Function: Prob::print_lm_prob(unsigned char, bool)
void Prob::print_lm_prob(uint8_t iface, bool iface_complement) {

    // decide if we're calculating the iface or 'iface complement' largest match 
    // probabilities
    std::vector<std::vector<std::vector<__float080> > > * lmp;
    if (!iface_complement) lmp = &(this->lm_cond_prob);
    else lmp = &(this->lm_complement_cond_prob);

    printf("\n---------------------");
    for (uint8_t i = 0; i < (this->n + 2); i++)
        printf("-------------");

    printf("\n[|L|]         : |");

    for (uint8_t i = 0; i < (this->n + 1); i++)
        printf(" %-11d|", i);

    if (!iface_complement) printf(" SUM P(L_{i|t}) |");
    else printf(" SUM P(L_{~i|t}) |");

    printf("\n---------------------");
    for (uint8_t i = 0; i < (this->n + 2); i++)
        printf("-------------");

    __float080 cumulative_prob = 0.0;
    __float080 prob = 0.0;

    for (uint8_t fptree_size = 0; fptree_size < (this->n + 1); fptree_size++) {

        if (!iface_complement) printf("\n[P(L_{%d|%d}) ] : |", iface, fptree_size);
        else printf("\n[P(L_{~%d|%d})] : |", iface, fptree_size);

        for (uint8_t f = 0; f < (this->n + 1); f++) {

            prob = (*lmp)[iface][fptree_size][f];
            printf(" %-.5LE|", prob);

            cumulative_prob += prob;
        }

        printf("     %-.5LE|", cumulative_prob);
        cumulative_prob = 0.0;
    }

    printf("\n---------------------");
    for (uint8_t i = 0; i < (this->n + 2); i++)
        printf("-------------");

    printf("\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %esi, %r14d
movq %rdi, %rbx
xorl %eax, %eax
movl %edx, 0x24(%rsp)
testl %edx, %edx
movl $0x18, %r13d
cmoveq %rax, %r13
leaq 0x655b(%rip), %rdi      # 0x32686
xorl %eax, %eax
callq 0x4070
fldt 0x90(%rbx)
fadds 0x64fe(%rip)            # 0x3263c
fldz
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jbe 0x2c17e
movb $0x1, %bpl
leaq 0x5b22(%rip), %r15      # 0x31c74
movq %r15, %rdi
xorl %eax, %eax
callq 0x4070
movzbl %bpl, %ebp
movw %bp, 0x22(%rsp)
filds 0x22(%rsp)
fldt 0x90(%rbx)
fadds 0x64c7(%rip)            # 0x3263c
incb %bpl
fucompi %st(1), %st
fstp %st(0)
ja 0x2c152
leaq 0x6518(%rip), %rdi      # 0x3269d
xorl %eax, %eax
callq 0x4070
fldt 0x90(%rbx)
fld1
faddp %st, %st(1)
fldz
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jbe 0x2c1dd
xorl %r15d, %r15d
leaq 0x6506(%rip), %r12      # 0x326b0
movzbl %r15b, %r15d
movq %r12, %rdi
movl %r15d, %esi
xorl %eax, %eax
callq 0x4070
fld1
incb %r15b
movzbl %r15b, %eax
movw %ax, 0x20(%rsp)
filds 0x20(%rsp)
fldt 0x90(%rbx)
faddp %st, %st(2)
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
ja 0x2c1aa
leaq 0x64e6(%rip), %rax      # 0x326ca
leaq 0x64cd(%rip), %rdi      # 0x326b8
cmpb $0x0, 0x24(%rsp)
cmovneq %rax, %rdi
xorl %eax, %eax
callq 0x4070
leaq 0x6484(%rip), %rdi      # 0x32686
xorl %eax, %eax
callq 0x4070
fldt 0x90(%rbx)
fadds 0x6427(%rip)            # 0x3263c
fldz
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jbe 0x2c255
movb $0x1, %bpl
leaq 0x5a4b(%rip), %r15      # 0x31c74
movq %r15, %rdi
xorl %eax, %eax
callq 0x4070
movzbl %bpl, %ebp
movw %bp, 0x1e(%rsp)
filds 0x1e(%rsp)
fldt 0x90(%rbx)
fadds 0x63f0(%rip)            # 0x3263c
incb %bpl
fucompi %st(1), %st
fstp %st(0)
ja 0x2c229
fldt 0x90(%rbx)
fld1
faddp %st, %st(1)
fldz
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jbe 0x2c365
movzbl %r14b, %eax
movl $0x0, 0x14(%rsp)
movq %rax, 0x28(%rsp)
leaq (%rax,%rax,2), %rbp
leaq 0x6482(%rip), %r12      # 0x3270b
xorl %edx, %edx
cmpb $0x0, 0x24(%rsp)
je 0x2c29b
leaq 0x6459(%rip), %rdi      # 0x326f2
jmp 0x2c2a2
leaq 0x643b(%rip), %rdi      # 0x326dd
movq 0x28(%rsp), %rsi
xorl %eax, %eax
callq 0x4070
fldt 0x90(%rbx)
fld1
faddp %st, %st(1)
fldz
fxch %st(1)
fucompi %st(1), %st
jbe 0x2c32a
fstp %st(0)
movzbl 0x14(%rsp), %eax
xorl %r14d, %r14d
leaq (%rax,%rax,2), %r15
fldz
fstpt 0x3c(%rsp)
movq (%rbx,%r13), %rax
movq (%rax,%rbp,8), %rax
movq (%rax,%r15,8), %rax
movzbl %r14b, %r14d
movl %r14d, %ecx
shll $0x4, %ecx
fldt (%rax,%rcx)
fld %st(0)
fstpt 0x30(%rsp)
fstpt (%rsp)
movq %r12, %rdi
xorl %eax, %eax
callq 0x4070
fldt 0x3c(%rsp)
fldt 0x30(%rsp)
faddp %st, %st(1)
incb %r14b
movzbl %r14b, %eax
movw %ax, 0x1c(%rsp)
filds 0x1c(%rsp)
fldt 0x90(%rbx)
fld1
faddp %st, %st(1)
fucompi %st(1), %st
fstp %st(0)
ja 0x2c2d0
fstpt (%rsp)
leaq 0x63d3(%rip), %rdi      # 0x32707
xorl %eax, %eax
callq 0x4070
movl 0x14(%rsp), %eax
incb %al
movl %eax, 0x14(%rsp)
movzbl %al, %edx
movw %dx, 0x1a(%rsp)
filds 0x1a(%rsp)
fldt 0x90(%rbx)
fld1
faddp %st, %st(1)
fucompi %st(1), %st
fstp %st(0)
ja 0x2c28b
leaq 0x631a(%rip), %rdi      # 0x32686
xorl %eax, %eax
callq 0x4070
fldt 0x90(%rbx)
fadds 0x62bd(%rip)            # 0x3263c
fldz
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jbe 0x2c3bf
movb $0x1, %bpl
leaq 0x58e1(%rip), %r14      # 0x31c74
movq %r14, %rdi
xorl %eax, %eax
callq 0x4070
movzbl %bpl, %ebp
movw %bp, 0x18(%rsp)
filds 0x18(%rsp)
fldt 0x90(%rbx)
fadds 0x6286(%rip)            # 0x3263c
incb %bpl
fucompi %st(1), %st
fstp %st(0)
ja 0x2c393
movl $0xa, %edi
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4500
nop