// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/hashfirstcodes.c
// Function: hashfirstcodes_getencseqkmers_twobitencoding
void hashfirstcodes_getencseqkmers_twobitencoding(const GtEncseq *encseq,
                                                  unsigned int kmersize)
{
  GtTimer *timer = NULL;
  GtHashfirstcodes hashfirstcodes;
  GtUword numofsequences, psum;
  GT_UNUSED GtUword totallength;
  /*GT_UNUSED GtUword countsum;*/
  const unsigned int spmopt = 45U;

  if (gt_showtime_enabled())
  {
    timer = gt_timer_new_with_progress_description("insert first codes into "
                                                   "hashtable");
    gt_timer_start(timer);
  }
  numofsequences = gt_encseq_num_of_sequences(encseq);
  totallength = gt_encseq_total_length(encseq);
  hashfirstcodes.table = gt_uint64hashtable_new((size_t) numofsequences);
  hashfirstcodes.differentcodes = 0;
  getencseqkmers_twobitencoding(encseq,
                                GT_READMODE_FORWARD,
                                kmersize,
                                kmersize,
                                true,
                                gt_hashfirstcodes,
                                &hashfirstcodes,
                                NULL,
                                NULL);
  printf("# number of different codes="GT_WU" (%.4f) in "GT_WU" sequences\n",
          hashfirstcodes.differentcodes,
          (double) hashfirstcodes.differentcodes/numofsequences,
          numofsequences);
  /*countsum = gt_uint64hashtable_countsum_get(hashfirstcodes.table);*/
  gt_assert(gt_uint64hashtable_countsum_get(hashfirstcodes.table)
               == numofsequences);
  if (timer != NULL)
  {
    gt_timer_show_progress(timer, "accumulate counts",stdout);
  }
  getencseqkmers_twobitencoding(encseq,
                                GT_READMODE_FORWARD,
                                kmersize,
                                spmopt,
                                false,
                                gt_hashremainingcodes,
                                hashfirstcodes.table,
                                NULL,
                                NULL);
  psum = gt_uint64hashtable_partialsums(hashfirstcodes.table,timer);
  hashfirstcodes.suftab = gt_malloc((size_t) psum *
                                    sizeof (*hashfirstcodes.suftab));
  hashfirstcodes.finalpsum = psum;
  if (timer != NULL)
  {
    gt_timer_show_progress(timer, "insert suffixes into suffix table",
                                        stdout);
  }
  getencseqkmers_twobitencoding(encseq,
                                GT_READMODE_FORWARD,
                                kmersize,
                                spmopt,
                                false,
                                gt_insertallcodeswithhashtable,
                                &hashfirstcodes,
                                NULL,
                                NULL);
  gt_free(hashfirstcodes.suftab);
  gt_uint64hashtable_delete(hashfirstcodes.table);
  if (timer != NULL)
  {
    gt_timer_show_progress_final(timer, stdout);
    gt_timer_delete(timer);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movl %esi, %ebp
movq %rdi, %r14
callq 0x11ed94
testb %al, %al
je 0x329533
leaq 0xc4212(%rip), %rdi     # 0x3ed733
callq 0x1226d6
movq %rax, %rbx
movq %rax, %rdi
callq 0x122733
jmp 0x329535
xorl %ebx, %ebx
movq %r14, %rdi
callq 0xec1e8
movq %rax, %r15
movq %r14, %rdi
callq 0xec1d8
movq %r15, %rdi
callq 0x18bc94
leaq 0x18(%rsp), %r12
movq %rax, (%r12)
movq $0x0, 0x8(%r12)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rsp)
movq %r12, (%rsp)
leaq 0x1d8(%rip), %r9        # 0x32974d
movq %r14, %rdi
xorl %esi, %esi
movl %ebp, %edx
movl %ebp, %ecx
movl $0x1, %r8d
callq 0x200bb0
movq 0x8(%r12), %rsi
movq %rsi, %xmm1
movq 0x27345(%rip), %xmm2    # 0x3508e0
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0x27349(%rip), %xmm3    # 0x3508f0
subpd %xmm3, %xmm1
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
movq %r15, %xmm1
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
subpd %xmm3, %xmm1
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
divsd %xmm2, %xmm0
leaq 0xc417a(%rip), %rdi     # 0x3ed755
movq %r15, %rdx
movb $0x1, %al
callq 0x17070
movq (%r12), %rdi
callq 0x18c0b4
cmpq %r15, %rax
jne 0x329748
testq %rbx, %rbx
je 0x329615
movq 0x19a8e5(%rip), %rax    # 0x4c3ee8
movq (%rax), %rdx
leaq 0x85de7(%rip), %rsi     # 0x3af3f4
movq %rbx, %rdi
callq 0x1229c8
movq 0x18(%rsp), %rax
xorpd %xmm0, %xmm0
movupd %xmm0, 0x8(%rsp)
movq %rax, (%rsp)
leaq 0x13c(%rip), %r9        # 0x32976b
movq %r14, %rdi
xorl %esi, %esi
movl %ebp, %edx
movl $0x2d, %ecx
xorl %r8d, %r8d
callq 0x200bb0
movq 0x18(%rsp), %rdi
movq %rbx, %rsi
callq 0x18c0db
movq %rax, %r15
leaq (,%rax,8), %rdi
leaq 0xc41a1(%rip), %rsi     # 0x3ed803
movl $0x82, %edx
callq 0x1092b2
movq %rax, 0x30(%rsp)
movq %r15, 0x38(%rsp)
testq %rbx, %rbx
je 0x3296f2
movq 0x19a866(%rip), %r15    # 0x4c3ee8
movq (%r15), %rdx
leaq 0xc4192(%rip), %rsi     # 0x3ed81e
movq %rbx, %rdi
callq 0x1229c8
xorpd %xmm0, %xmm0
movupd %xmm0, 0x8(%rsp)
movq %r12, (%rsp)
leaq 0xd1(%rip), %r9         # 0x32977a
movq %r14, %rdi
xorl %esi, %esi
movl %ebp, %edx
movl $0x2d, %ecx
xorl %r8d, %r8d
callq 0x200bb0
movq 0x30(%rsp), %rdi
leaq 0xc413a(%rip), %rsi     # 0x3ed803
movl $0x92, %edx
callq 0x109670
movq 0x18(%rsp), %rdi
callq 0x18bdab
movq (%r15), %rsi
movq %rbx, %rdi
callq 0x122c67
movq %rbx, %rdi
callq 0x122d79
jmp 0x32973b
xorpd %xmm0, %xmm0
movupd %xmm0, 0x8(%rsp)
movq %r12, (%rsp)
leaq 0x73(%rip), %r9         # 0x32977a
movq %r14, %rdi
xorl %esi, %esi
movl %ebp, %edx
movl $0x2d, %ecx
xorl %r8d, %r8d
callq 0x200bb0
movq 0x30(%rsp), %rdi
leaq 0xc40dc(%rip), %rsi     # 0x3ed803
movl $0x92, %edx
callq 0x109670
movq 0x18(%rsp), %rdi
callq 0x18bdab
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x957e3