// File: ArashPartow[P]exprtk/exprtk_test.cpp
// Function: my_usr_ext<double>::process(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, exprtk::symbol_table<double>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool process(const std::string& unknown_symbol,
                symbol_table_t&    symbol_table,
                std::string&       error_message) exprtk_test_override
   {
      bool result = false;

      if (unknown_symbol[0] == 'v')
      {
         static T var_default_value = 1.0;

         if ((result = symbol_table.create_variable(unknown_symbol, var_default_value++)) == false)
         {
            error_message = "Failed to create variable(" + unknown_symbol + ") in primary symbol table";
         }
      }
      else if (unknown_symbol[0] == 'c')
      {
         static T cvar_default_value = 1.0;

         if ((result = symbol_table.add_constant(unknown_symbol, cvar_default_value++)) == false)
         {
            error_message = "Failed to create const variable(" + unknown_symbol + ") in primary symbol table";
         }
      }
      else if (0 == unknown_symbol.find("foo"))
      {
         //functions of form: fooXX
         if (4 >= unknown_symbol.size())
         {
            switch(unknown_symbol[3])
            {
               case '1' : result = symbol_table.add_function(unknown_symbol,foo1);
                          break;

               case '2' : result = symbol_table.add_function(unknown_symbol,foo2);
                          break;

               case '3' : result = symbol_table.add_function(unknown_symbol,foo3);
                          break;

               case '4' : result = symbol_table.add_function(unknown_symbol,foo4);
                          break;

               case '5' : result = symbol_table.add_function(unknown_symbol,foo5);
                          break;

               case '6' : result = symbol_table.add_function(unknown_symbol,foo6);
                          break;
            }
         }

         if (!result)
         {
            error_message = "Failed to add function(" + unknown_symbol + ") in primary symbol table";
         }
      }
      else
         error_message = "Indeterminable symbol type.";

      return result;
   }

