// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/sfx-bltrie.c
// Function: blindtrie_enumeratetrieleaves
static GtUword blindtrie_enumeratetrieleaves (
                           GtBlindtrie *blindtrie,
                           GtUword subbucketleft,
                           GtUword offset,
                           GtUword sortmaxdepth,
                           GtLcpvalues *tableoflcpvalues,
                           GtProcessunsortedsuffixrange
                             processunsortedsuffixrange,
                           void *processunsortedsuffixrangeinfo)
{
  bool readyforpop = false, currentnodeisleaf;
  GtBlindtriesnodeptr currentnode, siblval, lcpnode = GT_BLINDTRIE_ROOTIDX;
  GtUword nextfree = 0, equalsrangewidth = 0, lcpnodedepth,
                bucketleftidxplussubbucketleft;

  blindtrie->stack.nextfreeGtBlindtriesnodeptr = 0;
  GT_STOREINARRAY (&blindtrie->stack, GtBlindtriesnodeptr, 128,
                  GT_BLINDTRIE_ROOTIDX);
  BLINDTRIE_SETCURRENTNODE(blindtrie_firstchild_get(blindtrie,
                           GT_BLINDTRIE_ROOTIDX));
  bucketleftidxplussubbucketleft
    = gt_suffixsortspace_bucketleftidx_get(blindtrie->sssp) + subbucketleft;
  for (;;)
  {
    lcpnodedepth = blindtrie_getdepth(blindtrie,lcpnode);
    if (currentnodeisleaf)
    {
      if (nextfree > 0)
      {
        if (tableoflcpvalues != NULL)
        {
          gt_lcptab_update(tableoflcpvalues,subbucketleft,nextfree,
                           lcpnodedepth + offset);
        }
        if (sortmaxdepth > 0)
        {
          if (lcpnodedepth + offset == sortmaxdepth)
          {
            equalsrangewidth++;
          } else
          {
            gt_assert(lcpnodedepth + offset < sortmaxdepth);
            if (equalsrangewidth > 0)
            {
              if (processunsortedsuffixrange != NULL)
              {
                processunsortedsuffixrange(
                               processunsortedsuffixrangeinfo,
                               blindtrie->sssp,
                               bucketleftidxplussubbucketleft
                                 + nextfree - 1 - equalsrangewidth,
                               equalsrangewidth + 1,
                               sortmaxdepth);
              }
              equalsrangewidth = 0;
            }
          }
        }
      }
      blindtrie_suffixout(blindtrie,subbucketleft,offset,nextfree,
                          blindtrie_nodestartpos_get(blindtrie,currentnode));
      nextfree++;
      siblval = blindtrie_rightsibling_get(blindtrie,currentnode);
      if (siblval == GT_BLINDTRIE_REFNULL)
      {
        readyforpop = true;
        currentnodeisleaf = false; /* STATE 1 */
      } else
      {
        BLINDTRIE_SETCURRENTNODE(siblval);  /* current comes from brother */
        lcpnode = blindtrie->stack.spaceGtBlindtriesnodeptr[
                             blindtrie->stack.nextfreeGtBlindtriesnodeptr-1];
      }
    } else
    {
      if (readyforpop)
      {
        if (blindtrie->stack.nextfreeGtBlindtriesnodeptr == 1UL)
        {
          break;
        }
        blindtrie->stack.nextfreeGtBlindtriesnodeptr--;
        siblval = blindtrie_rightsibling_get(blindtrie,
                       blindtrie->stack.spaceGtBlindtriesnodeptr[
                       blindtrie->stack.nextfreeGtBlindtriesnodeptr]);
        if (siblval != GT_BLINDTRIE_REFNULL)
        {
          BLINDTRIE_SETCURRENTNODE(siblval);   /* current comes from brother */
          lcpnode = blindtrie->stack.spaceGtBlindtriesnodeptr[
                             blindtrie->stack.nextfreeGtBlindtriesnodeptr - 1];
          readyforpop = false;
        }
      } else
      {
        GT_STOREINARRAY (&blindtrie->stack, GtBlindtriesnodeptr, 128,
                         currentnode);
        BLINDTRIE_SETCURRENTNODE(blindtrie_firstchild_get(blindtrie,
                                                          currentnode));
      }
    }
  }
  if (nextfree > 0 && equalsrangewidth > 0 &&
      processunsortedsuffixrange != NULL)
  {
    processunsortedsuffixrange(processunsortedsuffixrangeinfo,
                               blindtrie->sssp,
                               bucketleftidxplussubbucketleft
                                 + nextfree - 1 - equalsrangewidth,
                               equalsrangewidth + 1,
                               sortmaxdepth);
  }
  return nextfree;
}

