// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/tyr-search.c
// Function: gt_tyrsearch
int gt_tyrsearch(const char *tyrindexname,
                 const GtStrArray *queryfilenames,
                 unsigned int showmode,
                 unsigned int searchstrand,
                 bool verbose,
                 bool performtest,
                 GtError *err)
{
  Tyrindex *tyrindex;
  Tyrcountinfo *tyrcountinfo = NULL;
  Tyrbckinfo *tyrbckinfo = NULL;
  bool haserr = false;

  gt_error_check(err);
  tyrindex = gt_tyrindex_new(tyrindexname,err);
  if (tyrindex == NULL)
  {
    haserr = true;
  } else
  {
    if (verbose)
    {
      gt_tyrindex_show(tyrindex);
    }
    if (performtest)
    {
      gt_tyrindex_check(tyrindex);
    }
  }
  if (!haserr)
  {
    gt_assert(tyrindex != NULL);
    if ((showmode & SHOWCOUNTS) && !gt_tyrindex_isempty(tyrindex))
    {
      tyrcountinfo = gt_tyrcountinfo_new(tyrindex,tyrindexname,err);
      if (tyrcountinfo == NULL)
      {
        haserr = true;
      }
    }
  }
  if (!haserr)
  {
    gt_assert(tyrindex != NULL);
    if (!gt_tyrindex_isempty(tyrindex))
    {
      tyrbckinfo = gt_tyrbckinfo_new(tyrindexname,
                                     gt_tyrindex_alphasize(tyrindex),
                                     err);
      if (tyrbckinfo == NULL)
      {
        haserr = true;
      }
    }
  }
  if (!haserr)
  {
    const GtUchar *query;
    GtUword querylen;
    char *desc = NULL;
    uint64_t unitnum;
    int retval;
    Tyrsearchinfo tyrsearchinfo;
    GtSeqIterator *seqit;

    gt_assert(tyrindex != NULL);
    gt_tyrsearchinfo_init(&tyrsearchinfo,tyrindex,showmode,searchstrand);
    seqit = gt_seq_iterator_sequence_buffer_new(queryfilenames, err);
    if (!seqit)
      haserr = true;
    if (!haserr)
    {
      gt_seq_iterator_set_symbolmap(seqit,
                                 gt_alphabet_symbolmap(tyrsearchinfo.dnaalpha));
      for (unitnum = 0; /* Nothing */; unitnum++)
      {
        retval = gt_seq_iterator_next(seqit,
                                     &query,
                                     &querylen,
                                     &desc,
                                     err);
        if (retval < 0)
        {
          haserr = true;
          break;
        }
        if (retval == 0)
        {
          break;
        }
        singleseqtyrsearch(tyrindex,
                           tyrcountinfo,
                           &tyrsearchinfo,
                           tyrbckinfo,
                           unitnum,
                           query,
                           querylen,
                           desc);
      }
      gt_seq_iterator_delete(seqit);
    }
    gt_tyrsearchinfo_delete(&tyrsearchinfo);
  }
  if (tyrbckinfo != NULL)
  {
    gt_tyrbckinfo_delete(&tyrbckinfo);
  }
  if (tyrcountinfo != NULL)
  {
    gt_tyrcountinfo_delete(&tyrcountinfo);
  }
  if (tyrindex != NULL)
  {
    gt_tyrindex_delete(&tyrindex);
  }
  return haserr ? -1 : 0;
}

