// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/tools/gt_repfind.c
// Function: gt_callenumquerymatches
static int gt_callenumquerymatches(bool selfmatch,
                                   const char *indexname,
                                   const GtStrArray *query_files,
                                   const GtStr *query_indexname,
                                   GtReadmode query_readmode,
                                   unsigned int userdefinedleastlength,
                                   GtQuerymatchoutoptions *querymatchoutoptions,
                                   Gt_extend_querymatch_func eqmf,
                                   void *eqmf_data,
                                   const GtSeedExtendDisplayFlag
                                      *out_display_flag,
                                   GtLogger *logger,
                                   GtError *err)
{
  Suffixarray suffixarray;
  GtQuerysubstringmatchiterator *qsmi = NULL;
  bool haserr = false, query_encseq_own = false;
  GtEncseq *query_encseq = NULL;
  GtUword totallength = 0;

  if (gt_mapsuffixarray(&suffixarray,
                        SARR_ESQTAB | SARR_SUFTAB | SARR_SSPTAB,
                        indexname,
                        logger,
                        err) != 0)
  {
    haserr = true;
  }
  if (!haserr)
  {
    if (query_files == NULL || gt_str_array_size(query_files) == 0)
    {
      if (query_indexname == NULL || gt_str_length(query_indexname) == 0)
      {
        query_encseq = suffixarray.encseq;
      } else
      {
        GtEncseqLoader *el = gt_encseq_loader_new();

        gt_encseq_loader_require_ssp_tab(el);
        gt_encseq_loader_set_logger(el, logger);
        query_encseq = gt_encseq_loader_load(el, gt_str_get(query_indexname),
                                             err);
        gt_encseq_loader_delete(el);
        query_encseq_own = true;
        if (query_encseq == NULL)
        {
          haserr = true;
        }
      }
    } else
    {
      gt_assert(query_indexname == NULL || gt_str_length(query_indexname) == 0);
    }
  }
  if (!haserr)
  {
    totallength = gt_encseq_total_length(suffixarray.encseq);
    qsmi = gt_querysubstringmatchiterator_new(suffixarray.encseq,
                                              totallength,
                                              suffixarray.suftab,
                                              suffixarray.readmode,
                                              totallength + 1,
                                              query_files,
                                              query_encseq,
                                              query_readmode,
                                              userdefinedleastlength,
                                              err);
    if (qsmi == NULL)
    {
      haserr = true;
    }
  }
  if (!haserr)
  {
    int retval;
    GtSeqorEncseq query_seqorencseq;
    GtQuerymatch *exactseed = gt_querymatch_new();
    bool same_encseq;

    if (query_files == NULL || gt_str_array_size(query_files) == 0)
    {
      same_encseq = (suffixarray.encseq == query_encseq) ? true : false;
    } else
    {
      same_encseq = false;
    }
    if (querymatchoutoptions != NULL)
    {
      gt_querymatch_outoptions_set(exactseed,querymatchoutoptions);
    }
    gt_querymatch_query_readmode_set(exactseed,query_readmode);
    while (!haserr &&
           (retval = gt_querysubstringmatchiterator_next(qsmi, err)) == 0)
    {
      GtUword dbstart, dbseqnum, db_seqstart, dbseqlen,
              matchlength, query_seqlen, querystart, query_seqstart;
      uint64_t queryunitnum;

      dbstart = gt_querysubstringmatchiterator_dbstart(qsmi);
      if (gt_encseq_has_multiseq_support(suffixarray.encseq))
      {
        dbseqnum = gt_encseq_seqnum(suffixarray.encseq,dbstart);
        dbseqlen = gt_encseq_seqlength(suffixarray.encseq, dbseqnum);
        db_seqstart = gt_encseq_seqstartpos(suffixarray.encseq, dbseqnum);
      } else
      {
        dbseqnum = dbseqlen = db_seqstart = 0;
      }
      matchlength = gt_querysubstringmatchiterator_matchlength(qsmi);
      query_seqlen = gt_querysubstringmatchiterator_query_seqlen(qsmi);
      queryunitnum = gt_querysubstringmatchiterator_queryunitnum(qsmi);
      if (query_files == NULL || gt_str_array_size(query_files) == 0)
      {
        GT_SEQORENCSEQ_INIT_ENCSEQ(&query_seqorencseq,query_encseq);
        query_seqstart = gt_encseq_seqstartpos(query_encseq,queryunitnum);
      } else
      {
        GT_SEQORENCSEQ_INIT_SEQ(&query_seqorencseq,
                                gt_querysubstringmatchiterator_query(qsmi),
                                gt_querysubstringmatchiterator_desc(qsmi),
                                query_seqlen,
                                NULL,
                                0,
                                true);
        query_seqstart = 0;
      }
      querystart = gt_querysubstringmatchiterator_querystart(qsmi);
      if (eqmf != NULL)
      {
        gt_querymatch_init(exactseed,
                           matchlength,
                           dbseqnum,
                           dbstart - db_seqstart,
                           db_seqstart,
                           dbseqlen,
                           0, /* score */
                           0, /* edist */
                           0, /* mismatches */
                           selfmatch,
                           queryunitnum,
                           matchlength,
                           querystart,
                           query_seqstart,
                           query_seqlen,
                           NULL,
                           NULL);
        eqmf(eqmf_data,suffixarray.encseq,exactseed,&query_seqorencseq,
             same_encseq);
      } else
      {
        GtSeqorEncseq dbes;

        GT_SEQORENCSEQ_INIT_ENCSEQ(&dbes,suffixarray.encseq);
        if (gt_querymatch_complete(exactseed,
                                   out_display_flag,
                                   matchlength,
                                   dbseqnum,
                                   dbstart - db_seqstart,
                                   db_seqstart,
                                   dbseqlen,
                                   0, /* score */
                                   0, /* edist */
                                   0, /* mismatches */
                                   selfmatch,
                                   queryunitnum,
                                   matchlength,
                                   querystart,
                                   &dbes,
                                   &query_seqorencseq,
                                   query_seqstart,
                                   query_seqlen,
                                   dbstart - db_seqstart,
                                   querystart - query_seqstart,
                                   matchlength,
                                   false))
        {
          /* for exact matches we do not output evalues and bitscores */
          gt_querymatch_prettyprint(DBL_MAX,DBL_MAX,out_display_flag,exactseed);
        }
      }
    }
    if (retval == -1)
    {
      haserr = true;
    }
    gt_querymatch_delete(exactseed);
  }
  gt_querysubstringmatchiterator_delete(qsmi);
  gt_freesuffixarray(&suffixarray);
  if (query_encseq_own)
  {
    gt_encseq_delete(query_encseq);
  }
  return haserr ? -1 : 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2d8, %rsp            # imm = 0x2D8
movb %dil, %al
movq 0x338(%rsp), %rdi
movq 0x330(%rsp), %rdi
movq 0x328(%rsp), %rdi
movq 0x320(%rsp), %rdi
movq 0x318(%rsp), %rdi
movq 0x310(%rsp), %rdi
andb $0x1, %al
movb %al, 0x2d7(%rsp)
movq %rsi, 0x2c8(%rsp)
movq %rdx, 0x2c0(%rsp)
movq %rcx, 0x2b8(%rsp)
movl %r8d, 0x2b4(%rsp)
movl %r9d, 0x2b0(%rsp)
movq $0x0, 0x1a8(%rsp)
movb $0x0, 0x1a7(%rsp)
movb $0x0, 0x1a6(%rsp)
movq $0x0, 0x198(%rsp)
movq $0x0, 0x190(%rsp)
movq 0x2c8(%rsp), %rdx
movq 0x330(%rsp), %rcx
movq 0x338(%rsp), %r8
leaq 0x1b0(%rsp), %rdi
movl $0x83, %esi
callq 0x233e00
cmpl $0x0, %eax
je 0x5a230
movb $0x1, 0x1a7(%rsp)
testb $0x1, 0x1a7(%rsp)
jne 0x5a389
cmpq $0x0, 0x2c0(%rsp)
je 0x5a260
movq 0x2c0(%rsp), %rdi
callq 0x11fcc0
cmpq $0x0, %rax
jne 0x5a32b
cmpq $0x0, 0x2b8(%rsp)
je 0x5a27e
movq 0x2b8(%rsp), %rdi
callq 0x11dfa0
cmpq $0x0, %rax
jne 0x5a293
movq 0x1b0(%rsp), %rax
movq %rax, 0x198(%rsp)
jmp 0x5a329
callq 0xb7a40
movq %rax, 0x188(%rsp)
movq 0x188(%rsp), %rdi
callq 0xba8c0
movq 0x188(%rsp), %rdi
movq 0x330(%rsp), %rsi
callq 0xbacf0
movq 0x188(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq 0x2b8(%rsp), %rdi
callq 0x11dee0
movq 0xb0(%rsp), %rdi
movq %rax, %rsi
movq 0x338(%rsp), %rdx
callq 0xb7aa0
movq %rax, 0x198(%rsp)
movq 0x188(%rsp), %rdi
callq 0xb7e50
movb $0x1, 0x1a6(%rsp)
cmpq $0x0, 0x198(%rsp)
jne 0x5a327
movb $0x1, 0x1a7(%rsp)
jmp 0x5a329
jmp 0x5a387
jmp 0x5a32d
cmpq $0x0, 0x2b8(%rsp)
je 0x5a383
movq 0x2b8(%rsp), %rdi
callq 0x11dfa0
cmpq $0x0, %rax
je 0x5a383
movq 0x5e1c4e(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4bbcb7(%rip), %rsi    # 0x516013
leaq 0x4cc549(%rip), %rdx    # 0x5268ac
leaq 0x4cc581(%rip), %rcx    # 0x5268eb
leaq 0x4cbd17(%rip), %r8     # 0x526088
movl $0x266, %r9d            # imm = 0x266
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x5a385
jmp 0x5a387
jmp 0x5a389
testb $0x1, 0x1a7(%rsp)
jne 0x5a434
movq 0x1b0(%rsp), %rdi
callq 0xa9d00
movq %rax, 0x190(%rsp)
movq 0x1b0(%rsp), %rdi
movq 0x190(%rsp), %rsi
movq 0x208(%rsp), %rdx
movl 0x1f8(%rsp), %ecx
movq 0x190(%rsp), %r8
addq $0x1, %r8
movq 0x2c0(%rsp), %r9
movq 0x198(%rsp), %rbx
movl 0x2b4(%rsp), %r11d
movl 0x2b0(%rsp), %r10d
movq 0x338(%rsp), %rax
movq %rbx, (%rsp)
movl %r11d, 0x8(%rsp)
movl %r10d, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0x238d50
movq %rax, 0x1a8(%rsp)
cmpq $0x0, 0x1a8(%rsp)
jne 0x5a432
movb $0x1, 0x1a7(%rsp)
jmp 0x5a434
testb $0x1, 0x1a7(%rsp)
jne 0x5aa44
callq 0x267320
movq %rax, 0x140(%rsp)
cmpq $0x0, 0x2c0(%rsp)
je 0x5a46d
movq 0x2c0(%rsp), %rdi
callq 0x11fcc0
cmpq $0x0, %rax
jne 0x5a49b
movq 0x1b0(%rsp), %rdx
movq 0x198(%rsp), %rsi
xorl %eax, %eax
movl $0x1, %ecx
cmpq %rsi, %rdx
cmovel %ecx, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, 0x13f(%rsp)
jmp 0x5a4a3
movb $0x0, 0x13f(%rsp)
cmpq $0x0, 0x310(%rsp)
je 0x5a4c3
movq 0x140(%rsp), %rdi
movq 0x310(%rsp), %rsi
callq 0x2675a0
movq 0x140(%rsp), %rdi
movl 0x2b4(%rsp), %esi
callq 0x2677a0
xorl %eax, %eax
testb $0x1, 0x1a7(%rsp)
movb %al, 0xaf(%rsp)
jne 0x5a513
movq 0x1a8(%rsp), %rdi
movq 0x338(%rsp), %rsi
callq 0x239300
movl %eax, 0x184(%rsp)
cmpl $0x0, %eax
sete %al
movb %al, 0xaf(%rsp)
movb 0xaf(%rsp), %al
testb $0x1, %al
jne 0x5a523
jmp 0x5aa25
movq 0x1a8(%rsp), %rdi
callq 0x239070
movq %rax, 0x130(%rsp)
movq 0x1b0(%rsp), %rdi
callq 0xb2480
testb $0x1, %al
jne 0x5a54b
jmp 0x5a5a4
movq 0x1b0(%rsp), %rdi
movq 0x130(%rsp), %rsi
callq 0xb03a0
movq %rax, 0x128(%rsp)
movq 0x1b0(%rsp), %rdi
movq 0x128(%rsp), %rsi
callq 0xb09f0
movq %rax, 0x118(%rsp)
movq 0x1b0(%rsp), %rdi
movq 0x128(%rsp), %rsi
callq 0xb0530
movq %rax, 0x120(%rsp)
jmp 0x5a5c8
movq $0x0, 0x120(%rsp)
movq $0x0, 0x118(%rsp)
movq $0x0, 0x128(%rsp)
movq 0x1a8(%rsp), %rdi
callq 0x239120
movq %rax, 0x110(%rsp)
movq 0x1a8(%rsp), %rdi
callq 0x2391e0
movq %rax, 0x108(%rsp)
movq 0x1a8(%rsp), %rdi
callq 0x239180
movq %rax, 0xf0(%rsp)
cmpq $0x0, 0x2c0(%rsp)
je 0x5a625
movq 0x2c0(%rsp), %rdi
callq 0x11fcc0
cmpq $0x0, %rax
jne 0x5a6a0
movq 0x198(%rsp), %rax
movq %rax, 0x150(%rsp)
movq $0x0, 0x148(%rsp)
movq $0x0, 0x158(%rsp)
movq $-0x1, 0x168(%rsp)
movq $-0x1, 0x160(%rsp)
movq $0x0, 0x170(%rsp)
movb $0x0, 0x178(%rsp)
movb $0x1, 0x179(%rsp)
movq 0x198(%rsp), %rdi
movq 0xf0(%rsp), %rsi
callq 0xb0530
movq %rax, 0xf8(%rsp)
jmp 0x5a71a
movq $0x0, 0x150(%rsp)
movq 0x1a8(%rsp), %rdi
callq 0x239230
movq %rax, 0x148(%rsp)
movq 0x1a8(%rsp), %rdi
callq 0x239290
movq %rax, 0x158(%rsp)
movq 0x108(%rsp), %rax
movq %rax, 0x168(%rsp)
movq $0x0, 0x160(%rsp)
movq $0x0, 0x170(%rsp)
movb $0x0, 0x178(%rsp)
movb $0x1, 0x179(%rsp)
movq $0x0, 0xf8(%rsp)
movq 0x1a8(%rsp), %rdi
callq 0x2390d0
movq %rax, 0x100(%rsp)
cmpq $0x0, 0x318(%rsp)
je 0x5a83e
movq 0x140(%rsp), %rdi
movq 0x110(%rsp), %rsi
movq 0x128(%rsp), %rdx
movq 0x130(%rsp), %rcx
subq 0x120(%rsp), %rcx
movq 0x120(%rsp), %r8
movq 0x118(%rsp), %r9
movb 0x2d7(%rsp), %bpl
movq 0xf0(%rsp), %r14
movq 0x110(%rsp), %rbx
movq 0x100(%rsp), %r11
movq 0xf8(%rsp), %r10
movq 0x108(%rsp), %rax
xorl %r15d, %r15d
andb $0x1, %bpl
movq $0x0, (%rsp)
movq $0x0, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movzbl %bpl, %ebp
movl %ebp, 0x18(%rsp)
movq %r14, 0x20(%rsp)
movq %rbx, 0x28(%rsp)
movq %r11, 0x30(%rsp)
movq %r10, 0x38(%rsp)
movq %rax, 0x40(%rsp)
movq $0x0, 0x48(%rsp)
movq $0x0, 0x50(%rsp)
callq 0x267890
movq 0x318(%rsp), %rax
movq 0x320(%rsp), %rdi
movq 0x1b0(%rsp), %rsi
movq 0x140(%rsp), %rdx
movb 0x13f(%rsp), %r8b
leaq 0x148(%rsp), %rcx
andb $0x1, %r8b
movzbl %r8b, %r8d
callq *%rax
jmp 0x5aa20
movq 0x1b0(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq $0x0, 0xb8(%rsp)
movq $0x0, 0xc8(%rsp)
movq $-0x1, 0xd8(%rsp)
movq $-0x1, 0xd0(%rsp)
movq $0x0, 0xe0(%rsp)
movb $0x0, 0xe8(%rsp)
movb $0x1, 0xe9(%rsp)
movq 0x140(%rsp), %rdi
movq 0x328(%rsp), %rsi
movq 0x110(%rsp), %rdx
movq 0x128(%rsp), %rcx
movq 0x130(%rsp), %r8
subq 0x120(%rsp), %r8
movq 0x120(%rsp), %r9
movq 0x118(%rsp), %rax
movq %rax, 0x88(%rsp)
movb 0x2d7(%rsp), %al
movb %al, 0x87(%rsp)
movq 0xf0(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x110(%rsp), %rbp
movq 0x100(%rsp), %r13
movq 0xf8(%rsp), %r14
movq 0x108(%rsp), %rbx
movq 0x130(%rsp), %r11
subq 0x120(%rsp), %r11
movq 0x100(%rsp), %r10
subq 0xf8(%rsp), %r10
movq 0x110(%rsp), %rax
movq %rax, 0xa0(%rsp)
xorl %eax, %eax
leaq 0xb8(%rsp), %r12
leaq 0x148(%rsp), %r15
xorl %eax, %eax
movb 0x87(%rsp), %al
andb $0x1, %al
movb %al, 0x97(%rsp)
movq 0x88(%rsp), %rax
movq %rax, (%rsp)
movb 0x97(%rsp), %al
movq $0x0, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movzbl %al, %eax
movl %eax, 0x20(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0xa0(%rsp), %rax
movq %rbp, 0x30(%rsp)
movq %r13, 0x38(%rsp)
movq %r12, 0x40(%rsp)
movq %r15, 0x48(%rsp)
movq %r14, 0x50(%rsp)
movq %rbx, 0x58(%rsp)
movq %r11, 0x60(%rsp)
movq %r10, 0x68(%rsp)
movq %rax, 0x70(%rsp)
movl $0x0, 0x78(%rsp)
callq 0x269e50
testb $0x1, %al
jne 0x5a9fe
jmp 0x5aa1e
movq 0x328(%rsp), %rdi
movq 0x140(%rsp), %rsi
movsd 0x4be33a(%rip), %xmm1   # 0x518d50
movaps %xmm1, %xmm0
callq 0x267bd0
jmp 0x5aa20
jmp 0x5a4d7
cmpl $-0x1, 0x184(%rsp)
jne 0x5aa37
movb $0x1, 0x1a7(%rsp)
movq 0x140(%rsp), %rdi
callq 0x267b60
movq 0x1a8(%rsp), %rdi
callq 0x239030
leaq 0x1b0(%rsp), %rdi
callq 0x233320
testb $0x1, 0x1a6(%rsp)
je 0x5aa75
movq 0x198(%rsp), %rdi
callq 0xae070
movb 0x1a7(%rsp), %dl
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testb $0x1, %dl
cmovnel %ecx, %eax
addq $0x2d8, %rsp            # imm = 0x2D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax,%rax)