// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/dist-short.c
// Function: gt_forwardprefixmatch
Definedunsignedlong gt_forwardprefixmatch(const GtEncseq *encseq,
                                       unsigned int alphasize,
                                       GtUword startpos,
                                       bool nowildcards,
                                       GtUword *eqsvector,
                                       const GtUchar *useq,
                                       GtUword ulen,
                                       GtUword maxdistance)
{
  DECLARELOCALVARS;
  GtUword pos, totallength = gt_encseq_total_length(encseq);
  GtUchar cc;
  Definedunsignedlong result;

  gt_initeqsvector(eqsvector,(GtUword) alphasize,useq,ulen);
  gt_assert(maxdistance > 0);
  for (pos = startpos; /* Nothing */; pos++)
  {
    gt_assert(pos - startpos <= (GtUword) (ulen + maxdistance));
    cc = gt_encseq_get_encoded_char(encseq,pos,GT_READMODE_FORWARD);
    if (nowildcards && cc == (GtUchar) GT_WILDCARD)
    {
      result.defined = false;
      result.valueunsignedlong = 0;
      return result;
    }
    COMPUTENEWDIST(cc);
    if (distval <= maxdistance || pos == totallength-1)
    {
      break;
    }
  }
  result.defined = true;
  result.valueunsignedlong = (GtUword) (pos - startpos + 1);
  return result;
}

// Assembly:
subq $0xa8, %rsp
movb %cl, %al
movq 0xb8(%rsp), %rcx
movq 0xb0(%rsp), %rcx
movq %rdi, 0x90(%rsp)
movl %esi, 0x8c(%rsp)
movq %rdx, 0x80(%rsp)
andb $0x1, %al
movb %al, 0x7f(%rsp)
movq %r8, 0x70(%rsp)
movq %r9, 0x68(%rsp)
movq $-0x1, 0x60(%rsp)
movq $0x0, 0x58(%rsp)
movq 0xb0(%rsp), %rcx
subq $0x1, %rcx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, 0x28(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x90(%rsp), %rdi
callq 0xa9d00
movq %rax, 0x10(%rsp)
movq 0x70(%rsp), %rdi
movl 0x8c(%rsp), %eax
movl %eax, %esi
movq 0x68(%rsp), %rdx
movq 0xb0(%rsp), %rcx
callq 0x4d1d10
cmpq $0x0, 0xb8(%rsp)
ja 0x4a467d
movq 0x197954(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x719bd(%rip), %rsi     # 0x516013
leaq 0x1117db(%rip), %rdx    # 0x5b5e38
leaq 0x1117fa(%rip), %rcx    # 0x5b5e5e
leaq 0x111777(%rip), %r8     # 0x5b5de2
movl $0x96, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4a467f
movq 0x80(%rsp), %rax
movq %rax, 0x18(%rsp)
jmp 0x4a468e
movq 0x18(%rsp), %rax
subq 0x80(%rsp), %rax
movq 0xb0(%rsp), %rcx
addq 0xb8(%rsp), %rcx
cmpq %rcx, %rax
jbe 0x4a46e8
movq 0x1978e9(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x71952(%rip), %rsi     # 0x516013
leaq 0x1117ac(%rip), %rdx    # 0x5b5e74
leaq 0x11178f(%rip), %rcx    # 0x5b5e5e
leaq 0x11170c(%rip), %r8     # 0x5b5de2
movl $0x99, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4a46ea
movq 0x90(%rsp), %rdi
movq 0x18(%rsp), %rsi
xorl %edx, %edx
callq 0xa9da0
movb %al, 0xf(%rsp)
testb $0x1, 0x7f(%rsp)
je 0x4a472e
movzbl 0xf(%rsp), %eax
cmpl $0xfe, %eax
jne 0x4a472e
movb $0x0, 0x98(%rsp)
movq $0x0, 0xa0(%rsp)
jmp 0x4a48cf
jmp 0x4a4730
movzbl 0xf(%rsp), %eax
cmpl $0xff, %eax
jne 0x4a4774
movq 0x19785d(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x718c6(%rip), %rsi     # 0x516013
leaq 0x1116a5(%rip), %rdx    # 0x5b5df9
leaq 0x111703(%rip), %rcx    # 0x5b5e5e
leaq 0x111680(%rip), %r8     # 0x5b5de2
movl $0xa1, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4a4776
movzbl 0xf(%rsp), %eax
cmpl $0xfe, %eax
je 0x4a4797
movq 0x70(%rsp), %rax
movzbl 0xf(%rsp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, 0x50(%rsp)
jmp 0x4a47a0
movq $0x0, 0x50(%rsp)
movq 0x50(%rsp), %rax
orq 0x58(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x50(%rsp), %rax
andq 0x60(%rsp), %rax
addq 0x60(%rsp), %rax
xorq 0x60(%rsp), %rax
orq 0x50(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x58(%rsp), %rax
movq 0x40(%rsp), %rcx
orq 0x60(%rsp), %rcx
xorq $-0x1, %rcx
orq %rcx, %rax
movq %rax, 0x38(%rsp)
movq 0x60(%rsp), %rax
andq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x38(%rsp), %rax
andq 0x28(%rsp), %rax
cmpq $0x0, %rax
je 0x4a4817
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0x4a4837
movq 0x30(%rsp), %rax
andq 0x28(%rsp), %rax
cmpq $0x0, %rax
je 0x4a4835
movq 0x20(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0x4a4837
movq 0x38(%rsp), %rax
shlq %rax
orq $0x1, %rax
movq %rax, 0x38(%rsp)
movq 0x30(%rsp), %rax
shlq %rax
movq 0x48(%rsp), %rcx
orq 0x38(%rsp), %rcx
xorq $-0x1, %rcx
orq %rcx, %rax
movq %rax, 0x60(%rsp)
movq 0x38(%rsp), %rax
andq 0x48(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x20(%rsp), %rax
cmpq 0xb8(%rsp), %rax
jbe 0x4a4897
movq 0x18(%rsp), %rax
movq 0x10(%rsp), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
jne 0x4a4899
jmp 0x4a48ae
jmp 0x4a489b
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
jmp 0x4a468c
movb $0x1, 0x98(%rsp)
movq 0x18(%rsp), %rax
subq 0x80(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xa0(%rsp)
movb 0x98(%rsp), %al
movq 0xa0(%rsp), %rdx
addq $0xa8, %rsp
retq
nopw %cs:(%rax,%rax)