// Assembly:
subq $0x128, %rsp            # imm = 0x128
movq %rdi, 0x120(%rsp)
movq %rsi, 0x118(%rsp)
movq %rdx, 0x110(%rsp)
movq %rcx, 0x108(%rsp)
movb $0x0, 0x107(%rsp)
movq 0x118(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x11b770
movsbl (%rax), %eax
cmpl $0x76, %eax
jne 0x595873
movq 0x110(%rsp), %rdi
movq 0x118(%rsp), %rsi
movsd 0x23dc94(%rip), %xmm0   # 0x7d3428
movsd 0x58a4(%rip), %xmm2     # 0x59b040
movaps %xmm0, %xmm1
addsd %xmm2, %xmm1
movsd %xmm1, 0x23dc7d(%rip)   # 0x7d3428
movsd %xmm0, 0xf8(%rsp)
leaq 0xf8(%rsp), %rdx
callq 0x52d0e0
movb %al, %cl
andb $0x1, %cl
movb %cl, 0x107(%rsp)
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x59586e
movq 0x118(%rsp), %rdx
leaq 0x39875(%rip), %rsi     # 0x5cf05f
leaq 0xb8(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x3784f0
movq 0x18(%rsp), %rsi
leaq 0x39872(%rip), %rdx     # 0x5cf07a
leaq 0xd8(%rsp), %rdi
callq 0x29dc30
jmp 0x595817
movq 0x108(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
callq 0x11b430
leaq 0xd8(%rsp), %rdi
callq 0x11b838
leaq 0xb8(%rsp), %rdi
callq 0x11b838
jmp 0x59586e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x11b838
jmp 0x595ba0
jmp 0x595b8f
movq 0x118(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x11b770
movsbl (%rax), %eax
cmpl $0x63, %eax
jne 0x59597e
movq 0x110(%rsp), %rdi
movq 0x118(%rsp), %rsi
movsd 0x23db88(%rip), %xmm0   # 0x7d3430
movsd 0x5790(%rip), %xmm2     # 0x59b040
movaps %xmm0, %xmm1
addsd %xmm2, %xmm1
movsd %xmm1, 0x23db71(%rip)   # 0x7d3430
movsd %xmm0, 0xa0(%rsp)
leaq 0xa0(%rsp), %rdx
callq 0x233df0
movb %al, %cl
andb $0x1, %cl
movb %cl, 0x107(%rsp)
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x595979
movq 0x118(%rsp), %rdx
leaq 0x39796(%rip), %rsi     # 0x5cf094
leaq 0x60(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x3784f0
movq 0x10(%rsp), %rsi
leaq 0x39761(%rip), %rdx     # 0x5cf07a
leaq 0x80(%rsp), %rdi
callq 0x29dc30
jmp 0x595928
movq 0x108(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x11b430
leaq 0x80(%rsp), %rdi
callq 0x11b838
leaq 0x60(%rsp), %rdi
callq 0x11b838
jmp 0x595979
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x11b838
jmp 0x595ba0
jmp 0x595b8d
movq 0x118(%rsp), %rdi
leaq 0x2df28(%rip), %rsi     # 0x5c38b5
xorl %eax, %eax
movl %eax, %edx
callq 0x11b030
movq %rax, %rcx
xorl %eax, %eax
cmpq %rcx, %rax
jne 0x595b77
movq 0x118(%rsp), %rdi
callq 0x11b270
movq %rax, %rcx
movl $0x4, %eax
cmpq %rcx, %rax
jb 0x595aef
movq 0x118(%rsp), %rdi
movl $0x3, %esi
callq 0x11b770
movsbl (%rax), %eax
addl $-0x31, %eax
movl %eax, %ecx
movq %rcx, 0x8(%rsp)
subl $0x5, %eax
ja 0x595aed
movq 0x8(%rsp), %rax
leaq 0xaa9e(%rip), %rcx      # 0x5a0494
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x110(%rsp), %rdi
movq 0x118(%rsp), %rsi
leaq -0x31d06(%rip), %rdx    # 0x563d10
callq 0x563be0
andb $0x1, %al
movb %al, 0x107(%rsp)
jmp 0x595aed
movq 0x110(%rsp), %rdi
movq 0x118(%rsp), %rsi
leaq -0x31bf0(%rip), %rdx    # 0x563e50
callq 0x563d20
andb $0x1, %al
movb %al, 0x107(%rsp)
jmp 0x595aed
movq 0x110(%rsp), %rdi
movq 0x118(%rsp), %rsi
leaq -0x31aca(%rip), %rdx    # 0x563fa0
callq 0x563e70
andb $0x1, %al
movb %al, 0x107(%rsp)
jmp 0x595aed
movq 0x110(%rsp), %rdi
movq 0x118(%rsp), %rsi
leaq -0x31991(%rip), %rdx    # 0x564100
callq 0x563fd0
andb $0x1, %al
movb %al, 0x107(%rsp)
jmp 0x595aed
movq 0x110(%rsp), %rdi
movq 0x118(%rsp), %rsi
leaq -0x31848(%rip), %rdx    # 0x564270
callq 0x564140
andb $0x1, %al
movb %al, 0x107(%rsp)
jmp 0x595aed
movq 0x110(%rsp), %rdi
movq 0x118(%rsp), %rsi
leaq -0x316ff(%rip), %rdx    # 0x5643e0
callq 0x5642b0
andb $0x1, %al
movb %al, 0x107(%rsp)
jmp 0x595aef
testb $0x1, 0x107(%rsp)
jne 0x595b75
movq 0x118(%rsp), %rdx
leaq 0x395ad(%rip), %rsi     # 0x5cf0b5
leaq 0x20(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x3784f0
movq (%rsp), %rsi
leaq 0x39559(%rip), %rdx     # 0x5cf07a
leaq 0x40(%rsp), %rdi
callq 0x29dc30
jmp 0x595b2d
movq 0x108(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x11b430
leaq 0x40(%rsp), %rdi
callq 0x11b838
leaq 0x20(%rsp), %rdi
callq 0x11b838
jmp 0x595b75
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x11b838
jmp 0x595ba0
jmp 0x595b8b
movq 0x108(%rsp), %rdi
leaq 0x39547(%rip), %rsi     # 0x5cf0cd
callq 0x11b340
jmp 0x595b8d
jmp 0x595b8f
movb 0x107(%rsp), %al
andb $0x1, %al
addq $0x128, %rsp            # imm = 0x128
retq
movq 0xb0(%rsp), %rdi
callq 0x11b4e0
nopl (%rax)