// File: ArashPartow[P]exprtk/exprtk_benchmark.cpp
// Function: bool run_parse_benchmark<double>(exprtk::symbol_table<double>&)
bool run_parse_benchmark(exprtk::symbol_table<T>& symbol_table)
{
   static const std::size_t rounds = 100000;
   exprtk::parser<double>     parser;
   exprtk::expression<double> expression;

   expression.register_symbol_table(symbol_table);

   for (std::size_t i = 0; i < global_expression_list_size; ++i)
   {
      exprtk::timer timer;
      timer.start();

      for (std::size_t r = 0; r < rounds; ++r)
      {
         if (!parser.compile(global_expression_list[i],expression))
         {
            printf("[run_parse_benchmark] - Parser Error: %s\tExpression: %s\n",
                   parser.error().c_str(),
                   global_expression_list[i].c_str());

            return false;
         }
      }

      timer.stop();

      printf("[parse] Total Time:%12.8f  Rate:%14.3fparse/sec Expression: %s\n",
             timer.time(),
             rounds / timer.time(),
             global_expression_list[i].c_str());
   }

   return true;
}

// Assembly:
subq $0xb58, %rsp            # imm = 0xB58
movq %rdi, 0xb48(%rsp)
leaq 0xd0(%rsp), %rdi
movq %rdi, 0x38(%rsp)
movl $0x7f, %esi
callq 0x1215d0
movq 0x38(%rsp), %rsi
leaq 0x220(%rsp), %rdi
callq 0x121700
jmp 0x1203fa
leaq 0xd0(%rsp), %rdi
callq 0x121f30
leaq 0xa0(%rsp), %rdi
callq 0x121fc0
jmp 0x120416
movq 0xb48(%rsp), %rsi
leaq 0xa0(%rsp), %rdi
callq 0x122070
jmp 0x12042d
movq $0x0, 0x98(%rsp)
cmpq $0x11, 0x98(%rsp)
jae 0x12065a
leaq 0x70(%rsp), %rdi
callq 0x122d40
jmp 0x120454
leaq 0x70(%rsp), %rdi
callq 0x122d70
movq $0x0, 0x68(%rsp)
cmpq $0x186a0, 0x68(%rsp)    # imm = 0x186A0
jae 0x1205ba
movq 0x98(%rsp), %rax
shlq $0x5, %rax
leaq 0x51fab7(%rip), %rsi    # 0x63ff40
addq %rax, %rsi
leaq 0x220(%rsp), %rdi
leaq 0xa0(%rsp), %rdx
callq 0x122120
movb %al, 0x37(%rsp)
jmp 0x1204a7
movb 0x37(%rsp), %al
testb $0x1, %al
jne 0x1205a5
jmp 0x1204b5
leaq 0x48(%rsp), %rdi
leaq 0x220(%rsp), %rsi
callq 0x1229e0
jmp 0x1204c9
leaq 0x48(%rsp), %rdi
callq 0x115120
movq %rax, 0x28(%rsp)
movq 0x98(%rsp), %rax
shlq $0x5, %rax
leaq 0x51fa55(%rip), %rdi    # 0x63ff40
addq %rax, %rdi
callq 0x115120
movq 0x28(%rsp), %rsi
movq %rax, %rdx
leaq 0x344780(%rip), %rdi    # 0x464c82
xorl %eax, %eax
callq 0x1150b0
jmp 0x12050b
leaq 0x48(%rsp), %rdi
callq 0x115818
movb $0x0, 0xb57(%rsp)
movl $0x1, 0x44(%rsp)
jmp 0x12066a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc8(%rsp)
movl %eax, 0xc4(%rsp)
leaq 0xd0(%rsp), %rdi
callq 0x121f30
jmp 0x1206af
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc8(%rsp)
movl %eax, 0xc4(%rsp)
jmp 0x1206a2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc8(%rsp)
movl %eax, 0xc4(%rsp)
jmp 0x120695
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xc8(%rsp)
movl %eax, 0xc4(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x115818
jmp 0x120695
jmp 0x1205a7
movq 0x68(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x68(%rsp)
jmp 0x120467
leaq 0x70(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x122df0
movq 0x18(%rsp), %rdi
callq 0x122e20
movsd %xmm0, 0x20(%rsp)
jmp 0x1205db
leaq 0x70(%rsp), %rdi
callq 0x122e20
movsd %xmm0, 0x10(%rsp)
jmp 0x1205ed
movsd 0x10(%rsp), %xmm1
movsd 0x33eb4d(%rip), %xmm0   # 0x45f148
divsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x98(%rsp), %rax
shlq $0x5, %rax
leaq 0x51f928(%rip), %rdi    # 0x63ff40
addq %rax, %rdi
callq 0x115120
movsd 0x20(%rsp), %xmm0
movsd 0x8(%rsp), %xmm1
movq %rax, %rsi
leaq 0x344685(%rip), %rdi    # 0x464cbb
movb $0x2, %al
callq 0x1150b0
jmp 0x12063f
jmp 0x120641
movq 0x98(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x98(%rsp)
jmp 0x120439
movb $0x1, 0xb57(%rsp)
movl $0x1, 0x44(%rsp)
leaq 0xa0(%rsp), %rdi
callq 0x122b00
leaq 0x220(%rsp), %rdi
callq 0x122b40
movb 0xb57(%rsp), %al
andb $0x1, %al
addq $0xb58, %rsp            # imm = 0xB58
retq
leaq 0xa0(%rsp), %rdi
callq 0x122b00
leaq 0x220(%rsp), %rdi
callq 0x122b40
movq 0xc8(%rsp), %rdi
callq 0x1154d0
nopl (%rax)