// File: /workspace/github_c_makefile_star2_O3/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 $0x48, %rsp
movq %rcx, (%rsp)
movl %edx, %r12d
movl %esi, %r15d
movq %rdi, %rbx
callq 0xed62d
movq %rax, 0x30(%rsp)
cmpl %r15d, %r12d
jb 0x321754
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 0x32161f
movq %r13, 0x18(%rsp)
movl %r12d, %ebp
movq (%rsp), %r12
movq %rbx, %rdi
callq 0xf64f9
movl %r15d, %ecx
cmpq %rcx, %rax
jb 0x321759
cmpq $0x0, 0x8(%rsp)
movq %r12, %r10
movq 0x28(%rsp), %r11
movq 0x18(%rsp), %r12
je 0x321740
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 0x32175e
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 0x3215d2
jmp 0x321740
movq %rbx, %rdi
callq 0xeacd6
movl %r12d, %ecx
movq %rcx, 0x20(%rsp)
testb %al, %al
movl %r15d, 0x14(%rsp)
je 0x3216dd
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 0x3216eb
leaq -0x1(%r13), %rbp
xorl %r15d, %r15d
xorl %ebx, %ebx
subq %r15, %r8
jb 0x32174f
cmpq 0x20(%rsp), %r8
jb 0x3216b3
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 0x32175e
addq $0x20, %rsp
movq 0x40(%rsp), %r15
incq %rbx
movq %r12, %rdi
leaq 0x38(%rsp), %rsi
callq 0xeae9a
testb %al, %al
je 0x3216f0
movq 0x38(%rsp), %r8
decq %rbp
cmpq 0x8(%rsp), %r8
jb 0x32167c
jmp 0x3216f0
movl %r12d, %ebp
movq (%rsp), %r14
xorl %ebx, %ebx
xorl %r15d, %r15d
jmp 0x321700
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 0x321740
movq %rbx, %rax
notq %rax
addq %rax, %r13
subq $0x8, %rsp
movq %r15, %rcx
movq %rbx, %r9
pushq %r14
pushq %rbp
pushq %r13
callq 0x32175e
addq $0x20, %rsp
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x94578
callq 0x945ea
callq 0x945b1