// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x28, %rsp
movb %cl, %al
movb %dl, %cl
movb %sil, %dl
movq %rdi, 0x20(%rsp)
movb %dl, 0x1f(%rsp)
andb $0x1, %cl
movb %cl, 0x1e(%rsp)
movb %al, 0x1d(%rsp)
testb $0x1, 0x1e(%rsp)
je 0x2ca6dc
movq 0x20(%rsp), %rdi
callq 0x2cb810
testb $0x1, %al
jne 0x2ca6dc
movq 0x20(%rsp), %rdi
callq 0x2cb840
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpl $0x0, (%rax)
jbe 0x2ca6d0
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rcx
movq 0x20(%rsp), %rax
movq 0x68(%rax), %rax
movq (%rax), %rax
movzbl 0x1d(%rsp), %edx
movl %edx, %edx
subq (%rax,%rdx,8), %rcx
movq 0x20(%rsp), %rax
movl 0x40(%rax), %eax
imulq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x10(%rsp), %rax
movl (%rax), %ecx
addl $-0x1, %ecx
movl %ecx, (%rax)
jmp 0x2ca6da
movq 0x20(%rsp), %rdi
callq 0x2cb850
jmp 0x2ca6dc
movzbl 0x1f(%rsp), %eax
cmpl $0xfe, %eax
jge 0x2ca77b
movq 0x20(%rsp), %rax
movl 0x50(%rax), %eax
movq 0x20(%rsp), %rcx
cmpl 0x44(%rcx), %eax
jne 0x2ca73d
movq 0x20(%rsp), %rax
movq 0x58(%rax), %rcx
movq 0x20(%rsp), %rax
movq 0x68(%rax), %rax
movq (%rax), %rax
movzbl 0x1d(%rsp), %edx
movl %edx, %edx
subq (%rax,%rdx,8), %rcx
movq 0x20(%rsp), %rax
movl 0x40(%rax), %eax
imulq %rax, %rcx
movzbl 0x1f(%rsp), %eax
addq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x58(%rax)
jmp 0x2ca776
movq 0x20(%rsp), %rax
movq 0x68(%rax), %rax
movq 0x20(%rsp), %rcx
movl 0x50(%rcx), %ecx
movq (%rax,%rcx,8), %rax
movzbl 0x1f(%rsp), %ecx
movq (%rax,%rcx,8), %rcx
movq 0x20(%rsp), %rax
addq 0x58(%rax), %rcx
movq %rcx, 0x58(%rax)
movq 0x20(%rsp), %rax
movl 0x50(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x50(%rax)
jmp 0x2ca871
movq 0x20(%rsp), %rdi
callq 0x2cb810
testb $0x1, %al
jne 0x2ca78b
jmp 0x2ca79c
movq 0x20(%rsp), %rax
movl 0x48(%rax), %eax
subl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x2ca7a8
movq 0x20(%rsp), %rax
movl 0x50(%rax), %eax
movl %eax, 0x8(%rsp)
movl 0x8(%rsp), %eax
movl %eax, 0xc(%rsp)
movq 0x20(%rsp), %rax
movl 0x50(%rax), %eax
movq 0x20(%rsp), %rcx
cmpl 0x44(%rcx), %eax
jne 0x2ca7f7
movq 0x20(%rsp), %rax
movq 0x58(%rax), %rcx
movq 0x20(%rsp), %rax
movq 0x68(%rax), %rax
movq (%rax), %rax
movzbl 0x1d(%rsp), %edx
movl %edx, %edx
subq (%rax,%rdx,8), %rcx
movq 0x20(%rsp), %rax
movl 0x40(%rax), %eax
imulq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x58(%rax)
jmp 0x2ca7f9
movl 0xc(%rsp), %eax
movq 0x20(%rsp), %rcx
cmpl 0x44(%rcx), %eax
jb 0x2ca83f
movq 0x371792(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x24b7fb(%rip), %rsi    # 0x516013
leaq 0x2c0a66(%rip), %rdx    # 0x58b285
leaq 0x2c0a8c(%rip), %rcx    # 0x58b2b2
leaq 0x2c08fe(%rip), %r8     # 0x58b12b
movl $0x173, %r9d            # imm = 0x173
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2ca841
movq 0x20(%rsp), %rdi
movl 0xc(%rsp), %esi
movq 0x20(%rsp), %rax
movq 0x58(%rax), %rdx
callq 0x2cb8b0
movq 0x20(%rsp), %rax
movl $0x0, 0x50(%rax)
movq 0x20(%rsp), %rax
movq $0x0, 0x58(%rax)
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)