// File: /workspace/github_cpp_makefile_star2_O2/ArashPartow[P]exprtk/exprtk_benchmark.cpp
// Function: main
int main(int argc, char* argv[])
{
   if (argc >= 2)
   {
      const std::string file_name = argv[1];

      if (argc == 2)
         perform_file_based_benchmark(file_name);
      else
         perform_file_based_benchmark(file_name,atoi(argv[2]));

      return 0;
   }

   pgo_primer();

   double x = 0;
   double y = 0;

   exprtk::symbol_table<double> symbol_table;
   symbol_table.add_constants();
   symbol_table.add_variable("x",x);
   symbol_table.add_variable("y",y);

   std::deque<exprtk::expression<double> > compiled_expr_list;

   if (!load_expression(symbol_table,compiled_expr_list))
   {
      return 1;
   }

   {
      printf("--- EXPRTK ---\n");
      for (std::size_t i = 0; i < compiled_expr_list.size(); ++i)
      {
         run_exprtk_benchmark(x,y,compiled_expr_list[i],global_expression_list[i]);
      }
   }

   {
      printf("--- NATIVE ---\n");
      run_native_benchmark(x, y, native<double>::func00,global_expression_list[ 0]);
      run_native_benchmark(x, y, native<double>::func01,global_expression_list[ 1]);
      run_native_benchmark(x, y, native<double>::func02,global_expression_list[ 2]);
      run_native_benchmark(x, y, native<double>::func03,global_expression_list[ 3]);
      run_native_benchmark(x, y, native<double>::func04,global_expression_list[ 4]);
      run_native_benchmark(x, y, native<double>::func05,global_expression_list[ 5]);
      run_native_benchmark(x, y, native<double>::func06,global_expression_list[ 6]);
      run_native_benchmark(x, y, native<double>::func07,global_expression_list[ 7]);
      run_native_benchmark(x, y, native<double>::func08,global_expression_list[ 8]);
      run_native_benchmark(x, y, native<double>::func09,global_expression_list[ 9]);
      run_native_benchmark(x, y, native<double>::func10,global_expression_list[10]);
      run_native_benchmark(x, y, native<double>::func11,global_expression_list[11]);
      run_native_benchmark(x, y, native<double>::func12,global_expression_list[12]);
      run_native_benchmark(x, y, native<double>::func13,global_expression_list[13]);
      run_native_benchmark(x, y, native<double>::func14,global_expression_list[14]);
      run_native_benchmark(x, y, native<double>::func15,global_expression_list[15]);
      run_native_benchmark(x, y, native<double>::func16,global_expression_list[16]);
   }

   {
      printf("--- PARSE ----\n");
      run_parse_benchmark(symbol_table);
   }

   return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
cmpl $0x2, %edi
jl 0x11450b
movq %rsi, %rbx
movl %edi, %ebp
movq 0x8(%rsi), %rsi
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0x115af2
cmpl $0x2, %ebp
jne 0x11461f
leaq 0x8(%rsp), %rsi
movq $0x186a0, (%rsi)        # imm = 0x186A0
leaq 0x28(%rsp), %rdi
callq 0x1148d6
jmp 0x11463c
callq 0x115727
andq $0x0, 0x8(%rsp)
andq $0x0, 0x10(%rsp)
leaq 0x20(%rsp), %r14
pushq $0x1
popq %rbx
movq %r14, %rdi
movl %ebx, %esi
callq 0x115b2e
movq %r14, %rdi
callq 0x115b52
leaq 0x132ee3(%rip), %rsi    # 0x247420
leaq 0x28(%rsp), %rdi
leaq 0x1f(%rsp), %rdx
callq 0x115af2
leaq 0x20(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x8(%rsp), %rdx
xorl %ecx, %ecx
callq 0x115b78
leaq 0x28(%rsp), %rdi
callq 0x112628
leaq 0x132dfb(%rip), %rsi    # 0x24736e
leaq 0x28(%rsp), %rdi
leaq 0x1f(%rsp), %rdx
callq 0x115af2
leaq 0x20(%rsp), %rdi
leaq 0x28(%rsp), %rsi
leaq 0x10(%rsp), %rdx
xorl %ecx, %ecx
callq 0x115b78
leaq 0x28(%rsp), %rdi
callq 0x112628
leaq 0x28(%rsp), %rdi
callq 0x117cbe
leaq 0x20(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x115be4
testb %al, %al
je 0x11485e
leaq 0x137e80(%rip), %rdi    # 0x24c44a
callq 0x112550
leaq 0x2c486a(%rip), %rbx    # 0x3d8e40
leaq 0x38(%rsp), %r14
xorl %r15d, %r15d
leaq 0x28(%rsp), %r12
leaq 0x8(%rsp), %r13
leaq 0x10(%rsp), %rbp
movq %r12, %rdi
callq 0x115d28
cmpq %rax, %r15
jae 0x11464d
movq %r14, %rdi
movq %r15, %rsi
callq 0x11d870
movq %r13, %rdi
movq %rbp, %rsi
movq %rax, %rdx
movq %rbx, %rcx
callq 0x115d38
incq %r15
addq $0x20, %rbx
jmp 0x1145ed
movq 0x10(%rbx), %rdi
callq 0x112190
cltq
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x28(%rsp), %rdi
callq 0x1148d6
leaq 0x28(%rsp), %rdi
callq 0x112628
xorl %ebx, %ebx
jmp 0x114872
leaq 0x137e05(%rip), %rdi    # 0x24c459
callq 0x112550
leaq 0x193e(%rip), %rdx      # 0x115f9e
leaq 0x2c47d9(%rip), %rcx    # 0x3d8e40
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x115e6d
leaq 0x192b(%rip), %rdx      # 0x115fa8
leaq 0x2c47dc(%rip), %rcx    # 0x3d8e60
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x115e6d
leaq 0x191c(%rip), %rdx      # 0x115fb6
leaq 0x2c47df(%rip), %rcx    # 0x3d8e80
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x115e6d
leaq 0x1915(%rip), %rdx      # 0x115fcc
leaq 0x2c47e2(%rip), %rcx    # 0x3d8ea0
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x115e6d
leaq 0x1916(%rip), %rdx      # 0x115fea
leaq 0x2c47e5(%rip), %rcx    # 0x3d8ec0
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x115e6d
leaq 0x1927(%rip), %rdx      # 0x116018
leaq 0x2c47e8(%rip), %rcx    # 0x3d8ee0
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x115e6d
leaq 0x1930(%rip), %rdx      # 0x11603e
leaq 0x2c47eb(%rip), %rcx    # 0x3d8f00
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x115e6d
leaq 0x1941(%rip), %rdx      # 0x11606c
leaq 0x2c47ee(%rip), %rcx    # 0x3d8f20
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x115e6d
leaq 0x197e(%rip), %rdx      # 0x1160c6
leaq 0x2c47f1(%rip), %rcx    # 0x3d8f40
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x115e6d
leaq 0x1a21(%rip), %rdx      # 0x116186
leaq 0x2c47f4(%rip), %rcx    # 0x3d8f60
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x115e6d
leaq 0x1a3c(%rip), %rdx      # 0x1161be
leaq 0x2c47f7(%rip), %rcx    # 0x3d8f80
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x115e6d
leaq 0x1a63(%rip), %rdx      # 0x116202
leaq 0x2c47fa(%rip), %rcx    # 0x3d8fa0
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x115e6d
leaq 0x1aaa(%rip), %rdx      # 0x116266
leaq 0x2c47fd(%rip), %rcx    # 0x3d8fc0
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x115e6d
leaq 0x1ad5(%rip), %rdx      # 0x1162ae
leaq 0x2c4800(%rip), %rcx    # 0x3d8fe0
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x115e6d
leaq 0x1b5a(%rip), %rdx      # 0x116350
leaq 0x2c4803(%rip), %rcx    # 0x3d9000
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x115e6d
leaq 0x1bab(%rip), %rdx      # 0x1163be
leaq 0x2c4806(%rip), %rcx    # 0x3d9020
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x115e6d
leaq 0x1c08(%rip), %rdx      # 0x116438
leaq 0x2c4809(%rip), %rcx    # 0x3d9040
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x115e6d
leaq 0x137c1b(%rip), %rdi    # 0x24c468
callq 0x112550
xorl %ebx, %ebx
leaq 0x20(%rsp), %rdi
callq 0x11648e
leaq 0x28(%rsp), %rdi
callq 0x116650
leaq 0x20(%rsp), %rdi
callq 0x11669c
movl %ebx, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x114885
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x112628
jmp 0x1148ce
jmp 0x1148ab
jmp 0x11489a
jmp 0x1148ab
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x112628
jmp 0x1148c4
jmp 0x1148ab
movq %rax, %rbx
jmp 0x1148c4
movq %rax, %rbx
jmp 0x1148ce
jmp 0x1148b7
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x116650
leaq 0x20(%rsp), %rdi
callq 0x11669c
movq %rbx, %rdi
callq 0x112370