// File: /workspace/github_cpp_makefile_star2_O3/mateuz[P]MTS-LS1/source/main.cpp
// Function: main
int main(){
  /*  Test the basic benchmark function */
  Benchmarks * fp = NULL;
  vector<double> runTimeVec;
  struct timeval start, end;
  long seconds, useconds;
  double mtime;

  fp = new F12(); //generateFuncObj(12);

  std::default_random_engine generator;
  std::uniform_real_distribution<double> distribution(fp->getMinX(), fp->getMaxX());

  vector<double> sol(dim);
  for( unsigned i = 0; i < dim; i++ ){
    sol[i] = distribution(generator);
  }

  printf("F %d value = %1.20E\n", fp->getID(), fp->compute(sol.data()));

  gettimeofday(&start, NULL);
  fp->compute(sol.data());
  gettimeofday(&end, NULL);

  seconds  = end.tv_sec  - start.tv_sec;
  useconds = end.tv_usec - start.tv_usec;

  mtime = (((seconds) * 1000 + useconds/1000.0) + 0.5)/1000;

  runTimeVec.push_back(mtime);
  printf ( "F %d, Running Time = %f s\n\n", fp->getID(), mtime);

  mts_ls1(fp, 1e6, sol);

  printf("F %d value = %1.20E\n", fp->getID(), fp->compute(sol.data()));

  delete fp;
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x78, %rsp
xorpd %xmm0, %xmm0
movapd %xmm0, -0x70(%rbp)
movq $0x0, -0x60(%rbp)
movl $0x100, %edi            # imm = 0x100
callq 0x3220
movq %rax, %rbx
movq %rax, %rdi
callq 0x71ac
movq $0x1, -0x50(%rbp)
movq %rbx, %rdi
callq 0x6742
movl %eax, %r14d
movq %rbx, %rdi
callq 0x674e
movl %eax, %r15d
movl 0x5753(%rip), %esi      # 0xf1c8
leaq -0x38(%rbp), %rdi
leaq -0x19(%rbp), %rdx
callq 0xa746
cmpl $0x0, 0x573f(%rip)      # 0xf1c8
je 0x9ad7
xorps %xmm0, %xmm0
cvtsi2sd %r14d, %xmm0
cvtsi2sd %r15d, %xmm1
movsd %xmm0, -0x48(%rbp)
subsd %xmm0, %xmm1
movsd %xmm1, -0x40(%rbp)
xorl %r15d, %r15d
leaq -0x50(%rbp), %r14
movq %r14, %rdi
callq 0xa941
mulsd -0x40(%rbp), %xmm0
addsd -0x48(%rbp), %xmm0
movq -0x38(%rbp), %rax
movsd %xmm0, (%rax,%r15,8)
incq %r15
movl 0x56f6(%rip), %eax      # 0xf1c8
cmpq %rax, %r15
jb 0x9aad
movq %rbx, %rdi
callq 0x5c04
movl %eax, %r14d
movq -0x38(%rbp), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
leaq 0x17bc(%rip), %rdi      # 0xb2b2
movl %r14d, %esi
movb $0x1, %al
callq 0x3060
leaq -0x80(%rbp), %rdi
xorl %esi, %esi
callq 0x32d0
movq -0x38(%rbp), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
leaq -0x90(%rbp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x32d0
movq (%r14), %rax
movq 0x8(%r14), %rcx
subq -0x80(%rbp), %rax
subq -0x78(%rbp), %rcx
imulq $0x3e8, %rax, %rax      # imm = 0x3E8
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %rcx, %xmm1
movsd 0x1689(%rip), %xmm2     # 0xb1e0
divsd %xmm2, %xmm1
addsd %xmm0, %xmm1
addsd 0x14c1(%rip), %xmm1     # 0xb028
divsd %xmm2, %xmm1
leaq -0x58(%rbp), %rdx
movsd %xmm1, (%rdx)
leaq -0x70(%rbp), %rdi
xorl %esi, %esi
callq 0xaa84
movq %rbx, %rdi
callq 0x5c04
movsd -0x58(%rbp), %xmm0
leaq 0x1735(%rip), %rdi      # 0xb2c7
movl %eax, %esi
movb $0x1, %al
callq 0x3060
leaq -0x38(%rbp), %rdx
movq %rbx, %rdi
movl $0xf4240, %esi          # imm = 0xF4240
callq 0x9269
movq %rbx, %rdi
callq 0x5c04
movl %eax, %r14d
movq -0x38(%rbp), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
leaq 0x16e7(%rip), %rdi      # 0xb2b2
movl %r14d, %esi
movb $0x1, %al
callq 0x3060
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x9bec
callq 0x31f0
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
je 0x9bfa
callq 0x31f0
xorl %eax, %eax
addq $0x78, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x9c2c
movq %rax, %r14
movq %rbx, %rdi
jmp 0x9c35
movq %rax, %r14
jmp 0x9c3a
jmp 0x9c1b
movq %rax, %r14
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x9c2c
callq 0x31f0
movq -0x70(%rbp), %rdi
testq %rdi, %rdi
je 0x9c3a
callq 0x31f0
movq %r14, %rdi
callq 0x3320