// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/firstcodes.c
// Function: gt_firstcodes_auto_parts
static int gt_firstcodes_auto_parts(GtFirstcodesinfo *fci,
                                    GtSfxmappedrangelist *sfxmrlist,
                                    unsigned int numofparts,
                                    GtUword *maximumspace,
                                    GtUword maxbucketsize,
                                    unsigned int kmersize,
                                    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,
                                           maxseqlength - kmersize) +
                     4 * 4096);
  } else
  {
    gt_assert(*maximumspace > 0);
  }
  if (fci->mappedleftborder != NULL)
  {
    leftbordersize_all = gt_Sfxmappedrange_size_mapped(
                             fci->mappedleftborder,0,
                             gt_firstcodes_leftborder_entries(&fci->tab)-1);
  } else
  {
    leftbordersize_all = 0;
  }
  retval = gt_suftabparts_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 $0x80, %rsp
movq 0xb0(%rsp), %rax
movq 0xa8(%rsp), %rax
movq 0xa0(%rsp), %rax
movq 0x98(%rsp), %rax
movq 0x90(%rsp), %rax
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movl %edx, 0x64(%rsp)
movq %rcx, 0x58(%rsp)
movq %r8, 0x50(%rsp)
movl %r9d, 0x4c(%rsp)
cmpl $0x0, 0x64(%rsp)
jne 0x248284
movq 0x58(%rsp), %rax
cmpq $0x0, (%rax)
jne 0x248284
movq 0x70(%rsp), %rax
movq 0xa8(%rax), %rdi
callq 0x4be8e0
addq 0xa8(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x50(%rsp), %rsi
movq 0x98(%rsp), %rdx
movl 0x4c(%rsp), %eax
subq %rax, %rdx
movl $0x1, %edi
callq 0x2da5b0
movq 0x38(%rsp), %rcx
addq %rax, %rcx
addq $0x4000, %rcx           # imm = 0x4000
movq 0x58(%rsp), %rax
movq %rcx, (%rax)
jmp 0x2482cd
jmp 0x248286
movq 0x58(%rsp), %rax
cmpq $0x0, (%rax)
ja 0x2482c9
movq 0x3f3d08(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2cdd71(%rip), %rsi    # 0x516013
leaq 0x3304e8(%rip), %rdx    # 0x578791
leaq 0x3304f3(%rip), %rcx    # 0x5787a3
leaq 0x32ff45(%rip), %r8     # 0x5781fc
movl $0x3ce, %r9d            # imm = 0x3CE
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2482cb
jmp 0x2482cd
movq 0x70(%rsp), %rax
cmpq $0x0, 0x80(%rax)
je 0x24831a
movq 0x70(%rsp), %rax
movq 0x80(%rax), %rax
movq %rax, 0x30(%rsp)
movq 0x70(%rsp), %rdi
addq $0x110, %rdi            # imm = 0x110
callq 0x4c0cf0
movq 0x30(%rsp), %rdi
movq %rax, %rdx
subq $0x1, %rdx
xorl %eax, %eax
movl %eax, %esi
callq 0x2cc310
movq %rax, 0x40(%rsp)
jmp 0x248323
movq $0x0, 0x40(%rsp)
movq 0x70(%rsp), %rax
movq 0xa8(%rax), %rdi
callq 0x4be8b0
movq %rax, %rdi
addq 0x40(%rsp), %rdi
addq 0xa8(%rsp), %rdi
movq 0x58(%rsp), %rax
movq (%rax), %rsi
movq 0x70(%rsp), %rcx
addq $0x110, %rcx            # imm = 0x110
movq 0x68(%rsp), %r8
movq 0x90(%rsp), %r9
movq 0x70(%rsp), %rax
movl 0x60(%rax), %r11d
movq 0xa0(%rsp), %r10
movq 0xb0(%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 0x2ce480
movl %eax, 0x48(%rsp)
cmpl $0x0, 0x48(%rsp)
jge 0x2483bb
movl $0xffffffff, 0x7c(%rsp) # imm = 0xFFFFFFFF
jmp 0x248406
jmp 0x2483bd
cmpl $0x0, 0x48(%rsp)
jg 0x2483fc
movq 0x3f3bd5(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2cdc3e(%rip), %rsi    # 0x516013
leaq 0x3303e0(%rip), %rdx    # 0x5787bc
leaq 0x3303c0(%rip), %rcx    # 0x5787a3
leaq 0x32fe12(%rip), %r8     # 0x5781fc
movl $0x3ec, %r9d            # imm = 0x3EC
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2483fe
movl 0x48(%rsp), %eax
movl %eax, 0x7c(%rsp)
movl 0x7c(%rsp), %eax
addq $0x80, %rsp
popq %rbx
retq
nopw %cs:(%rax,%rax)