// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/sfx-suffixer.c
// Function: gt_determineaddionalsuffixprefixchars
static void gt_determineaddionalsuffixprefixchars(
                                   unsigned int *additionalprefixchars,
                                   unsigned int *additionalsuffixchars,
                                   unsigned int numofchars,
                                   unsigned int prefixlength,
                                   size_t estimatedspace,
                                   GtUword maximumspace)
{
  unsigned int prefixchars;
  size_t sizeofprefixmarks;

  for (prefixchars = 1U;
       prefixlength + prefixchars <= (unsigned int) GT_UNITSIN2BITENC;
       prefixchars++)
  {
    sizeofprefixmarks = gt_sizeforbittable(numofchars,prefixlength+prefixchars);
    if (estimatedspace + sizeofprefixmarks > (size_t) maximumspace)
    {
      prefixchars--;
      break;
    }
  }
  *additionalprefixchars = prefixchars;
#if defined (_LP64) || defined (_WIN64)
  {
    unsigned int suffixchars;
    size_t sizeofsuffixmarks;
    sizeofprefixmarks = gt_sizeforbittable(numofchars,prefixlength+prefixchars);
    for (suffixchars = 1U;
         prefixlength+prefixchars+prefixlength+suffixchars <=
           (unsigned) GT_UNITSIN2BITENC;
         suffixchars++)
    {
      sizeofsuffixmarks = gt_sizeforbittable(numofchars,
                                             prefixlength+suffixchars);
      if (estimatedspace + sizeofprefixmarks + sizeofsuffixmarks
          > (size_t) maximumspace)
      {
        suffixchars--;
        break;
      }
    }
    if (prefixchars <= suffixchars)
    {
      suffixchars = prefixchars - 1;
    }
    *additionalsuffixchars = suffixchars;
  }
#else
  *additionalsuffixchars = 0;
#endif
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movl %edx, 0x34(%rsp)
movl %ecx, 0x30(%rsp)
movq %r8, 0x28(%rsp)
movq %r9, 0x20(%rsp)
movl $0x1, 0x1c(%rsp)
movl 0x30(%rsp), %eax
addl 0x1c(%rsp), %eax
cmpl $0x20, %eax
ja 0x2e0ad8
movl 0x34(%rsp), %edi
movl 0x30(%rsp), %esi
addl 0x1c(%rsp), %esi
callq 0x2e5c10
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rax
addq 0x10(%rsp), %rax
cmpq 0x20(%rsp), %rax
jbe 0x2e0ac9
movl 0x1c(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x2e0ad8
jmp 0x2e0acb
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x2e0a88
movl 0x1c(%rsp), %ecx
movq 0x40(%rsp), %rax
movl %ecx, (%rax)
movl 0x34(%rsp), %edi
movl 0x30(%rsp), %esi
addl 0x1c(%rsp), %esi
callq 0x2e5c10
movq %rax, 0x10(%rsp)
movl $0x1, 0xc(%rsp)
movl 0x30(%rsp), %eax
addl 0x1c(%rsp), %eax
addl 0x30(%rsp), %eax
addl 0xc(%rsp), %eax
cmpl $0x20, %eax
ja 0x2e0b5c
movl 0x34(%rsp), %edi
movl 0x30(%rsp), %esi
addl 0xc(%rsp), %esi
callq 0x2e5c10
movq %rax, (%rsp)
movq 0x28(%rsp), %rax
addq 0x10(%rsp), %rax
addq (%rsp), %rax
cmpq 0x20(%rsp), %rax
jbe 0x2e0b4d
movl 0xc(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x2e0b5c
jmp 0x2e0b4f
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x2e0b01
movl 0x1c(%rsp), %eax
cmpl 0xc(%rsp), %eax
ja 0x2e0b71
movl 0x1c(%rsp), %eax
subl $0x1, %eax
movl %eax, 0xc(%rsp)
movl 0xc(%rsp), %ecx
movq 0x38(%rsp), %rax
movl %ecx, (%rax)
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)