// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/karlin_altschul_stat.c
// Function: gt_karlin_altschul_stat_new_gapped
GtKarlinAltschulStat *gt_karlin_altschul_stat_new_gapped(
                             GtUword total_length_db,
                             GtUword num_of_db_seqs,
                             GT_UNUSED const GtEncseq *query_encseq)
{
  const unsigned int gapped_alignment_flag = 0;
  GtScoreHandler *scorehandler = gt_scorehandler_new(1,-2,0,-2);
  GtKarlinAltschulStat *ka
    = gt_karlin_altschul_stat_new(gapped_alignment_flag,scorehandler);

  gt_scorehandler_delete(scorehandler);
  gt_assert(num_of_db_seqs > 0 &&
            ka->actual_length_db == GT_UWORD_MAX);
  ka->actual_length_db = total_length_db - (num_of_db_seqs - 1);
  ka->num_of_db_seqs = num_of_db_seqs;
  if (query_encseq != NULL)
  {
    GtUword *seq_length_tab = gt_all_sequence_lengths_get(query_encseq);
    GtUwordPair *store_under_construction;

    ka->num_of_query_seqs = gt_encseq_num_of_sequences(query_encseq);
    if (seq_length_tab == NULL) /* all are of the same length */
    {
      store_under_construction = gt_malloc(sizeof *ka->searchspace_store * 1);
      store_under_construction[0].a = gt_encseq_seqlength(query_encseq,0);
      store_under_construction[0].b
        = gt_evalue_searchspace(ka,store_under_construction[0].a);
      ka->different_lengths = 1;
    } else
    {
      GtUword ridx, widx;

      gt_radixsort_inplace_ulong(seq_length_tab,ka->num_of_query_seqs);
      gt_assert(ka->num_of_query_seqs > 0);
      for (ridx = 1, widx = 0; ridx < ka->num_of_query_seqs; ridx++)
      {
        if (seq_length_tab[ridx] != seq_length_tab[widx])
        {
          seq_length_tab[++widx] = seq_length_tab[ridx];
        }
      }
      ka->different_lengths = widx + 1;
      store_under_construction = gt_malloc(sizeof *ka->searchspace_store *
                                           ka->different_lengths);
      for (widx = 0; widx < ka->different_lengths; widx++)
      {
        store_under_construction[widx].a = seq_length_tab[widx];
        store_under_construction[widx].b
          = gt_evalue_searchspace(ka,store_under_construction[widx].a);
      }
      gt_free(seq_length_tab);
    }
    ka->searchspace_store = store_under_construction;
  }
  return ka;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movl $0x0, 0x3c(%rsp)
movl $0x1, %edi
movq $-0x2, %rcx
xorl %eax, %eax
movl %eax, %edx
movq %rcx, %rsi
callq 0x1d0fb0
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rsi
xorl %edi, %edi
callq 0x25dc00
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rdi
callq 0x1d1150
cmpq $0x0, 0x48(%rsp)
jbe 0x25f127
movq 0x28(%rsp), %rax
cmpq $-0x1, 0x50(%rax)
je 0x25f15f
movq 0x3dce72(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2b6edb(%rip), %rsi    # 0x516013
leaq 0x31c7e4(%rip), %rdx    # 0x57b923
leaq 0x31c818(%rip), %rcx    # 0x57b95e
leaq 0x31c743(%rip), %r8     # 0x57b890
movl $0x231, %r9d            # imm = 0x231
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x25f161
movq 0x50(%rsp), %rcx
movq 0x48(%rsp), %rax
subq $0x1, %rax
subq %rax, %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x50(%rax)
movq 0x48(%rsp), %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x58(%rax)
cmpq $0x0, 0x40(%rsp)
je 0x25f3d4
movq 0x40(%rsp), %rdi
callq 0xaf1a0
movq %rax, 0x20(%rsp)
movq 0x40(%rsp), %rdi
callq 0xa9d50
movq %rax, %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x60(%rax)
cmpq $0x0, 0x20(%rsp)
jne 0x25f226
movl $0x10, %edi
leaq 0x31c6c2(%rip), %rsi    # 0x57b890
movl $0x23c, %edx            # imm = 0x23C
callq 0xe80f0
movq %rax, 0x18(%rsp)
movq 0x40(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xb09f0
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, (%rax)
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rax
movq (%rax), %rsi
callq 0x25f3e0
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x28(%rsp), %rax
movq $0x1, 0x68(%rax)
jmp 0x25f3c6
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rax
movq 0x60(%rax), %rsi
callq 0x100d90
movq 0x28(%rsp), %rax
cmpq $0x0, 0x60(%rax)
ja 0x25f27d
movq 0x3dcd54(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2b6dbd(%rip), %rsi    # 0x516013
leaq 0x31c724(%rip), %rdx    # 0x57b981
leaq 0x31c6fa(%rip), %rcx    # 0x57b95e
leaq 0x31c625(%rip), %r8     # 0x57b890
movl $0x246, %r9d            # imm = 0x246
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x25f27f
movq $0x1, 0x10(%rsp)
movq $0x0, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq 0x28(%rsp), %rcx
cmpq 0x60(%rcx), %rax
jae 0x25f2fa
movq 0x20(%rsp), %rax
movq 0x10(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x20(%rsp), %rcx
movq 0x8(%rsp), %rdx
cmpq (%rcx,%rdx,8), %rax
je 0x25f2e8
movq 0x20(%rsp), %rax
movq 0x10(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
movq 0x20(%rsp), %rax
movq 0x8(%rsp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x8(%rsp)
movq %rdx, 0x8(%rax,%rcx,8)
jmp 0x25f2ea
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x25f291
movq 0x8(%rsp), %rcx
addq $0x1, %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x68(%rax)
movq 0x28(%rsp), %rax
movq 0x68(%rax), %rdi
shlq $0x4, %rdi
leaq 0x31c570(%rip), %rsi    # 0x57b890
movl $0x250, %edx            # imm = 0x250
callq 0xe80f0
movq %rax, 0x18(%rsp)
movq $0x0, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq 0x28(%rsp), %rcx
cmpq 0x68(%rcx), %rax
jae 0x25f3b0
movq 0x20(%rsp), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rcx
movq 0x18(%rsp), %rax
movq 0x8(%rsp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, (%rax)
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rax
movq 0x8(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rsi
callq 0x25f3e0
movq %rax, %rcx
movq 0x18(%rsp), %rax
movq 0x8(%rsp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0x25f338
movq 0x20(%rsp), %rdi
leaq 0x31c4d4(%rip), %rsi    # 0x57b890
movl $0x257, %edx            # imm = 0x257
callq 0xe88c0
movq 0x18(%rsp), %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x70(%rax)
movq 0x28(%rsp), %rax
addq $0x58, %rsp
retq
nop