/* Multiply an integer by the 'A24' constant (121665). Partial reduction is performed (down to less than twice the modulus).  */
static void f255_mul_a24(uint32_t *d, const uint32_t *a)
/* Multiply an integer by the 'A24' constant (121665). Partial reduction is performed (down to less than twice the modulus).  */
static void f255_mul_a24(uint32_t *d, const uint32_t *a)
{
	int i;
	uint64_t cc, w;
	cc = 0;
	for (i = 0; i < 9; i ++) {
		w = MUL31(a[i], 121665) + cc;
		d[i] = (uint32_t)w & 0x3FFFFFFF;
		cc = w >> 30;
	}
	cc = MUL31((uint32_t)(w >> 15), 19);
	d[8] &= 0x7FFF;
	for (i = 0; i < 9; i ++) {
		w = (uint64_t)d[i] + cc;
		d[i] = w & 0x3FFFFFFF;
		cc = w >> 30;
	}
}