// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/firstcodes-accum.c
// Function: gt_firstcodes_accum_runkmerscan
void gt_firstcodes_accum_runkmerscan(const GtEncseq *encseq,
                                     unsigned int kmersize,
                                     unsigned int minmatchlength,
                                     GtCodeposbuffer *buf)
{
  const GtTwobitencoding *twobitencoding
    = gt_encseq_twobitencoding_export(encseq);
  GtUword totallength, maxunitindex;

  if (gt_encseq_is_mirrored(encseq))
  {
    totallength = (gt_encseq_total_length(encseq)-1)/2;
  } else
  {
    totallength = gt_encseq_total_length(encseq);
  }
  maxunitindex = gt_unitsoftwobitencoding(totallength) - 1;
  if (gt_encseq_accesstype_get(encseq) == GT_ACCESS_TYPE_EQUALLENGTH)
  {
    GtUword equallength = gt_encseq_equallength(encseq);

    gt_assert(equallength >= (GtUword) kmersize);
    gt_firstcodes_accum_kmerscan_eqlen(twobitencoding,
                                       equallength,
                                       totallength,
                                       maxunitindex,
                                       kmersize,
                                       minmatchlength,
                                       buf);
  } else
  {
    gt_firstcodes_accum_kmerscan(encseq,
                                 twobitencoding,
                                 totallength,
                                 maxunitindex,
                                 kmersize,
                                 minmatchlength,
                                 buf);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r13
movl %edx, %r15d
movl %esi, %ebp
movq %rdi, %r14
callq 0xed62d
movq %rax, %r12
movq %r14, %rdi
callq 0xf6567
movl %eax, %ebx
movq %r14, %rdi
callq 0xe7b9c
leaq -0x1(%rax), %rcx
shrq %rcx
testb %bl, %bl
cmoveq %rax, %rcx
leaq -0x1(%rcx), %rax
shrq $0x5, %rax
incq %rax
movq %rcx, 0x10(%rsp)
cmpq $0x20, %rcx
movl $0x1, %ecx
cmovaeq %rax, %rcx
movq %rcx, 0x18(%rsp)
movq %r14, %rdi
callq 0xf64f6
cmpl $0x2, %eax
movq %r12, 0x20(%rsp)
jne 0x311d7f
movq %r13, %r12
movq %r14, %rdi
callq 0xf64f9
movl %ebp, %ecx
cmpq %rcx, %rax
jb 0x311e70
cmpq $0x0, 0x10(%rsp)
movq 0x20(%rsp), %r14
je 0x311e5c
movl %r15d, %ecx
movl %ebp, %r15d
movq %rax, %rsi
incq %rsi
movq %rsi, 0x8(%rsp)
xorl %ebx, %ebx
movq %r12, (%rsp)
movq %r14, %rdi
movl %r15d, %esi
movl %ecx, %r13d
movl %ecx, %edx
movq %rbx, %rcx
movq %rax, %rbp
movq %rax, %r8
movq 0x18(%rsp), %r9
callq 0x311e75
movl %r13d, %ecx
movq %rbp, %rax
addq 0x8(%rsp), %rbx
cmpq 0x10(%rsp), %rbx
jb 0x311d46
jmp 0x311e5c
movl %ebp, 0x8(%rsp)
movq %r13, %rbp
movq %r14, %rdi
callq 0xeacd6
movl %r15d, %r13d
testb %al, %al
je 0x311e2a
movq %r14, %rdi
movl $0x1, %esi
callq 0xeae2c
leaq 0x28(%rsp), %r14
movq %rax, %rbx
movq %rax, %rdi
movq %r14, %rsi
callq 0xeae9a
movq (%r14), %r8
cmpq 0x10(%rsp), %r8
setb %cl
andb %al, %cl
xorl %r14d, %r14d
cmpb $0x1, %cl
jne 0x311e19
subq %r14, %r8
jb 0x311e6b
cmpq %r13, %r8
jb 0x311df7
movq %rbp, (%rsp)
movq %r12, %rdi
movl 0x8(%rsp), %esi
movl %r15d, %edx
movq %r14, %rcx
movq 0x18(%rsp), %r9
callq 0x311e75
movq 0x30(%rsp), %r14
movq %rbx, %rdi
leaq 0x28(%rsp), %rsi
callq 0xeae9a
testb %al, %al
je 0x311e19
movq 0x28(%rsp), %r8
cmpq 0x10(%rsp), %r8
jb 0x311dce
movq %rbp, %r12
movl 0x8(%rsp), %ebp
movq %rbx, %rdi
callq 0xeb455
jmp 0x311e34
movq %rbp, %r12
movl 0x8(%rsp), %ebp
xorl %r14d, %r14d
movq 0x10(%rsp), %r8
subq %r14, %r8
cmpq %r13, %r8
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %r9
jb 0x311e5c
movl %ebp, %esi
movq %r12, (%rsp)
movl %r15d, %edx
movq %r14, %rcx
callq 0x311e75
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x90e8f
callq 0x90ec8