// File: /workspace/github_cpp_makefile_star2_O1/Albuso0[P]entropy/main.cpp
// Function: main
int main(int argc, char *argv[])
{
    int k =0 , L = 0, N = 0;
    double M = 0;
    std::string fin = "", hist = "";
    
    std::CommandLine cmd;
    cmd.AddValue ("k",  "Alphabet size", k);
    cmd.AddValue ("L",  "Polynoimal degree. Default c0*log(k)", L);
    cmd.AddValue ("M",  "M/n is the right-end of approximation interval. Default c1*log(k)", M);
    cmd.AddValue ("N",  "Threshold to apply polynomial estimator. Default c2*log(k)", N);
    cmd.AddValue ("fin",  "fingerprint data file", fin);
    cmd.AddValue ("hist",  "histogram data file", hist);
    cmd.Parse (argc, argv);
    if( k == 0 ) { std::cerr<<"Please input k!\n"; exit(1); }
    if( L == 0 ) L = 1.6*log(k); // Default value
    if( M == 0 ) M = 3.5*log(k); // Default value
    if( N == 0 ) N = 1.6*log(k); // Default value
    if( (hist=="") && (fin=="") ) { std::cerr<<"Please input fingerprint or histogram!\n"; exit(1); }

    printf("\n");
    // Set estimator
    Entropy entropy( k );
    entropy.setDegree( L ); 
    entropy.setInterval( M ); 
    entropy.setThreshold( N ); 
    print_param(entropy);

    // Input fingerprint from file
    if ( fin!="")
        entropy.setFin(fin);
    else
        entropy.setHist(hist);
    print_results(entropy);
    
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rsi, %rbx
movl %edi, %ebp
xorl %eax, %eax
movl %eax, 0x4(%rsp)
movl %eax, 0xc(%rsp)
movl %eax, 0x8(%rsp)
movq $0x0, 0x30(%rsp)
leaq 0xb8(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x1cfb(%rip), %r14      # 0x619b
leaq 0xa8(%rsp), %rdi
movq %r14, %rsi
movq %r14, %rdx
callq 0x4ee4
leaq 0xd8(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0xc8(%rsp), %rdi
movq %r14, %rsi
movq %r14, %rdx
callq 0x4ee4
leaq 0x90(%rsp), %rax
movq %rax, 0x8(%rax)
movq %rax, (%rax)
movq $0x0, 0x10(%rax)
leaq 0x48(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x1ba6(%rip), %rsi      # 0x60a0
leaq 0x1ba0(%rip), %rdx      # 0x60a1
leaq 0x38(%rsp), %rdi
callq 0x4ee4
leaq 0x20(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x1b87(%rip), %rsi      # 0x60a2
leaq 0x1b8d(%rip), %rdx      # 0x60af
leaq 0x10(%rsp), %rdi
callq 0x4ee4
leaq 0x90(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x10(%rsp), %rdx
leaq 0x4(%rsp), %rcx
callq 0x4c3e
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x455f
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x38(%rsp), %rdi
cmpq %r14, %rdi
je 0x4576
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3230
leaq 0x38(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x1b2b(%rip), %rsi      # 0x60b0
leaq 0x1b25(%rip), %rdx      # 0x60b1
callq 0x4ee4
leaq 0x10(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x1b12(%rip), %rsi      # 0x60b2
leaq 0x1b2f(%rip), %rdx      # 0x60d6
callq 0x4ee4
leaq 0x90(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x10(%rsp), %rdx
leaq 0xc(%rsp), %rcx
callq 0x4c3e
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x45df
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x38(%rsp), %rdi
cmpq %r14, %rdi
je 0x45f6
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3230
leaq 0x38(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x1ad2(%rip), %rsi      # 0x60d7
leaq 0x1acc(%rip), %rdx      # 0x60d8
callq 0x4ee4
leaq 0x10(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x1ab9(%rip), %rsi      # 0x60d9
leaq 0x1af3(%rip), %rdx      # 0x611a
callq 0x4ee4
leaq 0x90(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x10(%rsp), %rdx
leaq 0x30(%rsp), %rcx
callq 0x4cf0
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x465f
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x38(%rsp), %rdi
cmpq %r14, %rdi
je 0x4676
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3230
leaq 0x38(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x1a96(%rip), %rsi      # 0x611b
leaq 0x1a90(%rip), %rdx      # 0x611c
callq 0x4ee4
leaq 0x10(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x1a7d(%rip), %rsi      # 0x611d
leaq 0x1ab0(%rip), %rdx      # 0x6157
callq 0x4ee4
leaq 0x90(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x10(%rsp), %rdx
leaq 0x8(%rsp), %rcx
callq 0x4c3e
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x46df
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x38(%rsp), %rdi
cmpq %r14, %rdi
je 0x46f6
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3230
leaq 0x38(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x1a53(%rip), %rsi      # 0x6158
leaq 0x1a4f(%rip), %rdx      # 0x615b
callq 0x4ee4
leaq 0x10(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x1a3c(%rip), %rsi      # 0x615c
leaq 0x1a4a(%rip), %rdx      # 0x6171
callq 0x4ee4
leaq 0x90(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x10(%rsp), %rdx
leaq 0xa8(%rsp), %rcx
callq 0x4da2
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x4762
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x38(%rsp), %rdi
cmpq %r14, %rdi
je 0x4779
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3230
leaq 0x38(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x19ea(%rip), %rsi      # 0x6172
leaq 0x19e7(%rip), %rdx      # 0x6176
callq 0x4ee4
leaq 0x10(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x19d4(%rip), %rsi      # 0x6177
leaq 0x19e0(%rip), %rdx      # 0x618a
callq 0x4ee4
leaq 0x90(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x10(%rsp), %rdx
leaq 0xc8(%rsp), %rcx
callq 0x4da2
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x47e5
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x38(%rsp), %rdi
cmpq %r14, %rdi
je 0x47fc
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3230
leaq 0x90(%rsp), %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x534c
movl 0x4(%rsp), %eax
testl %eax, %eax
je 0x4a2f
cmpl $0x0, 0xc(%rsp)
jne 0x483a
cvtsi2sd %eax, %xmm0
callq 0x31d0
mulsd 0x185e(%rip), %xmm0     # 0x6090
cvttsd2si %xmm0, %eax
movl %eax, 0xc(%rsp)
movsd 0x30(%rsp), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x4868
jp 0x4868
xorps %xmm0, %xmm0
cvtsi2sdl 0x4(%rsp), %xmm0
callq 0x31d0
mulsd 0x1836(%rip), %xmm0     # 0x6098
movsd %xmm0, 0x30(%rsp)
cmpl $0x0, 0x8(%rsp)
jne 0x488d
xorps %xmm0, %xmm0
cvtsi2sdl 0x4(%rsp), %xmm0
callq 0x31d0
mulsd 0x180b(%rip), %xmm0     # 0x6090
cvttsd2si %xmm0, %eax
movl %eax, 0x8(%rsp)
leaq 0x1907(%rip), %rsi      # 0x619b
leaq 0xc8(%rsp), %rdi
callq 0x30c0
testl %eax, %eax
jne 0x48c1
leaq 0x18ef(%rip), %rsi      # 0x619b
leaq 0xa8(%rsp), %rdi
callq 0x30c0
testl %eax, %eax
je 0x4a44
movl $0xa, %edi
callq 0x32f0
movl 0x4(%rsp), %esi
leaq 0x38(%rsp), %rdi
callq 0x3f98
movl 0xc(%rsp), %esi
leaq 0x38(%rsp), %rdi
callq 0x3e28
movsd 0x30(%rsp), %xmm0
leaq 0x38(%rsp), %rdi
movsd %xmm0, 0x10(%rdi)
xorps %xmm0, %xmm0
cvtsi2sdl 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rdi)
callq 0x4b61
leaq 0x188a(%rip), %rsi      # 0x619b
leaq 0xa8(%rsp), %rdi
callq 0x30c0
testl %eax, %eax
je 0x496a
leaq 0x118(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0xa8(%rsp), %rsi
movq 0xb0(%rsp), %rdx
addq %rsi, %rdx
leaq 0x108(%rsp), %rdi
callq 0x4e54
leaq 0x38(%rsp), %rdi
leaq 0x108(%rsp), %rsi
callq 0x39bc
movq 0x108(%rsp), %rdi
jmp 0x49b0
leaq 0xf8(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0xc8(%rsp), %rsi
movq 0xd0(%rsp), %rdx
addq %rsi, %rdx
leaq 0xe8(%rsp), %rdi
callq 0x4e54
leaq 0x38(%rsp), %rdi
leaq 0xe8(%rsp), %rsi
callq 0x3c84
movq 0xe8(%rsp), %rdi
cmpq %r14, %rdi
je 0x49c0
movq (%r14), %rsi
incq %rsi
callq 0x3230
leaq 0x38(%rsp), %rdi
callq 0x4bcf
leaq 0x38(%rsp), %rdi
callq 0x3fb6
leaq 0x90(%rsp), %rdi
callq 0x59a0
movq 0xc8(%rsp), %rdi
cmpq %r12, %rdi
je 0x49fe
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0xa8(%rsp), %rdi
cmpq %r15, %rdi
je 0x4a1b
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x3230
xorl %eax, %eax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x45ba(%rip), %rdi      # 0x8ff0
leaq 0x174e(%rip), %rsi      # 0x618b
callq 0x3210
jmp 0x4a57
movq 0x45a5(%rip), %rdi      # 0x8ff0
leaq 0x174a(%rip), %rsi      # 0x619c
callq 0x3210
movl $0x1, %edi
callq 0x32a0
movq %rax, %rbx
movq 0xe8(%rsp), %rdi
cmpq %r14, %rdi
je 0x4b08
movq 0xf8(%rsp), %rsi
jmp 0x4a97
movq %rax, %rbx
movq 0x108(%rsp), %rdi
cmpq %r14, %rdi
je 0x4b08
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x4b08
jmp 0x4b00
jmp 0x4ac1
jmp 0x4add
jmp 0x4b00
jmp 0x4ac1
jmp 0x4add
jmp 0x4b00
jmp 0x4ac1
jmp 0x4add
jmp 0x4b00
jmp 0x4ac1
jmp 0x4add
jmp 0x4b00
jmp 0x4ac1
jmp 0x4add
jmp 0x4b00
movq %rax, %rbx
movq 0x10(%rsp), %rdi
cmpq %r13, %rdi
je 0x4ae0
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x4ae0
movq %rax, %rbx
movq 0x38(%rsp), %rdi
cmpq %r14, %rdi
je 0x4b12
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x3230
jmp 0x4b12
jmp 0x4b00
movq %rax, %rbx
jmp 0x4b3c
movq %rax, %rbx
jmp 0x4b12
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x3fb6
leaq 0x90(%rsp), %rdi
callq 0x59a0
movq 0xc8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4b3c
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0xa8(%rsp), %rdi
cmpq %r15, %rdi
je 0x4b59
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x3230
movq %rbx, %rdi
callq 0x33b0