// File: /workspace/github_cpp_makefile_star2_O1/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, -0x40(%rbp)
movq $0x0, -0x30(%rbp)
movl $0x100, %edi            # imm = 0x100
callq 0x3220
movq %rax, %rbx
movq %rax, %rdi
callq 0x71cc
movq $0x1, -0x70(%rbp)
movq %rbx, %rdi
callq 0x674c
movl %eax, %r14d
movq %rbx, %rdi
callq 0x6758
movl %eax, %r15d
movl 0x575a(%rip), %esi      # 0xf1c8
leaq -0x58(%rbp), %rdi
leaq -0x19(%rbp), %rdx
callq 0xa784
cmpl $0x0, 0x5746(%rip)      # 0xf1c8
je 0x9ad0
xorps %xmm0, %xmm0
cvtsi2sd %r14d, %xmm0
cvtsi2sd %r15d, %xmm1
movsd %xmm0, -0x68(%rbp)
subsd %xmm0, %xmm1
movsd %xmm1, -0x60(%rbp)
xorl %r15d, %r15d
leaq -0x70(%rbp), %r14
movq %r14, %rdi
callq 0xa9b4
mulsd -0x60(%rbp), %xmm0
addsd -0x68(%rbp), %xmm0
movq -0x58(%rbp), %rax
movsd %xmm0, (%rax,%r15,8)
incq %r15
movl 0x56fd(%rip), %eax      # 0xf1c8
cmpq %rax, %r15
jb 0x9aa6
movq %rbx, %rdi
callq 0x5c30
movl %eax, %r14d
movq -0x58(%rbp), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
leaq 0x17c3(%rip), %rdi      # 0xb2b2
movl %r14d, %esi
movb $0x1, %al
callq 0x3060
leaq -0x80(%rbp), %rdi
xorl %esi, %esi
callq 0x32d0
movq -0x58(%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 %xmm1, %xmm1
cvtsi2sd %rax, %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %rcx, %xmm0
movsd 0x1690(%rip), %xmm2     # 0xb1e0
divsd %xmm2, %xmm0
addsd %xmm1, %xmm0
addsd 0x14c8(%rip), %xmm0     # 0xb028
divsd %xmm2, %xmm0
movsd %xmm0, -0x28(%rbp)
movq -0x38(%rbp), %rsi
cmpq -0x30(%rbp), %rsi
je 0x9b81
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, -0x38(%rbp)
jmp 0x9b8e
leaq -0x40(%rbp), %rdi
leaq -0x28(%rbp), %rdx
callq 0xaaf6
movq %rbx, %rdi
callq 0x5c30
movsd -0x28(%rbp), %xmm0
leaq 0x1725(%rip), %rdi      # 0xb2c7
movl %eax, %esi
movb $0x1, %al
callq 0x3060
leaq -0x58(%rbp), %rdx
movq %rbx, %rdi
movl $0xf4240, %esi          # imm = 0xF4240
callq 0x9279
movq %rbx, %rdi
callq 0x5c30
movl %eax, %r14d
movq -0x58(%rbp), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
leaq 0x16d7(%rip), %rdi      # 0xb2b2
movl %r14d, %esi
movb $0x1, %al
callq 0x3060
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x9bfc
callq 0x31f0
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x9c0a
callq 0x31f0
xorl %eax, %eax
addq $0x78, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9c23
movq %rax, %r14
movq %rbx, %rdi
jmp 0x9c36
jmp 0x9c23
movq %rax, %r14
jmp 0x9c3b
jmp 0x9c2a
movq %rax, %r14
movq -0x58(%rbp), %rdi
testq %rdi, %rdi
je 0x9c3b
callq 0x31f0
movq -0x40(%rbp), %rdi
testq %rdi, %rdi
je 0x9c49
callq 0x31f0
movq %r14, %rdi
callq 0x3320