code: public static long encodeHi(long encoded, int hi) {
          long h = ((long) hi) & 0xFFFF_FFFFL;
          long l = encoded & 0xFFFF_FFFFL;
          return (h << 32) + l;
      }
docs: Sets the hi value into the given encoded value.
  
  @param encoded the encoded value
  @param hi      the hi value
  @return the new encoded value