// File: /workspace/github_c_makefile_star2_O2/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
pushq $0x21
popq %rdi
callq 0x9dad0
testl %eax, %eax
je 0x9dce3
leaq 0x26072a(%rip), %rsi    # 0x2fe3f2
leaq 0x270972(%rip), %rdx    # 0x30e641
leaq 0x27098f(%rip), %rcx    # 0x30e665
leaq 0x2708de(%rip), %r8     # 0x30e5bb
xorl %ebp, %ebp
pushq $0x44
jmp 0x9dd13
pushq $0x7b
popq %rdi
callq 0x9dad0
movb $0x1, %bpl
cmpl $0x5a, %eax
je 0x9dd1f
leaq 0x2606f8(%rip), %rsi    # 0x2fe3f2
leaq 0x270979(%rip), %rdx    # 0x30e67a
leaq 0x27095d(%rip), %rcx    # 0x30e665
leaq 0x2708ac(%rip), %r8     # 0x30e5bb
xorl %ebp, %ebp
pushq $0x45
popq %r9
movq %rbx, %rdi
xorl %eax, %eax
callq 0x89dbb
pushq $0x21
popq %rdi
callq 0x9dad0
movl %eax, %eax
cvtsi2sd %rax, %xmm0
callq 0x9dbce
testb %bpl, %bpl
je 0x9dd7a
movsd 0x2484e8(%rip), %xmm1   # 0x2e6228
callq 0x955a5
movb $0x1, %bpl
testb %al, %al
jne 0x9dd7c
leaq 0x26069f(%rip), %rsi    # 0x2fe3f2
leaq 0x270945(%rip), %rdx    # 0x30e69f
leaq 0x270904(%rip), %rcx    # 0x30e665
leaq 0x270853(%rip), %r8     # 0x30e5bb
xorl %ebp, %ebp
pushq $0x47
popq %r9
movq %rbx, %rdi
xorl %eax, %eax
callq 0x89dbb
jmp 0x9dd7c
xorl %ebp, %ebp
pushq $0x7b
popq %rdi
callq 0x9dad0
movl %eax, %eax
cvtsi2sd %rax, %xmm0
callq 0x9dbce
testb %bpl, %bpl
je 0x9ddd9
movsd 0x24f40b(%rip), %xmm1   # 0x2ed1a8
callq 0x955a5
testb %al, %al
je 0x9ddde
pushq $0x40
popq %rdi
callq 0x9db22
testl %eax, %eax
je 0x9e21a
leaq 0x260635(%rip), %rsi    # 0x2fe3f2
leaq 0x270927(%rip), %rdx    # 0x30e6eb
leaq 0x27089a(%rip), %rcx    # 0x30e665
leaq 0x2707e9(%rip), %r8     # 0x30e5bb
xorl %r14d, %r14d
pushq $0x4b
jmp 0x9ddff
xorl %r14d, %r14d
jmp 0x9de0b
leaq 0x26060d(%rip), %rsi    # 0x2fe3f2
leaq 0x2708d5(%rip), %rdx    # 0x30e6c1
leaq 0x270872(%rip), %rcx    # 0x30e665
leaq 0x2707c1(%rip), %r8     # 0x30e5bb
xorl %r14d, %r14d
pushq $0x49
popq %r9
movq %rbx, %rdi
xorl %eax, %eax
callq 0x89dbb
pushq $0x41
popq %rdi
callq 0x9dad0
movl %eax, %ebp
pushq $0x60
popq %rdi
callq 0x9db22
testb %r14b, %r14b
je 0x9de5c
cltq
movl %ebp, %ecx
movb $0x1, %bpl
cmpq %rax, %rcx
je 0x9de5e
leaq 0x2605bd(%rip), %rsi    # 0x2fe3f2
leaq 0x270947(%rip), %rdx    # 0x30e783
leaq 0x270822(%rip), %rcx    # 0x30e665
leaq 0x270771(%rip), %r8     # 0x30e5bb
xorl %ebp, %ebp
pushq $0x52
popq %r9
movq %rbx, %rdi
xorl %eax, %eax
callq 0x89dbb
jmp 0x9de5e
xorl %ebp, %ebp
movsd 0x2706c2(%rip), %xmm0   # 0x30e528
callq 0x9db74
testb %bpl, %bpl
je 0x9deb2
movsd 0x2706b8(%rip), %xmm1   # 0x30e530
callq 0x955a5
movb $0x1, %bpl
testb %al, %al
jne 0x9deb4
leaq 0x260567(%rip), %rsi    # 0x2fe3f2
leaq 0x27090b(%rip), %rdx    # 0x30e79d
leaq 0x2707cc(%rip), %rcx    # 0x30e665
leaq 0x27071b(%rip), %r8     # 0x30e5bb
xorl %ebp, %ebp
pushq $0x59
popq %r9
movq %rbx, %rdi
xorl %eax, %eax
callq 0x89dbb
jmp 0x9deb4
xorl %ebp, %ebp
movsd 0x26de04(%rip), %xmm0   # 0x30bcc0
callq 0x9db74
testb %bpl, %bpl
je 0x9df08
movsd 0x27066a(%rip), %xmm1   # 0x30e538
callq 0x955a5
movb $0x1, %bpl
testb %al, %al
jne 0x9df0a
leaq 0x260511(%rip), %rsi    # 0x2fe3f2
leaq 0x2708ee(%rip), %rdx    # 0x30e7d6
leaq 0x270776(%rip), %rcx    # 0x30e665
leaq 0x2706c5(%rip), %r8     # 0x30e5bb
xorl %ebp, %ebp
pushq $0x5b
popq %r9
movq %rbx, %rdi
xorl %eax, %eax
callq 0x89dbb
jmp 0x9df0a
xorl %ebp, %ebp
movsd 0x25709e(%rip), %xmm0   # 0x2f4fb0
callq 0x9db74
testb %bpl, %bpl
je 0x9df5e
movsd 0x27061c(%rip), %xmm1   # 0x30e540
callq 0x955a5
movb $0x1, %bpl
testb %al, %al
jne 0x9df60
leaq 0x2604bb(%rip), %rsi    # 0x2fe3f2
leaq 0x2708d0(%rip), %rdx    # 0x30e80e
leaq 0x270720(%rip), %rcx    # 0x30e665
leaq 0x27066f(%rip), %r8     # 0x30e5bb
xorl %ebp, %ebp
pushq $0x5d
popq %r9
movq %rbx, %rdi
xorl %eax, %eax
callq 0x89dbb
jmp 0x9df60
xorl %ebp, %ebp
movsd 0x2482c0(%rip), %xmm0   # 0x2e6228
callq 0x9db74
testb %bpl, %bpl
je 0x9dfb4
movsd 0x2705ce(%rip), %xmm1   # 0x30e548
callq 0x955a5
movb $0x1, %bpl
testb %al, %al
jne 0x9dfb6
leaq 0x260465(%rip), %rsi    # 0x2fe3f2
leaq 0x2708b3(%rip), %rdx    # 0x30e847
leaq 0x2706ca(%rip), %rcx    # 0x30e665
leaq 0x270619(%rip), %r8     # 0x30e5bb
xorl %ebp, %ebp
pushq $0x5f
popq %r9
movq %rbx, %rdi
xorl %eax, %eax
callq 0x89dbb
jmp 0x9dfb6
xorl %ebp, %ebp
movsd 0x250212(%rip), %xmm0   # 0x2ee1d0
callq 0x9db74
testb %bpl, %bpl
je 0x9e00a
movsd 0x270580(%rip), %xmm1   # 0x30e550
callq 0x955a5
movb $0x1, %bpl
testb %al, %al
jne 0x9e00c
leaq 0x26040f(%rip), %rsi    # 0x2fe3f2
leaq 0x270897(%rip), %rdx    # 0x30e881
leaq 0x270674(%rip), %rcx    # 0x30e665
leaq 0x2705c3(%rip), %r8     # 0x30e5bb
xorl %ebp, %ebp
pushq $0x61
popq %r9
movq %rbx, %rdi
xorl %eax, %eax
callq 0x89dbb
jmp 0x9e00c
xorl %ebp, %ebp
movsd 0x270514(%rip), %xmm0   # 0x30e528
callq 0x9dba1
testb %bpl, %bpl
je 0x9e060
movsd 0x270532(%rip), %xmm1   # 0x30e558
callq 0x955a5
movb $0x1, %bpl
testb %al, %al
jne 0x9e062
leaq 0x2603b9(%rip), %rsi    # 0x2fe3f2
leaq 0x27087a(%rip), %rdx    # 0x30e8ba
leaq 0x27061e(%rip), %rcx    # 0x30e665
leaq 0x27056d(%rip), %r8     # 0x30e5bb
xorl %ebp, %ebp
pushq $0x64
popq %r9
movq %rbx, %rdi
xorl %eax, %eax
callq 0x89dbb
jmp 0x9e062
xorl %ebp, %ebp
movsd 0x256f46(%rip), %xmm0   # 0x2f4fb0
callq 0x9dba1
testb %bpl, %bpl
je 0x9e0b6
movsd 0x2704e4(%rip), %xmm1   # 0x30e560
callq 0x955a5
movb $0x1, %bpl
testb %al, %al
jne 0x9e0b8
leaq 0x260363(%rip), %rsi    # 0x2fe3f2
leaq 0x27085c(%rip), %rdx    # 0x30e8f2
leaq 0x2705c8(%rip), %rcx    # 0x30e665
leaq 0x270517(%rip), %r8     # 0x30e5bb
xorl %ebp, %ebp
pushq $0x66
popq %r9
movq %rbx, %rdi
xorl %eax, %eax
callq 0x89dbb
jmp 0x9e0b8
xorl %ebp, %ebp
xorps %xmm0, %xmm0
callq 0x9dba1
testb %bpl, %bpl
je 0x9e107
movsd 0x27049b(%rip), %xmm1   # 0x30e568
callq 0x955a5
movb $0x1, %bpl
testb %al, %al
jne 0x9e109
leaq 0x260312(%rip), %rsi    # 0x2fe3f2
leaq 0x270842(%rip), %rdx    # 0x30e929
leaq 0x270577(%rip), %rcx    # 0x30e665
leaq 0x2704c6(%rip), %r8     # 0x30e5bb
xorl %ebp, %ebp
pushq $0x68
popq %r9
movq %rbx, %rdi
xorl %eax, %eax
callq 0x89dbb
jmp 0x9e109
xorl %ebp, %ebp
movsd 0x27045f(%rip), %xmm0   # 0x30e570
callq 0x9dba1
testb %bpl, %bpl
je 0x9e15d
movsd 0x270455(%rip), %xmm1   # 0x30e578
callq 0x955a5
movb $0x1, %bpl
testb %al, %al
jne 0x9e15f
leaq 0x2602bc(%rip), %rsi    # 0x2fe3f2
leaq 0x270824(%rip), %rdx    # 0x30e961
leaq 0x270521(%rip), %rcx    # 0x30e665
leaq 0x270470(%rip), %r8     # 0x30e5bb
xorl %ebp, %ebp
pushq $0x6a
popq %r9
movq %rbx, %rdi
xorl %eax, %eax
callq 0x89dbb
jmp 0x9e15f
xorl %ebp, %ebp
pushq $0x21
popq %rdi
callq 0x9db22
cvtsi2sd %eax, %xmm0
callq 0x9dba1
testb %bpl, %bpl
je 0x9e1b7
movsd 0x270403(%rip), %xmm1   # 0x30e580
callq 0x955a5
movb $0x1, %bpl
testb %al, %al
jne 0x9e1b9
leaq 0x260262(%rip), %rsi    # 0x2fe3f2
leaq 0x270804(%rip), %rdx    # 0x30e99b
leaq 0x2704c7(%rip), %rcx    # 0x30e665
leaq 0x270416(%rip), %r8     # 0x30e5bb
xorl %ebp, %ebp
pushq $0x6f
popq %r9
movq %rbx, %rdi
xorl %eax, %eax
callq 0x89dbb
jmp 0x9e1b9
xorl %ebp, %ebp
pushq $0x7b
popq %rdi
callq 0x9db22
cvtsi2sd %eax, %xmm0
callq 0x9dba1
pushq $-0x1
popq %r14
testb %bpl, %bpl
je 0x9e212
movsd 0x2703ad(%rip), %xmm1   # 0x30e588
callq 0x955a5
movl %eax, %ecx
xorl %eax, %eax
testb %cl, %cl
jne 0x9e215
leaq 0x260203(%rip), %rsi    # 0x2fe3f2
leaq 0x2707e0(%rip), %rdx    # 0x30e9d6
leaq 0x270468(%rip), %rcx    # 0x30e665
leaq 0x2703b7(%rip), %r8     # 0x30e5bb
pushq $0x72
popq %r9
movq %rbx, %rdi
xorl %eax, %eax
callq 0x89dbb
movl %r14d, %eax
popq %rbx
popq %r14
popq %rbp
retq
pushq $0x21
popq %rdi
callq 0x9db22
cmpl $-0x1f, %eax
jne 0x9e26e
pushq $0x38
popq %rdi
callq 0x9db22
cmpl $-0x8, %eax
jne 0x9e294
pushq $0x7b
popq %rdi
callq 0x9db22
movb $0x1, %r14b
cmpl $0x3b, %eax
je 0x9de0b
leaq 0x2601a3(%rip), %rsi    # 0x2fe3f2
leaq 0x270507(%rip), %rdx    # 0x30e75d
leaq 0x270408(%rip), %rcx    # 0x30e665
leaq 0x270357(%rip), %r8     # 0x30e5bb
xorl %r14d, %r14d
pushq $0x4e
jmp 0x9ddff
leaq 0x26017d(%rip), %rsi    # 0x2fe3f2
leaq 0x270494(%rip), %rdx    # 0x30e710
leaq 0x2703e2(%rip), %rcx    # 0x30e665
leaq 0x270331(%rip), %r8     # 0x30e5bb
xorl %r14d, %r14d
pushq $0x4c
jmp 0x9ddff
leaq 0x260157(%rip), %rsi    # 0x2fe3f2
leaq 0x270495(%rip), %rdx    # 0x30e737
leaq 0x2703bc(%rip), %rcx    # 0x30e665
leaq 0x27030b(%rip), %r8     # 0x30e5bb
xorl %r14d, %r14d
pushq $0x4d
jmp 0x9ddff
nop