// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/idx-limdfs.c
// Function: esa_overcontext
static void esa_overcontext(Limdfsresources *limdfsresources,
                            const Indexbounds *child,
                            const AbstractDfstransformer *adfst)
{
  GtUword pos, startpos;
  GtUword resetvalue = 0;
  GtUchar cc;
  Limdfsresult limdfsresult;
  GtIdxMatch match;

  initparentcopy(limdfsresources,adfst);
  startpos = ESASUFFIXPTRGET(limdfsresources->genericindex->suffixarray->suftab,
                             child->leftbound);
#ifdef SKDEBUG
  printf("retrieve context of startpos="GT_WU"\n",(GtUword) startpos);
#endif
  for (pos = startpos + child->offset - 1;
       pos < limdfsresources->genericindex->totallength; pos++)
  {
    cc = gt_encseq_get_encoded_char(
                          limdfsresources->genericindex->suffixarray->encseq,
                          pos,
                          limdfsresources->genericindex->suffixarray->readmode);
    if (cc != (GtUchar) GT_SEPARATOR &&
        (!limdfsresources->nowildcards || cc != (GtUchar) GT_WILDCARD))
    {
#ifdef SKDEBUG
      printf("cc=%u\n",(unsigned int) cc);
#endif
      Lcpintervalwithinfo *outstate;

      addpathchar(limdfsresources,(GtUword) (pos - startpos),cc);
      outstate = expandsingleton(limdfsresources,
                                 &resetvalue,
                                 (pos > startpos + child->offset - 1)
                                    ? true : false,
                                 cc,
                                 (GtUword) (pos - startpos + 1),
                                 adfst);
      adfst->fullmatchLimdfsstate(&limdfsresult,
                                  limdfsresources->keepexpandedonstack
                                    ?  outstate->aliasstate
                                    :  limdfsresources->copyofcopyofparentstate,
                                  child->leftbound,
                                  child->leftbound,
                                  (GtUword) 1,
                                  (GtUword) (pos-startpos+1),
                                  limdfsresources->dfsconstinfo);
      if (limdfsresult.status == Limdfsstop)
      {
        break;
      }
      if (limdfsresult.status == Limdfssuccess)
      {
        match.dbabsolute = true;
        match.dbstartpos = startpos;
        match.dblen = pos - startpos + 1;
        match.dbsubstring = limdfsresources->currentpathspace;
        match.querylen = limdfsresult.pprefixlen;
        match.distance = limdfsresult.distance;
        if (limdfsresources->keepexpandedonstack)
        {
          tracethestackelems(&match,limdfsresources,limdfsresult.pprefixlen,
                             outstate);
        } else
        {
          match.querystartpos = 0;
          match.alignment = NULL;
        }
        /* call processmatch */
        limdfsresources->processmatch(limdfsresources->processmatchinfo,&match);
        limdfsresources->numberofmatches++;
        break;
      }
    } else
    {
      break; /* failure */
    }
  }
  if (limdfsresources->keepexpandedonstack)
  {
    gt_assert(resetvalue > 0);
    limdfsresources->stack.nextfreeLcpintervalwithinfo = resetvalue;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdx, %r14
movq %rsi, 0x8(%rsp)
movq %rdi, %rbx
movq $0x0, 0x10(%rsp)
cmpb $0x0, 0xc8(%rdi)
jne 0x1bc19a
movq 0x40(%r14), %rax
leaq 0x98(%rbx), %rdi
leaq 0x60(%rbx), %rsi
testq %rax, %rax
je 0x1bc192
movq (%rbx), %rdx
callq *%rax
jmp 0x1bc19a
movq (%r14), %rdx
callq 0x17660
movq %r14, 0x30(%rsp)
movq 0xd8(%rbx), %rax
movq (%rax), %rcx
movq 0x58(%rcx), %rcx
movq 0x8(%rsp), %rdx
movq (%rdx), %rbp
movq 0x8(%rdx), %rdx
movq (%rcx,%rdx,8), %r14
leaq (%r14,%rbp), %rcx
decq %rcx
cmpq 0x8(%rax), %rcx
jae 0x1bc33e
leaq -0x1(%r14), %rcx
movq %rcx, 0x20(%rsp)
leaq 0x98(%rbx), %rcx
movq %rcx, 0x18(%rsp)
decq %rbp
movq %r14, 0x28(%rsp)
movq 0x30(%rsp), %r15
leaq (%r14,%rbp), %r12
movq (%rax), %rax
movq (%rax), %rdi
movl 0x48(%rax), %edx
movq %r12, %rsi
callq 0xec1f8
cmpb $-0x1, %al
je 0x1bc33e
cmpb $-0x2, %al
jne 0x1bc21e
cmpb $0x0, 0xe0(%rbx)
jne 0x1bc33e
movzbl %al, %r13d
movq %rbx, %rdi
movq %rbp, %rsi
movl %r13d, %edx
callq 0x1bbaff
movq 0x8(%rsp), %r14
movq (%r14), %rax
addq 0x20(%rsp), %rax
xorl %edx, %edx
cmpq %rax, %r12
seta %dl
leaq 0x1(%rbp), %r12
movq %rbx, %rdi
leaq 0x10(%rsp), %rsi
movl %r13d, %ecx
movq %r12, %r8
movq %r15, %r9
callq 0x1bc714
movq %rax, %r13
leaq 0x28(%rax), %rsi
cmpb $0x0, 0xc8(%rbx)
cmoveq 0x18(%rsp), %rsi
movq 0x8(%r14), %rcx
movq 0x28(%rsp), %r14
movq (%rbx), %rax
movq %rax, (%rsp)
movl $0x1, %r8d
leaq 0x80(%rsp), %rdi
movq %rcx, %rdx
movq %r12, %r9
callq *0x48(%r15)
movl 0x80(%rsp), %eax
cmpl $0x2, %eax
je 0x1bc33e
testl %eax, %eax
je 0x1bc2cc
movq 0xd8(%rbx), %rax
leaq (%r14,%rbp), %rcx
incq %rcx
movq %r12, %rbp
cmpq 0x8(%rax), %rcx
jb 0x1bc1f0
jmp 0x1bc33e
movb $0x1, 0x38(%rsp)
movq %r14, 0x48(%rsp)
incq %rbp
movq %rbp, 0x50(%rsp)
movq 0x118(%rbx), %rax
movq %rax, 0x58(%rsp)
movdqu 0x88(%rsp), %xmm0
movdqu %xmm0, 0x68(%rsp)
cmpb $0x1, 0xc8(%rbx)
jne 0x1bc319
movq %xmm0, %rdx
leaq 0x38(%rsp), %rdi
movq %rbx, %rsi
movq %r13, %rcx
callq 0x1bc58d
jmp 0x1bc325
xorl %eax, %eax
movq %rax, 0x60(%rsp)
movq %rax, 0x78(%rsp)
movq 0x138(%rbx), %rdi
leaq 0x38(%rsp), %rsi
callq *0x130(%rbx)
incq 0x128(%rbx)
cmpb $0x1, 0xc8(%rbx)
jne 0x1bc355
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x1bc367
movq %rax, 0x30(%rbx)
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x66e2b