// File: /workspace/github_c_makefile_star2_O2/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 0xaaf34
testb %al, %al
je 0x2bfea3
leaq 0xc44d2(%rip), %rdi     # 0x384363
callq 0xaf4a5
movq %rax, %rbx
movq %rax, %rdi
callq 0xaf4d6
jmp 0x2bfea5
xorl %ebx, %ebx
movq %r14, %rdi
callq 0x705a1
movq %rax, %r15
movq %r14, %rdi
callq 0x7055e
movq %r15, %rdi
callq 0x12aed8
leaq 0x18(%rsp), %r12
movq %rax, (%r12)
andq $0x0, 0x8(%r12)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rsp)
movq %r12, (%rsp)
leaq 0x201(%rip), %r9        # 0x2c00e3
pushq $0x1
popq %r8
movq %r14, %rdi
xorl %esi, %esi
movl %ebp, %edx
movl %ebp, %ecx
callq 0x1a9b46
movq 0x8(%r12), %rsi
movq %rsi, %xmm1
movq 0x279da(%rip), %xmm2    # 0x2e78e0
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0x279de(%rip), %xmm3    # 0x2e78f0
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 0xc443f(%rip), %rdi     # 0x384385
movq %r15, %rdx
movb $0x1, %al
callq 0x17070
movq (%r12), %rdi
callq 0x12b53a
cmpq %r15, %rax
jne 0x2c00ad
testq %rbx, %rbx
je 0x2bff80
movq 0x177f42(%rip), %rax    # 0x437eb0
movq (%rax), %rdx
leaq 0x86258(%rip), %rsi     # 0x3461d0
movq %rbx, %rdi
callq 0xaf86f
movq 0x18(%rsp), %rax
xorpd %xmm0, %xmm0
movupd %xmm0, 0x8(%rsp)
movq %rax, (%rsp)
leaq 0x165(%rip), %r9        # 0x2c00ff
pushq $0x2d
popq %rcx
movq %r14, %rdi
xorl %esi, %esi
movl %ebp, %edx
xorl %r8d, %r8d
callq 0x1a9b46
movq 0x18(%rsp), %rdi
movq %rbx, %rsi
callq 0x12b55b
movq %rax, %r15
leaq (,%rax,8), %rdi
leaq 0xc4468(%rip), %rsi     # 0x384433
movl $0x82, %edx
callq 0x93160
movq %rax, 0x30(%rsp)
movq %r15, 0x38(%rsp)
testq %rbx, %rbx
je 0x2c0059
movq 0x177ec5(%rip), %r15    # 0x437eb0
movq (%r15), %rdx
leaq 0xc4459(%rip), %rsi     # 0x38444e
movq %rbx, %rdi
callq 0xaf86f
xorpd %xmm0, %xmm0
movupd %xmm0, 0x8(%rsp)
movq %r12, (%rsp)
leaq 0xfc(%rip), %r9         # 0x2c010e
pushq $0x2d
popq %rcx
movq %r14, %rdi
xorl %esi, %esi
movl %ebp, %edx
xorl %r8d, %r8d
callq 0x1a9b46
movq 0x30(%rsp), %rdi
leaq 0xc4403(%rip), %rsi     # 0x384433
movl $0x92, %edx
callq 0x936f9
movq 0x18(%rsp), %rdi
callq 0x12b02c
movq (%r15), %rsi
movq %rbx, %rdi
callq 0xafb49
movq %rbx, %rdi
callq 0xafc5b
jmp 0x2c00a0
xorpd %xmm0, %xmm0
movupd %xmm0, 0x8(%rsp)
movq %r12, (%rsp)
leaq 0xa0(%rip), %r9         # 0x2c010e
pushq $0x2d
popq %rcx
movq %r14, %rdi
xorl %esi, %esi
movl %ebp, %edx
xorl %r8d, %r8d
callq 0x1a9b46
movq 0x30(%rsp), %rdi
leaq 0xc43a7(%rip), %rsi     # 0x384433
movl $0x92, %edx
callq 0x936f9
movq 0x18(%rsp), %rdi
callq 0x12b02c
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x177eb4(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x24f55(%rip), %rsi     # 0x2e5013
leaq 0xc42f9(%rip), %rdx     # 0x3843be
leaq 0xc433a(%rip), %rcx     # 0x384406
leaq 0xc4360(%rip), %r8      # 0x384433
pushq $0x72
popq %r9
xorl %eax, %eax
callq 0x17a50
callq 0x17390