// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/match/fmi-fwduni.c
// Function: gt_skfmmstats
GtUword gt_skfmmstats (const void *genericindex,
                          GT_UNUSED GtUword offset,
                          GT_UNUSED GtUword left,
                          GT_UNUSED GtUword right,
                          GtUword *witnessposition,
                          const GtUchar *qstart,
                          const GtUchar *qend)
{
  GtUchar cc;
  const GtUchar *qptr;
  GtUword prevlbound;
  GtUword matchlength;
  GtUwordBound bwtbound;
  const Fmindex *fmindex = (Fmindex *) genericindex;

  gt_assert(qstart < qend);
  qptr = qstart;
  cc = *qptr;
  if (GT_ISSPECIAL(cc))
  {
    return 0;
  }
  bwtbound.lbound = fmindex->tfreq[cc];
  bwtbound.ubound = fmindex->tfreq[cc+1];
  if (bwtbound.lbound >= bwtbound.ubound)
  {
    return 0;
  }
  prevlbound = bwtbound.lbound;
  for (qptr++; qptr < qend; qptr++)
  {
    cc = *qptr;
    if (GT_ISSPECIAL (cc))
    {
      break;
    }
    bwtbound.lbound = fmindex->tfreq[cc] +
                      fmoccurrence (fmindex, cc, bwtbound.lbound);
    bwtbound.ubound = fmindex->tfreq[cc] +
                      fmoccurrence (fmindex, cc, bwtbound.ubound);
    if (bwtbound.lbound >= bwtbound.ubound)
    {
      break;
    }
    prevlbound = bwtbound.lbound;
  }
  matchlength = (GtUword) (qptr - qstart);
  if (witnessposition != NULL)
  {
    GtUword startpos = gt_fmfindtextpos (fmindex,prevlbound);
    gt_assert((fmindex->bwtlength-1) >= (startpos + matchlength));
    *witnessposition = (fmindex->bwtlength-1) - (startpos + matchlength);
  }
  return matchlength;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, 0x8(%rsp)
cmpq 0x70(%rsp), %r9
jae 0x15ad8e
movq %r9, %r15
movzbl (%r9), %eax
cmpq $0xfd, %rax
ja 0x15ad79
movq 0x8(%rsp), %rcx
movq 0x18(%rcx), %rcx
movq (%rcx,%rax,8), %rbp
movq 0x8(%rcx,%rax,8), %r12
cmpq %r12, %rbp
jae 0x15ad79
movq %r8, 0x10(%rsp)
incq %r15
pushq $-0x1
popq %rax
pushq $-0x2
popq %rcx
movq %rbp, %rdx
movq %rax, %r8
movq %rcx, %r13
cmpq 0x70(%rsp), %r15
jae 0x15ad38
movzbl (%r15), %ebx
cmpq $0xfd, %rbx
ja 0x15ad38
movq %r13, 0x30(%rsp)
movq 0x8(%rsp), %r13
movq 0x18(%r13), %rax
leal (,%rbx,8), %r14d
movq (%rax,%r14), %rax
movq %rax, 0x18(%rsp)
movq %r13, %rdi
movl %ebx, %esi
movq %r8, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
callq 0x15aa03
movq %rax, %rbp
addq 0x18(%rsp), %rbp
movq 0x18(%r13), %rax
movq (%rax,%r14), %r14
movq %r13, %rdi
movq 0x30(%rsp), %r13
movl %ebx, %esi
movq %r12, %rdx
callq 0x15aa03
movq 0x20(%rsp), %rdx
movq 0x28(%rsp), %r8
movq %rax, %r12
addq %r14, %r12
leaq -0x1(%r8), %rax
leaq -0x1(%r13), %rcx
incq %r15
cmpq %r12, %rbp
jb 0x15ac9e
movq %r8, %r15
negq %r15
movq 0x10(%rsp), %rbx
testq %rbx, %rbx
je 0x15ad7c
movq 0x8(%rsp), %r14
movq %r14, %rdi
movq %rdx, %rsi
movq %r8, %r12
callq 0x15adf0
movq 0x10(%r14), %rcx
leaq -0x1(%rcx), %rdx
movq %rax, %rsi
subq %r12, %rsi
cmpq %rsi, %rdx
jb 0x15adc4
subq %rax, %rcx
addq %r13, %rcx
movq %rcx, (%rbx)
jmp 0x15ad7c
xorl %r15d, %r15d
movq %r15, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2dd1d3(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x18a274(%rip), %rsi    # 0x2e5013
leaq 0x1e8412(%rip), %rdx    # 0x3431b8
leaq 0x1ebb24(%rip), %rcx    # 0x3468d1
leaq 0x1ebb06(%rip), %r8     # 0x3468ba
pushq $0x55
popq %r9
xorl %eax, %eax
callq 0x17a50
callq 0x17390
movq 0x2dd19d(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x18a23e(%rip), %rsi    # 0x2e5013
leaq 0x1ebb03(%rip), %rdx    # 0x3468df
leaq 0x1ebaee(%rip), %rcx    # 0x3468d1
leaq 0x1ebad0(%rip), %r8     # 0x3468ba
pushq $0x78
jmp 0x15adb6
nop