// File: /workspace/github_c_makefile_star2_O3/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 0xed62d
movq %rax, 0x30(%rsp)
cmpl %r15d, %r12d
jb 0x3145b4
movq %rbx, %rdi
callq 0xf6567
movl %eax, %ebp
movq %rbx, %rdi
callq 0xe7b9c
leaq -0x1(%rax), %r14
shrq %r14
testb %bpl, %bpl
cmoveq %rax, %r14
movq %rbx, %rdi
callq 0xe7bac
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 0xf64f6
cmpl $0x2, %eax
movq %r14, 0x28(%rsp)
jne 0x31447f
movq %r13, 0x18(%rsp)
movl %r12d, %ebp
movq (%rsp), %r12
movq %rbx, %rdi
callq 0xf64f9
movl %r15d, %ecx
cmpq %rcx, %rax
jb 0x3145b9
cmpq $0x0, 0x8(%rsp)
movq %r12, %r10
movq 0x28(%rsp), %r11
movq 0x18(%rsp), %r12
je 0x3145a0
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 0x3145be
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 0x314432
jmp 0x3145a0
movq %rbx, %rdi
callq 0xeacd6
movl %r12d, %ecx
movq %rcx, 0x20(%rsp)
testb %al, %al
movl %r15d, 0x14(%rsp)
je 0x31453d
movl %r12d, 0x18(%rsp)
movq %rbx, %rdi
movl $0x1, %esi
callq 0xeae2c
leaq 0x38(%rsp), %rbx
movq %rax, %r12
movq %rax, %rdi
movq %rbx, %rsi
callq 0xeae9a
movq (%rbx), %r8
cmpq 0x8(%rsp), %r8
setb %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x31454b
leaq -0x1(%r13), %rbp
xorl %r15d, %r15d
xorl %ebx, %ebx
subq %r15, %r8
jb 0x3145af
cmpq 0x20(%rsp), %r8
jb 0x314513
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 0x3145be
addq $0x20, %rsp
movq 0x40(%rsp), %r15
incq %rbx
movq %r12, %rdi
leaq 0x38(%rsp), %rsi
callq 0xeae9a
testb %al, %al
je 0x314550
movq 0x38(%rsp), %r8
decq %rbp
cmpq 0x8(%rsp), %r8
jb 0x3144dc
jmp 0x314550
movl %r12d, %ebp
movq (%rsp), %r14
xorl %ebx, %ebx
xorl %r15d, %r15d
jmp 0x314560
xorl %ebx, %ebx
xorl %r15d, %r15d
movl 0x18(%rsp), %ebp
movq (%rsp), %r14
movq %r12, %rdi
callq 0xeb455
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 0x3145a0
movq %rbx, %rax
notq %rax
addq %rax, %r13
subq $0x8, %rsp
movq %r15, %rcx
movq %rbx, %r9
pushq %r14
pushq %rbp
pushq %r13
callq 0x3145be
addq $0x20, %rsp
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x912a2
callq 0x91314
callq 0x912db