// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/bcktab.c
// Function: gt_bcktab_determinemaxsize
void gt_bcktab_determinemaxsize(GtBcktab *bcktab,
                                GtCodetype mincode,
                                GtCodetype maxcode,
                                GtUword partwidth)
{
  unsigned int rightchar = (unsigned int) (mincode % bcktab->numofchars);
  GtBucketspecification bucketspec;
  GtCodetype code;

#ifdef SKDEBUG
  printf("mincode="GT_WU",maxcode="GT_WU",partwidth="GT_WU",totallength="
         GT_WU"\n", (GtUword) mincode,(GtUword) maxcode, partwidth,totallength);
#endif
  bcktab->maxbucketinfo.specialsmaxbucketsize = 1UL;
  bcktab->maxbucketinfo.nonspecialsmaxbucketsize = 1UL;
  bcktab->maxbucketinfo.maxbucketsize = 1UL;
  for (code = mincode; code <= maxcode; code++)
  {
    rightchar = gt_bcktab_calcboundsparts(&bucketspec,
                                          bcktab,
                                          code,
                                          maxcode,
                                          partwidth,
                                          rightchar);
    if (bucketspec.nonspecialsinbucket >
        bcktab->maxbucketinfo.nonspecialsmaxbucketsize)
    {
      bcktab->maxbucketinfo.nonspecialsmaxbucketsize
        = bucketspec.nonspecialsinbucket;
    }
    if (bucketspec.specialsinbucket >
        bcktab->maxbucketinfo.specialsmaxbucketsize)
    {
      bcktab->maxbucketinfo.specialsmaxbucketsize = bucketspec.specialsinbucket;
    }
    if (bucketspec.nonspecialsinbucket + bucketspec.specialsinbucket
        > bcktab->maxbucketinfo.maxbucketsize)
    {
      bcktab->maxbucketinfo.maxbucketsize = bucketspec.nonspecialsinbucket +
                                            bucketspec.specialsinbucket;
    }
  }
  /*
  gt_logger_log(logger,"maxbucket (specials)="GT_WU"",
              bcktab->maxbucketinfo.specialsmaxbucketsize);
  gt_logger_log(logger,"maxbucket (nonspecials)="GT_WU"",
              bcktab->maxbucketinfo.nonspecialsmaxbucketsize);
  gt_logger_log(logger,"maxbucket (all)="GT_WU"",
              bcktab->maxbucketinfo.maxbucketsize);
  */
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq %rcx, 0x28(%rsp)
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rcx
movl 0x4c(%rcx), %ecx
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, 0x24(%rsp)
movq 0x40(%rsp), %rax
movq $0x1, 0x90(%rax)
movq 0x40(%rsp), %rax
movq $0x1, 0x88(%rax)
movq 0x40(%rsp), %rax
movq $0x1, 0x98(%rax)
movq 0x38(%rsp), %rax
movq %rax, (%rsp)
movq (%rsp), %rax
cmpq 0x30(%rsp), %rax
ja 0x205e87
movq 0x40(%rsp), %rsi
movq (%rsp), %rdx
movq 0x30(%rsp), %rcx
movq 0x28(%rsp), %r8
movl 0x24(%rsp), %r9d
leaq 0x8(%rsp), %rdi
callq 0x2058b0
movl %eax, 0x24(%rsp)
movq 0x10(%rsp), %rax
movq 0x40(%rsp), %rcx
cmpq 0x88(%rcx), %rax
jbe 0x205e22
movq 0x10(%rsp), %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x88(%rax)
movq 0x18(%rsp), %rax
movq 0x40(%rsp), %rcx
cmpq 0x90(%rcx), %rax
jbe 0x205e46
movq 0x18(%rsp), %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x90(%rax)
movq 0x10(%rsp), %rax
addq 0x18(%rsp), %rax
movq 0x40(%rsp), %rcx
cmpq 0x98(%rcx), %rax
jbe 0x205e74
movq 0x10(%rsp), %rcx
addq 0x18(%rsp), %rcx
movq 0x40(%rsp), %rax
movq %rcx, 0x98(%rax)
jmp 0x205e76
movq (%rsp), %rax
addq $0x1, %rax
movq %rax, (%rsp)
jmp 0x205dc9
addq $0x48, %rsp
retq
nopl (%rax)