// File: ArashPartow[P]exprtk-extras/exprtk_vectornorm.cpp
// Function: norm<double>::operator()(unsigned long const&, exprtk::type_store<double>::parameter_list)
inline T operator()(const std::size_t& ps_index, parameter_list_t parameters)
   {
      unsigned int l = 2;

      // Determine the l-power
      if (
           (2 == ps_index) ||
           (3 == ps_index)
         )
      {
         if (!scalar_t(parameters[1]).to_uint(l))
            return std::numeric_limits<T>::quiet_NaN();
      }

      const vector_t vec(parameters[0]);

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

      // Determine the range over the vector
      if (
           (1 == ps_index) ||
           (3 == ps_index)
         )
      {
         if (!scalar_t(parameters[(1 == ps_index) ? 1 : 2]).to_uint(r0))
            return std::numeric_limits<T>::quiet_NaN();

         if (!scalar_t(parameters[(1 == ps_index) ? 2 : 3]).to_uint(r1))
            return std::numeric_limits<T>::quiet_NaN();
      }

      switch (l)
      {
         #define norm_def(N) case  N : return norm_impl<N>(vec,r0,r1);
         norm_def( 1) norm_def( 2) norm_def( 3) norm_def( 4)
         norm_def( 5) norm_def( 6) norm_def( 7) norm_def( 8)
         norm_def( 9) norm_def(10) norm_def(11) norm_def(12)
         norm_def(13) norm_def(14) norm_def(15) norm_def(16)
         norm_def(17) norm_def(18) norm_def(19) norm_def(20)
         norm_def(21) norm_def(22) norm_def(23) norm_def(24)
         norm_def(25) norm_def(26) norm_def(27) norm_def(28)
         norm_def(29) norm_def(30) norm_def(31) norm_def(32)
         default : return norm_impl(vec,l,r0,r1);
      }
   }

// Assembly:
subq $0x98, %rsp
movq %rdx, 0x88(%rsp)
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x2, 0x74(%rsp)
movq 0x78(%rsp), %rcx
movl $0x2, %eax
cmpq (%rcx), %rax
je 0x122e0f
movq 0x78(%rsp), %rcx
movl $0x3, %eax
cmpq (%rcx), %rax
jne 0x122e63
movq $0x1, 0x60(%rsp)
leaq 0x88(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x1235f0
movq %rax, %rsi
leaq 0x68(%rsp), %rdi
callq 0x123620
leaq 0x68(%rsp), %rdi
leaq 0x74(%rsp), %rsi
callq 0x123640
xorb $-0x1, %al
testb $0x1, %al
jne 0x122e4e
jmp 0x122e61
callq 0x1235e0
movsd %xmm0, 0x90(%rsp)
jmp 0x1234cd
jmp 0x122e63
movq $0x0, 0x48(%rsp)
leaq 0x88(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x1235f0
movq %rax, %rsi
leaq 0x50(%rsp), %rdi
callq 0x1236b0
movq $0x0, 0x40(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x1236e0
subq $0x1, %rax
movq %rax, 0x38(%rsp)
movq 0x78(%rsp), %rcx
movl $0x1, %eax
cmpq (%rcx), %rax
je 0x122ec9
movq 0x78(%rsp), %rcx
movl $0x3, %eax
cmpq (%rcx), %rax
jne 0x122fa5
movq 0x78(%rsp), %rax
movq (%rax), %rsi
movl $0x1, %edx
movl $0x2, %eax
movl $0x1, %ecx
cmpq %rsi, %rdx
cmovel %ecx, %eax
cltq
movq %rax, 0x28(%rsp)
leaq 0x88(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x1235f0
movq %rax, %rsi
leaq 0x30(%rsp), %rdi
callq 0x123620
leaq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0x123700
xorb $-0x1, %al
testb $0x1, %al
jne 0x122f23
jmp 0x122f36
callq 0x1235e0
movsd %xmm0, 0x90(%rsp)
jmp 0x1234cd
movq 0x78(%rsp), %rax
movq (%rax), %rsi
movl $0x1, %edx
movl $0x3, %eax
movl $0x2, %ecx
cmpq %rsi, %rdx
cmovel %ecx, %eax
cltq
movq %rax, 0x18(%rsp)
leaq 0x88(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x1235f0
movq %rax, %rsi
leaq 0x20(%rsp), %rdi
callq 0x123620
leaq 0x20(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0x123700
xorb $-0x1, %al
testb $0x1, %al
jne 0x122f90
jmp 0x122fa3
callq 0x1235e0
movsd %xmm0, 0x90(%rsp)
jmp 0x1234cd
jmp 0x122fa5
movl 0x74(%rsp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, 0x8(%rsp)
subl $0x1f, %eax
ja 0x1234a7
movq 0x8(%rsp), %rax
leaq 0x32503d(%rip), %rcx    # 0x448004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x50(%rsp), %rsi
callq 0x1237a0
movsd %xmm0, 0x90(%rsp)
jmp 0x1234cd
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x50(%rsp), %rsi
callq 0x123820
movsd %xmm0, 0x90(%rsp)
jmp 0x1234cd
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x50(%rsp), %rsi
callq 0x1238a0
movsd %xmm0, 0x90(%rsp)
jmp 0x1234cd
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x50(%rsp), %rsi
callq 0x123930
movsd %xmm0, 0x90(%rsp)
jmp 0x1234cd
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x50(%rsp), %rsi
callq 0x1239c0
movsd %xmm0, 0x90(%rsp)
jmp 0x1234cd
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x50(%rsp), %rsi
callq 0x123a50
movsd %xmm0, 0x90(%rsp)
jmp 0x1234cd
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x50(%rsp), %rsi
callq 0x123ae0
movsd %xmm0, 0x90(%rsp)
jmp 0x1234cd
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x50(%rsp), %rsi
callq 0x123b70
movsd %xmm0, 0x90(%rsp)
jmp 0x1234cd
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x50(%rsp), %rsi
callq 0x123c00
movsd %xmm0, 0x90(%rsp)
jmp 0x1234cd
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x50(%rsp), %rsi
callq 0x123c90
movsd %xmm0, 0x90(%rsp)
jmp 0x1234cd
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x50(%rsp), %rsi
callq 0x123d20
movsd %xmm0, 0x90(%rsp)
jmp 0x1234cd
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x50(%rsp), %rsi
callq 0x123db0
movsd %xmm0, 0x90(%rsp)
jmp 0x1234cd
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x50(%rsp), %rsi
callq 0x123e40
movsd %xmm0, 0x90(%rsp)
jmp 0x1234cd
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x50(%rsp), %rsi
callq 0x123ed0
movsd %xmm0, 0x90(%rsp)
jmp 0x1234cd
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x50(%rsp), %rsi
callq 0x123f60
movsd %xmm0, 0x90(%rsp)
jmp 0x1234cd
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x50(%rsp), %rsi
callq 0x123ff0
movsd %xmm0, 0x90(%rsp)
jmp 0x1234cd
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x50(%rsp), %rsi
callq 0x124080
movsd %xmm0, 0x90(%rsp)
jmp 0x1234cd
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x50(%rsp), %rsi
callq 0x124110
movsd %xmm0, 0x90(%rsp)
jmp 0x1234cd
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x50(%rsp), %rsi
callq 0x1241a0
movsd %xmm0, 0x90(%rsp)
jmp 0x1234cd
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x50(%rsp), %rsi
callq 0x124230
movsd %xmm0, 0x90(%rsp)
jmp 0x1234cd
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x50(%rsp), %rsi
callq 0x1242c0
movsd %xmm0, 0x90(%rsp)
jmp 0x1234cd
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x50(%rsp), %rsi
callq 0x124350
movsd %xmm0, 0x90(%rsp)
jmp 0x1234cd
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x50(%rsp), %rsi
callq 0x1243e0
movsd %xmm0, 0x90(%rsp)
jmp 0x1234cd
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x50(%rsp), %rsi
callq 0x124470
movsd %xmm0, 0x90(%rsp)
jmp 0x1234cd
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x50(%rsp), %rsi
callq 0x124500
movsd %xmm0, 0x90(%rsp)
jmp 0x1234cd
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x50(%rsp), %rsi
callq 0x124590
movsd %xmm0, 0x90(%rsp)
jmp 0x1234cd
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x50(%rsp), %rsi
callq 0x124620
movsd %xmm0, 0x90(%rsp)
jmp 0x1234cd
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x50(%rsp), %rsi
callq 0x1246b0
movsd %xmm0, 0x90(%rsp)
jmp 0x1234cd
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x50(%rsp), %rsi
callq 0x124740
movsd %xmm0, 0x90(%rsp)
jmp 0x1234cd
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x50(%rsp), %rsi
callq 0x1247d0
movsd %xmm0, 0x90(%rsp)
jmp 0x1234cd
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x50(%rsp), %rsi
callq 0x124860
movsd %xmm0, 0x90(%rsp)
jmp 0x1234cd
movq 0x10(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x50(%rsp), %rsi
callq 0x1248f0
movsd %xmm0, 0x90(%rsp)
jmp 0x1234cd
movq 0x10(%rsp), %rdi
movl 0x74(%rsp), %edx
movq 0x40(%rsp), %rcx
movq 0x38(%rsp), %r8
leaq 0x50(%rsp), %rsi
callq 0x124980
movsd %xmm0, 0x90(%rsp)
movsd 0x90(%rsp), %xmm0
addq $0x98, %rsp
retq
nop