// File: /workspace/github_c_makefile_star2_O3/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, 0x98(%rsp)
movq %r8, 0x80(%rsp)
movl %ecx, 0x94(%rsp)
movl %edx, 0x7c(%rsp)
movq %rsi, 0x58(%rsp)
movb $0x0, 0x7(%rsp)
movl $0x1, 0x9c(%rsp)
testq %r8, %r8
je 0x93eb8
movl 0x48(%rdi), %r14d
jmp 0x93ebb
xorl %r14d, %r14d
movl 0x58(%rdi), %eax
movl %eax, 0x54(%rsp)
leal (,%r14,4), %ebp
movq %rdi, 0x10(%rsp)
movl 0x54(%rdi), %ebx
movl %ebp, %eax
imull %ebx, %eax
movl %ebx, %r12d
shll $0x4, %r12d
addl %r12d, %eax
addl $0x10, %eax
leal (%r12,%r14,4), %ecx
leal (%rcx,%rax,2), %r15d
addl $0x1c, %r15d
movq %r15, %rdi
callq 0xb810
testq %rax, %rax
je 0x9418d
movq %rax, %r13
movq %r14, 0x30(%rsp)
leal 0x10(%r12), %r14d
movslq %ebp, %rbp
movslq %r15d, %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0xb2f0
movq %r13, %rdx
addq %rbp, %rdx
movl %edx, %ecx
andl $0x7, %ecx
movl $0x8, %eax
subq %rcx, %rax
testq %rcx, %rcx
cmoveq %rcx, %rax
leaq (%rdx,%rax), %rsi
movslq %r14d, %rcx
movq %rsi, 0x48(%rsp)
leaq (%rsi,%rcx), %r9
movl %r9d, %edi
andl $0x7, %edi
movl $0x8, %esi
subq %rdi, %rsi
testq %rdi, %rdi
cmoveq %rdi, %rsi
movl $0x8, %r8d
addq %rsi, %r9
movq %r9, 0xa0(%rsp)
leaq (%r9,%rcx), %r10
movl %r10d, %r9d
andl $0x7, %r9d
movl $0x8, %edi
subq %r9, %rdi
testq %r9, %r9
cmoveq %r9, %rdi
addq %rdi, %r10
testl %ebx, %ebx
movq 0x10(%rsp), %r9
movq %r10, 0x20(%rsp)
jle 0x94137
movq %r10, %r9
movslq %r12d, %r10
addl %r9d, %r12d
andl $0x7, %r12d
subq %r12, %r8
xorl %r11d, %r11d
testl %r12d, %r12d
cmovneq %r8, %r11
leaq (%rsi,%rbp), %r8
addq %rcx, %r8
addq %r13, %r8
addq $0x8, %r8
leaq 0x8(,%r13), %r9
addq %rbp, %r9
addq %rdi, %r11
addq %rsi, %r11
leaq (%r11,%rcx,2), %r11
addq %r10, %r11
addq %r11, %rdx
leaq (,%rbp,2), %r10
leaq (%r11,%rbp,2), %r11
addq %r13, %r11
movq %rbx, %r15
leaq (%rdx,%rax), %r12
movq %r12, (%r8,%rax)
leaq (%r11,%rax), %r12
movq %r12, (%r9,%rax)
addq $0x10, %r8
addq $0x10, %r9
addq %r10, %rdx
addq %r10, %r11
decq %r15
jne 0x93ff2
testl %ebx, %ebx
movq 0x10(%rsp), %r9
movq 0x20(%rsp), %r10
jle 0x94137
leal 0x3(%rbx), %edx
decq %rbx
movq %rbx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
addq %rax, %rsi
addq %rdi, %rsi
leaq (%rsi,%rcx,2), %rax
addq %rbp, %rax
addq %r13, %rax
addq $0x30, %rax
shrl $0x2, %edx
shlq $0x6, %rdx
movdqa 0x59086(%rip), %xmm1    # 0xed0e0
movdqa 0x5908e(%rip), %xmm2    # 0xed0f0
xorl %ecx, %ecx
movdqa 0x59094(%rip), %xmm3    # 0xed100
pxor %xmm3, %xmm0
pcmpeqd %xmm4, %xmm4
movdqa 0x590a4(%rip), %xmm5    # 0xed120
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, %esi
notl %esi
testb $0x1, %sil
je 0x940b9
movl $0xffffffff, -0x30(%rax,%rcx) # imm = 0xFFFFFFFF
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %esi
testb $0x1, %sil
je 0x940d0
movl $0xffffffff, -0x20(%rax,%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, %esi
testb $0x1, %sil
je 0x94110
movl $0xffffffff, -0x10(%rax,%rcx) # imm = 0xFFFFFFFF
pextrw $0x4, %xmm6, %esi
testb $0x1, %sil
je 0x94122
movl $0xffffffff, (%rax,%rcx) # imm = 0xFFFFFFFF
paddq %xmm5, %xmm2
paddq %xmm5, %xmm1
addq $0x40, %rcx
cmpq %rcx, %rdx
jne 0x9407c
movq %r13, 0xa8(%rsp)
movl 0x94(%rsp), %ebx
cmpl $0x1, %ebx
jne 0x94197
cmpq $0x0, 0x58(%rsp)
je 0x94197
movl 0x30(%r9), %esi
testl %esi, %esi
js 0x94197
movl 0x7c(%rsp), %ebp
testl %ebp, %ebp
movq 0x80(%rsp), %r14
movq 0x30(%rsp), %r13
movq 0xa0(%rsp), %r12
js 0x94227
movl %ebp, %edx
movq 0x58(%rsp), %rdi
callq 0xb710
jmp 0x94231
movl $0xc, %ecx
jmp 0x94fe1
cmpl $0x1, %ebx
movq 0x80(%rsp), %r14
movl 0x7c(%rsp), %ebp
movq 0x30(%rsp), %r13
movq 0xa0(%rsp), %r12
jne 0x941d6
testl %ebp, %ebp
je 0x9429c
movq 0x58(%rsp), %rax
leaq 0x1(%rax), %r15
movb (%rax), %al
movb %al, 0x7(%rsp)
movl $0x0, 0x50(%rsp)
jmp 0x94220
movl $0x0, 0x50(%rsp)
movl $0x0, %esi
movq 0x58(%rsp), %r15
movl $0x0, 0xc(%rsp)
cmpl $0x3, %ebx
jne 0x942b8
movq 0x58(%rsp), %r15
movq 0x18(%r15), %rdx
leaq 0x7(%rsp), %rdi
leaq 0x9c(%rsp), %rsi
callq *(%r15)
movq 0x20(%rsp), %r10
movq 0x10(%rsp), %r9
movl %eax, 0x50(%rsp)
xorl %esi, %esi
jmp 0x942b0
movq 0x58(%rsp), %rdi
callq 0xb210
testq %rax, %rax
je 0x94285
movq 0x58(%rsp), %rcx
incq %rcx
movl $0x0, 0x50(%rsp)
movl $0x0, 0xc(%rsp)
cmpq %rcx, %rax
jb 0x9425a
movb -0x1(%rax), %cl
movl %ecx, 0xc(%rsp)
movb (%rax), %cl
movb %cl, 0x7(%rsp)
movl %eax, %esi
subl 0x58(%rsp), %esi
testl %ebp, %ebp
sets %cl
cmpl %ebp, %esi
setl %dl
orb %cl, %dl
movzbl %dl, %r15d
addq %rax, %r15
movq 0x10(%rsp), %r9
movq 0x20(%rsp), %r10
jmp 0x942b8
movq 0xa8(%rsp), %rdi
callq 0xb790
movl $0x1, %ecx
jmp 0x94fe1
movb $0x0, 0x7(%rsp)
movl $0x0, 0x50(%rsp)
xorl %esi, %esi
movq 0x58(%rsp), %r15
movl $0x0, 0xc(%rsp)
movq %r15, 0xb0(%rsp)
movl %r13d, %r11d
leaq (,%r11,4), %rax
movq %rax, 0xb8(%rsp)
cmpl $0x2, %r13d
movl $0x1, %eax
cmovgel %r13d, %eax
movq %rax, 0xc0(%rsp)
movq $0x0, 0x60(%rsp)
movl $0xffffffff, 0x2c(%rsp) # imm = 0xFFFFFFFF
movl 0x54(%rsp), %eax
andl $0x4, %eax
shrl $0x2, %eax
movl %eax, 0x54(%rsp)
movq 0xa8(%rsp), %r15
movq 0x48(%rsp), %rax
movq %rax, 0x68(%rsp)
movq %r11, 0x18(%rsp)
cmpl $0x0, 0x2c(%rsp)
js 0x94343
testl %r13d, %r13d
je 0x94fc3
movq 0x68(%rsp), %rax
cmpq %rax, 0x48(%rsp)
jne 0x94793
jmp 0x94fc3
movq %r12, 0xa0(%rsp)
movq 0x10(%r9), %r12
movq 0x8(%r12), %r14
testq %r14, %r14
je 0x9476c
movl 0x98(%rsp), %ecx
testb $0x2, %cl
sete %dl
testb $0x1, %cl
sete %cl
testl %esi, %esi
setle %dil
sete %al
andb %cl, %dil
cmpb $0xa, 0xc(%rsp)
sete %bpl
movl %esi, 0x8(%rsp)
movl 0x54(%rsp), %esi
andb %sil, %bpl
movzbl 0x7(%rsp), %ebx
cmpq $0xa, %rbx
sete %r8b
movq %rbx, 0x40(%rsp)
testq %rbx, %rbx
sete %cl
andb %cl, %dl
andb %sil, %r8b
movl 0x8(%rsp), %esi
orb %dl, %r8b
movzbl 0xc(%rsp), %edx
movq %rdx, 0x88(%rsp)
orb %cl, %al
movb %al, 0x3f(%rsp)
orb %dil, %bpl
movb %bpl, 0x70(%rsp)
movb %r8b, 0x28(%rsp)
addq $0x40, %r12
movslq -0x30(%r12), %rax
shlq $0x4, %rax
cmpl %esi, (%r10,%rax)
jge 0x9475e
movl -0x18(%r12), %ebx
testl %ebx, %ebx
je 0x9466d
testb $0x1, %bl
sete %al
orb %bpl, %al
testb $0x1, %al
je 0x94656
testb $0x2, %bl
sete %al
orb %r8b, %al
testb $0x1, %al
je 0x94656
testb $0x10, %bl
jne 0x94579
testb $0x20, %bl
jne 0x945d5
cmpb $0x0, 0x40(%rsp)
setne %al
testl %esi, %esi
setne %cl
movl %ebx, %edx
shrb $0x6, %dl
andb %al, %cl
andb %dl, %cl
cmpb $0x1, %cl
jne 0x944db
movl $0x1, %r13d
movl $0x1, %ebp
cmpb $0x5f, 0xc(%rsp)
je 0x9448f
callq 0xb6e0
movb 0x28(%rsp), %r8b
movq 0x18(%rsp), %r11
movl 0x8(%rsp), %esi
movq 0x20(%rsp), %r10
movq 0x10(%rsp), %r9
movq (%rax), %rax
movq 0x88(%rsp), %rcx
movzwl (%rax,%rcx,2), %ebp
shrl $0x3, %ebp
andl $0x1, %ebp
cmpl $0x5f, 0x40(%rsp)
je 0x944c8
callq 0xb6e0
movb 0x28(%rsp), %r8b
movq 0x18(%rsp), %r11
movl 0x8(%rsp), %esi
movq 0x20(%rsp), %r10
movq 0x10(%rsp), %r9
movq (%rax), %rax
movq 0x40(%rsp), %rcx
movzwl (%rax,%rcx,2), %r13d
shrl $0x3, %r13d
andl $0x1, %r13d
cmpl %r13d, %ebp
movq 0x30(%rsp), %r13
movb 0x70(%rsp), %bpl
je 0x94656
testb %bl, %bl
jns 0x9466d
testb $0x1, 0x3f(%rsp)
jne 0x94656
movl $0x1, %ebx
movl $0x1, %ebp
cmpb $0x5f, 0xc(%rsp)
je 0x94531
callq 0xb6e0
movb 0x28(%rsp), %r8b
movq 0x18(%rsp), %r11
movl 0x8(%rsp), %esi
movq 0x20(%rsp), %r10
movq 0x10(%rsp), %r9
movq (%rax), %rax
movq 0x88(%rsp), %rcx
movzwl (%rax,%rcx,2), %ebp
shrl $0x3, %ebp
andl $0x1, %ebp
cmpl $0x5f, 0x40(%rsp)
je 0x94567
callq 0xb6e0
movb 0x28(%rsp), %r8b
movq 0x18(%rsp), %r11
movl 0x8(%rsp), %esi
movq 0x20(%rsp), %r10
movq 0x10(%rsp), %r9
movq (%rax), %rax
movq 0x40(%rsp), %rcx
movzwl (%rax,%rcx,2), %ebx
shrl $0x3, %ebx
andl $0x1, %ebx
cmpl %ebx, %ebp
movb 0x70(%rsp), %bpl
jne 0x94656
jmp 0x9466d
cmpb $0x5f, 0xc(%rsp)
je 0x94656
callq 0xb6e0
movb 0x28(%rsp), %r8b
movq 0x18(%rsp), %r11
movl 0x8(%rsp), %esi
movq 0x20(%rsp), %r10
movq 0x10(%rsp), %r9
movq (%rax), %rax
movq 0x88(%rsp), %rcx
testb $0x8, (%rax,%rcx,2)
jne 0x94656
cmpl $0x5f, 0x40(%rsp)
je 0x94423
movq 0x40(%rsp), %rcx
testb $0x8, (%rax,%rcx,2)
jne 0x94423
jmp 0x94656
cmpb $0x5f, 0xc(%rsp)
jne 0x94602
cmpl $0x5f, 0x40(%rsp)
je 0x94656
callq 0xb6e0
movb 0x28(%rsp), %r8b
movq 0x18(%rsp), %r11
movl 0x8(%rsp), %esi
movq 0x20(%rsp), %r10
movq 0x10(%rsp), %r9
jmp 0x94644
cmpb $0x5f, 0x40(%rsp)
sete %bpl
callq 0xb6e0
movb 0x28(%rsp), %r8b
movq 0x18(%rsp), %r11
movl 0x8(%rsp), %esi
movq 0x20(%rsp), %r10
movq 0x10(%rsp), %r9
movq (%rax), %rcx
movq 0x88(%rsp), %rdx
testb $0x8, (%rcx,%rdx,2)
sete %cl
orb %bpl, %cl
movb 0x70(%rsp), %bpl
jne 0x94656
movq (%rax), %rax
movq 0x40(%rsp), %rcx
testb $0x8, (%rax,%rcx,2)
je 0x9442c
movq 0x8(%r12), %r14
addq $0x40, %r12
testq %r14, %r14
jne 0x943d8
jmp 0x9476c
movq 0x48(%rsp), %rax
movq %r14, (%rax)
testl %r13d, %r13d
jle 0x946a8
movq 0x8(%rax), %rdi
movl $0xff, %esi
movq 0xb8(%rsp), %rdx
callq 0xb2f0
movb 0x28(%rsp), %r8b
movq 0x18(%rsp), %r11
movl 0x8(%rsp), %esi
movq 0x20(%rsp), %r10
movq 0x10(%rsp), %r9
movq -0x28(%r12), %rax
testq %rax, %rax
je 0x946d9
movl (%rax), %ecx
testl %ecx, %ecx
js 0x946d9
addq $0x4, %rax
cmpl %r13d, %ecx
jge 0x946cf
movq 0x48(%rsp), %rdx
movq 0x8(%rdx), %rdx
movl %ecx, %ecx
movl %esi, (%rdx,%rcx,4)
movl (%rax), %ecx
addq $0x4, %rax
testl %ecx, %ecx
jns 0x946bc
testl %r13d, %r13d
setle %al
cmpq 0x18(%r9), %r14
movl 0x2c(%rsp), %ecx
cmovel %esi, %ecx
movl %ecx, 0x2c(%rsp)
setne %cl
movl $0x1, %edx
movq 0x60(%rsp), %rdi
cmovel %edx, %edi
movq %rdi, 0x60(%rsp)
orb %al, %cl
jne 0x9473a
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rax
xorl %ecx, %ecx
movq 0x80(%rsp), %rsi
movl (%rax,%rcx,4), %edx
movl %edx, (%rsi,%rcx,4)
incq %rcx
cmpq %rcx, %r11
jne 0x9471a
movl $0x1, %eax
movq %rax, 0x60(%rsp)
movl 0x8(%rsp), %esi
movl %esi, 0x2c(%rsp)
movslq -0x30(%r12), %rax
shlq $0x4, %rax
movl %esi, (%r10,%rax)
movq 0x48(%rsp), %rdx
leaq 0x8(%rdx), %rcx
movq %rcx, 0x8(%r10,%rax)
addq $0x10, %rdx
movq %rdx, 0x48(%rsp)
movq 0x8(%r12), %r14
testq %r14, %r14
jne 0x943d4
movq 0x48(%rsp), %rax
movq $0x0, (%rax)
movq 0x80(%rsp), %r14
movl 0x94(%rsp), %ebx
movl 0x7c(%rsp), %ebp
movq 0xa0(%rsp), %r12
testl %ebp, %ebp
js 0x947cd
cmpl %ebp, %esi
jge 0x94fc3
movb 0x7(%rsp), %al
movl %eax, 0xc(%rsp)
cmpl $0x1, %ebx
jne 0x947ec
incl %esi
testl %ebp, %ebp
js 0x9484c
cmpl %ebp, %esi
jl 0x9484c
movb $0x0, 0x7(%rsp)
movq 0x68(%rsp), %rbp
jmp 0x9486a
cmpl $0x3, %ebx
jne 0x9482e
cmpl $0x0, 0x50(%rsp)
movq 0x68(%rsp), %rbp
jne 0x94fc3
movb 0x7(%rsp), %al
movl %eax, 0xc(%rsp)
jmp 0x947f6
cmpl $0x3, %ebx
movq 0x68(%rsp), %rbp
jne 0x9486a
addl 0x9c(%rsp), %esi
movq 0x58(%rsp), %rax
movq 0x18(%rax), %rdx
leaq 0x7(%rsp), %rdi
movl %esi, %ebx
leaq 0x9c(%rsp), %rsi
callq *(%rax)
movq 0x18(%rsp), %r11
movl %ebx, %esi
movq 0x20(%rsp), %r10
movq 0x10(%rsp), %r9
movl %eax, 0x50(%rsp)
jmp 0x9486a
movb 0x7(%rsp), %al
movl %eax, 0xc(%rsp)
testb %al, %al
movq 0x68(%rsp), %rbp
je 0x94fc3
cmpl $0x1, %ebx
jne 0x9486a
incl %esi
jmp 0x94851
movq 0x68(%rsp), %rbp
movq 0xb0(%rsp), %rcx
movb (%rcx), %al
incq %rcx
movq %rcx, 0xb0(%rsp)
movb %al, 0x7(%rsp)
cmpl $0x0, 0x4c(%r9)
movl %esi, 0x8(%rsp)
je 0x94917
cmpl $0x0, 0x60(%rsp)
je 0x94917
movq (%rbp), %rdi
movq %r12, %rcx
testq %rdi, %rdi
je 0x94921
movq 0x10(%rsp), %rax
movq 0x40(%rax), %rax
movl (%rax), %edx
addq $0x8, %rax
movq %rbp, %rsi
movq %r12, %rcx
movq %rax, %r8
movl %edx, %r10d
testl %edx, %edx
js 0x948ea
cmpl %r13d, %r10d
jge 0x94901
movslq -0x4(%r8), %r11
movq 0x8(%rsi), %r9
movl (%r9,%r11,4), %ebx
cmpl (%r14,%r11,4), %ebx
jne 0x948d7
movl %r10d, %r10d
movl (%r9,%r10,4), %r11d
cmpl (%r14,%r10,4), %r11d
jl 0x94910
movl (%r8), %r10d
addq $0x8, %r8
testl %r10d, %r10d
movq 0x18(%rsp), %r11
jns 0x948b3
jmp 0x948ee
movq 0x8(%rsi), %r9
movq %rdi, (%rcx)
movq 0x8(%rcx), %rdi
movq %r9, 0x8(%rcx)
movq %rdi, 0x8(%rsi)
addq $0x10, %rcx
movq 0x10(%rsi), %rdi
addq $0x10, %rsi
testq %rdi, %rdi
jne 0x948a9
jmp 0x94921
movq 0x18(%rsp), %r11
jmp 0x94901
movq %r12, 0x70(%rsp)
movq %rbp, %r12
jmp 0x94944
movq $0x0, (%rcx)
movq $0x0, 0x60(%rsp)
movq %rbp, 0x70(%rsp)
movq 0x10(%rsp), %r9
movq 0x20(%rsp), %r10
movl 0x8(%rsp), %esi
movq (%r12), %r14
testq %r14, %r14
movq %r12, 0xa0(%rsp)
je 0x94f7d
testb $0x1, 0x98(%rsp)
sete %al
movzbl 0xc(%rsp), %ebp
testl %esi, %esi
setle %cl
andb %al, %cl
cmpb $0xa, %bpl
sete %al
andb 0x54(%rsp), %al
orb %cl, %al
movb %al, 0x68(%rsp)
movq %r12, 0x40(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x48(%rsp)
cmpq $0x0, 0x8(%r14)
je 0x94f5a
leaq 0x8(%r14), %r12
movswl (%r14), %eax
cmpl %ebp, %eax
jg 0x949b0
movswl 0x2(%r14), %eax
cmpl %ebp, %eax
jge 0x949ca
movq %r15, %rax
cmpq $0x0, 0x48(%r14)
leaq 0x48(%r14), %r12
leaq 0x40(%r14), %r14
movq %rax, %r15
jne 0x9499f
jmp 0x94f5d
movl 0x28(%r14), %ebx
testl %ebx, %ebx
je 0x94bcf
testb $0x1, %bl
sete %al
orb 0x68(%rsp), %al
testb $0x1, %al
je 0x94f06
testb $0x2, %bl
jne 0x94cb6
testb $0x10, %bl
jne 0x94ce6
testb $0x20, %bl
jne 0x94d84
movb 0x7(%rsp), %dil
testl %esi, %esi
setne %al
movl %ebx, %ecx
shrb $0x6, %cl
andb %al, %cl
testb %dil, %dil
setne %al
andb %cl, %al
cmpb $0x1, %al
jne 0x94aab
movl $0x1, %eax
movl $0x1, %r13d
cmpb $0x5f, 0xc(%rsp)
je 0x94a69
movl %edi, %r13d
callq 0xb6e0
movl %r13d, %edi
movq 0x18(%rsp), %r11
movl 0x8(%rsp), %esi
movq 0x20(%rsp), %r10
movq 0x10(%rsp), %r9
movq (%rax), %rax
movzwl (%rax,%rbp,2), %r13d
movl $0x1, %eax
shrl $0x3, %r13d
andl $0x1, %r13d
cmpb $0x5f, %dil
je 0x94aa2
movb %dil, 0x28(%rsp)
callq 0xb6e0
movb 0x28(%rsp), %dil
movq 0x18(%rsp), %r11
movl 0x8(%rsp), %esi
movq 0x20(%rsp), %r10
movq 0x10(%rsp), %r9
movq (%rax), %rax
movzbl %dil, %ecx
movzwl (%rax,%rcx,2), %eax
shrl $0x3, %eax
andl $0x1, %eax
cmpl %eax, %r13d
je 0x94f06
testb %bl, %bl
js 0x94e70
movzwl %bp, %eax
movl %eax, 0x88(%rsp)
testb $0x4, %bl
je 0x94b53
testb $0x2, 0x58(%r9)
jne 0x94afa
movl 0x88(%rsp), %edi
callq *0x30(%r14)
testl %eax, %eax
je 0x94df9
testb $0x4, 0x28(%r14)
movq 0x10(%rsp), %r9
movq 0x20(%rsp), %r10
movl 0x8(%rsp), %esi
movq 0x18(%rsp), %r11
je 0x94b53
testb $0x2, 0x58(%r9)
je 0x94b53
movq 0x30(%r14), %rbx
movl %ebp, %edi
callq 0xb900
movswl %ax, %edi
callq *%rbx
movq 0x18(%rsp), %r11
movl 0x8(%rsp), %esi
movq 0x20(%rsp), %r10
movq 0x10(%rsp), %r9
testl %eax, %eax
jne 0x94b53
movq 0x30(%r14), %rbx
movl %ebp, %edi
callq 0xbbf0
movswl %ax, %edi
callq *%rbx
movq 0x18(%rsp), %r11
movl 0x8(%rsp), %esi
movq 0x20(%rsp), %r10
movq 0x10(%rsp), %r9
testl %eax, %eax
je 0x94f06
testb $0x8, 0x28(%r14)
je 0x94bcf
movq 0x38(%r14), %rbx
movq (%rbx), %r13
testq %r13, %r13
je 0x94bcf
movl 0x58(%r9), %eax
movl %eax, 0x28(%rsp)
addq $0x8, %rbx
testb $0x2, 0x28(%rsp)
jne 0x94b82
movl 0x88(%rsp), %edi
jmp 0x94ba5
movl %ebp, %edi
callq 0xbbf0
movswl %ax, %edi
callq *%r13
testl %eax, %eax
jne 0x94df9
movq -0x8(%rbx), %r13
movl %ebp, %edi
callq 0xb900
movswl %ax, %edi
callq *%r13
testl %eax, %eax
jne 0x94df9
movq (%rbx), %r13
addq $0x8, %rbx
testq %r13, %r13
movq 0x10(%rsp), %r9
movq 0x20(%rsp), %r10
movl 0x8(%rsp), %esi
movq 0x18(%rsp), %r11
jne 0x94b72
movq 0x30(%rsp), %r13
testl %r13d, %r13d
jle 0x94bf3
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rax
xorl %ecx, %ecx
movl (%rax,%rcx,4), %edx
movl %edx, (%r15,%rcx,4)
incq %rcx
cmpq %rcx, %r11
jne 0x94be4
movq 0x18(%r14), %rax
testq %rax, %rax
je 0x94c1b
movl (%rax), %ecx
testl %ecx, %ecx
js 0x94c1b
addq $0x4, %rax
cmpl %r13d, %ecx
jge 0x94c11
movl %ecx, %ecx
movl %esi, (%r15,%rcx,4)
movl (%rax), %ecx
addq $0x4, %rax
testl %ecx, %ecx
jns 0x94c06
movslq 0x10(%r14), %rcx
shlq $0x4, %rcx
leaq (%r10,%rcx), %rdx
cmpl %esi, (%r10,%rcx)
jge 0x94c64
movl %esi, %r11d
movq (%r12), %rsi
movq 0x48(%rsp), %r8
movq %rsi, (%r8)
leaq 0x8(%r8), %rdi
movq 0x8(%r8), %rax
movq %r15, 0x8(%r8)
movl %r11d, (%rdx)
movq %rdi, 0x8(%r10,%rcx)
cmpq 0x18(%r9), %rsi
je 0x94d34
movq 0x18(%rsp), %r11
jmp 0x94f48
jne 0x94ff5
testl %r13d, %r13d
jle 0x949b0
movq 0x38(%r9), %rax
movq 0x8(%rdx), %rdx
movq (%rdx), %rdx
xorl %esi, %esi
cmpl $0x0, (%rax,%rsi,4)
movl (%r15,%rsi,4), %edi
movl (%rdx,%rsi,4), %r8d
je 0x94c9b
cmpl %r8d, %edi
jg 0x94dac
jge 0x94ca6
jmp 0x94cae
cmpl %r8d, %edi
jl 0x94dac
jg 0x94cae
incq %rsi
cmpq %rsi, %r11
jne 0x94c80
movq %r15, %rax
jmp 0x94f51
testb $0x2, 0x98(%rsp)
sete %cl
movb 0x7(%rsp), %al
testb %al, %al
sete %dl
cmpb $0xa, %al
sete %al
testb %dl, %cl
jne 0x949f1
andb 0x54(%rsp), %al
je 0x94f06
jmp 0x949f1
cmpb $0x5f, 0xc(%rsp)
je 0x94f06
callq 0xb6e0
movq (%rax), %rax
testb $0x8, (%rax,%rbp,2)
jne 0x94df9
movzbl 0x7(%rsp), %ecx
cmpq $0x5f, %rcx
movq 0x10(%rsp), %r9
movq 0x20(%rsp), %r10
movl 0x8(%rsp), %esi
movq 0x18(%rsp), %r11
je 0x949fa
testb $0x8, (%rax,%rcx,2)
jne 0x949fa
jmp 0x94f06
cmpl $-0x1, 0x2c(%rsp)
movq 0x80(%rsp), %rsi
movq 0x60(%rsp), %rdx
je 0x94f13
testl %r13d, %r13d
movq 0x18(%rsp), %r11
jle 0x94f48
movl (%r15), %ecx
cmpl (%rsi), %ecx
movl 0x2c(%rsp), %ecx
cmovlel 0x8(%rsp), %ecx
movl %ecx, 0x2c(%rsp)
movl $0x1, %ecx
cmovlel %ecx, %edx
movq %rdx, 0x60(%rsp)
jle 0x94f1d
jmp 0x94f48
cmpb $0x5f, 0xc(%rsp)
jne 0x94e08
movb 0x7(%rsp), %al
cmpb $0x5f, %al
movq 0x30(%rsp), %r13
je 0x949b0
movl %eax, %r13d
callq 0xb6e0
movl %r13d, %edi
jmp 0x94e47
movq 0x8(%r10,%rcx), %rcx
movq (%rcx), %rax
movq %r15, (%rcx)
movq (%r12), %rcx
cmpq 0x18(%r9), %rcx
movl 0x8(%rsp), %esi
jne 0x949b3
xorl %ecx, %ecx
movq 0x80(%rsp), %rsi
movl (%r15,%rcx,4), %edx
movl %edx, (%rsi,%rcx,4)
incq %rcx
cmpq %rcx, %r11
jne 0x94dd3
movl $0x1, %ecx
movq %rcx, 0x60(%rsp)
movl 0x8(%rsp), %esi
movl %esi, 0x2c(%rsp)
jmp 0x949b3
movq %r15, %rax
movq 0x10(%rsp), %r9
movq 0x30(%rsp), %r13
jmp 0x94e34
callq 0xb6e0
movq (%rax), %rcx
testb $0x8, (%rcx,%rbp,2)
sete %cl
movb 0x7(%rsp), %dil
cmpb $0x5f, %dil
sete %dl
orb %cl, %dl
movq 0x30(%rsp), %r13
je 0x94e47
movq %r15, %rax
movq 0x10(%rsp), %r9
movq 0x20(%rsp), %r10
movl 0x8(%rsp), %esi
movq 0x18(%rsp), %r11
jmp 0x949b3
movl 0x8(%rsp), %esi
movq (%rax), %rax
movzbl %dil, %ecx
testb $0x8, (%rax,%rcx,2)
movq 0x10(%rsp), %r9
movq 0x20(%rsp), %r10
movq 0x18(%rsp), %r11
je 0x94a08
jmp 0x94f06
testl %esi, %esi
sete %al
testb %dil, %dil
sete %cl
orb %al, %cl
jne 0x94f06
movl $0x1, %eax
movl $0x1, %r13d
cmpb $0x5f, 0xc(%rsp)
je 0x94ec8
movl %edi, %r13d
callq 0xb6e0
movl %r13d, %edi
movq 0x18(%rsp), %r11
movl 0x8(%rsp), %esi
movq 0x20(%rsp), %r10
movq 0x10(%rsp), %r9
movq (%rax), %rax
movzwl (%rax,%rbp,2), %r13d
movl $0x1, %eax
shrl $0x3, %r13d
andl $0x1, %r13d
cmpb $0x5f, %dil
je 0x94efd
movb %dil, 0x28(%rsp)
callq 0xb6e0
movq 0x18(%rsp), %r11
movl 0x8(%rsp), %esi
movq 0x20(%rsp), %r10
movq 0x10(%rsp), %r9
movq (%rax), %rax
movzbl 0x28(%rsp), %ecx
movzwl (%rax,%rcx,2), %eax
shrl $0x3, %eax
andl $0x1, %eax
cmpl %eax, %r13d
je 0x94ab3
movq %r15, %rax
movq 0x30(%rsp), %r13
jmp 0x949b3
testl %r13d, %r13d
movq 0x18(%rsp), %r11
jle 0x94f36
xorl %ecx, %ecx
movq 0xc0(%rsp), %rdi
movl (%r15,%rcx,4), %edx
movl %edx, (%rsi,%rcx,4)
incq %rcx
cmpq %rcx, %rdi
jne 0x94f27
movl $0x1, %ecx
movq %rcx, 0x60(%rsp)
movl 0x8(%rsp), %ecx
movl %ecx, 0x2c(%rsp)
addq $0x10, %r8
movq %r8, 0x48(%rsp)
movl 0x8(%rsp), %esi
jmp 0x949b3
movq %r15, %rax
movq 0x40(%rsp), %rcx
movq 0x10(%rcx), %r14
addq $0x10, %rcx
movq %rcx, 0x40(%rsp)
movq %rax, %r15
testq %r14, %r14
jne 0x94990
jmp 0x94f8a
movq %r15, %rax
movq 0x70(%rsp), %rcx
movq %rcx, 0x48(%rsp)
movq 0x48(%rsp), %rcx
movq $0x0, (%rcx)
movq %rax, %r15
movq 0x70(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x80(%rsp), %r14
movl 0x94(%rsp), %ebx
movl 0x7c(%rsp), %ebp
movq 0xa0(%rsp), %r12
jmp 0x9431e
movq 0xa8(%rsp), %rdi
callq 0xb790
movq 0x100(%rsp), %rax
movl 0x2c(%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 0x62437(%rip), %rdi     # 0xf7433
leaq 0x62458(%rip), %rsi     # 0xf745b
leaq 0x6247b(%rip), %rcx     # 0xf7485
movl $0x1cf, %edx            # imm = 0x1CF
callq 0xb400