// File: ArashPartow[P]exprtk/./exprtk.hpp
// Function: exprtk::rtl::vecops::sort<double>::operator()(unsigned long const&, exprtk::type_store<double>::parameter_list)
inline T operator() (const std::size_t& ps_index, parameter_list_t parameters) exprtk_override
      {
         vector_t vec(parameters[0]);

         std::size_t r0 = 0;
         std::size_t r1 = vec.size() - 1;

         if ((1 == ps_index) && !helper::load_vector_range<T>::process(parameters, r0, r1, 1, 2, 0))
            return T(0);
         if ((3 == ps_index) && !helper::load_vector_range<T>::process(parameters, r0, r1, 2, 3, 0))
            return T(0);

         bool ascending = true;

         if ((2 == ps_index) || (3 == ps_index))
         {
            if (exprtk::details::imatch(to_str(string_t(parameters[1])),"ascending"))
               ascending = true;
            else if (exprtk::details::imatch(to_str(string_t(parameters[1])),"descending"))
               ascending = false;
            else
               return T(0);
         }

         if (ascending)
            std::sort(
               vec.begin() + r0,
               vec.begin() + r1 + 1,
               std::less<T>());
         else
            std::sort(
               vec.begin() + r0,
               vec.begin() + r1 + 1,
               std::greater<T>());

         return T(1);
      }

// Assembly:
subq $0x188, %rsp            # imm = 0x188
movq %rdx, 0x178(%rsp)
movq %rdi, 0x170(%rsp)
movq %rsi, 0x168(%rsp)
movq $0x0, 0x150(%rsp)
leaq 0x178(%rsp), %rdi
leaq 0x150(%rsp), %rsi
callq 0x572de0
movq %rax, %rsi
leaq 0x158(%rsp), %rdi
callq 0x572e40
movq $0x0, 0x148(%rsp)
leaq 0x158(%rsp), %rdi
callq 0x572e70
subq $0x1, %rax
movq %rax, 0x140(%rsp)
movq 0x168(%rsp), %rdx
xorl %eax, %eax
movl $0x1, %ecx
cmpq (%rdx), %rcx
movb %al, 0x4c(%rsp)
jne 0x574f2d
movq $0x1, 0x138(%rsp)
movq $0x2, 0x130(%rsp)
leaq 0x178(%rsp), %rdi
leaq 0x148(%rsp), %rsi
leaq 0x140(%rsp), %rdx
leaq 0x138(%rsp), %rcx
leaq 0x130(%rsp), %r8
xorl %eax, %eax
movl %eax, %r9d
callq 0x572e90
xorb $-0x1, %al
movb %al, 0x4c(%rsp)
movb 0x4c(%rsp), %al
testb $0x1, %al
jne 0x574f37
jmp 0x574f48
xorps %xmm0, %xmm0
movsd %xmm0, 0x180(%rsp)
jmp 0x5752a9
movq 0x168(%rsp), %rdx
xorl %eax, %eax
movl $0x3, %ecx
cmpq (%rdx), %rcx
movb %al, 0x4b(%rsp)
jne 0x574fb0
movq $0x2, 0x128(%rsp)
movq $0x3, 0x120(%rsp)
leaq 0x178(%rsp), %rdi
leaq 0x148(%rsp), %rsi
leaq 0x140(%rsp), %rdx
leaq 0x128(%rsp), %rcx
leaq 0x120(%rsp), %r8
xorl %eax, %eax
movl %eax, %r9d
callq 0x572e90
xorb $-0x1, %al
movb %al, 0x4b(%rsp)
movb 0x4b(%rsp), %al
testb $0x1, %al
jne 0x574fba
jmp 0x574fcb
xorps %xmm0, %xmm0
movsd %xmm0, 0x180(%rsp)
jmp 0x5752a9
movb $0x1, 0x11f(%rsp)
movq 0x168(%rsp), %rcx
movl $0x2, %eax
cmpq (%rcx), %rax
je 0x574ffb
movq 0x168(%rsp), %rcx
movl $0x3, %eax
cmpq (%rcx), %rax
jne 0x5751f0
movq $0x1, 0xe0(%rsp)
leaq 0x178(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0x572de0
movq %rax, %rsi
leaq 0xe8(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0x575370
movq 0x38(%rsp), %rsi
leaq 0xf8(%rsp), %rdi
callq 0x5752d0
leaq 0xbf(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x11b6f0
movq 0x40(%rsp), %rdx
leaq 0x4c613(%rip), %rsi     # 0x5c1674
leaq 0xc0(%rsp), %rdi
callq 0x134520
jmp 0x575070
leaq 0xf8(%rsp), %rdi
leaq 0xc0(%rsp), %rsi
callq 0x37fb20
movb %al, 0x37(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0x11b838
leaq 0xbf(%rsp), %rdi
callq 0x11b820
leaq 0xf8(%rsp), %rdi
callq 0x11b838
movb 0x37(%rsp), %al
testb $0x1, %al
jne 0x5750ba
jmp 0x5750fa
movb $0x1, 0x11f(%rsp)
jmp 0x5751ee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
leaq 0xbf(%rsp), %rdi
callq 0x11b820
leaq 0xf8(%rsp), %rdi
callq 0x11b838
jmp 0x5752ba
movq $0x1, 0x70(%rsp)
leaq 0x178(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x572de0
movq %rax, %rsi
leaq 0x78(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x575370
movq 0x20(%rsp), %rsi
leaq 0x88(%rsp), %rdi
callq 0x5752d0
leaq 0x4f(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x11b6f0
movq 0x28(%rsp), %rdx
leaq 0x4c52a(%rip), %rsi     # 0x5c167e
leaq 0x50(%rsp), %rdi
callq 0x134520
jmp 0x575160
leaq 0x88(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x37fb20
movb %al, 0x1f(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x11b838
leaq 0x4f(%rsp), %rdi
callq 0x11b820
leaq 0x88(%rsp), %rdi
callq 0x11b838
movb 0x1f(%rsp), %al
testb $0x1, %al
jne 0x5751a1
jmp 0x5751db
movb $0x0, 0x11f(%rsp)
jmp 0x5751ec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xb0(%rsp)
movl %eax, 0xac(%rsp)
leaq 0x4f(%rsp), %rdi
callq 0x11b820
leaq 0x88(%rsp), %rdi
callq 0x11b838
jmp 0x5752ba
xorps %xmm0, %xmm0
movsd %xmm0, 0x180(%rsp)
jmp 0x5752a9
jmp 0x5751ee
jmp 0x5751f0
testb $0x1, 0x11f(%rsp)
je 0x57524a
leaq 0x158(%rsp), %rdi
callq 0x573ca0
movq 0x148(%rsp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x10(%rsp)
leaq 0x158(%rsp), %rdi
callq 0x573ca0
movq 0x10(%rsp), %rdi
movq %rax, %rsi
movq 0x140(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rsi
addq $0x8, %rsi
callq 0x5753a0
jmp 0x575298
leaq 0x158(%rsp), %rdi
callq 0x573ca0
movq 0x148(%rsp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x8(%rsp)
leaq 0x158(%rsp), %rdi
callq 0x573ca0
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movq 0x140(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rsi
addq $0x8, %rsi
callq 0x5753e0
movsd 0x25da0(%rip), %xmm0    # 0x59b040
movsd %xmm0, 0x180(%rsp)
movsd 0x180(%rsp), %xmm0
addq $0x188, %rsp            # imm = 0x188
retq
movq 0xb0(%rsp), %rdi
callq 0x11b4e0
nopw (%rax,%rax)