// File: /workspace/github_c_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %r14
movl %r8d, %ebp
movl %ecx, %r15d
movq %rdx, %r13
movl %esi, %r12d
movl %edi, 0x14(%rsp)
movl %r8d, %ecx
callq 0x18b3d1
movq %rax, %rbx
movb $0x1, 0xa0(%rax)
testl %r15d, %r15d
je 0x18b150
movq 0x58(%rbx), %rdx
testq %rdx, %rdx
je 0x18b150
decq %rdx
cmpq $0xfffffff, %rdx        # imm = 0xFFFFFFF
jbe 0x18b150
movq 0x60(%rsp), %rdi
leaq 0x21325a(%rip), %rsi    # 0x39e38f
movl $0x1c, %ecx
xorl %eax, %eax
callq 0xfcb67
movq %rbx, %rdi
callq 0x18b533
xorl %ebx, %ebx
jmp 0x18b3ba
movq 0x58(%rbx), %rax
cmpb $0x1, 0xa2(%rbx)
jne 0x18b1ba
leaq 0x8(,%rax,8), %r15
leaq 0x2131ba(%rip), %rsi    # 0x39e326
movq %r15, %rdi
movl $0x1da, %edx            # imm = 0x1DA
callq 0x104226
movq %rax, 0x8(%rbx)
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x173a0
testb %bpl, %bpl
je 0x18b2f7
movq %r13, 0x8(%rsp)
movq 0x60(%rbx), %r13
shlq $0x3, %r13
leaq 0x21317f(%rip), %rsi    # 0x39e326
movq %r13, %rdi
movl $0x1e0, %edx            # imm = 0x1E0
callq 0x104226
movq %rax, 0x20(%rbx)
jmp 0x18b214
leaq 0x4(,%rax,4), %r15
leaq 0x21315d(%rip), %rsi    # 0x39e326
movq %r15, %rdi
movl $0x1e7, %edx            # imm = 0x1E7
callq 0x104226
movq %rax, (%rbx)
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x173a0
testb %bpl, %bpl
je 0x18b2f7
movq %r13, 0x8(%rsp)
movq 0x60(%rbx), %r13
shlq $0x2, %r13
leaq 0x213123(%rip), %rsi    # 0x39e326
movq %r13, %rdi
movl $0x1ed, %edx            # imm = 0x1ED
callq 0x104226
movq %rax, 0x10(%rbx)
movq %rax, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x173a0
leaq 0x2131c7(%rip), %rsi    # 0x39e3ef
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x103fe1
leaq 0x2131d1(%rip), %rsi    # 0x39e40d
movq %r14, %rdi
movq %r13, %rdx
xorl %eax, %eax
callq 0x103fe1
cmpb $0x0, 0xa1(%rbx)
je 0x18b3cc
cmpl $0x3, %r12d
movq 0x8(%rsp), %r13
jb 0x18b393
cmpq $0x0, 0x40(%rbx)
je 0x18b393
movq %r14, 0x18(%rsp)
leal -0x1(%r12), %r15d
leaq (,%r15,8), %rdi
cmpb $0x1, 0xa2(%rbx)
jne 0x18b309
leaq 0x213094(%rip), %r13    # 0x39e326
movq %r13, %rsi
movl $0x179, %edx            # imm = 0x179
callq 0x104226
movq %rax, 0x28(%rbx)
movq 0x40(%rbx), %r14
shlq $0x3, %r14
movq %r14, %rdi
movq %r13, %rsi
movl $0x17b, %edx            # imm = 0x17B
callq 0x104226
movq %rax, %r13
movq %rax, %rdi
xorl %esi, %esi
movq %r14, 0x20(%rsp)
movq %r14, %rdx
callq 0x173a0
movq 0x28(%rbx), %rax
movq 0x70(%rbx), %rcx
movq %r13, (%rax)
movl $0x1, %edx
movq (%rcx,%rdx,8), %rsi
leaq (%r13,%rsi,8), %r13
movq %r13, (%rax,%rdx,8)
incq %rdx
cmpq %rdx, %r15
jne 0x18b2e0
jmp 0x18b373
leaq 0x2130f1(%rip), %rsi    # 0x39e3ef
movq %r14, %rdi
movq %r15, %rdx
jmp 0x18b38c
leaq 0x213016(%rip), %r13    # 0x39e326
movq %r13, %rsi
movl $0x181, %edx            # imm = 0x181
callq 0x104226
movq %rax, 0x18(%rbx)
movq 0x40(%rbx), %r14
shlq $0x2, %r14
movq %r14, %rdi
movq %r13, %rsi
movl $0x183, %edx            # imm = 0x183
callq 0x104226
movq %rax, %r13
movq %rax, %rdi
xorl %esi, %esi
movq %r14, 0x20(%rsp)
movq %r14, %rdx
callq 0x173a0
movq 0x18(%rbx), %rax
movq 0x70(%rbx), %rcx
movq %r13, (%rax)
movl $0x1, %edx
movq (%rcx,%rdx,8), %rsi
leaq (%r13,%rsi,4), %r13
movq %r13, (%rax,%rdx,8)
incq %rdx
cmpq %rdx, %r15
jne 0x18b35e
movq 0x8(%rsp), %r13
movq 0x18(%rsp), %r14
leaq 0x213482(%rip), %rsi    # 0x39e806
movq %r14, %rdi
movq 0x20(%rsp), %rdx
xorl %eax, %eax
callq 0x103fe1
movzbl %bpl, %ecx
movl 0x14(%rsp), %edi
movl %r12d, %esi
movq %r13, %rdx
callq 0x18b00c
leaq 0x213085(%rip), %rsi    # 0x39e432
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x103fe1
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x5ba59