// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/test-mappedstr.c
// Function: qgram2codefillspecial
static GtCodetype qgram2codefillspecial(unsigned int numofchars,
                                      unsigned int kmersize,
                                      const GtEncseq *encseq,
                                      GtReadmode readmode,
                                      GtUword startpos,
                                      GtUword totallength)
{
  GtCodetype integercode;
  GtUword pos;
  bool foundspecial;
  GtUchar cc;

  if (startpos >= totallength)
  {
    integercode = (GtCodetype) (numofchars - 1);
    foundspecial = true;
  } else
  {
    /* for testing */
    cc = gt_encseq_get_encoded_char(encseq,startpos,readmode);
    if (GT_ISSPECIAL(cc))
    {
      integercode = (GtCodetype) (numofchars - 1);
      foundspecial = true;
    } else
    {
      integercode = (GtCodetype) cc;
      foundspecial = false;
    }
  }
  for (pos = startpos + 1; pos < startpos + kmersize; pos++)
  {
    if (foundspecial)
    {
      ADDNEXTCHAR(integercode,numofchars-1,numofchars);
    } else
    {
      if (pos >= totallength)
      {
        ADDNEXTCHAR(integercode,numofchars-1,numofchars);
        foundspecial = true;
      } else
      {
        /* for testing */
        cc = gt_encseq_get_encoded_char(encseq,pos,readmode);
        if (GT_ISSPECIAL(cc))
        {
          ADDNEXTCHAR(integercode,numofchars-1,numofchars);
          foundspecial = true;
        } else
        {
          ADDNEXTCHAR(integercode,cc,numofchars);
        }
      }
    }
  }
  return integercode;
}

// Assembly:
subq $0x48, %rsp
movl %edi, 0x44(%rsp)
movl %esi, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movl %ecx, 0x34(%rsp)
movq %r8, 0x28(%rsp)
movq %r9, 0x20(%rsp)
movq 0x28(%rsp), %rax
cmpq 0x20(%rsp), %rax
jb 0x2f14a0
movl 0x44(%rsp), %eax
subl $0x1, %eax
movl %eax, %eax
movq %rax, 0x18(%rsp)
movb $0x1, 0xf(%rsp)
jmp 0x2f14e9
movq 0x38(%rsp), %rdi
movq 0x28(%rsp), %rsi
movl 0x34(%rsp), %edx
callq 0xa9da0
movb %al, 0xe(%rsp)
movzbl 0xe(%rsp), %eax
cmpl $0xfe, %eax
jl 0x2f14d8
movl 0x44(%rsp), %eax
subl $0x1, %eax
movl %eax, %eax
movq %rax, 0x18(%rsp)
movb $0x1, 0xf(%rsp)
jmp 0x2f14e7
movzbl 0xe(%rsp), %eax
movq %rax, 0x18(%rsp)
movb $0x0, 0xf(%rsp)
jmp 0x2f14e9
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq 0x28(%rsp), %rcx
movl 0x40(%rsp), %edx
addq %rdx, %rcx
cmpq %rcx, %rax
jae 0x2f1674
testb $0x1, 0xf(%rsp)
je 0x2f155e
cmpl $0x4, 0x44(%rsp)
jne 0x2f153b
movq 0x18(%rsp), %rax
shlq $0x2, %rax
movl 0x44(%rsp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
orq %rcx, %rax
movq %rax, 0x18(%rsp)
jmp 0x2f1559
movq 0x18(%rsp), %rax
movl 0x44(%rsp), %ecx
imulq %rcx, %rax
movl 0x44(%rsp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, 0x18(%rsp)
jmp 0x2f165f
movq 0x10(%rsp), %rax
cmpq 0x20(%rsp), %rax
jb 0x2f15b5
cmpl $0x4, 0x44(%rsp)
jne 0x2f158d
movq 0x18(%rsp), %rax
shlq $0x2, %rax
movl 0x44(%rsp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
orq %rcx, %rax
movq %rax, 0x18(%rsp)
jmp 0x2f15ab
movq 0x18(%rsp), %rax
movl 0x44(%rsp), %ecx
imulq %rcx, %rax
movl 0x44(%rsp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, 0x18(%rsp)
movb $0x1, 0xf(%rsp)
jmp 0x2f165d
movq 0x38(%rsp), %rdi
movq 0x10(%rsp), %rsi
movl 0x34(%rsp), %edx
callq 0xa9da0
movb %al, 0xe(%rsp)
movzbl 0xe(%rsp), %eax
cmpl $0xfe, %eax
jl 0x2f1620
cmpl $0x4, 0x44(%rsp)
jne 0x2f15fb
movq 0x18(%rsp), %rax
shlq $0x2, %rax
movl 0x44(%rsp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
orq %rcx, %rax
movq %rax, 0x18(%rsp)
jmp 0x2f1619
movq 0x18(%rsp), %rax
movl 0x44(%rsp), %ecx
imulq %rcx, %rax
movl 0x44(%rsp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, 0x18(%rsp)
movb $0x1, 0xf(%rsp)
jmp 0x2f165b
cmpl $0x4, 0x44(%rsp)
jne 0x2f163f
movq 0x18(%rsp), %rax
shlq $0x2, %rax
movzbl 0xe(%rsp), %ecx
orq %rcx, %rax
movq %rax, 0x18(%rsp)
jmp 0x2f1659
movq 0x18(%rsp), %rax
movl 0x44(%rsp), %ecx
imulq %rcx, %rax
movzbl 0xe(%rsp), %ecx
addq %rcx, %rax
movq %rax, 0x18(%rsp)
jmp 0x2f165b
jmp 0x2f165d
jmp 0x2f165f
jmp 0x2f1661
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x2f14f7
movq 0x18(%rsp), %rax
addq $0x48, %rsp
retq
nop