// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/sfx-suffixer.c
// Function: updatekmercount
static void updatekmercount(void *processinfo,
                            GtUword position,
                            const GtKmercode *kmercode)
{
  Sfxiterator *sfi = (Sfxiterator *) processinfo;

  gt_assert(sfi->sfxstrategy.spmopt_minlength == 0);
  if (kmercode->definedspecialposition)
  {
    if (sfi->storespecials)
    {
      if (kmercode->specialposition > 0)
      {
        if (sfi->sfxstrategy.storespecialcodes)
        {
          Codeatposition *cp;

          cp = sfi->spaceCodeatposition + sfi->nextfreeCodeatposition++;
          gt_assert(kmercode->code <= (GtCodetype) GT_MAXCODEVALUE);
          cp->code = (unsigned int) kmercode->code;
          gt_assert(kmercode->specialposition
                    <= (unsigned int) GT_MAXPREFIXLENGTH);
          cp->maxprefixindex = kmercode->specialposition;
          cp->position = position + kmercode->specialposition;
          /*
          printf("store(code=%u,maxprefixindex=%u,pos="GT_WU")\n",
                  cp->code,cp->maxprefixindex,cp->position);
          */
        }
        sfi->storespecials = false;
        gt_assert(kmercode->code > 0);
        gt_bcktab_leftborder_addcode(sfi->leftborder,kmercode->code);
      }
    } else
    {
      if (kmercode->specialposition > 0)
      {
        gt_assert(kmercode->code > 0);
        gt_bcktab_leftborder_addcode(sfi->leftborder,kmercode->code);
      } else
      {
        sfi->storespecials = true;
      }
    }
  } else
  {
#ifdef SKDEBUG
    if (kmercode->code == 0)
    {
      GtCodetype code2 = getencseqcode(sfi->encseq,
                                       sfi->readmode,
                                       gt_encseq_total_length(sfi->encseq),
                                       gt_bcktab_multimappower(sfi->bcktab),
                                       sfi->prefixlength,
                                       position);
      if (code2 != 0)
      {
        fprintf(stderr,"%s: ### position "GT_WU", code2 = "GT_WU" != 0\n",
                __func__, position,code2);
        fprintf(stderr,"previouscode = " FormatGtCodetype "\n",previouscode);
        if (previouskmercodedefined)
        {
          fprintf(stderr,"previouskmercodedefined = true\n");
          fprintf(stderr,"previousstorespecials = %s\n",
                  previousstorespecials ? "true" : "false");
          fprintf(stderr,"previousspecialpos = %u\n",previousspecialpos);
        }
        exit(GT_EXIT_PROGRAMMING_ERROR);
      }
    }
#endif
    gt_bcktab_leftborder_addcode(sfi->leftborder,kmercode->code);
  }
#ifdef SKDEBUG
  previouscode = kmercode->code;
  previouskmercodedefined = kmercode->defined;
  previousstorespecials = sfi->storespecials;
  previousspecialpos = kmercode->specialposition;
#endif
}

// Assembly:
pushq %rax
cmpl $0x0, 0x50(%rdi)
jne 0x202287
cmpb $0x1, (%rdx)
jne 0x20221b
movl 0x4(%rdx), %eax
cmpb $0x1, 0xf8(%rdi)
jne 0x202244
testl %eax, %eax
je 0x202285
cmpb $0x1, 0x55(%rdi)
jne 0x2021de
movq 0x100(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x100(%rdi)
movq 0x8(%rdx), %rcx
cmpq $0x10000000, %rcx       # imm = 0x10000000
jae 0x2022a5
shlq $0x4, %rax
addq 0x108(%rdi), %rax
movl (%rax), %r8d
shll $0x4, %ecx
andl $0xf, %r8d
orl %ecx, %r8d
movl %r8d, (%rax)
movl 0x4(%rdx), %r8d
cmpl $0xf, %r8d
jae 0x2022aa
orl %ecx, %r8d
movl %r8d, (%rax)
movl 0x4(%rdx), %ecx
addq %rsi, %rcx
movq %rcx, 0x8(%rax)
movb $0x0, 0xf8(%rdi)
movq 0x8(%rdx), %rax
testq %rax, %rax
je 0x202296
movq 0x80(%rdi), %rcx
testq %rcx, %rcx
je 0x2022a0
movq 0x8(%rcx), %rdx
testq %rdx, %rdx
jne 0x202266
movq (%rcx), %rcx
movl (%rcx,%rax,4), %edx
cmpl $-0x1, %edx
jne 0x202280
callq 0x7e836
movq 0x80(%rdi), %rcx
testq %rcx, %rcx
je 0x20228c
movq 0x8(%rdx), %rax
movq 0x8(%rcx), %rdx
testq %rdx, %rdx
jne 0x202266
movq (%rcx), %rcx
movl (%rcx,%rax,4), %edx
cmpl $-0x1, %edx
jne 0x202280
callq 0x7e6af
testl %eax, %eax
je 0x20226c
movq 0x8(%rdx), %rax
testq %rax, %rax
je 0x202291
movq 0x80(%rdi), %rcx
testq %rcx, %rcx
je 0x20229b
movq 0x8(%rcx), %rdx
testq %rdx, %rdx
je 0x202275
incq (%rdx,%rax,8)
jmp 0x202285
movb $0x1, 0xf8(%rdi)
jmp 0x202285
movq (%rcx), %rcx
movl (%rcx,%rax,4), %edx
cmpl $-0x1, %edx
je 0x2022af
incl %edx
movl %edx, (%rcx,%rax,4)
popq %rax
retq
callq 0x7e676
callq 0x7e6e6
callq 0x7e78b
callq 0x7e8a4
callq 0x7e754
callq 0x7e86d
callq 0x7e7c4
callq 0x7e7fd
callq 0x7e71d