// File: /workspace/github_cpp_makefile_star2_O1/ArashPartow[P]exprtk-extras/exprtk_calc.cpp
// Function: main
int main()
{
   typedef exprtk::symbol_table<double> symbol_table_t;
   typedef exprtk::expression<double>   expression_t;
   typedef exprtk::parser<double>       parser_t;
   typedef exprtk::parser_error::type   err_t;

   for ( ; ; )
   {
      double x = 1.0;
      double y = 2.0;
      double z = 3.0;
      double w = 4.0;
      double u = 5.0;
      double v = 6.0;

      symbol_table_t symbol_table;
      symbol_table.add_variable("x",x);
      symbol_table.add_variable("y",y);
      symbol_table.add_variable("z",z);
      symbol_table.add_variable("w",w);
      symbol_table.add_variable("u",u);
      symbol_table.add_variable("v",v);
      symbol_table.add_constants();

      expression_t expression;
      expression.register_symbol_table(symbol_table);

      std::string expression_str;

      printf(">> ");
      std::getline(std::cin,expression_str);

      if (expression_str.empty())
         continue;
      else if ("exit" == expression_str)
         break;
      else if ("quit" == expression_str)
         break;

      parser_t parser;

      if (!parser.compile(expression_str,expression))
      {
         printf("Error: %s\tExpression: %s\n",
                parser.error().c_str(),
                expression_str.c_str());

         for (std::size_t i = 0; i < parser.error_count(); ++i)
         {
            err_t error = parser.get_error(i);
            printf("Error: %02d Pos: %02d Type: [%14s] Message: %s\tExpression: %s\n",
                   static_cast<unsigned int>(i),
                   static_cast<unsigned int>(error.token.position),
                   exprtk::parser_error::to_str(error.mode).c_str(),
                   error.diagnostic.c_str(),
                   expression_str.c_str());
         }

         continue;
      }

      double result = expression.value();

      printf("result: %20.10f\n",result);
   }

   return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb18, %rsp            # imm = 0xB18
leaq 0x200(%rsp), %r12
leaq 0x18(%rsp), %r14
leaq 0x28(%rsp), %r15
leaq 0x1f0(%rsp), %rbp
movq 0x31bc8a(%rip), %rbx    # 0x434fe8
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x78(%rsp)
movabsq $0x4000000000000000, %rax # imm = 0x4000000000000000
movq %rax, 0x70(%rsp)
movabsq $0x4008000000000000, %rax # imm = 0x4008000000000000
movq %rax, 0x68(%rsp)
movabsq $0x4010000000000000, %rax # imm = 0x4010000000000000
movq %rax, 0x60(%rsp)
movabsq $0x4014000000000000, %rax # imm = 0x4014000000000000
movq %rax, 0x58(%rsp)
movabsq $0x4018000000000000, %rax # imm = 0x4018000000000000
movq %rax, 0x50(%rsp)
movq %r15, %rdi
movl $0x1, %esi
callq 0x119c2a
movq %r12, 0x1f0(%rsp)
movq %rbp, %rdi
leaq 0x1af46a(%rip), %rsi    # 0x2c8841
leaq 0x1af464(%rip), %rdx    # 0x2c8842
callq 0x11b810
movq %r15, %rdi
movq %rbp, %rsi
leaq 0x78(%rsp), %rdx
xorl %ecx, %ecx
callq 0x119c72
movq 0x1f0(%rsp), %rdi
cmpq %r12, %rdi
je 0x119412
movq 0x200(%rsp), %rsi
incq %rsi
callq 0x1160a0
movq %r12, 0x1f0(%rsp)
movq %rbp, %rdi
leaq 0x1af6a2(%rip), %rsi    # 0x2c8ac6
leaq 0x1af69c(%rip), %rdx    # 0x2c8ac7
callq 0x11b810
movq %r15, %rdi
movq %rbp, %rsi
leaq 0x70(%rsp), %rdx
xorl %ecx, %ecx
callq 0x119c72
movq 0x1f0(%rsp), %rdi
cmpq %r12, %rdi
je 0x11945f
movq 0x200(%rsp), %rsi
incq %rsi
callq 0x1160a0
movq %r12, 0x1f0(%rsp)
movq %rbp, %rdi
leaq 0x1af44e(%rip), %rsi    # 0x2c88bf
leaq 0x1af448(%rip), %rdx    # 0x2c88c0
callq 0x11b810
movq %r15, %rdi
movq %rbp, %rsi
leaq 0x68(%rsp), %rdx
xorl %ecx, %ecx
callq 0x119c72
movq 0x1f0(%rsp), %rdi
cmpq %r12, %rdi
je 0x1194ac
movq 0x200(%rsp), %rsi
incq %rsi
callq 0x1160a0
movq %r12, 0x1f0(%rsp)
movq %rbp, %rdi
leaq 0x1af3a6(%rip), %rsi    # 0x2c8864
leaq 0x1af3a0(%rip), %rdx    # 0x2c8865
callq 0x11b810
movq %r15, %rdi
movq %rbp, %rsi
leaq 0x60(%rsp), %rdx
xorl %ecx, %ecx
callq 0x119c72
movq 0x1f0(%rsp), %rdi
cmpq %r12, %rdi
je 0x1194f9
movq 0x200(%rsp), %rsi
incq %rsi
callq 0x1160a0
movq %r12, 0x1f0(%rsp)
movq %rbp, %rdi
leaq 0x1af3b6(%rip), %rsi    # 0x2c88c1
leaq 0x1af3b0(%rip), %rdx    # 0x2c88c2
callq 0x11b810
movq %r15, %rdi
movq %rbp, %rsi
leaq 0x58(%rsp), %rdx
xorl %ecx, %ecx
callq 0x119c72
movq 0x1f0(%rsp), %rdi
cmpq %r12, %rdi
je 0x119546
movq 0x200(%rsp), %rsi
incq %rsi
callq 0x1160a0
movq %r12, 0x1f0(%rsp)
movq %rbp, %rdi
leaq 0x1af36b(%rip), %rsi    # 0x2c88c3
leaq 0x1af365(%rip), %rdx    # 0x2c88c4
callq 0x11b810
movq %r15, %rdi
movq %rbp, %rsi
leaq 0x50(%rsp), %rdx
xorl %ecx, %ecx
callq 0x119c72
movq 0x1f0(%rsp), %rdi
cmpq %r12, %rdi
je 0x119593
movq 0x200(%rsp), %rsi
incq %rsi
callq 0x1160a0
movq %r15, %rdi
callq 0x119de0
leaq 0x30(%rsp), %rdi
callq 0x119f26
movq 0x38(%rsp), %rcx
movq 0x40(%rsp), %rax
subq %rcx, %rax
je 0x119601
sarq $0x3, %rax
cmpq $0x1, %rax
movq %rax, %rdi
adcq $0x0, %rdi
cmpq %r15, %rcx
je 0x11960e
movq 0x28(%rsp), %rdx
cmpq (%rcx), %rdx
je 0x11960e
addq $0x8, %rcx
movl $0x1, %esi
subq %rdi, %rsi
xorl %edi, %edi
cmpq %rdi, %rsi
je 0x119601
decq %rdi
cmpq %r15, %rcx
je 0x1195f9
leaq 0x8(%rcx), %r8
cmpq (%rcx), %rdx
movq %r8, %rcx
jne 0x1195e0
negq %rdi
cmpq %rax, %rdi
jb 0x11960e
leaq 0x38(%rsp), %rdi
movq %r15, %rsi
callq 0x11ec14
movq %r14, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
leaq 0x1af29d(%rip), %rdi    # 0x2c88c5
xorl %eax, %eax
callq 0x116060
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x1164f0
movsbl %al, %edx
movq %rbx, %rdi
leaq 0x8(%rsp), %rsi
callq 0x116030
cmpq $0x0, 0x10(%rsp)
je 0x119754
leaq 0x8(%rsp), %r13
movq %r13, %rdi
leaq 0x1af25b(%rip), %rsi    # 0x2c88c9
callq 0x116460
movb $0x1, %bl
testl %eax, %eax
je 0x119756
movq %r13, %rdi
leaq 0x1af247(%rip), %rsi    # 0x2c88ce
callq 0x116460
testl %eax, %eax
je 0x119756
movl $0x7f, %esi
leaq 0xa0(%rsp), %rbx
movq %rbx, %rdi
callq 0x119fc0
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x11a0c0
leaq 0xb0(%rsp), %rbx
leaq 0x8(%rsp), %r12
leaq 0x1a0(%rsp), %rdi
callq 0x11b772
leaq 0x170(%rsp), %rdi
callq 0x11b772
leaq 0x140(%rsp), %rdi
callq 0x11b772
leaq 0x110(%rsp), %rdi
callq 0x11b772
leaq 0xe0(%rsp), %rdi
callq 0x11b772
movq %rbx, %rdi
callq 0x11b772
movq %rbp, %rdi
movq %r12, %rsi
leaq 0x30(%rsp), %rdx
callq 0x11a8e4
testb %al, %al
je 0x119793
movq 0x30(%rsp), %rax
movq 0x8(%rax), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
leaq 0x1af1f8(%rip), %rdi    # 0x2c892c
movb $0x1, %al
callq 0x116060
movq %rbp, %rdi
callq 0x11b3cc
xorl %ebx, %ebx
leaq 0x18(%rsp), %r14
leaq 0x200(%rsp), %r12
jmp 0x119756
xorl %ebx, %ebx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x11976d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1160a0
leaq 0x30(%rsp), %rdi
callq 0x11b68e
movq %r15, %rdi
callq 0x11b6dc
testb %bl, %bl
movq 0x31b860(%rip), %rbx    # 0x434fe8
je 0x11935e
jmp 0x119aaa
movq 0x508(%rsp), %rdi
cmpq %rdi, 0x528(%rsp)
je 0x1197e2
movq %rdi, %rcx
subq 0x510(%rsp), %rcx
movq %rcx, %rax
sarq $0x3, %rax
movabsq $-0x30c30c30c30c30c3, %rdx # imm = 0xCF3CF3CF3CF3CF3D
imulq %rdx, %rax
cmpq $0x3, %rax
jb 0x11983e
testq %rcx, %rcx
jle 0x119812
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rdx
shrq %rdx
jmp 0x119828
movq %rbx, 0xa0(%rsp)
movabsq $0x726f727245206f4e, %rax # imm = 0x726F727245206F4E
movq %rax, 0xb0(%rsp)
movq $0x8, 0xa8(%rsp)
movb $0x0, 0xb8(%rsp)
jmp 0x11985e
notq %rax
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rdx
shrq %rdx
notq %rdx
movq 0x520(%rsp), %rax
imulq $-0x1f8, %rdx, %rdi     # imm = 0xFE08
addq (%rax,%rdx,8), %rdi
addq %rcx, %rdi
movq %rbx, 0xa0(%rsp)
movq 0x38(%rdi), %rsi
movq 0x40(%rdi), %rdx
addq %rsi, %rdx
leaq 0xa0(%rsp), %rdi
callq 0x11beea
movq 0xa0(%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x1af061(%rip), %rdi    # 0x2c88d3
xorl %eax, %eax
callq 0x116060
movq 0xa0(%rsp), %rdi
cmpq %rbx, %rdi
je 0x119896
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x1160a0
movq $-0x1, %r13
xorl %ebx, %ebx
xorl %r12d, %r12d
movabsq $-0x30c30c30c30c30c3, %r14 # imm = 0xCF3CF3CF3CF3CF3D
movq 0x540(%rsp), %rax
movq %rax, %rcx
subq 0x520(%rsp), %rcx
sarq $0x3, %rcx
cmpq $0x1, %rax
adcq $-0x1, %rcx
leaq (%rcx,%rcx,2), %rax
movq 0x528(%rsp), %rcx
subq 0x530(%rsp), %rcx
sarq $0x3, %rcx
imulq %r14, %rcx
addq %rax, %rcx
movq 0x508(%rsp), %rsi
movq 0x518(%rsp), %rax
subq %rsi, %rax
sarq $0x3, %rax
imulq %r14, %rax
addq %rcx, %rax
cmpq %rax, %r12
jae 0x11973b
movq %rsi, %rdx
subq 0x510(%rsp), %rdx
sarq $0x3, %rdx
imulq %r14, %rdx
leaq (%r12,%rdx), %rcx
cmpq $0x2, %rcx
ja 0x119933
addq %rbx, %rsi
jmp 0x119983
testq %rcx, %rcx
jle 0x11994d
movq %rcx, %rax
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rdx
shrq %rdx
jmp 0x119966
movq %r13, %rax
subq %rdx, %rax
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rdx
shrq %rdx
notq %rdx
movq 0x520(%rsp), %rax
imulq $-0x1f8, %rdx, %rdi     # imm = 0xFE08
addq (%rax,%rdx,8), %rdi
imulq $0xa8, %rcx, %rsi
addq %rdi, %rsi
leaq 0xa0(%rsp), %rdi
callq 0x197c08
movq 0xc8(%rsp), %r14
movl 0xd0(%rsp), %esi
leaq 0x80(%rsp), %rdi
callq 0x11b2b5
movq 0x80(%rsp), %rcx
movq 0xd8(%rsp), %r8
movq 0x8(%rsp), %r9
leaq 0x1aef25(%rip), %rdi    # 0x2c88ed
movl %r12d, %esi
movl %r14d, %edx
xorl %eax, %eax
callq 0x116060
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x1199fa
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x1160a0
movq 0x118(%rsp), %rdi
leaq 0x128(%rsp), %rax
cmpq %rax, %rdi
movabsq $-0x30c30c30c30c30c3, %r14 # imm = 0xCF3CF3CF3CF3CF3D
je 0x119a29
movq 0x128(%rsp), %rsi
incq %rsi
callq 0x1160a0
movq 0xf8(%rsp), %rdi
leaq 0x108(%rsp), %rax
cmpq %rax, %rdi
je 0x119a4e
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x1160a0
movq 0xd8(%rsp), %rdi
leaq 0xe8(%rsp), %rax
cmpq %rax, %rdi
je 0x119a73
movq 0xe8(%rsp), %rsi
incq %rsi
callq 0x1160a0
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x119a98
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x1160a0
incq %r12
addq $0xa8, %rbx
decq %r13
jmp 0x1198ac
xorl %eax, %eax
addq $0xb18, %rsp            # imm = 0xB18
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x119ac2
jmp 0x119b39
movq %rax, %rbx
jmp 0x119b41
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x11a89c
jmp 0x119b4e
jmp 0x119b22
movq %rax, %rbx
jmp 0x119b65
jmp 0x119b1d
jmp 0x119af9
jmp 0x119b1d
jmp 0x119af9
jmp 0x119b1d
jmp 0x119af9
jmp 0x119b1d
jmp 0x119af9
jmp 0x119b1d
jmp 0x119af9
jmp 0x119b1d
movq %rax, %rbx
movq 0x1f0(%rsp), %rdi
cmpq %r12, %rdi
je 0x119b6f
movq 0x200(%rsp), %rsi
incq %rsi
callq 0x1160a0
jmp 0x119b6f
jmp 0x119b1d
movq %rax, %rbx
jmp 0x119b6f
movq %rax, %rbx
jmp 0x119b4e
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0x11b362
jmp 0x119b3c
movq %rax, %rbx
leaq 0x18(%rsp), %r14
leaq 0x1f0(%rsp), %rdi
callq 0x11b3cc
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x119b65
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x1160a0
leaq 0x30(%rsp), %rdi
callq 0x11b68e
leaq 0x28(%rsp), %rdi
callq 0x11b6dc
movq %rbx, %rdi
callq 0x1162f0