/* Normalise an array of words to a strict 13 bits per word. Returned value is the resulting carry. The source (w) and destination (d) arrays may be identical, but shall not overlap partially.  */
static uint32_t norm13(uint32_t *d, const uint32_t *w, size_t len)
/* Normalise an array of words to a strict 13 bits per word. Returned value is the resulting carry. The source (w) and destination (d) arrays may be identical, but shall not overlap partially.  */
static uint32_t norm13(uint32_t *d, const uint32_t *w, size_t len)
{
	size_t u;
	uint32_t cc;
	cc = 0;
	for (u = 0; u < len; u ++) {
		int32_t z;
		z = w[u] + cc;
		d[u] = z & 0x1FFF;
		cc = ARSH(z, 13);
	}
	return cc;
}