// File: /workspace/github_cpp_makefile_star2_O3/umatin[P]LogarithmicErrorRegression/./src/helpers/io_handler.h
// Function: parse_arguments(int, char**)
std::vector<double> parse_arguments(int argc, char *argv[]){
    if(argc < 3){
        std::cout << "Specify Dataset and Size" << std::endl;
        std::cout << "Available option are:" << std::endl;
        std::cout << "path_to_dataset" << std::endl;
        std::cout << "rand" << std::endl;
        std::cout << "normal" << std::endl;
        std::cout << "lognormal" << std::endl;
        std::cout << "randint" << std::endl;
        std::cout << "debug" << std::endl;
        std::cout << "exp" << std::endl;
        std::cout << "outlier" << std::endl;
        exit(0);
    }
    
    long num_data = strtol(argv[2], nullptr, 0);
    std::vector<double> data;

    std::random_device rd;
    std::mt19937 gen(rd());
    
    if(strcmp(argv[1],"rand") == 0){
        std::uniform_real_distribution<double> dis(0, 2147483647);
        for (long i = 0; i < num_data; i++){
            data.push_back(dis(gen));
        }
    }
    else if(strcmp(argv[1],"normal") == 0){
        std::normal_distribution<double> dis(0.0,4.0);
        for (long i = 0; i < num_data; i++){
            data.push_back(dis(gen));
        }
    }
    else if(strcmp(argv[1],"lognormal") == 0){
        std::lognormal_distribution<double> dis(0.0, 4.0);
        for (long i = 0; i < num_data; i++){
            data.push_back(dis(gen));
        }
    }
    else if(strcmp(argv[1],"randint") == 0){
        for (long i = 0; i < num_data; i++){
            long val = rand();
            data.push_back(val);
        }
    }
    else if(strcmp(argv[1],"debug") == 0){
        for (long i = 0; i < num_data; i++){
            long val = rand()%30;
            data.push_back(val);
        }
    }
    else if(strcmp(argv[1],"randfixed") == 0){
        for (long i = 0; i < num_data; i++){
            std::uniform_real_distribution<double> dis(0, 10000);
            data.push_back(dis(gen));
        }
    }
    else if(strcmp(argv[1],"exp") == 0){
        for (long i = 0; i < num_data; i++){
            long val = std::pow(2,i);
            data.push_back(val);
        }
    }
    else if(strcmp(argv[1],"manual") == 0){
        for (long i = 2; i < argc; i++){
            data.push_back(strtol(argv[i], nullptr, 0));
        }
        std::cout << data.size() << std::endl;
        std::sort(data.begin(), data.end());
        return data;
    }
    else if(strcmp(argv[1],"outlier") == 0){
        int num_outliers = 1;
        for (long i = 0; i < num_data - num_outliers; i++){
            std::uniform_real_distribution<double> dis(0, 100000);
            data.push_back(dis(gen));
        }
        for (long i = 0; i < num_outliers; i++){
            std::uniform_real_distribution<double> dis(200000000000000, 300000000000000);
            data.push_back(dis(gen));
        }
    }
    else{
        if (cache_data.size() == 0){
            std::cout << argv[1] << "\n";
            cache_data = load_data<u_int64_t>(argv[1]);
        }

        data.reserve(num_data);
        std::uniform_int_distribution<long> dis(0, std::max<long>((long)cache_data.size()-1-num_data, 0));
        int start = dis(gen);
        for(long i = 0; cache_data[i] < LONG_MAX && i < num_data && i < cache_data.size(); i++){
            data.push_back((double)cache_data[start+i]);
        }
    }
    std::sort(data.begin(), data.end());
    //data.erase( unique( data.begin(), data.end() ), data.end() );
    //std::sort(data.begin(), data.end());
    return data;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2758, %rsp           # imm = 0x2758
cmpl $0x2, %esi
jle 0x3679
movq %rdi, %rbx
movq 0x10(%rdx), %rdi
movq %rdx, %r15
movl %esi, %ebp
xorl %esi, %esi
xorl %edx, %edx
callq 0x22c0
vxorpd %xmm0, %xmm0, %xmm0
movq %rax, %r14
movq $0x0, 0x10(%rbx)
vmovupd %xmm0, (%rbx)
leaq 0x13d0(%rsp), %rdi
callq 0x4b00
leaq 0x13d0(%rsp), %rdi
callq 0x22a0
movl $0x1, %ecx
movl %eax, %eax
movq %rax, 0x48(%rsp)
movq %rax, %rdx
shrq $0x1e, %rdx
xorl %eax, %edx
imull $0x6c078965, %edx, %eax # imm = 0x6C078965
addl %ecx, %eax
movq %rax, 0x48(%rsp,%rcx,8)
incq %rcx
cmpq $0x270, %rcx            # imm = 0x270
jne 0x2fbc
movq $0x270, 0x13c8(%rsp) # imm = 0x270
leaq 0x723e(%rip), %rsi      # 0xa22f
movq 0x8(%r15), %r12
movq %r12, %rdi
callq 0x22b0
testl %eax, %eax
je 0x3219
leaq 0x722b(%rip), %rsi      # 0xa237
movq %r12, %rdi
callq 0x22b0
testl %eax, %eax
je 0x3278
leaq 0x7211(%rip), %rsi      # 0xa234
movq %r12, %rdi
callq 0x22b0
testl %eax, %eax
je 0x32f1
leaq 0x7204(%rip), %rsi      # 0xa23e
movq %r12, %rdi
callq 0x22b0
testl %eax, %eax
je 0x3387
leaq 0x71f5(%rip), %rsi      # 0xa246
movq %r12, %rdi
callq 0x22b0
testl %eax, %eax
je 0x33d1
leaq 0x71f0(%rip), %rsi      # 0xa258
movq %r12, %rdi
callq 0x22b0
testl %eax, %eax
je 0x343f
leaq 0x71cd(%rip), %rsi      # 0xa24c
movq %r12, %rdi
callq 0x22b0
testl %eax, %eax
je 0x349e
leaq 0x71cc(%rip), %rsi      # 0xa262
movq %r12, %rdi
callq 0x22b0
testl %eax, %eax
je 0x34f9
leaq 0x71a3(%rip), %rsi      # 0xa250
movq %r12, %rdi
callq 0x22b0
testl %eax, %eax
je 0x357a
movq 0xa154(%rip), %rax      # 0xd218
cmpq 0xa145(%rip), %rax      # 0xd210
jne 0x3127
movq 0x9efc(%rip), %rdi      # 0xcfd0
movq %r12, %rsi
callq 0x2240
leaq 0x7186(%rip), %rsi      # 0xa269
movl $0x1, %edx
movq %rax, %rdi
callq 0x2270
movq 0x8(%r15), %rsi
leaq 0x10(%rsp), %rdi
callq 0x37c2
leaq 0x10(%rsp), %r15
leaq 0xa106(%rip), %rdi      # 0xd210
movq %r15, %rsi
callq 0x8250
movq (%r15), %rdi
testq %rdi, %rdi
je 0x3127
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2260
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4bb6
movq 0xa0df(%rip), %rax      # 0xd218
movq %r14, %rcx
notq %rcx
leaq 0x10(%rsp), %rdi
subq 0xa0c5(%rip), %rax      # 0xd210
movq $0x0, (%rdi)
sarq $0x3, %rax
addq %rax, %rcx
movq %rcx, %rax
sarq $0x3f, %rax
andnq %rcx, %rax, %rax
movq %rax, 0x8(%rdi)
leaq 0x48(%rsp), %rsi
movq %rdi, %rdx
callq 0x828c
movq 0xa093(%rip), %rcx      # 0xd210
movabsq $0x7fffffffffffffff, %r12 # imm = 0x7FFFFFFFFFFFFFFF
cmpq %r12, (%rcx)
setb %dl
testq %r14, %r14
setg %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x361a
movslq %eax, %r13
leaq 0x8(%rsp), %r15
xorl %ebp, %ebp
shlq $0x3, %r13
movq 0xa062(%rip), %rax      # 0xd218
subq %rcx, %rax
sarq $0x3, %rax
cmpq %rax, %rbp
jae 0x361a
leaq (%rcx,%r13), %rax
vcvtusi2sdq (%rax,%rbp,8), %xmm1, %xmm0
movq 0x8(%rbx), %rsi
vmovsd %xmm0, 0x8(%rsp)
cmpq 0x10(%rbx), %rsi
je 0x31ef
vmovsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x3201
movq %rbx, %rdi
movq %r15, %rdx
callq 0x7b04
movq 0xa00f(%rip), %rcx      # 0xd210
cmpq %r12, 0x8(%rcx,%rbp,8)
jae 0x361a
incq %rbp
cmpq %r14, %rbp
jl 0x31af
jmp 0x361a
testq %r14, %r14
jle 0x361a
leaq 0x48(%rsp), %r15
leaq 0x10(%rsp), %r12
movq %r15, %rdi
callq 0x782f
vmovsd 0x6e14(%rip), %xmm1     # 0xa050
vfmadd213sd 0x6e13(%rip), %xmm1, %xmm0 # xmm0 = (xmm1 * xmm0) + mem
movq 0x8(%rbx), %rsi
vmovsd %xmm0, 0x10(%rsp)
cmpq 0x10(%rbx), %rsi
je 0x3263
vmovsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x326e
movq %rbx, %rdi
movq %r12, %rdx
callq 0x7b04
decq %r14
jne 0x322c
jmp 0x361a
vxorpd %xmm0, %xmm0, %xmm0
vmovhpd 0x6dc4(%rip), %xmm0, %xmm0 # xmm0 = xmm0[0],mem[0]
vmovapd %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movb $0x0, 0x28(%rsp)
testq %r14, %r14
jle 0x361a
leaq 0x48(%rsp), %r15
leaq 0x10(%rsp), %r12
leaq 0x8(%rsp), %r13
movq %r12, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x7c20
movq 0x8(%rbx), %rsi
vmovsd %xmm0, 0x8(%rsp)
cmpq 0x10(%rbx), %rsi
je 0x32dc
vmovsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x32e7
movq %rbx, %rdi
movq %r13, %rdx
callq 0x7b04
decq %r14
jne 0x32b0
jmp 0x361a
vmovapd 0x6de7(%rip), %ymm0     # 0xa0e0
vmovupd %ymm0, 0x10(%rsp)
movq $0x0, 0x30(%rsp)
movb $0x0, 0x38(%rsp)
testq %r14, %r14
jle 0x361a
leaq 0x20(%rsp), %r15
leaq 0x48(%rsp), %r12
leaq 0x8(%rsp), %r13
vmovsd 0x18(%rsp), %xmm0
vmovsd %xmm0, 0x40(%rsp)
movq %r15, %rdi
movq %r12, %rsi
movq %r15, %rdx
vzeroupper
callq 0x7c20
vmovsd 0x40(%rsp), %xmm1
vfmadd213sd 0x10(%rsp), %xmm1, %xmm0 # xmm0 = (xmm1 * xmm0) + mem
callq 0x2380
movq 0x8(%rbx), %rsi
vmovsd %xmm0, 0x8(%rsp)
cmpq 0x10(%rbx), %rsi
je 0x3372
vmovsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x337d
movq %rbx, %rdi
movq %r13, %rdx
callq 0x7b04
decq %r14
jne 0x3325
jmp 0x361a
testq %r14, %r14
jle 0x361a
leaq 0x10(%rsp), %r15
callq 0x2080
movq 0x8(%rbx), %rsi
vcvtsi2sd %eax, %xmm1, %xmm0
vmovsd %xmm0, 0x10(%rsp)
cmpq 0x10(%rbx), %rsi
je 0x33bc
vmovsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x33c7
movq %rbx, %rdi
movq %r15, %rdx
callq 0x7b04
decq %r14
jne 0x3395
jmp 0x361a
testq %r14, %r14
jle 0x361a
leaq 0x10(%rsp), %r15
callq 0x2080
cltq
movq 0x8(%rbx), %rsi
imulq $-0x77777777, %rax, %rcx # imm = 0x88888889
shrq $0x20, %rcx
addl %eax, %ecx
movl %ecx, %edx
shrl $0x1f, %edx
sarl $0x4, %ecx
addl %edx, %ecx
movl %ecx, %edx
shll $0x5, %edx
addl %ecx, %ecx
subl %edx, %ecx
addl %eax, %ecx
vcvtsi2sd %ecx, %xmm1, %xmm0
vmovsd %xmm0, 0x10(%rsp)
cmpq 0x10(%rbx), %rsi
je 0x342a
vmovsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x3435
movq %rbx, %rdi
movq %r15, %rdx
callq 0x7b04
decq %r14
jne 0x33df
jmp 0x361a
testq %r14, %r14
jle 0x361a
leaq 0x48(%rsp), %r15
leaq 0x10(%rsp), %r12
movq %r15, %rdi
callq 0x782f
vmovsd 0x6bde(%rip), %xmm1     # 0xa040
vfmadd213sd 0x6bed(%rip), %xmm1, %xmm0 # xmm0 = (xmm1 * xmm0) + mem
movq 0x8(%rbx), %rsi
vmovsd %xmm0, 0x10(%rsp)
cmpq 0x10(%rbx), %rsi
je 0x3489
vmovsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x3494
movq %rbx, %rdi
movq %r12, %rdx
callq 0x7b04
decq %r14
jne 0x3452
jmp 0x361a
testq %r14, %r14
jle 0x361a
leaq 0x10(%rsp), %r15
xorl %r12d, %r12d
vcvtsi2sd %r12, %xmm1, %xmm0
callq 0x21e0
vcvttsd2si %xmm0, %rax
movq 0x8(%rbx), %rsi
vcvtsi2sd %rax, %xmm1, %xmm0
vmovsd %xmm0, 0x10(%rsp)
cmpq 0x10(%rbx), %rsi
je 0x34e1
vmovsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x34ec
movq %rbx, %rdi
movq %r15, %rdx
callq 0x7b04
incq %r12
cmpq %r12, %r14
jne 0x34af
jmp 0x361a
movl $0x2, %r13d
leaq 0x10(%rsp), %r14
movl %ebp, %r12d
movq (%r15,%r13,8), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x22c0
movq 0x8(%rbx), %rsi
vcvtsi2sd %rax, %xmm1, %xmm0
vmovsd %xmm0, 0x10(%rsp)
cmpq 0x10(%rbx), %rsi
je 0x3537
vmovsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x3542
movq %rbx, %rdi
movq %r14, %rdx
callq 0x7b04
incq %r13
cmpq %r13, %r12
jne 0x3507
movq 0x8(%rbx), %rsi
subq (%rbx), %rsi
sarq $0x3, %rsi
movq 0x9a74(%rip), %rdi      # 0xcfd0
callq 0x2140
movq %rax, %rdi
callq 0x20f0
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
callq 0x4b7a
jmp 0x3654
cmpq $0x2, %r14
jl 0x35d4
decq %r14
leaq 0x48(%rsp), %r15
leaq 0x10(%rsp), %r12
movq %r15, %rdi
callq 0x782f
vmovsd 0x6a8b(%rip), %xmm1     # 0xa028
vfmadd213sd 0x6ab2(%rip), %xmm1, %xmm0 # xmm0 = (xmm1 * xmm0) + mem
movq 0x8(%rbx), %rsi
vmovsd %xmm0, 0x10(%rsp)
cmpq 0x10(%rbx), %rsi
je 0x35c4
vmovsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x35cf
movq %rbx, %rdi
movq %r12, %rdx
callq 0x7b04
decq %r14
jne 0x358d
leaq 0x48(%rsp), %rdi
callq 0x782f
vmovsd 0x6a4a(%rip), %xmm1     # 0xa030
movq 0x8(%rbx), %rsi
vfmadd213sd 0x6a45(%rip), %xmm0, %xmm1 # xmm1 = (xmm0 * xmm1) + mem
vmovsd %xmm1, 0x10(%rsp)
cmpq 0x10(%rbx), %rsi
je 0x360d
vmovsd %xmm1, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x361a
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x7b04
movq (%rbx), %r14
movq 0x8(%rbx), %r15
cmpq %r15, %r14
je 0x3654
movq %r15, %rax
subq %r14, %rax
sarq $0x3, %rax
lzcntq %rax, %rdx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r14, %rdi
movq %r15, %rsi
vzeroupper
callq 0x7d10
movq %r14, %rdi
movq %r15, %rsi
callq 0x7e09
leaq 0x13d0(%rsp), %rdi
vzeroupper
callq 0x2200
movq %rbx, %rax
addq $0x2758, %rsp           # imm = 0x2758
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x9950(%rip), %rbx      # 0xcfd0
leaq 0x6b69(%rip), %rsi      # 0xa1f0
movq %rbx, %rdi
callq 0x2240
movq %rax, %rdi
callq 0x20f0
leaq 0x6b6b(%rip), %rsi      # 0xa209
movq %rbx, %rdi
callq 0x2240
movq %rax, %rdi
callq 0x20f0
leaq 0x6b6a(%rip), %rsi      # 0xa21f
movq %rbx, %rdi
callq 0x2240
movq %rax, %rdi
callq 0x20f0
leaq 0x6b63(%rip), %rsi      # 0xa22f
movq %rbx, %rdi
callq 0x2240
movq %rax, %rdi
callq 0x20f0
leaq 0x6b54(%rip), %rsi      # 0xa237
movq %rbx, %rdi
callq 0x2240
movq %rax, %rdi
callq 0x20f0
leaq 0x6b3a(%rip), %rsi      # 0xa234
movq %rbx, %rdi
callq 0x2240
movq %rax, %rdi
callq 0x20f0
leaq 0x6b2d(%rip), %rsi      # 0xa23e
movq %rbx, %rdi
callq 0x2240
movq %rax, %rdi
callq 0x20f0
leaq 0x6b1e(%rip), %rsi      # 0xa246
movq %rbx, %rdi
callq 0x2240
movq %rax, %rdi
callq 0x20f0
leaq 0x6b0d(%rip), %rsi      # 0xa24c
movq %rbx, %rdi
callq 0x2240
movq %rax, %rdi
callq 0x20f0
leaq 0x6afa(%rip), %rsi      # 0xa250
movq %rbx, %rdi
callq 0x2240
movq %rax, %rdi
callq 0x20f0
xorl %edi, %edi
callq 0x2280
jmp 0x378e
jmp 0x378e
jmp 0x378e
jmp 0x378e
jmp 0x378e
jmp 0x378e
jmp 0x378e
jmp 0x378e
jmp 0x378e
jmp 0x378e
jmp 0x37ba
movq %rax, %r14
jmp 0x379e
jmp 0x378e
jmp 0x378e
jmp 0x378e
movq %rax, %r14
leaq 0x13d0(%rsp), %rdi
callq 0x2200
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x37b2
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x2260
movq %r14, %rdi
callq 0x2360
movq %rax, %rdi
callq 0x725a