// File: /workspace/github_c_makefile_star2_O3/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 0x1f530f
cmpb $0x1, 0x52(%r14)
je 0x1f5423
movq %rbx, %rax
shrq $0x20, %rax
jne 0x1f541e
cmpq %rbx, 0x40(%r14)
jae 0x1f5340
movq (%r14), %rdi
movq %rbx, %rsi
shlq $0x4, %rsi
leaq 0x1c4c6d(%rip), %rdx    # 0x3b9fa0
movl $0x69, %ecx
callq 0x104461
movq %rax, (%r14)
testb %bpl, %bpl
je 0x1f536e
cmpq %rbx, 0x40(%r14)
jae 0x1f5375
movq 0x18(%r14), %rdi
leaq (,%rbx,8), %rsi
leaq 0x1c4c42(%rip), %rdx    # 0x3b9fa0
movl $0x6f, %ecx
callq 0x104461
movq %rax, 0x18(%r14)
jmp 0x1f5375
cmpb $0x1, 0x52(%r14)
jne 0x1f539d
cmpq %rbx, 0x40(%r14)
jae 0x1f539d
movq 0x10(%r14), %rdi
leaq (%rbx,%rbx), %rsi
leaq 0x1c4c16(%rip), %rdx    # 0x3b9fa0
movl $0x76, %ecx
callq 0x104461
movq %rax, 0x10(%r14)
movw $0x0, (%rax)
movq $0x0, 0x30(%r14)
cmpq %rbx, 0x40(%r14)
jae 0x1f5413
cvtsi2sd %rbx, %xmm1
movsd 0x150e70(%rip), %xmm0   # 0x346228
cmpq $0x41, %r15
jb 0x1f53cb
shrq $0x6, %r15
cvtsi2sd %r15, %xmm2
addsd %xmm2, %xmm0
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movq %rax, %rcx
subsd 0x152941(%rip), %xmm0   # 0x347d20
sarq $0x3f, %rcx
cvttsd2si %xmm0, %rsi
andq %rcx, %rsi
orq %rax, %rsi
movq %rsi, 0x28(%r14)
movq 0x20(%r14), %rdi
shlq $0x3, %rsi
leaq 0x1c4b9f(%rip), %rdx    # 0x3b9fa0
movl $0x81, %ecx
callq 0x104461
movq %rax, 0x20(%r14)
movq %rbx, 0x40(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x7b855
callq 0x7b88c