// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/fmi-fwduni.c
// Function: gt_skfmuniqueforward
GtUword gt_skfmuniqueforward (const void *genericindex,
                                 GT_UNUSED GtUword offset,
                                 GT_UNUSED GtUword left,
                                 GT_UNUSED GtUword right,
                                 GT_UNUSED GtUword *witnessposition,
                                 const GtUchar *qstart,
                                 const GtUchar *qend)
{
  GtUchar cc;
  const GtUchar *qptr;
  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];
  while (qptr < qend && bwtbound.lbound + 1 < bwtbound.ubound)
  {
    cc = *qptr;
    if (GT_ISSPECIAL (cc))
    {
      return 0;
    }
    bwtbound.lbound = fmindex->tfreq[cc] +
                      fmoccurrence (fmindex, cc, bwtbound.lbound);
    bwtbound.ubound = fmindex->tfreq[cc] +
                      fmoccurrence (fmindex, cc, bwtbound.ubound);
    qptr++;
  }
  if (bwtbound.lbound + 1 == bwtbound.ubound)
  {
    return (GtUword) (qptr - qstart);
  }
  return 0;
}

// Assembly:
subq $0x78, %rsp
movq 0x80(%rsp), %rax
movq %rdi, 0x68(%rsp)
movq %rsi, 0x60(%rsp)
movq %rdx, 0x58(%rsp)
movq %rcx, 0x50(%rsp)
movq %r8, 0x48(%rsp)
movq %r9, 0x40(%rsp)
movq 0x68(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x40(%rsp), %rax
cmpq 0x80(%rsp), %rax
jb 0x24b25b
movq 0x3f0d76(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2caddf(%rip), %rsi    # 0x516013
leaq 0x32a2dc(%rip), %rdx    # 0x575517
leaq 0x32dab9(%rip), %rcx    # 0x578cfb
leaq 0x32dac7(%rip), %r8     # 0x578d10
movl $0x29, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x24b25d
movq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0x30(%rsp)
movb (%rax), %al
movb %al, 0x3f(%rsp)
movzbl 0x3f(%rsp), %eax
cmpl $0xfe, %eax
jl 0x24b298
movq $0x0, 0x70(%rsp)
jmp 0x24b3e0
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rax
movzbl 0x3f(%rsp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, 0x20(%rsp)
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rax
movzbl 0x3f(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rcx
xorl %eax, %eax
cmpq 0x80(%rsp), %rcx
movb %al, 0x17(%rsp)
jae 0x24b2f6
movq 0x20(%rsp), %rax
addq $0x1, %rax
cmpq 0x28(%rsp), %rax
setb %al
movb %al, 0x17(%rsp)
movb 0x17(%rsp), %al
testb $0x1, %al
jne 0x24b303
jmp 0x24b3b3
movq 0x30(%rsp), %rax
movb (%rax), %al
movb %al, 0x3f(%rsp)
movzbl 0x3f(%rsp), %eax
cmpl $0xfe, %eax
jl 0x24b328
movq $0x0, 0x70(%rsp)
jmp 0x24b3e0
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rax
movzbl 0x3f(%rsp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, (%rsp)
movq 0x18(%rsp), %rdi
movb 0x3f(%rsp), %al
movq 0x20(%rsp), %rdx
movzbl %al, %esi
callq 0x24b3f0
movq %rax, %rcx
movq (%rsp), %rax
addq %rcx, %rax
movq %rax, 0x20(%rsp)
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rax
movzbl 0x3f(%rsp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rdi
movb 0x3f(%rsp), %al
movq 0x28(%rsp), %rdx
movzbl %al, %esi
callq 0x24b3f0
movq %rax, %rcx
movq 0x8(%rsp), %rax
addq %rcx, %rax
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
jmp 0x24b2cc
movq 0x20(%rsp), %rax
addq $0x1, %rax
cmpq 0x28(%rsp), %rax
jne 0x24b3d7
movq 0x30(%rsp), %rax
movq 0x40(%rsp), %rcx
subq %rcx, %rax
movq %rax, 0x70(%rsp)
jmp 0x24b3e0
movq $0x0, 0x70(%rsp)
movq 0x70(%rsp), %rax
addq $0x78, %rsp
retq
nopw (%rax,%rax)