// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x88, %rsp
movb %r9b, %al
movq %rdi, 0x80(%rsp)
movl %esi, 0x7c(%rsp)
movq %rdx, 0x70(%rsp)
movq %rcx, 0x68(%rsp)
movq %r8, 0x60(%rsp)
andb $0x1, %al
movb %al, 0x5f(%rsp)
movq $0x0, 0x28(%rsp)
cmpq $0x0, 0x68(%rsp)
jne 0x2c6851
jmp 0x2c6ae0
movq 0x70(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2e9a60
movq %rax, 0x40(%rsp)
movq $0x1, 0x50(%rsp)
movq 0x50(%rsp), %rax
cmpq 0x68(%rsp), %rax
jae 0x2c6ae0
movq 0x70(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0x2e9a60
movq %rax, 0x38(%rsp)
movq 0x80(%rsp), %rdi
movl 0x7c(%rsp), %esi
movq 0x40(%rsp), %r10
movq 0x38(%rsp), %rax
leaq 0x48(%rsp), %rdx
xorl %r8d, %r8d
xorl %ecx, %ecx
movl %ecx, %r9d
movl %r8d, %ecx
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
callq 0xb5f40
movl %eax, 0x58(%rsp)
cmpl $0x0, 0x58(%rsp)
jle 0x2c691a
movq 0x3756b7(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x24f720(%rip), %rsi    # 0x516013
leaq 0x2b23c5(%rip), %rdx    # 0x578cbf
leaq 0x2c3fd9(%rip), %rcx    # 0x58a8da
leaq 0x2c3f00(%rip), %r8     # 0x58a808
movl $0x216, %r9d            # imm = 0x216
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2c691c
jmp 0x2c691e
movq 0x60(%rsp), %rax
movq 0x40(%rax), %rax
movq 0x50(%rsp), %rcx
shrq $0x6, %rcx
movq (%rax,%rcx,8), %rax
movq 0x50(%rsp), %rcx
andq $0x3f, %rcx
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
shrq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x2c698e
movq 0x375643(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x24f6ac(%rip), %rsi    # 0x516013
leaq 0x2c3f8a(%rip), %rdx    # 0x58a8f8
leaq 0x2c3f65(%rip), %rcx    # 0x58a8da
leaq 0x2c3e8c(%rip), %r8     # 0x58a808
movl $0x218, %r9d            # imm = 0x218
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2c6990
movq 0x60(%rsp), %rax
movq 0x48(%rax), %rax
movq 0x50(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movq %rax, 0x30(%rsp)
testb $0x1, 0x5f(%rsp)
je 0x2c69b9
movq 0x30(%rsp), %rax
cmpq 0x48(%rsp), %rax
jne 0x2c69d4
testb $0x1, 0x5f(%rsp)
jne 0x2c6aaf
movq 0x30(%rsp), %rax
cmpq 0x48(%rsp), %rax
jbe 0x2c6aaf
movq 0x3755c5(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
movq 0x50(%rsp), %rdx
movq 0x40(%rsp), %rcx
movq 0x38(%rsp), %r8
movq 0x30(%rsp), %r9
movb 0x5f(%rsp), %sil
leaq 0x2ceea4(%rip), %r10    # 0x5958a2
leaq 0x2c3f78(%rip), %rax    # 0x58a97d
testb $0x1, %sil
cmovneq %rax, %r10
movq 0x48(%rsp), %rax
leaq 0x2c3f25(%rip), %rsi    # 0x58a93e
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0x199f0
movq 0x375570(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
movq 0x80(%rsp), %rsi
movl 0x7c(%rsp), %edx
movq 0x40(%rsp), %rcx
movl $0x32, %r8d
callq 0xb5850
movq 0x37554a(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2cc813(%rip), %rsi    # 0x593273
movb $0x0, %al
callq 0x199f0
movq 0x375532(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
movq 0x80(%rsp), %rsi
movl 0x7c(%rsp), %edx
movq 0x38(%rsp), %rcx
movl $0x32, %r8d
callq 0xb5850
movq 0x37550c(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2cc7d5(%rip), %rsi    # 0x593273
movb $0x0, %al
callq 0x199f0
movl $0x2, %edi
callq 0x19890
movq 0x48(%rsp), %rax
subq 0x30(%rsp), %rax
addq 0x28(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x38(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x50(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x50(%rsp)
jmp 0x2c686d
addq $0x88, %rsp
retq
nopl (%rax,%rax)