// File: ArashPartow[P]exprtk-extras/exprtk_repl.cpp
// Function: expression_processor<double>::print_results(exprtk::results_context<double> const&)
void print_results(const exprtk::results_context<T>& results)
   {
      typedef exprtk::results_context<T> results_context_t;
      typedef typename results_context_t::type_store_t type_t;
      typedef typename type_t::scalar_view scalar_t;
      typedef typename type_t::vector_view vector_t;
      typedef typename type_t::string_view string_t;

      typename exprtk::details::numeric::details::number_type<T>::type num_type;

      printf("%s\n",std::string(10,'-').c_str());
      printf("Return Results (#%d)\n",static_cast<int>(results.count()));

      for (std::size_t i = 0; i < results.count(); ++i)
      {
         printf("[%02d]  ",static_cast<int>(i));

         type_t t = results[i];

         switch (t.type)
         {
            case type_t::e_scalar : printf("Scalar\t");
                                    exprtk::rtl::io::details::print_type("%10.5f",scalar_t(t)(),num_type);
                                    break;

            case type_t::e_vector : {
                                       printf("Vector\t");
                                       vector_t vector(t);

                                       for (std::size_t x = 0; x < vector.size(); ++x)
                                       {
                                          exprtk::rtl::io::details::print_type("%10.5f",vector[x],num_type);

                                          if ((x + 1) < vector.size())
                                             printf(" ");
                                       }
                                    }
                                    break;

            case type_t::e_string : printf("String\t");
                                    printf("%s",to_str(string_t(t)).c_str());
                                    break;

            default               : continue;
         }

         printf("\n");
      }

      printf("%s\n",std::string(10,'-').c_str());
   }

