code: private static long getLong(final int[] intArr, final int index, final int rem) {
      long out = 0L;
      for (int i = rem; i-- > 0;) { //i= 1,0
        final int v = intArr[index + i];
        out ^= (v & 0xFFFFFFFFL) << (i * 32); //equivalent to |=
      }
      return out;
    }
docs: Gets a long from the given int array starting at the given int array index and continuing for
  remainder (rem) integers. The integers are extracted in little-endian order. There is no limit
  checking.
  
  @param intArr The given input int array.
  @param index Zero-based index from the start of the int array.
  @param rem Remainder integers. An integer in the range [1,2].
  @return long