// File: /workspace/github_cpp_makefile_star2_O1/ArashPartow[P]exprtk/./exprtk.hpp
// Function: exprtk::rtl::vecops::nthelement<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 n  = 0;
         std::size_t r0 = 0;
         std::size_t r1 = vec.size() - 1;

         if (!scalar_t(parameters[1]).to_uint(n))
            return T(0);

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

         std::nth_element(
            vec.begin() + r0,
            vec.begin() + r0 + n ,
            vec.begin() + r1 + 1);

         return T(1);
      }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq (%rdx), %rax
movq (%rax), %r15
movq 0x8(%rax), %r12
movq 0x18(%rax), %r13
movsd (%r13), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
ja 0x3a3dc5
movsd 0xe295(%rip), %xmm1     # 0x3b2020
callq 0x120460
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x3a3dc5
jp 0x3a3dc5
movsd (%r13), %xmm0
cvttsd2si %xmm0, %rax
movq %rax, %rcx
subsd 0xe4d6(%rip), %xmm0     # 0x3b2288
cvttsd2si %xmm0, %r13
sarq $0x3f, %rcx
andq %rcx, %r13
orq %rax, %r13
movb $0x1, %al
jmp 0x3a3dca
xorl %r13d, %r13d
xorl %eax, %eax
testb %al, %al
je 0x3a3f30
decq %r12
cmpq $0x1, (%r14)
jne 0x3a3ed2
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rdx
cmpq $0x4, %rdx
jb 0x3a3ed7
movq 0x30(%rax), %r14
movsd (%r14), %xmm0
ucomisd %xmm0, %xmm1
ja 0x3a3ed7
movsd 0xe200(%rip), %xmm1     # 0x3b2020
callq 0x120460
ucomisd 0xe3cb(%rip), %xmm0     # 0x3b21f8
jne 0x3a3ed7
jp 0x3a3ed7
movsd (%r14), %xmm0
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0xe436(%rip), %xmm0     # 0x3b2288
cvttsd2si %xmm0, %r14
andq %rcx, %r14
orq %rax, %r14
movq (%rbx), %rax
movq 0x48(%rax), %rbp
movsd (%rbp), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
ja 0x3a3eda
movsd 0xe1a5(%rip), %xmm1     # 0x3b2020
callq 0x120460
ucomisd 0xe370(%rip), %xmm0     # 0x3b21f8
jne 0x3a3eda
jp 0x3a3eda
movsd (%rbp), %xmm0
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0xe3e3(%rip), %xmm0     # 0x3b2288
cvttsd2si %xmm0, %r12
andq %rcx, %r12
orq %rax, %r12
movq (%rbx), %rax
movq 0x8(%rax), %rax
decq %rax
cmpq %r14, %rax
setae %cl
cmpq %r12, %rax
setae %dl
andb %cl, %dl
cmpq %r12, %r14
setbe %al
andb %dl, %al
jmp 0x3a3edc
xorl %r14d, %r14d
jmp 0x3a3ee0
xorl %r14d, %r14d
xorl %eax, %eax
testb %al, %al
je 0x3a3f28
leaq (%r15,%r14,8), %rdi
leaq (%r15,%r12,8), %rdx
addq $0x8, %rdx
movsd 0xe12c(%rip), %xmm1     # 0x3b2020
cmpq %rdx, %rdi
je 0x3a3f30
leaq (%rdi,%r13,8), %rsi
cmpq %rdx, %rsi
je 0x3a3f30
movq %rdx, %rax
subq %rdi, %rax
sarq $0x3, %rax
bsrq %rax, %rcx
xorl $0x3f, %ecx
addl %ecx, %ecx
xorq $0x7e, %rcx
callq 0x3a3f43
movsd 0xe0fa(%rip), %xmm1     # 0x3b2020
jmp 0x3a3f30
movsd 0xe2e0(%rip), %xmm1     # 0x3b2210
movapd %xmm1, %xmm0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq