// File: ArashPartow[P]exprtk/./exprtk.hpp
// Function: bool exprtk::details::match_impl<char const*, exprtk::details::cs_match>(char const*, char const*, char const*, char const*, std::iterator_traits<char const*>::value_type const&, std::iterator_traits<char const*>::value_type const&)
inline bool match_impl(const Iterator pattern_begin,
                             const Iterator pattern_end  ,
                             const Iterator data_begin   ,
                             const Iterator data_end     ,
                             const typename std::iterator_traits<Iterator>::value_type& zero_or_more,
                             const typename std::iterator_traits<Iterator>::value_type& exactly_one )
      {
         typedef typename std::iterator_traits<Iterator>::value_type type;

         const Iterator null_itr(0);

         Iterator p_itr  = pattern_begin;
         Iterator d_itr  = data_begin;
         Iterator np_itr = null_itr;
         Iterator nd_itr = null_itr;

         for ( ; ; )
         {
            if (p_itr != pattern_end)
            {
               const type c = *(p_itr);

               if ((data_end != d_itr) && (Compare::cmp(c,*(d_itr)) || (exactly_one == c)))
               {
                  ++d_itr;
                  ++p_itr;
                  continue;
               }
               else if (zero_or_more == c)
               {
                  while ((pattern_end != p_itr) && (zero_or_more == *(p_itr)))
                  {
                     ++p_itr;
                  }

                  const type d = *(p_itr);

                  while ((data_end != d_itr) && !(Compare::cmp(d,*(d_itr)) || (exactly_one == d)))
                  {
                     ++d_itr;
                  }

                  // set backtrack iterators
                  np_itr = p_itr - 1;
                  nd_itr = d_itr + 1;

                  continue;
               }
            }
            else if (data_end == d_itr)
               break;

            if ((data_end == d_itr) || (null_itr == nd_itr))
                return false;

            p_itr = np_itr;
            d_itr = nd_itr;
         }

         return true;
      }

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x58(%rsp)
movq %rsi, 0x50(%rsp)
movq %rdx, 0x48(%rsp)
movq %rcx, 0x40(%rsp)
movq %r8, 0x38(%rsp)
movq %r9, 0x30(%rsp)
movq $0x0, 0x28(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x18(%rsp)
movq $0x0, 0x10(%rsp)
movq $0x0, 0x8(%rsp)
movq 0x20(%rsp), %rax
cmpq 0x50(%rsp), %rax
je 0x4403d8
movq 0x20(%rsp), %rax
movb (%rax), %al
movb %al, 0x7(%rsp)
movq 0x40(%rsp), %rax
cmpq 0x18(%rsp), %rax
je 0x4402df
movb 0x7(%rsp), %cl
movq 0x18(%rsp), %rax
movsbl %cl, %edi
movsbl (%rax), %esi
callq 0x440430
testb $0x1, %al
jne 0x4402c1
movq 0x30(%rsp), %rax
movsbl (%rax), %eax
movsbl 0x7(%rsp), %ecx
cmpl %ecx, %eax
jne 0x4402df
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0x440271
movq 0x38(%rsp), %rax
movsbl (%rax), %eax
movsbl 0x7(%rsp), %ecx
cmpl %ecx, %eax
jne 0x4403d4
jmp 0x4402f6
movq 0x50(%rsp), %rcx
xorl %eax, %eax
cmpq 0x20(%rsp), %rcx
movb %al, 0x5(%rsp)
je 0x440321
movq 0x38(%rsp), %rax
movsbl (%rax), %eax
movq 0x20(%rsp), %rcx
movsbl (%rcx), %ecx
cmpl %ecx, %eax
sete %al
movb %al, 0x5(%rsp)
movb 0x5(%rsp), %al
testb $0x1, %al
jne 0x44032b
jmp 0x44033b
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0x4402f6
movq 0x20(%rsp), %rax
movb (%rax), %al
movb %al, 0x6(%rsp)
movq 0x40(%rsp), %rcx
xorl %eax, %eax
cmpq 0x18(%rsp), %rcx
movb %al, 0x4(%rsp)
je 0x440399
movb 0x6(%rsp), %cl
movq 0x18(%rsp), %rax
movsbl %cl, %edi
movsbl (%rax), %esi
callq 0x440430
movb %al, %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, 0x3(%rsp)
jne 0x44038f
movq 0x30(%rsp), %rax
movsbl (%rax), %eax
movsbl 0x6(%rsp), %ecx
cmpl %ecx, %eax
sete %al
movb %al, 0x3(%rsp)
movb 0x3(%rsp), %al
xorb $-0x1, %al
movb %al, 0x4(%rsp)
movb 0x4(%rsp), %al
testb $0x1, %al
jne 0x4403a3
jmp 0x4403b3
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
jmp 0x440346
movq 0x20(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0x440271
jmp 0x4403d6
jmp 0x4403e8
movq 0x40(%rsp), %rax
cmpq 0x18(%rsp), %rax
jne 0x4403e6
jmp 0x44041d
jmp 0x4403e8
movq 0x40(%rsp), %rax
cmpq 0x18(%rsp), %rax
je 0x4403fd
xorl %eax, %eax
cmpq 0x8(%rsp), %rax
jne 0x440404
movb $0x0, 0x67(%rsp)
jmp 0x440422
movq 0x10(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x18(%rsp)
jmp 0x440271
movb $0x1, 0x67(%rsp)
movb 0x67(%rsp), %al
andb $0x1, %al
addq $0x68, %rsp
retq
nopl (%rax)