// File: /workspace/github_c_makefile_star2_O1/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 0xf1c71
movq %rax, %r12
movq %r14, %rdi
callq 0xfac80
movl %eax, %ebx
movq %r14, %rdi
callq 0xec1d8
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 0xfac0f
cmpl $0x2, %eax
movq %r12, 0x20(%rsp)
jne 0x31c0c3
movq %r13, %r12
movq %r14, %rdi
callq 0xfac12
movl %ebp, %ecx
cmpq %rcx, %rax
jb 0x31c1b4
cmpq $0x0, 0x10(%rsp)
movq 0x20(%rsp), %r14
je 0x31c1a0
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 0x31c1b9
movl %r13d, %ecx
movq %rbp, %rax
addq 0x8(%rsp), %rbx
cmpq 0x10(%rsp), %rbx
jb 0x31c08a
jmp 0x31c1a0
movl %ebp, 0x8(%rsp)
movq %r13, %rbp
movq %r14, %rdi
callq 0xef27f
movl %r15d, %r13d
testb %al, %al
je 0x31c16e
movq %r14, %rdi
movl $0x1, %esi
callq 0xef3d9
leaq 0x28(%rsp), %r14
movq %rax, %rbx
movq %rax, %rdi
movq %r14, %rsi
callq 0xef451
movq (%r14), %r8
cmpq 0x10(%rsp), %r8
setb %cl
andb %al, %cl
xorl %r14d, %r14d
cmpb $0x1, %cl
jne 0x31c15d
subq %r14, %r8
jb 0x31c1af
cmpq %r13, %r8
jb 0x31c13b
movq %rbp, (%rsp)
movq %r12, %rdi
movl 0x8(%rsp), %esi
movl %r15d, %edx
movq %r14, %rcx
movq 0x18(%rsp), %r9
callq 0x31c1b9
movq 0x30(%rsp), %r14
movq %rbx, %rdi
leaq 0x28(%rsp), %rsi
callq 0xef451
testb %al, %al
je 0x31c15d
movq 0x28(%rsp), %r8
cmpq 0x10(%rsp), %r8
jb 0x31c112
movq %rbp, %r12
movl 0x8(%rsp), %ebp
movq %rbx, %rdi
callq 0xefa48
jmp 0x31c178
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 0x31c1a0
movl %ebp, %esi
movq %r12, (%rsp)
movl %r15d, %edx
movq %r14, %rcx
callq 0x31c1b9
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x92d30
callq 0x92d69