// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x68, %rsp
movb %cl, %al
movq 0x78(%rsp), %rcx
movq 0x70(%rsp), %rcx
movq %rdi, 0x60(%rsp)
movl %esi, 0x5c(%rsp)
movq %rdx, 0x50(%rsp)
andb $0x1, %al
movb %al, 0x4f(%rsp)
movq %r8, 0x40(%rsp)
movq %r9, 0x38(%rsp)
movb $0x0, 0x37(%rsp)
movq $0x0, 0x28(%rsp)
cmpq $0x0, 0x78(%rsp)
je 0x2360fc
movq 0x78(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x2360c4
jmp 0x2360fc
movq 0x405ed5(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2dff3e(%rip), %rsi    # 0x516013
leaq 0x2e00e3(%rip), %rdx    # 0x5161bf
leaq 0x340ce8(%rip), %rcx    # 0x576dcb
leaq 0x340c56(%rip), %r8     # 0x576d40
movl $0x285, %r9d            # imm = 0x285
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2360fe
jmp 0x236100
movq $0x0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movq $0x0, 0x18(%rsp)
cmpq $0x0, 0x50(%rsp)
jbe 0x23616b
movl 0x5c(%rsp), %eax
movl %eax, (%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x60(%rsp), %rdi
movq 0x70(%rsp), %rcx
movq 0x78(%rsp), %r8
leaq 0x156(%rip), %rsi       # 0x2362a0
movq %rsp, %rdx
callq 0x2328f0
cmpl $0x0, %eax
je 0x23615c
movb $0x1, 0x37(%rsp)
movq 0x10(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x236500
testb $0x1, 0x37(%rsp)
jne 0x2361a8
movq 0x60(%rsp), %rdi
movb 0x4f(%rsp), %al
movq 0x70(%rsp), %rcx
movq 0x78(%rsp), %r8
movl $0x87, %esi
andb $0x1, %al
movzbl %al, %edx
callq 0x23b3e0
movq %rax, 0x28(%rsp)
cmpq $0x0, 0x28(%rsp)
jne 0x2361a6
movb $0x1, 0x37(%rsp)
jmp 0x2361a8
testb $0x1, 0x37(%rsp)
jne 0x236234
cmpq $0x0, 0x50(%rsp)
jbe 0x23620b
jmp 0x2361bd
cmpq $0x0, 0x28(%rsp)
jne 0x2361fd
movq 0x405dd4(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2dfe3d(%rip), %rsi    # 0x516013
leaq 0x2f4a7e(%rip), %rdx    # 0x52ac5b
leaq 0x340be7(%rip), %rcx    # 0x576dcb
leaq 0x340b55(%rip), %r8     # 0x576d40
movl $0x2ab, %r9d            # imm = 0x2AB
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2361ff
movq 0x28(%rsp), %rax
movq %rsp, %rcx
movq %rcx, 0x48(%rax)
movq 0x28(%rsp), %rdi
movl 0x5c(%rsp), %esi
movq 0x40(%rsp), %rdx
movq 0x38(%rsp), %rcx
movq 0x78(%rsp), %r8
callq 0x235ee0
cmpl $0x0, %eax
je 0x236232
movb $0x1, 0x37(%rsp)
jmp 0x236234
jmp 0x236236
cmpq $0x0, 0x10(%rsp)
je 0x23626f
movq 0x10(%rsp), %rdi
leaq 0x340af6(%rip), %rsi    # 0x576d40
movl $0x2b7, %edx            # imm = 0x2B7
callq 0xe88c0
movq $0x0, 0x18(%rsp)
movq $0x0, 0x20(%rsp)
movq $0x0, 0x10(%rsp)
jmp 0x236271
cmpq $0x0, 0x28(%rsp)
je 0x236283
leaq 0x28(%rsp), %rdi
callq 0x23b5e0
movb 0x37(%rsp), %dl
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testb $0x1, %dl
cmovnel %ecx, %eax
addq $0x68, %rsp
retq
nopl (%rax)