// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movb %sil, %al
movq %rdi, 0x20(%rsp)
andb $0x1, %al
movb %al, 0x1f(%rsp)
movq %rdx, 0x10(%rsp)
movq %rcx, 0x8(%rsp)
testb $0x1, 0x1f(%rsp)
je 0x2da8a6
movq 0x20(%rsp), %rax
testb $0x1, 0x52(%rax)
je 0x2da8a6
movq 0x36172b(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x23b794(%rip), %rsi    # 0x516013
leaq 0x2b2806(%rip), %rdx    # 0x58d08c
leaq 0x2b2828(%rip), %rcx    # 0x58d0b5
leaq 0x2b2733(%rip), %r8     # 0x58cfc7
movl $0x63, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2da8a8
jmp 0x2da8aa
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, 0x10(%rsp)
jbe 0x2da8ee
movq 0x3616e3(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x23b74c(%rip), %rsi    # 0x516013
leaq 0x2b27ff(%rip), %rdx    # 0x58d0cd
leaq 0x2b27e0(%rip), %rcx    # 0x58d0b5
leaq 0x2b26eb(%rip), %r8     # 0x58cfc7
movl $0x64, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2da8f0
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rax
cmpq 0x10(%rsp), %rax
jae 0x2da92d
movq 0x20(%rsp), %rax
movq (%rax), %rdi
movq 0x10(%rsp), %rsi
shlq $0x4, %rsi
leaq 0x2b26af(%rip), %rdx    # 0x58cfc7
movl $0x69, %ecx
callq 0xe8540
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
testb $0x1, 0x1f(%rsp)
je 0x2da973
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rax
cmpq 0x10(%rsp), %rax
jae 0x2da973
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x10(%rsp), %rsi
shlq $0x3, %rsi
leaq 0x2b266a(%rip), %rdx    # 0x58cfc7
movl $0x6f, %ecx
callq 0xe8540
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x18(%rax)
testb $0x1, 0x1f(%rsp)
jne 0x2da985
movq 0x20(%rsp), %rax
testb $0x1, 0x52(%rax)
je 0x2da9d1
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rax
cmpq 0x10(%rsp), %rax
jae 0x2da9d1
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x10(%rsp), %rsi
shlq %rsi
leaq 0x2b261a(%rip), %rdx    # 0x58cfc7
movl $0x76, %ecx
callq 0xe8540
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rax
movw $0x0, (%rax)
movq 0x20(%rsp), %rax
movq $0x0, 0x30(%rax)
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rax
cmpq 0x10(%rsp), %rax
jae 0x2daa4a
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x2dd2e0
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x28(%rax)
movq 0x20(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x20(%rsp), %rax
movq 0x28(%rax), %rsi
shlq $0x3, %rsi
leaq 0x2b25a1(%rip), %rdx    # 0x58cfc7
movl $0x81, %ecx
callq 0xe8540
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x10(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x40(%rax)
addq $0x28, %rsp
retq
nop