// File: /workspace/github_c_makefile_star2_O1/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
pushq %rax
cmpq $0x29, (%rsi)
jae 0x1bb7c1
movq %rsi, %r14
movq %rdi, %rbx
xorl %r15d, %r15d
movq %r15, 0x128(%rdi)
movq %r15, 0x30(%rdi)
callq 0x1bbe67
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 0x1bb642
movq $0x0, 0x58(%rax)
movb $0x1, 0x50(%rax)
movq 0x28(%r14), %rcx
testq %rcx, %rcx
je 0x1bb657
addq $0x28, %rax
movq (%rbx), %rsi
movq %rax, %rdi
callq *%rcx
movq 0x30(%rbx), %rax
testq %rax, %rax
je 0x1bb77b
leaq 0x38(%rbx), %r15
leaq 0x60(%rbx), %rcx
movq %rcx, (%rsp)
leaq 0x629(%rip), %r12       # 0x1bbca0
movq 0x20(%rbx), %rcx
testq %rcx, %rcx
je 0x1bb7b7
leaq (%rax,%rax,2), %rdx
shlq $0x5, %rdx
leaq (%rcx,%rdx), %rbp
cmpb $0x1, 0xc8(%rbx)
jne 0x1bb6ab
decq %rax
cmpb $0x1, -0x10(%rbp)
jne 0x1bb6e3
movq %rax, 0xc0(%rbx)
jmp 0x1bb6f7
leaq (%rcx,%rdx), %rsi
addq $-0x60, %rsi
cmpq $0x0, 0x40(%r14)
je 0x1bb6ec
movq 0x20(%rsi), %rax
movq %rax, 0x20(%r15)
movups (%rsi), %xmm0
movups 0x10(%rsi), %xmm1
movups %xmm1, 0x10(%r15)
movups %xmm0, (%r15)
leaq -0x38(%rbp), %rsi
movq (%rbx), %rdx
movq (%rsp), %rdi
callq *0x40(%r14)
jmp 0x1bb6f7
movq %rax, 0x30(%rbx)
jmp 0x1bb76e
movl $0xc, %ecx
movq %r15, %rdi
rep  movsq (%rsi), %es:(%rdi)
movq %rbx, %rdi
callq 0x1bbabe
cmpq $0x0, (%rax)
je 0x1bb72a
movq %rbx, %rdi
callq 0x1bbabe
movq (%rax), %r13
decq %r13
movq %rbx, %rdi
callq 0x1bbabe
movzbl 0x20(%rax), %edx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x1bbaff
movq 0x30(%rbx), %rax
testq %rax, %rax
je 0x1bb7bc
cmpb $0x1, 0xc8(%rbx)
jne 0x1bb746
movb $0x0, -0x10(%rbp)
jmp 0x1bb74d
decq %rax
movq %rax, 0x30(%rbx)
movq 0xd8(%rbx), %rax
cmpb $0x0, 0x18(%rax)
movq %r12, %rax
leaq 0x3bc(%rip), %rcx       # 0x1bbb1e
cmovneq %rcx, %rax
movq %rbx, %rdi
movq %r14, %rsi
callq *%rax
movq 0x30(%rbx), %rax
testq %rax, %rax
jne 0x1bb677
movq 0x18(%r14), %rax
testq %rax, %rax
je 0x1bb7a8
movq 0x140(%rbx), %rdi
movq (%rbx), %rcx
movq 0xd0(%rbx), %rdx
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x66c63
callq 0x66c2a
callq 0x66bf1