// File: /workspace/github_c_makefile_star2_O2/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 $0x38, %rsp
movq %rcx, 0x18(%rsp)
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
callq 0x776db
movq %rax, 0x10(%rsp)
movl %ebp, (%rsp)
movl %r14d, 0x4(%rsp)
cmpl %r14d, %ebp
jb 0x2b3c5d
movq %rbx, %rdi
callq 0x81dea
movl %eax, %ebp
movq %rbx, %rdi
callq 0x7055e
leaq -0x1(%rax), %r12
shrq %r12
testb %bpl, %bpl
cmoveq %rax, %r12
movq %rbx, %rdi
callq 0x705a1
movq %rax, %r13
leaq -0x1(%r12), %rax
shrq $0x5, %rax
incq %rax
cmpq $0x20, %r12
pushq $0x1
popq %rcx
cmovaeq %rax, %rcx
movq %rcx, 0x8(%rsp)
movq %rbx, %rdi
callq 0x81d17
cmpl $0x2, %eax
jne 0x2b3b39
movq %rbx, %rdi
callq 0x81d1a
movq %rax, %r14
movl 0x4(%rsp), %eax
cmpq %rax, %r14
jb 0x2b3c8b
movq %r14, %rbx
incq %rbx
decq %r13
xorl %r15d, %r15d
xorl %ebp, %ebp
cmpq %r12, %r15
jae 0x2b3c16
subq $0x8, %rsp
movq 0x18(%rsp), %rdi
movl 0xc(%rsp), %esi
movl 0x8(%rsp), %edx
movq %r15, %rcx
movq %r14, %r8
movq %rbp, %r9
pushq 0x20(%rsp)
pushq 0x18(%rsp)
pushq %r13
callq 0x2b3cb9
addq $0x20, %rsp
incq %rbp
addq %rbx, %r15
decq %r13
jmp 0x2b3af8
movq %rbx, %rdi
callq 0x740a6
testb %al, %al
je 0x2b3bc3
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x741f0
movq %rax, 0x20(%rsp)
movl (%rsp), %r14d
leaq -0x1(%r13), %rbp
xorl %ebx, %ebx
xorl %r15d, %r15d
movq 0x20(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x7428b
testb %al, %al
je 0x2b3bce
movq 0x28(%rsp), %r8
cmpq %r12, %r8
jae 0x2b3bce
subq %r15, %r8
jb 0x2b3c25
cmpq %r14, %r8
jb 0x2b3bb6
subq $0x8, %rsp
movq 0x18(%rsp), %rdi
movl 0xc(%rsp), %esi
movl 0x8(%rsp), %edx
movq %r15, %rcx
movq %rbx, %r9
pushq 0x20(%rsp)
pushq 0x18(%rsp)
pushq %rbp
callq 0x2b3cb9
addq $0x20, %rsp
movq 0x30(%rsp), %r15
incq %rbx
decq %rbp
jmp 0x2b3b62
movl (%rsp), %r14d
xorl %ebx, %ebx
xorl %r15d, %r15d
jmp 0x2b3bd8
movq 0x20(%rsp), %rdi
callq 0x74a09
subq %r15, %r12
cmpq %r14, %r12
jb 0x2b3c16
movq %rbx, %rax
notq %rax
addq %rax, %r13
subq $0x8, %rsp
movq 0x18(%rsp), %rdi
movl 0xc(%rsp), %esi
movl 0x8(%rsp), %edx
movq %r15, %rcx
movq %r12, %r8
movq %rbx, %r9
pushq 0x20(%rsp)
pushq 0x18(%rsp)
pushq %r13
callq 0x2b3cb9
addq $0x20, %rsp
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x18433c(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x313dd(%rip), %rsi     # 0x2e5013
leaq 0x9202b(%rip), %rdx     # 0x345c68
leaq 0xcebd0(%rip), %rcx     # 0x382814
leaq 0xceb87(%rip), %r8      # 0x3827d2
movl $0x9d, %r9d
xorl %eax, %eax
callq 0x17a50
callq 0x17390
movq 0x184304(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x313a5(%rip), %rsi     # 0x2e5013
leaq 0xceb23(%rip), %rdx     # 0x382798
leaq 0xceb35(%rip), %rcx     # 0x3827b1
leaq 0xceb4f(%rip), %r8      # 0x3827d2
movl $0xc6, %r9d
jmp 0x2b3c51
movq 0x1842d6(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x31377(%rip), %rsi     # 0x2e5013
leaq 0xce795(%rip), %rdx     # 0x382438
leaq 0xceb07(%rip), %rcx     # 0x3827b1
leaq 0xceb21(%rip), %r8      # 0x3827d2
movl $0xd4, %r9d
jmp 0x2b3c51