// File: Albuso0[P]support/main_test.cpp
// Function: main
int main()
{
    double pmin = 1e-5;

    // Configure estimator
    Support support( pmin );
    // Optional parameters configuration
    support.setDegree( 5 ); 
    support.setInterval( 6 ); 
    print_param(support); // print parameters

    // Input fingerprint from file
    support.setFin("fin_sample.txt"); // fingerprint of 3000 samples generated from uniform[100000]
    print_results(support); // print estimation results

    // Input fingerprint inline
    std::vector<int> freq, cnt;
    freq.push_back(1); cnt.push_back(2910); 
    freq.push_back(2); cnt.push_back(45);
    support.setFin(freq, cnt);
    print_results(support);

    // Input histogram from file
    support.setHist("hist_sample.txt"); // histogram of 3000 samples generated from uniform[100000]
    print_results(support);
    
    // Input histogram inline
    std::vector<unsigned> hist;
    for (int i = 0; i < 2910; i++) hist.push_back(1);
    for (int i = 0; i < 45; i++) hist.push_back(2);
    support.setHist(hist);
    print_results(support);

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movl $0x0, -0x4(%rbp)
movabsq $0x3ee4f8b588e368f1, %rax # imm = 0x3EE4F8B588E368F1
movq %rax, -0x10(%rbp)
movsd -0x10(%rbp), %xmm0
leaq -0x50(%rbp), %rdi
movq %rdi, -0x120(%rbp)
callq 0x2ed0
movq -0x120(%rbp), %rdi
movl $0x5, %esi
callq 0x39b0
jmp 0x6b58
leaq -0x50(%rbp), %rdi
movsd 0x256c(%rip), %xmm0     # 0x90d0
callq 0x39d0
jmp 0x6b6b
leaq -0x50(%rbp), %rdi
callq 0x6ed0
jmp 0x6b76
leaq -0x81(%rbp), %rdi
movq %rdi, -0x128(%rbp)
callq 0x22f0
movq -0x128(%rbp), %rdx
leaq 0x2541(%rip), %rsi      # 0x90d8
leaq -0x80(%rbp), %rdi
callq 0x6fe0
jmp 0x6ba2
leaq -0x50(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x2f90
jmp 0x6bb1
leaq -0x80(%rbp), %rdi
callq 0x20f0
leaq -0x81(%rbp), %rdi
callq 0x2200
leaq -0x50(%rbp), %rdi
callq 0x6f60
jmp 0x6bd1
leaq -0xa0(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x7090
leaq -0xb8(%rbp), %rdi
callq 0x7090
movq -0x130(%rbp), %rdi
movl $0x1, -0xbc(%rbp)
leaq -0xbc(%rbp), %rsi
callq 0x70b0
jmp 0x6c0f
movl $0xb5e, -0xc0(%rbp)     # imm = 0xB5E
leaq -0xb8(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x70b0
jmp 0x6c2e
movl $0x2, -0xc4(%rbp)
leaq -0xa0(%rbp), %rdi
leaq -0xc4(%rbp), %rsi
callq 0x70b0
jmp 0x6c4d
movl $0x2d, -0xc8(%rbp)
leaq -0xb8(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x70b0
jmp 0x6c6c
leaq -0x50(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
leaq -0xb8(%rbp), %rdx
callq 0x3120
jmp 0x6c85
leaq -0x50(%rbp), %rdi
callq 0x6f60
jmp 0x6c90
leaq -0xe9(%rbp), %rdi
movq %rdi, -0x138(%rbp)
callq 0x22f0
movq -0x138(%rbp), %rdx
leaq 0x2436(%rip), %rsi      # 0x90e7
leaq -0xe8(%rbp), %rdi
callq 0x6fe0
jmp 0x6cbf
leaq -0x50(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x3480
jmp 0x6cd1
leaq -0xe8(%rbp), %rdi
callq 0x20f0
leaq -0xe9(%rbp), %rdi
callq 0x2200
leaq -0x50(%rbp), %rdi
callq 0x6f60
jmp 0x6cf4
leaq -0x108(%rbp), %rdi
callq 0x70e0
movl $0x0, -0x10c(%rbp)
cmpl $0xb5e, -0x10c(%rbp)    # imm = 0xB5E
jge 0x6df6
movl $0x1, -0x110(%rbp)
leaq -0x108(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x7100
jmp 0x6d39
jmp 0x6d3b
movl -0x10c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10c(%rbp)
jmp 0x6d0a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x6eb0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x6d80
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x20f0
leaq -0x81(%rbp), %rdi
callq 0x2200
jmp 0x6eb0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x6e98
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x6dc8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x20f0
leaq -0xe9(%rbp), %rdi
callq 0x2200
jmp 0x6e98
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x7130
jmp 0x6e98
movl $0x0, -0x114(%rbp)
cmpl $0x2d, -0x114(%rbp)
jge 0x6e3b
movl $0x2, -0x118(%rbp)
leaq -0x108(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0x7100
jmp 0x6e28
jmp 0x6e2a
movl -0x114(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x114(%rbp)
jmp 0x6e00
leaq -0x50(%rbp), %rdi
leaq -0x108(%rbp), %rsi
callq 0x31f0
jmp 0x6e4d
leaq -0x50(%rbp), %rdi
callq 0x6f60
jmp 0x6e58
movl $0x0, -0x4(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x7130
leaq -0xb8(%rbp), %rdi
callq 0x7190
leaq -0xa0(%rbp), %rdi
callq 0x7190
leaq -0x50(%rbp), %rdi
callq 0x3df0
movl -0x4(%rbp), %eax
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
leaq -0xb8(%rbp), %rdi
callq 0x7190
leaq -0xa0(%rbp), %rdi
callq 0x7190
leaq -0x50(%rbp), %rdi
callq 0x3df0
movq -0x58(%rbp), %rdi
callq 0x22e0
nopw %cs:(%rax,%rax)