// File: ArashPartow[P]exprtk/./exprtk.hpp
// Function: exprtk::function_compositor<double>::base_func::setup(exprtk::expression<double>&)
inline function_t& setup(expression_t& expr)
         {
            expression = expr;

            typedef typename expression_t::control_block  ctrlblk_t;
            typedef typename ctrlblk_t::local_data_list_t ldl_t;
            typedef typename ctrlblk_t::data_type         data_t;
            typedef typename ldl_t::value_type            ldl_value_type;

            const ldl_t ldl = expr.local_data_list();

            std::vector<std::pair<std::size_t,data_t> > index_list;

            for (std::size_t i = 0; i < ldl.size(); ++i)
            {
               exprtk_debug(("base_func::setup() - element[%02d] type: %s size: %d\n",
                             static_cast<int>(i),
                             expression_t::control_block::to_str(ldl[i].type).c_str(),
                             static_cast<int>(ldl[i].size)));

               switch (ldl[i].type)
               {
                  case ctrlblk_t::e_unknown   : continue;
                  case ctrlblk_t::e_expr      : continue;
                  case ctrlblk_t::e_vecholder : continue;
                  default                     : break;
               }

               if (ldl[i].size)
               {
                  index_list.push_back(std::make_pair(i,ldl[i].type));
               }
            }

            std::size_t input_param_count = 0;

            for (std::size_t i = 0; i < index_list.size(); ++i)
            {
               const std::size_t index         = index_list[i].first;
               const ldl_value_type& local_var = ldl[index];

               assert(local_var.pointer);

               if (i < (index_list.size() - v.size()))
               {
                  if (local_var.type == ctrlblk_t::e_string)
                  {
                     local_str_vars.push_back(
                        reinterpret_cast<std::string*>(local_var.pointer));
                  }
                  else if (
                            (local_var.type == ctrlblk_t::e_data   ) ||
                            (local_var.type == ctrlblk_t::e_vecdata)
                          )
                  {
                     local_vars.push_back(std::make_pair(
                        reinterpret_cast<T*>(local_var.pointer),
                        local_var.size));

                     local_var_stack_size += local_var.size;
                  }
               }
               else
               {
                  v[input_param_count++] = reinterpret_cast<T*>(local_var.pointer);
               }
            }

            clear_stack();

            return (*this);
         }

