// File: adamiaonr[P]rid-analytics/include/prob.h
// Function: Prob::Prob(long double, long double, unsigned char)
Prob(
        __float080 m,
        __float080 n,
        uint8_t iface_num) {

        // bf size and req. size (as bf fp rate params)
        this->m = m;
        this->n = n;
        // k : optimal nr. of hash functions for bfs
        this->k = (log(2) * ((__float080) this->m)) / ((__float080) this->n);

        this->iface_num = iface_num;

        // initialize prob arrays:
        //  - P(L_i = l | P_i = p)
        //  - P(L_(~i) = l | P_(~i) = p)
        // for (unsigned i = 0; i < this->iface_num; i++) {
        //     this->lm_cond_prob.push_back(std::vector<std::vector<__float080> > ((n + 1), std::vector<__float080> ((n + 1), 0.0)));
        //     this->lm_complement_cond_prob.push_back(std::vector<std::vector<__float080> > ((n + 1), std::vector<__float080> ((n + 1), 0.0)));
        // }

        //  - P(P_i = p) and P(P_(~i) = p)
        this->fptree_prob.push_back(std::vector<std::vector<__float080> > ((this->iface_num), std::vector<__float080> ((n + 1), 0.0)));
        this->fptree_prob.push_back(std::vector<std::vector<__float080> > ((this->iface_num), std::vector<__float080> ((n + 1), 0.0)));

        // mark largest match probs as 'not calc'ed'
        this->has_lm_prob = false;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x190, %rsp            # imm = 0x190
movb %sil, %al
fldt 0x20(%rbp)
fldt 0x10(%rbp)
movq %rdi, -0x8(%rbp)
fstpt -0x20(%rbp)
fstpt -0x30(%rbp)
movb %al, -0x31(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x118(%rbp)
movq %rdi, %rax
movq %rax, -0x140(%rbp)
callq 0x359b0
movq -0x118(%rbp), %rdi
addq $0x18, %rdi
movq %rdi, -0x138(%rbp)
callq 0x359b0
movq -0x118(%rbp), %rdi
addq $0x30, %rdi
movq %rdi, -0x130(%rbp)
callq 0x359d0
movq -0x118(%rbp), %rdi
addq $0x48, %rdi
movq %rdi, -0x128(%rbp)
callq 0x359d0
movq -0x118(%rbp), %rdi
addq $0x60, %rdi
movq %rdi, -0x120(%rbp)
callq 0x359b0
movq -0x118(%rbp), %rax
fldt -0x20(%rbp)
fstpt 0x80(%rax)
fldt -0x30(%rbp)
fstpt 0x90(%rax)
movl $0x2, %edi
callq 0x359f0
movsd %xmm0, -0x110(%rbp)
jmp 0x34514
movq -0x140(%rbp), %rax
movsd -0x110(%rbp), %xmm0
movsd %xmm0, -0xf8(%rbp)
fldl -0xf8(%rbp)
fldt 0x80(%rax)
fmulp %st, %st(1)
fldt 0x90(%rax)
fdivrp %st, %st(1)
fstpt 0xa0(%rax)
movb -0x31(%rbp), %cl
movb %cl, 0xb0(%rax)
movq %rax, %rcx
addq $0x60, %rcx
movq %rcx, -0x160(%rbp)
movzbl 0xb0(%rax), %eax
movq %rax, -0x158(%rbp)
fldt -0x30(%rbp)
fld1
faddp %st, %st(1)
flds 0x2f083(%rip)           # 0x635fc
fxch %st(1)
fucomi %st(1), %st
fldz
fld %st(0)
fcmovnb %st(3), %st
fstp %st(3)
fxch %st(1)
fsubp %st, %st(2)
setae %al
fnstcw -0x102(%rbp)
movzwl -0x102(%rbp), %ecx
orl $0xc00, %ecx            # imm = 0xC00
movw %cx, -0x104(%rbp)
fldcw -0x104(%rbp)
fxch %st(1)
fistpll -0xf0(%rbp)
fldcw -0x102(%rbp)
movzbl %al, %eax
movl %eax, %ecx
shlq $0x3f, %rcx
movq -0xf0(%rbp), %rax
xorq %rcx, %rax
movq %rax, -0x150(%rbp)
fstpt -0x90(%rbp)
leaq -0x91(%rbp), %rdi
movq %rdi, -0x148(%rbp)
callq 0x34a40
movq -0x150(%rbp), %rsi
movq -0x148(%rbp), %rcx
leaq -0x78(%rbp), %rdi
leaq -0x90(%rbp), %rdx
callq 0x34a60
jmp 0x3460d
leaq -0x92(%rbp), %rdi
movq %rdi, -0x168(%rbp)
callq 0x35a40
movq -0x158(%rbp), %rsi
movq -0x168(%rbp), %rcx
leaq -0x60(%rbp), %rdi
leaq -0x78(%rbp), %rdx
callq 0x35a60
jmp 0x3463d
movq -0x160(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x35a10
jmp 0x3464f
leaq -0x60(%rbp), %rdi
callq 0x35ae0
leaq -0x92(%rbp), %rdi
callq 0x35b40
leaq -0x78(%rbp), %rdi
callq 0x34b10
leaq -0x91(%rbp), %rdi
callq 0x34b70
movq -0x140(%rbp), %rax
movq %rax, %rcx
addq $0x60, %rcx
movq %rcx, -0x188(%rbp)
movzbl 0xb0(%rax), %eax
movq %rax, -0x180(%rbp)
fldt -0x30(%rbp)
fld1
faddp %st, %st(1)
flds 0x2ef53(%rip)           # 0x635fc
fxch %st(1)
fucomi %st(1), %st
fldz
fld %st(0)
fcmovnb %st(3), %st
fstp %st(3)
fxch %st(1)
fsubp %st, %st(2)
setae %al
fnstcw -0x106(%rbp)
movzwl -0x106(%rbp), %ecx
orl $0xc00, %ecx            # imm = 0xC00
movw %cx, -0x108(%rbp)
fldcw -0x108(%rbp)
fxch %st(1)
fistpll -0x100(%rbp)
fldcw -0x106(%rbp)
movzbl %al, %eax
movl %eax, %ecx
shlq $0x3f, %rcx
movq -0x100(%rbp), %rax
xorq %rcx, %rax
movq %rax, -0x178(%rbp)
fstpt -0xe0(%rbp)
leaq -0xe1(%rbp), %rdi
movq %rdi, -0x170(%rbp)
callq 0x34a40
movq -0x178(%rbp), %rsi
movq -0x170(%rbp), %rcx
leaq -0xc8(%rbp), %rdi
leaq -0xe0(%rbp), %rdx
callq 0x34a60
jmp 0x34740
leaq -0xe2(%rbp), %rdi
movq %rdi, -0x190(%rbp)
callq 0x35a40
movq -0x180(%rbp), %rsi
movq -0x190(%rbp), %rcx
leaq -0xb0(%rbp), %rdi
leaq -0xc8(%rbp), %rdx
callq 0x35a60
jmp 0x34776
movq -0x188(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x35a10
jmp 0x3478b
leaq -0xb0(%rbp), %rdi
callq 0x35ae0
leaq -0xe2(%rbp), %rdi
callq 0x35b40
leaq -0xc8(%rbp), %rdi
callq 0x34b10
leaq -0xe1(%rbp), %rdi
callq 0x34b70
movq -0x140(%rbp), %rax
movb $0x0, 0xb1(%rax)
addq $0x190, %rsp            # imm = 0x190
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x3488f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x34829
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x34814
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x35ae0
leaq -0x92(%rbp), %rdi
callq 0x35b40
leaq -0x78(%rbp), %rdi
callq 0x34b10
leaq -0x91(%rbp), %rdi
callq 0x34b70
jmp 0x3488f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x34883
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x3486b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x35ae0
leaq -0xe2(%rbp), %rdi
callq 0x35b40
leaq -0xc8(%rbp), %rdi
callq 0x34b10
leaq -0xe1(%rbp), %rdi
callq 0x34b70
movq -0x120(%rbp), %rdi
callq 0x35b60
movq -0x128(%rbp), %rdi
callq 0x35ae0
movq -0x130(%rbp), %rdi
callq 0x35ae0
movq -0x138(%rbp), %rdi
callq 0x35b60
movq -0x118(%rbp), %rdi
callq 0x35b60
movq -0x40(%rbp), %rdi
callq 0x5920
nopw %cs:(%rax,%rax)
nop