// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/core/quality.c
// Function: gt_quality_unit_test
int gt_quality_unit_test(GtError *err)
{
  int had_err = 0;
  double val, phredscore, solexascore;

  gt_ensure(gt_quality_fastq_to_phred('!') == 0);
  gt_ensure(gt_quality_fastq_to_phred('{') == 90);
  val = gt_quality_phred_to_errorprob(gt_quality_fastq_to_phred('!'));
  gt_ensure(gt_double_equals_double(val, 1.0));
  val = gt_quality_phred_to_errorprob(gt_quality_fastq_to_phred('{'));
  gt_ensure(gt_double_equals_double(val, 0.000000001));

  gt_ensure(gt_quality_fastq_to_solexa('@') == 0);
  gt_ensure(gt_quality_fastq_to_solexa('!') == -31);
  gt_ensure(gt_quality_fastq_to_solexa('8') == -8);
  gt_ensure(gt_quality_fastq_to_solexa('{') == 59);

  phredscore = gt_quality_fastq_to_phred('A');
  solexascore = gt_quality_fastq_to_solexa('A'+31);
  gt_ensure(phredscore == solexascore);

  /* testing conversion (has rounding errors!)
     taken from Biopython test cases
     (http://portal.open-bio.org/pipermail/biopython-dev
             /2009-February/005385.html) */
  solexascore = gt_quality_phred_to_solexa(90);
  gt_ensure(gt_double_equals_double(solexascore, 89.999999995657035));
  solexascore = gt_quality_phred_to_solexa(50);
  gt_ensure(gt_double_equals_double(solexascore, 49.99995657033466));
  solexascore = gt_quality_phred_to_solexa(10);
  gt_ensure(gt_double_equals_double(solexascore, 9.5424250943932485));
  solexascore = gt_quality_phred_to_solexa(1);
  gt_ensure(gt_double_equals_double(solexascore, -5.8682532438011537));
  solexascore = gt_quality_phred_to_solexa(0.1);
  gt_ensure(gt_double_equals_double(solexascore, -16.32774717238372));

  phredscore = gt_quality_solexa_to_phred(90);
  gt_ensure(gt_double_equals_double(phredscore, 90.000000004342922));
  phredscore = gt_quality_solexa_to_phred(10);
  gt_ensure(gt_double_equals_double(phredscore, 10.41392685158225));
  phredscore = gt_quality_solexa_to_phred(0);
  gt_ensure(gt_double_equals_double(phredscore, 3.0102999566398116));
  phredscore = gt_quality_solexa_to_phred(-20);
  gt_ensure(gt_double_equals_double(phredscore, 0.043213737826425784));

  solexascore = gt_quality_fastq_to_solexa('!');
  phredscore = gt_quality_solexa_to_phred(solexascore);
  gt_ensure(
            gt_double_equals_double(phredscore, 0.0034483543102526788));
  solexascore = gt_quality_fastq_to_solexa('{');
  phredscore = gt_quality_solexa_to_phred(solexascore);
  gt_ensure(gt_double_equals_double(phredscore, 59.000005467440147));

  return had_err;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl $0x21, %edi
callq 0x1121c8
testl %eax, %eax
je 0x112320
leaq 0x25523c(%rip), %rsi    # 0x36753a
leaq 0x265294(%rip), %rdx    # 0x377599
leaq 0x2652b1(%rip), %rcx    # 0x3775bd
leaq 0x265200(%rip), %r8     # 0x377513
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x44, %r9d
jmp 0x112359
movl $0x7b, %edi
callq 0x1121c8
movb $0x1, %bpl
cmpl $0x5a, %eax
je 0x112360
leaq 0x255201(%rip), %rsi    # 0x36753a
leaq 0x265292(%rip), %rdx    # 0x3775d2
leaq 0x265276(%rip), %rcx    # 0x3775bd
leaq 0x2651c5(%rip), %r8     # 0x377513
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x45, %r9d
xorl %eax, %eax
callq 0x1019cf
movl $0x21, %edi
callq 0x1121c8
movl %eax, %eax
cvtsi2sd %rax, %xmm0
callq 0x112264
testb %bpl, %bpl
je 0x1123bf
movsd 0x23cea5(%rip), %xmm1   # 0x34f228
callq 0x10ac6f
movb $0x1, %bpl
testb %al, %al
jne 0x1123c1
leaq 0x2551a4(%rip), %rsi    # 0x36753a
leaq 0x26525a(%rip), %rdx    # 0x3775f7
leaq 0x265219(%rip), %rcx    # 0x3775bd
leaq 0x265168(%rip), %r8     # 0x377513
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x47, %r9d
xorl %eax, %eax
callq 0x1019cf
jmp 0x1123c1
xorl %ebp, %ebp
movl $0x7b, %edi
callq 0x1121c8
movl %eax, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
callq 0x112264
testb %bpl, %bpl
je 0x11242c
movsd 0x243df1(%rip), %xmm1   # 0x3561d8
callq 0x10ac6f
testb %al, %al
je 0x112431
movl $0x40, %edi
callq 0x1121e9
testl %eax, %eax
je 0x112607
leaq 0x255131(%rip), %rsi    # 0x36753a
leaq 0x265233(%rip), %rdx    # 0x377643
leaq 0x2651a6(%rip), %rcx    # 0x3775bd
leaq 0x2650f5(%rip), %r8     # 0x377513
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x4b, %r9d
jmp 0x112459
xorl %r14d, %r14d
jmp 0x112460
leaq 0x255102(%rip), %rsi    # 0x36753a
leaq 0x2651da(%rip), %rdx    # 0x377619
leaq 0x265177(%rip), %rcx    # 0x3775bd
leaq 0x2650c6(%rip), %r8     # 0x377513
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x49, %r9d
xorl %eax, %eax
callq 0x1019cf
movl $0x41, %edi
callq 0x1121c8
movl %eax, %ebp
movl $0x60, %edi
callq 0x1121e9
testb %r14b, %r14b
je 0x1125a8
cltq
movl %ebp, %ecx
cmpq %rax, %rcx
jne 0x1125af
movsd 0x264fe4(%rip), %xmm0   # 0x377478
movsd 0x264fe4(%rip), %xmm1   # 0x377480
callq 0x10ac6f
testb %al, %al
je 0x1125db
movsd 0x264fd7(%rip), %xmm0   # 0x377488
movapd %xmm0, %xmm1
callq 0x10ac6f
testb %al, %al
je 0x112670
movsd 0x264fc6(%rip), %xmm0   # 0x377490
movapd %xmm0, %xmm1
callq 0x10ac6f
testb %al, %al
je 0x1126c9
movsd 0x264fb5(%rip), %xmm0   # 0x377498
movapd %xmm0, %xmm1
callq 0x10ac6f
testb %al, %al
je 0x112722
movsd 0x264fa4(%rip), %xmm0   # 0x3774a0
movapd %xmm0, %xmm1
callq 0x10ac6f
testb %al, %al
je 0x11274e
movsd 0x264f93(%rip), %xmm0   # 0x3774a8
movsd 0x264f93(%rip), %xmm1   # 0x3774b0
callq 0x10ac6f
testb %al, %al
je 0x112777
movsd 0x264f86(%rip), %xmm0   # 0x3774b8
movapd %xmm0, %xmm1
callq 0x10ac6f
testb %al, %al
je 0x1127a0
movsd 0x264f75(%rip), %xmm0   # 0x3774c0
movsd 0x264f75(%rip), %xmm1   # 0x3774c8
callq 0x10ac6f
testb %al, %al
je 0x1127c9
movsd 0x264f68(%rip), %xmm0   # 0x3774d0
movapd %xmm0, %xmm1
callq 0x10ac6f
movb $0x1, %bpl
testb %al, %al
jne 0x1127f7
leaq 0x254fb7(%rip), %rsi    # 0x36753a
leaq 0x26532f(%rip), %rdx    # 0x3778b9
leaq 0x26502c(%rip), %rcx    # 0x3775bd
leaq 0x264f7b(%rip), %r8     # 0x377513
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x6a, %r9d
jmp 0x1127f0
xorl %ebp, %ebp
jmp 0x1127f7
leaq 0x254f84(%rip), %rsi    # 0x36753a
leaq 0x26511e(%rip), %rdx    # 0x3776db
leaq 0x264ff9(%rip), %rcx    # 0x3775bd
leaq 0x264f48(%rip), %r8     # 0x377513
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x52, %r9d
jmp 0x1127f0
leaq 0x254f58(%rip), %rsi    # 0x36753a
leaq 0x26510c(%rip), %rdx    # 0x3776f5
leaq 0x264fcd(%rip), %rcx    # 0x3775bd
leaq 0x264f1c(%rip), %r8     # 0x377513
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x59, %r9d
jmp 0x1127f0
movl $0x21, %edi
callq 0x1121e9
cmpl $-0x1f, %eax
jne 0x11269c
movl $0x38, %edi
callq 0x1121e9
cmpl $-0x8, %eax
jne 0x1126f5
movl $0x7b, %edi
callq 0x1121e9
movb $0x1, %r14b
cmpl $0x3b, %eax
je 0x112460
leaq 0x254ef0(%rip), %rsi    # 0x36753a
leaq 0x265064(%rip), %rdx    # 0x3776b5
leaq 0x264f65(%rip), %rcx    # 0x3775bd
leaq 0x264eb4(%rip), %r8     # 0x377513
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x4e, %r9d
jmp 0x112459
leaq 0x254ec3(%rip), %rsi    # 0x36753a
leaq 0x2650b0(%rip), %rdx    # 0x37772e
leaq 0x264f38(%rip), %rcx    # 0x3775bd
leaq 0x264e87(%rip), %r8     # 0x377513
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x5b, %r9d
jmp 0x1127f0
leaq 0x254e97(%rip), %rsi    # 0x36753a
leaq 0x264fbe(%rip), %rdx    # 0x377668
leaq 0x264f0c(%rip), %rcx    # 0x3775bd
leaq 0x264e5b(%rip), %r8     # 0x377513
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x4c, %r9d
jmp 0x112459
leaq 0x254e6a(%rip), %rsi    # 0x36753a
leaq 0x26508f(%rip), %rdx    # 0x377766
leaq 0x264edf(%rip), %rcx    # 0x3775bd
leaq 0x264e2e(%rip), %r8     # 0x377513
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x5d, %r9d
jmp 0x1127f0
leaq 0x254e3e(%rip), %rsi    # 0x36753a
leaq 0x264f8c(%rip), %rdx    # 0x37768f
leaq 0x264eb3(%rip), %rcx    # 0x3775bd
leaq 0x264e02(%rip), %r8     # 0x377513
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x4d, %r9d
jmp 0x112459
leaq 0x254e11(%rip), %rsi    # 0x36753a
leaq 0x26506f(%rip), %rdx    # 0x37779f
leaq 0x264e86(%rip), %rcx    # 0x3775bd
leaq 0x264dd5(%rip), %r8     # 0x377513
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x5f, %r9d
jmp 0x1127f0
leaq 0x254de5(%rip), %rsi    # 0x36753a
leaq 0x26507d(%rip), %rdx    # 0x3777d9
leaq 0x264e5a(%rip), %rcx    # 0x3775bd
leaq 0x264da9(%rip), %r8     # 0x377513
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x61, %r9d
jmp 0x1127f0
leaq 0x254dbc(%rip), %rsi    # 0x36753a
leaq 0x26508d(%rip), %rdx    # 0x377812
leaq 0x264e31(%rip), %rcx    # 0x3775bd
leaq 0x264d80(%rip), %r8     # 0x377513
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x64, %r9d
jmp 0x1127f0
leaq 0x254d93(%rip), %rsi    # 0x36753a
leaq 0x26509c(%rip), %rdx    # 0x37784a
leaq 0x264e08(%rip), %rcx    # 0x3775bd
leaq 0x264d57(%rip), %r8     # 0x377513
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x66, %r9d
jmp 0x1127f0
leaq 0x254d6a(%rip), %rsi    # 0x36753a
leaq 0x2650aa(%rip), %rdx    # 0x377881
leaq 0x264ddf(%rip), %rcx    # 0x3775bd
leaq 0x264d2e(%rip), %r8     # 0x377513
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x68, %r9d
xorl %eax, %eax
callq 0x1019cf
movl $0x21, %edi
callq 0x1121e9
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
movsd 0x24b7c8(%rip), %xmm0   # 0x35dfd8
divsd %xmm0, %xmm1
callq 0x17d90
addsd 0x23ca07(%rip), %xmm0   # 0x34f228
callq 0x17340
testb %bpl, %bpl
je 0x112877
mulsd 0x24b7a5(%rip), %xmm0   # 0x35dfd8
movsd 0x264c9d(%rip), %xmm1   # 0x3774d8
callq 0x10ac6f
movb $0x1, %bpl
testb %al, %al
jne 0x112879
leaq 0x254cec(%rip), %rsi    # 0x36753a
leaq 0x26509e(%rip), %rdx    # 0x3778f3
leaq 0x264d61(%rip), %rcx    # 0x3775bd
leaq 0x264cb0(%rip), %r8     # 0x377513
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x6f, %r9d
xorl %eax, %eax
callq 0x1019cf
jmp 0x112879
xorl %ebp, %ebp
movl $0x7b, %edi
callq 0x1121e9
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
movsd 0x24b746(%rip), %xmm0   # 0x35dfd8
divsd %xmm0, %xmm1
callq 0x17d90
addsd 0x23c985(%rip), %xmm0   # 0x34f228
callq 0x17340
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testb %bpl, %bpl
je 0x112900
mulsd 0x24b71e(%rip), %xmm0   # 0x35dfd8
movsd 0x264c1e(%rip), %xmm1   # 0x3774e0
callq 0x10ac6f
movl %eax, %ecx
xorl %eax, %eax
testb %cl, %cl
jne 0x112900
leaq 0x254c64(%rip), %rsi    # 0x36753a
leaq 0x265051(%rip), %rdx    # 0x37792e
leaq 0x264cd9(%rip), %rcx    # 0x3775bd
leaq 0x264c28(%rip), %r8     # 0x377513
movq %rbx, %rdi
movl $0x72, %r9d
xorl %eax, %eax
callq 0x1019cf
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax)