// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/esa-maxpairs.c
// Function: gt_callenummaxpairs
int gt_callenummaxpairs(const char *indexname,
                        unsigned int userdefinedleastlength,
                        GtUword maxfreq,
                        bool scanfile,
                        GtProcessmaxpairs processmaxpairs,
                        void *processmaxpairsinfo,
                        GtLogger *logger,
                        GtError *err)
{
  bool haserr = false;
  Sequentialsuffixarrayreader *ssar = NULL;
  GtMaxfreqcollect maxfreqcollect;

  gt_error_check(err);
  GT_INITARRAY(&maxfreqcollect.arr,Lcpinterval);
  if (maxfreq > 0)
  {
    maxfreqcollect.userdefinedleastlength = userdefinedleastlength;
    maxfreqcollect.maxfreq = maxfreq;
    if (gt_runenumlcpvalues_process(indexname,
                                    collectmaxfreqintervals,
                                    &maxfreqcollect,
                                    logger,
                                    err) != 0)
    {
      haserr = true;
    }
    sortLcpintervals(maxfreqcollect.arr.spaceLcpinterval,
                     maxfreqcollect.arr.nextfreeLcpinterval);
    /*showcollectedintervals(maxfreqcollect.arr.spaceLcpinterval,
                           maxfreqcollect.arr.nextfreeLcpinterval);*/
  }
  if (!haserr)
  {
    ssar = gt_newSequentialsuffixarrayreaderfromfile(indexname,
                                                     SARR_LCPTAB |
                                                     SARR_SUFTAB |
                                                     SARR_ESQTAB |
                                                     SARR_SSPTAB,
                                                     scanfile,
                                                     logger,
                                                     err);
    if (ssar == NULL)
    {
      haserr = true;
    }
  }
  if (!haserr)
  {
    if (maxfreq > 0)
    {
      gt_assert(ssar != NULL);
      ssar->extrainfo = &maxfreqcollect;
    }
    if (gt_enumeratemaxpairs(ssar,
                             userdefinedleastlength,
                             processmaxpairs,
                             processmaxpairsinfo,
                             err) != 0)
    {
      haserr = true;
    }
  }
  GT_FREEARRAY(&maxfreqcollect.arr,Lcpinterval);
  if (ssar != NULL)
  {
    gt_freeSequentialsuffixarrayreader(&ssar);
  }
  return haserr ? -1 : 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, %rbp
movq %r8, %r15
movl %ecx, 0xc(%rsp)
movq %rdx, %r12
movl %esi, 0x8(%rsp)
movq %rdi, 0x10(%rsp)
movq 0x88(%rsp), %rbx
movq $0x0, 0x18(%rsp)
testq %rbx, %rbx
je 0x1a2f57
movq %rbx, %rdi
callq 0xfcc32
testb %al, %al
jne 0x1a309a
movq 0x80(%rsp), %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
testq %r12, %r12
je 0x1a2fdb
leaq 0x20(%rsp), %r14
movl 0x8(%rsp), %eax
movl %eax, (%r14)
movq %r12, 0x8(%r14)
leaq 0x118(%rip), %rsi       # 0x1a30a4
movq 0x10(%rsp), %rdi
movq %r14, %rdx
movq %rcx, %r13
movq %rbx, %r8
callq 0x1a0f78
movq %r15, %rbx
movq %rbp, %r15
movl %eax, %ebp
movq 0x10(%r14), %rdi
movq 0x20(%r14), %rsi
leaq 0xb50(%rip), %rcx       # 0x1a3b06
movl $0x18, %edx
callq 0x17f60
movq %r13, %rcx
movb $0x1, %r13b
movb $0x1, %r14b
testl %ebp, %ebp
movq %r15, %rbp
movq %rbx, %r15
movq 0x88(%rsp), %rbx
jne 0x1a3048
movzbl 0xc(%rsp), %edx
movq 0x10(%rsp), %rdi
movl $0x87, %esi
movq %rbx, %r13
movq %rbx, %r8
callq 0x1a5580
movq %rax, 0x18(%rsp)
xorl %ebx, %ebx
testq %rax, %rax
sete %r14b
je 0x1a3045
testq %r12, %r12
je 0x1a301c
testq %rax, %rax
je 0x1a309f
leaq 0x20(%rsp), %rcx
movq %rcx, 0x48(%rax)
movq %rax, %rdi
movl 0x8(%rsp), %esi
movq %r15, %rdx
movq %rbp, %rcx
movq %r13, %r8
callq 0x1a2e90
testl %eax, %eax
movb %r14b, %bl
movl $0x1, %r14d
cmovel %ebx, %r14d
xorl %r13d, %r13d
jmp 0x1a3048
movb $0x1, %r13b
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x1a3076
leaq 0x30(%rsp), %rbx
leaq 0x20151d(%rip), %rsi    # 0x3a457b
movl $0x2b7, %edx            # imm = 0x2B7
callq 0x1045eb
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
testb %r13b, %r13b
jne 0x1a3085
leaq 0x18(%rsp), %rdi
callq 0x1a5698
movzbl %r14b, %eax
negl %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x61d38
callq 0x61d71