static int rshift_ceil(int a, int bits) { ret (a+(1 << bits)-1) >> bits; }