// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/firstcodes-scan.c
// Function: gt_firstcode_runkmerscan
void gt_firstcode_runkmerscan(const GtEncseq *encseq,
                              unsigned int mode,
                              unsigned int kmersize,
                              unsigned int minmatchlength)
{
  const GtTwobitencoding *twobitencoding
    = gt_encseq_twobitencoding_export(encseq);
  GtUword totallength, maxunitindex, encodingsum, numofsequences;
  bool withcheck = mode == 1U ? true : false;

  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;
  gt_log_log("totallength=" GT_WU ",maxunitindex=" GT_WU "\n",
             totallength,maxunitindex);
  if (gt_encseq_accesstype_get(encseq) == GT_ACCESS_TYPE_EQUALLENGTH)
  {
    GtUword equallength = gt_encseq_equallength(encseq);

    encodingsum = gt_firstcodes_kmerscan_eqlen(twobitencoding,
                                               withcheck,
                                               equallength,
                                               totallength,
                                               numofsequences,
                                               maxunitindex,
                                               kmersize,
                                               minmatchlength,
                                               mode == 2U ? showcodes : NULL,
                                               NULL);
  } else
  {
    encodingsum = gt_firstcodes_kmerscan(encseq,
                                         twobitencoding,
                                         withcheck,
                                         totallength,
                                         numofsequences,
                                         maxunitindex,
                                         kmersize,
                                         minmatchlength,
                                         mode == 2U ? showcodes : NULL,
                                         NULL);
  }
  gt_log_log("encodingsum = " GT_WU "\n",encodingsum);
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movl %esi, 0x6c(%rsp)
movl %edx, 0x68(%rsp)
movl %ecx, 0x64(%rsp)
movq 0x70(%rsp), %rdi
callq 0xb5250
movq %rax, 0x58(%rsp)
movl 0x6c(%rsp), %edx
xorl %eax, %eax
movl $0x1, %ecx
cmpl $0x1, %edx
cmovel %ecx, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, 0x37(%rsp)
movq 0x70(%rsp), %rdi
callq 0xc2ec0
testb $0x1, %al
jne 0x243483
jmp 0x24349b
movq 0x70(%rsp), %rdi
callq 0xa9d00
subq $0x1, %rax
shrq %rax
movq %rax, 0x50(%rsp)
jmp 0x2434aa
movq 0x70(%rsp), %rdi
callq 0xa9d00
movq %rax, 0x50(%rsp)
movq 0x70(%rsp), %rdi
callq 0xa9d50
movq %rax, 0x38(%rsp)
movq 0x50(%rsp), %rdi
callq 0x2435f0
subq $0x1, %rax
movq %rax, 0x48(%rsp)
movq 0x50(%rsp), %rsi
movq 0x48(%rsp), %rdx
leaq 0x334c1f(%rip), %rdi    # 0x5780fc
movb $0x0, %al
callq 0xe7740
movq 0x70(%rsp), %rdi
callq 0xc2d90
cmpl $0x2, %eax
jne 0x24356b
movq 0x70(%rsp), %rdi
callq 0xc2da0
movq %rax, 0x28(%rsp)
movq 0x58(%rsp), %rdi
movb 0x37(%rsp), %sil
movq 0x28(%rsp), %rdx
movq 0x50(%rsp), %rcx
movq 0x38(%rsp), %r8
movq 0x48(%rsp), %r9
movl 0x68(%rsp), %r11d
movl 0x64(%rsp), %r10d
movl 0x6c(%rsp), %ebp
xorl %eax, %eax
leaq 0x119(%rip), %rbx       # 0x243650
cmpl $0x2, %ebp
cmoveq %rbx, %rax
xorl %ebx, %ebx
andb $0x1, %sil
movzbl %sil, %esi
movl %r11d, (%rsp)
movl %r10d, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
callq 0x242c00
movq %rax, 0x40(%rsp)
jmp 0x2435cf
movq 0x70(%rsp), %rdi
movq 0x58(%rsp), %rsi
movb 0x37(%rsp), %dl
movq 0x50(%rsp), %rcx
movq 0x38(%rsp), %r8
movq 0x48(%rsp), %r9
movl 0x68(%rsp), %r11d
movl 0x64(%rsp), %r10d
movl 0x6c(%rsp), %ebp
xorl %eax, %eax
leaq 0xb1(%rip), %rbx        # 0x243650
cmpl $0x2, %ebp
cmoveq %rbx, %rax
xorl %ebx, %ebx
andb $0x1, %dl
movzbl %dl, %edx
movl %r11d, (%rsp)
movl %r10d, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
callq 0x2431b0
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rsi
leaq 0x334b43(%rip), %rdi    # 0x57811e
movb $0x0, %al
callq 0xe7740
addq $0x78, %rsp
popq %rbx
popq %rbp
retq
nopl (%rax)