/* Autogenerated: 'src/ExtractionOCaml/unsaturated_solinas' --lang Java --cmovznz-by-mul --widen-carry --widen-bytes --internal-static --package-name fiat_crypto --class-case UpperCamelCase --no-field-element-typedefs Curve25519 32 '(auto)' '2^255 - 19' carry_mul carry_square carry add sub opp selectznz to_bytes from_bytes relax carry_scmul121666 */
/* curve description: Curve25519 */
/* machine_wordsize = 32 (from "32") */
/* requested operations: carry_mul, carry_square, carry, add, sub, opp, selectznz, to_bytes, from_bytes, relax, carry_scmul121666 */
/* n = 10 (from "(auto)") */
/* s-c = 2^255 - [(1, 19)] (from "2^255 - 19") */
/* tight_bounds_multiplier = 1 (from "") */
/*  */
/* Computed values: */
/*   carry_chain = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1] */
/*   eval z = z[0] + (z[1] << 26) + (z[2] << 51) + (z[3] << 77) + (z[4] << 102) + (z[5] << 128) + (z[6] << 153) + (z[7] << 179) + (z[8] << 204) + (z[9] << 230) */
/*   bytes_eval z = z[0] + (z[1] << 8) + (z[2] << 16) + (z[3] << 24) + (z[4] << 32) + (z[5] << 40) + (z[6] << 48) + (z[7] << 56) + (z[8] << 64) + (z[9] << 72) + (z[10] << 80) + (z[11] << 88) + (z[12] << 96) + (z[13] << 104) + (z[14] << 112) + (z[15] << 120) + (z[16] << 128) + (z[17] << 136) + (z[18] << 144) + (z[19] << 152) + (z[20] << 160) + (z[21] << 168) + (z[22] << 176) + (z[23] << 184) + (z[24] << 192) + (z[25] << 200) + (z[26] << 208) + (z[27] << 216) + (z[28] << 224) + (z[29] << 232) + (z[30] << 240) + (z[31] << 248) */
/*   balance = [0x7ffffda, 0x3fffffe, 0x7fffffe, 0x3fffffe, 0x7fffffe, 0x3fffffe, 0x7fffffe, 0x3fffffe, 0x7fffffe, 0x3fffffe] */

package fiat_crypto;

