// File: /workspace/github_c_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r15
movl $0x1, %edi
movq $-0x2, %rsi
xorl %edx, %edx
movq $-0x2, %rcx
callq 0x17137c
movq %rax, %rbx
xorl %edi, %edi
movq %rax, %rsi
callq 0x1b6564
movq %rax, %r14
movq $0xbc179, 0x50(%rax)    # imm = 0xBC179
movq $0x7a0, 0x58(%rax)      # imm = 0x7A0
movl $0x1c2, %esi            # imm = 0x1C2
movq %rax, %rdi
callq 0x1b727f
cmpq $0x125f6d5a, %rax       # imm = 0x125F6D5A
jne 0x1b7aae
movl $0x12c, %esi            # imm = 0x12C
movq %r14, %rdi
callq 0x1b727f
cmpq $0xbe74a74, %rax        # imm = 0xBE74A74
jne 0x1b7ad7
movl $0x1db, %esi            # imm = 0x1DB
movq %r14, %rdi
callq 0x1b727f
movb $0x1, %bpl
cmpq $0x135b0172, %rax       # imm = 0x135B0172
je 0x1b7b05
leaq 0x1a69b2(%rip), %rsi    # 0x35e43e
leaq 0x1f1782(%rip), %rdx    # 0x3a9215
leaq 0x1f173c(%rip), %rcx    # 0x3a91d6
leaq 0x1f14ef(%rip), %r8     # 0x3a8f90
xorl %ebp, %ebp
movq %r15, %rdi
movl $0x39c, %r9d            # imm = 0x39C
jmp 0x1b7afe
leaq 0x1a6989(%rip), %rsi    # 0x35e43e
leaq 0x1f16ef(%rip), %rdx    # 0x3a91ab
leaq 0x1f1713(%rip), %rcx    # 0x3a91d6
leaq 0x1f14c6(%rip), %r8     # 0x3a8f90
xorl %ebp, %ebp
movq %r15, %rdi
movl $0x39a, %r9d            # imm = 0x39A
jmp 0x1b7afe
leaq 0x1a6960(%rip), %rsi    # 0x35e43e
leaq 0x1f1705(%rip), %rdx    # 0x3a91ea
leaq 0x1f16ea(%rip), %rcx    # 0x3a91d6
leaq 0x1f149d(%rip), %r8     # 0x3a8f90
xorl %ebp, %ebp
movq %r15, %rdi
movl $0x39b, %r9d            # imm = 0x39B
xorl %eax, %eax
callq 0xfcb67
movl $0x12c, %esi            # imm = 0x12C
movq %r14, %rdi
callq 0x1b727f
movq %rax, %r12
movl $0x12c, %esi            # imm = 0x12C
movq %r14, %rdi
xorl %edx, %edx
xorl %ecx, %ecx
movq %rax, %r8
callq 0x1b7991
testb %bpl, %bpl
je 0x1b7c36
divsd 0x1f143e(%rip), %xmm0   # 0x3a8f78
ucomisd 0x19667e(%rip), %xmm0   # 0x34e1c0
jbe 0x1b7c0a
movsd 0x1f1410(%rip), %xmm1   # 0x3a8f60
ucomisd %xmm0, %xmm1
jbe 0x1b7c0a
movl $0xd5, %esi
movl $0x19, %edx
movl $0x1, %ecx
movq %r14, %rdi
movq %r12, %r8
callq 0x1b7991
divsd 0x1f1404(%rip), %xmm0   # 0x3a8f80
ucomisd 0x19663c(%rip), %xmm0   # 0x34e1c0
jbe 0x1b7c8a
movsd 0x1f13ce(%rip), %xmm1   # 0x3a8f60
ucomisd %xmm0, %xmm1
jbe 0x1b7c8a
movl $0xce, %esi
movl $0x17, %edx
movl $0x1, %ecx
movq %r14, %rdi
movq %r12, %r8
callq 0x1b7991
divsd 0x1f13ca(%rip), %xmm0   # 0x3a8f88
ucomisd 0x1965fa(%rip), %xmm0   # 0x34e1c0
jbe 0x1b7bdc
xorl %ebp, %ebp
movsd 0x1f138e(%rip), %xmm1   # 0x3a8f60
ucomisd %xmm0, %xmm1
ja 0x1b7c6f
leaq 0x1a685b(%rip), %rsi    # 0x35e43e
leaq 0x1f1656(%rip), %rdx    # 0x3a9240
leaq 0x1f15e5(%rip), %rcx    # 0x3a91d6
leaq 0x1f1398(%rip), %r8     # 0x3a8f90
movq %r15, %rdi
movl $0x3ac, %r9d            # imm = 0x3AC
xorl %eax, %eax
callq 0xfcb67
jmp 0x1b7c6a
leaq 0x1a682d(%rip), %rsi    # 0x35e43e
leaq 0x1f1628(%rip), %rdx    # 0x3a9240
leaq 0x1f15b7(%rip), %rcx    # 0x3a91d6
leaq 0x1f136a(%rip), %r8     # 0x3a8f90
movq %r15, %rdi
movl $0x3a4, %r9d            # imm = 0x3A4
xorl %eax, %eax
callq 0xfcb67
movl $0xd5, %esi
movl $0x19, %edx
movl $0x1, %ecx
movq %r14, %rdi
movq %r12, %r8
callq 0x1b7991
movl $0xce, %esi
movl $0x17, %edx
movl $0x1, %ecx
movq %r14, %rdi
movq %r12, %r8
callq 0x1b7991
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq %rbx, %rdi
callq 0x1713ff
movq %r14, %rdi
callq 0x1b6528
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1a67ad(%rip), %rsi    # 0x35e43e
leaq 0x1f15a8(%rip), %rdx    # 0x3a9240
leaq 0x1f1537(%rip), %rcx    # 0x3a91d6
leaq 0x1f12ea(%rip), %r8     # 0x3a8f90
movq %r15, %rdi
movl $0x3a8, %r9d            # imm = 0x3A8
xorl %eax, %eax
callq 0xfcb67
jmp 0x1b7c50