// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x88, %rsp
movq %rdi, 0x80(%rsp)
movq %rsi, 0x78(%rsp)
movl %edx, 0x74(%rsp)
movq %rcx, 0x68(%rsp)
movq %r8, 0x60(%rsp)
movq %r9, 0x58(%rsp)
movb $0x0, 0x57(%rsp)
movq 0x78(%rsp), %rdi
callq 0xa9d00
movq %rax, 0x38(%rsp)
movq 0x78(%rsp), %rdi
callq 0xb2530
movq %rax, 0x28(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x28(%rsp), %rax
cmpq 0x38(%rsp), %rax
jbe 0x2c9257
movq 0x372d7a(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x24cde3(%rip), %rsi    # 0x516013
leaq 0x2c1a33(%rip), %rdx    # 0x58ac6a
leaq 0x2c1a44(%rip), %rcx    # 0x58ac82
leaq 0x2c193d(%rip), %r8     # 0x58ab82
movl $0x231, %r9d            # imm = 0x231
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2c9259
movq 0x38(%rsp), %rax
subq 0x28(%rsp), %rax
movq %rax, 0x40(%rsp)
cmpq $0x0, 0x40(%rsp)
jbe 0x2c92a9
movq 0x78(%rsp), %rsi
movl 0x74(%rsp), %edx
movq 0x40(%rsp), %rcx
movq 0x38(%rsp), %r8
movq 0x68(%rsp), %r9
xorl %eax, %eax
movl %eax, %edi
callq 0x2c8530
movq %rax, 0x20(%rsp)
movq 0x60(%rsp), %rdi
leaq 0x2c19fb(%rip), %rsi    # 0x58ac9d
movb $0x0, %al
callq 0xe7cd0
movq 0x80(%rsp), %rdi
movq 0x60(%rsp), %rcx
movq 0x58(%rsp), %r8
movl $0x4, %esi
movl $0x1, %edx
callq 0x23b3e0
movq %rax, 0x48(%rsp)
cmpq $0x0, 0x48(%rsp)
jne 0x2c92dc
movb $0x1, 0x57(%rsp)
movq $0x1, 0x30(%rsp)
movq 0x48(%rsp), %rsi
movq 0x58(%rsp), %rdx
leaq 0x10(%rsp), %rdi
callq 0x23b640
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jge 0x2c930e
movb $0x1, 0x57(%rsp)
jmp 0x2c9394
cmpl $0x0, 0xc(%rsp)
jne 0x2c9317
jmp 0x2c9394
movq 0x30(%rsp), %rax
cmpq 0x40(%rsp), %rax
jae 0x2c9339
movq 0x20(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0xa20c0
movq %rax, 0x18(%rsp)
jmp 0x2c9342
movq $0x0, 0x18(%rsp)
movq 0x18(%rsp), %rax
cmpq 0x10(%rsp), %rax
je 0x2c937f
movq 0x372c4b(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
movq 0x30(%rsp), %rdx
movq 0x18(%rsp), %rcx
movq 0x10(%rsp), %r8
leaq 0x2c1963(%rip), %rsi    # 0x58acd1
movb $0x0, %al
callq 0x199f0
movl $0x2, %edi
callq 0x19890
jmp 0x2c9381
movq 0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
jmp 0x2c92e5
movq 0x60(%rsp), %rdi
leaq 0x2c1959(%rip), %rsi    # 0x58acf9
movb $0x0, %al
callq 0xe7cd0
cmpq $0x0, 0x48(%rsp)
je 0x2c93b9
leaq 0x48(%rsp), %rdi
callq 0x23b5e0
movq 0x20(%rsp), %rdi
callq 0xa2080
movb 0x57(%rsp), %dl
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testb $0x1, %dl
cmovnel %ecx, %eax
addq $0x88, %rsp
retq
nopl (%rax)