public final class FiatCurve25519 {

static class Box<T> {
  private T value;
  public Box(T value) { this.value = value; }
  public void set(T value) { this.value = value; }
  public T get() { return this.value; }
}



/**
 * The function fiat_Curve25519_addcarryx_u26 is an addition with carry. <p>
 * <p>
 * Postconditions: <p>
 *   out1 = (arg1 + arg2 + arg3) mod 2^26 <p>
 *   out2 = ⌊(arg1 + arg2 + arg3) / 2^26⌋ <p>
 * <p>
 * Input Bounds: <p>
 *   arg1: [0x0 ~&gt; 0x1] <p>
 *   arg2: [0x0 ~&gt; 0x3ffffff] <p>
 *   arg3: [0x0 ~&gt; 0x3ffffff] <p>
 * Output Bounds: <p>
 *   out1: [0x0 ~&gt; 0x3ffffff] <p>
 *   out2: [0x0 ~&gt; 0x1] <p>
 */
static void fiat_Curve25519_addcarryx_u26(Box<Integer> out1, Box<Integer> out2, int arg1, int arg2, int arg3) {
  int x1 = ((arg1 + arg2) + arg3);
  int x2 = (x1 & 0x3ffffff);
  int x3 = (x1 >>> 26);
  out1.set(x2);
  out2.set(x3);
}

/**
 * The function fiat_Curve25519_subborrowx_u26 is a subtraction with borrow. <p>
 * <p>
 * Postconditions: <p>
 *   out1 = (-arg1 + arg2 + -arg3) mod 2^26 <p>
 *   out2 = -⌊(-arg1 + arg2 + -arg3) / 2^26⌋ <p>
 * <p>
 * Input Bounds: <p>
 *   arg1: [0x0 ~&gt; 0x1] <p>
 *   arg2: [0x0 ~&gt; 0x3ffffff] <p>
 *   arg3: [0x0 ~&gt; 0x3ffffff] <p>
 * Output Bounds: <p>
 *   out1: [0x0 ~&gt; 0x3ffffff] <p>
 *   out2: [0x0 ~&gt; 0x1] <p>
 */
static void fiat_Curve25519_subborrowx_u26(Box<Integer> out1, Box<Integer> out2, int arg1, int arg2, int arg3) {
  int x1 = (((int) Integer.toUnsignedLong(((Number) (arg2)).intValue()) - (int) Integer.toUnsignedLong(((Number) (arg1)).intValue())) - (int) Integer.toUnsignedLong(((Number) (arg3)).intValue()));
  int x2 = (x1 >>> 26);
  int x3 = ((int) Integer.toUnsignedLong(((Number) (x1)).intValue()) & 0x3ffffff);
  out1.set(x3);
  out2.set(((int) Integer.toUnsignedLong(((Number) (0x0)).intValue()) - (int) Integer.toUnsignedLong(((Number) (x2)).intValue())));
}

/**
 * The function fiat_Curve25519_addcarryx_u25 is an addition with carry. <p>
 * <p>
 * Postconditions: <p>
 *   out1 = (arg1 + arg2 + arg3) mod 2^25 <p>
 *   out2 = ⌊(arg1 + arg2 + arg3) / 2^25⌋ <p>
 * <p>
 * Input Bounds: <p>
 *   arg1: [0x0 ~&gt; 0x1] <p>
 *   arg2: [0x0 ~&gt; 0x1ffffff] <p>
 *   arg3: [0x0 ~&gt; 0x1ffffff] <p>
 * Output Bounds: <p>
 *   out1: [0x0 ~&gt; 0x1ffffff] <p>
 *   out2: [0x0 ~&gt; 0x1] <p>
 */
static void fiat_Curve25519_addcarryx_u25(Box<Integer> out1, Box<Integer> out2, int arg1, int arg2, int arg3) {
  int x1 = ((arg1 + arg2) + arg3);
  int x2 = (x1 & 0x1ffffff);
  int x3 = (x1 >>> 25);
  out1.set(x2);
  out2.set(x3);
}

/**
 * The function fiat_Curve25519_subborrowx_u25 is a subtraction with borrow. <p>
 * <p>
 * Postconditions: <p>
 *   out1 = (-arg1 + arg2 + -arg3) mod 2^25 <p>
 *   out2 = -⌊(-arg1 + arg2 + -arg3) / 2^25⌋ <p>
 * <p>
 * Input Bounds: <p>
 *   arg1: [0x0 ~&gt; 0x1] <p>
 *   arg2: [0x0 ~&gt; 0x1ffffff] <p>
 *   arg3: [0x0 ~&gt; 0x1ffffff] <p>
 * Output Bounds: <p>
 *   out1: [0x0 ~&gt; 0x1ffffff] <p>
 *   out2: [0x0 ~&gt; 0x1] <p>
 */
static void fiat_Curve25519_subborrowx_u25(Box<Integer> out1, Box<Integer> out2, int arg1, int arg2, int arg3) {
  int x1 = (((int) Integer.toUnsignedLong(((Number) (arg2)).intValue()) - (int) Integer.toUnsignedLong(((Number) (arg1)).intValue())) - (int) Integer.toUnsignedLong(((Number) (arg3)).intValue()));
  int x2 = (x1 >>> 25);
  int x3 = ((int) Integer.toUnsignedLong(((Number) (x1)).intValue()) & 0x1ffffff);
  out1.set(x3);
  out2.set(((int) Integer.toUnsignedLong(((Number) (0x0)).intValue()) - (int) Integer.toUnsignedLong(((Number) (x2)).intValue())));
}

/**
 * The function fiat_Curve25519_cmovznz_u32 is a single-word conditional move. <p>
 * <p>
 * Postconditions: <p>
 *   out1 = (if arg1 = 0 then arg2 else arg3) <p>
 * <p>
 * Input Bounds: <p>
 *   arg1: [0x0 ~&gt; 0x1] <p>
 *   arg2: [0x0 ~&gt; 0xffffffff] <p>
 *   arg3: [0x0 ~&gt; 0xffffffff] <p>
 * Output Bounds: <p>
 *   out1: [0x0 ~&gt; 0xffffffff] <p>
 */
static void fiat_Curve25519_cmovznz_u32(Box<Integer> out1, int arg1, int arg2, int arg3) {
  int x1 = (arg1 * 0xffffffff);
  int x2 = ((x1 & arg3) | ((~x1) & arg2));
  out1.set(x2);
}

/**
 * The function fiat_Curve25519_carry_mul multiplies two field elements and reduces the result. <p>
 * <p>
 * Postconditions: <p>
 *   eval out1 mod m = (eval arg1 * eval arg2) mod m <p>
 * <p>
 * Input Bounds: <p>
 *   arg1: [[0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000], [0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000], [0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000], [0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000], [0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000]] <p>
 *   arg2: [[0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000], [0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000], [0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000], [0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000], [0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000]] <p>
 * Output Bounds: <p>
 *   out1: [[0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000]] <p>
 */
public static void fiat_Curve25519_carry_mul(int[] out1, final int[] arg1, final int[] arg2) {
  long x1 = ((long) Integer.toUnsignedLong(((Number) ((arg1[9]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[9]) * 0x26))).intValue()));
  long x2 = ((long) Integer.toUnsignedLong(((Number) ((arg1[9]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[8]) * 0x13))).intValue()));
  long x3 = ((long) Integer.toUnsignedLong(((Number) ((arg1[9]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[7]) * 0x26))).intValue()));
  long x4 = ((long) Integer.toUnsignedLong(((Number) ((arg1[9]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[6]) * 0x13))).intValue()));
  long x5 = ((long) Integer.toUnsignedLong(((Number) ((arg1[9]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[5]) * 0x26))).intValue()));
  long x6 = ((long) Integer.toUnsignedLong(((Number) ((arg1[9]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[4]) * 0x13))).intValue()));
  long x7 = ((long) Integer.toUnsignedLong(((Number) ((arg1[9]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[3]) * 0x26))).intValue()));
  long x8 = ((long) Integer.toUnsignedLong(((Number) ((arg1[9]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[2]) * 0x13))).intValue()));
  long x9 = ((long) Integer.toUnsignedLong(((Number) ((arg1[9]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[1]) * 0x26))).intValue()));
  long x10 = ((long) Integer.toUnsignedLong(((Number) ((arg1[8]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[9]) * 0x13))).intValue()));
  long x11 = ((long) Integer.toUnsignedLong(((Number) ((arg1[8]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[8]) * 0x13))).intValue()));
  long x12 = ((long) Integer.toUnsignedLong(((Number) ((arg1[8]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[7]) * 0x13))).intValue()));
  long x13 = ((long) Integer.toUnsignedLong(((Number) ((arg1[8]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[6]) * 0x13))).intValue()));
  long x14 = ((long) Integer.toUnsignedLong(((Number) ((arg1[8]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[5]) * 0x13))).intValue()));
  long x15 = ((long) Integer.toUnsignedLong(((Number) ((arg1[8]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[4]) * 0x13))).intValue()));
  long x16 = ((long) Integer.toUnsignedLong(((Number) ((arg1[8]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[3]) * 0x13))).intValue()));
  long x17 = ((long) Integer.toUnsignedLong(((Number) ((arg1[8]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[2]) * 0x13))).intValue()));
  long x18 = ((long) Integer.toUnsignedLong(((Number) ((arg1[7]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[9]) * 0x26))).intValue()));
  long x19 = ((long) Integer.toUnsignedLong(((Number) ((arg1[7]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[8]) * 0x13))).intValue()));
  long x20 = ((long) Integer.toUnsignedLong(((Number) ((arg1[7]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[7]) * 0x26))).intValue()));
  long x21 = ((long) Integer.toUnsignedLong(((Number) ((arg1[7]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[6]) * 0x13))).intValue()));
  long x22 = ((long) Integer.toUnsignedLong(((Number) ((arg1[7]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[5]) * 0x26))).intValue()));
  long x23 = ((long) Integer.toUnsignedLong(((Number) ((arg1[7]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[4]) * 0x13))).intValue()));
  long x24 = ((long) Integer.toUnsignedLong(((Number) ((arg1[7]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[3]) * 0x26))).intValue()));
  long x25 = ((long) Integer.toUnsignedLong(((Number) ((arg1[6]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[9]) * 0x13))).intValue()));
  long x26 = ((long) Integer.toUnsignedLong(((Number) ((arg1[6]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[8]) * 0x13))).intValue()));
  long x27 = ((long) Integer.toUnsignedLong(((Number) ((arg1[6]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[7]) * 0x13))).intValue()));
  long x28 = ((long) Integer.toUnsignedLong(((Number) ((arg1[6]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[6]) * 0x13))).intValue()));
  long x29 = ((long) Integer.toUnsignedLong(((Number) ((arg1[6]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[5]) * 0x13))).intValue()));
  long x30 = ((long) Integer.toUnsignedLong(((Number) ((arg1[6]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[4]) * 0x13))).intValue()));
  long x31 = ((long) Integer.toUnsignedLong(((Number) ((arg1[5]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[9]) * 0x26))).intValue()));
  long x32 = ((long) Integer.toUnsignedLong(((Number) ((arg1[5]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[8]) * 0x13))).intValue()));
  long x33 = ((long) Integer.toUnsignedLong(((Number) ((arg1[5]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[7]) * 0x26))).intValue()));
  long x34 = ((long) Integer.toUnsignedLong(((Number) ((arg1[5]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[6]) * 0x13))).intValue()));
  long x35 = ((long) Integer.toUnsignedLong(((Number) ((arg1[5]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[5]) * 0x26))).intValue()));
  long x36 = ((long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[9]) * 0x13))).intValue()));
  long x37 = ((long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[8]) * 0x13))).intValue()));
  long x38 = ((long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[7]) * 0x13))).intValue()));
  long x39 = ((long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[6]) * 0x13))).intValue()));
  long x40 = ((long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[9]) * 0x26))).intValue()));
  long x41 = ((long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[8]) * 0x13))).intValue()));
  long x42 = ((long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[7]) * 0x26))).intValue()));
  long x43 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[9]) * 0x13))).intValue()));
  long x44 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[8]) * 0x13))).intValue()));
  long x45 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[9]) * 0x26))).intValue()));
  long x46 = ((long) Integer.toUnsignedLong(((Number) ((arg1[9]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[0]))).intValue()));
  long x47 = ((long) Integer.toUnsignedLong(((Number) ((arg1[8]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[1]))).intValue()));
  long x48 = ((long) Integer.toUnsignedLong(((Number) ((arg1[8]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[0]))).intValue()));
  long x49 = ((long) Integer.toUnsignedLong(((Number) ((arg1[7]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[2]))).intValue()));
  long x50 = ((long) Integer.toUnsignedLong(((Number) ((arg1[7]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[1]) * 0x2))).intValue()));
  long x51 = ((long) Integer.toUnsignedLong(((Number) ((arg1[7]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[0]))).intValue()));
  long x52 = ((long) Integer.toUnsignedLong(((Number) ((arg1[6]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[3]))).intValue()));
  long x53 = ((long) Integer.toUnsignedLong(((Number) ((arg1[6]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[2]))).intValue()));
  long x54 = ((long) Integer.toUnsignedLong(((Number) ((arg1[6]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[1]))).intValue()));
  long x55 = ((long) Integer.toUnsignedLong(((Number) ((arg1[6]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[0]))).intValue()));
  long x56 = ((long) Integer.toUnsignedLong(((Number) ((arg1[5]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[4]))).intValue()));
  long x57 = ((long) Integer.toUnsignedLong(((Number) ((arg1[5]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[3]) * 0x2))).intValue()));
  long x58 = ((long) Integer.toUnsignedLong(((Number) ((arg1[5]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[2]))).intValue()));
  long x59 = ((long) Integer.toUnsignedLong(((Number) ((arg1[5]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[1]) * 0x2))).intValue()));
  long x60 = ((long) Integer.toUnsignedLong(((Number) ((arg1[5]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[0]))).intValue()));
  long x61 = ((long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[5]))).intValue()));
  long x62 = ((long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[4]))).intValue()));
  long x63 = ((long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[3]))).intValue()));
  long x64 = ((long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[2]))).intValue()));
  long x65 = ((long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[1]))).intValue()));
  long x66 = ((long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[0]))).intValue()));
  long x67 = ((long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[6]))).intValue()));
  long x68 = ((long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[5]) * 0x2))).intValue()));
  long x69 = ((long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[4]))).intValue()));
  long x70 = ((long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[3]) * 0x2))).intValue()));
  long x71 = ((long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[2]))).intValue()));
  long x72 = ((long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[1]) * 0x2))).intValue()));
  long x73 = ((long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[0]))).intValue()));
  long x74 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[7]))).intValue()));
  long x75 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[6]))).intValue()));
  long x76 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[5]))).intValue()));
  long x77 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[4]))).intValue()));
  long x78 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[3]))).intValue()));
  long x79 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[2]))).intValue()));
  long x80 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[1]))).intValue()));
  long x81 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[0]))).intValue()));
  long x82 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[8]))).intValue()));
  long x83 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[7]) * 0x2))).intValue()));
  long x84 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[6]))).intValue()));
  long x85 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[5]) * 0x2))).intValue()));
  long x86 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[4]))).intValue()));
  long x87 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[3]) * 0x2))).intValue()));
  long x88 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[2]))).intValue()));
  long x89 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[1]) * 0x2))).intValue()));
  long x90 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[0]))).intValue()));
  long x91 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[9]))).intValue()));
  long x92 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[8]))).intValue()));
  long x93 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[7]))).intValue()));
  long x94 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[6]))).intValue()));
  long x95 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[5]))).intValue()));
  long x96 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[4]))).intValue()));
  long x97 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[3]))).intValue()));
  long x98 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[2]))).intValue()));
  long x99 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[1]))).intValue()));
  long x100 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[0]))).intValue()));
  long x101 = (x100 + (x45 + (x44 + (x42 + (x39 + (x35 + (x30 + (x24 + (x17 + x9)))))))));
  long x102 = (x101 >>> 26);
  int x103 = ((int) Integer.toUnsignedLong(((Number) (x101)).intValue()) & 0x3ffffff);
  long x104 = (x91 + (x82 + (x74 + (x67 + (x61 + (x56 + (x52 + (x49 + (x47 + x46)))))))));
  long x105 = (x92 + (x83 + (x75 + (x68 + (x62 + (x57 + (x53 + (x50 + (x48 + x1)))))))));
  long x106 = (x93 + (x84 + (x76 + (x69 + (x63 + (x58 + (x54 + (x51 + (x10 + x2)))))))));
  long x107 = (x94 + (x85 + (x77 + (x70 + (x64 + (x59 + (x55 + (x18 + (x11 + x3)))))))));
  long x108 = (x95 + (x86 + (x78 + (x71 + (x65 + (x60 + (x25 + (x19 + (x12 + x4)))))))));
  long x109 = (x96 + (x87 + (x79 + (x72 + (x66 + (x31 + (x26 + (x20 + (x13 + x5)))))))));
  long x110 = (x97 + (x88 + (x80 + (x73 + (x36 + (x32 + (x27 + (x21 + (x14 + x6)))))))));
  long x111 = (x98 + (x89 + (x81 + (x40 + (x37 + (x33 + (x28 + (x22 + (x15 + x7)))))))));
  long x112 = (x99 + (x90 + (x43 + (x41 + (x38 + (x34 + (x29 + (x23 + (x16 + x8)))))))));
  long x113 = (x102 + x112);
  long x114 = (x113 >>> 25);
  int x115 = ((int) Integer.toUnsignedLong(((Number) (x113)).intValue()) & 0x1ffffff);
  long x116 = (x114 + x111);
  long x117 = (x116 >>> 26);
  int x118 = ((int) Integer.toUnsignedLong(((Number) (x116)).intValue()) & 0x3ffffff);
  long x119 = (x117 + x110);
  long x120 = (x119 >>> 25);
  int x121 = ((int) Integer.toUnsignedLong(((Number) (x119)).intValue()) & 0x1ffffff);
  long x122 = (x120 + x109);
  long x123 = (x122 >>> 26);
  int x124 = ((int) Integer.toUnsignedLong(((Number) (x122)).intValue()) & 0x3ffffff);
  long x125 = (x123 + x108);
  long x126 = (x125 >>> 25);
  int x127 = ((int) Integer.toUnsignedLong(((Number) (x125)).intValue()) & 0x1ffffff);
  long x128 = (x126 + x107);
  long x129 = (x128 >>> 26);
  int x130 = ((int) Integer.toUnsignedLong(((Number) (x128)).intValue()) & 0x3ffffff);
  long x131 = (x129 + x106);
  long x132 = (x131 >>> 25);
  int x133 = ((int) Integer.toUnsignedLong(((Number) (x131)).intValue()) & 0x1ffffff);
  long x134 = (x132 + x105);
  long x135 = (x134 >>> 26);
  int x136 = ((int) Integer.toUnsignedLong(((Number) (x134)).intValue()) & 0x3ffffff);
  long x137 = (x135 + x104);
  long x138 = (x137 >>> 25);
  int x139 = ((int) Integer.toUnsignedLong(((Number) (x137)).intValue()) & 0x1ffffff);
  long x140 = (x138 * (long) Integer.toUnsignedLong(((Number) (0x13)).intValue()));
  long x141 = ((long) Integer.toUnsignedLong(((Number) (x103)).intValue()) + x140);
  int x142 = (int) Integer.toUnsignedLong(((Number) ((x141 >>> 26))).intValue());
  int x143 = ((int) Integer.toUnsignedLong(((Number) (x141)).intValue()) & 0x3ffffff);
  int x144 = (x142 + x115);
  int x145 = (x144 >>> 25);
  int x146 = (x144 & 0x1ffffff);
  int x147 = (x145 + x118);
  out1[0] = x143;
  out1[1] = x146;
  out1[2] = x147;
  out1[3] = x121;
  out1[4] = x124;
  out1[5] = x127;
  out1[6] = x130;
  out1[7] = x133;
  out1[8] = x136;
  out1[9] = x139;
}

