// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/match/sfx-mappedstr.c
// Function: gt_kmerstream_updatespecialpositions
static void gt_kmerstream_updatespecialpositions(GtKmerstream *spwp,
                                                 GtUchar charcode,
                                                 bool doshift,
                                                 GtUchar leftchar)
{
  if (doshift && !special_queue_is_empty(&spwp->specialqueue))
  {
    GtSpecialcontext *head = special_queue_head_get(&spwp->specialqueue);

    if (head->lengthofleftcontext > 0)
    {
      GT_SUBTRACTLCHARANDSHIFT(head->codeofleftcontext,leftchar,
                               spwp->numofchars,
                               spwp->multimappower[0]);
      head->lengthofleftcontext--;
    } else
    {
      special_queueu_head_delete(&spwp->specialqueue);
    }
  }
  if (GT_ISNOTSPECIAL(charcode))
  {
    if (spwp->lengthwithoutspecial == spwp->kmersize)
    {
      GT_SUBTRACTLCHARSHIFTADDNEXT(spwp->codewithoutspecial,
                                   leftchar,
                                   spwp->numofchars,
                                   spwp->multimappower[0],
                                   charcode);
    } else
    {
      spwp->codewithoutspecial
        += spwp->multimappower[spwp->lengthwithoutspecial][charcode];
      spwp->lengthwithoutspecial++;
    }
  } else
  {
    /* only here we add some element to the queue */
    unsigned int newelem_lengthofleftcontext
      = special_queue_is_empty(&spwp->specialqueue)
          ? (spwp->windowwidth - 1U)
          : spwp->lengthwithoutspecial;
    if (spwp->lengthwithoutspecial == spwp->kmersize)
    {
      GT_SUBTRACTLCHARANDSHIFT(spwp->codewithoutspecial,
                               leftchar,
                               spwp->numofchars,
                               spwp->multimappower[0]);
    }
    /* only here we add some element to the queue */
    gt_assert(newelem_lengthofleftcontext < spwp->kmersize);
    special_queue_enqueue(&spwp->specialqueue,
                          newelem_lengthofleftcontext,
                          spwp->codewithoutspecial);
    spwp->lengthwithoutspecial = 0;
    spwp->codewithoutspecial = 0;
  }
}

// Assembly:
movzbl %cl, %eax
testl %edx, %edx
je 0x19f112
movl 0x1c(%rdi), %r8d
testl %r8d, %r8d
je 0x19f112
movq 0x10(%rdi), %rcx
movl (%rcx), %edx
testl %edx, %edx
je 0x19f0ee
movq 0x8(%rcx), %r8
movq 0x68(%rdi), %r9
movq (%r9), %r9
subq (%r9,%rax,8), %r8
movl 0x40(%rdi), %r9d
imulq %r8, %r9
movq %r9, 0x8(%rcx)
decl %edx
movl %edx, (%rcx)
jmp 0x19f112
decl %r8d
movl %r8d, 0x1c(%rdi)
movq (%rdi), %rdx
cmpq %rdx, %rcx
ja 0x19f10a
movl 0x18(%rdi), %ecx
shlq $0x4, %rcx
addq %rcx, %rdx
movq %rdx, %rcx
addq $-0x10, %rcx
movq %rcx, 0x10(%rdi)
cmpb $-0x3, %sil
ja 0x19f142
movl 0x50(%rdi), %ecx
cmpl 0x44(%rdi), %ecx
jne 0x19f152
movq 0x58(%rdi), %rcx
movq 0x68(%rdi), %rdx
movq (%rdx), %rdx
subq (%rdx,%rax,8), %rcx
movl 0x40(%rdi), %eax
imulq %rcx, %rax
movzbl %sil, %ecx
addq %rax, %rcx
movq %rcx, 0x58(%rdi)
retq
movl 0x1c(%rdi), %ecx
testl %ecx, %ecx
je 0x19f16d
movl 0x50(%rdi), %r8d
movl %r8d, %edx
jmp 0x19f176
movq 0x68(%rdi), %rax
movq (%rax,%rcx,8), %rax
movzbl %sil, %edx
movq (%rax,%rdx,8), %rax
addq %rax, 0x58(%rdi)
leal 0x1(%rcx), %eax
movl %eax, 0x50(%rdi)
retq
movl 0x48(%rdi), %edx
movl 0x50(%rdi), %r8d
decl %edx
movl 0x44(%rdi), %esi
cmpl %esi, %r8d
jne 0x19f198
movq 0x58(%rdi), %r8
movq 0x68(%rdi), %r9
movq (%r9), %r9
subq (%r9,%rax,8), %r8
movl 0x40(%rdi), %eax
imulq %r8, %rax
movq %rax, 0x58(%rdi)
cmpl %esi, %edx
jae 0x19f1d6
movq 0x8(%rdi), %rax
movq 0x58(%rdi), %rsi
incl %ecx
movl %ecx, 0x1c(%rdi)
movq %rsi, 0x8(%rax)
movl %edx, (%rax)
movq (%rdi), %rcx
cmpq %rcx, %rax
ja 0x19f1c4
movl 0x18(%rdi), %eax
shlq $0x4, %rax
addq %rax, %rcx
movq %rcx, %rax
addq $-0x10, %rax
movq %rax, 0x8(%rdi)
andl $0x0, 0x50(%rdi)
andq $0x0, 0x58(%rdi)
retq
pushq %rax
movq 0x298d8a(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x145e2b(%rip), %rsi    # 0x2e5013
leaq 0x1b955e(%rip), %rdx    # 0x35874d
leaq 0x1b9584(%rip), %rcx    # 0x35877a
leaq 0x1b93f6(%rip), %r8     # 0x3585f3
movl $0x173, %r9d            # imm = 0x173
xorl %eax, %eax
callq 0x17a50
callq 0x17390