// File: /workspace/github_c_makefile_star2_O1/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
movq $0x0, 0x18(%rsp)
testq %rsi, %rsi
je 0x1bc583
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %rbx
movq 0x8(%rsi), %rsi
movq %rsi, 0x10(%rsp)
movq 0xd8(%rdi), %rax
movq 0x10(%rax), %rdi
callq 0x1a830f
movq %rax, 0x8(%rsp)
cmpb $0x0, 0xc8(%rbx)
jne 0x1bc3e4
movq 0x40(%r12), %rax
leaq 0x98(%rbx), %rdi
leaq 0x60(%rbx), %rsi
testq %rax, %rax
je 0x1bc3db
movq (%rbx), %rdx
callq *%rax
jmp 0x1bc3e4
movq (%r12), %rdx
callq 0x17660
leaq 0x98(%rbx), %rax
movq %rax, 0x20(%rsp)
movb $0x1, %bpl
xorl %r13d, %r13d
testb $0x1, %bpl
je 0x1bc404
movb 0x20(%r15), %al
xorl %ebp, %ebp
jmp 0x1bc413
leaq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x1a83a4
cmpb $-0x1, %al
je 0x1bc550
cmpb $-0x2, %al
jne 0x1bc42c
cmpb $0x0, 0xe0(%rbx)
jne 0x1bc550
movq (%r15), %rcx
leaq (%rcx,%r13), %rsi
decq %rsi
movzbl %al, %r14d
movq %rbx, %rdi
movl %r14d, %edx
callq 0x1bbaff
xorl %edx, %edx
testq %r13, %r13
setne %dl
movq (%r15), %r8
addq %r13, %r8
movq %rbx, %rdi
leaq 0x18(%rsp), %rsi
movl %r14d, %ecx
movq %r12, %r9
callq 0x1bc714
movq %rax, %r14
cmpb $0x0, 0xc8(%rbx)
leaq 0x28(%rax), %rsi
cmoveq 0x20(%rsp), %rsi
movq 0x10(%rsp), %rdx
leaq 0x1(%rdx), %rcx
movq (%r15), %r9
addq %r13, %r9
movq (%rbx), %rax
movq %rax, (%rsp)
movl $0x1, %r8d
leaq 0x70(%rsp), %rdi
callq *0x48(%r12)
movl 0x70(%rsp), %eax
cmpl $0x2, %eax
je 0x1bc550
testl %eax, %eax
je 0x1bc4b9
incq %r13
jmp 0x1bc3f6
movq 0xd8(%rbx), %rax
movq 0x10(%rax), %rdi
movq 0x8(%r15), %rsi
callq 0x1a804c
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 0x1bc52b
movq %xmm0, %rdx
leaq 0x28(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rcx
callq 0x1bc58d
jmp 0x1bc537
xorl %eax, %eax
movq %rax, 0x50(%rsp)
movq %rax, 0x68(%rsp)
movq 0x138(%rbx), %rdi
leaq 0x28(%rsp), %rsi
callq *0x130(%rbx)
incq 0x128(%rbx)
cmpb $0x1, 0xc8(%rbx)
jne 0x1bc567
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x1bc588
movq %rax, 0x30(%rbx)
movq 0x8(%rsp), %rdi
callq 0x1a864b
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x66e9d
callq 0x66e64