// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/match/sfx-linlcp.c
// Function: gt_lcptab_lightweightcheck
int gt_lcptab_lightweightcheck(const char *esaindexname,
                               const GtEncseq *encseq,
                               GtReadmode readmode,
                               const ESASuffixptr *suftab,
                               GtLogger *logger,
                               GtError *err)
{
  bool haserr = false;
  Sequentialsuffixarrayreader *ssar;
  GtUword partwidth, totallength = gt_encseq_total_length(encseq),
                idx, specials = gt_encseq_specialcharacters(encseq);
  GtCompactUlongStore *lcptab = NULL;

  gt_assert(specials <= totallength);
  partwidth = totallength - specials;
  if (partwidth > 0)
  {
    lcptab = gt_ENCSEQ_lcp9_manzini(NULL,
                                    encseq,
                                    readmode,
                                    partwidth,
                                    totallength,
                                    suftab);
    gt_logger_log(logger,
                  "computed reference lcp table with manzini algorithm");
  }
  ssar = gt_newSequentialsuffixarrayreaderfromfile(esaindexname,
                                                   SARR_LCPTAB,
                                                   true,
                                                   logger,
                                                   err);
  if (ssar == NULL)
  {
    haserr = true;
  }
  for (idx = 1UL; /* Nothing */; idx++)
  {
    GtUword mlcpvalue, lcpvalue;
    int retval = gt_nextSequentiallcpvalue(&lcpvalue, ssar, err);

    if (retval < 0)
    {
      haserr = true;
      break;
    }
    if (retval == 0)
    {
      break;
    }
    if (idx < partwidth)
    {
      mlcpvalue = gt_compact_ulong_store_get(lcptab, idx);
    } else
    {
      mlcpvalue = 0;
    }
    if (mlcpvalue != lcpvalue)
    {
      fprintf(stderr, ""GT_WU": mlcpvalue = "GT_WU" != "GT_WU" = lcpvalue\n",
                       idx, mlcpvalue, lcpvalue);
      exit(GT_EXIT_PROGRAMMING_ERROR);
    }
  }
  gt_logger_log(logger, "compare lcp-values against reference");
  if (ssar != NULL)
  {
    gt_freeSequentialsuffixarrayreader(&ssar);
  }
  gt_compact_ulong_store_delete(lcptab);
  return haserr ? -1 : 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %r14
movq %r8, (%rsp)
movq %rcx, %r15
movl %edx, %ebp
movq %rsi, %r13
movq %rdi, 0x10(%rsp)
movq %rsi, %rdi
callq 0x7055e
movq %rax, %rbx
movq %r13, %rdi
callq 0x760bc
cmpq %rax, %rbx
jb 0x19e7ab
movq $0x0, 0x8(%rsp)
movq %rbx, %r12
subq %rax, %r12
jne 0x19e6a5
xorl %r15d, %r15d
movq (%rsp), %rbx
jmp 0x19e6d2
xorl %edi, %edi
movq %r13, %rsi
movl %ebp, %edx
movq %r12, %rcx
movq %rbx, %r8
movq %r15, %r9
callq 0x19dd21
movq %rax, %r15
leaq 0x1b9ac8(%rip), %rsi    # 0x35818c
movq (%rsp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x92e71
pushq $0x4
popq %rsi
pushq $0x1
popq %rdx
movq 0x10(%rsp), %rdi
movq %rbx, %rcx
movq %r14, %r8
callq 0x1516ac
movq %rax, %r13
cmpq $0x1, %rax
movq 0x8(%rsp), %rax
sbbl %eax, %eax
movq %rax, 0x8(%rsp)
movq %r13, 0x20(%rsp)
pushq $0x1
popq %rbx
leaq 0x18(%rsp), %rbp
movq %rbp, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x151824
testl %eax, %eax
js 0x19e73f
je 0x19e744
cmpq %r12, %rbx
jae 0x19e72e
movq %r15, %rdi
movq %rbx, %rsi
callq 0x6bb8d
jmp 0x19e730
xorl %eax, %eax
movq 0x18(%rsp), %r8
cmpq %r8, %rax
jne 0x19e785
incq %rbx
jmp 0x19e708
pushq $-0x1
popq %rbx
jmp 0x19e74b
movq 0x8(%rsp), %rax
movl %eax, %ebx
leaq 0x1b9a96(%rip), %rsi    # 0x3581e8
movq (%rsp), %rdi
xorl %eax, %eax
callq 0x92e71
testq %r13, %r13
je 0x19e76c
leaq 0x20(%rsp), %rdi
callq 0x1517e5
movq %r15, %rdi
callq 0x6bb56
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2997dc(%rip), %rcx    # 0x437f68
movq (%rcx), %rdi
leaq 0x1b9a2a(%rip), %rsi    # 0x3581c0
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x17a50
pushq $0x2
popq %rdi
callq 0x178f0
movq 0x2997b6(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x146857(%rip), %rsi    # 0x2e5013
leaq 0x1b9996(%rip), %rdx    # 0x358159
leaq 0x1b99a7(%rip), %rcx    # 0x358171
leaq 0x1b98a0(%rip), %r8     # 0x358071
movl $0x231, %r9d            # imm = 0x231
xorl %eax, %eax
callq 0x17a50
callq 0x17390
nop