Debian Codegraph @

fiat-bedrock2/src/secp256k1_dettman_64.c

raw symbols SCIP
1 /* Autogenerated: 'src/ExtractionOCaml/bedrock2_dettman_multiplication' --lang bedrock2 --static --no-wide-int --widen-carry --widen-bytes --split-multiret --no-select --no-field-element-typedefs secp256k1_dettman 64 5 48 2 '2^256 - 4294968273' mul square */
2 /* curve description: secp256k1_dettman */
3 /* machine_wordsize = 64 (from "64") */
4 /* requested operations: mul, square */
5 /* n = 5 (from "5") */
6 /* last_limb_width = 48 (from "48") */
7 /* last_reduction = 2 (from "2") */
8 /* s-c = 2^256 - [(1, 4294968273)] (from "2^256 - 4294968273") */
9 /* inbounds_multiplier: None (from "") */
10 /* */
11 /* Computed values: */
12 /* */
13 /* */
14
15 // Generated from Bedrock code. Avoid editing directly.
16 #include <stdint.h>
17 #include <string.h>
18 #include <assert.h>
19
20 #define BR_WORD_MAX UINTPTR_MAX
21 typedef uintptr_t br_word_t;
22 typedef intptr_t br_signed_t;
23
24 static_assert(sizeof(br_word_t) == sizeof(br_signed_t), "signed size");
25 static_assert(UINTPTR_MAX <= BR_WORD_MAX, "pointer fits in int");
26 static_assert(~(br_signed_t)0 == -(br_signed_t)1, "two's complement");
27
28 #if __STDC_VERSION__ >= 202311L && __has_include(<stdbit.h>)
29 #include <stdbit.h>
30 static_assert(__STDC_ENDIAN_NATIVE__ == __STDC_ENDIAN_LITTLE__, "little-endian");
31 #elif defined(__GNUC__) && defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__)
32 static_assert(__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__, "little-endian");
33 #elif defined(_MSC_VER) && !defined(__clang__) && \
34 (defined(_M_IX86) || defined(_M_X64) || defined(_M_ARM) || defined(_M_ARM64))
35 // these MSVC targets are little-endian
36 #else
37 #error "failed to confirm that target is little-endian"
38 #endif
39
40 // "An object shall have its stored value accessed only ... a character type."
41 static inline br_word_t _br_load1(br_word_t a) {
42 return *((uint8_t *)a);
43 }
44
45 static inline br_word_t _br_load2(br_word_t a) {
46 uint16_t r = 0;
47 memcpy(&r, (void *)a, sizeof(r));
48 return r;
49 }
50
51 static inline br_word_t _br_load4(br_word_t a) {
52 uint32_t r = 0;
53 memcpy(&r, (void *)a, sizeof(r));
54 return r;
55 }
56
57 static inline br_word_t _br_load(br_word_t a) {
58 br_word_t r = 0;
59 memcpy(&r, (void *)a, sizeof(r));
60 return r;
61 }
62
63 static inline void _br_store1(br_word_t a, uint8_t v) {
64 *((uint8_t *)a) = v;
65 }
66
67 static inline void _br_store2(br_word_t a, uint16_t v) {
68 memcpy((void *)a, &v, sizeof(v));
69 }
70
71 static inline void _br_store4(br_word_t a, uint32_t v) {
72 memcpy((void *)a, &v, sizeof(v));
73 }
74
75 static inline void _br_store(br_word_t a, br_word_t v) {
76 memcpy((void *)a, &v, sizeof(v));
77 }
78
79 static inline br_word_t _br_mulhuu(br_word_t a, br_word_t b) {
80 #if BR_WORD_MAX == UINT32_MAX
81 return ((uint64_t)a * b) >> 32;
82 #elif BR_WORD_MAX == UINT64_MAX && (defined(__GNUC__) || defined(__clang__))
83 return ((unsigned __int128)a * b) >> 64;
84 #elif defined(_M_X64)
85 uint64_t hi;
86 _umul128(a, b, &hi);
87 return hi;
88 #elif defined(_M_ARM64)
89 return __umulh(a, b);
90 #else
91 // See full_mul.v
92 br_word_t hh, lh, hl, low, second_halfword_w_oflow, n, ll, M;
93 n = ((((0u-(br_word_t)0x1)>>27)&0x3f)+0x1)>>1;
94 M = ((br_word_t)0x1<<n)-0x1;
95 ll = (a&M)*(b&M);
96 lh = (a&M)*(b>>n);
97 hl = (a>>n)*(b&M);
98 hh = (a>>n)*(b>>n);
99 second_halfword_w_oflow = ((ll>>n)+(lh&M))+(hl&M);
100 return ((hh+(lh>>n))+(hl>>n))+(second_halfword_w_oflow>>n);
101 #endif
102 }
103
104 static inline br_word_t _br_divu(br_word_t a, br_word_t b) {
105 if (!b) return -1;
106 return a/b;
107 }
108
109 static inline br_word_t _br_remu(br_word_t a, br_word_t b) {
110 if (!b) return a;
111 return a%b;
112 }
113
114
115 /*
116 * Input Bounds:
117 * in0: [[0x0 ~> 0x1ffffffffffffe], [0x0 ~> 0x1ffffffffffffe], [0x0 ~> 0x1ffffffffffffe], [0x0 ~> 0x1ffffffffffffe], [0x0 ~> 0x1fffffffffffe]]
118 * in1: [[0x0 ~> 0x1ffffffffffffe], [0x0 ~> 0x1ffffffffffffe], [0x0 ~> 0x1ffffffffffffe], [0x0 ~> 0x1ffffffffffffe], [0x0 ~> 0x1fffffffffffe]]
119 * Output Bounds:
120 * out0: [[0x0 ~> 0x1ffffffffffffe], [0x0 ~> 0x1ffffffffffffe], [0x0 ~> 0x1ffffffffffffe], [0x0 ~> 0x1ffffffffffffe], [0x0 ~> 0x17fffffffffff]]
121 */
122 static
123 void internal_fiat_secp256k1_dettman_mul(br_word_t out0, br_word_t in0, br_word_t in1) {
124 br_word_t x10, x14, x16, x19, x17, x20, x15, x18, x22, x25, x23, x26, x21, x24, x28, x31, x29, x32, x27, x12, x30, x35, x33, x36, x13, x37, x34, x11, x42, x44, x47, x45, x48, x43, x46, x50, x53, x51, x54, x49, x52, x56, x59, x57, x60, x55, x58, x62, x65, x63, x66, x61, x64, x38, x69, x67, x40, x68, x72, x70, x73, x41, x74, x71, x77, x79, x82, x80, x83, x78, x81, x85, x88, x86, x89, x84, x87, x91, x94, x92, x95, x90, x93, x75, x98, x96, x99, x97, x76, x102, x101, x104, x106, x109, x107, x110, x105, x111, x108, x114, x116, x119, x117, x120, x115, x118, x122, x125, x123, x126, x121, x124, x100, x129, x127, x130, x128, x132, x135, x137, x140, x138, x141, x136, x139, x112, x144, x142, x133, x143, x147, x145, x148, x134, x149, x146, x4, x8, x3, x9, x152, x154, x157, x155, x158, x153, x156, x131, x161, x159, x160, x2, x5, x1, x6, x165, x167, x170, x168, x171, x166, x0, x7, x169, x173, x176, x174, x177, x172, x175, x150, x180, x178, x163, x179, x183, x181, x184, x164, x185, x182, x162, x188, x186, x39, x191, x189, x192, x190, x193, x103, x113, x151, x187, x194, x195, x196, x197, x198, x199, x200;
125 x0 = _br_load(in0+0);
126 x1 = _br_load(in0+8);
127 x2 = _br_load(in0+16);
128 x3 = _br_load(in0+24);
129 x4 = _br_load(in0+32);
130 /*skip*/
131 x5 = _br_load(in1+0);
132 x6 = _br_load(in1+8);
133 x7 = _br_load(in1+16);
134 x8 = _br_load(in1+24);
135 x9 = _br_load(in1+32);
136 /*skip*/
137 /*skip*/
138 x10 = x4*x9;
139 x11 = _br_mulhuu(x4, x9);
140 x12 = x10*0x1000003d10;
141 x13 = _br_mulhuu(x10, (br_word_t)0x1000003d10);
142 x14 = x3*x5;
143 x15 = _br_mulhuu(x3, x5);
144 x16 = x2*x6;
145 x17 = _br_mulhuu(x2, x6);
146 x18 = x16+x14;
147 x19 = (br_word_t)(x18<x16);
148 x20 = x19+x17;
149 x21 = x20+x15;
150 x22 = x1*x7;
151 x23 = _br_mulhuu(x1, x7);
152 x24 = x22+x18;
153 x25 = (br_word_t)(x24<x22);
154 x26 = x25+x23;
155 x27 = x26+x21;
156 x28 = x0*x8;
157 x29 = _br_mulhuu(x0, x8);
158 x30 = x28+x24;
159 x31 = (br_word_t)(x30<x28);
160 x32 = x31+x29;
161 x33 = x32+x27;
162 x34 = x30+x12;
163 x35 = (br_word_t)(x34<x30);
164 x36 = x35+x33;
165 x37 = x36+x13;
166 x38 = (x34>>((br_word_t)52&(sizeof(br_word_t)*8-1)))|(x37<<12);
167 x39 = x34&0xfffffffffffff;
168 x40 = x11*0x1000003d10000;
169 x41 = _br_mulhuu(x11, (br_word_t)0x1000003d10000);
170 x42 = x4*x5;
171 x43 = _br_mulhuu(x4, x5);
172 x44 = x3*x6;
173 x45 = _br_mulhuu(x3, x6);
174 x46 = x44+x42;
175 x47 = (br_word_t)(x46<x44);
176 x48 = x47+x45;
177 x49 = x48+x43;
178 x50 = x2*x7;
179 x51 = _br_mulhuu(x2, x7);
180 x52 = x50+x46;
181 x53 = (br_word_t)(x52<x50);
182 x54 = x53+x51;
183 x55 = x54+x49;
184 x56 = x1*x8;
185 x57 = _br_mulhuu(x1, x8);
186 x58 = x56+x52;
187 x59 = (br_word_t)(x58<x56);
188 x60 = x59+x57;
189 x61 = x60+x55;
190 x62 = x0*x9;
191 x63 = _br_mulhuu(x0, x9);
192 x64 = x62+x58;
193 x65 = (br_word_t)(x64<x62);
194 x66 = x65+x63;
195 x67 = x66+x61;
196 x68 = x38+x64;
197 x69 = (br_word_t)(x68<x38);
198 x70 = x69+x67;
199 x71 = x68+x40;
200 x72 = (br_word_t)(x71<x68);
201 x73 = x72+x70;
202 x74 = x73+x41;
203 x75 = (x71>>((br_word_t)52&(sizeof(br_word_t)*8-1)))|(x74<<12);
204 x76 = x71&0xfffffffffffff;
205 x77 = x4*x6;
206 x78 = _br_mulhuu(x4, x6);
207 x79 = x3*x7;
208 x80 = _br_mulhuu(x3, x7);
209 x81 = x79+x77;
210 x82 = (br_word_t)(x81<x79);
211 x83 = x82+x80;
212 x84 = x83+x78;
213 x85 = x2*x8;
214 x86 = _br_mulhuu(x2, x8);
215 x87 = x85+x81;
216 x88 = (br_word_t)(x87<x85);
217 x89 = x88+x86;
218 x90 = x89+x84;
219 x91 = x1*x9;
220 x92 = _br_mulhuu(x1, x9);
221 x93 = x91+x87;
222 x94 = (br_word_t)(x93<x91);
223 x95 = x94+x92;
224 x96 = x95+x90;
225 x97 = x75+x93;
226 x98 = (br_word_t)(x97<x75);
227 x99 = x98+x96;
228 x100 = (x97>>((br_word_t)52&(sizeof(br_word_t)*8-1)))|(x99<<12);
229 x101 = x97&0xfffffffffffff;
230 x102 = x76>>((br_word_t)48&(sizeof(br_word_t)*8-1));
231 x103 = x76&0xffffffffffff;
232 x104 = (x102+(x101<<4))*0x1000003d1;
233 x105 = _br_mulhuu((x102+(x101<<4)), (br_word_t)0x1000003d1);
234 x106 = x0*x5;
235 x107 = _br_mulhuu(x0, x5);
236 x108 = x106+x104;
237 x109 = (br_word_t)(x108<x106);
238 x110 = x109+x107;
239 x111 = x110+x105;
240 x112 = (x108>>((br_word_t)52&(sizeof(br_word_t)*8-1)))|(x111<<12);
241 x113 = x108&0xfffffffffffff;
242 x114 = x4*x7;
243 x115 = _br_mulhuu(x4, x7);
244 x116 = x3*x8;
245 x117 = _br_mulhuu(x3, x8);
246 x118 = x116+x114;
247 x119 = (br_word_t)(x118<x116);
248 x120 = x119+x117;
249 x121 = x120+x115;
250 x122 = x2*x9;
251 x123 = _br_mulhuu(x2, x9);
252 x124 = x122+x118;
253 x125 = (br_word_t)(x124<x122);
254 x126 = x125+x123;
255 x127 = x126+x121;
256 x128 = x100+x124;
257 x129 = (br_word_t)(x128<x100);
258 x130 = x129+x127;
259 x131 = (x128>>((br_word_t)52&(sizeof(br_word_t)*8-1)))|(x130<<12);
260 x132 = x128&0xfffffffffffff;
261 x133 = x132*0x1000003d10;
262 x134 = _br_mulhuu(x132, (br_word_t)0x1000003d10);
263 x135 = x1*x5;
264 x136 = _br_mulhuu(x1, x5);
265 x137 = x0*x6;
266 x138 = _br_mulhuu(x0, x6);
267 x139 = x137+x135;
268 x140 = (br_word_t)(x139<x137);
269 x141 = x140+x138;
270 x142 = x141+x136;
271 x143 = x112+x139;
272 x144 = (br_word_t)(x143<x112);
273 x145 = x144+x142;
274 x146 = x143+x133;
275 x147 = (br_word_t)(x146<x143);
276 x148 = x147+x145;
277 x149 = x148+x134;
278 x150 = (x146>>((br_word_t)52&(sizeof(br_word_t)*8-1)))|(x149<<12);
279 x151 = x146&0xfffffffffffff;
280 x152 = x4*x8;
281 x153 = _br_mulhuu(x4, x8);
282 x154 = x3*x9;
283 x155 = _br_mulhuu(x3, x9);
284 x156 = x154+x152;
285 x157 = (br_word_t)(x156<x154);
286 x158 = x157+x155;
287 x159 = x158+x153;
288 x160 = x131+x156;
289 x161 = (br_word_t)(x160<x131);
290 x162 = x161+x159;
291 x163 = x160*0x1000003d10;
292 x164 = _br_mulhuu(x160, (br_word_t)0x1000003d10);
293 x165 = x2*x5;
294 x166 = _br_mulhuu(x2, x5);
295 x167 = x1*x6;
296 x168 = _br_mulhuu(x1, x6);
297 x169 = x167+x165;
298 x170 = (br_word_t)(x169<x167);
299 x171 = x170+x168;
300 x172 = x171+x166;
301 x173 = x0*x7;
302 x174 = _br_mulhuu(x0, x7);
303 x175 = x173+x169;
304 x176 = (br_word_t)(x175<x173);
305 x177 = x176+x174;
306 x178 = x177+x172;
307 x179 = x150+x175;
308 x180 = (br_word_t)(x179<x150);
309 x181 = x180+x178;
310 x182 = x179+x163;
311 x183 = (br_word_t)(x182<x179);
312 x184 = x183+x181;
313 x185 = x184+x164;
314 x186 = (x182>>((br_word_t)52&(sizeof(br_word_t)*8-1)))|(x185<<12);
315 x187 = x182&0xfffffffffffff;
316 x188 = x162*0x1000003d10000;
317 x189 = _br_mulhuu(x162, (br_word_t)0x1000003d10000);
318 x190 = (x186+x39)+x188;
319 x191 = (br_word_t)(x190<(x186+x39));
320 x192 = x191+x189;
321 x193 = (x190>>((br_word_t)52&(sizeof(br_word_t)*8-1)))|(x192<<12);
322 x194 = x190&0xfffffffffffff;
323 x195 = x193+x103;
324 x196 = x113;
325 x197 = x151;
326 x198 = x187;
327 x199 = x194;
328 x200 = x195;
329 /*skip*/
330 _br_store(out0+0, x196);
331 _br_store(out0+8, x197);
332 _br_store(out0+16, x198);
333 _br_store(out0+24, x199);
334 _br_store(out0+32, x200);
335 /*skip*/
336 }
337
338 /* NOTE: The following wrapper function is not covered by Coq proofs */
339 static void fiat_secp256k1_dettman_mul(uint64_t out1[5], const uint64_t arg1[5], const uint64_t arg2[5]) {
340 internal_fiat_secp256k1_dettman_mul((uintptr_t)out1, (uintptr_t)arg1, (uintptr_t)arg2);
341 }
342
343
344 /*
345 * Input Bounds:
346 * in0: [[0x0 ~> 0x1ffffffffffffe], [0x0 ~> 0x1ffffffffffffe], [0x0 ~> 0x1ffffffffffffe], [0x0 ~> 0x1ffffffffffffe], [0x0 ~> 0x1fffffffffffe]]
347 * Output Bounds:
348 * out0: [[0x0 ~> 0x1ffffffffffffe], [0x0 ~> 0x1ffffffffffffe], [0x0 ~> 0x1ffffffffffffe], [0x0 ~> 0x1ffffffffffffe], [0x0 ~> 0x17fffffffffff]]
349 */
350 static
351 void internal_fiat_secp256k1_dettman_square(br_word_t out0, br_word_t in0) {
352 br_word_t x9, x13, x15, x18, x16, x19, x14, x11, x17, x22, x20, x23, x12, x24, x21, x10, x29, x31, x34, x32, x35, x30, x33, x37, x40, x38, x41, x36, x39, x25, x44, x42, x27, x43, x47, x45, x48, x28, x49, x46, x7, x52, x54, x57, x55, x58, x53, x56, x50, x61, x59, x62, x60, x51, x65, x64, x0, x67, x69, x72, x70, x73, x68, x74, x71, x3, x6, x77, x79, x82, x80, x83, x78, x81, x63, x86, x84, x87, x85, x89, x92, x75, x95, x93, x90, x94, x98, x96, x99, x91, x100, x97, x5, x4, x103, x88, x106, x104, x105, x1, x8, x2, x110, x112, x115, x113, x116, x111, x114, x101, x119, x117, x108, x118, x122, x120, x123, x109, x124, x121, x107, x127, x125, x26, x130, x128, x131, x129, x132, x66, x76, x102, x126, x133, x134, x135, x136, x137, x138, x139;
353 x0 = _br_load(in0+0);
354 x1 = _br_load(in0+8);
355 x2 = _br_load(in0+16);
356 x3 = _br_load(in0+24);
357 x4 = _br_load(in0+32);
358 /*skip*/
359 /*skip*/
360 x5 = x3*2;
361 x6 = x2*2;
362 x7 = x1*2;
363 x8 = x0*2;
364 x9 = x4*x4;
365 x10 = _br_mulhuu(x4, x4);
366 x11 = x9*0x1000003d10;
367 x12 = _br_mulhuu(x9, (br_word_t)0x1000003d10);
368 x13 = x7*x2;
369 x14 = _br_mulhuu(x7, x2);
370 x15 = x8*x3;
371 x16 = _br_mulhuu(x8, x3);
372 x17 = x15+x13;
373 x18 = (br_word_t)(x17<x15);
374 x19 = x18+x16;
375 x20 = x19+x14;
376 x21 = x17+x11;
377 x22 = (br_word_t)(x21<x17);
378 x23 = x22+x20;
379 x24 = x23+x12;
380 x25 = (x21>>((br_word_t)52&(sizeof(br_word_t)*8-1)))|(x24<<12);
381 x26 = x21&0xfffffffffffff;
382 x27 = x10*0x1000003d10000;
383 x28 = _br_mulhuu(x10, (br_word_t)0x1000003d10000);
384 x29 = x2*x2;
385 x30 = _br_mulhuu(x2, x2);
386 x31 = x7*x3;
387 x32 = _br_mulhuu(x7, x3);
388 x33 = x31+x29;
389 x34 = (br_word_t)(x33<x31);
390 x35 = x34+x32;
391 x36 = x35+x30;
392 x37 = x8*x4;
393 x38 = _br_mulhuu(x8, x4);
394 x39 = x37+x33;
395 x40 = (br_word_t)(x39<x37);
396 x41 = x40+x38;
397 x42 = x41+x36;
398 x43 = x25+x39;
399 x44 = (br_word_t)(x43<x25);
400 x45 = x44+x42;
401 x46 = x43+x27;
402 x47 = (br_word_t)(x46<x43);
403 x48 = x47+x45;
404 x49 = x48+x28;
405 x50 = (x46>>((br_word_t)52&(sizeof(br_word_t)*8-1)))|(x49<<12);
406 x51 = x46&0xfffffffffffff;
407 x52 = x6*x3;
408 x53 = _br_mulhuu(x6, x3);
409 x54 = x7*x4;
410 x55 = _br_mulhuu(x7, x4);
411 x56 = x54+x52;
412 x57 = (br_word_t)(x56<x54);
413 x58 = x57+x55;
414 x59 = x58+x53;
415 x60 = x50+x56;
416 x61 = (br_word_t)(x60<x50);
417 x62 = x61+x59;
418 x63 = (x60>>((br_word_t)52&(sizeof(br_word_t)*8-1)))|(x62<<12);
419 x64 = x60&0xfffffffffffff;
420 x65 = x51>>((br_word_t)48&(sizeof(br_word_t)*8-1));
421 x66 = x51&0xffffffffffff;
422 x67 = (x65+(x64<<4))*0x1000003d1;
423 x68 = _br_mulhuu((x65+(x64<<4)), (br_word_t)0x1000003d1);
424 x69 = x0*x0;
425 x70 = _br_mulhuu(x0, x0);
426 x71 = x69+x67;
427 x72 = (br_word_t)(x71<x69);
428 x73 = x72+x70;
429 x74 = x73+x68;
430 x75 = (x71>>((br_word_t)52&(sizeof(br_word_t)*8-1)))|(x74<<12);
431 x76 = x71&0xfffffffffffff;
432 x77 = x3*x3;
433 x78 = _br_mulhuu(x3, x3);
434 x79 = x6*x4;
435 x80 = _br_mulhuu(x6, x4);
436 x81 = x79+x77;
437 x82 = (br_word_t)(x81<x79);
438 x83 = x82+x80;
439 x84 = x83+x78;
440 x85 = x63+x81;
441 x86 = (br_word_t)(x85<x63);
442 x87 = x86+x84;
443 x88 = (x85>>((br_word_t)52&(sizeof(br_word_t)*8-1)))|(x87<<12);
444 x89 = x85&0xfffffffffffff;
445 x90 = x89*0x1000003d10;
446 x91 = _br_mulhuu(x89, (br_word_t)0x1000003d10);
447 x92 = x8*x1;
448 x93 = _br_mulhuu(x8, x1);
449 x94 = x75+x92;
450 x95 = (br_word_t)(x94<x75);
451 x96 = x95+x93;
452 x97 = x94+x90;
453 x98 = (br_word_t)(x97<x94);
454 x99 = x98+x96;
455 x100 = x99+x91;
456 x101 = (x97>>((br_word_t)52&(sizeof(br_word_t)*8-1)))|(x100<<12);
457 x102 = x97&0xfffffffffffff;
458 x103 = x5*x4;
459 x104 = _br_mulhuu(x5, x4);
460 x105 = x88+x103;
461 x106 = (br_word_t)(x105<x88);
462 x107 = x106+x104;
463 x108 = x105*0x1000003d10;
464 x109 = _br_mulhuu(x105, (br_word_t)0x1000003d10);
465 x110 = x1*x1;
466 x111 = _br_mulhuu(x1, x1);
467 x112 = x8*x2;
468 x113 = _br_mulhuu(x8, x2);
469 x114 = x112+x110;
470 x115 = (br_word_t)(x114<x112);
471 x116 = x115+x113;
472 x117 = x116+x111;
473 x118 = x101+x114;
474 x119 = (br_word_t)(x118<x101);
475 x120 = x119+x117;
476 x121 = x118+x108;
477 x122 = (br_word_t)(x121<x118);
478 x123 = x122+x120;
479 x124 = x123+x109;
480 x125 = (x121>>((br_word_t)52&(sizeof(br_word_t)*8-1)))|(x124<<12);
481 x126 = x121&0xfffffffffffff;
482 x127 = x107*0x1000003d10000;
483 x128 = _br_mulhuu(x107, (br_word_t)0x1000003d10000);
484 x129 = (x125+x26)+x127;
485 x130 = (br_word_t)(x129<(x125+x26));
486 x131 = x130+x128;
487 x132 = (x129>>((br_word_t)52&(sizeof(br_word_t)*8-1)))|(x131<<12);
488 x133 = x129&0xfffffffffffff;
489 x134 = x132+x66;
490 x135 = x76;
491 x136 = x102;
492 x137 = x126;
493 x138 = x133;
494 x139 = x134;
495 /*skip*/
496 _br_store(out0+0, x135);
497 _br_store(out0+8, x136);
498 _br_store(out0+16, x137);
499 _br_store(out0+24, x138);
500 _br_store(out0+32, x139);
501 /*skip*/
502 }
503
504 /* NOTE: The following wrapper function is not covered by Coq proofs */
505 static void fiat_secp256k1_dettman_square(uint64_t out1[5], const uint64_t arg1[5]) {
506 internal_fiat_secp256k1_dettman_square((uintptr_t)out1, (uintptr_t)arg1);
507 }