/**
 * The function fiat_Curve25519_carry_square squares a field element and reduces the result. <p>
 * <p>
 * Postconditions: <p>
 *   eval out1 mod m = (eval arg1 * eval arg1) mod m <p>
 * <p>
 * Input Bounds: <p>
 *   arg1: [[0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000], [0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000], [0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000], [0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000], [0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000]] <p>
 * Output Bounds: <p>
 *   out1: [[0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000]] <p>
 */
public static void fiat_Curve25519_carry_square(int[] out1, final int[] arg1) {
  int x1 = ((arg1[9]) * 0x13);
  int x2 = (x1 * 0x2);
  int x3 = ((arg1[9]) * 0x2);
  int x4 = ((arg1[8]) * 0x13);
  long x5 = ((long) Integer.toUnsignedLong(((Number) (x4)).intValue()) * (long) Integer.toUnsignedLong(((Number) (0x2)).intValue()));
  int x6 = ((arg1[8]) * 0x2);
  int x7 = ((arg1[7]) * 0x13);
  int x8 = (x7 * 0x2);
  int x9 = ((arg1[7]) * 0x2);
  int x10 = ((arg1[6]) * 0x13);
  long x11 = ((long) Integer.toUnsignedLong(((Number) (x10)).intValue()) * (long) Integer.toUnsignedLong(((Number) (0x2)).intValue()));
  int x12 = ((arg1[6]) * 0x2);
  int x13 = ((arg1[5]) * 0x13);
  int x14 = ((arg1[5]) * 0x2);
  int x15 = ((arg1[4]) * 0x2);
  int x16 = ((arg1[3]) * 0x2);
  int x17 = ((arg1[2]) * 0x2);
  int x18 = ((arg1[1]) * 0x2);
  long x19 = ((long) Integer.toUnsignedLong(((Number) ((arg1[9]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((x1 * 0x2))).intValue()));
  long x20 = ((long) Integer.toUnsignedLong(((Number) ((arg1[8]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x2)).intValue()));
  long x21 = ((long) Integer.toUnsignedLong(((Number) ((arg1[8]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x4)).intValue()));
  long x22 = ((long) Integer.toUnsignedLong(((Number) ((arg1[7]))).intValue()) * ((long) Integer.toUnsignedLong(((Number) (x2)).intValue()) * (long) Integer.toUnsignedLong(((Number) (0x2)).intValue())));
  long x23 = ((long) Integer.toUnsignedLong(((Number) ((arg1[7]))).intValue()) * x5);
  long x24 = ((long) Integer.toUnsignedLong(((Number) ((arg1[7]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((x7 * 0x2))).intValue()));
  long x25 = ((long) Integer.toUnsignedLong(((Number) ((arg1[6]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x2)).intValue()));
  long x26 = ((long) Integer.toUnsignedLong(((Number) ((arg1[6]))).intValue()) * x5);
  long x27 = ((long) Integer.toUnsignedLong(((Number) ((arg1[6]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x8)).intValue()));
  long x28 = ((long) Integer.toUnsignedLong(((Number) ((arg1[6]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x10)).intValue()));
  long x29 = ((long) Integer.toUnsignedLong(((Number) ((arg1[5]))).intValue()) * ((long) Integer.toUnsignedLong(((Number) (x2)).intValue()) * (long) Integer.toUnsignedLong(((Number) (0x2)).intValue())));
  long x30 = ((long) Integer.toUnsignedLong(((Number) ((arg1[5]))).intValue()) * x5);
  long x31 = ((long) Integer.toUnsignedLong(((Number) ((arg1[5]))).intValue()) * ((long) Integer.toUnsignedLong(((Number) (x8)).intValue()) * (long) Integer.toUnsignedLong(((Number) (0x2)).intValue())));
  long x32 = ((long) Integer.toUnsignedLong(((Number) ((arg1[5]))).intValue()) * x11);
  long x33 = ((long) Integer.toUnsignedLong(((Number) ((arg1[5]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((x13 * 0x2))).intValue()));
  long x34 = ((long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x2)).intValue()));
  long x35 = ((long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()) * x5);
  long x36 = ((long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x8)).intValue()));
  long x37 = ((long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()) * x11);
  long x38 = ((long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x14)).intValue()));
  long x39 = ((long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()));
  long x40 = ((long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()) * ((long) Integer.toUnsignedLong(((Number) (x2)).intValue()) * (long) Integer.toUnsignedLong(((Number) (0x2)).intValue())));
  long x41 = ((long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()) * x5);
  long x42 = ((long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()) * ((long) Integer.toUnsignedLong(((Number) (x8)).intValue()) * (long) Integer.toUnsignedLong(((Number) (0x2)).intValue())));
  long x43 = ((long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x12)).intValue()));
  long x44 = ((long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((x14 * 0x2))).intValue()));
  long x45 = ((long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x15)).intValue()));
  long x46 = ((long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg1[3]) * 0x2))).intValue()));
  long x47 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x2)).intValue()));
  long x48 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * x5);
  long x49 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x9)).intValue()));
  long x50 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x12)).intValue()));
  long x51 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x14)).intValue()));
  long x52 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x15)).intValue()));
  long x53 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x16)).intValue()));
  long x54 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()));
  long x55 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * ((long) Integer.toUnsignedLong(((Number) (x2)).intValue()) * (long) Integer.toUnsignedLong(((Number) (0x2)).intValue())));
  long x56 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x6)).intValue()));
  long x57 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((x9 * 0x2))).intValue()));
  long x58 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x12)).intValue()));
  long x59 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((x14 * 0x2))).intValue()));
  long x60 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x15)).intValue()));
  long x61 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((x16 * 0x2))).intValue()));
  long x62 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x17)).intValue()));
  long x63 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg1[1]) * 0x2))).intValue()));
  long x64 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x3)).intValue()));
  long x65 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x6)).intValue()));
  long x66 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x9)).intValue()));
  long x67 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x12)).intValue()));
  long x68 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x14)).intValue()));
  long x69 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x15)).intValue()));
  long x70 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x16)).intValue()));
  long x71 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x17)).intValue()));
  long x72 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x18)).intValue()));
  long x73 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()));
  long x74 = (x73 + (x55 + (x48 + (x42 + (x37 + x33)))));
  long x75 = (x74 >>> 26);
  int x76 = ((int) Integer.toUnsignedLong(((Number) (x74)).intValue()) & 0x3ffffff);
  long x77 = (x64 + (x56 + (x49 + (x43 + x38))));
  long x78 = (x65 + (x57 + (x50 + (x44 + (x39 + x19)))));
  long x79 = (x66 + (x58 + (x51 + (x45 + x20))));
  long x80 = (x67 + (x59 + (x52 + (x46 + (x22 + x21)))));
  long x81 = (x68 + (x60 + (x53 + (x25 + x23))));
  long x82 = (x69 + (x61 + (x54 + (x29 + (x26 + x24)))));
  long x83 = (x70 + (x62 + (x34 + (x30 + x27))));
  long x84 = (x71 + (x63 + (x40 + (x35 + (x31 + x28)))));
  long x85 = (x72 + (x47 + (x41 + (x36 + x32))));
  long x86 = (x75 + x85);
  long x87 = (x86 >>> 25);
  int x88 = ((int) Integer.toUnsignedLong(((Number) (x86)).intValue()) & 0x1ffffff);
  long x89 = (x87 + x84);
  long x90 = (x89 >>> 26);
  int x91 = ((int) Integer.toUnsignedLong(((Number) (x89)).intValue()) & 0x3ffffff);
  long x92 = (x90 + x83);
  long x93 = (x92 >>> 25);
  int x94 = ((int) Integer.toUnsignedLong(((Number) (x92)).intValue()) & 0x1ffffff);
  long x95 = (x93 + x82);
  long x96 = (x95 >>> 26);
  int x97 = ((int) Integer.toUnsignedLong(((Number) (x95)).intValue()) & 0x3ffffff);
  long x98 = (x96 + x81);
  long x99 = (x98 >>> 25);
  int x100 = ((int) Integer.toUnsignedLong(((Number) (x98)).intValue()) & 0x1ffffff);
  long x101 = (x99 + x80);
  long x102 = (x101 >>> 26);
  int x103 = ((int) Integer.toUnsignedLong(((Number) (x101)).intValue()) & 0x3ffffff);
  long x104 = (x102 + x79);
  long x105 = (x104 >>> 25);
  int x106 = ((int) Integer.toUnsignedLong(((Number) (x104)).intValue()) & 0x1ffffff);
  long x107 = (x105 + x78);
  long x108 = (x107 >>> 26);
  int x109 = ((int) Integer.toUnsignedLong(((Number) (x107)).intValue()) & 0x3ffffff);
  long x110 = (x108 + x77);
  long x111 = (x110 >>> 25);
  int x112 = ((int) Integer.toUnsignedLong(((Number) (x110)).intValue()) & 0x1ffffff);
  long x113 = (x111 * (long) Integer.toUnsignedLong(((Number) (0x13)).intValue()));
  long x114 = ((long) Integer.toUnsignedLong(((Number) (x76)).intValue()) + x113);
  int x115 = (int) Integer.toUnsignedLong(((Number) ((x114 >>> 26))).intValue());
  int x116 = ((int) Integer.toUnsignedLong(((Number) (x114)).intValue()) & 0x3ffffff);
  int x117 = (x115 + x88);
  int x118 = (x117 >>> 25);
  int x119 = (x117 & 0x1ffffff);
  int x120 = (x118 + x91);
  out1[0] = x116;
  out1[1] = x119;
  out1[2] = x120;
  out1[3] = x94;
  out1[4] = x97;
  out1[5] = x100;
  out1[6] = x103;
  out1[7] = x106;
  out1[8] = x109;
  out1[9] = x112;
}

