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

  gt_assert(adfst->sizeofdfsstate <=
            sizeof (limdfsresources->copyofparent.aliasstate));
  limdfsresources->numberofmatches = 0;
  initlcpinfostack(limdfsresources,adfst);
  while (limdfsresources->stack.nextfreeLcpintervalwithinfo > 0)
  {
    gt_assert(limdfsresources->stack.spaceLcpintervalwithinfo != NULL);
    /*
    printf("nextfreeLcpintervalwithinfo="GT_WU"\n",
               limdfsresources->stack.nextfreeLcpintervalwithinfo);
    */
    stackptr = limdfsresources->stack.spaceLcpintervalwithinfo +
               limdfsresources->stack.nextfreeLcpintervalwithinfo - 1;
    SHOWSTACKTOP(stackptr);
    if (limdfsresources->keepexpandedonstack)
    {
      if (stackptr->keeponstack)
      {
        limdfsresources->parentindex
          = limdfsresources->stack.nextfreeLcpintervalwithinfo - 1;
      } else
      {
        limdfsresources->stack.nextfreeLcpintervalwithinfo--;
        continue;
      }
    } else
    {
      /* make a copy of the top most stack element to be used as source */
      if (adfst->copyLimdfsstate == NULL)
      {
        limdfsresources->copyofparent = *stackptr; /* make a copy */
      } else
      {
        limdfsresources->copyofparent.lcpitv = stackptr->lcpitv;
        adfst->copyLimdfsstate(limdfsresources->copyofparent.aliasstate,
                               stackptr->aliasstate,
                               limdfsresources->dfsconstinfo);
      }
      /* now parentptr always points to copyofparent */
    }
    if (currentparent(limdfsresources)->lcpitv.offset > 0)
    {
      addpathchar(limdfsresources,
                  (GtUword)
                   (currentparent(limdfsresources)->lcpitv.offset-1),
                  currentparent(limdfsresources)->lcpitv.inchar);
    }
    gt_assert(limdfsresources->stack.nextfreeLcpintervalwithinfo > 0);
    /* now delete the top element from the stack as we have made a copy */
    if (limdfsresources->keepexpandedonstack)
    {
      stackptr->keeponstack = false;
    } else
    {
      limdfsresources->stack.nextfreeLcpintervalwithinfo--;
    }
    (limdfsresources->genericindex->withesa
        ? esa_splitandprocess
        : pck_splitandprocess) (limdfsresources,adfst);
  }
  if (adfst->extractdfsconstinfo != NULL)
  {
    adfst->extractdfsconstinfo(limdfsresources->processresult,
                               limdfsresources,
                               limdfsresources->patterninfo,
                               limdfsresources->dfsconstinfo);
  }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x18(%rsp), %rax
cmpq $0x28, (%rax)
jbe 0x255961
movq 0x3e6670(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2c06d9(%rip), %rsi    # 0x516013
leaq 0x324967(%rip), %rdx    # 0x57a2a8
leaq 0x3249ab(%rip), %rcx    # 0x57a2f3
leaq 0x324642(%rip), %r8     # 0x579f91
movl $0x472, %r9d            # imm = 0x472
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x255963
movq 0x20(%rsp), %rax
movq $0x0, 0x128(%rax)
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x256340
movq 0x20(%rsp), %rax
cmpq $0x0, 0x30(%rax)
jbe 0x255ba0
jmp 0x255994
movq 0x20(%rsp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x2559d8
movq 0x3e65f9(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2c0662(%rip), %rsi    # 0x516013
leaq 0x324945(%rip), %rdx    # 0x57a2fd
leaq 0x324934(%rip), %rcx    # 0x57a2f3
leaq 0x3245cb(%rip), %r8     # 0x579f91
movl $0x477, %r9d            # imm = 0x477
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2559da
movq 0x20(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x20(%rsp), %rcx
imulq $0x60, 0x30(%rcx), %rcx
addq %rcx, %rax
addq $-0x60, %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rax
testb $0x1, 0xc8(%rax)
je 0x255a45
movq 0x10(%rsp), %rax
testb $0x1, 0x50(%rax)
je 0x255a2d
movq 0x20(%rsp), %rax
movq 0x30(%rax), %rcx
subq $0x1, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0xc0(%rax)
jmp 0x255a43
movq 0x20(%rsp), %rax
movq 0x30(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x30(%rax)
jmp 0x255982
jmp 0x255aae
movq 0x18(%rsp), %rax
cmpq $0x0, 0x40(%rax)
jne 0x255a6b
movq 0x20(%rsp), %rdi
addq $0x38, %rdi
movq 0x10(%rsp), %rsi
movl $0x60, %edx
callq 0x19610
jmp 0x255aac
movq 0x20(%rsp), %rdi
addq $0x38, %rdi
movq 0x10(%rsp), %rsi
movl $0x28, %edx
callq 0x19610
movq 0x18(%rsp), %rax
movq 0x40(%rax), %rax
movq 0x20(%rsp), %rdi
addq $0x38, %rdi
addq $0x28, %rdi
movq 0x10(%rsp), %rsi
addq $0x28, %rsi
movq 0x20(%rsp), %rcx
movq (%rcx), %rdx
callq *%rax
jmp 0x255aae
movq 0x20(%rsp), %rdi
callq 0x256440
cmpq $0x0, (%rax)
jbe 0x255af9
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
movq 0x20(%rsp), %rdi
callq 0x256440
movq (%rax), %rax
subq $0x1, %rax
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
callq 0x256440
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
movzbl 0x20(%rax), %edx
callq 0x256500
jmp 0x255afb
movq 0x20(%rsp), %rax
cmpq $0x0, 0x30(%rax)
ja 0x255b3f
movq 0x3e6492(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2c04fb(%rip), %rsi    # 0x516013
leaq 0x324816(%rip), %rdx    # 0x57a335
leaq 0x3247cd(%rip), %rcx    # 0x57a2f3
leaq 0x324464(%rip), %r8     # 0x579f91
movl $0x4a0, %r9d            # imm = 0x4A0
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x255b41
movq 0x20(%rsp), %rax
testb $0x1, 0xc8(%rax)
je 0x255b5a
movq 0x10(%rsp), %rax
movb $0x0, 0x50(%rax)
jmp 0x255b6b
movq 0x20(%rsp), %rax
movq 0x30(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x30(%rax)
movq 0x20(%rsp), %rax
movq 0xd8(%rax), %rax
movb 0x18(%rax), %dl
leaq 0xd6f(%rip), %rax       # 0x2568f0
leaq 0xa08(%rip), %rcx       # 0x256590
testb $0x1, %dl
cmovneq %rcx, %rax
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq *%rax
jmp 0x255982
movq 0x18(%rsp), %rax
cmpq $0x0, 0x18(%rax)
je 0x255bdc
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rsp), %rcx
movq 0x140(%rcx), %rdi
movq 0x20(%rsp), %rsi
movq 0x20(%rsp), %rcx
movq 0xd0(%rcx), %rdx
movq 0x20(%rsp), %rcx
movq (%rcx), %rcx
callq *%rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)