static long rotateRemainders(long bits, int mod, int amount) {
    return extractBits(bits, amount, Long.SIZE) | (extractBits(bits, 0, amount) << (mod - amount));
  }
static long rotateRemainders(long bits, int mod, int amount)