// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/core/radix_sort.c
// Function: gt_radixbuffer_new
static GtRadixbuffer *gt_radixbuffer_new(GtRadixelemtype elemtype)
{
  GtRadixbuffer *rbuf;
  size_t thissize;

  rbuf = gt_malloc(sizeof *rbuf);
  rbuf->size = sizeof *rbuf;
  rbuf->log_bufsize = 5;
  rbuf->buf_size = 1UL << rbuf->log_bufsize;
  gt_assert(rbuf->buf_size <= UINT8_MAX);
  rbuf->cachesize = (UINT8_MAX+1) << rbuf->log_bufsize;
  rbuf->elemtype = elemtype;
  if (elemtype <= GtRadixelemtypeGtuint64keyPair)
  {
    rbuf->unitsize = 0;
  } else
  {
    rbuf->unitsize = (size_t) elemtype -
                     (size_t) GtRadixelemtypeGtuint64keyPair;
  }
  rbuf->tmpvalue_ptr = rbuf->tmpswap_ptr = NULL;
  if (elemtype == GtRadixelemtypeGtUwordPair)
  {
    thissize = sizeof (*rbuf->values.ulongpairptr) * rbuf->cachesize;
    rbuf->values.ulongpairptr = gt_malloc(thissize);
  } else
  {
    if (elemtype == GtRadixelemtypeGtUword)
    {
      thissize = sizeof *rbuf->values.ulongptr * rbuf->cachesize;
      rbuf->values.ulongptr = gt_malloc(thissize);
    } else
    {
      if (elemtype == GtRadixelemtypeGtuint64keyPair)
      {
        thissize = sizeof *rbuf->values.uint64keypairptr * rbuf->cachesize;
        rbuf->values.uint64keypairptr = gt_malloc(thissize);
      } else
      {
        rbuf->tmpvalue_ptr = gt_malloc(rbuf->unitsize);
        rbuf->tmpswap_ptr = gt_malloc(rbuf->unitsize);
        thissize = sizeof *rbuf->values.flbaptr * rbuf->unitsize *
                   rbuf->cachesize;
        rbuf->values.flbaptr = gt_malloc(thissize);
        thissize += 2 * rbuf->unitsize;
      }
    }
  }
  rbuf->size += thissize;
  rbuf->startofbin = gt_malloc(sizeof *rbuf->startofbin * (UINT8_MAX + 2));
  rbuf->size += sizeof *rbuf->startofbin * (UINT8_MAX + 2);
  rbuf->endofbin = gt_malloc(sizeof *rbuf->endofbin * (UINT8_MAX + 1));
  rbuf->size += sizeof *rbuf->endofbin * (UINT8_MAX + 1);
  rbuf->nextidx = gt_malloc(sizeof *rbuf->nextidx * (UINT8_MAX + 1));
  rbuf->size += sizeof *rbuf->nextidx * (UINT8_MAX + 1);
  rbuf->countcached = rbuf->countuncached = rbuf->countinsertionsort = 0;
  return rbuf;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebp
leaq 0x262869(%rip), %rsi    # 0x377d40
movl $0x70, %edi
movl $0x10c, %edx            # imm = 0x10C
callq 0x1092b2
movq %rax, %rbx
movq $0x70, 0x50(%rax)
movl $0x5, 0x40(%rax)
movq $0x20, (%rax)
movq $0x2000, 0x8(%rax)      # imm = 0x2000
movl %ebp, 0x44(%rax)
movl %ebp, %eax
addq $-0x2, %rax
xorl %ecx, %ecx
cmpl $0x3, %ebp
cmovaeq %rax, %rcx
movq %rcx, 0x58(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%rbx)
testl %ebp, %ebp
je 0x115564
cmpl $0x2, %ebp
je 0x11554b
cmpl $0x1, %ebp
jne 0x115586
leaq 0x262807(%rip), %rsi    # 0x377d40
movl $0x20000, %r14d         # imm = 0x20000
movl $0x20000, %edi          # imm = 0x20000
movl $0x11f, %edx            # imm = 0x11F
jmp 0x11557b
leaq 0x2627ee(%rip), %rsi    # 0x377d40
movl $0x20000, %r14d         # imm = 0x20000
movl $0x20000, %edi          # imm = 0x20000
movl $0x12b, %edx            # imm = 0x12B
jmp 0x11557b
leaq 0x2627d5(%rip), %rsi    # 0x377d40
movl $0x10000, %r14d         # imm = 0x10000
movl $0x10000, %edi          # imm = 0x10000
movl $0x125, %edx            # imm = 0x125
callq 0x1092b2
movq %rax, 0x48(%rbx)
jmp 0x1155dc
movq 0x58(%rbx), %rdi
leaq 0x2627af(%rip), %r14    # 0x377d40
movq %r14, %rsi
movl $0x12e, %edx            # imm = 0x12E
callq 0x1092b2
movq %rax, 0x60(%rbx)
movq 0x58(%rbx), %rdi
movq %r14, %rsi
movl $0x12f, %edx            # imm = 0x12F
callq 0x1092b2
movq %rax, 0x68(%rbx)
movq 0x8(%rbx), %r15
imulq 0x58(%rbx), %r15
movq %r15, %rdi
movq %r14, %rsi
movl $0x132, %edx            # imm = 0x132
callq 0x1092b2
movq %rax, 0x48(%rbx)
movq 0x58(%rbx), %rax
leaq (%r15,%rax,2), %r14
addq %r14, 0x50(%rbx)
leaq 0x262759(%rip), %r14    # 0x377d40
movl $0x404, %edi            # imm = 0x404
movq %r14, %rsi
movl $0x138, %edx            # imm = 0x138
callq 0x1092b2
movq %rax, 0x28(%rbx)
addq $0x404, 0x50(%rbx)      # imm = 0x404
movl $0x400, %edi            # imm = 0x400
movq %r14, %rsi
movl $0x13a, %edx            # imm = 0x13A
callq 0x1092b2
movq %rax, 0x30(%rbx)
addq $0x400, 0x50(%rbx)      # imm = 0x400
movl $0x100, %edi            # imm = 0x100
movq %r14, %rsi
movl $0x13c, %edx            # imm = 0x13C
callq 0x1092b2
movq %rax, 0x38(%rbx)
addq $0x100, 0x50(%rbx)      # imm = 0x100
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rbx)
movq $0x0, 0x20(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq