// File: /workspace/github_cpp_makefile_star2_O3/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 $0x58, %rsp
movl %edx, %r13d
movl %esi, %r14d
movq %rdi, %rbx
xorl %eax, %eax
testl %edx, %edx
movl $0x18, %ecx
cmoveq %rax, %rcx
movq %rcx, 0x38(%rsp)
leaq 0x5898(%rip), %rdi      # 0x31466
xorl %eax, %eax
callq 0x4070
fldt 0x90(%rbx)
fadds 0x583b(%rip)            # 0x3141c
fldz
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jbe 0x2bc21
movb $0x1, %bpl
leaq 0x4e5f(%rip), %r15      # 0x30a54
movq %r15, %rdi
xorl %eax, %eax
callq 0x4070
movzbl %bpl, %ebp
movw %bp, 0x26(%rsp)
filds 0x26(%rsp)
fldt 0x90(%rbx)
fadds 0x5804(%rip)            # 0x3141c
incb %bpl
fucompi %st(1), %st
fstp %st(0)
ja 0x2bbf5
leaq 0x5855(%rip), %rdi      # 0x3147d
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 0x2bc80
xorl %r15d, %r15d
leaq 0x5843(%rip), %r12      # 0x31490
movzbl %r15b, %r15d
movq %r12, %rdi
movl %r15d, %esi
xorl %eax, %eax
callq 0x4070
fld1
incb %r15b
movzbl %r15b, %eax
movw %ax, 0x24(%rsp)
filds 0x24(%rsp)
fldt 0x90(%rbx)
faddp %st, %st(2)
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
ja 0x2bc4d
leaq 0x5823(%rip), %rax      # 0x314aa
leaq 0x580a(%rip), %rdi      # 0x31498
testb %r13b, %r13b
cmovneq %rax, %rdi
xorl %eax, %eax
callq 0x4070
leaq 0x57c3(%rip), %rdi      # 0x31466
xorl %eax, %eax
callq 0x4070
fldt 0x90(%rbx)
fld %st(0)
fadds 0x5764(%rip)            # 0x3141c
fldz
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jbe 0x2bd00
fstp %st(0)
movb $0x1, %bpl
leaq 0x4d86(%rip), %r15      # 0x30a54
fldz
fstp %st(0)
movq %r15, %rdi
xorl %eax, %eax
callq 0x4070
movzbl %bpl, %ebp
movw %bp, 0x22(%rsp)
filds 0x22(%rsp)
fldt 0x90(%rbx)
fld %st(0)
fadds 0x5725(%rip)            # 0x3141c
incb %bpl
fucompi %st(2), %st
fstp %st(1)
ja 0x2bcd0
fld1
faddp %st, %st(1)
fldz
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jbe 0x2be17
movzbl %r14b, %ecx
leaq 0x57b5(%rip), %rax      # 0x314d2
leaq 0x5799(%rip), %rdx      # 0x314bd
testb %r13b, %r13b
cmovneq %rax, %rdx
movq %rdx, 0x28(%rsp)
movl $0x0, 0x18(%rsp)
movq %rcx, 0x30(%rsp)
leaq (%rcx,%rcx,2), %r14
leaq 0x57a3(%rip), %r12      # 0x314eb
xorl %edx, %edx
movq 0x38(%rsp), %r13
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
xorl %eax, %eax
callq 0x4070
fldt 0x90(%rbx)
fld1
faddp %st, %st(1)
fldz
fxch %st(1)
fucompi %st(1), %st
jbe 0x2bddc
fstp %st(0)
movzbl 0x18(%rsp), %eax
xorl %r15d, %r15d
leaq (%rax,%rax,2), %rbp
fldz
fstpt 0x4c(%rsp)
movq (%rbx,%r13), %rax
movq (%rax,%r14,8), %rax
movq (%rax,%rbp,8), %rax
movzbl %r15b, %r15d
movl %r15d, %ecx
shll $0x4, %ecx
fldt (%rax,%rcx)
fld %st(0)
fstpt 0x40(%rsp)
fstpt (%rsp)
movq %r12, %rdi
xorl %eax, %eax
callq 0x4070
fldt 0x4c(%rsp)
fldt 0x40(%rsp)
faddp %st, %st(1)
incb %r15b
movzbl %r15b, %eax
movw %ax, 0x20(%rsp)
filds 0x20(%rsp)
fldt 0x90(%rbx)
fld1
faddp %st, %st(1)
fucompi %st(1), %st
fstp %st(0)
ja 0x2bd82
fstpt (%rsp)
leaq 0x5701(%rip), %rdi      # 0x314e7
xorl %eax, %eax
callq 0x4070
movl 0x18(%rsp), %eax
incb %al
movl %eax, 0x18(%rsp)
movzbl %al, %edx
movw %dx, 0x1e(%rsp)
filds 0x1e(%rsp)
fldt 0x90(%rbx)
fld1
faddp %st, %st(1)
fucompi %st(1), %st
fstp %st(0)
ja 0x2bd4f
leaq 0x5648(%rip), %rdi      # 0x31466
xorl %eax, %eax
callq 0x4070
fldt 0x90(%rbx)
fadds 0x55eb(%rip)            # 0x3141c
fldz
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jbe 0x2be71
movb $0x1, %bpl
leaq 0x4c0f(%rip), %r14      # 0x30a54
movq %r14, %rdi
xorl %eax, %eax
callq 0x4070
movzbl %bpl, %ebp
movw %bp, 0x1c(%rsp)
filds 0x1c(%rsp)
fldt 0x90(%rbx)
fadds 0x55b4(%rip)            # 0x3141c
incb %bpl
fucompi %st(1), %st
fstp %st(0)
ja 0x2be45
movl $0xa, %edi
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4500
nop