int rotr8(int x, int n) { assert(n >= 0); assert((x >= 0) && (x <= mask8)); n &= mask3; return ((x >> n) & mask8) | ((x << (8 - n)) & mask8); }