// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/idx-limdfs.c
// Function: pushandpossiblypop
static void pushandpossiblypop(Limdfsresources *limdfsresources,
                               const Indexbounds *child,
                               const AbstractDfstransformer *adfst)
{
  Limdfsresult limdfsresult;
  GtUword width;
  Lcpintervalwithinfo *stackptr;

#ifdef SKDEBUG
  printf("(2) nextLimdfsstate(");
  adfst->showLimdfsstate(currentparent(limdfsresources)->aliasstate,
                         (GtUword) (child->offset-1),
                         limdfsresources->dfsconstinfo);
  printf(",%u)=",(unsigned int) child->inchar);
#endif
  stackptr = allocateStackspace(limdfsresources,adfst);
  adfst->nextLimdfsstate(limdfsresources->dfsconstinfo,
                         stackptr->aliasstate,
                         (GtUword) child->offset,
                         child->inchar,
                         currentparent(limdfsresources)->aliasstate);
#ifdef SKDEBUG
  adfst->showLimdfsstate(stackptr->aliasstate,
                         (GtUword) child->offset,
                         limdfsresources->dfsconstinfo);
  printf("\n");
#endif
  if (limdfsresources->genericindex->withesa)
  {
    width = child->rightbound - child->leftbound + 1;
  } else
  {
    width = child->rightbound - child->leftbound;
  }
  adfst->fullmatchLimdfsstate(&limdfsresult,
                              stackptr->aliasstate,
                              child->leftbound,
                              child->rightbound,
                              width,
                              (GtUword) child->offset,
                              limdfsresources->dfsconstinfo);
  if (limdfsresult.status == Limdfscontinue)
  {
    stackptr->lcpitv = *child;
    if (limdfsresources->keepexpandedonstack)
    {
      stackptr->keeponstack = true;
      stackptr->previousstackelem = limdfsresources->parentindex;
    }
    return; /* no success, but still have the chance to find result */
  }
  if (limdfsresult.status == Limdfssuccess)
  {
    GtIdxMatch match;

    match.dbabsolute = true;
    match.querylen = limdfsresult.pprefixlen;
    match.distance = limdfsresult.distance;
    match.dblen = child->offset;
    match.dbsubstring = limdfsresources->currentpathspace;
    if (limdfsresources->keepexpandedonstack)
    {
      gt_assert(stackptr >= limdfsresources->stack.spaceLcpintervalwithinfo &&
                stackptr < limdfsresources->stack.spaceLcpintervalwithinfo +
                           limdfsresources->stack.nextfreeLcpintervalwithinfo);
      stackptr->lcpitv = *child;
      stackptr->keeponstack = true;
      stackptr->previousstackelem = limdfsresources->parentindex;
      tracethestackelems(&match,limdfsresources,limdfsresult.pprefixlen,
                         stackptr);
    } else
    {
      match.querystartpos = 0;
      match.alignment = NULL;
    }
    /* success with match of length pprefixlen */
    (limdfsresources->genericindex->withesa
         ? esa_overinterval
         : pck_overinterval) (limdfsresources,child,&match);
  }
  /* now status == Limdfssuccess || status == Limdfsstop */
  /* pop the element from the stack as there has been success or stop event */
  limdfsresources->stack.nextfreeLcpintervalwithinfo--;
}

