// File: /workspace/github_c_makefile_star2_O2/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 $0x88, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rsp), %rax
andq $0x0, (%rax)
movq %rdx, %rsi
callq 0x1618cb
movq 0xd8(%rbx), %rax
movq (%rax), %rcx
movq 0x58(%rcx), %rcx
movq (%r15), %r12
movq 0x8(%r15), %rdx
movq (%rcx,%rdx,8), %rcx
movq %rcx, 0x8(%rsp)
decq %rcx
movq %rcx, 0x20(%rsp)
leaq 0x98(%rbx), %rcx
movq %rcx, 0x18(%rsp)
decq %r12
movq 0x8(%rsp), %rcx
leaq (%rcx,%r12), %r13
cmpq 0x8(%rax), %r13
jae 0x1613f9
movq (%rax), %rax
movq (%rax), %rdi
movl 0x48(%rax), %edx
movq %r13, %rsi
callq 0x705e4
cmpb $-0x1, %al
je 0x1613f9
cmpb $-0x2, %al
jne 0x1612f9
cmpb $0x0, 0xe0(%rbx)
jne 0x1613f9
movzbl %al, %ebp
movq %rbx, %rdi
movq %r12, %rsi
movl %ebp, %edx
callq 0x160bb4
movq (%r15), %rax
addq 0x20(%rsp), %rax
xorl %edx, %edx
cmpq %rax, %r13
seta %dl
leaq 0x1(%r12), %r13
movq %rbx, %rdi
leaq 0x10(%rsp), %rsi
movl %ebp, %ecx
movq %r13, %r8
movq %r14, %r9
callq 0x161903
movq %rax, %rbp
leaq 0x28(%rax), %rsi
cmpb $0x0, 0xc8(%rbx)
cmoveq 0x18(%rsp), %rsi
movq 0x8(%r15), %rcx
movq (%rbx), %rax
movq %rax, (%rsp)
leaq 0x70(%rsp), %rdi
movq %rcx, %rdx
pushq $0x1
popq %r8
movq %r13, %r9
callq *0x48(%r14)
movl 0x70(%rsp), %eax
cmpl $0x2, %eax
je 0x1613f9
testl %eax, %eax
je 0x161385
movq 0xd8(%rbx), %rax
movq %r13, %r12
jmp 0x1612bc
movb $0x1, 0x28(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x38(%rsp)
incq %r12
movq %r12, 0x40(%rsp)
movq 0x118(%rbx), %rax
movq %rax, 0x48(%rsp)
movdqu 0x78(%rsp), %xmm0
movdqu %xmm0, 0x58(%rsp)
cmpb $0x1, 0xc8(%rbx)
jne 0x1613d4
movq %xmm0, %rdx
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
movq %rbp, %rcx
callq 0x1616a5
jmp 0x1613e0
andq $0x0, 0x50(%rsp)
andq $0x0, 0x68(%rsp)
movq 0x138(%rbx), %rdi
leaq 0x28(%rsp), %rsi
callq *0x130(%rbx)
incq 0x128(%rbx)
cmpb $0x1, 0xc8(%rbx)
jne 0x161410
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x161422
movq %rax, 0x30(%rbx)
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2d6b3f(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x183be0(%rip), %rsi    # 0x2e5013
leaq 0x1e6c91(%rip), %rdx    # 0x3480cb
leaq 0x1e6d4a(%rip), %rcx    # 0x34818b
leaq 0x1e6670(%rip), %r8     # 0x347ab8
movl $0x2b5, %r9d            # imm = 0x2B5
xorl %eax, %eax
callq 0x17a50
callq 0x17390