// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/tre/lib/tre-compile.c
// Function: tre_free
void
tre_free(regex_t *preg)
{
  tre_tnfa_t *tnfa;
  unsigned int i;
  tre_tnfa_transition_t *trans;

  tnfa = (void *)preg->TRE_REGEX_T_FIELD;
  if (!tnfa)
    return;

  for (i = 0; i < tnfa->num_transitions; i++)
    if (tnfa->transitions[i].state)
      {
	if (tnfa->transitions[i].tags)
	  xfree(tnfa->transitions[i].tags);
	if (tnfa->transitions[i].neg_classes)
	  xfree(tnfa->transitions[i].neg_classes);
	if (tnfa->transitions[i].params)
	  xfree(tnfa->transitions[i].params);
      }
  if (tnfa->transitions)
    xfree(tnfa->transitions);

  if (tnfa->initial)
    {
      for (trans = tnfa->initial; trans->state; trans++)
	{
	  if (trans->tags)
	    xfree(trans->tags);
	  if (trans->params)
	    xfree(trans->params);
	}
      xfree(tnfa->initial);
    }

  if (tnfa->submatch_data)
    {
      for (i = 0; i < tnfa->num_submatches; i++)
	if (tnfa->submatch_data[i].parents)
	  xfree(tnfa->submatch_data[i].parents);
      xfree(tnfa->submatch_data);
    }

  if (tnfa->tag_directions)
    xfree(tnfa->tag_directions);
  if (tnfa->firstpos_chars)
    xfree(tnfa->firstpos_chars);
  if (tnfa->minimal_tags)
    xfree(tnfa->minimal_tags);
  xfree(tnfa);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0xbd6c4
jmp 0xbd913
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
movq 0x18(%rsp), %rcx
cmpl 0x8(%rcx), %eax
jae 0xbd7b2
movq 0x18(%rsp), %rax
movq (%rax), %rax
movl 0x14(%rsp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0xbd7a0
movq 0x18(%rsp), %rax
movq (%rax), %rax
movl 0x14(%rsp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
cmpq $0x0, 0x18(%rax)
je 0xbd732
movq 0x18(%rsp), %rax
movq (%rax), %rax
movl 0x14(%rsp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rdi
callq 0xb760
movq 0x18(%rsp), %rax
movq (%rax), %rax
movl 0x14(%rsp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
cmpq $0x0, 0x38(%rax)
je 0xbd768
movq 0x18(%rsp), %rax
movq (%rax), %rax
movl 0x14(%rsp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
movq 0x38(%rax), %rdi
callq 0xb760
movq 0x18(%rsp), %rax
movq (%rax), %rax
movl 0x14(%rsp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
cmpq $0x0, 0x20(%rax)
je 0xbd79e
movq 0x18(%rsp), %rax
movq (%rax), %rax
movl 0x14(%rsp), %ecx
shlq $0x6, %rcx
addq %rcx, %rax
movq 0x20(%rax), %rdi
callq 0xb760
jmp 0xbd7a0
jmp 0xbd7a2
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0xbd6cc
movq 0x18(%rsp), %rax
cmpq $0x0, (%rax)
je 0xbd7ca
movq 0x18(%rsp), %rax
movq (%rax), %rdi
callq 0xb760
movq 0x18(%rsp), %rax
cmpq $0x0, 0x10(%rax)
je 0xbd844
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
cmpq $0x0, 0x8(%rax)
je 0xbd836
movq 0x8(%rsp), %rax
cmpq $0x0, 0x18(%rax)
je 0xbd80a
movq 0x8(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0xb760
movq 0x8(%rsp), %rax
cmpq $0x0, 0x20(%rax)
je 0xbd824
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0xb760
jmp 0xbd826
movq 0x8(%rsp), %rax
addq $0x40, %rax
movq %rax, 0x8(%rsp)
jmp 0xbd7e4
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rdi
callq 0xb760
movq 0x18(%rsp), %rax
cmpq $0x0, 0x20(%rax)
je 0xbd8bb
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
movq 0x18(%rsp), %rcx
cmpl 0x34(%rcx), %eax
jae 0xbd8ad
movq 0x18(%rsp), %rax
movq 0x20(%rax), %rax
movl 0x14(%rsp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0xbd89e
movq 0x18(%rsp), %rax
movq 0x20(%rax), %rax
movl 0x14(%rsp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
callq 0xb760
jmp 0xbd8a0
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0xbd858
movq 0x18(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0xb760
movq 0x18(%rsp), %rax
cmpq $0x0, 0x38(%rax)
je 0xbd8d5
movq 0x18(%rsp), %rax
movq 0x38(%rax), %rdi
callq 0xb760
movq 0x18(%rsp), %rax
cmpq $0x0, 0x28(%rax)
je 0xbd8ef
movq 0x18(%rsp), %rax
movq 0x28(%rax), %rdi
callq 0xb760
movq 0x18(%rsp), %rax
cmpq $0x0, 0x40(%rax)
je 0xbd909
movq 0x18(%rsp), %rax
movq 0x40(%rax), %rdi
callq 0xb760
movq 0x18(%rsp), %rdi
callq 0xb760
addq $0x28, %rsp
retq
nopl (%rax,%rax)