// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/karlin_altschul_stat.c
// Function: gt_karlin_altschul_stat_unit_test
int gt_karlin_altschul_stat_unit_test(GtError *err)
{
  GtKarlinAltschulStat *ka;
  GtScoreHandler *scorehandler;
  double q;
  unsigned int numofchars = 0;

  int had_err = 0;
  gt_error_check(err);

  scorehandler = gt_scorehandler_new(1,-2,0,-2);

  /* check function for gapped alignments */
  ka = gt_karlin_altschul_stat_new(0, scorehandler); /* unit test */
  gt_ensure(ka->lambda == 1.19);
  gt_ensure(ka->H == 0.66);
  gt_ensure(ka->K == 0.34);
  gt_karlin_altschul_stat_delete(ka);

  /* check function for ungapped alignments */
  numofchars = 4;
  ka = gt_karlin_altschul_stat_new(numofchars, scorehandler); /* unit test */
  q = ka->lambda/1.33; /* lambda = 1.33 */
  gt_ensure(0.99 < q && q < 1.01);
  q = ka->H/1.12; /* H = 1.12 */
  gt_ensure(0.99 < q && q < 1.01);
  q = ka->K/0.621; /* K = 0.621 */
  gt_ensure(0.99 < q && q < 1.01);
  gt_karlin_altschul_stat_delete(ka);

  gt_scorehandler_delete(scorehandler);
  return had_err;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl $0x0, 0x4(%rsp)
movl $0x0, (%rsp)
cmpq $0x0, 0x20(%rsp)
je 0x25f5a8
movq 0x20(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x25f570
jmp 0x25f5a8
movq 0x3dca29(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2b6a92(%rip), %rsi    # 0x516013
leaq 0x2b6c37(%rip), %rdx    # 0x5161bf
leaq 0x31c40c(%rip), %rcx    # 0x57b99b
leaq 0x31c2fa(%rip), %r8     # 0x57b890
movl $0x287, %r9d            # imm = 0x287
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x25f5aa
movl $0x1, %edi
movq $-0x2, %rcx
xorl %eax, %eax
movl %eax, %edx
movq %rcx, %rsi
callq 0x1d0fb0
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rsi
xorl %edi, %edi
callq 0x25dc00
movq %rax, 0x18(%rsp)
cmpl $0x0, (%rsp)
jne 0x25f630
movq 0x18(%rsp), %rax
movsd (%rax), %xmm0
movsd 0x31c239(%rip), %xmm1   # 0x57b828
ucomisd %xmm1, %xmm0
jne 0x25f5f9
jp 0x25f5f9
jmp 0x25f62e
movq 0x20(%rsp), %rdi
leaq 0x2cfff5(%rip), %rsi    # 0x52f5fa
leaq 0x31c3b1(%rip), %rdx    # 0x57b9bd
leaq 0x31c388(%rip), %rcx    # 0x57b99b
leaq 0x31c276(%rip), %r8     # 0x57b890
movl $0x28d, %r9d            # imm = 0x28D
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, (%rsp)     # imm = 0xFFFFFFFF
jmp 0x25f630
jmp 0x25f632
jmp 0x25f634
cmpl $0x0, (%rsp)
jne 0x25f68d
movq 0x18(%rsp), %rax
movsd 0x18(%rax), %xmm0
movsd 0x31c1e4(%rip), %xmm1   # 0x57b830
ucomisd %xmm1, %xmm0
jne 0x25f656
jp 0x25f656
jmp 0x25f68b
movq 0x20(%rsp), %rdi
leaq 0x2cff98(%rip), %rsi    # 0x52f5fa
leaq 0x31c367(%rip), %rdx    # 0x57b9d0
leaq 0x31c32b(%rip), %rcx    # 0x57b99b
leaq 0x31c219(%rip), %r8     # 0x57b890
movl $0x28e, %r9d            # imm = 0x28E
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, (%rsp)     # imm = 0xFFFFFFFF
jmp 0x25f68d
jmp 0x25f68f
jmp 0x25f691
cmpl $0x0, (%rsp)
jne 0x25f6ea
movq 0x18(%rsp), %rax
movsd 0x8(%rax), %xmm0
movsd 0x31c18f(%rip), %xmm1   # 0x57b838
ucomisd %xmm1, %xmm0
jne 0x25f6b3
jp 0x25f6b3
jmp 0x25f6e8
movq 0x20(%rsp), %rdi
leaq 0x2cff3b(%rip), %rsi    # 0x52f5fa
leaq 0x31c318(%rip), %rdx    # 0x57b9de
leaq 0x31c2ce(%rip), %rcx    # 0x57b99b
leaq 0x31c1bc(%rip), %r8     # 0x57b890
movl $0x28f, %r9d            # imm = 0x28F
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, (%rsp)     # imm = 0xFFFFFFFF
jmp 0x25f6ea
jmp 0x25f6ec
movq 0x18(%rsp), %rdi
callq 0x25dbc0
movl $0x4, 0x4(%rsp)
movl 0x4(%rsp), %edi
movq 0x10(%rsp), %rsi
callq 0x25dc00
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movsd (%rax), %xmm0
movsd 0x31c11e(%rip), %xmm1   # 0x57b840
divsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
cmpl $0x0, (%rsp)
jne 0x25f78d
movsd 0x8(%rsp), %xmm0
movsd 0x2bfb20(%rip), %xmm1   # 0x51f260
ucomisd %xmm1, %xmm0
jbe 0x25f756
movsd 0x31c0fa(%rip), %xmm0   # 0x57b848
ucomisd 0x8(%rsp), %xmm0
ja 0x25f78b
movq 0x20(%rsp), %rdi
leaq 0x2cfe98(%rip), %rsi    # 0x52f5fa
leaq 0x31c283(%rip), %rdx    # 0x57b9ec
leaq 0x31c22b(%rip), %rcx    # 0x57b99b
leaq 0x31c119(%rip), %r8     # 0x57b890
movl $0x296, %r9d            # imm = 0x296
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, (%rsp)     # imm = 0xFFFFFFFF
jmp 0x25f78d
jmp 0x25f78f
movq 0x18(%rsp), %rax
movsd 0x18(%rax), %xmm0
movsd 0x31c0af(%rip), %xmm1   # 0x57b850
divsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
cmpl $0x0, (%rsp)
jne 0x25f80c
movsd 0x8(%rsp), %xmm0
movsd 0x2bfaa1(%rip), %xmm1   # 0x51f260
ucomisd %xmm1, %xmm0
jbe 0x25f7d5
movsd 0x31c07b(%rip), %xmm0   # 0x57b848
ucomisd 0x8(%rsp), %xmm0
ja 0x25f80a
movq 0x20(%rsp), %rdi
leaq 0x2cfe19(%rip), %rsi    # 0x52f5fa
leaq 0x31c204(%rip), %rdx    # 0x57b9ec
leaq 0x31c1ac(%rip), %rcx    # 0x57b99b
leaq 0x31c09a(%rip), %r8     # 0x57b890
movl $0x298, %r9d            # imm = 0x298
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, (%rsp)     # imm = 0xFFFFFFFF
jmp 0x25f80c
jmp 0x25f80e
movq 0x18(%rsp), %rax
movsd 0x8(%rax), %xmm0
movsd 0x31c038(%rip), %xmm1   # 0x57b858
divsd %xmm1, %xmm0
movsd %xmm0, 0x8(%rsp)
cmpl $0x0, (%rsp)
jne 0x25f88b
movsd 0x8(%rsp), %xmm0
movsd 0x2bfa22(%rip), %xmm1   # 0x51f260
ucomisd %xmm1, %xmm0
jbe 0x25f854
movsd 0x31bffc(%rip), %xmm0   # 0x57b848
ucomisd 0x8(%rsp), %xmm0
ja 0x25f889
movq 0x20(%rsp), %rdi
leaq 0x2cfd9a(%rip), %rsi    # 0x52f5fa
leaq 0x31c185(%rip), %rdx    # 0x57b9ec
leaq 0x31c12d(%rip), %rcx    # 0x57b99b
leaq 0x31c01b(%rip), %r8     # 0x57b890
movl $0x29a, %r9d            # imm = 0x29A
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, (%rsp)     # imm = 0xFFFFFFFF
jmp 0x25f88b
jmp 0x25f88d
movq 0x18(%rsp), %rdi
callq 0x25dbc0
movq 0x10(%rsp), %rdi
callq 0x1d1150
movl (%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)