// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/sfx-copysort.c
// Function: fillanysubbuckets
static void fillanysubbuckets(GtBucketspec2 *bucketspec2,
                              const GtBcktab *bcktab)
{
  GtCodetype code2, maxcode;
  unsigned int rightchar = 0, currentchar = 0;
  GtUword rightbound, *specialchardist;

  maxcode = gt_bcktab_numofallcodes(bcktab) - 1;
  bucketspec2->expandfactor
    = (GtCodetype) gt_power_for_small_exponents(bucketspec2->numofchars,
                                                bucketspec2->prefixlength-2);
  bucketspec2->expandfillsum = gt_bcktab_filltable(bcktab,2U);
#ifdef SHOWBUCKETSPEC2
  showexpandcode(bucketspec2,bucketspec2->prefixlength);
#endif
  specialchardist = leftcontextofspecialchardist(bucketspec2->numofchars,
                                                 bucketspec2->encseq,
                                                 bucketspec2->readmode);
  for (code2 = 0; code2 < (GtCodetype) bucketspec2->numofcharssquared; code2++)
  {
    GtCodetype ecode = expandtwocharcode(code2,bucketspec2);
    gt_assert(ecode / bucketspec2->expandfactor == code2);
    rightbound = gt_bcktab_calcrightbounds(bcktab,
                                           ecode,
                                           maxcode,
                                           bucketspec2->partwidth);
    rightchar = (unsigned int) ((code2+1) % bucketspec2->numofchars);
    gt_assert((GtCodetype) currentchar == code2 / bucketspec2->numofchars);
    if (rightchar == 0)
    {
      gt_assert(rightbound >= specialchardist[currentchar]);
      gt_assert((GtCodetype) (bucketspec2->numofchars-1) ==
                code2 % bucketspec2->numofchars);
      bucketspec2->subbuckettab[currentchar]
                               [bucketspec2->numofchars-1].bucketend
        = rightbound - specialchardist[currentchar];
      bucketspec2->superbuckettab[currentchar].bucketend = rightbound;
      currentchar++;
    } else
    {
      gt_assert((GtCodetype) (rightchar-1) == code2 % bucketspec2->numofchars);
      bucketspec2->subbuckettab[currentchar][rightchar-1].bucketend
        = rightbound;
    }
  }
  gt_free(specialchardist);
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movl $0x0, 0x34(%rsp)
movl $0x0, 0x30(%rsp)
movq 0x48(%rsp), %rdi
callq 0x206600
subq $0x1, %rax
movq %rax, 0x38(%rsp)
movq 0x50(%rsp), %rax
movl 0x14(%rax), %edi
movq 0x50(%rsp), %rax
movl 0x1c(%rax), %esi
subl $0x2, %esi
callq 0xec720
movq %rax, %rcx
movq 0x50(%rsp), %rax
movq %rcx, 0x28(%rax)
movq 0x48(%rsp), %rdi
movl $0x2, %esi
callq 0x2065d0
movq %rax, %rcx
movq 0x50(%rsp), %rax
movq %rcx, 0x30(%rax)
movq 0x50(%rsp), %rax
movl 0x14(%rax), %edi
movq 0x50(%rsp), %rax
movq 0x8(%rax), %rsi
movq 0x50(%rsp), %rax
movl 0x10(%rax), %edx
callq 0x2bcce0
movq %rax, 0x20(%rsp)
movq $0x0, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rcx
movl 0x18(%rcx), %ecx
cmpq %rcx, %rax
jae 0x2bbb96
movq 0x40(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0x2bcfa0
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq 0x50(%rsp), %rcx
xorl %edx, %edx
divq 0x28(%rcx)
cmpq 0x40(%rsp), %rax
je 0x2bb925
movq 0x3806ac(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x25a715(%rip), %rsi    # 0x516013
leaq 0x2cdc28(%rip), %rdx    # 0x58952d
leaq 0x2cdc4c(%rip), %rcx    # 0x589558
leaq 0x2cdaf3(%rip), %r8     # 0x589406
movl $0x144, %r9d            # imm = 0x144
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2bb927
movq 0x48(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq 0x50(%rsp), %rax
movq (%rax), %rcx
callq 0x205c70
movq %rax, 0x28(%rsp)
movq 0x40(%rsp), %rax
addq $0x1, %rax
movq 0x50(%rsp), %rcx
movl 0x14(%rcx), %ecx
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, 0x34(%rsp)
movl 0x30(%rsp), %eax
movq %rax, 0x10(%rsp)
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rcx
movl 0x14(%rcx), %ecx
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
je 0x2bb9c4
movq 0x38060d(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x25a676(%rip), %rsi    # 0x516013
leaq 0x2cdbc6(%rip), %rdx    # 0x58956a
leaq 0x2cdbad(%rip), %rcx    # 0x589558
leaq 0x2cda54(%rip), %r8     # 0x589406
movl $0x14a, %r9d            # imm = 0x14A
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2bb9c6
cmpl $0x0, 0x34(%rsp)
jne 0x2bbaf3
jmp 0x2bb9d3
movq 0x28(%rsp), %rax
movq 0x20(%rsp), %rcx
movl 0x30(%rsp), %edx
cmpq (%rcx,%rdx,8), %rax
jae 0x2bba1f
movq 0x3805b2(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x25a61b(%rip), %rsi    # 0x516013
leaq 0x2cdba7(%rip), %rdx    # 0x5895a6
leaq 0x2cdb52(%rip), %rcx    # 0x589558
leaq 0x2cd9f9(%rip), %r8     # 0x589406
movl $0x14d, %r9d            # imm = 0x14D
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2bba21
jmp 0x2bba23
movq 0x50(%rsp), %rax
movl 0x14(%rax), %eax
subl $0x1, %eax
movl %eax, %eax
movq %rax, 0x8(%rsp)
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rcx
movl 0x14(%rcx), %ecx
xorl %edx, %edx
divq %rcx
movq 0x8(%rsp), %rax
cmpq %rdx, %rax
je 0x2bba89
movq 0x380548(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x25a5b1(%rip), %rsi    # 0x516013
leaq 0x2cdb68(%rip), %rdx    # 0x5895d1
leaq 0x2cdae8(%rip), %rcx    # 0x589558
leaq 0x2cd98f(%rip), %r8     # 0x589406
movl $0x14f, %r9d            # imm = 0x14F
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2bba8b
movq 0x28(%rsp), %rcx
movq 0x20(%rsp), %rax
movl 0x30(%rsp), %edx
subq (%rax,%rdx,8), %rcx
movq 0x50(%rsp), %rax
movq 0x40(%rax), %rax
movl 0x30(%rsp), %edx
movq (%rax,%rdx,8), %rax
movq 0x50(%rsp), %rdx
movl 0x14(%rdx), %edx
subl $0x1, %edx
movl %edx, %edx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq 0x28(%rsp), %rcx
movq 0x50(%rsp), %rax
movq 0x38(%rax), %rax
movl 0x30(%rsp), %edx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movl 0x30(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x30(%rsp)
jmp 0x2bbb81
jmp 0x2bbaf5
movl 0x34(%rsp), %eax
subl $0x1, %eax
movl %eax, %eax
movq %rax, (%rsp)
movq 0x40(%rsp), %rax
movq 0x50(%rsp), %rcx
movl 0x14(%rcx), %ecx
xorl %edx, %edx
divq %rcx
movq (%rsp), %rax
cmpq %rdx, %rax
je 0x2bbb55
movq 0x38047c(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x25a4e5(%rip), %rsi    # 0x516013
leaq 0x2cdae8(%rip), %rdx    # 0x58961d
leaq 0x2cda1c(%rip), %rcx    # 0x589558
leaq 0x2cd8c3(%rip), %r8     # 0x589406
movl $0x157, %r9d            # imm = 0x157
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2bbb57
movq 0x28(%rsp), %rcx
movq 0x50(%rsp), %rax
movq 0x40(%rax), %rax
movl 0x30(%rsp), %edx
movq (%rax,%rdx,8), %rax
movl 0x34(%rsp), %edx
subl $0x1, %edx
movl %edx, %edx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
jmp 0x2bbb83
movq 0x40(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x40(%rsp)
jmp 0x2bb8ac
movq 0x20(%rsp), %rdi
leaq 0x2cd864(%rip), %rsi    # 0x589406
movl $0x15c, %edx            # imm = 0x15C
callq 0xe88c0
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)