// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/tre/lib/regexec.c
// Function: tre_match
static int
tre_match(const tre_tnfa_t *tnfa, const void *string, size_t len,
	  tre_str_type_t type, size_t nmatch, regmatch_t pmatch[],
	  int eflags)
{
  reg_errcode_t status;
  int *tags = NULL, eo;
  if (tnfa->num_tags > 0 && nmatch > 0)
    {
#ifdef TRE_USE_ALLOCA
      tags = alloca(sizeof(*tags) * tnfa->num_tags);
#else /* !TRE_USE_ALLOCA */
      tags = xmalloc(sizeof(*tags) * tnfa->num_tags);
#endif /* !TRE_USE_ALLOCA */
      if (tags == NULL)
	return REG_ESPACE;
    }

  /* Dispatch to the appropriate matcher. */
  if (tnfa->have_backrefs || eflags & REG_BACKTRACKING_MATCHER)
    {
      /* The regex has back references, use the backtracking matcher. */
      if (type == STR_USER)
	{
	  const tre_str_source *source = string;
	  if (source->rewind == NULL || source->compare == NULL)
	    /* The backtracking matcher requires rewind and compare
	       capabilities from the input stream. */
	    return REG_BADPAT;
	}
      status = tre_tnfa_run_backtrack(tnfa, string, (int)len, type,
				      tags, eflags, &eo);
    }
#ifdef TRE_APPROX
  else if (tnfa->have_approx || eflags & REG_APPROX_MATCHER)
    {
      /* The regex uses approximate matching, use the approximate matcher. */
      regamatch_t match;
      regaparams_t params;
      tre_regaparams_default(&params);
      params.max_err = 0;
      params.max_cost = 0;
      status = tre_tnfa_run_approx(tnfa, string, (int)len, type, tags,
				   &match, params, eflags, &eo);
    }
#endif /* TRE_APPROX */
  else
    {
      /* Exact matching, no back references, use the parallel matcher. */
      status = tre_tnfa_run_parallel(tnfa, string, (int)len, type,
				     tags, eflags, &eo);
    }

  if (status == REG_OK)
    /* A match was found, so fill the submatch registers. */
    tre_fill_pmatch(nmatch, pmatch, tnfa->cflags, tnfa, tags, eo);
#ifndef TRE_USE_ALLOCA
  if (tags)
    xfree(tags);
#endif /* !TRE_USE_ALLOCA */
  return status;
}

// Assembly:
subq $0x68, %rsp
movl 0x70(%rsp), %eax
movq %rdi, 0x58(%rsp)
movq %rsi, 0x50(%rsp)
movq %rdx, 0x48(%rsp)
movl %ecx, 0x44(%rsp)
movq %r8, 0x38(%rsp)
movq %r9, 0x30(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x58(%rsp), %rax
cmpl $0x0, 0x48(%rax)
jle 0xb924f
cmpq $0x0, 0x38(%rsp)
jbe 0xb924f
movq 0x58(%rsp), %rax
movslq 0x48(%rax), %rdi
shlq $0x2, %rdi
callq 0xbcb8
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x20(%rsp)
jne 0xb924d
movl $0xc, 0x64(%rsp)
jmp 0xb9349
jmp 0xb924f
movq 0x58(%rsp), %rax
cmpl $0x0, 0x5c(%rax)
jne 0xb9266
movl 0x70(%rsp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0xb92d1
cmpl $0x3, 0x44(%rsp)
jne 0xb929e
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0xb928f
movq 0x10(%rsp), %rax
cmpq $0x0, 0x10(%rax)
jne 0xb929c
movl $0x2, 0x64(%rsp)
jmp 0xb9349
jmp 0xb929e
movq 0x58(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq 0x48(%rsp), %rax
movl %eax, %edx
movl 0x44(%rsp), %ecx
movq 0x20(%rsp), %r8
movl 0x70(%rsp), %r9d
leaq 0x1c(%rsp), %rax
movq %rax, (%rsp)
callq 0xbfa20
movl %eax, 0x2c(%rsp)
jmp 0xb9302
movq 0x58(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq 0x48(%rsp), %rax
movl %eax, %edx
movl 0x44(%rsp), %ecx
movq 0x20(%rsp), %r8
movl 0x70(%rsp), %r9d
leaq 0x1c(%rsp), %rax
movq %rax, (%rsp)
callq 0xc16c0
movl %eax, 0x2c(%rsp)
cmpl $0x0, 0x2c(%rsp)
jne 0xb932f
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x58(%rsp), %rax
movl 0x58(%rax), %edx
movq 0x58(%rsp), %rcx
movq 0x20(%rsp), %r8
movl 0x1c(%rsp), %r9d
callq 0xb8de0
cmpq $0x0, 0x20(%rsp)
je 0xb9341
movq 0x20(%rsp), %rdi
callq 0xb760
movl 0x2c(%rsp), %eax
movl %eax, 0x64(%rsp)
movl 0x64(%rsp), %eax
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)