// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/bcktab.c
// Function: gt_bcktab_new
GtBcktab *gt_bcktab_new(unsigned int numofchars,
                        unsigned int prefixlength,
                        GtUword maxvalue,
                        bool storespecialcodes,
                        bool withspecialsuffixes,
                        GtLogger *logger,
                        GtError *err)
{
  GtBcktab *bcktab;
  bool haserr = false;

  bcktab = gt_bcktab_new_withinit(numofchars,prefixlength,maxvalue,
                                  withspecialsuffixes);
  bcktab->allocated = true;
  if (storespecialcodes && bcktab->numofallcodes > 0 &&
      bcktab->numofallcodes-1 > (GtUword) GT_MAXCODEVALUE)
  {
    gt_error_set(err,"alphasize^prefixlength-1 = " FormatGtCodetype
                     " does not fit into %u"
                     " bits: choose smaller value for prefixlength",
                     bcktab->numofallcodes-1,
                     GT_CODEBITS);
    haserr = true;
  }
  if (!haserr)
  {
    size_t allocsize_bounds, allocsize_countspecialcodes = 0;
    if (bcktab->useulong)
    {
      allocsize_bounds = sizeof (*bcktab->leftborder.ulongbounds) *
                         (bcktab->numofallcodes+1);
      bcktab->leftborder.ulongbounds = gt_malloc(allocsize_bounds);
      memset(bcktab->leftborder.ulongbounds,0,allocsize_bounds);
      if (withspecialsuffixes)
      {
        allocsize_countspecialcodes = sizeof (*bcktab->ulongcountspecialcodes) *
                                      bcktab->numofspecialcodes;
        bcktab->ulongcountspecialcodes = gt_malloc(allocsize_countspecialcodes);
        memset(bcktab->ulongcountspecialcodes,0,allocsize_countspecialcodes);
      }
    } else
    {
      allocsize_bounds = sizeof (*bcktab->leftborder.uintbounds) *
                         (bcktab->numofallcodes+1);
      bcktab->leftborder.uintbounds = gt_malloc(allocsize_bounds);
      memset(bcktab->leftborder.uintbounds,0,allocsize_bounds);
      if (withspecialsuffixes)
      {
        allocsize_countspecialcodes = sizeof (*bcktab->uintcountspecialcodes) *
                                      bcktab->numofspecialcodes;
        bcktab->uintcountspecialcodes = gt_malloc(allocsize_countspecialcodes);
        memset(bcktab->uintcountspecialcodes,0,allocsize_countspecialcodes);
      }
    }
    gt_logger_log(logger,"sizeof (leftborder)="GT_WU" bytes",
                (GtUword) allocsize_bounds);
    if (withspecialsuffixes)
    {
      gt_logger_log(logger,"sizeof (countspecialcodes)="GT_WU" bytes",
                (GtUword) allocsize_countspecialcodes);
      allocdistpfxidxcounts(bcktab,prefixlength,logger);
    }
    gt_logger_log(logger,"sizeof (bcktab)=" Formatuint64_t " bytes",
              PRINTuint64_tcast(gt_bcktab_sizeoftable(numofchars,
                                                      prefixlength,
                                                      maxvalue,
                                                      withspecialsuffixes)));
  }
  if (haserr)
  {
    gt_bcktab_delete(bcktab);
    return NULL;
  }
  return bcktab;
}

