// File: /workspace/github_c_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %r9d, %r13d
movl %r8d, %r15d
movl %ecx, %ebx
movl %edx, %ebp
movq %rsi, 0x8(%rsp)
movq %rdi, %r14
movq 0xc0(%rsp), %r12
xorl %eax, %eax
movq %rax, 0x18(%rsp)
movq %rax, 0x10(%rsp)
testq %r12, %r12
je 0x202c3c
movq %r12, %rdi
callq 0xfcc32
testb %al, %al
jne 0x20301e
movq %r14, %rdi
movq %r12, %rsi
callq 0x32b8a6
movq %rax, 0x20(%rsp)
testq %rax, %rax
je 0x202cb7
movq %rax, %r12
testb %r15b, %r15b
je 0x202c61
movq %r12, %rdi
callq 0x32ba36
testb %r13b, %r13b
je 0x202c6e
movq %r12, %rdi
callq 0x32bd26
testb $0x4, %bpl
je 0x202ca1
movq %r12, %rdi
callq 0x32ba94
testb %al, %al
jne 0x202ca1
movq %r12, %rdi
movq %r14, %rsi
movq 0xc0(%rsp), %rdx
callq 0x32baf9
movq %rax, 0x18(%rsp)
testq %rax, %rax
je 0x20300f
movq %r12, %rdi
callq 0x32ba94
testb %al, %al
je 0x202cbf
movl $0x0, 0x4(%rsp)
jmp 0x202cf0
movb $0x1, %r14b
jmp 0x202fd3
movq %r12, %rdi
callq 0x32bab1
movq %r14, %rdi
movl %eax, %esi
movq 0xc0(%rsp), %rdx
callq 0x201bc7
movq %rax, 0x10(%rsp)
testq %rax, %rax
sete %r14b
je 0x202f63
movl %r14d, 0x4(%rsp)
movq $0x0, 0x68(%rsp)
movq %r12, %rdi
callq 0x32baa7
movq %rax, %r15
movq %r12, %rdi
callq 0x32baac
movq %rax, %r14
movq %rax, 0x50(%rsp)
movq %r12, %rdi
callq 0x32ba9d
movq %rax, 0x40(%rsp)
movq %r12, %rdi
callq 0x32baa2
movq %rax, 0x48(%rsp)
movl %ebp, 0x58(%rsp)
movl %ebx, 0x5c(%rsp)
callq 0xd0ece
movq %rax, %rbx
movq %rax, 0x60(%rsp)
leaq 0x1b9fd5(%rip), %r13    # 0x3bcd1f
movq %r15, %rdi
movq %r13, %rsi
movl $0x3a, %edx
callq 0x104226
movq %rax, %r12
movq %rax, 0x30(%rsp)
movq %r14, %rdi
movq %r13, %rsi
movl $0x3c, %edx
callq 0x104226
movq %rax, %r13
movq %rax, 0x38(%rsp)
movq 0x8(%rsp), %rdi
movq 0xc0(%rsp), %r15
movq %r15, %rsi
callq 0x114f10
movq %rax, %rbp
testq %rax, %rax
movzbl 0x4(%rsp), %eax
movl $0x1, %ecx
cmovnel %eax, %ecx
movl %ecx, 0x4(%rsp)
testb %cl, %cl
je 0x202db4
movl 0x4(%rsp), %r14d
jmp 0x202f8d
movq %rbx, %rdi
callq 0xd11ab
movq %rbp, %rdi
movq %rax, %rsi
callq 0x1142c4
leaq 0x78(%rsp), %rsi
leaq 0x70(%rsp), %rdx
leaq 0x68(%rsp), %rcx
movq %rbp, %rdi
movq %r15, %r8
callq 0x11433d
testl %eax, %eax
js 0x202f67
xorl %ebx, %ebx
movq %rbp, 0x80(%rsp)
testl %eax, %eax
je 0x202f6c
movq 0x70(%rsp), %r12
cmpq %r12, %r14
ja 0x202e18
movq 0x78(%rsp), %r13
addq %r13, %r12
movq %r12, %rax
subq %r14, %rax
cmpq %r13, %rax
jae 0x202e4b
incq %rbx
movq 0x80(%rsp), %rbp
movq %rbp, %rdi
leaq 0x78(%rsp), %rsi
leaq 0x70(%rsp), %rdx
leaq 0x68(%rsp), %rcx
movq 0xc0(%rsp), %r8
callq 0x11433d
testl %eax, %eax
jns 0x202df3
jmp 0x202f73
movq 0x20(%rsp), %rbp
movq 0x18(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x10(%rsp), %r15
movq %r13, 0x8(%rsp)
xorl %eax, %eax
cmpq %r14, %rax
jae 0x203014
jge 0x202e94
leaq (%r14,%r13), %rdx
leaq (%rax,%r13), %rcx
cmpb $-0x3, (%rcx)
ja 0x202e8b
incq %rcx
incq %rax
cmpq %rdx, %rcx
jb 0x202e79
jmp 0x202e94
cmpq %rax, %r14
jne 0x202f59
testb $0x1, 0x5c(%rsp)
je 0x202ed7
movq %r13, %rdi
movq %rbp, %rsi
leaq 0x30(%rsp), %rdx
movq %r15, %rcx
callq 0x202ba4
testq %rax, %rax
je 0x202ed7
movq %rbp, %rdi
movq 0x28(%rsp), %rsi
leaq 0x30(%rsp), %rdx
movq %rax, %rcx
movq 0x8(%rsp), %r8
movq %r13, %r9
pushq $0x1
pushq %rbx
callq 0x203023
addq $0x10, %rsp
testb $0x2, 0x5c(%rsp)
je 0x202f37
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x203019
movq 0x50(%rsp), %rdx
movq %r13, %rsi
callq 0x1df9e2
movq 0x38(%rsp), %rdi
movq %rbp, %rsi
leaq 0x30(%rsp), %rdx
movq %r15, %rcx
callq 0x202ba4
testq %rax, %rax
je 0x202f37
movq %rbp, %rdi
movq 0x28(%rsp), %rsi
leaq 0x30(%rsp), %rdx
movq %rax, %rcx
movq 0x8(%rsp), %r8
movq %r13, %r9
pushq $0x0
pushq %rbx
callq 0x203023
addq $0x10, %rsp
movq %r14, %rax
decq %rax
incq %r13
movq 0x50(%rsp), %r14
movq %r12, %rcx
subq %r14, %rcx
cmpq %rcx, %r13
jbe 0x202e66
jmp 0x202e18
incq %rcx
xorl %eax, %eax
movq %rcx, %r13
jmp 0x202f45
movb $0x1, %al
jmp 0x202fc5
movb $0x1, %r14b
jmp 0x202f85
movl 0x4(%rsp), %r14d
jmp 0x202f76
movb $0x1, %r14b
movq 0x60(%rsp), %rbx
movq 0x30(%rsp), %r12
movq 0x38(%rsp), %r13
movq %rbp, %rdi
callq 0x11437f
movq %rbx, %rdi
callq 0xd0e1c
leaq 0x1b9d83(%rip), %rbx    # 0x3bcd1f
movq %r12, %rdi
movq %rbx, %rsi
movl $0x44, %edx
callq 0x1045eb
movq %r13, %rdi
movq %rbx, %rsi
movl $0x45, %edx
callq 0x1045eb
cmpq $0x0, 0x10(%rsp)
sete %al
testb %al, %al
jne 0x202fd3
leaq 0x10(%rsp), %rdi
callq 0x201cbe
cmpq $0x0, 0x18(%rsp)
je 0x202fe5
leaq 0x18(%rsp), %rdi
callq 0x32bc73
cmpq $0x0, 0x20(%rsp)
je 0x202ff7
leaq 0x20(%rsp), %rdi
callq 0x32bac3
movzbl %r14b, %eax
negl %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %r14b
jmp 0x202fe5
callq 0x7fb80
callq 0x7fbb7
callq 0x7fb47