// File: /workspace/github_c_makefile_star2_O3/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 0x10cf00
testl %eax, %eax
je 0x10d058
leaq 0x251408(%rip), %rsi    # 0x35e43e
leaq 0x2612ec(%rip), %rdx    # 0x36e329
leaq 0x261309(%rip), %rcx    # 0x36e34d
leaq 0x261258(%rip), %r8     # 0x36e2a3
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x44, %r9d
jmp 0x10d091
movl $0x7b, %edi
callq 0x10cf00
movb $0x1, %bpl
cmpl $0x5a, %eax
je 0x10d098
leaq 0x2513cd(%rip), %rsi    # 0x35e43e
leaq 0x2612ea(%rip), %rdx    # 0x36e362
leaq 0x2612ce(%rip), %rcx    # 0x36e34d
leaq 0x26121d(%rip), %r8     # 0x36e2a3
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x45, %r9d
xorl %eax, %eax
callq 0xfcb67
movl $0x21, %edi
callq 0x10cf00
movl %eax, %eax
cvtsi2sd %rax, %xmm0
callq 0x10cf9c
testb %bpl, %bpl
je 0x10d0f7
movsd 0x23916d(%rip), %xmm1   # 0x346228
callq 0x105bb7
movb $0x1, %bpl
testb %al, %al
jne 0x10d0f9
leaq 0x251370(%rip), %rsi    # 0x35e43e
leaq 0x2612b2(%rip), %rdx    # 0x36e387
leaq 0x261271(%rip), %rcx    # 0x36e34d
leaq 0x2611c0(%rip), %r8     # 0x36e2a3
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x47, %r9d
xorl %eax, %eax
callq 0xfcb67
jmp 0x10d0f9
xorl %ebp, %ebp
movl $0x7b, %edi
callq 0x10cf00
movl %eax, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
callq 0x10cf9c
testb %bpl, %bpl
je 0x10d164
movsd 0x240089(%rip), %xmm1   # 0x34d1a8
callq 0x105bb7
testb %al, %al
je 0x10d169
movl $0x40, %edi
callq 0x10cf21
testl %eax, %eax
je 0x10d33f
leaq 0x2512fd(%rip), %rsi    # 0x35e43e
leaq 0x26128b(%rip), %rdx    # 0x36e3d3
leaq 0x2611fe(%rip), %rcx    # 0x36e34d
leaq 0x26114d(%rip), %r8     # 0x36e2a3
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x4b, %r9d
jmp 0x10d191
xorl %r14d, %r14d
jmp 0x10d198
leaq 0x2512ce(%rip), %rsi    # 0x35e43e
leaq 0x261232(%rip), %rdx    # 0x36e3a9
leaq 0x2611cf(%rip), %rcx    # 0x36e34d
leaq 0x26111e(%rip), %r8     # 0x36e2a3
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x49, %r9d
xorl %eax, %eax
callq 0xfcb67
movl $0x41, %edi
callq 0x10cf00
movl %eax, %ebp
movl $0x60, %edi
callq 0x10cf21
testb %r14b, %r14b
je 0x10d2e0
cltq
movl %ebp, %ecx
cmpq %rax, %rcx
jne 0x10d2e7
movsd 0x26103c(%rip), %xmm0   # 0x36e208
movsd 0x26103c(%rip), %xmm1   # 0x36e210
callq 0x105bb7
testb %al, %al
je 0x10d313
movsd 0x26102f(%rip), %xmm0   # 0x36e218
movapd %xmm0, %xmm1
callq 0x105bb7
testb %al, %al
je 0x10d3a8
movsd 0x26101e(%rip), %xmm0   # 0x36e220
movapd %xmm0, %xmm1
callq 0x105bb7
testb %al, %al
je 0x10d401
movsd 0x26100d(%rip), %xmm0   # 0x36e228
movapd %xmm0, %xmm1
callq 0x105bb7
testb %al, %al
je 0x10d45a
movsd 0x260ffc(%rip), %xmm0   # 0x36e230
movapd %xmm0, %xmm1
callq 0x105bb7
testb %al, %al
je 0x10d486
movsd 0x260feb(%rip), %xmm0   # 0x36e238
movsd 0x260feb(%rip), %xmm1   # 0x36e240
callq 0x105bb7
testb %al, %al
je 0x10d4af
movsd 0x260fde(%rip), %xmm0   # 0x36e248
movapd %xmm0, %xmm1
callq 0x105bb7
testb %al, %al
je 0x10d4d8
movsd 0x260fcd(%rip), %xmm0   # 0x36e250
movsd 0x260fcd(%rip), %xmm1   # 0x36e258
callq 0x105bb7
testb %al, %al
je 0x10d501
movsd 0x260fc0(%rip), %xmm0   # 0x36e260
movapd %xmm0, %xmm1
callq 0x105bb7
movb $0x1, %bpl
testb %al, %al
jne 0x10d52f
leaq 0x251183(%rip), %rsi    # 0x35e43e
leaq 0x261387(%rip), %rdx    # 0x36e649
leaq 0x261084(%rip), %rcx    # 0x36e34d
leaq 0x260fd3(%rip), %r8     # 0x36e2a3
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x6a, %r9d
jmp 0x10d528
xorl %ebp, %ebp
jmp 0x10d52f
leaq 0x251150(%rip), %rsi    # 0x35e43e
leaq 0x261176(%rip), %rdx    # 0x36e46b
leaq 0x261051(%rip), %rcx    # 0x36e34d
leaq 0x260fa0(%rip), %r8     # 0x36e2a3
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x52, %r9d
jmp 0x10d528
leaq 0x251124(%rip), %rsi    # 0x35e43e
leaq 0x261164(%rip), %rdx    # 0x36e485
leaq 0x261025(%rip), %rcx    # 0x36e34d
leaq 0x260f74(%rip), %r8     # 0x36e2a3
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x59, %r9d
jmp 0x10d528
movl $0x21, %edi
callq 0x10cf21
cmpl $-0x1f, %eax
jne 0x10d3d4
movl $0x38, %edi
callq 0x10cf21
cmpl $-0x8, %eax
jne 0x10d42d
movl $0x7b, %edi
callq 0x10cf21
movb $0x1, %r14b
cmpl $0x3b, %eax
je 0x10d198
leaq 0x2510bc(%rip), %rsi    # 0x35e43e
leaq 0x2610bc(%rip), %rdx    # 0x36e445
leaq 0x260fbd(%rip), %rcx    # 0x36e34d
leaq 0x260f0c(%rip), %r8     # 0x36e2a3
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x4e, %r9d
jmp 0x10d191
leaq 0x25108f(%rip), %rsi    # 0x35e43e
leaq 0x261108(%rip), %rdx    # 0x36e4be
leaq 0x260f90(%rip), %rcx    # 0x36e34d
leaq 0x260edf(%rip), %r8     # 0x36e2a3
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x5b, %r9d
jmp 0x10d528
leaq 0x251063(%rip), %rsi    # 0x35e43e
leaq 0x261016(%rip), %rdx    # 0x36e3f8
leaq 0x260f64(%rip), %rcx    # 0x36e34d
leaq 0x260eb3(%rip), %r8     # 0x36e2a3
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x4c, %r9d
jmp 0x10d191
leaq 0x251036(%rip), %rsi    # 0x35e43e
leaq 0x2610e7(%rip), %rdx    # 0x36e4f6
leaq 0x260f37(%rip), %rcx    # 0x36e34d
leaq 0x260e86(%rip), %r8     # 0x36e2a3
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x5d, %r9d
jmp 0x10d528
leaq 0x25100a(%rip), %rsi    # 0x35e43e
leaq 0x260fe4(%rip), %rdx    # 0x36e41f
leaq 0x260f0b(%rip), %rcx    # 0x36e34d
leaq 0x260e5a(%rip), %r8     # 0x36e2a3
xorl %r14d, %r14d
movq %rbx, %rdi
movl $0x4d, %r9d
jmp 0x10d191
leaq 0x250fdd(%rip), %rsi    # 0x35e43e
leaq 0x2610c7(%rip), %rdx    # 0x36e52f
leaq 0x260ede(%rip), %rcx    # 0x36e34d
leaq 0x260e2d(%rip), %r8     # 0x36e2a3
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x5f, %r9d
jmp 0x10d528
leaq 0x250fb1(%rip), %rsi    # 0x35e43e
leaq 0x2610d5(%rip), %rdx    # 0x36e569
leaq 0x260eb2(%rip), %rcx    # 0x36e34d
leaq 0x260e01(%rip), %r8     # 0x36e2a3
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x61, %r9d
jmp 0x10d528
leaq 0x250f88(%rip), %rsi    # 0x35e43e
leaq 0x2610e5(%rip), %rdx    # 0x36e5a2
leaq 0x260e89(%rip), %rcx    # 0x36e34d
leaq 0x260dd8(%rip), %r8     # 0x36e2a3
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x64, %r9d
jmp 0x10d528
leaq 0x250f5f(%rip), %rsi    # 0x35e43e
leaq 0x2610f4(%rip), %rdx    # 0x36e5da
leaq 0x260e60(%rip), %rcx    # 0x36e34d
leaq 0x260daf(%rip), %r8     # 0x36e2a3
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x66, %r9d
jmp 0x10d528
leaq 0x250f36(%rip), %rsi    # 0x35e43e
leaq 0x261102(%rip), %rdx    # 0x36e611
leaq 0x260e37(%rip), %rcx    # 0x36e34d
leaq 0x260d86(%rip), %r8     # 0x36e2a3
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x68, %r9d
xorl %eax, %eax
callq 0xfcb67
movl $0x21, %edi
callq 0x10cf21
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
movsd 0x247a58(%rip), %xmm0   # 0x354fa0
divsd %xmm0, %xmm1
callq 0x17d90
addsd 0x238ccf(%rip), %xmm0   # 0x346228
callq 0x17340
testb %bpl, %bpl
je 0x10d5af
mulsd 0x247a35(%rip), %xmm0   # 0x354fa0
movsd 0x260cf5(%rip), %xmm1   # 0x36e268
callq 0x105bb7
movb $0x1, %bpl
testb %al, %al
jne 0x10d5b1
leaq 0x250eb8(%rip), %rsi    # 0x35e43e
leaq 0x2610f6(%rip), %rdx    # 0x36e683
leaq 0x260db9(%rip), %rcx    # 0x36e34d
leaq 0x260d08(%rip), %r8     # 0x36e2a3
xorl %ebp, %ebp
movq %rbx, %rdi
movl $0x6f, %r9d
xorl %eax, %eax
callq 0xfcb67
jmp 0x10d5b1
xorl %ebp, %ebp
movl $0x7b, %edi
callq 0x10cf21
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
movsd 0x2479d6(%rip), %xmm0   # 0x354fa0
divsd %xmm0, %xmm1
callq 0x17d90
addsd 0x238c4d(%rip), %xmm0   # 0x346228
callq 0x17340
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testb %bpl, %bpl
je 0x10d638
mulsd 0x2479ae(%rip), %xmm0   # 0x354fa0
movsd 0x260c76(%rip), %xmm1   # 0x36e270
callq 0x105bb7
movl %eax, %ecx
xorl %eax, %eax
testb %cl, %cl
jne 0x10d638
leaq 0x250e30(%rip), %rsi    # 0x35e43e
leaq 0x2610a9(%rip), %rdx    # 0x36e6be
leaq 0x260d31(%rip), %rcx    # 0x36e34d
leaq 0x260c80(%rip), %r8     # 0x36e2a3
movq %rbx, %rdi
movl $0x72, %r9d
xorl %eax, %eax
callq 0xfcb67
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbx
popq %r14
popq %rbp
retq
nopl (%rax)