// File: Albuso0[P]support/main.cpp
// Function: main
int main(int argc, char *argv[])
{
    double pmin = 0;
    int L = 0;
    double M = 0;
    std::string fin = "", hist = "";
    
    std::CommandLine cmd;
    cmd.AddValue ("pmin",  "Minimum mass", pmin);
    cmd.AddValue ("L",  "Polynoimal degree. Default c0*log(1/pmin)", L);
    cmd.AddValue ("M",  "M/n is the right-end of approximation interval. Default c1*log(1/pmin)", M);
    cmd.AddValue ("fin",  "fingerprint data file", fin);
    cmd.AddValue ("hist",  "histogram data file", hist);
    cmd.Parse (argc, argv);
    if( pmin == 0 ) { std::cerr<<"Please input pmin!\n"; exit(1); }
    if( L == 0 ) L = 0.45*log(1/pmin); // Default value
    if( M == 0 ) M = 0.5*log(1/pmin);  // Default value
    if( (hist=="") && (fin=="") ) { std::cerr<<"Please input fingerprint or histogram!\n"; exit(1); }
    
    printf("\n");
    // Configure estimator
    Support support( pmin );  // set pmin
    support.setDegree( L );   // set degree    =L
    support.setInterval( M ); // set interval  =[pmin,M/n]
    print_param(support);

    // Input fingerprint from file
    if ( fin!="")
        support.setFin(fin);
    else
        support.setHist(hist);
    print_results(support);

    
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x320, %rsp            # imm = 0x320
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq $0x0, -0x28(%rbp)
leaq -0x49(%rbp), %rdi
movq %rdi, -0x2b8(%rbp)
callq 0x3450
movq -0x2b8(%rbp), %rdx
leaq 0x4256(%rip), %rsi      # 0xb204
leaq -0x48(%rbp), %rdi
callq 0x7970
jmp 0x6fb9
leaq -0x49(%rbp), %rdi
callq 0x3300
leaq -0x81(%rbp), %rdi
movq %rdi, -0x2c0(%rbp)
callq 0x3450
movq -0x2c0(%rbp), %rdx
leaq 0x4221(%rip), %rsi      # 0xb204
leaq -0x80(%rbp), %rdi
callq 0x7970
jmp 0x6fee
leaq -0x81(%rbp), %rdi
callq 0x3300
leaq -0xa0(%rbp), %rdi
callq 0x7a20
jmp 0x7008
leaq -0xc1(%rbp), %rdi
movq %rdi, -0x2c8(%rbp)
callq 0x3450
movq -0x2c8(%rbp), %rdx
leaq 0x4044(%rip), %rsi      # 0xb06d
leaq -0xc0(%rbp), %rdi
callq 0x7970
jmp 0x7037
leaq -0xe9(%rbp), %rdi
movq %rdi, -0x2d0(%rbp)
callq 0x3450
movq -0x2d0(%rbp), %rdx
leaq 0x401a(%rip), %rsi      # 0xb072
leaq -0xe8(%rbp), %rdi
callq 0x7970
jmp 0x7066
leaq -0xa0(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
leaq -0xe8(%rbp), %rdx
leaq -0x18(%rbp), %rcx
callq 0x7a40
jmp 0x7086
leaq -0xe8(%rbp), %rdi
callq 0x3190
leaq -0xe9(%rbp), %rdi
callq 0x3300
leaq -0xc0(%rbp), %rdi
callq 0x3190
leaq -0xc1(%rbp), %rdi
callq 0x3300
leaq -0x111(%rbp), %rdi
movq %rdi, -0x2d8(%rbp)
callq 0x3450
movq -0x2d8(%rbp), %rdx
leaq 0x3fa8(%rip), %rsi      # 0xb07f
leaq -0x110(%rbp), %rdi
callq 0x7970
jmp 0x70e5
leaq -0x139(%rbp), %rdi
movq %rdi, -0x2e0(%rbp)
callq 0x3450
movq -0x2e0(%rbp), %rdx
leaq 0x3f7b(%rip), %rsi      # 0xb081
leaq -0x138(%rbp), %rdi
callq 0x7970
jmp 0x7114
leaq -0xa0(%rbp), %rdi
leaq -0x110(%rbp), %rsi
leaq -0x138(%rbp), %rdx
leaq -0x1c(%rbp), %rcx
callq 0x7ae0
jmp 0x7134
leaq -0x138(%rbp), %rdi
callq 0x3190
leaq -0x139(%rbp), %rdi
callq 0x3300
leaq -0x110(%rbp), %rdi
callq 0x3190
leaq -0x111(%rbp), %rdi
callq 0x3300
leaq -0x161(%rbp), %rdi
movq %rdi, -0x2e8(%rbp)
callq 0x3450
movq -0x2e8(%rbp), %rdx
leaq 0x3f26(%rip), %rsi      # 0xb0ab
leaq -0x160(%rbp), %rdi
callq 0x7970
jmp 0x7193
leaq -0x189(%rbp), %rdi
movq %rdi, -0x2f0(%rbp)
callq 0x3450
movq -0x2f0(%rbp), %rdx
leaq 0x3ef9(%rip), %rsi      # 0xb0ad
leaq -0x188(%rbp), %rdi
callq 0x7970
jmp 0x71c2
leaq -0xa0(%rbp), %rdi
leaq -0x160(%rbp), %rsi
leaq -0x188(%rbp), %rdx
leaq -0x28(%rbp), %rcx
callq 0x7a40
jmp 0x71e2
leaq -0x188(%rbp), %rdi
callq 0x3190
leaq -0x189(%rbp), %rdi
callq 0x3300
leaq -0x160(%rbp), %rdi
callq 0x3190
leaq -0x161(%rbp), %rdi
callq 0x3300
leaq -0x1b1(%rbp), %rdi
movq %rdi, -0x2f8(%rbp)
callq 0x3450
movq -0x2f8(%rbp), %rdx
leaq 0x3ec1(%rip), %rsi      # 0xb0f4
leaq -0x1b0(%rbp), %rdi
callq 0x7970
jmp 0x7241
leaq -0x1d9(%rbp), %rdi
movq %rdi, -0x300(%rbp)
callq 0x3450
movq -0x300(%rbp), %rdx
leaq 0x3e96(%rip), %rsi      # 0xb0f8
leaq -0x1d8(%rbp), %rdi
callq 0x7970
jmp 0x7270
leaq -0xa0(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
leaq -0x1d8(%rbp), %rdx
leaq -0x48(%rbp), %rcx
callq 0x7b80
jmp 0x7290
leaq -0x1d8(%rbp), %rdi
callq 0x3190
leaq -0x1d9(%rbp), %rdi
callq 0x3300
leaq -0x1b0(%rbp), %rdi
callq 0x3190
leaq -0x1b1(%rbp), %rdi
callq 0x3300
leaq -0x201(%rbp), %rdi
movq %rdi, -0x308(%rbp)
callq 0x3450
movq -0x308(%rbp), %rdx
leaq 0x3e2d(%rip), %rsi      # 0xb10e
leaq -0x200(%rbp), %rdi
callq 0x7970
jmp 0x72ef
leaq -0x229(%rbp), %rdi
movq %rdi, -0x310(%rbp)
callq 0x3450
movq -0x310(%rbp), %rdx
leaq 0x3e03(%rip), %rsi      # 0xb113
leaq -0x228(%rbp), %rdi
callq 0x7970
jmp 0x731e
leaq -0xa0(%rbp), %rdi
leaq -0x200(%rbp), %rsi
leaq -0x228(%rbp), %rdx
leaq -0x80(%rbp), %rcx
callq 0x7b80
jmp 0x733e
leaq -0x228(%rbp), %rdi
callq 0x3190
leaq -0x229(%rbp), %rdi
callq 0x3300
leaq -0x200(%rbp), %rdi
callq 0x3190
leaq -0x201(%rbp), %rdi
callq 0x3300
movl -0x8(%rbp), %esi
movq -0x10(%rbp), %rdx
leaq -0xa0(%rbp), %rdi
callq 0x8ca0
jmp 0x7383
movsd -0x18(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x75e4
jp 0x75e4
movq 0x9c4e(%rip), %rdi      # 0x10ff0
leaq 0x3d7e(%rip), %rsi      # 0xb127
callq 0x3290
jmp 0x73b0
movl $0x1, %edi
callq 0x3360
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x49(%rbp), %rdi
callq 0x3300
jmp 0x784f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x81(%rbp), %rdi
callq 0x3300
jmp 0x7846
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x783d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x744e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x7436
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x3190
leaq -0xe9(%rbp), %rdi
callq 0x3300
leaq -0xc0(%rbp), %rdi
callq 0x3190
leaq -0xc1(%rbp), %rdi
callq 0x3300
jmp 0x7831
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x74ab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x7493
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x138(%rbp), %rdi
callq 0x3190
leaq -0x139(%rbp), %rdi
callq 0x3300
leaq -0x110(%rbp), %rdi
callq 0x3190
leaq -0x111(%rbp), %rdi
callq 0x3300
jmp 0x7831
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x7508
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x74f0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x188(%rbp), %rdi
callq 0x3190
leaq -0x189(%rbp), %rdi
callq 0x3300
leaq -0x160(%rbp), %rdi
callq 0x3190
leaq -0x161(%rbp), %rdi
callq 0x3300
jmp 0x7831
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x7565
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x754d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x1d8(%rbp), %rdi
callq 0x3190
leaq -0x1d9(%rbp), %rdi
callq 0x3300
leaq -0x1b0(%rbp), %rdi
callq 0x3190
leaq -0x1b1(%rbp), %rdi
callq 0x3300
jmp 0x7831
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x75c2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x75aa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x228(%rbp), %rdi
callq 0x3190
leaq -0x229(%rbp), %rdi
callq 0x3300
leaq -0x200(%rbp), %rdi
callq 0x3190
leaq -0x201(%rbp), %rdi
callq 0x3300
jmp 0x7831
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x7831
cmpl $0x0, -0x1c(%rbp)
jne 0x7612
movsd 0x3a2e(%rip), %xmm0     # 0xb020
divsd -0x18(%rbp), %xmm0
callq 0x3220
movaps %xmm0, %xmm1
movsd 0x3a29(%rip), %xmm0     # 0xb030
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x1c(%rbp)
movsd -0x28(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x7648
jp 0x7648
movsd 0x39f6(%rip), %xmm0     # 0xb020
divsd -0x18(%rbp), %xmm0
callq 0x3220
movaps %xmm0, %xmm1
movsd 0x39f9(%rip), %xmm0     # 0xb038
mulsd %xmm1, %xmm0
movsd %xmm0, -0x28(%rbp)
leaq 0x3bb5(%rip), %rsi      # 0xb204
leaq -0x80(%rbp), %rdi
callq 0x7c20
movb %al, -0x311(%rbp)
jmp 0x7660
movb -0x311(%rbp), %al
testb $0x1, %al
jne 0x766c
jmp 0x76af
leaq 0x3b91(%rip), %rsi      # 0xb204
leaq -0x48(%rbp), %rdi
callq 0x7c20
movb %al, -0x312(%rbp)
jmp 0x7684
movb -0x312(%rbp), %al
testb $0x1, %al
jne 0x7690
jmp 0x76af
movq 0x9959(%rip), %rdi      # 0x10ff0
leaq 0x3a9d(%rip), %rsi      # 0xb13b
callq 0x3290
jmp 0x76a5
movl $0x1, %edi
callq 0x3360
leaq 0x3b4d(%rip), %rdi      # 0xb203
xorl %eax, %eax
callq 0x3050
jmp 0x76bf
movsd -0x18(%rbp), %xmm0
leaq -0x270(%rbp), %rdi
callq 0x40a0
jmp 0x76d2
movl -0x1c(%rbp), %esi
leaq -0x270(%rbp), %rdi
callq 0x4b80
jmp 0x76e3
movsd -0x28(%rbp), %xmm0
leaq -0x270(%rbp), %rdi
callq 0x4ba0
jmp 0x76f6
leaq -0x270(%rbp), %rdi
callq 0x7860
jmp 0x7704
leaq 0x3af9(%rip), %rsi      # 0xb204
leaq -0x48(%rbp), %rdi
callq 0x7c50
movb %al, -0x313(%rbp)
jmp 0x771c
movb -0x313(%rbp), %al
testb $0x1, %al
jne 0x7728
jmp 0x778b
leaq -0x290(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x3110
jmp 0x773a
leaq -0x270(%rbp), %rdi
leaq -0x290(%rbp), %rsi
callq 0x4160
jmp 0x774f
leaq -0x290(%rbp), %rdi
callq 0x3190
jmp 0x77da
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x7825
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x290(%rbp), %rdi
callq 0x3190
jmp 0x7825
leaq -0x2b0(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x3110
jmp 0x779d
leaq -0x270(%rbp), %rdi
leaq -0x2b0(%rbp), %rsi
callq 0x4650
jmp 0x77b2
leaq -0x2b0(%rbp), %rdi
callq 0x3190
jmp 0x77da
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x2b0(%rbp), %rdi
callq 0x3190
jmp 0x7825
leaq -0x270(%rbp), %rdi
callq 0x78f0
jmp 0x77e8
movl $0x0, -0x4(%rbp)
leaq -0x270(%rbp), %rdi
callq 0x4fc0
leaq -0xa0(%rbp), %rdi
callq 0x9460
leaq -0x80(%rbp), %rdi
callq 0x3190
leaq -0x48(%rbp), %rdi
callq 0x3190
movl -0x4(%rbp), %eax
addq $0x320, %rsp            # imm = 0x320
popq %rbp
retq
leaq -0x270(%rbp), %rdi
callq 0x4fc0
leaq -0xa0(%rbp), %rdi
callq 0x9460
leaq -0x80(%rbp), %rdi
callq 0x3190
leaq -0x48(%rbp), %rdi
callq 0x3190
movq -0x58(%rbp), %rdi
callq 0x3440
nopl (%rax,%rax)