// Assembly:
subq $0x118, %rsp            # imm = 0x118
movq %rdi, 0x110(%rsp)
movq %rsi, 0x108(%rsp)
movq 0x110(%rsp), %rdi
movq %rdi, 0x58(%rsp)
movq 0x108(%rsp), %rsi
addq $0x28, %rdi
callq 0x587b70
movq 0x108(%rsp), %rdi
callq 0x5919a0
movq %rax, %rsi
leaq 0xf0(%rsp), %rdi
callq 0x591a30
leaq 0xd8(%rsp), %rdi
callq 0x591b30
movq $0x0, 0xd0(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0x50(%rsp)
leaq 0xf0(%rsp), %rdi
callq 0x23c8a0
movq %rax, %rcx
movq 0x50(%rsp), %rax
cmpq %rcx, %rax
jae 0x585a10
movq 0xd0(%rsp), %rsi
leaq 0xf0(%rsp), %rdi
callq 0x591b40
movl 0x8(%rax), %eax
movl %eax, 0x4c(%rsp)
testl %eax, %eax
je 0x58590e
jmp 0x5858f8
movl 0x4c(%rsp), %eax
subl $0x1, %eax
je 0x585913
jmp 0x585903
movl 0x4c(%rsp), %eax
subl $0x2, %eax
je 0x585918
jmp 0x58591d
jmp 0x5859f7
jmp 0x5859f7
jmp 0x5859f7
jmp 0x58591f
movq 0xd0(%rsp), %rsi
leaq 0xf0(%rsp), %rdi
callq 0x591b40
cmpq $0x0, 0x10(%rax)
je 0x5859f5
movq 0xd0(%rsp), %rsi
leaq 0xf0(%rsp), %rdi
callq 0x591b40
movq %rax, %rsi
addq $0x8, %rsi
leaq 0xd0(%rsp), %rdi
callq 0x591b90
movl %edx, 0x3c(%rsp)
movq %rax, 0x40(%rsp)
jmp 0x585973
movl 0x3c(%rsp), %eax
movq 0x40(%rsp), %rcx
movq %rcx, 0xa0(%rsp)
movl %eax, 0xa8(%rsp)
movl 0xa8(%rsp), %eax
movl %eax, 0xc8(%rsp)
movq 0xa0(%rsp), %rax
movq %rax, 0xc0(%rsp)
leaq 0xd8(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0x591b60
jmp 0x5859c0
jmp 0x5859f5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb8(%rsp)
movl %eax, 0xb4(%rsp)
leaq 0xd8(%rsp), %rdi
callq 0x591d20
leaq 0xf0(%rsp), %rdi
callq 0x23c900
jmp 0x585c3f
jmp 0x5859f7
movq 0xd0(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xd0(%rsp)
jmp 0x5858ab
movq $0x0, 0x98(%rsp)
movq $0x0, 0x90(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x30(%rsp)
leaq 0xd8(%rsp), %rdi
callq 0x591bc0
movq %rax, %rcx
movq 0x30(%rsp), %rax
cmpq %rcx, %rax
jae 0x585c0c
movq 0x90(%rsp), %rsi
leaq 0xd8(%rsp), %rdi
callq 0x591be0
movq (%rax), %rax
movq %rax, 0x88(%rsp)
movq 0x88(%rsp), %rsi
leaq 0xf0(%rsp), %rdi
callq 0x591b40
movq %rax, 0x80(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x28(%rsp)
leaq 0xd8(%rsp), %rdi
callq 0x591bc0
movq 0x58(%rsp), %rdi
movq %rax, 0x20(%rsp)
addq $0x48, %rdi
callq 0x58aa30
movq 0x20(%rsp), %rcx
movq %rax, %rdx
movq 0x28(%rsp), %rax
subq %rdx, %rcx
cmpq %rcx, %rax
jae 0x585bb6
movq 0x80(%rsp), %rax
cmpl $0x5, 0x8(%rax)
jne 0x585b0e
movq 0x58(%rsp), %rdi
addq $0x78, %rdi
movq 0x80(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x78(%rsp)
leaq 0x78(%rsp), %rsi
callq 0x591c00
jmp 0x585b09
jmp 0x585bb4
movq 0x80(%rsp), %rax
cmpl $0x3, 0x8(%rax)
je 0x585b2e
movq 0x80(%rsp), %rax
cmpl $0x4, 0x8(%rax)
jne 0x585bb2
movq 0x58(%rsp), %rax
addq $0x60, %rax
movq %rax, 0x8(%rsp)
movq 0x80(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x60(%rsp)
movq 0x80(%rsp), %rsi
addq $0x10, %rsi
leaq 0x60(%rsp), %rdi
callq 0x591c60
movq %rdx, 0x10(%rsp)
movq %rax, 0x18(%rsp)
jmp 0x585b6e
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
movq %rcx, 0x68(%rsp)
movq %rax, 0x70(%rsp)
leaq 0x68(%rsp), %rsi
callq 0x591c30
jmp 0x585b93
movq 0x58(%rsp), %rax
movq 0x80(%rsp), %rcx
movq 0x10(%rcx), %rcx
addq 0x90(%rax), %rcx
movq %rcx, 0x90(%rax)
jmp 0x585bb4
jmp 0x585bf1
movq 0x58(%rsp), %rdi
movq 0x80(%rsp), %rax
movq (%rax), %rax
movq %rax, (%rsp)
addq $0x48, %rdi
movq 0x98(%rsp), %rsi
movq %rsi, %rax
addq $0x1, %rax
movq %rax, 0x98(%rsp)
callq 0x58ebc0
movq (%rsp), %rcx
movq %rcx, (%rax)
jmp 0x585bf3
movq 0x90(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x90(%rsp)
jmp 0x585a28
movq 0x58(%rsp), %rdi
callq 0x591ca0
jmp 0x585c18
leaq 0xd8(%rsp), %rdi
callq 0x591d20
leaq 0xf0(%rsp), %rdi
callq 0x23c900
movq 0x58(%rsp), %rax
addq $0x118, %rsp            # imm = 0x118
retq
movq 0xb8(%rsp), %rdi
callq 0x11b4e0
nopl (%rax)