// File: /workspace/github_cpp_makefile_star2_O2/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 %r12
pushq %rbx
subq $0x80, %rsp
xorpd %xmm0, %xmm0
movapd %xmm0, -0x70(%rbp)
andq $0x0, -0x60(%rbp)
movl $0x100, %edi            # imm = 0x100
callq 0x31e0
movq %rax, %rbx
movq %rax, %rdi
callq 0x646c
movq $0x1, -0x48(%rbp)
movq %rbx, %rdi
callq 0x591c
movl %eax, %r14d
movq %rbx, %rdi
callq 0x5928
cvtsi2sd %r14d, %xmm0
cvtsi2sd %eax, %xmm1
movsd %xmm0, -0x80(%rbp)
movsd %xmm1, -0x78(%rbp)
movl 0x678a(%rip), %esi      # 0xf1a0
leaq -0x40(%rbp), %rdi
leaq -0x21(%rbp), %rdx
callq 0x95e4
xorl %r12d, %r12d
leaq -0x80(%rbp), %r14
leaq -0x48(%rbp), %r15
movl 0x676c(%rip), %eax      # 0xf1a0
cmpq %rax, %r12
jae 0x8a53
movq %r14, %rdi
movq %r15, %rsi
callq 0x9706
movq -0x40(%rbp), %rax
movsd %xmm0, (%rax,%r12,8)
incq %r12
jmp 0x8a2e
movq %rbx, %rdi
callq 0x508c
movl %eax, %r14d
movq -0x40(%rbp), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
leaq 0x183c(%rip), %rdi      # 0xa2ae
movl %r14d, %esi
movb $0x1, %al
callq 0x3050
leaq -0x90(%rbp), %rdi
xorl %esi, %esi
callq 0x3280
movq -0x40(%rbp), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
leaq -0xa0(%rbp), %r14
movq %r14, %rdi
xorl %esi, %esi
callq 0x3280
movq (%r14), %rax
movq 0x8(%r14), %rcx
subq -0x90(%rbp), %rax
subq -0x88(%rbp), %rcx
imulq $0x3e8, %rax, %rax      # imm = 0x3E8
cvtsi2sd %rax, %xmm0
cvtsi2sd %rcx, %xmm1
movsd 0x170a(%rip), %xmm2     # 0xa1e0
divsd %xmm2, %xmm1
addsd %xmm0, %xmm1
addsd 0x154a(%rip), %xmm1     # 0xa030
divsd %xmm2, %xmm1
leaq -0x50(%rbp), %rsi
movsd %xmm1, (%rsi)
leaq -0x70(%rbp), %rdi
callq 0x9714
movq %rbx, %rdi
callq 0x508c
movsd -0x50(%rbp), %xmm0
leaq 0x17b4(%rip), %rdi      # 0xa2c3
movl %eax, %esi
movb $0x1, %al
callq 0x3050
leaq -0x40(%rbp), %rdx
movq %rbx, %rdi
movl $0xf4240, %esi          # imm = 0xF4240
callq 0x8409
movq %rbx, %rdi
callq 0x508c
movl %eax, %r14d
movq -0x40(%rbp), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
leaq 0x1766(%rip), %rdi      # 0xa2ae
movl %r14d, %esi
movb $0x1, %al
callq 0x3050
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
leaq -0x40(%rbp), %rdi
callq 0x97aa
leaq -0x70(%rbp), %rdi
callq 0x97aa
xorl %eax, %eax
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8b90
movq %rax, %r14
movq %rbx, %rdi
callq 0x31c0
jmp 0x8ba3
jmp 0x8b90
movq %rax, %r14
jmp 0x8ba3
jmp 0x8b97
movq %rax, %r14
leaq -0x40(%rbp), %rdi
callq 0x97aa
leaq -0x70(%rbp), %rdi
callq 0x97aa
movq %r14, %rdi
callq 0x32d0