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

  gt_assert(minmatchlength>=kmersize);
  if (gt_encseq_is_mirrored(encseq))
  {
    totallength = (gt_encseq_total_length(encseq)-1)/2;
  } else
  {
    totallength = gt_encseq_total_length(encseq);
  }
  numofsequences = gt_encseq_num_of_sequences(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_insert_kmerscan_eqlen(twobitencoding,
                                        equallength,
                                        totallength,
                                        numofsequences,
                                        maxunitindex,
                                        kmersize,
                                        minmatchlength,
                                        buf);
  } else
  {
    gt_firstcodes_insert_kmerscan(encseq,
                                  twobitencoding,
                                  totallength,
                                  numofsequences,
                                  maxunitindex,
                                  kmersize,
                                  minmatchlength,
                                  buf);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, (%rsp)
movl %edx, %r12d
movl %esi, %r15d
movq %rdi, %rbx
callq 0xf1c71
movq %rax, 0x30(%rsp)
cmpl %r15d, %r12d
jb 0x31e934
movq %rbx, %rdi
callq 0xfac80
movl %eax, %ebp
movq %rbx, %rdi
callq 0xec1d8
leaq -0x1(%rax), %r14
shrq %r14
testb %bpl, %bpl
cmoveq %rax, %r14
movq %rbx, %rdi
callq 0xec1e8
movq %rax, %r13
leaq -0x1(%r14), %rax
shrq $0x5, %rax
incq %rax
movq %r14, 0x8(%rsp)
cmpq $0x20, %r14
movl $0x1, %r14d
cmovaeq %rax, %r14
movq %rbx, %rdi
callq 0xfac0f
cmpl $0x2, %eax
movq %r14, 0x28(%rsp)
jne 0x31e7ff
movq %r13, 0x18(%rsp)
movl %r12d, %ebp
movq (%rsp), %r12
movq %rbx, %rdi
callq 0xfac12
movl %r15d, %ecx
cmpq %rcx, %rax
jb 0x31e939
cmpq $0x0, 0x8(%rsp)
movq %r12, %r10
movq 0x28(%rsp), %r11
movq 0x18(%rsp), %r12
je 0x31e920
movl %r15d, %r13d
movl %ebp, %ebx
movq %rax, %rcx
incq %rcx
movq %rcx, 0x20(%rsp)
decq %r12
xorl %r15d, %r15d
xorl %ebp, %ebp
subq $0x8, %rsp
movq 0x38(%rsp), %rdi
movl %r13d, %esi
movl %ebx, %edx
movq %r15, %rcx
movq %rax, %r14
movq %rax, %r8
movq %rbp, %r9
pushq %r10
pushq %r11
pushq %r12
callq 0x31e93e
movq 0x48(%rsp), %r11
movq 0x20(%rsp), %r10
movq %r14, %rax
addq $0x20, %rsp
incq %rbp
decq %r12
addq 0x20(%rsp), %r15
cmpq 0x8(%rsp), %r15
jb 0x31e7b2
jmp 0x31e920
movq %rbx, %rdi
callq 0xef27f
movl %r12d, %ecx
movq %rcx, 0x20(%rsp)
testb %al, %al
movl %r15d, 0x14(%rsp)
je 0x31e8bd
movl %r12d, 0x18(%rsp)
movq %rbx, %rdi
movl $0x1, %esi
callq 0xef3d9
leaq 0x38(%rsp), %rbx
movq %rax, %r12
movq %rax, %rdi
movq %rbx, %rsi
callq 0xef451
movq (%rbx), %r8
cmpq 0x8(%rsp), %r8
setb %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x31e8cb
leaq -0x1(%r13), %rbp
xorl %r15d, %r15d
xorl %ebx, %ebx
subq %r15, %r8
jb 0x31e92f
cmpq 0x20(%rsp), %r8
jb 0x31e893
subq $0x8, %rsp
movq 0x38(%rsp), %rdi
movl 0x1c(%rsp), %esi
movl 0x20(%rsp), %edx
movq %r15, %rcx
movq %rbx, %r9
pushq 0x8(%rsp)
pushq %r14
pushq %rbp
callq 0x31e93e
addq $0x20, %rsp
movq 0x40(%rsp), %r15
incq %rbx
movq %r12, %rdi
leaq 0x38(%rsp), %rsi
callq 0xef451
testb %al, %al
je 0x31e8d0
movq 0x38(%rsp), %r8
decq %rbp
cmpq 0x8(%rsp), %r8
jb 0x31e85c
jmp 0x31e8d0
movl %r12d, %ebp
movq (%rsp), %r14
xorl %ebx, %ebx
xorl %r15d, %r15d
jmp 0x31e8e0
xorl %ebx, %ebx
xorl %r15d, %r15d
movl 0x18(%rsp), %ebp
movq (%rsp), %r14
movq %r12, %rdi
callq 0xefa48
movq 0x8(%rsp), %r8
subq %r15, %r8
cmpq 0x20(%rsp), %r8
movl %ebp, %edx
movl 0x14(%rsp), %esi
movq 0x30(%rsp), %rdi
movq 0x28(%rsp), %rbp
jb 0x31e920
movq %rbx, %rax
notq %rax
addq %rax, %r13
subq $0x8, %rsp
movq %r15, %rcx
movq %rbx, %r9
pushq %r14
pushq %rbp
pushq %r13
callq 0x31e93e
addq $0x20, %rsp
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x93143
callq 0x931b5
callq 0x9317c