// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/karlin_altschul_stat.c
// Function: gt_evalue_unit_test
int gt_evalue_unit_test(GT_UNUSED GtError *err)
{
  GtKarlinAltschulStat *ka;
  GtScoreHandler *scorehandler;
  GtUword searchspace;
  double evalue_variance;
  const unsigned int numchars = 0; /* means gapped case */
  int had_err = 0;

  scorehandler = gt_scorehandler_new(1,-2,0,-2);
  ka = gt_karlin_altschul_stat_new(numchars,scorehandler); /* unit test */
  ka->actual_length_db = 772376 - (1952 - 1);
  ka->num_of_db_seqs = 1952;

  /* checks searchspace calculation */
  gt_ensure(gt_evalue_searchspace(ka, 450)== 308243802);
  gt_ensure(gt_evalue_searchspace(ka, 300)== 199707252);
  gt_ensure(gt_evalue_searchspace(ka, 475)== 324731250);

  searchspace = gt_evalue_searchspace(ka, 300);

  /* checks evalue calculation */
  evalue_variance
    = gt_evalue_from_eop_count(ka, 300, 0, 0, searchspace)
      /(6.148125 * pow(10,-148));
  gt_ensure(evalue_variance > 0.99 && evalue_variance < 1.01);
  evalue_variance
    = gt_evalue_from_eop_count(ka, 213, 25, 1, searchspace)
      /(4.220782 * pow(10,-76));
  gt_ensure(evalue_variance > 0.99 && evalue_variance < 1.01);
  evalue_variance
    = gt_evalue_from_eop_count(ka, 206, 23, 1, searchspace)
      /(1.499078 * pow(10,-74));
  gt_ensure(evalue_variance > 0.99 && evalue_variance < 1.01);

  gt_scorehandler_delete(scorehandler);
  gt_karlin_altschul_stat_delete(ka);
  return had_err;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movl $0x0, 0x1c(%rsp)
movl $0x0, 0x18(%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, 0x38(%rsp)
movq 0x38(%rsp), %rax
movq $0xbc179, 0x50(%rax)    # imm = 0xBC179
movq 0x38(%rsp), %rax
movq $0x7a0, 0x58(%rax)      # imm = 0x7A0
cmpl $0x0, 0x18(%rsp)
jne 0x260837
movq 0x38(%rsp), %rdi
movl $0x1c2, %esi            # imm = 0x1C2
callq 0x25f3e0
cmpq $0x125f6d5a, %rax       # imm = 0x125F6D5A
je 0x260835
movq 0x40(%rsp), %rdi
leaq 0x2cedef(%rip), %rsi    # 0x52f5fa
leaq 0x31b2ba(%rip), %rdx    # 0x57bacc
leaq 0x31b2de(%rip), %rcx    # 0x57baf7
leaq 0x31b070(%rip), %r8     # 0x57b890
movl $0x39a, %r9d            # imm = 0x39A
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x18(%rsp) # imm = 0xFFFFFFFF
jmp 0x260837
jmp 0x260839
jmp 0x26083b
cmpl $0x0, 0x18(%rsp)
jne 0x260891
movq 0x38(%rsp), %rdi
movl $0x12c, %esi            # imm = 0x12C
callq 0x25f3e0
cmpq $0xbe74a74, %rax        # imm = 0xBE74A74
je 0x26088f
movq 0x40(%rsp), %rdi
leaq 0x2ced95(%rip), %rsi    # 0x52f5fa
leaq 0x31b29f(%rip), %rdx    # 0x57bb0b
leaq 0x31b284(%rip), %rcx    # 0x57baf7
leaq 0x31b016(%rip), %r8     # 0x57b890
movl $0x39b, %r9d            # imm = 0x39B
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x18(%rsp) # imm = 0xFFFFFFFF
jmp 0x260891
jmp 0x260893
jmp 0x260895
cmpl $0x0, 0x18(%rsp)
jne 0x2608eb
movq 0x38(%rsp), %rdi
movl $0x1db, %esi            # imm = 0x1DB
callq 0x25f3e0
cmpq $0x135b0172, %rax       # imm = 0x135B0172
je 0x2608e9
movq 0x40(%rsp), %rdi
leaq 0x2ced3b(%rip), %rsi    # 0x52f5fa
leaq 0x31b270(%rip), %rdx    # 0x57bb36
leaq 0x31b22a(%rip), %rcx    # 0x57baf7
leaq 0x31afbc(%rip), %r8     # 0x57b890
movl $0x39c, %r9d            # imm = 0x39C
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x18(%rsp) # imm = 0xFFFFFFFF
jmp 0x2608eb
jmp 0x2608ed
movq 0x38(%rsp), %rdi
movl $0x12c, %esi            # imm = 0x12C
callq 0x25f3e0
movq %rax, 0x28(%rsp)
movq 0x38(%rsp), %rdi
movq 0x28(%rsp), %r8
movl $0x12c, %esi            # imm = 0x12C
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rdx
callq 0x2606e0
movsd %xmm0, 0x10(%rsp)
movsd 0x2c5756(%rip), %xmm0   # 0x526080
movsd 0x31af36(%rip), %xmm1   # 0x57b868
callq 0x19cb0
movaps %xmm0, %xmm2
movsd 0x10(%rsp), %xmm0
movsd 0x31af18(%rip), %xmm1   # 0x57b860
mulsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x20(%rsp)
cmpl $0x0, 0x18(%rsp)
jne 0x2609b9
movsd 0x20(%rsp), %xmm0
movsd 0x2be8f5(%rip), %xmm1   # 0x51f260
ucomisd %xmm1, %xmm0
jbe 0x260981
movsd 0x31aecf(%rip), %xmm0   # 0x57b848
ucomisd 0x20(%rsp), %xmm0
ja 0x2609b7
movq 0x40(%rsp), %rdi
leaq 0x2cec6d(%rip), %rsi    # 0x52f5fa
leaq 0x31b1cd(%rip), %rdx    # 0x57bb61
leaq 0x31b15c(%rip), %rcx    # 0x57baf7
leaq 0x31aeee(%rip), %r8     # 0x57b890
movl $0x3a4, %r9d            # imm = 0x3A4
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x18(%rsp) # imm = 0xFFFFFFFF
jmp 0x2609b9
jmp 0x2609bb
movq 0x38(%rsp), %rdi
movq 0x28(%rsp), %r8
movl $0xd5, %esi
movl $0x19, %edx
movl $0x1, %ecx
callq 0x2606e0
movsd %xmm0, 0x8(%rsp)
movsd 0x2c5699(%rip), %xmm0   # 0x526080
movsd 0x31ae89(%rip), %xmm1   # 0x57b878
callq 0x19cb0
movaps %xmm0, %xmm2
movsd 0x8(%rsp), %xmm0
movsd 0x31ae6b(%rip), %xmm1   # 0x57b870
mulsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x20(%rsp)
cmpl $0x0, 0x18(%rsp)
jne 0x260a76
movsd 0x20(%rsp), %xmm0
movsd 0x2be838(%rip), %xmm1   # 0x51f260
ucomisd %xmm1, %xmm0
jbe 0x260a3e
movsd 0x31ae12(%rip), %xmm0   # 0x57b848
ucomisd 0x20(%rsp), %xmm0
ja 0x260a74
movq 0x40(%rsp), %rdi
leaq 0x2cebb0(%rip), %rsi    # 0x52f5fa
leaq 0x31b110(%rip), %rdx    # 0x57bb61
leaq 0x31b09f(%rip), %rcx    # 0x57baf7
leaq 0x31ae31(%rip), %r8     # 0x57b890
movl $0x3a8, %r9d            # imm = 0x3A8
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x18(%rsp) # imm = 0xFFFFFFFF
jmp 0x260a76
jmp 0x260a78
movq 0x38(%rsp), %rdi
movq 0x28(%rsp), %r8
movl $0xce, %esi
movl $0x17, %edx
movl $0x1, %ecx
callq 0x2606e0
movsd %xmm0, (%rsp)
movsd 0x2c55dd(%rip), %xmm0   # 0x526080
movsd 0x31addd(%rip), %xmm1   # 0x57b888
callq 0x19cb0
movaps %xmm0, %xmm2
movsd (%rsp), %xmm0
movsd 0x31adc0(%rip), %xmm1   # 0x57b880
mulsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x20(%rsp)
cmpl $0x0, 0x18(%rsp)
jne 0x260b31
movsd 0x20(%rsp), %xmm0
movsd 0x2be77d(%rip), %xmm1   # 0x51f260
ucomisd %xmm1, %xmm0
jbe 0x260af9
movsd 0x31ad57(%rip), %xmm0   # 0x57b848
ucomisd 0x20(%rsp), %xmm0
ja 0x260b2f
movq 0x40(%rsp), %rdi
leaq 0x2ceaf5(%rip), %rsi    # 0x52f5fa
leaq 0x31b055(%rip), %rdx    # 0x57bb61
leaq 0x31afe4(%rip), %rcx    # 0x57baf7
leaq 0x31ad76(%rip), %r8     # 0x57b890
movl $0x3ac, %r9d            # imm = 0x3AC
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x18(%rsp) # imm = 0xFFFFFFFF
jmp 0x260b31
jmp 0x260b33
movq 0x30(%rsp), %rdi
callq 0x1d1150
movq 0x38(%rsp), %rdi
callq 0x25dbc0
movl 0x18(%rsp), %eax
addq $0x48, %rsp
retq