// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/greedyfwdmat.c
// Function: gt_findsubquerygmatchforward
int gt_findsubquerygmatchforward(const GtEncseq *encseq,
                              const void *genericindex,
                              GtUword totallength,
                              Greedygmatchforwardfunction gmatchforward,
                              const GtAlphabet *alphabet,
                              const GtStrArray *queryfilenames,
                              Definedunsignedlong minlength,
                              Definedunsignedlong maxlength,
                              bool showsequence,
                              bool showquerypos,
                              bool showsubjectpos,
                              GtError *err)
{
  Substringinfo substringinfo;
  Rangespecinfo rangespecinfo;
  bool haserr = false;
  GtSeqIterator *seqit;
  const GtUchar *query;
  GtUword querylen;
  char *desc = NULL;
  int retval;
  uint64_t unitnum;

  gt_error_check(err);
  substringinfo.genericindex = genericindex;
  substringinfo.totallength = totallength;
  rangespecinfo.minlength = minlength;
  rangespecinfo.maxlength = maxlength;
  rangespecinfo.showsequence = showsequence;
  rangespecinfo.showquerypos = showquerypos;
  rangespecinfo.showsubjectpos = showsubjectpos;
  substringinfo.preprocessgmatchlength = showunitnum;
  substringinfo.processgmatchlength = showifinlengthrange;
  substringinfo.postprocessgmatchlength = NULL;
  substringinfo.alphabet = alphabet;
  substringinfo.processinfo = &rangespecinfo;
  substringinfo.gmatchforward = gmatchforward;
  substringinfo.encseq = encseq;
  seqit = gt_seq_iterator_sequence_buffer_new(queryfilenames, err);
  if (!seqit)
    haserr = true;
  if (!haserr)
  {
    gt_seq_iterator_set_symbolmap(seqit, gt_alphabet_symbolmap(alphabet));
    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;
      }
      gmatchposinsinglesequence(&substringinfo,
                                unitnum,
                                query,
                                querylen,
                                desc);
    }
    gt_seq_iterator_delete(seqit);
  }
  return haserr ? -1 : 0;
}

// Assembly:
pushq %rbx
subq $0x110, %rsp            # imm = 0x110
movq %rcx, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq %rsi, %r10
movq 0x10(%rsp), %rsi
movq %rdi, %r11
movq 0x18(%rsp), %rdi
movq 0x158(%rsp), %rax
movb 0x150(%rsp), %al
movb 0x148(%rsp), %cl
movb 0x140(%rsp), %dl
leaq 0x130(%rsp), %rbx
movq %rbx, 0x20(%rsp)
leaq 0x120(%rsp), %rbx
movq %rbx, 0x28(%rsp)
movq %r11, 0x108(%rsp)
movq %r10, 0x100(%rsp)
movq %rdi, 0xf8(%rsp)
movq %rsi, 0xf0(%rsp)
movq %r8, 0xe8(%rsp)
movq %r9, 0xe0(%rsp)
andb $0x1, %dl
movb %dl, 0xdf(%rsp)
andb $0x1, %cl
movb %cl, 0xde(%rsp)
andb $0x1, %al
movb %al, 0xdd(%rsp)
movb $0x0, 0x67(%rsp)
movq $0x0, 0x40(%rsp)
cmpq $0x0, 0x158(%rsp)
je 0x2542ca
movq 0x158(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x254292
jmp 0x2542ca
movq 0x3e7d07(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2c1d70(%rip), %rsi    # 0x516013
leaq 0x2c1f15(%rip), %rdx    # 0x5161bf
leaq 0x325c2b(%rip), %rcx    # 0x579edc
leaq 0x325c41(%rip), %r8     # 0x579ef9
movl $0xec, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2542cc
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
movq 0x100(%rsp), %rdx
movq %rdx, 0x90(%rsp)
movq 0xf8(%rsp), %rdx
movq %rdx, 0x98(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x70(%rsp)
movq 0x8(%rcx), %rcx
movq %rcx, 0x78(%rsp)
movq (%rax), %rcx
movq %rcx, 0x80(%rsp)
movq 0x8(%rax), %rax
movq %rax, 0x88(%rsp)
movb 0xdf(%rsp), %al
andb $0x1, %al
movb %al, 0x68(%rsp)
movb 0xde(%rsp), %al
andb $0x1, %al
movb %al, 0x69(%rsp)
movb 0xdd(%rsp), %al
andb $0x1, %al
movb %al, 0x6a(%rsp)
leaq 0x154(%rip), %rax       # 0x2544a0
movq %rax, 0xb0(%rsp)
leaq 0x1a5(%rip), %rax       # 0x254500
movq %rax, 0xb8(%rsp)
movq $0x0, 0xc0(%rsp)
movq 0xe8(%rsp), %rax
movq %rax, 0xa0(%rsp)
leaq 0x68(%rsp), %rax
movq %rax, 0xc8(%rsp)
movq 0xf0(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0x108(%rsp), %rax
movq %rax, 0xd0(%rsp)
movq 0xe0(%rsp), %rdi
movq 0x158(%rsp), %rsi
callq 0x113240
movq %rax, 0x58(%rsp)
cmpq $0x0, 0x58(%rsp)
jne 0x2543d3
movb $0x1, 0x67(%rsp)
testb $0x1, 0x67(%rsp)
jne 0x254482
movq 0x58(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0xe8(%rsp), %rdi
callq 0x7e870
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x1118a0
movq $0x0, 0x30(%rsp)
movq 0x58(%rsp), %rdi
movq 0x158(%rsp), %r8
leaq 0x50(%rsp), %rsi
leaq 0x48(%rsp), %rdx
leaq 0x40(%rsp), %rcx
callq 0x111ab0
movl %eax, 0x3c(%rsp)
cmpl $0x0, 0x3c(%rsp)
jge 0x25443e
movb $0x1, 0x67(%rsp)
jmp 0x254478
cmpl $0x0, 0x3c(%rsp)
jne 0x254447
jmp 0x254478
movq 0x30(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq 0x48(%rsp), %rcx
movq 0x40(%rsp), %r8
leaq 0x90(%rsp), %rdi
callq 0x254600
movq 0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
jmp 0x25440b
movq 0x58(%rsp), %rdi
callq 0x111c10
movb 0x67(%rsp), %dl
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testb $0x1, %dl
cmovnel %ecx, %eax
addq $0x110, %rsp            # imm = 0x110
popq %rbx
retq
nopl (%rax)