// File: /workspace/github_c_makefile_star2_O2/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 0x1607b6
movq %rsi, %r14
movq %rdi, %rbx
andq $0x0, 0x128(%rdi)
andq $0x0, 0x30(%rdi)
callq 0x160f4b
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)
andq $0x0, 0x18(%rax)
cmpb $0x1, 0xc8(%rbx)
jne 0x1605c8
andq $0x0, 0x58(%rax)
movb $0x1, 0x50(%rax)
movq 0x28(%r14), %rcx
testq %rcx, %rcx
je 0x1605dd
addq $0x28, %rax
movq (%rbx), %rsi
movq %rax, %rdi
callq *%rcx
leaq 0x38(%rbx), %rax
movq %rax, (%rsp)
leaq 0x60(%rbx), %rax
movq %rax, 0x8(%rsp)
leaq 0x611(%rip), %rbp       # 0x160c06
leaq 0x775(%rip), %r15       # 0x160d71
movq %r14, 0x10(%rsp)
movq 0x30(%rbx), %rax
imulq $0x60, %rax, %r13
decq %rax
addq $-0x60, %r13
cmpq $-0x1, %rax
je 0x160714
movq 0x20(%rbx), %r12
testq %r12, %r12
je 0x160750
cmpb $0x1, 0xc8(%rbx)
jne 0x16063e
cmpb $0x1, 0x50(%r12,%r13)
je 0x160679
movq %rax, 0x30(%rbx)
jmp 0x160609
leaq (%r12,%r13), %rsi
cmpq $0x0, 0x40(%r14)
je 0x160682
movq 0x20(%rsi), %rax
movq (%rsp), %rcx
movq %rax, 0x20(%rcx)
movups (%rsi), %xmm0
movups 0x10(%rsi), %xmm1
movups %xmm1, 0x10(%rcx)
movups %xmm0, (%rcx)
leaq (%r12,%r13), %rsi
addq $0x28, %rsi
movq (%rbx), %rdx
movq 0x8(%rsp), %rdi
callq *0x40(%r14)
jmp 0x16068c
movq %rax, 0xc0(%rbx)
jmp 0x16068c
pushq $0xc
popq %rcx
movq (%rsp), %rdi
rep  movsq (%rsi), %es:(%rdi)
movq %rbx, %rdi
callq 0x160b54
cmpq $0x0, (%rax)
je 0x1606d0
movq %rbx, %rdi
callq 0x160b54
movq %r15, %r14
movq %rbp, %r15
movq (%rax), %rbp
decq %rbp
movq %rbx, %rdi
callq 0x160b54
movzbl 0x20(%rax), %edx
movq %rbx, %rdi
movq %rbp, %rsi
movq %r15, %rbp
movq %r14, %r15
movq 0x10(%rsp), %r14
callq 0x160bb4
movq 0x30(%rbx), %rax
testq %rax, %rax
je 0x160788
cmpb $0x1, 0xc8(%rbx)
jne 0x1606ee
movb $0x0, 0x50(%r12,%r13)
jmp 0x1606f5
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
jmp 0x160601
movq 0x18(%r14), %rax
testq %rax, %rax
je 0x160741
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
movq 0x2d7811(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1848b2(%rip), %rsi    # 0x2e5013
leaq 0x1e76bc(%rip), %rdx    # 0x347e24
leaq 0x1e76ab(%rip), %rcx    # 0x347e1a
leaq 0x1e7342(%rip), %r8     # 0x347ab8
movl $0x477, %r9d            # imm = 0x477
xorl %eax, %eax
callq 0x17a50
callq 0x17390
movq 0x2d77d9(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x18487a(%rip), %rsi    # 0x2e5013
leaq 0x1e76bc(%rip), %rdx    # 0x347e5c
leaq 0x1e7673(%rip), %rcx    # 0x347e1a
leaq 0x1e730a(%rip), %r8     # 0x347ab8
movl $0x4a0, %r9d            # imm = 0x4A0
jmp 0x16077c
movq 0x2d77ab(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x18484c(%rip), %rsi    # 0x2e5013
leaq 0x1e7601(%rip), %rdx    # 0x347dcf
leaq 0x1e7645(%rip), %rcx    # 0x347e1a
leaq 0x1e72dc(%rip), %r8     # 0x347ab8
movl $0x472, %r9d            # imm = 0x472
jmp 0x16077c