// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/firstcodes.c
// Function: gt_evenly_divide_part
static GtUword *gt_evenly_divide_part(const GtFirstcodestab *fct,
                                            GtUword partminindex,
                                            GtUword partmaxindex,
                                            GtUword numofsuffixes,
                                            unsigned int numofparts)
{
  GtUword *endindexes, widthofpart, offset;
  unsigned int part, remainder;

  gt_assert(partminindex < partmaxindex && numofparts >= 2U);
  widthofpart = numofsuffixes/numofparts;
  endindexes = gt_malloc(sizeof (*endindexes) * numofparts);
  offset = gt_firstcodes_get_leftborder(fct,partminindex);
  remainder = (unsigned int) (numofsuffixes % (GtUword) numofparts);
  for (part=0; part < numofparts; part++)
  {
    if (remainder > 0)
    {
      offset += widthofpart + 1;
      remainder--;
    } else
    {
      offset += widthofpart;
    }
    if (part == numofparts - 1)
    {
      endindexes[part] = partmaxindex;
    } else
    {
      GtUword start = (part == 0) ? partminindex : endindexes[part-1] + 1;

      endindexes[part] = gt_firstcodes_findfirstlarger(fct,start,partmaxindex,
                                                       offset);
      gt_assert(endindexes[part] <= partmaxindex);
    }
  }
  return endindexes;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movl %r8d, 0x34(%rsp)
movq 0x48(%rsp), %rax
cmpq 0x40(%rsp), %rax
jae 0x24ab60
cmpl $0x2, 0x34(%rsp)
jae 0x24ab98
movq 0x3f1439(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2cb4a2(%rip), %rsi    # 0x516013
leaq 0x32dfdd(%rip), %rdx    # 0x578b55
leaq 0x32e006(%rip), %rcx    # 0x578b85
leaq 0x32d676(%rip), %r8     # 0x5781fc
movl $0x1ad, %r9d            # imm = 0x1AD
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x24ab9a
movq 0x38(%rsp), %rax
movl 0x34(%rsp), %ecx
xorl %edx, %edx
divq %rcx
movq %rax, 0x20(%rsp)
movl 0x34(%rsp), %eax
movl %eax, %edi
shlq $0x3, %rdi
leaq 0x32d63e(%rip), %rsi    # 0x5781fc
movl $0x1af, %edx            # imm = 0x1AF
callq 0xe80f0
movq %rax, 0x28(%rsp)
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x4c0d80
movq %rax, 0x18(%rsp)
movq 0x38(%rsp), %rax
movl 0x34(%rsp), %ecx
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, 0x10(%rsp)
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
cmpl 0x34(%rsp), %eax
jae 0x24ad27
cmpl $0x0, 0x10(%rsp)
jbe 0x24ac32
movq 0x20(%rsp), %rax
addq $0x1, %rax
addq 0x18(%rsp), %rax
movq %rax, 0x18(%rsp)
movl 0x10(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x24ac41
movq 0x20(%rsp), %rax
addq 0x18(%rsp), %rax
movq %rax, 0x18(%rsp)
movl 0x14(%rsp), %eax
movl 0x34(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x24ac67
movq 0x40(%rsp), %rdx
movq 0x28(%rsp), %rax
movl 0x14(%rsp), %ecx
movq %rdx, (%rax,%rcx,8)
jmp 0x24ad15
cmpl $0x0, 0x14(%rsp)
jne 0x24ac79
movq 0x48(%rsp), %rax
movq %rax, (%rsp)
jmp 0x24ac93
movq 0x28(%rsp), %rax
movl 0x14(%rsp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
addq $0x1, %rax
movq %rax, (%rsp)
movq (%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x50(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0x40(%rsp), %rdx
movq 0x18(%rsp), %rcx
callq 0x24ae90
movq %rax, %rdx
movq 0x28(%rsp), %rax
movl 0x14(%rsp), %ecx
movq %rdx, (%rax,%rcx,8)
movq 0x28(%rsp), %rax
movl 0x14(%rsp), %ecx
movq (%rax,%rcx,8), %rax
cmpq 0x40(%rsp), %rax
jbe 0x24ad11
movq 0x3f12c0(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2cb329(%rip), %rsi    # 0x516013
leaq 0x32deaa(%rip), %rdx    # 0x578b9b
leaq 0x32de8d(%rip), %rcx    # 0x578b85
leaq 0x32d4fd(%rip), %r8     # 0x5781fc
movl $0x1c5, %r9d            # imm = 0x1C5
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x24ad13
jmp 0x24ad15
jmp 0x24ad17
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x24abfd
movq 0x28(%rsp), %rax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)