static int bits (List<int> d, int p, int m) { int o = (p ~/ 8) | 0; return ((d[o] | (d[o + 1] << 8)) >> (p & 7)) & m; }