// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/match/idx-limdfs.c
// Function: pck_overcontext
static void pck_overcontext(Limdfsresources *limdfsresources,
                            const Indexbounds *child,
                            const AbstractDfstransformer *adfst)
{
  GtUchar cc;
  GtUword contextlength, resetvalue = 0;
  bool processinchar = true;
  GtUword bound;
  Bwtseqcontextiterator *bsci;
  Limdfsresult limdfsresult;
  GtIdxMatch match;

  gt_assert(child != NULL);
  bound = child->leftbound;
  bsci
    = gt_Bwtseqcontextiterator_new(limdfsresources->genericindex->packedindex,
                                   bound);
  initparentcopy(limdfsresources,adfst);
#ifdef SKDEBUG
  printf("retrieve context for bound = "GT_WU"\n",(GtUword) bound);
#endif
  for (contextlength = 0; /* nothing */; contextlength++)
  {
    if (processinchar)
    {
      cc = child->inchar;
      processinchar = false;
    } else
    {
      cc = gt_Bwtseqcontextiterator_next(&bound,bsci);
    }
    if (cc != (GtUchar) GT_SEPARATOR &&
        (!limdfsresources->nowildcards || cc != (GtUchar) GT_WILDCARD))
    {
      Lcpintervalwithinfo *outstate;
#ifdef SKDEBUG
      printf("cc=%u\n",(unsigned int) cc);
#endif
      addpathchar(limdfsresources,
                  (GtUword) (child->offset - 1 + contextlength),cc);
      outstate = expandsingleton(limdfsresources,
                                 &resetvalue,
                                 (contextlength > 0) ? true : false,
                                 cc,
                                 (GtUword) (child->offset+contextlength),
                                 adfst);
      adfst->fullmatchLimdfsstate(&limdfsresult,
                                  limdfsresources->keepexpandedonstack
                                    ? outstate->aliasstate
                                    : limdfsresources->copyofcopyofparentstate,
                                  bound,
                                  bound+1,
                                  (GtUword) 1,
                                  (GtUword) (child->offset+contextlength),
                                  limdfsresources->dfsconstinfo);
      if (limdfsresult.status == Limdfsstop)
      {
        break;
      }
      if (limdfsresult.status == Limdfssuccess)
      {
        GtUword startpos;

        startpos = gt_bwtseqfirstmatch(
                                    limdfsresources->genericindex->packedindex,
                                    child->leftbound);
        match.dbabsolute = true;
        match.dbstartpos = limdfsresources->genericindex->totallength -
                           (startpos + child->offset);
        match.dblen = child->offset + contextlength;
        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;
    }
  }
  if (limdfsresources->keepexpandedonstack)
  {
    gt_assert(resetvalue > 0);
    limdfsresources->stack.nextfreeLcpintervalwithinfo = resetvalue;
  }
  gt_Bwtseqcontextiterator_delete(bsci);
  bsci = NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
andq $0x0, 0x20(%rsp)
testq %rsi, %rsi
je 0x16163f
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rsi), %rsi
leaq 0x18(%rsp), %rax
movq %rsi, (%rax)
movq 0xd8(%rdi), %rax
movq 0x10(%rax), %rdi
callq 0x14b225
movq %rax, 0x10(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1618cb
leaq 0x98(%rbx), %r14
movb $0x1, %al
xorl %r13d, %r13d
testb $0x1, %al
je 0x1614c5
movb 0x20(%r15), %al
jmp 0x1614d4
leaq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x14b27d
cmpb $-0x1, %al
je 0x16160c
cmpb $-0x2, %al
jne 0x1614ed
cmpb $0x0, 0xe0(%rbx)
jne 0x16160c
movq (%r15), %rcx
leaq (%rcx,%r13), %rsi
decq %rsi
movzbl %al, %ebp
movq %rbx, %rdi
movl %ebp, %edx
callq 0x160bb4
xorl %edx, %edx
testq %r13, %r13
setne %dl
movq (%r15), %r8
addq %r13, %r8
movq %rbx, %rdi
leaq 0x20(%rsp), %rsi
movl %ebp, %ecx
movq %r12, %r9
callq 0x161903
movq %rax, %rbp
cmpb $0x0, 0xc8(%rbx)
leaq 0x28(%rax), %rsi
cmoveq %r14, %rsi
movq 0x18(%rsp), %rdx
leaq 0x1(%rdx), %rcx
movq (%r15), %r9
addq %r13, %r9
movq (%rbx), %rax
movq %rax, (%rsp)
leaq 0x70(%rsp), %rdi
pushq $0x1
popq %r8
callq *0x48(%r12)
movl 0x70(%rsp), %eax
cmpl $0x2, %eax
je 0x16160c
testl %eax, %eax
je 0x161575
incq %r13
xorl %eax, %eax
jmp 0x1614bb
movq 0xd8(%rbx), %rax
movq 0x10(%rax), %rdi
movq 0x8(%r15), %rsi
callq 0x14af44
movb $0x1, 0x28(%rsp)
movq 0xd8(%rbx), %rcx
movq 0x8(%rcx), %rcx
movq (%r15), %rdx
addq %rdx, %rax
subq %rax, %rcx
movq %rcx, 0x38(%rsp)
addq %rdx, %r13
movq %r13, 0x40(%rsp)
movq 0x118(%rbx), %rax
movq %rax, 0x48(%rsp)
movdqu 0x78(%rsp), %xmm0
movdqu %xmm0, 0x58(%rsp)
cmpb $0x1, 0xc8(%rbx)
jne 0x1615e7
movq %xmm0, %rdx
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
movq %rbp, %rcx
callq 0x1616a5
jmp 0x1615f3
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 0x161623
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x16166d
movq %rax, 0x30(%rbx)
movq 0x10(%rsp), %rdi
callq 0x14b4fb
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2d6922(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1839c3(%rip), %rsi    # 0x2e5013
leaq 0x1e6a56(%rip), %rdx    # 0x3480ad
leaq 0x1e6a5d(%rip), %rcx    # 0x3480bb
leaq 0x1e6453(%rip), %r8     # 0x347ab8
movl $0x2cb, %r9d            # imm = 0x2CB
jmp 0x161699
movq 0x2d68f4(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x183995(%rip), %rsi    # 0x2e5013
leaq 0x1e6a46(%rip), %rdx    # 0x3480cb
leaq 0x1e6a2f(%rip), %rcx    # 0x3480bb
leaq 0x1e6425(%rip), %r8     # 0x347ab8
movl $0x31d, %r9d            # imm = 0x31D
xorl %eax, %eax
callq 0x17a50
callq 0x17390