-
Notifications
You must be signed in to change notification settings - Fork 147
/
p224_32.c
3975 lines (3950 loc) · 126 KB
/
p224_32.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* Autogenerated: 'src/ExtractionOCaml/word_by_word_montgomery' --inline --static --use-value-barrier p224 32 '2^224 - 2^96 + 1' mul square add sub opp from_montgomery to_montgomery nonzero selectznz to_bytes from_bytes one msat divstep divstep_precomp */
/* curve description: p224 */
/* machine_wordsize = 32 (from "32") */
/* requested operations: mul, square, add, sub, opp, from_montgomery, to_montgomery, nonzero, selectznz, to_bytes, from_bytes, one, msat, divstep, divstep_precomp */
/* m = 0xffffffffffffffffffffffffffffffff000000000000000000000001 (from "2^224 - 2^96 + 1") */
/* */
/* NOTE: In addition to the bounds specified above each function, all */
/* functions synthesized for this Montgomery arithmetic require the */
/* input to be strictly less than the prime modulus (m), and also */
/* require the input to be in the unique saturated representation. */
/* All functions also ensure that these two properties are true of */
/* return values. */
/* */
/* Computed values: */
/* eval z = z[0] + (z[1] << 32) + (z[2] << 64) + (z[3] << 96) + (z[4] << 128) + (z[5] << 160) + (z[6] << 192) */
/* 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) */
/* twos_complement_eval z = let x1 := z[0] + (z[1] << 32) + (z[2] << 64) + (z[3] << 96) + (z[4] << 128) + (z[5] << 160) + (z[6] << 192) in */
/* if x1 & (2^224-1) < 2^223 then x1 & (2^224-1) else (x1 & (2^224-1)) - 2^224 */
#include <stdint.h>
typedef unsigned char fiat_p224_uint1;
typedef signed char fiat_p224_int1;
#if defined(__GNUC__) || defined(__clang__)
# define FIAT_P224_FIAT_INLINE __inline__
#else
# define FIAT_P224_FIAT_INLINE
#endif
/* The type fiat_p224_montgomery_domain_field_element is a field element in the Montgomery domain. */
/* Bounds: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]] */
typedef uint32_t fiat_p224_montgomery_domain_field_element[7];
/* The type fiat_p224_non_montgomery_domain_field_element is a field element NOT in the Montgomery domain. */
/* Bounds: [[0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff], [0x0 ~> 0xffffffff]] */
typedef uint32_t fiat_p224_non_montgomery_domain_field_element[7];
#if (-1 & 3) != 3
#error "This code only works on a two's complement system"
#endif
#if !defined(FIAT_P224_NO_ASM) && (defined(__GNUC__) || defined(__clang__))
static __inline__ uint32_t fiat_p224_value_barrier_u32(uint32_t a) {
__asm__("" : "+r"(a) : /* no inputs */);
return a;
}
#else
# define fiat_p224_value_barrier_u32(x) (x)
#endif
/*
* The function fiat_p224_addcarryx_u32 is an addition with carry.
*
* Postconditions:
* out1 = (arg1 + arg2 + arg3) mod 2^32
* out2 = ⌊(arg1 + arg2 + arg3) / 2^32⌋
*
* Input Bounds:
* arg1: [0x0 ~> 0x1]
* arg2: [0x0 ~> 0xffffffff]
* arg3: [0x0 ~> 0xffffffff]
* Output Bounds:
* out1: [0x0 ~> 0xffffffff]
* out2: [0x0 ~> 0x1]
*/
static FIAT_P224_FIAT_INLINE void fiat_p224_addcarryx_u32(uint32_t* out1, fiat_p224_uint1* out2, fiat_p224_uint1 arg1, uint32_t arg2, uint32_t arg3) {
uint64_t x1;
uint32_t x2;
fiat_p224_uint1 x3;
x1 = ((arg1 + (uint64_t)arg2) + arg3);
x2 = (uint32_t)(x1 & UINT32_C(0xffffffff));
x3 = (fiat_p224_uint1)(x1 >> 32);
*out1 = x2;
*out2 = x3;
}
/*
* The function fiat_p224_subborrowx_u32 is a subtraction with borrow.
*
* Postconditions:
* out1 = (-arg1 + arg2 + -arg3) mod 2^32
* out2 = -⌊(-arg1 + arg2 + -arg3) / 2^32⌋
*
* Input Bounds:
* arg1: [0x0 ~> 0x1]
* arg2: [0x0 ~> 0xffffffff]
* arg3: [0x0 ~> 0xffffffff]
* Output Bounds:
* out1: [0x0 ~> 0xffffffff]
* out2: [0x0 ~> 0x1]
*/
static FIAT_P224_FIAT_INLINE void fiat_p224_subborrowx_u32(uint32_t* out1, fiat_p224_uint1* out2, fiat_p224_uint1 arg1, uint32_t arg2, uint32_t arg3) {
int64_t x1;
fiat_p224_int1 x2;
uint32_t x3;
x1 = ((arg2 - (int64_t)arg1) - arg3);
x2 = (fiat_p224_int1)(x1 >> 32);
x3 = (uint32_t)(x1 & UINT32_C(0xffffffff));
*out1 = x3;
*out2 = (fiat_p224_uint1)(0x0 - x2);
}
/*
* The function fiat_p224_mulx_u32 is a multiplication, returning the full double-width result.
*
* Postconditions:
* out1 = (arg1 * arg2) mod 2^32
* out2 = ⌊arg1 * arg2 / 2^32⌋
*
* Input Bounds:
* arg1: [0x0 ~> 0xffffffff]
* arg2: [0x0 ~> 0xffffffff]
* Output Bounds:
* out1: [0x0 ~> 0xffffffff]
* out2: [0x0 ~> 0xffffffff]
*/
static FIAT_P224_FIAT_INLINE void fiat_p224_mulx_u32(uint32_t* out1, uint32_t* out2, uint32_t arg1, uint32_t arg2) {
uint64_t x1;
uint32_t x2;
uint32_t x3;
x1 = ((uint64_t)arg1 * arg2);
x2 = (uint32_t)(x1 & UINT32_C(0xffffffff));
x3 = (uint32_t)(x1 >> 32);
*out1 = x2;
*out2 = x3;
}
/*
* The function fiat_p224_cmovznz_u32 is a single-word conditional move.
*
* Postconditions:
* out1 = (if arg1 = 0 then arg2 else arg3)
*
* Input Bounds:
* arg1: [0x0 ~> 0x1]
* arg2: [0x0 ~> 0xffffffff]
* arg3: [0x0 ~> 0xffffffff]
* Output Bounds:
* out1: [0x0 ~> 0xffffffff]
*/
static FIAT_P224_FIAT_INLINE void fiat_p224_cmovznz_u32(uint32_t* out1, fiat_p224_uint1 arg1, uint32_t arg2, uint32_t arg3) {
fiat_p224_uint1 x1;
uint32_t x2;
uint32_t x3;
x1 = (!(!arg1));
x2 = ((fiat_p224_int1)(0x0 - x1) & UINT32_C(0xffffffff));
x3 = ((fiat_p224_value_barrier_u32(x2) & arg3) | (fiat_p224_value_barrier_u32((~x2)) & arg2));
*out1 = x3;
}
/*
* The function fiat_p224_mul multiplies two field elements in the Montgomery domain.
*
* Preconditions:
* 0 ≤ eval arg1 < m
* 0 ≤ eval arg2 < m
* Postconditions:
* eval (from_montgomery out1) mod m = (eval (from_montgomery arg1) * eval (from_montgomery arg2)) mod m
* 0 ≤ eval out1 < m
*
*/
static FIAT_P224_FIAT_INLINE void fiat_p224_mul(fiat_p224_montgomery_domain_field_element out1, const fiat_p224_montgomery_domain_field_element arg1, const fiat_p224_montgomery_domain_field_element arg2) {
uint32_t x1;
uint32_t x2;
uint32_t x3;
uint32_t x4;
uint32_t x5;
uint32_t x6;
uint32_t x7;
uint32_t x8;
uint32_t x9;
uint32_t x10;
uint32_t x11;
uint32_t x12;
uint32_t x13;
uint32_t x14;
uint32_t x15;
uint32_t x16;
uint32_t x17;
uint32_t x18;
uint32_t x19;
uint32_t x20;
uint32_t x21;
uint32_t x22;
fiat_p224_uint1 x23;
uint32_t x24;
fiat_p224_uint1 x25;
uint32_t x26;
fiat_p224_uint1 x27;
uint32_t x28;
fiat_p224_uint1 x29;
uint32_t x30;
fiat_p224_uint1 x31;
uint32_t x32;
fiat_p224_uint1 x33;
uint32_t x34;
uint32_t x35;
uint32_t x36;
uint32_t x37;
uint32_t x38;
uint32_t x39;
uint32_t x40;
uint32_t x41;
uint32_t x42;
uint32_t x43;
uint32_t x44;
uint32_t x45;
fiat_p224_uint1 x46;
uint32_t x47;
fiat_p224_uint1 x48;
uint32_t x49;
fiat_p224_uint1 x50;
uint32_t x51;
uint32_t x52;
fiat_p224_uint1 x53;
uint32_t x54;
fiat_p224_uint1 x55;
uint32_t x56;
fiat_p224_uint1 x57;
uint32_t x58;
fiat_p224_uint1 x59;
uint32_t x60;
fiat_p224_uint1 x61;
uint32_t x62;
fiat_p224_uint1 x63;
uint32_t x64;
fiat_p224_uint1 x65;
uint32_t x66;
fiat_p224_uint1 x67;
uint32_t x68;
uint32_t x69;
uint32_t x70;
uint32_t x71;
uint32_t x72;
uint32_t x73;
uint32_t x74;
uint32_t x75;
uint32_t x76;
uint32_t x77;
uint32_t x78;
uint32_t x79;
uint32_t x80;
uint32_t x81;
uint32_t x82;
fiat_p224_uint1 x83;
uint32_t x84;
fiat_p224_uint1 x85;
uint32_t x86;
fiat_p224_uint1 x87;
uint32_t x88;
fiat_p224_uint1 x89;
uint32_t x90;
fiat_p224_uint1 x91;
uint32_t x92;
fiat_p224_uint1 x93;
uint32_t x94;
uint32_t x95;
fiat_p224_uint1 x96;
uint32_t x97;
fiat_p224_uint1 x98;
uint32_t x99;
fiat_p224_uint1 x100;
uint32_t x101;
fiat_p224_uint1 x102;
uint32_t x103;
fiat_p224_uint1 x104;
uint32_t x105;
fiat_p224_uint1 x106;
uint32_t x107;
fiat_p224_uint1 x108;
uint32_t x109;
fiat_p224_uint1 x110;
uint32_t x111;
uint32_t x112;
uint32_t x113;
uint32_t x114;
uint32_t x115;
uint32_t x116;
uint32_t x117;
uint32_t x118;
uint32_t x119;
uint32_t x120;
uint32_t x121;
fiat_p224_uint1 x122;
uint32_t x123;
fiat_p224_uint1 x124;
uint32_t x125;
fiat_p224_uint1 x126;
uint32_t x127;
uint32_t x128;
fiat_p224_uint1 x129;
uint32_t x130;
fiat_p224_uint1 x131;
uint32_t x132;
fiat_p224_uint1 x133;
uint32_t x134;
fiat_p224_uint1 x135;
uint32_t x136;
fiat_p224_uint1 x137;
uint32_t x138;
fiat_p224_uint1 x139;
uint32_t x140;
fiat_p224_uint1 x141;
uint32_t x142;
fiat_p224_uint1 x143;
uint32_t x144;
uint32_t x145;
uint32_t x146;
uint32_t x147;
uint32_t x148;
uint32_t x149;
uint32_t x150;
uint32_t x151;
uint32_t x152;
uint32_t x153;
uint32_t x154;
uint32_t x155;
uint32_t x156;
uint32_t x157;
uint32_t x158;
uint32_t x159;
fiat_p224_uint1 x160;
uint32_t x161;
fiat_p224_uint1 x162;
uint32_t x163;
fiat_p224_uint1 x164;
uint32_t x165;
fiat_p224_uint1 x166;
uint32_t x167;
fiat_p224_uint1 x168;
uint32_t x169;
fiat_p224_uint1 x170;
uint32_t x171;
uint32_t x172;
fiat_p224_uint1 x173;
uint32_t x174;
fiat_p224_uint1 x175;
uint32_t x176;
fiat_p224_uint1 x177;
uint32_t x178;
fiat_p224_uint1 x179;
uint32_t x180;
fiat_p224_uint1 x181;
uint32_t x182;
fiat_p224_uint1 x183;
uint32_t x184;
fiat_p224_uint1 x185;
uint32_t x186;
fiat_p224_uint1 x187;
uint32_t x188;
uint32_t x189;
uint32_t x190;
uint32_t x191;
uint32_t x192;
uint32_t x193;
uint32_t x194;
uint32_t x195;
uint32_t x196;
uint32_t x197;
uint32_t x198;
fiat_p224_uint1 x199;
uint32_t x200;
fiat_p224_uint1 x201;
uint32_t x202;
fiat_p224_uint1 x203;
uint32_t x204;
uint32_t x205;
fiat_p224_uint1 x206;
uint32_t x207;
fiat_p224_uint1 x208;
uint32_t x209;
fiat_p224_uint1 x210;
uint32_t x211;
fiat_p224_uint1 x212;
uint32_t x213;
fiat_p224_uint1 x214;
uint32_t x215;
fiat_p224_uint1 x216;
uint32_t x217;
fiat_p224_uint1 x218;
uint32_t x219;
fiat_p224_uint1 x220;
uint32_t x221;
uint32_t x222;
uint32_t x223;
uint32_t x224;
uint32_t x225;
uint32_t x226;
uint32_t x227;
uint32_t x228;
uint32_t x229;
uint32_t x230;
uint32_t x231;
uint32_t x232;
uint32_t x233;
uint32_t x234;
uint32_t x235;
uint32_t x236;
fiat_p224_uint1 x237;
uint32_t x238;
fiat_p224_uint1 x239;
uint32_t x240;
fiat_p224_uint1 x241;
uint32_t x242;
fiat_p224_uint1 x243;
uint32_t x244;
fiat_p224_uint1 x245;
uint32_t x246;
fiat_p224_uint1 x247;
uint32_t x248;
uint32_t x249;
fiat_p224_uint1 x250;
uint32_t x251;
fiat_p224_uint1 x252;
uint32_t x253;
fiat_p224_uint1 x254;
uint32_t x255;
fiat_p224_uint1 x256;
uint32_t x257;
fiat_p224_uint1 x258;
uint32_t x259;
fiat_p224_uint1 x260;
uint32_t x261;
fiat_p224_uint1 x262;
uint32_t x263;
fiat_p224_uint1 x264;
uint32_t x265;
uint32_t x266;
uint32_t x267;
uint32_t x268;
uint32_t x269;
uint32_t x270;
uint32_t x271;
uint32_t x272;
uint32_t x273;
uint32_t x274;
uint32_t x275;
fiat_p224_uint1 x276;
uint32_t x277;
fiat_p224_uint1 x278;
uint32_t x279;
fiat_p224_uint1 x280;
uint32_t x281;
uint32_t x282;
fiat_p224_uint1 x283;
uint32_t x284;
fiat_p224_uint1 x285;
uint32_t x286;
fiat_p224_uint1 x287;
uint32_t x288;
fiat_p224_uint1 x289;
uint32_t x290;
fiat_p224_uint1 x291;
uint32_t x292;
fiat_p224_uint1 x293;
uint32_t x294;
fiat_p224_uint1 x295;
uint32_t x296;
fiat_p224_uint1 x297;
uint32_t x298;
uint32_t x299;
uint32_t x300;
uint32_t x301;
uint32_t x302;
uint32_t x303;
uint32_t x304;
uint32_t x305;
uint32_t x306;
uint32_t x307;
uint32_t x308;
uint32_t x309;
uint32_t x310;
uint32_t x311;
uint32_t x312;
uint32_t x313;
fiat_p224_uint1 x314;
uint32_t x315;
fiat_p224_uint1 x316;
uint32_t x317;
fiat_p224_uint1 x318;
uint32_t x319;
fiat_p224_uint1 x320;
uint32_t x321;
fiat_p224_uint1 x322;
uint32_t x323;
fiat_p224_uint1 x324;
uint32_t x325;
uint32_t x326;
fiat_p224_uint1 x327;
uint32_t x328;
fiat_p224_uint1 x329;
uint32_t x330;
fiat_p224_uint1 x331;
uint32_t x332;
fiat_p224_uint1 x333;
uint32_t x334;
fiat_p224_uint1 x335;
uint32_t x336;
fiat_p224_uint1 x337;
uint32_t x338;
fiat_p224_uint1 x339;
uint32_t x340;
fiat_p224_uint1 x341;
uint32_t x342;
uint32_t x343;
uint32_t x344;
uint32_t x345;
uint32_t x346;
uint32_t x347;
uint32_t x348;
uint32_t x349;
uint32_t x350;
uint32_t x351;
uint32_t x352;
fiat_p224_uint1 x353;
uint32_t x354;
fiat_p224_uint1 x355;
uint32_t x356;
fiat_p224_uint1 x357;
uint32_t x358;
uint32_t x359;
fiat_p224_uint1 x360;
uint32_t x361;
fiat_p224_uint1 x362;
uint32_t x363;
fiat_p224_uint1 x364;
uint32_t x365;
fiat_p224_uint1 x366;
uint32_t x367;
fiat_p224_uint1 x368;
uint32_t x369;
fiat_p224_uint1 x370;
uint32_t x371;
fiat_p224_uint1 x372;
uint32_t x373;
fiat_p224_uint1 x374;
uint32_t x375;
uint32_t x376;
uint32_t x377;
uint32_t x378;
uint32_t x379;
uint32_t x380;
uint32_t x381;
uint32_t x382;
uint32_t x383;
uint32_t x384;
uint32_t x385;
uint32_t x386;
uint32_t x387;
uint32_t x388;
uint32_t x389;
uint32_t x390;
fiat_p224_uint1 x391;
uint32_t x392;
fiat_p224_uint1 x393;
uint32_t x394;
fiat_p224_uint1 x395;
uint32_t x396;
fiat_p224_uint1 x397;
uint32_t x398;
fiat_p224_uint1 x399;
uint32_t x400;
fiat_p224_uint1 x401;
uint32_t x402;
uint32_t x403;
fiat_p224_uint1 x404;
uint32_t x405;
fiat_p224_uint1 x406;
uint32_t x407;
fiat_p224_uint1 x408;
uint32_t x409;
fiat_p224_uint1 x410;
uint32_t x411;
fiat_p224_uint1 x412;
uint32_t x413;
fiat_p224_uint1 x414;
uint32_t x415;
fiat_p224_uint1 x416;
uint32_t x417;
fiat_p224_uint1 x418;
uint32_t x419;
uint32_t x420;
uint32_t x421;
uint32_t x422;
uint32_t x423;
uint32_t x424;
uint32_t x425;
uint32_t x426;
uint32_t x427;
uint32_t x428;
uint32_t x429;
fiat_p224_uint1 x430;
uint32_t x431;
fiat_p224_uint1 x432;
uint32_t x433;
fiat_p224_uint1 x434;
uint32_t x435;
uint32_t x436;
fiat_p224_uint1 x437;
uint32_t x438;
fiat_p224_uint1 x439;
uint32_t x440;
fiat_p224_uint1 x441;
uint32_t x442;
fiat_p224_uint1 x443;
uint32_t x444;
fiat_p224_uint1 x445;
uint32_t x446;
fiat_p224_uint1 x447;
uint32_t x448;
fiat_p224_uint1 x449;
uint32_t x450;
fiat_p224_uint1 x451;
uint32_t x452;
uint32_t x453;
uint32_t x454;
uint32_t x455;
uint32_t x456;
uint32_t x457;
uint32_t x458;
uint32_t x459;
uint32_t x460;
uint32_t x461;
uint32_t x462;
uint32_t x463;
uint32_t x464;
uint32_t x465;
uint32_t x466;
uint32_t x467;
fiat_p224_uint1 x468;
uint32_t x469;
fiat_p224_uint1 x470;
uint32_t x471;
fiat_p224_uint1 x472;
uint32_t x473;
fiat_p224_uint1 x474;
uint32_t x475;
fiat_p224_uint1 x476;
uint32_t x477;
fiat_p224_uint1 x478;
uint32_t x479;
uint32_t x480;
fiat_p224_uint1 x481;
uint32_t x482;
fiat_p224_uint1 x483;
uint32_t x484;
fiat_p224_uint1 x485;
uint32_t x486;
fiat_p224_uint1 x487;
uint32_t x488;
fiat_p224_uint1 x489;
uint32_t x490;
fiat_p224_uint1 x491;
uint32_t x492;
fiat_p224_uint1 x493;
uint32_t x494;
fiat_p224_uint1 x495;
uint32_t x496;
uint32_t x497;
uint32_t x498;
uint32_t x499;
uint32_t x500;
uint32_t x501;
uint32_t x502;
uint32_t x503;
uint32_t x504;
uint32_t x505;
uint32_t x506;
fiat_p224_uint1 x507;
uint32_t x508;
fiat_p224_uint1 x509;
uint32_t x510;
fiat_p224_uint1 x511;
uint32_t x512;
uint32_t x513;
fiat_p224_uint1 x514;
uint32_t x515;
fiat_p224_uint1 x516;
uint32_t x517;
fiat_p224_uint1 x518;
uint32_t x519;
fiat_p224_uint1 x520;
uint32_t x521;
fiat_p224_uint1 x522;
uint32_t x523;
fiat_p224_uint1 x524;
uint32_t x525;
fiat_p224_uint1 x526;
uint32_t x527;
fiat_p224_uint1 x528;
uint32_t x529;
uint32_t x530;
fiat_p224_uint1 x531;
uint32_t x532;
fiat_p224_uint1 x533;
uint32_t x534;
fiat_p224_uint1 x535;
uint32_t x536;
fiat_p224_uint1 x537;
uint32_t x538;
fiat_p224_uint1 x539;
uint32_t x540;
fiat_p224_uint1 x541;
uint32_t x542;
fiat_p224_uint1 x543;
uint32_t x544;
fiat_p224_uint1 x545;
uint32_t x546;
uint32_t x547;
uint32_t x548;
uint32_t x549;
uint32_t x550;
uint32_t x551;
uint32_t x552;
x1 = (arg1[1]);
x2 = (arg1[2]);
x3 = (arg1[3]);
x4 = (arg1[4]);
x5 = (arg1[5]);
x6 = (arg1[6]);
x7 = (arg1[0]);
fiat_p224_mulx_u32(&x8, &x9, x7, (arg2[6]));
fiat_p224_mulx_u32(&x10, &x11, x7, (arg2[5]));
fiat_p224_mulx_u32(&x12, &x13, x7, (arg2[4]));
fiat_p224_mulx_u32(&x14, &x15, x7, (arg2[3]));
fiat_p224_mulx_u32(&x16, &x17, x7, (arg2[2]));
fiat_p224_mulx_u32(&x18, &x19, x7, (arg2[1]));
fiat_p224_mulx_u32(&x20, &x21, x7, (arg2[0]));
fiat_p224_addcarryx_u32(&x22, &x23, 0x0, x21, x18);
fiat_p224_addcarryx_u32(&x24, &x25, x23, x19, x16);
fiat_p224_addcarryx_u32(&x26, &x27, x25, x17, x14);
fiat_p224_addcarryx_u32(&x28, &x29, x27, x15, x12);
fiat_p224_addcarryx_u32(&x30, &x31, x29, x13, x10);
fiat_p224_addcarryx_u32(&x32, &x33, x31, x11, x8);
x34 = (x33 + x9);
fiat_p224_mulx_u32(&x35, &x36, x20, UINT32_C(0xffffffff));
fiat_p224_mulx_u32(&x37, &x38, x35, UINT32_C(0xffffffff));
fiat_p224_mulx_u32(&x39, &x40, x35, UINT32_C(0xffffffff));
fiat_p224_mulx_u32(&x41, &x42, x35, UINT32_C(0xffffffff));
fiat_p224_mulx_u32(&x43, &x44, x35, UINT32_C(0xffffffff));
fiat_p224_addcarryx_u32(&x45, &x46, 0x0, x44, x41);
fiat_p224_addcarryx_u32(&x47, &x48, x46, x42, x39);
fiat_p224_addcarryx_u32(&x49, &x50, x48, x40, x37);
x51 = (x50 + x38);
fiat_p224_addcarryx_u32(&x52, &x53, 0x0, x20, x35);
fiat_p224_addcarryx_u32(&x54, &x55, x53, x22, 0x0);
fiat_p224_addcarryx_u32(&x56, &x57, x55, x24, 0x0);
fiat_p224_addcarryx_u32(&x58, &x59, x57, x26, x43);
fiat_p224_addcarryx_u32(&x60, &x61, x59, x28, x45);
fiat_p224_addcarryx_u32(&x62, &x63, x61, x30, x47);
fiat_p224_addcarryx_u32(&x64, &x65, x63, x32, x49);
fiat_p224_addcarryx_u32(&x66, &x67, x65, x34, x51);
fiat_p224_mulx_u32(&x68, &x69, x1, (arg2[6]));
fiat_p224_mulx_u32(&x70, &x71, x1, (arg2[5]));
fiat_p224_mulx_u32(&x72, &x73, x1, (arg2[4]));
fiat_p224_mulx_u32(&x74, &x75, x1, (arg2[3]));
fiat_p224_mulx_u32(&x76, &x77, x1, (arg2[2]));
fiat_p224_mulx_u32(&x78, &x79, x1, (arg2[1]));
fiat_p224_mulx_u32(&x80, &x81, x1, (arg2[0]));
fiat_p224_addcarryx_u32(&x82, &x83, 0x0, x81, x78);
fiat_p224_addcarryx_u32(&x84, &x85, x83, x79, x76);
fiat_p224_addcarryx_u32(&x86, &x87, x85, x77, x74);
fiat_p224_addcarryx_u32(&x88, &x89, x87, x75, x72);
fiat_p224_addcarryx_u32(&x90, &x91, x89, x73, x70);
fiat_p224_addcarryx_u32(&x92, &x93, x91, x71, x68);
x94 = (x93 + x69);
fiat_p224_addcarryx_u32(&x95, &x96, 0x0, x54, x80);
fiat_p224_addcarryx_u32(&x97, &x98, x96, x56, x82);
fiat_p224_addcarryx_u32(&x99, &x100, x98, x58, x84);
fiat_p224_addcarryx_u32(&x101, &x102, x100, x60, x86);
fiat_p224_addcarryx_u32(&x103, &x104, x102, x62, x88);
fiat_p224_addcarryx_u32(&x105, &x106, x104, x64, x90);
fiat_p224_addcarryx_u32(&x107, &x108, x106, x66, x92);
fiat_p224_addcarryx_u32(&x109, &x110, x108, x67, x94);
fiat_p224_mulx_u32(&x111, &x112, x95, UINT32_C(0xffffffff));
fiat_p224_mulx_u32(&x113, &x114, x111, UINT32_C(0xffffffff));
fiat_p224_mulx_u32(&x115, &x116, x111, UINT32_C(0xffffffff));
fiat_p224_mulx_u32(&x117, &x118, x111, UINT32_C(0xffffffff));
fiat_p224_mulx_u32(&x119, &x120, x111, UINT32_C(0xffffffff));
fiat_p224_addcarryx_u32(&x121, &x122, 0x0, x120, x117);
fiat_p224_addcarryx_u32(&x123, &x124, x122, x118, x115);
fiat_p224_addcarryx_u32(&x125, &x126, x124, x116, x113);
x127 = (x126 + x114);
fiat_p224_addcarryx_u32(&x128, &x129, 0x0, x95, x111);
fiat_p224_addcarryx_u32(&x130, &x131, x129, x97, 0x0);
fiat_p224_addcarryx_u32(&x132, &x133, x131, x99, 0x0);
fiat_p224_addcarryx_u32(&x134, &x135, x133, x101, x119);
fiat_p224_addcarryx_u32(&x136, &x137, x135, x103, x121);
fiat_p224_addcarryx_u32(&x138, &x139, x137, x105, x123);
fiat_p224_addcarryx_u32(&x140, &x141, x139, x107, x125);
fiat_p224_addcarryx_u32(&x142, &x143, x141, x109, x127);
x144 = ((uint32_t)x143 + x110);
fiat_p224_mulx_u32(&x145, &x146, x2, (arg2[6]));
fiat_p224_mulx_u32(&x147, &x148, x2, (arg2[5]));
fiat_p224_mulx_u32(&x149, &x150, x2, (arg2[4]));
fiat_p224_mulx_u32(&x151, &x152, x2, (arg2[3]));
fiat_p224_mulx_u32(&x153, &x154, x2, (arg2[2]));
fiat_p224_mulx_u32(&x155, &x156, x2, (arg2[1]));
fiat_p224_mulx_u32(&x157, &x158, x2, (arg2[0]));
fiat_p224_addcarryx_u32(&x159, &x160, 0x0, x158, x155);
fiat_p224_addcarryx_u32(&x161, &x162, x160, x156, x153);
fiat_p224_addcarryx_u32(&x163, &x164, x162, x154, x151);
fiat_p224_addcarryx_u32(&x165, &x166, x164, x152, x149);
fiat_p224_addcarryx_u32(&x167, &x168, x166, x150, x147);
fiat_p224_addcarryx_u32(&x169, &x170, x168, x148, x145);
x171 = (x170 + x146);
fiat_p224_addcarryx_u32(&x172, &x173, 0x0, x130, x157);
fiat_p224_addcarryx_u32(&x174, &x175, x173, x132, x159);
fiat_p224_addcarryx_u32(&x176, &x177, x175, x134, x161);
fiat_p224_addcarryx_u32(&x178, &x179, x177, x136, x163);
fiat_p224_addcarryx_u32(&x180, &x181, x179, x138, x165);
fiat_p224_addcarryx_u32(&x182, &x183, x181, x140, x167);
fiat_p224_addcarryx_u32(&x184, &x185, x183, x142, x169);
fiat_p224_addcarryx_u32(&x186, &x187, x185, x144, x171);
fiat_p224_mulx_u32(&x188, &x189, x172, UINT32_C(0xffffffff));
fiat_p224_mulx_u32(&x190, &x191, x188, UINT32_C(0xffffffff));
fiat_p224_mulx_u32(&x192, &x193, x188, UINT32_C(0xffffffff));
fiat_p224_mulx_u32(&x194, &x195, x188, UINT32_C(0xffffffff));
fiat_p224_mulx_u32(&x196, &x197, x188, UINT32_C(0xffffffff));
fiat_p224_addcarryx_u32(&x198, &x199, 0x0, x197, x194);
fiat_p224_addcarryx_u32(&x200, &x201, x199, x195, x192);
fiat_p224_addcarryx_u32(&x202, &x203, x201, x193, x190);
x204 = (x203 + x191);
fiat_p224_addcarryx_u32(&x205, &x206, 0x0, x172, x188);
fiat_p224_addcarryx_u32(&x207, &x208, x206, x174, 0x0);
fiat_p224_addcarryx_u32(&x209, &x210, x208, x176, 0x0);
fiat_p224_addcarryx_u32(&x211, &x212, x210, x178, x196);
fiat_p224_addcarryx_u32(&x213, &x214, x212, x180, x198);
fiat_p224_addcarryx_u32(&x215, &x216, x214, x182, x200);
fiat_p224_addcarryx_u32(&x217, &x218, x216, x184, x202);
fiat_p224_addcarryx_u32(&x219, &x220, x218, x186, x204);
x221 = ((uint32_t)x220 + x187);
fiat_p224_mulx_u32(&x222, &x223, x3, (arg2[6]));
fiat_p224_mulx_u32(&x224, &x225, x3, (arg2[5]));
fiat_p224_mulx_u32(&x226, &x227, x3, (arg2[4]));
fiat_p224_mulx_u32(&x228, &x229, x3, (arg2[3]));
fiat_p224_mulx_u32(&x230, &x231, x3, (arg2[2]));
fiat_p224_mulx_u32(&x232, &x233, x3, (arg2[1]));
fiat_p224_mulx_u32(&x234, &x235, x3, (arg2[0]));
fiat_p224_addcarryx_u32(&x236, &x237, 0x0, x235, x232);
fiat_p224_addcarryx_u32(&x238, &x239, x237, x233, x230);
fiat_p224_addcarryx_u32(&x240, &x241, x239, x231, x228);
fiat_p224_addcarryx_u32(&x242, &x243, x241, x229, x226);
fiat_p224_addcarryx_u32(&x244, &x245, x243, x227, x224);
fiat_p224_addcarryx_u32(&x246, &x247, x245, x225, x222);
x248 = (x247 + x223);
fiat_p224_addcarryx_u32(&x249, &x250, 0x0, x207, x234);
fiat_p224_addcarryx_u32(&x251, &x252, x250, x209, x236);
fiat_p224_addcarryx_u32(&x253, &x254, x252, x211, x238);
fiat_p224_addcarryx_u32(&x255, &x256, x254, x213, x240);
fiat_p224_addcarryx_u32(&x257, &x258, x256, x215, x242);
fiat_p224_addcarryx_u32(&x259, &x260, x258, x217, x244);
fiat_p224_addcarryx_u32(&x261, &x262, x260, x219, x246);
fiat_p224_addcarryx_u32(&x263, &x264, x262, x221, x248);
fiat_p224_mulx_u32(&x265, &x266, x249, UINT32_C(0xffffffff));
fiat_p224_mulx_u32(&x267, &x268, x265, UINT32_C(0xffffffff));
fiat_p224_mulx_u32(&x269, &x270, x265, UINT32_C(0xffffffff));
fiat_p224_mulx_u32(&x271, &x272, x265, UINT32_C(0xffffffff));
fiat_p224_mulx_u32(&x273, &x274, x265, UINT32_C(0xffffffff));
fiat_p224_addcarryx_u32(&x275, &x276, 0x0, x274, x271);
fiat_p224_addcarryx_u32(&x277, &x278, x276, x272, x269);
fiat_p224_addcarryx_u32(&x279, &x280, x278, x270, x267);
x281 = (x280 + x268);
fiat_p224_addcarryx_u32(&x282, &x283, 0x0, x249, x265);
fiat_p224_addcarryx_u32(&x284, &x285, x283, x251, 0x0);
fiat_p224_addcarryx_u32(&x286, &x287, x285, x253, 0x0);
fiat_p224_addcarryx_u32(&x288, &x289, x287, x255, x273);
fiat_p224_addcarryx_u32(&x290, &x291, x289, x257, x275);
fiat_p224_addcarryx_u32(&x292, &x293, x291, x259, x277);
fiat_p224_addcarryx_u32(&x294, &x295, x293, x261, x279);
fiat_p224_addcarryx_u32(&x296, &x297, x295, x263, x281);
x298 = ((uint32_t)x297 + x264);
fiat_p224_mulx_u32(&x299, &x300, x4, (arg2[6]));
fiat_p224_mulx_u32(&x301, &x302, x4, (arg2[5]));
fiat_p224_mulx_u32(&x303, &x304, x4, (arg2[4]));
fiat_p224_mulx_u32(&x305, &x306, x4, (arg2[3]));
fiat_p224_mulx_u32(&x307, &x308, x4, (arg2[2]));
fiat_p224_mulx_u32(&x309, &x310, x4, (arg2[1]));
fiat_p224_mulx_u32(&x311, &x312, x4, (arg2[0]));
fiat_p224_addcarryx_u32(&x313, &x314, 0x0, x312, x309);
fiat_p224_addcarryx_u32(&x315, &x316, x314, x310, x307);
fiat_p224_addcarryx_u32(&x317, &x318, x316, x308, x305);
fiat_p224_addcarryx_u32(&x319, &x320, x318, x306, x303);
fiat_p224_addcarryx_u32(&x321, &x322, x320, x304, x301);
fiat_p224_addcarryx_u32(&x323, &x324, x322, x302, x299);
x325 = (x324 + x300);
fiat_p224_addcarryx_u32(&x326, &x327, 0x0, x284, x311);
fiat_p224_addcarryx_u32(&x328, &x329, x327, x286, x313);
fiat_p224_addcarryx_u32(&x330, &x331, x329, x288, x315);
fiat_p224_addcarryx_u32(&x332, &x333, x331, x290, x317);
fiat_p224_addcarryx_u32(&x334, &x335, x333, x292, x319);
fiat_p224_addcarryx_u32(&x336, &x337, x335, x294, x321);
fiat_p224_addcarryx_u32(&x338, &x339, x337, x296, x323);
fiat_p224_addcarryx_u32(&x340, &x341, x339, x298, x325);
fiat_p224_mulx_u32(&x342, &x343, x326, UINT32_C(0xffffffff));
fiat_p224_mulx_u32(&x344, &x345, x342, UINT32_C(0xffffffff));
fiat_p224_mulx_u32(&x346, &x347, x342, UINT32_C(0xffffffff));
fiat_p224_mulx_u32(&x348, &x349, x342, UINT32_C(0xffffffff));
fiat_p224_mulx_u32(&x350, &x351, x342, UINT32_C(0xffffffff));
fiat_p224_addcarryx_u32(&x352, &x353, 0x0, x351, x348);
fiat_p224_addcarryx_u32(&x354, &x355, x353, x349, x346);
fiat_p224_addcarryx_u32(&x356, &x357, x355, x347, x344);
x358 = (x357 + x345);
fiat_p224_addcarryx_u32(&x359, &x360, 0x0, x326, x342);
fiat_p224_addcarryx_u32(&x361, &x362, x360, x328, 0x0);
fiat_p224_addcarryx_u32(&x363, &x364, x362, x330, 0x0);
fiat_p224_addcarryx_u32(&x365, &x366, x364, x332, x350);
fiat_p224_addcarryx_u32(&x367, &x368, x366, x334, x352);
fiat_p224_addcarryx_u32(&x369, &x370, x368, x336, x354);
fiat_p224_addcarryx_u32(&x371, &x372, x370, x338, x356);
fiat_p224_addcarryx_u32(&x373, &x374, x372, x340, x358);
x375 = ((uint32_t)x374 + x341);
fiat_p224_mulx_u32(&x376, &x377, x5, (arg2[6]));
fiat_p224_mulx_u32(&x378, &x379, x5, (arg2[5]));
fiat_p224_mulx_u32(&x380, &x381, x5, (arg2[4]));
fiat_p224_mulx_u32(&x382, &x383, x5, (arg2[3]));
fiat_p224_mulx_u32(&x384, &x385, x5, (arg2[2]));
fiat_p224_mulx_u32(&x386, &x387, x5, (arg2[1]));
fiat_p224_mulx_u32(&x388, &x389, x5, (arg2[0]));
fiat_p224_addcarryx_u32(&x390, &x391, 0x0, x389, x386);
fiat_p224_addcarryx_u32(&x392, &x393, x391, x387, x384);
fiat_p224_addcarryx_u32(&x394, &x395, x393, x385, x382);
fiat_p224_addcarryx_u32(&x396, &x397, x395, x383, x380);
fiat_p224_addcarryx_u32(&x398, &x399, x397, x381, x378);
fiat_p224_addcarryx_u32(&x400, &x401, x399, x379, x376);
x402 = (x401 + x377);
fiat_p224_addcarryx_u32(&x403, &x404, 0x0, x361, x388);
fiat_p224_addcarryx_u32(&x405, &x406, x404, x363, x390);
fiat_p224_addcarryx_u32(&x407, &x408, x406, x365, x392);
fiat_p224_addcarryx_u32(&x409, &x410, x408, x367, x394);
fiat_p224_addcarryx_u32(&x411, &x412, x410, x369, x396);
fiat_p224_addcarryx_u32(&x413, &x414, x412, x371, x398);
fiat_p224_addcarryx_u32(&x415, &x416, x414, x373, x400);
fiat_p224_addcarryx_u32(&x417, &x418, x416, x375, x402);
fiat_p224_mulx_u32(&x419, &x420, x403, UINT32_C(0xffffffff));
fiat_p224_mulx_u32(&x421, &x422, x419, UINT32_C(0xffffffff));
fiat_p224_mulx_u32(&x423, &x424, x419, UINT32_C(0xffffffff));
fiat_p224_mulx_u32(&x425, &x426, x419, UINT32_C(0xffffffff));
fiat_p224_mulx_u32(&x427, &x428, x419, UINT32_C(0xffffffff));
fiat_p224_addcarryx_u32(&x429, &x430, 0x0, x428, x425);
fiat_p224_addcarryx_u32(&x431, &x432, x430, x426, x423);
fiat_p224_addcarryx_u32(&x433, &x434, x432, x424, x421);
x435 = (x434 + x422);
fiat_p224_addcarryx_u32(&x436, &x437, 0x0, x403, x419);
fiat_p224_addcarryx_u32(&x438, &x439, x437, x405, 0x0);
fiat_p224_addcarryx_u32(&x440, &x441, x439, x407, 0x0);
fiat_p224_addcarryx_u32(&x442, &x443, x441, x409, x427);
fiat_p224_addcarryx_u32(&x444, &x445, x443, x411, x429);
fiat_p224_addcarryx_u32(&x446, &x447, x445, x413, x431);
fiat_p224_addcarryx_u32(&x448, &x449, x447, x415, x433);
fiat_p224_addcarryx_u32(&x450, &x451, x449, x417, x435);
x452 = ((uint32_t)x451 + x418);
fiat_p224_mulx_u32(&x453, &x454, x6, (arg2[6]));
fiat_p224_mulx_u32(&x455, &x456, x6, (arg2[5]));
fiat_p224_mulx_u32(&x457, &x458, x6, (arg2[4]));
fiat_p224_mulx_u32(&x459, &x460, x6, (arg2[3]));
fiat_p224_mulx_u32(&x461, &x462, x6, (arg2[2]));
fiat_p224_mulx_u32(&x463, &x464, x6, (arg2[1]));
fiat_p224_mulx_u32(&x465, &x466, x6, (arg2[0]));
fiat_p224_addcarryx_u32(&x467, &x468, 0x0, x466, x463);
fiat_p224_addcarryx_u32(&x469, &x470, x468, x464, x461);
fiat_p224_addcarryx_u32(&x471, &x472, x470, x462, x459);
fiat_p224_addcarryx_u32(&x473, &x474, x472, x460, x457);
fiat_p224_addcarryx_u32(&x475, &x476, x474, x458, x455);
fiat_p224_addcarryx_u32(&x477, &x478, x476, x456, x453);
x479 = (x478 + x454);
fiat_p224_addcarryx_u32(&x480, &x481, 0x0, x438, x465);
fiat_p224_addcarryx_u32(&x482, &x483, x481, x440, x467);
fiat_p224_addcarryx_u32(&x484, &x485, x483, x442, x469);
fiat_p224_addcarryx_u32(&x486, &x487, x485, x444, x471);
fiat_p224_addcarryx_u32(&x488, &x489, x487, x446, x473);
fiat_p224_addcarryx_u32(&x490, &x491, x489, x448, x475);
fiat_p224_addcarryx_u32(&x492, &x493, x491, x450, x477);
fiat_p224_addcarryx_u32(&x494, &x495, x493, x452, x479);
fiat_p224_mulx_u32(&x496, &x497, x480, UINT32_C(0xffffffff));
fiat_p224_mulx_u32(&x498, &x499, x496, UINT32_C(0xffffffff));
fiat_p224_mulx_u32(&x500, &x501, x496, UINT32_C(0xffffffff));
fiat_p224_mulx_u32(&x502, &x503, x496, UINT32_C(0xffffffff));
fiat_p224_mulx_u32(&x504, &x505, x496, UINT32_C(0xffffffff));
fiat_p224_addcarryx_u32(&x506, &x507, 0x0, x505, x502);
fiat_p224_addcarryx_u32(&x508, &x509, x507, x503, x500);
fiat_p224_addcarryx_u32(&x510, &x511, x509, x501, x498);
x512 = (x511 + x499);
fiat_p224_addcarryx_u32(&x513, &x514, 0x0, x480, x496);
fiat_p224_addcarryx_u32(&x515, &x516, x514, x482, 0x0);
fiat_p224_addcarryx_u32(&x517, &x518, x516, x484, 0x0);
fiat_p224_addcarryx_u32(&x519, &x520, x518, x486, x504);
fiat_p224_addcarryx_u32(&x521, &x522, x520, x488, x506);
fiat_p224_addcarryx_u32(&x523, &x524, x522, x490, x508);
fiat_p224_addcarryx_u32(&x525, &x526, x524, x492, x510);
fiat_p224_addcarryx_u32(&x527, &x528, x526, x494, x512);
x529 = ((uint32_t)x528 + x495);
fiat_p224_subborrowx_u32(&x530, &x531, 0x0, x515, 0x1);
fiat_p224_subborrowx_u32(&x532, &x533, x531, x517, 0x0);
fiat_p224_subborrowx_u32(&x534, &x535, x533, x519, 0x0);
fiat_p224_subborrowx_u32(&x536, &x537, x535, x521, UINT32_C(0xffffffff));
fiat_p224_subborrowx_u32(&x538, &x539, x537, x523, UINT32_C(0xffffffff));
fiat_p224_subborrowx_u32(&x540, &x541, x539, x525, UINT32_C(0xffffffff));
fiat_p224_subborrowx_u32(&x542, &x543, x541, x527, UINT32_C(0xffffffff));
fiat_p224_subborrowx_u32(&x544, &x545, x543, x529, 0x0);