/**
 * The function fiat_Curve25519_carry reduces a field element. <p>
 * <p>
 * Postconditions: <p>
 *   eval out1 mod m = eval arg1 mod m <p>
 * <p>
 * Input Bounds: <p>
 *   arg1: [[0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000], [0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000], [0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000], [0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000], [0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000]] <p>
 * Output Bounds: <p>
 *   out1: [[0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000]] <p>
 */
public static void fiat_Curve25519_carry(int[] out1, final int[] arg1) {
  int x1 = (arg1[0]);
  int x2 = ((x1 >>> 26) + (arg1[1]));
  int x3 = ((x2 >>> 25) + (arg1[2]));
  int x4 = ((x3 >>> 26) + (arg1[3]));
  int x5 = ((x4 >>> 25) + (arg1[4]));
  int x6 = ((x5 >>> 26) + (arg1[5]));
  int x7 = ((x6 >>> 25) + (arg1[6]));
  int x8 = ((x7 >>> 26) + (arg1[7]));
  int x9 = ((x8 >>> 25) + (arg1[8]));
  int x10 = ((x9 >>> 26) + (arg1[9]));
  int x11 = ((x1 & 0x3ffffff) + ((x10 >>> 25) * 0x13));
  int x12 = ((x11 >>> 26) + (x2 & 0x1ffffff));
  int x13 = (x11 & 0x3ffffff);
  int x14 = (x12 & 0x1ffffff);
  int x15 = ((x12 >>> 25) + (x3 & 0x3ffffff));
  int x16 = (x4 & 0x1ffffff);
  int x17 = (x5 & 0x3ffffff);
  int x18 = (x6 & 0x1ffffff);
  int x19 = (x7 & 0x3ffffff);
  int x20 = (x8 & 0x1ffffff);
  int x21 = (x9 & 0x3ffffff);
  int x22 = (x10 & 0x1ffffff);
  out1[0] = x13;
  out1[1] = x14;
  out1[2] = x15;
  out1[3] = x16;
  out1[4] = x17;
  out1[5] = x18;
  out1[6] = x19;
  out1[7] = x20;
  out1[8] = x21;
  out1[9] = x22;
}

/**
 * The function fiat_Curve25519_add adds two field elements. <p>
 * <p>
 * Postconditions: <p>
 *   eval out1 mod m = (eval arg1 + eval arg2) mod m <p>
 * <p>
 * Input Bounds: <p>
 *   arg1: [[0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000]] <p>
 *   arg2: [[0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000]] <p>
 * Output Bounds: <p>
 *   out1: [[0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000], [0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000], [0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000], [0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000], [0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000]] <p>
 */
public static void fiat_Curve25519_add(int[] out1, final int[] arg1, final int[] arg2) {
  int x1 = ((arg1[0]) + (arg2[0]));
  int x2 = ((arg1[1]) + (arg2[1]));
  int x3 = ((arg1[2]) + (arg2[2]));
  int x4 = ((arg1[3]) + (arg2[3]));
  int x5 = ((arg1[4]) + (arg2[4]));
  int x6 = ((arg1[5]) + (arg2[5]));
  int x7 = ((arg1[6]) + (arg2[6]));
  int x8 = ((arg1[7]) + (arg2[7]));
  int x9 = ((arg1[8]) + (arg2[8]));
  int x10 = ((arg1[9]) + (arg2[9]));
  out1[0] = x1;
  out1[1] = x2;
  out1[2] = x3;
  out1[3] = x4;
  out1[4] = x5;
  out1[5] = x6;
  out1[6] = x7;
  out1[7] = x8;
  out1[8] = x9;
  out1[9] = x10;
}

/**
 * The function fiat_Curve25519_sub subtracts two field elements. <p>
 * <p>
 * Postconditions: <p>
 *   eval out1 mod m = (eval arg1 - eval arg2) mod m <p>
 * <p>
 * Input Bounds: <p>
 *   arg1: [[0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000]] <p>
 *   arg2: [[0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000]] <p>
 * Output Bounds: <p>
 *   out1: [[0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000], [0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000], [0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000], [0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000], [0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000]] <p>
 */
public static void fiat_Curve25519_sub(int[] out1, final int[] arg1, final int[] arg2) {
  int x1 = ((0x7ffffda + (arg1[0])) - (arg2[0]));
  int x2 = ((0x3fffffe + (arg1[1])) - (arg2[1]));
  int x3 = ((0x7fffffe + (arg1[2])) - (arg2[2]));
  int x4 = ((0x3fffffe + (arg1[3])) - (arg2[3]));
  int x5 = ((0x7fffffe + (arg1[4])) - (arg2[4]));
  int x6 = ((0x3fffffe + (arg1[5])) - (arg2[5]));
  int x7 = ((0x7fffffe + (arg1[6])) - (arg2[6]));
  int x8 = ((0x3fffffe + (arg1[7])) - (arg2[7]));
  int x9 = ((0x7fffffe + (arg1[8])) - (arg2[8]));
  int x10 = ((0x3fffffe + (arg1[9])) - (arg2[9]));
  out1[0] = x1;
  out1[1] = x2;
  out1[2] = x3;
  out1[3] = x4;
  out1[4] = x5;
  out1[5] = x6;
  out1[6] = x7;
  out1[7] = x8;
  out1[8] = x9;
  out1[9] = x10;
}

/**
 * The function fiat_Curve25519_opp negates a field element. <p>
 * <p>
 * Postconditions: <p>
 *   eval out1 mod m = -eval arg1 mod m <p>
 * <p>
 * Input Bounds: <p>
 *   arg1: [[0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000]] <p>
 * Output Bounds: <p>
 *   out1: [[0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000], [0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000], [0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000], [0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000], [0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000]] <p>
 */
public static void fiat_Curve25519_opp(int[] out1, final int[] arg1) {
  int x1 = (0x7ffffda - (arg1[0]));
  int x2 = (0x3fffffe - (arg1[1]));
  int x3 = (0x7fffffe - (arg1[2]));
  int x4 = (0x3fffffe - (arg1[3]));
  int x5 = (0x7fffffe - (arg1[4]));
  int x6 = (0x3fffffe - (arg1[5]));
  int x7 = (0x7fffffe - (arg1[6]));
  int x8 = (0x3fffffe - (arg1[7]));
  int x9 = (0x7fffffe - (arg1[8]));
  int x10 = (0x3fffffe - (arg1[9]));
  out1[0] = x1;
  out1[1] = x2;
  out1[2] = x3;
  out1[3] = x4;
  out1[4] = x5;
  out1[5] = x6;
  out1[6] = x7;
  out1[7] = x8;
  out1[8] = x9;
  out1[9] = x10;
}

/**
 * The function fiat_Curve25519_selectznz is a multi-limb conditional select. <p>
 * <p>
 * Postconditions: <p>
 *   out1 = (if arg1 = 0 then arg2 else arg3) <p>
 * <p>
 * Input Bounds: <p>
 *   arg1: [0x0 ~&gt; 0x1] <p>
 *   arg2: [[0x0 ~&gt; 0xffffffff], [0x0 ~&gt; 0xffffffff], [0x0 ~&gt; 0xffffffff], [0x0 ~&gt; 0xffffffff], [0x0 ~&gt; 0xffffffff], [0x0 ~&gt; 0xffffffff], [0x0 ~&gt; 0xffffffff], [0x0 ~&gt; 0xffffffff], [0x0 ~&gt; 0xffffffff], [0x0 ~&gt; 0xffffffff]] <p>
 *   arg3: [[0x0 ~&gt; 0xffffffff], [0x0 ~&gt; 0xffffffff], [0x0 ~&gt; 0xffffffff], [0x0 ~&gt; 0xffffffff], [0x0 ~&gt; 0xffffffff], [0x0 ~&gt; 0xffffffff], [0x0 ~&gt; 0xffffffff], [0x0 ~&gt; 0xffffffff], [0x0 ~&gt; 0xffffffff], [0x0 ~&gt; 0xffffffff]] <p>
 * Output Bounds: <p>
 *   out1: [[0x0 ~&gt; 0xffffffff], [0x0 ~&gt; 0xffffffff], [0x0 ~&gt; 0xffffffff], [0x0 ~&gt; 0xffffffff], [0x0 ~&gt; 0xffffffff], [0x0 ~&gt; 0xffffffff], [0x0 ~&gt; 0xffffffff], [0x0 ~&gt; 0xffffffff], [0x0 ~&gt; 0xffffffff], [0x0 ~&gt; 0xffffffff]] <p>
 */
