// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/karlin_altschul_stat.c
// Function: gt_evalue_searchspace
GtUword gt_evalue_searchspace(const GtKarlinAltschulStat *ka,
                              GtUword query_idx_length)
{
  if (ka->searchspace_store != NULL)
  {
    return gt_searchspace_store_find(ka->searchspace_store,
                                     ka->different_lengths,
                                     query_idx_length);
  } else
  {
    GtUword actual_db_length,
            num_of_db_seqs,
            effective_db_length,
            effective_query_length,
            length_adjustment;
    double alpha_div_lambda, beta, K, logK;

    gt_assert(ka != NULL);
    alpha_div_lambda = gt_karlin_altschul_stat_get_alphadlambda(ka);

    beta = gt_karlin_altschul_stat_get_beta(ka);
    K = gt_karlin_altschul_stat_get_K(ka);
    logK = gt_karlin_altschul_stat_get_logK(ka);

    num_of_db_seqs = gt_karlin_altschul_get_num_of_db_seqs(ka);
    actual_db_length = gt_karlin_altschul_get_actual_length_db(ka);
    length_adjustment = gt_evalue_length_adjustment(query_idx_length,
                                                    actual_db_length,
                                                    num_of_db_seqs,
                                                    alpha_div_lambda,
                                                    beta,
                                                    K,
                                                    logK);

    effective_query_length = query_idx_length - length_adjustment;
    effective_db_length
      = actual_db_length - (num_of_db_seqs * length_adjustment);

    return effective_query_length * effective_db_length;
  }
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x58(%rsp)
movq %rsi, 0x50(%rsp)
movq 0x58(%rsp), %rax
cmpq $0x0, 0x70(%rax)
je 0x25f420
movq 0x58(%rsp), %rax
movq 0x70(%rax), %rdi
movq 0x58(%rsp), %rax
movq 0x68(%rax), %rsi
movq 0x50(%rsp), %rdx
callq 0x25f8b0
movq %rax, 0x60(%rsp)
jmp 0x25f52a
jmp 0x25f422
cmpq $0x0, 0x58(%rsp)
jne 0x25f462
movq 0x3dcb6f(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2b6bd8(%rip), %rsi    # 0x516013
leaq 0x31c46f(%rip), %rdx    # 0x57b8b1
leaq 0x31c5b8(%rip), %rcx    # 0x57ba01
leaq 0x31c440(%rip), %r8     # 0x57b890
movl $0x328, %r9d            # imm = 0x328
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x25f464
movq 0x58(%rsp), %rdi
callq 0x25f9d0
movsd %xmm0, 0x20(%rsp)
movq 0x58(%rsp), %rdi
callq 0x25fa30
movsd %xmm0, 0x18(%rsp)
movq 0x58(%rsp), %rdi
callq 0x25fa90
movsd %xmm0, 0x10(%rsp)
movq 0x58(%rsp), %rdi
callq 0x25faf0
movsd %xmm0, 0x8(%rsp)
movq 0x58(%rsp), %rdi
callq 0x25fb50
movq %rax, 0x40(%rsp)
movq 0x58(%rsp), %rdi
callq 0x25fbb0
movq %rax, 0x48(%rsp)
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x40(%rsp), %rdx
movsd 0x20(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
movsd 0x10(%rsp), %xmm2
movsd 0x8(%rsp), %xmm3
callq 0x25fc10
movq %rax, 0x28(%rsp)
movq 0x50(%rsp), %rax
subq 0x28(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x48(%rsp), %rax
movq 0x40(%rsp), %rcx
imulq 0x28(%rsp), %rcx
subq %rcx, %rax
movq %rax, 0x38(%rsp)
movq 0x30(%rsp), %rax
imulq 0x38(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)