// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/eis-voiditf.c
// Function: gt_pck_getShuStringLength
GtUword gt_pck_getShuStringLength(const FMindex *bwtSubject,
                                       const GtUchar *suffix,
                                       GtUword suffixLength)
{
  GtUwordPair occPair;
  Symbol curChar;
  const GtUchar *qptr, *qend;
  const MRAEnc *alphabet;
  GtUword start, end;

  gt_assert(bwtSubject && suffix);
  alphabet = BWTSeqGetAlphabet((const BWTSeq *) bwtSubject);

  qptr = suffix;
  qend = suffix + suffixLength;

  curChar = MRAEncMapSymbol(alphabet, *qptr);

  qptr++;
  start = ((const BWTSeq *) bwtSubject)->count[curChar];
  end = ((const BWTSeq *) bwtSubject)->count[curChar + 1];
  for (/* Nothing */; start < end && qptr < qend; qptr++)
  {
    curChar = MRAEncMapSymbol(alphabet, *qptr);
    occPair = BWTSeqTransformedPosPairOcc((const BWTSeq *) bwtSubject,
                                          curChar,
                                          start,
                                          end);
    start = ((const BWTSeq *) bwtSubject)->count[curChar] + occPair.a;
    end = ((const BWTSeq *) bwtSubject)->count[curChar] + occPair.b;
  }
  if (qptr == qend && start < end)
    return suffixLength + 1;
  else
    return qptr - suffix;
}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x68(%rsp)
movq %rsi, 0x60(%rsp)
movq %rdx, 0x58(%rsp)
cmpq $0x0, 0x68(%rsp)
je 0x230d53
cmpq $0x0, 0x60(%rsp)
jne 0x230d8b
movq 0x40b246(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2e52af(%rip), %rsi    # 0x516013
leaq 0x34594d(%rip), %rdx    # 0x5766b8
leaq 0x34595b(%rip), %rcx    # 0x5766cd
leaq 0x3457a8(%rip), %r8     # 0x576521
movl $0x204, %r9d            # imm = 0x204
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x230d8d
movq 0x68(%rsp), %rdi
callq 0x230810
movq %rax, 0x28(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0x60(%rsp), %rax
addq 0x58(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x28(%rsp), %rdi
movq 0x38(%rsp), %rax
movzbl (%rax), %esi
callq 0x230f20
movb %al, 0x47(%rsp)
movq 0x38(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x38(%rsp)
movq 0x68(%rsp), %rax
movq 0x38(%rax), %rax
movzbl 0x47(%rsp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, 0x20(%rsp)
movq 0x68(%rsp), %rax
movq 0x38(%rax), %rax
movzbl 0x47(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rcx
xorl %eax, %eax
cmpq 0x18(%rsp), %rcx
movb %al, 0x7(%rsp)
jae 0x230e30
movq 0x38(%rsp), %rax
cmpq 0x30(%rsp), %rax
setb %al
movb %al, 0x7(%rsp)
movb 0x7(%rsp), %al
testb $0x1, %al
jne 0x230e3d
jmp 0x230ed7
movq 0x28(%rsp), %rdi
movq 0x38(%rsp), %rax
movzbl (%rax), %esi
callq 0x230f20
movb %al, 0x47(%rsp)
movq 0x68(%rsp), %rdi
movb 0x47(%rsp), %al
movq 0x20(%rsp), %rdx
movq 0x18(%rsp), %rcx
movzbl %al, %esi
callq 0x230f60
movq %rax, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x68(%rsp), %rax
movq 0x38(%rax), %rax
movzbl 0x47(%rsp), %ecx
movq (%rax,%rcx,8), %rax
addq 0x48(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x68(%rsp), %rax
movq 0x38(%rax), %rax
movzbl 0x47(%rsp), %ecx
movq (%rax,%rcx,8), %rax
addq 0x50(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x38(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x38(%rsp)
jmp 0x230e0d
movq 0x38(%rsp), %rax
cmpq 0x30(%rsp), %rax
jne 0x230eff
movq 0x20(%rsp), %rax
cmpq 0x18(%rsp), %rax
jae 0x230eff
movq 0x58(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x70(%rsp)
jmp 0x230f11
movq 0x38(%rsp), %rax
movq 0x60(%rsp), %rcx
subq %rcx, %rax
movq %rax, 0x70(%rsp)
movq 0x70(%rsp), %rax
addq $0x78, %rsp
retq
nopl (%rax,%rax)