// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/sfx-run.c
// Function: detpfxlen
static int detpfxlen(unsigned int *prefixlength,
                     const Suffixeratoroptions *so,
                     unsigned int numofchars,
                     GtUword totallength,
                     bool withspecialsuffixes,
                     GtLogger *logger,
                     GtError *err)
{
  bool haserr = false;
  unsigned int recommendedprefixlength;
  Sfxstrategy sfxstrategy = gt_index_options_sfxstrategy_value(so->idxopts);

  recommendedprefixlength
    = gt_recommendedprefixlength(numofchars,
                                 totallength,
                                 sfxstrategy.spmopt_minlength > 0
                                   ? 0.15 : GT_RECOMMENDED_MULTIPLIER_DEFAULT,
                                 withspecialsuffixes);
  if (gt_index_options_prefixlength_value(so->idxopts)
                                                   == GT_PREFIXLENGTH_AUTOMATIC)
  {
    *prefixlength = recommendedprefixlength;
    gt_logger_log(logger,
                "automatically determined prefixlength=%u",
                *prefixlength);
  } else
  {
    unsigned int maxprefixlen;

    *prefixlength = gt_index_options_prefixlength_value(so->idxopts);
    maxprefixlen
      = gt_whatisthemaximalprefixlength(numofchars,
                                        totallength,
                                        sfxstrategy.storespecialcodes
                                          ? (unsigned int) GT_PREFIXLENBITS
                                          : 0,
                                        withspecialsuffixes);
    if (gt_checkprefixlength(maxprefixlen,*prefixlength,err) != 0)
    {
      haserr = true;
    } else
    {
      gt_showmaximalprefixlength(logger,
                                 maxprefixlen,
                                 recommendedprefixlength);
    }
  }
  return haserr ? -1 : 0;
}

// Assembly:
subq $0x98, %rsp
movb %r8b, %al
movq 0xa0(%rsp), %r8
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
movl %edx, 0x84(%rsp)
movq %rcx, 0x78(%rsp)
andb $0x1, %al
movb %al, 0x77(%rsp)
movq %r9, 0x68(%rsp)
movb $0x0, 0x67(%rsp)
movq 0x88(%rsp), %rax
movq 0x18(%rax), %rsi
leaq 0x28(%rsp), %rdi
callq 0x25ced0
movl 0x84(%rsp), %eax
movl %eax, 0x4(%rsp)
movq 0x78(%rsp), %rax
movq %rax, 0x8(%rsp)
movl 0x50(%rsp), %eax
movsd 0x2bc5b3(%rip), %xmm0   # 0x58bd78
movsd 0x252f8b(%rip), %xmm1   # 0x522758
movsd %xmm1, 0x10(%rsp)
cmpl $0x0, %eax
movsd %xmm0, 0x18(%rsp)
ja 0x2cf7ea
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movq 0x8(%rsp), %rsi
movl 0x4(%rsp), %edi
movsd 0x18(%rsp), %xmm0
movb 0x77(%rsp), %al
andb $0x1, %al
movzbl %al, %edx
callq 0x2b12f0
movl %eax, 0x60(%rsp)
movq 0x88(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x25cc10
cmpl $0x0, %eax
jne 0x2cf851
movl 0x60(%rsp), %ecx
movq 0x90(%rsp), %rax
movl %ecx, (%rax)
movq 0x68(%rsp), %rdi
movq 0x90(%rsp), %rax
movl (%rax), %edx
leaq 0x2bc665(%rip), %rsi    # 0x58beaa
movb $0x0, %al
callq 0xe7cd0
jmp 0x2cf8d8
movq 0x88(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x25cc10
movl %eax, %ecx
movq 0x90(%rsp), %rax
movl %ecx, (%rax)
movl 0x84(%rsp), %edi
movq 0x78(%rsp), %rsi
movb 0x55(%rsp), %cl
xorl %edx, %edx
movl $0x4, %eax
testb $0x1, %cl
cmovnel %eax, %edx
movb 0x77(%rsp), %al
andb $0x1, %al
movzbl %al, %ecx
callq 0x2b1450
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %edi
movq 0x90(%rsp), %rax
movl (%rax), %esi
movq 0xa0(%rsp), %rdx
callq 0x2b1580
cmpl $0x0, %eax
je 0x2cf8c4
movb $0x1, 0x67(%rsp)
jmp 0x2cf8d6
movq 0x68(%rsp), %rdi
movl 0x24(%rsp), %esi
movl 0x60(%rsp), %edx
callq 0x2b1620
jmp 0x2cf8d8
movb 0x67(%rsp), %dl
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testb $0x1, %dl
cmovnel %ecx, %eax
addq $0x98, %rsp
retq
nopw %cs:(%rax,%rax)