// Assembly:
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rdi, 0x1a0(%rsp)
movq %rsi, 0x198(%rsp)
leaq 0x197(%rsp), %rdi
callq 0x1446e0
leaq 0x16f(%rsp), %rdi
movq %rdi, 0x58(%rsp)
callq 0x1197d0
movq 0x58(%rsp), %rcx
leaq 0x170(%rsp), %rdi
movl $0xa, %esi
movl $0x2d, %edx
callq 0x47f810
jmp 0x4824d4
leaq 0x170(%rsp), %rdi
callq 0x119120
movq %rax, %rsi
leaq 0xf412(%rip), %rdi      # 0x4918fd
xorl %eax, %eax
callq 0x1190b0
jmp 0x4824f4
leaq 0x170(%rsp), %rdi
callq 0x119968
leaq 0x16f(%rsp), %rdi
callq 0x119950
movq 0x198(%rsp), %rdi
callq 0x482440
movl %eax, %esi
leaq 0xf367(%rip), %rdi      # 0x49188b
movb $0x0, %al
callq 0x1190b0
movq $0x0, 0x150(%rsp)
movq 0x150(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x198(%rsp), %rdi
callq 0x482440
movq %rax, %rcx
movq 0x50(%rsp), %rax
cmpq %rcx, %rax
jae 0x482926
movl 0x150(%rsp), %esi
leaq 0xf331(%rip), %rdi      # 0x4918a1
xorl %eax, %eax
callq 0x1190b0
movq 0x198(%rsp), %rdi
leaq 0x150(%rsp), %rsi
callq 0x293b50
movq 0x10(%rax), %rcx
movq %rcx, 0x140(%rsp)
movups (%rax), %xmm0
movaps %xmm0, 0x130(%rsp)
movl 0x140(%rsp), %eax
movl %eax, 0x4c(%rsp)
subl $0x1, %eax
je 0x48261f
jmp 0x4825b5
movl 0x4c(%rsp), %eax
subl $0x2, %eax
je 0x4826f9
jmp 0x4825c4
movl 0x4c(%rsp), %eax
subl $0x3, %eax
je 0x482866
jmp 0x4828fd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
jmp 0x48260d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
leaq 0x170(%rsp), %rdi
callq 0x119968
leaq 0x16f(%rsp), %rdi
callq 0x119950
jmp 0x4829c7
leaq 0xf284(%rip), %rdi      # 0x4918aa
xorl %eax, %eax
callq 0x1190b0
leaq 0x10f(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x1197d0
movq 0x40(%rsp), %rdx
leaq 0xa7b5(%rip), %rsi      # 0x48ce00
leaq 0x110(%rsp), %rdi
callq 0x120970
jmp 0x48265a
leaq 0x100(%rsp), %rdi
leaq 0x130(%rsp), %rsi
callq 0x263230
jmp 0x482671
leaq 0x100(%rsp), %rdi
callq 0x263250
movsd (%rax), %xmm0
leaq 0x110(%rsp), %rdi
callq 0x26d200
jmp 0x482691
leaq 0x110(%rsp), %rdi
callq 0x119968
leaq 0x10f(%rsp), %rdi
callq 0x119950
jmp 0x4828ff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
jmp 0x4826e7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
leaq 0x110(%rsp), %rdi
callq 0x119968
leaq 0x10f(%rsp), %rdi
callq 0x119950
jmp 0x4829c7
leaq 0xf1b2(%rip), %rdi      # 0x4918b2
movb $0x0, %al
callq 0x1190b0
leaq 0xe8(%rsp), %rdi
leaq 0x130(%rsp), %rsi
callq 0x263320
movq $0x0, 0xe0(%rsp)
movq 0xe0(%rsp), %rax
movq %rax, 0x38(%rsp)
leaq 0xe8(%rsp), %rdi
callq 0x263350
movq %rax, %rcx
movq 0x38(%rsp), %rax
cmpq %rcx, %rax
jae 0x482861
leaq 0xbf(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x1197d0
movq 0x30(%rsp), %rdx
leaq 0xa68f(%rip), %rsi      # 0x48ce00
leaq 0xc0(%rsp), %rdi
callq 0x120970
jmp 0x482780
leaq 0xe8(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0x267570
movsd (%rax), %xmm0
leaq 0xc0(%rsp), %rdi
callq 0x26d200
jmp 0x4827a8
leaq 0xc0(%rsp), %rdi
callq 0x119968
leaq 0xbf(%rsp), %rdi
callq 0x119950
movq 0xe0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
leaq 0xe8(%rsp), %rdi
callq 0x263350
movq %rax, %rcx
movq 0x28(%rsp), %rax
cmpq %rcx, %rax
jae 0x482846
leaq 0xf0b4(%rip), %rdi      # 0x4918a8
movb $0x0, %al
callq 0x1190b0
jmp 0x482846
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
jmp 0x482834
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0x119968
leaq 0xbf(%rsp), %rdi
callq 0x119950
jmp 0x4829c7
jmp 0x482848
movq 0xe0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xe0(%rsp)
jmp 0x482728
jmp 0x4828ff
leaq 0xf04d(%rip), %rdi      # 0x4918ba
xorl %eax, %eax
movb %al, 0x27(%rsp)
callq 0x1190b0
leaq 0x88(%rsp), %rdi
movq %rdi, 0x10(%rsp)
leaq 0x130(%rsp), %rsi
callq 0x262670
movq 0x10(%rsp), %rsi
leaq 0x98(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x2625a0
movq 0x18(%rsp), %rdi
callq 0x119120
movq %rax, %rsi
movb 0x27(%rsp), %al
leaq 0xa546(%rip), %rdi      # 0x48ce07
callq 0x1190b0
jmp 0x4828c8
leaq 0x98(%rsp), %rdi
callq 0x119968
jmp 0x4828ff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
leaq 0x98(%rsp), %rdi
callq 0x119968
jmp 0x4829c7
jmp 0x48290d
leaq 0xa660(%rip), %rdi      # 0x48cf66
movb $0x0, %al
callq 0x1190b0
movq 0x150(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x150(%rsp)
jmp 0x482537
leaq 0x67(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x1197d0
movq 0x8(%rsp), %rcx
leaq 0x68(%rsp), %rdi
movl $0xa, %esi
movl $0x2d, %edx
callq 0x47f810
jmp 0x482950
leaq 0x68(%rsp), %rdi
callq 0x119120
movq %rax, %rsi
leaq 0xef99(%rip), %rdi      # 0x4918fd
xorl %eax, %eax
callq 0x1190b0
jmp 0x48296d
leaq 0x68(%rsp), %rdi
callq 0x119968
leaq 0x67(%rsp), %rdi
callq 0x119950
addq $0x1a8, %rsp            # imm = 0x1A8
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
jmp 0x4829bd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x160(%rsp)
movl %eax, 0x15c(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x119968
leaq 0x67(%rsp), %rdi
callq 0x119950
movq 0x160(%rsp), %rdi
callq 0x119570
nopw %cs:(%rax,%rax)
nop