// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/randomcodes.c
// Function: gt_randomcodes_auto_parts
static int gt_randomcodes_auto_parts(GtRandomcodesinfo *fci,
                                    GtSfxmappedrangelist *sfxmrlist,
                                    unsigned int numofparts,
                                    GtUword *maximumspace,
                                    GtUword maxbucketsize,
                                    unsigned int sortingdepth,
                                    GtUword totallength,
                                    GtUword maxseqlength,
                                    GtUword suftabentries,
                                    GtUword phase2extra,
                                    GtError *err)
{
  int retval;
  GtUword leftbordersize_all;

  if (numofparts == 0 && *maximumspace == 0)
  {
    *maximumspace = (GtUword)
                    (gt_firstcodes_spacelog_peak(fci->fcsl) +
                     phase2extra +
                     gt_shortreadsort_size(true, maxbucketsize,
                       sortingdepth == 0 ? maxseqlength :
                       (GtUword)sortingdepth) + 4UL * 4096UL);
  } else
  {
    gt_assert(*maximumspace > 0);
  }
  if (fci->mappedleftborder != NULL)
  {
    leftbordersize_all = gt_Sfxmappedrange_size_mapped(
                             fci->mappedleftborder,0,
                             gt_randomcodes_leftborder_entries(&fci->tab)-1);
  } else
  {
    leftbordersize_all = 0;
  }
  retval = gt_suftabparts_rc_fit_memlimit(
      gt_firstcodes_spacelog_total(fci->fcsl)
      /*as this is subtracted*/
      + leftbordersize_all
      + phase2extra,
      *maximumspace,
      NULL,
      &fci->tab,
      sfxmrlist,
      totallength,
      fci->bitsforposref,
      0, /* special characters not used */
      suftabentries,
      false, /* suftabuint not used */
      err);
  if (retval < 0)
  {
    return -1;
  } else
  {
    gt_assert(retval > 0);
    return retval;
  }
}

// Assembly:
pushq %rbx
subq $0x90, %rsp
movq 0xc0(%rsp), %rax
movq 0xb8(%rsp), %rax
movq 0xb0(%rsp), %rax
movq 0xa8(%rsp), %rax
movq 0xa0(%rsp), %rax
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movl %edx, 0x74(%rsp)
movq %rcx, 0x68(%rsp)
movq %r8, 0x60(%rsp)
movl %r9d, 0x5c(%rsp)
cmpl $0x0, 0x74(%rsp)
jne 0x26f30d
movq 0x68(%rsp), %rax
cmpq $0x0, (%rax)
jne 0x26f30d
movq 0x80(%rsp), %rax
movq 0xa8(%rax), %rdi
callq 0x4be8e0
addq 0xb8(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x48(%rsp)
cmpl $0x0, 0x5c(%rsp)
jne 0x26f2d7
movq 0xa8(%rsp), %rax
movq %rax, 0x38(%rsp)
jmp 0x26f2e0
movl 0x5c(%rsp), %eax
movq %rax, 0x38(%rsp)
movq 0x48(%rsp), %rsi
movq 0x38(%rsp), %rdx
movl $0x1, %edi
callq 0x2da5b0
movq 0x40(%rsp), %rcx
addq %rax, %rcx
addq $0x4000, %rcx           # imm = 0x4000
movq 0x68(%rsp), %rax
movq %rcx, (%rax)
jmp 0x26f356
jmp 0x26f30f
movq 0x68(%rsp), %rax
cmpq $0x0, (%rax)
ja 0x26f352
movq 0x3ccc7f(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2a6ce8(%rip), %rsi    # 0x516013
leaq 0x30945f(%rip), %rdx    # 0x578791
leaq 0x30fe9d(%rip), %rcx    # 0x57f1d6
leaq 0x30f795(%rip), %r8     # 0x57ead5
movl $0x4e8, %r9d            # imm = 0x4E8
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x26f354
jmp 0x26f356
movq 0x80(%rsp), %rax
cmpq $0x0, 0x90(%rax)
je 0x26f3ac
movq 0x80(%rsp), %rax
movq 0x90(%rax), %rax
movq %rax, 0x30(%rsp)
movq 0x80(%rsp), %rdi
addq $0x110, %rdi            # imm = 0x110
callq 0x4dbb40
movq 0x30(%rsp), %rdi
movq %rax, %rdx
subq $0x1, %rdx
xorl %eax, %eax
movl %eax, %esi
callq 0x2cc310
movq %rax, 0x50(%rsp)
jmp 0x26f3b5
movq $0x0, 0x50(%rsp)
movq 0x80(%rsp), %rax
movq 0xa8(%rax), %rdi
callq 0x4be8b0
movq %rax, %rdi
addq 0x50(%rsp), %rdi
addq 0xb8(%rsp), %rdi
movq 0x68(%rsp), %rax
movq (%rax), %rsi
movq 0x80(%rsp), %rcx
addq $0x110, %rcx            # imm = 0x110
movq 0x78(%rsp), %r8
movq 0xa0(%rsp), %r9
movq 0x80(%rsp), %rax
movl 0x74(%rax), %r11d
movq 0xb0(%rsp), %r10
movq 0xc0(%rsp), %rax
xorl %edx, %edx
xorl %ebx, %ebx
movl %r11d, (%rsp)
movq $0x0, 0x8(%rsp)
movq %r10, 0x10(%rsp)
movl $0x0, 0x18(%rsp)
movq %rax, 0x20(%rsp)
callq 0x4da6e0
movl %eax, 0x58(%rsp)
cmpl $0x0, 0x58(%rsp)
jge 0x26f459
movl $0xffffffff, 0x8c(%rsp) # imm = 0xFFFFFFFF
jmp 0x26f4a7
jmp 0x26f45b
cmpl $0x0, 0x58(%rsp)
jg 0x26f49a
movq 0x3ccb37(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2a6ba0(%rip), %rsi    # 0x516013
leaq 0x309342(%rip), %rdx    # 0x5787bc
leaq 0x30fd55(%rip), %rcx    # 0x57f1d6
leaq 0x30f64d(%rip), %r8     # 0x57ead5
movl $0x507, %r9d            # imm = 0x507
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x26f49c
movl 0x58(%rsp), %eax
movl %eax, 0x8c(%rsp)
movl 0x8c(%rsp), %eax
addq $0x90, %rsp
popq %rbx
retq
nopw (%rax,%rax)