// File: /workspace/github_c_makefile_star2_O1/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, %r14
movq %r8, %r15
movl %ecx, 0xc(%rsp)
movq %rdx, %r12
movl %esi, %ebp
movq %rdi, %rbx
movq 0x88(%rsp), %r8
movq $0x0, (%rsp)
testq %r8, %r8
je 0x1ab92e
movq %r8, %rdi
movq %r8, %r13
callq 0x101a9a
testb %al, %al
movq %r13, %r8
jne 0x1aba7b
movq %r15, 0x10(%rsp)
movq %r14, 0x18(%rsp)
movq 0x80(%rsp), %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rsp)
movq $0x0, 0x40(%rsp)
testq %r12, %r12
je 0x1ab99b
leaq 0x20(%rsp), %r14
movl %ebp, %r13d
movl %ebp, (%r14)
movq %r12, 0x8(%r14)
leaq 0x119(%rip), %rsi       # 0x1aba85
movq %rbx, %rdi
movq %r14, %rdx
movq %rcx, %rbp
callq 0x1a9780
testl %eax, %eax
setne %r15b
movq 0x10(%r14), %rdi
movq 0x20(%r14), %rsi
leaq 0xb57(%rip), %rcx       # 0x1ac4e6
movl $0x18, %edx
callq 0x17f60
jmp 0x1ab9a4
movl %ebp, %r13d
movq %rcx, %rbp
xorl %r15d, %r15d
testb %r15b, %r15b
jne 0x1ab9db
movzbl 0xc(%rsp), %edx
movq %rbx, %rdi
movl $0x87, %esi
movq %rbp, %rcx
movq 0x88(%rsp), %r8
callq 0x1ae094
movq %rax, (%rsp)
testq %rax, %rax
movzbl %r15b, %eax
movl $0x1, %r15d
cmovnel %eax, %r15d
testb %r15b, %r15b
jne 0x1aba29
testq %r12, %r12
je 0x1ab9fb
movq (%rsp), %rax
testq %rax, %rax
je 0x1aba80
leaq 0x20(%rsp), %rcx
movq %rcx, 0x48(%rax)
movq (%rsp), %rdi
movl %r13d, %esi
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rcx
movq 0x88(%rsp), %r8
callq 0x1ab866
testl %eax, %eax
movzbl %r15b, %eax
movl $0x1, %r15d
cmovel %eax, %r15d
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x1aba57
leaq 0x30(%rsp), %rbx
leaq 0x2020db(%rip), %rsi    # 0x3adb1a
movl $0x2b7, %edx            # imm = 0x2B7
callq 0x109670
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
cmpq $0x0, (%rsp)
je 0x1aba66
movq %rsp, %rdi
callq 0x1ae1ac
movzbl %r15b, %eax
negl %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x633a5
callq 0x633de