// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/sfx-shortreadsort.c
// Function: gt_shortreadsort_resize
static void gt_shortreadsort_resize(GtShortreadsortworkinfo *srsw,
                                    bool firstcodes,
                                    GtUword bucketsize,
                                    GtUword maxremain)
{
  gt_assert(!firstcodes || !srsw->withmediumsizelcps);
  gt_assert(bucketsize <= (GtUword) UINT32_MAX);
  if (srsw->currentbucketsize < bucketsize)
  {
    srsw->shortreadsorttable = gt_realloc(srsw->shortreadsorttable,
                                          sizeof (*srsw->shortreadsorttable) *
                                          bucketsize);
  }
  if (firstcodes && srsw->currentbucketsize < bucketsize)
  {
    srsw->seqnum_relpos_bucket
      = gt_realloc(srsw->seqnum_relpos_bucket,
                   sizeof (*srsw->seqnum_relpos_bucket) * bucketsize);
  }
  if ((firstcodes || srsw->withmediumsizelcps) &&
      srsw->currentbucketsize < bucketsize)
  {
    srsw->mediumsizelcpvalues
      = gt_realloc(srsw->mediumsizelcpvalues,
                   sizeof (*srsw->mediumsizelcpvalues) * bucketsize);
    srsw->mediumsizelcpvalues[0] = 0; /* since it is not set otherwise */
  }
  srsw->tbereservoir.nextfreeGtTwobitencoding = 0;
  if (srsw->currentbucketsize < bucketsize)
  {
    srsw->tbereservoir.allocatedGtTwobitencoding
      = gt_shortreadsort_encoding_size(bucketsize,maxremain);
    srsw->tbereservoir.spaceGtTwobitencoding
      = gt_realloc(srsw->tbereservoir.spaceGtTwobitencoding,
                   sizeof (GtTwobitencoding) *
                   srsw->tbereservoir.allocatedGtTwobitencoding);
    srsw->currentbucketsize = bucketsize;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rdx, %rbx
movl %esi, %ebp
movq %rdi, %r14
testl %esi, %esi
je 0x1fea83
cmpb $0x1, 0x52(%r14)
je 0x1feb9a
movq %rbx, %rax
shrq $0x20, %rax
jne 0x1feb95
cmpq %rbx, 0x40(%r14)
jae 0x1feab4
movq (%r14), %rdi
movq %rbx, %rsi
shlq $0x4, %rsi
leaq 0x1c4b61(%rip), %rdx    # 0x3c3608
movl $0x69, %ecx
callq 0x1094e6
movq %rax, (%r14)
testb %bpl, %bpl
je 0x1feae5
cmpq %rbx, 0x40(%r14)
jae 0x1feae0
movq 0x18(%r14), %rdi
leaq (,%rbx,8), %rsi
leaq 0x1c4b36(%rip), %rdx    # 0x3c3608
movl $0x6f, %ecx
callq 0x1094e6
movq %rax, 0x18(%r14)
testb %bpl, %bpl
jne 0x1feaec
cmpb $0x1, 0x52(%r14)
jne 0x1feb14
cmpq %rbx, 0x40(%r14)
jae 0x1feb14
movq 0x10(%r14), %rdi
leaq (%rbx,%rbx), %rsi
leaq 0x1c4b07(%rip), %rdx    # 0x3c3608
movl $0x76, %ecx
callq 0x1094e6
movq %rax, 0x10(%r14)
movw $0x0, (%rax)
movq $0x0, 0x30(%r14)
cmpq %rbx, 0x40(%r14)
jae 0x1feb8a
cvtsi2sd %rbx, %xmm1
movsd 0x1506f9(%rip), %xmm0   # 0x34f228
cmpq $0x41, %r15
jb 0x1feb42
shrq $0x6, %r15
cvtsi2sd %r15, %xmm2
addsd %xmm2, %xmm0
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movq %rax, %rcx
subsd 0x1521ca(%rip), %xmm0   # 0x350d20
sarq $0x3f, %rcx
cvttsd2si %xmm0, %rsi
andq %rcx, %rsi
orq %rax, %rsi
movq %rsi, 0x28(%r14)
movq 0x20(%r14), %rdi
shlq $0x3, %rsi
leaq 0x1c4a90(%rip), %rdx    # 0x3c3608
movl $0x81, %ecx
callq 0x1094e6
movq %rax, 0x20(%r14)
movq %rbx, 0x40(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x7d5b4
callq 0x7d5eb