// File: ncbi[P]amr/seq.cpp
// Function: Seq_sp::Dna::polyNucWindow(unsigned long, unsigned long, char) const
bool Dna::polyNucWindow (size_t start,
           	             size_t windowLen,
           		           char nucleotide) const
{
  ASSERT (start <= seq. size ());
  ASSERT (charInSet (nucleotide, dnaAlphabet));

  const size_t end = min (start + windowLen, seq. size ());
  ASSERT (start <= end);
  if (start == end)
    return false;

  size_t mismatch = 0;
  FOR_START (size_t, i, start, end)
    if (! nucleotideMatch (seq [i], nucleotide))
      mismatch++;

  return (double) mismatch / (double) (end - start) <= 0.2;  // PAR
}

// Assembly:
subq $0x418, %rsp            # imm = 0x418
movb %cl, %al
movq %rdi, 0x408(%rsp)
movq %rsi, 0x400(%rsp)
movq %rdx, 0x3f8(%rsp)
movb %al, 0x3f7(%rsp)
movq 0x408(%rsp), %rax
movq %rax, 0x50(%rsp)
callq 0xd0a0
movq 0x50(%rsp), %rdi
movl $0x0, (%rax)
movq 0x400(%rsp), %rax
movq %rax, 0x58(%rsp)
addq $0x28, %rdi
callq 0xd520
movq %rax, %rcx
movq 0x58(%rsp), %rax
cmpq %rcx, %rax
jbe 0xb32f3
callq 0xd8c0
cmpl $0x0, %eax
jne 0xb32e9
leaq 0x34f(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0xdd50
movq 0x48(%rsp), %rdx
leaq 0x353ae(%rip), %rsi     # 0xe8446
leaq 0x350(%rsp), %rdi
callq 0xfae0
jmp 0xb30a7
leaq 0x318(%rsp), %rdi
movl $0x994, %esi            # imm = 0x994
callq 0x11600
jmp 0xb30bb
leaq 0x370(%rsp), %rdi
leaq 0x350(%rsp), %rsi
leaq 0x318(%rsp), %rdx
callq 0x11510
jmp 0xb30da
leaq 0x300f0(%rip), %rdx     # 0xe31d1
leaq 0x390(%rsp), %rdi
leaq 0x370(%rsp), %rsi
callq 0x114c0
jmp 0xb30f8
leaq 0x2d7(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0xdd50
movq 0x40(%rsp), %rdx
leaq 0x359f3(%rip), %rsi     # 0xe8b09
leaq 0x2d8(%rsp), %rdi
callq 0xfae0
jmp 0xb3125
leaq 0x30878(%rip), %rdx     # 0xe39a4
leaq 0x2f8(%rsp), %rdi
leaq 0x2d8(%rsp), %rsi
callq 0x114c0
jmp 0xb3143
leaq 0x3b0(%rsp), %rdi
leaq 0x390(%rsp), %rsi
leaq 0x2f8(%rsp), %rdx
callq 0x11510
jmp 0xb3162
leaq 0x359dc(%rip), %rdx     # 0xe8b45
leaq 0x3d0(%rsp), %rdi
leaq 0x3b0(%rsp), %rsi
callq 0x114c0
jmp 0xb3180
leaq 0x3d0(%rsp), %rdi
callq 0x173d0
jmp 0xb318f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
jmp 0xb32d7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
jmp 0xb32ca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
jmp 0xb32bd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
jmp 0xb32b0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
jmp 0xb3296
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
jmp 0xb3289
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
jmp 0xb327c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
jmp 0xb326f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
leaq 0x3d0(%rsp), %rdi
callq 0xdf08
leaq 0x3b0(%rsp), %rdi
callq 0xdf08
leaq 0x2f8(%rsp), %rdi
callq 0xdf08
leaq 0x2d8(%rsp), %rdi
callq 0xdf08
leaq 0x2d7(%rsp), %rdi
callq 0xd7a0
leaq 0x390(%rsp), %rdi
callq 0xdf08
leaq 0x370(%rsp), %rdi
callq 0xdf08
leaq 0x318(%rsp), %rdi
callq 0xdf08
leaq 0x350(%rsp), %rdi
callq 0xdf08
leaq 0x34f(%rsp), %rdi
callq 0xd7a0
jmp 0xb3a4f
movl $0x1, %edi
callq 0xd8e0
callq 0xd0a0
movl $0x0, (%rax)
movb 0x3f7(%rsp), %al
movb %al, 0x2f(%rsp)
movq 0x6d8d0(%rip), %rax     # 0x120be0
movq %rax, 0x30(%rsp)
leaq 0x2af(%rsp), %rdi
movq %rdi, 0x38(%rsp)
callq 0xdd50
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
leaq 0x2b0(%rsp), %rdi
callq 0xfae0
jmp 0xb3340
movb 0x2f(%rsp), %al
movsbl %al, %edi
leaq 0x2b0(%rsp), %rsi
callq 0x4cba0
movb %al, 0x2e(%rsp)
jmp 0xb335a
movb 0x2e(%rsp), %al
xorb $-0x1, %al
movb %al, 0x2d(%rsp)
leaq 0x2b0(%rsp), %rdi
callq 0xdf08
leaq 0x2af(%rsp), %rdi
callq 0xd7a0
movb 0x2d(%rsp), %al
testb $0x1, %al
jne 0xb338b
jmp 0xb365b
callq 0xd8c0
cmpl $0x0, %eax
jne 0xb3651
leaq 0x207(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0xdd50
movq 0x20(%rsp), %rdx
leaq 0x3508f(%rip), %rsi     # 0xe8446
leaq 0x208(%rsp), %rdi
callq 0xfae0
jmp 0xb33c6
leaq 0x1e0(%rsp), %rdi
movl $0x995, %esi            # imm = 0x995
callq 0x11600
jmp 0xb33da
leaq 0x228(%rsp), %rdi
leaq 0x208(%rsp), %rsi
leaq 0x1e0(%rsp), %rdx
callq 0x11510
jmp 0xb33f9
leaq 0x2fdd1(%rip), %rdx     # 0xe31d1
leaq 0x248(%rsp), %rdi
leaq 0x228(%rsp), %rsi
callq 0x114c0
jmp 0xb3417
leaq 0x19f(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0xdd50
movq 0x18(%rsp), %rdx
leaq 0x356d4(%rip), %rsi     # 0xe8b09
leaq 0x1a0(%rsp), %rdi
callq 0xfae0
jmp 0xb3444
leaq 0x30559(%rip), %rdx     # 0xe39a4
leaq 0x1c0(%rsp), %rdi
leaq 0x1a0(%rsp), %rsi
callq 0x114c0
jmp 0xb3462
leaq 0x268(%rsp), %rdi
leaq 0x248(%rsp), %rsi
leaq 0x1c0(%rsp), %rdx
callq 0x11510
jmp 0xb3481
leaq 0x356d3(%rip), %rdx     # 0xe8b5b
leaq 0x288(%rsp), %rdi
leaq 0x268(%rsp), %rsi
callq 0x114c0
jmp 0xb349f
leaq 0x288(%rsp), %rdi
callq 0x173d0
jmp 0xb34ae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
jmp 0xb34e5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
leaq 0x2b0(%rsp), %rdi
callq 0xdf08
leaq 0x2af(%rsp), %rdi
callq 0xd7a0
jmp 0xb3a4f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
jmp 0xb363f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
jmp 0xb3632
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
jmp 0xb3625
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
jmp 0xb3618
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
jmp 0xb35fe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
jmp 0xb35f1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
jmp 0xb35e4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
jmp 0xb35d7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
leaq 0x288(%rsp), %rdi
callq 0xdf08
leaq 0x268(%rsp), %rdi
callq 0xdf08
leaq 0x1c0(%rsp), %rdi
callq 0xdf08
leaq 0x1a0(%rsp), %rdi
callq 0xdf08
leaq 0x19f(%rsp), %rdi
callq 0xd7a0
leaq 0x248(%rsp), %rdi
callq 0xdf08
leaq 0x228(%rsp), %rdi
callq 0xdf08
leaq 0x1e0(%rsp), %rdi
callq 0xdf08
leaq 0x208(%rsp), %rdi
callq 0xdf08
leaq 0x207(%rsp), %rdi
callq 0xd7a0
jmp 0xb3a4f
movl $0x1, %edi
callq 0xd8e0
movq 0x50(%rsp), %rdi
movq 0x400(%rsp), %rax
addq 0x3f8(%rsp), %rax
movq %rax, 0x188(%rsp)
addq $0x28, %rdi
callq 0xd520
movq %rax, 0x180(%rsp)
leaq 0x188(%rsp), %rdi
leaq 0x180(%rsp), %rsi
callq 0x14880
movq (%rax), %rax
movq %rax, 0x190(%rsp)
callq 0xd0a0
movl $0x0, (%rax)
movq 0x400(%rsp), %rax
cmpq 0x190(%rsp), %rax
jbe 0xb3942
callq 0xd8c0
cmpl $0x0, %eax
jne 0xb3938
leaq 0xdf(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0xdd50
movq 0x10(%rsp), %rdx
leaq 0x34d50(%rip), %rsi     # 0xe8446
leaq 0xe0(%rsp), %rdi
callq 0xfae0
jmp 0xb3705
leaq 0xb8(%rsp), %rdi
movl $0x998, %esi            # imm = 0x998
callq 0x11600
jmp 0xb3719
leaq 0x100(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
leaq 0xb8(%rsp), %rdx
callq 0x11510
jmp 0xb3738
leaq 0x2fa92(%rip), %rdx     # 0xe31d1
leaq 0x120(%rsp), %rdi
leaq 0x100(%rsp), %rsi
callq 0x114c0
jmp 0xb3756
leaq 0x77(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0xdd50
movq 0x8(%rsp), %rdx
leaq 0x35398(%rip), %rsi     # 0xe8b09
leaq 0x78(%rsp), %rdi
callq 0xfae0
jmp 0xb377d
leaq 0x30220(%rip), %rdx     # 0xe39a4
leaq 0x98(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x114c0
jmp 0xb3798
leaq 0x140(%rsp), %rdi
leaq 0x120(%rsp), %rsi
leaq 0x98(%rsp), %rdx
callq 0x11510
jmp 0xb37b7
leaq 0x353c1(%rip), %rdx     # 0xe8b7f
leaq 0x160(%rsp), %rdi
leaq 0x140(%rsp), %rsi
callq 0x114c0
jmp 0xb37d5
leaq 0x160(%rsp), %rdi
callq 0x173d0
jmp 0xb37e4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
jmp 0xb3926
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
jmp 0xb3919
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
jmp 0xb390c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
jmp 0xb38ff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
jmp 0xb38e8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
jmp 0xb38de
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
jmp 0xb38d1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
jmp 0xb38c4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x340(%rsp)
movl %eax, 0x33c(%rsp)
leaq 0x160(%rsp), %rdi
callq 0xdf08
leaq 0x140(%rsp), %rdi
callq 0xdf08
leaq 0x98(%rsp), %rdi
callq 0xdf08
leaq 0x78(%rsp), %rdi
callq 0xdf08
leaq 0x77(%rsp), %rdi
callq 0xd7a0
leaq 0x120(%rsp), %rdi
callq 0xdf08
leaq 0x100(%rsp), %rdi
callq 0xdf08
leaq 0xb8(%rsp), %rdi
callq 0xdf08
leaq 0xe0(%rsp), %rdi
callq 0xdf08
leaq 0xdf(%rsp), %rdi
callq 0xd7a0
jmp 0xb3a4f
movl $0x1, %edi
callq 0xd8e0
movq 0x400(%rsp), %rax
cmpq 0x190(%rsp), %rax
jne 0xb3961
movb $0x0, 0x417(%rsp)
jmp 0xb3a3e
movq $0x0, 0x68(%rsp)
movq 0x400(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x60(%rsp), %rax
cmpq 0x190(%rsp), %rax
jae 0xb39cf
movq 0x50(%rsp), %rdi
addq $0x28, %rdi
movq 0x60(%rsp), %rsi
callq 0xd7d0
movb (%rax), %al
movsbl %al, %edi
movsbl 0x3f7(%rsp), %esi
callq 0xacc30
testb $0x1, %al
jne 0xb39bd
movq 0x68(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x68(%rsp)
jmp 0xb39bf
movq 0x60(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x60(%rsp)
jmp 0xb3977
movq 0x68(%rsp), %xmm1
movaps 0x336b4(%rip), %xmm3    # 0xe7090
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
movapd 0x336b8(%rip), %xmm2    # 0xe70a0
subpd %xmm2, %xmm1
movaps %xmm1, %xmm0
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm0, %xmm1
movq 0x190(%rsp), %rax
movq 0x400(%rsp), %rcx
subq %rcx, %rax
movq %rax, %xmm0
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
subpd %xmm2, %xmm0
movaps %xmm0, %xmm2
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm2, %xmm0
divsd %xmm0, %xmm1
movsd 0x3496a(%rip), %xmm0    # 0xe8398
ucomisd %xmm1, %xmm0
setae %al
andb $0x1, %al
movb %al, 0x417(%rsp)
movb 0x417(%rsp), %al
andb $0x1, %al
addq $0x418, %rsp            # imm = 0x418
retq
movq 0x340(%rsp), %rdi
callq 0xdd40
nopl (%rax)