// Assembly:
subq $0xe8, %rsp
movl %r8d, 0x2c(%rsp)
movl %ecx, %eax
movl 0x2c(%rsp), %ecx
movl %eax, 0x30(%rsp)
movl %edx, %eax
movl 0x30(%rsp), %edx
movl %eax, 0x34(%rsp)
movq %rsi, %rax
movl 0x34(%rsp), %esi
movq %rax, 0x38(%rsp)
movq %rdi, %r8
movq 0x38(%rsp), %rdi
movb %r9b, %al
movq 0xf0(%rsp), %r9
movq %r8, 0xe0(%rsp)
movq %rdi, 0xd8(%rsp)
movl %esi, 0xd4(%rsp)
movl %edx, 0xd0(%rsp)
andb $0x1, %cl
movb %cl, 0xcf(%rsp)
andb $0x1, %al
movb %al, 0xce(%rsp)
movq $0x0, 0xb8(%rsp)
movq $0x0, 0xb0(%rsp)
movb $0x0, 0xaf(%rsp)
cmpq $0x0, 0xf0(%rsp)
je 0x2f7606
movq 0xf0(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x2f75ce
jmp 0x2f7606
movq 0x3449cb(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x21ea34(%rip), %rsi    # 0x516013
leaq 0x21ebd9(%rip), %rdx    # 0x5161bf
leaq 0x29886a(%rip), %rcx    # 0x58fe57
leaq 0x298870(%rip), %r8     # 0x58fe64
movl $0xe4, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2f7608
movq 0xe0(%rsp), %rdi
movq 0xf0(%rsp), %rsi
callq 0x4e7d10
movq %rax, 0xc0(%rsp)
cmpq $0x0, 0xc0(%rsp)
jne 0x2f763a
movb $0x1, 0xaf(%rsp)
jmp 0x2f766a
testb $0x1, 0xcf(%rsp)
je 0x2f7651
movq 0xc0(%rsp), %rdi
callq 0x4e8080
testb $0x1, 0xce(%rsp)
je 0x2f7668
movq 0xc0(%rsp), %rdi
callq 0x4e88b0
jmp 0x2f766a
testb $0x1, 0xaf(%rsp)
jne 0x2f771b
jmp 0x2f767a
cmpq $0x0, 0xc0(%rsp)
jne 0x2f76bd
movq 0x344914(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x21e97d(%rip), %rsi    # 0x516013
leaq 0x2987de(%rip), %rdx    # 0x58fe7b
leaq 0x2987b3(%rip), %rcx    # 0x58fe57
leaq 0x2987b9(%rip), %r8     # 0x58fe64
movl $0xf6, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2f76bf
movl 0xd4(%rsp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x2f7719
movq 0xc0(%rsp), %rdi
callq 0x4e8100
testb $0x1, %al
jne 0x2f7719
movq 0xc0(%rsp), %rdi
movq 0xe0(%rsp), %rsi
movq 0xf0(%rsp), %rdx
callq 0x4e8210
movq %rax, 0xb8(%rsp)
cmpq $0x0, 0xb8(%rsp)
jne 0x2f7717
movb $0x1, 0xaf(%rsp)
jmp 0x2f7719
jmp 0x2f771b
testb $0x1, 0xaf(%rsp)
jne 0x2f77ce
jmp 0x2f772b
cmpq $0x0, 0xc0(%rsp)
jne 0x2f776e
movq 0x344863(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x21e8cc(%rip), %rsi    # 0x516013
leaq 0x29872d(%rip), %rdx    # 0x58fe7b
leaq 0x298702(%rip), %rcx    # 0x58fe57
leaq 0x298708(%rip), %r8     # 0x58fe64
movl $0x102, %r9d            # imm = 0x102
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2f7770
movq 0xc0(%rsp), %rdi
callq 0x4e8100
testb $0x1, %al
jne 0x2f77cc
movq 0xe0(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0xc0(%rsp), %rdi
callq 0x4e8170
movq 0x20(%rsp), %rdi
movl %eax, %esi
movq 0xf0(%rsp), %rdx
callq 0x2f4f30
movq %rax, 0xb0(%rsp)
cmpq $0x0, 0xb0(%rsp)
jne 0x2f77ca
movb $0x1, 0xaf(%rsp)
jmp 0x2f77cc
jmp 0x2f77ce
testb $0x1, 0xaf(%rsp)
jne 0x2f797b
movq $0x0, 0x90(%rsp)
cmpq $0x0, 0xc0(%rsp)
jne 0x2f782b
movq 0x3447a6(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x21e80f(%rip), %rsi    # 0x516013
leaq 0x298670(%rip), %rdx    # 0x58fe7b
leaq 0x298645(%rip), %rcx    # 0x58fe57
leaq 0x29864b(%rip), %r8     # 0x58fe64
movl $0x118, %r9d            # imm = 0x118
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2f782d
movq 0xc0(%rsp), %rsi
movl 0xd4(%rsp), %edx
movl 0xd0(%rsp), %ecx
leaq 0x48(%rsp), %rdi
callq 0x2f79e0
movq 0xd8(%rsp), %rdi
movq 0xf0(%rsp), %rsi
callq 0x113240
movq %rax, 0x40(%rsp)
cmpq $0x0, 0x40(%rsp)
jne 0x2f7877
movb $0x1, 0xaf(%rsp)
testb $0x1, 0xaf(%rsp)
jne 0x2f7971
movq 0x40(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x78(%rsp), %rdi
callq 0x7e870
movq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0x1118a0
movq $0x0, 0x88(%rsp)
movq 0x40(%rsp), %rdi
movq 0xf0(%rsp), %r8
leaq 0xa0(%rsp), %rsi
leaq 0x98(%rsp), %rdx
leaq 0x90(%rsp), %rcx
callq 0x111ab0
movl %eax, 0x84(%rsp)
cmpl $0x0, 0x84(%rsp)
jge 0x2f78f7
movb $0x1, 0xaf(%rsp)
jmp 0x2f7967
cmpl $0x0, 0x84(%rsp)
jne 0x2f7903
jmp 0x2f7967
movq 0xc0(%rsp), %rdi
movq 0xb8(%rsp), %rsi
movq 0xb0(%rsp), %rcx
movq 0x88(%rsp), %r8
movq 0xa0(%rsp), %r9
movq 0x98(%rsp), %r10
movq 0x90(%rsp), %rax
leaq 0x48(%rsp), %rdx
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x2f7ad0
movq 0x88(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x88(%rsp)
jmp 0x2f78b2
movq 0x40(%rsp), %rdi
callq 0x111c10
leaq 0x48(%rsp), %rdi
callq 0x2f7d10
cmpq $0x0, 0xb0(%rsp)
je 0x2f7993
leaq 0xb0(%rsp), %rdi
callq 0x2f51b0
cmpq $0x0, 0xb8(%rsp)
je 0x2f79ab
leaq 0xb8(%rsp), %rdi
callq 0x4e8620
cmpq $0x0, 0xc0(%rsp)
je 0x2f79c3
leaq 0xc0(%rsp), %rdi
callq 0x4e81b0
movb 0xaf(%rsp), %dl
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testb $0x1, %dl
cmovnel %ecx, %eax
addq $0xe8, %rsp
retq
nop