// File: /workspace/github_c_makefile_star2_O1/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 0x2633c1(%rip), %rsi    # 0x377d40
movl $0x3078, %edi           # imm = 0x3078
movl $0x1a8, %edx            # imm = 0x1A8
callq 0x1092b2
movq %rax, %r14
movq $0x3078, 0x3058(%rax) # imm = 0x3078
movl %ebx, %edi
callq 0x1154c7
movq %rax, 0x3038(%r14)
movq 0x50(%rax), %rcx
addq %rcx, 0x3058(%r14)
movl %ebx, 0x3050(%r14)
movq %r15, 0x3048(%r14)
testq %r15, %r15
je 0x114a3c
testl %ebx, %ebx
je 0x114a00
cmpl $0x2, %ebx
je 0x1149eb
cmpl $0x1, %ebx
jne 0x114a15
shlq $0x4, %r15
leaq 0x26335f(%rip), %rsi    # 0x377d40
movq %r15, %rdi
movl $0x1b6, %edx            # imm = 0x1B6
jmp 0x114a29
shlq $0x4, %r15
leaq 0x26334a(%rip), %rsi    # 0x377d40
movq %r15, %rdi
movl $0x1c2, %edx            # imm = 0x1C2
jmp 0x114a29
shlq $0x3, %r15
leaq 0x263335(%rip), %rsi    # 0x377d40
movq %r15, %rdi
movl $0x1bc, %edx            # imm = 0x1BC
jmp 0x114a29
imulq 0x58(%rax), %r15
leaq 0x26331f(%rip), %rsi    # 0x377d40
movq %r15, %rdi
movl $0x1c7, %edx            # imm = 0x1C7
callq 0x1092b2
movq %rax, 0x3040(%r14)
addq %r15, 0x3058(%r14)
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)
movq $0x0, 0x3030(%r14)
addq $0x3038, 0x3058(%r14) # imm = 0x3038
leaq 0x3b0394(%rip), %rax    # 0x4c4e18
movl (%rax), %ebp
cmpq $0x2, %rbp
jb 0x114b78
leaq 0x2632a9(%rip), %r12    # 0x377d40
movl $0x800, %edi            # imm = 0x800
movq %r12, %rsi
movl $0x1d7, %edx            # imm = 0x1D7
callq 0x1092b2
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 0x1092b2
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 0x1092b2
movq %rax, 0x3070(%r14)
addq %r15, 0x3058(%r14)
xorl %r12d, %r12d
movq 0x3070(%r14), %rax
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)
movq $0x0, 0x3008(%rax)
addq $0x3038, 0x3058(%r14) # imm = 0x3038
movl %ebx, %edi
callq 0x1154c7
movq 0x3070(%r14), %rcx
movq %rax, 0x3038(%rcx,%r12)
movq 0x50(%rax), %rax
addq %rax, 0x3058(%r14)
addq $0x3048, %r12           # imm = 0x3048
cmpq %r12, %r15
jne 0x114b09
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq