protected static short codeUnit(int n0, int n1, int n2, int n3) {
    if ((n0 & 0xf) != n0) {
      throw new IllegalArgumentException("n0 out of range 0..15");
    }

    if ((n1 & 0xf) != n1) {
      throw new IllegalArgumentException("n1 out of range 0..15");
    }

    if ((n2 & 0xf) != n2) {
      throw new IllegalArgumentException("n2 out of range 0..15");
    }

    if ((n3 & 0xf) != n3) {
      throw new IllegalArgumentException("n3 out of range 0..15");
    }

    return (short) (n0 | (n1 << 4) | (n2 << 8) | (n3 << 12));
  }
Helper method to combine four nibbles into a code unit.

@param n0 {@code 0..15;} low nibble
@param n1 {@code 0..15;} medium-low nibble
@param n2 {@code 0..15;} medium-high nibble
@param n3 {@code 0..15;} high nibble
@return combined value
android/android_framework/dex-maker/src/main/java/com/android/dx/dex/code/InsnFormat.java