// File: BenLangmead[P]bowtie/./sstring.h
// Function: S2bDnaString::reverseWindow(unsigned long, unsigned long)
void reverseWindow(size_t off, size_t len) {
		assert_leq(off, len_);
		assert_leq(off+len, len_);
		if(len <= 1) return;
		size_t wordf = (off+len-1) >> 4;
		size_t bpf   = (off+len-1) & 15;
		size_t wordi = (off      ) >> 4;
		size_t bpi   = (off      ) & 15;
		while(wordf > wordi || (wordf == wordi && bpf > bpi)) {
			int f = (cs_[wordf] >> (bpf << 1)) & 3;
			int i = (cs_[wordi] >> (bpi << 1)) & 3;
			cs_[wordf] &= ~(uint32_t)(3 << (bpf << 1));
			cs_[wordi] &= ~(uint32_t)(3 << (bpi << 1));
			cs_[wordf] |=  (uint32_t)(i << (bpf << 1));
			cs_[wordi] |=  (uint32_t)(f << (bpi << 1));
			if(bpf == 0) {
				bpf = 15;
				wordf--;
			} else bpf--;
			if(bpi == 15) {
				bpi = 0;
				wordi++;
			} else bpi++;
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpq $0x1, -0x18(%rbp)
ja 0x37e74
jmp 0x37ff7
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
subq $0x1, %rax
shrq $0x4, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
subq $0x1, %rax
andq $0xf, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
shrq $0x4, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
andq $0xf, %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rcx
movb $0x1, %al
cmpq -0x30(%rbp), %rcx
movb %al, -0x49(%rbp)
ja 0x37ee6
movq -0x20(%rbp), %rcx
xorl %eax, %eax
cmpq -0x30(%rbp), %rcx
movb %al, -0x4a(%rbp)
jne 0x37ee0
movq -0x28(%rbp), %rax
cmpq -0x38(%rbp), %rax
seta %al
movb %al, -0x4a(%rbp)
movb -0x4a(%rbp), %al
movb %al, -0x49(%rbp)
movb -0x49(%rbp), %al
testb $0x1, %al
jne 0x37ef2
jmp 0x37ff7
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x20(%rbp), %rdx
movl (%rcx,%rdx,4), %edx
movq -0x28(%rbp), %rcx
shlq %rcx
shrl %cl, %edx
movl %edx, %ecx
andl $0x3, %ecx
movl %ecx, -0x3c(%rbp)
movq 0x8(%rax), %rcx
movq -0x30(%rbp), %rdx
movl (%rcx,%rdx,4), %edx
movq -0x38(%rbp), %rcx
shlq %rcx
shrl %cl, %edx
movl %edx, %ecx
andl $0x3, %ecx
movl %ecx, -0x40(%rbp)
movq -0x28(%rbp), %rcx
shlq %rcx
movl $0x3, %esi
shll %cl, %esi
xorl $-0x1, %esi
movq 0x8(%rax), %rcx
movq -0x20(%rbp), %rdx
andl (%rcx,%rdx,4), %esi
movl %esi, (%rcx,%rdx,4)
movq -0x38(%rbp), %rcx
shlq %rcx
movl $0x3, %esi
shll %cl, %esi
xorl $-0x1, %esi
movq 0x8(%rax), %rcx
movq -0x30(%rbp), %rdx
andl (%rcx,%rdx,4), %esi
movl %esi, (%rcx,%rdx,4)
movl -0x40(%rbp), %esi
movq -0x28(%rbp), %rcx
shlq %rcx
shll %cl, %esi
movq 0x8(%rax), %rcx
movq -0x20(%rbp), %rdx
orl (%rcx,%rdx,4), %esi
movl %esi, (%rcx,%rdx,4)
movl -0x3c(%rbp), %edx
movq -0x38(%rbp), %rcx
shlq %rcx
shll %cl, %edx
movq 0x8(%rax), %rax
movq -0x30(%rbp), %rcx
orl (%rax,%rcx,4), %edx
movl %edx, (%rax,%rcx,4)
cmpq $0x0, -0x28(%rbp)
jne 0x37fbd
movq $0xf, -0x28(%rbp)
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x37fc9
movq -0x28(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x28(%rbp)
cmpq $0xf, -0x38(%rbp)
jne 0x37fe6
movq $0x0, -0x38(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x37ff2
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x37eb4
popq %rbp
retq
nopl (%rax)