// File: /workspace/github_cpp_makefile_star2_O1/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 0x36da
movq %rdx, %r15
movl %esi, %ebp
movq %rdi, %rbx
movq 0x10(%rdx), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x22c0
movq %rax, %r14
vxorpd %xmm0, %xmm0, %xmm0
vmovupd %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
leaq 0x13d0(%rsp), %rdi
callq 0x4b62
leaq 0x13d0(%rsp), %rdi
callq 0x22a0
movl %eax, %eax
movq %rax, 0x48(%rsp)
movl $0x1, %ecx
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 0x301e
movq $0x270, 0x13c8(%rsp) # imm = 0x270
movq 0x8(%r15), %r12
leaq 0x7218(%rip), %rsi      # 0xa26f
movq %r12, %rdi
callq 0x22b0
testl %eax, %eax
je 0x327a
leaq 0x7209(%rip), %rsi      # 0xa277
movq %r12, %rdi
callq 0x22b0
testl %eax, %eax
je 0x32d9
leaq 0x71ef(%rip), %rsi      # 0xa274
movq %r12, %rdi
callq 0x22b0
testl %eax, %eax
je 0x3352
leaq 0x71e2(%rip), %rsi      # 0xa27e
movq %r12, %rdi
callq 0x22b0
testl %eax, %eax
je 0x33e8
leaq 0x71d3(%rip), %rsi      # 0xa286
movq %r12, %rdi
callq 0x22b0
testl %eax, %eax
je 0x3432
leaq 0x71ce(%rip), %rsi      # 0xa298
movq %r12, %rdi
callq 0x22b0
testl %eax, %eax
je 0x34a0
leaq 0x71ab(%rip), %rsi      # 0xa28c
movq %r12, %rdi
callq 0x22b0
testl %eax, %eax
je 0x34ff
leaq 0x71aa(%rip), %rsi      # 0xa2a2
movq %r12, %rdi
callq 0x22b0
testl %eax, %eax
je 0x355a
leaq 0x7181(%rip), %rsi      # 0xa290
movq %r12, %rdi
callq 0x22b0
testl %eax, %eax
je 0x35db
movq 0xb0f2(%rip), %rax      # 0xe218
cmpq 0xb0e3(%rip), %rax      # 0xe210
jne 0x3189
movq 0xae9a(%rip), %rdi      # 0xdfd0
movq %r12, %rsi
callq 0x2240
leaq 0x7164(%rip), %rsi      # 0xa2a9
movl $0x1, %edx
movq %rax, %rdi
callq 0x2270
movq 0x8(%r15), %rsi
leaq 0x10(%rsp), %rdi
callq 0x3823
leaq 0xb0a9(%rip), %rdi      # 0xe210
leaq 0x10(%rsp), %r15
movq %r15, %rsi
callq 0x82c2
movq (%r15), %rdi
testq %rdi, %rdi
je 0x3189
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2260
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4c18
movq 0xb07d(%rip), %rax      # 0xe218
subq 0xb06e(%rip), %rax      # 0xe210
sarq $0x3, %rax
movq %r14, %rcx
notq %rcx
addq %rax, %rcx
movq %rcx, %rax
sarq $0x3f, %rax
andnq %rcx, %rax, %rax
leaq 0x10(%rsp), %rdi
movq $0x0, (%rdi)
movq %rax, 0x8(%rdi)
leaq 0x48(%rsp), %rsi
movq %rdi, %rdx
callq 0x82fe
movabsq $0x7fffffffffffffff, %r12 # imm = 0x7FFFFFFFFFFFFFFF
movq 0xb027(%rip), %rcx      # 0xe210
cmpq %r12, (%rcx)
setb %dl
testq %r14, %r14
setg %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x367b
movslq %eax, %r13
shlq $0x3, %r13
xorl %ebp, %ebp
leaq 0x8(%rsp), %r15
movq 0xb000(%rip), %rax      # 0xe218
subq %rcx, %rax
sarq $0x3, %rax
cmpq %rax, %rbp
jae 0x367b
addq %r13, %rcx
vcvtusi2sdq (%rcx,%rbp,8), %xmm1, %xmm0
vmovsd %xmm0, 0x8(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x3250
vmovsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x325b
movq %rbx, %rdi
movq %r15, %rdx
callq 0x7b5a
movq 0xafae(%rip), %rcx      # 0xe210
cmpq %r12, 0x8(%rcx,%rbp,8)
jae 0x367b
incq %rbp
cmpq %r14, %rbp
jl 0x3211
jmp 0x367b
testq %r14, %r14
jle 0x367b
leaq 0x48(%rsp), %r15
leaq 0x10(%rsp), %r12
movq %r15, %rdi
callq 0x78a2
vmovsd 0x6db3(%rip), %xmm1     # 0xa050
vfmadd213sd 0x6db2(%rip), %xmm1, %xmm0 # xmm0 = (xmm1 * xmm0) + mem
vmovsd %xmm0, 0x10(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x32c4
vmovsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x32cf
movq %rbx, %rdi
movq %r12, %rdx
callq 0x7b5a
decq %r14
jne 0x328d
jmp 0x367b
vxorpd %xmm0, %xmm0, %xmm0
vmovhpd 0x6d63(%rip), %xmm0, %xmm0 # xmm0 = xmm0[0],mem[0]
vmovapd %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movb $0x0, 0x28(%rsp)
testq %r14, %r14
jle 0x367b
leaq 0x48(%rsp), %r15
leaq 0x10(%rsp), %r12
leaq 0x8(%rsp), %r13
movq %r12, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x7c76
vmovsd %xmm0, 0x8(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x333d
vmovsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x3348
movq %rbx, %rdi
movq %r13, %rdx
callq 0x7b5a
decq %r14
jne 0x3311
jmp 0x367b
vmovapd 0x6d86(%rip), %ymm0     # 0xa0e0
vmovupd %ymm0, 0x10(%rsp)
movq $0x0, 0x30(%rsp)
movb $0x0, 0x38(%rsp)
testq %r14, %r14
jle 0x367b
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 0x7c76
vmovsd 0x40(%rsp), %xmm1
vfmadd213sd 0x10(%rsp), %xmm1, %xmm0 # xmm0 = (xmm1 * xmm0) + mem
callq 0x2380
vmovsd %xmm0, 0x8(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x33d3
vmovsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x33de
movq %rbx, %rdi
movq %r13, %rdx
callq 0x7b5a
decq %r14
jne 0x3386
jmp 0x367b
testq %r14, %r14
jle 0x367b
leaq 0x10(%rsp), %r15
callq 0x2080
vcvtsi2sd %eax, %xmm1, %xmm0
vmovsd %xmm0, 0x10(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x341d
vmovsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x3428
movq %rbx, %rdi
movq %r15, %rdx
callq 0x7b5a
decq %r14
jne 0x33f6
jmp 0x367b
testq %r14, %r14
jle 0x367b
leaq 0x10(%rsp), %r15
callq 0x2080
cltq
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)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x348b
vmovsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x3496
movq %rbx, %rdi
movq %r15, %rdx
callq 0x7b5a
decq %r14
jne 0x3440
jmp 0x367b
testq %r14, %r14
jle 0x367b
leaq 0x48(%rsp), %r15
leaq 0x10(%rsp), %r12
movq %r15, %rdi
callq 0x78a2
vmovsd 0x6b7d(%rip), %xmm1     # 0xa040
vfmadd213sd 0x6b8c(%rip), %xmm1, %xmm0 # xmm0 = (xmm1 * xmm0) + mem
vmovsd %xmm0, 0x10(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x34ea
vmovsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x34f5
movq %rbx, %rdi
movq %r12, %rdx
callq 0x7b5a
decq %r14
jne 0x34b3
jmp 0x367b
testq %r14, %r14
jle 0x367b
xorl %r12d, %r12d
leaq 0x10(%rsp), %r15
vcvtsi2sd %r12, %xmm1, %xmm0
callq 0x21e0
vcvttsd2si %xmm0, %rax
vcvtsi2sd %rax, %xmm1, %xmm0
vmovsd %xmm0, 0x10(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x3542
vmovsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x354d
movq %rbx, %rdi
movq %r15, %rdx
callq 0x7b5a
incq %r12
cmpq %r12, %r14
jne 0x3510
jmp 0x367b
movl %ebp, %r12d
movl $0x2, %r13d
leaq 0x10(%rsp), %r14
movq (%r15,%r13,8), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x22c0
vcvtsi2sd %rax, %xmm1, %xmm0
vmovsd %xmm0, 0x10(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x3598
vmovsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x35a3
movq %rbx, %rdi
movq %r14, %rdx
callq 0x7b5a
incq %r13
cmpq %r13, %r12
jne 0x3568
movq 0x8(%rbx), %rsi
subq (%rbx), %rsi
sarq $0x3, %rsi
movq 0xaa13(%rip), %rdi      # 0xdfd0
callq 0x2140
movq %rax, %rdi
callq 0x20f0
movq (%rbx), %rdi
movq 0x8(%rbx), %rsi
callq 0x4bdc
jmp 0x36b5
cmpq $0x2, %r14
jl 0x3635
decq %r14
leaq 0x48(%rsp), %r15
leaq 0x10(%rsp), %r12
movq %r15, %rdi
callq 0x78a2
vmovsd 0x6a2a(%rip), %xmm1     # 0xa028
vfmadd213sd 0x6a51(%rip), %xmm1, %xmm0 # xmm0 = (xmm1 * xmm0) + mem
vmovsd %xmm0, 0x10(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x3625
vmovsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x3630
movq %rbx, %rdi
movq %r12, %rdx
callq 0x7b5a
decq %r14
jne 0x35ee
leaq 0x48(%rsp), %rdi
callq 0x78a2
vmovsd 0x69e9(%rip), %xmm1     # 0xa030
vfmadd213sd 0x69e8(%rip), %xmm0, %xmm1 # xmm1 = (xmm0 * xmm1) + mem
vmovsd %xmm1, 0x10(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x366e
vmovsd %xmm1, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x367b
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x7b5a
movq (%rbx), %r14
movq 0x8(%rbx), %r15
cmpq %r15, %r14
je 0x36b5
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 0x7d66
movq %r14, %rdi
movq %r15, %rsi
callq 0x7e5f
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 0xa8ef(%rip), %rbx      # 0xdfd0
leaq 0x6b48(%rip), %rsi      # 0xa230
movq %rbx, %rdi
callq 0x2240
movq %rax, %rdi
callq 0x20f0
leaq 0x6b4a(%rip), %rsi      # 0xa249
movq %rbx, %rdi
callq 0x2240
movq %rax, %rdi
callq 0x20f0
leaq 0x6b49(%rip), %rsi      # 0xa25f
movq %rbx, %rdi
callq 0x2240
movq %rax, %rdi
callq 0x20f0
leaq 0x6b42(%rip), %rsi      # 0xa26f
movq %rbx, %rdi
callq 0x2240
movq %rax, %rdi
callq 0x20f0
leaq 0x6b33(%rip), %rsi      # 0xa277
movq %rbx, %rdi
callq 0x2240
movq %rax, %rdi
callq 0x20f0
leaq 0x6b19(%rip), %rsi      # 0xa274
movq %rbx, %rdi
callq 0x2240
movq %rax, %rdi
callq 0x20f0
leaq 0x6b0c(%rip), %rsi      # 0xa27e
movq %rbx, %rdi
callq 0x2240
movq %rax, %rdi
callq 0x20f0
leaq 0x6afd(%rip), %rsi      # 0xa286
movq %rbx, %rdi
callq 0x2240
movq %rax, %rdi
callq 0x20f0
leaq 0x6aec(%rip), %rsi      # 0xa28c
movq %rbx, %rdi
callq 0x2240
movq %rax, %rdi
callq 0x20f0
leaq 0x6ad9(%rip), %rsi      # 0xa290
movq %rbx, %rdi
callq 0x2240
movq %rax, %rdi
callq 0x20f0
xorl %edi, %edi
callq 0x2280
jmp 0x37ef
jmp 0x37ef
jmp 0x37ef
jmp 0x37ef
jmp 0x37ef
jmp 0x37ef
jmp 0x37ef
jmp 0x37ef
jmp 0x37ef
jmp 0x37ef
jmp 0x381b
movq %rax, %r14
jmp 0x37ff
jmp 0x37ef
jmp 0x37ef
jmp 0x37ef
movq %rax, %r14
leaq 0x13d0(%rsp), %rdi
callq 0x2200
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x3813
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x2260
movq %r14, %rdi
callq 0x2360
movq %rax, %rdi
callq 0x72b9