// File: /workspace/github_cpp_makefile_star2_O2/umatin[P]LogarithmicErrorRegression/benchmark.cpp
// Function: main
int main(int argc, char *argv[]){
    srand(time(NULL));

    std::vector<double> data = parse_arguments(argc, argv);

    std::string data_name = argv[1];
    std::string outfile = "results/benchmark.csv";
    int num_lookups = 1000000;
    
    std::vector<double> lookups;
    lookups.resize(num_lookups);
    for (int i = 0; i < lookups.size(); i++){
        lookups[i] = data[rand()%data.size()];
    }

    benchmark_regression<simple_linear_regression_stable>(data,lookups,"SLR",data_name,outfile);
    benchmark_regression<create_regression_tournament_selection<LogNorm>>(data,lookups,"LogTE",data_name,outfile);
    benchmark_regression<create_regression_tournament_selection<FastDiscreteLogNorm>>(data,lookups,"DLogTE",data_name,outfile);
    benchmark_regression<build_regression_direct_descent>(data,lookups,"2P",data_name,outfile);
    benchmark_regression<theil_sen>(data,lookups,"TheilSen",data_name,outfile);
    benchmark_regression<create_regression_optimal<L1Norm>>(data,lookups,"LAD",data_name,outfile);
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x2c8, %rsp            # imm = 0x2C8
movl %edi, %ebp
xorl %edi, %edi
movq %rsi, %rbx
callq 0x21c0
movl %eax, %edi
callq 0x21f0
leaq 0x30(%rsp), %rdi
movl %ebp, %esi
movq %rbx, %rdx
callq 0x2cb8
movq 0x8(%rbx), %rsi
leaq 0x68(%rsp), %rdi
leaq 0x48(%rsp), %rdx
callq 0x4326
leaq 0x5717(%rip), %rsi      # 0x91f7
leaq 0x48(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x4326
leaq 0x10(%rsp), %rdi
vxorps %xmm0, %xmm0, %xmm0
andq $0x0, 0x10(%rdi)
vmovaps %xmm0, (%rdi)
movl $0xf4240, %esi          # imm = 0xF4240
callq 0x4362
movq 0x10(%rsp), %rax
xorl %ebx, %ebx
movq 0x18(%rsp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rbx, %rcx
jbe 0x3b54
callq 0x2070
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %rsi
cltq
xorl %edx, %edx
subq %rcx, %rsi
sarq $0x3, %rsi
divq %rsi
movq 0x10(%rsp), %rax
vmovsd (%rcx,%rdx,8), %xmm0
vmovsd %xmm0, (%rax,%rbx,8)
incq %rbx
jmp 0x3b12
leaq 0x56b2(%rip), %rsi      # 0x920d
leaq 0x2a8(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x4326
leaq 0x288(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x2250
leaq 0x268(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x2250
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x2a8(%rsp), %rdx
leaq 0x288(%rsp), %rcx
leaq 0x268(%rsp), %r8
callq 0x4393
leaq 0x268(%rsp), %rdi
callq 0x20c0
leaq 0x288(%rsp), %rdi
callq 0x20c0
leaq 0x2a8(%rsp), %rdi
callq 0x20c0
leaq 0x562c(%rip), %rsi      # 0x9212
leaq 0x248(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x4326
leaq 0x228(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x2250
leaq 0x208(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x2250
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x248(%rsp), %rdx
leaq 0x228(%rsp), %rcx
leaq 0x208(%rsp), %r8
callq 0x47a1
leaq 0x208(%rsp), %rdi
callq 0x20c0
leaq 0x228(%rsp), %rdi
callq 0x20c0
leaq 0x248(%rsp), %rdi
callq 0x20c0
leaq 0x55a0(%rip), %rsi      # 0x9211
leaq 0x1e8(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x4326
leaq 0x1c8(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x2250
leaq 0x1a8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x2250
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x1e8(%rsp), %rdx
leaq 0x1c8(%rsp), %rcx
leaq 0x1a8(%rsp), %r8
callq 0x4ccf
leaq 0x1a8(%rsp), %rdi
callq 0x20c0
leaq 0x1c8(%rsp), %rdi
callq 0x20c0
leaq 0x1e8(%rsp), %rdi
callq 0x20c0
leaq 0x551c(%rip), %rsi      # 0x9218
leaq 0x188(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x4326
leaq 0x168(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x2250
leaq 0x148(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x2250
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x188(%rsp), %rdx
leaq 0x168(%rsp), %rcx
leaq 0x148(%rsp), %r8
callq 0x51fd
leaq 0x148(%rsp), %rdi
callq 0x20c0
leaq 0x168(%rsp), %rdi
callq 0x20c0
leaq 0x188(%rsp), %rdi
callq 0x20c0
leaq 0x5494(%rip), %rsi      # 0x921b
leaq 0x128(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x4326
leaq 0x108(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x2250
leaq 0xe8(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x2250
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x128(%rsp), %rdx
leaq 0x108(%rsp), %rcx
leaq 0xe8(%rsp), %r8
callq 0x560b
leaq 0xe8(%rsp), %rdi
callq 0x20c0
leaq 0x108(%rsp), %rdi
callq 0x20c0
leaq 0x128(%rsp), %rdi
callq 0x20c0
leaq 0x5412(%rip), %rsi      # 0x9224
leaq 0xc8(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x4326
leaq 0xa8(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x2250
leaq 0x88(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x2250
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
leaq 0xc8(%rsp), %rdx
leaq 0xa8(%rsp), %rcx
leaq 0x88(%rsp), %r8
callq 0x5a19
leaq 0x88(%rsp), %rdi
callq 0x20c0
leaq 0xa8(%rsp), %rdi
callq 0x20c0
leaq 0xc8(%rsp), %rdi
callq 0x20c0
leaq 0x10(%rsp), %rdi
callq 0x6034
leaq 0x48(%rsp), %rdi
callq 0x20c0
leaq 0x68(%rsp), %rdi
callq 0x20c0
leaq 0x30(%rsp), %rdi
callq 0x6034
xorl %eax, %eax
addq $0x2c8, %rsp            # imm = 0x2C8
popq %rbx
popq %rbp
retq
leaq 0x88(%rsp), %rdi
movq %rax, %rbx
callq 0x20c0
jmp 0x3edf
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x20c0
jmp 0x3ef1
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
jmp 0x400a
jmp 0x4013
leaq 0xe8(%rsp), %rdi
movq %rax, %rbx
callq 0x20c0
jmp 0x3f18
movq %rax, %rbx
leaq 0x108(%rsp), %rdi
callq 0x20c0
jmp 0x3f2a
movq %rax, %rbx
leaq 0x128(%rsp), %rdi
jmp 0x400a
jmp 0x4013
leaq 0x148(%rsp), %rdi
movq %rax, %rbx
callq 0x20c0
jmp 0x3f51
movq %rax, %rbx
leaq 0x168(%rsp), %rdi
callq 0x20c0
jmp 0x3f63
movq %rax, %rbx
leaq 0x188(%rsp), %rdi
jmp 0x400a
jmp 0x4013
leaq 0x1a8(%rsp), %rdi
movq %rax, %rbx
callq 0x20c0
jmp 0x3f8a
movq %rax, %rbx
leaq 0x1c8(%rsp), %rdi
callq 0x20c0
jmp 0x3f9c
movq %rax, %rbx
leaq 0x1e8(%rsp), %rdi
jmp 0x400a
jmp 0x4013
leaq 0x208(%rsp), %rdi
movq %rax, %rbx
callq 0x20c0
jmp 0x3fbd
movq %rax, %rbx
leaq 0x228(%rsp), %rdi
callq 0x20c0
jmp 0x3fcf
movq %rax, %rbx
leaq 0x248(%rsp), %rdi
jmp 0x400a
jmp 0x4013
leaq 0x268(%rsp), %rdi
movq %rax, %rbx
callq 0x20c0
jmp 0x3ff0
movq %rax, %rbx
leaq 0x288(%rsp), %rdi
callq 0x20c0
jmp 0x4002
movq %rax, %rbx
leaq 0x2a8(%rsp), %rdi
callq 0x20c0
jmp 0x4016
jmp 0x4013
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x6034
leaq 0x48(%rsp), %rdi
callq 0x20c0
leaq 0x68(%rsp), %rdi
callq 0x20c0
leaq 0x30(%rsp), %rdi
callq 0x6034
movq %rbx, %rdi
callq 0x2340
movq %rax, %rbx
jmp 0x402a
movq %rax, %rbx
jmp 0x4034