func ReverseComp2Unsafe(dst, src []byte) {
	simd.Reverse8(dst, src)
	simd.XorConst8Inplace(dst, 3)
}
ReverseComp2Unsafe saves the reverse-complement of src[] to dst[], assuming
that they're encoded with one byte per base, ACGT=0123.

WARNING: This is a function designed to be used in inner loops, which makes
assumptions about length and capacity which aren't checked at runtime.  Use
the safe version of this function when that's a problem.
Assumptions #2-3 are always satisfied when the last
potentially-size-increasing operation on src[] is simd.{Re}makeUnsafe(),
ResizeUnsafe(), or XcapUnsafe(), and the same is true of dst[].

1. len(src) == len(dst).

2. Capacity of src is at least RoundUpPow2(len(src) + 1, bytesPerVec), and
the same is true of dst.

3. The caller does not care if a few bytes past the end of dst[] are
changed.
package biosimd
import (
	"github.com/grailbio/base/simd"
)
var revComp8Table = [...]byte{
	'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N',
	'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N',
	'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N',
	'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N',
	'N', 'T', 'N', 'G', 'N', 'N', 'N', 'C', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N',
	'N', 'N', 'N', 'N', 'A', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N',
	'N', 'T', 'N', 'G', 'N', 'N', 'N', 'C', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N',
	'N', 'N', 'N', 'N', 'A', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N',
	'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N',
	'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N',
	'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N',
	'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N',
	'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N',
	'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N',
	'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N',
	'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N'}
func ReverseComp8InplaceNoValidate(ascii8 []byte) {
	nByte := len(ascii8)
	nByteDiv2 := nByte >> 1
	for idx, invIdx := 0, nByte-1; idx != nByteDiv2; idx, invIdx = idx+1, invIdx-1 {
		ascii8[idx], ascii8[invIdx] = revComp8Table[ascii8[invIdx]], revComp8Table[ascii8[idx]]
	}
	if nByte&1 == 1 {
		ascii8[nByteDiv2] = revComp8Table[ascii8[nByteDiv2]]
	}
}
func ReverseComp8Inplace(ascii8 []byte) {
	nByte := len(ascii8)
	nByteDiv2 := nByte >> 1
	for idx, invIdx := 0, nByte-1; idx != nByteDiv2; idx, invIdx = idx+1, invIdx-1 {
		ascii8[idx], ascii8[invIdx] = revComp8Table[ascii8[invIdx]], revComp8Table[ascii8[idx]]
	}
	if nByte&1 == 1 {
		ascii8[nByteDiv2] = revComp8Table[ascii8[nByteDiv2]]
	}
}
func ReverseComp8NoValidate(dst, src []byte) {
	nByte := len(src)
	if len(dst) != nByte {
		panic("ReverseComp8NoValidate requires len(dst) == len(src).")
	}
	for idx, invIdx := 0, nByte-1; idx != nByte; idx, invIdx = idx+1, invIdx-1 {
		dst[idx] = revComp8Table[src[invIdx]]
	}
}
var revComp4Table = MakeNibbleLookupTable([16]byte{0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15})
func ReverseComp4UnsafeInplace(seq8 []byte) {
	nByte := len(seq8)
	nByteDiv2 := nByte >> 1
	for idx, invIdx := 0, nByte-1; idx != nByteDiv2; idx, invIdx = idx+1, invIdx-1 {
		seq8[idx], seq8[invIdx] = revComp4Table.Get(seq8[invIdx]), revComp4Table.Get(seq8[idx])
	}
	if nByte&1 == 1 {
		seq8[nByteDiv2] = revComp4Table.Get(seq8[nByteDiv2])
	}
}
func ReverseComp4Inplace(seq8 []byte) {
	nByte := len(seq8)
	nByteDiv2 := nByte >> 1
	for idx, invIdx := 0, nByte-1; idx != nByteDiv2; idx, invIdx = idx+1, invIdx-1 {
		seq8[idx], seq8[invIdx] = revComp4Table.Get(seq8[invIdx]), revComp4Table.Get(seq8[idx])
	}
	if nByte&1 == 1 {
		seq8[nByteDiv2] = revComp4Table.Get(seq8[nByteDiv2])
	}
}
func ReverseComp4Unsafe(dst, src []byte) {
	nByte := len(src)
	for idx, invIdx := 0, nByte-1; idx != nByte; idx, invIdx = idx+1, invIdx-1 {
		dst[idx] = revComp4Table.Get(src[invIdx])
	}
}
func ReverseComp4(dst, src []byte) {
	nByte := len(src)
	if len(dst) != len(src) {
		panic("ReverseComp4() requires len(dst) == len(src).")
	}
	for idx, invIdx := 0, nByte-1; idx != nByte; idx, invIdx = idx+1, invIdx-1 {
		dst[idx] = revComp4Table.Get(src[invIdx])
	}
}
func ReverseComp2UnsafeInplace(acgt8 []byte) {
	simd.Reverse8Inplace(acgt8)
	simd.XorConst8Inplace(acgt8, 3)
}
func ReverseComp2Inplace(acgt8 []byte) {
	simd.Reverse8Inplace(acgt8)
	simd.XorConst8Inplace(acgt8, 3)
}