public static void fiat_Curve25519_selectznz(int[] out1, int arg1, final int[] arg2, final int[] arg3) {
  Box<Integer> x1 = new Box<Integer>((int)0);
  fiat_Curve25519_cmovznz_u32(x1, arg1, (arg2[0]), (arg3[0]));
  Box<Integer> x2 = new Box<Integer>((int)0);
  fiat_Curve25519_cmovznz_u32(x2, arg1, (arg2[1]), (arg3[1]));
  Box<Integer> x3 = new Box<Integer>((int)0);
  fiat_Curve25519_cmovznz_u32(x3, arg1, (arg2[2]), (arg3[2]));
  Box<Integer> x4 = new Box<Integer>((int)0);
  fiat_Curve25519_cmovznz_u32(x4, arg1, (arg2[3]), (arg3[3]));
  Box<Integer> x5 = new Box<Integer>((int)0);
  fiat_Curve25519_cmovznz_u32(x5, arg1, (arg2[4]), (arg3[4]));
  Box<Integer> x6 = new Box<Integer>((int)0);
  fiat_Curve25519_cmovznz_u32(x6, arg1, (arg2[5]), (arg3[5]));
  Box<Integer> x7 = new Box<Integer>((int)0);
  fiat_Curve25519_cmovznz_u32(x7, arg1, (arg2[6]), (arg3[6]));
  Box<Integer> x8 = new Box<Integer>((int)0);
  fiat_Curve25519_cmovznz_u32(x8, arg1, (arg2[7]), (arg3[7]));
  Box<Integer> x9 = new Box<Integer>((int)0);
  fiat_Curve25519_cmovznz_u32(x9, arg1, (arg2[8]), (arg3[8]));
  Box<Integer> x10 = new Box<Integer>((int)0);
  fiat_Curve25519_cmovznz_u32(x10, arg1, (arg2[9]), (arg3[9]));
  out1[0] = (x1).get();
  out1[1] = (x2).get();
  out1[2] = (x3).get();
  out1[3] = (x4).get();
  out1[4] = (x5).get();
  out1[5] = (x6).get();
  out1[6] = (x7).get();
  out1[7] = (x8).get();
  out1[8] = (x9).get();
  out1[9] = (x10).get();
}

/**
 * The function fiat_Curve25519_to_bytes serializes a field element to bytes in little-endian order. <p>
 * <p>
 * Postconditions: <p>
 *   out1 = map (λ x, ⌊((eval arg1 mod m) mod 2^(8 * (x + 1))) / 2^(8 * x)⌋) [0..31] <p>
 * <p>
 * Input Bounds: <p>
 *   arg1: [[0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000]] <p>
 * Output Bounds: <p>
 *   out1: [[0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0x7f]] <p>
 */
