// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/twobits2kmers.c
// Function: gt_encseq_faststream_kmers
static void gt_encseq_faststream_kmers(const GtEncseq *encseq,
                                       Bitstreamreadmode bsrsmode,
                                       unsigned int kmersize)
{
  GtUword totallength, pos;
  GtCodetype kmer;
  GtKmercodeiterator *kmercodeiterator = NULL;
  const GtKmercode *kmercodeptr;
  const GtTwobitencoding *twobitencoding;
  Multicharacterbitstreamstate mcbs;

  gt_assert(kmersize <= (unsigned int) GT_UNITSIN2BITENC);
  totallength = gt_encseq_total_length(encseq);
  if (totallength < (GtUword) kmersize)
  {
    return;
  }
  twobitencoding = gt_encseq_twobitencoding_export(encseq);
  if (bsrsmode == BSRS_reader_multi ||
      bsrsmode == BSRS_stream_reader_multi)
  {
    kmercodeiterator = gt_kmercodeiterator_encseq_new(encseq,
                                                      GT_READMODE_FORWARD,
                                                      kmersize,0);
  }
  switch (bsrsmode)
  {
    case BSRS_reader_multi:
      {
        uint64_t kmersum = 0;

        for (pos = 0; pos <= totallength - (GtUword) kmersize; pos++)
        {
          kmercodeptr = gt_kmercodeiterator_encseq_next(kmercodeiterator);
          gt_assert(kmercodeptr != NULL);
          kmersum += (uint64_t) kmercodeptr->code;
        }
        printf("kmersum=" Formatuint64_t "\n",PRINTuint64_tcast(kmersum));
        break;
      }
    case BSRS_stream_reader_multi:
      mcbs_init(&mcbs,twobitencoding,kmersize);
      for (pos = 0; pos <= totallength - (GtUword) kmersize; pos++)
      {
        kmer = mcbs_next(&mcbs,kmersize);
        READNEXTCODEANDCHECKIGNORESPECIAL(pos);
      }
      break;
    case BSRS_stream_reader_multi3:
      multireadmode_getencseqkmers_twobitencoding(encseq,kmersize);
      break;
    case BSRS_hashfirstcodes:
      hashfirstcodes_getencseqkmers_twobitencoding(encseq,kmersize);
      break;
    default:
      break;
  }
  gt_kmercodeiterator_delete(kmercodeiterator);
}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movl %esi, 0x6c(%rsp)
movl %edx, 0x68(%rsp)
movq $0x0, 0x48(%rsp)
cmpl $0x20, 0x68(%rsp)
jbe 0x2f3bc9
movq 0x348408(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x222471(%rip), %rsi    # 0x516013
leaq 0x284588(%rip), %rdx    # 0x578131
leaq 0x29bca4(%rip), %rcx    # 0x58f854
leaq 0x29bc3b(%rip), %r8     # 0x58f7f2
movl $0xc6, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2f3bcb
movq 0x70(%rsp), %rdi
callq 0xa9d00
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
movl 0x68(%rsp), %ecx
cmpq %rcx, %rax
jae 0x2f3bed
jmp 0x2f3e64
movq 0x70(%rsp), %rdi
callq 0xb5250
movq %rax, 0x38(%rsp)
cmpl $0x4, 0x6c(%rsp)
je 0x2f3c0a
cmpl $0x5, 0x6c(%rsp)
jne 0x2f3c23
movq 0x70(%rsp), %rdi
movl 0x68(%rsp), %edx
xorl %esi, %esi
xorl %eax, %eax
movl %eax, %ecx
callq 0x2ca880
movq %rax, 0x48(%rsp)
movl 0x6c(%rsp), %eax
addl $-0x4, %eax
movl %eax, %ecx
movq %rcx, (%rsp)
subl $0x3, %eax
ja 0x2f3e58
movq (%rsp), %rax
leaq 0x29bb44(%rip), %rcx    # 0x58f788
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq $0x0, 0x8(%rsp)
movq $0x0, 0x58(%rsp)
movq 0x58(%rsp), %rax
movq 0x60(%rsp), %rcx
movl 0x68(%rsp), %edx
subq %rdx, %rcx
cmpq %rcx, %rax
ja 0x2f3cec
movq 0x48(%rsp), %rdi
callq 0x2cac00
movq %rax, 0x40(%rsp)
cmpq $0x0, 0x40(%rsp)
jne 0x2f3cc4
movq 0x34830d(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x222376(%rip), %rsi    # 0x516013
leaq 0x29bbcb(%rip), %rdx    # 0x58f86f
leaq 0x29bba9(%rip), %rcx    # 0x58f854
leaq 0x29bb40(%rip), %r8     # 0x58f7f2
movl $0xdd, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2f3cc6
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rax
addq 0x8(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x58(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x58(%rsp)
jmp 0x2f3c5f
movq 0x8(%rsp), %rsi
leaq 0x29bb8b(%rip), %rdi    # 0x58f883
movb $0x0, %al
callq 0x19070
jmp 0x2f3e5a
movq 0x38(%rsp), %rsi
movl 0x68(%rsp), %edx
leaq 0x10(%rsp), %rdi
callq 0x2f3e90
movq $0x0, 0x58(%rsp)
movq 0x58(%rsp), %rax
movq 0x60(%rsp), %rcx
movl 0x68(%rsp), %edx
subq %rdx, %rcx
cmpq %rcx, %rax
ja 0x2f3e36
movl 0x68(%rsp), %esi
leaq 0x10(%rsp), %rdi
callq 0x2f3f20
movq %rax, 0x50(%rsp)
cmpq $0x0, 0x48(%rsp)
jne 0x2f3d8d
movq 0x348244(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2222ad(%rip), %rsi    # 0x516013
leaq 0x29bb23(%rip), %rdx    # 0x58f890
leaq 0x29bae0(%rip), %rcx    # 0x58f854
leaq 0x29ba77(%rip), %r8     # 0x58f7f2
movl $0xe8, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2f3d8f
movq 0x48(%rsp), %rdi
callq 0x2cac00
movq %rax, 0x40(%rsp)
cmpq $0x0, 0x40(%rsp)
jne 0x2f3dde
movq 0x3481f3(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x22225c(%rip), %rsi    # 0x516013
leaq 0x29bab1(%rip), %rdx    # 0x58f86f
leaq 0x29ba8f(%rip), %rcx    # 0x58f854
leaq 0x29ba26(%rip), %r8     # 0x58f7f2
movl $0xe8, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2f3de0
movq 0x40(%rsp), %rax
testb $0x1, (%rax)
jne 0x2f3e21
movq 0x50(%rsp), %rax
movq 0x40(%rsp), %rcx
cmpq 0x8(%rcx), %rax
je 0x2f3e21
movq 0x58(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rcx
movl $0xe8, %edi
callq 0x2f4030
movl $0x2, %edi
callq 0x19890
jmp 0x2f3e23
movq 0x58(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x58(%rsp)
jmp 0x2f3d20
jmp 0x2f3e5a
movq 0x70(%rsp), %rdi
movl 0x68(%rsp), %esi
callq 0x2f4110
jmp 0x2f3e5a
movq 0x70(%rsp), %rdi
movl 0x68(%rsp), %esi
callq 0x4d0dc0
jmp 0x2f3e5a
jmp 0x2f3e5a
movq 0x48(%rsp), %rdi
callq 0x2cb300
addq $0x78, %rsp
retq
nopl (%rax)