// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/randomcodes-insert.c
// Function: gt_randomcodes_insert_kmerscan
static void gt_randomcodes_insert_kmerscan(const GtEncseq *encseq,
                                          const GtBitsequence *twobitencoding,
                                          GtUword totallength,
                                          GtUword numofsequences,
                                          GtUword maxunitindex,
                                          unsigned int kmersize,
                                          unsigned int skipshorter,
                                          GtCodeposbuffer *buf)
{
  GtUword laststart = 0, fseqnum = 0;

  if (gt_encseq_has_specialranges(encseq))
  {
    GtSpecialrangeiterator *sri;
    GtRange range;

    sri = gt_specialrangeiterator_new(encseq,true);
    while (gt_specialrangeiterator_next(sri,&range)
           && range.start < totallength)
    {
      gt_assert(range.start >= laststart);
      if (range.start - laststart >= (GtUword) skipshorter)
      {
        gt_randomcodes_insert_kmerscan_range(twobitencoding,
                                            kmersize,
                                            skipshorter,
                                            laststart,
                                            range.start - laststart,
                                            fseqnum,
                                            numofsequences - 1 - fseqnum,
                                            maxunitindex,
                                            buf);
      }
      laststart = range.end;
      fseqnum++;
    }
    gt_specialrangeiterator_delete(sri);
  }
  if (totallength - laststart >= (GtUword) skipshorter)
  {
    gt_randomcodes_insert_kmerscan_range(twobitencoding,
                                        kmersize,
                                        skipshorter,
                                        laststart,
                                        totallength - laststart,
                                        fseqnum,
                                        numofsequences - 1 - fseqnum,
                                        maxunitindex,
                                        buf);
  }
}

// Assembly:
subq $0x78, %rsp
movq 0x88(%rsp), %rax
movl 0x80(%rsp), %eax
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movq %rdx, 0x60(%rsp)
movq %rcx, 0x58(%rsp)
movq %r8, 0x50(%rsp)
movl %r9d, 0x4c(%rsp)
movq $0x0, 0x40(%rsp)
movq $0x0, 0x38(%rsp)
movq 0x70(%rsp), %rdi
callq 0xaf360
testb $0x1, %al
jne 0x4d61c6
jmp 0x4d62ed
movq 0x70(%rsp), %rdi
movl $0x1, %esi
callq 0xaf650
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0xaf770
movb %al, %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, 0x1f(%rsp)
jne 0x4d61f8
jmp 0x4d6209
movq 0x20(%rsp), %rax
cmpq 0x60(%rsp), %rax
setb %al
movb %al, 0x1f(%rsp)
movb 0x1f(%rsp), %al
testb $0x1, %al
jne 0x4d6216
jmp 0x4d62e3
jmp 0x4d6218
movq 0x20(%rsp), %rax
cmpq 0x40(%rsp), %rax
jae 0x4d625c
movq 0x165d75(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3fdde(%rip), %rsi     # 0x516013
leaq 0xa1e74(%rip), %rdx     # 0x5780b0
leaq 0xe3f81(%rip), %rcx     # 0x5ba1c4
leaq 0xe3f36(%rip), %r8      # 0x5ba180
movl $0x9e, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4d625e
movq 0x20(%rsp), %rax
subq 0x40(%rsp), %rax
movl 0x80(%rsp), %ecx
cmpq %rcx, %rax
jb 0x4d62c6
movq 0x68(%rsp), %rdi
movl 0x4c(%rsp), %esi
movl 0x80(%rsp), %edx
movq 0x40(%rsp), %rcx
movq 0x20(%rsp), %r8
subq 0x40(%rsp), %r8
movq 0x38(%rsp), %r9
movq 0x58(%rsp), %r11
subq $0x1, %r11
subq 0x38(%rsp), %r11
movq 0x50(%rsp), %r10
movq 0x88(%rsp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x4d6380
movq 0x28(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x38(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x38(%rsp)
jmp 0x4d61da
movq 0x30(%rsp), %rdi
callq 0xafc80
movq 0x60(%rsp), %rax
subq 0x40(%rsp), %rax
movl 0x80(%rsp), %ecx
cmpq %rcx, %rax
jb 0x4d6355
movq 0x68(%rsp), %rdi
movl 0x4c(%rsp), %esi
movl 0x80(%rsp), %edx
movq 0x40(%rsp), %rcx
movq 0x60(%rsp), %r8
subq 0x40(%rsp), %r8
movq 0x38(%rsp), %r9
movq 0x58(%rsp), %r11
subq $0x1, %r11
subq 0x38(%rsp), %r11
movq 0x50(%rsp), %r10
movq 0x88(%rsp), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x4d6380
addq $0x78, %rsp
retq
nopw (%rax,%rax)