// File: /workspace/github_c_makefile_star2_O3/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
subq $0x18, %rsp
movq %r8, 0x10(%rsp)
movq %rdi, 0x8(%rsp)
testq %rdi, %rdi
je 0x1fc6fe
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %r12
movq %rdi, %r15
leaq 0x1be9a6(%rip), %rsi    # 0x3baf58
movl $0x60, %edi
movl $0x63, %edx
callq 0x104226
movq %rax, %rbx
leaq -0x1(%r15), %rax
movq %rax, 0x28(%rbx)
movq %r12, 0x30(%rbx)
xorl %eax, %eax
movb %al, 0x8(%rbx)
movb %al, (%rbx)
testq %r14, %r14
leaq 0x17aa20(%rip), %rcx    # 0x377001
leaq 0x1be9ad(%rip), %rdx    # 0x3baf95
cmoveq %rcx, %rdx
movq %r12, %rcx
shrq $0x20, %rcx
sete %r13b
andb %bpl, %r13b
movl %r13d, %ecx
xorb $0x1, %cl
movzbl %cl, %ecx
shll $0x5, %ecx
addl $0x20, %ecx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movq %rax, 0x20(%rbx)
movups %xmm0, 0x38(%rbx)
movq %rax, 0x48(%rbx)
leaq 0x1beeed(%rip), %rsi    # 0x3bb510
movq 0x10(%rsp), %rdi
movq %r12, %r8
movq %r15, %r9
xorl %eax, %eax
callq 0x103fe1
cmpb $0x1, %r13b
jne 0x1fc68a
movl $0x50, %r12d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl $0x58, %r13d
testq %r14, %r14
jne 0x1fc6dd
leaq 0x1be8fc(%rip), %r14    # 0x3baf58
leaq 0x975(%rip), %r8        # 0x1fcfd8
leaq 0x8(%rsp), %r9
movl $0x4, %edi
movq %r15, %rsi
movq %r14, %rdx
movl $0x7e, %ecx
callq 0x113277
movq %rax, %rdi
movq %r14, %rsi
movl $0x7f, %edx
jmp 0x1fc6d3
movl $0x58, %r12d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl $0x50, %r13d
testq %r14, %r14
jne 0x1fc6dd
leaq 0x1be8b1(%rip), %r14    # 0x3baf58
leaq 0x92a(%rip), %r8        # 0x1fcfd8
leaq 0x8(%rsp), %r9
movl $0x8, %edi
movq %r15, %rsi
movq %r14, %rdx
movl $0x90, %ecx
callq 0x113277
movq %rax, %rdi
movq %r14, %rsi
movl $0x91, %edx
callq 0x104226
movq %rax, %r14
xorl %eax, %eax
movq %r14, (%rbx,%r13)
movl %eax, 0x4(%rbx)
movq $0x0, (%rbx,%r12)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x7dcc2