Debian Codegraph @

fiat-java/src/FiatCurve25519.java

raw symbols SCIP
1 /* 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 */
2 /* curve description: Curve25519 */
3 /* machine_wordsize = 32 (from "32") */
4 /* requested operations: carry_mul, carry_square, carry, add, sub, opp, selectznz, to_bytes, from_bytes, relax, carry_scmul121666 */
5 /* n = 10 (from "(auto)") */
6 /* s-c = 2^255 - [(1, 19)] (from "2^255 - 19") */
7 /* tight_bounds_multiplier = 1 (from "") */
8 /* */
9 /* Computed values: */
10 /* carry_chain = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1] */
11 /* 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) */
12 /* 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) */
13 /* balance = [0x7ffffda, 0x3fffffe, 0x7fffffe, 0x3fffffe, 0x7fffffe, 0x3fffffe, 0x7fffffe, 0x3fffffe, 0x7fffffe, 0x3fffffe] */
14
15 package fiat_crypto;
16
17 public final class FiatCurve25519 {
18
19 static class Box<T> {
20 private T value;
21 public Box(T value) { this.value = value; }
22 public void set(T value) { this.value = value; }
23 public T get() { return this.value; }
24 }
25
26
27
28 /**
29 * The function fiat_Curve25519_addcarryx_u26 is an addition with carry. <p>
30 * <p>
31 * Postconditions: <p>
32 * out1 = (arg1 + arg2 + arg3) mod 2^26 <p>
33 * out2 = ⌊(arg1 + arg2 + arg3) / 2^26⌋ <p>
34 * <p>
35 * Input Bounds: <p>
36 * arg1: [0x0 ~&gt; 0x1] <p>
37 * arg2: [0x0 ~&gt; 0x3ffffff] <p>
38 * arg3: [0x0 ~&gt; 0x3ffffff] <p>
39 * Output Bounds: <p>
40 * out1: [0x0 ~&gt; 0x3ffffff] <p>
41 * out2: [0x0 ~&gt; 0x1] <p>
42 */
43 static void fiat_Curve25519_addcarryx_u26(Box<Integer> out1, Box<Integer> out2, int arg1, int arg2, int arg3) {
44 int x1 = ((arg1 + arg2) + arg3);
45 int x2 = (x1 & 0x3ffffff);
46 int x3 = (x1 >>> 26);
47 out1.set(x2);
48 out2.set(x3);
49 }
50
51 /**
52 * The function fiat_Curve25519_subborrowx_u26 is a subtraction with borrow. <p>
53 * <p>
54 * Postconditions: <p>
55 * out1 = (-arg1 + arg2 + -arg3) mod 2^26 <p>
56 * out2 = -⌊(-arg1 + arg2 + -arg3) / 2^26⌋ <p>
57 * <p>
58 * Input Bounds: <p>
59 * arg1: [0x0 ~&gt; 0x1] <p>
60 * arg2: [0x0 ~&gt; 0x3ffffff] <p>
61 * arg3: [0x0 ~&gt; 0x3ffffff] <p>
62 * Output Bounds: <p>
63 * out1: [0x0 ~&gt; 0x3ffffff] <p>
64 * out2: [0x0 ~&gt; 0x1] <p>
65 */
66 static void fiat_Curve25519_subborrowx_u26(Box<Integer> out1, Box<Integer> out2, int arg1, int arg2, int arg3) {
67 int x1 = (((int) Integer.toUnsignedLong(((Number) (arg2)).intValue()) - (int) Integer.toUnsignedLong(((Number) (arg1)).intValue())) - (int) Integer.toUnsignedLong(((Number) (arg3)).intValue()));
68 int x2 = (x1 >>> 26);
69 int x3 = ((int) Integer.toUnsignedLong(((Number) (x1)).intValue()) & 0x3ffffff);
70 out1.set(x3);
71 out2.set(((int) Integer.toUnsignedLong(((Number) (0x0)).intValue()) - (int) Integer.toUnsignedLong(((Number) (x2)).intValue())));
72 }
73
74 /**
75 * The function fiat_Curve25519_addcarryx_u25 is an addition with carry. <p>
76 * <p>
77 * Postconditions: <p>
78 * out1 = (arg1 + arg2 + arg3) mod 2^25 <p>
79 * out2 = ⌊(arg1 + arg2 + arg3) / 2^25⌋ <p>
80 * <p>
81 * Input Bounds: <p>
82 * arg1: [0x0 ~&gt; 0x1] <p>
83 * arg2: [0x0 ~&gt; 0x1ffffff] <p>
84 * arg3: [0x0 ~&gt; 0x1ffffff] <p>
85 * Output Bounds: <p>
86 * out1: [0x0 ~&gt; 0x1ffffff] <p>
87 * out2: [0x0 ~&gt; 0x1] <p>
88 */
89 static void fiat_Curve25519_addcarryx_u25(Box<Integer> out1, Box<Integer> out2, int arg1, int arg2, int arg3) {
90 int x1 = ((arg1 + arg2) + arg3);
91 int x2 = (x1 & 0x1ffffff);
92 int x3 = (x1 >>> 25);
93 out1.set(x2);
94 out2.set(x3);
95 }
96
97 /**
98 * The function fiat_Curve25519_subborrowx_u25 is a subtraction with borrow. <p>
99 * <p>
100 * Postconditions: <p>
101 * out1 = (-arg1 + arg2 + -arg3) mod 2^25 <p>
102 * out2 = -⌊(-arg1 + arg2 + -arg3) / 2^25⌋ <p>
103 * <p>
104 * Input Bounds: <p>
105 * arg1: [0x0 ~&gt; 0x1] <p>
106 * arg2: [0x0 ~&gt; 0x1ffffff] <p>
107 * arg3: [0x0 ~&gt; 0x1ffffff] <p>
108 * Output Bounds: <p>
109 * out1: [0x0 ~&gt; 0x1ffffff] <p>
110 * out2: [0x0 ~&gt; 0x1] <p>
111 */
112 static void fiat_Curve25519_subborrowx_u25(Box<Integer> out1, Box<Integer> out2, int arg1, int arg2, int arg3) {
113 int x1 = (((int) Integer.toUnsignedLong(((Number) (arg2)).intValue()) - (int) Integer.toUnsignedLong(((Number) (arg1)).intValue())) - (int) Integer.toUnsignedLong(((Number) (arg3)).intValue()));
114 int x2 = (x1 >>> 25);
115 int x3 = ((int) Integer.toUnsignedLong(((Number) (x1)).intValue()) & 0x1ffffff);
116 out1.set(x3);
117 out2.set(((int) Integer.toUnsignedLong(((Number) (0x0)).intValue()) - (int) Integer.toUnsignedLong(((Number) (x2)).intValue())));
118 }
119
120 /**
121 * The function fiat_Curve25519_cmovznz_u32 is a single-word conditional move. <p>
122 * <p>
123 * Postconditions: <p>
124 * out1 = (if arg1 = 0 then arg2 else arg3) <p>
125 * <p>
126 * Input Bounds: <p>
127 * arg1: [0x0 ~&gt; 0x1] <p>
128 * arg2: [0x0 ~&gt; 0xffffffff] <p>
129 * arg3: [0x0 ~&gt; 0xffffffff] <p>
130 * Output Bounds: <p>
131 * out1: [0x0 ~&gt; 0xffffffff] <p>
132 */
133 static void fiat_Curve25519_cmovznz_u32(Box<Integer> out1, int arg1, int arg2, int arg3) {
134 int x1 = (arg1 * 0xffffffff);
135 int x2 = ((x1 & arg3) | ((~x1) & arg2));
136 out1.set(x2);
137 }
138
139 /**
140 * The function fiat_Curve25519_carry_mul multiplies two field elements and reduces the result. <p>
141 * <p>
142 * Postconditions: <p>
143 * eval out1 mod m = (eval arg1 * eval arg2) mod m <p>
144 * <p>
145 * Input Bounds: <p>
146 * 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>
147 * 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>
148 * Output Bounds: <p>
149 * 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>
150 */
151 public static void fiat_Curve25519_carry_mul(int[] out1, final int[] arg1, final int[] arg2) {
152 long x1 = ((long) Integer.toUnsignedLong(((Number) ((arg1[9]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[9]) * 0x26))).intValue()));
153 long x2 = ((long) Integer.toUnsignedLong(((Number) ((arg1[9]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[8]) * 0x13))).intValue()));
154 long x3 = ((long) Integer.toUnsignedLong(((Number) ((arg1[9]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[7]) * 0x26))).intValue()));
155 long x4 = ((long) Integer.toUnsignedLong(((Number) ((arg1[9]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[6]) * 0x13))).intValue()));
156 long x5 = ((long) Integer.toUnsignedLong(((Number) ((arg1[9]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[5]) * 0x26))).intValue()));
157 long x6 = ((long) Integer.toUnsignedLong(((Number) ((arg1[9]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[4]) * 0x13))).intValue()));
158 long x7 = ((long) Integer.toUnsignedLong(((Number) ((arg1[9]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[3]) * 0x26))).intValue()));
159 long x8 = ((long) Integer.toUnsignedLong(((Number) ((arg1[9]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[2]) * 0x13))).intValue()));
160 long x9 = ((long) Integer.toUnsignedLong(((Number) ((arg1[9]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[1]) * 0x26))).intValue()));
161 long x10 = ((long) Integer.toUnsignedLong(((Number) ((arg1[8]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[9]) * 0x13))).intValue()));
162 long x11 = ((long) Integer.toUnsignedLong(((Number) ((arg1[8]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[8]) * 0x13))).intValue()));
163 long x12 = ((long) Integer.toUnsignedLong(((Number) ((arg1[8]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[7]) * 0x13))).intValue()));
164 long x13 = ((long) Integer.toUnsignedLong(((Number) ((arg1[8]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[6]) * 0x13))).intValue()));
165 long x14 = ((long) Integer.toUnsignedLong(((Number) ((arg1[8]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[5]) * 0x13))).intValue()));
166 long x15 = ((long) Integer.toUnsignedLong(((Number) ((arg1[8]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[4]) * 0x13))).intValue()));
167 long x16 = ((long) Integer.toUnsignedLong(((Number) ((arg1[8]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[3]) * 0x13))).intValue()));
168 long x17 = ((long) Integer.toUnsignedLong(((Number) ((arg1[8]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[2]) * 0x13))).intValue()));
169 long x18 = ((long) Integer.toUnsignedLong(((Number) ((arg1[7]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[9]) * 0x26))).intValue()));
170 long x19 = ((long) Integer.toUnsignedLong(((Number) ((arg1[7]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[8]) * 0x13))).intValue()));
171 long x20 = ((long) Integer.toUnsignedLong(((Number) ((arg1[7]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[7]) * 0x26))).intValue()));
172 long x21 = ((long) Integer.toUnsignedLong(((Number) ((arg1[7]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[6]) * 0x13))).intValue()));
173 long x22 = ((long) Integer.toUnsignedLong(((Number) ((arg1[7]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[5]) * 0x26))).intValue()));
174 long x23 = ((long) Integer.toUnsignedLong(((Number) ((arg1[7]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[4]) * 0x13))).intValue()));
175 long x24 = ((long) Integer.toUnsignedLong(((Number) ((arg1[7]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[3]) * 0x26))).intValue()));
176 long x25 = ((long) Integer.toUnsignedLong(((Number) ((arg1[6]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[9]) * 0x13))).intValue()));
177 long x26 = ((long) Integer.toUnsignedLong(((Number) ((arg1[6]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[8]) * 0x13))).intValue()));
178 long x27 = ((long) Integer.toUnsignedLong(((Number) ((arg1[6]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[7]) * 0x13))).intValue()));
179 long x28 = ((long) Integer.toUnsignedLong(((Number) ((arg1[6]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[6]) * 0x13))).intValue()));
180 long x29 = ((long) Integer.toUnsignedLong(((Number) ((arg1[6]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[5]) * 0x13))).intValue()));
181 long x30 = ((long) Integer.toUnsignedLong(((Number) ((arg1[6]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[4]) * 0x13))).intValue()));
182 long x31 = ((long) Integer.toUnsignedLong(((Number) ((arg1[5]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[9]) * 0x26))).intValue()));
183 long x32 = ((long) Integer.toUnsignedLong(((Number) ((arg1[5]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[8]) * 0x13))).intValue()));
184 long x33 = ((long) Integer.toUnsignedLong(((Number) ((arg1[5]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[7]) * 0x26))).intValue()));
185 long x34 = ((long) Integer.toUnsignedLong(((Number) ((arg1[5]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[6]) * 0x13))).intValue()));
186 long x35 = ((long) Integer.toUnsignedLong(((Number) ((arg1[5]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[5]) * 0x26))).intValue()));
187 long x36 = ((long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[9]) * 0x13))).intValue()));
188 long x37 = ((long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[8]) * 0x13))).intValue()));
189 long x38 = ((long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[7]) * 0x13))).intValue()));
190 long x39 = ((long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[6]) * 0x13))).intValue()));
191 long x40 = ((long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[9]) * 0x26))).intValue()));
192 long x41 = ((long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[8]) * 0x13))).intValue()));
193 long x42 = ((long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[7]) * 0x26))).intValue()));
194 long x43 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[9]) * 0x13))).intValue()));
195 long x44 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[8]) * 0x13))).intValue()));
196 long x45 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[9]) * 0x26))).intValue()));
197 long x46 = ((long) Integer.toUnsignedLong(((Number) ((arg1[9]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[0]))).intValue()));
198 long x47 = ((long) Integer.toUnsignedLong(((Number) ((arg1[8]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[1]))).intValue()));
199 long x48 = ((long) Integer.toUnsignedLong(((Number) ((arg1[8]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[0]))).intValue()));
200 long x49 = ((long) Integer.toUnsignedLong(((Number) ((arg1[7]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[2]))).intValue()));
201 long x50 = ((long) Integer.toUnsignedLong(((Number) ((arg1[7]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[1]) * 0x2))).intValue()));
202 long x51 = ((long) Integer.toUnsignedLong(((Number) ((arg1[7]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[0]))).intValue()));
203 long x52 = ((long) Integer.toUnsignedLong(((Number) ((arg1[6]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[3]))).intValue()));
204 long x53 = ((long) Integer.toUnsignedLong(((Number) ((arg1[6]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[2]))).intValue()));
205 long x54 = ((long) Integer.toUnsignedLong(((Number) ((arg1[6]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[1]))).intValue()));
206 long x55 = ((long) Integer.toUnsignedLong(((Number) ((arg1[6]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[0]))).intValue()));
207 long x56 = ((long) Integer.toUnsignedLong(((Number) ((arg1[5]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[4]))).intValue()));
208 long x57 = ((long) Integer.toUnsignedLong(((Number) ((arg1[5]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[3]) * 0x2))).intValue()));
209 long x58 = ((long) Integer.toUnsignedLong(((Number) ((arg1[5]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[2]))).intValue()));
210 long x59 = ((long) Integer.toUnsignedLong(((Number) ((arg1[5]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[1]) * 0x2))).intValue()));
211 long x60 = ((long) Integer.toUnsignedLong(((Number) ((arg1[5]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[0]))).intValue()));
212 long x61 = ((long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[5]))).intValue()));
213 long x62 = ((long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[4]))).intValue()));
214 long x63 = ((long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[3]))).intValue()));
215 long x64 = ((long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[2]))).intValue()));
216 long x65 = ((long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[1]))).intValue()));
217 long x66 = ((long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[0]))).intValue()));
218 long x67 = ((long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[6]))).intValue()));
219 long x68 = ((long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[5]) * 0x2))).intValue()));
220 long x69 = ((long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[4]))).intValue()));
221 long x70 = ((long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[3]) * 0x2))).intValue()));
222 long x71 = ((long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[2]))).intValue()));
223 long x72 = ((long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[1]) * 0x2))).intValue()));
224 long x73 = ((long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[0]))).intValue()));
225 long x74 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[7]))).intValue()));
226 long x75 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[6]))).intValue()));
227 long x76 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[5]))).intValue()));
228 long x77 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[4]))).intValue()));
229 long x78 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[3]))).intValue()));
230 long x79 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[2]))).intValue()));
231 long x80 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[1]))).intValue()));
232 long x81 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[0]))).intValue()));
233 long x82 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[8]))).intValue()));
234 long x83 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[7]) * 0x2))).intValue()));
235 long x84 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[6]))).intValue()));
236 long x85 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[5]) * 0x2))).intValue()));
237 long x86 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[4]))).intValue()));
238 long x87 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[3]) * 0x2))).intValue()));
239 long x88 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[2]))).intValue()));
240 long x89 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg2[1]) * 0x2))).intValue()));
241 long x90 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[0]))).intValue()));
242 long x91 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[9]))).intValue()));
243 long x92 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[8]))).intValue()));
244 long x93 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[7]))).intValue()));
245 long x94 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[6]))).intValue()));
246 long x95 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[5]))).intValue()));
247 long x96 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[4]))).intValue()));
248 long x97 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[3]))).intValue()));
249 long x98 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[2]))).intValue()));
250 long x99 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[1]))).intValue()));
251 long x100 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg2[0]))).intValue()));
252 long x101 = (x100 + (x45 + (x44 + (x42 + (x39 + (x35 + (x30 + (x24 + (x17 + x9)))))))));
253 long x102 = (x101 >>> 26);
254 int x103 = ((int) Integer.toUnsignedLong(((Number) (x101)).intValue()) & 0x3ffffff);
255 long x104 = (x91 + (x82 + (x74 + (x67 + (x61 + (x56 + (x52 + (x49 + (x47 + x46)))))))));
256 long x105 = (x92 + (x83 + (x75 + (x68 + (x62 + (x57 + (x53 + (x50 + (x48 + x1)))))))));
257 long x106 = (x93 + (x84 + (x76 + (x69 + (x63 + (x58 + (x54 + (x51 + (x10 + x2)))))))));
258 long x107 = (x94 + (x85 + (x77 + (x70 + (x64 + (x59 + (x55 + (x18 + (x11 + x3)))))))));
259 long x108 = (x95 + (x86 + (x78 + (x71 + (x65 + (x60 + (x25 + (x19 + (x12 + x4)))))))));
260 long x109 = (x96 + (x87 + (x79 + (x72 + (x66 + (x31 + (x26 + (x20 + (x13 + x5)))))))));
261 long x110 = (x97 + (x88 + (x80 + (x73 + (x36 + (x32 + (x27 + (x21 + (x14 + x6)))))))));
262 long x111 = (x98 + (x89 + (x81 + (x40 + (x37 + (x33 + (x28 + (x22 + (x15 + x7)))))))));
263 long x112 = (x99 + (x90 + (x43 + (x41 + (x38 + (x34 + (x29 + (x23 + (x16 + x8)))))))));
264 long x113 = (x102 + x112);
265 long x114 = (x113 >>> 25);
266 int x115 = ((int) Integer.toUnsignedLong(((Number) (x113)).intValue()) & 0x1ffffff);
267 long x116 = (x114 + x111);
268 long x117 = (x116 >>> 26);
269 int x118 = ((int) Integer.toUnsignedLong(((Number) (x116)).intValue()) & 0x3ffffff);
270 long x119 = (x117 + x110);
271 long x120 = (x119 >>> 25);
272 int x121 = ((int) Integer.toUnsignedLong(((Number) (x119)).intValue()) & 0x1ffffff);
273 long x122 = (x120 + x109);
274 long x123 = (x122 >>> 26);
275 int x124 = ((int) Integer.toUnsignedLong(((Number) (x122)).intValue()) & 0x3ffffff);
276 long x125 = (x123 + x108);
277 long x126 = (x125 >>> 25);
278 int x127 = ((int) Integer.toUnsignedLong(((Number) (x125)).intValue()) & 0x1ffffff);
279 long x128 = (x126 + x107);
280 long x129 = (x128 >>> 26);
281 int x130 = ((int) Integer.toUnsignedLong(((Number) (x128)).intValue()) & 0x3ffffff);
282 long x131 = (x129 + x106);
283 long x132 = (x131 >>> 25);
284 int x133 = ((int) Integer.toUnsignedLong(((Number) (x131)).intValue()) & 0x1ffffff);
285 long x134 = (x132 + x105);
286 long x135 = (x134 >>> 26);
287 int x136 = ((int) Integer.toUnsignedLong(((Number) (x134)).intValue()) & 0x3ffffff);
288 long x137 = (x135 + x104);
289 long x138 = (x137 >>> 25);
290 int x139 = ((int) Integer.toUnsignedLong(((Number) (x137)).intValue()) & 0x1ffffff);
291 long x140 = (x138 * (long) Integer.toUnsignedLong(((Number) (0x13)).intValue()));
292 long x141 = ((long) Integer.toUnsignedLong(((Number) (x103)).intValue()) + x140);
293 int x142 = (int) Integer.toUnsignedLong(((Number) ((x141 >>> 26))).intValue());
294 int x143 = ((int) Integer.toUnsignedLong(((Number) (x141)).intValue()) & 0x3ffffff);
295 int x144 = (x142 + x115);
296 int x145 = (x144 >>> 25);
297 int x146 = (x144 & 0x1ffffff);
298 int x147 = (x145 + x118);
299 out1[0] = x143;
300 out1[1] = x146;
301 out1[2] = x147;
302 out1[3] = x121;
303 out1[4] = x124;
304 out1[5] = x127;
305 out1[6] = x130;
306 out1[7] = x133;
307 out1[8] = x136;
308 out1[9] = x139;
309 }
310
311 /**
312 * The function fiat_Curve25519_carry_square squares a field element and reduces the result. <p>
313 * <p>
314 * Postconditions: <p>
315 * eval out1 mod m = (eval arg1 * eval arg1) mod m <p>
316 * <p>
317 * Input Bounds: <p>
318 * 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>
319 * Output Bounds: <p>
320 * 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>
321 */
322 public static void fiat_Curve25519_carry_square(int[] out1, final int[] arg1) {
323 int x1 = ((arg1[9]) * 0x13);
324 int x2 = (x1 * 0x2);
325 int x3 = ((arg1[9]) * 0x2);
326 int x4 = ((arg1[8]) * 0x13);
327 long x5 = ((long) Integer.toUnsignedLong(((Number) (x4)).intValue()) * (long) Integer.toUnsignedLong(((Number) (0x2)).intValue()));
328 int x6 = ((arg1[8]) * 0x2);
329 int x7 = ((arg1[7]) * 0x13);
330 int x8 = (x7 * 0x2);
331 int x9 = ((arg1[7]) * 0x2);
332 int x10 = ((arg1[6]) * 0x13);
333 long x11 = ((long) Integer.toUnsignedLong(((Number) (x10)).intValue()) * (long) Integer.toUnsignedLong(((Number) (0x2)).intValue()));
334 int x12 = ((arg1[6]) * 0x2);
335 int x13 = ((arg1[5]) * 0x13);
336 int x14 = ((arg1[5]) * 0x2);
337 int x15 = ((arg1[4]) * 0x2);
338 int x16 = ((arg1[3]) * 0x2);
339 int x17 = ((arg1[2]) * 0x2);
340 int x18 = ((arg1[1]) * 0x2);
341 long x19 = ((long) Integer.toUnsignedLong(((Number) ((arg1[9]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((x1 * 0x2))).intValue()));
342 long x20 = ((long) Integer.toUnsignedLong(((Number) ((arg1[8]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x2)).intValue()));
343 long x21 = ((long) Integer.toUnsignedLong(((Number) ((arg1[8]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x4)).intValue()));
344 long x22 = ((long) Integer.toUnsignedLong(((Number) ((arg1[7]))).intValue()) * ((long) Integer.toUnsignedLong(((Number) (x2)).intValue()) * (long) Integer.toUnsignedLong(((Number) (0x2)).intValue())));
345 long x23 = ((long) Integer.toUnsignedLong(((Number) ((arg1[7]))).intValue()) * x5);
346 long x24 = ((long) Integer.toUnsignedLong(((Number) ((arg1[7]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((x7 * 0x2))).intValue()));
347 long x25 = ((long) Integer.toUnsignedLong(((Number) ((arg1[6]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x2)).intValue()));
348 long x26 = ((long) Integer.toUnsignedLong(((Number) ((arg1[6]))).intValue()) * x5);
349 long x27 = ((long) Integer.toUnsignedLong(((Number) ((arg1[6]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x8)).intValue()));
350 long x28 = ((long) Integer.toUnsignedLong(((Number) ((arg1[6]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x10)).intValue()));
351 long x29 = ((long) Integer.toUnsignedLong(((Number) ((arg1[5]))).intValue()) * ((long) Integer.toUnsignedLong(((Number) (x2)).intValue()) * (long) Integer.toUnsignedLong(((Number) (0x2)).intValue())));
352 long x30 = ((long) Integer.toUnsignedLong(((Number) ((arg1[5]))).intValue()) * x5);
353 long x31 = ((long) Integer.toUnsignedLong(((Number) ((arg1[5]))).intValue()) * ((long) Integer.toUnsignedLong(((Number) (x8)).intValue()) * (long) Integer.toUnsignedLong(((Number) (0x2)).intValue())));
354 long x32 = ((long) Integer.toUnsignedLong(((Number) ((arg1[5]))).intValue()) * x11);
355 long x33 = ((long) Integer.toUnsignedLong(((Number) ((arg1[5]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((x13 * 0x2))).intValue()));
356 long x34 = ((long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x2)).intValue()));
357 long x35 = ((long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()) * x5);
358 long x36 = ((long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x8)).intValue()));
359 long x37 = ((long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()) * x11);
360 long x38 = ((long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x14)).intValue()));
361 long x39 = ((long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()));
362 long x40 = ((long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()) * ((long) Integer.toUnsignedLong(((Number) (x2)).intValue()) * (long) Integer.toUnsignedLong(((Number) (0x2)).intValue())));
363 long x41 = ((long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()) * x5);
364 long x42 = ((long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()) * ((long) Integer.toUnsignedLong(((Number) (x8)).intValue()) * (long) Integer.toUnsignedLong(((Number) (0x2)).intValue())));
365 long x43 = ((long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x12)).intValue()));
366 long x44 = ((long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((x14 * 0x2))).intValue()));
367 long x45 = ((long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x15)).intValue()));
368 long x46 = ((long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg1[3]) * 0x2))).intValue()));
369 long x47 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x2)).intValue()));
370 long x48 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * x5);
371 long x49 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x9)).intValue()));
372 long x50 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x12)).intValue()));
373 long x51 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x14)).intValue()));
374 long x52 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x15)).intValue()));
375 long x53 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x16)).intValue()));
376 long x54 = ((long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()));
377 long x55 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * ((long) Integer.toUnsignedLong(((Number) (x2)).intValue()) * (long) Integer.toUnsignedLong(((Number) (0x2)).intValue())));
378 long x56 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x6)).intValue()));
379 long x57 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((x9 * 0x2))).intValue()));
380 long x58 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x12)).intValue()));
381 long x59 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((x14 * 0x2))).intValue()));
382 long x60 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x15)).intValue()));
383 long x61 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((x16 * 0x2))).intValue()));
384 long x62 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x17)).intValue()));
385 long x63 = ((long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (((arg1[1]) * 0x2))).intValue()));
386 long x64 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x3)).intValue()));
387 long x65 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x6)).intValue()));
388 long x66 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x9)).intValue()));
389 long x67 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x12)).intValue()));
390 long x68 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x14)).intValue()));
391 long x69 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x15)).intValue()));
392 long x70 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x16)).intValue()));
393 long x71 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x17)).intValue()));
394 long x72 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) (x18)).intValue()));
395 long x73 = ((long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()));
396 long x74 = (x73 + (x55 + (x48 + (x42 + (x37 + x33)))));
397 long x75 = (x74 >>> 26);
398 int x76 = ((int) Integer.toUnsignedLong(((Number) (x74)).intValue()) & 0x3ffffff);
399 long x77 = (x64 + (x56 + (x49 + (x43 + x38))));
400 long x78 = (x65 + (x57 + (x50 + (x44 + (x39 + x19)))));
401 long x79 = (x66 + (x58 + (x51 + (x45 + x20))));
402 long x80 = (x67 + (x59 + (x52 + (x46 + (x22 + x21)))));
403 long x81 = (x68 + (x60 + (x53 + (x25 + x23))));
404 long x82 = (x69 + (x61 + (x54 + (x29 + (x26 + x24)))));
405 long x83 = (x70 + (x62 + (x34 + (x30 + x27))));
406 long x84 = (x71 + (x63 + (x40 + (x35 + (x31 + x28)))));
407 long x85 = (x72 + (x47 + (x41 + (x36 + x32))));
408 long x86 = (x75 + x85);
409 long x87 = (x86 >>> 25);
410 int x88 = ((int) Integer.toUnsignedLong(((Number) (x86)).intValue()) & 0x1ffffff);
411 long x89 = (x87 + x84);
412 long x90 = (x89 >>> 26);
413 int x91 = ((int) Integer.toUnsignedLong(((Number) (x89)).intValue()) & 0x3ffffff);
414 long x92 = (x90 + x83);
415 long x93 = (x92 >>> 25);
416 int x94 = ((int) Integer.toUnsignedLong(((Number) (x92)).intValue()) & 0x1ffffff);
417 long x95 = (x93 + x82);
418 long x96 = (x95 >>> 26);
419 int x97 = ((int) Integer.toUnsignedLong(((Number) (x95)).intValue()) & 0x3ffffff);
420 long x98 = (x96 + x81);
421 long x99 = (x98 >>> 25);
422 int x100 = ((int) Integer.toUnsignedLong(((Number) (x98)).intValue()) & 0x1ffffff);
423 long x101 = (x99 + x80);
424 long x102 = (x101 >>> 26);
425 int x103 = ((int) Integer.toUnsignedLong(((Number) (x101)).intValue()) & 0x3ffffff);
426 long x104 = (x102 + x79);
427 long x105 = (x104 >>> 25);
428 int x106 = ((int) Integer.toUnsignedLong(((Number) (x104)).intValue()) & 0x1ffffff);
429 long x107 = (x105 + x78);
430 long x108 = (x107 >>> 26);
431 int x109 = ((int) Integer.toUnsignedLong(((Number) (x107)).intValue()) & 0x3ffffff);
432 long x110 = (x108 + x77);
433 long x111 = (x110 >>> 25);
434 int x112 = ((int) Integer.toUnsignedLong(((Number) (x110)).intValue()) & 0x1ffffff);
435 long x113 = (x111 * (long) Integer.toUnsignedLong(((Number) (0x13)).intValue()));
436 long x114 = ((long) Integer.toUnsignedLong(((Number) (x76)).intValue()) + x113);
437 int x115 = (int) Integer.toUnsignedLong(((Number) ((x114 >>> 26))).intValue());
438 int x116 = ((int) Integer.toUnsignedLong(((Number) (x114)).intValue()) & 0x3ffffff);
439 int x117 = (x115 + x88);
440 int x118 = (x117 >>> 25);
441 int x119 = (x117 & 0x1ffffff);
442 int x120 = (x118 + x91);
443 out1[0] = x116;
444 out1[1] = x119;
445 out1[2] = x120;
446 out1[3] = x94;
447 out1[4] = x97;
448 out1[5] = x100;
449 out1[6] = x103;
450 out1[7] = x106;
451 out1[8] = x109;
452 out1[9] = x112;
453 }
454
455 /**
456 * The function fiat_Curve25519_carry reduces a field element. <p>
457 * <p>
458 * Postconditions: <p>
459 * eval out1 mod m = eval arg1 mod m <p>
460 * <p>
461 * Input Bounds: <p>
462 * 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>
463 * Output Bounds: <p>
464 * 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>
465 */
466 public static void fiat_Curve25519_carry(int[] out1, final int[] arg1) {
467 int x1 = (arg1[0]);
468 int x2 = ((x1 >>> 26) + (arg1[1]));
469 int x3 = ((x2 >>> 25) + (arg1[2]));
470 int x4 = ((x3 >>> 26) + (arg1[3]));
471 int x5 = ((x4 >>> 25) + (arg1[4]));
472 int x6 = ((x5 >>> 26) + (arg1[5]));
473 int x7 = ((x6 >>> 25) + (arg1[6]));
474 int x8 = ((x7 >>> 26) + (arg1[7]));
475 int x9 = ((x8 >>> 25) + (arg1[8]));
476 int x10 = ((x9 >>> 26) + (arg1[9]));
477 int x11 = ((x1 & 0x3ffffff) + ((x10 >>> 25) * 0x13));
478 int x12 = ((x11 >>> 26) + (x2 & 0x1ffffff));
479 int x13 = (x11 & 0x3ffffff);
480 int x14 = (x12 & 0x1ffffff);
481 int x15 = ((x12 >>> 25) + (x3 & 0x3ffffff));
482 int x16 = (x4 & 0x1ffffff);
483 int x17 = (x5 & 0x3ffffff);
484 int x18 = (x6 & 0x1ffffff);
485 int x19 = (x7 & 0x3ffffff);
486 int x20 = (x8 & 0x1ffffff);
487 int x21 = (x9 & 0x3ffffff);
488 int x22 = (x10 & 0x1ffffff);
489 out1[0] = x13;
490 out1[1] = x14;
491 out1[2] = x15;
492 out1[3] = x16;
493 out1[4] = x17;
494 out1[5] = x18;
495 out1[6] = x19;
496 out1[7] = x20;
497 out1[8] = x21;
498 out1[9] = x22;
499 }
500
501 /**
502 * The function fiat_Curve25519_add adds two field elements. <p>
503 * <p>
504 * Postconditions: <p>
505 * eval out1 mod m = (eval arg1 + eval arg2) mod m <p>
506 * <p>
507 * Input Bounds: <p>
508 * 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>
509 * 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>
510 * Output Bounds: <p>
511 * 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>
512 */
513 public static void fiat_Curve25519_add(int[] out1, final int[] arg1, final int[] arg2) {
514 int x1 = ((arg1[0]) + (arg2[0]));
515 int x2 = ((arg1[1]) + (arg2[1]));
516 int x3 = ((arg1[2]) + (arg2[2]));
517 int x4 = ((arg1[3]) + (arg2[3]));
518 int x5 = ((arg1[4]) + (arg2[4]));
519 int x6 = ((arg1[5]) + (arg2[5]));
520 int x7 = ((arg1[6]) + (arg2[6]));
521 int x8 = ((arg1[7]) + (arg2[7]));
522 int x9 = ((arg1[8]) + (arg2[8]));
523 int x10 = ((arg1[9]) + (arg2[9]));
524 out1[0] = x1;
525 out1[1] = x2;
526 out1[2] = x3;
527 out1[3] = x4;
528 out1[4] = x5;
529 out1[5] = x6;
530 out1[6] = x7;
531 out1[7] = x8;
532 out1[8] = x9;
533 out1[9] = x10;
534 }
535
536 /**
537 * The function fiat_Curve25519_sub subtracts two field elements. <p>
538 * <p>
539 * Postconditions: <p>
540 * eval out1 mod m = (eval arg1 - eval arg2) mod m <p>
541 * <p>
542 * Input Bounds: <p>
543 * 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>
544 * 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>
545 * Output Bounds: <p>
546 * 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>
547 */
548 public static void fiat_Curve25519_sub(int[] out1, final int[] arg1, final int[] arg2) {
549 int x1 = ((0x7ffffda + (arg1[0])) - (arg2[0]));
550 int x2 = ((0x3fffffe + (arg1[1])) - (arg2[1]));
551 int x3 = ((0x7fffffe + (arg1[2])) - (arg2[2]));
552 int x4 = ((0x3fffffe + (arg1[3])) - (arg2[3]));
553 int x5 = ((0x7fffffe + (arg1[4])) - (arg2[4]));
554 int x6 = ((0x3fffffe + (arg1[5])) - (arg2[5]));
555 int x7 = ((0x7fffffe + (arg1[6])) - (arg2[6]));
556 int x8 = ((0x3fffffe + (arg1[7])) - (arg2[7]));
557 int x9 = ((0x7fffffe + (arg1[8])) - (arg2[8]));
558 int x10 = ((0x3fffffe + (arg1[9])) - (arg2[9]));
559 out1[0] = x1;
560 out1[1] = x2;
561 out1[2] = x3;
562 out1[3] = x4;
563 out1[4] = x5;
564 out1[5] = x6;
565 out1[6] = x7;
566 out1[7] = x8;
567 out1[8] = x9;
568 out1[9] = x10;
569 }
570
571 /**
572 * The function fiat_Curve25519_opp negates a field element. <p>
573 * <p>
574 * Postconditions: <p>
575 * eval out1 mod m = -eval arg1 mod m <p>
576 * <p>
577 * Input Bounds: <p>
578 * 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>
579 * Output Bounds: <p>
580 * 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>
581 */
582 public static void fiat_Curve25519_opp(int[] out1, final int[] arg1) {
583 int x1 = (0x7ffffda - (arg1[0]));
584 int x2 = (0x3fffffe - (arg1[1]));
585 int x3 = (0x7fffffe - (arg1[2]));
586 int x4 = (0x3fffffe - (arg1[3]));
587 int x5 = (0x7fffffe - (arg1[4]));
588 int x6 = (0x3fffffe - (arg1[5]));
589 int x7 = (0x7fffffe - (arg1[6]));
590 int x8 = (0x3fffffe - (arg1[7]));
591 int x9 = (0x7fffffe - (arg1[8]));
592 int x10 = (0x3fffffe - (arg1[9]));
593 out1[0] = x1;
594 out1[1] = x2;
595 out1[2] = x3;
596 out1[3] = x4;
597 out1[4] = x5;
598 out1[5] = x6;
599 out1[6] = x7;
600 out1[7] = x8;
601 out1[8] = x9;
602 out1[9] = x10;
603 }
604
605 /**
606 * The function fiat_Curve25519_selectznz is a multi-limb conditional select. <p>
607 * <p>
608 * Postconditions: <p>
609 * out1 = (if arg1 = 0 then arg2 else arg3) <p>
610 * <p>
611 * Input Bounds: <p>
612 * arg1: [0x0 ~&gt; 0x1] <p>
613 * 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>
614 * 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>
615 * Output Bounds: <p>
616 * 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>
617 */
618 public static void fiat_Curve25519_selectznz(int[] out1, int arg1, final int[] arg2, final int[] arg3) {
619 Box<Integer> x1 = new Box<Integer>((int)0);
620 fiat_Curve25519_cmovznz_u32(x1, arg1, (arg2[0]), (arg3[0]));
621 Box<Integer> x2 = new Box<Integer>((int)0);
622 fiat_Curve25519_cmovznz_u32(x2, arg1, (arg2[1]), (arg3[1]));
623 Box<Integer> x3 = new Box<Integer>((int)0);
624 fiat_Curve25519_cmovznz_u32(x3, arg1, (arg2[2]), (arg3[2]));
625 Box<Integer> x4 = new Box<Integer>((int)0);
626 fiat_Curve25519_cmovznz_u32(x4, arg1, (arg2[3]), (arg3[3]));
627 Box<Integer> x5 = new Box<Integer>((int)0);
628 fiat_Curve25519_cmovznz_u32(x5, arg1, (arg2[4]), (arg3[4]));
629 Box<Integer> x6 = new Box<Integer>((int)0);
630 fiat_Curve25519_cmovznz_u32(x6, arg1, (arg2[5]), (arg3[5]));
631 Box<Integer> x7 = new Box<Integer>((int)0);
632 fiat_Curve25519_cmovznz_u32(x7, arg1, (arg2[6]), (arg3[6]));
633 Box<Integer> x8 = new Box<Integer>((int)0);
634 fiat_Curve25519_cmovznz_u32(x8, arg1, (arg2[7]), (arg3[7]));
635 Box<Integer> x9 = new Box<Integer>((int)0);
636 fiat_Curve25519_cmovznz_u32(x9, arg1, (arg2[8]), (arg3[8]));
637 Box<Integer> x10 = new Box<Integer>((int)0);
638 fiat_Curve25519_cmovznz_u32(x10, arg1, (arg2[9]), (arg3[9]));
639 out1[0] = (x1).get();
640 out1[1] = (x2).get();
641 out1[2] = (x3).get();
642 out1[3] = (x4).get();
643 out1[4] = (x5).get();
644 out1[5] = (x6).get();
645 out1[6] = (x7).get();
646 out1[7] = (x8).get();
647 out1[8] = (x9).get();
648 out1[9] = (x10).get();
649 }
650
651 /**
652 * The function fiat_Curve25519_to_bytes serializes a field element to bytes in little-endian order. <p>
653 * <p>
654 * Postconditions: <p>
655 * out1 = map (λ x, ⌊((eval arg1 mod m) mod 2^(8 * (x + 1))) / 2^(8 * x)⌋) [0..31] <p>
656 * <p>
657 * Input Bounds: <p>
658 * 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>
659 * Output Bounds: <p>
660 * 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>
661 */
662 public static void fiat_Curve25519_to_bytes(int[] out1, final int[] arg1) {
663 Box<Integer> x1 = new Box<Integer>((int)0);
664 Box<Integer> x2 = new Box<Integer>((int)0);
665 fiat_Curve25519_subborrowx_u26(x1, x2, (int) Integer.toUnsignedLong(((Number) (0x0)).intValue()), (arg1[0]), 0x3ffffed);
666 Box<Integer> x3 = new Box<Integer>((int)0);
667 Box<Integer> x4 = new Box<Integer>((int)0);
668 fiat_Curve25519_subborrowx_u25(x3, x4, (x2).get(), (arg1[1]), 0x1ffffff);
669 Box<Integer> x5 = new Box<Integer>((int)0);
670 Box<Integer> x6 = new Box<Integer>((int)0);
671 fiat_Curve25519_subborrowx_u26(x5, x6, (x4).get(), (arg1[2]), 0x3ffffff);
672 Box<Integer> x7 = new Box<Integer>((int)0);
673 Box<Integer> x8 = new Box<Integer>((int)0);
674 fiat_Curve25519_subborrowx_u25(x7, x8, (x6).get(), (arg1[3]), 0x1ffffff);
675 Box<Integer> x9 = new Box<Integer>((int)0);
676 Box<Integer> x10 = new Box<Integer>((int)0);
677 fiat_Curve25519_subborrowx_u26(x9, x10, (x8).get(), (arg1[4]), 0x3ffffff);
678 Box<Integer> x11 = new Box<Integer>((int)0);
679 Box<Integer> x12 = new Box<Integer>((int)0);
680 fiat_Curve25519_subborrowx_u25(x11, x12, (x10).get(), (arg1[5]), 0x1ffffff);
681 Box<Integer> x13 = new Box<Integer>((int)0);
682 Box<Integer> x14 = new Box<Integer>((int)0);
683 fiat_Curve25519_subborrowx_u26(x13, x14, (x12).get(), (arg1[6]), 0x3ffffff);
684 Box<Integer> x15 = new Box<Integer>((int)0);
685 Box<Integer> x16 = new Box<Integer>((int)0);
686 fiat_Curve25519_subborrowx_u25(x15, x16, (x14).get(), (arg1[7]), 0x1ffffff);
687 Box<Integer> x17 = new Box<Integer>((int)0);
688 Box<Integer> x18 = new Box<Integer>((int)0);
689 fiat_Curve25519_subborrowx_u26(x17, x18, (x16).get(), (arg1[8]), 0x3ffffff);
690 Box<Integer> x19 = new Box<Integer>((int)0);
691 Box<Integer> x20 = new Box<Integer>((int)0);
692 fiat_Curve25519_subborrowx_u25(x19, x20, (x18).get(), (arg1[9]), 0x1ffffff);
693 Box<Integer> x21 = new Box<Integer>((int)0);
694 fiat_Curve25519_cmovznz_u32(x21, (x20).get(), (int) Integer.toUnsignedLong(((Number) (0x0)).intValue()), 0xffffffff);
695 Box<Integer> x22 = new Box<Integer>((int)0);
696 Box<Integer> x23 = new Box<Integer>((int)0);
697 fiat_Curve25519_addcarryx_u26(x22, x23, 0x0, (x1).get(), ((x21).get() & 0x3ffffed));
698 Box<Integer> x24 = new Box<Integer>((int)0);
699 Box<Integer> x25 = new Box<Integer>((int)0);
700 fiat_Curve25519_addcarryx_u25(x24, x25, (x23).get(), (x3).get(), ((x21).get() & 0x1ffffff));
701 Box<Integer> x26 = new Box<Integer>((int)0);
702 Box<Integer> x27 = new Box<Integer>((int)0);
703 fiat_Curve25519_addcarryx_u26(x26, x27, (x25).get(), (x5).get(), ((x21).get() & 0x3ffffff));
704 Box<Integer> x28 = new Box<Integer>((int)0);
705 Box<Integer> x29 = new Box<Integer>((int)0);
706 fiat_Curve25519_addcarryx_u25(x28, x29, (x27).get(), (x7).get(), ((x21).get() & 0x1ffffff));
707 Box<Integer> x30 = new Box<Integer>((int)0);
708 Box<Integer> x31 = new Box<Integer>((int)0);
709 fiat_Curve25519_addcarryx_u26(x30, x31, (x29).get(), (x9).get(), ((x21).get() & 0x3ffffff));
710 Box<Integer> x32 = new Box<Integer>((int)0);
711 Box<Integer> x33 = new Box<Integer>((int)0);
712 fiat_Curve25519_addcarryx_u25(x32, x33, (x31).get(), (x11).get(), ((x21).get() & 0x1ffffff));
713 Box<Integer> x34 = new Box<Integer>((int)0);
714 Box<Integer> x35 = new Box<Integer>((int)0);
715 fiat_Curve25519_addcarryx_u26(x34, x35, (x33).get(), (x13).get(), ((x21).get() & 0x3ffffff));
716 Box<Integer> x36 = new Box<Integer>((int)0);
717 Box<Integer> x37 = new Box<Integer>((int)0);
718 fiat_Curve25519_addcarryx_u25(x36, x37, (x35).get(), (x15).get(), ((x21).get() & 0x1ffffff));
719 Box<Integer> x38 = new Box<Integer>((int)0);
720 Box<Integer> x39 = new Box<Integer>((int)0);
721 fiat_Curve25519_addcarryx_u26(x38, x39, (x37).get(), (x17).get(), ((x21).get() & 0x3ffffff));
722 Box<Integer> x40 = new Box<Integer>((int)0);
723 Box<Integer> x41 = new Box<Integer>((int)0);
724 fiat_Curve25519_addcarryx_u25(x40, x41, (x39).get(), (x19).get(), ((x21).get() & 0x1ffffff));
725 int x42 = ((x40).get() << 6);
726 int x43 = ((x38).get() << 4);
727 int x44 = ((x36).get() << 3);
728 int x45 = ((x34).get() * 0x2);
729 int x46 = ((x30).get() << 6);
730 int x47 = ((x28).get() << 5);
731 int x48 = ((x26).get() << 3);
732 int x49 = ((x24).get() << 2);
733 int x50 = ((x22).get() & 0xff);
734 int x51 = ((x22).get() >>> 8);
735 int x52 = (x51 & 0xff);
736 int x53 = (x51 >>> 8);
737 int x54 = (x53 & 0xff);
738 int x55 = (x53 >>> 8);
739 int x56 = (x49 + x55);
740 int x57 = (x56 & 0xff);
741 int x58 = (x56 >>> 8);
742 int x59 = (x58 & 0xff);
743 int x60 = (x58 >>> 8);
744 int x61 = (x60 & 0xff);
745 int x62 = (x60 >>> 8);
746 int x63 = (x48 + x62);
747 int x64 = (x63 & 0xff);
748 int x65 = (x63 >>> 8);
749 int x66 = (x65 & 0xff);
750 int x67 = (x65 >>> 8);
751 int x68 = (x67 & 0xff);
752 int x69 = (x67 >>> 8);
753 int x70 = (x47 + x69);
754 int x71 = (x70 & 0xff);
755 int x72 = (x70 >>> 8);
756 int x73 = (x72 & 0xff);
757 int x74 = (x72 >>> 8);
758 int x75 = (x74 & 0xff);
759 int x76 = (x74 >>> 8);
760 int x77 = (x46 + x76);
761 int x78 = (x77 & 0xff);
762 int x79 = (x77 >>> 8);
763 int x80 = (x79 & 0xff);
764 int x81 = (x79 >>> 8);
765 int x82 = (x81 & 0xff);
766 int x83 = (x81 >>> 8);
767 int x84 = ((x32).get() & 0xff);
768 int x85 = ((x32).get() >>> 8);
769 int x86 = (x85 & 0xff);
770 int x87 = (x85 >>> 8);
771 int x88 = (x87 & 0xff);
772 int x89 = (x87 >>> 8);
773 int x90 = (x45 + x89);
774 int x91 = (x90 & 0xff);
775 int x92 = (x90 >>> 8);
776 int x93 = (x92 & 0xff);
777 int x94 = (x92 >>> 8);
778 int x95 = (x94 & 0xff);
779 int x96 = (x94 >>> 8);
780 int x97 = (x44 + x96);
781 int x98 = (x97 & 0xff);
782 int x99 = (x97 >>> 8);
783 int x100 = (x99 & 0xff);
784 int x101 = (x99 >>> 8);
785 int x102 = (x101 & 0xff);
786 int x103 = (x101 >>> 8);
787 int x104 = (x43 + x103);
788 int x105 = (x104 & 0xff);
789 int x106 = (x104 >>> 8);
790 int x107 = (x106 & 0xff);
791 int x108 = (x106 >>> 8);
792 int x109 = (x108 & 0xff);
793 int x110 = (x108 >>> 8);
794 int x111 = (x42 + x110);
795 int x112 = (x111 & 0xff);
796 int x113 = (x111 >>> 8);
797 int x114 = (x113 & 0xff);
798 int x115 = (x113 >>> 8);
799 int x116 = (x115 & 0xff);
800 int x117 = (x115 >>> 8);
801 out1[0] = x50;
802 out1[1] = x52;
803 out1[2] = x54;
804 out1[3] = x57;
805 out1[4] = x59;
806 out1[5] = x61;
807 out1[6] = x64;
808 out1[7] = x66;
809 out1[8] = x68;
810 out1[9] = x71;
811 out1[10] = x73;
812 out1[11] = x75;
813 out1[12] = x78;
814 out1[13] = x80;
815 out1[14] = x82;
816 out1[15] = x83;
817 out1[16] = x84;
818 out1[17] = x86;
819 out1[18] = x88;
820 out1[19] = x91;
821 out1[20] = x93;
822 out1[21] = x95;
823 out1[22] = x98;
824 out1[23] = x100;
825 out1[24] = x102;
826 out1[25] = x105;
827 out1[26] = x107;
828 out1[27] = x109;
829 out1[28] = x112;
830 out1[29] = x114;
831 out1[30] = x116;
832 out1[31] = x117;
833 }
834
835 /**
836 * The function fiat_Curve25519_from_bytes deserializes a field element from bytes in little-endian order. <p>
837 * <p>
838 * Postconditions: <p>
839 * eval out1 mod m = bytes_eval arg1 mod m <p>
840 * <p>
841 * Input Bounds: <p>
842 * 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>
843 * Output Bounds: <p>
844 * 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>
845 */
846 public static void fiat_Curve25519_from_bytes(int[] out1, final int[] arg1) {
847 int x1 = ((arg1[31]) << 18);
848 int x2 = ((arg1[30]) << 10);
849 int x3 = ((arg1[29]) << 2);
850 int x4 = ((arg1[28]) << 20);
851 int x5 = ((arg1[27]) << 12);
852 int x6 = ((arg1[26]) << 4);
853 int x7 = ((arg1[25]) << 21);
854 int x8 = ((arg1[24]) << 13);
855 int x9 = ((arg1[23]) << 5);
856 int x10 = ((arg1[22]) << 23);
857 int x11 = ((arg1[21]) << 15);
858 int x12 = ((arg1[20]) << 7);
859 int x13 = ((arg1[19]) << 24);
860 int x14 = ((arg1[18]) << 16);
861 int x15 = ((arg1[17]) << 8);
862 int x16 = (arg1[16]);
863 int x17 = ((arg1[15]) << 18);
864 int x18 = ((arg1[14]) << 10);
865 int x19 = ((arg1[13]) << 2);
866 int x20 = ((arg1[12]) << 19);
867 int x21 = ((arg1[11]) << 11);
868 int x22 = ((arg1[10]) << 3);
869 int x23 = ((arg1[9]) << 21);
870 int x24 = ((arg1[8]) << 13);
871 int x25 = ((arg1[7]) << 5);
872 int x26 = ((arg1[6]) << 22);
873 int x27 = ((arg1[5]) << 14);
874 int x28 = ((arg1[4]) << 6);
875 int x29 = ((arg1[3]) << 24);
876 int x30 = ((arg1[2]) << 16);
877 int x31 = ((arg1[1]) << 8);
878 int x32 = (arg1[0]);
879 int x33 = (x31 + x32);
880 int x34 = (x30 + x33);
881 int x35 = (x29 + x34);
882 int x36 = (x35 & 0x3ffffff);
883 int x37 = (x35 >>> 26);
884 int x38 = (x28 + x37);
885 int x39 = (x27 + x38);
886 int x40 = (x26 + x39);
887 int x41 = (x40 & 0x1ffffff);
888 int x42 = (x40 >>> 25);
889 int x43 = (x25 + x42);
890 int x44 = (x24 + x43);
891 int x45 = (x23 + x44);
892 int x46 = (x45 & 0x3ffffff);
893 int x47 = (x45 >>> 26);
894 int x48 = (x22 + x47);
895 int x49 = (x21 + x48);
896 int x50 = (x20 + x49);
897 int x51 = (x50 & 0x1ffffff);
898 int x52 = (x50 >>> 25);
899 int x53 = (x19 + x52);
900 int x54 = (x18 + x53);
901 int x55 = (x17 + x54);
902 int x56 = (x15 + x16);
903 int x57 = (x14 + x56);
904 int x58 = (x13 + x57);
905 int x59 = (x58 & 0x1ffffff);
906 int x60 = (x58 >>> 25);
907 int x61 = (x12 + x60);
908 int x62 = (x11 + x61);
909 int x63 = (x10 + x62);
910 int x64 = (x63 & 0x3ffffff);
911 int x65 = (x63 >>> 26);
912 int x66 = (x9 + x65);
913 int x67 = (x8 + x66);
914 int x68 = (x7 + x67);
915 int x69 = (x68 & 0x1ffffff);
916 int x70 = (x68 >>> 25);
917 int x71 = (x6 + x70);
918 int x72 = (x5 + x71);
919 int x73 = (x4 + x72);
920 int x74 = (x73 & 0x3ffffff);
921 int x75 = (x73 >>> 26);
922 int x76 = (x3 + x75);
923 int x77 = (x2 + x76);
924 int x78 = (x1 + x77);
925 out1[0] = x36;
926 out1[1] = x41;
927 out1[2] = x46;
928 out1[3] = x51;
929 out1[4] = x55;
930 out1[5] = x59;
931 out1[6] = x64;
932 out1[7] = x69;
933 out1[8] = x74;
934 out1[9] = x78;
935 }
936
937 /**
938 * The function fiat_Curve25519_relax is the identity function converting from tight field elements to loose field elements. <p>
939 * <p>
940 * Postconditions: <p>
941 * out1 = arg1 <p>
942 * <p>
943 * Input Bounds: <p>
944 * 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>
945 * Output Bounds: <p>
946 * 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>
947 */
948 public static void fiat_Curve25519_relax(int[] out1, final int[] arg1) {
949 int x1 = (arg1[0]);
950 int x2 = (arg1[1]);
951 int x3 = (arg1[2]);
952 int x4 = (arg1[3]);
953 int x5 = (arg1[4]);
954 int x6 = (arg1[5]);
955 int x7 = (arg1[6]);
956 int x8 = (arg1[7]);
957 int x9 = (arg1[8]);
958 int x10 = (arg1[9]);
959 out1[0] = x1;
960 out1[1] = x2;
961 out1[2] = x3;
962 out1[3] = x4;
963 out1[4] = x5;
964 out1[5] = x6;
965 out1[6] = x7;
966 out1[7] = x8;
967 out1[8] = x9;
968 out1[9] = x10;
969 }
970
971 /**
972 * The function fiat_Curve25519_carry_scmul_121666 multiplies a field element by 121666 and reduces the result. <p>
973 * <p>
974 * Postconditions: <p>
975 * eval out1 mod m = (121666 * eval arg1) mod m <p>
976 * <p>
977 * Input Bounds: <p>
978 * 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>
979 * Output Bounds: <p>
980 * 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>
981 */
982 public static void fiat_Curve25519_carry_scmul_121666(int[] out1, final int[] arg1) {
983 long x1 = ((long) Integer.toUnsignedLong(((Number) (0x1db42)).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg1[9]))).intValue()));
984 long x2 = ((long) Integer.toUnsignedLong(((Number) (0x1db42)).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg1[8]))).intValue()));
985 long x3 = ((long) Integer.toUnsignedLong(((Number) (0x1db42)).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg1[7]))).intValue()));
986 long x4 = ((long) Integer.toUnsignedLong(((Number) (0x1db42)).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg1[6]))).intValue()));
987 long x5 = ((long) Integer.toUnsignedLong(((Number) (0x1db42)).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg1[5]))).intValue()));
988 long x6 = ((long) Integer.toUnsignedLong(((Number) (0x1db42)).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg1[4]))).intValue()));
989 long x7 = ((long) Integer.toUnsignedLong(((Number) (0x1db42)).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg1[3]))).intValue()));
990 long x8 = ((long) Integer.toUnsignedLong(((Number) (0x1db42)).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg1[2]))).intValue()));
991 long x9 = ((long) Integer.toUnsignedLong(((Number) (0x1db42)).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg1[1]))).intValue()));
992 long x10 = ((long) Integer.toUnsignedLong(((Number) (0x1db42)).intValue()) * (long) Integer.toUnsignedLong(((Number) ((arg1[0]))).intValue()));
993 int x11 = (int) Integer.toUnsignedLong(((Number) ((x10 >>> 26))).intValue());
994 int x12 = ((int) Integer.toUnsignedLong(((Number) (x10)).intValue()) & 0x3ffffff);
995 long x13 = ((long) Integer.toUnsignedLong(((Number) (x11)).intValue()) + x9);
996 int x14 = (int) Integer.toUnsignedLong(((Number) ((x13 >>> 25))).intValue());
997 int x15 = ((int) Integer.toUnsignedLong(((Number) (x13)).intValue()) & 0x1ffffff);
998 long x16 = ((long) Integer.toUnsignedLong(((Number) (x14)).intValue()) + x8);
999 int x17 = (int) Integer.toUnsignedLong(((Number) ((x16 >>> 26))).intValue());
1000 int x18 = ((int) Integer.toUnsignedLong(((Number) (x16)).intValue()) & 0x3ffffff);
1001 long x19 = ((long) Integer.toUnsignedLong(((Number) (x17)).intValue()) + x7);
1002 int x20 = (int) Integer.toUnsignedLong(((Number) ((x19 >>> 25))).intValue());
1003 int x21 = ((int) Integer.toUnsignedLong(((Number) (x19)).intValue()) & 0x1ffffff);
1004 long x22 = ((long) Integer.toUnsignedLong(((Number) (x20)).intValue()) + x6);
1005 int x23 = (int) Integer.toUnsignedLong(((Number) ((x22 >>> 26))).intValue());
1006 int x24 = ((int) Integer.toUnsignedLong(((Number) (x22)).intValue()) & 0x3ffffff);
1007 long x25 = ((long) Integer.toUnsignedLong(((Number) (x23)).intValue()) + x5);
1008 int x26 = (int) Integer.toUnsignedLong(((Number) ((x25 >>> 25))).intValue());
1009 int x27 = ((int) Integer.toUnsignedLong(((Number) (x25)).intValue()) & 0x1ffffff);
1010 long x28 = ((long) Integer.toUnsignedLong(((Number) (x26)).intValue()) + x4);
1011 int x29 = (int) Integer.toUnsignedLong(((Number) ((x28 >>> 26))).intValue());
1012 int x30 = ((int) Integer.toUnsignedLong(((Number) (x28)).intValue()) & 0x3ffffff);
1013 long x31 = ((long) Integer.toUnsignedLong(((Number) (x29)).intValue()) + x3);
1014 int x32 = (int) Integer.toUnsignedLong(((Number) ((x31 >>> 25))).intValue());
1015 int x33 = ((int) Integer.toUnsignedLong(((Number) (x31)).intValue()) & 0x1ffffff);
1016 long x34 = ((long) Integer.toUnsignedLong(((Number) (x32)).intValue()) + x2);
1017 int x35 = (int) Integer.toUnsignedLong(((Number) ((x34 >>> 26))).intValue());
1018 int x36 = ((int) Integer.toUnsignedLong(((Number) (x34)).intValue()) & 0x3ffffff);
1019 long x37 = ((long) Integer.toUnsignedLong(((Number) (x35)).intValue()) + x1);
1020 int x38 = (int) Integer.toUnsignedLong(((Number) ((x37 >>> 25))).intValue());
1021 int x39 = ((int) Integer.toUnsignedLong(((Number) (x37)).intValue()) & 0x1ffffff);
1022 int x40 = (x38 * 0x13);
1023 int x41 = (x12 + x40);
1024 int x42 = (x41 >>> 26);
1025 int x43 = (x41 & 0x3ffffff);
1026 int x44 = (x42 + x15);
1027 int x45 = (x44 >>> 25);
1028 int x46 = (x44 & 0x1ffffff);
1029 int x47 = (x45 + x18);
1030 out1[0] = x43;
1031 out1[1] = x46;
1032 out1[2] = x47;
1033 out1[3] = x21;
1034 out1[4] = x24;
1035 out1[5] = x27;
1036 out1[6] = x30;
1037 out1[7] = x33;
1038 out1[8] = x36;
1039 out1[9] = x39;
1040 }
1041
1042 }