// Assembly:
subq $0xb8, %rsp
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq %rdx, 0xa0(%rsp)
movq 0xb0(%rsp), %rdi
movq 0xa0(%rsp), %rsi
callq 0x256c40
movq %rax, 0x78(%rsp)
movq 0xa0(%rsp), %rax
movq 0x50(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0xb0(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x78(%rsp), %rax
addq $0x28, %rax
movq %rax, 0x10(%rsp)
movq 0xa8(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x18(%rsp)
movq 0xa8(%rsp), %rax
movb 0x20(%rax), %al
movb %al, 0x27(%rsp)
movq 0xb0(%rsp), %rdi
callq 0x256440
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movb 0x27(%rsp), %cl
movq %rax, %r8
movq 0x28(%rsp), %rax
addq $0x28, %r8
movzbl %cl, %ecx
callq *%rax
movq 0xb0(%rsp), %rax
movq 0xd8(%rax), %rax
testb $0x1, 0x18(%rax)
je 0x2572d3
movq 0xa8(%rsp), %rax
movq 0x10(%rax), %rax
movq 0xa8(%rsp), %rcx
subq 0x8(%rcx), %rax
addq $0x1, %rax
movq %rax, 0x80(%rsp)
jmp 0x2572f3
movq 0xa8(%rsp), %rax
movq 0x10(%rax), %rax
movq 0xa8(%rsp), %rcx
subq 0x8(%rcx), %rax
movq %rax, 0x80(%rsp)
movq 0xa0(%rsp), %rax
movq 0x48(%rax), %rax
movq 0x78(%rsp), %rsi
addq $0x28, %rsi
movq 0xa8(%rsp), %rcx
movq 0x8(%rcx), %rdx
movq 0xa8(%rsp), %rcx
movq 0x10(%rcx), %rcx
movq 0x80(%rsp), %r8
movq 0xa8(%rsp), %rdi
movq (%rdi), %r9
movq 0xb0(%rsp), %rdi
movq (%rdi), %r10
leaq 0x88(%rsp), %rdi
movq %r10, (%rsp)
callq *%rax
cmpl $0x1, 0x88(%rsp)
jne 0x2573a4
movq 0x78(%rsp), %rdi
movq 0xa8(%rsp), %rsi
movl $0x28, %edx
callq 0x19610
movq 0xb0(%rsp), %rax
testb $0x1, 0xc8(%rax)
je 0x25739f
movq 0x78(%rsp), %rax
movb $0x1, 0x50(%rax)
movq 0xb0(%rsp), %rax
movq 0xc0(%rax), %rcx
movq 0x78(%rsp), %rax
movq %rcx, 0x58(%rax)
jmp 0x25753c
cmpl $0x0, 0x88(%rsp)
jne 0x257528
movb $0x1, 0x30(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0xa8(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x48(%rsp)
movq 0xb0(%rsp), %rax
movq 0x118(%rax), %rax
movq %rax, 0x50(%rsp)
movq 0xb0(%rsp), %rax
testb $0x1, 0xc8(%rax)
je 0x2574d8
jmp 0x25740c
movq 0x78(%rsp), %rax
movq 0xb0(%rsp), %rcx
cmpq 0x20(%rcx), %rax
jb 0x257445
movq 0x78(%rsp), %rax
movq 0xb0(%rsp), %rcx
movq 0x20(%rcx), %rcx
movq 0xb0(%rsp), %rdx
imulq $0x60, 0x30(%rdx), %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
jb 0x25747d
movq 0x3e4b54(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2bebbd(%rip), %rsi    # 0x516013
leaq 0x322fa5(%rip), %rdx    # 0x57a402
leaq 0x32304d(%rip), %rcx    # 0x57a4b1
leaq 0x322b26(%rip), %r8     # 0x579f91
movl $0x377, %r9d            # imm = 0x377
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x25747f
movq 0x78(%rsp), %rdi
movq 0xa8(%rsp), %rsi
movl $0x28, %edx
callq 0x19610
movq 0x78(%rsp), %rax
movb $0x1, 0x50(%rax)
movq 0xb0(%rsp), %rax
movq 0xc0(%rax), %rcx
movq 0x78(%rsp), %rax
movq %rcx, 0x58(%rax)
movq 0xb0(%rsp), %rsi
movq 0x90(%rsp), %rdx
movq 0x78(%rsp), %rcx
leaq 0x30(%rsp), %rdi
callq 0x2579b0
jmp 0x2574ea
movq $0x0, 0x58(%rsp)
movq $0x0, 0x70(%rsp)
movq 0xb0(%rsp), %rax
movq 0xd8(%rax), %rax
movb 0x18(%rax), %dl
leaq 0x78d(%rip), %rax       # 0x257c90
leaq 0x6f6(%rip), %rcx       # 0x257c00
testb $0x1, %dl
cmovneq %rcx, %rax
movq 0xb0(%rsp), %rdi
movq 0xa8(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq *%rax
movq 0xb0(%rsp), %rax
movq 0x30(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x30(%rax)
addq $0xb8, %rsp
retq
nopw %cs:(%rax,%rax)