// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/randomcodes.c
// Function: gt_randomcodes_allocspace
static int gt_randomcodes_allocspace(GtRandomcodesinfo *fci,
                                    unsigned int numofparts,
                                    GtUword maximumspace,
                                    GtUword phase2extra,
                                    GtError *err)
{
  if (maximumspace > 0)
  {
    if ((GtUword) gt_firstcodes_spacelog_total(fci->fcsl) +
                        phase2extra >= maximumspace)
    {
      gt_error_set(err, "already used %.2f MB of memory and need %.2f MB later "
                       "=> cannot compute index in at most %.2f MB",
                       GT_MEGABYTES(gt_firstcodes_spacelog_total(fci->fcsl)),
                       GT_MEGABYTES(phase2extra),
                       GT_MEGABYTES(maximumspace));
      return -1;
    } else
    {
      size_t remainspace = (size_t) maximumspace -
                           (gt_firstcodes_spacelog_total(fci->fcsl) +
                            phase2extra);

      fci->buf.allocated
        = gt_radixsort_max_num_of_entries_ulong(remainspace);
      if (fci->buf.allocated < fci->differentcodes / 16UL)
      {
        fci->buf.allocated = fci->differentcodes / 16UL;
      }
    }
  } else
  {
    if (numofparts == 0)
    {
      fci->buf.allocated = gt_radixsort_max_num_of_entries_ulong(
                                 gt_firstcodes_spacelog_total(fci->fcsl)/7UL);
    } else
    {
      fci->buf.allocated = fci->differentcodes/5;
    }
  }
  if (fci->buf.allocated < 16UL)
  {
    fci->buf.allocated = 16UL;
  }
  return 0;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movl %esi, 0x34(%rsp)
movq %rdx, 0x28(%rsp)
movq %rcx, 0x20(%rsp)
movq %r8, 0x18(%rsp)
cmpq $0x0, 0x28(%rsp)
jbe 0x26ebfb
movq 0x38(%rsp), %rax
movq 0xa8(%rax), %rdi
callq 0x4be8b0
addq 0x20(%rsp), %rax
cmpq 0x28(%rsp), %rax
jb 0x26eb79
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rax
movq 0xa8(%rax), %rdi
callq 0x4be8b0
movq 0x8(%rsp), %rdi
movq %rax, %xmm0
movaps 0x2a9e3b(%rip), %xmm4   # 0x518930
punpckldq %xmm4, %xmm0    # xmm0 = xmm0[0],xmm4[0],xmm0[1],xmm4[1]
movapd 0x2a9e3f(%rip), %xmm3   # 0x518940
subpd %xmm3, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0x2a9e10(%rip), %xmm2   # 0x518928
mulsd %xmm2, %xmm0
movq 0x20(%rsp), %xmm1
punpckldq %xmm4, %xmm1    # xmm1 = xmm1[0],xmm4[0],xmm1[1],xmm4[1]
subpd %xmm3, %xmm1
movaps %xmm1, %xmm5
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm5, %xmm1
mulsd %xmm2, %xmm1
movq 0x28(%rsp), %xmm2
punpckldq %xmm4, %xmm2    # xmm2 = xmm2[0],xmm4[0],xmm2[1],xmm4[1]
subpd %xmm3, %xmm2
movaps %xmm2, %xmm3
unpckhpd %xmm2, %xmm2            # xmm2 = xmm2[1,1]
addsd %xmm3, %xmm2
movsd 0x2a9dc6(%rip), %xmm3   # 0x518920
divsd %xmm3, %xmm2
leaq 0x309a4f(%rip), %rsi    # 0x5785b4
movb $0x3, %al
callq 0xd88c0
movl $0xffffffff, 0x44(%rsp) # imm = 0xFFFFFFFF
jmp 0x26ec81
movq 0x28(%rsp), %rax
movq %rax, (%rsp)
movq 0x38(%rsp), %rax
movq 0xa8(%rax), %rdi
callq 0x4be8b0
movq %rax, %rcx
movq (%rsp), %rax
addq 0x20(%rsp), %rcx
subq %rcx, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x100cf0
movq %rax, %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0xc8(%rax)
movq 0x38(%rsp), %rax
movq 0xc8(%rax), %rax
movq 0x38(%rsp), %rcx
movq 0x38(%rcx), %rcx
shrq $0x4, %rcx
cmpq %rcx, %rax
jae 0x26ebf7
movq 0x38(%rsp), %rax
movq 0x38(%rax), %rcx
shrq $0x4, %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0xc8(%rax)
jmp 0x26ebf9
jmp 0x26ec5a
cmpl $0x0, 0x34(%rsp)
jne 0x26ec36
movq 0x38(%rsp), %rax
movq 0xa8(%rax), %rdi
callq 0x4be8b0
movl $0x7, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, %rdi
callq 0x100cf0
movq %rax, %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0xc8(%rax)
jmp 0x26ec58
movq 0x38(%rsp), %rax
movq 0x38(%rax), %rax
movl $0x5, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0xc8(%rax)
jmp 0x26ec5a
movq 0x38(%rsp), %rax
cmpq $0x10, 0xc8(%rax)
jae 0x26ec79
movq 0x38(%rsp), %rax
movq $0x10, 0xc8(%rax)
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopw (%rax,%rax)