// File: /workspace/github_c_makefile_star2_O3/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 0x25ebbd(%rip), %rsi    # 0x36ead0
movl $0x70, %edi
movl $0x10c, %edx            # imm = 0x10C
callq 0x104226
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 %edi, %edi
cmpl $0x3, %ebp
cmovaeq %rax, %rdi
movq %rdi, 0x58(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%rbx)
testl %ebp, %ebp
je 0x10ffa0
cmpl $0x2, %ebp
je 0x10ff87
cmpl $0x1, %ebp
jne 0x10ffc2
leaq 0x25eb5b(%rip), %rsi    # 0x36ead0
movl $0x20000, %r14d         # imm = 0x20000
movl $0x20000, %edi          # imm = 0x20000
movl $0x11f, %edx            # imm = 0x11F
jmp 0x10ffb7
leaq 0x25eb42(%rip), %rsi    # 0x36ead0
movl $0x20000, %r14d         # imm = 0x20000
movl $0x20000, %edi          # imm = 0x20000
movl $0x12b, %edx            # imm = 0x12B
jmp 0x10ffb7
leaq 0x25eb29(%rip), %rsi    # 0x36ead0
movl $0x10000, %r14d         # imm = 0x10000
movl $0x10000, %edi          # imm = 0x10000
movl $0x125, %edx            # imm = 0x125
callq 0x104226
movq %rax, 0x48(%rbx)
jmp 0x110014
leaq 0x25eb07(%rip), %r14    # 0x36ead0
movq %r14, %rsi
movl $0x12e, %edx            # imm = 0x12E
callq 0x104226
movq %rax, 0x60(%rbx)
movq 0x58(%rbx), %rdi
movq %r14, %rsi
movl $0x12f, %edx            # imm = 0x12F
callq 0x104226
movq %rax, 0x68(%rbx)
movq 0x8(%rbx), %r15
imulq 0x58(%rbx), %r15
movq %r15, %rdi
movq %r14, %rsi
movl $0x132, %edx            # imm = 0x132
callq 0x104226
movq %rax, 0x48(%rbx)
movq 0x58(%rbx), %rax
leaq (%r15,%rax,2), %r14
addq %r14, 0x50(%rbx)
leaq 0x25eab1(%rip), %r14    # 0x36ead0
movl $0x404, %edi            # imm = 0x404
movq %r14, %rsi
movl $0x138, %edx            # imm = 0x138
callq 0x104226
movq %rax, 0x28(%rbx)
addq $0x404, 0x50(%rbx)      # imm = 0x404
movl $0x400, %edi            # imm = 0x400
movq %r14, %rsi
movl $0x13a, %edx            # imm = 0x13A
callq 0x104226
movq %rax, 0x30(%rbx)
addq $0x400, 0x50(%rbx)      # imm = 0x400
movl $0x100, %edi            # imm = 0x100
movq %r14, %rsi
movl $0x13c, %edx            # imm = 0x13C
callq 0x104226
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