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

  gt_assert(skipshorter>=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_randomcodes_insert_kmerscan_eqlen(twobitencoding,
                                        equallength,
                                        totallength,
                                        numofsequences,
                                        maxunitindex,
                                        kmersize,
                                        skipshorter,
                                        buf);
  } else
  {
    gt_randomcodes_insert_kmerscan(encseq,
                                  twobitencoding,
                                  totallength,
                                  numofsequences,
                                  maxunitindex,
                                  kmersize,
                                  skipshorter,
                                  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 0x2c28e1
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 0x2c27bd
movq %rbx, %rdi
callq 0x81d1a
movq %rax, %r14
movl 0x4(%rsp), %eax
cmpq %rax, %r14
jb 0x2c290f
movq %r14, %rbx
incq %rbx
decq %r13
xorl %r15d, %r15d
xorl %ebp, %ebp
cmpq %r12, %r15
jae 0x2c289a
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 0x2c293d
addq $0x20, %rsp
incq %rbp
addq %rbx, %r15
decq %r13
jmp 0x2c277c
movq %rbx, %rdi
callq 0x740a6
testb %al, %al
je 0x2c2847
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 0x2c2852
movq 0x28(%rsp), %r8
cmpq %r12, %r8
jae 0x2c2852
subq %r15, %r8
jb 0x2c28a9
cmpq %r14, %r8
jb 0x2c283a
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 0x2c293d
addq $0x20, %rsp
movq 0x30(%rsp), %r15
incq %rbx
decq %rbp
jmp 0x2c27e6
movl (%rsp), %r14d
xorl %ebx, %ebx
xorl %r15d, %r15d
jmp 0x2c285c
movq 0x20(%rsp), %rdi
callq 0x74a09
subq %r15, %r12
cmpq %r14, %r12
jb 0x2c289a
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 0x2c293d
addq $0x20, %rsp
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x1756b8(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x22759(%rip), %rsi     # 0x2e5013
leaq 0x833a7(%rip), %rdx     # 0x345c68
leaq 0xc239c(%rip), %rcx     # 0x384c64
leaq 0xc2351(%rip), %r8      # 0x384c20
movl $0x9e, %r9d
xorl %eax, %eax
callq 0x17a50
callq 0x17390
movq 0x175680(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x22721(%rip), %rsi     # 0x2e5013
leaq 0xc22ef(%rip), %rdx     # 0x384be8
leaq 0xc22fe(%rip), %rcx     # 0x384bfe
leaq 0xc2319(%rip), %r8      # 0x384c20
movl $0xc7, %r9d
jmp 0x2c28d5
movq 0x175652(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x226f3(%rip), %rsi     # 0x2e5013
leaq 0xbfb11(%rip), %rdx     # 0x382438
leaq 0xc22d0(%rip), %rcx     # 0x384bfe
leaq 0xc22eb(%rip), %r8      # 0x384c20
movl $0xd5, %r9d
jmp 0x2c28d5