public static void fiat_Curve25519_to_bytes(int[] out1, final int[] arg1) {
  Box<Integer> x1 = new Box<Integer>((int)0);
  Box<Integer> x2 = new Box<Integer>((int)0);
  fiat_Curve25519_subborrowx_u26(x1, x2, (int) Integer.toUnsignedLong(((Number) (0x0)).intValue()), (arg1[0]), 0x3ffffed);
  Box<Integer> x3 = new Box<Integer>((int)0);
  Box<Integer> x4 = new Box<Integer>((int)0);
  fiat_Curve25519_subborrowx_u25(x3, x4, (x2).get(), (arg1[1]), 0x1ffffff);
  Box<Integer> x5 = new Box<Integer>((int)0);
  Box<Integer> x6 = new Box<Integer>((int)0);
  fiat_Curve25519_subborrowx_u26(x5, x6, (x4).get(), (arg1[2]), 0x3ffffff);
  Box<Integer> x7 = new Box<Integer>((int)0);
  Box<Integer> x8 = new Box<Integer>((int)0);
  fiat_Curve25519_subborrowx_u25(x7, x8, (x6).get(), (arg1[3]), 0x1ffffff);
  Box<Integer> x9 = new Box<Integer>((int)0);
  Box<Integer> x10 = new Box<Integer>((int)0);
  fiat_Curve25519_subborrowx_u26(x9, x10, (x8).get(), (arg1[4]), 0x3ffffff);
  Box<Integer> x11 = new Box<Integer>((int)0);
  Box<Integer> x12 = new Box<Integer>((int)0);
  fiat_Curve25519_subborrowx_u25(x11, x12, (x10).get(), (arg1[5]), 0x1ffffff);
  Box<Integer> x13 = new Box<Integer>((int)0);
  Box<Integer> x14 = new Box<Integer>((int)0);
  fiat_Curve25519_subborrowx_u26(x13, x14, (x12).get(), (arg1[6]), 0x3ffffff);
  Box<Integer> x15 = new Box<Integer>((int)0);
  Box<Integer> x16 = new Box<Integer>((int)0);
  fiat_Curve25519_subborrowx_u25(x15, x16, (x14).get(), (arg1[7]), 0x1ffffff);
  Box<Integer> x17 = new Box<Integer>((int)0);
  Box<Integer> x18 = new Box<Integer>((int)0);
  fiat_Curve25519_subborrowx_u26(x17, x18, (x16).get(), (arg1[8]), 0x3ffffff);
  Box<Integer> x19 = new Box<Integer>((int)0);
  Box<Integer> x20 = new Box<Integer>((int)0);
  fiat_Curve25519_subborrowx_u25(x19, x20, (x18).get(), (arg1[9]), 0x1ffffff);
  Box<Integer> x21 = new Box<Integer>((int)0);
  fiat_Curve25519_cmovznz_u32(x21, (x20).get(), (int) Integer.toUnsignedLong(((Number) (0x0)).intValue()), 0xffffffff);
  Box<Integer> x22 = new Box<Integer>((int)0);
  Box<Integer> x23 = new Box<Integer>((int)0);
  fiat_Curve25519_addcarryx_u26(x22, x23, 0x0, (x1).get(), ((x21).get() & 0x3ffffed));
  Box<Integer> x24 = new Box<Integer>((int)0);
  Box<Integer> x25 = new Box<Integer>((int)0);
  fiat_Curve25519_addcarryx_u25(x24, x25, (x23).get(), (x3).get(), ((x21).get() & 0x1ffffff));
  Box<Integer> x26 = new Box<Integer>((int)0);
  Box<Integer> x27 = new Box<Integer>((int)0);
  fiat_Curve25519_addcarryx_u26(x26, x27, (x25).get(), (x5).get(), ((x21).get() & 0x3ffffff));
  Box<Integer> x28 = new Box<Integer>((int)0);
  Box<Integer> x29 = new Box<Integer>((int)0);
  fiat_Curve25519_addcarryx_u25(x28, x29, (x27).get(), (x7).get(), ((x21).get() & 0x1ffffff));
  Box<Integer> x30 = new Box<Integer>((int)0);
  Box<Integer> x31 = new Box<Integer>((int)0);
  fiat_Curve25519_addcarryx_u26(x30, x31, (x29).get(), (x9).get(), ((x21).get() & 0x3ffffff));
  Box<Integer> x32 = new Box<Integer>((int)0);
  Box<Integer> x33 = new Box<Integer>((int)0);
  fiat_Curve25519_addcarryx_u25(x32, x33, (x31).get(), (x11).get(), ((x21).get() & 0x1ffffff));
  Box<Integer> x34 = new Box<Integer>((int)0);
  Box<Integer> x35 = new Box<Integer>((int)0);
  fiat_Curve25519_addcarryx_u26(x34, x35, (x33).get(), (x13).get(), ((x21).get() & 0x3ffffff));
  Box<Integer> x36 = new Box<Integer>((int)0);
  Box<Integer> x37 = new Box<Integer>((int)0);
  fiat_Curve25519_addcarryx_u25(x36, x37, (x35).get(), (x15).get(), ((x21).get() & 0x1ffffff));
  Box<Integer> x38 = new Box<Integer>((int)0);
  Box<Integer> x39 = new Box<Integer>((int)0);
  fiat_Curve25519_addcarryx_u26(x38, x39, (x37).get(), (x17).get(), ((x21).get() & 0x3ffffff));
  Box<Integer> x40 = new Box<Integer>((int)0);
  Box<Integer> x41 = new Box<Integer>((int)0);
  fiat_Curve25519_addcarryx_u25(x40, x41, (x39).get(), (x19).get(), ((x21).get() & 0x1ffffff));
  int x42 = ((x40).get() << 6);
  int x43 = ((x38).get() << 4);
  int x44 = ((x36).get() << 3);
  int x45 = ((x34).get() * 0x2);
  int x46 = ((x30).get() << 6);
  int x47 = ((x28).get() << 5);
  int x48 = ((x26).get() << 3);
  int x49 = ((x24).get() << 2);
  int x50 = ((x22).get() & 0xff);
  int x51 = ((x22).get() >>> 8);
  int x52 = (x51 & 0xff);
  int x53 = (x51 >>> 8);
  int x54 = (x53 & 0xff);
  int x55 = (x53 >>> 8);
  int x56 = (x49 + x55);
  int x57 = (x56 & 0xff);
  int x58 = (x56 >>> 8);
  int x59 = (x58 & 0xff);
  int x60 = (x58 >>> 8);
  int x61 = (x60 & 0xff);
  int x62 = (x60 >>> 8);
  int x63 = (x48 + x62);
  int x64 = (x63 & 0xff);
  int x65 = (x63 >>> 8);
  int x66 = (x65 & 0xff);
  int x67 = (x65 >>> 8);
  int x68 = (x67 & 0xff);
  int x69 = (x67 >>> 8);
  int x70 = (x47 + x69);
  int x71 = (x70 & 0xff);
  int x72 = (x70 >>> 8);
  int x73 = (x72 & 0xff);
  int x74 = (x72 >>> 8);
  int x75 = (x74 & 0xff);
  int x76 = (x74 >>> 8);
  int x77 = (x46 + x76);
  int x78 = (x77 & 0xff);
  int x79 = (x77 >>> 8);
  int x80 = (x79 & 0xff);
  int x81 = (x79 >>> 8);
  int x82 = (x81 & 0xff);
  int x83 = (x81 >>> 8);
  int x84 = ((x32).get() & 0xff);
  int x85 = ((x32).get() >>> 8);
  int x86 = (x85 & 0xff);
  int x87 = (x85 >>> 8);
  int x88 = (x87 & 0xff);
  int x89 = (x87 >>> 8);
  int x90 = (x45 + x89);
  int x91 = (x90 & 0xff);
  int x92 = (x90 >>> 8);
  int x93 = (x92 & 0xff);
  int x94 = (x92 >>> 8);
  int x95 = (x94 & 0xff);
  int x96 = (x94 >>> 8);
  int x97 = (x44 + x96);
  int x98 = (x97 & 0xff);
  int x99 = (x97 >>> 8);
  int x100 = (x99 & 0xff);
  int x101 = (x99 >>> 8);
  int x102 = (x101 & 0xff);
  int x103 = (x101 >>> 8);
  int x104 = (x43 + x103);
  int x105 = (x104 & 0xff);
  int x106 = (x104 >>> 8);
  int x107 = (x106 & 0xff);
  int x108 = (x106 >>> 8);
  int x109 = (x108 & 0xff);
  int x110 = (x108 >>> 8);
  int x111 = (x42 + x110);
  int x112 = (x111 & 0xff);
  int x113 = (x111 >>> 8);
  int x114 = (x113 & 0xff);
  int x115 = (x113 >>> 8);
  int x116 = (x115 & 0xff);
  int x117 = (x115 >>> 8);
  out1[0] = x50;
  out1[1] = x52;
  out1[2] = x54;
  out1[3] = x57;
  out1[4] = x59;
  out1[5] = x61;
  out1[6] = x64;
  out1[7] = x66;
  out1[8] = x68;
  out1[9] = x71;
  out1[10] = x73;
  out1[11] = x75;
  out1[12] = x78;
  out1[13] = x80;
  out1[14] = x82;
  out1[15] = x83;
  out1[16] = x84;
  out1[17] = x86;
  out1[18] = x88;
  out1[19] = x91;
  out1[20] = x93;
  out1[21] = x95;
  out1[22] = x98;
  out1[23] = x100;
  out1[24] = x102;
  out1[25] = x105;
  out1[26] = x107;
  out1[27] = x109;
  out1[28] = x112;
  out1[29] = x114;
  out1[30] = x116;
  out1[31] = x117;
}

/**
 * The function fiat_Curve25519_from_bytes deserializes a field element from bytes in little-endian order. <p>
 * <p>
 * Postconditions: <p>
 *   eval out1 mod m = bytes_eval arg1 mod m <p>
 * <p>
 * Input Bounds: <p>
 *   arg1: [[0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0xff], [0x0 ~&gt; 0x7f]] <p>
 * Output Bounds: <p>
 *   out1: [[0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000]] <p>
 */
public static void fiat_Curve25519_from_bytes(int[] out1, final int[] arg1) {
  int x1 = ((arg1[31]) << 18);
  int x2 = ((arg1[30]) << 10);
  int x3 = ((arg1[29]) << 2);
  int x4 = ((arg1[28]) << 20);
  int x5 = ((arg1[27]) << 12);
  int x6 = ((arg1[26]) << 4);
  int x7 = ((arg1[25]) << 21);
  int x8 = ((arg1[24]) << 13);
  int x9 = ((arg1[23]) << 5);
  int x10 = ((arg1[22]) << 23);
  int x11 = ((arg1[21]) << 15);
  int x12 = ((arg1[20]) << 7);
  int x13 = ((arg1[19]) << 24);
  int x14 = ((arg1[18]) << 16);
  int x15 = ((arg1[17]) << 8);
  int x16 = (arg1[16]);
  int x17 = ((arg1[15]) << 18);
  int x18 = ((arg1[14]) << 10);
  int x19 = ((arg1[13]) << 2);
  int x20 = ((arg1[12]) << 19);
  int x21 = ((arg1[11]) << 11);
  int x22 = ((arg1[10]) << 3);
  int x23 = ((arg1[9]) << 21);
  int x24 = ((arg1[8]) << 13);
  int x25 = ((arg1[7]) << 5);
  int x26 = ((arg1[6]) << 22);
  int x27 = ((arg1[5]) << 14);
  int x28 = ((arg1[4]) << 6);
  int x29 = ((arg1[3]) << 24);
  int x30 = ((arg1[2]) << 16);
  int x31 = ((arg1[1]) << 8);
  int x32 = (arg1[0]);
  int x33 = (x31 + x32);
  int x34 = (x30 + x33);
  int x35 = (x29 + x34);
  int x36 = (x35 & 0x3ffffff);
  int x37 = (x35 >>> 26);
  int x38 = (x28 + x37);
  int x39 = (x27 + x38);
  int x40 = (x26 + x39);
  int x41 = (x40 & 0x1ffffff);
  int x42 = (x40 >>> 25);
  int x43 = (x25 + x42);
  int x44 = (x24 + x43);
  int x45 = (x23 + x44);
  int x46 = (x45 & 0x3ffffff);
  int x47 = (x45 >>> 26);
  int x48 = (x22 + x47);
  int x49 = (x21 + x48);
  int x50 = (x20 + x49);
  int x51 = (x50 & 0x1ffffff);
  int x52 = (x50 >>> 25);
  int x53 = (x19 + x52);
  int x54 = (x18 + x53);
  int x55 = (x17 + x54);
  int x56 = (x15 + x16);
  int x57 = (x14 + x56);
  int x58 = (x13 + x57);
  int x59 = (x58 & 0x1ffffff);
  int x60 = (x58 >>> 25);
  int x61 = (x12 + x60);
  int x62 = (x11 + x61);
  int x63 = (x10 + x62);
  int x64 = (x63 & 0x3ffffff);
  int x65 = (x63 >>> 26);
  int x66 = (x9 + x65);
  int x67 = (x8 + x66);
  int x68 = (x7 + x67);
  int x69 = (x68 & 0x1ffffff);
  int x70 = (x68 >>> 25);
  int x71 = (x6 + x70);
  int x72 = (x5 + x71);
  int x73 = (x4 + x72);
  int x74 = (x73 & 0x3ffffff);
  int x75 = (x73 >>> 26);
  int x76 = (x3 + x75);
  int x77 = (x2 + x76);
  int x78 = (x1 + x77);
  out1[0] = x36;
  out1[1] = x41;
  out1[2] = x46;
  out1[3] = x51;
  out1[4] = x55;
  out1[5] = x59;
  out1[6] = x64;
  out1[7] = x69;
  out1[8] = x74;
  out1[9] = x78;
}

