// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/tre/lib/tre-match-parallel.c
// Function: tre_tnfa_run_parallel
reg_errcode_t
tre_tnfa_run_parallel(const tre_tnfa_t *tnfa, const void *string, int len,
		      tre_str_type_t type, int *match_tags, int eflags,
		      int *match_end_ofs)
{
  /* State variables required by GET_NEXT_WCHAR. */
  tre_char_t prev_c = 0, next_c = 0;
  const char *str_byte = string;
  int pos = -1;
  unsigned int pos_add_next = 1;
#ifdef TRE_WCHAR
  const wchar_t *str_wide = string;
#ifdef TRE_MBSTATE
  mbstate_t mbstate;
#endif /* TRE_MBSTATE */
#endif /* TRE_WCHAR */
  int reg_notbol = eflags & REG_NOTBOL;
  int reg_noteol = eflags & REG_NOTEOL;
  int reg_newline = tnfa->cflags & REG_NEWLINE;
  int str_user_end = 0;

  char *buf;
  tre_tnfa_transition_t *trans_i;
  tre_tnfa_reach_t *reach, *reach_next, *reach_i, *reach_next_i;
  tre_reach_pos_t *reach_pos;
  int *tag_i;
  int num_tags, i;

  int match_eo = -1;	   /* end offset of match (-1 if no match found yet) */
  int new_match = 0;
  int *tmp_tags = NULL;
  int *tmp_iptr;

#ifdef TRE_MBSTATE
  memset(&mbstate, '\0', sizeof(mbstate));
#endif /* TRE_MBSTATE */

  DPRINT(("tre_tnfa_run_parallel, input type %d\n", type));

  if (!match_tags)
    num_tags = 0;
  else
    num_tags = tnfa->num_tags;

  /* Allocate memory for temporary data required for matching.	This needs to
     be done for every matching operation to be thread safe.  This allocates
     everything in a single large block from the stack frame using alloca()
     or with malloc() if alloca is unavailable. */
  {
    int tbytes, rbytes, pbytes, xbytes, total_bytes;
    char *tmp_buf;
    /* Compute the length of the block we need. */
    tbytes = sizeof(*tmp_tags) * num_tags;
    rbytes = sizeof(*reach_next) * (tnfa->num_states + 1);
    pbytes = sizeof(*reach_pos) * tnfa->num_states;
    xbytes = sizeof(int) * num_tags;
    total_bytes =
      (sizeof(GtWord) - 1) * 4 /* for alignment paddings */
      + (rbytes + xbytes * tnfa->num_states) * 2 + tbytes + pbytes;

    /* Allocate the memory. */
#ifdef TRE_USE_ALLOCA
    buf = alloca(total_bytes);
#else /* !TRE_USE_ALLOCA */
    buf = xmalloc((unsigned)total_bytes);
#endif /* !TRE_USE_ALLOCA */
    if (buf == NULL)
      return REG_ESPACE;
    memset(buf, 0, (size_t)total_bytes);

    /* Get the various pointers within tmp_buf (properly aligned). */
    tmp_tags = (void *)buf;
    tmp_buf = buf + tbytes;
    tmp_buf += ALIGN(tmp_buf, GtWord);
    reach_next = (void *)tmp_buf;
    tmp_buf += rbytes;
    tmp_buf += ALIGN(tmp_buf, GtWord);
    reach = (void *)tmp_buf;
    tmp_buf += rbytes;
    tmp_buf += ALIGN(tmp_buf, GtWord);
    reach_pos = (void *)tmp_buf;
    tmp_buf += pbytes;
    tmp_buf += ALIGN(tmp_buf, GtWord);
    for (i = 0; i < tnfa->num_states; i++)
      {
	reach[i].tags = (void *)tmp_buf;
	tmp_buf += xbytes;
	reach_next[i].tags = (void *)tmp_buf;
	tmp_buf += xbytes;
      }
  }

  for (i = 0; i < tnfa->num_states; i++)
    reach_pos[i].pos = -1;

  /* If only one character can start a match, find it first. */
  if (tnfa->first_char >= 0 && type == STR_BYTE && str_byte)
    {
      const char *orig_str = str_byte;
      int first = tnfa->first_char;

      if (len >= 0)
	str_byte = memchr(orig_str, first, (size_t)len);
      else
	str_byte = strchr(orig_str, first);
      if (str_byte == NULL)
	{
#ifndef TRE_USE_ALLOCA
	  if (buf)
	    xfree(buf);
#endif /* !TRE_USE_ALLOCA */
	  return REG_NOMATCH;
	}
      DPRINT(("skipped %lu chars\n", (GtUword)(str_byte - orig_str)));
      if (str_byte >= orig_str + 1)
	prev_c = (unsigned char)*(str_byte - 1);
      next_c = (unsigned char)*str_byte;
      pos = str_byte - orig_str;
      if (len < 0 || pos < len)
	str_byte++;
    }
  else
    {
      GET_NEXT_WCHAR();
      pos = 0;
    }

#if 0
  /* Skip over characters that cannot possibly be the first character
     of a match. */
  if (tnfa->firstpos_chars != NULL)
    {
      char *chars = tnfa->firstpos_chars;

      if (len < 0)
	{
	  const char *orig_str = str_byte;
	  /* XXX - use strpbrk() and wcspbrk() because they might be
	     optimized for the target architecture.  Try also strcspn()
	     and wcscspn() and compare the speeds. */
	  while (next_c != L'\0' && !chars[next_c])
	    {
	      next_c = *str_byte++;
	    }
	  prev_c = *(str_byte - 2);
	  pos += str_byte - orig_str;
	  DPRINT(("skipped %d chars\n", str_byte - orig_str));
	}
      else
	{
	  while (pos <= len && !chars[next_c])
	    {
	      prev_c = next_c;
	      next_c = (unsigned char)(*str_byte++);
	      pos++;
	    }
	}
    }
#endif

  DPRINT(("length: %d\n", len));
  DPRINT(("pos:chr/code | states and tags\n"));
  DPRINT(("-------------+------------------------------------------------\n"));

  reach_next_i = reach_next;
  while (/*CONSTCOND*/(void)1,1)
    {
      /* If no match found yet, add the initial states to `reach_next'. */
      if (match_eo < 0)
	{
	  DPRINT((" init >"));
	  trans_i = tnfa->initial;
	  while (trans_i->state != NULL)
	    {
	      if (reach_pos[trans_i->state_id].pos < pos)
		{
		  if (trans_i->assertions
		      && CHECK_ASSERTIONS(trans_i->assertions))
		    {
		      DPRINT(("assertion failed\n"));
		      trans_i++;
		      continue;
		    }

		  DPRINT((" %p", (void *)trans_i->state));
		  reach_next_i->state = trans_i->state;
		  for (i = 0; i < num_tags; i++)
		    reach_next_i->tags[i] = -1;
		  tag_i = trans_i->tags;
		  if (tag_i)
		    while (*tag_i >= 0)
		      {
			if (*tag_i < num_tags)
			  reach_next_i->tags[*tag_i] = pos;
			tag_i++;
		      }
		  if (reach_next_i->state == tnfa->final)
		    {
		      DPRINT(("	 found empty match\n"));
		      match_eo = pos;
		      new_match = 1;
		      for (i = 0; i < num_tags; i++)
			match_tags[i] = reach_next_i->tags[i];
		    }
		  reach_pos[trans_i->state_id].pos = pos;
		  reach_pos[trans_i->state_id].tags = &reach_next_i->tags;
		  reach_next_i++;
		}
	      trans_i++;
	    }
	  DPRINT(("\n"));
	  reach_next_i->state = NULL;
	}
      else
	{
	  if (num_tags == 0 || reach_next_i == reach_next)
	    /*�We have found a match. */
	    break;
	}

      /* Check for end of string. */
      if (len < 0)
	{
	  if (type == STR_USER)
	    {
	      if (str_user_end)
		break;
	    }
	  else if (next_c == L'\0')
	    break;
	}
      else
	{
	  if (pos >= len)
	    break;
	}

      GET_NEXT_WCHAR();

#ifdef TRE_DEBUG
      DPRINT(("%3d:%2lc/%05d |", pos - 1, (tre_cint_t)prev_c, (int)prev_c));
      tre_print_reach(tnfa, reach_next, num_tags);
      DPRINT(("%3d:%2lc/%05d |", pos, (tre_cint_t)next_c, (int)next_c));
      tre_print_reach(tnfa, reach_next, num_tags);
#endif /* TRE_DEBUG */

      /* Swap `reach' and `reach_next'. */
      reach_i = reach;
      reach = reach_next;
      reach_next = reach_i;

      /* For each state in `reach', weed out states that don't fulfill the
	 minimal matching conditions. */
      if (tnfa->num_minimals && new_match)
	{
	  new_match = 0;
	  reach_next_i = reach_next;
	  for (reach_i = reach; reach_i->state; reach_i++)
	    {
	      int skip = 0;
	      for (i = 0; tnfa->minimal_tags[i] >= 0; i += 2)
		{
		  int end = tnfa->minimal_tags[i];
		  int start = tnfa->minimal_tags[i + 1];
		  DPRINT(("  Minimal start %d, end %d\n", start, end));
		  if (end >= num_tags)
		    {
		      DPRINT(("	 Throwing %p out.\n", reach_i->state));
		      skip = 1;
		      break;
		    }
		  else if (reach_i->tags[start] == match_tags[start]
			   && reach_i->tags[end] < match_tags[end])
		    {
		      DPRINT(("	 Throwing %p out because t%d < %d\n",
			      reach_i->state, end, match_tags[end]));
		      skip = 1;
		      break;
		    }
		}
	      if (!skip)
		{
		  reach_next_i->state = reach_i->state;
		  tmp_iptr = reach_next_i->tags;
		  reach_next_i->tags = reach_i->tags;
		  reach_i->tags = tmp_iptr;
		  reach_next_i++;
		}
	    }
	  reach_next_i->state = NULL;

	  /* Swap `reach' and `reach_next'. */
	  reach_i = reach;
	  reach = reach_next;
	  reach_next = reach_i;
	}

      /* For each state in `reach' see if there is a transition leaving with
	 the current input symbol to a state not yet in `reach_next', and
	 add the destination states to `reach_next'. */
      reach_next_i = reach_next;
      for (reach_i = reach; reach_i->state; reach_i++)
	{
	  for (trans_i = reach_i->state; trans_i->state; trans_i++)
	    {
	      /* Does this transition match the input symbol? */
	      if (trans_i->code_min <= (tre_cint_t)prev_c &&
		  trans_i->code_max >= (tre_cint_t)prev_c)
		{
		  if (trans_i->assertions
		      && (CHECK_ASSERTIONS(trans_i->assertions)
			  || CHECK_CHAR_CLASSES(trans_i, tnfa, eflags)))
		    {
		      DPRINT(("assertion failed\n"));
		      continue;
		    }

		  /* Compute the tags after this transition. */
		  for (i = 0; i < num_tags; i++)
		    tmp_tags[i] = reach_i->tags[i];
		  tag_i = trans_i->tags;
		  if (tag_i != NULL)
		    while (*tag_i >= 0)
		      {
			if (*tag_i < num_tags)
			  tmp_tags[*tag_i] = pos;
			tag_i++;
		      }

		  if (reach_pos[trans_i->state_id].pos < pos)
		    {
		      /* Found an unvisited node. */
		      reach_next_i->state = trans_i->state;
		      tmp_iptr = reach_next_i->tags;
		      reach_next_i->tags = tmp_tags;
		      tmp_tags = tmp_iptr;
		      reach_pos[trans_i->state_id].pos = pos;
		      reach_pos[trans_i->state_id].tags = &reach_next_i->tags;

		      if (reach_next_i->state == tnfa->final
			  && (match_eo == -1
			      || (num_tags > 0
				  && reach_next_i->tags[0] <= match_tags[0])))
			{
			  DPRINT(("  found match %p\n", trans_i->state));
			  match_eo = pos;
			  new_match = 1;
			  for (i = 0; i < num_tags; i++)
			    match_tags[i] = reach_next_i->tags[i];
			}
		      reach_next_i++;

		    }
		  else
		    {
		      assert(reach_pos[trans_i->state_id].pos == pos);
		      /* Another path has also reached this state.  We choose
			 the winner by examining the tag values for both
			 paths. */
		      if (tre_tag_order(num_tags, tnfa->tag_directions,
					tmp_tags,
					*reach_pos[trans_i->state_id].tags))
			{
			  /* The new path wins. */
			  tmp_iptr = *reach_pos[trans_i->state_id].tags;
			  *reach_pos[trans_i->state_id].tags = tmp_tags;
			  if (trans_i->state == tnfa->final)
			    {
			      DPRINT(("	 found better match\n"));
			      match_eo = pos;
			      new_match = 1;
			      for (i = 0; i < num_tags; i++)
				match_tags[i] = tmp_tags[i];
			    }
			  tmp_tags = tmp_iptr;
			}
		    }
		}
	    }
	}
      reach_next_i->state = NULL;
    }

  DPRINT(("match end offset = %d\n", match_eo));

#ifndef TRE_USE_ALLOCA
  if (buf)
    xfree(buf);
#endif /* !TRE_USE_ALLOCA */

  *match_end_ofs = match_eo;
  return match_eo >= 0 ? REG_OK : REG_NOMATCH;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movl %r9d, 0x90(%rsp)
movq %r8, %r13
movl %ecx, 0x4c(%rsp)
movl %edx, %r14d
movq %rsi, 0x60(%rsp)
movb $0x0, 0x7(%rsp)
movl $0x1, 0x94(%rsp)
testq %r8, %r8
je 0x94456
movl 0x48(%rdi), %ecx
jmp 0x94458
xorl %ecx, %ecx
movl 0x58(%rdi), %eax
movl %eax, 0x5c(%rsp)
leal (,%rcx,4), %ebp
movq %rdi, 0x38(%rsp)
movl 0x54(%rdi), %r12d
movl %ebp, %eax
imull %r12d, %eax
movq %r12, 0x80(%rsp)
shll $0x4, %r12d
addl %r12d, %eax
addl $0x10, %eax
movq %rcx, 0x10(%rsp)
leal (%r12,%rcx,4), %ecx
leal (%rcx,%rax,2), %r15d
addl $0x1c, %r15d
movq %r15, %rdi
callq 0xb810
movq %rax, %rbx
testq %rax, %rax
movq %r13, 0x68(%rsp)
movl %r14d, 0x7c(%rsp)
je 0x945ce
leal 0x10(%r12), %r13d
movslq %ebp, %r14
movslq %r15d, %rdx
movq %rbx, %rdi
xorl %esi, %esi
callq 0xb2f0
leaq (%rbx,%r14), %rdx
movl %edx, %ecx
andl $0x7, %ecx
movl $0x8, %eax
subq %rcx, %rax
testq %rcx, %rcx
cmoveq %rcx, %rax
addq %rax, %rdx
movslq %r13d, %rcx
movq %rdx, %r11
leaq (%rdx,%rcx), %r9
movl %r9d, %esi
andl $0x7, %esi
movl $0x8, %edx
subq %rsi, %rdx
testq %rsi, %rsi
cmoveq %rsi, %rdx
movl $0x8, %esi
addq %rdx, %r9
leaq (%r9,%rcx), %r10
movl %r10d, %r8d
andl $0x7, %r8d
movl $0x8, %edi
subq %r8, %rdi
testq %r8, %r8
cmoveq %r8, %rdi
addq %rdi, %r10
movq 0x80(%rsp), %r13
testl %r13d, %r13d
movq %r9, 0x98(%rsp)
movq %r11, 0x40(%rsp)
jle 0x945e4
movslq %r12d, %r8
addl %r10d, %r12d
andl $0x7, %r12d
subq %r12, %rsi
xorl %r9d, %r9d
testl %r12d, %r12d
cmovneq %rsi, %r9
addq %rax, %rdx
leaq (%rdx,%r14), %rsi
addq %rcx, %rsi
addq $0x8, %rsi
addq %r14, %rax
addq $0x8, %rax
addq %rdi, %rdx
addq %r9, %rdx
leaq (%rdx,%rcx,2), %rdx
addq %r8, %rdx
leaq (%rdx,%r14), %rcx
leaq (%rdx,%r14,2), %rdx
addq %r14, %r14
movq %r13, %rdi
movq 0x38(%rsp), %r15
movq 0x10(%rsp), %r11
movq %r13, %r9
leaq (%rbx,%rcx), %r8
movq %r8, (%rbx,%rsi)
leaq (%rbx,%rdx), %r8
movq %r8, (%rbx,%rax)
addq $0x10, %rsi
addq $0x10, %rax
addq %r14, %rcx
addq %r14, %rdx
decq %rdi
jne 0x9459c
movq %rbx, %rbp
movq 0x68(%rsp), %r13
movl 0x7c(%rsp), %r14d
jmp 0x945fe
xorl %ebp, %ebp
movq 0x38(%rsp), %r15
movq 0x10(%rsp), %r11
movq 0x80(%rsp), %r9
jmp 0x945fe
movq %rbx, %rbp
movq %r13, %r9
movq 0x68(%rsp), %r13
movl 0x7c(%rsp), %r14d
movq 0x38(%rsp), %r15
movq 0x10(%rsp), %r11
testq %rbx, %rbx
je 0x9474e
testl %r9d, %r9d
jle 0x9470d
leal 0x3(%r9), %eax
decq %r9
movq %r9, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
shrl $0x2, %eax
shlq $0x6, %rax
movdqa 0x592e0(%rip), %xmm1    # 0xed910
movdqa 0x592e8(%rip), %xmm2    # 0xed920
xorl %ecx, %ecx
movdqa 0x592ee(%rip), %xmm3    # 0xed930
pxor %xmm3, %xmm0
pcmpeqd %xmm4, %xmm4
movdqa 0x592fe(%rip), %xmm5    # 0xed950
movdqa %xmm2, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %edx
notl %edx
testb $0x1, %dl
je 0x9468e
movl $0xffffffff, (%r10,%rcx) # imm = 0xFFFFFFFF
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %edx
testb $0x1, %dl
je 0x946a5
movl $0xffffffff, 0x10(%r10,%rcx) # imm = 0xFFFFFFFF
movdqa %xmm1, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
pxor %xmm4, %xmm6
pextrw $0x0, %xmm6, %edx
testb $0x1, %dl
je 0x946e5
movl $0xffffffff, 0x20(%r10,%rcx) # imm = 0xFFFFFFFF
pextrw $0x4, %xmm6, %edx
testb $0x1, %dl
je 0x946f8
movl $0xffffffff, 0x30(%r10,%rcx) # imm = 0xFFFFFFFF
paddq %xmm5, %xmm2
paddq %xmm5, %xmm1
addq $0x40, %rcx
cmpq %rcx, %rax
jne 0x94652
movl 0x4c(%rsp), %eax
cmpl $0x1, %eax
movq %r10, 0x18(%rsp)
movq %rbx, 0xb0(%rsp)
jne 0x94758
cmpq $0x0, 0x60(%rsp)
je 0x94758
movl 0x30(%r15), %esi
testl %esi, %esi
js 0x94758
testl %r14d, %r14d
js 0x947d9
movl %r14d, %edx
movq 0x60(%rsp), %rdi
callq 0xb710
jmp 0x947e3
movl $0xc, %ecx
jmp 0x9555c
cmpl $0x1, %eax
jne 0x94783
testl %r14d, %r14d
je 0x94880
movq 0x60(%rsp), %rax
leaq 0x1(%rax), %rbx
movb (%rax), %al
movb %al, 0x7(%rsp)
movl 0x4c(%rsp), %eax
movl $0x0, 0x48(%rsp)
jmp 0x947d1
movl $0x0, 0x48(%rsp)
movl $0x0, %r9d
movq 0x60(%rsp), %rbx
movl $0x0, 0xc(%rsp)
cmpl $0x3, %eax
jne 0x9489d
movq 0x60(%rsp), %rbx
movq 0x18(%rbx), %rdx
leaq 0x7(%rsp), %rdi
leaq 0x94(%rsp), %rsi
callq *(%rbx)
movq 0x18(%rsp), %r10
movq 0x10(%rsp), %r11
movl %eax, 0x48(%rsp)
movl 0x4c(%rsp), %eax
xorl %r9d, %r9d
jmp 0x94895
movq 0x60(%rsp), %rdi
callq 0xb210
movq %rax, %r15
testq %rax, %rax
je 0x94802
movq 0x60(%rsp), %rax
incq %rax
cmpq %rax, %r15
jae 0x9482b
movl $0x0, 0xc(%rsp)
jmp 0x94833
movq %rbx, %rdi
callq 0xb790
movl $0x1, %ecx
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
xorl %ebx, %ebx
movl $0x0, 0xc(%rsp)
movq 0x10(%rsp), %r11
movq 0x18(%rsp), %r10
jmp 0x94865
movb -0x1(%r15), %al
movl %eax, 0xc(%rsp)
movq 0x10(%rsp), %r11
movq 0x18(%rsp), %r10
movb (%r15), %al
movb %al, 0x7(%rsp)
movl %r15d, %r9d
subl 0x60(%rsp), %r9d
testl %r14d, %r14d
sets %al
cmpl %r14d, %r9d
setl %cl
orb %al, %cl
movzbl %cl, %ebx
addq %r15, %rbx
movl $0xc, %ecx
movl $0x0, 0x48(%rsp)
testq %r15, %r15
movl 0x4c(%rsp), %eax
movq 0x38(%rsp), %r15
jne 0x9489d
jmp 0x9555c
movb $0x0, 0x7(%rsp)
movl $0x0, 0x48(%rsp)
xorl %r9d, %r9d
movq 0x60(%rsp), %rbx
movl $0x0, 0xc(%rsp)
movq %rbx, 0xa8(%rsp)
movl %r11d, %r12d
leaq (,%r12,4), %rcx
movq %rcx, 0xb8(%rsp)
cmpl $0x2, %r11d
movl $0x1, %ecx
cmovgel %r11d, %ecx
movq %rcx, 0xc0(%rsp)
movq $0x0, 0x50(%rsp)
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
movl 0x5c(%rsp), %ecx
andl $0x4, %ecx
shrl $0x2, %ecx
movl %ecx, 0x5c(%rsp)
movq 0x40(%rsp), %rcx
movq %rcx, 0x70(%rsp)
cmpl $0x0, 0x24(%rsp)
js 0x9491b
testl %r11d, %r11d
je 0x9553e
movq 0x70(%rsp), %rcx
cmpq %rcx, 0x40(%rsp)
jne 0x94d3e
jmp 0x9553e
movq 0x10(%r15), %r15
movq 0x8(%r15), %r14
testq %r14, %r14
je 0x94d24
movl 0x90(%rsp), %ecx
testb $0x2, %cl
sete %dil
testb $0x1, %cl
sete %cl
testl %r9d, %r9d
setle %al
sete %r8b
andb %cl, %al
movb %al, 0x8(%rsp)
cmpb $0xa, 0xc(%rsp)
sete %bl
movl 0x5c(%rsp), %esi
andb %sil, %bl
movzbl 0x7(%rsp), %edx
cmpq $0xa, %rdx
sete %al
movq %rdx, 0x28(%rsp)
testq %rdx, %rdx
sete %cl
andb %cl, %dil
andb %sil, %al
orb %dil, %al
movb %al, 0x80(%rsp)
movzbl 0xc(%rsp), %eax
movq %rax, 0x88(%rsp)
movl %ebx, %edi
orb %cl, %r8b
movb %r8b, 0xa0(%rsp)
orb 0x8(%rsp), %dil
movl %r9d, 0x8(%rsp)
movb %dil, 0x30(%rsp)
addq $0x40, %r15
movslq -0x30(%r15), %rax
shlq $0x4, %rax
cmpl %r9d, (%r10,%rax)
jge 0x94d17
movl -0x18(%r15), %ebx
testl %ebx, %ebx
je 0x94c33
testb $0x1, %bl
sete %al
orb %dil, %al
testb $0x1, %al
je 0x94c1d
testb $0x2, %bl
sete %al
orb 0x80(%rsp), %al
testb $0x1, %al
je 0x94c1d
testb $0x10, %bl
jne 0x94b4f
testb $0x20, %bl
jne 0x94ba4
cmpb $0x0, 0x28(%rsp)
setne %al
testl %r9d, %r9d
setne %cl
movl %ebx, %edx
shrb $0x6, %dl
andb %al, %cl
andb %dl, %cl
cmpb $0x1, %cl
jne 0x94ab1
movl $0x1, %eax
movl $0x1, %r13d
cmpb $0x5f, 0xc(%rsp)
je 0x94a71
callq 0xb6e0
movb 0x30(%rsp), %dil
movl 0x8(%rsp), %r9d
movq 0x18(%rsp), %r10
movq 0x10(%rsp), %r11
movq (%rax), %rax
movq 0x88(%rsp), %rcx
movzwl (%rax,%rcx,2), %r13d
movl $0x1, %eax
shrl $0x3, %r13d
andl $0x1, %r13d
cmpl $0x5f, 0x28(%rsp)
je 0x94aa3
callq 0xb6e0
movb 0x30(%rsp), %dil
movl 0x8(%rsp), %r9d
movq 0x18(%rsp), %r10
movq 0x10(%rsp), %r11
movq (%rax), %rax
movq 0x28(%rsp), %rcx
movzwl (%rax,%rcx,2), %eax
shrl $0x3, %eax
andl $0x1, %eax
cmpl %eax, %r13d
movq 0x68(%rsp), %r13
je 0x94c1d
testb %bl, %bl
jns 0x94c33
testb $0x1, 0xa0(%rsp)
jne 0x94c1d
movl $0x1, %ebx
movl $0x1, %r13d
cmpb $0x5f, 0xc(%rsp)
je 0x94b0a
callq 0xb6e0
movb 0x30(%rsp), %dil
movl 0x8(%rsp), %r9d
movq 0x18(%rsp), %r10
movq 0x10(%rsp), %r11
movq (%rax), %rax
movq 0x88(%rsp), %rcx
movzwl (%rax,%rcx,2), %r13d
shrl $0x3, %r13d
andl $0x1, %r13d
cmpl $0x5f, 0x28(%rsp)
je 0x94b3c
callq 0xb6e0
movb 0x30(%rsp), %dil
movl 0x8(%rsp), %r9d
movq 0x18(%rsp), %r10
movq 0x10(%rsp), %r11
movq (%rax), %rax
movq 0x28(%rsp), %rcx
movzwl (%rax,%rcx,2), %ebx
shrl $0x3, %ebx
andl $0x1, %ebx
cmpl %ebx, %r13d
movq 0x68(%rsp), %r13
jne 0x94c1d
jmp 0x94c33
cmpb $0x5f, 0xc(%rsp)
je 0x94c1d
callq 0xb6e0
movb 0x30(%rsp), %dil
movl 0x8(%rsp), %r9d
movq 0x18(%rsp), %r10
movq 0x10(%rsp), %r11
movq (%rax), %rax
movq 0x88(%rsp), %rcx
testb $0x8, (%rax,%rcx,2)
jne 0x94c1d
cmpl $0x5f, 0x28(%rsp)
je 0x94a00
movq 0x28(%rsp), %rcx
testb $0x8, (%rax,%rcx,2)
jne 0x94a00
jmp 0x94c1d
cmpb $0x5f, 0xc(%rsp)
jne 0x94bb4
cmpl $0x5f, 0x28(%rsp)
jne 0x94bf2
jmp 0x94c1d
cmpb $0x5f, 0x28(%rsp)
sete %r13b
callq 0xb6e0
movb 0x30(%rsp), %dil
movl 0x8(%rsp), %r9d
movq 0x18(%rsp), %r10
movq 0x10(%rsp), %r11
movq (%rax), %rax
movq 0x88(%rsp), %rcx
testb $0x8, (%rax,%rcx,2)
sete %al
orb %r13b, %al
movq 0x68(%rsp), %r13
jne 0x94c1d
callq 0xb6e0
movb 0x30(%rsp), %dil
movl 0x8(%rsp), %r9d
movq 0x18(%rsp), %r10
movq 0x10(%rsp), %r11
movq (%rax), %rax
movq 0x28(%rsp), %rcx
testb $0x8, (%rax,%rcx,2)
je 0x94a09
movq 0x8(%r15), %r14
addq $0x40, %r15
testq %r14, %r14
jne 0x949b3
jmp 0x94d24
movq 0x40(%rsp), %rax
movq %r14, (%rax)
testl %r11d, %r11d
jle 0x94c6a
movq 0x8(%rax), %rdi
movl $0xff, %esi
movq 0xb8(%rsp), %rdx
callq 0xb2f0
movb 0x30(%rsp), %dil
movl 0x8(%rsp), %r9d
movq 0x18(%rsp), %r10
movq 0x10(%rsp), %r11
movq -0x28(%r15), %rax
testq %rax, %rax
je 0x94c9b
movl (%rax), %ecx
testl %ecx, %ecx
js 0x94c9b
addq $0x4, %rax
cmpl %r11d, %ecx
jge 0x94c91
movq 0x40(%rsp), %rdx
movq 0x8(%rdx), %rdx
movl %ecx, %ecx
movl %r9d, (%rdx,%rcx,4)
movl (%rax), %ecx
addq $0x4, %rax
testl %ecx, %ecx
jns 0x94c7d
testl %r11d, %r11d
setle %al
movq 0x38(%rsp), %rcx
cmpq 0x18(%rcx), %r14
movl 0x24(%rsp), %ecx
cmovel %r9d, %ecx
movl %ecx, 0x24(%rsp)
setne %cl
movl $0x1, %edx
movq 0x50(%rsp), %rsi
cmovel %edx, %esi
orb %al, %cl
jne 0x94cef
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rax
xorl %ecx, %ecx
movl (%rax,%rcx,4), %edx
movl %edx, (%r13,%rcx,4)
incq %rcx
cmpq %rcx, %r12
jne 0x94cd5
movl $0x1, %esi
movl %r9d, 0x24(%rsp)
movq %rsi, 0x50(%rsp)
movslq -0x30(%r15), %rax
shlq $0x4, %rax
movl %r9d, (%r10,%rax)
movq 0x40(%rsp), %rdx
leaq 0x8(%rdx), %rcx
movq %rcx, 0x8(%r10,%rax)
addq $0x10, %rdx
movq %rdx, 0x40(%rsp)
movq 0x8(%r15), %r14
testq %r14, %r14
jne 0x949af
movq 0x40(%rsp), %rax
movq $0x0, (%rax)
movl 0x4c(%rsp), %eax
movl 0x7c(%rsp), %r14d
movq 0x38(%rsp), %r15
testl %r14d, %r14d
js 0x94d4d
cmpl %r14d, %r9d
jl 0x94d69
jmp 0x9553e
cmpl $0x3, %eax
jne 0x94d5e
cmpl $0x0, 0x48(%rsp)
je 0x94d69
jmp 0x9553e
cmpb $0x0, 0x7(%rsp)
je 0x9553e
movb 0x7(%rsp), %cl
movl %ecx, 0xc(%rsp)
cmpl $0x1, %eax
jne 0x94d8a
incl %r9d
testl %r14d, %r14d
js 0x94dca
cmpl %r14d, %r9d
jl 0x94dca
movb $0x0, 0x7(%rsp)
jmp 0x94de3
cmpl $0x3, %eax
movq 0x50(%rsp), %r14
jne 0x94de8
addl 0x94(%rsp), %r9d
movq 0x60(%rsp), %rax
movq 0x18(%rax), %rdx
leaq 0x7(%rsp), %rdi
leaq 0x94(%rsp), %rsi
movl %r9d, %ebx
callq *(%rax)
movl %ebx, %r9d
movq 0x18(%rsp), %r10
movq 0x10(%rsp), %r11
movl %eax, 0x48(%rsp)
jmp 0x94de8
movq 0xa8(%rsp), %rcx
movb (%rcx), %al
incq %rcx
movq %rcx, 0xa8(%rsp)
movb %al, 0x7(%rsp)
movq 0x50(%rsp), %r14
cmpl $0x0, 0x4c(%r15)
movl %r9d, 0x8(%rsp)
je 0x94ee9
testl %r14d, %r14d
je 0x94ee9
movq 0x70(%rsp), %rax
movq (%rax), %rdi
movq 0x98(%rsp), %rcx
testq %rdi, %rdi
je 0x94eca
movq 0x40(%r15), %rax
movl (%rax), %edx
addq $0x8, %rax
movq 0x70(%rsp), %rsi
movq 0x98(%rsp), %rcx
testl %edx, %edx
js 0x94ea2
xorl %r9d, %r9d
movq %rax, %r8
movl %edx, %r10d
cmpl %r11d, %r10d
jge 0x94e6f
movslq -0x4(%r8), %rbx
movq 0x8(%rsi), %r11
movl (%r11,%rbx,4), %r14d
cmpl (%r13,%rbx,4), %r14d
jne 0x94e7a
movl %r10d, %r10d
movl (%r11,%r10,4), %r11d
cmpl (%r13,%r10,4), %r11d
jge 0x94e7a
xorl %r10d, %r10d
movl $0x1, %r9d
jmp 0x94e7d
xorl %r10d, %r10d
movl $0x1, %r9d
jmp 0x94e82
movb $0x1, %r10b
movq 0x10(%rsp), %r11
testb %r10b, %r10b
je 0x94e93
movl (%r8), %r10d
addq $0x8, %r8
testl %r10d, %r10d
jns 0x94e3e
testl %r9d, %r9d
movq 0x18(%rsp), %r10
movl 0x8(%rsp), %r9d
jne 0x94eb9
movq %rdi, (%rcx)
movq 0x8(%rcx), %rdi
movq 0x8(%rsi), %r8
movq %r8, 0x8(%rcx)
movq %rdi, 0x8(%rsi)
addq $0x10, %rcx
movq 0x10(%rsi), %rdi
addq $0x10, %rsi
testq %rdi, %rdi
jne 0x94e31
movq $0x0, (%rcx)
movq $0x0, 0x50(%rsp)
movq 0x70(%rsp), %rsi
movq 0x98(%rsp), %rdx
jmp 0x94ef6
movq 0x98(%rsp), %rsi
movq 0x70(%rsp), %rdx
movq (%rdx), %r14
testq %r14, %r14
movq %rdx, 0x98(%rsp)
movq %rsi, 0xa0(%rsp)
je 0x95502
movzbl 0xc(%rsp), %r15d
testb $0x1, 0x90(%rsp)
sete %al
testl %r9d, %r9d
setle %cl
andb %al, %cl
cmpb $0xa, %r15b
sete %al
andb 0x5c(%rsp), %al
orb %cl, %al
movb %al, 0x70(%rsp)
movq %rdx, 0x80(%rsp)
movq %rsi, 0x40(%rsp)
cmpq $0x0, 0x8(%r14)
je 0x954d9
leaq 0x8(%r14), %r13
movswl (%r14), %eax
cmpl %r15d, %eax
jg 0x95481
movswl 0x2(%r14), %eax
cmpl %r15d, %eax
jl 0x95481
movl 0x28(%r14), %ebx
testl %ebx, %ebx
je 0x9517a
testb $0x1, %bl
sete %al
orb 0x70(%rsp), %al
testb $0x1, %al
je 0x95481
testb $0x2, %bl
jne 0x952b0
testb $0x10, %bl
jne 0x952e0
testb $0x20, %bl
jne 0x9532b
testl %r9d, %r9d
setne %al
movl %ebx, %ecx
shrb $0x6, %cl
andb %al, %cl
movb 0x7(%rsp), %al
movzbl %al, %edx
testb %dl, %dl
setne %al
andb %cl, %al
cmpb $0x1, %al
jne 0x95048
movl $0x1, %eax
movl $0x1, %ecx
cmpb $0x5f, 0xc(%rsp)
movq %rdx, 0x28(%rsp)
je 0x9500d
callq 0xb6e0
movq 0x28(%rsp), %rdx
movl 0x8(%rsp), %r9d
movq 0x18(%rsp), %r10
movq 0x10(%rsp), %r11
movq (%rax), %rax
movzwl (%rax,%r15,2), %ecx
movl $0x1, %eax
shrl $0x3, %ecx
andl $0x1, %ecx
cmpl $0x5f, %edx
je 0x95040
movl %ecx, 0x30(%rsp)
callq 0xb6e0
movl 0x30(%rsp), %ecx
movq 0x28(%rsp), %rdx
movl 0x8(%rsp), %r9d
movq 0x18(%rsp), %r10
movq 0x10(%rsp), %r11
movq (%rax), %rax
movzwl (%rax,%rdx,2), %eax
shrl $0x3, %eax
andl $0x1, %eax
cmpl %eax, %ecx
je 0x95481
testb %bl, %bl
js 0x953f5
movzwl %r15w, %eax
movl %eax, 0x88(%rsp)
testb $0x4, %bl
je 0x9508d
movq 0x38(%rsp), %rax
testb $0x2, 0x58(%rax)
jne 0x9508d
movl 0x88(%rsp), %edi
callq *0x30(%r14)
movl 0x8(%rsp), %r9d
movq 0x18(%rsp), %r10
movq 0x10(%rsp), %r11
testl %eax, %eax
je 0x95481
testb $0x4, 0x28(%r14)
je 0x950eb
movq 0x38(%rsp), %rax
testb $0x2, 0x58(%rax)
je 0x950eb
movq 0x30(%r14), %rbx
movl %r15d, %edi
callq 0xb900
movswl %ax, %edi
callq *%rbx
movl 0x8(%rsp), %r9d
movq 0x18(%rsp), %r10
movq 0x10(%rsp), %r11
testl %eax, %eax
jne 0x950eb
movq 0x30(%r14), %rbx
movl %r15d, %edi
callq 0xbbf0
movswl %ax, %edi
callq *%rbx
movl 0x8(%rsp), %r9d
movq 0x18(%rsp), %r10
movq 0x10(%rsp), %r11
testl %eax, %eax
je 0x95481
testb $0x8, 0x28(%r14)
je 0x9517a
movq 0x38(%r14), %rbx
movq (%rbx), %rax
testq %rax, %rax
je 0x9517a
movq 0x38(%rsp), %rcx
movl 0x58(%rcx), %ecx
movl %ecx, 0x28(%rsp)
testb $0x2, 0x28(%rsp)
jne 0x95120
movl 0x88(%rsp), %edi
callq *%rax
jmp 0x95156
movq (%rbx), %rax
movq %rax, 0x30(%rsp)
movl %r15d, %edi
callq 0xbbf0
movswl %ax, %edi
callq *0x30(%rsp)
testl %eax, %eax
jne 0x953de
movq (%rbx), %rax
movq %rax, 0x30(%rsp)
movl %r15d, %edi
callq 0xb900
movswl %ax, %edi
callq *0x30(%rsp)
testl %eax, %eax
jne 0x953de
movq 0x8(%rbx), %rax
addq $0x8, %rbx
testq %rax, %rax
movq 0x10(%rsp), %r11
movq 0x18(%rsp), %r10
movl 0x8(%rsp), %r9d
jne 0x9510e
testl %r11d, %r11d
jle 0x9519c
movq 0x80(%rsp), %rax
movq 0x8(%rax), %rax
xorl %ecx, %ecx
movl (%rax,%rcx,4), %edx
movl %edx, (%rbp,%rcx,4)
incq %rcx
cmpq %rcx, %r12
jne 0x9518d
movq 0x18(%r14), %rax
testq %rax, %rax
je 0x951c5
movl (%rax), %ecx
testl %ecx, %ecx
js 0x951c5
addq $0x4, %rax
cmpl %r11d, %ecx
jge 0x951bb
movl %ecx, %ecx
movl %r9d, (%rbp,%rcx,4)
movl (%rax), %ecx
addq $0x4, %rax
testl %ecx, %ecx
jns 0x951af
movslq 0x10(%r14), %rcx
shlq $0x4, %rcx
leaq (%r10,%rcx), %rdx
cmpl %r9d, (%r10,%rcx)
jge 0x95255
movq (%r13), %rsi
movq 0x40(%rsp), %r8
movq %rsi, (%r8)
leaq 0x8(%r8), %rdi
movq 0x8(%r8), %rax
movq %rbp, 0x8(%r8)
movl %r9d, (%rdx)
movq %rdi, 0x8(%r10,%rcx)
movq 0x38(%rsp), %rcx
cmpq 0x18(%rcx), %rsi
jne 0x954ce
cmpl $-0x1, 0x24(%rsp)
je 0x9549c
testl %r11d, %r11d
jle 0x954ce
setle %cl
movl (%rbp), %edx
movq 0x68(%rsp), %rsi
cmpl (%rsi), %edx
movl 0x24(%rsp), %edx
cmovlel %r9d, %edx
movl %edx, 0x24(%rsp)
setg %dl
movl $0x1, %esi
movq 0x50(%rsp), %rdi
cmovlel %esi, %edi
movq %rdi, 0x50(%rsp)
orb %cl, %dl
je 0x954a1
jmp 0x954ce
jne 0x95570
testl %r11d, %r11d
jle 0x95481
movq 0x38(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x8(%rdx), %rdx
movq (%rdx), %rdx
xorl %esi, %esi
cmpl $0x0, (%rax,%rsi,4)
movl (%rbp,%rsi,4), %edi
movl (%rdx,%rsi,4), %r8d
je 0x95294
cmpl %r8d, %edi
jg 0x9534b
jge 0x952a3
jmp 0x95481
cmpl %r8d, %edi
jl 0x9534b
jg 0x95481
incq %rsi
cmpq %rsi, %r12
jne 0x95276
jmp 0x95481
testb $0x2, 0x90(%rsp)
sete %cl
movb 0x7(%rsp), %al
testb %al, %al
sete %dl
cmpb $0xa, %al
sete %al
testb %dl, %cl
jne 0x94f9a
andb 0x5c(%rsp), %al
je 0x95481
jmp 0x94f9a
cmpb $0x5f, 0xc(%rsp)
je 0x95481
callq 0xb6e0
movq (%rax), %rax
testb $0x8, (%rax,%r15,2)
jne 0x953de
movzbl 0x7(%rsp), %ecx
cmpq $0x5f, %rcx
movq 0x10(%rsp), %r11
movq 0x18(%rsp), %r10
movl 0x8(%rsp), %r9d
je 0x94fa3
testb $0x8, (%rax,%rcx,2)
jne 0x94fa3
jmp 0x95481
cmpb $0x5f, 0xc(%rsp)
jne 0x95398
cmpb $0x5f, 0x7(%rsp)
jne 0x953b3
movq %rbp, %rax
movq 0x10(%rsp), %r11
movq 0x18(%rsp), %r10
jmp 0x95484
movq 0x8(%r10,%rcx), %rcx
movq (%rcx), %rax
movq %rbp, (%rcx)
movq (%r13), %rcx
movq 0x38(%rsp), %rdx
cmpq 0x18(%rdx), %rcx
jne 0x95484
movl $0x1, %ecx
movq %rcx, 0x50(%rsp)
testl %r11d, %r11d
movq 0x68(%rsp), %rsi
jle 0x9538e
xorl %ecx, %ecx
movl (%rbp,%rcx,4), %edx
movl %edx, (%rsi,%rcx,4)
incq %rcx
cmpq %rcx, %r12
jne 0x9537f
movl %r9d, 0x24(%rsp)
jmp 0x95484
callq 0xb6e0
movq (%rax), %rax
testb $0x8, (%rax,%r15,2)
je 0x953de
cmpb $0x5f, 0x7(%rsp)
movl 0x8(%rsp), %r9d
je 0x95339
callq 0xb6e0
movl 0x8(%rsp), %r9d
movq (%rax), %rax
movzbl 0x7(%rsp), %ecx
testb $0x8, (%rax,%rcx,2)
movq 0x10(%rsp), %r11
movq 0x18(%rsp), %r10
je 0x94fac
jmp 0x95481
movq %rbp, %rax
movq 0x10(%rsp), %r11
movq 0x18(%rsp), %r10
movl 0x8(%rsp), %r9d
jmp 0x95484
testl %r9d, %r9d
sete %al
testb %dl, %dl
sete %cl
orb %al, %cl
jne 0x95481
movl $0x1, %eax
movl $0x1, %ecx
cmpb $0x5f, 0xc(%rsp)
movq %rdx, 0x28(%rsp)
je 0x95446
callq 0xb6e0
movq 0x28(%rsp), %rdx
movl 0x8(%rsp), %r9d
movq 0x18(%rsp), %r10
movq 0x10(%rsp), %r11
movq (%rax), %rax
movzwl (%rax,%r15,2), %ecx
movl $0x1, %eax
shrl $0x3, %ecx
andl $0x1, %ecx
cmpl $0x5f, %edx
je 0x95479
movl %ecx, 0x30(%rsp)
callq 0xb6e0
movl 0x30(%rsp), %ecx
movl 0x8(%rsp), %r9d
movq 0x18(%rsp), %r10
movq 0x10(%rsp), %r11
movq (%rax), %rax
movq 0x28(%rsp), %rdx
movzwl (%rax,%rdx,2), %eax
shrl $0x3, %eax
andl $0x1, %eax
cmpl %eax, %ecx
je 0x95050
movq %rbp, %rax
cmpq $0x0, 0x48(%r14)
leaq 0x48(%r14), %r13
leaq 0x40(%r14), %r14
movq %rax, %rbp
jne 0x94f58
jmp 0x954dc
testl %r11d, %r11d
jle 0x954bf
xorl %ecx, %ecx
movq 0x68(%rsp), %rsi
movq 0xc0(%rsp), %rdi
movl (%rbp,%rcx,4), %edx
movl %edx, (%rsi,%rcx,4)
incq %rcx
cmpq %rcx, %rdi
jne 0x954b0
movl $0x1, %ecx
movq %rcx, 0x50(%rsp)
movl %r9d, 0x24(%rsp)
addq $0x10, %r8
movq %r8, 0x40(%rsp)
jmp 0x95484
movq %rbp, %rax
movq 0x80(%rsp), %rcx
movq 0x10(%rcx), %r14
addq $0x10, %rcx
movq %rcx, 0x80(%rsp)
movq %rax, %rbp
testq %r14, %r14
jne 0x94f49
jmp 0x9550a
movq %rbp, %rax
movq %rsi, 0x40(%rsp)
movq 0x40(%rsp), %rcx
movq $0x0, (%rcx)
movq %rax, %rbp
movq 0xa0(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x68(%rsp), %r13
movl 0x4c(%rsp), %eax
movl 0x7c(%rsp), %r14d
movq 0x38(%rsp), %r15
jmp 0x948f6
movq 0xb0(%rsp), %rdi
callq 0xb790
movq 0x100(%rsp), %rax
movl 0x24(%rsp), %ecx
movl %ecx, (%rax)
shrl $0x1f, %ecx
movl %ecx, %eax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x61f3c(%rip), %rdi     # 0xf74b3
leaq 0x61f5d(%rip), %rsi     # 0xf74db
leaq 0x61f80(%rip), %rcx     # 0xf7505
movl $0x1cf, %edx            # imm = 0x1CF
callq 0xb400
nop