// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/core/radix_sort.c
// Function: gt_radixsort_new
static GtRadixsortinfo *gt_radixsort_new(GtRadixelemtype elemtype,
                                         GtUword maxlen)
{
  GtRadixsortinfo *radixsortinfo = gt_malloc(sizeof *radixsortinfo);

  radixsortinfo->size = sizeof *radixsortinfo;
  radixsortinfo->rbuf = gt_radixbuffer_new(elemtype);
  radixsortinfo->size += gt_radixbuffer_size(radixsortinfo->rbuf);
  radixsortinfo->elemtype = elemtype;
  radixsortinfo->maxlen = maxlen;
  if (maxlen > 0)
  {
    size_t thissize;

    if (elemtype == GtRadixelemtypeGtUwordPair)
    {
      thissize = sizeof *radixsortinfo->sortspace.ulongpairptr * maxlen;
      radixsortinfo->sortspace.ulongpairptr = gt_malloc(thissize);
    } else
    {
      if (elemtype == GtRadixelemtypeGtUword)
      {
        thissize = sizeof *radixsortinfo->sortspace.ulongptr * maxlen;
        radixsortinfo->sortspace.ulongptr = gt_malloc(thissize);
      } else
      {
        if (elemtype == GtRadixelemtypeGtuint64keyPair)
        {
          thissize = sizeof *radixsortinfo->sortspace.uint64keypairptr * maxlen;
          radixsortinfo->sortspace.uint64keypairptr = gt_malloc(thissize);
        } else
        {
          thissize = sizeof *radixsortinfo->sortspace.flbaptr *
                     radixsortinfo->rbuf->unitsize * maxlen;
          radixsortinfo->sortspace.flbaptr = gt_malloc(thissize);
        }
      }
    }
    radixsortinfo->size += thissize;
  }
  GT_STACK_INIT(&radixsortinfo->stack,32UL);
  radixsortinfo->size += sizeof radixsortinfo->stack;
#ifdef GT_THREADS_ENABLED
  {
    const unsigned int threads = GT_THREADS_JOBS;

    if (threads > 1U)
    {
      unsigned int t;
      radixsortinfo->lentab
        = gt_malloc(sizeof *radixsortinfo->lentab * (UINT8_MAX+1));
      radixsortinfo->size += sizeof *radixsortinfo->lentab * (UINT8_MAX+1);
      radixsortinfo->endindexes
        = gt_malloc(sizeof *radixsortinfo->endindexes * threads);
      radixsortinfo->size += sizeof *radixsortinfo->endindexes * threads;
      radixsortinfo->threadinfo
        = gt_malloc(sizeof *radixsortinfo->threadinfo * threads);
      radixsortinfo->size += sizeof *radixsortinfo->threadinfo * threads;
      for (t = 0; t < threads; t++)
      {
        GT_STACK_INIT(&radixsortinfo->threadinfo[t].stack,32UL);
        radixsortinfo->size += sizeof (radixsortinfo->threadinfo[t].stack);
        radixsortinfo->threadinfo[t].rbuf = gt_radixbuffer_new(elemtype);
        radixsortinfo->size
          += gt_radixbuffer_size(radixsortinfo->threadinfo[t].rbuf);
      }
    }
  }
#endif
  return radixsortinfo;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movl %edi, %ebx
leaq 0x26eb33(%rip), %rsi    # 0x30ede8
movl $0x3078, %edi           # imm = 0x3078
movl $0x1a8, %edx            # imm = 0x1A8
callq 0x93160
movq %rax, %r14
movq $0x3078, 0x3058(%rax) # imm = 0x3078
movl %ebx, %edi
callq 0xa0ff1
movq %rax, 0x3038(%r14)
movq 0x3058(%r14), %rcx
addq 0x50(%rax), %rcx
movq %rcx, 0x3058(%r14)
movl %ebx, 0x3050(%r14)
movq %r15, 0x3048(%r14)
testq %r15, %r15
je 0xa037c
testl %ebx, %ebx
je 0xa033d
cmpl $0x2, %ebx
je 0xa0328
cmpl $0x1, %ebx
jne 0xa0352
shlq $0x4, %r15
leaq 0x26eaca(%rip), %rsi    # 0x30ede8
movq %r15, %rdi
movl $0x1b6, %edx            # imm = 0x1B6
jmp 0xa0366
shlq $0x4, %r15
leaq 0x26eab5(%rip), %rsi    # 0x30ede8
movq %r15, %rdi
movl $0x1c2, %edx            # imm = 0x1C2
jmp 0xa0366
shlq $0x3, %r15
leaq 0x26eaa0(%rip), %rsi    # 0x30ede8
movq %r15, %rdi
movl $0x1bc, %edx            # imm = 0x1BC
jmp 0xa0366
imulq 0x58(%rax), %r15
leaq 0x26ea8a(%rip), %rsi    # 0x30ede8
movq %r15, %rdi
movl $0x1c7, %edx            # imm = 0x1C7
callq 0x93160
movq %r15, %rcx
movq %rax, 0x3040(%r14)
addq 0x3058(%r14), %rcx
movl $0x200, %r13d           # imm = 0x200
movq %r13, 0x18(%r14)
movq $0x20, 0x20(%r14)
movq %r13, (%r14)
movq %r14, %rax
addq $0x28, %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r14)
movq %rax, 0x3028(%r14)
andq $0x0, 0x3030(%r14)
addq $0x3038, %rcx           # imm = 0x3038
movq %rcx, 0x3058(%r14)
leaq 0x398a04(%rip), %rax    # 0x438dc8
movl (%rax), %ebp
cmpq $0x2, %rbp
jb 0xa04c7
leaq 0x26ea11(%rip), %r12    # 0x30ede8
movl $0x800, %edi            # imm = 0x800
movq %r12, %rsi
movl $0x1d7, %edx            # imm = 0x1D7
callq 0x93160
movq %rax, 0x3060(%r14)
addq $0x800, 0x3058(%r14) # imm = 0x800
leaq (,%rbp,8), %r15
movq %r15, %rdi
movq %r12, %rsi
movl $0x1da, %edx            # imm = 0x1DA
callq 0x93160
movq %rax, 0x3068(%r14)
addq %r15, 0x3058(%r14)
imulq $0x3048, %rbp, %r15     # imm = 0x3048
movq %r15, %rdi
movq %r12, %rsi
movl $0x1dd, %edx            # imm = 0x1DD
callq 0x93160
movq %rax, 0x3070(%r14)
movq 0x3058(%r14), %rdx
addq %r15, %rdx
movq %rdx, 0x3058(%r14)
xorl %r12d, %r12d
cmpq %r12, %r15
je 0xa04c7
addq %r12, %rax
addq $0x28, %rax
movq %r13, -0x10(%rax)
movq $0x20, -0x8(%rax)
movq %r13, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movq %rax, 0x3000(%rax)
andq $0x0, 0x3008(%rax)
addq $0x3038, %rdx           # imm = 0x3038
movq %rdx, 0x3058(%r14)
movl %ebx, %edi
callq 0xa0ff1
movq %rax, %rcx
movq 0x3070(%r14), %rax
movq %rcx, 0x3038(%rax,%r12)
movq 0x3058(%r14), %rdx
addq 0x50(%rcx), %rdx
movq %rdx, 0x3058(%r14)
addq $0x3048, %r12           # imm = 0x3048
jmp 0xa0453
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq