// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/sfx-suffixgetset.c
// Function: gt_suffixsortspace_new_generic
static GtSuffixsortspace *gt_suffixsortspace_new_generic(GtUword numofentries,
                                                  GtUword maxvalue,
                                                  bool useuint,
                                                  void *tab2clone,
                                                  GT_UNUSED GtLogger *logger)
{
  GtSuffixsortspace *suffixsortspace;

  gt_assert(numofentries > 0);
  suffixsortspace = gt_malloc(sizeof (*suffixsortspace));
  suffixsortspace->maxindex = numofentries-1;
  suffixsortspace->maxvalue = maxvalue;
  suffixsortspace->longestidx.defined = false;
  suffixsortspace->longestidx.valueunsignedlong = 0;
  suffixsortspace->exportptr.ulongtabsectionptr = NULL;
  suffixsortspace->exportptr.uinttabsectionptr = NULL;
  suffixsortspace->currentexport = false;
  suffixsortspace->partoffset = 0;
  suffixsortspace->bucketleftidx = 0;
  suffixsortspace->widthrelative2bucketleftidx = 0;
#if defined (_LP64) || defined (_WIN64)
  gt_logger_log(logger,"%s suffix_sort_space: suftab uses %dbit values: "
                       "maxvalue="GT_WU",numofentries="GT_WU,
                       tab2clone == NULL ? "create" : "clone",
                       gt_decide_to_use_uint(useuint,maxvalue) ? 32 : 64,
                       maxvalue,numofentries);
#endif
  if (gt_decide_to_use_uint(useuint,maxvalue))
  {
    if (tab2clone == NULL)
    {
      GtUword sufspacesize
        = gt_safe_mult_ulong_check((GtUword)
                                   sizeof (*suffixsortspace->uinttab),
                                   numofentries,
                                   gt_suffixsortspace_overflow_abort,
                                   &numofentries);
      suffixsortspace->uinttab = gt_malloc((size_t) sufspacesize);
      suffixsortspace->clonenumber = 0;
    } else
    {
      suffixsortspace->uinttab = (uint32_t *) tab2clone;
      suffixsortspace->clonenumber = UINT_MAX; /* undefined */
    }
    suffixsortspace->ulongtab = NULL;
  } else
  {
    if (tab2clone == NULL)
    {
      GtUword sufspacesize
        = gt_safe_mult_ulong_check((GtUword)
                                   sizeof (*suffixsortspace->ulongtab),
                                   numofentries,
                                   gt_suffixsortspace_overflow_abort,
                                   &numofentries);
      suffixsortspace->ulongtab = gt_malloc((size_t) sufspacesize);
      suffixsortspace->clonenumber = 0;
    } else
    {
      suffixsortspace->ulongtab = (GtUword *) tab2clone;
      suffixsortspace->clonenumber = UINT_MAX; /* undefined */
    }
    suffixsortspace->uinttab = NULL;
  }
  return suffixsortspace;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, (%rsp)
testq %rdi, %rdi
je 0x205dfc
movq %r8, %r12
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %r15
leaq 0x1be913(%rip), %rsi    # 0x3c45c8
movl $0x60, %edi
movl $0x63, %edx
callq 0x1092b2
movq %rax, %rbx
movq (%rsp), %r9
leaq -0x1(%r9), %rax
movq %rax, 0x28(%rbx)
movq %r15, 0x30(%rbx)
xorl %eax, %eax
movb %al, 0x8(%rbx)
movb %al, (%rbx)
testq %r14, %r14
leaq 0x17a5ab(%rip), %rcx    # 0x380293
leaq 0x1be916(%rip), %rdx    # 0x3c4605
cmoveq %rcx, %rdx
movq %r15, %rcx
shrq $0x20, %rcx
sete %r13b
andb %bpl, %r13b
movl %r13d, %ecx
xorb $0x1, %cl
movzbl %cl, %ecx
shll $0x5, %ecx
addl $0x20, %ecx
movq %rax, 0x20(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movq %rax, 0x48(%rbx)
movups %xmm0, 0x38(%rbx)
leaq 0x1bee56(%rip), %rsi    # 0x3c4b80
movq %r12, %rdi
movq %r15, %r8
xorl %eax, %eax
callq 0x10906e
cmpb $0x1, %r13b
jne 0x205d8a
movl $0x50, %r15d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl $0x58, %r12d
testq %r14, %r14
jne 0x205ddb
movq %rsp, %r9
movq (%r9), %rsi
leaq 0x1be864(%rip), %r14    # 0x3c45c8
leaq 0x950(%rip), %r8        # 0x2066bb
movl $0x4, %edi
movq %r14, %rdx
movl $0x7e, %ecx
callq 0x118913
movq %rax, %rdi
movq %r14, %rsi
movl $0x7f, %edx
jmp 0x205dd1
movl $0x58, %r15d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl $0x50, %r12d
testq %r14, %r14
jne 0x205ddb
movq %rsp, %r9
movq (%r9), %rsi
leaq 0x1be81b(%rip), %r14    # 0x3c45c8
leaq 0x907(%rip), %r8        # 0x2066bb
movl $0x8, %edi
movq %r14, %rdx
movl $0x90, %ecx
callq 0x118913
movq %rax, %rdi
movq %r14, %rsi
movl $0x91, %edx
callq 0x1092b2
movq %rax, %r14
xorl %eax, %eax
movq %r14, (%rbx,%r12)
movl %eax, 0x4(%rbx)
movq $0x0, (%rbx,%r15)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x7facc