// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/bcktab.c
// Function: gt_bcktab_pfxidx2lcpvalues_uint8
unsigned int gt_bcktab_pfxidx2lcpvalues_uint8(unsigned int *minprefixindex,
                                              uint8_t *smalllcpvalues,
                                              GtUword specialsinbucket,
                                              const GtBcktab *bcktab,
                                              GtCodetype code)
{
  unsigned int prefixindex, maxprefixindex = 0;
  GtUword idx, value, insertpos;
  GtCodetype ordercode, divisor;

  gt_assert(smalllcpvalues != NULL);
  *minprefixindex = bcktab->prefixlength;
  insertpos = specialsinbucket;
  for (prefixindex=1U; prefixindex<bcktab->prefixlength-1; prefixindex++)
  {
    if (code >= bcktab->filltable[prefixindex])
    {
      ordercode = code - bcktab->filltable[prefixindex];
      divisor = bcktab->filltable[prefixindex] + 1;
      if (ordercode % divisor == 0)
      {
        ordercode /= divisor;
        value = gt_bcktab_distpfxidx_get(bcktab,prefixindex-1,ordercode);
        if (value > 0)
        {
          maxprefixindex = prefixindex;
          if (*minprefixindex > prefixindex)
          {
            *minprefixindex = prefixindex;
          }
          for (idx=0; idx < value; idx++)
          {
            gt_assert(insertpos > 0);
            smalllcpvalues[--insertpos] = (uint8_t) prefixindex;
          }
        }
      }
    }
  }
  if (insertpos > 0)
  {
    maxprefixindex = bcktab->prefixlength-1;
    if (*minprefixindex == bcktab->prefixlength)
    {
      *minprefixindex = bcktab->prefixlength-1;
    }
    while (insertpos > 0)
    {
      smalllcpvalues[--insertpos] = (uint8_t) (bcktab->prefixlength-1);
    }
  }
  return maxprefixindex;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x30(%rsp)
movl $0x0, 0x28(%rsp)
cmpq $0x0, 0x48(%rsp)
jne 0x206125
movq 0x435eac(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x30ff15(%rip), %rsi    # 0x516013
leaq 0x36b05e(%rip), %rdx    # 0x571163
leaq 0x36b06e(%rip), %rcx    # 0x57117a
leaq 0x36acff(%rip), %r8     # 0x570e12
movl $0x482, %r9d            # imm = 0x482
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x206127
movq 0x38(%rsp), %rax
movl 0x48(%rax), %ecx
movq 0x50(%rsp), %rax
movl %ecx, (%rax)
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
movl $0x1, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
movq 0x38(%rsp), %rcx
movl 0x48(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jae 0x2062c1
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rcx
movq 0x78(%rcx), %rcx
movl 0x2c(%rsp), %edx
cmpq (%rcx,%rdx,8), %rax
jb 0x2062af
movq 0x30(%rsp), %rax
movq 0x38(%rsp), %rcx
movq 0x78(%rcx), %rcx
movl 0x2c(%rsp), %edx
subq (%rcx,%rdx,8), %rax
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rax
movq 0x78(%rax), %rax
movl 0x2c(%rsp), %ecx
movq (%rax,%rcx,8), %rax
addq $0x1, %rax
movq %rax, (%rsp)
movq 0x8(%rsp), %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq (%rsp)
cmpq $0x0, %rdx
jne 0x2062ad
movq (%rsp), %rcx
movq 0x8(%rsp), %rax
xorl %edx, %edx
divq %rcx
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rdi
movl 0x2c(%rsp), %esi
subl $0x1, %esi
movq 0x8(%rsp), %rdx
callq 0x205140
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jbe 0x2062ab
movl 0x2c(%rsp), %eax
movl %eax, 0x28(%rsp)
movq 0x50(%rsp), %rax
movl (%rax), %eax
cmpl 0x2c(%rsp), %eax
jbe 0x206220
movl 0x2c(%rsp), %ecx
movq 0x50(%rsp), %rax
movl %ecx, (%rax)
movq $0x0, 0x20(%rsp)
movq 0x20(%rsp), %rax
cmpq 0x18(%rsp), %rax
jae 0x2062a9
jmp 0x206237
cmpq $0x0, 0x10(%rsp)
ja 0x206277
movq 0x435d5a(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x30fdc3(%rip), %rsi    # 0x516013
leaq 0x36af44(%rip), %rdx    # 0x57119b
leaq 0x36af1c(%rip), %rcx    # 0x57117a
leaq 0x36abad(%rip), %r8     # 0x570e12
movl $0x498, %r9d            # imm = 0x498
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x206279
movl 0x2c(%rsp), %eax
movb %al, %dl
movq 0x48(%rsp), %rax
movq 0x10(%rsp), %rcx
movq %rcx, %rsi
addq $-0x1, %rsi
movq %rsi, 0x10(%rsp)
movb %dl, -0x1(%rax,%rcx)
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0x206229
jmp 0x2062ab
jmp 0x2062ad
jmp 0x2062af
jmp 0x2062b1
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x206148
cmpq $0x0, 0x10(%rsp)
jbe 0x206330
movq 0x38(%rsp), %rax
movl 0x48(%rax), %eax
subl $0x1, %eax
movl %eax, 0x28(%rsp)
movq 0x50(%rsp), %rax
movl (%rax), %eax
movq 0x38(%rsp), %rcx
cmpl 0x48(%rcx), %eax
jne 0x2062fb
movq 0x38(%rsp), %rax
movl 0x48(%rax), %ecx
subl $0x1, %ecx
movq 0x50(%rsp), %rax
movl %ecx, (%rax)
jmp 0x2062fd
cmpq $0x0, 0x10(%rsp)
jbe 0x20632e
movq 0x38(%rsp), %rax
movl 0x48(%rax), %eax
subl $0x1, %eax
movb %al, %dl
movq 0x48(%rsp), %rax
movq 0x10(%rsp), %rcx
movq %rcx, %rsi
addq $-0x1, %rsi
movq %rsi, 0x10(%rsp)
movb %dl, -0x1(%rax,%rcx)
jmp 0x2062fd
jmp 0x206330
movl 0x28(%rsp), %eax
addq $0x58, %rsp
retq
nopl (%rax)