// Assembly:
subq $0xa8, %rsp
movq 0xb0(%rsp), %rax
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movq %rdx, 0x90(%rsp)
movq %rcx, 0x88(%rsp)
movq %r8, 0x80(%rsp)
movq %r9, 0x78(%rsp)
movb $0x0, 0x77(%rsp)
movl $0x0, 0x68(%rsp)
movq $0x0, 0x60(%rsp)
movq $0x0, 0x58(%rsp)
movq 0xa0(%rsp), %rax
movq $0x0, 0x20(%rax)
jmp 0x2b97bd
movq 0xa0(%rsp), %rax
movq 0x20(%rax), %rax
addq $0x0, %rax
movq 0xa0(%rsp), %rcx
cmpq 0x18(%rcx), %rax
jb 0x2b987c
movq $0x80, 0x40(%rsp)
xorl %eax, %eax
cmpq 0x40(%rsp), %rax
jbe 0x2b9829
movq 0x3827a8(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x25c811(%rip), %rsi    # 0x516013
leaq 0x25f99e(%rip), %rdx    # 0x5191a7
leaq 0x2cf4e3(%rip), %rcx    # 0x588cf3
leaq 0x2cf35c(%rip), %r8     # 0x588b73
movl $0x31c, %r9d            # imm = 0x31C
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2b982b
movq 0x40(%rsp), %rcx
movq 0xa0(%rsp), %rax
addq 0x18(%rax), %rcx
movq %rcx, 0x18(%rax)
movq 0xa0(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0xa0(%rsp), %rax
movq 0x18(%rax), %rsi
shlq $0x2, %rsi
leaq 0x2cf310(%rip), %rdx    # 0x588b73
movl $0x31c, %ecx            # imm = 0x31C
callq 0xe8540
movq %rax, %rcx
movq 0xa0(%rsp), %rax
movq %rcx, 0x10(%rax)
jmp 0x2b987e
movq 0xa0(%rsp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x2b98c5
movq 0x38270c(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x25c775(%rip), %rsi    # 0x516013
leaq 0x2cf46c(%rip), %rdx    # 0x588d11
leaq 0x2cf447(%rip), %rcx    # 0x588cf3
leaq 0x2cf2c0(%rip), %r8     # 0x588b73
movl $0x31c, %r9d            # imm = 0x31C
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2b98c7
jmp 0x2b98c9
movq 0xa0(%rsp), %rax
movq 0x10(%rax), %rax
movq 0xa0(%rsp), %rdx
movq 0x20(%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x20(%rdx)
movl $0x0, (%rax,%rcx,4)
movq 0xa0(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0xa0(%rsp), %rdi
xorl %esi, %esi
callq 0x2b9f60
movq 0x30(%rsp), %rdi
movl %eax, %esi
callq 0x2b9080
movb %al, %dl
xorl %eax, %eax
movl $0x1, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, 0x76(%rsp)
movq 0xa0(%rsp), %rdi
xorl %esi, %esi
callq 0x2b9f60
movl %eax, 0x70(%rsp)
movq 0xa0(%rsp), %rax
movq 0x90(%rax), %rdi
callq 0x2ea3a0
addq 0x98(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0xa0(%rsp), %rdi
movl 0x68(%rsp), %esi
callq 0x2b9fe0
movq %rax, 0x50(%rsp)
testb $0x1, 0x76(%rsp)
je 0x2b9ba6
cmpq $0x0, 0x60(%rsp)
jbe 0x2b9ab6
cmpq $0x0, 0x80(%rsp)
je 0x2b99c9
movq 0x80(%rsp), %rdi
movq 0x98(%rsp), %rsi
movq 0x60(%rsp), %rdx
movq 0x50(%rsp), %rcx
addq 0x90(%rsp), %rcx
callq 0x2ba060
cmpq $0x0, 0x88(%rsp)
jbe 0x2b9ab4
movq 0x50(%rsp), %rax
addq 0x90(%rsp), %rax
cmpq 0x88(%rsp), %rax
jne 0x2b9a02
movq 0x58(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x58(%rsp)
jmp 0x2b9ab2
jmp 0x2b9a04
movq 0x50(%rsp), %rax
addq 0x90(%rsp), %rax
cmpq 0x88(%rsp), %rax
jb 0x2b9a53
movq 0x38257e(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x25c5e7(%rip), %rsi    # 0x516013
leaq 0x2cf314(%rip), %rdx    # 0x588d47
leaq 0x2cf2b9(%rip), %rcx    # 0x588cf3
leaq 0x2cf132(%rip), %r8     # 0x588b73
movl $0x334, %r9d            # imm = 0x334
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2b9a55
cmpq $0x0, 0x58(%rsp)
jbe 0x2b9ab0
cmpq $0x0, 0x78(%rsp)
je 0x2b9aa7
movq 0x78(%rsp), %rax
movq 0xb0(%rsp), %rdi
movq 0xa0(%rsp), %rcx
movq 0x90(%rcx), %rsi
movq 0x48(%rsp), %rdx
addq 0x60(%rsp), %rdx
subq $0x1, %rdx
subq 0x58(%rsp), %rdx
movq 0x58(%rsp), %rcx
addq $0x1, %rcx
movq 0x88(%rsp), %r8
callq *%rax
movq $0x0, 0x58(%rsp)
jmp 0x2b9ab2
jmp 0x2b9ab4
jmp 0x2b9ab6
movq 0xa0(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x98(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x90(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0xa0(%rsp), %rdi
movl 0x70(%rsp), %esi
callq 0x2ba220
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq 0x28(%rsp), %rcx
movq %rax, %r8
callq 0x2ba1d0
movq 0x60(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x60(%rsp)
movq 0xa0(%rsp), %rdi
movl 0x70(%rsp), %esi
callq 0x2ba2a0
movl %eax, 0x6c(%rsp)
cmpl $0x0, 0x6c(%rsp)
jne 0x2b9b4a
movb $0x1, 0x77(%rsp)
movb $0x0, 0x76(%rsp)
jmp 0x2b9ba1
movq 0xa0(%rsp), %rdi
movl 0x6c(%rsp), %esi
callq 0x2b9080
movb %al, %dl
xorl %eax, %eax
movl $0x1, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, 0x76(%rsp)
movl 0x6c(%rsp), %eax
movl %eax, 0x70(%rsp)
movq 0xa0(%rsp), %rax
movq 0x10(%rax), %rax
movq 0xa0(%rsp), %rcx
movq 0x20(%rcx), %rcx
subq $0x1, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0x68(%rsp)
jmp 0x2b9e03
testb $0x1, 0x77(%rsp)
je 0x2b9c6d
movq 0xa0(%rsp), %rax
cmpq $0x1, 0x20(%rax)
jne 0x2b9bc5
jmp 0x2b9e08
movq 0xa0(%rsp), %rax
movq 0x20(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x20(%rax)
movq 0xa0(%rsp), %rdi
movq 0xa0(%rsp), %rax
movq 0x10(%rax), %rax
movq 0xa0(%rsp), %rcx
movq 0x20(%rcx), %rcx
movl (%rax,%rcx,4), %esi
callq 0x2ba2a0
movl %eax, 0x6c(%rsp)
cmpl $0x0, 0x6c(%rsp)
je 0x2b9c68
movq 0xa0(%rsp), %rdi
movl 0x6c(%rsp), %esi
callq 0x2b9080
movb %al, %dl
xorl %eax, %eax
movl $0x1, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, 0x76(%rsp)
movl 0x6c(%rsp), %eax
movl %eax, 0x70(%rsp)
movq 0xa0(%rsp), %rax
movq 0x10(%rax), %rax
movq 0xa0(%rsp), %rcx
movq 0x20(%rcx), %rcx
subq $0x1, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0x68(%rsp)
movb $0x0, 0x77(%rsp)
jmp 0x2b9e01
jmp 0x2b9c6f
jmp 0x2b9c71
movq 0xa0(%rsp), %rax
movq 0x20(%rax), %rax
addq $0x0, %rax
movq 0xa0(%rsp), %rcx
cmpq 0x18(%rcx), %rax
jb 0x2b9d30
movq $0x80, 0x38(%rsp)
xorl %eax, %eax
cmpq 0x38(%rsp), %rax
jbe 0x2b9cdd
movq 0x3822f4(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x25c35d(%rip), %rsi    # 0x516013
leaq 0x25f4ea(%rip), %rdx    # 0x5191a7
leaq 0x2cf02f(%rip), %rcx    # 0x588cf3
leaq 0x2ceea8(%rip), %r8     # 0x588b73
movl $0x36a, %r9d            # imm = 0x36A
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2b9cdf
movq 0x38(%rsp), %rcx
movq 0xa0(%rsp), %rax
addq 0x18(%rax), %rcx
movq %rcx, 0x18(%rax)
movq 0xa0(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0xa0(%rsp), %rax
movq 0x18(%rax), %rsi
shlq $0x2, %rsi
leaq 0x2cee5c(%rip), %rdx    # 0x588b73
movl $0x36a, %ecx            # imm = 0x36A
callq 0xe8540
movq %rax, %rcx
movq 0xa0(%rsp), %rax
movq %rcx, 0x10(%rax)
jmp 0x2b9d32
movq 0xa0(%rsp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x2b9d79
movq 0x382258(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x25c2c1(%rip), %rsi    # 0x516013
leaq 0x2cefb8(%rip), %rdx    # 0x588d11
leaq 0x2cef93(%rip), %rcx    # 0x588cf3
leaq 0x2cee0c(%rip), %r8     # 0x588b73
movl $0x36a, %r9d            # imm = 0x36A
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2b9d7b
jmp 0x2b9d7d
movl 0x70(%rsp), %edx
movq 0xa0(%rsp), %rax
movq 0x10(%rax), %rax
movq 0xa0(%rsp), %rsi
movq 0x20(%rsi), %rcx
movq %rcx, %rdi
addq $0x1, %rdi
movq %rdi, 0x20(%rsi)
movl %edx, (%rax,%rcx,4)
movq 0xa0(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0xa0(%rsp), %rdi
movl 0x70(%rsp), %esi
callq 0x2b9f60
movq 0x8(%rsp), %rdi
movl %eax, %esi
callq 0x2b9080
movb %al, %dl
xorl %eax, %eax
movl $0x1, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, 0x76(%rsp)
movq 0xa0(%rsp), %rdi
movl 0x70(%rsp), %esi
callq 0x2b9f60
movl %eax, 0x70(%rsp)
jmp 0x2b9e03
jmp 0x2b996a
cmpq $0x0, 0x60(%rsp)
jbe 0x2b9e62
cmpq $0x0, 0x58(%rsp)
jbe 0x2b9e62
cmpq $0x0, 0x78(%rsp)
je 0x2b9e62
movq 0x78(%rsp), %rax
movq 0xb0(%rsp), %rdi
movq 0xa0(%rsp), %rcx
movq 0x90(%rcx), %rsi
movq 0x48(%rsp), %rdx
addq 0x60(%rsp), %rdx
subq $0x1, %rdx
subq 0x58(%rsp), %rdx
movq 0x58(%rsp), %rcx
addq $0x1, %rcx
movq 0x88(%rsp), %r8
callq *%rax
movq 0x60(%rsp), %rax
addq $0xa8, %rsp
retq
nop