// Assembly:
subq $0x58, %rsp
movb %r8b, %al
movq 0x60(%rsp), %r8
movl %edi, 0x4c(%rsp)
movl %esi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
andb $0x1, %cl
movb %cl, 0x3f(%rsp)
andb $0x1, %al
movb %al, 0x3e(%rsp)
movq %r9, 0x30(%rsp)
movb $0x0, 0x27(%rsp)
movl 0x4c(%rsp), %edi
movl 0x48(%rsp), %esi
movq 0x40(%rsp), %rdx
movb 0x3e(%rsp), %al
andb $0x1, %al
movzbl %al, %ecx
callq 0x2040d0
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movb $0x1, 0xa0(%rax)
testb $0x1, 0x3f(%rsp)
je 0x203eae
movq 0x28(%rsp), %rax
cmpq $0x0, 0x58(%rax)
jbe 0x203eae
movq 0x28(%rsp), %rax
movq 0x58(%rax), %rax
subq $0x1, %rax
cmpq $0xfffffff, %rax        # imm = 0xFFFFFFF
jbe 0x203eae
movq 0x60(%rsp), %rdi
movq 0x28(%rsp), %rax
movq 0x58(%rax), %rdx
subq $0x1, %rdx
leaq 0x36cfde(%rip), %rsi    # 0x570e7b
movl $0x1c, %ecx
movb $0x0, %al
callq 0xd88c0
movb $0x1, 0x27(%rsp)
testb $0x1, 0x27(%rsp)
jne 0x204098
movq $0x0, 0x10(%rsp)
movq 0x28(%rsp), %rax
testb $0x1, 0xa2(%rax)
je 0x203f76
movq 0x28(%rsp), %rax
movq 0x58(%rax), %rax
addq $0x1, %rax
shlq $0x3, %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
leaq 0x36cf1c(%rip), %rsi    # 0x570e12
movl $0x1da, %edx            # imm = 0x1DA
callq 0xe80f0
movq %rax, %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x28(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x18(%rsp), %rdx
xorl %esi, %esi
callq 0x19360
testb $0x1, 0x3e(%rsp)
je 0x203f71
movq 0x28(%rsp), %rax
movq 0x60(%rax), %rax
shlq $0x3, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
leaq 0x36cecc(%rip), %rsi    # 0x570e12
movl $0x1e0, %edx            # imm = 0x1E0
callq 0xe80f0
movq %rax, %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x28(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x10(%rsp), %rdx
xorl %esi, %esi
callq 0x19360
jmp 0x204013
movq 0x28(%rsp), %rax
movq 0x58(%rax), %rax
addq $0x1, %rax
shlq $0x2, %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
leaq 0x36ce7a(%rip), %rsi    # 0x570e12
movl $0x1e7, %edx            # imm = 0x1E7
callq 0xe80f0
movq %rax, %rcx
movq 0x28(%rsp), %rax
movq %rcx, (%rax)
movq 0x28(%rsp), %rax
movq (%rax), %rdi
movq 0x18(%rsp), %rdx
xorl %esi, %esi
callq 0x19360
testb $0x1, 0x3e(%rsp)
je 0x204011
movq 0x28(%rsp), %rax
movq 0x60(%rax), %rax
shlq $0x2, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
leaq 0x36ce2c(%rip), %rsi    # 0x570e12
movl $0x1ed, %edx            # imm = 0x1ED
callq 0xe80f0
movq %rax, %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x10(%rsp), %rdx
xorl %esi, %esi
callq 0x19360
jmp 0x204013
movq 0x30(%rsp), %rdi
movq 0x18(%rsp), %rdx
leaq 0x36ceb7(%rip), %rsi    # 0x570edb
movb $0x0, %al
callq 0xe7cd0
testb $0x1, 0x3e(%rsp)
je 0x20405d
movq 0x30(%rsp), %rdi
movq 0x10(%rsp), %rdx
leaq 0x36ceb6(%rip), %rsi    # 0x570ef9
movb $0x0, %al
callq 0xe7cd0
movq 0x28(%rsp), %rdi
movl 0x48(%rsp), %esi
movq 0x30(%rsp), %rdx
callq 0x204380
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x4c(%rsp), %edi
movl 0x48(%rsp), %esi
movq 0x40(%rsp), %rdx
movb 0x3e(%rsp), %al
andb $0x1, %al
movzbl %al, %ecx
callq 0x203b80
movq 0x8(%rsp), %rdi
movq %rax, %rdx
leaq 0x36ce8d(%rip), %rsi    # 0x570f1e
movb $0x0, %al
callq 0xe7cd0
testb $0x1, 0x27(%rsp)
je 0x2040b4
movq 0x28(%rsp), %rdi
callq 0x204540
movq $0x0, 0x50(%rsp)
jmp 0x2040be
movq 0x28(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
addq $0x58, %rsp
retq
nopl (%rax,%rax)