/**
 * The function fiat_Curve25519_relax is the identity function converting from tight field elements to loose field elements. <p>
 * <p>
 * Postconditions: <p>
 *   out1 = arg1 <p>
 * <p>
 * Input Bounds: <p>
 *   arg1: [[0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000]] <p>
 * Output Bounds: <p>
 *   out1: [[0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000], [0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000], [0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000], [0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000], [0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000]] <p>
 */
public static void fiat_Curve25519_relax(int[] out1, final int[] arg1) {
  int x1 = (arg1[0]);
  int x2 = (arg1[1]);
  int x3 = (arg1[2]);
  int x4 = (arg1[3]);
  int x5 = (arg1[4]);
  int x6 = (arg1[5]);
  int x7 = (arg1[6]);
  int x8 = (arg1[7]);
  int x9 = (arg1[8]);
  int x10 = (arg1[9]);
  out1[0] = x1;
  out1[1] = x2;
  out1[2] = x3;
  out1[3] = x4;
  out1[4] = x5;
  out1[5] = x6;
  out1[6] = x7;
  out1[7] = x8;
  out1[8] = x9;
  out1[9] = x10;
}

/**
 * The function fiat_Curve25519_carry_scmul_121666 multiplies a field element by 121666 and reduces the result. <p>
 * <p>
 * Postconditions: <p>
 *   eval out1 mod m = (121666 * eval arg1) mod m <p>
 * <p>
 * Input Bounds: <p>
 *   arg1: [[0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000], [0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000], [0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000], [0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000], [0x0 ~&gt; 0xc000000], [0x0 ~&gt; 0x6000000]] <p>
 * Output Bounds: <p>
 *   out1: [[0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000], [0x0 ~&gt; 0x4000000], [0x0 ~&gt; 0x2000000]] <p>
 */
public static void fiat_Curve25519_carry_scmul_121666(int[] out1, final int[] arg1) {
  long x1 = ((long) Integer.toUnsignedLong(((Number) (0x1db42)).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg1[9]))).intValue()));
  long x2 = ((long) Integer.toUnsignedLong(((Number) (0x1db42)).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg1[8]))).intValue()));
  long x3 = ((long) Integer.toUnsignedLong(((Number) (0x1db42)).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg1[7]))).intValue()));
  long x4 = ((long) Integer.toUnsignedLong(((Number) (0x1db42)).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg1[6]))).intValue()));
  long x5 = ((long) Integer.toUnsignedLong(((Number) (0x1db42)).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg1[5]))).intValue()));
  long x6 = ((long) Integer.toUnsignedLong(((Number) (0x1db42)).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()));
  long x7 = ((long) Integer.toUnsignedLong(((Number) (0x1db42)).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()));
  long x8 = ((long) Integer.toUnsignedLong(((Number) (0x1db42)).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()));
  long x9 = ((long) Integer.toUnsignedLong(((Number) (0x1db42)).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()));
  long x10 = ((long) Integer.toUnsignedLong(((Number) (0x1db42)).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()));
  int x11 = (int) Integer.toUnsignedLong(((Number) ((x10 >>> 26))).intValue());
  int x12 = ((int) Integer.toUnsignedLong(((Number) (x10)).intValue()) & 0x3ffffff);
  long x13 = ((long) Integer.toUnsignedLong(((Number) (x11)).intValue()) + x9);
  int x14 = (int) Integer.toUnsignedLong(((Number) ((x13 >>> 25))).intValue());
  int x15 = ((int) Integer.toUnsignedLong(((Number) (x13)).intValue()) & 0x1ffffff);
  long x16 = ((long) Integer.toUnsignedLong(((Number) (x14)).intValue()) + x8);
  int x17 = (int) Integer.toUnsignedLong(((Number) ((x16 >>> 26))).intValue());
  int x18 = ((int) Integer.toUnsignedLong(((Number) (x16)).intValue()) & 0x3ffffff);
  long x19 = ((long) Integer.toUnsignedLong(((Number) (x17)).intValue()) + x7);
  int x20 = (int) Integer.toUnsignedLong(((Number) ((x19 >>> 25))).intValue());
  int x21 = ((int) Integer.toUnsignedLong(((Number) (x19)).intValue()) & 0x1ffffff);
  long x22 = ((long) Integer.toUnsignedLong(((Number) (x20)).intValue()) + x6);
  int x23 = (int) Integer.toUnsignedLong(((Number) ((x22 >>> 26))).intValue());
  int x24 = ((int) Integer.toUnsignedLong(((Number) (x22)).intValue()) & 0x3ffffff);
  long x25 = ((long) Integer.toUnsignedLong(((Number) (x23)).intValue()) + x5);
  int x26 = (int) Integer.toUnsignedLong(((Number) ((x25 >>> 25))).intValue());
  int x27 = ((int) Integer.toUnsignedLong(((Number) (x25)).intValue()) & 0x1ffffff);
  long x28 = ((long) Integer.toUnsignedLong(((Number) (x26)).intValue()) + x4);
  int x29 = (int) Integer.toUnsignedLong(((Number) ((x28 >>> 26))).intValue());
  int x30 = ((int) Integer.toUnsignedLong(((Number) (x28)).intValue()) & 0x3ffffff);
  long x31 = ((long) Integer.toUnsignedLong(((Number) (x29)).intValue()) + x3);
  int x32 = (int) Integer.toUnsignedLong(((Number) ((x31 >>> 25))).intValue());
  int x33 = ((int) Integer.toUnsignedLong(((Number) (x31)).intValue()) & 0x1ffffff);
  long x34 = ((long) Integer.toUnsignedLong(((Number) (x32)).intValue()) + x2);
  int x35 = (int) Integer.toUnsignedLong(((Number) ((x34 >>> 26))).intValue());
  int x36 = ((int) Integer.toUnsignedLong(((Number) (x34)).intValue()) & 0x3ffffff);
  long x37 = ((long) Integer.toUnsignedLong(((Number) (x35)).intValue()) + x1);
  int x38 = (int) Integer.toUnsignedLong(((Number) ((x37 >>> 25))).intValue());
  int x39 = ((int) Integer.toUnsignedLong(((Number) (x37)).intValue()) & 0x1ffffff);
  int x40 = (x38 * 0x13);
  int x41 = (x12 + x40);
  int x42 = (x41 >>> 26);
  int x43 = (x41 & 0x3ffffff);
  int x44 = (x42 + x15);
  int x45 = (x44 >>> 25);
  int x46 = (x44 & 0x1ffffff);
  int x47 = (x45 + x18);
  out1[0] = x43;
  out1[1] = x46;
  out1[2] = x47;
  out1[3] = x21;
  out1[4] = x24;
  out1[5] = x27;
  out1[6] = x30;
  out1[7] = x33;
  out1[8] = x36;
  out1[9] = x39;
}

}
