static void reduce(long[] input, long[] output) {
    long[] tmp;
    if (input.length == 19) {
      tmp = input;
    } else {
      tmp = new long[19];
      System.arraycopy(input, 0, tmp, 0, input.length);
    }
    reduceSizeByModularReduction(tmp);
    reduceCoefficients(tmp);
    System.arraycopy(tmp, 0, output, 0, LIMB_CNT);
  }
Reduce a field element by calling reduceSizeByModularReduction and reduceCoefficients.

@param input An input array of any length. If the array has 19 elements, it will be used as
    temporary buffer and its contents changed.
@param output An output array of size LIMB_CNT. After the call |output[i]| < 2^26 will hold.
java_src/src/main/java/com/google/crypto/tink/internal/Field25519.java