// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/sfx-lcpvalues.c
// Function: gt_Outlcpinfo_check_lcpvalues
void gt_Outlcpinfo_check_lcpvalues(const GtEncseq *encseq,
                                   GtReadmode readmode,
                                   const GtSuffixsortspace *sortedsample,
                                   GtUword effectivesamplesize,
                                   const GtOutlcpinfo *outlcpinfosample,
                                   bool checkequality)
{
  GT_UNUSED int cmp;
  GtUword idx, reallcp, startpos1, startpos2, currentlcp,
                GT_UNUSED totalcmpmissing = 0;

  if (effectivesamplesize == 0)
  {
    return;
  }
  startpos1 = gt_suffixsortspace_getdirect(sortedsample,0);
  for (idx=1UL; idx<effectivesamplesize; idx++)
  {
    startpos2 = gt_suffixsortspace_getdirect(sortedsample,idx);
    cmp = gt_encseq_check_comparetwosuffixes(encseq,
                                             readmode,
                                             &reallcp,
                                             false,
                                             false,
                                             0,
                                             startpos1,
                                             startpos2,
                                             NULL,
                                             NULL);
    gt_assert(cmp <= 0);
    gt_assert(GT_ISIBITSET(outlcpinfosample->lcpsubtab.tableoflcpvalues
                                                      .isset,idx));
    currentlcp = (GtUword) outlcpinfosample->lcpsubtab.tableoflcpvalues.
                                 bucketoflcpvalues[idx];
    if ((checkequality && currentlcp != reallcp) ||
        (!checkequality && currentlcp > reallcp))
    {
      fprintf(stderr,"idx="GT_WU",suffixpair="GT_WU","GT_WU": "
                     "currentlcp = "GT_WU" %s "GT_WU" = reallcp\n",
                      idx,startpos1,startpos2,currentlcp,
                      checkequality ? "!=" : ">",reallcp);
      gt_encseq_showatstartposwithdepth(stderr,encseq,readmode,startpos1,50UL);
      fprintf(stderr,"\n");
      gt_encseq_showatstartposwithdepth(stderr,encseq,readmode,startpos2,50UL);
      fprintf(stderr,"\n");
      exit(GT_EXIT_PROGRAMMING_ERROR);
    } else
    {
      totalcmpmissing += (reallcp - currentlcp);
    }
    startpos1 = startpos2;
  }
  /*printf("totalcmpmissing = "GT_WU"(avg=%.2f)\n",
         totalcmpmissing,(double) totalcmpmissing/effectivesamplesize);*/
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %r9d, 0x20(%rsp)
movl %esi, 0x24(%rsp)
movq %rdi, 0x28(%rsp)
testq %rcx, %rcx
je 0x1f6127
movq %r8, %r13
movq %rcx, %rbx
movq %rdx, %r14
movq %rdx, %rdi
xorl %esi, %esi
callq 0x205eeb
cmpq $0x1, %rbx
je 0x1f6127
movq %rax, %r12
movl $0x1, %ebp
movq %r14, %rdi
movq %rbp, %rsi
callq 0x205eeb
movq %rax, %r15
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsp)
movq %rax, 0x8(%rsp)
movq %r12, (%rsp)
movq 0x28(%rsp), %rdi
movl 0x24(%rsp), %esi
leaq 0x30(%rsp), %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0xf2285
testl %eax, %eax
jg 0x1f61d5
movq 0x40(%r13), %rax
movq %rbp, %rcx
shrq $0x6, %rcx
movq (%rax,%rcx,8), %rax
movl %ebp, %ecx
shlq %cl, %rax
shrq $0x3f, %rax
je 0x1f6136
movq 0x48(%r13), %rax
movl (%rax,%rbp,4), %r9d
movq 0x30(%rsp), %rax
xorl %ecx, %ecx
xorl %edx, %edx
cmpq %r9, %rax
setne %cl
setb %dl
cmpb $0x0, 0x20(%rsp)
cmovnel %ecx, %edx
cmpb $0x1, %dl
je 0x1f613b
incq %rbp
movq %r15, %r12
cmpq %rbp, %rbx
jne 0x1f6095
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x7a635
movq 0x2cde3e(%rip), %rbx    # 0x4c3f80
movq (%rbx), %rdi
leaq 0x1caf44(%rip), %rcx    # 0x3c1090
leaq 0x1d5af6(%rip), %rdx    # 0x3cbc49
cmpb $0x0, 0x20(%rsp)
cmovneq %rcx, %rdx
movq %rax, 0x8(%rsp)
movq %rdx, (%rsp)
leaq 0x1caee5(%rip), %rsi    # 0x3c1051
movq %rbp, %rdx
movq %r12, %rcx
movq %r15, %r8
xorl %eax, %eax
callq 0x17ab0
movq (%rbx), %rdi
movl $0x32, %r8d
movq 0x28(%rsp), %r14
movq %r14, %rsi
movl 0x24(%rsp), %ebp
movl %ebp, %edx
movq %r12, %rcx
callq 0xf1f39
movq (%rbx), %rsi
movl $0xa, %edi
callq 0x17980
movq (%rbx), %rdi
movl $0x32, %r8d
movq %r14, %rsi
movl %ebp, %edx
movq %r15, %rcx
callq 0xf1f39
movq (%rbx), %rsi
movl $0xa, %edi
callq 0x17980
movl $0x2, %edi
callq 0x17940
callq 0x7a5fc