cairo-program-runner-lib 1.2.2

Library for running Cairo programs on the Cairo VM with hint support
Documentation
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
{
    "attributes": [],
    "builtins": [
        "output",
        "poseidon"
    ],
    "compiler_version": "0.14.0",
    "data": [
        "0x40780017fff7fff",
        "0x2",
        "0x1104800180018000",
        "0x27",
        "0x10780017fff7fff",
        "0x0",
        "0x40780017fff7fff",
        "0x1",
        "0x208b7fff7fff7ffe",
        "0x20780017fff7ffd",
        "0x3",
        "0x208b7fff7fff7ffe",
        "0x480a7ffb7fff8000",
        "0x480a7ffc7fff8000",
        "0x480080007fff8000",
        "0x400080007ffd7fff",
        "0x482480017ffd8001",
        "0x1",
        "0x482480017ffd8001",
        "0x1",
        "0xa0680017fff7ffe",
        "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffffb",
        "0x402a7ffc7ffd7fff",
        "0x208b7fff7fff7ffe",
        "0x400380007ffc7ffd",
        "0x482680017ffc8000",
        "0x1",
        "0x208b7fff7fff7ffe",
        "0x20780017fff7ffd",
        "0x3",
        "0x208b7fff7fff7ffe",
        "0x482680017ffd8000",
        "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffffd",
        "0x1104800180018000",
        "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffffc",
        "0x208b7fff7fff7ffe",
        "0x40780017fff7fff",
        "0x1",
        "0x1104800180018000",
        "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffff7",
        "0x208b7fff7fff7ffe",
        "0x40780017fff7fff",
        "0x3",
        "0x1104800180018000",
        "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffdc",
        "0x480a80027fff8000",
        "0x480a80017fff8000",
        "0x480a80007fff8000",
        "0x48127ffc7fff8000",
        "0x1104800180018000",
        "0x800000000000010fffffffffffffffffffffffffffffffffffffffffffffff4",
        "0x400380007ffc8002",
        "0x482680017ffc8000",
        "0x1",
        "0x480a80007fff8000",
        "0x480a80017fff8000",
        "0x1104800180018000",
        "0x800000000000010ffffffffffffffffffffffffffffffffffffffffffffffd2",
        "0x482680017ffc8000",
        "0x1",
        "0x482880017fff8000",
        "0x480a7ffd7fff8000",
        "0x208b7fff7fff7ffe"
    ],
    "debug_info": {
        "file_contents": {
            "/var/lib/engflow/worker/exec/src/starkware/cairo/common/alloc.cairo": "// Allocates a new memory segment.\nfunc alloc() -> (ptr: felt*) {\n    %{ memory[ap] = segments.add() %}\n    ap += 1;\n    return (ptr=cast([ap - 1], felt*));\n}\n",
            "/var/lib/engflow/worker/exec/src/starkware/cairo/common/bitwise.cairo": "from starkware.cairo.common.cairo_builtins import BitwiseBuiltin\n\nconst ALL_ONES = 2 ** 251 - 1;\n\n// Computes the bitwise operations and, xor and or.\n//\n// Arguments:\n//   bitwise_ptr - the bitwise builtin pointer.\n//   x, y - the two field elements to operate on, in this order. Both inputs should be 251-bit\n//     integers, and are taken as unsigned ints.\n//\n// Returns:\n//   x_and_y = x & y (bitwise and).\n//   x_xor_y = x ^ y (bitwise xor).\n//   x_or_y = x | y (bitwise or).\nfunc bitwise_operations{bitwise_ptr: BitwiseBuiltin*}(x: felt, y: felt) -> (\n    x_and_y: felt, x_xor_y: felt, x_or_y: felt\n) {\n    bitwise_ptr.x = x;\n    bitwise_ptr.y = y;\n    let x_and_y = bitwise_ptr.x_and_y;\n    let x_xor_y = bitwise_ptr.x_xor_y;\n    let x_or_y = bitwise_ptr.x_or_y;\n    let bitwise_ptr = bitwise_ptr + BitwiseBuiltin.SIZE;\n    return (x_and_y=x_and_y, x_xor_y=x_xor_y, x_or_y=x_or_y);\n}\n\n// Computes the bitwise and of two inputs.\n//\n// Arguments:\n//   bitwise_ptr - the bitwise builtin pointer.\n//   x, y - the two field elements to operate on, in this order. Both inputs should be 251-bit\n//     integers, and are taken as unsigned ints.\n//\n// Returns:\n//   x_and_y = x & y (bitwise and).\nfunc bitwise_and{bitwise_ptr: BitwiseBuiltin*}(x: felt, y: felt) -> (x_and_y: felt) {\n    bitwise_ptr.x = x;\n    bitwise_ptr.y = y;\n    let x_and_y = bitwise_ptr.x_and_y;\n    let x_xor_y = bitwise_ptr.x_xor_y;\n    let x_or_y = bitwise_ptr.x_or_y;\n    let bitwise_ptr = bitwise_ptr + BitwiseBuiltin.SIZE;\n    return (x_and_y=x_and_y);\n}\n\n// Computes the bitwise xor of two inputs.\n//\n// Arguments:\n//   bitwise_ptr - the bitwise builtin pointer.\n//   x, y - the two field elements to operate on, in this order. Both inputs should be 251-bit\n//     integers, and are taken as unsigned ints.\n//\n// Returns:\n//   x_xor_y = x ^ y (bitwise xor).\nfunc bitwise_xor{bitwise_ptr: BitwiseBuiltin*}(x: felt, y: felt) -> (x_xor_y: felt) {\n    bitwise_ptr.x = x;\n    bitwise_ptr.y = y;\n    let x_and_y = bitwise_ptr.x_and_y;\n    let x_xor_y = bitwise_ptr.x_xor_y;\n    let x_or_y = bitwise_ptr.x_or_y;\n    let bitwise_ptr = bitwise_ptr + BitwiseBuiltin.SIZE;\n    return (x_xor_y=x_xor_y);\n}\n\n// Computes the bitwise or of two inputs.\n//\n// Arguments:\n//   bitwise_ptr - the bitwise builtin pointer.\n//   x, y - the two field elements to operate on, in this order. Both inputs should be 251-bit\n//     integers, and are taken as unsigned ints.\n//\n// Returns:\n//   x_or_y = x | y (bitwise or).\nfunc bitwise_or{bitwise_ptr: BitwiseBuiltin*}(x: felt, y: felt) -> (x_or_y: felt) {\n    bitwise_ptr.x = x;\n    bitwise_ptr.y = y;\n    let x_and_y = bitwise_ptr.x_and_y;\n    let x_xor_y = bitwise_ptr.x_xor_y;\n    let x_or_y = bitwise_ptr.x_or_y;\n    let bitwise_ptr = bitwise_ptr + BitwiseBuiltin.SIZE;\n    return (x_or_y=x_or_y);\n}\n\n// Computes the bitwise not of a single 251-bit integer.\n//\n// Argument:\n//   x - the field element to operate on. The input should be a 251-bit\n//     integer, and is taken as unsigned int.\n//\n// Returns:\n//   not_x = ~x (bitwise not).\nfunc bitwise_not(x: felt) -> (not_x: felt) {\n    return (not_x=ALL_ONES - x);\n}\n",
            "/var/lib/engflow/worker/exec/src/starkware/cairo/common/bool.cairo": "// Represents boolean values in Cairo.\nconst FALSE = 0;\nconst TRUE = 1;\n",
            "/var/lib/engflow/worker/exec/src/starkware/cairo/common/builtin_poseidon/poseidon.cairo": "from starkware.cairo.common.cairo_builtins import PoseidonBuiltin\nfrom starkware.cairo.common.poseidon_state import PoseidonBuiltinState\n\n// Hashes two elements and retrieves a single field element output.\nfunc poseidon_hash{poseidon_ptr: PoseidonBuiltin*}(x: felt, y: felt) -> (res: felt) {\n    // To distinguish between the use cases the capacity element is initialized to 2.\n    assert poseidon_ptr.input = PoseidonBuiltinState(s0=x, s1=y, s2=2);\n\n    let res = poseidon_ptr.output.s0;\n    let poseidon_ptr = poseidon_ptr + PoseidonBuiltin.SIZE;\n\n    return (res=res);\n}\n\n// Hashes one element and retrieves a single field element output.\nfunc poseidon_hash_single{poseidon_ptr: PoseidonBuiltin*}(x: felt) -> (res: felt) {\n    // Pad the rate with a zero.\n    // To distinguish between the use cases the capacity element is initialized to 1.\n    assert poseidon_ptr.input = PoseidonBuiltinState(s0=x, s1=0, s2=1);\n\n    let res = poseidon_ptr.output.s0;\n    let poseidon_ptr = poseidon_ptr + PoseidonBuiltin.SIZE;\n\n    return (res=res);\n}\n\n// Hashes n elements and retrieves a single field element output.\nfunc poseidon_hash_many{poseidon_ptr: PoseidonBuiltin*}(n: felt, elements: felt*) -> (res: felt) {\n    let elements_end = &elements[n];\n    // Apply the sponge construction to digest many elements.\n    // To distinguish between the use cases the capacity element is initialized to 0.\n    // To distinguish between different input sizes always pad with 1 and possibly with another 0 to\n    // complete to an even sized input.\n    tempvar state = PoseidonBuiltinState(s0=0, s1=0, s2=0);\n    tempvar elements = elements;\n    tempvar poseidon_ptr = poseidon_ptr;\n\n    loop:\n    if (nondet %{ ids.elements_end - ids.elements >= 10 %} != 0) {\n        assert poseidon_ptr.input = PoseidonBuiltinState(\n            s0=state.s0 + elements[0], s1=state.s1 + elements[1], s2=state.s2\n        );\n        let state = poseidon_ptr.output;\n        let poseidon_ptr = poseidon_ptr + PoseidonBuiltin.SIZE;\n\n        assert poseidon_ptr.input = PoseidonBuiltinState(\n            s0=state.s0 + elements[2], s1=state.s1 + elements[3], s2=state.s2\n        );\n        let state = poseidon_ptr.output;\n        let poseidon_ptr = poseidon_ptr + PoseidonBuiltin.SIZE;\n\n        assert poseidon_ptr.input = PoseidonBuiltinState(\n            s0=state.s0 + elements[4], s1=state.s1 + elements[5], s2=state.s2\n        );\n        let state = poseidon_ptr.output;\n        let poseidon_ptr = poseidon_ptr + PoseidonBuiltin.SIZE;\n\n        assert poseidon_ptr.input = PoseidonBuiltinState(\n            s0=state.s0 + elements[6], s1=state.s1 + elements[7], s2=state.s2\n        );\n        let state = poseidon_ptr.output;\n        let poseidon_ptr = poseidon_ptr + PoseidonBuiltin.SIZE;\n\n        assert poseidon_ptr.input = PoseidonBuiltinState(\n            s0=state.s0 + elements[8], s1=state.s1 + elements[9], s2=state.s2\n        );\n        let state = poseidon_ptr.output;\n        let poseidon_ptr = poseidon_ptr + PoseidonBuiltin.SIZE;\n\n        tempvar state = state;\n        tempvar elements = &elements[10];\n        tempvar poseidon_ptr = poseidon_ptr;\n        jmp loop;\n    }\n\n    if (nondet %{ ids.elements_end - ids.elements >= 2 %} != 0) {\n        assert poseidon_ptr.input = PoseidonBuiltinState(\n            s0=state.s0 + elements[0], s1=state.s1 + elements[1], s2=state.s2\n        );\n        let state = poseidon_ptr.output;\n        let poseidon_ptr = poseidon_ptr + PoseidonBuiltin.SIZE;\n\n        tempvar state = state;\n        tempvar elements = &elements[2];\n        tempvar poseidon_ptr = poseidon_ptr;\n        jmp loop;\n    }\n\n    tempvar n = elements_end - elements;\n\n    if (n == 0) {\n        // Pad input with [1, 0].\n        assert poseidon_ptr.input = PoseidonBuiltinState(s0=state.s0 + 1, s1=state.s1, s2=state.s2);\n        let res = poseidon_ptr.output.s0;\n        let poseidon_ptr = poseidon_ptr + PoseidonBuiltin.SIZE;\n        return (res=res);\n    }\n\n    assert n = 1;\n    // Pad input with [1].\n    assert poseidon_ptr.input = PoseidonBuiltinState(\n        s0=state.s0 + elements[0], s1=state.s1 + 1, s2=state.s2\n    );\n    let res = poseidon_ptr.output.s0;\n    let poseidon_ptr = poseidon_ptr + PoseidonBuiltin.SIZE;\n    return (res=res);\n}\n",
            "/var/lib/engflow/worker/exec/src/starkware/cairo/common/cairo_blake2s/blake2s.cairo": "// This module provides a set of functions to compute the blake2s hash function.\n//\n// This module is similar to the keccak.cairo module. See more info there.\n\nfrom starkware.cairo.common.alloc import alloc\nfrom starkware.cairo.common.cairo_blake2s.packed_blake2s import N_PACKED_INSTANCES, blake2s_compress\nfrom starkware.cairo.common.cairo_builtins import BitwiseBuiltin\nfrom starkware.cairo.common.math import assert_nn_le, split_felt, unsigned_div_rem\nfrom starkware.cairo.common.math_cmp import is_le\nfrom starkware.cairo.common.memcpy import memcpy\nfrom starkware.cairo.common.memset import memset\nfrom starkware.cairo.common.pow import pow\nfrom starkware.cairo.common.registers import get_fp_and_pc, get_label_location\nfrom starkware.cairo.common.uint256 import Uint256\n\nconst INPUT_BLOCK_FELTS = 16;\nconst INPUT_BLOCK_BYTES = 64;\nconst STATE_SIZE_FELTS = 8;\n// Each instance consists of 8 words for the input state, 16 words of message,\n// 2 words for t0 and f0, and 8 words for the output state.\nconst INSTANCE_SIZE = STATE_SIZE_FELTS + INPUT_BLOCK_FELTS + 2 + STATE_SIZE_FELTS;\n\n// Computes blake2s of 'input'.\n// To use this function, split the input into words of 32 bits (little endian).\n// For example, to compute blake2s('Hello world'), use:\n//   input = [1819043144, 1870078063, 6581362]\n// where:\n//   1819043144 == int.from_bytes(b'Hell', 'little')\n//   1870078063 == int.from_bytes(b'o wo', 'little')\n//   6581362 == int.from_bytes(b'rld', 'little')\n//\n// Returns the hash as a Uint256.\n//\n// Note: You must call finalize_blake2s() at the end of the program. Otherwise, this function\n// is not sound and a malicious prover may return a wrong result.\n// Note: the interface of this function may change in the future.\n// Note: Each input word is verified to be in the range [0, 2 ** 32) by this function.\nfunc blake2s{range_check_ptr, blake2s_ptr: felt*}(data: felt*, n_bytes: felt) -> (res: Uint256) {\n    let (output) = blake2s_as_words(data=data, n_bytes=n_bytes);\n    let res_low = output[3] * 2 ** 96 + output[2] * 2 ** 64 + output[1] * 2 ** 32 + output[0];\n    let res_high = output[7] * 2 ** 96 + output[6] * 2 ** 64 + output[5] * 2 ** 32 + output[4];\n    return (res=Uint256(low=res_low, high=res_high));\n}\n\n// Computes blake2s of 'input', and returns the hash in big endian representation.\n// See blake2s().\n// Note that the input is still treated as little endian.\nfunc blake2s_bigend{bitwise_ptr: BitwiseBuiltin*, range_check_ptr, blake2s_ptr: felt*}(\n    data: felt*, n_bytes: felt\n) -> (res: Uint256) {\n    let (num) = blake2s(data=data, n_bytes=n_bytes);\n\n    // Reverse byte endianness of 128-bit words.\n    tempvar value = num.high;\n    assert bitwise_ptr[0].x = value;\n    assert bitwise_ptr[0].y = 0x00ff00ff00ff00ff00ff00ff00ff00ff;\n    tempvar value = value + (2 ** 16 - 1) * bitwise_ptr[0].x_and_y;\n    assert bitwise_ptr[1].x = value;\n    assert bitwise_ptr[1].y = 0x00ffff0000ffff0000ffff0000ffff00;\n    tempvar value = value + (2 ** 32 - 1) * bitwise_ptr[1].x_and_y;\n    assert bitwise_ptr[2].x = value;\n    assert bitwise_ptr[2].y = 0x00ffffffff00000000ffffffff000000;\n    tempvar value = value + (2 ** 64 - 1) * bitwise_ptr[2].x_and_y;\n    assert bitwise_ptr[3].x = value;\n    assert bitwise_ptr[3].y = 0x00ffffffffffffffff00000000000000;\n    tempvar value = value + (2 ** 128 - 1) * bitwise_ptr[3].x_and_y;\n    tempvar high = value / 2 ** (8 + 16 + 32 + 64);\n    let bitwise_ptr = bitwise_ptr + 4 * BitwiseBuiltin.SIZE;\n\n    tempvar value = num.low;\n    assert bitwise_ptr[0].x = value;\n    assert bitwise_ptr[0].y = 0x00ff00ff00ff00ff00ff00ff00ff00ff;\n    tempvar value = value + (2 ** 16 - 1) * bitwise_ptr[0].x_and_y;\n    assert bitwise_ptr[1].x = value;\n    assert bitwise_ptr[1].y = 0x00ffff0000ffff0000ffff0000ffff00;\n    tempvar value = value + (2 ** 32 - 1) * bitwise_ptr[1].x_and_y;\n    assert bitwise_ptr[2].x = value;\n    assert bitwise_ptr[2].y = 0x00ffffffff00000000ffffffff000000;\n    tempvar value = value + (2 ** 64 - 1) * bitwise_ptr[2].x_and_y;\n    assert bitwise_ptr[3].x = value;\n    assert bitwise_ptr[3].y = 0x00ffffffffffffffff00000000000000;\n    tempvar value = value + (2 ** 128 - 1) * bitwise_ptr[3].x_and_y;\n    tempvar low = value / 2 ** (8 + 16 + 32 + 64);\n    let bitwise_ptr = bitwise_ptr + 4 * BitwiseBuiltin.SIZE;\n\n    return (res=Uint256(low=high, high=low));\n}\n\n// Same as blake2s, but outputs a pointer to 8 32-bit little endian words instead.\nfunc blake2s_as_words{range_check_ptr, blake2s_ptr: felt*}(data: felt*, n_bytes: felt) -> (\n    output: felt*\n) {\n    // Set the initial state to IV (IV[0] is modified).\n    assert blake2s_ptr[0] = 0x6B08E647;  // IV[0] ^ 0x01010020 (config: no key, 32 bytes output).\n    assert blake2s_ptr[1] = 0xBB67AE85;\n    assert blake2s_ptr[2] = 0x3C6EF372;\n    assert blake2s_ptr[3] = 0xA54FF53A;\n    assert blake2s_ptr[4] = 0x510E527F;\n    assert blake2s_ptr[5] = 0x9B05688C;\n    assert blake2s_ptr[6] = 0x1F83D9AB;\n    assert blake2s_ptr[7] = 0x5BE0CD19;\n    static_assert STATE_SIZE_FELTS == 8;\n    let blake2s_ptr = blake2s_ptr + STATE_SIZE_FELTS;\n\n    let (output) = blake2s_inner(data=data, n_bytes=n_bytes, counter=0);\n    return (output=output);\n}\n\n// Inner loop for blake2s. blake2s_ptr points to the middle of an instance: after the initial state,\n// before the message.\nfunc blake2s_inner{range_check_ptr, blake2s_ptr: felt*}(\n    data: felt*, n_bytes: felt, counter: felt\n) -> (output: felt*) {\n    alloc_locals;\n    let is_last_block = is_le(n_bytes, INPUT_BLOCK_BYTES);\n    if (is_last_block != 0) {\n        return blake2s_last_block(data=data, n_bytes=n_bytes, counter=counter);\n    }\n\n    memcpy(blake2s_ptr, data, INPUT_BLOCK_FELTS);\n    let blake2s_ptr = blake2s_ptr + INPUT_BLOCK_FELTS;\n\n    assert blake2s_ptr[0] = counter + INPUT_BLOCK_BYTES;  // n_bytes.\n    assert blake2s_ptr[1] = 0;  // Is last byte = False.\n    let blake2s_ptr = blake2s_ptr + 2;\n\n    // Write output.\n    let output = blake2s_ptr;\n    %{\n        from starkware.cairo.common.cairo_blake2s.blake2s_utils import compute_blake2s_func\n        compute_blake2s_func(segments=segments, output_ptr=ids.output)\n    %}\n    let blake2s_ptr = blake2s_ptr + STATE_SIZE_FELTS;\n\n    // Write the current output to the input state for the next instance.\n    memcpy(blake2s_ptr, output, STATE_SIZE_FELTS);\n    let blake2s_ptr = blake2s_ptr + STATE_SIZE_FELTS;\n    return blake2s_inner(\n        data=data + INPUT_BLOCK_FELTS,\n        n_bytes=n_bytes - INPUT_BLOCK_BYTES,\n        counter=counter + INPUT_BLOCK_BYTES,\n    );\n}\n\nfunc blake2s_last_block{range_check_ptr, blake2s_ptr: felt*}(\n    data: felt*, n_bytes: felt, counter: felt\n) -> (output: felt*) {\n    alloc_locals;\n    let (n_felts, _) = unsigned_div_rem(n_bytes + 3, 4);\n    memcpy(blake2s_ptr, data, n_felts);\n    memset(blake2s_ptr + n_felts, 0, INPUT_BLOCK_FELTS - n_felts);\n    let blake2s_ptr = blake2s_ptr + INPUT_BLOCK_FELTS;\n\n    assert blake2s_ptr[0] = counter + n_bytes;  // n_bytes.\n    assert blake2s_ptr[1] = 0xffffffff;  // Is last byte = True.\n    let blake2s_ptr = blake2s_ptr + 2;\n\n    // Write output.\n    let output = blake2s_ptr;\n    %{\n        from starkware.cairo.common.cairo_blake2s.blake2s_utils import compute_blake2s_func\n        compute_blake2s_func(segments=segments, output_ptr=ids.output)\n    %}\n    let blake2s_ptr = blake2s_ptr + STATE_SIZE_FELTS;\n\n    return (output=output);\n}\n\n// Verifies that the results of blake2s() are valid.\nfunc finalize_blake2s{range_check_ptr, bitwise_ptr: BitwiseBuiltin*}(\n    blake2s_ptr_start: felt*, blake2s_ptr_end: felt*\n) {\n    alloc_locals;\n\n    let (__fp__, _) = get_fp_and_pc();\n\n    let (sigma) = _get_sigma();\n\n    tempvar n = (blake2s_ptr_end - blake2s_ptr_start) / INSTANCE_SIZE;\n    if (n == 0) {\n        return ();\n    }\n\n    %{\n        # Add dummy pairs of input and output.\n        from starkware.cairo.common.cairo_blake2s.blake2s_utils import IV, blake2s_compress\n\n        _n_packed_instances = int(ids.N_PACKED_INSTANCES)\n        assert 0 <= _n_packed_instances < 20\n        _blake2s_input_chunk_size_felts = int(ids.INPUT_BLOCK_FELTS)\n        assert 0 <= _blake2s_input_chunk_size_felts < 100\n\n        message = [0] * _blake2s_input_chunk_size_felts\n        modified_iv = [IV[0] ^ 0x01010020] + IV[1:]\n        output = blake2s_compress(\n            message=message,\n            h=modified_iv,\n            t0=0,\n            t1=0,\n            f0=0xffffffff,\n            f1=0,\n        )\n        padding = (modified_iv + message + [0, 0xffffffff] + output) * (_n_packed_instances - 1)\n        segments.write_arg(ids.blake2s_ptr_end, padding)\n    %}\n\n    // Compute the amount of chunks (rounded up).\n    let (local n_chunks, _) = unsigned_div_rem(n + N_PACKED_INSTANCES - 1, N_PACKED_INSTANCES);\n    let blake2s_ptr = blake2s_ptr_start;\n    _finalize_blake2s_inner{blake2s_ptr=blake2s_ptr}(n=n_chunks, sigma=sigma);\n    return ();\n}\n\nfunc _get_sigma() -> (sigma: felt*) {\n    alloc_locals;\n    let (sigma_address) = get_label_location(data);\n    return (sigma=cast(sigma_address, felt*));\n\n    data:\n    dw 0;\n    dw 1;\n    dw 2;\n    dw 3;\n    dw 4;\n    dw 5;\n    dw 6;\n    dw 7;\n    dw 8;\n    dw 9;\n    dw 10;\n    dw 11;\n    dw 12;\n    dw 13;\n    dw 14;\n    dw 15;\n    dw 14;\n    dw 10;\n    dw 4;\n    dw 8;\n    dw 9;\n    dw 15;\n    dw 13;\n    dw 6;\n    dw 1;\n    dw 12;\n    dw 0;\n    dw 2;\n    dw 11;\n    dw 7;\n    dw 5;\n    dw 3;\n    dw 11;\n    dw 8;\n    dw 12;\n    dw 0;\n    dw 5;\n    dw 2;\n    dw 15;\n    dw 13;\n    dw 10;\n    dw 14;\n    dw 3;\n    dw 6;\n    dw 7;\n    dw 1;\n    dw 9;\n    dw 4;\n    dw 7;\n    dw 9;\n    dw 3;\n    dw 1;\n    dw 13;\n    dw 12;\n    dw 11;\n    dw 14;\n    dw 2;\n    dw 6;\n    dw 5;\n    dw 10;\n    dw 4;\n    dw 0;\n    dw 15;\n    dw 8;\n    dw 9;\n    dw 0;\n    dw 5;\n    dw 7;\n    dw 2;\n    dw 4;\n    dw 10;\n    dw 15;\n    dw 14;\n    dw 1;\n    dw 11;\n    dw 12;\n    dw 6;\n    dw 8;\n    dw 3;\n    dw 13;\n    dw 2;\n    dw 12;\n    dw 6;\n    dw 10;\n    dw 0;\n    dw 11;\n    dw 8;\n    dw 3;\n    dw 4;\n    dw 13;\n    dw 7;\n    dw 5;\n    dw 15;\n    dw 14;\n    dw 1;\n    dw 9;\n    dw 12;\n    dw 5;\n    dw 1;\n    dw 15;\n    dw 14;\n    dw 13;\n    dw 4;\n    dw 10;\n    dw 0;\n    dw 7;\n    dw 6;\n    dw 3;\n    dw 9;\n    dw 2;\n    dw 8;\n    dw 11;\n    dw 13;\n    dw 11;\n    dw 7;\n    dw 14;\n    dw 12;\n    dw 1;\n    dw 3;\n    dw 9;\n    dw 5;\n    dw 0;\n    dw 15;\n    dw 4;\n    dw 8;\n    dw 6;\n    dw 2;\n    dw 10;\n    dw 6;\n    dw 15;\n    dw 14;\n    dw 9;\n    dw 11;\n    dw 3;\n    dw 0;\n    dw 8;\n    dw 12;\n    dw 2;\n    dw 13;\n    dw 7;\n    dw 1;\n    dw 4;\n    dw 10;\n    dw 5;\n    dw 10;\n    dw 2;\n    dw 8;\n    dw 4;\n    dw 7;\n    dw 6;\n    dw 1;\n    dw 5;\n    dw 15;\n    dw 11;\n    dw 9;\n    dw 14;\n    dw 3;\n    dw 12;\n    dw 13;\n    dw 0;\n}\n\n// Handles n chunks of N_PACKED_INSTANCES blake2s instances.\nfunc _finalize_blake2s_inner{range_check_ptr, bitwise_ptr: BitwiseBuiltin*, blake2s_ptr: felt*}(\n    n: felt, sigma: felt*\n) {\n    if (n == 0) {\n        return ();\n    }\n\n    alloc_locals;\n    let blake2s_start = blake2s_ptr;\n\n    // Load instance data.\n    let (local data: felt*) = alloc();\n    _pack_ints(INSTANCE_SIZE, data);\n\n    let input_state: felt* = data;\n    let message: felt* = input_state + STATE_SIZE_FELTS;\n    let t0_and_f0: felt* = message + INPUT_BLOCK_FELTS;\n    let output_state: felt* = t0_and_f0 + 2;\n\n    // Run blake2s on N_PACKED_INSTANCES instances.\n    blake2s_compress(\n        h=input_state,\n        message=message,\n        t0=t0_and_f0[0],\n        f0=t0_and_f0[1],\n        sigma=sigma,\n        output=output_state,\n    );\n    let blake2s_ptr = blake2s_start + INSTANCE_SIZE * N_PACKED_INSTANCES;\n\n    return _finalize_blake2s_inner(n=n - 1, sigma=sigma);\n}\n\n// Given N_PACKED_INSTANCES sets of m (32-bit) integers in the blake2s implicit argument,\n// where each set starts at offset INSTANCE_SIZE from the previous set,\n// computes m packed integers.\n// blake2s_ptr is advanced m steps (just after the first set).\nfunc _pack_ints{range_check_ptr, blake2s_ptr: felt*}(m, packed_values: felt*) {\n    static_assert N_PACKED_INSTANCES == 7;\n    alloc_locals;\n\n    local MAX_VALUE = 2 ** 32 - 1;\n\n    tempvar packed_values = packed_values;\n    tempvar blake2s_ptr = blake2s_ptr;\n    tempvar range_check_ptr = range_check_ptr;\n    tempvar m = m;\n\n    loop:\n    tempvar x0 = blake2s_ptr[0 * INSTANCE_SIZE];\n    assert [range_check_ptr + 0] = x0;\n    assert [range_check_ptr + 1] = MAX_VALUE - x0;\n    tempvar x1 = blake2s_ptr[1 * INSTANCE_SIZE];\n    assert [range_check_ptr + 2] = x1;\n    assert [range_check_ptr + 3] = MAX_VALUE - x1;\n    tempvar x2 = blake2s_ptr[2 * INSTANCE_SIZE];\n    assert [range_check_ptr + 4] = x2;\n    assert [range_check_ptr + 5] = MAX_VALUE - x2;\n    tempvar x3 = blake2s_ptr[3 * INSTANCE_SIZE];\n    assert [range_check_ptr + 6] = x3;\n    assert [range_check_ptr + 7] = MAX_VALUE - x3;\n    tempvar x4 = blake2s_ptr[4 * INSTANCE_SIZE];\n    assert [range_check_ptr + 8] = x4;\n    assert [range_check_ptr + 9] = MAX_VALUE - x4;\n    tempvar x5 = blake2s_ptr[5 * INSTANCE_SIZE];\n    assert [range_check_ptr + 10] = x5;\n    assert [range_check_ptr + 11] = MAX_VALUE - x5;\n    tempvar x6 = blake2s_ptr[6 * INSTANCE_SIZE];\n    assert [range_check_ptr + 12] = x6;\n    assert [range_check_ptr + 13] = MAX_VALUE - x6;\n    assert packed_values[0] = (\n        x0 +\n        2 ** 35 * x1 +\n        2 ** (35 * 2) * x2 +\n        2 ** (35 * 3) * x3 +\n        2 ** (35 * 4) * x4 +\n        2 ** (35 * 5) * x5 +\n        2 ** (35 * 6) * x6\n    );\n\n    tempvar packed_values = packed_values + 1;\n    tempvar blake2s_ptr = blake2s_ptr + 1;\n    tempvar range_check_ptr = range_check_ptr + 14;\n    tempvar m = m - 1;\n    jmp loop if m != 0;\n\n    return ();\n}\n\n// Helper functions.\n// These functions serialize data to a data array to be used with blake2s().\n// They use the property that each data word is verified by blake2s() to be in range [0, 2 ** 32).\n\n// Serializes a uint256 number in a blake2s compatible way (little-endian).\nfunc blake2s_add_uint256{data: felt*}(num: Uint256) {\n    let high = num.high;\n    let low = num.low;\n    %{\n        B = 32\n        MASK = 2 ** 32 - 1\n        segments.write_arg(ids.data, [(ids.low >> (B * i)) & MASK for i in range(4)])\n        segments.write_arg(ids.data + 4, [(ids.high >> (B * i)) & MASK for i in range(4)])\n    %}\n    assert data[3] * 2 ** 96 + data[2] * 2 ** 64 + data[1] * 2 ** 32 + data[0] = low;\n    assert data[7] * 2 ** 96 + data[6] * 2 ** 64 + data[5] * 2 ** 32 + data[4] = high;\n    let data = data + 8;\n    return ();\n}\n\n// Serializes a uint256 number in a blake2s compatible way (big-endian).\nfunc blake2s_add_uint256_bigend{bitwise_ptr: BitwiseBuiltin*, data: felt*}(num: Uint256) {\n    // Reverse byte endianness of 32-bit chunks.\n    tempvar value = num.high;\n    assert bitwise_ptr[0].x = value;\n    assert bitwise_ptr[0].y = 0x00ff00ff00ff00ff00ff00ff00ff00ff;\n    tempvar value = value + (2 ** 16 - 1) * bitwise_ptr[0].x_and_y;\n    assert bitwise_ptr[1].x = value;\n    assert bitwise_ptr[1].y = 0x00ffff0000ffff0000ffff0000ffff00;\n    tempvar value = value + (2 ** 32 - 1) * bitwise_ptr[1].x_and_y;\n    tempvar high = value / 2 ** (8 + 16);\n\n    tempvar value = num.low;\n    assert bitwise_ptr[2].x = value;\n    assert bitwise_ptr[2].y = 0x00ff00ff00ff00ff00ff00ff00ff00ff;\n    tempvar value = value + (2 ** 16 - 1) * bitwise_ptr[2].x_and_y;\n    assert bitwise_ptr[3].x = value;\n    assert bitwise_ptr[3].y = 0x00ffff0000ffff0000ffff0000ffff00;\n    tempvar value = value + (2 ** 32 - 1) * bitwise_ptr[3].x_and_y;\n    tempvar low = value / 2 ** (8 + 16);\n\n    let bitwise_ptr = bitwise_ptr + 4 * BitwiseBuiltin.SIZE;\n\n    %{\n        B = 32\n        MASK = 2 ** 32 - 1\n        segments.write_arg(ids.data, [(ids.high >> (B * (3 - i))) & MASK for i in range(4)])\n        segments.write_arg(ids.data + 4, [(ids.low >> (B * (3 - i))) & MASK for i in range(4)])\n    %}\n\n    assert data[0] * 2 ** 96 + data[1] * 2 ** 64 + data[2] * 2 ** 32 + data[3] = high;\n    assert data[4] * 2 ** 96 + data[5] * 2 ** 64 + data[6] * 2 ** 32 + data[7] = low;\n    let data = data + 8;\n    return ();\n}\n\n// Serializes a field element in a blake2s compatible way.\nfunc blake2s_add_felt{range_check_ptr, bitwise_ptr: BitwiseBuiltin*, data: felt*}(\n    num: felt, bigend: felt\n) {\n    let (high, low) = split_felt(num);\n    if (bigend != 0) {\n        blake2s_add_uint256_bigend(Uint256(low=low, high=high));\n        return ();\n    } else {\n        blake2s_add_uint256(Uint256(low=low, high=high));\n        return ();\n    }\n}\n\n// Serializes multiple field elements in a blake2s compatible way.\n// Note: This function does not serialize the number of elements. If desired, this is the caller's\n// responsibility.\nfunc blake2s_add_felts{range_check_ptr, bitwise_ptr: BitwiseBuiltin*, data: felt*}(\n    n_elements: felt, elements: felt*, bigend: felt\n) -> () {\n    if (n_elements == 0) {\n        return ();\n    }\n    blake2s_add_felt(num=elements[0], bigend=bigend);\n    return blake2s_add_felts(n_elements=n_elements - 1, elements=&elements[1], bigend=bigend);\n}\n\n// Computes the blake2s hash for multiple field elements.\nfunc blake2s_felts{range_check_ptr, bitwise_ptr: BitwiseBuiltin*, blake2s_ptr: felt*}(\n    n_elements: felt, elements: felt*, bigend: felt\n) -> (res: Uint256) {\n    alloc_locals;\n    let (data) = alloc();\n    let data_start = data;\n    with data {\n        blake2s_add_felts(n_elements=n_elements, elements=elements, bigend=bigend);\n    }\n    let (res) = blake2s(data=data_start, n_bytes=n_elements * 32);\n    return (res=res);\n}\n\n// Takes an array of `packed_values_len` felt252s at `packed_values` and encodes them into an array\n// of u32s at `unpacked_u32s` in the following way:\n//  * If a felt is less than 2^63, it's unpacked to 2 felts, each representing 32 bits.\n//  * Otherwise, it's unpacked into 8 felts, each under 2^32, where the most significant\n//    limb has its MSB set (Note that the prime is less than 2^255 so the MSB could not be\n//    set prior to this intervention).\n// All 32-bit limbs are arranged in big-endian order.\n// Returns the size of the unpacked array in felts.\n// Assumes:\n//  * All output felts in `upnacked_u32s` are extrenally verified to be in [0, 2^32).\n// Note: This function can nondeterministically choose between several encodings of felts,\n//      x < PRIME can be encoded as x + PRIME, x + 2 * PRIME, etc. The canonical encoding is\n//      given when x < PRIME.\n// TODO(alont): Write custom hints and integrate with VM.\n// TODO(alont): Consider adding cases for 1 u32 (small immediates, including negatives)\n//      and 3 u32s (extended opcodes).\n// TODO(alont): Consider unrolling this loop to avoid state copy overhead.\nfunc encode_felt252_to_u32s{range_check_ptr: felt}(\n    packed_values_len: felt, packed_values: felt*, unpacked_u32s: felt*\n) -> felt {\n    alloc_locals;\n\n    local U63_MAX = 2 ** 63 - 1;\n    local EXP31 = 2 ** 31;\n    local end = cast(packed_values, felt) + packed_values_len;\n\n    %{\n        offset = 0\n        for i in range(ids.packed_values_len):\n            val = (memory[ids.packed_values + i] % PRIME)\n            val_len = 2 if val < 2**63 else 8\n            if val_len == 8:\n                val += 2**255\n            for i in range(val_len - 1, -1, -1):\n                val, memory[ids.unpacked_u32s + offset + i] = divmod(val, 2**32)\n            assert val == 0\n            offset += val_len\n    %}\n    tempvar out = unpacked_u32s;\n    tempvar packed_values = packed_values;\n    tempvar range_check_ptr = range_check_ptr;\n\n    loop:\n    // Guess if number is small or big.\n    if (nondet %{ (ids.end != ids.packed_values) and (memory[ids.packed_values] < 2**63) %} != 0) {\n        // Unpack small felt.\n\n        tempvar current_val = packed_values[0];\n        // Assert that the value is in [0, 2^63).\n        assert [range_check_ptr] = U63_MAX - current_val;\n        // Assert that the limbs represent the number.\n        assert current_val = out[1] + 2 ** 32 * out[0];\n\n        tempvar out = &out[2];\n        tempvar packed_values = &packed_values[1];\n        tempvar range_check_ptr = range_check_ptr + 1;\n        jmp loop;\n    }\n\n    if (end - cast(packed_values, felt) == 0) {\n        return out - unpacked_u32s;\n    }\n\n    // Handle big felt.\n    // Assert that the top limb is over 2^31, as its MSB is artificially set for encoding.\n    tempvar raw_out_0 = out[0] - EXP31;\n    assert [range_check_ptr] = raw_out_0;\n    // Assert that the limbs represent the number. Set the MSB of the most significant limb.\n    assert packed_values[0] = (\n        (out[7] + (2 ** 32 * out[6])) +\n        2 ** (32 * 2) * (out[5] + 2 ** 32 * out[4]) +\n        2 ** (32 * 4) * (out[3] + 2 ** 32 * out[2]) +\n        2 ** (32 * 6) * (out[1] + 2 ** 32 * raw_out_0)\n    );\n\n    tempvar out = &out[8];\n    tempvar packed_values = &packed_values[1];\n    tempvar range_check_ptr = range_check_ptr + 1;\n    jmp loop;\n}\n\nconst OP1_AP = 4;\nconst BLAKE2S_OPCODE_EXT = 1;\nconst BLAKE2S_FINALIZE_OPCODE_EXT = 2;\nconst BLAKE2S_AP_FLAGS = OP1_AP * (2 ** 2);\n\nconst OFF_MINUS_1 = 2 ** 15 - 1;\nconst OFF_MINUS_2 = 2 ** 15 - 2;\nconst OFF_MINUS_3 = 2 ** 15 - 3;\nconst OFF_MINUS_4 = 2 ** 15 - 4;\n\nconst COUNTER_OFFSET = 1;\nconst STATE_OFFSET = 2 ** 16;\nconst MESSAGE_OFFSET = 2 ** 32;\nconst FLAGS_OFFSET = 2 ** 48;\nconst OPCODE_EXT_OFFSET = 2 ** 63;\n\nconst BLAKE2S_INSTRUCTION = OFF_MINUS_1 * COUNTER_OFFSET + OFF_MINUS_4 * STATE_OFFSET +\n    OFF_MINUS_3 * MESSAGE_OFFSET + BLAKE2S_AP_FLAGS * FLAGS_OFFSET + BLAKE2S_OPCODE_EXT *\n    OPCODE_EXT_OFFSET;\nconst BLAKE2S_FINALIZE_INSTRUCTION = OFF_MINUS_1 * COUNTER_OFFSET + OFF_MINUS_3 * STATE_OFFSET +\n    OFF_MINUS_2 * MESSAGE_OFFSET + BLAKE2S_AP_FLAGS * FLAGS_OFFSET + BLAKE2S_FINALIZE_OPCODE_EXT *\n    OPCODE_EXT_OFFSET;\n\n// Computes blake2s of `input` of size `len` felts, representing 32 bits each.\n// Note: this function guarantees that len > 0.\nfunc blake_with_opcode{range_check_ptr}(len: felt, data: felt*, out: felt*) {\n    alloc_locals;\n\n    let (local state: felt*) = alloc();\n    assert state[0] = 0x6B08E647;  // IV[0] ^ 0x01010020 (config: no key, 32 bytes output).\n    assert state[1] = 0xBB67AE85;\n    assert state[2] = 0x3C6EF372;\n    assert state[3] = 0xA54FF53A;\n    assert state[4] = 0x510E527F;\n    assert state[5] = 0x9B05688C;\n    assert state[6] = 0x1F83D9AB;\n    assert state[7] = 0x5BE0CD19;\n\n    // Express the length in bytes, subtract the remainder for finalize.\n    let (_, rem) = unsigned_div_rem(len - 1, 16);\n    local rem = rem + 1;\n    local len_in_bytes = (len - rem) * 4;\n\n    local range_check_ptr = range_check_ptr;\n\n    // Copy remaining data and pad with zeroes.\n    let (local final_data: felt*) = alloc();\n    memcpy(final_data, &data[len - rem], rem);\n    memset(&final_data[rem], 0, 16 - rem);\n\n    tempvar counter = 0;\n    tempvar state = state;\n    tempvar data = data;\n\n    loop:\n    if (counter - len_in_bytes == 0) {\n        // Add remainder bytes to counter.\n        tempvar counter = counter + (rem * 4);\n        [ap] = state, ap++;\n        [ap] = final_data, ap++;\n        [ap] = counter, ap++;\n        [ap] = out;\n        dw BLAKE2S_FINALIZE_INSTRUCTION;\n        // Increment AP after blake opcode.\n        ap += 1;\n\n        let range_check_ptr = [fp + 3];\n        return ();\n    }\n\n    tempvar counter = counter + 64;\n\n    // Blake output pointer / the next state.\n    [ap] = &state[8];\n    dw BLAKE2S_INSTRUCTION;\n\n    let state = cast([ap - 4], felt*);\n    let data = cast([ap - 3], felt*);\n\n    // Increment AP after blake opcode.\n    ap += 1;\n\n    tempvar data = data + 16;\n    jmp loop;\n}\n\n// Given `data_len` felt252s at `data`, encodes them as u32s as defined in `encode_felt252_to_u32s`\n// and computes the blake2s hash of the result using the dedicated opcodes.\n// The 256 bit result is then returned as a felt252 (i.e. modulo PRIME).\nfunc encode_felt252_data_and_calc_blake_hash{range_check_ptr: felt}(\n    data_len: felt, data: felt*\n) -> (hash: felt) {\n    alloc_locals;\n    let (local encoded_data: felt*) = alloc();\n    let encoded_data_len = encode_felt252_to_u32s(\n        packed_values_len=data_len, packed_values=data, unpacked_u32s=encoded_data\n    );\n    let (local blake_output: felt*) = alloc();\n    blake_with_opcode(len=encoded_data_len, data=encoded_data, out=blake_output);\n    return (\n        hash=blake_output[7] * 2 ** 224 + blake_output[6] * 2 ** 192 + blake_output[5] * 2 ** 160 +\n        blake_output[4] * 2 ** 128 + blake_output[3] * 2 ** 96 + blake_output[2] * 2 ** 64 +\n        blake_output[1] * 2 ** 32 + blake_output[0],\n    );\n}\n",
            "/var/lib/engflow/worker/exec/src/starkware/cairo/common/cairo_blake2s/packed_blake2s.cairo": "from starkware.cairo.common.alloc import alloc\nfrom starkware.cairo.common.cairo_builtins import BitwiseBuiltin\nfrom starkware.cairo.common.registers import get_fp_and_pc\n\nconst N_PACKED_INSTANCES = 7;\nconst ALL_ONES = 2 ** 251 - 1;\nconst SHIFTS = (\n    1 + 2 ** 35 + 2 ** (35 * 2) + 2 ** (35 * 3) + 2 ** (35 * 4) + 2 ** (35 * 5) + 2 ** (35 * 6)\n);\n\nfunc mix{bitwise_ptr: BitwiseBuiltin*}(a: felt, b: felt, c: felt, d: felt, m0: felt, m1: felt) -> (\n    a: felt, b: felt, c: felt, d: felt\n) {\n    alloc_locals;\n\n    // Defining the following constant as local variables saves some instructions.\n    local mask32ones = SHIFTS * (2 ** 32 - 1);\n\n    // a = (a + b + m0) % 2**32.\n    assert bitwise_ptr[0].x = a + b + m0;\n    assert bitwise_ptr[0].y = mask32ones;\n    tempvar a = bitwise_ptr[0].x_and_y;\n    let bitwise_ptr = bitwise_ptr + BitwiseBuiltin.SIZE;\n\n    // d = right_rot((d ^ a), 16).\n    assert bitwise_ptr[0].x = a;\n    assert bitwise_ptr[0].y = d;\n    tempvar a_xor_d = bitwise_ptr[0].x_xor_y;\n    assert bitwise_ptr[1].x = a_xor_d;\n    assert bitwise_ptr[1].y = SHIFTS * (2 ** 32 - 2 ** 16);\n    tempvar d = (\n        (2 ** (32 - 16)) * a_xor_d + (1 / 2 ** 16 - 2 ** (32 - 16)) * bitwise_ptr[1].x_and_y\n    );\n    let bitwise_ptr = bitwise_ptr + 2 * BitwiseBuiltin.SIZE;\n\n    // c = (c + d) % 2**32.\n    assert bitwise_ptr[0].x = c + d;\n    assert bitwise_ptr[0].y = mask32ones;\n    tempvar c = bitwise_ptr[0].x_and_y;\n    let bitwise_ptr = bitwise_ptr + BitwiseBuiltin.SIZE;\n\n    // b = right_rot((b ^ c), 12).\n    assert bitwise_ptr[0].x = b;\n    assert bitwise_ptr[0].y = c;\n    tempvar b_xor_c = bitwise_ptr[0].x_xor_y;\n    assert bitwise_ptr[1].x = b_xor_c;\n    assert bitwise_ptr[1].y = SHIFTS * (2 ** 32 - 2 ** 12);\n    tempvar b = (\n        (2 ** (32 - 12)) * b_xor_c + (1 / 2 ** 12 - 2 ** (32 - 12)) * bitwise_ptr[1].x_and_y\n    );\n    let bitwise_ptr = bitwise_ptr + 2 * BitwiseBuiltin.SIZE;\n\n    // a = (a + b + m1) % 2**32.\n    assert bitwise_ptr[0].x = a + b + m1;\n    assert bitwise_ptr[0].y = mask32ones;\n    tempvar a = bitwise_ptr[0].x_and_y;\n    let bitwise_ptr = bitwise_ptr + BitwiseBuiltin.SIZE;\n\n    // d = right_rot((d ^ a), 8).\n    assert bitwise_ptr[0].x = d;\n    assert bitwise_ptr[0].y = a;\n    tempvar d_xor_a = bitwise_ptr[0].x_xor_y;\n    assert bitwise_ptr[1].x = d_xor_a;\n    assert bitwise_ptr[1].y = SHIFTS * (2 ** 32 - 2 ** 8);\n    tempvar d = (2 ** (32 - 8)) * d_xor_a + (1 / 2 ** 8 - 2 ** (32 - 8)) * bitwise_ptr[1].x_and_y;\n    let bitwise_ptr = bitwise_ptr + 2 * BitwiseBuiltin.SIZE;\n\n    // c = (c + d) % 2**32.\n    assert bitwise_ptr[0].x = c + d;\n    assert bitwise_ptr[0].y = mask32ones;\n    tempvar c = bitwise_ptr[0].x_and_y;\n    let bitwise_ptr = bitwise_ptr + BitwiseBuiltin.SIZE;\n\n    // b = right_rot((b ^ c), 7).\n    assert bitwise_ptr[0].x = b;\n    assert bitwise_ptr[0].y = c;\n    tempvar b_xor_c = bitwise_ptr[0].x_xor_y;\n    assert bitwise_ptr[1].x = b_xor_c;\n    assert bitwise_ptr[1].y = SHIFTS * (2 ** 32 - 2 ** 7);\n    tempvar b = (2 ** (32 - 7)) * b_xor_c + (1 / 2 ** 7 - 2 ** (32 - 7)) * bitwise_ptr[1].x_and_y;\n    let bitwise_ptr = bitwise_ptr + 2 * BitwiseBuiltin.SIZE;\n\n    return (a, b, c, d);\n}\n\nfunc blake_round{bitwise_ptr: BitwiseBuiltin*}(state: felt*, message: felt*, sigma: felt*) -> (\n    new_state: felt*\n) {\n    let state0 = state[0];\n    let state1 = state[1];\n    let state2 = state[2];\n    let state3 = state[3];\n    let state4 = state[4];\n    let state5 = state[5];\n    let state6 = state[6];\n    let state7 = state[7];\n    let state8 = state[8];\n    let state9 = state[9];\n    let state10 = state[10];\n    let state11 = state[11];\n    let state12 = state[12];\n    let state13 = state[13];\n    let state14 = state[14];\n    let state15 = state[15];\n\n    let (state0, state4, state8, state12) = mix(\n        state0, state4, state8, state12, message[sigma[0]], message[sigma[1]]\n    );\n    let (state1, state5, state9, state13) = mix(\n        state1, state5, state9, state13, message[sigma[2]], message[sigma[3]]\n    );\n    let (state2, state6, state10, state14) = mix(\n        state2, state6, state10, state14, message[sigma[4]], message[sigma[5]]\n    );\n    let (state3, state7, state11, state15) = mix(\n        state3, state7, state11, state15, message[sigma[6]], message[sigma[7]]\n    );\n\n    let (state0, state5, state10, state15) = mix(\n        state0, state5, state10, state15, message[sigma[8]], message[sigma[9]]\n    );\n    let (state1, state6, state11, state12) = mix(\n        state1, state6, state11, state12, message[sigma[10]], message[sigma[11]]\n    );\n    let (state2, state7, state8, state13) = mix(\n        state2, state7, state8, state13, message[sigma[12]], message[sigma[13]]\n    );\n    let (state3, state4, state9, state14) = mix(\n        state3, state4, state9, state14, message[sigma[14]], message[sigma[15]]\n    );\n\n    let (new_state: felt*) = alloc();\n    assert new_state[0] = state0;\n    assert new_state[1] = state1;\n    assert new_state[2] = state2;\n    assert new_state[3] = state3;\n    assert new_state[4] = state4;\n    assert new_state[5] = state5;\n    assert new_state[6] = state6;\n    assert new_state[7] = state7;\n    assert new_state[8] = state8;\n    assert new_state[9] = state9;\n    assert new_state[10] = state10;\n    assert new_state[11] = state11;\n    assert new_state[12] = state12;\n    assert new_state[13] = state13;\n    assert new_state[14] = state14;\n    assert new_state[15] = state15;\n\n    return (new_state=new_state);\n}\n\n// Performs the blake compression function.\n//\n// h is a list of 8 32-bit words.\n// message is a list of 16 32-bit words.\n// t1 and f1 are assumed to be 0.\nfunc blake2s_compress{bitwise_ptr: BitwiseBuiltin*}(\n    h: felt*, message: felt*, t0: felt, f0: felt, sigma: felt*, output: felt*\n) {\n    alloc_locals;\n    let (__fp__, _) = get_fp_and_pc();\n\n    // Compute state[12].\n    assert bitwise_ptr[0].x = 0x510e527f * SHIFTS;\n    assert bitwise_ptr[0].y = t0;\n    let state12 = bitwise_ptr[0].x_xor_y;\n    let bitwise_ptr = bitwise_ptr + BitwiseBuiltin.SIZE;\n\n    // Compute state[14].\n    assert bitwise_ptr[0].x = 0x1f83d9ab * SHIFTS;\n    assert bitwise_ptr[0].y = f0;\n    let state14 = bitwise_ptr[0].x_xor_y;\n    let bitwise_ptr = bitwise_ptr + BitwiseBuiltin.SIZE;\n\n    local initial_state = h[0];\n    local initial_state_ = h[1];\n    local initial_state_ = h[2];\n    local initial_state_ = h[3];\n    local initial_state_ = h[4];\n    local initial_state_ = h[5];\n    local initial_state_ = h[6];\n    local initial_state_ = h[7];\n    local initial_state_ = 0x6a09e667 * SHIFTS;\n    local initial_state_ = 0xbb67ae85 * SHIFTS;\n    local initial_state_ = 0x3c6ef372 * SHIFTS;\n    local initial_state_ = 0xa54ff53a * SHIFTS;\n    local initial_state_ = state12;\n    local initial_state_ = 0x9b05688c * SHIFTS;\n    local initial_state_ = state14;\n    local initial_state_ = 0x5be0cd19 * SHIFTS;\n\n    let state = &initial_state;\n\n    let (state) = blake_round(state, message, sigma + 16 * 0);\n    let (state) = blake_round(state, message, sigma + 16 * 1);\n    let (state) = blake_round(state, message, sigma + 16 * 2);\n    let (state) = blake_round(state, message, sigma + 16 * 3);\n    let (state) = blake_round(state, message, sigma + 16 * 4);\n    let (state) = blake_round(state, message, sigma + 16 * 5);\n    let (state) = blake_round(state, message, sigma + 16 * 6);\n    let (state) = blake_round(state, message, sigma + 16 * 7);\n    let (state) = blake_round(state, message, sigma + 16 * 8);\n    let (state) = blake_round(state, message, sigma + 16 * 9);\n\n    tempvar old_h = h;\n    tempvar last_state = state;\n    tempvar new_h = output;\n    tempvar bitwise_ptr = bitwise_ptr;\n    tempvar n = 8;\n\n    loop:\n    assert bitwise_ptr[0].x = old_h[0];\n    assert bitwise_ptr[0].y = last_state[0];\n    assert bitwise_ptr[1].x = bitwise_ptr[0].x_xor_y;\n    assert bitwise_ptr[1].y = last_state[8];\n    assert new_h[0] = bitwise_ptr[1].x_xor_y;\n\n    tempvar old_h = old_h + 1;\n    tempvar last_state = last_state + 1;\n    tempvar new_h = new_h + 1;\n    tempvar bitwise_ptr = bitwise_ptr + 2 * BitwiseBuiltin.SIZE;\n    tempvar n = n - 1;\n    jmp loop if n != 0;\n\n    return ();\n}\n",
            "/var/lib/engflow/worker/exec/src/starkware/cairo/common/cairo_builtins.cairo": "from starkware.cairo.common.ec_point import EcPoint\nfrom starkware.cairo.common.keccak_state import KeccakBuiltinState\nfrom starkware.cairo.common.poseidon_state import PoseidonBuiltinState\n\n// Specifies the hash builtin memory structure.\nstruct HashBuiltin {\n    x: felt,\n    y: felt,\n    result: felt,\n}\n\n// Specifies the signature builtin memory structure.\nstruct SignatureBuiltin {\n    pub_key: felt,\n    message: felt,\n}\n\n// Specifies the bitwise builtin memory structure.\nstruct BitwiseBuiltin {\n    x: felt,\n    y: felt,\n    x_and_y: felt,\n    x_xor_y: felt,\n    x_or_y: felt,\n}\n\n// Specifies the EC operation builtin memory structure.\nstruct EcOpBuiltin {\n    p: EcPoint,\n    q: EcPoint,\n    m: felt,\n    r: EcPoint,\n}\n\n// Specifies the Keccak builtin memory structure.\nstruct KeccakBuiltin {\n    input: KeccakBuiltinState,\n    output: KeccakBuiltinState,\n}\n\n// Specifies the Poseidon builtin memory structure.\nstruct PoseidonBuiltin {\n    input: PoseidonBuiltinState,\n    output: PoseidonBuiltinState,\n}\n\n// Represents a 384-bit unsigned integer d0 + 2**96 * d1 + 2**192 * d2 + 2**288 * d3\n// where each di is in [0, 2**96).\nstruct UInt384 {\n    d0: felt,\n    d1: felt,\n    d2: felt,\n    d3: felt,\n}\n\n// Specifies the Add and Mul Mod builtins memory structure.\nstruct ModBuiltin {\n    // The modulus.\n    p: UInt384,\n    // A pointer to input values, the intermediate results and the output.\n    values_ptr: UInt384*,\n    // A pointer to offsets inside the values array, defining the circuit.\n    // The offsets array should contain 3 * n elements.\n    offsets_ptr: felt*,\n    // The number of operations to perform.\n    n: felt,\n}\n",
            "/var/lib/engflow/worker/exec/src/starkware/cairo/common/ec_point.cairo": "// Represents a point on an elliptic curve.\nstruct EcPoint {\n    x: felt,\n    y: felt,\n}\n",
            "/var/lib/engflow/worker/exec/src/starkware/cairo/common/hash.cairo": "from starkware.cairo.common.cairo_builtins import HashBuiltin\n\n// Computes the hash of two given field elements.\n// The hash function is defined by the hash_ptr used.\n// For example, pass the pedersen builtin pointer to compute Pedersen hash.\n//\n// Arguments:\n//   hash_ptr - the hash builtin pointer.\n//   x, y - the two field elements to be hashed, in this order.\n//\n// Returns:\n//   result - the field element result of the hash.\nfunc hash2{hash_ptr: HashBuiltin*}(x, y) -> (result: felt) {\n    hash_ptr.x = x;\n    hash_ptr.y = y;\n    let result = hash_ptr.result;\n    let hash_ptr = hash_ptr + HashBuiltin.SIZE;\n    return (result=result);\n}\n",
            "/var/lib/engflow/worker/exec/src/starkware/cairo/common/keccak_state.cairo": "// Represents 1600 bits of a Keccak state (8 felts each containing 200 bits).\nstruct KeccakBuiltinState {\n    s0: felt,\n    s1: felt,\n    s2: felt,\n    s3: felt,\n    s4: felt,\n    s5: felt,\n    s6: felt,\n    s7: felt,\n}\n",
            "/var/lib/engflow/worker/exec/src/starkware/cairo/common/math.cairo": "from starkware.cairo.common.bool import FALSE, TRUE\n\n// Inline functions with no locals.\n\n// Verifies that value != 0. The proof will fail otherwise.\nfunc assert_not_zero(value) {\n    %{\n        from starkware.cairo.common.math_utils import assert_integer\n        assert_integer(ids.value)\n        assert ids.value % PRIME != 0, f'assert_not_zero failed: {ids.value} = 0.'\n    %}\n    if (value == 0) {\n        // If value == 0, add an unsatisfiable requirement.\n        value = 1;\n    }\n\n    return ();\n}\n\n// Verifies that ptr != nullptr. The proof will fail otherwise.\nfunc assert_not_nullptr(ptr: felt*) {\n    if (ptr == 0) {\n        // If ptr == 0, add an unsatisfiable requirement.\n        ptr = 1;\n    }\n\n    return ();\n}\n\n// Verifies that a != b. The proof will fail otherwise.\nfunc assert_not_equal(a, b) {\n    %{\n        from starkware.cairo.lang.vm.relocatable import RelocatableValue\n        both_ints = isinstance(ids.a, int) and isinstance(ids.b, int)\n        both_relocatable = (\n            isinstance(ids.a, RelocatableValue) and isinstance(ids.b, RelocatableValue) and\n            ids.a.segment_index == ids.b.segment_index)\n        assert both_ints or both_relocatable, \\\n            f'assert_not_equal failed: non-comparable values: {ids.a}, {ids.b}.'\n        assert (ids.a - ids.b) % PRIME != 0, f'assert_not_equal failed: {ids.a} = {ids.b}.'\n    %}\n    if (a == b) {\n        // If a == b, add an unsatisfiable requirement.\n        a = a + 1;\n    }\n\n    return ();\n}\n\n// Verifies that a >= 0 (or more precisely 0 <= a < RANGE_CHECK_BOUND).\nfunc assert_nn{range_check_ptr}(a) {\n    %{\n        from starkware.cairo.common.math_utils import assert_integer\n        assert_integer(ids.a)\n        assert 0 <= ids.a % PRIME < range_check_builtin.bound, f'a = {ids.a} is out of range.'\n    %}\n    a = [range_check_ptr];\n    let range_check_ptr = range_check_ptr + 1;\n    return ();\n}\n\n// Verifies that a <= b (or more precisely 0 <= b - a < RANGE_CHECK_BOUND).\nfunc assert_le{range_check_ptr}(a, b) {\n    assert_nn(b - a);\n    return ();\n}\n\n// Verifies that a <= b - 1 (or more precisely 0 <= b - 1 - a < RANGE_CHECK_BOUND).\nfunc assert_lt{range_check_ptr}(a, b) {\n    assert_le(a, b - 1);\n    return ();\n}\n\n// Verifies that 0 <= a <= b.\n//\n// Prover assumption: b < RANGE_CHECK_BOUND.\n//\n// This function is still sound without the prover assumptions. In that case, it is guaranteed\n// that a < RANGE_CHECK_BOUND and b < 2 * RANGE_CHECK_BOUND.\nfunc assert_nn_le{range_check_ptr}(a, b) {\n    assert_nn(a);\n    assert_le(a, b);\n    return ();\n}\n\n// Asserts that value is in the range [lower, upper).\n// Or more precisely:\n// (0 <= value - lower < RANGE_CHECK_BOUND) and (0 <= upper - 1 - value < RANGE_CHECK_BOUND).\n//\n// Prover assumption: 0 <= upper - lower <= RANGE_CHECK_BOUND.\nfunc assert_in_range{range_check_ptr}(value, lower, upper) {\n    assert_le(lower, value);\n    assert_le(value, upper - 1);\n    return ();\n}\n\n// Asserts that 'value' is in the range [0, 2**250).\n@known_ap_change\nfunc assert_250_bit{range_check_ptr}(value) {\n    const UPPER_BOUND = 2 ** 250;\n    const SHIFT = 2 ** 128;\n    const HIGH_BOUND = UPPER_BOUND / SHIFT;\n\n    let low = [range_check_ptr];\n    let high = [range_check_ptr + 1];\n\n    %{\n        from starkware.cairo.common.math_utils import as_int\n\n        # Correctness check.\n        value = as_int(ids.value, PRIME) % PRIME\n        assert value < ids.UPPER_BOUND, f'{value} is outside of the range [0, 2**250).'\n\n        # Calculation for the assertion.\n        ids.high, ids.low = divmod(ids.value, ids.SHIFT)\n    %}\n\n    assert [range_check_ptr + 2] = HIGH_BOUND - 1 - high;\n\n    // The assert below guarantees that\n    //   value = high * SHIFT + low <= (HIGH_BOUND - 1) * SHIFT + 2**128 - 1 =\n    //   HIGH_BOUND * SHIFT - SHIFT + SHIFT - 1 = 2**250 - 1.\n    assert value = high * SHIFT + low;\n\n    let range_check_ptr = range_check_ptr + 3;\n    return ();\n}\n\n// Splits the unsigned integer lift of a field element into the higher 128 bit and lower 128 bit.\n// The unsigned integer lift is the unique integer in the range [0, PRIME) that represents the field\n// element.\n// For example, if value=17 * 2^128 + 8, then high=17 and low=8.\n@known_ap_change\nfunc split_felt{range_check_ptr}(value) -> (high: felt, low: felt) {\n    // Note: the following code works because PRIME - 1 is divisible by 2**128.\n    const MAX_HIGH = (-1) / 2 ** 128;\n    const MAX_LOW = 0;\n\n    // Guess the low and high parts of the integer.\n    let low = [range_check_ptr];\n    let high = [range_check_ptr + 1];\n    let range_check_ptr = range_check_ptr + 2;\n\n    %{\n        from starkware.cairo.common.math_utils import assert_integer\n        assert ids.MAX_HIGH < 2**128 and ids.MAX_LOW < 2**128\n        assert PRIME - 1 == ids.MAX_HIGH * 2**128 + ids.MAX_LOW\n        assert_integer(ids.value)\n        ids.low = ids.value & ((1 << 128) - 1)\n        ids.high = ids.value >> 128\n    %}\n    assert value = high * (2 ** 128) + low;\n    if (high == MAX_HIGH) {\n        assert_le(low, MAX_LOW);\n    } else {\n        assert_le(high, MAX_HIGH - 1);\n    }\n    return (high=high, low=low);\n}\n\n// Asserts that the unsigned integer lift (as a number in the range [0, PRIME)) of a is lower than\n// or equal to that of b.\n@known_ap_change\nfunc assert_le_felt{range_check_ptr}(a, b) {\n    // ceil(PRIME / 3 / 2 ** 128).\n    const PRIME_OVER_3_HIGH = 0x2aaaaaaaaaaaab05555555555555556;\n    // ceil(PRIME / 2 / 2 ** 128).\n    const PRIME_OVER_2_HIGH = 0x4000000000000088000000000000001;\n    // The numbers [0, a, b, PRIME - 1] should be ordered. To prove that, we show that two of the\n    // 3 arcs {0 -> a, a -> b, b -> PRIME - 1} are small:\n    //   One is less than PRIME / 3 + 2 ** 129.\n    //   Another is less than PRIME / 2 + 2 ** 129.\n    // Since the sum of the lengths of these two arcs is less than PRIME, there is no wrap-around.\n    %{\n        import itertools\n\n        from starkware.cairo.common.math_utils import assert_integer\n        assert_integer(ids.a)\n        assert_integer(ids.b)\n        a = ids.a % PRIME\n        b = ids.b % PRIME\n        assert a <= b, f'a = {a} is not less than or equal to b = {b}.'\n\n        # Find an arc less than PRIME / 3, and another less than PRIME / 2.\n        lengths_and_indices = [(a, 0), (b - a, 1), (PRIME - 1 - b, 2)]\n        lengths_and_indices.sort()\n        assert lengths_and_indices[0][0] <= PRIME // 3 and lengths_and_indices[1][0] <= PRIME // 2\n        excluded = lengths_and_indices[2][1]\n\n        memory[ids.range_check_ptr + 1], memory[ids.range_check_ptr + 0] = (\n            divmod(lengths_and_indices[0][0], ids.PRIME_OVER_3_HIGH))\n        memory[ids.range_check_ptr + 3], memory[ids.range_check_ptr + 2] = (\n            divmod(lengths_and_indices[1][0], ids.PRIME_OVER_2_HIGH))\n    %}\n    // Guess two arc lengths.\n    tempvar arc_short = [range_check_ptr] + [range_check_ptr + 1] * PRIME_OVER_3_HIGH;\n    tempvar arc_long = [range_check_ptr + 2] + [range_check_ptr + 3] * PRIME_OVER_2_HIGH;\n    let range_check_ptr = range_check_ptr + 4;\n\n    // First, choose which arc to exclude from {0 -> a, a -> b, b -> PRIME - 1}.\n    // Then, to compare the set of two arc lengths, compare their sum and product.\n    let arc_sum = arc_short + arc_long;\n    let arc_prod = arc_short * arc_long;\n\n    // Exclude \"0 -> a\".\n    %{ memory[ap] = 1 if excluded != 0 else 0 %}\n    jmp skip_exclude_a if [ap] != 0, ap++;\n    assert arc_sum = (-1) - a;\n    assert arc_prod = (a - b) * (1 + b);\n    return ();\n\n    // Exclude \"a -> b\".\n    skip_exclude_a:\n    %{ memory[ap] = 1 if excluded != 1 else 0 %}\n    jmp skip_exclude_b_minus_a if [ap] != 0, ap++;\n    tempvar m1mb = (-1) - b;\n    assert arc_sum = a + m1mb;\n    assert arc_prod = a * m1mb;\n    return ();\n\n    // Exclude \"b -> PRIME - 1\".\n    skip_exclude_b_minus_a:\n    %{ assert excluded == 2 %}\n    assert arc_sum = b;\n    assert arc_prod = a * (b - a);\n    ap += 2;\n    return ();\n}\n\n// Asserts that the unsigned integer lift (as a number in the range [0, PRIME)) of a is lower than\n// that of b.\n@known_ap_change\nfunc assert_lt_felt{range_check_ptr}(a, b) {\n    %{\n        from starkware.cairo.common.math_utils import assert_integer\n        assert_integer(ids.a)\n        assert_integer(ids.b)\n        assert (ids.a % PRIME) < (ids.b % PRIME), \\\n            f'a = {ids.a % PRIME} is not less than b = {ids.b % PRIME}.'\n    %}\n    if (a == b) {\n        // If a == b, add an unsatisfiable requirement.\n        a = a + 1;\n    }\n    assert_le_felt(a, b);\n    return ();\n}\n\n// Returns the absolute value of value.\n// Prover asumption: -rc_bound < value < rc_bound.\n@known_ap_change\nfunc abs_value{range_check_ptr}(value) -> felt {\n    tempvar is_positive: felt;\n    %{\n        from starkware.cairo.common.math_utils import is_positive\n        ids.is_positive = 1 if is_positive(\n            value=ids.value, prime=PRIME, rc_bound=range_check_builtin.bound) else 0\n    %}\n    if (is_positive == 0) {\n        tempvar new_range_check_ptr = range_check_ptr + 1;\n        tempvar abs_value = value * (-1);\n        [range_check_ptr] = abs_value;\n        let range_check_ptr = new_range_check_ptr;\n        return abs_value;\n    } else {\n        [range_check_ptr] = value;\n        let range_check_ptr = range_check_ptr + 1;\n        return value;\n    }\n}\n\n// Returns the sign of value: -1, 0 or 1.\n// Prover asumption: -rc_bound < value < rc_bound.\n@known_ap_change\nfunc sign{range_check_ptr}(value) -> felt {\n    if (value == 0) {\n        ap += 2;\n        return 0;\n    }\n\n    tempvar is_positive: felt;\n    %{\n        from starkware.cairo.common.math_utils import is_positive\n        ids.is_positive = 1 if is_positive(\n            value=ids.value, prime=PRIME, rc_bound=range_check_builtin.bound) else 0\n    %}\n    if (is_positive == 0) {\n        assert [range_check_ptr] = value * (-1);\n        let range_check_ptr = range_check_ptr + 1;\n        return -1;\n    } else {\n        ap += 1;\n        [range_check_ptr] = value;\n        let range_check_ptr = range_check_ptr + 1;\n        return 1;\n    }\n}\n\n// Returns q and r such that:\n//  0 <= q < rc_bound, 0 <= r < div and value = q * div + r.\n//\n// Assumption: 0 < div <= PRIME / rc_bound.\n// Prover assumption: value / div < rc_bound.\n//\n// The value of div is restricted to make sure there is no overflow.\n// q * div + r < (q + 1) * div <= rc_bound * (PRIME / rc_bound) = PRIME.\nfunc unsigned_div_rem{range_check_ptr}(value, div) -> (q: felt, r: felt) {\n    let r = [range_check_ptr];\n    let q = [range_check_ptr + 1];\n    let range_check_ptr = range_check_ptr + 2;\n    %{\n        from starkware.cairo.common.math_utils import assert_integer\n        assert_integer(ids.div)\n        assert 0 < ids.div <= PRIME // range_check_builtin.bound, \\\n            f'div={hex(ids.div)} is out of the valid range.'\n        ids.q, ids.r = divmod(ids.value, ids.div)\n    %}\n    assert_le(r, div - 1);\n\n    assert value = q * div + r;\n    return (q, r);\n}\n\n// Returns q and r such that. -bound <= q < bound, 0 <= r < div and value = q * div + r.\n// value < PRIME / 2 is considered positive and value > PRIME / 2 is considered negative.\n//\n// Assumptions:\n//   0 < div <= PRIME / (rc_bound)\n//   bound <= rc_bound / 2.\n// Prover assumption:   -bound <= value / div < bound.\n//\n// The values of div and bound are restricted to make sure there is no overflow.\n// q * div + r <  (q + 1) * div <=  rc_bound / 2 * (PRIME / rc_bound)\n// q * div + r >=  q * div      >= -rc_bound / 2 * (PRIME / rc_bound).\nfunc signed_div_rem{range_check_ptr}(value, div, bound) -> (q: felt, r: felt) {\n    let r = [range_check_ptr];\n    let biased_q = [range_check_ptr + 1];  // == q + bound.\n    let range_check_ptr = range_check_ptr + 2;\n    %{\n        from starkware.cairo.common.math_utils import as_int, assert_integer\n\n        assert_integer(ids.div)\n        assert 0 < ids.div <= PRIME // range_check_builtin.bound, \\\n            f'div={hex(ids.div)} is out of the valid range.'\n\n        assert_integer(ids.bound)\n        assert ids.bound <= range_check_builtin.bound // 2, \\\n            f'bound={hex(ids.bound)} is out of the valid range.'\n\n        int_value = as_int(ids.value, PRIME)\n        q, ids.r = divmod(int_value, ids.div)\n\n        assert -ids.bound <= q < ids.bound, \\\n            f'{int_value} / {ids.div} = {q} is out of the range [{-ids.bound}, {ids.bound}).'\n\n        ids.biased_q = q + ids.bound\n    %}\n    let q = biased_q - bound;\n    assert value = q * div + r;\n    assert_le(r, div - 1);\n    assert_le(biased_q, 2 * bound - 1);\n    return (q, r);\n}\n\n// Computes value / div as integers and fails if value is not divisible by div.\n// Namely, verifies that 1 <= div < PRIME / rc_bound\n// and returns q such that:\n//   0 <= q < rc_bound and q = value / div.\nfunc safe_div{range_check_ptr}(value: felt, div: felt) -> felt {\n    // floor(PRIME / 2 ** 128).\n    const PRIME_OVER_RC_BOUND = 0x8000000000000110000000000000000;\n    assert [range_check_ptr] = div - 1;\n    assert [range_check_ptr + 1] = div + (2 ** 128 - PRIME_OVER_RC_BOUND);\n    // Prepare the result at the end of the stack.\n    let q = [ap + 1];\n    q = value / div;\n    tempvar range_check_ptr = range_check_ptr + 3;\n    [range_check_ptr - 1] = q, ap++;\n    static_assert &q + 1 == ap;\n    return q;\n}\n\n// Computes first * second if there is no overflow.\n// Namely, returns the product of first and second if:\n//   0 <= first < rc_bound and 0 <= second < PRIME / rc_bound\n// and fails otherwise.\nfunc safe_mult{range_check_ptr}(first: felt, second: felt) -> felt {\n    // floor(PRIME / 2 ** 128).\n    const PRIME_OVER_RC_BOUND = 0x8000000000000110000000000000000;\n    assert [range_check_ptr] = first;\n    assert [range_check_ptr + 1] = second;\n    assert [range_check_ptr + 2] = second + (2 ** 128 - PRIME_OVER_RC_BOUND);\n    let range_check_ptr = range_check_ptr + 3;\n    return first * second;\n}\n\n// Splits the given (unsigned) value into n \"limbs\", where each limb is in the range [0, bound),\n// as follows:\n//   value = x[0] + x[1] * base + x[2] * base**2 + ... + x[n - 1] * base**(n - 1).\n// bound must be less than the range check bound (2**128).\n// Note that bound may be smaller than base, in which case the function will fail if there is a\n// limb which is >= bound.\n// Assumptions:\n//   1 < bound <= base\n//   base**n < field characteristic.\nfunc split_int{range_check_ptr}(value, n, base, bound, output: felt*) {\n    if (n == 0) {\n        %{ assert ids.value == 0, 'split_int(): value is out of range.' %}\n        assert value = 0;\n        return ();\n    }\n\n    %{\n        memory[ids.output] = res = (int(ids.value) % PRIME) % ids.base\n        assert res < ids.bound, f'split_int(): Limb {res} is out of range.'\n    %}\n    tempvar low_part = [output];\n    assert_nn_le(low_part, bound - 1);\n\n    return split_int(\n        value=(value - low_part) / base, n=n - 1, base=base, bound=bound, output=output + 1\n    );\n}\n\n// Returns the floor value of the square root of the given value.\n// Assumptions: 0 <= value < 2**250.\n@known_ap_change\nfunc sqrt{range_check_ptr}(value) -> felt {\n    alloc_locals;\n    local root: felt;\n\n    %{\n        from starkware.python.math_utils import isqrt\n        value = ids.value % PRIME\n        assert value < 2 ** 250, f\"value={value} is outside of the range [0, 2**250).\"\n        assert 2 ** 250 < PRIME\n        ids.root = isqrt(value)\n    %}\n\n    assert_nn_le(root, 2 ** 125 - 1);\n    tempvar root_plus_one = root + 1;\n    assert_in_range(value, root * root, root_plus_one * root_plus_one);\n\n    return root;\n}\n\n// Computes the evaluation of a polynomial on the given point.\nfunc horner_eval(n_coefficients: felt, coefficients: felt*, point: felt) -> (res: felt) {\n    if (n_coefficients == 0) {\n        return (res=0);\n    }\n\n    let (n_minus_one_res) = horner_eval(\n        n_coefficients=n_coefficients - 1, coefficients=&coefficients[1], point=point\n    );\n    return (res=n_minus_one_res * point + coefficients[0]);\n}\n\n// Returns TRUE if `x` is a quadratic residue modulo the STARK prime. Returns FALSE otherwise.\n// Returns TRUE on 0.\n@known_ap_change\nfunc is_quad_residue(x: felt) -> felt {\n    alloc_locals;\n    local y;\n    %{\n        from starkware.crypto.signature.signature import FIELD_PRIME\n        from starkware.python.math_utils import div_mod, is_quad_residue, sqrt\n\n        x = ids.x\n        if is_quad_residue(x, FIELD_PRIME):\n            ids.y = sqrt(x, FIELD_PRIME)\n        else:\n            ids.y = sqrt(div_mod(x, 3, FIELD_PRIME), FIELD_PRIME)\n    %}\n    // Relies on the fact that 3 is not a quadratic residue modulo the prime, so for every field\n    // element x, either:\n    //   * x is a quadratic residue and there exists y such that y^2 = x.\n    //   * x is not a quadratic residue and there exists y such that 3 * y^2 = x.\n    tempvar y_squared = y * y;\n    if (y_squared == x) {\n        ap += 1;\n        return TRUE;\n    } else {\n        assert 3 * y_squared = x;\n        return FALSE;\n    }\n}\n\n// Asserts that x = 2^n for some 0 <= n <= max_pow.\nfunc assert_is_power_of_2(x: felt, max_pow: felt) {\n    if (max_pow == 0) {\n        assert x = 1;\n    }\n    if (x == 1) {\n        return ();\n    }\n    return assert_is_power_of_2(x=x / 2, max_pow=max_pow - 1);\n}\n",
            "/var/lib/engflow/worker/exec/src/starkware/cairo/common/math_cmp.cairo": "from starkware.cairo.common.math import assert_le_felt, assert_lt_felt\n\nconst RC_BOUND = 2 ** 128;\n\n// Returns 1 if value != 0. Returns 0 otherwise.\n@known_ap_change\nfunc is_not_zero(value) -> felt {\n    if (value == 0) {\n        return 0;\n    }\n\n    return 1;\n}\n\n// Returns 1 if a >= 0 (or more precisely 0 <= a < RANGE_CHECK_BOUND).\n// Returns 0 otherwise.\n@known_ap_change\nfunc is_nn{range_check_ptr}(a) -> felt {\n    %{ memory[ap] = 0 if 0 <= (ids.a % PRIME) < range_check_builtin.bound else 1 %}\n    jmp out_of_range if [ap] != 0, ap++;\n    [range_check_ptr] = a;\n    ap += 20;\n    let range_check_ptr = range_check_ptr + 1;\n    return 1;\n\n    out_of_range:\n    %{ memory[ap] = 0 if 0 <= ((-ids.a - 1) % PRIME) < range_check_builtin.bound else 1 %}\n    jmp need_felt_comparison if [ap] != 0, ap++;\n    assert [range_check_ptr] = (-a) - 1;\n    ap += 17;\n    let range_check_ptr = range_check_ptr + 1;\n    return 0;\n\n    need_felt_comparison:\n    assert_le_felt(RC_BOUND, a);\n    return 0;\n}\n\n// Returns 1 if a <= b (or more precisely 0 <= b - a < RANGE_CHECK_BOUND).\n// Returns 0 otherwise.\n@known_ap_change\nfunc is_le{range_check_ptr}(a, b) -> felt {\n    return is_nn(b - a);\n}\n\n// Returns 1 if 0 <= a <= b < RANGE_CHECK_BOUND.\n// Returns 0 otherwise.\n//\n// Assumption: b < RANGE_CHECK_BOUND.\n@known_ap_change\nfunc is_nn_le{range_check_ptr}(a, b) -> felt {\n    let res = is_nn(a);\n    if (res == 0) {\n        ap += 25;\n        return res;\n    }\n    return is_nn(b - a);\n}\n\n// Returns 1 if value is in the range [lower, upper).\n// Returns 0 otherwise.\n// Assumptions:\n//   upper - lower <= RANGE_CHECK_BOUND.\n@known_ap_change\nfunc is_in_range{range_check_ptr}(value, lower, upper) -> felt {\n    let res = is_le(lower, value);\n    if (res == 0) {\n        ap += 26;\n        return res;\n    }\n    return is_nn(upper - 1 - value);\n}\n\n// Checks if the unsigned integer lift (as a number in the range [0, PRIME)) of a is lower than\n// or equal to that of b.\n// See split_felt() for more details.\n// Returns 1 if true, 0 otherwise.\n// TODO(spapini,14/02/2021): Consider adding unsigned to the name of this function and\n//   the asset_le_felt function.\n@known_ap_change\nfunc is_le_felt{range_check_ptr}(a, b) -> felt {\n    %{ memory[ap] = 0 if (ids.a % PRIME) <= (ids.b % PRIME) else 1 %}\n    jmp not_le if [ap] != 0, ap++;\n    ap += 6;\n    assert_le_felt(a, b);\n    return 1;\n\n    not_le:\n    assert_lt_felt(b, a);\n    return 0;\n}\n",
            "/var/lib/engflow/worker/exec/src/starkware/cairo/common/memcpy.cairo": "// Copies len field elements from src to dst.\nfunc memcpy(dst: felt*, src: felt*, len) {\n    struct LoopFrame {\n        dst: felt*,\n        src: felt*,\n    }\n\n    if (len == 0) {\n        return ();\n    }\n\n    %{ vm_enter_scope({'n': ids.len}) %}\n    tempvar frame = LoopFrame(dst=dst, src=src);\n\n    loop:\n    let frame = [cast(ap - LoopFrame.SIZE, LoopFrame*)];\n    assert [frame.dst] = [frame.src];\n\n    let continue_copying = [ap];\n    // Reserve space for continue_copying.\n    let next_frame = cast(ap + 1, LoopFrame*);\n    next_frame.dst = frame.dst + 1, ap++;\n    next_frame.src = frame.src + 1, ap++;\n    %{\n        n -= 1\n        ids.continue_copying = 1 if n > 0 else 0\n    %}\n    static_assert next_frame + LoopFrame.SIZE == ap + 1;\n    jmp loop if continue_copying != 0, ap++;\n    // Assert that the loop executed len times.\n    len = cast(next_frame.src, felt) - cast(src, felt);\n\n    %{ vm_exit_scope() %}\n    return ();\n}\n",
            "/var/lib/engflow/worker/exec/src/starkware/cairo/common/memset.cairo": "// Writes value into [dst + 0], ..., [dst + n - 1].\nfunc memset(dst: felt*, value: felt, n) {\n    struct LoopFrame {\n        dst: felt*,\n    }\n\n    if (n == 0) {\n        return ();\n    }\n\n    %{ vm_enter_scope({'n': ids.n}) %}\n    tempvar frame = LoopFrame(dst=dst);\n\n    loop:\n    let frame = [cast(ap - LoopFrame.SIZE, LoopFrame*)];\n    assert [frame.dst] = value;\n\n    let continue_loop = [ap];\n    // Reserve space for continue_loop.\n    let next_frame = cast(ap + 1, LoopFrame*);\n    next_frame.dst = frame.dst + 1, ap++;\n    %{\n        n -= 1\n        ids.continue_loop = 1 if n > 0 else 0\n    %}\n    static_assert next_frame + LoopFrame.SIZE == ap + 1;\n    jmp loop if continue_loop != 0, ap++;\n    // Assert that the loop executed n times.\n    n = cast(next_frame.dst, felt) - cast(dst, felt);\n\n    %{ vm_exit_scope() %}\n    return ();\n}\n",
            "/var/lib/engflow/worker/exec/src/starkware/cairo/common/poseidon_state.cairo": "// Represents a Poseidon state.\nstruct PoseidonBuiltinState {\n    s0: felt,\n    s1: felt,\n    s2: felt,\n}\n",
            "/var/lib/engflow/worker/exec/src/starkware/cairo/common/pow.cairo": "from starkware.cairo.common.math import assert_le, sign\nfrom starkware.cairo.common.registers import get_ap, get_fp_and_pc\n\n// Returns base ** exp, for 0 <= exp < 2**251.\nfunc pow{range_check_ptr}(base, exp) -> (res: felt) {\n    struct LoopLocals {\n        bit: felt,\n        temp0: felt,\n\n        res: felt,\n        base: felt,\n        exp: felt,\n    }\n\n    if (exp == 0) {\n        return (res=1);\n    }\n\n    let initial_locs: LoopLocals* = cast(fp - 2, LoopLocals*);\n    initial_locs.res = 1, ap++;\n    initial_locs.base = base, ap++;\n    initial_locs.exp = exp, ap++;\n\n    loop:\n    let prev_locs: LoopLocals* = cast(ap - LoopLocals.SIZE, LoopLocals*);\n    let locs: LoopLocals* = cast(ap, LoopLocals*);\n    locs.base = prev_locs.base * prev_locs.base, ap++;\n    %{ ids.locs.bit = (ids.prev_locs.exp % PRIME) & 1 %}\n    jmp odd if locs.bit != 0, ap++;\n\n    even:\n    locs.exp = prev_locs.exp / 2, ap++;\n    locs.res = prev_locs.res, ap++;\n    // exp cannot be 0 here.\n    static_assert ap + 1 == locs + LoopLocals.SIZE;\n    jmp loop, ap++;\n\n    odd:\n    locs.temp0 = prev_locs.exp - 1;\n    locs.exp = locs.temp0 / 2, ap++;\n    locs.res = prev_locs.res * prev_locs.base, ap++;\n    static_assert ap + 1 == locs + LoopLocals.SIZE;\n    jmp loop if locs.exp != 0, ap++;\n\n    // Cap the number of steps.\n    let (__ap__) = get_ap();\n    let (__fp__, _) = get_fp_and_pc();\n    let n_steps = (__ap__ - cast(initial_locs, felt*)) / LoopLocals.SIZE - 1;\n    assert_le(n_steps, 251);\n    return (res=locs.res);\n}\n\n// Returns base ** exp, for -rc_bound < exp < rc_bound.\n// exp < PRIME / 2 is considered positive and exp > PRIME / 2 is considered negative.\nfunc signed_pow{range_check_ptr}(base, exp) -> felt {\n    let exp_sign = sign(exp);\n    if (exp_sign == -1) {\n        %{ assert ids.base != 0, \"Cannot raise 0 to a negative power.\" %}\n        let pos_exp = exp * (-1);\n        let (pow_res) = pow(base, pos_exp);\n        return 1 / pow_res;\n    }\n    let (res) = pow(base, exp);\n    return res;\n}\n",
            "/var/lib/engflow/worker/exec/src/starkware/cairo/common/registers.cairo": "from starkware.cairo.lang.compiler.lib.registers import get_ap, get_fp_and_pc\n\n// Takes the value of a label (relative to program base) and returns the actual runtime address of\n// that label in the memory.\n//\n// Usage example:\n//\n// func do_callback(...) {\n//     ...\n// }\n//\n// func do_thing_then_callback(callback) {\n//     ...\n//     call abs callback;\n// }\n//\n// func main() {\n//     let (callback_address) = get_label_location(do_callback);\n//     do_thing_then_callback(callback=callback_address);\n// }\nfunc get_label_location(label_value: codeoffset) -> (res: felt*) {\n    let (_, pc_val) = get_fp_and_pc();\n\n    ret_pc_label:\n    return (res=pc_val + (label_value - ret_pc_label));\n}\n",
            "/var/lib/engflow/worker/exec/src/starkware/cairo/common/serialize.cairo": "// Appends a single word to the output pointer, and returns the pointer to the next output cell.\nfunc serialize_word{output_ptr: felt*}(word) {\n    assert [output_ptr] = word;\n    let output_ptr = output_ptr + 1;\n    return ();\n}\n\n// Array right fold: computes the following:\n//   callback(callback(... callback(value, a[n-1]) ..., a[1]), a[0])\n// Arguments:\n// value - the initial value.\n// array - a pointer to an array.\n// elm_size - the size of an element in the array.\n// n_elms - the number of elements in the array.\n// callback - a function pointer to the callback. Expected signature: (felt, T*) -> felt.\n//\n// Use starkware.cairo.common.registers.get_label_location() to convert a function label to\n// a callback value.\nfunc array_rfold(value, array: felt*, n_elms, elm_size, callback: felt*) -> (res: felt) {\n    if (n_elms == 0) {\n        return (res=value);\n    }\n\n    [ap] = value, ap++;\n    [ap] = array, ap++;\n    call abs callback;\n    // [ap - 1] holds the return value of callback.\n    return array_rfold(\n        value=[ap - 1],\n        array=array + elm_size,\n        n_elms=n_elms - 1,\n        elm_size=elm_size,\n        callback=callback,\n    );\n}\n\n// Serializes an array of objects to output_ptr, and returns the pointer to the next output cell.\n// The format is: len(array) || callback(a[0]) || ... || callback(a[n-1]) .\n// Arguments:\n// output_ptr - the pointer to serialize to.\n// array - a pointer to an array.\n// elm_size - the size of an element in the array.\n// n_elms - the number of elements in the array.\n// callback - a function pointer to the serialize function of a single element.\n//   Expected signature: (felt, T*) -> felt.\n// Use starkware.cairo.common.registers.get_label_location() to convert a function label to\n// a callback value.\nfunc serialize_array{output_ptr: felt*}(array: felt*, n_elms, elm_size, callback: felt*) {\n    serialize_word(n_elms);\n    let (output_ptr: felt*) = array_rfold(\n        value=cast(output_ptr, felt),\n        array=array,\n        n_elms=n_elms,\n        elm_size=elm_size,\n        callback=callback,\n    );\n    return ();\n}\n",
            "/var/lib/engflow/worker/exec/src/starkware/cairo/common/uint256.cairo": "from starkware.cairo.common.bitwise import bitwise_and, bitwise_or, bitwise_xor\nfrom starkware.cairo.common.cairo_builtins import BitwiseBuiltin\nfrom starkware.cairo.common.math import (\n    assert_in_range,\n    assert_le,\n    assert_nn_le,\n    assert_not_zero,\n    split_felt,\n)\nfrom starkware.cairo.common.math_cmp import is_le\nfrom starkware.cairo.common.pow import pow\nfrom starkware.cairo.common.registers import get_ap, get_fp_and_pc\n\n// Represents an integer in the range [0, 2^256).\nstruct Uint256 {\n    // The low 128 bits of the value.\n    low: felt,\n    // The high 128 bits of the value.\n    high: felt,\n}\n\nconst SHIFT = 2 ** 128;\nconst ALL_ONES = 2 ** 128 - 1;\nconst HALF_SHIFT = 2 ** 64;\n\n// Verifies that the given integer is valid.\nfunc uint256_check{range_check_ptr}(a: Uint256) {\n    [range_check_ptr] = a.low;\n    [range_check_ptr + 1] = a.high;\n    let range_check_ptr = range_check_ptr + 2;\n    return ();\n}\n\n// Converters.\n\n// Converts a Uint256 value in the range [0, PRIME) to a felt. Fails if value is out of range.\nfunc uint256_to_felt{range_check_ptr}(value: Uint256) -> felt {\n    // The maximal accepted value is PRIME - 1 = -1 = 2**251 + 17 * 2**192 =\n    // SHIFT * (2**123 + 17*2**64).\n    // Denote HIGH_PART = -1 / SHIFT.\n    // If value.low = 0 then value is valid only if value.high <= HIGH_PART.\n    // Otherwise, value is valid if value.high <= HIGH_PART - 1.\n\n    const HIGH_PART = (-1) / SHIFT;\n    // Derive the upper bound based on value.low.\n    if (value.low == 0) {\n        tempvar high_part_max_value = HIGH_PART;\n    } else {\n        tempvar high_part_max_value = HIGH_PART - 1;\n    }\n\n    with_attr error_message(\"OUT_OF_RANGE_UINT256_VALUE\") {\n        // Assert value.high <= high_part_max_value.\n        assert [range_check_ptr] = high_part_max_value - value.high;\n        let range_check_ptr = range_check_ptr + 1;\n    }\n    // Express the value as felt.\n    return value.high * SHIFT + value.low;\n}\n\n// Converts a felt to a uint256.\nfunc felt_to_uint256{range_check_ptr}(value: felt) -> Uint256 {\n    let (high, low) = split_felt(value=value);\n    return (Uint256(low=low, high=high));\n}\n\n// Arithmetics.\n\n// Adds two integers. Returns the result as a 256-bit integer and the (1-bit) carry.\nfunc uint256_add{range_check_ptr}(a: Uint256, b: Uint256) -> (res: Uint256, carry: felt) {\n    alloc_locals;\n    local res: Uint256;\n    local carry_low: felt;\n    local carry_high: felt;\n    %{\n        sum_low = ids.a.low + ids.b.low\n        ids.carry_low = 1 if sum_low >= ids.SHIFT else 0\n        sum_high = ids.a.high + ids.b.high + ids.carry_low\n        ids.carry_high = 1 if sum_high >= ids.SHIFT else 0\n    %}\n\n    assert carry_low * carry_low = carry_low;\n    assert carry_high * carry_high = carry_high;\n\n    assert res.low = a.low + b.low - carry_low * SHIFT;\n    assert res.high = a.high + b.high + carry_low - carry_high * SHIFT;\n    uint256_check(res);\n\n    return (res, carry_high);\n}\n\n// Splits a field element in the range [0, 2^192) to its low 64-bit and high 128-bit parts.\n// Soundness guarantee: a is in the range [0, 2^192).\nfunc split_64{range_check_ptr}(a: felt) -> (low: felt, high: felt) {\n    alloc_locals;\n    local low: felt;\n    local high: felt;\n\n    %{\n        ids.low = ids.a & ((1<<64) - 1)\n        ids.high = ids.a >> 64\n    %}\n    assert a = low + high * HALF_SHIFT;\n    assert [range_check_ptr + 0] = low;\n    assert [range_check_ptr + 1] = HALF_SHIFT - 1 - low;\n    assert [range_check_ptr + 2] = high;\n    let range_check_ptr = range_check_ptr + 3;\n    return (low, high);\n}\n\n// Multiplies two integers. Returns the result as two 256-bit integers (low and high parts).\nfunc uint256_mul{range_check_ptr}(a: Uint256, b: Uint256) -> (low: Uint256, high: Uint256) {\n    alloc_locals;\n    let (a0, a1) = split_64(a.low);\n    let (a2, a3) = split_64(a.high);\n    let (b0, b1) = split_64(b.low);\n    let (b2, b3) = split_64(b.high);\n\n    let (res0, carry) = split_64(a0 * b0);\n    let (res1, carry) = split_64(a1 * b0 + a0 * b1 + carry);\n    let (res2, carry) = split_64(a2 * b0 + a1 * b1 + a0 * b2 + carry);\n    let (res3, carry) = split_64(a3 * b0 + a2 * b1 + a1 * b2 + a0 * b3 + carry);\n    let (res4, carry) = split_64(a3 * b1 + a2 * b2 + a1 * b3 + carry);\n    let (res5, carry) = split_64(a3 * b2 + a2 * b3 + carry);\n    let (res6, carry) = split_64(a3 * b3 + carry);\n\n    return (\n        low=Uint256(low=res0 + HALF_SHIFT * res1, high=res2 + HALF_SHIFT * res3),\n        high=Uint256(low=res4 + HALF_SHIFT * res5, high=res6 + HALF_SHIFT * carry),\n    );\n}\n\n// Returns the floor value of the square root of a uint256 integer.\nfunc uint256_sqrt{range_check_ptr}(n: Uint256) -> (res: Uint256) {\n    alloc_locals;\n    local root: Uint256;\n\n    %{\n        from starkware.python.math_utils import isqrt\n        n = (ids.n.high << 128) + ids.n.low\n        root = isqrt(n)\n        assert 0 <= root < 2 ** 128\n        ids.root.low = root\n        ids.root.high = 0\n    %}\n\n    // Verify that 0 <= root < 2**128.\n    assert root.high = 0;\n    [range_check_ptr] = root.low;\n    let range_check_ptr = range_check_ptr + 1;\n\n    // Verify that n >= root**2.\n    let (root_squared, carry) = uint256_mul(root, root);\n    assert carry = Uint256(0, 0);\n    let (check_lower_bound) = uint256_le(root_squared, n);\n    assert check_lower_bound = 1;\n\n    // Verify that n <= (root+1)**2 - 1.\n    // In the case where root = 2**128 - 1, we will have next_root_squared=0.\n    // Since (root+1)**2 = 2**256. Therefore next_root_squared - 1 = 2**256 - 1, as desired.\n    let (next_root, add_carry) = uint256_add(root, Uint256(1, 0));\n    assert add_carry = 0;\n    let (next_root_squared, _) = uint256_mul(next_root, next_root);\n    let (next_root_squared_minus_one) = uint256_sub(next_root_squared, Uint256(1, 0));\n    let (check_upper_bound) = uint256_le(n, next_root_squared_minus_one);\n    assert check_upper_bound = 1;\n\n    return (res=root);\n}\n\n// Returns 1 if the first unsigned integer is less than the second unsigned integer.\nfunc uint256_lt{range_check_ptr}(a: Uint256, b: Uint256) -> (res: felt) {\n    if (a.high == b.high) {\n        return (is_le(a.low + 1, b.low),);\n    }\n    return (is_le(a.high + 1, b.high),);\n}\n\n// Returns 1 if the first signed integer is less than the second signed integer.\nfunc uint256_signed_lt{range_check_ptr}(a: Uint256, b: Uint256) -> (res: felt) {\n    let (a, _) = uint256_add(a, cast((low=0, high=2 ** 127), Uint256));\n    let (b, _) = uint256_add(b, cast((low=0, high=2 ** 127), Uint256));\n    return uint256_lt(a, b);\n}\n\n// Returns 1 if the first unsigned integer is less than or equal to the second unsigned integer.\nfunc uint256_le{range_check_ptr}(a: Uint256, b: Uint256) -> (res: felt) {\n    let (not_le) = uint256_lt(a=b, b=a);\n    return (res=1 - not_le);\n}\n\n// Returns 1 if the first signed integer is less than or equal to the second signed integer.\nfunc uint256_signed_le{range_check_ptr}(a: Uint256, b: Uint256) -> (res: felt) {\n    let (not_le) = uint256_signed_lt(a=b, b=a);\n    return (res=1 - not_le);\n}\n\n// Returns 1 if the signed integer is nonnegative.\n@known_ap_change\nfunc uint256_signed_nn{range_check_ptr}(a: Uint256) -> (res: felt) {\n    %{ memory[ap] = 1 if 0 <= (ids.a.high % PRIME) < 2 ** 127 else 0 %}\n    jmp non_negative if [ap] != 0, ap++;\n\n    assert [range_check_ptr] = a.high - 2 ** 127;\n    let range_check_ptr = range_check_ptr + 1;\n    return (res=0);\n\n    non_negative:\n    assert [range_check_ptr] = a.high + 2 ** 127;\n    let range_check_ptr = range_check_ptr + 1;\n    return (res=1);\n}\n\n// Returns 1 if the first signed integer is less than or equal to the second signed integer\n// and is greater than or equal to zero.\nfunc uint256_signed_nn_le{range_check_ptr}(a: Uint256, b: Uint256) -> (res: felt) {\n    let (is_le) = uint256_signed_le(a=a, b=b);\n    if (is_le == 0) {\n        return (res=0);\n    }\n    let (is_nn) = uint256_signed_nn(a=a);\n    return (res=is_nn);\n}\n\n// Unsigned integer division between two integers. Returns the quotient and the remainder.\n// Conforms to EVM specifications: division by 0 yields 0.\nfunc uint256_unsigned_div_rem{range_check_ptr}(a: Uint256, div: Uint256) -> (\n    quotient: Uint256, remainder: Uint256\n) {\n    alloc_locals;\n\n    // If div == 0, return (0, 0).\n    if (div.low + div.high == 0) {\n        return (quotient=Uint256(0, 0), remainder=Uint256(0, 0));\n    }\n\n    // Guess the quotient and the remainder.\n    local quotient: Uint256;\n    local remainder: Uint256;\n    %{\n        a = (ids.a.high << 128) + ids.a.low\n        div = (ids.div.high << 128) + ids.div.low\n        quotient, remainder = divmod(a, div)\n\n        ids.quotient.low = quotient & ((1 << 128) - 1)\n        ids.quotient.high = quotient >> 128\n        ids.remainder.low = remainder & ((1 << 128) - 1)\n        ids.remainder.high = remainder >> 128\n    %}\n    uint256_check(quotient);\n    uint256_check(remainder);\n    let (res_mul, carry) = uint256_mul(quotient, div);\n    assert carry = Uint256(0, 0);\n\n    let (check_val, add_carry) = uint256_add(res_mul, remainder);\n    assert check_val = a;\n    assert add_carry = 0;\n\n    let (is_valid) = uint256_lt(remainder, div);\n    assert is_valid = 1;\n    return (quotient=quotient, remainder=remainder);\n}\n\n// Computes:\n// 1. The integer division `(a * b) // div` (as a 512-bit number).\n// 2. The remainder `(a * b) modulo div`.\n// Assumption: div != 0.\nfunc uint256_mul_div_mod{range_check_ptr}(a: Uint256, b: Uint256, div: Uint256) -> (\n    quotient_low: Uint256, quotient_high: Uint256, remainder: Uint256\n) {\n    alloc_locals;\n\n    // Compute a * b (512 bits).\n    let (ab_low, ab_high) = uint256_mul(a, b);\n\n    // Guess the quotient and remainder of (a * b) / d.\n    local quotient_low: Uint256;\n    local quotient_high: Uint256;\n    local remainder: Uint256;\n\n    %{\n        a = (ids.a.high << 128) + ids.a.low\n        b = (ids.b.high << 128) + ids.b.low\n        div = (ids.div.high << 128) + ids.div.low\n        quotient, remainder = divmod(a * b, div)\n\n        ids.quotient_low.low = quotient & ((1 << 128) - 1)\n        ids.quotient_low.high = (quotient >> 128) & ((1 << 128) - 1)\n        ids.quotient_high.low = (quotient >> 256) & ((1 << 128) - 1)\n        ids.quotient_high.high = quotient >> 384\n        ids.remainder.low = remainder & ((1 << 128) - 1)\n        ids.remainder.high = remainder >> 128\n    %}\n\n    // Compute x = quotient * div + remainder.\n    uint256_check(quotient_high);\n    let (quotient_mod10, quotient_mod11) = uint256_mul(quotient_high, div);\n    uint256_check(quotient_low);\n    let (quotient_mod00, quotient_mod01) = uint256_mul(quotient_low, div);\n    // Since x should equal a * b, the high 256 bits must be zero.\n    assert quotient_mod11 = Uint256(0, 0);\n\n    // The low 256 bits of x must be ab_low.\n    uint256_check(remainder);\n    let (x0, carry0) = uint256_add(quotient_mod00, remainder);\n    assert x0 = ab_low;\n\n    let (x1, carry1) = uint256_add(quotient_mod01, quotient_mod10);\n    assert carry1 = 0;\n    let (x1, carry2) = uint256_add(x1, Uint256(low=carry0, high=0));\n    assert carry2 = 0;\n\n    assert x1 = ab_high;\n\n    // Verify that 0 <= remainder < div.\n    let (is_valid) = uint256_lt(remainder, div);\n    assert is_valid = 1;\n\n    return (quotient_low=quotient_low, quotient_high=quotient_high, remainder=remainder);\n}\n\n// Returns the bitwise NOT of an integer.\nfunc uint256_not{range_check_ptr}(a: Uint256) -> (res: Uint256) {\n    return (res=Uint256(low=ALL_ONES - a.low, high=ALL_ONES - a.high));\n}\n\n// Returns the negation of an integer.\n// Note that the negation of -2**255 is -2**255.\nfunc uint256_neg{range_check_ptr}(a: Uint256) -> (res: Uint256) {\n    let (not_num) = uint256_not(a);\n    let (res, _) = uint256_add(not_num, Uint256(low=1, high=0));\n    return (res=res);\n}\n\n// Conditionally negates an integer.\nfunc uint256_cond_neg{range_check_ptr}(a: Uint256, should_neg) -> (res: Uint256) {\n    if (should_neg != 0) {\n        return uint256_neg(a);\n    } else {\n        return (res=a);\n    }\n}\n\n// Signed integer division between two integers. Returns the quotient and the remainder.\n// Conforms to EVM specifications.\n// See ethereum yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf, page 29).\n// Note that the remainder may be negative if one of the inputs is negative and that\n// (-2**255) / (-1) = -2**255 because 2*255 is out of range.\nfunc uint256_signed_div_rem{range_check_ptr}(a: Uint256, div: Uint256) -> (\n    quot: Uint256, rem: Uint256\n) {\n    alloc_locals;\n\n    // When div=-1, simply return -a.\n    if (div.low == SHIFT - 1 and div.high == SHIFT - 1) {\n        let (quot) = uint256_neg(a);\n        return (quot, cast((0, 0), Uint256));\n    }\n\n    // Take the absolute value of a.\n    local a_sign = is_le(2 ** 127, a.high);\n    local range_check_ptr = range_check_ptr;\n    let (local a) = uint256_cond_neg(a, should_neg=a_sign);\n\n    // Take the absolute value of div.\n    local div_sign = is_le(2 ** 127, div.high);\n    local range_check_ptr = range_check_ptr;\n    let (div) = uint256_cond_neg(div, should_neg=div_sign);\n\n    // Unsigned division.\n    let (local quot, local rem) = uint256_unsigned_div_rem(a, div);\n    local range_check_ptr = range_check_ptr;\n\n    // Fix the remainder according to the sign of a.\n    let (rem) = uint256_cond_neg(rem, should_neg=a_sign);\n\n    // Fix the quotient according to the signs of a and div.\n    if (a_sign == div_sign) {\n        return (quot=quot, rem=rem);\n    }\n    let (local quot_neg) = uint256_neg(quot);\n\n    return (quot=quot_neg, rem=rem);\n}\n\n// Subtracts two integers. Returns the result as a 256-bit integer.\nfunc uint256_sub{range_check_ptr}(a: Uint256, b: Uint256) -> (res: Uint256) {\n    let (b_neg) = uint256_neg(b);\n    let (res, _) = uint256_add(a, b_neg);\n    return (res=res);\n}\n\n// Bitwise.\n\n// Return true if both integers are equal.\nfunc uint256_eq{range_check_ptr}(a: Uint256, b: Uint256) -> (res: felt) {\n    if (a.high != b.high) {\n        return (res=0);\n    }\n    if (a.low != b.low) {\n        return (res=0);\n    }\n    return (res=1);\n}\n\n// Computes the bitwise XOR of 2 uint256 integers.\nfunc uint256_xor{range_check_ptr, bitwise_ptr: BitwiseBuiltin*}(a: Uint256, b: Uint256) -> (\n    res: Uint256\n) {\n    let (low) = bitwise_xor(a.low, b.low);\n    let (high) = bitwise_xor(a.high, b.high);\n    return (res=Uint256(low, high));\n}\n\n// Computes the bitwise AND of 2 uint256 integers.\nfunc uint256_and{range_check_ptr, bitwise_ptr: BitwiseBuiltin*}(a: Uint256, b: Uint256) -> (\n    res: Uint256\n) {\n    let (low) = bitwise_and(a.low, b.low);\n    let (high) = bitwise_and(a.high, b.high);\n    return (res=Uint256(low, high));\n}\n\n// Computes the bitwise OR of 2 uint256 integers.\nfunc uint256_or{range_check_ptr, bitwise_ptr: BitwiseBuiltin*}(a: Uint256, b: Uint256) -> (\n    res: Uint256\n) {\n    let (low) = bitwise_or(a.low, b.low);\n    let (high) = bitwise_or(a.high, b.high);\n    return (res=Uint256(low, high));\n}\n\n// Computes 2**exp % 2**256 as a uint256 integer.\nfunc uint256_pow2{range_check_ptr}(exp: Uint256) -> (res: Uint256) {\n    // If exp >= 256, the result will be zero modulo 2**256.\n    let (res) = uint256_lt(exp, Uint256(256, 0));\n    if (res == 0) {\n        return (res=Uint256(0, 0));\n    }\n\n    if (is_le(exp.low, 127) != 0) {\n        let (x) = pow(2, exp.low);\n        return (res=Uint256(x, 0));\n    } else {\n        let (x) = pow(2, exp.low - 128);\n        return (res=Uint256(0, x));\n    }\n}\n\n// Computes the logical left shift of a uint256 integer.\nfunc uint256_shl{range_check_ptr}(a: Uint256, b: Uint256) -> (res: Uint256) {\n    let (c) = uint256_pow2(b);\n    let (res, _) = uint256_mul(a, c);\n    return (res=res);\n}\n\n// Computes the logical right shift of a uint256 integer.\nfunc uint256_shr{range_check_ptr}(a: Uint256, b: Uint256) -> (res: Uint256) {\n    let (c) = uint256_pow2(b);\n    let (res, _) = uint256_unsigned_div_rem(a, c);\n    return (res=res);\n}\n\n// Reverses byte endianness of a 128-bit word.\n//\n// The algorithm works in steps. Generally\u00a0speaking, on the i-th step,\n// we switch between every two consecutive sequences of 2 ** i bytes.\n// To illustrate how it works, here are the steps when running\n// on a 64-bit word = [b0, b1, b2, b3, b4, b5, b6, b7] (3 steps instead of 4):\n//\n// step 1:\n// [b0, b1, b2, b3, b4, b5, b6, b7] -\n// [b0,\u00a00,\u00a0 b2, 0,\u00a0 b4, 0,\u00a0 b6, 0 ] +\n// [0,\u00a0 0,\u00a0 b0, 0,\u00a0 b2, 0,\u00a0 b4, 0,  b6] =\n// [0,\u00a0 b1, b0, b3, b2, b5, b4, b7, b6]\n//\n// step 2:\n// [0, b1, b0, b3, b2, b5, b4, b7, b6] -\n// [0, b1, b0, 0,\u00a0 0,\u00a0 b5, b4, 0,\u00a0 0 ]\u00a0+\n// [0, 0,\u00a0 0,\u00a0\u00a00,\u00a0 0,\u00a0\u00a0b1, b0, 0,\u00a0\u00a00,\u00a0 b5, b4] =\n// [0, 0,\u00a0 0,\u00a0\u00a0b3, b2, b1, b0,\u00a0b7, b6, b5, b4]\n//\n// step 3:\n// [0, 0, 0, b3, b2, b1, b0,\u00a0b7, b6, b5, b4] -\n// [0, 0, 0, b3, b2, b1, b0, 0,\u00a0 0,\u00a0\u00a00,\u00a0\u00a00 ] +\n// [0, 0, 0, 0,\u00a0 0,\u00a0\u00a00,\u00a0\u00a00,\u00a0\u00a00,\u00a0\u00a00,\u00a0\u00a00,\u00a0\u00a00,  b3, b2, b1, b0] =\n// [0, 0, 0, 0,\u00a0 0,\u00a0\u00a00,\u00a0\u00a00,\u00a0\u00a0b7, b6, b5, b4, b3, b2, b1, b0]\n//\n// Next, we divide by 2 ** (8\u00a0+ 16\u00a0+ 32) and get [b7, b6, b5, b4, b3, b2, b1, b0].\nfunc word_reverse_endian{bitwise_ptr: BitwiseBuiltin*}(word: felt) -> (res: felt) {\n    // Step 1.\n    assert bitwise_ptr[0].x = word;\n    assert bitwise_ptr[0].y = 0x00ff00ff00ff00ff00ff00ff00ff00ff;\n    tempvar word = word + (2 ** 16 - 1) * bitwise_ptr[0].x_and_y;\n    // Step 2.\n    assert bitwise_ptr[1].x = word;\n    assert bitwise_ptr[1].y = 0x00ffff0000ffff0000ffff0000ffff00;\n    tempvar word = word + (2 ** 32 - 1) * bitwise_ptr[1].x_and_y;\n    // Step 3.\n    assert bitwise_ptr[2].x = word;\n    assert bitwise_ptr[2].y = 0x00ffffffff00000000ffffffff000000;\n    tempvar word = word + (2 ** 64 - 1) * bitwise_ptr[2].x_and_y;\n    // Step 4.\n    assert bitwise_ptr[3].x = word;\n    assert bitwise_ptr[3].y = 0x00ffffffffffffffff00000000000000;\n    tempvar word = word + (2 ** 128 - 1) * bitwise_ptr[3].x_and_y;\n\n    let bitwise_ptr = bitwise_ptr + 4 * BitwiseBuiltin.SIZE;\n    return (res=word / 2 ** (8 + 16 + 32 + 64));\n}\n\n// Reverses byte endianness of a uint256 integer.\nfunc uint256_reverse_endian{bitwise_ptr: BitwiseBuiltin*}(num: Uint256) -> (res: Uint256) {\n    let (high) = word_reverse_endian(num.high);\n    let (low) = word_reverse_endian(num.low);\n\n    return (res=Uint256(low=high, high=low));\n}\n\n// Assertions:\n\nfunc assert_uint256_eq{range_check_ptr}(a: Uint256, b: Uint256) {\n    let (res) = uint256_eq(a, b);\n    with_attr error_message(\"assert_uint256_eq failed\") {\n        assert res = 1;\n    }\n    return ();\n}\n\nfunc assert_uint256_lt{range_check_ptr}(a: Uint256, b: Uint256) {\n    let (res) = uint256_lt(a, b);\n    with_attr error_message(\"assert_uint256_lt failed\") {\n        assert res = 1;\n    }\n    return ();\n}\n\nfunc assert_uint256_le{range_check_ptr}(a: Uint256, b: Uint256) {\n    let (res) = uint256_le(a, b);\n    with_attr error_message(\"assert_uint256_le failed\") {\n        assert res = 1;\n    }\n    return ();\n}\n",
            "/var/lib/engflow/worker/exec/src/starkware/cairo/common/usort.cairo": "from starkware.cairo.common.alloc import alloc\nfrom starkware.cairo.common.math import assert_lt, assert_nn\n\n// Sorts an array of field elements and removes duplicates.\n// Returns the sorted array and an array of multiplicities.\n// multiplicities[i] is the number of times that output[i] appeared in input.\n// Completeness assumption: All numbers are in [0, RANGE_CHECK_BOUND).\nfunc usort{range_check_ptr}(input_len: felt, input: felt*) -> (\n    output_len: felt, output: felt*, multiplicities: felt*\n) {\n    alloc_locals;\n    local output_len;\n    local output: felt*;\n    local multiplicities: felt*;\n    %{ vm_enter_scope(dict(__usort_max_size = globals().get('__usort_max_size'))) %}\n    %{\n        from collections import defaultdict\n\n        input_ptr = ids.input\n        input_len = int(ids.input_len)\n        if __usort_max_size is not None:\n            assert input_len <= __usort_max_size, (\n                f\"usort() can only be used with input_len<={__usort_max_size}. \"\n                f\"Got: input_len={input_len}.\"\n            )\n\n        positions_dict = defaultdict(list)\n        for i in range(input_len):\n            val = memory[input_ptr + i]\n            positions_dict[val].append(i)\n\n        output = sorted(positions_dict.keys())\n        ids.output_len = len(output)\n        ids.output = segments.gen_arg(output)\n        ids.multiplicities = segments.gen_arg([len(positions_dict[k]) for k in output])\n    %}\n\n    let output_start = output;\n    verify_usort{output=output}(\n        input_len=input_len, input=input, total_visited=0, multiplicities=multiplicities, prev=-1\n    );\n\n    %{ vm_exit_scope() %}\n    return (output_len=output - output_start, output=output_start, multiplicities=multiplicities);\n}\n\n// Verifies that usort of input is (output, multiplicities). See usort().\nfunc verify_usort{range_check_ptr, output: felt*}(\n    input_len: felt, input: felt*, total_visited: felt, multiplicities: felt*, prev: felt\n) {\n    alloc_locals;\n\n    if (total_visited == input_len) {\n        return ();\n    }\n\n    local value = [output];\n    let output = &output[1];\n    assert_lt(prev, value);\n\n    local multiplicity = [multiplicities];\n    assert_nn(multiplicity - 1);\n\n    %{\n        last_pos = 0\n        positions = positions_dict[ids.value][::-1]\n    %}\n    verify_multiplicity(multiplicity=multiplicity, input_len=input_len, input=input, value=value);\n\n    return verify_usort(\n        input_len=input_len,\n        input=input,\n        total_visited=total_visited + multiplicity,\n        multiplicities=&multiplicities[1],\n        prev=value,\n    );\n}\n\n// Verifies that value appears at least multiplicity times in input.\nfunc verify_multiplicity{range_check_ptr}(\n    multiplicity: felt, input_len: felt, input: felt*, value: felt\n) {\n    if (multiplicity == 0) {\n        %{ assert len(positions) == 0 %}\n        assert_nn(input_len);\n        return ();\n    }\n\n    alloc_locals;\n    // Skip to the next appearance.\n    local next_item_index;\n    %{\n        current_pos = positions.pop()\n        ids.next_item_index = current_pos - last_pos\n        last_pos = current_pos + 1\n    %}\n    assert_nn(next_item_index);\n    assert input[next_item_index] = value;\n    return verify_multiplicity(\n        multiplicity=multiplicity - 1,\n        input_len=input_len - next_item_index - 1,\n        input=&input[next_item_index + 1],\n        value=value,\n    );\n}\n",
            "/var/lib/engflow/worker/exec/src/starkware/cairo/lang/compiler/lib/registers.cairo": "// Returns the contents of the fp and pc registers of the calling function.\n// The pc register's value is the address of the instruction that follows directly after the\n// invocation of get_fp_and_pc().\nfunc get_fp_and_pc() -> (fp_val: felt*, pc_val: felt*) {\n    // The call instruction itself already places the old fp and the return pc at\n    // [ap - 2], [ap - 1].\n    return (fp_val=cast([ap - 2], felt*), pc_val=cast([ap - 1], felt*));\n}\n\n// Returns the content of the ap register just before this function was invoked.\n@known_ap_change\nfunc get_ap() -> (ap_val: felt*) {\n    // Once get_ap() is invoked, fp points to ap + 2 (since the call instruction placed the old fp\n    // and pc in memory, advancing ap accordingly).\n    // Hence, the desired ap value is fp - 2.\n    let (fp_val, pc_val) = get_fp_and_pc();\n    return (ap_val=fp_val - 2);\n}\n",
            "/var/lib/engflow/worker/exec/src/starkware/cairo/stark_verifier/air/config_instances.cairo": "from starkware.cairo.stark_verifier.core.table_commitment import TableCommitmentConfig\n\nconst MAX_N_COLUMNS = 128;\n\n// Configuration for the Traces component.\nstruct TracesConfig {\n    original: TableCommitmentConfig*,\n    interaction: TableCommitmentConfig*,\n}\n",
            "/var/lib/engflow/worker/exec/src/starkware/cairo/stark_verifier/core/air_instances.cairo": "struct PublicInput {\n}\n\nstruct TracesConfig {\n}\n\nstruct TracesUnsentCommitment {\n}\n\nstruct TracesCommitment {\n}\n\nstruct TracesDecommitment {\n}\n\nstruct TracesWitness {\n}\n\nstruct OodsEvaluationInfo {\n    oods_values: felt*,\n    oods_point: felt,\n    trace_generator: felt,\n    constraint_coefficients: felt*,\n}\n\nstruct AirInstance {\n    // Virtual functions.\n    // Each should be a pointer to a function with the same interface as the function in this file.\n    public_input_hash: felt*,\n    public_input_validate: felt*,\n    traces_config_validate: felt*,\n    traces_commit: felt*,\n    traces_decommit: felt*,\n    traces_eval_composition_polynomial: felt*,\n    eval_oods_boundary_poly_at_points: felt*,\n    // Constants.\n    n_dynamic_params: felt,\n    n_constraints: felt,\n    constraint_degree: felt,\n    mask_size: felt,\n}\n",
            "/var/lib/engflow/worker/exec/src/starkware/cairo/stark_verifier/core/air_interface.cairo": "from starkware.cairo.common.cairo_builtins import BitwiseBuiltin, PoseidonBuiltin\nfrom starkware.cairo.common.hash import HashBuiltin\nfrom starkware.cairo.stark_verifier.air.config_instances import TracesConfig\nfrom starkware.cairo.stark_verifier.core.air_instances import (\n    AirInstance,\n    OodsEvaluationInfo,\n    PublicInput,\n    TracesCommitment,\n    TracesDecommitment,\n    TracesUnsentCommitment,\n    TracesWitness,\n)\nfrom starkware.cairo.stark_verifier.core.channel import Channel\nfrom starkware.cairo.stark_verifier.core.config_instances import StarkConfig\nfrom starkware.cairo.stark_verifier.core.domains import StarkDomains\nfrom starkware.cairo.stark_verifier.core.table_commitment import TableDecommitment\n\nfunc public_input_hash{range_check_ptr, pedersen_ptr: HashBuiltin*, poseidon_ptr: PoseidonBuiltin*}(\n    air: AirInstance*, public_input: PublicInput*, config: StarkConfig*\n) -> (res: felt) {\n    jmp abs air.public_input_hash;\n}\n\nfunc public_input_validate{range_check_ptr}(\n    air: AirInstance*, public_input: PublicInput*, stark_domains: StarkDomains*\n) {\n    jmp abs air.public_input_validate;\n}\n\nfunc traces_config_validate{range_check_ptr}(\n    air: AirInstance*,\n    config: TracesConfig*,\n    log_eval_domain_size: felt,\n    n_verifier_friendly_commitment_layers: felt,\n) {\n    jmp abs air.traces_config_validate;\n}\n\nfunc traces_commit{range_check_ptr, poseidon_ptr: PoseidonBuiltin*, channel: Channel}(\n    air: AirInstance*,\n    public_input: PublicInput*,\n    unsent_commitment: TracesUnsentCommitment*,\n    config: TracesConfig*,\n) -> (commitment: TracesCommitment*) {\n    jmp abs air.traces_commit;\n}\n\nfunc traces_decommit{\n    range_check_ptr,\n    blake2s_ptr: felt*,\n    bitwise_ptr: BitwiseBuiltin*,\n    poseidon_ptr: PoseidonBuiltin*,\n}(\n    air: AirInstance*,\n    n_queries: felt,\n    queries: felt*,\n    commitment: TracesCommitment*,\n    decommitment: TracesDecommitment*,\n    witness: TracesWitness*,\n) {\n    jmp abs air.traces_decommit;\n}\n\nfunc traces_eval_composition_polynomial{range_check_ptr}(\n    air: AirInstance*,\n    commitment: TracesCommitment*,\n    mask_values: felt*,\n    constraint_coefficients: felt*,\n    point: felt,\n    trace_domain_size: felt,\n    trace_generator: felt,\n) -> (res: felt) {\n    jmp abs air.traces_eval_composition_polynomial;\n}\n\nfunc eval_oods_boundary_poly_at_points{range_check_ptr}(\n    air: AirInstance*,\n    public_input: PublicInput*,\n    eval_info: OodsEvaluationInfo*,\n    n_points: felt,\n    points: felt*,\n    decommitment: TracesDecommitment*,\n    composition_decommitment: TableDecommitment*,\n) -> (evaluations: felt*) {\n    jmp abs air.eval_oods_boundary_poly_at_points;\n}\n",
            "/var/lib/engflow/worker/exec/src/starkware/cairo/stark_verifier/core/channel.cairo": "from starkware.cairo.common.alloc import alloc\nfrom starkware.cairo.common.builtin_poseidon.poseidon import poseidon_hash, poseidon_hash_many\nfrom starkware.cairo.common.cairo_builtins import PoseidonBuiltin\nfrom starkware.cairo.common.math import assert_nn, assert_nn_le\nfrom starkware.cairo.stark_verifier.core.serialize_utils import append_felt, append_felts\n\n// The Prover uses Montgomery form with R = 2**256 for field elements. This effects the\n// non-interactive communication in several places.\nconst MONTGOMERY_R = 2 ** 256;\n\n// Represents a non-interactive verifier-friendly communication channel using the Fiat Shamir\n// heuristic.\n// In this context, \"reading from the prover\" means hashing a value into the state.\nstruct Channel {\n    digest: felt,\n    counter: felt,\n}\n\n// A wrapper around felt with a guarantee that the felt must be read from the channel before\n// use.\nstruct ChannelUnsentFelt {\n    value: felt,\n}\n\n// A wrapper around felt with a guarantee that the felt was read from the channel as data from the\n// prover.\nstruct ChannelSentFelt {\n    value: felt,\n}\n\nfunc channel_new(digest: felt) -> (res: Channel) {\n    return (res=Channel(digest=digest, counter=0));\n}\n\n// Generate randomness.\nfunc random_felt_to_prover{range_check_ptr, poseidon_ptr: PoseidonBuiltin*, channel: Channel}() -> (\n    res: felt\n) {\n    alloc_locals;\n    let (felt_to_prover: felt) = poseidon_hash(x=channel.digest, y=channel.counter);\n    let channel = Channel(digest=channel.digest, counter=channel.counter + 1);\n    return (res=felt_to_prover);\n}\n\nfunc random_felts_to_prover{range_check_ptr, poseidon_ptr: PoseidonBuiltin*, channel: Channel}(\n    n_elements: felt, elements: felt*\n) -> () {\n    if (n_elements == 0) {\n        return ();\n    }\n    alloc_locals;\n    let (value: felt) = random_felt_to_prover();\n\n    assert elements[0] = value;\n    return random_felts_to_prover(n_elements=n_elements - 1, elements=&elements[1]);\n}\n\n// Reads a field element from the prover.\nfunc read_felt_from_prover{range_check_ptr, poseidon_ptr: PoseidonBuiltin*, channel: Channel}(\n    value: ChannelUnsentFelt\n) -> (value: ChannelSentFelt) {\n    // Use poseidon_hash_many() instead of poseidon_hash() since the current prover handles all the\n    // data it sends as an array of arbitrary size.\n    let (digest: felt) = poseidon_hash_many(n=2, elements=new (channel.digest + 1, value.value));\n    let channel = Channel(digest=digest, counter=0);\n    return (value=ChannelSentFelt(value.value));\n}\n\n// Reads a 64bit integer from the prover.\nfunc read_uint64_from_prover{range_check_ptr, poseidon_ptr: PoseidonBuiltin*, channel: Channel}(\n    value: ChannelUnsentFelt\n) -> (value: ChannelSentFelt) {\n    assert_nn_le(value.value, 2 ** 64 - 1);\n    return read_felt_from_prover(value);\n}\n\n// Reads a field element vector from the prover. This hashes all the field elements at once.\nfunc read_felt_vector_from_prover{poseidon_ptr: PoseidonBuiltin*, channel: Channel}(\n    n_values: felt, values: ChannelUnsentFelt*\n) -> (values: ChannelSentFelt*) {\n    // For append_felts we assume ChannelUnsentFelt is a struct with one felt.\n    static_assert ChannelUnsentFelt.SIZE == 1;\n    static_assert ChannelSentFelt.SIZE == 1;\n    alloc_locals;\n    let (data: felt*) = alloc();\n    let data_start = data;\n    append_felt{data=data}(channel.digest + 1);\n    append_felts{data=data}(len=n_values, arr=values);\n    let (digest) = poseidon_hash_many(n=(1 + n_values), elements=data_start);\n    let channel = Channel(digest=digest, counter=0);\n    return (values=cast(values, ChannelSentFelt*));\n}\n",
            "/var/lib/engflow/worker/exec/src/starkware/cairo/stark_verifier/core/config.cairo": "from starkware.cairo.common.alloc import alloc\nfrom starkware.cairo.common.math import assert_in_range, assert_le, assert_nn, assert_nn_le\nfrom starkware.cairo.common.pow import pow\nfrom starkware.cairo.stark_verifier.core.air_interface import AirInstance, traces_config_validate\nfrom starkware.cairo.stark_verifier.core.config_instances import (\n    MAX_LOG_BLOWUP_FACTOR,\n    MAX_LOG_TRACE,\n    MAX_N_QUERIES,\n    StarkConfig,\n)\nfrom starkware.cairo.stark_verifier.core.domains import StarkDomains\nfrom starkware.cairo.stark_verifier.core.fri.config import fri_config_validate\nfrom starkware.cairo.stark_verifier.core.proof_of_work import proof_of_work_config_validate\nfrom starkware.cairo.stark_verifier.core.utils import FIELD_GENERATOR\nfrom starkware.cairo.stark_verifier.core.vector_commitment import (\n    VectorCommitmentConfig,\n    validate_vector_commitment,\n)\n\n// Validates the StarkConfig object.\nfunc stark_config_validate{range_check_ptr}(\n    air: AirInstance*, config: StarkConfig*, security_bits: felt\n) {\n    alloc_locals;\n\n    // Proof of work.\n    proof_of_work_config_validate(config=config.proof_of_work);\n\n    // Sanity checks for the configuration. Many of the bounds are somewhat arbitrary.\n    assert_in_range(config.log_trace_domain_size, 1, MAX_LOG_TRACE + 1);\n    assert_nn(security_bits);\n    assert_in_range(config.log_n_cosets, 1, MAX_LOG_BLOWUP_FACTOR + 1);\n    assert_le(config.proof_of_work.n_bits, security_bits);\n    assert_in_range(config.n_queries, 1, MAX_N_QUERIES + 1);\n    assert_nn(config.n_verifier_friendly_commitment_layers);\n\n    // Check security bits.\n    assert_nn_le(\n        security_bits, config.n_queries * config.log_n_cosets + config.proof_of_work.n_bits\n    );\n\n    // Validate traces config.\n    let log_eval_domain_size = config.log_trace_domain_size + config.log_n_cosets;\n    traces_config_validate(\n        air=air,\n        config=config.traces,\n        log_eval_domain_size=log_eval_domain_size,\n        n_verifier_friendly_commitment_layers=config.n_verifier_friendly_commitment_layers,\n    );\n\n    // Validate composition config.\n    assert config.composition.n_columns = air.constraint_degree;\n    validate_vector_commitment(\n        config=config.composition.vector,\n        expected_height=log_eval_domain_size,\n        n_verifier_friendly_commitment_layers=config.n_verifier_friendly_commitment_layers,\n    );\n\n    // Validate Fri config.\n    let (log_expected_degree) = fri_config_validate(\n        config=config.fri,\n        log_n_cosets=config.log_n_cosets,\n        n_verifier_friendly_commitment_layers=config.n_verifier_friendly_commitment_layers,\n    );\n    assert log_expected_degree = config.log_trace_domain_size;\n\n    return ();\n}\n\n// Returns a StarkDomains object with information about the domains.\nfunc stark_domains_create{range_check_ptr}(config: StarkConfig*) -> (stark_domains: StarkDomains*) {\n    alloc_locals;\n\n    // Compute stark_domains.\n    local log_eval_domain_size = config.log_trace_domain_size + config.log_n_cosets;\n    let (eval_domain_size) = pow(2, log_eval_domain_size);\n    let (eval_generator) = pow(FIELD_GENERATOR, (-1) / eval_domain_size);\n    let (trace_domain_size) = pow(2, config.log_trace_domain_size);\n    let (trace_generator) = pow(FIELD_GENERATOR, (-1) / trace_domain_size);\n\n    return (\n        stark_domains=new StarkDomains(\n            log_eval_domain_size=log_eval_domain_size,\n            eval_domain_size=eval_domain_size,\n            eval_generator=eval_generator,\n            log_trace_domain_size=config.log_trace_domain_size,\n            trace_domain_size=trace_domain_size,\n            trace_generator=trace_generator,\n        ),\n    );\n}\n",
            "/var/lib/engflow/worker/exec/src/starkware/cairo/stark_verifier/core/config_instances.cairo": "from starkware.cairo.stark_verifier.air.config_instances import TracesConfig\nfrom starkware.cairo.stark_verifier.core.fri.config import FriConfig\nfrom starkware.cairo.stark_verifier.core.proof_of_work import ProofOfWorkConfig\nfrom starkware.cairo.stark_verifier.core.table_commitment import TableCommitmentConfig\n\nconst MAX_LOG_TRACE = 64;\nconst MAX_LOG_BLOWUP_FACTOR = 16;\nconst MAX_N_QUERIES = 48;\n\nstruct StarkConfig {\n    traces: TracesConfig*,\n    composition: TableCommitmentConfig*,\n    fri: FriConfig*,\n    proof_of_work: ProofOfWorkConfig*,\n\n    // Log2 of the trace domain size.\n    log_trace_domain_size: felt,\n    // Number of queries to the last component, FRI.\n    n_queries: felt,\n    // Log2 of the number of cosets composing the evaluation domain, where the coset size is the\n    // trace length.\n    log_n_cosets: felt,\n    // Number of layers that use a verifier friendly hash in each commitment.\n    n_verifier_friendly_commitment_layers: felt,\n}\n",
            "/var/lib/engflow/worker/exec/src/starkware/cairo/stark_verifier/core/domains.cairo": "// Information about the domains that are used in the stark proof.\nstruct StarkDomains {\n    // Log2 of the evaluation domain size.\n    log_eval_domain_size: felt,\n    // The evaluation domain size.\n    eval_domain_size: felt,\n    // The generator of the evaluation domain (a primitive root of unity of order eval_domain_size).\n    eval_generator: felt,\n    // Log2 of the trace domain size.\n    log_trace_domain_size: felt,\n    // The trace domain size.\n    trace_domain_size: felt,\n    // The generator of the trace domain (a primitive root of unity of order trace_domain_size).\n    trace_generator: felt,\n}\n",
            "/var/lib/engflow/worker/exec/src/starkware/cairo/stark_verifier/core/fri/config.cairo": "from starkware.cairo.common.math import assert_in_range, assert_nn, assert_nn_le\nfrom starkware.cairo.common.pow import pow\nfrom starkware.cairo.stark_verifier.core.table_commitment import TableCommitmentConfig\nfrom starkware.cairo.stark_verifier.core.vector_commitment import validate_vector_commitment\n\n// Constants.\nconst MAX_LAST_LAYER_LOG_DEGREE_BOUND = 15;\nconst MAX_FRI_LAYERS = 15;\nconst MAX_FRI_STEP = 4;\n\n// Configuration for the FRI component.\nstruct FriConfig {\n    // Log2 of the size of the input layer to FRI.\n    log_input_size: felt,\n    // Number of layers in the FRI. Inner + last layer.\n    n_layers: felt,\n    // Array of size n_layers - 1, each entry is a configuration of a table commitment for the\n    // corresponding inner layer.\n    inner_layers: TableCommitmentConfig*,\n    // Array of size n_layers, each entry represents the FRI step size,\n    // i.e. the number of FRI-foldings between layer i and i+1.\n    fri_step_sizes: felt*,\n    log_last_layer_degree_bound: felt,\n}\n\nfunc fri_config_validate{range_check_ptr}(\n    config: FriConfig*, log_n_cosets: felt, n_verifier_friendly_commitment_layers: felt\n) -> (log_expected_degree: felt) {\n    assert_nn_le(config.log_last_layer_degree_bound, MAX_LAST_LAYER_LOG_DEGREE_BOUND);\n    assert_in_range(config.n_layers, 2, MAX_FRI_LAYERS + 1);\n    assert config.fri_step_sizes[0] = 0;\n    let (sum_of_step_sizes) = fri_layers_config_validate(\n        n_layers=config.n_layers - 1,\n        layers=config.inner_layers,\n        fri_step_sizes=&config.fri_step_sizes[1],\n        log_input_size=config.log_input_size - config.fri_step_sizes[0],\n        n_verifier_friendly_commitment_layers=n_verifier_friendly_commitment_layers,\n    );\n    tempvar log_expected_input_degree = sum_of_step_sizes + config.log_last_layer_degree_bound;\n    assert log_expected_input_degree + log_n_cosets = config.log_input_size;\n    return (log_expected_degree=log_expected_input_degree);\n}\n\nfunc fri_layers_config_validate{range_check_ptr}(\n    n_layers: felt,\n    layers: TableCommitmentConfig*,\n    fri_step_sizes: felt*,\n    log_input_size: felt,\n    n_verifier_friendly_commitment_layers: felt,\n) -> (sum_of_step_sizes: felt) {\n    alloc_locals;\n    if (n_layers == 0) {\n        assert_nn(log_input_size);\n        return (sum_of_step_sizes=0);\n    }\n\n    local fri_step = fri_step_sizes[0];\n    assert_in_range(fri_step, 1, MAX_FRI_STEP + 1);\n    let (sum_of_step_sizes) = fri_layers_config_validate(\n        n_layers=n_layers - 1,\n        layers=&layers[1],\n        fri_step_sizes=&fri_step_sizes[1],\n        log_input_size=log_input_size - fri_step,\n        n_verifier_friendly_commitment_layers=n_verifier_friendly_commitment_layers,\n    );\n    let (n_columns) = pow(2, fri_step);\n    assert layers[0].n_columns = n_columns;\n    validate_vector_commitment(\n        config=layers[0].vector,\n        expected_height=log_input_size - fri_step,\n        n_verifier_friendly_commitment_layers=n_verifier_friendly_commitment_layers,\n    );\n    return (sum_of_step_sizes=sum_of_step_sizes + fri_step);\n}\n",
            "/var/lib/engflow/worker/exec/src/starkware/cairo/stark_verifier/core/fri/fri.cairo": "from starkware.cairo.common.alloc import alloc\nfrom starkware.cairo.common.cairo_builtins import BitwiseBuiltin, PoseidonBuiltin\nfrom starkware.cairo.common.math import horner_eval\nfrom starkware.cairo.common.pow import pow\nfrom starkware.cairo.stark_verifier.core.channel import (\n    Channel,\n    ChannelSentFelt,\n    ChannelUnsentFelt,\n    random_felts_to_prover,\n    read_felt_vector_from_prover,\n)\nfrom starkware.cairo.stark_verifier.core.fri.config import FriConfig, fri_config_validate\nfrom starkware.cairo.stark_verifier.core.fri.fri_layer import (\n    FriLayerComputationParams,\n    FriLayerQuery,\n    compute_next_layer,\n    get_fri_group,\n)\nfrom starkware.cairo.stark_verifier.core.table_commitment import (\n    TableCommitment,\n    TableCommitmentConfig,\n    TableCommitmentWitness,\n    TableDecommitment,\n    TableUnsentCommitment,\n    table_commit,\n    table_decommit,\n)\nfrom starkware.cairo.stark_verifier.core.utils import FIELD_GENERATOR\n\n// A FRI phase with N layers starts with a single input layer.\n// Afterwards, there are N - 1 inner layers resulting from FRI-folding each preceding layer.\n// Each such layer has a separate table commitment, for a total of N - 1 commitments.\n// Lastly, there is another FRI-folding resulting in the last FRI layer, that is commited by\n// sending the polynomial coefficients, instead of a table commitment.\n// Each folding has a step size.\n// Illustration:\n// InputLayer, no commitment.\n//   fold step 0\n// InnerLayer 0, Table commitment\n//   fold step 1\n// ...\n// InnerLayer N - 2, Table commitment\n//   fold step N - 1\n// LastLayer, Polynomial coefficients\n//\n// N steps.\n// N - 1 inner layers.\n\n// Commitment values for FRI. Used to generate a commitment by \"reading\" these values\n// from the channel.\nstruct FriUnsentCommitment {\n    // Array of size n_layers - 1 containing unsent table commitments for each inner layer.\n    inner_layers: TableUnsentCommitment*,\n    // Array of size 2**log_last_layer_degree_bound containing coefficients for the last layer\n    // polynomial.\n    last_layer_coefficients: ChannelUnsentFelt*,\n}\n\nstruct FriCommitment {\n    config: FriConfig*,\n    // Array of size n_layers - 1 containing table commitments for each inner layer.\n    inner_layers: TableCommitment**,\n    // Array of size n_layers, of one evaluation point for each layer.\n    eval_points: felt*,\n    // Array of size 2**log_last_layer_degree_bound containing coefficients for the last layer\n    // polynomial.\n    last_layer_coefficients: ChannelSentFelt*,\n}\n\nstruct FriDecommitment {\n    // Number of queries.\n    n_values: felt,\n    // Array of size n_values, containing the values of the input layer at query indices.\n    values: felt*,\n    // Array of size n_values, containing the field elements that correspond to the query indices\n    // (See queries_to_points).\n    points: felt*,\n}\n\n// A witness for the decommitment of the FRI layers over queries.\nstruct FriWitness {\n    // An array of size n_layers - 1, containing a witness for each inner layer.\n    layers: FriLayerWitness*,\n}\n\n// A witness for a single FRI layer. This witness is required to verify the transition from an\n// inner layer to the following layer.\nstruct FriLayerWitness {\n    // Values for the sibling leaves required for decommitment.\n    n_leaves: felt,\n    leaves: felt*,\n    // Table commitment witnesses for decommiting all the leaves.\n    table_witness: TableCommitmentWitness*,\n}\n\n// Commit function of the FRI component.\n// Implements the commit phase of the FRI protocol.\nfunc fri_commit{poseidon_ptr: PoseidonBuiltin*, channel: Channel, range_check_ptr}(\n    unsent_commitment: FriUnsentCommitment*, config: FriConfig*\n) -> (commitment: FriCommitment*) {\n    alloc_locals;\n    let (inner_layer_commitments: TableCommitment**) = alloc();\n    let (eval_points: felt*) = alloc();\n\n    // The first step should be 0, and thus we don't need a point for it.\n    assert config.fri_step_sizes[0] = 0;\n    assert eval_points[0] = 0;\n\n    // Read inner layer commitments and eval_points.\n    fri_commit_rounds(\n        n_layers=config.n_layers - 1,\n        configs=config.inner_layers,\n        unsent_commitments=unsent_commitment.inner_layers,\n        step_sizes=config.fri_step_sizes,\n        commitments=inner_layer_commitments,\n        eval_points=&eval_points[1],\n    );\n\n    // Read last layer coefficients.\n    let (n_coefficients) = pow(2, config.log_last_layer_degree_bound);\n    let (coefficients) = read_felt_vector_from_prover(\n        n_values=n_coefficients, values=unsent_commitment.last_layer_coefficients\n    );\n\n    return (\n        commitment=new FriCommitment(\n            config=config,\n            inner_layers=inner_layer_commitments,\n            eval_points=eval_points,\n            last_layer_coefficients=coefficients,\n        ),\n    );\n}\n\n// Performs FRI commitment phase rounds. Each round reads a commitment on a layer, and sends an\n// evaluation point for the next round.\nfunc fri_commit_rounds{poseidon_ptr: PoseidonBuiltin*, channel: Channel, range_check_ptr}(\n    n_layers: felt,\n    configs: TableCommitmentConfig*,\n    unsent_commitments: TableUnsentCommitment*,\n    step_sizes: felt*,\n    commitments: TableCommitment**,\n    eval_points: felt*,\n) {\n    alloc_locals;\n    if (n_layers == 0) {\n        return ();\n    }\n\n    // Read commitments.\n    let (table_commitment) = table_commit(unsent_commitment=unsent_commitments[0], config=configs);\n    assert commitments[0] = table_commitment;\n\n    // Send the next eval_points.\n    random_felts_to_prover(n_elements=1, elements=eval_points);\n\n    return fri_commit_rounds(\n        n_layers=n_layers - 1,\n        configs=&configs[1],\n        unsent_commitments=&unsent_commitments[1],\n        step_sizes=&step_sizes[1],\n        commitments=&commitments[1],\n        eval_points=&eval_points[1],\n    );\n}\n\n// FRI protocol component decommitment.\nfunc fri_decommit{\n    range_check_ptr,\n    blake2s_ptr: felt*,\n    bitwise_ptr: BitwiseBuiltin*,\n    poseidon_ptr: PoseidonBuiltin*,\n}(\n    n_queries: felt,\n    queries: felt*,\n    commitment: FriCommitment*,\n    decommitment: FriDecommitment*,\n    witness: FriWitness*,\n) {\n    alloc_locals;\n\n    assert n_queries = decommitment.n_values;\n    let fri_first_layer_evaluations = decommitment.values;\n\n    // Compute first FRI layer queries.\n    let (fri_queries: FriLayerQuery*) = alloc();\n    gather_first_layer_queries(\n        n_queries=n_queries,\n        queries=queries,\n        evaluations=decommitment.values,\n        x_values=decommitment.points,\n        fri_queries=fri_queries,\n    );\n\n    // Compute fri_group.\n    let (fri_group) = get_fri_group();\n\n    // Decommit inner layers.\n    let (n_last_queries, last_queries) = fri_decommit_layers(\n        fri_group=fri_group,\n        n_layers=commitment.config.n_layers - 1,\n        commitment=commitment.inner_layers,\n        layer_witness=witness.layers,\n        eval_points=&commitment.eval_points[1],\n        step_sizes=&commitment.config.fri_step_sizes[1],\n        n_queries=n_queries,\n        queries=fri_queries,\n    );\n\n    // Last layer.\n    let (n_coefficients) = pow(2, commitment.config.log_last_layer_degree_bound);\n    verify_last_layer(\n        n_queries=n_last_queries,\n        queries=last_queries,\n        n_coefficients=n_coefficients,\n        coefficients=commitment.last_layer_coefficients,\n    );\n    return ();\n}\n\nfunc gather_first_layer_queries(\n    n_queries: felt,\n    queries: felt*,\n    evaluations: felt*,\n    x_values: felt*,\n    fri_queries: FriLayerQuery*,\n) {\n    if (n_queries == 0) {\n        return ();\n    }\n\n    // Translate the coset to the homogenous group to have simple FRI equations.\n    let shifted_x_value = x_values[0] / FIELD_GENERATOR;\n    assert fri_queries[0] = FriLayerQuery(\n        index=queries[0], y_value=evaluations[0], x_inv_value=1 / shifted_x_value\n    );\n\n    return gather_first_layer_queries(\n        n_queries=n_queries - 1,\n        queries=&queries[1],\n        evaluations=&evaluations[1],\n        x_values=&x_values[1],\n        fri_queries=&fri_queries[1],\n    );\n}\n\nfunc fri_decommit_layers{\n    range_check_ptr,\n    blake2s_ptr: felt*,\n    bitwise_ptr: BitwiseBuiltin*,\n    poseidon_ptr: PoseidonBuiltin*,\n}(\n    fri_group: felt*,\n    n_layers: felt,\n    commitment: TableCommitment**,\n    layer_witness: FriLayerWitness*,\n    eval_points: felt*,\n    step_sizes: felt*,\n    n_queries: felt,\n    queries: FriLayerQuery*,\n) -> (n_last_queries: felt, last_queries: FriLayerQuery*) {\n    if (n_layers == 0) {\n        return (n_last_queries=n_queries, last_queries=queries);\n    }\n\n    alloc_locals;\n    // Params.\n    let (coset_size) = pow(2, step_sizes[0]);\n    tempvar params: FriLayerComputationParams* = new FriLayerComputationParams(\n        coset_size=coset_size, fri_group=fri_group, eval_point=eval_points[0]\n    );\n\n    // Allocate values for the next layer computation.\n    let (next_queries: FriLayerQuery*) = alloc();\n    let next_queries_start = next_queries;\n    let sibling_witness = layer_witness.leaves;\n    let (verify_indices) = alloc();\n    let verify_indices_start = verify_indices;\n    let (verify_y_values) = alloc();\n    let verify_y_values_start = verify_y_values;\n\n    // Compute next layer queries.\n    with n_queries, queries, sibling_witness, next_queries, verify_indices, verify_y_values {\n        compute_next_layer(params=params);\n    }\n    let n_next_queries = (next_queries - next_queries_start) / FriLayerQuery.SIZE;\n\n    // Table decommitment.\n    tempvar decommitment: TableDecommitment* = new TableDecommitment(\n        n_values=verify_y_values - verify_y_values_start, values=verify_y_values_start\n    );\n    table_decommit(\n        commitment=commitment[0],\n        n_queries=verify_indices - verify_indices_start,\n        queries=verify_indices_start,\n        decommitment=decommitment,\n        witness=layer_witness.table_witness,\n    );\n\n    return fri_decommit_layers(\n        fri_group=fri_group,\n        n_layers=n_layers - 1,\n        commitment=&commitment[1],\n        layer_witness=&layer_witness[1],\n        eval_points=&eval_points[1],\n        step_sizes=&step_sizes[1],\n        n_queries=n_next_queries,\n        queries=next_queries_start,\n    );\n}\n\n// Verifies FRI last layer by evaluating the given polynomial on the given points (=inverses of\n// x_inv_values), and comparing the results to the given values.\nfunc verify_last_layer(\n    n_queries: felt, queries: FriLayerQuery*, n_coefficients: felt, coefficients: felt*\n) {\n    if (n_queries == 0) {\n        return ();\n    }\n\n    let (value) = horner_eval(\n        n_coefficients=n_coefficients, coefficients=coefficients, point=1 / queries[0].x_inv_value\n    );\n    assert value = queries[0].y_value;\n\n    return verify_last_layer(\n        n_queries=n_queries - 1,\n        queries=&queries[1],\n        n_coefficients=n_coefficients,\n        coefficients=coefficients,\n    );\n}\n",
            "/var/lib/engflow/worker/exec/src/starkware/cairo/stark_verifier/core/fri/fri_formula.cairo": "// Primitive roots of unity of orders 2, 4, 8 and 16.\n// Use 1 / 3^((PRIME - 1) / 16) as the primitive root of order 16 (3 is a generator of the\n// multiplicative group of the field).\nconst OMEGA_16 = 0x5c3ed0c6f6ac6dd647c9ba3e4721c1eb14011ea3d174c52d7981c5b8145aa75;\nconst OMEGA_8 = OMEGA_16 * OMEGA_16;\nconst OMEGA_4 = OMEGA_8 * OMEGA_8;\nconst OMEGA_2 = OMEGA_4 * OMEGA_4;\n\n// Folds 2 elements into one using one layer of FRI.\nfunc fri_formula2(f_x, f_minus_x, eval_point, x_inv) -> (res: felt) {\n    return (res=f_x + f_minus_x + eval_point * x_inv * (f_x - f_minus_x));\n}\n\n// Folds 4 elements into one using 2 layers of FRI.\nfunc fri_formula4(values: felt*, eval_point, x_inv) -> (res: felt) {\n    // First layer.\n    let (g0) = fri_formula2(f_x=values[0], f_minus_x=values[1], eval_point=eval_point, x_inv=x_inv);\n    let (g1) = fri_formula2(\n        f_x=values[2], f_minus_x=values[3], eval_point=eval_point, x_inv=x_inv * OMEGA_4\n    );\n\n    // Second layer.\n    return fri_formula2(\n        f_x=g0, f_minus_x=g1, eval_point=eval_point * eval_point, x_inv=x_inv * x_inv\n    );\n}\n\n// Folds 8 elements into one using 3 layers of FRI.\nfunc fri_formula8(values: felt*, eval_point, x_inv) -> (res: felt) {\n    // First two layers.\n    let (g0) = fri_formula4(values=values, eval_point=eval_point, x_inv=x_inv);\n    let (g1) = fri_formula4(values=&values[4], eval_point=eval_point, x_inv=x_inv * OMEGA_8);\n\n    // Last layer.\n    tempvar eval_point2 = eval_point * eval_point;\n    let eval_point4 = eval_point2 * eval_point2;\n\n    tempvar x_inv2 = x_inv * x_inv;\n    let x_inv4 = x_inv2 * x_inv2;\n    return fri_formula2(f_x=g0, f_minus_x=g1, eval_point=eval_point4, x_inv=x_inv4);\n}\n\n// Folds 16 elements into one using 4 layers of FRI.\nfunc fri_formula16(values: felt*, eval_point, x_inv) -> (res: felt) {\n    // First three layers.\n    let (g0) = fri_formula8(values=values, eval_point=eval_point, x_inv=x_inv);\n    let (g1) = fri_formula8(values=&values[8], eval_point=eval_point, x_inv=x_inv * OMEGA_16);\n\n    // Last layer.\n    tempvar eval_point2 = eval_point * eval_point;\n    tempvar eval_point4 = eval_point2 * eval_point2;\n    let eval_point8 = eval_point4 * eval_point4;\n\n    tempvar x_inv2 = x_inv * x_inv;\n    tempvar x_inv4 = x_inv2 * x_inv2;\n    let x_inv8 = x_inv4 * x_inv4;\n\n    return fri_formula2(f_x=g0, f_minus_x=g1, eval_point=eval_point8, x_inv=x_inv8);\n}\n\n// Folds 'coset_size' elements into one using log2(coset_size) layers of FRI.\n// 'coset_size' can be 2, 4, 8, or 16.\nfunc fri_formula(values: felt*, eval_point, x_inv, coset_size) -> (res: felt) {\n    // Sort by usage frequency.\n    if (coset_size == 8) {\n        return fri_formula8(values, eval_point, x_inv);\n    }\n    if (coset_size == 4) {\n        return fri_formula4(values, eval_point, x_inv);\n    }\n    if (coset_size == 16) {\n        return fri_formula16(values, eval_point, x_inv);\n    }\n    if (coset_size == 2) {\n        return fri_formula2(values[0], values[1], eval_point, x_inv);\n    }\n\n    // Fail.\n    assert 1 = 0;\n    return (res=0);\n}\n",
            "/var/lib/engflow/worker/exec/src/starkware/cairo/stark_verifier/core/fri/fri_layer.cairo": "from starkware.cairo.common.alloc import alloc\nfrom starkware.cairo.common.math import assert_nn, assert_not_equal\nfrom starkware.cairo.common.pow import pow\nfrom starkware.cairo.common.registers import get_label_location\nfrom starkware.cairo.stark_verifier.core.fri.fri_formula import fri_formula\n\n// Constant parameters for computing the next FRI layer.\nstruct FriLayerComputationParams {\n    coset_size: felt,\n    fri_group: felt*,\n    eval_point: felt,\n}\n\nstruct FriLayerQuery {\n    index: felt,\n    y_value: felt,\n    x_inv_value: felt,\n}\n\n// Computes the elements of the coset starting at coset_start_index.\n//\n// Inputs:\n//   - n_queries: the number of input queries.\n//   - queries: an iterator over the input queries.\n//   - sibling_witness: a list of all the query's siblings.\n//   - coset_size: the number of elements in the coset.\n//   - coset_start_index: the index of the first element of the coset being calculated.\n//   - offset_within_coset: the offset of the current processed element within the coset.\n//   - fri_group: holds the group <g> in bit reversed order, where g is the generator of the coset.\n//\n// Outputs:\n//   - coset_elements: the values of the coset elements.\n//   - coset_x_inv: x_inv of the first element in the coset. This value is set only if at least one\n//   query was consumed by this function.\nfunc compute_coset_elements{n_queries: felt, queries: FriLayerQuery*, sibling_witness: felt*}(\n    coset_size: felt,\n    coset_start_index: felt,\n    offset_within_coset: felt,\n    fri_group: felt*,\n    coset_elements: felt*,\n    coset_x_inv: felt*,\n) {\n    if (offset_within_coset == coset_size) {\n        return ();\n    }\n\n    if (n_queries != 0) {\n        if (queries.index == coset_start_index + offset_within_coset) {\n            assert [coset_elements] = queries.y_value;\n            assert [coset_x_inv] = queries.x_inv_value * [fri_group];\n\n            let n_queries = n_queries - 1;\n            let queries = &queries[1];\n            return compute_coset_elements(\n                coset_size=coset_size,\n                coset_start_index=coset_start_index,\n                offset_within_coset=offset_within_coset + 1,\n                fri_group=&fri_group[1],\n                coset_elements=&coset_elements[1],\n                coset_x_inv=coset_x_inv,\n            );\n        }\n    }\n\n    assert [coset_elements] = [sibling_witness];\n    let sibling_witness = &sibling_witness[1];\n    return compute_coset_elements(\n        coset_size=coset_size,\n        coset_start_index=coset_start_index,\n        offset_within_coset=offset_within_coset + 1,\n        fri_group=&fri_group[1],\n        coset_elements=&coset_elements[1],\n        coset_x_inv=coset_x_inv,\n    );\n}\n\n// Computes FRI next layer for the given queries. I.e., takes the given i-th layer queries\n// and produces queries for layer i+1 (a single query for each coset in the i-th layer).\n//\n// Inputs:\n//   - n_queries: the number of input queries.\n//   - queries: input queries.\n//   - sibling_witness: a list of all the query's siblings.\n//   - params: the parameters to use for the layer computation.\n//\n// Outputs:\n//   - next_queries: queries for the next layer.\n//   - verify_indices: query indices of the given layer for Merkle verification.\n//   - verify_y_values: query y values of the given layer for Merkle verification.\nfunc compute_next_layer{\n    range_check_ptr,\n    n_queries: felt,\n    queries: FriLayerQuery*,\n    sibling_witness: felt*,\n    next_queries: FriLayerQuery*,\n    verify_indices: felt*,\n    verify_y_values: felt*,\n}(params: FriLayerComputationParams*) {\n    if (n_queries == 0) {\n        return ();\n    }\n\n    alloc_locals;\n    local coset_size = params.coset_size;\n\n    // Guess coset_index.\n    // Note that compute_coset_elements() consumes queries, and it is verified\n    // that it consumed at least one query. This will imply that coset_index is correct.\n    local coset_index = nondet %{ ids.queries.index // ids.params.coset_size %};\n    assert_nn(coset_index);\n\n    // Write verification query.\n    assert [verify_indices] = coset_index;\n    let verify_indices = &verify_indices[1];\n    let coset_elements = verify_y_values;\n    let verify_y_values = &verify_y_values[coset_size];\n\n    // Store n_queries in order to verify at least one query was consumed.\n    local n_queries_before = n_queries;\n    let (coset_x_inv: felt*) = alloc();\n    compute_coset_elements(\n        coset_size=coset_size,\n        coset_start_index=coset_index * coset_size,\n        offset_within_coset=0,\n        fri_group=params.fri_group,\n        coset_elements=coset_elements,\n        coset_x_inv=coset_x_inv,\n    );\n\n    // Verify that at least one query was consumed.\n    assert_not_equal(n_queries_before, n_queries);\n\n    let (fri_formula_res) = fri_formula(\n        values=coset_elements,\n        eval_point=params.eval_point,\n        x_inv=[coset_x_inv],\n        coset_size=coset_size,\n    );\n\n    // Write next layer query.\n    let (next_x_inv) = pow([coset_x_inv], params.coset_size);\n    assert next_queries[0] = FriLayerQuery(\n        index=coset_index, y_value=fri_formula_res, x_inv_value=next_x_inv\n    );\n    let next_queries = &next_queries[1];\n\n    return compute_next_layer(params=params);\n}\n\n// Returns the elements of the multiplicative subgroup of order 16, in bit-reversed order for the\n// cairo prime field. Note that the first 2^k elements correspond to the group of size 2^k.\nfunc get_fri_group() -> (address: felt*) {\n    alloc_locals;\n    let (address) = get_label_location(data);\n    return (address=address);\n\n    data:\n    dw 0x1;\n    dw 0x800000000000011000000000000000000000000000000000000000000000000;\n    dw 0x625023929a2995b533120664329f8c7c5268e56ac8320da2a616626f41337e3;\n    dw 0x1dafdc6d65d66b5accedf99bcd607383ad971a9537cdf25d59e99d90becc81e;\n    dw 0x63365fe0de874d9c90adb1e2f9c676e98c62155e4412e873ada5e1dee6feebb;\n    dw 0x1cc9a01f2178b3736f524e1d06398916739deaa1bbed178c525a1e211901146;\n    dw 0x3b912c31d6a226e4a15988c6b7ec1915474043aac68553537192090b43635cd;\n    dw 0x446ed3ce295dda2b5ea677394813e6eab8bfbc55397aacac8e6df6f4bc9ca34;\n    dw 0x5ec467b88826aba4537602d514425f3b0bdf467bbf302458337c45f6021e539;\n    dw 0x213b984777d9556bac89fd2aebbda0c4f420b98440cfdba7cc83ba09fde1ac8;\n    dw 0x5ce3fa16c35cb4da537753675ca3276ead24059dddea2ca47c36587e5a538d1;\n    dw 0x231c05e93ca34c35ac88ac98a35cd89152dbfa622215d35b83c9a781a5ac730;\n    dw 0x00b54759e8c46e1258dc80f091e6f3be387888015452ce5f0ca09ce9e571f52;\n    dw 0x7f4ab8a6173b92fda7237f0f6e190c41c78777feabad31a0f35f63161a8e0af;\n    dw 0x23c12f3909539339b83645c1b8de3e14ebfee15c2e8b3ad2867e3a47eba558c;\n    dw 0x5c3ed0c6f6ac6dd647c9ba3e4721c1eb14011ea3d174c52d7981c5b8145aa75;\n}\n",
            "/var/lib/engflow/worker/exec/src/starkware/cairo/stark_verifier/core/proof_of_work.cairo": "from starkware.cairo.common.alloc import alloc\nfrom starkware.cairo.common.cairo_blake2s.blake2s import blake2s_add_uint256_bigend, blake2s_bigend\nfrom starkware.cairo.common.cairo_builtins import BitwiseBuiltin, PoseidonBuiltin\nfrom starkware.cairo.common.math import assert_in_range, assert_lt, assert_nn_le, unsigned_div_rem\nfrom starkware.cairo.common.pow import pow\nfrom starkware.cairo.common.uint256 import Uint256, felt_to_uint256\nfrom starkware.cairo.stark_verifier.core.channel import (\n    Channel,\n    ChannelSentFelt,\n    ChannelUnsentFelt,\n    read_uint64_from_prover,\n)\n\nconst MIN_PROOF_OF_WORK_BITS = 30;\nconst MAX_PROOF_OF_WORK_BITS = 50;\nconst MAX_NONCE = 2 ** 64 - 1;\nconst BYTE_UPPER_BOUND = 256;\nconst WORD_UPPER_BOUND = BYTE_UPPER_BOUND ** 8;\n\nstruct ProofOfWorkConfig {\n    // Proof of work difficulty (number of bits required to be 0).\n    n_bits: felt,\n}\n\nstruct ProofOfWorkUnsentCommitment {\n    nonce: ChannelUnsentFelt,\n}\n\nfunc proof_of_work_config_validate{range_check_ptr}(config: ProofOfWorkConfig*) {\n    assert_in_range(config.n_bits, MIN_PROOF_OF_WORK_BITS, MAX_PROOF_OF_WORK_BITS + 1);\n    return ();\n}\n\n// Assumption: 0 < n_bits <= 64.\nfunc proof_of_work_commit{\n    range_check_ptr,\n    blake2s_ptr: felt*,\n    bitwise_ptr: BitwiseBuiltin*,\n    poseidon_ptr: PoseidonBuiltin*,\n    channel: Channel,\n}(unsent_commitment: ProofOfWorkUnsentCommitment*, config: ProofOfWorkConfig*) {\n    alloc_locals;\n    let digest = felt_to_uint256(channel.digest);\n    let (nonce) = read_uint64_from_prover(unsent_commitment.nonce);\n    verify_proof_of_work(digest=digest, n_bits=config.n_bits, nonce=nonce);\n    return ();\n}\n\nfunc verify_proof_of_work{range_check_ptr, blake2s_ptr: felt*, bitwise_ptr: BitwiseBuiltin*}(\n    digest: Uint256, n_bits: felt, nonce: ChannelSentFelt\n) {\n    alloc_locals;\n    // Validate ranges.\n    assert_nn_le(nonce.value, MAX_NONCE);\n\n    // Compute the initial hash.\n    // Hash(0123456789abcded ||  digest_h  ||  digest_l  || n_bits).\n    //          0x8 bytes    || 0x10 bytes || 0x10 bytes || 1 byte.\n    // Total of 0x29 bytes.\n    // Arrange the hash input according to the keccak requirement of 0x10 byte chunks.\n    let (digest_hh, digest_hl) = unsigned_div_rem(digest.high, WORD_UPPER_BOUND);\n    let (digest_lh, digest_ll) = unsigned_div_rem(digest.low, WORD_UPPER_BOUND);\n    let (data) = alloc();\n    let data_start = data;\n    blake2s_add_uint256_bigend{data=data}(\n        Uint256(\n            low=digest_hl * WORD_UPPER_BOUND + digest_lh,\n            high=0x123456789abcded * WORD_UPPER_BOUND + digest_hh,\n        ),\n    );\n    // Align 72 bit value to MSB.\n    blake2s_add_uint256_bigend{data=data}(\n        Uint256(low=0, high=(digest_ll * BYTE_UPPER_BOUND + n_bits) * 2 ** 56)\n    );\n    let (init_hash) = blake2s_bigend(data=data_start, n_bytes=0x29);\n\n    // Compute Hash(init_hash_high || init_hash_low || nonce)\n    //                0x10 bytes   ||  0x10 bytes   || 8 bytes\n    // Total of 0x28 bytes.\n    let (data) = alloc();\n    let data_start = data;\n    blake2s_add_uint256_bigend{data=data}(init_hash);\n    // Align 64 bit value to MSB.\n    static_assert MAX_NONCE == 2 ** 64 - 1;\n    blake2s_add_uint256_bigend{data=data}(Uint256(low=0, high=nonce.value * 2 ** 64));\n    let (result) = blake2s_bigend(data=data_start, n_bytes=0x28);\n    let (work_limit) = pow(2, 128 - n_bits);\n\n    // Check.\n    assert_lt(result.high, work_limit);\n    return ();\n}\n",
            "/var/lib/engflow/worker/exec/src/starkware/cairo/stark_verifier/core/queries.cairo": "from starkware.cairo.common.alloc import alloc\nfrom starkware.cairo.common.cairo_builtins import BitwiseBuiltin, PoseidonBuiltin\nfrom starkware.cairo.common.math import assert_le, split_felt, unsigned_div_rem\nfrom starkware.cairo.common.pow import pow\nfrom starkware.cairo.common.usort import usort\nfrom starkware.cairo.stark_verifier.core.channel import Channel, random_felt_to_prover\nfrom starkware.cairo.stark_verifier.core.config import FIELD_GENERATOR, StarkDomains\nfrom starkware.cairo.stark_verifier.core.utils import bit_reverse_u64\n\n// Samples random queries from the verifier.\nfunc generate_queries{poseidon_ptr: PoseidonBuiltin*, channel: Channel, range_check_ptr}(\n    n_samples: felt, stark_domains: StarkDomains*\n) -> (n_queries: felt, queries: felt*) {\n    alloc_locals;\n\n    // Sample query indices from the channel.\n    let (samples: felt*) = alloc();\n    sample_random_queries(\n        n_samples=n_samples, samples=samples, query_upper_bound=stark_domains.eval_domain_size\n    );\n\n    let (n_queries, queries: felt*, multiplicities: felt*) = usort(\n        input_len=n_samples, input=samples\n    );\n\n    return (n_queries=n_queries, queries=queries);\n}\n\nfunc sample_random_queries{poseidon_ptr: PoseidonBuiltin*, channel: Channel, range_check_ptr}(\n    n_samples: felt, samples: felt*, query_upper_bound: felt\n) {\n    if (n_samples == 0) {\n        return ();\n    }\n\n    let (rand_felt) = random_felt_to_prover();\n    let (_, low128) = split_felt(rand_felt);\n    let (_, sample) = unsigned_div_rem(low128, query_upper_bound);\n    assert samples[0] = sample;\n\n    return sample_random_queries(\n        n_samples=n_samples - 1, samples=&samples[1], query_upper_bound=query_upper_bound\n    );\n}\n\n// Computes the corresponding field element for each query index.\n// I.e., index -> eval_generator ^ bit_revese(index).\nfunc queries_to_points{range_check_ptr, bitwise_ptr: BitwiseBuiltin*}(\n    n_queries: felt, queries: felt*, stark_domains: StarkDomains*\n) -> (points: felt*) {\n    alloc_locals;\n    // Evaluation domains of size greater than 2**64 are not supported.\n    assert_le(stark_domains.log_eval_domain_size, 64);\n\n    // A 'log_eval_domain_size' bits index can be bit reversed using bit_reverse_u64 if it is\n    // multiplied by 2**(64 - log_eval_domain_size) first.\n    let (shift) = pow(2, 64 - stark_domains.log_eval_domain_size);\n    let (points: felt*) = alloc();\n    queries_to_points_inner(\n        n_queries=n_queries,\n        queries=queries,\n        points=points,\n        shift=shift,\n        eval_generator=stark_domains.eval_generator,\n    );\n    return (points=points);\n}\n\nfunc queries_to_points_inner{range_check_ptr, bitwise_ptr: BitwiseBuiltin*}(\n    n_queries: felt, queries: felt*, points: felt*, shift: felt, eval_generator: felt\n) {\n    alloc_locals;\n    if (n_queries == 0) {\n        return ();\n    }\n    let (reversed_index) = bit_reverse_u64(queries[0] * shift);\n\n    // Compute the x value of the query in the evaluation domain coset:\n    //   FIELD_GENERATOR * eval_generator ^ reversed_index.\n    let (point) = pow(eval_generator, reversed_index);\n    let point = point * FIELD_GENERATOR;\n    assert points[0] = point;\n    return queries_to_points_inner(\n        n_queries=n_queries - 1,\n        queries=&queries[1],\n        points=&points[1],\n        shift=shift,\n        eval_generator=eval_generator,\n    );\n}\n",
            "/var/lib/engflow/worker/exec/src/starkware/cairo/stark_verifier/core/serialize_utils.cairo": "from starkware.cairo.common.memcpy import memcpy\nfrom starkware.cairo.common.uint256 import Uint256\n\n// Appends the given felt to the array pointed by the `data` (implicit) argument.\nfunc append_felt{data: felt*}(elem: felt) {\n    assert data[0] = elem;\n    let data = data + 1;\n    return ();\n}\n\n// Concats the given array of felts to the array pointed by the `data` (implicit) argument.\n// Note that the array len is not added to `data`.\nfunc append_felts{data: felt*}(len: felt, arr: felt*) {\n    memcpy(dst=data, src=arr, len=len);\n    let data = data + len;\n    return ();\n}\n\n// Appends the given Uint256 to the array pointed by the `data` (implicit) argument.\nfunc append_uint256{data: felt*}(elem: Uint256) {\n    assert data[0] = elem.high;\n    assert data[1] = elem.low;\n    let data = data + 2;\n    return ();\n}\n",
            "/var/lib/engflow/worker/exec/src/starkware/cairo/stark_verifier/core/stark.cairo": "from starkware.cairo.common.alloc import alloc\nfrom starkware.cairo.common.cairo_blake2s.blake2s import finalize_blake2s\nfrom starkware.cairo.common.cairo_builtins import BitwiseBuiltin, PoseidonBuiltin\nfrom starkware.cairo.common.hash import HashBuiltin\nfrom starkware.cairo.stark_verifier.air.config_instances import TracesConfig\nfrom starkware.cairo.stark_verifier.core.air_interface import (\n    AirInstance,\n    OodsEvaluationInfo,\n    PublicInput,\n    TracesCommitment,\n    TracesDecommitment,\n    TracesUnsentCommitment,\n    TracesWitness,\n    eval_oods_boundary_poly_at_points,\n    public_input_hash,\n    public_input_validate,\n    traces_commit,\n    traces_decommit,\n    traces_eval_composition_polynomial,\n)\nfrom starkware.cairo.stark_verifier.core.channel import (\n    Channel,\n    ChannelSentFelt,\n    ChannelUnsentFelt,\n    channel_new,\n    random_felts_to_prover,\n    read_felt_vector_from_prover,\n)\nfrom starkware.cairo.stark_verifier.core.config import (\n    StarkDomains,\n    stark_config_validate,\n    stark_domains_create,\n)\nfrom starkware.cairo.stark_verifier.core.config_instances import StarkConfig\nfrom starkware.cairo.stark_verifier.core.fri.fri import (\n    FriCommitment,\n    FriConfig,\n    FriDecommitment,\n    FriUnsentCommitment,\n    FriWitness,\n    fri_commit,\n    fri_decommit,\n)\nfrom starkware.cairo.stark_verifier.core.proof_of_work import (\n    ProofOfWorkUnsentCommitment,\n    proof_of_work_commit,\n)\nfrom starkware.cairo.stark_verifier.core.queries import generate_queries, queries_to_points\nfrom starkware.cairo.stark_verifier.core.table_commitment import (\n    TableCommitment,\n    TableCommitmentWitness,\n    TableDecommitment,\n    TableUnsentCommitment,\n    table_commit,\n    table_decommit,\n)\nfrom starkware.cairo.stark_verifier.core.utils import compute_powers_array\n\n// Protocol components:\n// ======================\n// The verifier is built from protocol components. Each component is responsible for commitment\n// and decommitment phase. The decommitment part can be regarded as proving a statement with certain\n// parameters that are known only after the commitment phase. The XDecommitment struct holds these\n// parameters.\n// The XWitness struct is the witness required to prove this statement.\n//\n// For example, VectorDecommitment holds some indices to the committed vector and the corresponding\n// values.\n// The VectorWitness struct has the authentication paths of the merkle tree, required to prove the\n// validity of the values.\n//\n// The Stark protocol itself is a component, with the statement having no parameters known only\n// after the commitment phase, and thus, there is no StarkDecommitment.\n//\n// The interface of a component named X is:\n//\n// Structs:\n// * XConfig: Configuration for the component.\n// * XUnsentCommitment: Commitment values (e.g. hashes), before sending in the channel.\n//     Those values shouldn't be used directly (only by the channel).\n//     Used by x_commit() to generate a commitment XCommitment.\n// * XCommitment: Represents the commitment after it is read from the channel.\n// * XDecommitment: Responses for queries.\n// * XWitness: Auxiliary information for proving the decommitment.\n//\n// Functions:\n// * x_commit() - The commitment phase. Takes XUnsentCommitment and returns XCommitment.\n// * x_decommit() - The decommitment phase. Verifies a decommitment. Uses the commitment and the\n//     witness.\n\n// n_oods_values := air.mask_size + air.constraint_degree.\nstruct StarkUnsentCommitment {\n    traces: TracesUnsentCommitment*,\n    composition: TableUnsentCommitment,\n    // n_oods_values elements. The i-th value is the evaluation of the i-th mask item polynomial at\n    // the OODS point, where the mask item polynomial is the interpolation polynomial of the\n    // corresponding column shifted by the corresponding row_offset.\n    oods_values: ChannelUnsentFelt*,\n    fri: FriUnsentCommitment*,\n    proof_of_work: ProofOfWorkUnsentCommitment*,\n}\n\nstruct StarkCommitment {\n    traces: TracesCommitment*,\n    composition: TableCommitment*,\n    interaction_after_composition: InteractionValuesAfterComposition*,\n    // n_oods_values elements. See StarkUnsentCommitment.\n    oods_values: ChannelSentFelt*,\n    interaction_after_oods: InteractionValuesAfterOods*,\n    fri: FriCommitment*,\n}\n\nstruct StarkWitness {\n    traces_decommitment: TracesDecommitment*,\n    traces_witness: TracesWitness*,\n    composition_decommitment: TableDecommitment*,\n    composition_witness: TableCommitmentWitness*,\n    fri_witness: FriWitness*,\n}\n\nstruct StarkProof {\n    config: StarkConfig*,\n    public_input: PublicInput*,\n    unsent_commitment: StarkUnsentCommitment*,\n    witness: StarkWitness*,\n}\n\n// Interaction elements after each STARK phase.\nstruct InteractionValuesAfterTraces {\n    // n_constraints Coefficients for the AIR constraints.\n    coefficients: felt*,\n}\n\nstruct InteractionValuesAfterComposition {\n    // Out of domain sampling point.\n    oods_point: felt,\n}\n\nstruct InteractionValuesAfterOods {\n    // n_oods_values coefficients for the boundary polynomial validating the OODS values.\n    coefficients: felt*,\n}\n\n// Verifies a STARK proof.\nfunc verify_stark_proof{\n    range_check_ptr,\n    pedersen_ptr: HashBuiltin*,\n    bitwise_ptr: BitwiseBuiltin*,\n    poseidon_ptr: PoseidonBuiltin*,\n}(air: AirInstance*, proof: StarkProof*, security_bits: felt) -> () {\n    alloc_locals;\n\n    // Validate config.\n    let config = proof.config;\n    stark_config_validate(air=air, config=config, security_bits=security_bits);\n    let (stark_domains) = stark_domains_create(config=config);\n\n    // Validate the public input.\n    public_input_validate(air=air, public_input=proof.public_input, stark_domains=stark_domains);\n\n    // Initialize blake2s.\n    let (blake2s_ptr: felt*) = alloc();\n    local blake2s_ptr_start: felt* = blake2s_ptr;\n\n    // Compute the initial hash seed for the Fiat-Shamir channel.\n    let (digest) = public_input_hash(air=air, public_input=proof.public_input, config=config);\n\n    // Construct the channel.\n    let (channel: Channel) = channel_new(digest=digest);\n\n    with blake2s_ptr, channel {\n        let (stark_commitment) = stark_commit(\n            air=air,\n            public_input=proof.public_input,\n            unsent_commitment=proof.unsent_commitment,\n            config=config,\n            stark_domains=stark_domains,\n        );\n        // Generate queries.\n        let (n_queries, queries) = generate_queries(\n            n_samples=config.n_queries, stark_domains=stark_domains\n        );\n\n        stark_decommit(\n            air=air,\n            public_input=proof.public_input,\n            n_queries=n_queries,\n            queries=queries,\n            commitment=stark_commitment,\n            witness=proof.witness,\n            config=config,\n            stark_domains=stark_domains,\n        );\n    }\n\n    finalize_blake2s(blake2s_ptr_start, blake2s_ptr);\n\n    return ();\n}\n\n// STARK commitment phase.\nfunc stark_commit{\n    range_check_ptr,\n    blake2s_ptr: felt*,\n    pedersen_ptr: HashBuiltin*,\n    bitwise_ptr: BitwiseBuiltin*,\n    poseidon_ptr: PoseidonBuiltin*,\n    channel: Channel,\n}(\n    air: AirInstance*,\n    public_input: PublicInput*,\n    unsent_commitment: StarkUnsentCommitment*,\n    config: StarkConfig*,\n    stark_domains: StarkDomains*,\n) -> (res: StarkCommitment*) {\n    alloc_locals;\n\n    // Read the commitment of the 'traces' component.\n    let (traces_commitment) = traces_commit(\n        air=air,\n        public_input=public_input,\n        unsent_commitment=unsent_commitment.traces,\n        config=config.traces,\n    );\n\n    // Generate interaction values after traces commitment.\n    let (composition_alpha: felt*) = alloc();\n    random_felts_to_prover(n_elements=1, elements=composition_alpha);\n    let (traces_coefficients: felt*) = alloc();\n    compute_powers_array(\n        data_ptr=traces_coefficients, alpha=[composition_alpha], cur=1, n=air.n_constraints\n    );\n\n    let (interaction_after_traces: InteractionValuesAfterTraces*) = alloc();\n    assert [interaction_after_traces] = InteractionValuesAfterTraces(\n        coefficients=traces_coefficients\n    );\n\n    // Read composition commitment.\n    let (composition_commitment: TableCommitment*) = table_commit(\n        unsent_commitment=unsent_commitment.composition, config=config.composition\n    );\n\n    // Generate interaction values after composition.\n    let (interaction_after_composition: InteractionValuesAfterComposition*) = alloc();\n    random_felts_to_prover(\n        n_elements=InteractionValuesAfterComposition.SIZE,\n        elements=cast(interaction_after_composition, felt*),\n    );\n\n    // Read OODS values.\n    local n_oods_values = air.mask_size + air.constraint_degree;\n    let (sent_oods_values) = read_felt_vector_from_prover(\n        n_values=n_oods_values, values=unsent_commitment.oods_values\n    );\n\n    // Check that the trace and the composition agree at oods_point.\n    verify_oods(\n        air=air,\n        oods_values=sent_oods_values,\n        traces_commitment=traces_commitment,\n        traces_coefficients=traces_coefficients,\n        oods_point=interaction_after_composition.oods_point,\n        trace_domain_size=stark_domains.trace_domain_size,\n        trace_generator=stark_domains.trace_generator,\n    );\n\n    // Generate interaction values after OODS.\n    let (oods_alpha: felt*) = alloc();\n    random_felts_to_prover(n_elements=1, elements=oods_alpha);\n    let (oods_coefficients: felt*) = alloc();\n    compute_powers_array(data_ptr=oods_coefficients, alpha=[oods_alpha], cur=1, n=n_oods_values);\n    tempvar interaction_after_oods = new InteractionValuesAfterOods(coefficients=oods_coefficients);\n\n    // Read fri commitment.\n    let (fri_commitment) = fri_commit(unsent_commitment=unsent_commitment.fri, config=config.fri);\n\n    // Proof of work commitment phase.\n    proof_of_work_commit(\n        unsent_commitment=unsent_commitment.proof_of_work, config=config.proof_of_work\n    );\n\n    // Return commitment.\n    return (\n        res=new StarkCommitment(\n            traces=traces_commitment,\n            composition=composition_commitment,\n            interaction_after_composition=interaction_after_composition,\n            oods_values=sent_oods_values,\n            interaction_after_oods=interaction_after_oods,\n            fri=fri_commitment,\n        ),\n    );\n}\n\n// Checks that the trace and the compostion agree at oods_point, assuming the prover provided us\n// with the proper evaluations.\nfunc verify_oods{range_check_ptr}(\n    air: AirInstance*,\n    oods_values: ChannelSentFelt*,\n    traces_commitment: TracesCommitment*,\n    traces_coefficients: felt*,\n    oods_point: felt,\n    trace_domain_size: felt,\n    trace_generator: felt,\n) {\n    let (composition_from_trace_values) = traces_eval_composition_polynomial(\n        air=air,\n        commitment=traces_commitment,\n        mask_values=cast(oods_values, felt*),\n        constraint_coefficients=traces_coefficients,\n        point=oods_point,\n        trace_domain_size=trace_domain_size,\n        trace_generator=trace_generator,\n    );\n\n    // This verification is currently only implemented for constraint degree 2.\n    assert air.constraint_degree = 2;\n    tempvar claimed_composition = (\n        oods_values[air.mask_size + 0].value + oods_values[air.mask_size + 1].value * oods_point\n    );\n\n    assert composition_from_trace_values = claimed_composition;\n\n    return ();\n}\n\n// STARK decommitment phase.\nfunc stark_decommit{\n    range_check_ptr,\n    blake2s_ptr: felt*,\n    pedersen_ptr: HashBuiltin*,\n    bitwise_ptr: BitwiseBuiltin*,\n    poseidon_ptr: PoseidonBuiltin*,\n}(\n    air: AirInstance*,\n    public_input: PublicInput*,\n    n_queries: felt,\n    queries: felt*,\n    commitment: StarkCommitment*,\n    witness: StarkWitness*,\n    config: StarkConfig*,\n    stark_domains: StarkDomains*,\n) {\n    alloc_locals;\n\n    // First layer decommit.\n    traces_decommit(\n        air=air,\n        n_queries=n_queries,\n        queries=queries,\n        commitment=commitment.traces,\n        decommitment=witness.traces_decommitment,\n        witness=witness.traces_witness,\n    );\n    table_decommit(\n        commitment=commitment.composition,\n        n_queries=n_queries,\n        queries=queries,\n        decommitment=witness.composition_decommitment,\n        witness=witness.composition_witness,\n    );\n\n    // Compute query points.\n    let (points) = queries_to_points(\n        n_queries=n_queries, queries=queries, stark_domains=stark_domains\n    );\n\n    // Evaluate the FRI input layer at query points.\n    tempvar eval_info = new OodsEvaluationInfo(\n        oods_values=commitment.oods_values,\n        oods_point=commitment.interaction_after_composition.oods_point,\n        trace_generator=stark_domains.trace_generator,\n        constraint_coefficients=commitment.interaction_after_oods.coefficients,\n    );\n    let (oods_poly_evals) = eval_oods_boundary_poly_at_points(\n        air=air,\n        public_input=public_input,\n        eval_info=eval_info,\n        n_points=n_queries,\n        points=points,\n        decommitment=witness.traces_decommitment,\n        composition_decommitment=witness.composition_decommitment,\n    );\n\n    // Decommit FRI.\n    tempvar fri_decommitment = new FriDecommitment(\n        n_values=n_queries, values=oods_poly_evals, points=points\n    );\n    fri_decommit(\n        n_queries=n_queries,\n        queries=queries,\n        commitment=commitment.fri,\n        decommitment=fri_decommitment,\n        witness=witness.fri_witness,\n    );\n\n    return ();\n}\n",
            "/var/lib/engflow/worker/exec/src/starkware/cairo/stark_verifier/core/table_commitment.cairo": "from starkware.cairo.common.alloc import alloc\nfrom starkware.cairo.common.builtin_poseidon.poseidon import poseidon_hash_many\nfrom starkware.cairo.common.cairo_blake2s.blake2s import blake2s_add_felts, blake2s_bigend\nfrom starkware.cairo.common.cairo_builtins import BitwiseBuiltin, PoseidonBuiltin\nfrom starkware.cairo.common.math import assert_nn, unsigned_div_rem\nfrom starkware.cairo.common.math_cmp import is_nn\nfrom starkware.cairo.stark_verifier.core.channel import MONTGOMERY_R, Channel, ChannelUnsentFelt\nfrom starkware.cairo.stark_verifier.core.vector_commitment import (\n    VectorCommitment,\n    VectorCommitmentConfig,\n    VectorCommitmentWitness,\n    VectorQuery,\n    VectorUnsentCommitment,\n    vector_commit,\n    vector_commitment_decommit,\n)\n\n// Commitment values for a table commitment protocol. Used to generate a commitment by \"reading\"\n// these values from the channel.\nstruct TableUnsentCommitment {\n    vector: VectorUnsentCommitment,\n}\n\n// Commitment for a table (n_rows x n_columns) of field elements in montgomery form.\n// TODO(spapini,01/03/2022): Change pointers to by value.\nstruct TableCommitment {\n    config: TableCommitmentConfig*,\n    vector_commitment: VectorCommitment*,\n}\n\nstruct TableCommitmentConfig {\n    n_columns: felt,\n    vector: VectorCommitmentConfig*,\n}\n\n// Responses for queries to the table commitment.\n// Each query corresponds to a full row of the table.\nstruct TableDecommitment {\n    // n_columns * n_queries values to decommit.\n    n_values: felt,\n    values: felt*,\n}\n\n// Witness for a decommitment over queries.\nstruct TableCommitmentWitness {\n    vector: VectorCommitmentWitness*,\n}\n\nfunc table_commit{poseidon_ptr: PoseidonBuiltin*, channel: Channel, range_check_ptr}(\n    unsent_commitment: TableUnsentCommitment, config: TableCommitmentConfig*\n) -> (res: TableCommitment*) {\n    let (vector_commitment: VectorCommitment*) = vector_commit(\n        unsent_commitment=unsent_commitment.vector, config=config.vector\n    );\n    return (res=new TableCommitment(config=config, vector_commitment=vector_commitment));\n}\n\n// Decommits a TableCommitment at multiple indices.\n// rows must be sorted and unique.\n// Args:\n// commitment - the table commitment.\n// n_queries - number of queries to decommit.\n// queries - the claimed indices.\n// decommitment - the claimed values at those indices.\n// witness - the decommitment witness.\n// TODO(spapini,09/12/2021): Add a squash queries function.\nfunc table_decommit{\n    range_check_ptr,\n    blake2s_ptr: felt*,\n    bitwise_ptr: BitwiseBuiltin*,\n    poseidon_ptr: PoseidonBuiltin*,\n}(\n    commitment: TableCommitment*,\n    n_queries: felt,\n    queries: felt*,\n    decommitment: TableDecommitment*,\n    witness: TableCommitmentWitness*,\n) {\n    alloc_locals;\n\n    // Determine if the table commitment should use a verifier friendly hash function for the bottom\n    // layer. The other layers' hash function will be determined in the vector_commitment logic.\n    let n_verifier_friendly_layers = (\n        commitment.vector_commitment.config.n_verifier_friendly_commitment_layers\n    );\n    // An extra layer is added to the height since the table is considered as a layer, which is not\n    // included in vector_commitment.config.\n    let bottom_layer_depth = commitment.vector_commitment.config.height + 1;\n    let non_verifier_friendly_layers = n_verifier_friendly_layers - bottom_layer_depth;\n\n    let is_bottom_layer_verifier_friendly = is_nn(non_verifier_friendly_layers);\n\n    // Must have at least 1 column.\n    local n_columns = commitment.config.n_columns;\n    assert_nn(n_columns - 1);\n    assert decommitment.n_values = n_queries * n_columns;\n\n    // Convert decommitment values to Montgomery form, since the commitment is in that form.\n    let (montgomery_values: felt*) = alloc();\n    to_montgomery(\n        n_values=decommitment.n_values, values=decommitment.values, output=montgomery_values\n    );\n\n    // Generate queries to the underlying vector commitment.\n    let (vector_queries: VectorQuery*) = alloc();\n    generate_vector_queries(\n        n_queries=n_queries,\n        queries=queries,\n        values=montgomery_values,\n        vector_queries=vector_queries,\n        n_columns=n_columns,\n        is_verifier_friendly=is_bottom_layer_verifier_friendly,\n    );\n\n    vector_commitment_decommit(\n        commitment=commitment.vector_commitment,\n        n_queries=n_queries,\n        queries=vector_queries,\n        witness=witness.vector,\n    );\n\n    return ();\n}\n\n// Converts an array of felts to their montgomery representation.\n// TODO(spapini,11/05/2022): Should be efficient.\nfunc to_montgomery(n_values: felt, values: felt*, output: felt*) {\n    if (n_values == 0) {\n        return ();\n    }\n    assert output[0] = values[0] * MONTGOMERY_R;\n    return to_montgomery(n_values=n_values - 1, values=&values[1], output=&output[1]);\n}\n\n// Generates vector queries to the underlying vector commitment from the table queries.\n// Args:\n// n_queries - number of table queries. Also the number of resulting vector queries.\n// queries - input table queries (indices).\n// decommitment - input table values.\n// vector_queries - output vector queries.\n// n_columns - number of columns in table.\n// is_verifier_friendly - true if the bottom layer uses a verifier friendly hash function.\nfunc generate_vector_queries{\n    range_check_ptr,\n    blake2s_ptr: felt*,\n    bitwise_ptr: BitwiseBuiltin*,\n    poseidon_ptr: PoseidonBuiltin*,\n}(\n    n_queries: felt,\n    queries: felt*,\n    values: felt*,\n    vector_queries: VectorQuery*,\n    n_columns: felt,\n    is_verifier_friendly: felt,\n) {\n    if (n_queries == 0) {\n        return ();\n    }\n\n    alloc_locals;\n    assert vector_queries.index = queries[0];\n    if (n_columns == 1) {\n        assert vector_queries.value = values[0];\n\n        return generate_vector_queries(\n            n_queries=n_queries - 1,\n            queries=&queries[1],\n            values=&values[n_columns],\n            vector_queries=&vector_queries[1],\n            n_columns=n_columns,\n            is_verifier_friendly=is_verifier_friendly,\n        );\n    }\n\n    if (is_verifier_friendly == 0) {\n        let (data: felt*) = alloc();\n        let data_start = data;\n        blake2s_add_felts{data=data}(n_elements=n_columns, elements=values, bigend=1);\n        let (hash) = blake2s_bigend(data=data_start, n_bytes=32 * n_columns);\n\n        // Truncate hash - convert value to felt, by taking the 248 least significant bits.\n        let (high_h, high_l) = unsigned_div_rem(hash.high, 2 ** 120);\n        assert vector_queries.value = high_l * 2 ** 128 + hash.low;\n\n        return generate_vector_queries(\n            n_queries=n_queries - 1,\n            queries=&queries[1],\n            values=&values[n_columns],\n            vector_queries=&vector_queries[1],\n            n_columns=n_columns,\n            is_verifier_friendly=is_verifier_friendly,\n        );\n    } else {\n        let (hash_poseidon) = poseidon_hash_many(n=n_columns, elements=values);\n        assert vector_queries.value = hash_poseidon;\n\n        return generate_vector_queries(\n            n_queries=n_queries - 1,\n            queries=&queries[1],\n            values=&values[n_columns],\n            vector_queries=&vector_queries[1],\n            n_columns=n_columns,\n            is_verifier_friendly=is_verifier_friendly,\n        );\n    }\n}\n",
            "/var/lib/engflow/worker/exec/src/starkware/cairo/stark_verifier/core/utils.cairo": "from starkware.cairo.common.bitwise import bitwise_and\nfrom starkware.cairo.common.cairo_builtins import BitwiseBuiltin\nfrom starkware.cairo.common.registers import get_label_location\n\nconst FIELD_GENERATOR = 3;\n\n// Bit reverses a uint64 number. Assumes the input is known to be in [0, 2**64).\nfunc bit_reverse_u64{bitwise_ptr: BitwiseBuiltin*}(num: felt) -> (res: felt) {\n    alloc_locals;\n\n    // Swap 1 bit chunks, and shift left by 1.\n    let (masked) = bitwise_and(num, 0x5555555555555555);\n    let num = masked * (2 ** 2 - 1) + num;\n    // Swap 2 bit chunks, and shift left by 2.\n    let (masked) = bitwise_and(num, 0x6666666666666666);\n    let num = masked * (2 ** 4 - 1) + num;\n    // Swap 4 bit chunks, and shift left by 4.\n    let (masked) = bitwise_and(num, 0x7878787878787878);\n    let num = masked * (2 ** 8 - 1) + num;\n    // Swap 8 bit chunks, and shift left by 8.\n    let (masked) = bitwise_and(num, 0x7f807f807f807f80);\n    let num = masked * (2 ** 16 - 1) + num;\n    // Swap 16 bit chunks, and shift left by 16.\n    let (masked) = bitwise_and(num, 0x7fff80007fff8000);\n    let num = masked * (2 ** 32 - 1) + num;\n    // Swap 16 bit chunks, and shift left by 32.\n    let (masked) = bitwise_and(num, 0x7fffffff80000000);\n    let num = masked * (2 ** 64 - 1) + num;\n\n    // Combine in reverse.\n    return (res=num / 2 ** 63);\n}\n\n// Writes the following `n` values into data_ptr:\n//   cur, cur * alpha, cur * alpha^2, ..., cur * alpha^(n - 1).\nfunc compute_powers_array(data_ptr: felt*, alpha: felt, cur: felt, n: felt) -> () {\n    if (n == 0) {\n        return ();\n    }\n    assert data_ptr[0] = cur;\n    return compute_powers_array(data_ptr=&data_ptr[1], alpha=alpha, cur=cur * alpha, n=n - 1);\n}\n",
            "/var/lib/engflow/worker/exec/src/starkware/cairo/stark_verifier/core/vector_commitment.cairo": "from starkware.cairo.common.alloc import alloc\nfrom starkware.cairo.common.builtin_poseidon.poseidon import poseidon_hash\nfrom starkware.cairo.common.cairo_blake2s.blake2s import blake2s_add_felt, blake2s_bigend\nfrom starkware.cairo.common.cairo_builtins import BitwiseBuiltin, PoseidonBuiltin\nfrom starkware.cairo.common.math import assert_nn, assert_nn_le, unsigned_div_rem\nfrom starkware.cairo.common.math_cmp import is_nn\nfrom starkware.cairo.common.pow import pow\nfrom starkware.cairo.common.uint256 import Uint256\nfrom starkware.cairo.stark_verifier.core.channel import (\n    Channel,\n    ChannelSentFelt,\n    ChannelUnsentFelt,\n    read_felt_from_prover,\n)\n\n// Commitment values for a vector commitment. Used to generate a commitment by \"reading\" these\n// values from the channel.\nstruct VectorUnsentCommitment {\n    commitment_hash: ChannelUnsentFelt,\n}\n\n// Commitment for a vector of field elements.\nstruct VectorCommitment {\n    config: VectorCommitmentConfig*,\n    commitment_hash: ChannelSentFelt,\n}\n\nstruct VectorCommitmentConfig {\n    height: felt,\n    n_verifier_friendly_commitment_layers: felt,\n}\n\n// Witness for a decommitment over queries.\nstruct VectorCommitmentWitness {\n    // The authentication values: all the siblings of the subtree generated by the queried indices,\n    // bottom layer up, left to right.\n    n_authentications: felt,\n    authentications: felt*,\n}\n\n// A query to the vector commitment.\nstruct VectorQuery {\n    index: felt,\n    value: felt,\n}\n\n// A query to the vector commitment that contains also the depth of the query in the Merkle tree.\nstruct VectorQueryWithDepth {\n    index: felt,\n    value: felt,\n    depth: felt,\n}\n\nfunc validate_vector_commitment{range_check_ptr}(\n    config: VectorCommitmentConfig*,\n    expected_height: felt,\n    n_verifier_friendly_commitment_layers: felt,\n) {\n    assert config.height = expected_height;\n    // Note that n_verifier_friendly_commitment_layers can be greater than height (in such a case,\n    // all Merkle layers use the verifier-friendly hash).\n    assert config.n_verifier_friendly_commitment_layers = n_verifier_friendly_commitment_layers;\n    return ();\n}\n\nfunc vector_commit{poseidon_ptr: PoseidonBuiltin*, channel: Channel, range_check_ptr}(\n    unsent_commitment: VectorUnsentCommitment, config: VectorCommitmentConfig*\n) -> (res: VectorCommitment*) {\n    let (commitment_hash_value) = read_felt_from_prover(value=unsent_commitment.commitment_hash);\n    return (res=new VectorCommitment(config=config, commitment_hash=commitment_hash_value));\n}\n\n// Decommits a VectorCommitment at multiple indices.\n// Indices must be sorted and unique.\nfunc vector_commitment_decommit{\n    range_check_ptr,\n    blake2s_ptr: felt*,\n    bitwise_ptr: BitwiseBuiltin*,\n    poseidon_ptr: PoseidonBuiltin*,\n}(\n    commitment: VectorCommitment*,\n    n_queries: felt,\n    queries: VectorQuery*,\n    witness: VectorCommitmentWitness*,\n) {\n    alloc_locals;\n\n    // Shift query indices.\n    let (shift) = pow(2, commitment.config.height);\n    let (shifted_queries: VectorQueryWithDepth*) = alloc();\n    shift_queries(\n        n_queries=n_queries,\n        queries=queries,\n        shifted_queries=shifted_queries,\n        shift=shift,\n        height=commitment.config.height,\n    );\n\n    let authentications = witness.authentications;\n\n    let (expected_commitment) = compute_root_from_queries{authentications=authentications}(\n        queue_head=shifted_queries,\n        queue_tail=&shifted_queries[n_queries],\n        n_verifier_friendly_layers=commitment.config.n_verifier_friendly_commitment_layers,\n    );\n    assert authentications = &witness.authentications[witness.n_authentications];\n\n    assert expected_commitment = commitment.commitment_hash.value;\n    return ();\n}\n\n// Shifts the query indices by shift=2**height, to convert index representation to heap-like.\n// Validates the query index range.\nfunc shift_queries{range_check_ptr}(\n    n_queries: felt,\n    queries: VectorQuery*,\n    shifted_queries: VectorQueryWithDepth*,\n    shift: felt,\n    height: felt,\n) {\n    if (n_queries == 0) {\n        return ();\n    }\n    assert_nn_le(queries.index, shift - 1);\n    assert [shifted_queries] = VectorQueryWithDepth(\n        index=queries.index + shift, value=queries.value, depth=height\n    );\n    return shift_queries(\n        n_queries=n_queries - 1,\n        queries=&queries[1],\n        shifted_queries=&shifted_queries[1],\n        shift=shift,\n        height=height,\n    );\n}\n\n// Verifies a queue of Merkle queries. [queue_head, queue_tail) is a queue, where each element\n// represents a node index (given in a heap-like indexing) and value (either an inner\n// node or a leaf).\nfunc compute_root_from_queries{\n    range_check_ptr,\n    blake2s_ptr: felt*,\n    bitwise_ptr: BitwiseBuiltin*,\n    poseidon_ptr: PoseidonBuiltin*,\n    authentications: felt*,\n}(\n    queue_head: VectorQueryWithDepth*,\n    queue_tail: VectorQueryWithDepth*,\n    n_verifier_friendly_layers: felt,\n) -> (hash: felt) {\n    alloc_locals;\n\n    let current: VectorQueryWithDepth = queue_head[0];\n    let next: VectorQueryWithDepth* = &queue_head[1];\n\n    // Check if we're at the root.\n    if (current.index == 1) {\n        assert current.depth = 0;\n        // Make sure the queue is empty.\n        assert next = queue_tail;\n        return (hash=current.value);\n    }\n\n    // Extract parent index.\n    local bit;\n    %{ ids.bit = ids.current.index & 1 %}\n    assert bit = bit * bit;\n    local parent_idx = (current.index - bit) / 2;\n    assert [range_check_ptr] = parent_idx;\n    let range_check_ptr = range_check_ptr + 1;\n\n    // Write parent to queue.\n    assert queue_tail.index = parent_idx;\n    assert queue_tail.depth = current.depth - 1;\n    let is_verifier_friendly = is_nn(n_verifier_friendly_layers - current.depth);\n    if (bit == 0) {\n        // Left child.\n        if (next != queue_tail and current.index + 1 == next.index) {\n            // Next holds the sibling.\n            let (hash) = hash_blake_or_poseidon(current.value, next.value, is_verifier_friendly);\n            assert queue_tail.value = hash;\n            return compute_root_from_queries(\n                queue_head=&queue_head[2],\n                queue_tail=&queue_tail[1],\n                n_verifier_friendly_layers=n_verifier_friendly_layers,\n            );\n        }\n        let (hash) = hash_blake_or_poseidon(\n            current.value, authentications[0], is_verifier_friendly\n        );\n    } else {\n        // Right child.\n        let (hash) = hash_blake_or_poseidon(\n            authentications[0], current.value, is_verifier_friendly\n        );\n    }\n\n    assert queue_tail.value = hash;\n    let authentications = &authentications[1];\n    return compute_root_from_queries(\n        queue_head=&queue_head[1],\n        queue_tail=&queue_tail[1],\n        n_verifier_friendly_layers=n_verifier_friendly_layers,\n    );\n}\n\nfunc hash_blake_or_poseidon{\n    range_check_ptr,\n    blake2s_ptr: felt*,\n    bitwise_ptr: BitwiseBuiltin*,\n    poseidon_ptr: PoseidonBuiltin*,\n}(x: felt, y: felt, is_verifier_friendly: felt) -> (res: felt) {\n    if (is_verifier_friendly == 1) {\n        let (res) = poseidon_hash(x=x, y=y);\n        return (res=res);\n    } else {\n        let (res) = truncated_blake2s(x, y);\n        return (res=res);\n    }\n}\n\n// A 248 LSB truncated version of blake2s.\n// hash:\n//   blake2s(x, y) & ((1 << 248) - 1).\nfunc truncated_blake2s{range_check_ptr, blake2s_ptr: felt*, bitwise_ptr: BitwiseBuiltin*}(\n    x: felt, y: felt\n) -> (res: felt) {\n    alloc_locals;\n    let (data: felt*) = alloc();\n    let data_start = data;\n\n    with data {\n        blake2s_add_felt(num=x, bigend=1);\n        blake2s_add_felt(num=y, bigend=1);\n    }\n    let (hash: Uint256) = blake2s_bigend(data=data_start, n_bytes=64);\n\n    // Truncate hash - convert value to felt, by taking the least significant 248 bits.\n    let (high_h, high_l) = unsigned_div_rem(hash.high, 2 ** 120);\n    return (res=hash.low + high_l * 2 ** 128);\n}\n",
            "<start>": "__start__:\nap += main.Args.SIZE + main.ImplicitArgs.SIZE;\ncall main;\n\n__end__:\njmp rel 0;\n",
            "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo": "%builtins output poseidon\n\nfrom starkware.cairo.common.alloc import alloc\nfrom starkware.cairo.common.cairo_builtins import PoseidonBuiltin\nfrom starkware.cairo.common.memcpy import memcpy\nfrom starkware.cairo.common.serialize import serialize_word\nfrom starkware.cairo.stark_verifier.core.stark import StarkProof\n\n// Adds extra Cairo steps to the mock verifier to simulate running the STARK verifier.\n//\n// Arguments:\n// n_mock_steps - number of steps to grind.\nfunc grind_mock_steps(n_mock_steps: felt) {\n    if (n_mock_steps == 0) {\n        return ();\n    }\n    return grind_mock_steps(n_mock_steps=n_mock_steps - 4);\n}\n\n// Mock Cairo verifier - grind steps instead of verifing proofs.\n//\n// Arguments:\n// program_hash - Hash of the simple bootloader program.\n// output_len - length of the output.\n// output - list of output words.\n// stark_proof - Pointer to StarkProof struct.\n//\n// Hint arguments:\n// n_mock_steps - Approximate number of Cairo steps of Cairo verifier.\nfunc verify_cairo_proof(\n    program_hash: felt, output_len: felt, output: felt*, stark_proof: StarkProof*\n) {\n    grind_mock_steps(n_mock_steps=nondet %{ n_steps %});\n    return ();\n}\n\n// Mock function for the Cairo verifier.\n//\n// Hint arguments:\n// program_input - Contains the inputs for the mock Cairo verifier.\n//\n// Outputs the program hash and the hash of the output.\nfunc main{output_ptr: felt*, poseidon_ptr: PoseidonBuiltin*}() {\n    alloc_locals;\n    // Init an `output` arr and fill it with the output of the program we mock-verify.\n    local output: felt*;\n    let (stark_proof: StarkProof*) = alloc();\n    %{\n        from starkware.cairo.cairo_verifier.mock_cairo_verifier_input import MockCairoVerifierInput\n\n        # Get output to apply hash state.\n        mock_cairo_verifier_input = MockCairoVerifierInput.load(program_input)\n        program_hash = mock_cairo_verifier_input.program_hash\n        program_output = mock_cairo_verifier_input.program_output\n        ids.output = segments.gen_arg(program_output)\n    %}\n    local output_len = nondet %{ len(program_output) %};\n    local program_hash = nondet %{ program_hash %};\n\n    // Verify Cairo proof.\n    %{ n_steps = program_input[\"n_steps\"] %}\n    verify_cairo_proof(\n        program_hash=program_hash, output_len=output_len, output=output, stark_proof=stark_proof\n    );\n    // Write program hash to output.\n    assert [output_ptr] = program_hash;\n    let output_ptr = output_ptr + 1;\n    // Dump the output without any special processing.\n    memcpy(dst=output_ptr, src=output, len=output_len);\n    let output_ptr = output_ptr + output_len;\n\n    return ();\n}\n"
        },
        "instruction_locations": {
            "0": {
                "accessible_scopes": [
                    "__main__"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 0,
                        "offset": 0
                    },
                    "reference_ids": {}
                },
                "hints": [],
                "inst": {
                    "end_col": 46,
                    "end_line": 2,
                    "input_file": {
                        "filename": "<start>"
                    },
                    "start_col": 1,
                    "start_line": 2
                }
            },
            "2": {
                "accessible_scopes": [
                    "__main__"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 0,
                        "offset": 2
                    },
                    "reference_ids": {}
                },
                "hints": [],
                "inst": {
                    "end_col": 10,
                    "end_line": 3,
                    "input_file": {
                        "filename": "<start>"
                    },
                    "start_col": 1,
                    "start_line": 3
                }
            },
            "4": {
                "accessible_scopes": [
                    "__main__"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 1,
                        "offset": 0
                    },
                    "reference_ids": {}
                },
                "hints": [],
                "inst": {
                    "end_col": 10,
                    "end_line": 6,
                    "input_file": {
                        "filename": "<start>"
                    },
                    "start_col": 1,
                    "start_line": 6
                }
            },
            "6": {
                "accessible_scopes": [
                    "starkware.cairo.common.alloc",
                    "starkware.cairo.common.alloc.alloc"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 2,
                        "offset": 0
                    },
                    "reference_ids": {}
                },
                "hints": [
                    {
                        "location": {
                            "end_col": 38,
                            "end_line": 3,
                            "input_file": {
                                "filename": "/var/lib/engflow/worker/exec/src/starkware/cairo/common/alloc.cairo"
                            },
                            "start_col": 5,
                            "start_line": 3
                        },
                        "n_prefix_newlines": 0
                    }
                ],
                "inst": {
                    "end_col": 12,
                    "end_line": 4,
                    "input_file": {
                        "filename": "/var/lib/engflow/worker/exec/src/starkware/cairo/common/alloc.cairo"
                    },
                    "start_col": 5,
                    "start_line": 4
                }
            },
            "8": {
                "accessible_scopes": [
                    "starkware.cairo.common.alloc",
                    "starkware.cairo.common.alloc.alloc"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 2,
                        "offset": 1
                    },
                    "reference_ids": {}
                },
                "hints": [],
                "inst": {
                    "end_col": 40,
                    "end_line": 5,
                    "input_file": {
                        "filename": "/var/lib/engflow/worker/exec/src/starkware/cairo/common/alloc.cairo"
                    },
                    "start_col": 5,
                    "start_line": 5
                }
            },
            "9": {
                "accessible_scopes": [
                    "starkware.cairo.common.memcpy",
                    "starkware.cairo.common.memcpy.memcpy"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 3,
                        "offset": 0
                    },
                    "reference_ids": {
                        "starkware.cairo.common.memcpy.memcpy.dst": 0,
                        "starkware.cairo.common.memcpy.memcpy.len": 2,
                        "starkware.cairo.common.memcpy.memcpy.src": 1
                    }
                },
                "hints": [],
                "inst": {
                    "end_col": 7,
                    "end_line": 8,
                    "input_file": {
                        "filename": "/var/lib/engflow/worker/exec/src/starkware/cairo/common/memcpy.cairo"
                    },
                    "start_col": 5,
                    "start_line": 8
                }
            },
            "11": {
                "accessible_scopes": [
                    "starkware.cairo.common.memcpy",
                    "starkware.cairo.common.memcpy.memcpy"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 3,
                        "offset": 0
                    },
                    "reference_ids": {
                        "starkware.cairo.common.memcpy.memcpy.dst": 0,
                        "starkware.cairo.common.memcpy.memcpy.len": 2,
                        "starkware.cairo.common.memcpy.memcpy.src": 1
                    }
                },
                "hints": [],
                "inst": {
                    "end_col": 19,
                    "end_line": 9,
                    "input_file": {
                        "filename": "/var/lib/engflow/worker/exec/src/starkware/cairo/common/memcpy.cairo"
                    },
                    "start_col": 9,
                    "start_line": 9
                }
            },
            "12": {
                "accessible_scopes": [
                    "starkware.cairo.common.memcpy",
                    "starkware.cairo.common.memcpy.memcpy"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 3,
                        "offset": 0
                    },
                    "reference_ids": {
                        "starkware.cairo.common.memcpy.memcpy.dst": 0,
                        "starkware.cairo.common.memcpy.memcpy.len": 2,
                        "starkware.cairo.common.memcpy.memcpy.src": 1
                    }
                },
                "hints": [
                    {
                        "location": {
                            "end_col": 41,
                            "end_line": 12,
                            "input_file": {
                                "filename": "/var/lib/engflow/worker/exec/src/starkware/cairo/common/memcpy.cairo"
                            },
                            "start_col": 5,
                            "start_line": 12
                        },
                        "n_prefix_newlines": 0
                    }
                ],
                "inst": {
                    "end_col": 23,
                    "end_line": 2,
                    "input_file": {
                        "filename": "/var/lib/engflow/worker/exec/src/starkware/cairo/common/memcpy.cairo"
                    },
                    "parent_location": [
                        {
                            "end_col": 38,
                            "end_line": 13,
                            "input_file": {
                                "filename": "/var/lib/engflow/worker/exec/src/starkware/cairo/common/memcpy.cairo"
                            },
                            "start_col": 35,
                            "start_line": 13
                        },
                        "While expanding the reference 'dst' in:"
                    ],
                    "start_col": 13,
                    "start_line": 2
                }
            },
            "13": {
                "accessible_scopes": [
                    "starkware.cairo.common.memcpy",
                    "starkware.cairo.common.memcpy.memcpy"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 3,
                        "offset": 1
                    },
                    "reference_ids": {
                        "starkware.cairo.common.memcpy.memcpy.dst": 0,
                        "starkware.cairo.common.memcpy.memcpy.len": 2,
                        "starkware.cairo.common.memcpy.memcpy.src": 1
                    }
                },
                "hints": [],
                "inst": {
                    "end_col": 35,
                    "end_line": 2,
                    "input_file": {
                        "filename": "/var/lib/engflow/worker/exec/src/starkware/cairo/common/memcpy.cairo"
                    },
                    "parent_location": [
                        {
                            "end_col": 47,
                            "end_line": 13,
                            "input_file": {
                                "filename": "/var/lib/engflow/worker/exec/src/starkware/cairo/common/memcpy.cairo"
                            },
                            "start_col": 44,
                            "start_line": 13
                        },
                        "While expanding the reference 'src' in:"
                    ],
                    "start_col": 25,
                    "start_line": 2
                }
            },
            "14": {
                "accessible_scopes": [
                    "starkware.cairo.common.memcpy",
                    "starkware.cairo.common.memcpy.memcpy"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 3,
                        "offset": 2
                    },
                    "reference_ids": {
                        "starkware.cairo.common.memcpy.memcpy.dst": 0,
                        "starkware.cairo.common.memcpy.memcpy.frame": 4,
                        "starkware.cairo.common.memcpy.memcpy.len": 2,
                        "starkware.cairo.common.memcpy.memcpy.src": 1
                    }
                },
                "hints": [],
                "inst": {
                    "end_col": 37,
                    "end_line": 17,
                    "input_file": {
                        "filename": "/var/lib/engflow/worker/exec/src/starkware/cairo/common/memcpy.cairo"
                    },
                    "start_col": 26,
                    "start_line": 17
                }
            },
            "15": {
                "accessible_scopes": [
                    "starkware.cairo.common.memcpy",
                    "starkware.cairo.common.memcpy.memcpy"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 3,
                        "offset": 3
                    },
                    "reference_ids": {
                        "starkware.cairo.common.memcpy.memcpy.__temp0": 5,
                        "starkware.cairo.common.memcpy.memcpy.dst": 0,
                        "starkware.cairo.common.memcpy.memcpy.frame": 4,
                        "starkware.cairo.common.memcpy.memcpy.len": 2,
                        "starkware.cairo.common.memcpy.memcpy.src": 1
                    }
                },
                "hints": [],
                "inst": {
                    "end_col": 38,
                    "end_line": 17,
                    "input_file": {
                        "filename": "/var/lib/engflow/worker/exec/src/starkware/cairo/common/memcpy.cairo"
                    },
                    "start_col": 5,
                    "start_line": 17
                }
            },
            "16": {
                "accessible_scopes": [
                    "starkware.cairo.common.memcpy",
                    "starkware.cairo.common.memcpy.memcpy"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 3,
                        "offset": 3
                    },
                    "reference_ids": {
                        "starkware.cairo.common.memcpy.memcpy.__temp0": 5,
                        "starkware.cairo.common.memcpy.memcpy.continue_copying": 6,
                        "starkware.cairo.common.memcpy.memcpy.dst": 0,
                        "starkware.cairo.common.memcpy.memcpy.frame": 4,
                        "starkware.cairo.common.memcpy.memcpy.len": 2,
                        "starkware.cairo.common.memcpy.memcpy.next_frame": 7,
                        "starkware.cairo.common.memcpy.memcpy.src": 1
                    }
                },
                "hints": [],
                "inst": {
                    "end_col": 41,
                    "end_line": 22,
                    "input_file": {
                        "filename": "/var/lib/engflow/worker/exec/src/starkware/cairo/common/memcpy.cairo"
                    },
                    "start_col": 5,
                    "start_line": 22
                }
            },
            "18": {
                "accessible_scopes": [
                    "starkware.cairo.common.memcpy",
                    "starkware.cairo.common.memcpy.memcpy"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 3,
                        "offset": 4
                    },
                    "reference_ids": {
                        "starkware.cairo.common.memcpy.memcpy.__temp0": 5,
                        "starkware.cairo.common.memcpy.memcpy.continue_copying": 6,
                        "starkware.cairo.common.memcpy.memcpy.dst": 0,
                        "starkware.cairo.common.memcpy.memcpy.frame": 4,
                        "starkware.cairo.common.memcpy.memcpy.len": 2,
                        "starkware.cairo.common.memcpy.memcpy.next_frame": 7,
                        "starkware.cairo.common.memcpy.memcpy.src": 1
                    }
                },
                "hints": [],
                "inst": {
                    "end_col": 41,
                    "end_line": 23,
                    "input_file": {
                        "filename": "/var/lib/engflow/worker/exec/src/starkware/cairo/common/memcpy.cairo"
                    },
                    "start_col": 5,
                    "start_line": 23
                }
            },
            "20": {
                "accessible_scopes": [
                    "starkware.cairo.common.memcpy",
                    "starkware.cairo.common.memcpy.memcpy"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 3,
                        "offset": 5
                    },
                    "reference_ids": {
                        "starkware.cairo.common.memcpy.memcpy.__temp0": 5,
                        "starkware.cairo.common.memcpy.memcpy.continue_copying": 6,
                        "starkware.cairo.common.memcpy.memcpy.dst": 0,
                        "starkware.cairo.common.memcpy.memcpy.frame": 4,
                        "starkware.cairo.common.memcpy.memcpy.len": 2,
                        "starkware.cairo.common.memcpy.memcpy.next_frame": 7,
                        "starkware.cairo.common.memcpy.memcpy.src": 1
                    }
                },
                "hints": [
                    {
                        "location": {
                            "end_col": 7,
                            "end_line": 27,
                            "input_file": {
                                "filename": "/var/lib/engflow/worker/exec/src/starkware/cairo/common/memcpy.cairo"
                            },
                            "start_col": 5,
                            "start_line": 24
                        },
                        "n_prefix_newlines": 1
                    }
                ],
                "inst": {
                    "end_col": 44,
                    "end_line": 29,
                    "input_file": {
                        "filename": "/var/lib/engflow/worker/exec/src/starkware/cairo/common/memcpy.cairo"
                    },
                    "start_col": 5,
                    "start_line": 29
                }
            },
            "22": {
                "accessible_scopes": [
                    "starkware.cairo.common.memcpy",
                    "starkware.cairo.common.memcpy.memcpy"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 3,
                        "offset": 6
                    },
                    "reference_ids": {
                        "starkware.cairo.common.memcpy.memcpy.__temp0": 5,
                        "starkware.cairo.common.memcpy.memcpy.continue_copying": 6,
                        "starkware.cairo.common.memcpy.memcpy.dst": 0,
                        "starkware.cairo.common.memcpy.memcpy.frame": 4,
                        "starkware.cairo.common.memcpy.memcpy.len": 2,
                        "starkware.cairo.common.memcpy.memcpy.next_frame": 7,
                        "starkware.cairo.common.memcpy.memcpy.src": 1
                    }
                },
                "hints": [],
                "inst": {
                    "end_col": 55,
                    "end_line": 31,
                    "input_file": {
                        "filename": "/var/lib/engflow/worker/exec/src/starkware/cairo/common/memcpy.cairo"
                    },
                    "start_col": 5,
                    "start_line": 31
                }
            },
            "23": {
                "accessible_scopes": [
                    "starkware.cairo.common.memcpy",
                    "starkware.cairo.common.memcpy.memcpy"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 3,
                        "offset": 6
                    },
                    "reference_ids": {
                        "starkware.cairo.common.memcpy.memcpy.__temp0": 5,
                        "starkware.cairo.common.memcpy.memcpy.continue_copying": 6,
                        "starkware.cairo.common.memcpy.memcpy.dst": 0,
                        "starkware.cairo.common.memcpy.memcpy.frame": 4,
                        "starkware.cairo.common.memcpy.memcpy.len": 2,
                        "starkware.cairo.common.memcpy.memcpy.next_frame": 7,
                        "starkware.cairo.common.memcpy.memcpy.src": 1
                    }
                },
                "hints": [
                    {
                        "location": {
                            "end_col": 26,
                            "end_line": 33,
                            "input_file": {
                                "filename": "/var/lib/engflow/worker/exec/src/starkware/cairo/common/memcpy.cairo"
                            },
                            "start_col": 5,
                            "start_line": 33
                        },
                        "n_prefix_newlines": 0
                    }
                ],
                "inst": {
                    "end_col": 15,
                    "end_line": 34,
                    "input_file": {
                        "filename": "/var/lib/engflow/worker/exec/src/starkware/cairo/common/memcpy.cairo"
                    },
                    "start_col": 5,
                    "start_line": 34
                }
            },
            "24": {
                "accessible_scopes": [
                    "starkware.cairo.common.serialize",
                    "starkware.cairo.common.serialize.serialize_word"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 4,
                        "offset": 0
                    },
                    "reference_ids": {
                        "starkware.cairo.common.serialize.serialize_word.output_ptr": 9,
                        "starkware.cairo.common.serialize.serialize_word.word": 8
                    }
                },
                "hints": [],
                "inst": {
                    "end_col": 32,
                    "end_line": 3,
                    "input_file": {
                        "filename": "/var/lib/engflow/worker/exec/src/starkware/cairo/common/serialize.cairo"
                    },
                    "start_col": 5,
                    "start_line": 3
                }
            },
            "25": {
                "accessible_scopes": [
                    "starkware.cairo.common.serialize",
                    "starkware.cairo.common.serialize.serialize_word"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 4,
                        "offset": 0
                    },
                    "reference_ids": {
                        "starkware.cairo.common.serialize.serialize_word.output_ptr": 10,
                        "starkware.cairo.common.serialize.serialize_word.word": 8
                    }
                },
                "hints": [],
                "inst": {
                    "end_col": 36,
                    "end_line": 4,
                    "input_file": {
                        "filename": "/var/lib/engflow/worker/exec/src/starkware/cairo/common/serialize.cairo"
                    },
                    "parent_location": [
                        {
                            "end_col": 38,
                            "end_line": 2,
                            "input_file": {
                                "filename": "/var/lib/engflow/worker/exec/src/starkware/cairo/common/serialize.cairo"
                            },
                            "parent_location": [
                                {
                                    "end_col": 15,
                                    "end_line": 5,
                                    "input_file": {
                                        "filename": "/var/lib/engflow/worker/exec/src/starkware/cairo/common/serialize.cairo"
                                    },
                                    "start_col": 5,
                                    "start_line": 5
                                },
                                "While trying to retrieve the implicit argument 'output_ptr' in:"
                            ],
                            "start_col": 21,
                            "start_line": 2
                        },
                        "While expanding the reference 'output_ptr' in:"
                    ],
                    "start_col": 22,
                    "start_line": 4
                }
            },
            "27": {
                "accessible_scopes": [
                    "starkware.cairo.common.serialize",
                    "starkware.cairo.common.serialize.serialize_word"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 4,
                        "offset": 1
                    },
                    "reference_ids": {
                        "starkware.cairo.common.serialize.serialize_word.output_ptr": 10,
                        "starkware.cairo.common.serialize.serialize_word.word": 8
                    }
                },
                "hints": [],
                "inst": {
                    "end_col": 15,
                    "end_line": 5,
                    "input_file": {
                        "filename": "/var/lib/engflow/worker/exec/src/starkware/cairo/common/serialize.cairo"
                    },
                    "start_col": 5,
                    "start_line": 5
                }
            },
            "28": {
                "accessible_scopes": [
                    "__main__",
                    "__main__.grind_mock_steps"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 5,
                        "offset": 0
                    },
                    "reference_ids": {
                        "__main__.grind_mock_steps.n_mock_steps": 11
                    }
                },
                "hints": [],
                "inst": {
                    "end_col": 7,
                    "end_line": 14,
                    "input_file": {
                        "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                    },
                    "start_col": 5,
                    "start_line": 14
                }
            },
            "30": {
                "accessible_scopes": [
                    "__main__",
                    "__main__.grind_mock_steps"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 5,
                        "offset": 0
                    },
                    "reference_ids": {
                        "__main__.grind_mock_steps.n_mock_steps": 11
                    }
                },
                "hints": [],
                "inst": {
                    "end_col": 19,
                    "end_line": 15,
                    "input_file": {
                        "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                    },
                    "start_col": 9,
                    "start_line": 15
                }
            },
            "31": {
                "accessible_scopes": [
                    "__main__",
                    "__main__.grind_mock_steps"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 5,
                        "offset": 0
                    },
                    "reference_ids": {
                        "__main__.grind_mock_steps.n_mock_steps": 11
                    }
                },
                "hints": [],
                "inst": {
                    "end_col": 58,
                    "end_line": 17,
                    "input_file": {
                        "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                    },
                    "start_col": 42,
                    "start_line": 17
                }
            },
            "33": {
                "accessible_scopes": [
                    "__main__",
                    "__main__.grind_mock_steps"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 5,
                        "offset": 1
                    },
                    "reference_ids": {
                        "__main__.grind_mock_steps.n_mock_steps": 11
                    }
                },
                "hints": [],
                "inst": {
                    "end_col": 59,
                    "end_line": 17,
                    "input_file": {
                        "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                    },
                    "start_col": 12,
                    "start_line": 17
                }
            },
            "35": {
                "accessible_scopes": [
                    "__main__",
                    "__main__.grind_mock_steps"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 6,
                        "offset": 0
                    },
                    "reference_ids": {
                        "__main__.grind_mock_steps.n_mock_steps": 11
                    }
                },
                "hints": [],
                "inst": {
                    "end_col": 60,
                    "end_line": 17,
                    "input_file": {
                        "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                    },
                    "start_col": 5,
                    "start_line": 17
                }
            },
            "36": {
                "accessible_scopes": [
                    "__main__",
                    "__main__.verify_cairo_proof"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 7,
                        "offset": 0
                    },
                    "reference_ids": {
                        "__main__.verify_cairo_proof.output": 14,
                        "__main__.verify_cairo_proof.output_len": 13,
                        "__main__.verify_cairo_proof.program_hash": 12,
                        "__main__.verify_cairo_proof.stark_proof": 15
                    }
                },
                "hints": [
                    {
                        "location": {
                            "end_col": 55,
                            "end_line": 33,
                            "input_file": {
                                "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                            },
                            "start_col": 35,
                            "start_line": 33
                        },
                        "n_prefix_newlines": 0
                    }
                ],
                "inst": {
                    "end_col": 55,
                    "end_line": 33,
                    "input_file": {
                        "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                    },
                    "start_col": 35,
                    "start_line": 33
                }
            },
            "38": {
                "accessible_scopes": [
                    "__main__",
                    "__main__.verify_cairo_proof"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 7,
                        "offset": 1
                    },
                    "reference_ids": {
                        "__main__.verify_cairo_proof.__temp1": 16,
                        "__main__.verify_cairo_proof.output": 14,
                        "__main__.verify_cairo_proof.output_len": 13,
                        "__main__.verify_cairo_proof.program_hash": 12,
                        "__main__.verify_cairo_proof.stark_proof": 15
                    }
                },
                "hints": [],
                "inst": {
                    "end_col": 56,
                    "end_line": 33,
                    "input_file": {
                        "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                    },
                    "start_col": 5,
                    "start_line": 33
                }
            },
            "40": {
                "accessible_scopes": [
                    "__main__",
                    "__main__.verify_cairo_proof"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 8,
                        "offset": 0
                    },
                    "reference_ids": {
                        "__main__.verify_cairo_proof.__temp1": 16,
                        "__main__.verify_cairo_proof.output": 14,
                        "__main__.verify_cairo_proof.output_len": 13,
                        "__main__.verify_cairo_proof.program_hash": 12,
                        "__main__.verify_cairo_proof.stark_proof": 15
                    }
                },
                "hints": [],
                "inst": {
                    "end_col": 15,
                    "end_line": 34,
                    "input_file": {
                        "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                    },
                    "start_col": 5,
                    "start_line": 34
                }
            },
            "41": {
                "accessible_scopes": [
                    "__main__",
                    "__main__.main"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 9,
                        "offset": 0
                    },
                    "reference_ids": {
                        "__main__.main.output_ptr": 17,
                        "__main__.main.poseidon_ptr": 18
                    }
                },
                "hints": [],
                "inst": {
                    "end_col": 18,
                    "end_line": 44,
                    "input_file": {
                        "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                    },
                    "start_col": 5,
                    "start_line": 44
                }
            },
            "43": {
                "accessible_scopes": [
                    "__main__",
                    "__main__.main"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 9,
                        "offset": 3
                    },
                    "reference_ids": {
                        "__main__.main.output": 19,
                        "__main__.main.output_ptr": 17,
                        "__main__.main.poseidon_ptr": 18
                    }
                },
                "hints": [],
                "inst": {
                    "end_col": 45,
                    "end_line": 47,
                    "input_file": {
                        "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                    },
                    "start_col": 38,
                    "start_line": 47
                }
            },
            "45": {
                "accessible_scopes": [
                    "__main__",
                    "__main__.main"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 9,
                        "offset": 6
                    },
                    "reference_ids": {
                        "__main__.main.output": 19,
                        "__main__.main.output_len": 21,
                        "__main__.main.output_ptr": 17,
                        "__main__.main.poseidon_ptr": 18,
                        "__main__.main.program_hash": 22,
                        "__main__.main.stark_proof": 20
                    }
                },
                "hints": [
                    {
                        "location": {
                            "end_col": 7,
                            "end_line": 56,
                            "input_file": {
                                "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                            },
                            "start_col": 5,
                            "start_line": 48
                        },
                        "n_prefix_newlines": 1
                    },
                    {
                        "location": {
                            "end_col": 56,
                            "end_line": 57,
                            "input_file": {
                                "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                            },
                            "start_col": 24,
                            "start_line": 57
                        },
                        "n_prefix_newlines": 0
                    },
                    {
                        "location": {
                            "end_col": 51,
                            "end_line": 58,
                            "input_file": {
                                "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                            },
                            "start_col": 26,
                            "start_line": 58
                        },
                        "n_prefix_newlines": 0
                    },
                    {
                        "location": {
                            "end_col": 45,
                            "end_line": 61,
                            "input_file": {
                                "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                            },
                            "start_col": 5,
                            "start_line": 61
                        },
                        "n_prefix_newlines": 0
                    }
                ],
                "inst": {
                    "end_col": 23,
                    "end_line": 58,
                    "input_file": {
                        "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                    },
                    "parent_location": [
                        {
                            "end_col": 34,
                            "end_line": 63,
                            "input_file": {
                                "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                            },
                            "start_col": 22,
                            "start_line": 63
                        },
                        "While expanding the reference 'program_hash' in:"
                    ],
                    "start_col": 11,
                    "start_line": 58
                }
            },
            "46": {
                "accessible_scopes": [
                    "__main__",
                    "__main__.main"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 9,
                        "offset": 7
                    },
                    "reference_ids": {
                        "__main__.main.output": 19,
                        "__main__.main.output_len": 21,
                        "__main__.main.output_ptr": 17,
                        "__main__.main.poseidon_ptr": 18,
                        "__main__.main.program_hash": 22,
                        "__main__.main.stark_proof": 20
                    }
                },
                "hints": [],
                "inst": {
                    "end_col": 21,
                    "end_line": 57,
                    "input_file": {
                        "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                    },
                    "parent_location": [
                        {
                            "end_col": 57,
                            "end_line": 63,
                            "input_file": {
                                "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                            },
                            "start_col": 47,
                            "start_line": 63
                        },
                        "While expanding the reference 'output_len' in:"
                    ],
                    "start_col": 11,
                    "start_line": 57
                }
            },
            "47": {
                "accessible_scopes": [
                    "__main__",
                    "__main__.main"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 9,
                        "offset": 8
                    },
                    "reference_ids": {
                        "__main__.main.output": 19,
                        "__main__.main.output_len": 21,
                        "__main__.main.output_ptr": 17,
                        "__main__.main.poseidon_ptr": 18,
                        "__main__.main.program_hash": 22,
                        "__main__.main.stark_proof": 20
                    }
                },
                "hints": [],
                "inst": {
                    "end_col": 17,
                    "end_line": 46,
                    "input_file": {
                        "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                    },
                    "parent_location": [
                        {
                            "end_col": 72,
                            "end_line": 63,
                            "input_file": {
                                "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                            },
                            "start_col": 66,
                            "start_line": 63
                        },
                        "While expanding the reference 'output' in:"
                    ],
                    "start_col": 11,
                    "start_line": 46
                }
            },
            "48": {
                "accessible_scopes": [
                    "__main__",
                    "__main__.main"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 9,
                        "offset": 9
                    },
                    "reference_ids": {
                        "__main__.main.output": 19,
                        "__main__.main.output_len": 21,
                        "__main__.main.output_ptr": 17,
                        "__main__.main.poseidon_ptr": 18,
                        "__main__.main.program_hash": 22,
                        "__main__.main.stark_proof": 20
                    }
                },
                "hints": [],
                "inst": {
                    "end_col": 34,
                    "end_line": 47,
                    "input_file": {
                        "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                    },
                    "parent_location": [
                        {
                            "end_col": 97,
                            "end_line": 63,
                            "input_file": {
                                "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                            },
                            "start_col": 86,
                            "start_line": 63
                        },
                        "While expanding the reference 'stark_proof' in:"
                    ],
                    "start_col": 10,
                    "start_line": 47
                }
            },
            "49": {
                "accessible_scopes": [
                    "__main__",
                    "__main__.main"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 9,
                        "offset": 10
                    },
                    "reference_ids": {
                        "__main__.main.output": 19,
                        "__main__.main.output_len": 21,
                        "__main__.main.output_ptr": 17,
                        "__main__.main.poseidon_ptr": 18,
                        "__main__.main.program_hash": 22,
                        "__main__.main.stark_proof": 20
                    }
                },
                "hints": [],
                "inst": {
                    "end_col": 6,
                    "end_line": 64,
                    "input_file": {
                        "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                    },
                    "start_col": 5,
                    "start_line": 62
                }
            },
            "51": {
                "accessible_scopes": [
                    "__main__",
                    "__main__.main"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 10,
                        "offset": 0
                    },
                    "reference_ids": {
                        "__main__.main.output": 19,
                        "__main__.main.output_len": 21,
                        "__main__.main.output_ptr": 17,
                        "__main__.main.poseidon_ptr": 18,
                        "__main__.main.program_hash": 22,
                        "__main__.main.stark_proof": 20
                    }
                },
                "hints": [],
                "inst": {
                    "end_col": 40,
                    "end_line": 66,
                    "input_file": {
                        "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                    },
                    "start_col": 5,
                    "start_line": 66
                }
            },
            "52": {
                "accessible_scopes": [
                    "__main__",
                    "__main__.main"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 10,
                        "offset": 0
                    },
                    "reference_ids": {
                        "__main__.main.output": 19,
                        "__main__.main.output_len": 21,
                        "__main__.main.output_ptr": 23,
                        "__main__.main.poseidon_ptr": 18,
                        "__main__.main.program_hash": 22,
                        "__main__.main.stark_proof": 20
                    }
                },
                "hints": [],
                "inst": {
                    "end_col": 36,
                    "end_line": 67,
                    "input_file": {
                        "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                    },
                    "parent_location": [
                        {
                            "end_col": 26,
                            "end_line": 69,
                            "input_file": {
                                "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                            },
                            "start_col": 16,
                            "start_line": 69
                        },
                        "While expanding the reference 'output_ptr' in:"
                    ],
                    "start_col": 22,
                    "start_line": 67
                }
            },
            "54": {
                "accessible_scopes": [
                    "__main__",
                    "__main__.main"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 10,
                        "offset": 1
                    },
                    "reference_ids": {
                        "__main__.main.output": 19,
                        "__main__.main.output_len": 21,
                        "__main__.main.output_ptr": 23,
                        "__main__.main.poseidon_ptr": 18,
                        "__main__.main.program_hash": 22,
                        "__main__.main.stark_proof": 20
                    }
                },
                "hints": [],
                "inst": {
                    "end_col": 17,
                    "end_line": 46,
                    "input_file": {
                        "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                    },
                    "parent_location": [
                        {
                            "end_col": 38,
                            "end_line": 69,
                            "input_file": {
                                "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                            },
                            "start_col": 32,
                            "start_line": 69
                        },
                        "While expanding the reference 'output' in:"
                    ],
                    "start_col": 11,
                    "start_line": 46
                }
            },
            "55": {
                "accessible_scopes": [
                    "__main__",
                    "__main__.main"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 10,
                        "offset": 2
                    },
                    "reference_ids": {
                        "__main__.main.output": 19,
                        "__main__.main.output_len": 21,
                        "__main__.main.output_ptr": 23,
                        "__main__.main.poseidon_ptr": 18,
                        "__main__.main.program_hash": 22,
                        "__main__.main.stark_proof": 20
                    }
                },
                "hints": [],
                "inst": {
                    "end_col": 21,
                    "end_line": 57,
                    "input_file": {
                        "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                    },
                    "parent_location": [
                        {
                            "end_col": 54,
                            "end_line": 69,
                            "input_file": {
                                "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                            },
                            "start_col": 44,
                            "start_line": 69
                        },
                        "While expanding the reference 'output_len' in:"
                    ],
                    "start_col": 11,
                    "start_line": 57
                }
            },
            "56": {
                "accessible_scopes": [
                    "__main__",
                    "__main__.main"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 10,
                        "offset": 3
                    },
                    "reference_ids": {
                        "__main__.main.output": 19,
                        "__main__.main.output_len": 21,
                        "__main__.main.output_ptr": 23,
                        "__main__.main.poseidon_ptr": 18,
                        "__main__.main.program_hash": 22,
                        "__main__.main.stark_proof": 20
                    }
                },
                "hints": [],
                "inst": {
                    "end_col": 55,
                    "end_line": 69,
                    "input_file": {
                        "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                    },
                    "start_col": 5,
                    "start_line": 69
                }
            },
            "58": {
                "accessible_scopes": [
                    "__main__",
                    "__main__.main"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 11,
                        "offset": 0
                    },
                    "reference_ids": {
                        "__main__.main.output": 19,
                        "__main__.main.output_len": 21,
                        "__main__.main.output_ptr": 24,
                        "__main__.main.poseidon_ptr": 18,
                        "__main__.main.program_hash": 22,
                        "__main__.main.stark_proof": 20
                    }
                },
                "hints": [],
                "inst": {
                    "end_col": 36,
                    "end_line": 67,
                    "input_file": {
                        "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                    },
                    "parent_location": [
                        {
                            "end_col": 32,
                            "end_line": 70,
                            "input_file": {
                                "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                            },
                            "parent_location": [
                                {
                                    "end_col": 28,
                                    "end_line": 43,
                                    "input_file": {
                                        "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                                    },
                                    "parent_location": [
                                        {
                                            "end_col": 15,
                                            "end_line": 72,
                                            "input_file": {
                                                "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                                            },
                                            "start_col": 5,
                                            "start_line": 72
                                        },
                                        "While trying to retrieve the implicit argument 'output_ptr' in:"
                                    ],
                                    "start_col": 11,
                                    "start_line": 43
                                },
                                "While expanding the reference 'output_ptr' in:"
                            ],
                            "start_col": 22,
                            "start_line": 70
                        },
                        "While expanding the reference 'output_ptr' in:"
                    ],
                    "start_col": 22,
                    "start_line": 67
                }
            },
            "60": {
                "accessible_scopes": [
                    "__main__",
                    "__main__.main"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 11,
                        "offset": 1
                    },
                    "reference_ids": {
                        "__main__.main.__temp2": 25,
                        "__main__.main.output": 19,
                        "__main__.main.output_len": 21,
                        "__main__.main.output_ptr": 24,
                        "__main__.main.poseidon_ptr": 18,
                        "__main__.main.program_hash": 22,
                        "__main__.main.stark_proof": 20
                    }
                },
                "hints": [],
                "inst": {
                    "end_col": 45,
                    "end_line": 70,
                    "input_file": {
                        "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                    },
                    "parent_location": [
                        {
                            "end_col": 28,
                            "end_line": 43,
                            "input_file": {
                                "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                            },
                            "parent_location": [
                                {
                                    "end_col": 15,
                                    "end_line": 72,
                                    "input_file": {
                                        "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                                    },
                                    "start_col": 5,
                                    "start_line": 72
                                },
                                "While trying to retrieve the implicit argument 'output_ptr' in:"
                            ],
                            "start_col": 11,
                            "start_line": 43
                        },
                        "While expanding the reference 'output_ptr' in:"
                    ],
                    "start_col": 22,
                    "start_line": 70
                }
            },
            "61": {
                "accessible_scopes": [
                    "__main__",
                    "__main__.main"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 11,
                        "offset": 2
                    },
                    "reference_ids": {
                        "__main__.main.__temp2": 25,
                        "__main__.main.output": 19,
                        "__main__.main.output_len": 21,
                        "__main__.main.output_ptr": 24,
                        "__main__.main.poseidon_ptr": 18,
                        "__main__.main.program_hash": 22,
                        "__main__.main.stark_proof": 20
                    }
                },
                "hints": [],
                "inst": {
                    "end_col": 60,
                    "end_line": 43,
                    "input_file": {
                        "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                    },
                    "parent_location": [
                        {
                            "end_col": 60,
                            "end_line": 43,
                            "input_file": {
                                "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                            },
                            "parent_location": [
                                {
                                    "end_col": 15,
                                    "end_line": 72,
                                    "input_file": {
                                        "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                                    },
                                    "start_col": 5,
                                    "start_line": 72
                                },
                                "While trying to retrieve the implicit argument 'poseidon_ptr' in:"
                            ],
                            "start_col": 30,
                            "start_line": 43
                        },
                        "While expanding the reference 'poseidon_ptr' in:"
                    ],
                    "start_col": 30,
                    "start_line": 43
                }
            },
            "62": {
                "accessible_scopes": [
                    "__main__",
                    "__main__.main"
                ],
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 11,
                        "offset": 3
                    },
                    "reference_ids": {
                        "__main__.main.__temp2": 25,
                        "__main__.main.output": 19,
                        "__main__.main.output_len": 21,
                        "__main__.main.output_ptr": 24,
                        "__main__.main.poseidon_ptr": 18,
                        "__main__.main.program_hash": 22,
                        "__main__.main.stark_proof": 20
                    }
                },
                "hints": [],
                "inst": {
                    "end_col": 15,
                    "end_line": 72,
                    "input_file": {
                        "filename": "src/starkware/cairo/cairo_verifier/mock_cairo_verifier.cairo"
                    },
                    "start_col": 5,
                    "start_line": 72
                }
            }
        }
    },
    "hints": {
        "6": [
            {
                "accessible_scopes": [
                    "starkware.cairo.common.alloc",
                    "starkware.cairo.common.alloc.alloc"
                ],
                "code": "memory[ap] = segments.add()",
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 2,
                        "offset": 0
                    },
                    "reference_ids": {}
                }
            }
        ],
        "12": [
            {
                "accessible_scopes": [
                    "starkware.cairo.common.memcpy",
                    "starkware.cairo.common.memcpy.memcpy"
                ],
                "code": "vm_enter_scope({'n': ids.len})",
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 3,
                        "offset": 0
                    },
                    "reference_ids": {
                        "starkware.cairo.common.memcpy.memcpy.dst": 0,
                        "starkware.cairo.common.memcpy.memcpy.len": 2,
                        "starkware.cairo.common.memcpy.memcpy.src": 1
                    }
                }
            }
        ],
        "20": [
            {
                "accessible_scopes": [
                    "starkware.cairo.common.memcpy",
                    "starkware.cairo.common.memcpy.memcpy"
                ],
                "code": "n -= 1\nids.continue_copying = 1 if n > 0 else 0",
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 3,
                        "offset": 5
                    },
                    "reference_ids": {
                        "starkware.cairo.common.memcpy.memcpy.__temp0": 5,
                        "starkware.cairo.common.memcpy.memcpy.continue_copying": 6,
                        "starkware.cairo.common.memcpy.memcpy.dst": 0,
                        "starkware.cairo.common.memcpy.memcpy.frame": 4,
                        "starkware.cairo.common.memcpy.memcpy.len": 2,
                        "starkware.cairo.common.memcpy.memcpy.next_frame": 7,
                        "starkware.cairo.common.memcpy.memcpy.src": 1
                    }
                }
            }
        ],
        "23": [
            {
                "accessible_scopes": [
                    "starkware.cairo.common.memcpy",
                    "starkware.cairo.common.memcpy.memcpy"
                ],
                "code": "vm_exit_scope()",
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 3,
                        "offset": 6
                    },
                    "reference_ids": {
                        "starkware.cairo.common.memcpy.memcpy.__temp0": 5,
                        "starkware.cairo.common.memcpy.memcpy.continue_copying": 6,
                        "starkware.cairo.common.memcpy.memcpy.dst": 0,
                        "starkware.cairo.common.memcpy.memcpy.frame": 4,
                        "starkware.cairo.common.memcpy.memcpy.len": 2,
                        "starkware.cairo.common.memcpy.memcpy.next_frame": 7,
                        "starkware.cairo.common.memcpy.memcpy.src": 1
                    }
                }
            }
        ],
        "36": [
            {
                "accessible_scopes": [
                    "__main__",
                    "__main__.verify_cairo_proof"
                ],
                "code": "memory[ap] = to_felt_or_relocatable(n_steps)",
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 7,
                        "offset": 0
                    },
                    "reference_ids": {
                        "__main__.verify_cairo_proof.output": 14,
                        "__main__.verify_cairo_proof.output_len": 13,
                        "__main__.verify_cairo_proof.program_hash": 12,
                        "__main__.verify_cairo_proof.stark_proof": 15
                    }
                }
            }
        ],
        "45": [
            {
                "accessible_scopes": [
                    "__main__",
                    "__main__.main"
                ],
                "code": "from starkware.cairo.cairo_verifier.mock_cairo_verifier_input import MockCairoVerifierInput\n\n# Get output to apply hash state.\nmock_cairo_verifier_input = MockCairoVerifierInput.load(program_input)\nprogram_hash = mock_cairo_verifier_input.program_hash\nprogram_output = mock_cairo_verifier_input.program_output\nids.output = segments.gen_arg(program_output)",
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 9,
                        "offset": 6
                    },
                    "reference_ids": {
                        "__main__.main.output": 19,
                        "__main__.main.output_ptr": 17,
                        "__main__.main.poseidon_ptr": 18,
                        "__main__.main.stark_proof": 20
                    }
                }
            },
            {
                "accessible_scopes": [
                    "__main__",
                    "__main__.main"
                ],
                "code": "memory[fp + 1] = to_felt_or_relocatable(len(program_output))",
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 9,
                        "offset": 6
                    },
                    "reference_ids": {
                        "__main__.main.output": 19,
                        "__main__.main.output_ptr": 17,
                        "__main__.main.poseidon_ptr": 18,
                        "__main__.main.stark_proof": 20
                    }
                }
            },
            {
                "accessible_scopes": [
                    "__main__",
                    "__main__.main"
                ],
                "code": "memory[fp + 2] = to_felt_or_relocatable(program_hash)",
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 9,
                        "offset": 6
                    },
                    "reference_ids": {
                        "__main__.main.output": 19,
                        "__main__.main.output_len": 21,
                        "__main__.main.output_ptr": 17,
                        "__main__.main.poseidon_ptr": 18,
                        "__main__.main.stark_proof": 20
                    }
                }
            },
            {
                "accessible_scopes": [
                    "__main__",
                    "__main__.main"
                ],
                "code": "n_steps = program_input[\"n_steps\"]",
                "flow_tracking_data": {
                    "ap_tracking": {
                        "group": 9,
                        "offset": 6
                    },
                    "reference_ids": {
                        "__main__.main.output": 19,
                        "__main__.main.output_len": 21,
                        "__main__.main.output_ptr": 17,
                        "__main__.main.poseidon_ptr": 18,
                        "__main__.main.program_hash": 22,
                        "__main__.main.stark_proof": 20
                    }
                }
            }
        ]
    },
    "identifiers": {
        "__main__.PoseidonBuiltin": {
            "destination": "starkware.cairo.common.cairo_builtins.PoseidonBuiltin",
            "type": "alias"
        },
        "__main__.StarkProof": {
            "destination": "starkware.cairo.stark_verifier.core.stark.StarkProof",
            "type": "alias"
        },
        "__main__.__end__": {
            "pc": 4,
            "type": "label"
        },
        "__main__.__start__": {
            "pc": 0,
            "type": "label"
        },
        "__main__.alloc": {
            "destination": "starkware.cairo.common.alloc.alloc",
            "type": "alias"
        },
        "__main__.grind_mock_steps": {
            "decorators": [],
            "pc": 28,
            "type": "function"
        },
        "__main__.grind_mock_steps.Args": {
            "full_name": "__main__.grind_mock_steps.Args",
            "members": {
                "n_mock_steps": {
                    "cairo_type": "felt",
                    "offset": 0
                }
            },
            "size": 1,
            "type": "struct"
        },
        "__main__.grind_mock_steps.ImplicitArgs": {
            "full_name": "__main__.grind_mock_steps.ImplicitArgs",
            "members": {},
            "size": 0,
            "type": "struct"
        },
        "__main__.grind_mock_steps.Return": {
            "cairo_type": "()",
            "type": "type_definition"
        },
        "__main__.grind_mock_steps.SIZEOF_LOCALS": {
            "type": "const",
            "value": 0
        },
        "__main__.grind_mock_steps.n_mock_steps": {
            "cairo_type": "felt",
            "full_name": "__main__.grind_mock_steps.n_mock_steps",
            "references": [
                {
                    "ap_tracking_data": {
                        "group": 5,
                        "offset": 0
                    },
                    "pc": 28,
                    "value": "[cast(fp + (-3), felt*)]"
                }
            ],
            "type": "reference"
        },
        "__main__.main": {
            "decorators": [],
            "pc": 41,
            "type": "function"
        },
        "__main__.main.Args": {
            "full_name": "__main__.main.Args",
            "members": {},
            "size": 0,
            "type": "struct"
        },
        "__main__.main.ImplicitArgs": {
            "full_name": "__main__.main.ImplicitArgs",
            "members": {
                "output_ptr": {
                    "cairo_type": "felt*",
                    "offset": 0
                },
                "poseidon_ptr": {
                    "cairo_type": "starkware.cairo.common.cairo_builtins.PoseidonBuiltin*",
                    "offset": 1
                }
            },
            "size": 2,
            "type": "struct"
        },
        "__main__.main.Return": {
            "cairo_type": "()",
            "type": "type_definition"
        },
        "__main__.main.SIZEOF_LOCALS": {
            "type": "const",
            "value": 3
        },
        "__main__.main.__temp2": {
            "cairo_type": "felt",
            "full_name": "__main__.main.__temp2",
            "references": [
                {
                    "ap_tracking_data": {
                        "group": 11,
                        "offset": 1
                    },
                    "pc": 60,
                    "value": "[cast(ap + (-1), felt*)]"
                }
            ],
            "type": "reference"
        },
        "__main__.main.output": {
            "cairo_type": "felt*",
            "full_name": "__main__.main.output",
            "references": [
                {
                    "ap_tracking_data": {
                        "group": 9,
                        "offset": 3
                    },
                    "pc": 43,
                    "value": "[cast(fp, felt**)]"
                }
            ],
            "type": "reference"
        },
        "__main__.main.output_len": {
            "cairo_type": "felt",
            "full_name": "__main__.main.output_len",
            "references": [
                {
                    "ap_tracking_data": {
                        "group": 9,
                        "offset": 6
                    },
                    "pc": 45,
                    "value": "[cast(fp + 1, felt*)]"
                }
            ],
            "type": "reference"
        },
        "__main__.main.output_ptr": {
            "cairo_type": "felt*",
            "full_name": "__main__.main.output_ptr",
            "references": [
                {
                    "ap_tracking_data": {
                        "group": 9,
                        "offset": 0
                    },
                    "pc": 41,
                    "value": "[cast(fp + (-4), felt**)]"
                },
                {
                    "ap_tracking_data": {
                        "group": 10,
                        "offset": 0
                    },
                    "pc": 52,
                    "value": "cast([fp + (-4)] + 1, felt*)"
                },
                {
                    "ap_tracking_data": {
                        "group": 11,
                        "offset": 0
                    },
                    "pc": 58,
                    "value": "cast([fp + (-4)] + 1 + [fp + 1], felt*)"
                }
            ],
            "type": "reference"
        },
        "__main__.main.poseidon_ptr": {
            "cairo_type": "starkware.cairo.common.cairo_builtins.PoseidonBuiltin*",
            "full_name": "__main__.main.poseidon_ptr",
            "references": [
                {
                    "ap_tracking_data": {
                        "group": 9,
                        "offset": 0
                    },
                    "pc": 41,
                    "value": "[cast(fp + (-3), starkware.cairo.common.cairo_builtins.PoseidonBuiltin**)]"
                }
            ],
            "type": "reference"
        },
        "__main__.main.program_hash": {
            "cairo_type": "felt",
            "full_name": "__main__.main.program_hash",
            "references": [
                {
                    "ap_tracking_data": {
                        "group": 9,
                        "offset": 6
                    },
                    "pc": 45,
                    "value": "[cast(fp + 2, felt*)]"
                }
            ],
            "type": "reference"
        },
        "__main__.main.stark_proof": {
            "cairo_type": "starkware.cairo.stark_verifier.core.stark.StarkProof*",
            "full_name": "__main__.main.stark_proof",
            "references": [
                {
                    "ap_tracking_data": {
                        "group": 9,
                        "offset": 6
                    },
                    "pc": 45,
                    "value": "[cast(ap + (-1), starkware.cairo.stark_verifier.core.stark.StarkProof**)]"
                }
            ],
            "type": "reference"
        },
        "__main__.memcpy": {
            "destination": "starkware.cairo.common.memcpy.memcpy",
            "type": "alias"
        },
        "__main__.serialize_word": {
            "destination": "starkware.cairo.common.serialize.serialize_word",
            "type": "alias"
        },
        "__main__.verify_cairo_proof": {
            "decorators": [],
            "pc": 36,
            "type": "function"
        },
        "__main__.verify_cairo_proof.Args": {
            "full_name": "__main__.verify_cairo_proof.Args",
            "members": {
                "output": {
                    "cairo_type": "felt*",
                    "offset": 2
                },
                "output_len": {
                    "cairo_type": "felt",
                    "offset": 1
                },
                "program_hash": {
                    "cairo_type": "felt",
                    "offset": 0
                },
                "stark_proof": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.stark.StarkProof*",
                    "offset": 3
                }
            },
            "size": 4,
            "type": "struct"
        },
        "__main__.verify_cairo_proof.ImplicitArgs": {
            "full_name": "__main__.verify_cairo_proof.ImplicitArgs",
            "members": {},
            "size": 0,
            "type": "struct"
        },
        "__main__.verify_cairo_proof.Return": {
            "cairo_type": "()",
            "type": "type_definition"
        },
        "__main__.verify_cairo_proof.SIZEOF_LOCALS": {
            "type": "const",
            "value": 0
        },
        "__main__.verify_cairo_proof.__temp1": {
            "cairo_type": "felt",
            "full_name": "__main__.verify_cairo_proof.__temp1",
            "references": [
                {
                    "ap_tracking_data": {
                        "group": 7,
                        "offset": 1
                    },
                    "pc": 38,
                    "value": "[cast(ap + (-1), felt*)]"
                }
            ],
            "type": "reference"
        },
        "__main__.verify_cairo_proof.output": {
            "cairo_type": "felt*",
            "full_name": "__main__.verify_cairo_proof.output",
            "references": [
                {
                    "ap_tracking_data": {
                        "group": 7,
                        "offset": 0
                    },
                    "pc": 36,
                    "value": "[cast(fp + (-4), felt**)]"
                }
            ],
            "type": "reference"
        },
        "__main__.verify_cairo_proof.output_len": {
            "cairo_type": "felt",
            "full_name": "__main__.verify_cairo_proof.output_len",
            "references": [
                {
                    "ap_tracking_data": {
                        "group": 7,
                        "offset": 0
                    },
                    "pc": 36,
                    "value": "[cast(fp + (-5), felt*)]"
                }
            ],
            "type": "reference"
        },
        "__main__.verify_cairo_proof.program_hash": {
            "cairo_type": "felt",
            "full_name": "__main__.verify_cairo_proof.program_hash",
            "references": [
                {
                    "ap_tracking_data": {
                        "group": 7,
                        "offset": 0
                    },
                    "pc": 36,
                    "value": "[cast(fp + (-6), felt*)]"
                }
            ],
            "type": "reference"
        },
        "__main__.verify_cairo_proof.stark_proof": {
            "cairo_type": "starkware.cairo.stark_verifier.core.stark.StarkProof*",
            "full_name": "__main__.verify_cairo_proof.stark_proof",
            "references": [
                {
                    "ap_tracking_data": {
                        "group": 7,
                        "offset": 0
                    },
                    "pc": 36,
                    "value": "[cast(fp + (-3), starkware.cairo.stark_verifier.core.stark.StarkProof**)]"
                }
            ],
            "type": "reference"
        },
        "starkware.cairo.common.alloc.alloc": {
            "decorators": [],
            "pc": 6,
            "type": "function"
        },
        "starkware.cairo.common.alloc.alloc.Args": {
            "full_name": "starkware.cairo.common.alloc.alloc.Args",
            "members": {},
            "size": 0,
            "type": "struct"
        },
        "starkware.cairo.common.alloc.alloc.ImplicitArgs": {
            "full_name": "starkware.cairo.common.alloc.alloc.ImplicitArgs",
            "members": {},
            "size": 0,
            "type": "struct"
        },
        "starkware.cairo.common.alloc.alloc.Return": {
            "cairo_type": "(ptr: felt*)",
            "type": "type_definition"
        },
        "starkware.cairo.common.alloc.alloc.SIZEOF_LOCALS": {
            "type": "const",
            "value": 0
        },
        "starkware.cairo.common.bitwise.ALL_ONES": {
            "type": "const",
            "value": -106710729501573572985208420194530329073740042555888586719234
        },
        "starkware.cairo.common.bitwise.BitwiseBuiltin": {
            "destination": "starkware.cairo.common.cairo_builtins.BitwiseBuiltin",
            "type": "alias"
        },
        "starkware.cairo.common.bool.FALSE": {
            "type": "const",
            "value": 0
        },
        "starkware.cairo.common.bool.TRUE": {
            "type": "const",
            "value": 1
        },
        "starkware.cairo.common.builtin_poseidon.poseidon.PoseidonBuiltin": {
            "destination": "starkware.cairo.common.cairo_builtins.PoseidonBuiltin",
            "type": "alias"
        },
        "starkware.cairo.common.builtin_poseidon.poseidon.PoseidonBuiltinState": {
            "destination": "starkware.cairo.common.poseidon_state.PoseidonBuiltinState",
            "type": "alias"
        },
        "starkware.cairo.common.cairo_blake2s.blake2s.BLAKE2S_AP_FLAGS": {
            "type": "const",
            "value": 16
        },
        "starkware.cairo.common.cairo_blake2s.blake2s.BLAKE2S_FINALIZE_INSTRUCTION": {
            "type": "const",
            "value": 18451388404382662655
        },
        "starkware.cairo.common.cairo_blake2s.blake2s.BLAKE2S_FINALIZE_OPCODE_EXT": {
            "type": "const",
            "value": 2
        },
        "starkware.cairo.common.cairo_blake2s.blake2s.BLAKE2S_INSTRUCTION": {
            "type": "const",
            "value": 9228016363232854015
        },
        "starkware.cairo.common.cairo_blake2s.blake2s.BLAKE2S_OPCODE_EXT": {
            "type": "const",
            "value": 1
        },
        "starkware.cairo.common.cairo_blake2s.blake2s.BitwiseBuiltin": {
            "destination": "starkware.cairo.common.cairo_builtins.BitwiseBuiltin",
            "type": "alias"
        },
        "starkware.cairo.common.cairo_blake2s.blake2s.COUNTER_OFFSET": {
            "type": "const",
            "value": 1
        },
        "starkware.cairo.common.cairo_blake2s.blake2s.FLAGS_OFFSET": {
            "type": "const",
            "value": 281474976710656
        },
        "starkware.cairo.common.cairo_blake2s.blake2s.INPUT_BLOCK_BYTES": {
            "type": "const",
            "value": 64
        },
        "starkware.cairo.common.cairo_blake2s.blake2s.INPUT_BLOCK_FELTS": {
            "type": "const",
            "value": 16
        },
        "starkware.cairo.common.cairo_blake2s.blake2s.INSTANCE_SIZE": {
            "type": "const",
            "value": 34
        },
        "starkware.cairo.common.cairo_blake2s.blake2s.MESSAGE_OFFSET": {
            "type": "const",
            "value": 4294967296
        },
        "starkware.cairo.common.cairo_blake2s.blake2s.N_PACKED_INSTANCES": {
            "destination": "starkware.cairo.common.cairo_blake2s.packed_blake2s.N_PACKED_INSTANCES",
            "type": "alias"
        },
        "starkware.cairo.common.cairo_blake2s.blake2s.OFF_MINUS_1": {
            "type": "const",
            "value": 32767
        },
        "starkware.cairo.common.cairo_blake2s.blake2s.OFF_MINUS_2": {
            "type": "const",
            "value": 32766
        },
        "starkware.cairo.common.cairo_blake2s.blake2s.OFF_MINUS_3": {
            "type": "const",
            "value": 32765
        },
        "starkware.cairo.common.cairo_blake2s.blake2s.OFF_MINUS_4": {
            "type": "const",
            "value": 32764
        },
        "starkware.cairo.common.cairo_blake2s.blake2s.OP1_AP": {
            "type": "const",
            "value": 4
        },
        "starkware.cairo.common.cairo_blake2s.blake2s.OPCODE_EXT_OFFSET": {
            "type": "const",
            "value": 9223372036854775808
        },
        "starkware.cairo.common.cairo_blake2s.blake2s.STATE_OFFSET": {
            "type": "const",
            "value": 65536
        },
        "starkware.cairo.common.cairo_blake2s.blake2s.STATE_SIZE_FELTS": {
            "type": "const",
            "value": 8
        },
        "starkware.cairo.common.cairo_blake2s.blake2s.Uint256": {
            "destination": "starkware.cairo.common.uint256.Uint256",
            "type": "alias"
        },
        "starkware.cairo.common.cairo_blake2s.blake2s.alloc": {
            "destination": "starkware.cairo.common.alloc.alloc",
            "type": "alias"
        },
        "starkware.cairo.common.cairo_blake2s.blake2s.assert_nn_le": {
            "destination": "starkware.cairo.common.math.assert_nn_le",
            "type": "alias"
        },
        "starkware.cairo.common.cairo_blake2s.blake2s.blake2s_compress": {
            "destination": "starkware.cairo.common.cairo_blake2s.packed_blake2s.blake2s_compress",
            "type": "alias"
        },
        "starkware.cairo.common.cairo_blake2s.blake2s.get_fp_and_pc": {
            "destination": "starkware.cairo.common.registers.get_fp_and_pc",
            "type": "alias"
        },
        "starkware.cairo.common.cairo_blake2s.blake2s.get_label_location": {
            "destination": "starkware.cairo.common.registers.get_label_location",
            "type": "alias"
        },
        "starkware.cairo.common.cairo_blake2s.blake2s.is_le": {
            "destination": "starkware.cairo.common.math_cmp.is_le",
            "type": "alias"
        },
        "starkware.cairo.common.cairo_blake2s.blake2s.memcpy": {
            "destination": "starkware.cairo.common.memcpy.memcpy",
            "type": "alias"
        },
        "starkware.cairo.common.cairo_blake2s.blake2s.memset": {
            "destination": "starkware.cairo.common.memset.memset",
            "type": "alias"
        },
        "starkware.cairo.common.cairo_blake2s.blake2s.pow": {
            "destination": "starkware.cairo.common.pow.pow",
            "type": "alias"
        },
        "starkware.cairo.common.cairo_blake2s.blake2s.split_felt": {
            "destination": "starkware.cairo.common.math.split_felt",
            "type": "alias"
        },
        "starkware.cairo.common.cairo_blake2s.blake2s.unsigned_div_rem": {
            "destination": "starkware.cairo.common.math.unsigned_div_rem",
            "type": "alias"
        },
        "starkware.cairo.common.cairo_blake2s.packed_blake2s.ALL_ONES": {
            "type": "const",
            "value": -106710729501573572985208420194530329073740042555888586719234
        },
        "starkware.cairo.common.cairo_blake2s.packed_blake2s.BitwiseBuiltin": {
            "destination": "starkware.cairo.common.cairo_builtins.BitwiseBuiltin",
            "type": "alias"
        },
        "starkware.cairo.common.cairo_blake2s.packed_blake2s.N_PACKED_INSTANCES": {
            "type": "const",
            "value": 7
        },
        "starkware.cairo.common.cairo_blake2s.packed_blake2s.SHIFTS": {
            "type": "const",
            "value": 1645504557369096527808422005955997578346737493946174629784584193
        },
        "starkware.cairo.common.cairo_blake2s.packed_blake2s.alloc": {
            "destination": "starkware.cairo.common.alloc.alloc",
            "type": "alias"
        },
        "starkware.cairo.common.cairo_blake2s.packed_blake2s.get_fp_and_pc": {
            "destination": "starkware.cairo.common.registers.get_fp_and_pc",
            "type": "alias"
        },
        "starkware.cairo.common.cairo_builtins.BitwiseBuiltin": {
            "full_name": "starkware.cairo.common.cairo_builtins.BitwiseBuiltin",
            "members": {
                "x": {
                    "cairo_type": "felt",
                    "offset": 0
                },
                "x_and_y": {
                    "cairo_type": "felt",
                    "offset": 2
                },
                "x_or_y": {
                    "cairo_type": "felt",
                    "offset": 4
                },
                "x_xor_y": {
                    "cairo_type": "felt",
                    "offset": 3
                },
                "y": {
                    "cairo_type": "felt",
                    "offset": 1
                }
            },
            "size": 5,
            "type": "struct"
        },
        "starkware.cairo.common.cairo_builtins.EcOpBuiltin": {
            "full_name": "starkware.cairo.common.cairo_builtins.EcOpBuiltin",
            "members": {
                "m": {
                    "cairo_type": "felt",
                    "offset": 4
                },
                "p": {
                    "cairo_type": "starkware.cairo.common.ec_point.EcPoint",
                    "offset": 0
                },
                "q": {
                    "cairo_type": "starkware.cairo.common.ec_point.EcPoint",
                    "offset": 2
                },
                "r": {
                    "cairo_type": "starkware.cairo.common.ec_point.EcPoint",
                    "offset": 5
                }
            },
            "size": 7,
            "type": "struct"
        },
        "starkware.cairo.common.cairo_builtins.EcPoint": {
            "destination": "starkware.cairo.common.ec_point.EcPoint",
            "type": "alias"
        },
        "starkware.cairo.common.cairo_builtins.HashBuiltin": {
            "full_name": "starkware.cairo.common.cairo_builtins.HashBuiltin",
            "members": {
                "result": {
                    "cairo_type": "felt",
                    "offset": 2
                },
                "x": {
                    "cairo_type": "felt",
                    "offset": 0
                },
                "y": {
                    "cairo_type": "felt",
                    "offset": 1
                }
            },
            "size": 3,
            "type": "struct"
        },
        "starkware.cairo.common.cairo_builtins.KeccakBuiltin": {
            "full_name": "starkware.cairo.common.cairo_builtins.KeccakBuiltin",
            "members": {
                "input": {
                    "cairo_type": "starkware.cairo.common.keccak_state.KeccakBuiltinState",
                    "offset": 0
                },
                "output": {
                    "cairo_type": "starkware.cairo.common.keccak_state.KeccakBuiltinState",
                    "offset": 8
                }
            },
            "size": 16,
            "type": "struct"
        },
        "starkware.cairo.common.cairo_builtins.KeccakBuiltinState": {
            "destination": "starkware.cairo.common.keccak_state.KeccakBuiltinState",
            "type": "alias"
        },
        "starkware.cairo.common.cairo_builtins.ModBuiltin": {
            "full_name": "starkware.cairo.common.cairo_builtins.ModBuiltin",
            "members": {
                "n": {
                    "cairo_type": "felt",
                    "offset": 6
                },
                "offsets_ptr": {
                    "cairo_type": "felt*",
                    "offset": 5
                },
                "p": {
                    "cairo_type": "starkware.cairo.common.cairo_builtins.UInt384",
                    "offset": 0
                },
                "values_ptr": {
                    "cairo_type": "starkware.cairo.common.cairo_builtins.UInt384*",
                    "offset": 4
                }
            },
            "size": 7,
            "type": "struct"
        },
        "starkware.cairo.common.cairo_builtins.PoseidonBuiltin": {
            "full_name": "starkware.cairo.common.cairo_builtins.PoseidonBuiltin",
            "members": {
                "input": {
                    "cairo_type": "starkware.cairo.common.poseidon_state.PoseidonBuiltinState",
                    "offset": 0
                },
                "output": {
                    "cairo_type": "starkware.cairo.common.poseidon_state.PoseidonBuiltinState",
                    "offset": 3
                }
            },
            "size": 6,
            "type": "struct"
        },
        "starkware.cairo.common.cairo_builtins.PoseidonBuiltinState": {
            "destination": "starkware.cairo.common.poseidon_state.PoseidonBuiltinState",
            "type": "alias"
        },
        "starkware.cairo.common.cairo_builtins.SignatureBuiltin": {
            "full_name": "starkware.cairo.common.cairo_builtins.SignatureBuiltin",
            "members": {
                "message": {
                    "cairo_type": "felt",
                    "offset": 1
                },
                "pub_key": {
                    "cairo_type": "felt",
                    "offset": 0
                }
            },
            "size": 2,
            "type": "struct"
        },
        "starkware.cairo.common.cairo_builtins.UInt384": {
            "full_name": "starkware.cairo.common.cairo_builtins.UInt384",
            "members": {
                "d0": {
                    "cairo_type": "felt",
                    "offset": 0
                },
                "d1": {
                    "cairo_type": "felt",
                    "offset": 1
                },
                "d2": {
                    "cairo_type": "felt",
                    "offset": 2
                },
                "d3": {
                    "cairo_type": "felt",
                    "offset": 3
                }
            },
            "size": 4,
            "type": "struct"
        },
        "starkware.cairo.common.ec_point.EcPoint": {
            "full_name": "starkware.cairo.common.ec_point.EcPoint",
            "members": {
                "x": {
                    "cairo_type": "felt",
                    "offset": 0
                },
                "y": {
                    "cairo_type": "felt",
                    "offset": 1
                }
            },
            "size": 2,
            "type": "struct"
        },
        "starkware.cairo.common.hash.HashBuiltin": {
            "destination": "starkware.cairo.common.cairo_builtins.HashBuiltin",
            "type": "alias"
        },
        "starkware.cairo.common.keccak_state.KeccakBuiltinState": {
            "full_name": "starkware.cairo.common.keccak_state.KeccakBuiltinState",
            "members": {
                "s0": {
                    "cairo_type": "felt",
                    "offset": 0
                },
                "s1": {
                    "cairo_type": "felt",
                    "offset": 1
                },
                "s2": {
                    "cairo_type": "felt",
                    "offset": 2
                },
                "s3": {
                    "cairo_type": "felt",
                    "offset": 3
                },
                "s4": {
                    "cairo_type": "felt",
                    "offset": 4
                },
                "s5": {
                    "cairo_type": "felt",
                    "offset": 5
                },
                "s6": {
                    "cairo_type": "felt",
                    "offset": 6
                },
                "s7": {
                    "cairo_type": "felt",
                    "offset": 7
                }
            },
            "size": 8,
            "type": "struct"
        },
        "starkware.cairo.common.math.FALSE": {
            "destination": "starkware.cairo.common.bool.FALSE",
            "type": "alias"
        },
        "starkware.cairo.common.math.TRUE": {
            "destination": "starkware.cairo.common.bool.TRUE",
            "type": "alias"
        },
        "starkware.cairo.common.math_cmp.RC_BOUND": {
            "type": "const",
            "value": 340282366920938463463374607431768211456
        },
        "starkware.cairo.common.math_cmp.assert_le_felt": {
            "destination": "starkware.cairo.common.math.assert_le_felt",
            "type": "alias"
        },
        "starkware.cairo.common.math_cmp.assert_lt_felt": {
            "destination": "starkware.cairo.common.math.assert_lt_felt",
            "type": "alias"
        },
        "starkware.cairo.common.memcpy.memcpy": {
            "decorators": [],
            "pc": 9,
            "type": "function"
        },
        "starkware.cairo.common.memcpy.memcpy.Args": {
            "full_name": "starkware.cairo.common.memcpy.memcpy.Args",
            "members": {
                "dst": {
                    "cairo_type": "felt*",
                    "offset": 0
                },
                "len": {
                    "cairo_type": "felt",
                    "offset": 2
                },
                "src": {
                    "cairo_type": "felt*",
                    "offset": 1
                }
            },
            "size": 3,
            "type": "struct"
        },
        "starkware.cairo.common.memcpy.memcpy.ImplicitArgs": {
            "full_name": "starkware.cairo.common.memcpy.memcpy.ImplicitArgs",
            "members": {},
            "size": 0,
            "type": "struct"
        },
        "starkware.cairo.common.memcpy.memcpy.LoopFrame": {
            "full_name": "starkware.cairo.common.memcpy.memcpy.LoopFrame",
            "members": {
                "dst": {
                    "cairo_type": "felt*",
                    "offset": 0
                },
                "src": {
                    "cairo_type": "felt*",
                    "offset": 1
                }
            },
            "size": 2,
            "type": "struct"
        },
        "starkware.cairo.common.memcpy.memcpy.Return": {
            "cairo_type": "()",
            "type": "type_definition"
        },
        "starkware.cairo.common.memcpy.memcpy.SIZEOF_LOCALS": {
            "type": "const",
            "value": 0
        },
        "starkware.cairo.common.memcpy.memcpy.__temp0": {
            "cairo_type": "felt",
            "full_name": "starkware.cairo.common.memcpy.memcpy.__temp0",
            "references": [
                {
                    "ap_tracking_data": {
                        "group": 3,
                        "offset": 3
                    },
                    "pc": 15,
                    "value": "[cast(ap + (-1), felt*)]"
                }
            ],
            "type": "reference"
        },
        "starkware.cairo.common.memcpy.memcpy.continue_copying": {
            "cairo_type": "felt",
            "full_name": "starkware.cairo.common.memcpy.memcpy.continue_copying",
            "references": [
                {
                    "ap_tracking_data": {
                        "group": 3,
                        "offset": 3
                    },
                    "pc": 16,
                    "value": "[cast(ap, felt*)]"
                }
            ],
            "type": "reference"
        },
        "starkware.cairo.common.memcpy.memcpy.dst": {
            "cairo_type": "felt*",
            "full_name": "starkware.cairo.common.memcpy.memcpy.dst",
            "references": [
                {
                    "ap_tracking_data": {
                        "group": 3,
                        "offset": 0
                    },
                    "pc": 9,
                    "value": "[cast(fp + (-5), felt**)]"
                }
            ],
            "type": "reference"
        },
        "starkware.cairo.common.memcpy.memcpy.frame": {
            "cairo_type": "starkware.cairo.common.memcpy.memcpy.LoopFrame",
            "full_name": "starkware.cairo.common.memcpy.memcpy.frame",
            "references": [
                {
                    "ap_tracking_data": {
                        "group": 3,
                        "offset": 2
                    },
                    "pc": 14,
                    "value": "[cast(ap + (-2), starkware.cairo.common.memcpy.memcpy.LoopFrame*)]"
                },
                {
                    "ap_tracking_data": {
                        "group": 3,
                        "offset": 2
                    },
                    "pc": 14,
                    "value": "[cast(ap + (-2), starkware.cairo.common.memcpy.memcpy.LoopFrame*)]"
                }
            ],
            "type": "reference"
        },
        "starkware.cairo.common.memcpy.memcpy.len": {
            "cairo_type": "felt",
            "full_name": "starkware.cairo.common.memcpy.memcpy.len",
            "references": [
                {
                    "ap_tracking_data": {
                        "group": 3,
                        "offset": 0
                    },
                    "pc": 9,
                    "value": "[cast(fp + (-3), felt*)]"
                }
            ],
            "type": "reference"
        },
        "starkware.cairo.common.memcpy.memcpy.loop": {
            "pc": 14,
            "type": "label"
        },
        "starkware.cairo.common.memcpy.memcpy.next_frame": {
            "cairo_type": "starkware.cairo.common.memcpy.memcpy.LoopFrame*",
            "full_name": "starkware.cairo.common.memcpy.memcpy.next_frame",
            "references": [
                {
                    "ap_tracking_data": {
                        "group": 3,
                        "offset": 3
                    },
                    "pc": 16,
                    "value": "cast(ap + 1, starkware.cairo.common.memcpy.memcpy.LoopFrame*)"
                }
            ],
            "type": "reference"
        },
        "starkware.cairo.common.memcpy.memcpy.src": {
            "cairo_type": "felt*",
            "full_name": "starkware.cairo.common.memcpy.memcpy.src",
            "references": [
                {
                    "ap_tracking_data": {
                        "group": 3,
                        "offset": 0
                    },
                    "pc": 9,
                    "value": "[cast(fp + (-4), felt**)]"
                }
            ],
            "type": "reference"
        },
        "starkware.cairo.common.poseidon_state.PoseidonBuiltinState": {
            "full_name": "starkware.cairo.common.poseidon_state.PoseidonBuiltinState",
            "members": {
                "s0": {
                    "cairo_type": "felt",
                    "offset": 0
                },
                "s1": {
                    "cairo_type": "felt",
                    "offset": 1
                },
                "s2": {
                    "cairo_type": "felt",
                    "offset": 2
                }
            },
            "size": 3,
            "type": "struct"
        },
        "starkware.cairo.common.pow.assert_le": {
            "destination": "starkware.cairo.common.math.assert_le",
            "type": "alias"
        },
        "starkware.cairo.common.pow.get_ap": {
            "destination": "starkware.cairo.common.registers.get_ap",
            "type": "alias"
        },
        "starkware.cairo.common.pow.get_fp_and_pc": {
            "destination": "starkware.cairo.common.registers.get_fp_and_pc",
            "type": "alias"
        },
        "starkware.cairo.common.pow.sign": {
            "destination": "starkware.cairo.common.math.sign",
            "type": "alias"
        },
        "starkware.cairo.common.registers.get_ap": {
            "destination": "starkware.cairo.lang.compiler.lib.registers.get_ap",
            "type": "alias"
        },
        "starkware.cairo.common.registers.get_fp_and_pc": {
            "destination": "starkware.cairo.lang.compiler.lib.registers.get_fp_and_pc",
            "type": "alias"
        },
        "starkware.cairo.common.serialize.serialize_word": {
            "decorators": [],
            "pc": 24,
            "type": "function"
        },
        "starkware.cairo.common.serialize.serialize_word.Args": {
            "full_name": "starkware.cairo.common.serialize.serialize_word.Args",
            "members": {
                "word": {
                    "cairo_type": "felt",
                    "offset": 0
                }
            },
            "size": 1,
            "type": "struct"
        },
        "starkware.cairo.common.serialize.serialize_word.ImplicitArgs": {
            "full_name": "starkware.cairo.common.serialize.serialize_word.ImplicitArgs",
            "members": {
                "output_ptr": {
                    "cairo_type": "felt*",
                    "offset": 0
                }
            },
            "size": 1,
            "type": "struct"
        },
        "starkware.cairo.common.serialize.serialize_word.Return": {
            "cairo_type": "()",
            "type": "type_definition"
        },
        "starkware.cairo.common.serialize.serialize_word.SIZEOF_LOCALS": {
            "type": "const",
            "value": 0
        },
        "starkware.cairo.common.serialize.serialize_word.output_ptr": {
            "cairo_type": "felt*",
            "full_name": "starkware.cairo.common.serialize.serialize_word.output_ptr",
            "references": [
                {
                    "ap_tracking_data": {
                        "group": 4,
                        "offset": 0
                    },
                    "pc": 24,
                    "value": "[cast(fp + (-4), felt**)]"
                },
                {
                    "ap_tracking_data": {
                        "group": 4,
                        "offset": 0
                    },
                    "pc": 25,
                    "value": "cast([fp + (-4)] + 1, felt*)"
                }
            ],
            "type": "reference"
        },
        "starkware.cairo.common.serialize.serialize_word.word": {
            "cairo_type": "felt",
            "full_name": "starkware.cairo.common.serialize.serialize_word.word",
            "references": [
                {
                    "ap_tracking_data": {
                        "group": 4,
                        "offset": 0
                    },
                    "pc": 24,
                    "value": "[cast(fp + (-3), felt*)]"
                }
            ],
            "type": "reference"
        },
        "starkware.cairo.common.uint256.ALL_ONES": {
            "type": "const",
            "value": 340282366920938463463374607431768211455
        },
        "starkware.cairo.common.uint256.BitwiseBuiltin": {
            "destination": "starkware.cairo.common.cairo_builtins.BitwiseBuiltin",
            "type": "alias"
        },
        "starkware.cairo.common.uint256.HALF_SHIFT": {
            "type": "const",
            "value": 18446744073709551616
        },
        "starkware.cairo.common.uint256.SHIFT": {
            "type": "const",
            "value": 340282366920938463463374607431768211456
        },
        "starkware.cairo.common.uint256.Uint256": {
            "full_name": "starkware.cairo.common.uint256.Uint256",
            "members": {
                "high": {
                    "cairo_type": "felt",
                    "offset": 1
                },
                "low": {
                    "cairo_type": "felt",
                    "offset": 0
                }
            },
            "size": 2,
            "type": "struct"
        },
        "starkware.cairo.common.uint256.assert_in_range": {
            "destination": "starkware.cairo.common.math.assert_in_range",
            "type": "alias"
        },
        "starkware.cairo.common.uint256.assert_le": {
            "destination": "starkware.cairo.common.math.assert_le",
            "type": "alias"
        },
        "starkware.cairo.common.uint256.assert_nn_le": {
            "destination": "starkware.cairo.common.math.assert_nn_le",
            "type": "alias"
        },
        "starkware.cairo.common.uint256.assert_not_zero": {
            "destination": "starkware.cairo.common.math.assert_not_zero",
            "type": "alias"
        },
        "starkware.cairo.common.uint256.bitwise_and": {
            "destination": "starkware.cairo.common.bitwise.bitwise_and",
            "type": "alias"
        },
        "starkware.cairo.common.uint256.bitwise_or": {
            "destination": "starkware.cairo.common.bitwise.bitwise_or",
            "type": "alias"
        },
        "starkware.cairo.common.uint256.bitwise_xor": {
            "destination": "starkware.cairo.common.bitwise.bitwise_xor",
            "type": "alias"
        },
        "starkware.cairo.common.uint256.get_ap": {
            "destination": "starkware.cairo.common.registers.get_ap",
            "type": "alias"
        },
        "starkware.cairo.common.uint256.get_fp_and_pc": {
            "destination": "starkware.cairo.common.registers.get_fp_and_pc",
            "type": "alias"
        },
        "starkware.cairo.common.uint256.is_le": {
            "destination": "starkware.cairo.common.math_cmp.is_le",
            "type": "alias"
        },
        "starkware.cairo.common.uint256.pow": {
            "destination": "starkware.cairo.common.pow.pow",
            "type": "alias"
        },
        "starkware.cairo.common.uint256.split_felt": {
            "destination": "starkware.cairo.common.math.split_felt",
            "type": "alias"
        },
        "starkware.cairo.common.usort.alloc": {
            "destination": "starkware.cairo.common.alloc.alloc",
            "type": "alias"
        },
        "starkware.cairo.common.usort.assert_lt": {
            "destination": "starkware.cairo.common.math.assert_lt",
            "type": "alias"
        },
        "starkware.cairo.common.usort.assert_nn": {
            "destination": "starkware.cairo.common.math.assert_nn",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.air.config_instances.MAX_N_COLUMNS": {
            "type": "const",
            "value": 128
        },
        "starkware.cairo.stark_verifier.air.config_instances.TableCommitmentConfig": {
            "destination": "starkware.cairo.stark_verifier.core.table_commitment.TableCommitmentConfig",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.air.config_instances.TracesConfig": {
            "full_name": "starkware.cairo.stark_verifier.air.config_instances.TracesConfig",
            "members": {
                "interaction": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.table_commitment.TableCommitmentConfig*",
                    "offset": 1
                },
                "original": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.table_commitment.TableCommitmentConfig*",
                    "offset": 0
                }
            },
            "size": 2,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.air_instances.AirInstance": {
            "full_name": "starkware.cairo.stark_verifier.core.air_instances.AirInstance",
            "members": {
                "constraint_degree": {
                    "cairo_type": "felt",
                    "offset": 9
                },
                "eval_oods_boundary_poly_at_points": {
                    "cairo_type": "felt*",
                    "offset": 6
                },
                "mask_size": {
                    "cairo_type": "felt",
                    "offset": 10
                },
                "n_constraints": {
                    "cairo_type": "felt",
                    "offset": 8
                },
                "n_dynamic_params": {
                    "cairo_type": "felt",
                    "offset": 7
                },
                "public_input_hash": {
                    "cairo_type": "felt*",
                    "offset": 0
                },
                "public_input_validate": {
                    "cairo_type": "felt*",
                    "offset": 1
                },
                "traces_commit": {
                    "cairo_type": "felt*",
                    "offset": 3
                },
                "traces_config_validate": {
                    "cairo_type": "felt*",
                    "offset": 2
                },
                "traces_decommit": {
                    "cairo_type": "felt*",
                    "offset": 4
                },
                "traces_eval_composition_polynomial": {
                    "cairo_type": "felt*",
                    "offset": 5
                }
            },
            "size": 11,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.air_instances.OodsEvaluationInfo": {
            "full_name": "starkware.cairo.stark_verifier.core.air_instances.OodsEvaluationInfo",
            "members": {
                "constraint_coefficients": {
                    "cairo_type": "felt*",
                    "offset": 3
                },
                "oods_point": {
                    "cairo_type": "felt",
                    "offset": 1
                },
                "oods_values": {
                    "cairo_type": "felt*",
                    "offset": 0
                },
                "trace_generator": {
                    "cairo_type": "felt",
                    "offset": 2
                }
            },
            "size": 4,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.air_instances.PublicInput": {
            "full_name": "starkware.cairo.stark_verifier.core.air_instances.PublicInput",
            "members": {},
            "size": 0,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.air_instances.TracesCommitment": {
            "full_name": "starkware.cairo.stark_verifier.core.air_instances.TracesCommitment",
            "members": {},
            "size": 0,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.air_instances.TracesConfig": {
            "full_name": "starkware.cairo.stark_verifier.core.air_instances.TracesConfig",
            "members": {},
            "size": 0,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.air_instances.TracesDecommitment": {
            "full_name": "starkware.cairo.stark_verifier.core.air_instances.TracesDecommitment",
            "members": {},
            "size": 0,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.air_instances.TracesUnsentCommitment": {
            "full_name": "starkware.cairo.stark_verifier.core.air_instances.TracesUnsentCommitment",
            "members": {},
            "size": 0,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.air_instances.TracesWitness": {
            "full_name": "starkware.cairo.stark_verifier.core.air_instances.TracesWitness",
            "members": {},
            "size": 0,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.air_interface.AirInstance": {
            "destination": "starkware.cairo.stark_verifier.core.air_instances.AirInstance",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.air_interface.BitwiseBuiltin": {
            "destination": "starkware.cairo.common.cairo_builtins.BitwiseBuiltin",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.air_interface.Channel": {
            "destination": "starkware.cairo.stark_verifier.core.channel.Channel",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.air_interface.HashBuiltin": {
            "destination": "starkware.cairo.common.hash.HashBuiltin",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.air_interface.OodsEvaluationInfo": {
            "destination": "starkware.cairo.stark_verifier.core.air_instances.OodsEvaluationInfo",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.air_interface.PoseidonBuiltin": {
            "destination": "starkware.cairo.common.cairo_builtins.PoseidonBuiltin",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.air_interface.PublicInput": {
            "destination": "starkware.cairo.stark_verifier.core.air_instances.PublicInput",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.air_interface.StarkConfig": {
            "destination": "starkware.cairo.stark_verifier.core.config_instances.StarkConfig",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.air_interface.StarkDomains": {
            "destination": "starkware.cairo.stark_verifier.core.domains.StarkDomains",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.air_interface.TableDecommitment": {
            "destination": "starkware.cairo.stark_verifier.core.table_commitment.TableDecommitment",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.air_interface.TracesCommitment": {
            "destination": "starkware.cairo.stark_verifier.core.air_instances.TracesCommitment",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.air_interface.TracesConfig": {
            "destination": "starkware.cairo.stark_verifier.air.config_instances.TracesConfig",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.air_interface.TracesDecommitment": {
            "destination": "starkware.cairo.stark_verifier.core.air_instances.TracesDecommitment",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.air_interface.TracesUnsentCommitment": {
            "destination": "starkware.cairo.stark_verifier.core.air_instances.TracesUnsentCommitment",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.air_interface.TracesWitness": {
            "destination": "starkware.cairo.stark_verifier.core.air_instances.TracesWitness",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.channel.Channel": {
            "full_name": "starkware.cairo.stark_verifier.core.channel.Channel",
            "members": {
                "counter": {
                    "cairo_type": "felt",
                    "offset": 1
                },
                "digest": {
                    "cairo_type": "felt",
                    "offset": 0
                }
            },
            "size": 2,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.channel.ChannelSentFelt": {
            "full_name": "starkware.cairo.stark_verifier.core.channel.ChannelSentFelt",
            "members": {
                "value": {
                    "cairo_type": "felt",
                    "offset": 0
                }
            },
            "size": 1,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.channel.ChannelUnsentFelt": {
            "full_name": "starkware.cairo.stark_verifier.core.channel.ChannelUnsentFelt",
            "members": {
                "value": {
                    "cairo_type": "felt",
                    "offset": 0
                }
            },
            "size": 1,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.channel.MONTGOMERY_R": {
            "type": "const",
            "value": 3618502788666127798953978732740734578953660990361066340291730267701097005025
        },
        "starkware.cairo.stark_verifier.core.channel.PoseidonBuiltin": {
            "destination": "starkware.cairo.common.cairo_builtins.PoseidonBuiltin",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.channel.alloc": {
            "destination": "starkware.cairo.common.alloc.alloc",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.channel.append_felt": {
            "destination": "starkware.cairo.stark_verifier.core.serialize_utils.append_felt",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.channel.append_felts": {
            "destination": "starkware.cairo.stark_verifier.core.serialize_utils.append_felts",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.channel.assert_nn": {
            "destination": "starkware.cairo.common.math.assert_nn",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.channel.assert_nn_le": {
            "destination": "starkware.cairo.common.math.assert_nn_le",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.channel.poseidon_hash": {
            "destination": "starkware.cairo.common.builtin_poseidon.poseidon.poseidon_hash",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.channel.poseidon_hash_many": {
            "destination": "starkware.cairo.common.builtin_poseidon.poseidon.poseidon_hash_many",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.config.AirInstance": {
            "destination": "starkware.cairo.stark_verifier.core.air_interface.AirInstance",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.config.FIELD_GENERATOR": {
            "destination": "starkware.cairo.stark_verifier.core.utils.FIELD_GENERATOR",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.config.MAX_LOG_BLOWUP_FACTOR": {
            "destination": "starkware.cairo.stark_verifier.core.config_instances.MAX_LOG_BLOWUP_FACTOR",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.config.MAX_LOG_TRACE": {
            "destination": "starkware.cairo.stark_verifier.core.config_instances.MAX_LOG_TRACE",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.config.MAX_N_QUERIES": {
            "destination": "starkware.cairo.stark_verifier.core.config_instances.MAX_N_QUERIES",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.config.StarkConfig": {
            "destination": "starkware.cairo.stark_verifier.core.config_instances.StarkConfig",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.config.StarkDomains": {
            "destination": "starkware.cairo.stark_verifier.core.domains.StarkDomains",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.config.VectorCommitmentConfig": {
            "destination": "starkware.cairo.stark_verifier.core.vector_commitment.VectorCommitmentConfig",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.config.alloc": {
            "destination": "starkware.cairo.common.alloc.alloc",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.config.assert_in_range": {
            "destination": "starkware.cairo.common.math.assert_in_range",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.config.assert_le": {
            "destination": "starkware.cairo.common.math.assert_le",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.config.assert_nn": {
            "destination": "starkware.cairo.common.math.assert_nn",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.config.assert_nn_le": {
            "destination": "starkware.cairo.common.math.assert_nn_le",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.config.fri_config_validate": {
            "destination": "starkware.cairo.stark_verifier.core.fri.config.fri_config_validate",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.config.pow": {
            "destination": "starkware.cairo.common.pow.pow",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.config.proof_of_work_config_validate": {
            "destination": "starkware.cairo.stark_verifier.core.proof_of_work.proof_of_work_config_validate",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.config.traces_config_validate": {
            "destination": "starkware.cairo.stark_verifier.core.air_interface.traces_config_validate",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.config.validate_vector_commitment": {
            "destination": "starkware.cairo.stark_verifier.core.vector_commitment.validate_vector_commitment",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.config_instances.FriConfig": {
            "destination": "starkware.cairo.stark_verifier.core.fri.config.FriConfig",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.config_instances.MAX_LOG_BLOWUP_FACTOR": {
            "type": "const",
            "value": 16
        },
        "starkware.cairo.stark_verifier.core.config_instances.MAX_LOG_TRACE": {
            "type": "const",
            "value": 64
        },
        "starkware.cairo.stark_verifier.core.config_instances.MAX_N_QUERIES": {
            "type": "const",
            "value": 48
        },
        "starkware.cairo.stark_verifier.core.config_instances.ProofOfWorkConfig": {
            "destination": "starkware.cairo.stark_verifier.core.proof_of_work.ProofOfWorkConfig",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.config_instances.StarkConfig": {
            "full_name": "starkware.cairo.stark_verifier.core.config_instances.StarkConfig",
            "members": {
                "composition": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.table_commitment.TableCommitmentConfig*",
                    "offset": 1
                },
                "fri": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.fri.config.FriConfig*",
                    "offset": 2
                },
                "log_n_cosets": {
                    "cairo_type": "felt",
                    "offset": 6
                },
                "log_trace_domain_size": {
                    "cairo_type": "felt",
                    "offset": 4
                },
                "n_queries": {
                    "cairo_type": "felt",
                    "offset": 5
                },
                "n_verifier_friendly_commitment_layers": {
                    "cairo_type": "felt",
                    "offset": 7
                },
                "proof_of_work": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.proof_of_work.ProofOfWorkConfig*",
                    "offset": 3
                },
                "traces": {
                    "cairo_type": "starkware.cairo.stark_verifier.air.config_instances.TracesConfig*",
                    "offset": 0
                }
            },
            "size": 8,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.config_instances.TableCommitmentConfig": {
            "destination": "starkware.cairo.stark_verifier.core.table_commitment.TableCommitmentConfig",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.config_instances.TracesConfig": {
            "destination": "starkware.cairo.stark_verifier.air.config_instances.TracesConfig",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.domains.StarkDomains": {
            "full_name": "starkware.cairo.stark_verifier.core.domains.StarkDomains",
            "members": {
                "eval_domain_size": {
                    "cairo_type": "felt",
                    "offset": 1
                },
                "eval_generator": {
                    "cairo_type": "felt",
                    "offset": 2
                },
                "log_eval_domain_size": {
                    "cairo_type": "felt",
                    "offset": 0
                },
                "log_trace_domain_size": {
                    "cairo_type": "felt",
                    "offset": 3
                },
                "trace_domain_size": {
                    "cairo_type": "felt",
                    "offset": 4
                },
                "trace_generator": {
                    "cairo_type": "felt",
                    "offset": 5
                }
            },
            "size": 6,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.fri.config.FriConfig": {
            "full_name": "starkware.cairo.stark_verifier.core.fri.config.FriConfig",
            "members": {
                "fri_step_sizes": {
                    "cairo_type": "felt*",
                    "offset": 3
                },
                "inner_layers": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.table_commitment.TableCommitmentConfig*",
                    "offset": 2
                },
                "log_input_size": {
                    "cairo_type": "felt",
                    "offset": 0
                },
                "log_last_layer_degree_bound": {
                    "cairo_type": "felt",
                    "offset": 4
                },
                "n_layers": {
                    "cairo_type": "felt",
                    "offset": 1
                }
            },
            "size": 5,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.fri.config.MAX_FRI_LAYERS": {
            "type": "const",
            "value": 15
        },
        "starkware.cairo.stark_verifier.core.fri.config.MAX_FRI_STEP": {
            "type": "const",
            "value": 4
        },
        "starkware.cairo.stark_verifier.core.fri.config.MAX_LAST_LAYER_LOG_DEGREE_BOUND": {
            "type": "const",
            "value": 15
        },
        "starkware.cairo.stark_verifier.core.fri.config.TableCommitmentConfig": {
            "destination": "starkware.cairo.stark_verifier.core.table_commitment.TableCommitmentConfig",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.fri.config.assert_in_range": {
            "destination": "starkware.cairo.common.math.assert_in_range",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.fri.config.assert_nn": {
            "destination": "starkware.cairo.common.math.assert_nn",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.fri.config.assert_nn_le": {
            "destination": "starkware.cairo.common.math.assert_nn_le",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.fri.config.pow": {
            "destination": "starkware.cairo.common.pow.pow",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.fri.config.validate_vector_commitment": {
            "destination": "starkware.cairo.stark_verifier.core.vector_commitment.validate_vector_commitment",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.fri.fri.BitwiseBuiltin": {
            "destination": "starkware.cairo.common.cairo_builtins.BitwiseBuiltin",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.fri.fri.Channel": {
            "destination": "starkware.cairo.stark_verifier.core.channel.Channel",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.fri.fri.ChannelSentFelt": {
            "destination": "starkware.cairo.stark_verifier.core.channel.ChannelSentFelt",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.fri.fri.ChannelUnsentFelt": {
            "destination": "starkware.cairo.stark_verifier.core.channel.ChannelUnsentFelt",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.fri.fri.FIELD_GENERATOR": {
            "destination": "starkware.cairo.stark_verifier.core.utils.FIELD_GENERATOR",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.fri.fri.FriCommitment": {
            "full_name": "starkware.cairo.stark_verifier.core.fri.fri.FriCommitment",
            "members": {
                "config": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.fri.config.FriConfig*",
                    "offset": 0
                },
                "eval_points": {
                    "cairo_type": "felt*",
                    "offset": 2
                },
                "inner_layers": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.table_commitment.TableCommitment**",
                    "offset": 1
                },
                "last_layer_coefficients": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.channel.ChannelSentFelt*",
                    "offset": 3
                }
            },
            "size": 4,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.fri.fri.FriConfig": {
            "destination": "starkware.cairo.stark_verifier.core.fri.config.FriConfig",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.fri.fri.FriDecommitment": {
            "full_name": "starkware.cairo.stark_verifier.core.fri.fri.FriDecommitment",
            "members": {
                "n_values": {
                    "cairo_type": "felt",
                    "offset": 0
                },
                "points": {
                    "cairo_type": "felt*",
                    "offset": 2
                },
                "values": {
                    "cairo_type": "felt*",
                    "offset": 1
                }
            },
            "size": 3,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.fri.fri.FriLayerComputationParams": {
            "destination": "starkware.cairo.stark_verifier.core.fri.fri_layer.FriLayerComputationParams",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.fri.fri.FriLayerQuery": {
            "destination": "starkware.cairo.stark_verifier.core.fri.fri_layer.FriLayerQuery",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.fri.fri.FriLayerWitness": {
            "full_name": "starkware.cairo.stark_verifier.core.fri.fri.FriLayerWitness",
            "members": {
                "leaves": {
                    "cairo_type": "felt*",
                    "offset": 1
                },
                "n_leaves": {
                    "cairo_type": "felt",
                    "offset": 0
                },
                "table_witness": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.table_commitment.TableCommitmentWitness*",
                    "offset": 2
                }
            },
            "size": 3,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.fri.fri.FriUnsentCommitment": {
            "full_name": "starkware.cairo.stark_verifier.core.fri.fri.FriUnsentCommitment",
            "members": {
                "inner_layers": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.table_commitment.TableUnsentCommitment*",
                    "offset": 0
                },
                "last_layer_coefficients": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.channel.ChannelUnsentFelt*",
                    "offset": 1
                }
            },
            "size": 2,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.fri.fri.FriWitness": {
            "full_name": "starkware.cairo.stark_verifier.core.fri.fri.FriWitness",
            "members": {
                "layers": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.fri.fri.FriLayerWitness*",
                    "offset": 0
                }
            },
            "size": 1,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.fri.fri.PoseidonBuiltin": {
            "destination": "starkware.cairo.common.cairo_builtins.PoseidonBuiltin",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.fri.fri.TableCommitment": {
            "destination": "starkware.cairo.stark_verifier.core.table_commitment.TableCommitment",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.fri.fri.TableCommitmentConfig": {
            "destination": "starkware.cairo.stark_verifier.core.table_commitment.TableCommitmentConfig",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.fri.fri.TableCommitmentWitness": {
            "destination": "starkware.cairo.stark_verifier.core.table_commitment.TableCommitmentWitness",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.fri.fri.TableDecommitment": {
            "destination": "starkware.cairo.stark_verifier.core.table_commitment.TableDecommitment",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.fri.fri.TableUnsentCommitment": {
            "destination": "starkware.cairo.stark_verifier.core.table_commitment.TableUnsentCommitment",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.fri.fri.alloc": {
            "destination": "starkware.cairo.common.alloc.alloc",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.fri.fri.compute_next_layer": {
            "destination": "starkware.cairo.stark_verifier.core.fri.fri_layer.compute_next_layer",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.fri.fri.fri_config_validate": {
            "destination": "starkware.cairo.stark_verifier.core.fri.config.fri_config_validate",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.fri.fri.get_fri_group": {
            "destination": "starkware.cairo.stark_verifier.core.fri.fri_layer.get_fri_group",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.fri.fri.horner_eval": {
            "destination": "starkware.cairo.common.math.horner_eval",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.fri.fri.pow": {
            "destination": "starkware.cairo.common.pow.pow",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.fri.fri.random_felts_to_prover": {
            "destination": "starkware.cairo.stark_verifier.core.channel.random_felts_to_prover",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.fri.fri.read_felt_vector_from_prover": {
            "destination": "starkware.cairo.stark_verifier.core.channel.read_felt_vector_from_prover",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.fri.fri.table_commit": {
            "destination": "starkware.cairo.stark_verifier.core.table_commitment.table_commit",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.fri.fri.table_decommit": {
            "destination": "starkware.cairo.stark_verifier.core.table_commitment.table_decommit",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.fri.fri_formula.OMEGA_16": {
            "type": "const",
            "value": -1010767318980875148721624974497647105601682168692758069501464334811644188044
        },
        "starkware.cairo.stark_verifier.core.fri.fri_formula.OMEGA_2": {
            "type": "const",
            "value": -1
        },
        "starkware.cairo.stark_verifier.core.fri.fri_formula.OMEGA_4": {
            "type": "const",
            "value": 839237011175385726789510135931031354814687537620706622849166492834709948446
        },
        "starkware.cairo.stark_verifier.core.fri.fri_formula.OMEGA_8": {
            "type": "const",
            "value": -1683934744455360247964225572400674938023097276580318475317001647084465960397
        },
        "starkware.cairo.stark_verifier.core.fri.fri_layer.FriLayerComputationParams": {
            "full_name": "starkware.cairo.stark_verifier.core.fri.fri_layer.FriLayerComputationParams",
            "members": {
                "coset_size": {
                    "cairo_type": "felt",
                    "offset": 0
                },
                "eval_point": {
                    "cairo_type": "felt",
                    "offset": 2
                },
                "fri_group": {
                    "cairo_type": "felt*",
                    "offset": 1
                }
            },
            "size": 3,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.fri.fri_layer.FriLayerQuery": {
            "full_name": "starkware.cairo.stark_verifier.core.fri.fri_layer.FriLayerQuery",
            "members": {
                "index": {
                    "cairo_type": "felt",
                    "offset": 0
                },
                "x_inv_value": {
                    "cairo_type": "felt",
                    "offset": 2
                },
                "y_value": {
                    "cairo_type": "felt",
                    "offset": 1
                }
            },
            "size": 3,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.fri.fri_layer.alloc": {
            "destination": "starkware.cairo.common.alloc.alloc",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.fri.fri_layer.assert_nn": {
            "destination": "starkware.cairo.common.math.assert_nn",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.fri.fri_layer.assert_not_equal": {
            "destination": "starkware.cairo.common.math.assert_not_equal",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.fri.fri_layer.fri_formula": {
            "destination": "starkware.cairo.stark_verifier.core.fri.fri_formula.fri_formula",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.fri.fri_layer.get_label_location": {
            "destination": "starkware.cairo.common.registers.get_label_location",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.fri.fri_layer.pow": {
            "destination": "starkware.cairo.common.pow.pow",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.proof_of_work.BYTE_UPPER_BOUND": {
            "type": "const",
            "value": 256
        },
        "starkware.cairo.stark_verifier.core.proof_of_work.BitwiseBuiltin": {
            "destination": "starkware.cairo.common.cairo_builtins.BitwiseBuiltin",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.proof_of_work.Channel": {
            "destination": "starkware.cairo.stark_verifier.core.channel.Channel",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.proof_of_work.ChannelSentFelt": {
            "destination": "starkware.cairo.stark_verifier.core.channel.ChannelSentFelt",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.proof_of_work.ChannelUnsentFelt": {
            "destination": "starkware.cairo.stark_verifier.core.channel.ChannelUnsentFelt",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.proof_of_work.MAX_NONCE": {
            "type": "const",
            "value": 18446744073709551615
        },
        "starkware.cairo.stark_verifier.core.proof_of_work.MAX_PROOF_OF_WORK_BITS": {
            "type": "const",
            "value": 50
        },
        "starkware.cairo.stark_verifier.core.proof_of_work.MIN_PROOF_OF_WORK_BITS": {
            "type": "const",
            "value": 30
        },
        "starkware.cairo.stark_verifier.core.proof_of_work.PoseidonBuiltin": {
            "destination": "starkware.cairo.common.cairo_builtins.PoseidonBuiltin",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.proof_of_work.ProofOfWorkConfig": {
            "full_name": "starkware.cairo.stark_verifier.core.proof_of_work.ProofOfWorkConfig",
            "members": {
                "n_bits": {
                    "cairo_type": "felt",
                    "offset": 0
                }
            },
            "size": 1,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.proof_of_work.ProofOfWorkUnsentCommitment": {
            "full_name": "starkware.cairo.stark_verifier.core.proof_of_work.ProofOfWorkUnsentCommitment",
            "members": {
                "nonce": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.channel.ChannelUnsentFelt",
                    "offset": 0
                }
            },
            "size": 1,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.proof_of_work.Uint256": {
            "destination": "starkware.cairo.common.uint256.Uint256",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.proof_of_work.WORD_UPPER_BOUND": {
            "type": "const",
            "value": 18446744073709551616
        },
        "starkware.cairo.stark_verifier.core.proof_of_work.alloc": {
            "destination": "starkware.cairo.common.alloc.alloc",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.proof_of_work.assert_in_range": {
            "destination": "starkware.cairo.common.math.assert_in_range",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.proof_of_work.assert_lt": {
            "destination": "starkware.cairo.common.math.assert_lt",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.proof_of_work.assert_nn_le": {
            "destination": "starkware.cairo.common.math.assert_nn_le",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.proof_of_work.blake2s_add_uint256_bigend": {
            "destination": "starkware.cairo.common.cairo_blake2s.blake2s.blake2s_add_uint256_bigend",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.proof_of_work.blake2s_bigend": {
            "destination": "starkware.cairo.common.cairo_blake2s.blake2s.blake2s_bigend",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.proof_of_work.felt_to_uint256": {
            "destination": "starkware.cairo.common.uint256.felt_to_uint256",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.proof_of_work.pow": {
            "destination": "starkware.cairo.common.pow.pow",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.proof_of_work.read_uint64_from_prover": {
            "destination": "starkware.cairo.stark_verifier.core.channel.read_uint64_from_prover",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.proof_of_work.unsigned_div_rem": {
            "destination": "starkware.cairo.common.math.unsigned_div_rem",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.queries.BitwiseBuiltin": {
            "destination": "starkware.cairo.common.cairo_builtins.BitwiseBuiltin",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.queries.Channel": {
            "destination": "starkware.cairo.stark_verifier.core.channel.Channel",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.queries.FIELD_GENERATOR": {
            "destination": "starkware.cairo.stark_verifier.core.config.FIELD_GENERATOR",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.queries.PoseidonBuiltin": {
            "destination": "starkware.cairo.common.cairo_builtins.PoseidonBuiltin",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.queries.StarkDomains": {
            "destination": "starkware.cairo.stark_verifier.core.config.StarkDomains",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.queries.alloc": {
            "destination": "starkware.cairo.common.alloc.alloc",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.queries.assert_le": {
            "destination": "starkware.cairo.common.math.assert_le",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.queries.bit_reverse_u64": {
            "destination": "starkware.cairo.stark_verifier.core.utils.bit_reverse_u64",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.queries.pow": {
            "destination": "starkware.cairo.common.pow.pow",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.queries.random_felt_to_prover": {
            "destination": "starkware.cairo.stark_verifier.core.channel.random_felt_to_prover",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.queries.split_felt": {
            "destination": "starkware.cairo.common.math.split_felt",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.queries.unsigned_div_rem": {
            "destination": "starkware.cairo.common.math.unsigned_div_rem",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.queries.usort": {
            "destination": "starkware.cairo.common.usort.usort",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.serialize_utils.Uint256": {
            "destination": "starkware.cairo.common.uint256.Uint256",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.serialize_utils.memcpy": {
            "destination": "starkware.cairo.common.memcpy.memcpy",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.AirInstance": {
            "destination": "starkware.cairo.stark_verifier.core.air_interface.AirInstance",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.BitwiseBuiltin": {
            "destination": "starkware.cairo.common.cairo_builtins.BitwiseBuiltin",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.Channel": {
            "destination": "starkware.cairo.stark_verifier.core.channel.Channel",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.ChannelSentFelt": {
            "destination": "starkware.cairo.stark_verifier.core.channel.ChannelSentFelt",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.ChannelUnsentFelt": {
            "destination": "starkware.cairo.stark_verifier.core.channel.ChannelUnsentFelt",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.FriCommitment": {
            "destination": "starkware.cairo.stark_verifier.core.fri.fri.FriCommitment",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.FriConfig": {
            "destination": "starkware.cairo.stark_verifier.core.fri.fri.FriConfig",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.FriDecommitment": {
            "destination": "starkware.cairo.stark_verifier.core.fri.fri.FriDecommitment",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.FriUnsentCommitment": {
            "destination": "starkware.cairo.stark_verifier.core.fri.fri.FriUnsentCommitment",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.FriWitness": {
            "destination": "starkware.cairo.stark_verifier.core.fri.fri.FriWitness",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.HashBuiltin": {
            "destination": "starkware.cairo.common.hash.HashBuiltin",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.InteractionValuesAfterComposition": {
            "full_name": "starkware.cairo.stark_verifier.core.stark.InteractionValuesAfterComposition",
            "members": {
                "oods_point": {
                    "cairo_type": "felt",
                    "offset": 0
                }
            },
            "size": 1,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.stark.InteractionValuesAfterOods": {
            "full_name": "starkware.cairo.stark_verifier.core.stark.InteractionValuesAfterOods",
            "members": {
                "coefficients": {
                    "cairo_type": "felt*",
                    "offset": 0
                }
            },
            "size": 1,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.stark.InteractionValuesAfterTraces": {
            "full_name": "starkware.cairo.stark_verifier.core.stark.InteractionValuesAfterTraces",
            "members": {
                "coefficients": {
                    "cairo_type": "felt*",
                    "offset": 0
                }
            },
            "size": 1,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.stark.OodsEvaluationInfo": {
            "destination": "starkware.cairo.stark_verifier.core.air_interface.OodsEvaluationInfo",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.PoseidonBuiltin": {
            "destination": "starkware.cairo.common.cairo_builtins.PoseidonBuiltin",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.ProofOfWorkUnsentCommitment": {
            "destination": "starkware.cairo.stark_verifier.core.proof_of_work.ProofOfWorkUnsentCommitment",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.PublicInput": {
            "destination": "starkware.cairo.stark_verifier.core.air_interface.PublicInput",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.StarkCommitment": {
            "full_name": "starkware.cairo.stark_verifier.core.stark.StarkCommitment",
            "members": {
                "composition": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.table_commitment.TableCommitment*",
                    "offset": 1
                },
                "fri": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.fri.fri.FriCommitment*",
                    "offset": 5
                },
                "interaction_after_composition": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.stark.InteractionValuesAfterComposition*",
                    "offset": 2
                },
                "interaction_after_oods": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.stark.InteractionValuesAfterOods*",
                    "offset": 4
                },
                "oods_values": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.channel.ChannelSentFelt*",
                    "offset": 3
                },
                "traces": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.air_instances.TracesCommitment*",
                    "offset": 0
                }
            },
            "size": 6,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.stark.StarkConfig": {
            "destination": "starkware.cairo.stark_verifier.core.config_instances.StarkConfig",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.StarkDomains": {
            "destination": "starkware.cairo.stark_verifier.core.config.StarkDomains",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.StarkProof": {
            "full_name": "starkware.cairo.stark_verifier.core.stark.StarkProof",
            "members": {
                "config": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.config_instances.StarkConfig*",
                    "offset": 0
                },
                "public_input": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.air_instances.PublicInput*",
                    "offset": 1
                },
                "unsent_commitment": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.stark.StarkUnsentCommitment*",
                    "offset": 2
                },
                "witness": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.stark.StarkWitness*",
                    "offset": 3
                }
            },
            "size": 4,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.stark.StarkUnsentCommitment": {
            "full_name": "starkware.cairo.stark_verifier.core.stark.StarkUnsentCommitment",
            "members": {
                "composition": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.table_commitment.TableUnsentCommitment",
                    "offset": 1
                },
                "fri": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.fri.fri.FriUnsentCommitment*",
                    "offset": 3
                },
                "oods_values": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.channel.ChannelUnsentFelt*",
                    "offset": 2
                },
                "proof_of_work": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.proof_of_work.ProofOfWorkUnsentCommitment*",
                    "offset": 4
                },
                "traces": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.air_instances.TracesUnsentCommitment*",
                    "offset": 0
                }
            },
            "size": 5,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.stark.StarkWitness": {
            "full_name": "starkware.cairo.stark_verifier.core.stark.StarkWitness",
            "members": {
                "composition_decommitment": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.table_commitment.TableDecommitment*",
                    "offset": 2
                },
                "composition_witness": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.table_commitment.TableCommitmentWitness*",
                    "offset": 3
                },
                "fri_witness": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.fri.fri.FriWitness*",
                    "offset": 4
                },
                "traces_decommitment": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.air_instances.TracesDecommitment*",
                    "offset": 0
                },
                "traces_witness": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.air_instances.TracesWitness*",
                    "offset": 1
                }
            },
            "size": 5,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.stark.TableCommitment": {
            "destination": "starkware.cairo.stark_verifier.core.table_commitment.TableCommitment",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.TableCommitmentWitness": {
            "destination": "starkware.cairo.stark_verifier.core.table_commitment.TableCommitmentWitness",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.TableDecommitment": {
            "destination": "starkware.cairo.stark_verifier.core.table_commitment.TableDecommitment",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.TableUnsentCommitment": {
            "destination": "starkware.cairo.stark_verifier.core.table_commitment.TableUnsentCommitment",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.TracesCommitment": {
            "destination": "starkware.cairo.stark_verifier.core.air_interface.TracesCommitment",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.TracesConfig": {
            "destination": "starkware.cairo.stark_verifier.air.config_instances.TracesConfig",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.TracesDecommitment": {
            "destination": "starkware.cairo.stark_verifier.core.air_interface.TracesDecommitment",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.TracesUnsentCommitment": {
            "destination": "starkware.cairo.stark_verifier.core.air_interface.TracesUnsentCommitment",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.TracesWitness": {
            "destination": "starkware.cairo.stark_verifier.core.air_interface.TracesWitness",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.alloc": {
            "destination": "starkware.cairo.common.alloc.alloc",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.channel_new": {
            "destination": "starkware.cairo.stark_verifier.core.channel.channel_new",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.compute_powers_array": {
            "destination": "starkware.cairo.stark_verifier.core.utils.compute_powers_array",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.eval_oods_boundary_poly_at_points": {
            "destination": "starkware.cairo.stark_verifier.core.air_interface.eval_oods_boundary_poly_at_points",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.finalize_blake2s": {
            "destination": "starkware.cairo.common.cairo_blake2s.blake2s.finalize_blake2s",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.fri_commit": {
            "destination": "starkware.cairo.stark_verifier.core.fri.fri.fri_commit",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.fri_decommit": {
            "destination": "starkware.cairo.stark_verifier.core.fri.fri.fri_decommit",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.generate_queries": {
            "destination": "starkware.cairo.stark_verifier.core.queries.generate_queries",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.proof_of_work_commit": {
            "destination": "starkware.cairo.stark_verifier.core.proof_of_work.proof_of_work_commit",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.public_input_hash": {
            "destination": "starkware.cairo.stark_verifier.core.air_interface.public_input_hash",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.public_input_validate": {
            "destination": "starkware.cairo.stark_verifier.core.air_interface.public_input_validate",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.queries_to_points": {
            "destination": "starkware.cairo.stark_verifier.core.queries.queries_to_points",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.random_felts_to_prover": {
            "destination": "starkware.cairo.stark_verifier.core.channel.random_felts_to_prover",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.read_felt_vector_from_prover": {
            "destination": "starkware.cairo.stark_verifier.core.channel.read_felt_vector_from_prover",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.stark_config_validate": {
            "destination": "starkware.cairo.stark_verifier.core.config.stark_config_validate",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.stark_domains_create": {
            "destination": "starkware.cairo.stark_verifier.core.config.stark_domains_create",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.table_commit": {
            "destination": "starkware.cairo.stark_verifier.core.table_commitment.table_commit",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.table_decommit": {
            "destination": "starkware.cairo.stark_verifier.core.table_commitment.table_decommit",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.traces_commit": {
            "destination": "starkware.cairo.stark_verifier.core.air_interface.traces_commit",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.traces_decommit": {
            "destination": "starkware.cairo.stark_verifier.core.air_interface.traces_decommit",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.stark.traces_eval_composition_polynomial": {
            "destination": "starkware.cairo.stark_verifier.core.air_interface.traces_eval_composition_polynomial",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.table_commitment.BitwiseBuiltin": {
            "destination": "starkware.cairo.common.cairo_builtins.BitwiseBuiltin",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.table_commitment.Channel": {
            "destination": "starkware.cairo.stark_verifier.core.channel.Channel",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.table_commitment.ChannelUnsentFelt": {
            "destination": "starkware.cairo.stark_verifier.core.channel.ChannelUnsentFelt",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.table_commitment.MONTGOMERY_R": {
            "destination": "starkware.cairo.stark_verifier.core.channel.MONTGOMERY_R",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.table_commitment.PoseidonBuiltin": {
            "destination": "starkware.cairo.common.cairo_builtins.PoseidonBuiltin",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.table_commitment.TableCommitment": {
            "full_name": "starkware.cairo.stark_verifier.core.table_commitment.TableCommitment",
            "members": {
                "config": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.table_commitment.TableCommitmentConfig*",
                    "offset": 0
                },
                "vector_commitment": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.vector_commitment.VectorCommitment*",
                    "offset": 1
                }
            },
            "size": 2,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.table_commitment.TableCommitmentConfig": {
            "full_name": "starkware.cairo.stark_verifier.core.table_commitment.TableCommitmentConfig",
            "members": {
                "n_columns": {
                    "cairo_type": "felt",
                    "offset": 0
                },
                "vector": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.vector_commitment.VectorCommitmentConfig*",
                    "offset": 1
                }
            },
            "size": 2,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.table_commitment.TableCommitmentWitness": {
            "full_name": "starkware.cairo.stark_verifier.core.table_commitment.TableCommitmentWitness",
            "members": {
                "vector": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.vector_commitment.VectorCommitmentWitness*",
                    "offset": 0
                }
            },
            "size": 1,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.table_commitment.TableDecommitment": {
            "full_name": "starkware.cairo.stark_verifier.core.table_commitment.TableDecommitment",
            "members": {
                "n_values": {
                    "cairo_type": "felt",
                    "offset": 0
                },
                "values": {
                    "cairo_type": "felt*",
                    "offset": 1
                }
            },
            "size": 2,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.table_commitment.TableUnsentCommitment": {
            "full_name": "starkware.cairo.stark_verifier.core.table_commitment.TableUnsentCommitment",
            "members": {
                "vector": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.vector_commitment.VectorUnsentCommitment",
                    "offset": 0
                }
            },
            "size": 1,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.table_commitment.VectorCommitment": {
            "destination": "starkware.cairo.stark_verifier.core.vector_commitment.VectorCommitment",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.table_commitment.VectorCommitmentConfig": {
            "destination": "starkware.cairo.stark_verifier.core.vector_commitment.VectorCommitmentConfig",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.table_commitment.VectorCommitmentWitness": {
            "destination": "starkware.cairo.stark_verifier.core.vector_commitment.VectorCommitmentWitness",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.table_commitment.VectorQuery": {
            "destination": "starkware.cairo.stark_verifier.core.vector_commitment.VectorQuery",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.table_commitment.VectorUnsentCommitment": {
            "destination": "starkware.cairo.stark_verifier.core.vector_commitment.VectorUnsentCommitment",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.table_commitment.alloc": {
            "destination": "starkware.cairo.common.alloc.alloc",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.table_commitment.assert_nn": {
            "destination": "starkware.cairo.common.math.assert_nn",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.table_commitment.blake2s_add_felts": {
            "destination": "starkware.cairo.common.cairo_blake2s.blake2s.blake2s_add_felts",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.table_commitment.blake2s_bigend": {
            "destination": "starkware.cairo.common.cairo_blake2s.blake2s.blake2s_bigend",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.table_commitment.is_nn": {
            "destination": "starkware.cairo.common.math_cmp.is_nn",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.table_commitment.poseidon_hash_many": {
            "destination": "starkware.cairo.common.builtin_poseidon.poseidon.poseidon_hash_many",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.table_commitment.unsigned_div_rem": {
            "destination": "starkware.cairo.common.math.unsigned_div_rem",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.table_commitment.vector_commit": {
            "destination": "starkware.cairo.stark_verifier.core.vector_commitment.vector_commit",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.table_commitment.vector_commitment_decommit": {
            "destination": "starkware.cairo.stark_verifier.core.vector_commitment.vector_commitment_decommit",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.utils.BitwiseBuiltin": {
            "destination": "starkware.cairo.common.cairo_builtins.BitwiseBuiltin",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.utils.FIELD_GENERATOR": {
            "type": "const",
            "value": 3
        },
        "starkware.cairo.stark_verifier.core.utils.bitwise_and": {
            "destination": "starkware.cairo.common.bitwise.bitwise_and",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.utils.get_label_location": {
            "destination": "starkware.cairo.common.registers.get_label_location",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.vector_commitment.BitwiseBuiltin": {
            "destination": "starkware.cairo.common.cairo_builtins.BitwiseBuiltin",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.vector_commitment.Channel": {
            "destination": "starkware.cairo.stark_verifier.core.channel.Channel",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.vector_commitment.ChannelSentFelt": {
            "destination": "starkware.cairo.stark_verifier.core.channel.ChannelSentFelt",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.vector_commitment.ChannelUnsentFelt": {
            "destination": "starkware.cairo.stark_verifier.core.channel.ChannelUnsentFelt",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.vector_commitment.PoseidonBuiltin": {
            "destination": "starkware.cairo.common.cairo_builtins.PoseidonBuiltin",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.vector_commitment.Uint256": {
            "destination": "starkware.cairo.common.uint256.Uint256",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.vector_commitment.VectorCommitment": {
            "full_name": "starkware.cairo.stark_verifier.core.vector_commitment.VectorCommitment",
            "members": {
                "commitment_hash": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.channel.ChannelSentFelt",
                    "offset": 1
                },
                "config": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.vector_commitment.VectorCommitmentConfig*",
                    "offset": 0
                }
            },
            "size": 2,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.vector_commitment.VectorCommitmentConfig": {
            "full_name": "starkware.cairo.stark_verifier.core.vector_commitment.VectorCommitmentConfig",
            "members": {
                "height": {
                    "cairo_type": "felt",
                    "offset": 0
                },
                "n_verifier_friendly_commitment_layers": {
                    "cairo_type": "felt",
                    "offset": 1
                }
            },
            "size": 2,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.vector_commitment.VectorCommitmentWitness": {
            "full_name": "starkware.cairo.stark_verifier.core.vector_commitment.VectorCommitmentWitness",
            "members": {
                "authentications": {
                    "cairo_type": "felt*",
                    "offset": 1
                },
                "n_authentications": {
                    "cairo_type": "felt",
                    "offset": 0
                }
            },
            "size": 2,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.vector_commitment.VectorQuery": {
            "full_name": "starkware.cairo.stark_verifier.core.vector_commitment.VectorQuery",
            "members": {
                "index": {
                    "cairo_type": "felt",
                    "offset": 0
                },
                "value": {
                    "cairo_type": "felt",
                    "offset": 1
                }
            },
            "size": 2,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.vector_commitment.VectorQueryWithDepth": {
            "full_name": "starkware.cairo.stark_verifier.core.vector_commitment.VectorQueryWithDepth",
            "members": {
                "depth": {
                    "cairo_type": "felt",
                    "offset": 2
                },
                "index": {
                    "cairo_type": "felt",
                    "offset": 0
                },
                "value": {
                    "cairo_type": "felt",
                    "offset": 1
                }
            },
            "size": 3,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.vector_commitment.VectorUnsentCommitment": {
            "full_name": "starkware.cairo.stark_verifier.core.vector_commitment.VectorUnsentCommitment",
            "members": {
                "commitment_hash": {
                    "cairo_type": "starkware.cairo.stark_verifier.core.channel.ChannelUnsentFelt",
                    "offset": 0
                }
            },
            "size": 1,
            "type": "struct"
        },
        "starkware.cairo.stark_verifier.core.vector_commitment.alloc": {
            "destination": "starkware.cairo.common.alloc.alloc",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.vector_commitment.assert_nn": {
            "destination": "starkware.cairo.common.math.assert_nn",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.vector_commitment.assert_nn_le": {
            "destination": "starkware.cairo.common.math.assert_nn_le",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.vector_commitment.blake2s_add_felt": {
            "destination": "starkware.cairo.common.cairo_blake2s.blake2s.blake2s_add_felt",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.vector_commitment.blake2s_bigend": {
            "destination": "starkware.cairo.common.cairo_blake2s.blake2s.blake2s_bigend",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.vector_commitment.is_nn": {
            "destination": "starkware.cairo.common.math_cmp.is_nn",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.vector_commitment.poseidon_hash": {
            "destination": "starkware.cairo.common.builtin_poseidon.poseidon.poseidon_hash",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.vector_commitment.pow": {
            "destination": "starkware.cairo.common.pow.pow",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.vector_commitment.read_felt_from_prover": {
            "destination": "starkware.cairo.stark_verifier.core.channel.read_felt_from_prover",
            "type": "alias"
        },
        "starkware.cairo.stark_verifier.core.vector_commitment.unsigned_div_rem": {
            "destination": "starkware.cairo.common.math.unsigned_div_rem",
            "type": "alias"
        }
    },
    "main_scope": "__main__",
    "prime": "0x800000000000011000000000000000000000000000000000000000000000001",
    "reference_manager": {
        "references": [
            {
                "ap_tracking_data": {
                    "group": 3,
                    "offset": 0
                },
                "pc": 9,
                "value": "[cast(fp + (-5), felt**)]"
            },
            {
                "ap_tracking_data": {
                    "group": 3,
                    "offset": 0
                },
                "pc": 9,
                "value": "[cast(fp + (-4), felt**)]"
            },
            {
                "ap_tracking_data": {
                    "group": 3,
                    "offset": 0
                },
                "pc": 9,
                "value": "[cast(fp + (-3), felt*)]"
            },
            {
                "ap_tracking_data": {
                    "group": 3,
                    "offset": 2
                },
                "pc": 14,
                "value": "[cast(ap + (-2), starkware.cairo.common.memcpy.memcpy.LoopFrame*)]"
            },
            {
                "ap_tracking_data": {
                    "group": 3,
                    "offset": 2
                },
                "pc": 14,
                "value": "[cast(ap + (-2), starkware.cairo.common.memcpy.memcpy.LoopFrame*)]"
            },
            {
                "ap_tracking_data": {
                    "group": 3,
                    "offset": 3
                },
                "pc": 15,
                "value": "[cast(ap + (-1), felt*)]"
            },
            {
                "ap_tracking_data": {
                    "group": 3,
                    "offset": 3
                },
                "pc": 16,
                "value": "[cast(ap, felt*)]"
            },
            {
                "ap_tracking_data": {
                    "group": 3,
                    "offset": 3
                },
                "pc": 16,
                "value": "cast(ap + 1, starkware.cairo.common.memcpy.memcpy.LoopFrame*)"
            },
            {
                "ap_tracking_data": {
                    "group": 4,
                    "offset": 0
                },
                "pc": 24,
                "value": "[cast(fp + (-3), felt*)]"
            },
            {
                "ap_tracking_data": {
                    "group": 4,
                    "offset": 0
                },
                "pc": 24,
                "value": "[cast(fp + (-4), felt**)]"
            },
            {
                "ap_tracking_data": {
                    "group": 4,
                    "offset": 0
                },
                "pc": 25,
                "value": "cast([fp + (-4)] + 1, felt*)"
            },
            {
                "ap_tracking_data": {
                    "group": 5,
                    "offset": 0
                },
                "pc": 28,
                "value": "[cast(fp + (-3), felt*)]"
            },
            {
                "ap_tracking_data": {
                    "group": 7,
                    "offset": 0
                },
                "pc": 36,
                "value": "[cast(fp + (-6), felt*)]"
            },
            {
                "ap_tracking_data": {
                    "group": 7,
                    "offset": 0
                },
                "pc": 36,
                "value": "[cast(fp + (-5), felt*)]"
            },
            {
                "ap_tracking_data": {
                    "group": 7,
                    "offset": 0
                },
                "pc": 36,
                "value": "[cast(fp + (-4), felt**)]"
            },
            {
                "ap_tracking_data": {
                    "group": 7,
                    "offset": 0
                },
                "pc": 36,
                "value": "[cast(fp + (-3), starkware.cairo.stark_verifier.core.stark.StarkProof**)]"
            },
            {
                "ap_tracking_data": {
                    "group": 7,
                    "offset": 1
                },
                "pc": 38,
                "value": "[cast(ap + (-1), felt*)]"
            },
            {
                "ap_tracking_data": {
                    "group": 9,
                    "offset": 0
                },
                "pc": 41,
                "value": "[cast(fp + (-4), felt**)]"
            },
            {
                "ap_tracking_data": {
                    "group": 9,
                    "offset": 0
                },
                "pc": 41,
                "value": "[cast(fp + (-3), starkware.cairo.common.cairo_builtins.PoseidonBuiltin**)]"
            },
            {
                "ap_tracking_data": {
                    "group": 9,
                    "offset": 3
                },
                "pc": 43,
                "value": "[cast(fp, felt**)]"
            },
            {
                "ap_tracking_data": {
                    "group": 9,
                    "offset": 6
                },
                "pc": 45,
                "value": "[cast(ap + (-1), starkware.cairo.stark_verifier.core.stark.StarkProof**)]"
            },
            {
                "ap_tracking_data": {
                    "group": 9,
                    "offset": 6
                },
                "pc": 45,
                "value": "[cast(fp + 1, felt*)]"
            },
            {
                "ap_tracking_data": {
                    "group": 9,
                    "offset": 6
                },
                "pc": 45,
                "value": "[cast(fp + 2, felt*)]"
            },
            {
                "ap_tracking_data": {
                    "group": 10,
                    "offset": 0
                },
                "pc": 52,
                "value": "cast([fp + (-4)] + 1, felt*)"
            },
            {
                "ap_tracking_data": {
                    "group": 11,
                    "offset": 0
                },
                "pc": 58,
                "value": "cast([fp + (-4)] + 1 + [fp + 1], felt*)"
            },
            {
                "ap_tracking_data": {
                    "group": 11,
                    "offset": 1
                },
                "pc": 60,
                "value": "[cast(ap + (-1), felt*)]"
            }
        ]
    }
}