// File: /workspace/github_c_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpq $0x29, (%rsi)
jae 0x1b2c14
movq %rsi, %r14
movq %rdi, %rbx
xorl %r15d, %r15d
movq %r15, 0x128(%rdi)
movq %r15, 0x30(%rdi)
callq 0x1b32ab
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movq 0xd8(%rbx), %rcx
movzbl 0x18(%rcx), %edx
xorq $0x1, %rdx
addq 0x8(%rcx), %rdx
movq %rdx, 0x10(%rax)
movq %r15, 0x18(%rax)
cmpb $0x1, 0xc8(%rbx)
jne 0x1b2a78
movq $0x0, 0x58(%rax)
movb $0x1, 0x50(%rax)
movq 0x28(%r14), %rcx
testq %rcx, %rcx
je 0x1b2a8d
addq $0x28, %rax
movq (%rbx), %rsi
movq %rax, %rdi
callq *%rcx
movq 0x30(%rbx), %rax
testq %rax, %rax
je 0x1b2bce
leaq 0x38(%rbx), %rcx
movq %rcx, 0x8(%rsp)
leaq 0x60(%rbx), %rcx
movq %rcx, 0x10(%rsp)
leaq 0x4a6(%rip), %rbp       # 0x1b2f59
leaq 0x625(%rip), %r15       # 0x1b30df
movq 0x20(%rbx), %rdx
testq %rdx, %rdx
je 0x1b2c0a
movb 0xc8(%rbx), %cl
leaq (%rax,%rax,2), %rsi
decq %rax
shlq $0x5, %rsi
leaq (%rdx,%rsi), %r13
addq $-0x60, %r13
testb %cl, %cl
je 0x1b2afe
cmpb $0x1, 0x50(%r13)
je 0x1b2b35
movq %rax, 0x30(%rbx)
addq $-0x60, %r13
addq $-0x1, %rax
jb 0x1b2ae0
jmp 0x1b2bce
cmpq $0x0, 0x40(%r14)
je 0x1b2b3e
movq 0x20(%r13), %rax
movq 0x8(%rsp), %rcx
movq %rax, 0x20(%rcx)
movups (%r13), %xmm0
movups 0x10(%r13), %xmm1
movups %xmm1, 0x10(%rcx)
movups %xmm0, (%rcx)
leaq 0x28(%r13), %rsi
movq (%rbx), %rdx
movq 0x10(%rsp), %rdi
callq *0x40(%r14)
jmp 0x1b2b4e
movq %rax, 0xc0(%rbx)
jmp 0x1b2b4e
movl $0xc, %ecx
movq 0x8(%rsp), %rdi
movq %r13, %rsi
rep  movsq (%rsi), %es:(%rdi)
movq %rbx, %rdi
callq 0x1b2f09
cmpq $0x0, (%rax)
je 0x1b2b87
movq %rbx, %rdi
callq 0x1b2f09
movq %rbp, %r12
movq (%rax), %rbp
decq %rbp
movq %rbx, %rdi
callq 0x1b2f09
movzbl 0x20(%rax), %edx
movq %rbx, %rdi
movq %rbp, %rsi
movq %r12, %rbp
callq 0x1b2f3a
movq 0x30(%rbx), %rax
testq %rax, %rax
je 0x1b2c0f
cmpb $0x1, 0xc8(%rbx)
jne 0x1b2ba0
movb $0x0, 0x50(%r13)
jmp 0x1b2ba7
decq %rax
movq %rax, 0x30(%rbx)
movq 0xd8(%rbx), %rax
cmpb $0x0, 0x18(%rax)
movq %r15, %rax
cmovneq %rbp, %rax
movq %rbx, %rdi
movq %r14, %rsi
callq *%rax
movq 0x30(%rbx), %rax
testq %rax, %rax
jne 0x1b2aba
movq 0x18(%r14), %rax
testq %rax, %rax
je 0x1b2bfb
movq 0x140(%rbx), %rdi
movq (%rbx), %rcx
movq 0xd0(%rbx), %rdx
movq %rbx, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x654a4
callq 0x6546b
callq 0x65432