// File: /workspace/github_c_makefile_star2_O3/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:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
movl $0x1, %edi
movq $-0x2, %rsi
xorl %edx, %edx
movq $-0x2, %rcx
callq 0x17137c
movq %rax, %r13
xorl %edi, %edi
movq %rax, %rsi
callq 0x1b6564
movq %rax, %rbx
movq %r13, %rdi
callq 0x1713ff
testq %r14, %r14
je 0x1b7275
cmpq $-0x1, 0x50(%rbx)
jne 0x1b7275
subq %r14, %r12
incq %r12
movq %r12, 0x50(%rbx)
movq %r14, 0x58(%rbx)
testq %r15, %r15
je 0x1b7268
movq %r15, %rdi
callq 0xeac59
movq %rax, %r14
movq %r15, %rdi
callq 0xe7bac
movq %rax, 0x60(%rbx)
testq %r14, %r14
je 0x1b7225
movq %r14, %rdi
movq %rax, %rsi
callq 0x10f85a
movq 0x60(%rbx), %rdi
cmpq $0x1, %rdi
je 0x1b71c4
testq %rdi, %rdi
je 0x1b727a
movl $0x1, %ecx
xorl %eax, %eax
movq (%r14,%rcx,8), %rdx
cmpq (%r14,%rax,8), %rdx
je 0x1b71b6
movq %rdx, 0x8(%r14,%rax,8)
incq %rax
movq 0x60(%rbx), %rdi
incq %rcx
cmpq %rdi, %rcx
jb 0x1b71a0
incq %rax
movq %rax, %rdi
movq %rdi, 0x68(%rbx)
shlq $0x4, %rdi
leaq 0x1f1dbd(%rip), %rsi    # 0x3a8f90
movl $0x250, %edx            # imm = 0x250
callq 0x104226
movq %rax, %r12
cmpq $0x0, 0x68(%rbx)
je 0x1b720f
leaq 0x8(%r12), %r15
xorl %r13d, %r13d
movq (%r14,%r13,8), %rsi
movq %rsi, -0x8(%r15)
movq %rbx, %rdi
callq 0x1b727f
movq %rax, (%r15)
incq %r13
addq $0x10, %r15
cmpq 0x68(%rbx), %r13
jb 0x1b71ef
leaq 0x1f1d7a(%rip), %rsi    # 0x3a8f90
movq %r14, %rdi
movl $0x257, %edx            # imm = 0x257
callq 0x1045eb
jmp 0x1b7264
leaq 0x1f1d64(%rip), %rsi    # 0x3a8f90
movl $0x10, %edi
movl $0x23c, %edx            # imm = 0x23C
callq 0x104226
movq %rax, %r12
movq %r15, %rdi
xorl %esi, %esi
callq 0xeb9d2
movq %rax, (%r12)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1b727f
movq %rax, 0x8(%r12)
movq $0x1, 0x68(%rbx)
movq %r12, 0x70(%rbx)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
callq 0x669aa
callq 0x66971