about summary refs log tree commit diff
path: root/ape/cosmopolitan.h
blob: 4b509eda3fa703af89a36147a4874293641411c3 (plain)
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
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302
11303
11304
11305
11306
11307
11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451
11452
11453
11454
11455
11456
11457
11458
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473
11474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622
11623
11624
11625
11626
11627
11628
11629
11630
11631
11632
11633
11634
11635
11636
11637
11638
11639
11640
11641
11642
11643
11644
11645
11646
11647
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669
11670
11671
11672
11673
11674
11675
11676
11677
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711
11712
11713
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809
11810
11811
11812
11813
11814
11815
11816
11817
11818
11819
11820
11821
11822
11823
11824
11825
11826
11827
11828
11829
11830
11831
11832
11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848
11849
11850
11851
11852
11853
11854
11855
11856
11857
11858
11859
11860
11861
11862
11863
11864
11865
11866
11867
11868
11869
11870
11871
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
11987
11988
11989
11990
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
12015
12016
12017
12018
12019
12020
12021
12022
12023
12024
12025
12026
12027
12028
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
12317
12318
12319
12320
12321
12322
12323
12324
12325
12326
12327
12328
12329
12330
12331
12332
12333
12334
12335
12336
12337
12338
12339
12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350
12351
12352
12353
12354
12355
12356
12357
12358
12359
12360
12361
12362
12363
12364
12365
12366
12367
12368
12369
12370
12371
12372
12373
12374
12375
12376
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
12420
12421
12422
12423
12424
12425
12426
12427
12428
12429
12430
12431
12432
12433
12434
12435
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454
12455
12456
12457
12458
12459
12460
12461
12462
12463
12464
12465
12466
12467
12468
12469
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
12493
12494
12495
12496
12497
12498
12499
12500
12501
12502
12503
12504
12505
12506
12507
12508
12509
12510
12511
12512
12513
12514
12515
12516
12517
12518
12519
12520
12521
12522
12523
12524
12525
12526
12527
12528
12529
12530
12531
12532
12533
12534
12535
12536
12537
12538
12539
12540
12541
12542
12543
12544
12545
12546
12547
12548
12549
12550
12551
12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566
12567
12568
12569
12570
12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
12593
12594
12595
12596
12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12631
12632
12633
12634
12635
12636
12637
12638
12639
12640
12641
12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671
12672
12673
12674
12675
12676
12677
12678
12679
12680
12681
12682
12683
12684
12685
12686
12687
12688
12689
12690
12691
12692
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730
12731
12732
12733
12734
12735
12736
12737
12738
12739
12740
12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
12755
12756
12757
12758
12759
12760
12761
12762
12763
12764
12765
12766
12767
12768
12769
12770
12771
12772
12773
12774
12775
12776
12777
12778
12779
12780
12781
12782
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
12839
12840
12841
12842
12843
12844
12845
12846
12847
12848
12849
12850
12851
12852
12853
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864
12865
12866
12867
12868
12869
12870
12871
12872
12873
12874
12875
12876
12877
12878
12879
12880
12881
12882
12883
12884
12885
12886
12887
12888
12889
12890
12891
12892
12893
12894
12895
12896
12897
12898
12899
12900
12901
12902
12903
12904
12905
12906
12907
12908
12909
12910
12911
12912
12913
12914
12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
12929
12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
12940
12941
12942
12943
12944
12945
12946
12947
12948
12949
12950
12951
12952
12953
12954
12955
12956
12957
12958
12959
12960
12961
12962
12963
12964
12965
12966
12967
12968
12969
12970
12971
12972
12973
12974
12975
12976
12977
12978
12979
12980
12981
12982
12983
12984
12985
12986
12987
12988
12989
12990
12991
12992
12993
12994
12995
12996
12997
12998
12999
13000
13001
13002
13003
13004
13005
13006
13007
13008
13009
13010
13011
13012
13013
13014
13015
13016
13017
13018
13019
13020
13021
13022
13023
13024
13025
13026
13027
13028
13029
13030
13031
13032
13033
13034
13035
13036
13037
13038
13039
13040
13041
13042
13043
13044
13045
13046
13047
13048
13049
13050
13051
13052
13053
13054
13055
13056
13057
13058
13059
13060
13061
13062
13063
13064
13065
13066
13067
13068
13069
13070
13071
13072
13073
13074
13075
13076
13077
13078
13079
13080
13081
13082
13083
13084
13085
13086
13087
13088
13089
13090
13091
13092
13093
13094
13095
13096
13097
13098
13099
13100
13101
13102
13103
13104
13105
13106
13107
13108
13109
13110
13111
13112
13113
13114
13115
13116
13117
13118
13119
13120
13121
13122
13123
13124
13125
13126
13127
13128
13129
13130
13131
13132
13133
13134
13135
13136
13137
13138
13139
13140
13141
13142
13143
13144
13145
13146
13147
13148
13149
13150
13151
13152
13153
13154
13155
13156
13157
13158
13159
13160
13161
13162
13163
13164
13165
13166
13167
13168
13169
13170
13171
13172
13173
13174
13175
13176
13177
13178
13179
13180
13181
13182
13183
13184
13185
13186
13187
13188
13189
13190
13191
13192
13193
13194
13195
13196
13197
13198
13199
13200
13201
13202
13203
13204
13205
13206
13207
13208
13209
13210
13211
13212
13213
13214
13215
13216
13217
13218
13219
13220
13221
13222
13223
13224
13225
13226
13227
13228
13229
13230
13231
13232
13233
13234
13235
13236
13237
13238
13239
13240
13241
13242
13243
13244
13245
13246
13247
13248
13249
13250
13251
13252
13253
13254
13255
13256
13257
13258
13259
13260
13261
13262
13263
13264
13265
13266
13267
13268
13269
13270
13271
13272
13273
13274
13275
13276
13277
13278
13279
13280
13281
13282
13283
13284
13285
13286
13287
13288
13289
13290
13291
13292
13293
13294
13295
13296
13297
13298
13299
13300
13301
13302
13303
13304
13305
13306
13307
13308
13309
13310
13311
13312
13313
13314
13315
13316
13317
13318
13319
13320
13321
13322
13323
13324
13325
13326
13327
13328
13329
13330
13331
13332
13333
13334
13335
13336
13337
13338
13339
13340
13341
13342
13343
13344
13345
13346
13347
13348
13349
13350
13351
13352
13353
13354
13355
13356
13357
13358
13359
13360
13361
13362
13363
13364
13365
13366
13367
13368
13369
13370
13371
13372
13373
13374
13375
13376
13377
13378
13379
13380
13381
13382
13383
13384
13385
13386
13387
13388
13389
13390
13391
13392
13393
13394
13395
13396
13397
13398
13399
13400
13401
13402
13403
13404
13405
13406
13407
13408
13409
13410
13411
13412
13413
13414
13415
13416
13417
13418
13419
13420
13421
13422
13423
13424
13425
13426
13427
13428
13429
13430
13431
13432
13433
13434
13435
13436
13437
13438
13439
13440
13441
13442
13443
13444
13445
13446
13447
13448
13449
13450
13451
13452
13453
13454
13455
13456
13457
13458
13459
13460
13461
13462
13463
13464
13465
13466
13467
13468
13469
13470
13471
13472
13473
13474
13475
13476
13477
13478
13479
13480
13481
13482
13483
13484
13485
13486
13487
13488
13489
13490
13491
13492
13493
13494
13495
13496
13497
13498
13499
13500
13501
13502
13503
13504
13505
13506
13507
13508
13509
13510
13511
13512
13513
13514
13515
13516
13517
13518
13519
13520
13521
13522
13523
13524
13525
13526
13527
13528
13529
13530
13531
13532
13533
13534
13535
13536
13537
13538
13539
13540
13541
13542
13543
13544
13545
13546
13547
13548
13549
13550
13551
13552
13553
13554
13555
13556
13557
13558
13559
13560
13561
13562
13563
13564
13565
13566
13567
13568
13569
13570
13571
13572
13573
13574
13575
13576
13577
13578
13579
13580
13581
13582
13583
13584
13585
13586
13587
13588
13589
13590
13591
13592
13593
13594
13595
13596
13597
13598
13599
13600
13601
13602
13603
13604
13605
13606
13607
13608
13609
13610
13611
13612
13613
13614
13615
13616
13617
13618
13619
13620
13621
13622
13623
13624
13625
13626
13627
13628
13629
13630
13631
13632
13633
13634
13635
13636
13637
13638
13639
13640
13641
13642
13643
13644
13645
13646
13647
13648
13649
13650
13651
13652
13653
13654
13655
13656
13657
13658
13659
13660
13661
13662
13663
13664
13665
13666
13667
13668
13669
13670
13671
13672
13673
13674
13675
13676
13677
13678
13679
13680
13681
13682
13683
13684
13685
13686
13687
13688
13689
13690
13691
13692
13693
13694
13695
13696
13697
13698
13699
13700
13701
13702
13703
13704
13705
13706
13707
13708
13709
13710
13711
13712
13713
13714
13715
13716
13717
13718
13719
13720
13721
13722
13723
13724
13725
13726
13727
13728
13729
13730
13731
13732
13733
13734
13735
13736
13737
13738
13739
13740
13741
13742
13743
13744
13745
13746
13747
13748
13749
13750
13751
13752
13753
13754
13755
13756
13757
13758
13759
13760
13761
13762
13763
13764
13765
13766
13767
13768
13769
13770
13771
13772
13773
13774
13775
13776
13777
13778
13779
13780
13781
13782
13783
13784
13785
13786
13787
13788
13789
13790
13791
13792
13793
13794
13795
13796
13797
13798
13799
13800
13801
13802
13803
13804
13805
13806
13807
13808
13809
13810
13811
13812
13813
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842
13843
13844
13845
13846
13847
13848
13849
13850
13851
13852
13853
13854
13855
13856
13857
13858
13859
13860
13861
13862
13863
13864
13865
13866
13867
13868
13869
13870
13871
13872
13873
13874
13875
13876
13877
13878
13879
13880
13881
13882
13883
13884
13885
13886
13887
13888
13889
13890
13891
13892
13893
13894
13895
13896
13897
13898
13899
13900
13901
13902
13903
13904
13905
13906
13907
13908
13909
13910
13911
13912
13913
13914
13915
13916
13917
13918
13919
13920
13921
13922
13923
13924
13925
13926
13927
13928
13929
13930
13931
13932
13933
13934
13935
13936
13937
13938
13939
13940
13941
13942
13943
13944
13945
13946
13947
13948
13949
13950
13951
13952
13953
13954
13955
13956
13957
13958
13959
13960
13961
13962
13963
13964
13965
13966
13967
13968
13969
13970
13971
13972
13973
13974
13975
13976
13977
13978
13979
13980
13981
13982
13983
13984
13985
13986
13987
13988
13989
13990
13991
13992
13993
13994
13995
13996
13997
13998
13999
14000
14001
14002
14003
14004
14005
14006
14007
14008
14009
14010
14011
14012
14013
14014
14015
14016
14017
14018
14019
14020
14021
14022
14023
14024
14025
14026
14027
14028
14029
14030
14031
14032
14033
14034
14035
14036
14037
14038
14039
14040
14041
14042
14043
14044
14045
14046
14047
14048
14049
14050
14051
14052
14053
14054
14055
14056
14057
14058
14059
14060
14061
14062
14063
14064
14065
14066
14067
14068
14069
14070
14071
14072
14073
14074
14075
14076
14077
14078
14079
14080
14081
14082
14083
14084
14085
14086
14087
14088
14089
14090
14091
14092
14093
14094
14095
14096
14097
14098
14099
14100
14101
14102
14103
14104
14105
14106
14107
14108
14109
14110
14111
14112
14113
14114
14115
14116
14117
14118
14119
14120
14121
14122
14123
14124
14125
14126
14127
14128
14129
14130
14131
14132
14133
14134
14135
14136
14137
14138
14139
14140
14141
14142
14143
14144
14145
14146
14147
14148
14149
14150
14151
14152
14153
14154
14155
14156
14157
14158
14159
14160
14161
14162
14163
14164
14165
14166
14167
14168
14169
14170
14171
14172
14173
14174
14175
14176
14177
14178
14179
14180
14181
14182
14183
14184
14185
14186
14187
14188
14189
14190
14191
14192
14193
14194
14195
14196
14197
14198
14199
14200
14201
14202
14203
14204
14205
14206
14207
14208
14209
14210
14211
14212
14213
14214
14215
14216
14217
14218
14219
14220
14221
14222
14223
14224
14225
14226
14227
14228
14229
14230
14231
14232
14233
14234
14235
14236
14237
14238
14239
14240
14241
14242
14243
14244
14245
14246
14247
14248
14249
14250
14251
14252
14253
14254
14255
14256
14257
14258
14259
14260
14261
14262
14263
14264
14265
14266
14267
14268
14269
14270
14271
14272
14273
14274
14275
14276
14277
14278
14279
14280
14281
14282
14283
14284
14285
14286
14287
14288
14289
14290
14291
14292
14293
14294
14295
14296
14297
14298
14299
14300
14301
14302
14303
14304
14305
14306
14307
14308
14309
14310
14311
14312
14313
14314
14315
14316
14317
14318
14319
14320
14321
14322
14323
14324
14325
14326
14327
14328
14329
14330
14331
14332
14333
14334
14335
14336
14337
14338
14339
14340
14341
14342
14343
14344
14345
14346
14347
14348
14349
14350
14351
14352
14353
14354
14355
14356
14357
14358
14359
14360
14361
14362
14363
14364
14365
14366
14367
14368
14369
14370
14371
14372
14373
14374
14375
14376
14377
14378
14379
14380
14381
14382
14383
14384
14385
14386
14387
14388
14389
14390
14391
14392
14393
14394
14395
14396
14397
14398
14399
14400
14401
14402
14403
14404
14405
14406
14407
14408
14409
14410
14411
14412
14413
14414
14415
14416
14417
14418
14419
14420
14421
14422
14423
14424
14425
14426
14427
14428
14429
14430
14431
14432
14433
14434
14435
14436
14437
14438
14439
14440
14441
14442
14443
14444
14445
14446
14447
14448
14449
14450
14451
14452
14453
14454
14455
14456
14457
14458
14459
14460
14461
14462
14463
14464
14465
14466
14467
14468
14469
14470
14471
14472
14473
14474
14475
14476
14477
14478
14479
14480
14481
14482
14483
14484
14485
14486
14487
14488
14489
14490
14491
14492
14493
14494
14495
14496
14497
14498
14499
14500
14501
14502
14503
14504
14505
14506
14507
14508
14509
14510
14511
14512
14513
14514
14515
14516
14517
14518
14519
14520
14521
14522
14523
14524
14525
14526
14527
14528
14529
14530
14531
14532
14533
14534
14535
14536
14537
14538
14539
14540
14541
14542
14543
14544
14545
14546
14547
14548
14549
14550
14551
14552
14553
14554
14555
14556
14557
14558
14559
14560
14561
14562
14563
14564
14565
14566
14567
14568
14569
14570
14571
14572
14573
14574
14575
14576
14577
14578
14579
14580
14581
14582
14583
14584
14585
14586
14587
14588
14589
14590
14591
14592
14593
14594
14595
14596
14597
14598
14599
14600
14601
14602
14603
14604
14605
14606
14607
14608
14609
14610
14611
14612
14613
14614
14615
14616
14617
14618
14619
14620
14621
14622
14623
14624
14625
14626
14627
14628
14629
14630
14631
14632
14633
14634
14635
14636
14637
14638
14639
14640
14641
14642
14643
14644
14645
14646
14647
14648
14649
14650
14651
14652
14653
14654
14655
14656
14657
14658
14659
14660
14661
14662
14663
14664
14665
14666
14667
14668
14669
14670
14671
14672
14673
14674
14675
14676
14677
14678
14679
14680
14681
14682
14683
14684
14685
14686
14687
14688
14689
14690
14691
14692
14693
14694
14695
14696
14697
14698
14699
14700
14701
14702
14703
14704
14705
14706
14707
14708
14709
14710
14711
14712
14713
14714
14715
14716
14717
14718
14719
14720
14721
14722
14723
14724
14725
14726
14727
14728
14729
14730
14731
14732
14733
14734
14735
14736
14737
14738
14739
14740
14741
14742
14743
14744
14745
14746
14747
14748
14749
14750
14751
14752
14753
14754
14755
14756
14757
14758
14759
14760
14761
14762
14763
14764
14765
14766
14767
14768
14769
14770
14771
14772
14773
14774
14775
14776
14777
14778
14779
14780
14781
14782
14783
14784
14785
14786
14787
14788
14789
14790
14791
14792
14793
14794
14795
14796
14797
14798
14799
14800
14801
14802
14803
14804
14805
14806
14807
14808
14809
14810
14811
14812
14813
14814
14815
14816
14817
14818
14819
14820
14821
14822
14823
14824
14825
14826
14827
14828
14829
14830
14831
14832
14833
14834
14835
14836
14837
14838
14839
14840
14841
14842
14843
14844
14845
14846
14847
14848
14849
14850
14851
14852
14853
14854
14855
14856
14857
14858
14859
14860
14861
14862
14863
14864
14865
14866
14867
14868
14869
14870
14871
14872
14873
14874
14875
14876
14877
14878
14879
14880
14881
14882
14883
14884
14885
14886
14887
14888
14889
14890
14891
14892
14893
14894
14895
14896
14897
14898
14899
14900
14901
14902
14903
14904
14905
14906
14907
14908
14909
14910
14911
14912
14913
14914
14915
14916
14917
14918
14919
14920
14921
14922
14923
14924
14925
14926
14927
14928
14929
14930
14931
14932
14933
14934
14935
14936
14937
14938
14939
14940
14941
14942
14943
14944
14945
14946
14947
14948
14949
14950
14951
14952
14953
14954
14955
14956
14957
14958
14959
14960
14961
14962
14963
14964
14965
14966
14967
14968
14969
14970
14971
14972
14973
14974
14975
14976
14977
14978
14979
14980
14981
14982
14983
14984
14985
14986
14987
14988
14989
14990
14991
14992
14993
14994
14995
14996
14997
14998
14999
15000
15001
15002
15003
15004
15005
15006
15007
15008
15009
15010
15011
15012
15013
15014
15015
15016
15017
15018
15019
15020
15021
15022
15023
15024
15025
15026
15027
15028
15029
15030
15031
15032
15033
15034
15035
15036
15037
15038
15039
15040
15041
15042
15043
15044
15045
15046
15047
15048
15049
15050
15051
15052
15053
15054
15055
15056
15057
15058
15059
15060
15061
15062
15063
15064
15065
15066
15067
15068
15069
15070
15071
15072
15073
15074
15075
15076
15077
15078
15079
15080
15081
15082
15083
15084
15085
15086
15087
15088
15089
15090
15091
15092
15093
15094
15095
15096
15097
15098
15099
15100
15101
15102
15103
15104
15105
15106
15107
15108
15109
15110
15111
15112
15113
15114
15115
15116
15117
15118
15119
15120
15121
15122
15123
15124
15125
15126
15127
15128
15129
15130
15131
15132
15133
15134
15135
15136
15137
15138
15139
15140
15141
15142
15143
15144
15145
15146
15147
15148
15149
15150
15151
15152
15153
15154
15155
15156
15157
15158
15159
15160
15161
15162
15163
15164
15165
15166
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181
15182
15183
15184
15185
15186
15187
15188
15189
15190
15191
15192
15193
15194
15195
15196
15197
15198
15199
15200
15201
15202
15203
15204
15205
15206
15207
15208
15209
15210
15211
15212
15213
15214
15215
15216
15217
15218
15219
15220
15221
15222
15223
15224
15225
15226
15227
15228
15229
15230
15231
15232
15233
15234
15235
15236
15237
15238
15239
15240
15241
15242
15243
15244
15245
15246
15247
15248
15249
15250
15251
15252
15253
15254
15255
15256
15257
15258
15259
15260
15261
15262
15263
15264
15265
15266
15267
15268
15269
15270
15271
15272
15273
15274
15275
15276
15277
15278
15279
15280
15281
15282
15283
15284
15285
15286
15287
15288
15289
15290
15291
15292
15293
15294
15295
15296
15297
15298
15299
15300
15301
15302
15303
15304
15305
15306
15307
15308
15309
15310
15311
15312
15313
15314
15315
15316
15317
15318
15319
15320
15321
15322
15323
15324
15325
15326
15327
15328
15329
15330
15331
15332
15333
15334
15335
15336
15337
15338
15339
15340
15341
15342
15343
15344
15345
15346
15347
15348
15349
15350
15351
15352
15353
15354
15355
15356
15357
15358
15359
15360
15361
15362
15363
15364
15365
15366
15367
15368
15369
15370
15371
15372
15373
15374
15375
15376
15377
15378
15379
15380
15381
15382
15383
15384
15385
15386
15387
15388
15389
15390
15391
15392
15393
15394
15395
15396
15397
15398
15399
15400
15401
15402
15403
15404
15405
15406
15407
15408
15409
15410
15411
15412
15413
15414
15415
15416
15417
15418
15419
15420
15421
15422
15423
15424
15425
15426
15427
15428
15429
15430
15431
15432
15433
15434
15435
15436
15437
15438
15439
15440
15441
15442
15443
15444
15445
15446
15447
15448
15449
15450
15451
15452
15453
15454
15455
15456
15457
15458
15459
15460
15461
15462
15463
15464
15465
15466
15467
15468
15469
15470
15471
15472
15473
15474
15475
15476
15477
15478
15479
15480
15481
15482
15483
15484
15485
15486
15487
15488
15489
15490
15491
15492
15493
15494
15495
15496
15497
15498
15499
15500
15501
15502
15503
15504
15505
15506
15507
15508
15509
15510
15511
15512
15513
15514
15515
15516
15517
15518
15519
15520
15521
15522
15523
15524
15525
15526
15527
15528
15529
15530
15531
15532
15533
15534
15535
15536
15537
15538
15539
15540
15541
15542
15543
15544
15545
15546
15547
15548
15549
15550
15551
15552
15553
15554
15555
15556
15557
15558
15559
15560
15561
15562
15563
15564
15565
15566
15567
15568
15569
15570
15571
15572
15573
15574
15575
15576
15577
15578
15579
15580
15581
15582
15583
15584
15585
15586
15587
15588
15589
15590
15591
15592
15593
15594
15595
15596
15597
15598
15599
15600
15601
15602
15603
15604
15605
15606
15607
15608
15609
15610
15611
15612
15613
15614
15615
15616
15617
15618
15619
15620
15621
15622
15623
15624
15625
15626
15627
15628
15629
15630
15631
15632
15633
15634
15635
15636
15637
15638
15639
15640
15641
15642
15643
15644
15645
15646
15647
15648
15649
15650
15651
15652
15653
15654
15655
15656
15657
15658
15659
15660
15661
15662
15663
15664
15665
15666
15667
15668
15669
15670
15671
15672
15673
15674
15675
15676
15677
15678
15679
15680
15681
15682
15683
15684
15685
15686
15687
15688
15689
15690
15691
15692
15693
15694
15695
15696
15697
15698
15699
15700
15701
15702
15703
15704
15705
15706
15707
15708
15709
15710
15711
15712
15713
15714
15715
15716
15717
15718
15719
15720
15721
15722
15723
15724
15725
15726
15727
15728
15729
15730
15731
15732
15733
15734
15735
15736
15737
15738
15739
15740
15741
15742
15743
15744
15745
15746
15747
15748
15749
15750
15751
15752
15753
15754
15755
15756
15757
15758
15759
15760
15761
15762
15763
15764
15765
15766
15767
15768
15769
15770
15771
15772
15773
15774
15775
15776
15777
15778
15779
15780
15781
15782
15783
15784
15785
15786
15787
15788
15789
15790
15791
15792
15793
15794
15795
15796
15797
15798
15799
15800
15801
15802
15803
15804
15805
15806
15807
15808
15809
15810
15811
15812
15813
15814
15815
15816
15817
15818
15819
15820
15821
15822
15823
15824
15825
15826
15827
15828
15829
15830
15831
15832
15833
15834
15835
15836
15837
15838
15839
15840
15841
15842
15843
15844
15845
15846
15847
15848
15849
15850
15851
15852
15853
15854
15855
15856
15857
15858
15859
15860
15861
15862
15863
15864
15865
15866
15867
15868
15869
15870
15871
15872
15873
15874
15875
15876
15877
15878
15879
15880
15881
15882
15883
15884
15885
15886
15887
15888
15889
15890
15891
15892
15893
15894
15895
15896
15897
15898
15899
15900
15901
15902
15903
15904
15905
15906
15907
15908
15909
15910
15911
15912
15913
15914
15915
15916
15917
15918
15919
15920
15921
15922
15923
15924
15925
15926
15927
15928
15929
15930
15931
15932
15933
15934
15935
15936
15937
15938
15939
15940
15941
15942
15943
15944
15945
15946
15947
15948
15949
15950
15951
15952
15953
15954
15955
15956
15957
15958
15959
15960
15961
15962
15963
15964
15965
15966
15967
15968
15969
15970
15971
15972
15973
15974
15975
15976
15977
15978
15979
15980
15981
15982
15983
15984
15985
15986
15987
15988
15989
15990
15991
15992
15993
15994
15995
15996
15997
15998
15999
16000
16001
16002
16003
16004
16005
16006
16007
16008
16009
16010
16011
16012
16013
16014
16015
16016
16017
16018
16019
16020
16021
16022
16023
16024
16025
16026
16027
16028
16029
16030
16031
16032
16033
16034
16035
16036
16037
16038
16039
16040
16041
16042
16043
16044
16045
16046
16047
16048
16049
16050
16051
16052
16053
16054
16055
16056
16057
16058
16059
16060
16061
16062
16063
16064
16065
16066
16067
16068
16069
16070
16071
16072
16073
16074
16075
16076
16077
16078
16079
16080
16081
16082
16083
16084
16085
16086
16087
16088
16089
16090
16091
16092
16093
16094
16095
16096
16097
16098
16099
16100
16101
16102
16103
16104
16105
16106
16107
16108
16109
16110
16111
16112
16113
16114
16115
16116
16117
16118
16119
16120
16121
16122
16123
16124
16125
16126
16127
16128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144
16145
16146
16147
16148
16149
16150
16151
16152
16153
16154
16155
16156
16157
16158
16159
16160
16161
16162
16163
16164
16165
16166
16167
16168
16169
16170
16171
16172
16173
16174
16175
16176
16177
16178
16179
16180
16181
16182
16183
16184
16185
16186
16187
16188
16189
16190
16191
16192
16193
16194
16195
16196
16197
16198
16199
16200
16201
16202
16203
16204
16205
16206
16207
16208
16209
16210
16211
16212
16213
16214
16215
16216
16217
16218
16219
16220
16221
16222
16223
16224
16225
16226
16227
16228
16229
16230
16231
16232
16233
16234
16235
16236
16237
16238
16239
16240
16241
16242
16243
16244
16245
16246
16247
16248
16249
16250
16251
16252
16253
16254
16255
16256
16257
16258
16259
16260
16261
16262
16263
16264
16265
16266
16267
16268
16269
16270
16271
16272
16273
16274
16275
16276
16277
16278
16279
16280
16281
16282
16283
16284
16285
16286
16287
16288
16289
16290
16291
16292
16293
16294
16295
16296
16297
16298
16299
16300
16301
16302
16303
16304
16305
16306
16307
16308
16309
16310
16311
16312
16313
16314
16315
16316
16317
16318
16319
16320
16321
16322
16323
16324
16325
16326
16327
16328
16329
16330
16331
16332
16333
16334
16335
16336
16337
16338
16339
16340
16341
16342
16343
16344
16345
16346
16347
16348
16349
16350
16351
16352
16353
16354
16355
16356
16357
16358
16359
16360
16361
16362
16363
16364
16365
16366
16367
16368
16369
16370
16371
16372
16373
16374
16375
16376
16377
16378
16379
16380
16381
16382
16383
16384
16385
16386
16387
16388
16389
16390
16391
16392
16393
16394
16395
16396
16397
16398
16399
16400
16401
16402
16403
16404
16405
16406
16407
16408
16409
16410
16411
16412
16413
16414
16415
16416
16417
16418
16419
16420
16421
16422
16423
16424
16425
16426
16427
16428
16429
16430
16431
16432
16433
16434
16435
16436
16437
16438
16439
16440
16441
16442
16443
16444
16445
16446
16447
16448
16449
16450
16451
16452
16453
16454
16455
16456
16457
16458
16459
16460
16461
16462
16463
16464
16465
16466
16467
16468
16469
16470
16471
16472
16473
16474
16475
16476
16477
16478
16479
16480
16481
16482
16483
16484
16485
16486
16487
16488
16489
16490
16491
16492
16493
16494
16495
16496
16497
16498
16499
16500
16501
16502
16503
16504
16505
16506
16507
16508
16509
16510
16511
16512
16513
16514
16515
16516
16517
16518
16519
16520
16521
16522
16523
16524
16525
16526
16527
16528
16529
16530
16531
16532
16533
16534
16535
16536
16537
16538
16539
16540
16541
16542
16543
16544
16545
16546
16547
16548
16549
16550
16551
16552
16553
16554
16555
16556
16557
16558
16559
16560
16561
16562
16563
16564
16565
16566
16567
16568
16569
16570
16571
16572
16573
16574
16575
16576
16577
16578
16579
16580
16581
16582
16583
16584
16585
16586
16587
16588
16589
16590
16591
16592
16593
16594
16595
16596
16597
16598
16599
16600
16601
16602
16603
16604
16605
16606
16607
16608
16609
16610
16611
16612
16613
16614
16615
16616
16617
16618
16619
16620
16621
16622
16623
16624
16625
16626
16627
16628
16629
16630
16631
16632
16633
16634
16635
16636
16637
16638
16639
16640
16641
16642
16643
16644
16645
16646
16647
16648
16649
16650
16651
16652
16653
16654
16655
16656
16657
16658
16659
16660
16661
16662
16663
16664
16665
16666
16667
16668
16669
16670
16671
16672
16673
16674
16675
16676
16677
16678
16679
16680
16681
16682
16683
16684
16685
16686
16687
16688
16689
16690
16691
16692
16693
16694
16695
16696
16697
16698
16699
16700
16701
16702
16703
16704
16705
16706
16707
16708
16709
16710
16711
16712
16713
16714
16715
16716
16717
16718
16719
16720
16721
16722
16723
16724
16725
16726
16727
16728
16729
16730
16731
16732
16733
16734
16735
16736
16737
16738
16739
16740
16741
16742
16743
16744
16745
16746
16747
16748
16749
16750
16751
16752
16753
16754
16755
16756
16757
16758
16759
16760
16761
16762
16763
16764
16765
16766
16767
16768
16769
16770
16771
16772
16773
16774
16775
16776
16777
16778
16779
16780
16781
16782
16783
16784
16785
16786
16787
16788
16789
16790
16791
16792
16793
16794
16795
16796
16797
16798
16799
16800
16801
16802
16803
16804
16805
16806
16807
16808
16809
16810
16811
16812
16813
16814
16815
16816
16817
16818
16819
16820
16821
16822
16823
16824
16825
16826
16827
16828
16829
16830
16831
16832
16833
16834
16835
16836
16837
16838
16839
16840
16841
16842
16843
16844
16845
16846
16847
16848
16849
16850
16851
16852
16853
16854
16855
16856
16857
16858
16859
16860
16861
16862
16863
16864
16865
16866
16867
16868
16869
16870
16871
16872
16873
16874
16875
16876
16877
16878
16879
16880
16881
16882
16883
16884
16885
16886
16887
16888
16889
16890
16891
16892
16893
16894
16895
16896
16897
16898
16899
16900
16901
16902
16903
16904
16905
16906
16907
16908
16909
16910
16911
16912
16913
16914
16915
16916
16917
16918
16919
16920
16921
16922
16923
16924
16925
16926
16927
16928
16929
16930
16931
16932
16933
16934
16935
16936
16937
16938
16939
16940
16941
16942
16943
16944
16945
16946
16947
16948
16949
16950
16951
16952
16953
16954
16955
16956
16957
16958
16959
16960
16961
16962
16963
16964
16965
16966
16967
16968
16969
16970
16971
16972
16973
16974
16975
16976
16977
16978
16979
16980
16981
16982
16983
16984
16985
16986
16987
16988
16989
16990
16991
16992
16993
16994
16995
16996
16997
16998
16999
17000
17001
17002
17003
17004
17005
17006
17007
17008
17009
17010
17011
17012
17013
17014
17015
17016
17017
17018
17019
17020
17021
17022
17023
17024
17025
17026
17027
17028
17029
17030
17031
17032
17033
17034
17035
17036
17037
17038
17039
17040
17041
17042
17043
17044
17045
17046
17047
17048
17049
17050
17051
17052
17053
17054
17055
17056
17057
17058
17059
17060
17061
17062
17063
17064
17065
17066
17067
17068
17069
17070
17071
17072
17073
17074
17075
17076
17077
17078
17079
17080
17081
17082
17083
17084
17085
17086
17087
17088
17089
17090
17091
17092
17093
17094
17095
17096
17097
17098
17099
17100
17101
17102
17103
17104
17105
17106
17107
17108
17109
17110
17111
17112
17113
17114
17115
17116
17117
17118
17119
17120
17121
17122
17123
17124
17125
17126
17127
17128
17129
17130
17131
17132
17133
17134
17135
17136
17137
17138
17139
17140
17141
17142
17143
17144
17145
17146
17147
17148
17149
17150
17151
17152
17153
17154
17155
17156
17157
17158
17159
17160
17161
17162
17163
17164
17165
17166
17167
17168
17169
17170
17171
17172
17173
17174
17175
17176
17177
17178
17179
17180
17181
17182
17183
17184
17185
17186
17187
17188
17189
17190
17191
17192
17193
17194
17195
17196
17197
17198
17199
17200
17201
17202
17203
17204
17205
17206
17207
17208
17209
17210
17211
17212
17213
17214
17215
17216
17217
17218
17219
17220
17221
17222
17223
17224
17225
17226
17227
17228
17229
17230
17231
17232
17233
17234
17235
17236
17237
17238
17239
17240
17241
17242
17243
17244
17245
17246
17247
17248
17249
17250
17251
17252
17253
17254
17255
17256
17257
17258
17259
17260
17261
17262
17263
17264
17265
17266
17267
17268
17269
17270
17271
17272
17273
17274
17275
17276
17277
17278
17279
17280
17281
17282
17283
17284
17285
17286
17287
17288
17289
17290
17291
17292
17293
17294
17295
17296
17297
17298
17299
17300
17301
17302
17303
17304
17305
17306
17307
17308
17309
17310
17311
17312
17313
17314
17315
17316
17317
17318
17319
17320
17321
17322
17323
17324
17325
17326
17327
17328
17329
17330
17331
17332
17333
17334
17335
17336
17337
17338
17339
17340
17341
17342
17343
17344
17345
17346
17347
17348
17349
17350
17351
17352
17353
17354
17355
17356
17357
17358
17359
17360
17361
17362
17363
17364
17365
17366
17367
17368
17369
17370
17371
17372
17373
17374
17375
17376
17377
17378
17379
17380
17381
17382
17383
17384
17385
17386
17387
17388
17389
17390
17391
17392
17393
17394
17395
17396
17397
17398
17399
17400
17401
17402
17403
17404
17405
17406
17407
17408
17409
17410
17411
17412
17413
17414
17415
17416
17417
17418
17419
17420
17421
17422
17423
17424
17425
17426
17427
17428
17429
17430
17431
17432
17433
17434
17435
17436
17437
17438
17439
17440
17441
17442
17443
17444
17445
17446
17447
17448
17449
17450
17451
17452
17453
17454
17455
17456
17457
17458
17459
17460
17461
17462
17463
17464
17465
17466
17467
17468
17469
17470
17471
17472
17473
17474
17475
17476
17477
17478
17479
17480
17481
17482
17483
17484
17485
17486
17487
17488
17489
17490
17491
17492
17493
17494
17495
17496
17497
17498
17499
17500
17501
17502
17503
17504
17505
17506
17507
17508
17509
17510
17511
17512
17513
17514
17515
17516
17517
17518
17519
17520
17521
17522
17523
17524
17525
17526
17527
17528
17529
17530
17531
17532
17533
17534
17535
17536
17537
17538
17539
17540
17541
17542
17543
17544
17545
17546
17547
17548
17549
17550
17551
17552
17553
17554
17555
17556
17557
17558
17559
17560
17561
17562
17563
17564
17565
17566
17567
17568
17569
17570
17571
17572
17573
17574
17575
17576
17577
17578
17579
17580
17581
17582
17583
17584
17585
17586
17587
17588
17589
17590
17591
17592
17593
17594
17595
17596
17597
17598
17599
17600
17601
17602
17603
17604
17605
17606
17607
17608
17609
17610
17611
17612
17613
17614
17615
17616
17617
17618
17619
17620
17621
17622
17623
17624
17625
17626
17627
17628
17629
17630
17631
17632
17633
17634
17635
17636
17637
17638
17639
17640
17641
17642
17643
17644
17645
17646
17647
17648
17649
17650
17651
17652
17653
17654
17655
17656
17657
17658
17659
17660
17661
17662
17663
17664
17665
17666
17667
17668
17669
17670
17671
17672
17673
17674
17675
17676
17677
17678
17679
17680
17681
17682
17683
17684
17685
17686
17687
17688
17689
17690
17691
17692
17693
17694
17695
17696
17697
17698
17699
17700
17701
17702
17703
17704
17705
17706
17707
17708
17709
17710
17711
17712
17713
17714
17715
17716
17717
17718
17719
17720
17721
17722
17723
17724
17725
17726
17727
17728
17729
17730
17731
17732
17733
17734
17735
17736
17737
17738
17739
17740
17741
17742
17743
17744
17745
17746
17747
17748
17749
17750
17751
17752
17753
17754
17755
17756
17757
17758
17759
17760
17761
17762
17763
17764
17765
17766
17767
17768
17769
17770
17771
17772
17773
17774
17775
17776
17777
17778
17779
17780
17781
17782
17783
17784
17785
17786
17787
17788
17789
17790
17791
17792
17793
17794
17795
17796
17797
17798
17799
17800
17801
17802
17803
17804
17805
17806
17807
17808
17809
17810
17811
17812
17813
17814
17815
17816
17817
17818
17819
17820
17821
17822
17823
17824
17825
17826
17827
17828
17829
17830
17831
17832
17833
17834
17835
17836
17837
17838
17839
17840
17841
17842
17843
17844
17845
17846
17847
17848
17849
17850
17851
17852
17853
17854
17855
17856
17857
17858
17859
17860
17861
17862
17863
17864
17865
17866
17867
17868
17869
17870
17871
17872
17873
17874
17875
17876
17877
17878
17879
17880
17881
17882
17883
17884
17885
17886
17887
17888
17889
17890
17891
17892
17893
17894
17895
17896
17897
17898
17899
17900
17901
17902
17903
17904
17905
17906
17907
17908
17909
17910
17911
17912
17913
17914
17915
17916
17917
17918
17919
17920
17921
17922
17923
17924
17925
17926
17927
17928
17929
17930
17931
17932
17933
17934
17935
17936
17937
17938
17939
17940
17941
17942
17943
17944
17945
17946
17947
17948
17949
17950
17951
17952
17953
17954
17955
17956
17957
17958
17959
17960
17961
17962
17963
17964
17965
17966
17967
17968
17969
17970
17971
17972
17973
17974
17975
17976
17977
17978
17979
17980
17981
17982
17983
17984
17985
17986
17987
17988
17989
17990
17991
17992
17993
17994
17995
17996
17997
17998
17999
18000
18001
18002
18003
18004
18005
18006
18007
18008
18009
18010
18011
18012
18013
18014
18015
18016
18017
18018
18019
18020
18021
18022
18023
18024
18025
18026
18027
18028
18029
18030
18031
18032
18033
18034
18035
18036
18037
18038
18039
18040
18041
18042
18043
18044
18045
18046
18047
18048
18049
18050
18051
18052
18053
18054
18055
18056
18057
18058
18059
18060
18061
18062
18063
18064
18065
18066
18067
18068
18069
18070
18071
18072
18073
18074
18075
18076
18077
18078
18079
18080
18081
18082
18083
18084
18085
18086
18087
18088
18089
18090
18091
18092
18093
18094
18095
18096
18097
18098
18099
18100
18101
18102
18103
18104
18105
18106
18107
18108
18109
18110
18111
18112
18113
18114
18115
18116
18117
18118
18119
18120
18121
18122
18123
18124
18125
18126
18127
18128
18129
18130
18131
18132
18133
18134
18135
18136
18137
18138
18139
18140
18141
18142
18143
18144
18145
18146
18147
18148
18149
18150
18151
18152
18153
18154
18155
18156
18157
18158
18159
18160
18161
18162
18163
18164
18165
18166
18167
18168
18169
18170
18171
18172
18173
18174
18175
18176
18177
18178
18179
18180
18181
18182
18183
18184
18185
18186
18187
18188
18189
18190
18191
18192
18193
18194
18195
18196
18197
18198
18199
18200
18201
18202
18203
18204
18205
18206
18207
18208
18209
18210
18211
18212
18213
18214
18215
18216
18217
18218
18219
18220
18221
18222
18223
18224
18225
18226
18227
18228
18229
18230
18231
18232
18233
18234
18235
18236
18237
18238
18239
18240
18241
18242
18243
18244
18245
18246
18247
18248
18249
18250
18251
18252
18253
18254
18255
18256
18257
18258
18259
18260
18261
18262
18263
18264
18265
18266
18267
18268
18269
18270
18271
18272
18273
18274
18275
18276
18277
18278
18279
18280
18281
18282
18283
18284
18285
18286
18287
18288
18289
18290
18291
18292
18293
18294
18295
18296
18297
18298
18299
18300
18301
18302
18303
18304
18305
18306
18307
18308
18309
18310
18311
18312
18313
18314
18315
18316
18317
18318
18319
18320
18321
18322
18323
18324
18325
18326
18327
18328
18329
18330
18331
18332
18333
18334
18335
18336
18337
18338
18339
18340
18341
18342
18343
18344
18345
18346
18347
18348
18349
18350
18351
18352
18353
18354
18355
18356
18357
18358
18359
18360
18361
18362
18363
18364
18365
18366
18367
18368
18369
18370
18371
18372
18373
18374
18375
18376
18377
18378
18379
18380
18381
18382
18383
18384
18385
18386
18387
18388
18389
18390
18391
18392
18393
18394
18395
18396
18397
18398
18399
18400
18401
18402
18403
18404
18405
18406
18407
18408
18409
18410
18411
18412
18413
18414
18415
18416
18417
18418
18419
18420
18421
18422
18423
18424
18425
18426
18427
18428
18429
18430
18431
18432
18433
18434
18435
18436
18437
18438
18439
18440
18441
18442
18443
18444
18445
18446
18447
18448
18449
18450
18451
18452
18453
18454
18455
18456
18457
18458
18459
18460
18461
18462
18463
18464
18465
18466
18467
18468
18469
18470
18471
18472
18473
18474
18475
18476
18477
18478
18479
18480
18481
18482
18483
18484
18485
18486
18487
18488
18489
18490
18491
18492
18493
18494
18495
18496
18497
18498
18499
18500
18501
18502
18503
18504
18505
18506
18507
18508
18509
18510
18511
18512
18513
18514
18515
18516
18517
18518
18519
18520
18521
18522
18523
18524
18525
18526
18527
18528
18529
18530
18531
18532
18533
18534
18535
18536
18537
18538
18539
18540
18541
18542
18543
18544
18545
18546
18547
18548
18549
18550
18551
18552
18553
18554
18555
18556
18557
18558
18559
18560
18561
18562
18563
18564
18565
18566
18567
18568
18569
18570
18571
18572
18573
18574
18575
18576
18577
18578
18579
18580
18581
18582
18583
18584
18585
18586
18587
18588
18589
18590
18591
18592
18593
18594
18595
18596
18597
18598
18599
18600
18601
18602
18603
18604
18605
18606
18607
18608
18609
18610
18611
18612
18613
18614
18615
18616
18617
18618
18619
18620
18621
18622
18623
18624
18625
18626
18627
18628
18629
18630
18631
18632
18633
18634
18635
18636
18637
18638
18639
18640
18641
18642
18643
18644
18645
18646
18647
18648
18649
18650
18651
18652
18653
18654
18655
18656
18657
18658
18659
18660
18661
18662
18663
18664
18665
18666
18667
18668
18669
18670
18671
18672
18673
18674
18675
18676
18677
18678
18679
18680
18681
18682
18683
18684
18685
18686
18687
18688
18689
18690
18691
18692
18693
18694
18695
18696
18697
18698
18699
18700
18701
18702
18703
18704
18705
18706
18707
18708
18709
18710
18711
18712
18713
18714
18715
18716
18717
18718
18719
18720
18721
18722
18723
18724
18725
18726
18727
18728
18729
18730
18731
18732
18733
18734
18735
18736
18737
18738
18739
18740
18741
18742
18743
18744
18745
18746
18747
18748
18749
18750
18751
18752
18753
18754
18755
18756
18757
18758
18759
18760
18761
18762
18763
18764
18765
18766
18767
18768
18769
18770
18771
18772
18773
18774
18775
18776
18777
18778
18779
18780
18781
18782
18783
18784
18785
18786
18787
18788
18789
18790
18791
18792
18793
18794
18795
18796
18797
18798
18799
18800
18801
18802
18803
18804
18805
18806
18807
18808
18809
18810
18811
18812
18813
18814
18815
18816
18817
18818
18819
18820
18821
18822
18823
18824
18825
18826
18827
18828
18829
18830
18831
18832
18833
18834
18835
18836
18837
18838
18839
18840
18841
18842
18843
18844
18845
18846
18847
18848
18849
18850
18851
18852
18853
18854
18855
18856
18857
18858
18859
18860
18861
18862
18863
18864
18865
18866
18867
18868
18869
18870
18871
18872
18873
18874
18875
18876
18877
18878
18879
18880
18881
18882
18883
18884
18885
18886
18887
18888
18889
18890
18891
18892
18893
18894
18895
18896
18897
18898
18899
18900
18901
18902
18903
18904
18905
18906
18907
18908
18909
18910
18911
18912
18913
18914
18915
18916
18917
18918
18919
18920
18921
18922
18923
18924
18925
18926
18927
18928
18929
18930
18931
18932
18933
18934
18935
18936
18937
18938
18939
18940
18941
18942
18943
18944
18945
18946
18947
18948
18949
18950
18951
18952
18953
18954
18955
18956
18957
18958
18959
18960
18961
18962
18963
18964
18965
18966
18967
18968
18969
18970
18971
18972
18973
18974
18975
18976
18977
18978
18979
18980
18981
18982
18983
18984
18985
18986
18987
18988
18989
18990
18991
18992
18993
18994
18995
18996
18997
18998
18999
19000
19001
19002
19003
19004
19005
19006
19007
19008
19009
19010
19011
19012
19013
19014
19015
19016
19017
19018
19019
19020
19021
19022
19023
19024
19025
19026
19027
19028
19029
19030
19031
19032
19033
19034
19035
19036
19037
19038
19039
19040
19041
19042
19043
19044
19045
19046
19047
19048
19049
19050
19051
19052
19053
19054
19055
19056
19057
19058
19059
19060
19061
19062
19063
19064
19065
19066
19067
19068
19069
19070
19071
19072
19073
19074
19075
19076
19077
19078
19079
19080
19081
19082
19083
19084
19085
19086
19087
19088
19089
19090
19091
19092
19093
19094
19095
19096
19097
19098
19099
19100
19101
19102
19103
19104
19105
19106
19107
19108
19109
19110
19111
19112
19113
19114
19115
19116
19117
19118
19119
19120
19121
19122
19123
19124
19125
19126
19127
19128
19129
19130
19131
19132
19133
19134
19135
19136
19137
19138
19139
19140
19141
19142
19143
19144
19145
19146
19147
19148
19149
19150
19151
19152
19153
19154
19155
19156
19157
19158
19159
19160
19161
19162
19163
19164
19165
19166
19167
19168
19169
19170
19171
19172
19173
19174
19175
19176
19177
19178
19179
19180
19181
19182
19183
19184
19185
19186
19187
19188
19189
19190
19191
19192
19193
19194
19195
19196
19197
19198
19199
19200
19201
19202
19203
19204
19205
19206
19207
19208
19209
19210
19211
19212
19213
19214
19215
19216
19217
19218
19219
19220
19221
19222
19223
19224
19225
19226
19227
19228
19229
19230
19231
19232
19233
19234
19235
19236
19237
19238
19239
19240
19241
19242
19243
19244
19245
19246
19247
19248
19249
19250
19251
19252
19253
19254
19255
19256
19257
19258
19259
19260
19261
19262
19263
19264
19265
19266
19267
19268
19269
19270
19271
19272
19273
19274
19275
19276
19277
19278
19279
19280
19281
19282
19283
19284
19285
19286
19287
19288
19289
19290
19291
19292
19293
19294
19295
19296
19297
19298
19299
19300
19301
19302
19303
19304
19305
19306
19307
19308
19309
19310
19311
19312
19313
19314
19315
19316
19317
19318
19319
19320
19321
19322
19323
19324
19325
19326
19327
19328
19329
19330
19331
19332
19333
19334
19335
19336
19337
19338
19339
19340
19341
19342
19343
19344
19345
19346
19347
19348
19349
19350
19351
19352
19353
19354
19355
19356
19357
19358
19359
19360
19361
19362
19363
19364
19365
19366
19367
19368
19369
19370
19371
19372
19373
19374
19375
19376
19377
19378
19379
19380
19381
19382
19383
19384
19385
19386
19387
19388
19389
19390
19391
19392
19393
19394
19395
19396
19397
19398
19399
19400
19401
19402
19403
19404
19405
19406
19407
19408
19409
19410
19411
19412
19413
19414
19415
19416
19417
19418
19419
19420
19421
19422
19423
19424
19425
19426
19427
19428
19429
19430
19431
19432
19433
19434
19435
19436
19437
19438
19439
19440
19441
19442
19443
19444
19445
19446
19447
19448
19449
19450
19451
19452
19453
19454
19455
19456
19457
19458
19459
19460
19461
19462
19463
19464
19465
19466
19467
19468
19469
19470
19471
19472
19473
19474
19475
19476
19477
19478
19479
19480
19481
19482
19483
19484
19485
19486
19487
19488
19489
19490
19491
19492
19493
19494
19495
19496
19497
19498
19499
19500
19501
19502
19503
19504
19505
19506
19507
19508
19509
19510
19511
19512
19513
19514
19515
19516
19517
19518
19519
19520
19521
19522
19523
19524
19525
19526
19527
19528
19529
19530
19531
19532
19533
19534
19535
19536
19537
19538
19539
19540
19541
19542
19543
19544
19545
19546
19547
19548
19549
19550
19551
19552
19553
19554
19555
19556
19557
19558
19559
19560
19561
19562
19563
19564
19565
19566
19567
19568
19569
19570
19571
19572
19573
19574
19575
19576
19577
19578
19579
19580
19581
19582
19583
19584
19585
19586
19587
19588
19589
19590
19591
19592
19593
19594
19595
19596
19597
19598
19599
19600
19601
19602
19603
19604
19605
19606
19607
19608
19609
19610
19611
19612
19613
19614
19615
19616
19617
19618
19619
19620
19621
19622
19623
19624
19625
19626
19627
19628
19629
19630
19631
19632
19633
19634
19635
19636
19637
19638
19639
19640
19641
19642
19643
19644
19645
19646
19647
19648
19649
19650
19651
19652
19653
19654
19655
19656
19657
19658
19659
19660
19661
19662
19663
19664
19665
19666
19667
19668
19669
19670
19671
19672
19673
19674
19675
19676
19677
19678
19679
19680
19681
19682
19683
19684
19685
19686
19687
19688
19689
19690
19691
19692
19693
19694
19695
19696
19697
19698
19699
19700
19701
19702
19703
19704
19705
19706
19707
19708
19709
19710
19711
19712
19713
19714
19715
19716
19717
19718
19719
19720
19721
19722
19723
19724
19725
19726
19727
19728
19729
19730
19731
19732
19733
19734
19735
19736
19737
19738
19739
19740
19741
19742
19743
19744
19745
19746
19747
19748
19749
19750
19751
19752
19753
19754
19755
19756
19757
19758
19759
19760
19761
19762
19763
19764
19765
19766
19767
19768
19769
19770
19771
19772
19773
19774
19775
19776
19777
19778
19779
19780
19781
19782
19783
19784
19785
19786
19787
19788
19789
19790
19791
19792
19793
19794
19795
19796
19797
19798
19799
19800
19801
19802
19803
19804
19805
19806
19807
19808
19809
19810
19811
19812
19813
19814
19815
19816
19817
19818
19819
19820
19821
19822
19823
19824
19825
19826
19827
19828
19829
19830
19831
19832
19833
19834
19835
19836
19837
19838
19839
19840
19841
19842
19843
19844
19845
19846
19847
19848
19849
19850
19851
19852
19853
19854
19855
19856
19857
19858
19859
19860
19861
19862
19863
19864
19865
19866
19867
19868
19869
19870
19871
19872
19873
19874
19875
19876
19877
19878
19879
19880
19881
19882
19883
19884
19885
19886
19887
19888
19889
19890
19891
19892
19893
19894
19895
19896
19897
19898
19899
19900
19901
19902
19903
19904
19905
19906
19907
19908
19909
19910
19911
19912
19913
19914
19915
19916
19917
19918
19919
19920
19921
19922
19923
19924
19925
19926
19927
19928
19929
19930
19931
19932
19933
19934
19935
19936
19937
19938
19939
19940
19941
19942
19943
19944
19945
19946
19947
19948
19949
19950
19951
19952
19953
19954
19955
19956
19957
19958
19959
19960
19961
19962
19963
19964
19965
19966
19967
19968
19969
19970
19971
19972
19973
19974
19975
19976
19977
19978
19979
19980
19981
19982
19983
19984
19985
19986
19987
19988
19989
19990
19991
19992
19993
19994
19995
19996
19997
19998
19999
20000
20001
20002
20003
20004
20005
20006
20007
20008
20009
20010
20011
20012
20013
20014
20015
20016
20017
20018
20019
20020
20021
20022
20023
20024
20025
20026
20027
20028
20029
20030
20031
20032
20033
20034
20035
20036
20037
20038
20039
20040
20041
20042
20043
20044
20045
20046
20047
20048
20049
20050
20051
20052
20053
20054
20055
20056
20057
20058
20059
20060
20061
20062
20063
20064
20065
20066
20067
20068
20069
20070
20071
20072
20073
20074
20075
20076
20077
20078
20079
20080
20081
20082
20083
20084
20085
20086
20087
20088
20089
20090
20091
20092
20093
20094
20095
20096
20097
20098
20099
20100
20101
20102
20103
20104
20105
20106
20107
20108
20109
20110
20111
20112
20113
20114
20115
20116
20117
20118
20119
20120
20121
20122
20123
20124
20125
20126
20127
20128
20129
20130
20131
20132
20133
20134
20135
20136
20137
20138
20139
20140
20141
20142
20143
20144
20145
20146
20147
20148
20149
20150
20151
20152
20153
20154
20155
20156
20157
20158
20159
20160
20161
20162
20163
20164
20165
20166
20167
20168
20169
20170
20171
20172
20173
20174
20175
20176
20177
20178
20179
20180
20181
20182
20183
20184
20185
20186
20187
20188
20189
20190
20191
20192
20193
20194
20195
20196
20197
20198
20199
20200
20201
20202
20203
20204
20205
20206
20207
20208
20209
20210
20211
20212
20213
20214
20215
20216
20217
20218
20219
20220
20221
20222
20223
20224
20225
20226
20227
20228
20229
20230
20231
20232
20233
20234
20235
20236
20237
20238
20239
20240
20241
20242
20243
20244
20245
20246
20247
20248
20249
20250
20251
20252
20253
20254
20255
20256
20257
20258
20259
20260
20261
20262
20263
20264
20265
20266
20267
20268
20269
20270
20271
20272
20273
20274
20275
20276
20277
20278
20279
20280
20281
20282
20283
20284
20285
20286
20287
20288
20289
20290
20291
20292
20293
20294
20295
20296
20297
20298
20299
20300
20301
20302
20303
20304
20305
20306
20307
20308
20309
20310
20311
20312
20313
20314
20315
20316
20317
20318
20319
20320
20321
20322
20323
20324
20325
20326
20327
20328
20329
20330
20331
20332
20333
20334
20335
20336
20337
20338
20339
20340
20341
20342
20343
20344
20345
20346
20347
20348
20349
20350
20351
20352
20353
20354
20355
20356
20357
20358
20359
20360
20361
20362
20363
20364
20365
20366
20367
20368
20369
20370
20371
20372
20373
20374
20375
20376
20377
20378
20379
20380
20381
20382
20383
20384
20385
20386
20387
20388
20389
20390
20391
20392
20393
20394
20395
20396
20397
20398
20399
20400
20401
20402
20403
20404
20405
20406
20407
20408
20409
20410
20411
20412
20413
20414
20415
20416
20417
20418
20419
20420
20421
20422
20423
20424
20425
20426
20427
20428
20429
20430
20431
20432
20433
20434
20435
20436
20437
20438
20439
20440
20441
20442
20443
20444
20445
20446
20447
20448
20449
20450
20451
20452
20453
20454
20455
20456
20457
20458
20459
20460
20461
20462
20463
20464
20465
20466
20467
20468
20469
20470
20471
20472
20473
20474
20475
20476
20477
20478
20479
20480
20481
20482
20483
20484
20485
20486
20487
20488
20489
20490
20491
20492
20493
20494
20495
20496
20497
20498
20499
20500
20501
20502
20503
20504
20505
20506
20507
20508
20509
20510
20511
20512
20513
20514
20515
20516
20517
20518
20519
20520
20521
20522
20523
20524
20525
20526
20527
20528
20529
20530
20531
20532
20533
20534
20535
20536
20537
20538
20539
20540
20541
20542
20543
20544
20545
20546
20547
20548
20549
20550
20551
20552
20553
20554
20555
20556
20557
20558
20559
20560
20561
20562
20563
20564
20565
20566
20567
20568
20569
20570
20571
20572
20573
20574
20575
20576
20577
20578
20579
20580
20581
20582
20583
20584
20585
20586
20587
20588
20589
20590
20591
20592
20593
20594
20595
20596
20597
20598
20599
20600
20601
20602
20603
20604
20605
20606
20607
20608
20609
20610
20611
20612
20613
20614
20615
20616
20617
20618
20619
20620
20621
20622
20623
20624
20625
20626
20627
20628
20629
20630
20631
20632
20633
20634
20635
20636
20637
20638
20639
20640
20641
20642
20643
20644
20645
20646
20647
20648
20649
20650
20651
20652
20653
20654
20655
20656
20657
20658
20659
20660
20661
20662
20663
20664
20665
20666
20667
20668
20669
20670
20671
20672
20673
20674
20675
20676
20677
20678
20679
20680
20681
20682
20683
20684
20685
20686
20687
20688
20689
20690
20691
20692
20693
20694
20695
20696
20697
20698
20699
20700
20701
20702
20703
20704
20705
20706
20707
20708
20709
20710
20711
20712
20713
20714
20715
20716
20717
20718
20719
20720
20721
20722
20723
20724
20725
20726
20727
20728
20729
20730
20731
20732
20733
20734
20735
20736
20737
20738
20739
20740
20741
20742
20743
20744
20745
20746
20747
20748
20749
20750
20751
20752
20753
20754
20755
20756
20757
20758
20759
20760
20761
20762
20763
20764
20765
20766
20767
20768
20769
20770
20771
20772
20773
20774
20775
20776
20777
20778
20779
20780
20781
20782
20783
20784
20785
20786
20787
20788
20789
20790
20791
20792
20793
20794
20795
20796
20797
20798
20799
20800
20801
20802
20803
20804
20805
20806
20807
20808
20809
20810
20811
20812
20813
20814
20815
20816
20817
20818
20819
20820
20821
20822
20823
20824
20825
20826
20827
20828
20829
20830
20831
20832
20833
20834
20835
20836
20837
20838
20839
20840
20841
20842
20843
20844
20845
20846
20847
20848
20849
20850
20851
20852
20853
20854
20855
20856
20857
20858
20859
20860
20861
20862
20863
20864
20865
20866
20867
20868
20869
20870
20871
20872
20873
20874
20875
20876
20877
20878
20879
20880
20881
20882
20883
20884
20885
20886
20887
20888
20889
20890
20891
20892
20893
20894
20895
20896
20897
20898
20899
20900
20901
20902
20903
20904
20905
20906
20907
20908
20909
20910
20911
20912
20913
20914
20915
20916
20917
20918
20919
20920
20921
20922
20923
20924
20925
20926
20927
20928
20929
20930
20931
20932
20933
20934
20935
20936
20937
20938
20939
20940
20941
20942
20943
20944
20945
20946
20947
20948
20949
20950
20951
20952
20953
20954
20955
20956
20957
20958
20959
20960
20961
20962
20963
20964
20965
20966
20967
20968
20969
20970
20971
20972
20973
20974
20975
20976
20977
20978
20979
20980
20981
20982
20983
20984
20985
20986
20987
20988
20989
20990
20991
20992
20993
20994
20995
20996
20997
20998
20999
21000
21001
21002
21003
21004
21005
21006
21007
21008
21009
21010
21011
21012
21013
21014
21015
21016
21017
21018
21019
21020
21021
21022
21023
21024
21025
21026
21027
21028
21029
21030
21031
21032
21033
21034
21035
21036
21037
21038
21039
21040
21041
21042
21043
21044
21045
21046
21047
21048
21049
21050
21051
21052
21053
21054
21055
21056
21057
21058
21059
21060
21061
21062
21063
21064
21065
21066
21067
21068
21069
21070
21071
21072
21073
21074
21075
21076
21077
21078
21079
21080
21081
21082
21083
21084
21085
21086
21087
21088
21089
21090
21091
21092
21093
21094
21095
21096
21097
21098
21099
21100
21101
21102
21103
21104
21105
21106
21107
21108
21109
21110
21111
21112
21113
21114
21115
21116
21117
21118
21119
21120
21121
21122
21123
21124
21125
21126
21127
21128
21129
21130
21131
21132
21133
21134
21135
21136
21137
21138
21139
21140
21141
21142
21143
21144
21145
21146
21147
21148
21149
21150
21151
21152
21153
21154
21155
21156
21157
21158
21159
21160
21161
21162
21163
21164
21165
21166
21167
21168
21169
21170
21171
21172
21173
21174
21175
21176
21177
21178
21179
21180
21181
21182
21183
21184
21185
21186
21187
21188
21189
21190
21191
21192
21193
21194
21195
21196
21197
21198
21199
21200
21201
21202
21203
21204
21205
21206
21207
21208
21209
21210
21211
21212
21213
21214
21215
21216
21217
21218
21219
21220
21221
21222
21223
21224
21225
21226
21227
21228
21229
21230
21231
21232
21233
21234
21235
21236
21237
21238
21239
21240
21241
21242
21243
21244
21245
21246
21247
21248
21249
21250
21251
21252
21253
21254
21255
21256
21257
21258
21259
21260
21261
21262
21263
21264
21265
21266
21267
21268
21269
21270
21271
21272
21273
21274
21275
21276
21277
21278
21279
21280
21281
21282
21283
21284
21285
21286
21287
21288
21289
21290
21291
21292
21293
21294
21295
21296
21297
21298
21299
21300
21301
21302
21303
21304
21305
21306
21307
21308
21309
21310
21311
21312
21313
21314
21315
21316
21317
21318
21319
21320
21321
21322
21323
21324
21325
21326
21327
21328
21329
21330
21331
21332
21333
21334
21335
21336
21337
21338
21339
21340
21341
21342
21343
21344
21345
21346
21347
21348
21349
21350
21351
21352
21353
21354
21355
21356
21357
21358
21359
21360
21361
21362
21363
21364
21365
21366
21367
21368
21369
21370
21371
21372
21373
21374
21375
21376
21377
21378
21379
21380
21381
21382
21383
21384
21385
21386
21387
21388
21389
21390
21391
21392
21393
21394
21395
21396
21397
21398
21399
21400
21401
21402
21403
21404
21405
21406
21407
21408
21409
21410
21411
21412
21413
21414
21415
21416
21417
21418
21419
21420
21421
21422
21423
21424
21425
21426
21427
21428
21429
21430
21431
21432
21433
21434
21435
21436
21437
21438
21439
21440
21441
21442
21443
21444
21445
21446
21447
21448
21449
21450
21451
21452
21453
21454
21455
21456
21457
21458
21459
21460
21461
21462
21463
21464
21465
21466
21467
21468
21469
21470
21471
21472
21473
21474
21475
21476
21477
21478
21479
21480
21481
21482
21483
21484
21485
21486
21487
21488
21489
21490
21491
21492
21493
21494
21495
21496
21497
21498
21499
21500
21501
21502
21503
21504
21505
21506
21507
21508
21509
21510
21511
21512
21513
21514
21515
21516
21517
21518
21519
21520
21521
21522
21523
21524
21525
21526
21527
21528
21529
21530
21531
21532
21533
21534
21535
21536
21537
21538
21539
21540
21541
21542
21543
21544
21545
21546
21547
21548
21549
21550
21551
21552
21553
21554
21555
21556
21557
21558
21559
21560
21561
21562
21563
21564
21565
21566
21567
21568
21569
21570
21571
21572
21573
21574
21575
21576
21577
21578
21579
21580
21581
21582
21583
21584
21585
21586
21587
21588
21589
21590
21591
21592
21593
21594
21595
21596
21597
21598
21599
21600
21601
21602
21603
21604
21605
21606
21607
21608
21609
21610
21611
21612
21613
21614
21615
21616
21617
21618
21619
21620
21621
21622
21623
21624
21625
21626
21627
21628
21629
21630
21631
21632
21633
21634
21635
21636
21637
21638
21639
21640
21641
21642
21643
21644
21645
21646
21647
21648
21649
21650
21651
21652
21653
21654
21655
21656
21657
21658
21659
21660
21661
21662
21663
21664
21665
21666
21667
21668
21669
21670
21671
21672
21673
21674
21675
21676
21677
21678
21679
21680
21681
21682
21683
21684
21685
21686
21687
21688
21689
21690
21691
21692
21693
21694
21695
21696
21697
21698
21699
21700
21701
21702
21703
21704
21705
21706
21707
21708
21709
21710
21711
21712
21713
21714
21715
21716
21717
21718
21719
21720
21721
21722
21723
21724
21725
21726
21727
21728
21729
21730
21731
21732
21733
21734
21735
21736
21737
21738
21739
21740
21741
21742
21743
21744
21745
21746
21747
21748
21749
21750
21751
21752
21753
21754
21755
21756
21757
21758
21759
21760
21761
21762
21763
21764
21765
21766
21767
21768
21769
21770
21771
21772
21773
21774
21775
21776
21777
21778
21779
21780
21781
21782
21783
21784
21785
21786
21787
21788
21789
21790
21791
21792
21793
21794
21795
21796
21797
21798
21799
21800
21801
21802
21803
21804
21805
21806
21807
21808
21809
21810
21811
21812
21813
21814
21815
21816
21817
21818
21819
21820
21821
21822
21823
21824
21825
21826
21827
21828
21829
21830
21831
21832
21833
21834
21835
21836
21837
21838
21839
21840
21841
21842
21843
21844
21845
21846
21847
21848
21849
21850
21851
21852
21853
21854
21855
21856
21857
21858
21859
21860
21861
21862
21863
21864
21865
21866
21867
21868
21869
21870
21871
21872
21873
21874
21875
21876
21877
21878
21879
21880
21881
21882
21883
21884
21885
21886
21887
21888
21889
21890
21891
21892
21893
21894
21895
21896
21897
21898
21899
21900
21901
21902
21903
21904
21905
21906
21907
21908
21909
21910
21911
21912
21913
21914
21915
21916
21917
21918
21919
21920
21921
21922
21923
21924
21925
21926
21927
21928
21929
21930
21931
21932
21933
21934
21935
21936
21937
21938
21939
21940
21941
21942
21943
21944
21945
21946
21947
21948
21949
21950
21951
21952
21953
21954
21955
21956
21957
21958
21959
21960
21961
21962
21963
21964
21965
21966
21967
21968
21969
21970
21971
21972
21973
21974
21975
21976
21977
21978
21979
21980
21981
21982
21983
21984
21985
21986
21987
21988
21989
21990
21991
21992
21993
21994
21995
21996
21997
21998
21999
22000
22001
22002
22003
22004
22005
22006
22007
22008
22009
22010
22011
22012
22013
22014
22015
22016
22017
22018
22019
22020
22021
22022
22023
22024
22025
22026
22027
22028
22029
22030
22031
22032
22033
22034
22035
22036
22037
22038
22039
22040
22041
22042
22043
22044
22045
22046
22047
22048
22049
22050
22051
22052
22053
22054
22055
22056
22057
22058
22059
22060
22061
22062
22063
22064
22065
22066
22067
22068
22069
22070
22071
22072
22073
22074
22075
22076
22077
22078
22079
22080
22081
22082
22083
22084
22085
22086
22087
22088
22089
22090
22091
22092
22093
22094
22095
22096
22097
22098
22099
22100
22101
22102
22103
22104
22105
22106
22107
22108
22109
22110
22111
22112
22113
22114
22115
22116
22117
22118
22119
22120
22121
22122
22123
22124
22125
22126
22127
22128
22129
22130
22131
22132
22133
22134
22135
22136
22137
22138
22139
22140
22141
22142
22143
22144
22145
22146
22147
22148
22149
22150
22151
22152
22153
22154
22155
22156
22157
22158
22159
22160
22161
22162
22163
22164
22165
22166
22167
22168
22169
22170
22171
22172
22173
22174
22175
22176
22177
22178
22179
22180
22181
22182
22183
22184
22185
22186
22187
22188
22189
22190
22191
22192
22193
22194
22195
22196
22197
22198
22199
22200
22201
22202
22203
22204
22205
22206
22207
22208
22209
22210
22211
22212
22213
22214
22215
22216
22217
22218
22219
22220
22221
22222
22223
22224
22225
22226
22227
22228
22229
22230
22231
22232
22233
22234
22235
22236
22237
22238
22239
22240
22241
22242
22243
22244
22245
22246
22247
22248
22249
22250
22251
22252
22253
22254
22255
22256
22257
22258
22259
22260
22261
22262
22263
22264
22265
22266
22267
22268
22269
22270
22271
22272
22273
22274
22275
22276
22277
22278
22279
22280
22281
22282
22283
22284
22285
22286
22287
22288
22289
22290
22291
22292
22293
22294
22295
22296
22297
22298
22299
22300
22301
22302
22303
22304
22305
22306
22307
22308
22309
22310
22311
22312
22313
22314
22315
22316
22317
22318
22319
22320
22321
22322
22323
22324
22325
22326
22327
22328
22329
22330
22331
22332
22333
22334
22335
22336
22337
22338
22339
22340
22341
22342
22343
22344
22345
22346
22347
22348
22349
22350
22351
22352
22353
22354
22355
22356
22357
22358
22359
22360
22361
22362
22363
22364
22365
22366
22367
22368
22369
22370
22371
22372
22373
22374
22375
22376
22377
22378
22379
22380
22381
22382
22383
22384
22385
22386
22387
22388
22389
22390
22391
22392
22393
22394
22395
22396
22397
22398
22399
22400
22401
22402
22403
22404
22405
22406
22407
22408
22409
22410
22411
22412
22413
22414
22415
22416
22417
22418
22419
22420
22421
22422
22423
22424
22425
22426
22427
22428
22429
22430
22431
22432
22433
22434
22435
22436
22437
22438
22439
22440
22441
22442
22443
22444
22445
22446
22447
22448
22449
22450
22451
22452
22453
22454
22455
22456
22457
22458
22459
22460
22461
22462
22463
22464
22465
22466
22467
22468
22469
22470
22471
22472
22473
22474
22475
22476
22477
22478
22479
22480
22481
22482
22483
22484
22485
22486
22487
22488
22489
22490
22491
22492
22493
22494
22495
22496
22497
22498
22499
22500
22501
22502
22503
22504
22505
22506
22507
22508
22509
22510
22511
22512
22513
22514
22515
22516
22517
22518
22519
22520
22521
22522
22523
22524
22525
22526
22527
22528
22529
22530
22531
22532
22533
22534
22535
22536
22537
22538
22539
22540
22541
22542
22543
22544
22545
22546
22547
22548
22549
22550
22551
22552
22553
22554
22555
22556
22557
22558
22559
22560
22561
22562
22563
22564
22565
22566
22567
22568
22569
22570
22571
22572
22573
22574
22575
22576
22577
22578
22579
22580
22581
22582
22583
22584
22585
22586
22587
22588
22589
22590
22591
22592
22593
22594
22595
22596
22597
22598
22599
22600
22601
22602
22603
22604
22605
22606
22607
22608
22609
22610
22611
22612
22613
22614
22615
22616
22617
22618
22619
22620
22621
22622
22623
22624
22625
22626
22627
22628
22629
22630
22631
22632
22633
22634
22635
22636
22637
22638
22639
22640
22641
22642
22643
22644
22645
22646
22647
22648
22649
22650
22651
22652
22653
22654
22655
22656
22657
22658
22659
22660
22661
22662
22663
22664
22665
22666
22667
22668
22669
22670
22671
22672
22673
22674
22675
22676
22677
22678
22679
22680
22681
22682
22683
22684
22685
22686
22687
22688
22689
22690
22691
22692
22693
22694
22695
22696
22697
22698
22699
22700
22701
22702
22703
22704
22705
22706
22707
22708
22709
22710
22711
22712
22713
22714
22715
22716
22717
22718
22719
22720
22721
22722
22723
22724
22725
22726
22727
22728
22729
22730
22731
22732
22733
22734
22735
22736
22737
22738
22739
22740
22741
22742
22743
22744
22745
22746
22747
22748
22749
22750
22751
22752
22753
22754
22755
22756
22757
22758
22759
22760
22761
22762
22763
22764
22765
22766
22767
22768
22769
22770
22771
22772
22773
22774
22775
22776
22777
22778
22779
22780
22781
22782
22783
22784
22785
22786
22787
22788
22789
22790
22791
22792
22793
22794
22795
22796
22797
22798
22799
22800
22801
22802
22803
22804
22805
22806
22807
22808
22809
22810
22811
22812
22813
22814
22815
22816
22817
22818
22819
22820
22821
22822
22823
22824
22825
22826
22827
22828
22829
22830
22831
22832
22833
22834
22835
22836
22837
22838
22839
22840
22841
22842
22843
22844
22845
22846
22847
22848
22849
22850
22851
22852
22853
22854
22855
22856
22857
22858
22859
22860
22861
22862
22863
22864
22865
22866
22867
22868
22869
22870
22871
22872
22873
22874
22875
22876
22877
22878
22879
22880
22881
22882
22883
22884
22885
22886
22887
22888
22889
22890
22891
22892
22893
22894
22895
22896
22897
22898
22899
22900
22901
22902
22903
22904
22905
22906
22907
22908
22909
22910
22911
22912
22913
22914
22915
22916
22917
22918
22919
22920
22921
22922
22923
22924
22925
22926
22927
22928
22929
22930
22931
22932
22933
22934
22935
22936
22937
22938
22939
22940
22941
22942
22943
22944
22945
22946
22947
22948
22949
22950
22951
22952
22953
22954
22955
22956
22957
22958
22959
22960
22961
22962
22963
22964
22965
22966
22967
22968
22969
22970
22971
22972
22973
22974
22975
22976
22977
22978
22979
22980
22981
22982
22983
22984
22985
22986
22987
22988
22989
22990
22991
22992
22993
22994
22995
22996
22997
22998
22999
23000
23001
23002
23003
23004
23005
23006
23007
23008
23009
23010
23011
23012
23013
23014
23015
23016
23017
23018
23019
23020
23021
23022
23023
23024
23025
23026
23027
23028
23029
23030
23031
23032
23033
23034
23035
23036
23037
23038
23039
23040
23041
23042
23043
23044
23045
23046
23047
23048
23049
23050
23051
23052
23053
23054
23055
23056
23057
23058
23059
23060
23061
23062
23063
23064
23065
23066
23067
23068
23069
23070
23071
23072
23073
23074
23075
23076
23077
23078
23079
23080
23081
23082
23083
23084
23085
23086
23087
23088
23089
23090
23091
23092
23093
23094
23095
23096
23097
23098
23099
23100
23101
23102
23103
23104
23105
23106
23107
23108
23109
23110
23111
23112
23113
23114
23115
23116
23117
23118
23119
23120
23121
23122
23123
23124
23125
23126
23127
23128
23129
23130
23131
23132
23133
23134
23135
23136
23137
23138
23139
23140
23141
23142
23143
23144
23145
23146
23147
23148
23149
23150
23151
23152
23153
23154
23155
23156
23157
23158
23159
23160
23161
23162
23163
23164
23165
23166
23167
23168
23169
23170
23171
23172
23173
23174
23175
23176
23177
23178
23179
23180
23181
23182
23183
23184
23185
23186
23187
23188
23189
23190
23191
23192
23193
23194
23195
23196
23197
23198
23199
23200
23201
23202
23203
23204
23205
23206
23207
23208
23209
23210
23211
23212
23213
23214
23215
23216
23217
23218
23219
23220
23221
23222
23223
23224
23225
23226
23227
23228
23229
23230
23231
23232
23233
23234
23235
23236
23237
23238
23239
23240
23241
23242
23243
23244
23245
23246
23247
23248
23249
23250
23251
23252
23253
23254
23255
23256
23257
23258
23259
23260
23261
23262
23263
23264
23265
23266
23267
23268
23269
23270
23271
23272
23273
23274
23275
23276
23277
23278
23279
23280
23281
23282
23283
23284
23285
23286
23287
23288
23289
23290
23291
23292
23293
23294
23295
23296
23297
23298
23299
23300
23301
23302
23303
23304
23305
23306
23307
23308
23309
23310
23311
23312
23313
23314
23315
23316
23317
23318
23319
23320
23321
23322
23323
23324
23325
23326
23327
23328
23329
23330
23331
23332
23333
23334
23335
23336
23337
23338
23339
23340
23341
23342
23343
23344
23345
23346
23347
23348
23349
23350
23351
23352
23353
23354
23355
23356
23357
23358
23359
23360
23361
23362
23363
23364
23365
23366
23367
23368
23369
23370
23371
23372
23373
23374
23375
23376
23377
23378
23379
23380
23381
23382
23383
23384
23385
23386
23387
23388
23389
23390
23391
23392
23393
23394
23395
23396
23397
23398
23399
23400
23401
23402
23403
23404
23405
23406
23407
23408
23409
23410
23411
23412
23413
23414
23415
23416
23417
23418
23419
23420
23421
23422
23423
23424
23425
23426
23427
23428
23429
23430
23431
23432
23433
23434
23435
23436
23437
23438
23439
23440
23441
23442
23443
23444
23445
23446
23447
23448
23449
23450
23451
23452
23453
23454
23455
23456
23457
23458
23459
23460
23461
23462
23463
23464
23465
23466
23467
23468
23469
23470
23471
23472
23473
23474
23475
23476
23477
23478
23479
23480
23481
23482
23483
23484
23485
23486
23487
23488
23489
23490
23491
23492
23493
23494
23495
23496
23497
23498
23499
23500
23501
23502
23503
23504
23505
23506
23507
23508
23509
23510
23511
23512
23513
23514
23515
23516
23517
23518
23519
23520
23521
23522
23523
23524
23525
23526
23527
23528
23529
23530
23531
23532
23533
23534
23535
23536
23537
23538
23539
23540
23541
23542
23543
23544
23545
23546
23547
23548
23549
23550
23551
23552
23553
23554
23555
23556
23557
23558
23559
23560
23561
23562
23563
23564
23565
23566
23567
23568
23569
23570
23571
23572
23573
23574
23575
23576
23577
23578
23579
23580
23581
23582
23583
23584
23585
23586
23587
23588
23589
23590
23591
23592
23593
23594
23595
23596
23597
23598
23599
23600
23601
23602
23603
23604
23605
23606
23607
23608
23609
23610
23611
23612
23613
23614
23615
23616
23617
23618
23619
23620
23621
23622
23623
23624
23625
23626
23627
23628
23629
23630
23631
23632
23633
23634
23635
23636
23637
23638
23639
23640
23641
23642
23643
23644
23645
23646
23647
23648
23649
23650
23651
23652
23653
23654
23655
23656
23657
23658
23659
23660
23661
23662
23663
23664
23665
23666
23667
23668
23669
23670
23671
23672
23673
23674
23675
23676
23677
23678
23679
23680
23681
23682
23683
23684
23685
23686
23687
23688
23689
23690
23691
23692
23693
23694
23695
23696
23697
23698
23699
23700
23701
23702
23703
23704
23705
23706
23707
23708
23709
23710
23711
23712
23713
23714
23715
23716
23717
23718
23719
23720
23721
23722
23723
23724
23725
23726
23727
23728
23729
23730
23731
23732
23733
23734
23735
23736
23737
23738
23739
23740
23741
23742
23743
23744
23745
23746
23747
23748
23749
23750
23751
23752
23753
23754
23755
23756
23757
23758
23759
23760
23761
23762
23763
23764
23765
23766
23767
23768
23769
23770
23771
23772
23773
23774
23775
23776
23777
23778
23779
23780
23781
23782
23783
23784
23785
23786
23787
23788
23789
23790
23791
23792
23793
23794
23795
23796
23797
23798
23799
23800
23801
23802
23803
23804
23805
23806
23807
23808
23809
23810
23811
23812
23813
23814
23815
23816
23817
23818
23819
23820
23821
23822
23823
23824
23825
23826
23827
23828
23829
23830
23831
23832
23833
23834
23835
23836
23837
23838
23839
23840
23841
23842
23843
23844
23845
23846
23847
23848
23849
23850
23851
23852
23853
23854
23855
23856
23857
23858
23859
23860
23861
23862
23863
23864
23865
23866
23867
23868
23869
23870
23871
23872
23873
23874
23875
23876
23877
23878
23879
23880
23881
23882
23883
23884
23885
23886
23887
23888
23889
23890
23891
23892
23893
23894
23895
23896
23897
23898
23899
23900
23901
23902
23903
23904
23905
23906
23907
23908
23909
23910
23911
23912
23913
23914
23915
23916
23917
23918
23919
23920
23921
23922
23923
23924
23925
23926
23927
23928
23929
23930
23931
23932
23933
23934
23935
23936
23937
23938
23939
23940
23941
23942
23943
23944
23945
23946
23947
23948
23949
23950
23951
23952
23953
23954
23955
23956
23957
23958
23959
23960
23961
23962
23963
23964
23965
23966
23967
23968
23969
23970
23971
23972
23973
23974
23975
23976
23977
23978
23979
23980
23981
23982
23983
23984
23985
23986
23987
23988
23989
23990
23991
23992
23993
23994
23995
23996
23997
23998
23999
24000
24001
24002
24003
24004
24005
24006
24007
24008
24009
24010
24011
24012
24013
24014
24015
24016
24017
24018
24019
24020
24021
24022
24023
24024
24025
24026
24027
24028
24029
24030
24031
24032
24033
24034
24035
24036
24037
24038
24039
24040
24041
24042
24043
24044
24045
24046
24047
24048
24049
24050
24051
24052
24053
24054
24055
24056
24057
24058
24059
24060
24061
24062
24063
24064
24065
24066
24067
24068
24069
24070
24071
24072
24073
24074
24075
24076
24077
24078
24079
24080
24081
24082
24083
24084
24085
24086
24087
24088
24089
24090
24091
24092
24093
24094
24095
24096
24097
24098
24099
24100
24101
24102
24103
24104
24105
24106
24107
24108
24109
24110
24111
24112
24113
24114
24115
24116
24117
24118
24119
24120
24121
24122
24123
24124
24125
24126
24127
24128
24129
24130
24131
24132
24133
24134
24135
24136
24137
24138
24139
24140
24141
24142
24143
24144
24145
24146
24147
24148
24149
24150
24151
24152
24153
24154
24155
24156
24157
24158
24159
24160
24161
24162
24163
24164
24165
24166
24167
24168
24169
24170
24171
24172
24173
24174
24175
24176
24177
24178
24179
24180
24181
24182
24183
24184
24185
24186
24187
24188
24189
24190
24191
24192
24193
24194
24195
24196
24197
24198
24199
24200
24201
24202
24203
24204
24205
24206
24207
24208
24209
24210
24211
24212
24213
24214
24215
24216
24217
24218
24219
24220
24221
24222
24223
24224
24225
24226
24227
24228
24229
24230
24231
24232
24233
24234
24235
24236
24237
24238
24239
24240
24241
24242
24243
24244
24245
24246
24247
24248
24249
24250
24251
24252
24253
24254
24255
24256
24257
24258
24259
24260
24261
24262
24263
24264
24265
24266
24267
24268
24269
24270
24271
24272
24273
24274
24275
24276
24277
24278
24279
24280
24281
24282
24283
24284
24285
24286
24287
24288
24289
24290
24291
24292
24293
24294
24295
24296
24297
24298
24299
24300
24301
24302
24303
24304
24305
24306
24307
24308
24309
24310
24311
24312
24313
24314
24315
24316
24317
24318
24319
24320
24321
24322
24323
24324
24325
24326
24327
24328
24329
24330
24331
24332
24333
24334
24335
24336
24337
24338
24339
24340
24341
24342
24343
24344
24345
24346
24347
24348
24349
24350
24351
24352
24353
24354
24355
24356
24357
24358
24359
24360
24361
24362
24363
24364
24365
24366
24367
24368
24369
24370
24371
24372
24373
24374
24375
24376
24377
24378
24379
24380
24381
24382
24383
24384
24385
24386
24387
24388
24389
24390
24391
24392
24393
24394
24395
24396
24397
24398
24399
24400
24401
24402
24403
24404
24405
24406
24407
24408
24409
24410
24411
24412
24413
24414
24415
24416
24417
24418
24419
24420
24421
24422
24423
24424
24425
24426
24427
24428
24429
24430
24431
24432
24433
24434
24435
24436
24437
24438
24439
24440
24441
24442
24443
24444
24445
24446
24447
24448
24449
24450
24451
24452
24453
24454
24455
24456
24457
24458
24459
24460
24461
24462
24463
24464
24465
24466
24467
24468
24469
24470
24471
24472
24473
24474
24475
24476
24477
24478
24479
24480
24481
24482
24483
24484
24485
24486
24487
24488
24489
24490
24491
24492
24493
24494
24495
24496
24497
24498
24499
24500
24501
24502
24503
24504
24505
24506
24507
24508
24509
24510
24511
24512
24513
24514
24515
24516
24517
24518
24519
24520
24521
24522
24523
24524
24525
24526
24527
24528
24529
24530
24531
24532
24533
24534
24535
24536
24537
24538
24539
24540
24541
24542
24543
24544
24545
24546
24547
24548
24549
24550
24551
24552
24553
24554
24555
24556
24557
24558
24559
24560
24561
24562
24563
24564
24565
24566
24567
24568
24569
24570
24571
24572
24573
24574
24575
24576
24577
24578
24579
24580
24581
24582
24583
24584
24585
24586
24587
24588
24589
24590
24591
24592
24593
24594
24595
24596
24597
24598
24599
24600
24601
24602
24603
24604
24605
24606
24607
24608
24609
24610
24611
24612
24613
24614
24615
24616
24617
24618
24619
24620
24621
24622
24623
24624
24625
24626
24627
24628
24629
24630
24631
24632
24633
24634
24635
24636
24637
24638
24639
24640
24641
24642
24643
24644
24645
24646
24647
24648
24649
24650
24651
24652
24653
24654
24655
24656
24657
24658
24659
24660
24661
24662
24663
24664
24665
24666
24667
24668
24669
24670
24671
24672
24673
24674
24675
24676
24677
24678
24679
24680
24681
24682
24683
24684
24685
24686
24687
24688
24689
24690
24691
24692
24693
24694
24695
24696
24697
24698
24699
24700
24701
24702
24703
24704
24705
24706
24707
24708
24709
24710
24711
24712
24713
24714
24715
24716
24717
24718
24719
24720
24721
24722
24723
24724
24725
24726
24727
24728
24729
24730
24731
24732
24733
24734
24735
24736
24737
24738
24739
24740
24741
24742
24743
24744
24745
24746
24747
24748
24749
24750
24751
24752
24753
24754
24755
24756
24757
24758
24759
24760
24761
24762
24763
24764
24765
24766
24767
24768
24769
24770
24771
24772
24773
24774
24775
24776
24777
24778
24779
24780
24781
24782
24783
24784
24785
24786
24787
24788
24789
24790
24791
24792
24793
24794
24795
24796
24797
24798
24799
24800
24801
24802
24803
24804
24805
24806
24807
24808
24809
24810
24811
24812
24813
24814
24815
24816
24817
24818
24819
24820
24821
24822
24823
24824
24825
24826
24827
24828
24829
24830
24831
24832
24833
24834
24835
24836
24837
24838
24839
24840
24841
24842
24843
24844
24845
24846
24847
24848
24849
24850
24851
24852
24853
24854
24855
24856
24857
24858
24859
24860
24861
24862
24863
24864
24865
24866
24867
24868
24869
24870
24871
24872
24873
24874
24875
24876
24877
24878
24879
24880
24881
24882
24883
24884
24885
24886
24887
24888
24889
24890
24891
24892
24893
24894
24895
24896
24897
24898
24899
24900
24901
24902
24903
24904
24905
24906
24907
24908
24909
24910
24911
24912
24913
24914
24915
24916
24917
24918
24919
24920
24921
24922
24923
24924
24925
24926
24927
24928
24929
24930
24931
24932
24933
24934
24935
24936
24937
24938
24939
24940
24941
24942
24943
24944
24945
24946
24947
24948
24949
24950
24951
24952
24953
24954
24955
24956
24957
24958
24959
24960
24961
24962
24963
24964
24965
24966
24967
24968
24969
24970
24971
24972
24973
24974
24975
24976
24977
24978
24979
24980
24981
24982
24983
24984
24985
24986
24987
24988
24989
24990
24991
24992
24993
24994
24995
24996
24997
24998
24999
25000
25001
25002
25003
25004
25005
25006
25007
25008
25009
25010
25011
25012
25013
25014
25015
25016
25017
25018
25019
25020
25021
25022
25023
25024
25025
25026
25027
25028
25029
25030
25031
25032
25033
25034
25035
25036
25037
25038
25039
25040
25041
25042
25043
25044
25045
25046
25047
25048
25049
25050
25051
25052
25053
25054
25055
25056
25057
25058
25059
25060
25061
25062
25063
25064
25065
25066
25067
25068
25069
25070
25071
25072
25073
25074
25075
25076
25077
25078
25079
25080
25081
25082
25083
25084
25085
25086
25087
25088
25089
25090
25091
25092
25093
25094
25095
25096
25097
25098
25099
25100
25101
25102
25103
25104
25105
25106
25107
25108
25109
25110
25111
25112
25113
25114
25115
25116
25117
25118
25119
25120
25121
25122
25123
25124
25125
25126
25127
25128
25129
25130
25131
25132
25133
25134
25135
25136
25137
25138
25139
25140
25141
25142
25143
25144
25145
25146
25147
25148
25149
25150
25151
25152
25153
25154
25155
25156
25157
25158
25159
25160
25161
25162
25163
25164
25165
25166
25167
25168
25169
25170
25171
25172
25173
25174
25175
25176
25177
25178
25179
25180
25181
25182
25183
25184
25185
25186
25187
25188
25189
25190
25191
25192
25193
25194
25195
25196
25197
25198
25199
25200
25201
25202
25203
25204
25205
25206
25207
25208
25209
25210
25211
25212
25213
25214
25215
25216
25217
25218
25219
25220
25221
25222
25223
25224
25225
25226
25227
25228
25229
25230
25231
25232
25233
25234
25235
25236
25237
25238
25239
25240
25241
25242
25243
25244
25245
25246
25247
25248
25249
25250
25251
25252
25253
25254
25255
25256
25257
25258
25259
25260
25261
25262
25263
25264
25265
25266
25267
25268
25269
25270
25271
25272
25273
25274
25275
25276
25277
25278
25279
25280
25281
25282
25283
25284
25285
25286
25287
25288
25289
25290
25291
25292
25293
25294
25295
25296
25297
25298
25299
25300
25301
25302
25303
25304
25305
25306
25307
25308
25309
25310
25311
25312
25313
25314
25315
25316
25317
25318
25319
25320
25321
25322
25323
25324
25325
25326
25327
25328
25329
25330
25331
25332
25333
25334
25335
25336
25337
25338
25339
25340
25341
25342
25343
25344
25345
25346
25347
25348
25349
25350
25351
25352
25353
25354
25355
25356
25357
25358
25359
25360
25361
25362
25363
25364
25365
25366
25367
25368
25369
25370
25371
25372
25373
25374
25375
25376
25377
25378
25379
25380
25381
25382
25383
25384
25385
25386
25387
25388
25389
25390
25391
25392
25393
25394
25395
25396
25397
25398
25399
25400
25401
25402
25403
25404
25405
25406
25407
25408
25409
25410
25411
25412
25413
25414
25415
25416
25417
25418
25419
25420
25421
25422
25423
25424
25425
25426
25427
25428
25429
25430
25431
25432
25433
25434
25435
25436
25437
25438
25439
25440
25441
25442
25443
25444
25445
25446
25447
25448
25449
25450
25451
25452
25453
25454
25455
25456
25457
25458
25459
25460
25461
25462
25463
25464
25465
25466
25467
25468
25469
25470
25471
25472
25473
25474
25475
25476
25477
25478
25479
25480
25481
25482
25483
25484
25485
25486
25487
25488
25489
25490
25491
25492
25493
25494
25495
25496
25497
25498
25499
25500
25501
25502
25503
25504
25505
25506
25507
25508
25509
25510
25511
25512
25513
25514
25515
25516
25517
25518
25519
25520
25521
25522
25523
25524
25525
25526
25527
25528
25529
25530
25531
25532
25533
25534
25535
25536
25537
25538
25539
25540
25541
25542
25543
25544
25545
25546
25547
25548
25549
25550
25551
25552
25553
25554
25555
25556
25557
25558
25559
25560
25561
25562
25563
25564
25565
25566
25567
25568
25569
25570
25571
25572
25573
25574
25575
25576
25577
25578
25579
25580
25581
25582
25583
25584
25585
25586
25587
25588
25589
25590
25591
25592
25593
25594
25595
25596
25597
25598
25599
25600
25601
25602
25603
25604
25605
25606
25607
25608
25609
25610
25611
25612
25613
25614
25615
25616
25617
25618
25619
25620
25621
25622
25623
25624
25625
25626
25627
25628
25629
25630
25631
25632
25633
25634
25635
25636
25637
25638
25639
25640
25641
25642
25643
25644
25645
25646
25647
25648
25649
25650
25651
25652
25653
25654
25655
25656
25657
25658
25659
25660
25661
25662
25663
25664
25665
25666
25667
25668
25669
25670
25671
25672
25673
25674
25675
25676
25677
25678
25679
25680
25681
25682
25683
25684
25685
25686
25687
25688
25689
25690
25691
25692
25693
25694
25695
25696
25697
25698
25699
25700
25701
25702
25703
25704
25705
25706
25707
25708
25709
25710
25711
25712
25713
25714
25715
25716
25717
25718
25719
25720
25721
25722
25723
25724
25725
25726
25727
25728
25729
25730
25731
25732
25733
25734
25735
25736
25737
25738
25739
25740
25741
25742
25743
25744
25745
25746
25747
25748
25749
25750
25751
25752
25753
25754
25755
25756
25757
25758
25759
25760
25761
25762
25763
25764
25765
25766
25767
25768
25769
25770
25771
25772
25773
25774
25775
25776
25777
25778
25779
25780
25781
25782
25783
25784
25785
25786
25787
25788
25789
25790
25791
25792
25793
25794
25795
25796
25797
25798
25799
25800
25801
25802
25803
25804
25805
25806
25807
25808
25809
25810
25811
25812
25813
25814
25815
25816
25817
25818
25819
25820
25821
25822
25823
25824
25825
25826
25827
25828
25829
25830
25831
25832
25833
25834
25835
25836
25837
25838
25839
25840
25841
25842
25843
25844
25845
25846
25847
25848
25849
25850
25851
25852
25853
25854
25855
25856
25857
25858
25859
25860
25861
25862
25863
25864
25865
25866
25867
25868
25869
25870
25871
25872
25873
25874
25875
25876
25877
25878
25879
25880
25881
25882
25883
25884
25885
25886
25887
25888
25889
25890
25891
25892
25893
25894
25895
25896
25897
25898
25899
25900
25901
25902
25903
25904
25905
25906
25907
25908
25909
25910
25911
25912
25913
25914
25915
25916
25917
25918
25919
25920
25921
25922
25923
25924
25925
25926
25927
25928
25929
25930
25931
25932
25933
25934
25935
25936
25937
25938
25939
25940
25941
25942
25943
25944
25945
25946
25947
25948
25949
25950
25951
25952
25953
25954
25955
25956
25957
25958
25959
25960
25961
25962
25963
25964
25965
25966
25967
25968
25969
25970
25971
25972
25973
25974
25975
25976
25977
25978
25979
25980
25981
25982
25983
25984
25985
25986
25987
25988
25989
25990
25991
25992
25993
25994
25995
25996
25997
25998
25999
26000
26001
26002
26003
26004
26005
26006
26007
26008
26009
26010
26011
26012
26013
26014
26015
26016
26017
26018
26019
26020
26021
26022
26023
26024
26025
26026
26027
26028
26029
26030
26031
26032
26033
26034
26035
26036
26037
26038
26039
26040
26041
26042
26043
26044
26045
26046
26047
26048
26049
26050
26051
26052
26053
26054
26055
26056
26057
26058
26059
26060
26061
26062
26063
26064
26065
26066
26067
26068
26069
26070
26071
26072
26073
26074
26075
26076
26077
26078
26079
26080
26081
26082
26083
26084
26085
26086
26087
26088
26089
26090
26091
26092
26093
26094
26095
26096
26097
26098
26099
26100
26101
26102
26103
26104
26105
26106
26107
26108
26109
26110
26111
26112
26113
26114
26115
26116
26117
26118
26119
26120
26121
26122
26123
26124
26125
26126
26127
26128
26129
26130
26131
26132
26133
26134
26135
26136
26137
26138
26139
26140
26141
26142
26143
26144
26145
26146
26147
26148
26149
26150
26151
26152
26153
26154
26155
26156
26157
26158
26159
26160
26161
26162
26163
26164
26165
26166
26167
26168
26169
26170
26171
26172
26173
26174
26175
26176
26177
26178
26179
26180
26181
26182
26183
26184
26185
26186
26187
26188
26189
26190
26191
26192
26193
26194
26195
26196
26197
26198
26199
26200
26201
26202
26203
26204
26205
26206
26207
26208
26209
26210
26211
26212
26213
26214
26215
26216
26217
26218
26219
26220
26221
26222
26223
26224
26225
26226
26227
26228
26229
26230
26231
26232
26233
26234
26235
26236
26237
26238
26239
26240
26241
26242
26243
26244
26245
26246
26247
26248
26249
26250
26251
26252
26253
26254
26255
26256
26257
26258
26259
26260
26261
26262
26263
26264
26265
26266
26267
26268
26269
26270
26271
26272
26273
26274
26275
26276
26277
26278
26279
26280
26281
26282
26283
26284
26285
26286
26287
26288
26289
26290
26291
26292
26293
26294
26295
26296
26297
26298
26299
26300
26301
26302
26303
26304
26305
26306
26307
26308
26309
26310
26311
26312
26313
26314
26315
26316
26317
26318
26319
26320
26321
26322
26323
26324
26325
26326
26327
26328
26329
26330
26331
26332
26333
26334
26335
26336
26337
26338
26339
26340
26341
26342
26343
26344
26345
26346
26347
26348
26349
26350
26351
26352
26353
26354
26355
26356
26357
26358
26359
26360
26361
26362
26363
26364
26365
26366
26367
26368
26369
26370
26371
26372
26373
26374
26375
26376
26377
26378
26379
26380
26381
26382
26383
26384
26385
26386
26387
26388
26389
26390
26391
26392
26393
26394
26395
26396
26397
26398
26399
26400
26401
26402
26403
26404
26405
26406
26407
26408
26409
26410
26411
26412
26413
26414
26415
26416
26417
26418
26419
26420
26421
26422
26423
26424
26425
26426
26427
26428
26429
26430
26431
26432
26433
26434
26435
26436
26437
26438
26439
26440
26441
26442
26443
26444
26445
26446
26447
26448
26449
26450
26451
26452
26453
26454
26455
26456
26457
26458
26459
26460
26461
26462
26463
26464
26465
26466
26467
26468
26469
26470
26471
26472
26473
26474
26475
26476
26477
26478
26479
26480
26481
26482
26483
26484
26485
26486
26487
26488
26489
26490
26491
26492
26493
26494
26495
26496
26497
26498
26499
26500
26501
26502
26503
26504
26505
26506
26507
26508
26509
26510
26511
26512
26513
26514
26515
26516
26517
26518
26519
26520
26521
26522
26523
26524
26525
26526
26527
26528
26529
26530
26531
26532
26533
26534
26535
26536
26537
26538
26539
26540
26541
26542
26543
26544
26545
26546
26547
26548
26549
26550
26551
26552
26553
26554
26555
26556
26557
26558
26559
26560
26561
26562
26563
26564
26565
26566
26567
26568
26569
26570
26571
26572
26573
26574
26575
26576
26577
26578
26579
26580
26581
26582
26583
26584
26585
26586
26587
26588
26589
26590
26591
26592
26593
26594
26595
26596
26597
26598
26599
26600
26601
26602
26603
26604
26605
26606
26607
26608
26609
26610
26611
26612
26613
26614
26615
26616
26617
26618
26619
26620
26621
26622
26623
26624
26625
26626
26627
26628
26629
26630
26631
26632
26633
26634
26635
26636
26637
26638
26639
26640
26641
26642
26643
26644
26645
26646
26647
26648
26649
26650
26651
26652
26653
26654
26655
26656
26657
26658
26659
26660
26661
26662
26663
26664
26665
26666
26667
26668
26669
26670
26671
26672
26673
26674
26675
26676
26677
26678
26679
26680
26681
26682
26683
26684
26685
26686
26687
26688
26689
26690
26691
26692
26693
26694
26695
26696
26697
26698
26699
26700
26701
26702
26703
26704
26705
26706
26707
26708
26709
26710
26711
26712
26713
26714
26715
26716
26717
26718
26719
26720
26721
26722
26723
26724
26725
26726
26727
26728
26729
26730
26731
26732
26733
26734
26735
26736
26737
26738
26739
26740
26741
26742
26743
26744
26745
26746
26747
26748
26749
26750
26751
26752
26753
26754
26755
26756
26757
26758
26759
26760
26761
26762
26763
26764
26765
26766
26767
26768
26769
26770
26771
26772
26773
26774
26775
26776
26777
26778
26779
26780
26781
26782
26783
26784
26785
26786
26787
26788
26789
26790
26791
26792
26793
26794
26795
26796
26797
26798
26799
26800
26801
26802
26803
26804
26805
26806
26807
26808
26809
26810
26811
26812
26813
26814
26815
26816
26817
26818
26819
26820
26821
26822
26823
26824
26825
26826
26827
26828
26829
26830
26831
26832
26833
26834
26835
26836
26837
26838
26839
26840
26841
26842
26843
26844
26845
26846
26847
26848
26849
26850
26851
26852
26853
26854
26855
26856
26857
26858
26859
26860
26861
26862
26863
26864
26865
26866
26867
26868
26869
26870
26871
26872
26873
26874
26875
26876
26877
26878
26879
26880
26881
26882
26883
26884
26885
26886
26887
26888
26889
26890
26891
26892
26893
26894
26895
26896
26897
26898
26899
26900
26901
26902
26903
26904
26905
26906
26907
26908
26909
26910
26911
26912
26913
26914
26915
26916
26917
26918
26919
26920
26921
26922
26923
26924
26925
26926
26927
26928
26929
26930
26931
26932
26933
26934
26935
26936
26937
26938
26939
26940
26941
26942
26943
26944
26945
26946
26947
26948
26949
26950
26951
26952
26953
26954
26955
26956
26957
26958
26959
26960
26961
26962
26963
26964
26965
26966
26967
26968
26969
26970
26971
26972
26973
26974
26975
26976
26977
26978
26979
26980
26981
26982
26983
26984
26985
26986
26987
26988
26989
26990
26991
26992
26993
26994
26995
26996
26997
26998
26999
27000
27001
27002
27003
27004
27005
27006
27007
27008
27009
27010
27011
27012
27013
27014
27015
27016
27017
27018
27019
27020
27021
27022
27023
27024
27025
27026
27027
27028
27029
27030
27031
27032
27033
27034
27035
27036
27037
27038
27039
27040
27041
27042
27043
27044
27045
27046
27047
27048
27049
27050
27051
27052
27053
27054
27055
27056
27057
27058
27059
27060
27061
27062
27063
27064
27065
27066
27067
27068
27069
27070
27071
27072
27073
27074
27075
27076
27077
27078
27079
27080
27081
27082
27083
27084
27085
27086
27087
27088
27089
27090
27091
27092
27093
27094
27095
27096
27097
27098
27099
27100
27101
27102
27103
27104
27105
27106
27107
27108
27109
27110
27111
27112
27113
27114
27115
27116
27117
27118
27119
27120
27121
27122
27123
27124
27125
27126
27127
27128
27129
27130
27131
27132
27133
27134
27135
27136
27137
27138
27139
27140
27141
27142
27143
27144
27145
27146
27147
27148
27149
27150
27151
27152
27153
27154
27155
27156
27157
27158
27159
27160
27161
27162
27163
27164
27165
27166
27167
27168
27169
27170
27171
27172
27173
27174
27175
27176
27177
27178
27179
27180
27181
27182
27183
27184
27185
27186
27187
27188
27189
27190
27191
27192
27193
27194
27195
27196
27197
27198
27199
27200
27201
27202
27203
27204
27205
27206
27207
27208
27209
27210
27211
27212
27213
27214
27215
27216
27217
27218
27219
27220
27221
27222
27223
27224
27225
27226
27227
27228
27229
27230
27231
27232
27233
27234
27235
27236
27237
27238
27239
27240
27241
27242
27243
27244
27245
27246
27247
27248
27249
27250
27251
27252
27253
27254
27255
27256
27257
27258
27259
27260
27261
27262
27263
27264
27265
27266
27267
27268
27269
27270
27271
27272
27273
27274
27275
27276
27277
27278
27279
27280
27281
27282
27283
27284
27285
27286
27287
27288
27289
27290
27291
27292
27293
27294
27295
27296
27297
27298
27299
27300
27301
27302
27303
27304
27305
27306
27307
27308
27309
27310
27311
27312
27313
27314
27315
27316
27317
27318
27319
27320
27321
27322
27323
27324
27325
27326
27327
27328
27329
27330
27331
27332
27333
27334
27335
27336
27337
27338
27339
27340
27341
27342
27343
27344
27345
27346
27347
27348
27349
27350
27351
27352
27353
27354
27355
27356
27357
27358
27359
27360
27361
27362
27363
27364
27365
27366
27367
27368
27369
27370
27371
27372
27373
27374
27375
27376
27377
27378
27379
27380
27381
27382
27383
27384
27385
27386
27387
27388
27389
27390
27391
27392
27393
27394
27395
27396
27397
27398
27399
27400
27401
27402
27403
27404
27405
27406
27407
27408
27409
27410
27411
27412
27413
27414
27415
27416
27417
27418
27419
27420
27421
27422
27423
27424
27425
27426
27427
27428
27429
27430
27431
27432
27433
27434
27435
27436
27437
27438
27439
27440
27441
27442
27443
27444
27445
27446
27447
27448
27449
27450
27451
27452
27453
27454
27455
27456
27457
27458
27459
27460
27461
27462
27463
27464
27465
27466
27467
27468
27469
27470
27471
27472
27473
27474
27475
27476
27477
27478
27479
27480
27481
27482
27483
27484
27485
27486
27487
27488
27489
27490
27491
27492
27493
27494
27495
27496
27497
27498
27499
27500
27501
27502
27503
27504
27505
27506
27507
27508
27509
27510
27511
27512
27513
27514
27515
27516
27517
27518
27519
27520
27521
27522
27523
27524
27525
27526
27527
27528
27529
27530
27531
27532
27533
27534
27535
27536
27537
27538
27539
27540
27541
27542
27543
27544
27545
27546
27547
27548
27549
27550
27551
27552
27553
27554
27555
27556
27557
27558
27559
27560
27561
27562
27563
27564
27565
27566
27567
27568
27569
27570
27571
27572
27573
27574
27575
27576
27577
27578
27579
27580
27581
27582
27583
27584
27585
27586
27587
27588
27589
27590
27591
27592
27593
27594
27595
27596
27597
27598
27599
27600
27601
27602
27603
27604
27605
27606
27607
27608
27609
27610
27611
27612
27613
27614
27615
27616
27617
27618
27619
27620
27621
27622
27623
27624
27625
27626
27627
27628
27629
27630
27631
27632
27633
27634
27635
27636
27637
27638
27639
27640
27641
27642
27643
27644
27645
27646
27647
27648
27649
27650
27651
27652
27653
27654
27655
27656
27657
27658
27659
27660
27661
27662
27663
27664
27665
27666
27667
27668
27669
27670
27671
27672
27673
27674
27675
27676
27677
27678
27679
27680
27681
27682
27683
27684
27685
27686
27687
27688
27689
27690
27691
27692
27693
27694
27695
27696
27697
27698
27699
27700
27701
27702
27703
27704
27705
27706
27707
27708
27709
27710
27711
27712
27713
27714
27715
27716
27717
27718
27719
27720
27721
27722
27723
27724
27725
27726
27727
27728
27729
27730
27731
27732
27733
27734
27735
27736
27737
27738
27739
27740
27741
27742
27743
27744
27745
27746
27747
27748
27749
27750
27751
27752
27753
27754
27755
27756
27757
27758
27759
27760
27761
27762
27763
27764
27765
27766
27767
27768
27769
27770
27771
27772
27773
27774
27775
27776
27777
27778
27779
27780
27781
27782
27783
27784
27785
27786
27787
27788
27789
27790
27791
27792
27793
27794
27795
27796
27797
27798
27799
27800
27801
27802
27803
27804
27805
27806
27807
27808
27809
27810
27811
27812
27813
27814
27815
27816
27817
27818
27819
27820
27821
27822
27823
27824
27825
27826
27827
27828
27829
27830
27831
27832
27833
27834
27835
27836
27837
27838
27839
27840
27841
27842
27843
27844
27845
27846
27847
27848
27849
27850
27851
27852
27853
27854
27855
27856
27857
27858
27859
27860
27861
27862
27863
27864
27865
27866
27867
27868
27869
27870
27871
27872
27873
27874
27875
27876
27877
27878
27879
27880
27881
27882
27883
27884
27885
27886
27887
27888
27889
27890
27891
27892
27893
27894
27895
27896
27897
27898
27899
27900
27901
27902
27903
27904
27905
27906
27907
27908
27909
27910
27911
27912
27913
27914
27915
27916
27917
27918
27919
27920
27921
27922
27923
27924
27925
27926
27927
27928
27929
27930
27931
27932
27933
27934
27935
27936
27937
27938
27939
27940
27941
27942
27943
27944
27945
27946
27947
27948
27949
27950
27951
27952
27953
27954
27955
27956
27957
27958
27959
27960
27961
27962
27963
27964
27965
27966
27967
27968
27969
27970
27971
27972
27973
27974
27975
27976
27977
27978
27979
27980
27981
27982
27983
27984
27985
27986
27987
27988
27989
27990
27991
27992
27993
27994
27995
27996
27997
27998
27999
28000
28001
28002
28003
28004
28005
28006
28007
28008
28009
28010
28011
28012
28013
28014
28015
28016
28017
28018
28019
28020
28021
28022
28023
28024
28025
28026
28027
28028
28029
28030
28031
28032
28033
28034
28035
28036
28037
28038
28039
28040
28041
28042
28043
28044
28045
28046
28047
28048
28049
28050
28051
28052
28053
28054
28055
28056
28057
28058
28059
28060
28061
28062
28063
28064
28065
28066
28067
28068
28069
28070
28071
28072
28073
28074
28075
28076
28077
28078
28079
28080
28081
28082
28083
28084
28085
28086
28087
28088
28089
28090
28091
28092
28093
28094
28095
28096
28097
28098
28099
28100
28101
28102
28103
28104
28105
28106
28107
28108
28109
28110
28111
28112
28113
28114
28115
28116
28117
28118
28119
28120
28121
28122
28123
28124
28125
28126
28127
28128
28129
28130
28131
28132
28133
28134
28135
28136
28137
28138
28139
28140
28141
28142
28143
28144
28145
28146
28147
28148
28149
28150
28151
28152
28153
28154
28155
28156
28157
28158
28159
28160
28161
28162
28163
28164
28165
28166
28167
28168
28169
28170
28171
28172
28173
28174
28175
28176
28177
28178
28179
28180
28181
28182
28183
28184
28185
28186
28187
28188
28189
28190
28191
28192
28193
28194
28195
28196
28197
28198
28199
28200
28201
28202
28203
28204
28205
28206
28207
28208
28209
28210
28211
28212
28213
28214
28215
28216
28217
28218
28219
28220
28221
28222
28223
28224
28225
28226
28227
28228
28229
28230
28231
28232
28233
28234
28235
28236
28237
28238
28239
28240
28241
28242
28243
28244
28245
28246
28247
28248
28249
28250
28251
28252
28253
28254
28255
28256
28257
28258
28259
28260
28261
28262
28263
28264
28265
28266
28267
28268
28269
28270
28271
28272
28273
28274
28275
28276
28277
28278
28279
28280
28281
28282
28283
28284
28285
28286
28287
28288
28289
28290
28291
28292
28293
28294
28295
28296
28297
28298
28299
28300
28301
28302
28303
28304
28305
28306
28307
28308
28309
28310
28311
28312
28313
28314
28315
28316
28317
28318
28319
28320
28321
28322
28323
28324
28325
28326
28327
28328
28329
28330
28331
28332
28333
28334
28335
28336
28337
28338
28339
28340
28341
28342
28343
28344
28345
28346
28347
28348
28349
28350
28351
28352
28353
28354
28355
28356
28357
28358
28359
28360
28361
28362
28363
28364
28365
28366
28367
28368
28369
28370
28371
28372
28373
28374
28375
28376
28377
28378
28379
28380
28381
28382
28383
28384
28385
28386
28387
28388
28389
28390
28391
28392
28393
28394
28395
28396
28397
28398
28399
28400
28401
28402
28403
28404
28405
28406
28407
28408
28409
28410
28411
28412
28413
28414
28415
28416
28417
28418
28419
28420
28421
28422
28423
28424
28425
28426
28427
28428
28429
28430
28431
28432
28433
28434
28435
28436
28437
28438
28439
28440
28441
28442
28443
28444
28445
28446
28447
28448
28449
28450
28451
28452
28453
28454
28455
28456
28457
28458
28459
28460
28461
28462
28463
28464
28465
28466
28467
28468
28469
28470
28471
28472
28473
28474
28475
28476
28477
28478
28479
28480
28481
28482
28483
28484
28485
28486
28487
28488
28489
28490
28491
28492
28493
28494
28495
28496
28497
28498
28499
28500
28501
28502
28503
28504
28505
28506
28507
28508
28509
28510
28511
28512
28513
28514
28515
28516
28517
28518
28519
28520
28521
28522
28523
28524
28525
28526
28527
28528
28529
28530
28531
28532
28533
28534
28535
28536
28537
28538
28539
28540
28541
28542
28543
28544
28545
28546
28547
28548
28549
28550
28551
28552
28553
28554
28555
28556
28557
28558
28559
28560
28561
28562
28563
28564
28565
28566
28567
28568
28569
28570
28571
28572
28573
28574
28575
28576
28577
28578
28579
28580
28581
28582
28583
28584
28585
28586
28587
28588
28589
28590
28591
28592
28593
28594
28595
28596
28597
28598
28599
28600
28601
28602
28603
28604
28605
28606
28607
28608
28609
28610
28611
28612
28613
28614
28615
28616
28617
28618
28619
28620
28621
28622
28623
28624
28625
28626
28627
28628
28629
28630
28631
28632
28633
28634
28635
28636
28637
28638
28639
28640
28641
28642
28643
28644
28645
28646
28647
28648
28649
28650
28651
28652
28653
28654
28655
28656
28657
28658
28659
28660
28661
28662
28663
28664
28665
28666
28667
28668
28669
28670
28671
28672
28673
28674
28675
28676
28677
28678
28679
28680
28681
28682
28683
28684
28685
28686
28687
28688
28689
28690
28691
28692
28693
28694
28695
28696
28697
28698
28699
28700
28701
28702
28703
28704
28705
28706
28707
28708
28709
28710
28711
28712
28713
28714
28715
28716
28717
28718
28719
28720
28721
28722
28723
28724
28725
28726
28727
28728
28729
28730
28731
28732
28733
28734
28735
28736
28737
28738
28739
28740
28741
28742
28743
28744
28745
28746
28747
28748
28749
28750
28751
28752
28753
28754
28755
28756
28757
28758
28759
28760
28761
28762
28763
28764
28765
28766
28767
28768
28769
28770
28771
28772
28773
28774
28775
28776
28777
28778
28779
28780
28781
28782
28783
28784
28785
28786
28787
28788
28789
28790
28791
28792
28793
28794
28795
28796
28797
28798
28799
28800
28801
28802
28803
28804
28805
28806
28807
28808
28809
28810
28811
28812
28813
28814
28815
28816
28817
28818
28819
28820
28821
28822
28823
28824
28825
28826
28827
28828
28829
28830
28831
28832
28833
28834
28835
28836
28837
28838
28839
28840
28841
28842
28843
28844
28845
28846
28847
28848
28849
28850
28851
28852
28853
28854
28855
28856
28857
28858
28859
28860
28861
28862
28863
28864
28865
28866
28867
28868
28869
28870
28871
28872
28873
28874
28875
28876
28877
28878
28879
28880
28881
28882
28883
28884
28885
28886
28887
28888
28889
28890
28891
28892
28893
28894
28895
28896
28897
28898
28899
28900
28901
28902
28903
28904
28905
28906
28907
28908
28909
28910
28911
28912
28913
28914
28915
28916
28917
28918
28919
28920
28921
28922
28923
28924
28925
28926
28927
28928
28929
28930
28931
28932
28933
28934
28935
28936
28937
28938
28939
28940
28941
28942
28943
28944
28945
28946
28947
28948
28949
28950
28951
28952
28953
28954
28955
28956
28957
28958
28959
28960
28961
28962
28963
28964
28965
28966
28967
28968
28969
28970
28971
28972
28973
28974
28975
28976
28977
28978
28979
28980
28981
28982
28983
28984
28985
28986
28987
28988
28989
28990
28991
28992
28993
28994
28995
28996
28997
28998
28999
29000
29001
29002
29003
29004
29005
29006
29007
29008
29009
29010
29011
29012
29013
29014
29015
29016
29017
29018
29019
29020
29021
29022
29023
29024
29025
29026
29027
29028
29029
29030
29031
29032
29033
29034
29035
29036
29037
29038
29039
29040
29041
29042
29043
29044
29045
29046
29047
29048
29049
29050
29051
29052
29053
29054
29055
29056
29057
29058
29059
29060
29061
29062
29063
29064
29065
29066
29067
29068
29069
29070
29071
29072
29073
29074
29075
29076
29077
29078
29079
29080
29081
29082
29083
29084
29085
29086
29087
29088
29089
29090
29091
29092
29093
29094
29095
29096
29097
29098
29099
29100
29101
29102
29103
29104
29105
29106
29107
29108
29109
29110
29111
29112
29113
29114
29115
29116
29117
29118
29119
29120
29121
29122
29123
29124
29125
29126
29127
29128
29129
29130
29131
29132
29133
29134
29135
29136
29137
29138
29139
29140
29141
29142
29143
29144
29145
29146
29147
29148
29149
29150
29151
29152
29153
29154
29155
29156
29157
29158
29159
29160
29161
29162
29163
29164
29165
29166
29167
29168
29169
29170
29171
29172
29173
29174
29175
29176
29177
29178
29179
29180
29181
29182
29183
29184
29185
29186
29187
29188
29189
29190
29191
29192
29193
29194
29195
29196
29197
29198
29199
29200
29201
29202
29203
29204
29205
29206
29207
29208
29209
29210
29211
29212
29213
29214
29215
29216
29217
29218
29219
29220
29221
29222
29223
29224
29225
29226
29227
29228
29229
29230
29231
29232
29233
29234
29235
29236
29237
29238
29239
29240
29241
29242
29243
29244
29245
29246
29247
29248
29249
29250
29251
29252
29253
29254
29255
29256
29257
29258
29259
29260
29261
29262
29263
29264
29265
29266
29267
29268
29269
29270
29271
29272
29273
29274
29275
29276
29277
29278
29279
29280
29281
29282
29283
29284
29285
29286
29287
29288
29289
29290
29291
29292
29293
29294
29295
29296
29297
29298
29299
29300
29301
29302
29303
29304
29305
29306
29307
29308
29309
29310
29311
29312
29313
29314
29315
29316
29317
29318
29319
29320
29321
29322
29323
29324
29325
29326
29327
29328
29329
29330
29331
29332
29333
29334
29335
29336
29337
29338
29339
29340
29341
29342
29343
29344
29345
29346
29347
29348
29349
29350
29351
29352
29353
29354
29355
29356
29357
29358
29359
29360
29361
29362
29363
29364
29365
29366
29367
29368
29369
29370
29371
29372
29373
29374
29375
29376
29377
29378
29379
29380
29381
29382
29383
29384
29385
29386
29387
29388
29389
29390
29391
29392
29393
29394
29395
29396
29397
29398
29399
29400
29401
29402
29403
29404
29405
29406
29407
29408
29409
29410
29411
29412
29413
29414
29415
29416
29417
29418
29419
29420
29421
29422
29423
29424
29425
29426
29427
29428
29429
29430
29431
29432
29433
29434
29435
29436
29437
29438
29439
29440
29441
29442
29443
29444
29445
29446
29447
29448
29449
29450
29451
29452
29453
29454
29455
29456
29457
29458
29459
29460
29461
29462
29463
29464
29465
29466
29467
29468
29469
29470
29471
29472
29473
29474
29475
29476
29477
29478
29479
29480
29481
29482
29483
29484
29485
29486
29487
29488
29489
29490
29491
29492
29493
29494
29495
29496
29497
29498
29499
29500
29501
29502
29503
29504
29505
29506
29507
29508
29509
29510
29511
29512
29513
29514
29515
29516
29517
29518
29519
29520
29521
29522
29523
29524
29525
29526
29527
29528
29529
29530
29531
29532
29533
29534
29535
29536
29537
29538
29539
29540
29541
29542
29543
29544
29545
29546
29547
29548
29549
29550
29551
29552
29553
29554
29555
29556
29557
29558
29559
29560
29561
29562
29563
29564
29565
29566
29567
29568
29569
29570
29571
29572
29573
29574
29575
29576
29577
29578
29579
29580
29581
29582
29583
29584
29585
29586
29587
29588
29589
29590
29591
29592
29593
29594
29595
29596
29597
29598
29599
29600
29601
29602
29603
29604
29605
29606
29607
29608
29609
29610
29611
29612
29613
29614
29615
29616
29617
29618
29619
29620
29621
29622
29623
29624
29625
29626
29627
29628
29629
29630
29631
29632
29633
29634
29635
29636
29637
29638
29639
29640
29641
29642
29643
29644
29645
29646
29647
29648
29649
29650
29651
29652
29653
29654
29655
29656
29657
29658
29659
29660
29661
29662
29663
29664
29665
29666
29667
29668
29669
29670
29671
29672
29673
29674
29675
29676
29677
29678
29679
29680
29681
29682
29683
29684
29685
29686
29687
29688
29689
29690
29691
29692
29693
29694
29695
29696
29697
29698
29699
29700
29701
29702
29703
29704
29705
29706
29707
29708
29709
29710
29711
29712
29713
29714
29715
29716
29717
29718
29719
29720
29721
29722
29723
29724
29725
29726
29727
29728
29729
29730
29731
29732
29733
29734
29735
29736
29737
29738
29739
29740
29741
29742
29743
29744
29745
29746
29747
29748
29749
29750
29751
29752
29753
29754
29755
29756
29757
29758
29759
29760
29761
29762
29763
29764
29765
29766
29767
29768
29769
29770
29771
29772
29773
29774
29775
29776
29777
29778
29779
29780
29781
29782
29783
29784
29785
29786
29787
29788
29789
29790
29791
29792
29793
29794
29795
29796
29797
29798
29799
29800
29801
29802
29803
29804
29805
29806
29807
29808
29809
29810
29811
29812
29813
29814
29815
29816
29817
29818
29819
29820
29821
29822
29823
29824
29825
29826
29827
29828
29829
29830
29831
29832
29833
29834
29835
29836
29837
29838
29839
29840
29841
29842
29843
29844
29845
29846
29847
29848
29849
29850
29851
29852
29853
29854
29855
29856
29857
29858
29859
29860
29861
29862
29863
29864
29865
29866
29867
29868
29869
29870
29871
29872
29873
29874
29875
29876
29877
29878
29879
29880
29881
29882
29883
29884
29885
29886
29887
29888
29889
29890
29891
29892
29893
29894
29895
29896
29897
29898
29899
29900
29901
29902
29903
29904
29905
29906
29907
29908
29909
29910
29911
29912
29913
29914
29915
29916
29917
29918
29919
29920
29921
29922
29923
29924
29925
29926
29927
29928
29929
29930
29931
29932
29933
29934
29935
29936
29937
29938
29939
29940
29941
29942
29943
29944
29945
29946
29947
29948
29949
29950
29951
29952
29953
29954
29955
29956
29957
29958
29959
29960
29961
29962
29963
29964
29965
29966
29967
29968
29969
29970
29971
29972
29973
29974
29975
29976
29977
29978
29979
29980
29981
29982
29983
29984
29985
29986
29987
29988
29989
29990
29991
29992
29993
29994
29995
29996
29997
29998
29999
30000
30001
30002
30003
30004
30005
30006
30007
30008
30009
30010
30011
30012
30013
30014
30015
30016
30017
30018
30019
30020
30021
30022
30023
30024
30025
30026
30027
30028
30029
30030
30031
30032
30033
30034
30035
30036
30037
30038
30039
30040
30041
30042
30043
30044
30045
30046
30047
30048
30049
30050
30051
30052
30053
30054
30055
30056
30057
30058
30059
30060
30061
30062
30063
30064
30065
30066
30067
30068
30069
30070
30071
30072
30073
30074
30075
30076
30077
30078
30079
30080
30081
30082
30083
30084
30085
30086
30087
30088
30089
30090
30091
30092
30093
30094
30095
30096
30097
30098
30099
30100
30101
30102
30103
30104
30105
30106
30107
30108
30109
30110
30111
30112
30113
30114
30115
30116
30117
30118
30119
30120
30121
30122
30123
30124
30125
30126
30127
30128
30129
30130
30131
30132
30133
30134
30135
30136
30137
30138
30139
30140
30141
30142
30143
30144
30145
30146
30147
30148
30149
30150
30151
30152
30153
30154
30155
30156
30157
30158
30159
30160
30161
30162
30163
30164
30165
30166
30167
30168
30169
30170
30171
30172
30173
30174
30175
30176
30177
30178
30179
30180
30181
30182
30183
30184
30185
30186
30187
30188
30189
30190
30191
30192
30193
30194
30195
30196
30197
30198
30199
30200
30201
30202
30203
30204
30205
30206
30207
30208
30209
30210
30211
30212
30213
30214
30215
30216
30217
30218
30219
30220
30221
30222
30223
30224
30225
30226
30227
30228
30229
30230
30231
30232
30233
30234
30235
30236
30237
30238
30239
30240
30241
30242
30243
30244
30245
30246
30247
30248
30249
30250
30251
30252
30253
30254
30255
30256
30257
30258
30259
30260
30261
30262
30263
30264
30265
30266
30267
30268
30269
30270
30271
30272
30273
30274
30275
30276
30277
30278
30279
30280
30281
30282
30283
30284
30285
30286
30287
30288
30289
30290
30291
30292
30293
30294
30295
30296
30297
30298
30299
30300
30301
30302
30303
30304
30305
30306
30307
30308
30309
30310
30311
30312
30313
30314
30315
30316
30317
30318
30319
30320
30321
30322
30323
30324
30325
30326
30327
30328
30329
30330
30331
30332
30333
30334
30335
30336
30337
30338
30339
30340
30341
30342
30343
30344
30345
30346
30347
30348
30349
30350
30351
30352
30353
30354
30355
30356
30357
30358
30359
30360
30361
30362
30363
30364
30365
30366
30367
30368
30369
30370
30371
30372
30373
30374
30375
30376
30377
30378
30379
30380
30381
30382
30383
30384
30385
30386
30387
30388
30389
30390
30391
30392
30393
30394
30395
30396
30397
30398
30399
30400
30401
30402
30403
30404
30405
30406
30407
30408
30409
30410
30411
30412
30413
30414
30415
30416
30417
30418
30419
30420
30421
30422
30423
30424
30425
30426
30427
30428
30429
30430
30431
30432
30433
30434
30435
30436
30437
30438
30439
30440
30441
30442
30443
30444
30445
30446
30447
30448
30449
30450
30451
30452
30453
30454
30455
30456
30457
30458
30459
30460
30461
30462
30463
30464
30465
30466
30467
30468
30469
30470
30471
30472
30473
30474
30475
30476
30477
30478
30479
30480
30481
30482
30483
30484
30485
30486
30487
30488
30489
30490
30491
30492
30493
30494
30495
30496
30497
30498
30499
30500
30501
30502
30503
30504
30505
30506
30507
30508
30509
30510
30511
30512
30513
30514
30515
30516
30517
30518
30519
30520
30521
30522
30523
30524
30525
30526
30527
30528
30529
30530
30531
30532
30533
30534
30535
30536
30537
30538
30539
30540
30541
30542
30543
30544
30545
30546
30547
30548
30549
30550
30551
30552
30553
30554
30555
30556
30557
30558
30559
30560
30561
30562
30563
30564
30565
30566
30567
30568
30569
30570
30571
30572
30573
30574
30575
30576
30577
30578
30579
30580
30581
30582
30583
30584
30585
30586
30587
30588
30589
30590
30591
30592
30593
30594
30595
30596
30597
30598
30599
30600
30601
30602
30603
30604
30605
30606
30607
30608
30609
30610
30611
30612
30613
30614
30615
30616
30617
30618
30619
30620
30621
30622
30623
30624
30625
30626
30627
30628
30629
30630
30631
30632
30633
30634
30635
30636
30637
30638
30639
30640
30641
30642
30643
30644
30645
30646
30647
30648
30649
30650
30651
30652
30653
30654
30655
30656
30657
30658
30659
30660
30661
30662
30663
30664
30665
30666
30667
30668
30669
30670
30671
30672
30673
30674
30675
30676
30677
30678
30679
30680
30681
30682
30683
30684
30685
30686
30687
30688
30689
30690
30691
30692
30693
30694
30695
30696
30697
30698
30699
30700
30701
30702
30703
30704
30705
30706
30707
30708
30709
30710
30711
30712
30713
30714
30715
30716
30717
30718
30719
30720
30721
30722
30723
30724
30725
30726
30727
30728
30729
30730
30731
30732
30733
30734
30735
30736
30737
30738
30739
30740
30741
30742
30743
30744
30745
30746
30747
30748
30749
30750
30751
30752
30753
30754
30755
30756
30757
30758
30759
30760
30761
30762
30763
30764
30765
30766
30767
30768
30769
30770
30771
30772
30773
30774
30775
30776
30777
30778
30779
30780
30781
30782
30783
30784
30785
30786
30787
30788
30789
30790
30791
30792
30793
30794
30795
30796
30797
30798
30799
30800
30801
30802
30803
30804
30805
30806
30807
30808
30809
30810
30811
30812
30813
30814
30815
30816
30817
30818
30819
30820
30821
30822
30823
30824
30825
30826
30827
30828
30829
30830
30831
30832
30833
30834
30835
30836
30837
30838
30839
30840
30841
30842
30843
30844
30845
30846
30847
30848
30849
30850
30851
30852
30853
30854
30855
30856
30857
30858
30859
30860
30861
30862
30863
30864
30865
30866
30867
30868
30869
30870
30871
30872
30873
30874
30875
30876
30877
30878
30879
30880
30881
30882
30883
30884
30885
30886
30887
30888
30889
30890
30891
30892
30893
30894
30895
30896
30897
30898
30899
30900
30901
30902
30903
30904
30905
30906
30907
30908
30909
30910
30911
30912
30913
30914
30915
30916
30917
30918
30919
30920
30921
30922
30923
30924
30925
30926
30927
30928
30929
30930
30931
30932
30933
30934
30935
30936
30937
30938
30939
30940
30941
30942
30943
30944
30945
30946
30947
30948
30949
30950
30951
30952
30953
30954
30955
30956
30957
30958
30959
30960
30961
30962
30963
30964
30965
30966
30967
30968
30969
30970
30971
30972
30973
30974
30975
30976
30977
30978
30979
30980
30981
30982
30983
30984
30985
30986
30987
30988
30989
30990
30991
30992
30993
30994
30995
30996
30997
30998
30999
31000
31001
31002
31003
31004
31005
31006
31007
31008
31009
31010
31011
31012
31013
31014
31015
31016
31017
31018
31019
31020
31021
31022
31023
31024
31025
31026
31027
31028
31029
31030
31031
31032
31033
31034
31035
31036
31037
31038
31039
31040
31041
31042
31043
31044
31045
31046
31047
31048
31049
31050
31051
31052
31053
31054
31055
31056
31057
31058
31059
31060
31061
31062
31063
#ifndef COSMOPOLITAN_H_
#define COSMOPOLITAN_H_


/*!BEGIN libc/integral/normalize.inc */

#define __COSMOPOLITAN__ 1

#ifndef __COUNTER__
#define __COUNTER__ __LINE__
#endif

#if __GNUC__ + 0 < 2
#undef __GNUC__
#elif defined(__GNUC__) && defined(SWIG) /* lool */
#undef __GNUC__
#elif defined(__GNUC__) && defined(__NVCC__) /* lool */
#undef __GNUC__
#elif !defined(__GNUC__) && defined(__APPLE__) /* modesty */
#define __GNUC__            4
#define __GNUC_MINOR__      2
#define __GNUC_PATCHLEVEL__ 1
#elif !defined(__GNUC__) && defined(__TINYC__)
#define __GNUC__            2
#define __GNUC_MINOR__      0
#define __GNUC_PATCHLEVEL__ 0
#endif

#if !defined(__x86_64__) && \
    (defined(__amd64__) || (defined(_M_AMD64) && defined(_M_X64)))
#define __x86_64__ 1
#elif !defined(__i386__) && ((defined(__i486__) || defined(__i586__) ||  \
                              defined(__i686__) || defined(__i786__)) || \
                             _M_IX86 + 0 >= 400)
#define __i386__ 1
#elif !defined(__ia16__) && (defined(__MSDOS__) || defined(__BCC__))
#define __ia16__ 1
#endif
#if __ia16__ + __i386__ + __x86_64__ + 0
#define __x86__ 1
#endif

#ifdef _MSC_VER
#define __STRICT_ANSI__
#ifndef __STDC__
#define __STDC__
#endif
#endif

#ifndef __has_attribute
#define __has_attribute(x) 0
#endif
#ifndef __has_builtin
#define __has_builtin(x) 0
#endif
#ifndef __has_cpp_attribute
#define __has_cpp_attribute(x) 0
#endif

#ifdef unix
#undef unix
#endif

#ifdef linux
#undef linux
#endif

#ifndef __BIGGEST_ALIGNMENT__
#define __BIGGEST_ALIGNMENT__ 16
#endif

#define BIGPAGESIZE 0x200000
#define STACKSIZE   0x100000
#define FRAMESIZE   0x10000 /* 8086 */
#define PAGESIZE    0x1000  /* i386+ */
#define BUFSIZ      0x1000  /* best stdio default */
#define CACHELINE   0x40    /* nexgen32e */
#define CHAR_BIT    8       /* b/c von neumann */
#define ARG_MAX     0x8000  /* b/c windows */
#define PATH_MAX    248     /* b/c win32 apis limit ~248..260 */
#define NAME_MAX    63      /* b/c dns */
#define CHILD_MAX   25      /* only if malloc isn't linked */
#define OPEN_MAX    16      /* only if malloc isn't linked */
#define ATEXIT_MAX  32      /* only if malloc isn't linked */
#define NSIG        128     /* it's complicated */

#if defined(__LP64__) && !defined(__INT64_TYPE__)


/*!BEGIN libc/integral/lp64.inc */

#define __INT8_MAX__    0x7f
#define __UINT8_MAX__   0xff
#define __INT16_MAX__   0x7fff
#define __UINT16_MAX__  0xffff
#define __SHRT_MAX__    0x7fff
#define __INT_MAX__     0x7fffffff
#define __INT32_MAX__   0x7fffffff
#define __UINT32_MAX__  0xffffffffu
#define __INT64_MAX__   0x7fffffffffffffffl
#define __UINT64_MAX__  0xfffffffffffffffful
#define __SIZE_MAX__    0xfffffffffffffffful
#define __INTPTR_MAX__  0x7fffffffffffffffl
#define __UINTPTR_MAX__ 0xfffffffffffffffful
#define __WINT_MAX__    0xffffffffu

#define __SIZEOF_SHORT__       2
#define __SIZEOF_INT__         4
#define __SIZEOF_LONG__        8
#define __SIZEOF_LONG_LONG__   8
#define __SIZEOF_POINTER__     8
#define __SIZEOF_PTRDIFF_T__   8
#define __SIZEOF_SIZE_T__      8
#define __SIZEOF_WCHAR_T__     4
#define __SIZEOF_WINT_T__      4
#define __SIZEOF_FLOAT__       4
#define __SIZEOF_FLOAT128__    16
#define __SIZEOF_DOUBLE__      8
#define __SIZEOF_FLOAT80__     16
#define __SIZEOF_LONG_DOUBLE__ 16

#if !(__ASSEMBLER__ + __LINKER__ + 0)

#define __INT8_TYPE__    signed char
#define __UINT8_TYPE__   unsigned char
#define __INT16_TYPE__   short int
#define __UINT16_TYPE__  short unsigned int
#define __INT32_TYPE__   int
#define __UINT32_TYPE__  unsigned int
#define __INT64_TYPE__   long int
#define __UINT64_TYPE__  long unsigned int
#define __INTPTR_TYPE__  long int
#define __UINTPTR_TYPE__ long unsigned int
#define __PTRDIFF_TYPE__ long int
#define __SIZE_TYPE__    long unsigned int
#define __WCHAR_TYPE__   int
#define __CHAR16_TYPE__  short unsigned int
#define __CHAR32_TYPE__  unsigned int
#define __WINT_TYPE__    unsigned int

#define __INT_LEAST8_TYPE__   __INT8_TYPE__
#define __UINT_LEAST8_TYPE__  __UINT8_TYPE__
#define __INT_LEAST16_TYPE__  __INT32_TYPE__
#define __UINT_LEAST16_TYPE__ __UINT16_TYPE__
#define __INT_LEAST32_TYPE__  __INT16_TYPE__
#define __UINT_LEAST32_TYPE__ __UINT32_TYPE__
#define __INT_LEAST64_TYPE__  __INT64_TYPE__
#define __UINT_LEAST64_TYPE__ __UINT64_TYPE__
#define __INT_FAST8_TYPE__    __INT8_TYPE__
#define __UINT_FAST8_TYPE__   __UINT8_TYPE__
#define __INT_FAST16_TYPE__   __INT32_TYPE__
#define __UINT_FAST16_TYPE__  __UINT32_TYPE__
#define __INT_FAST32_TYPE__   __INT32_TYPE__
#define __UINT_FAST32_TYPE__  __UINT32_TYPE__
#define __INT_FAST64_TYPE__   __INT64_TYPE__
#define __UINT_FAST64_TYPE__  __UINT64_TYPE__

#endif
#elif defined(_MSC_VER) && !defined(__INT64_TYPE__)


/*!BEGIN libc/integral/llp64.inc */

#define __INT8_MAX__    0x7f
#define __UINT8_MAX__   0xff
#define __INT16_MAX__   0x7fff
#define __UINT16_MAX__  0xffff
#define __SHRT_MAX__    0x7fff
#define __INT_MAX__     0x7fffffff
#define __INT32_MAX__   0x7fffffff
#define __UINT32_MAX__  0xffffffffu
#define __INT64_MAX__   0x7fffffffffffffffl
#define __UINT64_MAX__  0xffffffffffffffffull
#define __SIZE_MAX__    0xffffffffffffffffull
#define __INTPTR_MAX__  0x7fffffffffffffffll
#define __UINTPTR_MAX__ 0xffffffffffffffffull
#define __WINT_MAX__    0xffffffffu

#define __SIZEOF_SHORT__       2
#define __SIZEOF_INT__         4
#define __SIZEOF_LONG__        4
#define __SIZEOF_LONG_LONG__   8
#define __SIZEOF_POINTER__     8
#define __SIZEOF_PTRDIFF_T__   8
#define __SIZEOF_SIZE_T__      4
#define __SIZEOF_WCHAR_T__     4
#define __SIZEOF_WINT_T__      4
#define __SIZEOF_FLOAT__       4
#define __SIZEOF_FLOAT128__    16
#define __SIZEOF_DOUBLE__      8
#define __SIZEOF_FLOAT80__     16
#define __SIZEOF_LONG_DOUBLE__ 16

#define __INT8_C(c)   c
#define __UINT8_C(c)  c
#define __INT16_C(c)  c
#define __UINT16_C(c) c
#define __INT32_C(c)  c
#define __UINT32_C(c) c##U
#define __INT64_C(c)  c##LL
#define __UINT64_C(c) c##ULL

#if !(__ASSEMBLER__ + __LINKER__ + 0)

#define __INT8_TYPE__    signed char
#define __UINT8_TYPE__   unsigned char
#define __INT16_TYPE__   short int
#define __UINT16_TYPE__  short unsigned int
#define __INT32_TYPE__   int
#define __UINT32_TYPE__  unsigned int
#define __INT64_TYPE__   long long int
#define __UINT64_TYPE__  long long unsigned int
#define __INTPTR_TYPE__  long long int
#define __UINTPTR_TYPE__ long long unsigned int
#define __PTRDIFF_TYPE__ long long int
#define __SIZE_TYPE__    unsigned int
#define __WCHAR_TYPE__   int
#define __CHAR16_TYPE__  short unsigned int
#define __CHAR32_TYPE__  unsigned int
#define __WINT_TYPE__    unsigned int

#define __INT_LEAST8_TYPE__   __INT8_TYPE__
#define __UINT_LEAST8_TYPE__  __UINT8_TYPE__
#define __INT_LEAST16_TYPE__  __INT32_TYPE__
#define __UINT_LEAST16_TYPE__ __UINT16_TYPE__
#define __INT_LEAST32_TYPE__  __INT16_TYPE__
#define __UINT_LEAST32_TYPE__ __UINT32_TYPE__
#define __INT_LEAST64_TYPE__  __INT64_TYPE__
#define __UINT_LEAST64_TYPE__ __UINT64_TYPE__
#define __INT_FAST8_TYPE__    __INT8_TYPE__
#define __UINT_FAST8_TYPE__   __UINT8_TYPE__
#define __INT_FAST16_TYPE__   __INT32_TYPE__
#define __UINT_FAST16_TYPE__  __UINT32_TYPE__
#define __INT_FAST32_TYPE__   __INT32_TYPE__
#define __UINT_FAST32_TYPE__  __UINT32_TYPE__
#define __INT_FAST64_TYPE__   __INT64_TYPE__
#define __UINT_FAST64_TYPE__  __UINT64_TYPE__

#endif
#endif

#if !(__ASSEMBLER__ + __LINKER__ + 0)
#ifdef __STDC__


/*!BEGIN libc/integral/c.inc */

#if __GNUC__ + 0 < 2
#define __attribute__(x)
#endif

#ifndef __cplusplus
#define COSMOPOLITAN_C_START_
#define COSMOPOLITAN_C_END_
#define COSMOPOLITAN_CXX_START_
#define COSMOPOLITAN_CXX_END_
#define COSMOPOLITAN_CXX_USING_
#endif

#ifndef __ia16__
#define __far
#endif

#if !defined(__GNUC__) && __cplusplus + 0 >= 201103L
#define typeof(x) decltype(x)
#elif (defined(__STRICT_ANSI__) || !defined(__GNUC__)) && \
    __STDC_VERSION__ + 0 < 201112
#define typeof(x) __typeof(x)
#endif

#ifdef __cplusplus
#if __cplusplus >= 201103L
#define _Alignof(x) alignof(x)
#endif /* C++11 */
#else  /* __cplusplus */
#define alignof(x) _Alignof(x)
#if __STDC_VERSION__ + 0 < 201112
#if __GNUC__ + _MSC_VER + 0 && !defined(__STRICT_ANSI__)
#define _Alignof(x) __alignof(x)
#else
#define _Alignof(x) /* basically all it ever did lool */ sizeof(x)
#endif /* GNU/MSVC/!ANSI */
#endif /* C11 */
#endif /* __cplusplus */

#if !defined(__cplusplus) && !defined(inline) && __STDC_VERSION__ + 0 < 199901
#if !defined(__STRICT_ANSI__) && (defined(__GNUC__) || defined(_MSC_VER))
#define inline __inline
#else
#define inline
#define __inline
#endif
#endif

#if __STDC_VERSION__ + 0 < 201112
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
#define _Alignas(x) __attribute__((__aligned__(x)))
#elif defined(_MSC_VER)
#define _Alignas(x) __declspec(align(x))
#endif
#endif

#if defined(__STRICT_ANSI__) || \
    (!defined(__GNUC__) && !__has_builtin(unreachable))
#define __builtin_unreachable() \
  for (;;) {                    \
  }
#endif

#if defined(__STRICT_ANSI__) || (!defined(__llvm__) && !__has_builtin(assume))
#define __builtin_assume(x)            \
  do {                                 \
    if (!(x)) __builtin_unreachable(); \
  } while (0)
#endif

#if __STDC_VERSION__ + 0 < 201112 && defined(__x86__)
#define _Atomic(TYPE) TYPE
#endif

#ifdef __llvm__
#define __gnu_printf__ __printf__
#define __gnu_scanf__  __scanf__
#endif

#if __cplusplus + 0 >= 201103L
#define NULL nullptr
#elif !defined(__cplusplus)
#define NULL ((void *)0)
#else
#define NULL 0
#endif

#ifndef __cplusplus
#if __STDC_VERSION__ + 0 >= 201112
typedef _Bool bool;
#define true ((bool)+1)
#define false ((bool)+0)
#else
#define bool int
#define true 1
#define false 0
#endif
#endif

#ifndef __cplusplus
typedef __WCHAR_TYPE__ wchar_t;
typedef __CHAR16_TYPE__ char16_t;
typedef __CHAR32_TYPE__ char32_t;
#endif

typedef int errno_t;
typedef __SIZE_TYPE__ size_t;
typedef __PTRDIFF_TYPE__ ssize_t;
typedef __INTPTR_TYPE__ intptr_t;
typedef __UINTPTR_TYPE__ uintptr_t;
typedef __PTRDIFF_TYPE__ ptrdiff_t;
typedef __WINT_TYPE__ wint_t; /* uint32_t on linux but int32_t on xnu */
typedef __INT32_TYPE__ bool32;
typedef __INT8_TYPE__ int8_t;
typedef __UINT8_TYPE__ uint8_t;
typedef __INT16_TYPE__ int16_t;
typedef __UINT16_TYPE__ uint16_t;
typedef __INT32_TYPE__ int32_t;
typedef __UINT32_TYPE__ uint32_t;
typedef __INT64_TYPE__ int64_t;
typedef __UINT64_TYPE__ uint64_t;

typedef struct {
  intptr_t ax, dx;
} axdx_t;

#ifdef __SIZEOF_INTMAX__
#undef __SIZEOF_INTMAX__
#endif
#if !defined(__STRICT_ANSI__) && __SIZEOF_POINTER__ == 8 && \
    ((__GNUC__ + 0) * 100 + (__GNUC_MINOR__ + 0) >= 406 || defined(__llvm__))
#define __SIZEOF_INTMAX__ 16
#else
#define __SIZEOF_INTMAX__ __SIZEOF_POINTER__
#endif
#if __SIZEOF_INTMAX__ == 16
typedef signed __int128 int128_t;
typedef unsigned __int128 uint128_t;
typedef int128_t intmax_t;
typedef uint128_t uintmax_t;
#elif __SIZEOF_INTMAX__ == 8
typedef int64_t intmax_t;
typedef uint64_t uintmax_t;
#endif

#ifndef __chibicc__
#define va_list            __builtin_va_list
#define va_arg(ap, type)   __builtin_va_arg(ap, type)
#define va_copy(dest, src) __builtin_va_copy(dest, src)
#define va_end(ap)         __builtin_va_end(ap)
#define va_start(ap, last) __builtin_va_start(ap, last)
#else


/*!BEGIN libc/integral/lp64arg.inc */



/*!BEGIN libc/runtime/valist.h */

#define COSMOPOLITAN_LIBC_RUNTIME_VALIST_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

struct __va_list {
  uint32_t gp_offset;
  uint32_t fp_offset;
  void *overflow_arg_area;
  void *reg_save_area;
};

void *__va_arg(struct __va_list *, size_t, unsigned, unsigned);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define __GNUC_VA_LIST 1
#define __gnuc_va_list va_list

#define va_end(AP)
#define va_copy(DST, SRC) ((DST)[0] = (SRC)[0])
#define va_start(AP, LAST)                    \
  do {                                        \
    *(AP) = *(struct __va_list *)__va_area__; \
  } while (0)

#define va_arg(AP, TYPE)                               \
  (*(TYPE *)__va_arg(AP, sizeof(TYPE), _Alignof(TYPE), \
                     __builtin_reg_class(TYPE)))

typedef struct __va_list va_list[1];
#endif

#define libcesque   nothrow nocallback
#define memcpyesque libcesque
#define strlenesque libcesque nosideeffect paramsnonnull()
#define vallocesque \
  libcesque nodiscard returnsaligned((PAGESIZE)) returnspointerwithnoaliases
#define reallocesque libcesque returnsaligned((__BIGGEST_ALIGNMENT__))
#define mallocesque  reallocesque returnspointerwithnoaliases
#define interruptfn  nocallersavedregisters forcealignargpointer

#ifndef pureconst
#ifndef __STRICT_ANSI__
#define pureconst __attribute__((__const__))
#else
#define pureconst
#endif
#endif

#ifndef forcealign
#ifndef __STRICT_ANSI__
#define forcealign(bytes) __attribute__((__aligned__(bytes)))
#else
#define forcealign(bytes)
#endif
#endif

#ifndef __STRICT_ANSI__
#define thatispacked __attribute__((__packed__))
#else
#define thatispacked
#endif

#ifndef __STRICT_ANSI__
#define printfesque(n)   __attribute__((__format__(__gnu_printf__, n, n + 1)))
#define scanfesque(n)    __attribute__((__format__(__gnu_scanf__, n, n + 1)))
#define strftimeesque(n) __attribute__((__format__(__strftime__, n, 0)))
#else
#define printfesque(n)
#define scanfesque(n)
#define strftimeesque(n)
#endif

#ifndef hidden
#if !defined(__STRICT_ANSI__) && \
    (__has_attribute(__visibility__) || defined(__GNUC__)) && !defined(_WIN32)
#define hidden __attribute__((__visibility__("hidden")))
#else
#define hidden
#endif
#endif

#ifndef privileged
#if !defined(__STRICT_ANSI__) && \
    (__has_attribute(__visibility__) || defined(__GNUC__))
#define privileged _Section(".privileged") noinstrument
#else
#define privileged _Section(".privileged") noinstrument
#endif
#endif

#ifndef noinstrument
#if !defined(__STRICT_ANSI__) &&                    \
    (__has_attribute(__no_instrument_function__) || \
     (__GNUC__ + 0) * 100 + (__GNUC_MINOR__ + 0) >= 204)
#define noinstrument __attribute__((__no_instrument_function__))
#else
#define noinstrument
#endif
#endif

#ifndef wontreturn
#if !defined(__STRICT_ANSI__) &&      \
    (__has_attribute(__noreturn__) || \
     (__GNUC__ + 0) * 100 + (__GNUC_MINOR__ + 0) >= 208)
#define wontreturn __attribute__((__noreturn__))
#else
#define wontreturn
#endif
#endif

#ifndef nosideeffect
#if !defined(__STRICT_ANSI__) &&  \
    (__has_attribute(__pure__) || \
     (__GNUC__ + 0) * 100 + (__GNUC_MINOR__ + 0) >= 296)
#define nosideeffect __attribute__((__pure__))
#else
#define nosideeffect
#endif
#endif

#ifndef noinline
#if !defined(__STRICT_ANSI__) &&      \
    (__has_attribute(__noinline__) || \
     (__GNUC__ + 0) * 100 + (__GNUC_MINOR__ + 0) >= 301)
#define noinline __attribute__((__noinline__))
#else
#define noinline
#endif
#endif

#ifndef noclone
#if !defined(__STRICT_ANSI__) &&     \
    (__has_attribute(__noclone__) || \
     (__GNUC__ + 0) * 100 + (__GNUC_MINOR__ + 0) >= 405)
#define noclone __attribute__((__noclone__))
#else
#define noclone
#endif
#endif

#ifndef forceinline
#ifdef __cplusplus
#define forceinline inline
#else
#if !defined(__STRICT_ANSI__) && \
    (__GNUC__ + 0) * 100 + (__GNUC_MINOR__ + 0) >= 302
#if (__GNUC__ + 0) * 100 + (__GNUC_MINOR__ + 0) >= 403 || \
    !defined(__cplusplus) ||                              \
    (defined(__clang__) &&                                \
     (defined(__GNUC_STDC_INLINE__) || defined(__GNUC_GNU_INLINE__)))
#if defined(__GNUC_STDC_INLINE__) || defined(__cplusplus)
#define forceinline                                                 \
  static __inline __attribute__((__always_inline__, __gnu_inline__, \
                                 __no_instrument_function__, __unused__))
#else
#define forceinline              \
  static __inline __attribute__( \
      (__always_inline__, __no_instrument_function__, __unused__))
#endif /* __GNUC_STDC_INLINE__ */
#endif /* GCC >= 4.3 */
#elif defined(_MSC_VER)
#define forceinline __forceinline
#else
#define forceinline static inline
#endif /* !ANSI && GCC >= 3.2 */
#endif /* __cplusplus */
#endif /* forceinline */

#ifndef mayalias
#if !defined(__STRICT_ANSI__) &&       \
    (__has_attribute(__may_alias__) || \
     (__GNUC__ + 0) * 100 + (__GNUC_MINOR__ + 0) >= 303)
#define mayalias __attribute__((__may_alias__))
#else
#define mayalias
#endif
#endif

#ifndef nodiscard
#if !defined(__STRICT_ANSI__) &&                           \
    ((__GNUC__ + 0) * 100 + (__GNUC_MINOR__ + 0) >= 304 || \
     __has_attribute(__warn_unused_result__))
#define nodiscard __attribute__((__warn_unused_result__))
#else
#define nodiscard
#endif
#endif

#ifndef nullterminated
#if !defined(__STRICT_ANSI__) && \
    (__has_attribute(__sentinel__) || __GNUC__ + 0 >= 4)
#define nullterminated(x) __attribute__((__sentinel__ x))
#else
#define nullterminated(x)
#endif
#endif

#ifndef flattenout
#if __has_attribute(__flatten__) || \
    ((__GNUC__ + 0) * 100 + (__GNUC_MINOR__ + 0) >= 401 && !defined(__llvm__))
#define flattenout __attribute__((__flatten__))
#else
#define flattenout
#endif
#endif

#ifndef externinline
#if !defined(__STRICT_ANSI__) &&                           \
    (!defined(__cplusplus) ||                              \
     (__GNUC__ + 0) * 100 + (__GNUC_MINOR__ + 0) >= 403 || \
     (defined(__clang__) &&                                \
      (defined(__GNUC_STDC_INLINE__) || defined(__GNUC_GNU_INLINE__))))
#if defined(__GNUC_STDC_INLINE__) || defined(__cplusplus)
#define externinline extern __inline __attribute__((__gnu_inline__))
#else
#define externinline extern __inline __attribute__((__always_inline__))
#endif
#else
#define externinline inline
#endif
#endif

#ifndef relegated
#if !defined(__STRICT_ANSI__) &&  \
    (__has_attribute(__cold__) || \
     (__GNUC__ + 0) * 100 + (__GNUC_MINOR__ + 0) >= 403)
#define relegated __attribute__((__cold__))
#else
#define relegated
#endif
#endif

#if !defined(__STRICT_ANSI__) &&     \
    (__has_attribute(__warning__) || \
     (__GNUC__ + 0) * 100 + (__GNUC_MINOR__ + 0) >= 403)
#define warnifused(s) __attribute__((__warning__(s)))
#else
#define warnifused(s)
#endif

#ifndef firstclass
#if !defined(__STRICT_ANSI__) && \
    (__has_attribute(__hot__) || \
     (__GNUC__ + 0) * 100 + (__GNUC_MINOR__ + 0) >= 403)
#define firstclass __attribute__((__hot__))
#else
#define firstclass
#endif
#endif

#ifndef paramsnonnull
#if !defined(__STRICT_ANSI__) &&     \
    (__has_attribute(__nonnull__) || \
     (__GNUC__ + 0) * 100 + (__GNUC_MINOR__ + 0) >= 403)
#define paramsnonnull(opt_1idxs) __attribute__((__nonnull__ opt_1idxs))
#else
#define paramsnonnull(opt_1idxs)
#endif
#endif

#if __STDC_VERSION__ + 0 >= 199901L
#define hasatleast static
#else
#define hasatleast
#endif

#if __STDC_VERSION__ + 0 < 199901L && !defined(restrict)
#if !defined(__STRICT_ANSI__) && !defined(__cplusplus) && \
    ((__GNUC__ + 0) * 100 + (__GNUC_MINOR__ + 0) >= 301 || defined(_MSC_VER))
#define restrict __restrict__
#else
#define restrict
#define __restrict
#endif
#endif

#ifndef nocallback
#if !defined(__STRICT_ANSI__) &&  \
    (__has_attribute(__leaf__) || \
     (!defined(__llvm__) &&       \
      (__GNUC__ + 0) * 100 + (__GNUC_MINOR__ + 0) >= 406))
#define nocallback __attribute__((__leaf__))
#else
#define nocallback
#endif
#endif

#ifndef nothrow
#if defined(__cplusplus) && !defined(__STRICT_ANSI__) && \
    (__has_attribute(nothrow) ||                         \
     (__GNUC__ + 0) * 100 + (__GNUC_MINOR__ + 0) >= 303)
#define nothrow __attribute__((__nothrow__))
#elif defined(_MSC_VER)
#define nothrow __declspec(nothrow)
#else
#define nothrow
#endif
#endif

#ifndef nooptimize
#ifndef __STRICT_ANSI__
#if (__GNUC__ + 0) * 100 + (__GNUC_MINOR__ + 0) >= 407 || \
    __has_attribute(__optimize__)
#define nooptimize __attribute__((__optimize__(1)))
#elif defined(__llvm__) || __has_attribute(__optnone__)
#define nooptimize __attribute__((__optnone__))
#endif
#else
#define nooptimize
#endif
#endif

#ifndef optimizesize
#ifndef __STRICT_ANSI__
#if (__GNUC__ + 0) * 100 + (__GNUC_MINOR__ + 0) >= 407 || \
    __has_attribute(__optimize__)
#define optimizesize __attribute__((__optimize__("s")))
#elif defined(__llvm__) || __has_attribute(__optnone__)
#define optimizesize __attribute__((__optnone__))
#endif
#else
#define optimizesize
#endif
#endif

#ifndef optimizespeed
#if !defined(__STRICT_ANSI__) &&                           \
    ((__GNUC__ + 0) * 100 + (__GNUC_MINOR__ + 0) >= 407 || \
     __has_attribute(__optimize__))
#define optimizespeed __attribute__((__optimize__(3)))
#else
#define optimizespeed
#endif
#endif

#ifndef returnstwice
#if !defined(__STRICT_ANSI__) &&           \
    (__has_attribute(__returns_twice__) || \
     (__GNUC__ + 0) * 100 + (__GNUC_MINOR__ + 0) >= 402)
#define returnstwice __attribute__((__returns_twice__))
#else
#define returnstwice
#endif
#endif

#ifndef nodebuginfo
#if !defined(__STRICT_ANSI__) && \
    (__has_attribute(__nodebug__) || defined(__llvm__))
#define nodebuginfo __attribute__((__nodebug__))
#else
#define nodebuginfo
#endif
#endif

#ifndef artificial
#if !defined(__STRICT_ANSI__) &&        \
    (__has_attribute(__artificial__) || \
     (__GNUC__ + 0) * 100 + (__GNUC_MINOR__ + 0) >= 403)
#define artificial __attribute__((__artificial__))
#else
#define artificial
#endif
#endif

#ifndef microarchitecture
#if !defined(__STRICT_ANSI__) &&    \
    (__has_attribute(__target__) || \
     (__GNUC__ + 0) * 100 + (__GNUC_MINOR__ + 0) >= 404)
#define microarchitecture(march) __attribute__((__target__(march)))
#else
#define microarchitecture(march)
#endif
#endif

#ifndef targetclones
#if !defined(__STRICT_ANSI__) && \
    (__has_attribute(__target_clones__) || __GNUC__ >= 6)
#define targetclones(archs) __attribute__((__target_clones__(archs)))
#else
#define targetclones(archs)
#endif
#endif

#if (__GNUC__ + 0) * 100 + (__GNUC_MINOR__ + 0) >= 408 || \
    __has_attribute(__force_align_arg_pointer__)
#define forcealignargpointer __attribute__((__force_align_arg_pointer__))
#else
#define forcealignargpointer "need modern compiler"
#endif

#ifndef returnsnonnull
#if !defined(__STRICT_ANSI__) &&             \
    (__has_attribute(__returns_nonnull__) || \
     (__GNUC__ + 0) * 100 + (__GNUC_MINOR__ + 0) >= 409)
#define returnsnonnull __attribute__((__returns_nonnull__))
#else
#define returnsnonnull
#endif
#endif

#if !defined(__STRICT_ANSI__) &&            \
    (__has_attribute(__assume_aligned__) || \
     (__GNUC__ + 0) * 100 + (__GNUC_MINOR__ + 0) >= 409)
#define returnsaligned(x) __attribute__((__assume_aligned__ x))
#else
#define returnsaligned(x)
#endif

#ifndef returnspointerwithnoaliases
#if !defined(__STRICT_ANSI__) &&    \
    (__has_attribute(__malloc__) || \
     (__GNUC__ + 0) * 100 + (__GNUC_MINOR__ + 0) >= 409)
#define returnspointerwithnoaliases __attribute__((__malloc__))
#elif defined(_MSC_VER)
#define returnspointerwithnoaliases __declspec(allocator)
#else
#define returnspointerwithnoaliases
#endif
#endif

#ifndef attributeallocsize
#if !defined(__STRICT_ANSI__) &&        \
    (__has_attribute(__alloc_size__) || \
     (__GNUC__ + 0) * 100 + (__GNUC_MINOR__ + 0) >= 409)
#define attributeallocsize(x) __attribute__((__alloc_size__ x))
#else
#define attributeallocsize(x)
#endif
#endif

#ifndef attributeallocalign
#if !defined(__STRICT_ANSI__) &&         \
    (__has_attribute(__alloc_align__) || \
     (__GNUC__ + 0) * 100 + (__GNUC_MINOR__ + 0) >= 409)
#define attributeallocalign(x) __attribute__((__alloc_align__ x))
#else
#define attributeallocalign(x)
#endif
#endif

#if __cplusplus + 0 >= 201103L
#define autotype(x) auto
#elif ((__has_builtin(auto_type) || defined(__llvm__) ||       \
        (__GNUC__ + 0) * 100 + (__GNUC_MINOR__ + 0) >= 409) && \
       !defined(__chibicc__))
#define autotype(x) __auto_type
#else
#define autotype(x) typeof(x)
#endif

#if __GNUC__ >= 7 || __has_attribute(__no_caller_saved_registers__)
#define nocallersavedregisters __attribute__((__no_caller_saved_registers__))
#else
#define nocallersavedregisters "need modern compiler"
#endif

#if (__GNUC__ + 0) * 100 + (__GNUC_MINOR__ + 0) >= 408 || \
    __has_attribute(__no_sanitize_address__)
#define noasan __attribute__((__no_sanitize_address__))
#else
#define noasan
#endif

#ifndef unreachable
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
#define unreachable __builtin_unreachable()
#else
#define unreachable \
  do {              \
  } while (1)
#endif
#endif

#define donothing \
  do {            \
  } while (0)

#ifndef __STRICT_ANSI__
#define testonly    noinline _Section(".test")
#define textstartup _Section(".text.startup") noinstrument
#define textexit    _Section(".text.exit") noinstrument
#define textreal    _Section(".text.real")
#define texthead    _Section(".text.head")
#define textwindows _Section(".text.windows")
#define antiquity   _Section(".text.antiquity")
#else
#define testonly
#define textstartup
#define textexit
#define textreal
#define texthead
#define textwindows
#define antiquity
#endif

#ifndef compatfn
#define compatfn
#endif

#ifndef frownedupon
#define frownedupon(alternative)
#endif

#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
#define _Vector_size(k) __attribute__((__vector_size__(k)))
#else
#define _Vector_size(k) [k]
#endif

#if defined(__STRICT_ANSI__) || \
    (!defined(__GNUC__) && !defined(__builtin_offsetof))
#define offsetof(type, member) ((unsigned long)&((type *)0)->member)
#else
#define offsetof(type, member) __builtin_offsetof(type, member)
#endif

#ifndef _Section
#if !defined(__STRICT_ANSI__) && !defined(__APPLE__)
#define _Section(s) __attribute__((__section__(s)))
#else
#define _Section(s)
#endif
#endif

#ifndef __llvm__
#define initarray _Section(".init_array,\"a\",@init_array #")
#else
#define initarray _Section(".init_array")
#endif

#ifndef __STRICT_ANSI__
#if defined(__GNUC__) || defined(__llvm__)
#pragma GCC diagnostic ignored "-Wsign-compare" /* lint needs to change  */
#pragma GCC diagnostic ignored "-Wtype-limits" /* makes macros unsafe  */
#pragma GCC diagnostic ignored "-Woverflow" /* also breaks macros  */
#pragma GCC diagnostic ignored "-Wformat" /* forces only gnu pf */
#pragma GCC diagnostic ignored "-Wunused-parameter" /* extreme prejudice */
#pragma GCC diagnostic ignored "-Wunused-function" /* contradicts dce! */
#pragma GCC diagnostic ignored "-Wunused-variable" /* belongs in tidy */
#pragma GCC diagnostic ignored "-Wformat-extra-args" /* is also broken */
#pragma GCC diagnostic ignored "-Wparentheses" /* annoying tidy */
#pragma GCC diagnostic ignored "-Wdangling-else" /* come on tidy */
#pragma GCC diagnostic ignored "-Wformat-security" /* come on tidy */
#pragma GCC diagnostic ignored "-Wunused-value" /* breaks macros */
#ifndef __cplusplus
#pragma GCC diagnostic ignored "-Wimplicit-int"
#endif /* C++ */
#endif /* GCC || LLVM */
#if defined(__GNUC__) && !defined(__llvm__)
/* why we need authorization to name a variable `yn' */
#pragma GCC diagnostic ignored "-Wbuiltin-declaration-mismatch"
#pragma GCC diagnostic ignored "-Wfree-nonheap-object" /* broken #54202 */
#ifndef __cplusplus
#if __GNUC__ >= 6
#pragma GCC diagnostic ignored /* wut */ "-Wdiscarded-qualifiers"
#pragma GCC diagnostic ignored /* tidy */ "-Wunused-but-set-variable"
#pragma GCC diagnostic ignored /* tidy */ "-Wunused-but-set-parameter"
#endif /* GCC6+ */
#if __GNUC__ >= 8
#pragma GCC diagnostic ignored "-Wstringop-truncation"
#pragma GCC diagnostic ignored "-Wstringop-overflow" /* breaks strndup */
#endif /* GCC8+ */
#if __GNUC__ + 0 >= 9
#pragma GCC diagnostic ignored /* "always true" breaks dce */ "-Waddress"
#endif /* GCC9+ */
#endif /* !C++ */
#endif /* GCC && !LLVM */
#ifdef __llvm__
#pragma clang diagnostic ignored \
    "-Wincompatible-pointer-types-discards-qualifiers"
#pragma clang diagnostic ignored "-Wbuiltin-requires-header"
#pragma clang diagnostic ignored "-Wparentheses-equality" /*-save-temps*/
#pragma clang diagnostic ignored "-Wunused-value" /*({-save-temps})*/
#pragma clang diagnostic ignored "-Wstring-plus-int" /* special ed */
#pragma clang diagnostic ignored "-Wunused-value" /* extreme prejudice */
#pragma clang diagnostic ignored "-Wbuiltin-requires-header"
#pragma clang diagnostic ignored \
    "-Wincompatible-pointer-types-discards-qualifiers"
#endif /* !GCC && LLVM */
#endif /* ANSI */

#ifndef __W__
#ifndef __STRICT_ANSI__
#if defined(__GNUC__) || defined(__llvm__)
#pragma GCC diagnostic error "-Wpointer-arith"
#pragma GCC diagnostic error "-Wnonnull"
#pragma GCC diagnostic error "-Wunused-result"
#pragma GCC diagnostic error "-Wuninitialized"
#pragma GCC diagnostic error "-Wstrict-aliasing"
#pragma GCC diagnostic error "-Wshift-negative-value"
#ifndef __cplusplus
#pragma GCC diagnostic error "-Wimplicit-function-declaration"
#if __GNUC__ >= 6
#pragma GCC diagnostic error "-Wincompatible-pointer-types"
#if __GNUC__ >= 8
#pragma GCC diagnostic error "-Wmultistatement-macros"
#pragma GCC diagnostic error "-Wpacked-not-aligned"
#pragma GCC diagnostic error "-Wcast-align=strict"
#pragma GCC diagnostic error "-Wif-not-aligned"
#endif /* GCC 8+ */
#endif /* GCC 6+ */
#endif /* __cplusplus */
#endif /* GCC || LLVM */
#if defined(__GNUC__) && !defined(__llvm__)
#pragma GCC diagnostic error "-Wwrite-strings"
#pragma GCC diagnostic error "-Wtrampolines"
#pragma GCC diagnostic error "-Wmaybe-uninitialized"
#pragma GCC diagnostic error "-Wredundant-decls"
#if __GNUC__ >= 6
#pragma GCC diagnostic error "-Wnonnull-compare"
#if defined(COSMO) && !defined(MODE_DBG) && !defined(STACK_FRAME_UNLIMITED)
#pragma GCC diagnostic error "-Wframe-larger-than=4096"
#if __GNUC__ >= 9
#pragma GCC diagnostic error "-Walloca-larger-than=1024"
#pragma GCC diagnostic error "-Wvla-larger-than=1024"
#endif /* GCC 9+ */
#endif /* STACK_FRAME_UNLIMITED */
#elif __GNUC__ >= 9
#pragma GCC diagnostic error /* e.g. fabs not abs */ "-Wabsolute-value"
#endif /* GCC 6+ */
#endif /* GCC && !LLVM */
#ifdef __llvm__
#pragma clang diagnostic error "-Wassume"
#endif /* !GCC && LLVM */
#endif /* ANSI */
#endif /* -w */

#ifndef __STRICT_ANSI__
#define DebugBreak() asm("int3")
#else
#define DebugBreak() (void)0
#endif

#ifndef __STRICT_ANSI__
#define VEIL(CONSTRAINT, EXPRESSION)                             \
  ({                                                             \
    autotype(EXPRESSION) VeiledValue = (EXPRESSION);             \
    asm("" : "=" CONSTRAINT ""(VeiledValue) : "0"(VeiledValue)); \
    VeiledValue;                                                 \
  })
#else
#define VEIL(CONSTRAINT, EXPRESSION) (EXPRESSION)
#endif

#ifndef __STRICT_ANSI__
#define CONCEAL(CONSTRAINT, EXPRESSION)                                   \
  ({                                                                      \
    autotype(EXPRESSION) VeiledValue = (EXPRESSION);                      \
    asm volatile("" : "=" CONSTRAINT ""(VeiledValue) : "0"(VeiledValue)); \
    VeiledValue;                                                          \
  })
#else
#define CONCEAL(CONSTRAINT, EXPRESSION) (EXPRESSION)
#endif

#ifndef __STRICT_ANSI__
#define EXPROPRIATE(EXPRESSION)                    \
  ({                                               \
    asm volatile("" ::"g"(EXPRESSION) : "memory"); \
    0;                                             \
  })
#else
#define EXPROPRIATE(EXPRESSION) (EXPRESSION)
#endif

#if !defined(__STRICT_ANSI__) && !defined(__APPLE__)
#define YOINK(SYMBOL) \
  asm(".section .yoink\n\tnopl\t%a0\n\t.previous" : : "X"(SYMBOL))
#else
#define YOINK(SYMBOL) (void)0
#endif

#if !defined(__STRICT_ANSI__) && !defined(__APPLE__)
#define STATIC_YOINK(SYMBOLSTR) \
  asm(".section .yoink\n\tnopl\t\"" SYMBOLSTR "\"\n\t.previous")
#else
#define STATIC_YOINK(SYMBOLSTR)
#endif

#if !defined(IM_FEELING_NAUGHTY)
#define STATIC_YOINK_SOURCE(PATH) STATIC_YOINK(PATH)
#else
#define STATIC_YOINK_SOURCE(PATH)
#endif

#define MACHINE_CODE_ANALYSIS_BEGIN_
#define MACHINE_CODE_ANALYSIS_END_
#else
#define const
#define volatile
#endif
#ifdef __cplusplus


/*!BEGIN libc/integral/cxx.inc */

#define COSMOPOLITAN_CXX_START_ namespace cosmo {
#define COSMOPOLITAN_CXX_END_   }
#define COSMOPOLITAN_CXX_USING_ using namespace cosmo;
#define COSMOPOLITAN_C_START_   extern "C" {
#define COSMOPOLITAN_C_END_     }

#if !defined(__builtin_types_compatible_p) && !__has_builtin(types_compatible_p)
#if 0 /* todo jart whyyyy */


/*!BEGIN libc/integral/cxxtypescompat.inc */

#define NAME __cxx_types_compatible
#define QUALIFIED(Q1, Q2)       \
  template <class _T, class _U> \
  struct NAME<_T Q1, _U Q2> : NAME<_T, _U> {}

template <class, class>
struct NAME {
  enum { _value = 0 };
};

template <class _T>
struct NAME<_T, _T> {
  enum { _value = 1 };
};

template <class _T, size_t N>
struct NAME<_T[], _T[N]> {
  enum { _value = 1 };
};

template <class _T, size_t N>
struct NAME<_T[N], _T[]> {
  enum { _value = 1 };
};

QUALIFIED(const volatile, );
QUALIFIED(const volatile, const);
QUALIFIED(const, const volatile);
QUALIFIED(volatile, const volatile);
QUALIFIED(const volatile, volatile);
QUALIFIED(const, volatile);
QUALIFIED(volatile, const);
QUALIFIED(, const);
QUALIFIED(const, );
QUALIFIED(, volatile);
QUALIFIED(volatile, );

#undef QUALIFIED
#undef NAME
#define __builtin_types_compatible_p(A, B) \
  (__cxx_types_compatible<A, B>::_value)
#else
#define __builtin_types_compatible_p(A, B) 0
#endif
#endif

#if !defined(__builtin_choose_expr) && !__has_builtin(choose_expr)
#if 1
template <bool _P, typename _T, typename _U>
struct __cxx_choose_expr {
  __cxx_choose_expr(_T _a, _U _b) : _value(_a) {}
  const _T _value;
};
template <typename _T, typename _U>
struct __cxx_choose_expr<false, _T, _U> {
  __cxx_choose_expr(_T _a, _U _b) : _value(_b) {}
  const _U _value;
};
#define __builtin_choose_expr(X, A, B) \
  (__cxx_choose_expr<X, typeof(A), typeof(B)>(A, B)._value)
#else
#define __builtin_choose_expr(X, A, B) ((X) ? (A) : (B))
#endif
#endif
#endif
#endif


/*!BEGIN libc/assert.h */

#define COSMOPOLITAN_LIBC_ASSERT_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void __assert_fail(const char *, const char *, int) hidden wontreturn relegated;

#ifdef NDEBUG
#define __ASSERT_FAIL(EXPR, FILE, LINE)
#else
#define __ASSERT_FAIL(EXPR, FILE, LINE) __assert_fail(EXPR, FILE, LINE)
#endif

#define assert(EXPR)                            \
  do {                                          \
    if (!(EXPR)) {                              \
      __ASSERT_FAIL(#EXPR, __FILE__, __LINE__); \
      unreachable;                              \
    }                                           \
  } while (0)

#define static_assert _Static_assert

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/complex.h */

#define COSMOPOLITAN_LIBC_COMPLEX_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
#if __STDC_VERSION__ + 0 >= 201112 && !defined(__STDC_NO_COMPLEX__)

#define complex   _Complex
#define imaginary _Imaginary

double cabs(complex double);
double carg(complex double);
double cimag(complex double);
double creal(complex double);

float cabsf(complex float);
float cargf(complex float);
float cimagf(complex float);
float crealf(complex float);

long double cabsl(complex long double);
long double cargl(complex long double);
long double cimagl(complex long double);
long double creall(complex long double);

complex double cacos(complex double);
complex double cacosh(complex double);
complex double casin(complex double);
complex double casinh(complex double);
complex double catan(complex double);
complex double catanh(complex double);
complex double ccos(complex double);
complex double ccosh(complex double);
complex double cexp(complex double);
complex double cexp2(complex double);
complex double clog(complex double);
complex double conj(complex double);
complex double cpow(complex double, complex double);
complex double cproj(complex double);
complex double csin(complex double);
complex double csinh(complex double);
complex double csqrt(complex double);
complex double ctan(complex double);
complex double ctanh(complex double);

complex float cacosf(complex float);
complex float cacoshf(complex float);
complex float casinf(complex float);
complex float casinhf(complex float);
complex float catanf(complex float);
complex float catanhf(complex float);
complex float ccosf(complex float);
complex float ccoshf(complex float);
complex float cexpf(complex float);
complex float cexp2f(complex float);
complex float clogf(complex float);
complex float conjf(complex float);
complex float cpowf(complex float, complex float);
complex float cprojf(complex float);
complex float csinf(complex float);
complex float csinhf(complex float);
complex float csqrtf(complex float);
complex float ctanf(complex float);
complex float ctanhf(complex float);

complex long double cprojl(complex long double);
complex long double csinhl(complex long double);
complex long double csinl(complex long double);
complex long double csqrtl(complex long double);
complex long double ctanhl(complex long double);
complex long double ctanl(complex long double);
complex long double cacoshl(complex long double);
complex long double cacosl(complex long double);
complex long double casinhl(complex long double);
complex long double casinl(complex long double);
complex long double catanhl(complex long double);
complex long double catanl(complex long double);
complex long double ccoshl(complex long double);
complex long double ccosl(complex long double);
complex long double cexpl(complex long double);
complex long double cexp2l(complex long double);
complex long double clogl(complex long double);
complex long double conjl(complex long double);
complex long double cpowl(complex long double, complex long double);

#endif /* C11 */
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/dce.h */

#define COSMOPOLITAN_LIBC_DCE_H_


/*!BEGIN libc/nexgen32e/kcpuids.h */

#define COSMOPOLITAN_LIBC_NEXGEN32E_KCPUIDS_H_

#define KCPUIDS_0H        0
#define KCPUIDS_1H        1
#define KCPUIDS_2H        2
#define KCPUIDS_7H        3
#define KCPUIDS_80000001H 4
#define KCPUIDS_80000007H 5
#define KCPUIDS_16H       6
#define KCPUIDS_LEN       7
#define KCPUIDS_6H        -1 /* TBD: Thermal and Power Management */
#define KCPUIDS_DH        -1 /* TBD: Extended state features */
#define KCPUIDS_80000008H -1 /* TBD: AMD Miscellaneous */
#define KCPUIDS_8000000AH -1 /* TBD: AMD SVM */

#define KCPUIDS_EAX 0
#define KCPUIDS_EBX 1
#define KCPUIDS_ECX 2
#define KCPUIDS_EDX 3

#define KCPUIDS(LEAF, REG) _KCPUIDS(LEAF, REG)
#ifdef __ASSEMBLER__
#define _KCPUIDS(LEAF, REG) KCPUIDS_##LEAF * 16 + KCPUIDS_##REG * 4
#else
#define _KCPUIDS(LEAF, REG) kCpuids[KCPUIDS_##LEAF][KCPUIDS_##REG]
#endif

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const unsigned kCpuids[KCPUIDS_LEN][4];

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
/*─────────────────────────────────────────────────────────────────────────────╗
│ cosmopolitan § autotune » dead code elimination                              │
╚─────────────────────────────────────────────────────────────────────────────*/

#ifndef SUPPORT_VECTOR
/**
 * Supported Platforms Tuning Knob (Runtime & Compile-Time)
 * Tuning this bitmask will remove platform polyfills at compile-time.
 */
#define SUPPORT_VECTOR 255
#endif

#define LINUX   1
#define METAL   2
#define WINDOWS 4
#define XNU     8
#define OPENBSD 16
#define FREEBSD 32
#define NETBSD  64

#ifdef NDEBUG
#define NoDebug() 1
#else
#define NoDebug() 0
#endif

#ifdef MODE_DBG
#define IsModeDbg() 1
#else
#define IsModeDbg() 0
#endif

#ifdef __MFENTRY__
#define HaveFentry() 1
#else
#define HaveFentry() 0
#endif

#ifdef TRUSTWORTHY
#define IsTrustworthy() 1
#else
#define IsTrustworthy() 0
#endif

#ifdef SECURITY_BLANKETS
#define UseSecurityBlankets() 1
#else
#define UseSecurityBlankets() 0
#endif

#ifdef TINY
#define IsTiny() 1
#else
#define IsTiny() 0
#endif

#ifdef __OPTIMIZE__
#define IsOptimized() 1
#else
#define IsOptimized() 0
#endif

#if defined(__PIE__) || defined(__PIC__)
#define IsPositionIndependent() 1
#else
#define IsPositionIndependent() 0
#endif

#define SupportsLinux()   ((SUPPORT_VECTOR & LINUX) == LINUX)
#define SupportsMetal()   ((SUPPORT_VECTOR & METAL) == METAL)
#define SupportsWindows() ((SUPPORT_VECTOR & WINDOWS) == WINDOWS)
#define SupportsXnu()     ((SUPPORT_VECTOR & XNU) == XNU)
#define SupportsFreebsd() ((SUPPORT_VECTOR & FREEBSD) == FREEBSD)
#define SupportsOpenbsd() ((SUPPORT_VECTOR & OPENBSD) == OPENBSD)
#define SupportsNetbsd()  ((SUPPORT_VECTOR & NETBSD) == NETBSD)
#define SupportsBsd()     (!!(SUPPORT_VECTOR & (XNU | FREEBSD | OPENBSD | NETBSD)))
#define SupportsSystemv() \
  (!!(SUPPORT_VECTOR & (LINUX | XNU | OPENBSD | FREEBSD | NETBSD)))

#ifndef __ASSEMBLER__
#define IsLinux()   (SupportsLinux() && (__hostos & LINUX))
#define IsMetal()   (SupportsMetal() && (__hostos & METAL))
#define IsWindows() (SupportsWindows() && (__hostos & WINDOWS))
#define IsXnu()     (SupportsXnu() && (__hostos & XNU))
#define IsFreebsd() (SupportsFreebsd() && (__hostos & FREEBSD))
#define IsOpenbsd() (SupportsOpenbsd() && (__hostos & OPENBSD))
#define IsNetbsd()  (SupportsNetbsd() && (__hostos & NETBSD))
#define IsBsd()     (IsXnu() || IsFreebsd() || IsOpenbsd() || IsNetbsd())
#else
/* clang-format off */
#define IsLinux() $LINUX,__hostos(%rip)
#define IsMetal() $METAL,__hostos(%rip)
#define IsWindows() $WINDOWS,__hostos(%rip)
#define IsBsd() $XNU|FREEBSD|OPENBSD|NETBSD,__hostos(%rip)
#define IsXnu() $XNU,__hostos(%rip)
#define IsFreebsd() $FREEBSD,__hostos(%rip)
#define IsOpenbsd() $OPENBSD,__hostos(%rip)
#define IsNetbsd() $NETBSD,__hostos(%rip)
/* clang-format on */
#endif

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const int __hostos;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/errno.h */

#define COSMOPOLITAN_LIBC_ERRNO_H_

/**
 * @fileoverview System error codes.
 * @see libc/sysv/consts.sh for numbers
 */

#define EPERM           EPERM            /* operation not permitted */
#define ENOENT          ENOENT           /* no such file or directory */
#define ESRCH           ESRCH            /* no such process */
#define EINTR           EINTR            /* interrupted system call */
#define EIO             EIO              /* input/output error */
#define ENXIO           ENXIO            /* no such device or address */
#define E2BIG           E2BIG            /* argument list too long */
#define ENOEXEC         ENOEXEC          /* exec format error */
#define EBADF           EBADF            /* bad file descriptor */
#define ECHILD          ECHILD           /* no child processes */
#define EAGAIN          EAGAIN           /* resource temporarily unavailable */
#define ENOMEM          ENOMEM           /* not enough space */
#define EACCES          EACCES           /* permission denied */
#define EFAULT          EFAULT           /* bad address */
#define ENOTBLK         ENOTBLK          /* block device required */
#define EBUSY           EBUSY            /* device or resource busy */
#define EEXIST          EEXIST           /* file exists */
#define EXDEV           EXDEV            /* improper link */
#define ENODEV          ENODEV           /* no such device */
#define ENOTDIR         ENOTDIR          /* not a directory */
#define EISDIR          EISDIR           /* is a directory */
#define EINVAL          EINVAL           /* invalid argument */
#define ENFILE          ENFILE           /* too many open files in system */
#define EMFILE          EMFILE           /* too many open files */
#define ENOTTY          ENOTTY           /* inappropriate I/O control op */
#define ETXTBSY         ETXTBSY          /* text file busy */
#define EFBIG           EFBIG            /* file too large */
#define ENOSPC          ENOSPC           /* no space left on device */
#define ESPIPE          ESPIPE           /* invalid seek */
#define EROFS           EROFS            /* read-only filesystem */
#define EMLINK          EMLINK           /* too many links */
#define EPIPE           EPIPE            /* broken pipe */
#define EDOM            EDOM             /* argument out of function domain */
#define ERANGE          ERANGE           /* result too large */
#define EDEADLK         EDEADLK          /* resource deadlock avoided */
#define ENAMETOOLONG    ENAMETOOLONG     /* filename too long */
#define ENOLCK          ENOLCK           /* no locks available */
#define ENOSYS          ENOSYS           /* system call not implemented */
#define ENOTEMPTY       ENOTEMPTY        /* directory not empty */
#define ELOOP           ELOOP            /* too many levels of symbolic links */
#define ENOMSG          ENOMSG           /* no message of the desired type */
#define EIDRM           EIDRM            /* identifier removed */
#define ECHRNG          ECHRNG           /* channel number out of range */
#define EL2NSYNC        EL2NSYNC         /* level 2 not synchronized */
#define EL3HLT          EL3HLT           /* level 3 halted */
#define EL3RST          EL3RST           /* level 3 halted */
#define ELNRNG          ELNRNG           /* link number out of range */
#define EUNATCH         EUNATCH          /* protocol driver not attached */
#define ENOCSI          ENOCSI           /* no csi structure available */
#define EL2HLT          EL2HLT           /* level 2 halted */
#define EBADE           EBADE            /* invalid exchange */
#define EBADR           EBADR            /* invalid request descriptor */
#define EXFULL          EXFULL           /* exchange full */
#define ENOANO          ENOANO           /* no anode */
#define EBADRQC         EBADRQC          /* invalid request code */
#define EBADSLT         EBADSLT          /* invalid slot */
#define ENOSTR          ENOSTR           /* no string */
#define ENODATA         ENODATA          /* no data */
#define ETIME           ETIME            /* timer expired */
#define ENOSR           ENOSR            /* out of streams resources */
#define ENONET          ENONET           /* no network */
#define ENOPKG          ENOPKG           /* package not installed */
#define EREMOTE         EREMOTE          /* object is remote */
#define ENOLINK         ENOLINK          /* link severed */
#define EADV            EADV             /* todo */
#define ESRMNT          ESRMNT           /* todo */
#define ECOMM           ECOMM            /* communication error on send */
#define EPROTO          EPROTO           /* protocol error */
#define EMULTIHOP       EMULTIHOP        /* multihop attempted */
#define EDOTDOT         EDOTDOT          /* todo */
#define EBADMSG         EBADMSG          /* bad message */
#define EOVERFLOW       EOVERFLOW        /* value too large for type */
#define ENOTUNIQ        ENOTUNIQ         /* name not unique on network */
#define EBADFD          EBADFD           /* fd in bad *state* (cf. EBADF) */
#define EREMCHG         EREMCHG          /* remote address changed */
#define ELIBACC         ELIBACC          /* cannot access dso */
#define ELIBBAD         ELIBBAD          /* corrupted shared library */
#define ELIBSCN         ELIBSCN          /* a.out section corrupted */
#define ELIBMAX         ELIBMAX          /* too many shared libraries */
#define ELIBEXEC        ELIBEXEC         /* cannot exec a dso directly */
#define EILSEQ          EILSEQ           /* invalid wide character */
#define ERESTART        ERESTART         /* please restart syscall */
#define ESTRPIPE        ESTRPIPE         /* streams pipe error */
#define EUSERS          EUSERS           /* too many users */
#define ENOTSOCK        ENOTSOCK         /* not a socket */
#define EDESTADDRREQ    EDESTADDRREQ     /* dest address needed */
#define EMSGSIZE        EMSGSIZE         /* message too long */
#define EPROTOTYPE      EPROTOTYPE       /* protocol wrong for socket */
#define ENOPROTOOPT     ENOPROTOOPT      /* protocol not available */
#define EPROTONOSUPPORT EPROTONOSUPPORT  /* protocol not supported */
#define ESOCKTNOSUPPORT ESOCKTNOSUPPORT  /* socket type not supported */
#define EOPNOTSUPP      EOPNOTSUPP       /* operation not supported on socket */
#define EPFNOSUPPORT    EPFNOSUPPORT     /* protocol family not supported */
#define EAFNOSUPPORT    EAFNOSUPPORT     /* address family not supported */
#define EADDRINUSE      EADDRINUSE       /* address already in use */
#define EADDRNOTAVAIL   EADDRNOTAVAIL    /* address not available */
#define ENETDOWN        ENETDOWN         /* network is down */
#define ENETUNREACH     ENETUNREACH      /* network unreachable */
#define ENETRESET       ENETRESET        /* connection aborted by network */
#define ECONNABORTED    ECONNABORTED     /* connection aborted */
#define ECONNRESET      ECONNRESET       /* connection reset */
#define ENOBUFS         ENOBUFS          /* no buffer space available */
#define EISCONN         EISCONN          /* socket is connected */
#define ENOTCONN        ENOTCONN         /* the socket is not connected */
#define ESHUTDOWN       ESHUTDOWN        /* no send after endpoint shutdown */
#define ETOOMANYREFS    ETOOMANYREFS     /* too many refs */
#define ETIMEDOUT       ETIMEDOUT        /* connection timed out */
#define ECONNREFUSED    ECONNREFUSED     /* connection refused */
#define EHOSTDOWN       EHOSTDOWN        /* host is down */
#define EHOSTUNREACH    EHOSTUNREACH     /* host is unreachable */
#define EALREADY        EALREADY         /* connection already in progress */
#define EINPROGRESS     EINPROGRESS      /* operation in progress */
#define ESTALE          ESTALE           /* stale file handle */
#define EUCLEAN         EUCLEAN          /* structure needs cleaning */
#define ENOTNAM         ENOTNAM          /* todo */
#define ENAVAIL         ENAVAIL          /* todo */
#define EISNAM          EISNAM           /* is a named type file */
#define EREMOTEIO       EREMOTEIO        /* remote i/o error */
#define EDQUOT          EDQUOT           /* disk quota exceeded */
#define ENOMEDIUM       ENOMEDIUM        /* no medium found */
#define EMEDIUMTYPE     EMEDIUMTYPE      /* wrong medium type */
#define ECANCELED       ECANCELED        /* operation canceled */
#define ENOKEY          ENOKEY           /* required key not available */
#define EKEYEXPIRED     EKEYEXPIRED      /* key has expired */
#define EKEYREVOKED     EKEYREVOKED      /* key has been revoked */
#define EKEYREJECTED    EKEYREJECTED     /* key was rejected by service */
#define EOWNERDEAD      EOWNERDEAD       /* owner died */
#define ENOTRECOVERABLE ENOTRECOVERABLE  /* state not recoverable */
#define ERFKILL         ERFKILL          /* can't op b/c RF-kill */
#define EHWPOISON       EHWPOISON        /* mempage has h/w error */
#define EWOULDBLOCK     EAGAIN           /* poll fd and try again */
#define ENOTSUP         ENOTSUP

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern errno_t errno;

hidden extern const long EPERM;
hidden extern const long ENOENT;
hidden extern const long ESRCH;
hidden extern const long EINTR;
hidden extern const long EIO;
hidden extern const long ENXIO;
hidden extern const long E2BIG;
hidden extern const long ENOEXEC;
hidden extern const long EBADF;
hidden extern const long ECHILD;
hidden extern const long EAGAIN;
hidden extern const long ENOMEM;
hidden extern const long EACCES;
hidden extern const long EFAULT;
hidden extern const long ENOTBLK;
hidden extern const long EBUSY;
hidden extern const long EEXIST;
hidden extern const long EXDEV;
hidden extern const long ENODEV;
hidden extern const long ENOTDIR;
hidden extern const long EISDIR;
hidden extern const long EINVAL;
hidden extern const long ENFILE;
hidden extern const long EMFILE;
hidden extern const long ENOTTY;
hidden extern const long ETXTBSY;
hidden extern const long EFBIG;
hidden extern const long ENOSPC;
hidden extern const long ESPIPE;
hidden extern const long EROFS;
hidden extern const long EMLINK;
hidden extern const long EPIPE;
hidden extern const long EDOM;
hidden extern const long ERANGE;
hidden extern const long EDEADLK;
hidden extern const long ENAMETOOLONG;
hidden extern const long ENOLCK;
hidden extern const long ENOSYS;
hidden extern const long ENOTEMPTY;
hidden extern const long ELOOP;
hidden extern const long ENOMSG;
hidden extern const long EIDRM;
hidden extern const long ECHRNG;
hidden extern const long EL2NSYNC;
hidden extern const long EL3HLT;
hidden extern const long EL3RST;
hidden extern const long ELNRNG;
hidden extern const long EUNATCH;
hidden extern const long ENOCSI;
hidden extern const long EL2HLT;
hidden extern const long EBADE;
hidden extern const long EBADR;
hidden extern const long EXFULL;
hidden extern const long ENOANO;
hidden extern const long EBADRQC;
hidden extern const long EBADSLT;
hidden extern const long ENOSTR;
hidden extern const long ENODATA;
hidden extern const long ETIME;
hidden extern const long ENOSR;
hidden extern const long ENONET;
hidden extern const long ENOPKG;
hidden extern const long EREMOTE;
hidden extern const long ENOLINK;
hidden extern const long EADV;
hidden extern const long ESRMNT;
hidden extern const long ECOMM;
hidden extern const long EPROTO;
hidden extern const long EMULTIHOP;
hidden extern const long EDOTDOT;
hidden extern const long EBADMSG;
hidden extern const long EOVERFLOW;
hidden extern const long ENOTUNIQ;
hidden extern const long EBADFD;
hidden extern const long EREMCHG;
hidden extern const long ELIBACC;
hidden extern const long ELIBBAD;
hidden extern const long ELIBSCN;
hidden extern const long ELIBMAX;
hidden extern const long ELIBEXEC;
hidden extern const long EILSEQ;
hidden extern const long ERESTART;
hidden extern const long ESTRPIPE;
hidden extern const long EUSERS;
hidden extern const long ENOTSOCK;
hidden extern const long EDESTADDRREQ;
hidden extern const long EMSGSIZE;
hidden extern const long EPROTOTYPE;
hidden extern const long ENOPROTOOPT;
hidden extern const long EPROTONOSUPPORT;
hidden extern const long ESOCKTNOSUPPORT;
hidden extern const long EOPNOTSUPP;
hidden extern const long EPFNOSUPPORT;
hidden extern const long EAFNOSUPPORT;
hidden extern const long EADDRINUSE;
hidden extern const long EADDRNOTAVAIL;
hidden extern const long ENETDOWN;
hidden extern const long ENETUNREACH;
hidden extern const long ENETRESET;
hidden extern const long ECONNABORTED;
hidden extern const long ECONNRESET;
hidden extern const long ENOBUFS;
hidden extern const long EISCONN;
hidden extern const long ENOTCONN;
hidden extern const long ESHUTDOWN;
hidden extern const long ETOOMANYREFS;
hidden extern const long ETIMEDOUT;
hidden extern const long ECONNREFUSED;
hidden extern const long EHOSTDOWN;
hidden extern const long EHOSTUNREACH;
hidden extern const long EALREADY;
hidden extern const long EINPROGRESS;
hidden extern const long ESTALE;
hidden extern const long EUCLEAN;
hidden extern const long ENOTNAM;
hidden extern const long ENAVAIL;
hidden extern const long EISNAM;
hidden extern const long EREMOTEIO;
hidden extern const long EDQUOT;
hidden extern const long ENOMEDIUM;
hidden extern const long EMEDIUMTYPE;
hidden extern const long ECANCELED;
hidden extern const long ENOKEY;
hidden extern const long EKEYEXPIRED;
hidden extern const long EKEYREVOKED;
hidden extern const long EKEYREJECTED;
hidden extern const long EOWNERDEAD;
hidden extern const long ENOTRECOVERABLE;
hidden extern const long ERFKILL;
hidden extern const long EHWPOISON;
hidden extern const long ENOTSUP;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/inttypes.h */

#define COSMOPOLITAN_LIBC_INTTYPES_H_

typedef __INT_LEAST8_TYPE__ int_least8_t;
typedef __UINT_LEAST8_TYPE__ uint_least8_t;
typedef __INT_LEAST16_TYPE__ int_least16_t;
typedef __UINT_LEAST16_TYPE__ uint_least16_t;
typedef __INT_LEAST32_TYPE__ int_least32_t;
typedef __UINT_LEAST32_TYPE__ uint_least32_t;
typedef __INT_LEAST64_TYPE__ int_least64_t;
typedef __UINT_LEAST64_TYPE__ uint_least64_t;

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § dismal format notation                                    ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#define __PRI8 "hh"

#if __SIZEOF_INT__ == 2
#define __PRI16 ""
#elif __SIZEOF_SHORT__ == 2
#define __PRI16 "h"
#elif __SIZEOF_LONG__ == 2
#define __PRI16 "l"
#endif

#if __SIZEOF_INT__ == 4
#define __PRI32 ""
#elif __SIZEOF_LONG__ == 4
#define __PRI32 "l"
#elif __SIZEOF_LONG_LONG__ == 4
#define __PRI32 "ll"
#endif

#if __SIZEOF_INT__ == 8
#define __PRI64 ""
#elif __SIZEOF_LONG__ == 8
#define __PRI64 "l"
#elif __SIZEOF_LONG_LONG__ == 8
#define __PRI64 "ll"
#endif

#if __SIZEOF_INT__ == 16
#define __PRI128 ""
#elif __SIZEOF_LONG__ == 16
#define __PRI128 "l"
#elif __SIZEOF_LONG_LONG__ == 16
#define __PRI128 "ll"
#elif __SIZEOF_INTMAX__ == 16
#define __PRI128 "j"
#endif

#if __SIZEOF_POINTER__ == __SIZEOF_INT__
#define __PRIPTR ""
#elif __SIZEOF_POINTER__ == __SIZEOF_LONG__
#define __PRIPTR "l"
#elif __SIZEOF_POINTER__ == __SIZEOF_LONG_LONG__
#define __PRIPTR "ll"
#endif

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § dismal format notation » printf » decimal                 ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#define PRId8   __PRI8 "d"
#define PRId16  __PRI16 "d"
#define PRId32  __PRI32 "d"
#define PRId64  __PRI64 "d"
#define PRId128 __PRI128 "d"

#define PRIdLEAST8   __PRI8 "d"
#define PRIdLEAST16  __PRI16 "d"
#define PRIdLEAST32  __PRI32 "d"
#define PRIdLEAST64  __PRI64 "d"
#define PRIdLEAST128 __PRI128 "d"

#define PRIdFAST8   __PRI8 "d"
#define PRIdFAST16  __PRI16 "d"
#define PRIdFAST32  __PRI32 "d"
#define PRIdFAST64  __PRI64 "d"
#define PRIdFAST128 __PRI128 "d"

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § dismal format notation » printf » unsigned decimal        ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#define PRIu8   __PRI8 "u"
#define PRIu16  __PRI16 "u"
#define PRIu32  __PRI32 "u"
#define PRIu64  __PRI64 "u"
#define PRIu128 __PRI128 "u"

#define PRIuLEAST8   __PRI8 "u"
#define PRIuLEAST16  __PRI16 "u"
#define PRIuLEAST32  __PRI32 "u"
#define PRIuLEAST64  __PRI64 "u"
#define PRIuLEAST128 __PRI128 "u"

#define PRIuFAST8   __PRI8 "u"
#define PRIuFAST16  __PRI16 "u"
#define PRIuFAST32  __PRI32 "u"
#define PRIuFAST64  __PRI64 "u"
#define PRIuFAST128 __PRI128 "u"

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § dismal format notation » printf » wut                     ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#define PRIi8   __PRI8 "i"
#define PRIi16  __PRI16 "i"
#define PRIi32  __PRI32 "i"
#define PRIi64  __PRI64 "i"
#define PRIi128 __PRI128 "i"

#define PRIiLEAST8   __PRI8 "i"
#define PRIiLEAST16  __PRI16 "i"
#define PRIiLEAST32  __PRI32 "i"
#define PRIiLEAST64  __PRI64 "i"
#define PRIiLEAST128 __PRI128 "i"

#define PRIiFAST8   __PRI8 "i"
#define PRIiFAST16  __PRI16 "i"
#define PRIiFAST32  __PRI32 "i"
#define PRIiFAST64  __PRI64 "i"
#define PRIiFAST128 __PRI128 "i"

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § dismal format notation » printf » octal                   ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#define PRIo8   __PRI8 "o"
#define PRIo16  __PRI16 "o"
#define PRIo32  __PRI32 "o"
#define PRIo64  __PRI64 "o"
#define PRIo128 __PRI128 "o"

#define PRIoLEAST8   __PRI8 "o"
#define PRIoLEAST16  __PRI16 "o"
#define PRIoLEAST32  __PRI32 "o"
#define PRIoLEAST64  __PRI64 "o"
#define PRIoLEAST128 __PRI128 "o"

#define PRIoFAST8   __PRI8 "o"
#define PRIoFAST16  __PRI16 "o"
#define PRIoFAST32  __PRI32 "o"
#define PRIoFAST64  __PRI64 "o"
#define PRIoFAST128 __PRI128 "o"

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § dismal format notation » printf » hexadecimal             ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#define PRIx8   __PRI8 "x"
#define PRIx16  __PRI16 "x"
#define PRIx32  __PRI32 "x"
#define PRIx64  __PRI64 "x"
#define PRIx128 __PRI128 "x"

#define PRIxLEAST8   __PRI8 "x"
#define PRIxLEAST16  __PRI16 "x"
#define PRIxLEAST32  __PRI32 "x"
#define PRIxLEAST64  __PRI64 "x"
#define PRIxLEAST128 __PRI128 "x"

#define PRIxFAST8   __PRI8 "x"
#define PRIxFAST16  __PRI16 "x"
#define PRIxFAST32  __PRI32 "x"
#define PRIxFAST64  __PRI64 "x"
#define PRIxFAST128 __PRI128 "x"

#define PRIX8   __PRI8 "X"
#define PRIX16  __PRI16 "X"
#define PRIX32  __PRI32 "X"
#define PRIX64  __PRI64 "X"
#define PRIX128 __PRI128 "X"

#define PRIXLEAST8   __PRI8 "X"
#define PRIXLEAST16  __PRI16 "X"
#define PRIXLEAST32  __PRI32 "X"
#define PRIXLEAST64  __PRI64 "X"
#define PRIXLEAST128 __PRI128 "X"

#define PRIXFAST8   __PRI8 "X"
#define PRIXFAST16  __PRI16 "X"
#define PRIXFAST32  __PRI32 "X"
#define PRIXFAST64  __PRI64 "X"
#define PRIXFAST128 __PRI128 "X"

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § dismal format notation » printf » binary                  ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#define PRIb8   __PRI8 "b"
#define PRIb16  __PRI16 "b"
#define PRIb32  __PRI32 "b"
#define PRIb64  __PRI64 "b"
#define PRIb128 __PRI128 "b"

#define PRIbLEAST8   __PRI8 "b"
#define PRIbLEAST16  __PRI16 "b"
#define PRIbLEAST32  __PRI32 "b"
#define PRIbLEAST64  __PRI64 "b"
#define PRIbLEAST128 __PRI128 "b"

#define PRIbFAST8   __PRI8 "b"
#define PRIbFAST16  __PRI16 "b"
#define PRIbFAST32  __PRI32 "b"
#define PRIbFAST64  __PRI64 "b"
#define PRIbFAST128 __PRI128 "b"

#define PRIB8   __PRI8 "B"
#define PRIB16  __PRI16 "B"
#define PRIB32  __PRI32 "B"
#define PRIB64  __PRI64 "B"
#define PRIB128 __PRI128 "B"

#define PRIBLEAST8   __PRI8 "B"
#define PRIBLEAST16  __PRI16 "B"
#define PRIBLEAST32  __PRI32 "B"
#define PRIBLEAST64  __PRI64 "B"
#define PRIBLEAST128 __PRI128 "B"

#define PRIBFAST8   __PRI8 "B"
#define PRIBFAST16  __PRI16 "B"
#define PRIBFAST32  __PRI32 "B"
#define PRIBFAST64  __PRI64 "B"
#define PRIBFAST128 __PRI128 "B"

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § dismal format notation » printf » miscellaneous           ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#define PRIdMAX "jd"
#define PRIiMAX "ji"
#define PRIoMAX "jo"
#define PRIuMAX "ju"
#define PRIxMAX "jx"
#define PRIXMAX "jX"

#define PRIdPTR __PRIPTR "d"
#define PRIiPTR __PRIPTR "i"
#define PRIoPTR __PRIPTR "o"
#define PRIuPTR __PRIPTR "u"
#define PRIxPTR __PRIPTR "x"
#define PRIXPTR __PRIPTR "X"

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § dismal format notation » scanf » decimal                  ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#define SCNd8   __PRI8 "d"
#define SCNd16  __PRI16 "d"
#define SCNd32  __PRI32 "d"
#define SCNd64  __PRI64 "d"
#define SCNd128 __PRI128 "d"

#define SCNdLEAST8   __PRI8 "d"
#define SCNdLEAST16  __PRI16 "d"
#define SCNdLEAST32  __PRI32 "d"
#define SCNdLEAST64  __PRI64 "d"
#define SCNdLEAST128 __PRI128 "d"

#define SCNdFAST8   __PRI8 "d"
#define SCNdFAST16  __PRI16 "d"
#define SCNdFAST32  __PRI32 "d"
#define SCNdFAST64  __PRI64 "d"
#define SCNdFAST128 __PRI128 "d"

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § dismal format notation » scanf » flexidecimal             ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#define SCNi8   __PRI8 "i"
#define SCNi16  __PRI16 "i"
#define SCNi32  __PRI32 "i"
#define SCNi64  __PRI64 "i"
#define SCNi128 __PRI128 "i"

#define SCNiLEAST8   __PRI8 "i"
#define SCNiLEAST16  __PRI16 "i"
#define SCNiLEAST32  __PRI32 "i"
#define SCNiLEAST64  __PRI64 "i"
#define SCNiLEAST128 __PRI128 "i"

#define SCNiFAST8   __PRI8 "i"
#define SCNiFAST16  __PRI16 "i"
#define SCNiFAST32  __PRI32 "i"
#define SCNiFAST64  __PRI64 "i"
#define SCNiFAST128 __PRI128 "i"

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § dismal format notation » scanf » unsigned decimal         ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#define SCNu8   __PRI8 "u"
#define SCNu16  __PRI16 "u"
#define SCNu32  __PRI32 "u"
#define SCNu64  __PRI64 "u"
#define SCNu128 __PRI128 "u"

#define SCNuLEAST8   __PRI8 "u"
#define SCNuLEAST16  __PRI16 "u"
#define SCNuLEAST32  __PRI32 "u"
#define SCNuLEAST64  __PRI64 "u"
#define SCNuLEAST128 __PRI128 "u"

#define SCNuFAST8   __PRI8 "u"
#define SCNuFAST16  __PRI16 "u"
#define SCNuFAST32  __PRI32 "u"
#define SCNuFAST64  __PRI64 "u"
#define SCNuFAST128 __PRI128 "u"

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § dismal format notation » scanf » octal                    ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#define SCNo8   __PRI8 "o"
#define SCNo16  __PRI16 "o"
#define SCNo32  __PRI32 "o"
#define SCNo64  __PRI64 "o"
#define SCNo128 __PRI128 "o"

#define SCNoLEAST8   __PRI8 "o"
#define SCNoLEAST16  __PRI16 "o"
#define SCNoLEAST32  __PRI32 "o"
#define SCNoLEAST64  __PRI64 "o"
#define SCNoLEAST128 __PRI128 "o"

#define SCNoFAST8   __PRI8 "o"
#define SCNoFAST16  __PRI16 "o"
#define SCNoFAST32  __PRI32 "o"
#define SCNoFAST64  __PRI64 "o"
#define SCNoFAST128 __PRI128 "o"

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § dismal format notation » scanf » hexadecimal              ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#define SCNx8   __PRI8 "x"
#define SCNx16  __PRI16 "x"
#define SCNx32  __PRI32 "x"
#define SCNx64  __PRI64 "x"
#define SCNx128 __PRI128 "x"

#define SCNxLEAST8   __PRI8 "x"
#define SCNxLEAST16  __PRI16 "x"
#define SCNxLEAST32  __PRI32 "x"
#define SCNxLEAST64  __PRI64 "x"
#define SCNxLEAST128 __PRI128 "x"

#define SCNxFAST8   __PRI8 "x"
#define SCNxFAST16  __PRI16 "x"
#define SCNxFAST32  __PRI32 "x"
#define SCNxFAST64  __PRI64 "x"
#define SCNxFAST128 __PRI128 "x"

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § dismal format notation » scanf » binary                   ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#define SCNb8   __PRI8 "b"
#define SCNb16  __PRI16 "b"
#define SCNb32  __PRI32 "b"
#define SCNb64  __PRI64 "b"
#define SCNb128 __PRI128 "b"

#define SCNbLEAST8   __PRI8 "b"
#define SCNbLEAST16  __PRI16 "b"
#define SCNbLEAST32  __PRI32 "b"
#define SCNbLEAST64  __PRI64 "b"
#define SCNbLEAST128 __PRI128 "b"

#define SCNbFAST8   __PRI8 "b"
#define SCNbFAST16  __PRI16 "b"
#define SCNbFAST32  __PRI32 "b"
#define SCNbFAST64  __PRI64 "b"
#define SCNbFAST128 __PRI128 "b"

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § dismal format notation » scanf » miscellaneous            ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#define SCNdMAX "jd"
#define SCNiMAX "ji"
#define SCNoMAX "jo"
#define SCNuMAX "ju"
#define SCNxMAX "jx"

#define SCNdPTR __PRIPTR "d"
#define SCNiPTR __PRIPTR "i"
#define SCNoPTR __PRIPTR "o"
#define SCNuPTR __PRIPTR "u"
#define SCNxPTR __PRIPTR "x"



/*!BEGIN libc/limits.h */

#define COSMOPOLITAN_LIBC_LIMITS_H_

#define UCHAR_MIN 0
#define UCHAR_MAX 255

#if '\200' < 0
#define CHAR_MIN '\200'
#define CHAR_MAX '\177'
#else
#define CHAR_MIN '\0'
#define CHAR_MAX '\377'
#endif

#define SCHAR_MAX     __SCHAR_MAX__
#define SHRT_MAX      __SHRT_MAX__
#define INT_MAX       __INT_MAX__
#define LONG_MAX      __LONG_MAX__
#define LLONG_MAX     LONG_LONG_MAX
#define LONG_LONG_MAX __LONG_LONG_MAX__
#define SIZE_MAX      __SIZE_MAX__
#define INT8_MAX      __INT8_MAX__
#define INT16_MAX     __INT16_MAX__
#define INT32_MAX     __INT32_MAX__
#define INT64_MAX     __INT64_MAX__
#define WINT_MAX      __WCHAR_MAX__
#define WCHAR_MAX     __WCHAR_MAX__
#define INTPTR_MAX    __INTPTR_MAX__
#define PTRDIFF_MAX   __PTRDIFF_MAX__
#define UINTPTR_MAX   __UINTPTR_MAX__
#define UINT8_MAX     __UINT8_MAX__
#define UINT16_MAX    __UINT16_MAX__
#define UINT32_MAX    __UINT32_MAX__
#define UINT64_MAX    __UINT64_MAX__

#define SCHAR_MIN     (-SCHAR_MAX - 1)
#define SHRT_MIN      (-SHRT_MAX - 1)
#define INT_MIN       (-INT_MAX - 1)
#define LONG_MIN      (-LONG_MAX - 1)
#define LLONG_MIN     (-LLONG_MAX - 1)
#define LONG_LONG_MIN (-LONG_LONG_MAX - 1)
#define SIZE_MIN      (-SIZE_MAX - 1)
#define INT8_MIN      (-INT8_MAX - 1)
#define INT16_MIN     (-INT16_MAX - 1)
#define INT32_MIN     (-INT32_MAX - 1)
#define INT64_MIN     (-INT64_MAX - 1)
#define INTMAX_MIN    (-INTMAX_MAX - 1)
#define INTPTR_MIN    (-INTPTR_MAX - 1)
#define WINT_MIN      (-WINT_MAX - 1)
#define WCHAR_MIN     (-WCHAR_MAX - 1)
#define PTRDIFF_MIN   (-PTRDIFF_MAX - 1)

#define USHRT_MAX 65535
#define UINT_MAX  0xffffffffu
#if __SIZEOF_LONG__ == 8
#define ULONG_MAX 0xfffffffffffffffful
#else
#define ULONG_MAX 0xfffffffful
#endif
#define ULLONG_MAX     0xffffffffffffffffull
#define ULONG_LONG_MAX 0xffffffffffffffffull

#define USHRT_MIN      0
#define UINT_MIN       0u
#define ULONG_MIN      0ul
#define ULLONG_MIN     0ull
#define ULONG_LONG_MIN 0ull
#define UINT8_MIN      0
#define UINT16_MIN     0
#define UINT32_MIN     0u
#define UINT64_MIN     0ull
#define UINTPTR_MIN    0ull

#define MB_CUR_MAX 4
#define MB_LEN_MAX 4

#if !(__ASSEMBLER__ + __LINKER__ + 0)

#if __GNUC__ * 100 + __GNUC_MINOR__ >= 406 || defined(__llvm__)
#define INTMAX_MAX \
  (((intmax_t)0x7fffffffffffffff) << 64 | (intmax_t)0xffffffffffffffff)
#define UINTMAX_MAX \
  (((uintmax_t)0xffffffffffffffff) << 64 | (uintmax_t)0xffffffffffffffff)
#define INT128_MIN  INTMAX_MIN
#define INT128_MAX  INTMAX_MAX
#define UINTMAX_MIN ((uintmax_t)0)
#define UINT128_MIN ((uintmax_t)0)
#define UINT128_MAX UINTMAX_MAX
#else
#define INTMAX_MAX  __INT64_MAX__
#define UINTMAX_MAX __UINT64_MAX__
#define UINTMAX_MIN UINT64_MIN
#endif /* GCC 4.6+ */

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/literal.h */

#define COSMOPOLITAN_LIBC_LITERAL_H_

#ifdef __INT8_C
#define INT8_C(c)   __INT8_C(c)
#define UINT8_C(c)  __UINT8_C(c)
#define INT16_C(c)  __INT16_C(c)
#define UINT16_C(c) __UINT16_C(c)
#define INT32_C(c)  __INT32_C(c)
#define UINT32_C(c) __UINT32_C(c)
#define INT64_C(c)  __INT64_C(c)
#define UINT64_C(c) __UINT64_C(c)
#else
#define INT8_C(c)   c
#define UINT8_C(c)  c
#define INT16_C(c)  c
#define UINT16_C(c) c
#define INT32_C(c)  c
#define UINT32_C(c) c##U
#define INT64_C(c)  c##L
#define UINT64_C(c) c##UL
#endif

#if __SIZEOF_INTMAX__ == 16
#define INT128_C(c)  ((intmax_t)(c))
#define UINT128_C(c) ((uintmax_t)(c))
#elif __SIZEOF_INTMAX__ == 8
#define INT128_C(c)  __INT64_C(c)
#define UINT128_C(c) __UINT64_C(c)
#endif



/*!BEGIN libc/mach.h */

#define COSMOPOLITAN_LIBC_MACH_H_
/*                                            ▄▄███▄
                                          ▄▄████████▄
                                       ▄█████████████▄
                                   ▄▄███▓▓▓▓▓▓▓▓▓▓▓███▄
                               ▄▄█████▓▓▓█████████▓▓▓██▄
                           ▄▄████████▓▓▓███████▓▓▓▓▓████▄
                        ▄█████░░░████▓▓█████▓▓▓▓█████████▄
                    ▄▄█████████░░░███▓▓█▓▓▓▓▒███████▓▓▒███▄
                 ▄██████████████░░░██▓▓▓▓███████████▓▓█████▄
               ██████████████████░░░██▓▓▓█████████▓▓▓███████▄
                ███░░░░░░█████████▓░░███▓▓▓▓▓▓▓▓▓▓▓█████▒▒▒██▄
               █░███░░░██░░░░░░░░░██░░██████████████▒▒▒▒██████▄
              ███████░░░█████████░░░░░░█████████▒▒▒▒▒██████████▄
              █████ ██░░░███████████████████▒▒▒▒▒██░▒▒██████████▄
              ██████ ██░░░██████████████░███▒████████▒▒██████████▄
             ████████ ███░░█████████████░░████████████▒▒███████████
             █████████ ███░░███████████░░██████████████▒▒███████████
            ▄██████████ ██████████████ ░░███████████████▒▒███████████
            ████████████ ███░░░░░█████░░█████████████████▒▒██████  █
            █████████████ ██████░░░░░░░▒█████████████████████  ████▀
             █████████████ ██████████░░░░░░░░░███████████  ████████
              █████████████ ████████░░███████░░░██████ ▓██████████
               █████████████ ██████░░░████████████  █████████████
╔────────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § xnu's not unix! » carnegie mellon mach microkernel        ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#define XNU_SYSCALL_MASK_MACH     0x1000000
#define XNU_SYSCALL_MASK_UNIX     0x2000000
#define XNU_SYSCALL_MASK_MACH_IPC 0x5000000

#define kXnuCommonPage   0x00007fffffe00000
#define kXnuNtTscBase    0x050 /* uint64_t */
#define kXnuNtScale      0x058 /* uint32_t */
#define kXnuNtShift      0x05c /* uint32_t */
#define kXnuNtNsBase     0x060 /* uint64_t */
#define kXnuNtGeneration 0x068 /* uint32_t */

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

bool swtch(void);
bool swtch_pri(int);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/math.h */

#define COSMOPOLITAN_LIBC_MATH_H_
/*─────────────────────────────────────────────────────────────────────────────╗
│ cosmopolitan § mathematics                                                   │
╚─────────────────────────────────────────────────────────────────────────────*/

#define M_E        2.7182818284590452354 /* 𝑒 */
#define M_LOG2_10  0xd.49a784bcd1b8afep-2 /* log₂10 ≈ 3.3219280948873623478 */
#define M_LOG10_2  0x9.a209a84fbcff799p-5 /* log₁₀2 ≈ 0.301029995663981195 */
#define M_LOG2E    0xb.8aa3b295c17f0bcp-3 /* log₂𝑒 ≈ 1.4426950408889634074 */
#define M_LOG10E   0.43429448190325182765  /* log₁₀𝑒 */
#define M_LN2      0xb.17217f7d1cf79acp-4  /* logₑ2 ≈ */
#define M_LN10     2.30258509299404568402  /* logₑ10 */
#define M_TAU      0x1.921fb54442d1846ap+2 /* τ = 2π */
#define M_PI       0x1.921fb54442d1846ap+1 /* π ≈ 3.14159265358979323846 */
#define M_PI_2     1.57079632679489661923  /* π/2 */
#define M_PI_4     0.78539816339744830962  /* π/4 */
#define M_1_PI     0.31830988618379067154  /* 1/π */
#define M_2_PI     0.63661977236758134308  /* 2/π */
#define M_2_SQRTPI 1.12837916709551257390  /* 2/sqrtπ */
#define M_SQRT2    1.41421356237309504880  /* sqrt2 */
#define M_SQRT1_2  0.70710678118654752440  /* 1/sqrt2 */

#define DBL_DECIMAL_DIG  __DBL_DECIMAL_DIG__
#define DBL_DIG          __DBL_DIG__
#define DBL_EPSILON      __DBL_EPSILON__
#define DBL_MANT_DIG     __DBL_MANT_DIG__
#define DBL_MANT_DIG     __DBL_MANT_DIG__
#define DBL_MAX          __DBL_MAX__
#define DBL_MAX_10_EXP   __DBL_MAX_10_EXP__
#define DBL_MAX_EXP      __DBL_MAX_EXP__
#define DBL_MIN          __DBL_MIN__ /* 2.23e–308 ↔ 1.79e308 */
#define DBL_MIN_10_EXP   __DBL_MIN_10_EXP__
#define DBL_MIN_EXP      __DBL_MIN_EXP__
#define DECIMAL_DIG      __LDBL_DECIMAL_DIG__
#define FLT_DECIMAL_DIG  __FLT_DECIMAL_DIG__
#define FLT_RADIX        __FLT_RADIX__
#define FLT_DIG          __FLT_DIG__
#define FLT_EPSILON      __FLT_EPSILON__
#define FLT_MANT_DIG     __FLT_MANT_DIG__
#define FLT_MANT_DIG     __FLT_MANT_DIG__
#define FLT_MAX          __FLT_MAX__
#define FLT_MAX_10_EXP   __FLT_MAX_10_EXP__
#define FLT_MAX_EXP      __FLT_MAX_EXP__
#define FLT_MIN          __FLT_MIN__ /* 1.18e–38 ↔ 3.40e38 */
#define FLT_MIN_10_EXP   __FLT_MIN_10_EXP__
#define FLT_MIN_EXP      __FLT_MIN_EXP__
#define HLF_MAX          6.50e4f
#define HLF_MIN          3.10e-5f
#define LDBL_DECIMAL_DIG __LDBL_DECIMAL_DIG__
#define LDBL_DIG         __LDBL_DIG__
#define LDBL_EPSILON     __LDBL_EPSILON__
#define LDBL_MANT_DIG    __LDBL_MANT_DIG__
#define LDBL_MANT_DIG    __LDBL_MANT_DIG__
#define LDBL_MAX         __LDBL_MAX__
#define LDBL_MAX_10_EXP  __LDBL_MAX_10_EXP__
#define LDBL_MAX_EXP     __LDBL_MAX_EXP__
#define LDBL_MIN         __LDBL_MIN__ /* 3.37e–4932 ↔ 1.18e4932 */
#define LDBL_MIN_10_EXP  __LDBL_MIN_10_EXP__
#define LDBL_MIN_EXP     __LDBL_MIN_EXP__

#define FP_NAN       0
#define FP_INFINITE  1
#define FP_ZERO      2
#define FP_SUBNORMAL 3
#define FP_NORMAL    4

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

#define NAN      __builtin_nanf("")
#define INFINITY __builtin_inff()
#define HUGE_VAL __builtin_inff()

#if __FLT_EVAL_METHOD__ + 0 == 2
typedef long double float_t;
typedef long double double_t;
#else
typedef float float_t;
typedef double double_t;
#endif

#define isinf(x)             __builtin_isinf(x)
#define isnan(x)             __builtin_isnan(x)
#define isfinite(x)          __builtin_isfinite(x)
#define isnormal(x)          __builtin_isnormal(x)
#define signbit(x)           __builtin_signbit(x)
#define isgreater(x, y)      __builtin_isgreater(x, y)
#define isgreaterequal(x, y) __builtin_isgreaterequal(x, y)
#define isless(x, y)         __builtin_isless(x, y)
#define islessequal(x, y)    __builtin_islessequal(x, y)
#define islessgreater(x, y)  __builtin_islessgreater(x, y)
#define isunordered(x, y)    __builtin_isunordered(x, y)

#define fpclassify(x) \
  __builtin_fpclassify(FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, x)

double acos(double);
double acosh(double);
double asin(double);
double asinh(double);
double atan(double);
double atan2(double, double);
double atanh(double);
double cbrt(double);
double ceil(double);
double copysign(double, double);
double cos(double);
double cosh(double);
double drem(double, double);
double erf(double);
double erfc(double);
double exp(double);
double exp10(double);
double exp2(double);
double expm1(double);
double fabs(double);
double fdim(double, double);
double floor(double);
double fma(double, double, double);
double fmax(double, double);
double fmin(double, double);
double fmod(double, double);
double hypot(double, double);
double ldexp(double, int);
double log(double);
double log10(double);
double log1p(double);
double log2(double);
double logb(double);
double nearbyint(double);
double nextafter(double, double);
double nexttoward(double, long double);
double pow(double, double);
double pow10(double);
double powi(double, int);
double remainder(double, double);
double rint(double);
double round(double);
double scalb(double, double);
double scalbln(double, long int);
double scalbn(double, int);
double significand(double);
double sin(double);
double sinh(double);
double sqrt(double);
double tan(double);
double tanh(double);
double trunc(double);
double lgamma(double);
double lgamma_r(double, int *);

float acosf(float);
float acoshf(float);
float asinf(float);
float asinhf(float);
float atan2f(float, float);
float atanf(float);
float atanhf(float);
float cbrtf(float);
float ceilf(float);
float copysignf(float, float);
float cosf(float);
float coshf(float);
float dremf(float, float);
float erfcf(float);
float erff(float);
float exp10f(float);
float exp2f(float);
float expf(float);
float expm1f(float);
float fabsf(float);
float fdimf(float, float);
float floorf(float);
float fmaf(float, float, float);
float fmaxf(float, float);
float fminf(float, float);
float fmodf(float, float);
float hypotf(float, float);
float ldexpf(float, int);
float log10f(float);
float log1pf(float);
float log2f(float);
float logbf(float);
float logf(float);
float nearbyintf(float);
float nextafterf(float, float);
float nexttowardf(float, long double);
float pow10f(float);
float powf(float, float);
float powif(float, int);
float remainderf(float, float);
float rintf(float);
float roundf(float);
float scalbf(float, float);
float scalblnf(float, long int);
float scalbnf(float, int);
float significandf(float);
float sinf(float);
float sinhf(float);
float sqrtf(float);
float tanf(float);
float tanhf(float);
float truncf(float);

long double acoshl(long double);
long double acosl(long double);
long double asinhl(long double);
long double asinl(long double);
long double atan2l(long double, long double);
long double atanhl(long double);
long double atanl(long double);
long double cbrtl(long double);
long double ceill(long double);
long double copysignl(long double, long double);
long double coshl(long double);
long double cosl(long double);
long double dreml(long double, long double);
long double erfcl(long double);
long double erfl(long double);
long double exp10l(long double);
long double exp2l(long double);
long double expl(long double);
long double expm1l(long double);
long double fabsl(long double);
long double fdiml(long double, long double);
long double floorl(long double);
long double fmal(long double, long double, long double);
long double fmaxl(long double, long double);
long double fminl(long double, long double);
long double fmodl(long double, long double);
long double hypotl(long double, long double);
long double ldexpl(long double, int);
long double log10l(long double);
long double log1pl(long double);
long double log2l(long double);
long double logbl(long double);
long double logl(long double);
long double nearbyintl(long double);
long double nextafterl(long double, long double);
long double nexttowardl(long double, long double);
long double pow10l(long double);
long double powil(long double, int);
long double powl(long double, long double);
long double remainderl(long double, long double);
long double rintl(long double);
long double roundl(long double);
long double scalbl(long double, long double);
long double scalblnl(long double, long int);
long double scalbnl(long double, int);
long double significandl(long double);
long double sinhl(long double);
long double sinl(long double);
long double sqrtl(long double);
long double tanhl(long double);
long double tanl(long double);
long double truncl(long double);

long lrint(double);
long lrintf(float);
long lrintl(long double);
long lround(double);
long lroundf(float);
long lroundl(long double);

int ilogbf(float);
int ilogb(double);
int ilogbl(long double);

long long llrint(double);
long long llrintf(float);
long long llrintl(long double);
long long llround(double);
long long llroundf(float);
long long llroundl(long double);

double frexp(double, int *);
double modf(double, double *);
double remquo(double, double, int *);
float frexpf(float, int *);
float modff(float, float *);
float remquof(float, float, int *);
long double frexpl(long double, int *);
long double modfl(long double, long double *);
long double remquol(long double, long double, int *);
void sincos(double, double *, double *);
void sincosf(float, float *, float *);
void sincosl(long double, long double *, long double *);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/paths.h */

#define COSMOPOLITAN_LIBC_PATHS_H_

#define _PATH_DEFPATH "/usr/local/bin:/bin:/usr/bin"
#define _PATH_STDPATH "/bin:/usr/bin:/sbin:/usr/sbin"

#define _PATH_BSHELL "/bin/sh"
#define _PATH_CONSOLE "/dev/console"
#define _PATH_DEVNULL "/dev/null"
#define _PATH_KLOG "/proc/kmsg"
#define _PATH_LASTLOG "/var/log/lastlog"
#define _PATH_MAILDIR "/var/mail"
#define _PATH_MAN "/usr/share/man"
#define _PATH_MNTTAB "/etc/fstab"
#define _PATH_MOUNTED "/etc/mtab"
#define _PATH_NOLOGIN "/etc/nologin"
#define _PATH_SENDMAIL "/usr/sbin/sendmail"
#define _PATH_SHADOW "/etc/shadow"
#define _PATH_SHELLS "/etc/shells"
#define _PATH_TTY "/dev/tty"
#define _PATH_UTMP "/dev/null/utmp"
#define _PATH_VI "/usr/bin/vi"
#define _PATH_WTMP "/dev/null/wtmp"

#define _PATH_DEV "/dev/"
#define _PATH_TMP "/tmp/"
#define _PATH_VARDB "/var/lib/misc/"
#define _PATH_VARRUN "/var/run/"
#define _PATH_VARTMP "/var/tmp/"



/*!BEGIN libc/zip.h */

#define COSMOPOLITAN_LIBC_ZIP_H_


/*!BEGIN libc/bits/bits.h */

#define COSMOPOLITAN_LIBC_BITS_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

#define CheckUnsigned(x) ((x) / !((typeof(x))(-1) < 0))

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § bits                                                      ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

extern const uint8_t kReverseBits[256];

uint32_t gray(uint32_t) pureconst;
uint32_t ungray(uint32_t) pureconst;
uint8_t bitreverse8(uint8_t) libcesque pureconst;
uint16_t bitreverse16(uint16_t) libcesque pureconst;
uint32_t bitreverse32(uint32_t) libcesque pureconst;
uint64_t bitreverse64(uint64_t) libcesque pureconst;
unsigned long roundup2pow(unsigned long) libcesque pureconst;
unsigned long roundup2log(unsigned long) libcesque pureconst;
unsigned long rounddown2pow(unsigned long) libcesque pureconst;
unsigned long hamming(unsigned long, unsigned long) pureconst;
intptr_t lockxchg(void *, void *, size_t);
bool cmpxchg(void *, intptr_t, intptr_t, size_t);
bool lockcmpxchg(void *, intptr_t, intptr_t, size_t);
intptr_t atomic_load(void *, size_t);
intptr_t atomic_store(void *, intptr_t, size_t);

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § bits » no assembly required                               ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#define bitreverse8(X) (kReverseBits[(uint8_t)(X)])
#define bitreverse16(X)                          \
  ((uint16_t)kReverseBits[(uint8_t)(X)] << 010 | \
   kReverseBits[((uint16_t)(X) >> 010) & 0xff])

#define READ16LE(S)                             \
  ((uint16_t)((unsigned char *)(S))[1] << 010 | \
   (uint16_t)((unsigned char *)(S))[0] << 000)
#define READ32LE(S)                             \
  ((uint32_t)((unsigned char *)(S))[3] << 030 | \
   (uint32_t)((unsigned char *)(S))[2] << 020 | \
   (uint32_t)((unsigned char *)(S))[1] << 010 | \
   (uint32_t)((unsigned char *)(S))[0] << 000)
#define READ64LE(S)                             \
  ((uint64_t)((unsigned char *)(S))[7] << 070 | \
   (uint64_t)((unsigned char *)(S))[6] << 060 | \
   (uint64_t)((unsigned char *)(S))[5] << 050 | \
   (uint64_t)((unsigned char *)(S))[4] << 040 | \
   (uint64_t)((unsigned char *)(S))[3] << 030 | \
   (uint64_t)((unsigned char *)(S))[2] << 020 | \
   (uint64_t)((unsigned char *)(S))[1] << 010 | \
   (uint64_t)((unsigned char *)(S))[0] << 000)

#define READ16BE(S)                             \
  ((uint16_t)((unsigned char *)(S))[0] << 010 | \
   (uint16_t)((unsigned char *)(S))[1] << 000)
#define READ32BE(S)                             \
  ((uint32_t)((unsigned char *)(S))[0] << 030 | \
   (uint32_t)((unsigned char *)(S))[1] << 020 | \
   (uint32_t)((unsigned char *)(S))[2] << 010 | \
   (uint32_t)((unsigned char *)(S))[3] << 000)
#define READ64BE(S)                             \
  ((uint64_t)((unsigned char *)(S))[0] << 070 | \
   (uint64_t)((unsigned char *)(S))[1] << 060 | \
   (uint64_t)((unsigned char *)(S))[2] << 050 | \
   (uint64_t)((unsigned char *)(S))[3] << 040 | \
   (uint64_t)((unsigned char *)(S))[4] << 030 | \
   (uint64_t)((unsigned char *)(S))[5] << 020 | \
   (uint64_t)((unsigned char *)(S))[6] << 010 | \
   (uint64_t)((unsigned char *)(S))[7] << 000)

#define WRITE16LE(P, V)             \
  do {                              \
    uint8_t *Ple = (uint8_t *)(P);  \
    uint16_t Vle = (V);             \
    Ple[0] = (uint8_t)(Vle >> 000); \
    Ple[1] = (uint8_t)(Vle >> 010); \
  } while (0)
#define WRITE32LE(P, V)             \
  do {                              \
    uint8_t *Ple = (uint8_t *)(P);  \
    uint32_t Vle = (V);             \
    Ple[0] = (uint8_t)(Vle >> 000); \
    Ple[1] = (uint8_t)(Vle >> 010); \
    Ple[2] = (uint8_t)(Vle >> 020); \
    Ple[3] = (uint8_t)(Vle >> 030); \
  } while (0)
#define WRITE64LE(P, V)             \
  do {                              \
    uint8_t *Ple = (uint8_t *)(P);  \
    uint64_t Vle = (V);             \
    Ple[0] = (uint8_t)(Vle >> 000); \
    Ple[1] = (uint8_t)(Vle >> 010); \
    Ple[2] = (uint8_t)(Vle >> 020); \
    Ple[3] = (uint8_t)(Vle >> 030); \
    Ple[4] = (uint8_t)(Vle >> 040); \
    Ple[5] = (uint8_t)(Vle >> 050); \
    Ple[6] = (uint8_t)(Vle >> 060); \
    Ple[7] = (uint8_t)(Vle >> 070); \
  } while (0)

#define WRITE16BE(P, V)             \
  do {                              \
    uint8_t *Ple = (uint8_t *)(P);  \
    uint16_t Vle = (V);             \
    Ple[1] = (uint8_t)(Vle >> 000); \
    Ple[0] = (uint8_t)(Vle >> 010); \
  } while (0)
#define WRITE32BE(P, V)             \
  do {                              \
    uint8_t *Ple = (uint8_t *)(P);  \
    uint32_t Vle = (V);             \
    Ple[3] = (uint8_t)(Vle >> 000); \
    Ple[2] = (uint8_t)(Vle >> 010); \
    Ple[1] = (uint8_t)(Vle >> 020); \
    Ple[0] = (uint8_t)(Vle >> 030); \
  } while (0)
#define WRITE64BE(P, V)             \
  do {                              \
    uint8_t *Ple = (uint8_t *)(P);  \
    uint64_t Vle = (V);             \
    Ple[7] = (uint8_t)(Vle >> 000); \
    Ple[6] = (uint8_t)(Vle >> 010); \
    Ple[5] = (uint8_t)(Vle >> 020); \
    Ple[4] = (uint8_t)(Vle >> 030); \
    Ple[3] = (uint8_t)(Vle >> 040); \
    Ple[2] = (uint8_t)(Vle >> 050); \
    Ple[1] = (uint8_t)(Vle >> 060); \
    Ple[0] = (uint8_t)(Vle >> 070); \
  } while (0)

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § bits » some assembly required                             ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)

/*
 * Constraints for virtual machine flags.
 * @note we beseech clang devs for flag constraints
 */
#ifdef __GCC_ASM_FLAG_OUTPUTS__ /* GCC6+ CLANG10+ */
#define CFLAG_CONSTRAINT  "=@ccc"
#define CFLAG_ASM(OP)     OP
#define ZFLAG_CONSTRAINT  "=@ccz"
#define ZFLAG_ASM(OP)     OP
#define OFLAG_CONSTRAINT  "=@cco"
#define OFLAG_ASM(OP)     OP
#define SFLAG_CONSTRAINT  "=@ccs"
#define SFLAG_ASM(SP)     SP
#define ABOVE_CONSTRAINT  "=@cca" /* i.e. !ZF && !CF */
#define ABOVEFLAG_ASM(OP) OP
#else
#define CFLAG_CONSTRAINT  "=q"
#define CFLAG_ASM(OP)     OP "\n\tsetc\t%b0"
#define ZFLAG_CONSTRAINT  "=q"
#define ZFLAG_ASM(OP)     OP "\n\tsetz\t%b0"
#define OFLAG_CONSTRAINT  "=q"
#define OFLAG_ASM(OP)     OP "\n\tseto\t%b0"
#define SFLAG_CONSTRAINT  "=q"
#define SFLAG_ASM(SP)     OP "\n\tsets\t%b0"
#define ABOVE_CONSTRAINT  "=@cca"
#define ABOVEFLAG_ASM(OP) OP "\n\tseta\t%b0"
#endif

/**
 * Reads scalar from memory w/ one operation.
 *
 * @param MEM is alignas(𝑘) uint𝑘_t[hasatleast 1] where 𝑘 ∈ {8,16,32,64}
 * @return *(MEM)
 * @note defeats compiler load tearing optimizations
 * @note alignas(𝑘) is implied if compiler knows type
 * @note alignas(𝑘) only avoids multi-core / cross-page edge cases
 * @see Intel's Six-Thousand Page Manual V.3A §8.2.3.1
 * @see atomic_store()
 */
#define atomic_load(MEM)                       \
  ({                                           \
    autotype(MEM) Mem = (MEM);                 \
    typeof(*Mem) Reg;                          \
    asm("mov\t%1,%0" : "=r"(Reg) : "m"(*Mem)); \
    Reg;                                       \
  })

/**
 * Saves scalar to memory w/ one operation.
 *
 * This is guaranteed to happen in either one or zero operations,
 * depending on whether or not it's possible for *(MEM) to be read
 * afterwards. This macro only forbids compiler from using >1 ops.
 *
 * @param MEM is alignas(𝑘) uint𝑘_t[hasatleast 1] where 𝑘 ∈ {8,16,32,64}
 * @param VAL is uint𝑘_t w/ better encoding for immediates (constexpr)
 * @return VAL
 * @note alignas(𝑘) on nexgen32e only needed for end of page gotcha
 * @note alignas(𝑘) is implied if compiler knows type
 * @note needed to defeat store tearing optimizations
 * @see Intel Six-Thousand Page Manual Manual V.3A §8.2.3.1
 * @see atomic_load()
 */
#define atomic_store(MEM, VAL)                    \
  ({                                              \
    autotype(VAL) Val = (VAL);                    \
    typeof(&Val) Mem = (MEM);                     \
    asm("mov%z1\t%1,%0" : "=m"(*Mem) : "r"(Val)); \
    Val;                                          \
  })

#define bts(MEM, BIT)     __BitOp("bts", BIT, MEM) /** bit test and set */
#define btr(MEM, BIT)     __BitOp("btr", BIT, MEM) /** bit test and reset */
#define btc(MEM, BIT)     __BitOp("btc", BIT, MEM) /** bit test and complement */
#define lockbts(MEM, BIT) __BitOp("lock bts", BIT, MEM)
#define lockbtr(MEM, BIT) __BitOp("lock btr", BIT, MEM)
#define lockbtc(MEM, BIT) __BitOp("lock btc", BIT, MEM)

#define lockinc(MEM) __ArithmeticOp1("lock inc", MEM)
#define lockdec(MEM) __ArithmeticOp1("lock dec", MEM)
#define locknot(MEM) __ArithmeticOp1("lock not", MEM)
#define lockneg(MEM) __ArithmeticOp1("lock neg", MEM)

#define lockaddeq(MEM, VAL) __ArithmeticOp2("lock add", VAL, MEM)
#define locksubeq(MEM, VAL) __ArithmeticOp2("lock sub", VAL, MEM)
#define lockxoreq(MEM, VAL) __ArithmeticOp2("lock xor", VAL, MEM)
#define lockandeq(MEM, VAL) __ArithmeticOp2("lock and", VAL, MEM)
#define lockoreq(MEM, VAL)  __ArithmeticOp2("lock or", VAL, MEM)

/**
 * Exchanges *MEMORY into *LOCALVAR w/ one operation.
 *
 * @param MEMORY is uint𝑘_t[hasatleast 1] where 𝑘 ∈ {8,16,32,64}
 * @param LOCALVAR is uint𝑘_t[hasatleast 1]
 * @return LOCALVAR[0]
 * @see xchg()
 */
#define lockxchg(MEMORY, LOCALVAR)                            \
  ({                                                          \
    asm("xchg\t%0,%1" : "+%m"(*(MEMORY)), "+r"(*(LOCALVAR))); \
    *(LOCALVAR);                                              \
  })

/**
 * Compares and exchanges.
 *
 * @param IFTHING is uint𝑘_t[hasatleast 1] where 𝑘 ∈ {8,16,32,64}
 * @return true if value was exchanged, otherwise false
 * @see lockcmpxchg()
 */
#define cmpxchg(IFTHING, ISEQUALTOME, REPLACEITWITHME)                        \
  ({                                                                          \
    bool DidIt;                                                               \
    autotype(IFTHING) IfThing = (IFTHING);                                    \
    typeof(*IfThing) IsEqualToMe = (ISEQUALTOME);                             \
    typeof(*IfThing) ReplaceItWithMe = (REPLACEITWITHME);                     \
    asm volatile(ZFLAG_ASM("cmpxchg\t%3,%1")                                  \
                 : ZFLAG_CONSTRAINT(DidIt), "+m"(*IfThing), "+a"(IsEqualToMe) \
                 : "r"(ReplaceItWithMe)                                       \
                 : "cc");                                                     \
    DidIt;                                                                    \
  })

/**
 * Compares and exchanges w/ one operation.
 *
 * @param IFTHING is uint𝑘_t[hasatleast 1] where 𝑘 ∈ {8,16,32,64}
 * @return true if value was exchanged, otherwise false
 * @see lockcmpxchg()
 */
#define lockcmpxchg(IFTHING, ISEQUALTOME, REPLACEITWITHME)                    \
  ({                                                                          \
    bool DidIt;                                                               \
    autotype(IFTHING) IfThing = (IFTHING);                                    \
    typeof(*IfThing) IsEqualToMe = (ISEQUALTOME);                             \
    typeof(*IfThing) ReplaceItWithMe = (REPLACEITWITHME);                     \
    asm volatile(ZFLAG_ASM("lock cmpxchg\t%3,%1")                             \
                 : ZFLAG_CONSTRAINT(DidIt), "+m"(*IfThing), "+a"(IsEqualToMe) \
                 : "r"(ReplaceItWithMe)                                       \
                 : "cc");                                                     \
    DidIt;                                                                    \
  })

#define IsAddressCanonicalForm(P)                             \
  ({                                                          \
    intptr_t p2 = (intptr_t)(P);                              \
    (0xffff800000000000l <= p2 && p2 <= 0x00007fffffffffffl); \
  })

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § bits » implementation details                             ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#define __ArithmeticOp1(OP, MEM)                               \
  ({                                                           \
    asm(OP "%z0\t%0" : "+m"(*(MEM)) : /* no inputs */ : "cc"); \
    MEM;                                                       \
  })

#define __ArithmeticOp2(OP, VAL, MEM)                          \
  ({                                                           \
    asm(OP "%z0\t%1,%0" : "+m,m"(*(MEM)) : "i,r"(VAL) : "cc"); \
    MEM;                                                       \
  })

#define __BitOp(OP, BIT, MEM)                                  \
  ({                                                           \
    bool OldBit;                                               \
    if (__builtin_constant_p(BIT)) {                           \
      asm(CFLAG_ASM(OP "%z1\t%2,%1")                           \
          : CFLAG_CONSTRAINT(OldBit),                          \
            "+m"((MEM)[(BIT) / (sizeof((MEM)[0]) * CHAR_BIT)]) \
          : "J"((BIT) % (sizeof((MEM)[0]) * CHAR_BIT))         \
          : "cc");                                             \
    } else if (sizeof((MEM)[0]) == 2) {                        \
      asm(CFLAG_ASM(OP "\t%w2,%1")                             \
          : CFLAG_CONSTRAINT(OldBit), "+m"((MEM)[0])           \
          : "r"(BIT)                                           \
          : "cc");                                             \
    } else if (sizeof((MEM)[0]) == 4) {                        \
      asm(CFLAG_ASM(OP "\t%k2,%1")                             \
          : CFLAG_CONSTRAINT(OldBit), "+m"((MEM)[0])           \
          : "r"(BIT)                                           \
          : "cc");                                             \
    } else if (sizeof((MEM)[0]) == 8) {                        \
      asm(CFLAG_ASM(OP "\t%q2,%1")                             \
          : CFLAG_CONSTRAINT(OldBit), "+m"((MEM)[0])           \
          : "r"(BIT)                                           \
          : "cc");                                             \
    }                                                          \
    OldBit;                                                    \
  })

#else
#define cmpxchg(MEM, CMP, VAL) \
  cmpxchg(MEM, (intptr_t)(CMP), (intptr_t)(VAL), sizeof(*(MEM)))
#define lockcmpxchg(MEM, CMP, VAL) \
  lockcmpxchg(MEM, (intptr_t)(CMP), (intptr_t)(VAL), sizeof(*(MEM)))
#define lockxchg(MEM, VAR) \
  lockxchg(MEM, VAR, sizeof(*(MEM)) / (sizeof(*(MEM)) == sizeof(*(VAR))))
#define atomic_store(MEM, VAL) \
  atomic_store(MEM, VAL, sizeof(*(MEM)) / (sizeof(*(MEM)) == sizeof(*(VAL))))
#define atomic_load(MEM) atomic_load(MEM, sizeof(*(MEM)))
#endif /* __GNUC__ && !__STRICT_ANSI__ */
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/str/str.h */

#define COSMOPOLITAN_LIBC_STR_STR_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § characters » asa x3.4-1967                                ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│─╝
  fourth age telecommunications */

extern const uint8_t gperf_downcase[256];
extern const uint8_t kToLower[256];
extern const uint16_t kToLower16[256];
extern const uint8_t kBase36[256];
extern const char16_t kCp437[256];

int isascii(int);
int isspace(int);
int isalpha(int);
int isdigit(int);
int isalnum(int);
int isxdigit(int);
int isprint(int);
int islower(int);
int isupper(int);
int isblank(int);
int iscntrl(int);
int isgraph(int);
int tolower(int);
int ispunct(int);
int toupper(int);
int hextoint(int);
int cescapec(int);

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § characters » thompson-pike encoding                       ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│─╝
  fifth age telecommunications

      0123456789abcdef
    ┌0─ ☺☻♥♦♣♠•◘○◙♂♀♪♫☼┬───Control
    └1─►◄↕‼¶§▬↨↑↓→←∟↔▲▼┘
    ┌2─ !"#$%&'()*+,-./┐
    │3 0123456789:;<=>?│
    │4 @ABCDEFGHIJKLMNO├───ASA x3.4-1967
    │5 PQRSTUVWXYZ[\]^_│
    │6 `abcdefghijklmno│
    └7─pqrstuvwxyz{|}~⌂┘
    ┌8─ÇüéâäàåçêëèïîìÄÅ┐
    │9 ÉæÆôöòûùÿÖÜ¢£¥€ƒ├───Thompson-Pike Continuation
    │a á¡óúñѪº¿⌐¬½¼¡«»│    (not really characters)
    └b─░▒▓│┤╡╢╖╕╣║╗╝╜╛┐┘
    ┌c─└┴┬├─┼╞╟╚╔╩╦╠═╬╧┬───1 Continuation will follow
    └d─╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀┘
    ─e─αßΓπΣσμτΦΘΩδ∞φε∩────2 Continuations will follow
     f─≡±≥≤⌠⌡÷≈°∙·√ⁿ²■λ
       │      ││  │││└┤
       │      ││  │└┤ └───5 Continuations follow (and is negative)
       │      │└─┬┘ └─────5 Continuations follow (note: -1=λ┐┐┐┐┐)
       └───┬──┘  └────────4 Continuations follow
           └──────────────3 Continuations follow */

#define INVALID_CODEPOINT 0xfffd

int iswalnum(wint_t);
int iswalpha(wint_t);
int iswblank(wint_t);
int iswcntrl(wint_t);
int iswdigit(wint_t);
int iswgraph(wint_t);
int iswlower(wint_t);
int iswspace(wint_t);
int iswupper(wint_t);
int iswxdigit(wint_t);
int iswpunct(wint_t);
int iswprint(wint_t);
wint_t towlower(wint_t);
wint_t towupper(wint_t);

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § strings                                                   ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

void *memset(void *, int, size_t) memcpyesque;
void *memcpy(void *restrict, const void *restrict, size_t) memcpyesque;
void *mempcpy(void *restrict, const void *restrict, size_t) memcpyesque;
void *memccpy(void *restrict, const void *restrict, int, size_t) memcpyesque;
void *memmove(void *, const void *, size_t) memcpyesque;
void *memeqmask(void *, const void *, const void *, size_t) memcpyesque;

size_t strlen(const char *) strlenesque;
size_t strnlen(const char *, size_t) strlenesque;
size_t strnlen_s(const char *, size_t);
char *strchr(const char *, int) strlenesque;
char *index(const char *, int) strlenesque;
void *memchr(const void *, int, size_t) strlenesque;
char *strchrnul(const char *, int) strlenesque returnsnonnull;
void *rawmemchr(const void *, int) strlenesque returnsnonnull;
void bzero(void *, size_t) paramsnonnull() libcesque;
void explicit_bzero(void *, size_t) paramsnonnull() libcesque;
size_t strlen16(const char16_t *) strlenesque;
size_t strnlen16(const char16_t *, size_t) strlenesque;
size_t strnlen16_s(const char16_t *, size_t);
char16_t *strchr16(const char16_t *, int) strlenesque;
void *memchr16(const void *, int, size_t) strlenesque;
char16_t *strchrnul16(const char16_t *, int) strlenesque returnsnonnull;
void *rawmemchr16(const void *, int) strlenesque returnsnonnull;
size_t wcslen(const wchar_t *) strlenesque;
size_t wcsnlen(const wchar_t *, size_t) strlenesque;
size_t wcsnlen_s(const wchar_t *, size_t);
wchar_t *wcschr(const wchar_t *, wchar_t) strlenesque;
wchar_t *wmemchr(const wchar_t *, wchar_t, size_t) strlenesque;
wchar_t *wcschrnul(const wchar_t *, wchar_t) strlenesque returnsnonnull;
char *strstr(const char *, const char *) strlenesque;
char16_t *strstr16(const char16_t *, const char16_t *) strlenesque;
wchar_t *wcsstr(const wchar_t *, const wchar_t *) strlenesque;
void *rawwmemchr(const void *, wchar_t) strlenesque returnsnonnull;
int memcmp(const void *, const void *, size_t) strlenesque;
int strcmp(const char *, const char *) strlenesque;
int strncmp(const char *, const char *, size_t) strlenesque;
int strcmp16(const char16_t *, const char16_t *) strlenesque;
int strncmp16(const char16_t *, const char16_t *, size_t) strlenesque;
int wcscmp(const wchar_t *, const wchar_t *) strlenesque;
int wcsncmp(const wchar_t *, const wchar_t *, size_t) strlenesque;
int wmemcmp(const wchar_t *, const wchar_t *, size_t) strlenesque;
int strcasecmp(const char *, const char *) strlenesque;
int memcasecmp(const void *, const void *, size_t) strlenesque;
int strcasecmp16(const char16_t *, const char16_t *) strlenesque;
int wcscasecmp(const wchar_t *, const wchar_t *) strlenesque;
int strncasecmp(const char *, const char *, size_t) strlenesque;
int strncasecmp16(const char16_t *, const char16_t *, size_t) strlenesque;
int wcsncasecmp(const wchar_t *, const wchar_t *, size_t) strlenesque;
char *strrchr(const char *, int) strlenesque;
void *memrchr(const void *, int, size_t) strlenesque;
char16_t *strrchr16(const char16_t *, int) strlenesque;
void *memrchr16(const void *, int, size_t) strlenesque;
wchar_t *wcsrchr(const wchar_t *, int) strlenesque;
void *wmemrchr(const void *, wchar_t, size_t) strlenesque;
char *strpbrk(const char *, const char *) strlenesque;
char16_t *strpbrk16(const char16_t *, const char16_t *) strlenesque;
wchar_t *wcspbrk(const wchar_t *, const wchar_t *) strlenesque;
size_t strspn(const char *, const char *) strlenesque;
size_t strspn16(const char16_t *, const char16_t *) strlenesque;
size_t wcsspn(const wchar_t *, const wchar_t *) strlenesque;
size_t strcspn(const char *, const char *) strlenesque;
size_t strcspn16(const char16_t *, const char16_t *) strlenesque;
size_t wcscspn(const wchar_t *, const wchar_t *) strlenesque;
void *memfrob(void *, size_t) memcpyesque;
int strcoll(const char *, const char *) strlenesque;
char *strsep(char **, const char *) paramsnonnull();
int strcmpzbw(const uint16_t *, const char *) strlenesque;
int strcasecmpzbw(const uint16_t *, const char *) strlenesque;
char *stpcpy(char *, const char *) memcpyesque;
char *stpncpy(char *, const char *, size_t) memcpyesque;
char *strcat(char *, const char *) memcpyesque;
char16_t *strcat16(char16_t *, const char16_t *) memcpyesque;
wchar_t *wcscat(wchar_t *, const wchar_t *) memcpyesque;
size_t strlcpy(char *, const char *, size_t);
size_t strlcat(char *, const char *, size_t);
char *strcpy(char *, const char *) memcpyesque;
char16_t *strcpy16(char16_t *, const char16_t *) memcpyesque;
wchar_t *wcscpy(wchar_t *, const wchar_t *) memcpyesque;
char *strncat(char *, const char *, size_t) memcpyesque;
char *strncpy(char *, const char *, size_t) memcpyesque;
char *strtok(char *, const char *) paramsnonnull((2)) libcesque;
char *strtok_r(char *, const char *, char **) paramsnonnull((2, 3));
uint16_t *strcpyzbw(uint16_t *, const char *) memcpyesque;
char *wstrtrunc(uint16_t *) memcpyesque;
char *wstrntrunc(uint16_t *, size_t) memcpyesque;
bool startswith(const char *, const char *) strlenesque;
bool startswith16(const char16_t *, const char16_t *) strlenesque;
bool wcsstartswith(const wchar_t *, const wchar_t *) strlenesque;
bool endswith(const char *, const char *) strlenesque;
bool endswith16(const char16_t *, const char16_t *) strlenesque;
bool wcsendswith(const wchar_t *, const wchar_t *) strlenesque;
const char *IndexDoubleNulString(const char *, unsigned) strlenesque;
int strverscmp(const char *, const char *);
wchar_t *wmemset(wchar_t *, wchar_t, size_t) memcpyesque;
char16_t *memset16(char16_t *, char16_t, size_t) memcpyesque;
compatfn wchar_t *wmemcpy(wchar_t *, const wchar_t *, size_t) memcpyesque;
compatfn wchar_t *wmempcpy(wchar_t *, const wchar_t *, size_t) memcpyesque;
compatfn wchar_t *wmemmove(wchar_t *, const wchar_t *, size_t) memcpyesque;
int timingsafe_memcmp(const void *, const void *, size_t);
void *tinymemccpy(void *, const void *, int, size_t) memcpyesque;
void *memmem(const void *, size_t, const void *, size_t)
    paramsnonnull() nothrow nocallback nosideeffect;
char *strerror(int) returnsnonnull nothrow nocallback;
long a64l(const char *);
char *l64a(long);

char *strntolower(char *, size_t);
char *strtolower(char *) paramsnonnull();
char *strntoupper(char *, size_t);
char *strtoupper(char *) paramsnonnull();
char *chomp(char *);
char16_t *chomp16(char16_t *);
wchar_t *wchomp(wchar_t *);

bool escapedos(char16_t *, unsigned, const char16_t *, unsigned);

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § strings » multibyte                                       ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

typedef unsigned mbstate_t;

axdx_t tprecode8to16(char16_t *, size_t, const char *);
axdx_t tprecode16to8(char *, size_t, const char16_t *);
int strcmp8to16(const char *, const char16_t *) strlenesque;
int strncmp8to16(const char *, const char16_t *, size_t) strlenesque;
int strcasecmp8to16(const char *, const char16_t *) strlenesque;
int strncasecmp8to16(const char *, const char16_t *, size_t) strlenesque;
int strcmp16to8(const char16_t *, const char *) strlenesque;
int strncmp16to8(const char16_t *, const char *, size_t) strlenesque;
int strcasecmp16to8(const char16_t *, const char *) strlenesque;
int strncasecmp16to8(const char16_t *, const char *, size_t) strlenesque;
wchar_t *wcsncpy(wchar_t *, const wchar_t *, size_t);
int mbtowc(wchar_t *, const char *, size_t);
size_t mbrtowc(wchar_t *, const char *, size_t, mbstate_t *);
size_t mbsrtowcs(wchar_t *, const char **, size_t, mbstate_t *);
size_t mbstowcs(wchar_t *, const char *, size_t);
size_t wcrtomb(char *, wchar_t, mbstate_t *);
size_t c32rtomb(char *, char32_t, mbstate_t *);
size_t mbrtoc32(char32_t *, const char *, size_t, mbstate_t *);
size_t c16rtomb(char *, char16_t, mbstate_t *);
size_t mbrtoc16(char16_t *, const char *, size_t, mbstate_t *);
size_t mbrlen(const char *, size_t, mbstate_t *);
size_t mbsnrtowcs(wchar_t *, const char **, size_t, size_t, mbstate_t *);
size_t wcsnrtombs(char *, const wchar_t **, size_t, size_t, mbstate_t *);
size_t wcsrtombs(char *, const wchar_t **, size_t, mbstate_t *);
size_t wcstombs(char *, const wchar_t *, size_t);
int mbsinit(const mbstate_t *);
int mblen(const char *, size_t);
int wctomb(char *, wchar_t);
int wctob(wint_t);
wint_t btowc(int);

size_t strclen(const char *) nosideeffect;
size_t strnclen(const char *, size_t) nosideeffect;
size_t strclen16(const char16_t *) nosideeffect;
size_t strnclen16(const char16_t *, size_t) nosideeffect;

typedef unsigned wctype_t;
wctype_t wctype(const char *) strlenesque;
int iswctype(wint_t, wctype_t) pureconst;

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § strings » system                                          ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

char *strsignal(int) returnsnonnull libcesque;

#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § strings » optimizations                                   ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#define __memcpy_isgoodsize(SIZE)                                    \
  (__builtin_constant_p(SIZE) && ((SIZE) <= __BIGGEST_ALIGNMENT__ && \
                                  __builtin_popcountl((unsigned)(SIZE)) == 1))

#define __memset_isgoodsize(SIZE)                   \
  (__builtin_constant_p(SIZE) &&                    \
   (((SIZE) <= __BIGGEST_ALIGNMENT__ &&             \
     __builtin_popcountl((unsigned)(SIZE)) == 1) || \
    ((SIZE) % __BIGGEST_ALIGNMENT__ == 0 &&         \
     (SIZE) / __BIGGEST_ALIGNMENT__ <= 3)))

#define memcpy(DEST, SRC, SIZE)                                  \
  (__memcpy_isgoodsize(SIZE) ? __builtin_memcpy(DEST, SRC, SIZE) \
                             : __memcpy("MemCpy", DEST, SRC, SIZE))

#define memset(DEST, BYTE, SIZE)                                  \
  (__memset_isgoodsize(SIZE) ? __builtin_memset(DEST, BYTE, SIZE) \
                             : __memset(DEST, BYTE, SIZE))

#if defined(__STDC_HOSTED__) && defined(__SSE2__)

#define strlen(STR)                                       \
  (__builtin_constant_p(STR) ? __builtin_strlen(STR) : ({ \
    size_t LeN;                                           \
    const char *StR = (STR);                              \
    asm("call\tstrlen"                                    \
        : "=a"(LeN)                                       \
        : "D"(StR), "m"(*(char(*)[0x7fffffff])StR)        \
        : "rcx", "rdx", "xmm3", "xmm4", "cc");            \
    LeN;                                                  \
  }))

#define memmove(DEST, SRC, SIZE) __memcpy("MemMove", (DEST), (SRC), (SIZE))

#define mempcpy(DEST, SRC, SIZE)                          \
  ({                                                      \
    size_t SIze = (SIZE);                                 \
    (void *)((char *)memcpy((DEST), (SRC), SIze) + SIze); \
  })

#define __memcpy(FN, DEST, SRC, SIZE)                                      \
  ({                                                                       \
    void *DeSt = (DEST);                                                   \
    const void *SrC = (SRC);                                               \
    size_t SiZe = (SIZE);                                                  \
    asm("call\t" FN                                                        \
        : "=m"(*(char(*)[SiZe])(DeSt))                                     \
        : "D"(DeSt), "S"(SrC), "d"(SiZe), "m"(*(const char(*)[SiZe])(SrC)) \
        : "xmm3", "xmm4", "rcx", "cc");                                    \
    DeSt;                                                                  \
  })

#define __memset(DEST, BYTE, SIZE)        \
  ({                                      \
    void *DeSt = (DEST);                  \
    size_t SiZe = (SIZE);                 \
    asm("call\tMemSet"                    \
        : "=m"(*(char(*)[SiZe])(DeSt))    \
        : "D"(DeSt), "S"(BYTE), "d"(SiZe) \
        : "xmm3", "xmm4", "rcx", "cc");   \
    DeSt;                                 \
  })

#define explicit_bzero(STR, BYTES)                                          \
  do {                                                                      \
    void *Str;                                                              \
    size_t Bytes;                                                           \
    asm volatile("call\texplicit_bzero"                                     \
                 : "=D"(Str), "=S"(Bytes)                                   \
                 : "0"(STR), "1"(BYTES)                                     \
                 : "rax", "rcx", "rdx", "r8", "r9", "r10", "r11", "memory", \
                   "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5");   \
  } while (0)

#else /* hosted+sse2 */

#define mempcpy(DEST, SRC, SIZE)                                           \
  ({                                                                       \
    void *Rdi, *Dest = (DEST);                                             \
    const void *Rsi, *Src = (SRC);                                         \
    size_t SiZe = (SIZE);                                                  \
    size_t Rcx;                                                            \
    asm("rep movsb"                                                        \
        : "=D"(Rdi), "=S"(Rsi), "=c"(Rcx), "=m"(*(char(*)[SiZe])(Dest))    \
        : "0"(Dest), "1"(Src), "2"(SiZe), "m"(*(const char(*)[SiZe])(Src)) \
        : "cc");                                                           \
    Rdi;                                                                   \
  })

#define __memcpy(FN, DEST, SRC, SIZE)                                      \
  ({                                                                       \
    void *Rdi, *Dest = (DEST);                                             \
    const void *Rsi, *Src = (SRC);                                         \
    size_t SiZe = (SIZE);                                                  \
    size_t Rcx;                                                            \
    asm("rep movsb"                                                        \
        : "=D"(Rdi), "=S"(Rsi), "=c"(Rcx), "=m"(*(char(*)[SiZe])(Dest))    \
        : "0"(Dest), "1"(Src), "2"(SiZe), "m"(*(const char(*)[SiZe])(Src)) \
        : "cc");                                                           \
    Dest;                                                                  \
  })

#define __memset(DEST, BYTE, SIZE)                           \
  ({                                                         \
    void *Rdi, *Dest = (DEST);                               \
    size_t SiZe = (SIZE);                                    \
    size_t Rcx;                                              \
    asm("rep stosb"                                          \
        : "=D"(Rdi), "=c"(Rcx), "=m"(*(char(*)[SiZe])(Dest)) \
        : "0"(Dest), "1"(SiZe), "a"(BYTE)                    \
        : "cc");                                             \
    Dest;                                                    \
  })

#endif /* hosted/sse2/unbloat */
/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § strings » address sanitizer                               ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/
void *memset_pure(void *, int, size_t) memcpyesque;
void *memmove_pure(void *, const void *, size_t) memcpyesque;
size_t strlen_pure(const char *) strlenesque;
size_t strcspn_pure(const char *, const char *) strlenesque;
#if defined(__FSANITIZE_ADDRESS__)

#define strcspn(STR, REJECT) strcspn_pure(STR, REJECT)

#undef strlen
#define strlen(STR) \
  (__builtin_constant_p(STR) ? __builtin_strlen(STR) : strlen_pure(STR))

#undef memset
#define memset(DST, CHAR, SIZE)                                  \
  (__memcpy_isgoodsize(SIZE) ? __builtin_memset(DST, CHAR, SIZE) \
                             : memset_pure(DST, CHAR, SIZE))

#undef memmove
#define memmove(DST, SRC, SIZE)                                  \
  (__memcpy_isgoodsize(SIZE) ? __builtin_memmove(DST, SRC, SIZE) \
                             : memmove_pure(DST, SRC, SIZE))

#undef memcpy
#define memcpy(DST, SRC, SIZE)                                  \
  (__memcpy_isgoodsize(SIZE) ? __builtin_memcpy(DST, SRC, SIZE) \
                             : memmove_pure(DST, SRC, SIZE))

#undef mempcpy
#define mempcpy(DST, SRC, SIZE)                                       \
  (__memcpy_isgoodsize(SIZE) ? __builtin_mempcpy(DST, SRC, SIZE) : ({ \
    void *DsT = (DST);                                                \
    size_t SiZe = (SIZE);                                             \
    memmove_pure(DsT, SRC, SiZe);                                     \
    (void *)((char *)DsT + SiZe);                                     \
  }))

#endif /* __FSANITIZE_ADDRESS__ */
#endif /* __GNUC__ && !__STRICT_ANSI__ */
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

/**
 * @fileoverview PKZIP Data Structures.
 */

#define kZipAlign 2

#define kZipCosmopolitanVersion 20

#define kZipOsDos         0
#define kZipOsAmiga       1
#define kZipOsOpenvms     2
#define kZipOsUnix        3
#define kZipOsVmcms       4
#define kZipOsAtarist     5
#define kZipOsOs2hpfs     6
#define kZipOsMacintosh   7
#define kZipOsZsystem     8
#define kZipOsCpm         9
#define kZipOsWindowsntfs 10
#define kZipOsMvsos390zos 11
#define kZipOsVse         12
#define kZipOsAcornrisc   13
#define kZipOsVfat        14
#define kZipOsAltmvs      15
#define kZipOsBeos        16
#define kZipOsTandem      17
#define kZipOsOs400       18
#define kZipOsOsxdarwin   19

#define kZipEra1989 10 /* PKZIP 1.0 */
#define kZipEra1993 20 /* PKZIP 2.0: deflate/subdir/etc. support */
#define kZipEra2001 45 /* PKZIP 4.5: kZipExtraZip64 support */

#define kZipIattrBinary 0
#define kZipIattrAscii  1

#define kZipCompressionNone    0
#define kZipCompressionDeflate 8

#define kZipCdirHdrMagic   0x06054b50 /* PK♣♠ "PK\5\6" */
#define kZipCdirHdrMinSize 22
#define kZipCdirAlign      kZipAlign
#define kZipCdirHdrLinkableSize \
  ROUNDUP(kZipCfileHdrMinSize + PATH_MAX, kZipCdirAlign)

#define kZipCfileHdrMagic                 0x02014b50 /* PK☺☻ "PK\1\2" */
#define kZipCfileHdrMinSize               46
#define kZipCfileOffsetGeneralflag        8
#define kZipCfileOffsetCompressionmethod  10
#define kZipCfileOffsetLastmodifiedtime   12
#define kZipCfileOffsetLastmodifieddate   14
#define kZipCfileOffsetCrc32              16
#define kZipCfileOffsetCompressedsize     20
#define kZipCfileOffsetUncompressedsize   24
#define kZipCfileOffsetExternalattributes 38
#define kZipCfileOffsetOffset             42

#define kZipLfileHdrMagic                0x04034b50 /* PK♥♦ "PK\3\4" */
#define kZipLfileHdrMinSize              30
#define kZipLfileOffsetGeneralflag       6
#define kZipLfileOffsetCompressionmethod 8
#define kZipLfileOffsetLastmodifiedtime  10
#define kZipLfileOffsetLastmodifieddate  12
#define kZipLfileOffsetCrc32             14
#define kZipLfileOffsetCompressedsize    18
#define kZipLfileOffsetUncompressedsize  22

#define kZipGflagUtf8 0x800

#define kZipExtraHdrSize           4
#define kZipExtraZip64             0x0001
#define kZipExtraNtfs              0x000a
#define kZipExtraExtendedTimestamp 0x5455

#define kZipCfileMagic "PK\001\002"

#if !(__ASSEMBLER__ + __LINKER__ + 0)

/* end of central directory record */
#define ZIP_CDIR_MAGIC(P)         READ32LE(P)
#define ZIP_CDIR_DISK(P)          READ16LE((P) + 4)
#define ZIP_CDIR_STARTINGDISK(P)  READ16LE((P) + 6)
#define ZIP_CDIR_RECORDSONDISK(P) READ16LE((P) + 8)
#define ZIP_CDIR_RECORDS(P)       READ16LE((P) + 10)
#define ZIP_CDIR_SIZE(P)          READ32LE((P) + 12)
#define ZIP_CDIR_OFFSET(P)        READ32LE((P) + 16)
#define ZIP_CDIR_COMMENTSIZE(P)   READ16LE((P) + 20)
#define ZIP_CDIR_COMMENT(P)       (&(P)[22])
#define ZIP_CDIR_HDRSIZE(P)       (ZIP_CDIR_COMMENTSIZE(P) + kZipCdirHdrMinSize)

/* central directory file header */
#define ZIP_CFILE_MAGIC(P)          READ32LE(P)
#define ZIP_CFILE_VERSIONMADE(P)    ((P)[4])
#define ZIP_CFILE_FILEATTRCOMPAT(P) ((P)[5])
#define ZIP_CFILE_VERSIONNEED(P)    ((P)[6])
#define ZIP_CFILE_OSNEED(P)         ((P)[7])
#define ZIP_CFILE_GENERALFLAG(P)    READ16LE((P) + kZipCfileOffsetGeneralflag)
#define ZIP_CFILE_COMPRESSIONMETHOD(P) \
  READ16LE((P) + kZipCfileOffsetCompressionmethod)
#define ZIP_CFILE_LASTMODIFIEDTIME(P) \
  READ16LE((P) + kZipCfileOffsetLastmodifiedtime) /* @see DOS_TIME() */
#define ZIP_CFILE_LASTMODIFIEDDATE(P) \
  READ16LE((P) + kZipCfileOffsetLastmodifieddate) /* @see DOS_DATE() */
#define ZIP_CFILE_CRC32(P)          READ32LE((P) + kZipCfileOffsetCrc32)
#define ZIP_CFILE_COMPRESSEDSIZE(P) READ32LE(P + kZipCfileOffsetCompressedsize)
#define ZIP_CFILE_UNCOMPRESSEDSIZE(P) \
  READ32LE((P) + kZipCfileOffsetUncompressedsize)
#define ZIP_CFILE_NAMESIZE(P)           READ16LE((P) + 28)
#define ZIP_CFILE_EXTRASIZE(P)          READ16LE((P) + 30)
#define ZIP_CFILE_COMMENTSIZE(P)        READ16LE((P) + 32)
#define ZIP_CFILE_DISK(P)               READ16LE((P) + 34)
#define ZIP_CFILE_INTERNALATTRIBUTES(P) READ16LE((P) + 36)
#define ZIP_CFILE_EXTERNALATTRIBUTES(P) \
  READ32LE((P) + kZipCfileOffsetExternalattributes)
#define ZIP_CFILE_OFFSET(P) READ32LE((P) + kZipCfileOffsetOffset)
#define ZIP_CFILE_NAME(P)   ((const char *)(&(P)[46])) /* not nul-terminated */
#define ZIP_CFILE_EXTRA(P)  (&(P)[46 + ZIP_CFILE_NAMESIZE(P)])
#define ZIP_CFILE_COMMENT(P) \
  (&(P)[46 + ZIP_CFILE_NAMESIZE(P) + ZIP_CFILE_EXTRASIZE(P)])
#define ZIP_CFILE_HDRSIZE(P)                                                   \
  (ZIP_CFILE_NAMESIZE(P) + ZIP_CFILE_EXTRASIZE(P) + ZIP_CFILE_COMMENTSIZE(P) + \
   kZipCfileHdrMinSize)

/* local file header */
#define ZIP_LFILE_MAGIC(P)       READ32LE(P)
#define ZIP_LFILE_VERSIONNEED(P) ((P)[4])
#define ZIP_LFILE_OSNEED(P)      ((P)[5])
#define ZIP_LFILE_GENERALFLAG(P) READ16LE((P) + kZipLfileOffsetGeneralflag)
#define ZIP_LFILE_COMPRESSIONMETHOD(P) \
  READ16LE((P) + kZipLfileOffsetCompressionmethod)
#define ZIP_LFILE_LASTMODIFIEDTIME(P) \
  READ16LE((P) + kZipLfileOffsetLastmodifiedtime) /* @see DOS_TIME() */
#define ZIP_LFILE_LASTMODIFIEDDATE(P) \
  READ16LE((P) + kZipLfileOffsetLastmodifieddate) /* @see DOS_DATE() */
#define ZIP_LFILE_CRC32(P) READ32LE((P) + kZipLfileOffsetCrc32)
#define ZIP_LFILE_COMPRESSEDSIZE(P) \
  READ32LE((P) + kZipLfileOffsetCompressedsize)
#define ZIP_LFILE_UNCOMPRESSEDSIZE(P) \
  READ32LE((P) + kZipLfileOffsetUncompressedsize)
#define ZIP_LFILE_NAMESIZE(P)  READ16LE((P) + 26)
#define ZIP_LFILE_EXTRASIZE(P) READ16LE((P) + 28)
#define ZIP_LFILE_NAME(P)      ((const char *)(&(P)[30]))
#define ZIP_LFILE_EXTRA(P)     (&(P)[30 + ZIP_LFILE_NAMESIZE(P)])
#define ZIP_LFILE_HDRSIZE(P) \
  (ZIP_LFILE_NAMESIZE(P) + ZIP_LFILE_EXTRASIZE(P) + kZipLfileHdrMinSize)
#define ZIP_LFILE_CONTENT(P) ((P) + ZIP_LFILE_HDRSIZE(P))
#define ZIP_LFILE_SIZE(P)    (ZIP_LFILE_HDRSIZE(P) + ZIP_LFILE_COMPRESSEDSIZE(P))

#define ZIP_EXTRA_HEADERID(P)    READ16LE(P)
#define ZIP_EXTRA_CONTENTSIZE(P) READ16LE((P) + 2)
#define ZIP_EXTRA_CONTENT(P)     (&(P)[4])
#define ZIP_EXTRA_SIZE(P)        (ZIP_EXTRA_CONTENTSIZE(P) + kZipExtraHdrSize)

uint8_t *zipfindcentraldir(const uint8_t *, size_t);

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/alg/alg.h */

#define COSMOPOLITAN_LIBC_ALG_ALG_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § algorithms                                                ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

void *bsearch(const void *, const void *, size_t, size_t,
              int cmp(const void *, const void *))
    paramsnonnull() nothrow nosideeffect;
void *bsearch_r(const void *, const void *, size_t, size_t,
                int cmp(const void *, const void *, void *), void *)
    paramsnonnull((1, 2, 5)) nothrow nosideeffect;
void djbsort(int32_t *, size_t);
void qsort(void *, size_t, size_t, int (*)(const void *, const void *))
    paramsnonnull();
void qsort_r(void *, size_t, size_t,
             int cmp(const void *, const void *, void *), void *arg)
    paramsnonnull((1, 4));
int tarjan(int, const int (*)[2], int, int[], int[], int *)
    paramsnonnull((2, 4)) nocallback nothrow;

#define __algalloc returnspointerwithnoaliases nothrow nocallback nodiscard

char *replacestr(const char *, const char *, const char *)
    paramsnonnull() __algalloc;
char16_t *replacestr16(const char16_t *, const char16_t *, const char16_t *)
    paramsnonnull() __algalloc;
wchar_t *replacewcs(const wchar_t *, const wchar_t *, const wchar_t *)
    paramsnonnull() __algalloc;

char *concatstr(const char *, ...) nullterminated() paramsnonnull() __algalloc;
char16_t *concatstr16(const char16_t *, ...) nullterminated()
    paramsnonnull() __algalloc;
wchar_t *concatwcs(const wchar_t *, ...) nullterminated()
    paramsnonnull() __algalloc;

int cmpsb(const void *, const void *);
int cmpub(const void *, const void *);
int cmpsw(const void *, const void *);
int cmpuw(const void *, const void *);
int cmpsl(const void *, const void *);
int cmpul(const void *, const void *);
int cmpsq(const void *, const void *);
int cmpuq(const void *, const void *);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/alg/critbit0.h */

#define COSMOPOLITAN_LIBC_ALG_CRITBIT0_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § data structures » critical bit tree (for c strings)       ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

struct critbit0 {
  void *root;
  size_t count;
};

bool critbit0_contains(struct critbit0 *, const char *) nothrow nosideeffect
    paramsnonnull();
bool critbit0_insert(struct critbit0 *, const char *) paramsnonnull();
bool critbit0_delete(struct critbit0 *, const char *) nothrow paramsnonnull();
void critbit0_clear(struct critbit0 *) nothrow paramsnonnull();
char *critbit0_get(struct critbit0 *, const char *);
intptr_t critbit0_allprefixed(struct critbit0 *, const char *,
                              intptr_t (*)(const char *, void *), void *)
    paramsnonnull((1, 2, 3)) nothrow;
bool critbit0_emplace(struct critbit0 *, char *, size_t) paramsnonnull();

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/bits/atomic.h */

#define COSMOPOLITAN_LIBC_BITS_ATOMIC_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

/**
 * @fileoverview C11 version of The Cosmopolitan Atomics Library.
 *
 *   - Forty-two different ways to say MOV.
 *   - Fourteen different ways to say XCHG.
 *   - Twenty different ways to say LOCK CMPXCHG.
 *
 * Living proof high-level languages can be lower-level than assembly.
 */

#define memory_order         int
#define memory_order_relaxed 0
#define memory_order_consume 1
#define memory_order_acquire 2
#define memory_order_release 3
#define memory_order_acq_rel 4
#define memory_order_seq_cst 5

#define atomic_flag            struct AtomicFlag
#define atomic_flag_clear(PTR) atomic_store((PTR)->__cacheline, 0)
#define atomic_flag_test_and_set(PTR)        \
  ({                                         \
    uint32_t ax = 0;                         \
    lockcmpxchg((PTR)->__cacheline, &ax, 1); \
  })
#define atomic_init(PTR, VAL)                         atomic_store(PTR, VAL)
#define atomic_exchange(PTR, VAL)                     lockxchg(PTR, &(VAL))
#define atomic_compare_exchange_strong(X, Y, Z)       lockcmpxchg(X, Y, Z)
#define atomic_compare_exchange_weak(X, Y, Z)         lockcmpxchg(X, Y, Z)
#define atomic_load_explicit(PTR, ORDER)              atomic_load(PTR)
#define atomic_store_explicit(PTR, VAL, ORDER)        atomic_store(PTR, VAL)
#define atomic_flag_clear_explicit(PTR, ORDER)        atomic_store(PTR, 0)
#define atomic_exchange_explicit(PTR, VAL, ORDER)     lockxchg(PTR, &(VAL))
#define atomic_flag_test_and_set_explicit(PTR, ORDER) lockcmpxchg(PTR, 0, 1)
#define atomic_compare_exchange_strong_explicit(X, Y, Z, S, F) \
  lockcmpxchg(X, Y, Z)
#define atomic_compare_exchange_weak_explicit(X, Y, Z, S, F) \
  lockcmpxchg(X, Y, Z)

struct AtomicFlag {
  uint32_t __cacheline[16]; /* Intel V.O §9.4.6 */
} forcealign(64);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/bits/bswap.h */

#define COSMOPOLITAN_LIBC_BITS_BSWAP_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

uint16_t bswap_16(uint16_t) pureconst;
uint32_t bswap_32(uint32_t) pureconst;
uint32_t bswap_64(uint32_t) pureconst;

#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
#define bswap_16(x) __builtin_bswap16(x)
#define bswap_32(x) __builtin_bswap32(x)
#define bswap_64(x) __builtin_bswap64(x)
#endif /* defined(__GNUC__) && !defined(__STRICT_ANSI__) */

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/bits/ezlea.h */

#define COSMOPOLITAN_LIBC_BITS_EZLEA_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

#if __pic__ + __pie__ + __code_model_medium__ + __code_model_large__ + 0 > 1
#define ezlea(symbol) "lea\t" symbol "(%%rip),%"
#else
#define ezlea(symbol) "mov\t$" symbol ",%k"
#endif

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/bits/hilbert.h */

#define COSMOPOLITAN_LIBC_BITS_HILBERT_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

long hilbert(long, long, long) pureconst;
axdx_t unhilbert(long, long) pureconst;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/bits/likely.h */

#define COSMOPOLITAN_LIBC_BITS_LIKELY_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

#define LIKELY(expr)   __builtin_expect(!!(expr), 1)
#define UNLIKELY(expr) __builtin_expect(!!(expr), 0)

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/bits/morton.h */

#define COSMOPOLITAN_LIBC_BITS_MORTON_H_


/*!BEGIN libc/intrin/pdep.h */

#define COSMOPOLITAN_LIBC_INTRIN_PDEP_H_


/*!BEGIN libc/nexgen32e/x86feature.h */

#define COSMOPOLITAN_LIBC_NEXGEN32E_X86FEATURE_H_


/*!BEGIN libc/nexgen32e/x86compiler.h */

#define COSMOPOLITAN_LIBC_NEXGEN32E_X86COMPILER_H_

/**
 * @fileoverview x86 cpu feature compile-time requirement detection.
 * @see -march=native, -mavx2, etc.
 */

#ifdef __AES__
#define _X86_CC_AES 1
#else
#define _X86_CC_AES 0
#endif

#ifdef __AVX__
#define _X86_CC_AVX 1
#else
#define _X86_CC_AVX 0
#endif

#ifdef __AVX2__
#define _X86_CC_AVX2 1
#else
#define _X86_CC_AVX2 0
#endif

#ifdef __ABM__
#define _X86_CC_ABM 1
#else
#define _X86_CC_ABM 0
#endif

#ifdef __BMI__
#define _X86_CC_BMI 1
#else
#define _X86_CC_BMI 0
#endif

#ifdef __BMI2__
#define _X86_CC_BMI2 1
#else
#define _X86_CC_BMI2 0
#endif

#ifdef __FMA__
#define _X86_CC_FMA 1
#else
#define _X86_CC_FMA 0
#endif

#ifdef __ADX__
#define _X86_CC_ADX 1
#else
#define _X86_CC_ADX 0
#endif

#ifdef __PCLMUL__
#define _X86_CC_PCLMUL 1
#else
#define _X86_CC_PCLMUL 0
#endif

#ifdef __POPCNT__
#define _X86_CC_POPCNT 1
#else
#define _X86_CC_POPCNT 0
#endif

#ifdef __RDRND__
#define _X86_CC_RDRND 1
#else
#define _X86_CC_RDRND 0
#endif

#ifdef __RDSEED__
#define _X86_CC_RDSEED 1
#else
#define _X86_CC_RDSEED 0
#endif

#ifdef __SHA__
#define _X86_CC_SHA 1
#else
#define _X86_CC_SHA 0
#endif

#ifdef __SSSE3__
#define _X86_CC_SSSE3 1
#else
#define _X86_CC_SSSE3 0
#endif

#ifdef __SSE__
#define _X86_CC_SSE 1
#else
#define _X86_CC_SSE 0
#endif

#ifdef __SSE2__
#define _X86_CC_SSE2 1
#else
#define _X86_CC_SSE2 0
#endif

#ifdef __SSE3__
#define _X86_CC_SSE3 1
#else
#define _X86_CC_SSE3 0
#endif

#ifdef __SSE4_1__
#define _X86_CC_SSE4_1 1
#else
#define _X86_CC_SSE4_1 0
#endif

#ifdef __SSE4_2__
#define _X86_CC_SSE4_2 1
#else
#define _X86_CC_SSE4_2 0
#endif

#ifdef __XSAVE__
#define _X86_CC_XSAVE 1
#else
#define _X86_CC_XSAVE 0
#endif

#ifdef __CLFLUSHOPT__
#define _X86_CC_CLFLUSHOPT 1
#else
#define _X86_CC_CLFLUSHOPT 0
#endif

#ifdef __RDPID__
#define _X86_CC_RDPID 1
#else
#define _X86_CC_RDPID 0
#endif


/**
 * @fileoverview x86 cpu feature detection.
 */

#define X86_HAVE(FEATURE) _X86_HAVE(X86_##FEATURE)

/* clang-format off */
/*      --- FEATURE              LEAF       REG BIT  COMPILE-TIME-DEFINE  HOOK */
#define X86_ACC                  1H,        EDX, 29, 0,                   _
#define X86_ACPI                 1H,        EDX, 22, 0,                   _
#define X86_ADX                  7H,        EBX, 19, _X86_CC_ADX,         _     /* broadwell c. 2014 */
#define X86_AES                  1H,        ECX, 25, _X86_CC_AES,         _     /* westmere c. 2010 */
#define X86_APIC                 1H,        EDX,  9, 0,                   _
#define X86_ARCH_CAPABILITIES    7H,        EDX, 29, 0,                   _
#define X86_AVX                  1H,        ECX, 28, _X86_CC_AVX,         _     /* sandybridge c. 2012 */
#define X86_AVX2                 7H,        EBX,  5, _X86_CC_AVX2,        _     /* haswell c. 2013 */
#define X86_AVX512BW             7H,        EBX, 30, 0,                   _
#define X86_AVX512CD             7H,        EBX, 28, 0,                   _
#define X86_AVX512DQ             7H,        EBX, 17, 0,                   _
#define X86_AVX512ER             7H,        EBX, 27, 0,                   _
#define X86_AVX512F              7H,        EBX, 16, 0,                   _
#define X86_AVX512IFMA           7H,        EBX, 21, 0,                   _
#define X86_AVX512PF             7H,        EBX, 26, 0,                   _
#define X86_AVX512VBMI           7H,        ECX,  1, 0,                   _
#define X86_AVX512VL             7H,        EBX, 31, 0,                   _
#define X86_AVX512_4FMAPS        7H,        EDX,  3, 0,                   _
#define X86_AVX512_4VNNIW        7H,        EDX,  2, 0,                   _
#define X86_AVX512_BF16          7H,        EAX,  5, 0,                   _
#define X86_AVX512_BITALG        7H,        ECX, 12, 0,                   _
#define X86_AVX512_VBMI2         7H,        ECX,  6, 0,                   _
#define X86_AVX512_VNNI          7H,        ECX, 11, 0,                   _
#define X86_AVX512_VP2INTERSECT  7H,        EDX,  8, 0,                   _
#define X86_AVX512_VPOPCNTDQ     7H,        ECX, 14, 0,                   _
#define X86_BMI                  7H,        EBX,  3, _X86_CC_BMI,         _     /* haswell c. 2013 */
#define X86_BMI2                 7H,        EBX,  8, _X86_CC_BMI2,        _     /* haswell c. 2013 */
#define X86_CID                  1H,        ECX, 10, 0,                   _
#define X86_CLDEMOTE             7H,        ECX, 25, 0,                   _
#define X86_CLFLUSH              1H,        EDX, 19, _X86_CC_SSE2,        _
#define X86_CLFLUSHOPT           7H,        EBX, 23, _X86_CC_CLFLUSHOPT,  _     /* skylake/zen  */
#define X86_CLWB                 7H,        EBX, 24, 0,                   _     /* skylake/zen2 */
#define X86_CMOV                 1H,        EDX, 15, 0,                   _
#define X86_CQM                  7H,        EBX, 12, 0,                   _
#define X86_CX16                 1H,        ECX, 13, 0,                   _
#define X86_CX8                  1H,        EDX,  8, 0,                   _
#define X86_DCA                  1H,        ECX, 18, 0,                   _
#define X86_DE                   1H,        EDX,  2, 0,                   _
#define X86_DS                   1H,        EDX, 21, 0,                   _
#define X86_DSCPL                1H,        ECX,  4, 0,                   _
#define X86_DTES64               1H,        ECX,  2, 0,                   _
#define X86_ERMS                 7H,        EBX,  9, 0,                   _     /* broaadwell c. 2014 */
#define X86_EST                  1H,        ECX,  7, 0,                   _
#define X86_F16C                 1H,        ECX, 29, 0,                   _
#define X86_FDP_EXCPTN_ONLY      7H,        EBX,  6, 0,                   _
#define X86_FLUSH_L1D            7H,        EDX, 28, 0,                   _
#define X86_FMA                  1H,        ECX, 12, _X86_CC_FMA,         _     /* haswell c. 2013 */
#define X86_FPU                  1H,        EDX,  0, 0,                   _
#define X86_FSGSBASE             7H,        EBX,  0, 0,                   _
#define X86_FXSR                 1H,        EDX, 24, 0,                   _
#define X86_GBPAGES              80000001H, EDX, 26, 0,                   _
#define X86_GFNI                 7H,        ECX,  8, 0,                   _
#define X86_HLE                  7H,        EBX,  4, 0,                   _
#define X86_HT                   1H,        EDX, 28, 0,                   _
#define X86_HYPERVISOR           1H,        ECX, 31, 0,                   _
#define X86_IA64                 1H,        EDX, 30, 0,                   _
#define X86_INTEL_PT             7H,        EBX, 25, 0,                   _
#define X86_INTEL_STIBP          7H,        EDX, 27, 0,                   _
#define X86_INVPCID              1H,        EBX, 10, 0,                   _
#define X86_INVTSC               80000007H, EDX,  8, _X86_CC_POPCNT,      _     /* i.e. not a K8 */
#define X86_LA57                 7H,        ECX, 16, 0,                   _
#define X86_LAHF_LM              80000001H, ECX,  0, 0,                   _
#define X86_LM                   80000001H, EDX, 29, 0,                   _
#define X86_MCA                  1H,        EDX, 14, 0,                   _
#define X86_MCE                  1H,        EDX,  7, 0,                   _
#define X86_MD_CLEAR             7H,        EDX, 10, 0,                   _
#define X86_MMX                  1H,        EDX, 23, 0,                   _
#define X86_MOVBE                1H,        ECX, 22, 0,                   _
#define X86_MOVDIR64B            7H,        ECX, 28, 0,                   _
#define X86_MOVDIRI              7H,        ECX, 27, 0,                   _
#define X86_MP                   80000001H, EDX, 19, 0,                   _
#define X86_MPX                  7H,        EBX, 14, 0,                   _
#define X86_MSR                  1H,        EDX,  5, 0,                   _
#define X86_MTRR                 1H,        EDX, 12, 0,                   _
#define X86_MWAIT                1H,        ECX,  3, 0,                   _
#define X86_NX                   80000001H, EDX, 20, 0,                   _
#define X86_OSPKE                7H,        ECX,  4, 0,                   _
#define X86_OSXSAVE              1H,        ECX, 27, 0,                   _
#define X86_PAE                  1H,        EDX,  6, 0,                   _
#define X86_PAT                  1H,        EDX, 16, 0,                   _
#define X86_PBE                  1H,        EDX, 31, 0,                   _
#define X86_PCID                 1H,        ECX, 17, 0,                   _
#define X86_PCLMUL               1H,        ECX,  1, _X86_CC_PCLMUL,      _     /* westmere c. 2010 */
#define X86_PCONFIG              7H,        EDX, 18, 0,                   _
#define X86_PDCM                 1H,        ECX, 15, 0,                   _
#define X86_PGE                  1H,        EDX, 13, 0,                   _
#define X86_PKU                  7H,        ECX,  3, 0,                   _
#define X86_PN                   1H,        EDX, 18, 0,                   _
#define X86_POPCNT               1H,        ECX, 23, _X86_CC_POPCNT,      _     /* nehalem c. 2008 */
#define X86_PSE                  1H,        EDX,  3, 0,                   _
#define X86_PSE36                1H,        EDX, 17, 0,                   _
#define X86_RDPID                7H,        ECX, 22, _X86_CC_RDPID,       _     /* cannonlake c. 2018 */
#define X86_RDRND                1H,        ECX, 30, _X86_CC_RDRND,       _     /* ivybridge c. 2012 */
#define X86_RDSEED               7H,        EBX, 18, _X86_CC_RDSEED,      _     /* broadwell c. 2014 */
#define X86_RDTSCP               80000001H, EDX, 27, 0,                   _
#define X86_RDT_A                7H,        EBX, 15, 0,                   _
#define X86_RTM                  7H,        EBX, 11, 0,                   _
#define X86_SDBG                 1H,        ECX, 11, 0,                   _
#define X86_SELFSNOOP            1H,        EDX, 27, 0,                   _
#define X86_SEP                  1H,        EDX, 11, 0,                   _
#define X86_SHA                  7H,        EBX, 29, _X86_CC_SHA,         _     /* goldmont (2016) */
#define X86_SMAP                 7H,        EBX, 20, 0,                   _
#define X86_SMEP                 7H,        EBX,  7, 0,                   _
#define X86_SMX                  1H,        ECX,  6, 0,                   _
#define X86_SPEC_CTRL            7H,        EDX, 26, 0,                   _
#define X86_SPEC_CTRL_SSBD       7H,        EDX, 31, 0,                   _
#define X86_SSE                  1H,        EDX, 25, _X86_CC_SSE,         _     /* pentium c. 1999 */
#define X86_SSE2                 1H,        EDX, 26, _X86_CC_SSE2,        _     /* pentium c. 2001 */
#define X86_SSE3                 1H,        ECX,  0, _X86_CC_SSE3,        _     /* k8 c. 2005 */
#define X86_SSE4_1               1H,        ECX, 19, _X86_CC_SSE4_1,      _     /* core c. 2006 */
#define X86_SSE4_2               1H,        ECX, 20, _X86_CC_SSE4_2,      _     /* nehalem c. 2008 */
#define X86_SSSE3                1H,        ECX,  9, _X86_CC_SSSE3,       _     /* westmere c. 2010 */
#define X86_SYSCALL              80000001H, EDX, 11, 0,                   _
#define X86_TM2                  1H,        ECX,  8, 0,                   _
#define X86_TME                  7H,        ECX, 13, 0,                   _
#define X86_TSC                  1H,        EDX,  4, 0,                   _
#define X86_TSC_ADJUST           7H,        EBX,  1, 0,                   _
#define X86_TSC_DEADLINE_TIMER   1H,        ECX, 24, 0,                   _
#define X86_TSX_FORCE_ABORT      7H,        EDX, 13, 0,                   _
#define X86_UMIP                 7H,        ECX,  2, 0,                   _
#define X86_VAES                 7H,        ECX,  9, 0,                   _
#define X86_VME                  1H,        EDX,  1, 0,                   _
#define X86_VMX                  1H,        ECX,  5, 0,                   _
#define X86_VPCLMULQDQ           7H,        ECX, 10, 0,                   _
#define X86_WAITPKG              7H,        ECX,  5, 0,                   _
#define X86_X2APIC               1H,        ECX, 21, 0,                   _
#define X86_XSAVE                1H,        ECX, 26, _X86_CC_XSAVE,       _     /* sandybridge c. 2012 */
#define X86_XTPR                 1H,        ECX, 14, 0,                   _
#define X86_ZERO_FCS_FDS         7H,        EBX, 13, 0,                   _
/* clang-format on */

/* AMD specific features */
#define X86_ABM            80000001H, ECX, 5, _X86_CC_ABM, _
#define X86_3DNOW          80000001H, EDX, 31, 0, _
#define X86_3DNOWEXT       80000001H, EDX, 30, 0, _
#define X86_3DNOWPREFETCH  80000001H, ECX, 8, 0, _
#define X86_BPEXT          80000001H, ECX, 26, 0, _
#define X86_CMP_LEGACY     80000001H, ECX, 1, 0, _
#define X86_CR8_LEGACY     80000001H, ECX, 4, 0, _
#define X86_EXTAPIC        80000001H, ECX, 3, 0, _
#define X86_FMA4           80000001H, ECX, 16, 0, _
#define X86_FXSR_OPT       80000001H, EDX, 25, 0, _
#define X86_IBS            80000001H, ECX, 10, 0, _
#define X86_LWP            80000001H, ECX, 15, 0, _
#define X86_MISALIGNSSE    80000001H, ECX, 7, 0, _
#define X86_MMXEXT         80000001H, EDX, 22, 0, _
#define X86_MWAITX         80000001H, ECX, 29, 0, _
#define X86_NODEID_MSR     80000001H, ECX, 19, 0, _
#define X86_OSVW           80000001H, ECX, 9, 0, _
#define X86_OVERFLOW_RECOV 80000007H, EBX, 0, 0, _
#define X86_PERFCTR_CORE   80000001H, ECX, 23, 0, _
#define X86_PERFCTR_LLC    80000001H, ECX, 28, 0, _
#define X86_PERFCTR_NB     80000001H, ECX, 24, 0, _
#define X86_PTSC           80000001H, ECX, 27, 0, _
#define X86_SKINIT         80000001H, ECX, 12, 0, _
#define X86_SMCA           80000007H, EBX, 3, 0, _
#define X86_SSE4A          80000001H, ECX, 6, 0, _
#define X86_SUCCOR         80000007H, EBX, 1, 0, _
#define X86_SVM            80000001H, ECX, 2, 0, _
#define X86_TBM            80000001H, ECX, 21, 0, _
#define X86_TCE            80000001H, ECX, 17, 0, _
#define X86_TOPOEXT        80000001H, ECX, 22, 0, _
#define X86_WDT            80000001H, ECX, 13, 0, _
#define X86_XOP            80000001H, ECX, 11, 0, _

/* Defined but not loaded by kCpuids.S */
#define X86_ARAT            6H, EAX, 2, 0, _
#define X86_AVIC            8000000AH, EDX, 13, 0, _
#define X86_CLZERO          80000008H, EBX, 0, 0, _
#define X86_DECODEASSISTS   8000000AH, EDX, 7, 0, _
#define X86_DTHERM          6H, EAX, 0, 0, _
#define X86_FLUSHBYASID     8000000AH, EDX, 6, 0, _
#define X86_HWP             6H, EAX, 7, 0, _
#define X86_HWP_ACT_WINDOW  6H, EAX, 9, 0, _
#define X86_HWP_EPP         6H, EAX, 10, 0, _
#define X86_HWP_NOTIFY      6H, EAX, 8, 0, _
#define X86_HWP_PKG_REQ     6H, EAX, 11, 0, _
#define X86_IBPB            80000008H, EBX, 12, 0, _
#define X86_IBRS            80000008H, EBX, 14, 0, _
#define X86_IDA             6H, EAX, 1, 0, _
#define X86_IRPERF          80000008H, EBX, 1, 0, _
#define X86_LBRV            8000000AH, EDX, 1, 0, _
#define X86_NPT             8000000AH, EDX, 0, 0, _
#define X86_NRIPS           8000000AH, EDX, 3, 0, _
#define X86_PAUSEFILTER     8000000AH, EDX, 10, 0, _
#define X86_PFTHRESHOLD     8000000AH, EDX, 12, 0, _
#define X86_PLN             6H, EAX, 4, 0, _
#define X86_PTS             6H, EAX, 6, 0, _
#define X86_SSBD            80000008H, EBX, 24, 0, _
#define X86_SSB_NO          80000008H, EBX, 26, 0, _
#define X86_STIBP           80000008H, EBX, 15, 0, _
#define X86_STIBP_ALWAYS_ON 80000008H, EBX, 17, 0, _
#define X86_SVML            8000000AH, EDX, 2, 0, _
#define X86_TSCRATEMSR      8000000AH, EDX, 4, 0, _
#define X86_VGIF            8000000AH, EDX, 16, 0, _
#define X86_VIRT_SSBD       80000008H, EBX, 25, 0, _
#define X86_VMCBCLEAN       8000000AH, EDX, 5, 0, _
#define X86_V_VMSAVE_VMLOAD 8000000AH, EDX, 15, 0, _
#define X86_WBNOINVD        80000008H, EBX, 9, 0, _
#define X86_XGETBV1         DH, EAX, 2, 0, _
#define X86_XSAVEC          DH, EAX, 1, 0, _
#define X86_XSAVEERPTR      80000008H, EBX, 2, 0, _
#define X86_XSAVEOPT        DH, EAX, 0, 0, _
#define X86_XSAVES          DH, EAX, 3, 0, _

#define X86_NEED(FEATURE) _X86_NEED(X86_##FEATURE)
#define X86_WORD(FEATURE) _X86_WORD(X86_##FEATURE)
#define X86_LEAF(FEATURE) _X86_LEAF(X86_##FEATURE)
#define X86_REG(FEATURE)  _X86_REG(X86_##FEATURE)
#define X86_BIT(FEATURE)  _X86_BIT(X86_##FEATURE)

#define _X86_HAVE(FEATURE) __X86_HAVE(FEATURE)
#define _X86_NEED(FEATURE) __X86_NEED(FEATURE)
#define _X86_WORD(FEATURE) __X86_WORD(FEATURE)
#define _X86_LEAF(FEATURE) __X86_LEAF(FEATURE)
#define _X86_REG(FEATURE)  __X86_REG(FEATURE)
#define _X86_BIT(FEATURE)  __X86_BIT(FEATURE)

#define __X86_HAVE(LEAF, REG, BIT, MANDATORY, HOOK) \
  ___X86_HAVE(LEAF, REG, BIT, MANDATORY, _X86_HOOK_##HOOK)
#define __X86_NEED(LEAF, REG, BIT, MANDATORY, HOOK) MANDATORY
#define __X86_WORD(LEAF, REG, BIT, MANDATORY, HOOK) KCPUIDS(LEAF, REG)
#define __X86_LEAF(LEAF, REG, BIT, MANDATORY, HOOK) LEAF
#define __X86_REG(LEAF, REG, BIT, MANDATORY, HOOK)  REG
#define __X86_BIT(LEAF, REG, BIT, MANDATORY, HOOK)  BIT

#ifndef __ASSEMBLER__
#define ___X86_HAVE(LEAF, REG, BIT, MANDATORY, HOOK) \
  HOOK(!!(MANDATORY || KCPUIDS(LEAF, REG) & (1u << BIT)))
#else
#define ___X86_HAVE(LEAF, REG, BIT, MANDATORY, HOOK) \
  $1 << (BIT % 8), BIT / 8 + KCPUIDS(LEAF, REG)
#endif

#define _X86_HOOK__(X) X

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

uint64_t pdep(uint64_t, uint64_t) pureconst;

#define PDEP(NUMBER, BITMASK)                                                \
  ({                                                                         \
    typeof(BITMASK) ShuffledBits, Number = (NUMBER);                         \
    asm("pdep\t%2,%1,%0" : "=r"(ShuffledBits) : "r"(Number), "rm"(BITMASK)); \
    ShuffledBits;                                                            \
  })

#define pdep(NUMBER, BITMASK) \
  (!X86_HAVE(BMI2) ? pdep(NUMBER, BITMASK) : PDEP(NUMBER, BITMASK))

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/pext.h */

#define COSMOPOLITAN_LIBC_INTRIN_PEXT_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

uint64_t pext(uint64_t, uint64_t) pureconst;

#define PEXT(NUMBER, BITMASK)                                                \
  ({                                                                         \
    typeof(BITMASK) ShuffledBits, Number = (NUMBER);                         \
    asm("pext\t%2,%1,%0" : "=r"(ShuffledBits) : "r"(Number), "rm"(BITMASK)); \
    ShuffledBits;                                                            \
  })

#define pext(NUMBER, BITMASK) \
  (!X86_HAVE(BMI2) ? pext(NUMBER, BITMASK) : PEXT(NUMBER, BITMASK))

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

unsigned long morton(unsigned long, unsigned long) libcesque;
axdx_t unmorton(unsigned long) libcesque;

#ifndef __STRICT_ANSI__
#define morton(Y, X)                                                          \
  (X86_NEED(BMI2) ? pdep(X, 0x5555555555555555) | pdep(Y, 0xAAAAAAAAAAAAAAAA) \
                  : morton(Y, X))
#define unmorton(I)                                                         \
  (X86_NEED(BMI2)                                                           \
       ? (axdx_t){pext(I, 0xAAAAAAAAAAAAAAAA), pext(I, 0x5555555555555555)} \
       : unmorton(I))
#endif

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/bits/popcnt.h */

#define COSMOPOLITAN_LIBC_BITS_POPCNT_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

unsigned long popcnt(unsigned long) pureconst;

#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
#define popcnt(X)                                         \
  (__builtin_constant_p(X) ? __builtin_popcountll(X) : ({ \
    unsigned long Res, Pop = (X);                         \
    if (X86_HAVE(POPCNT)) {                               \
      asm("popcnt\t%1,%0" : "=r"(Res) : "r"(Pop) : "cc"); \
    } else {                                              \
      Res = (popcnt)(Pop);                                \
    }                                                     \
    Res;                                                  \
  }))
#endif /* GNUC && !ANSI */

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/bits/pushpop.h */

#define COSMOPOLITAN_LIBC_BITS_PUSHPOP_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

#if !defined(__GNUC__) || defined(__STRICT_ANSI__)
#define pushpop(x) (x)
#else
/**
 * PushPop
 * An elegant weapon for a more civilized age.
 */
#define pushpop(x)                                          \
  ({                                                        \
    typeof(x) Popped;                                       \
    if (__builtin_constant_p(x) &&                          \
        (TYPE_SIGNED(typeof(x)) ? (intptr_t)(x) + 128 < 256 \
                                : (intptr_t)(x) < 128)) {   \
      if (x) {                                              \
        asm("push\t%1\n\t"                                  \
            "pop\t%q0"                                      \
            : "=r"(Popped)                                  \
            : "ir"(x));                                     \
      } else {                                              \
        asm("xor\t%k0,%k0" : "=r"(Popped));                 \
      }                                                     \
    } else {                                                \
      asm("" : "=r"(Popped) : "0"(x));                      \
    }                                                       \
    Popped;                                                 \
  })
#endif

#if !defined(__GNUC__) || defined(__STRICT_ANSI__)
#define pushmov(d, x) (*(d) = (x))
#else
#define pushmov(d, x)                                       \
  ({                                                        \
    typeof(*(d)) Popped = (x);                              \
    if (__builtin_constant_p(x) &&                          \
        (TYPE_SIGNED(typeof(x)) ? (intptr_t)(x) + 128 < 256 \
                                : (intptr_t)(x) < 128)) {   \
      asm("pushq\t%1\n\t"                                   \
          "popq\t%0"                                        \
          : "=m"(*(d))                                      \
          : "ir"(Popped));                                  \
    } else {                                                \
      *(d) = Popped;                                        \
    }                                                       \
    Popped;                                                 \
  })
#endif

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/bits/segmentation.h */

#define COSMOPOLITAN_LIBC_BITS_SEGMENTATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)

/**
 * Reads scalar from memory, offset by segment.
 *
 * @return *(MEM) relative to segment
 * @see arch_prctl()
 * @see pushpop()
 */
#define fs(MEM) __peek("fs", MEM)
#define gs(MEM) __peek("gs", MEM)

#define __peek(SEGMENT, ADDRESS)                                  \
  ({                                                              \
    typeof(*(ADDRESS)) Pk;                                        \
    asm("mov\t%%" SEGMENT ":%1,%0" : "=r"(Pk) : "m"(*(ADDRESS))); \
    Pk;                                                           \
  })

#endif /* __GNUC__ && !__STRICT_ANSI__ */
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/bits/weaken.h */

#define COSMOPOLITAN_LIBC_BITS_WEAKEN_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
#ifndef __STRICT_ANSI__

#define weaken(symbol) ((const typeof(&(symbol)))weakaddr(#symbol))

#define strongaddr(symbolstr)                \
  ({                                         \
    intptr_t waddr;                          \
    asm(ezlea(symbolstr) "0" : "=r"(waddr)); \
    waddr;                                   \
  })

#define weakaddr(symbolstr)                                             \
  ({                                                                    \
    intptr_t waddr;                                                     \
    asm(".weak\t" symbolstr "\n\t" ezlea(symbolstr) "0" : "=r"(waddr)); \
    waddr;                                                              \
  })

#else
#define weaken(symbol)      symbol
#define weakaddr(symbolstr) &(symbolstr)
#endif /* __STRICT_ANSI__ */
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/calls/typedef/sigaction_f.h */

#define COSMOPOLITAN_LIBC_CALLS_TYPEDEF_SIGACTION_F_H_


/*!BEGIN libc/calls/struct/siginfo.h */

#define COSMOPOLITAN_LIBC_CALLS_STRUCT_SIGINFO_H_


/*!BEGIN libc/calls/struct/sigval.h */

#define COSMOPOLITAN_LIBC_CALLS_STRUCT_SIGVAL_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

union sigval {
  int32_t sival_int;
  void *sival_ptr;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct siginfo {
  int32_t si_signo;
  int32_t si_errno;
  int32_t si_code;
  union {
    struct {
      union {
        struct {
          int32_t si_pid;
          uint32_t si_uid;
        };
        struct {
          int32_t si_timerid;
          int32_t si_overrun;
        };
      };
      union {
        union sigval si_value;
        struct {
          int32_t si_status;
          int64_t si_utime, si_stime;
        };
      };
    };
    struct {
      void *si_addr;
      int16_t si_addr_lsb;
      union {
        struct {
          void *si_lower;
          void *si_upper;
        };
        uint32_t si_pkey;
      };
    };
    struct {
      int64_t si_band;
      int32_t si_fd;
    };
    struct {
      void *si_call_addr;
      int32_t si_syscall;
      uint32_t si_arch;
    };
    char __ignoreme[128 - 2 * sizeof(int32_t) - sizeof(int64_t)];
  };
};

typedef struct siginfo siginfo_t;

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/calls/ucontext.h */

#define COSMOPOLITAN_LIBC_CALLS_UCONTEXT_H_


/*!BEGIN libc/calls/struct/sigaltstack.h */

#define COSMOPOLITAN_LIBC_CALLS_STRUCT_SIGALTSTACK_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct sigaltstack {
  void *ss_sp;
  int ss_flags;
  size_t ss_size;
};

typedef struct sigaltstack stack_t;

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/calls/struct/sigset.h */

#define COSMOPOLITAN_LIBC_CALLS_STRUCT_SIGSET_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

typedef struct sigset {
  uint64_t __bits[2];
} sigset_t;

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

#define REG_R8      REG_R8
#define REG_R9      REG_R9
#define REG_R10     REG_R10
#define REG_R11     REG_R11
#define REG_R12     REG_R12
#define REG_R13     REG_R13
#define REG_R14     REG_R14
#define REG_R15     REG_R15
#define REG_RDI     REG_RDI
#define REG_RSI     REG_RSI
#define REG_RBP     REG_RBP
#define REG_RBX     REG_RBX
#define REG_RDX     REG_RDX
#define REG_RAX     REG_RAX
#define REG_RCX     REG_RCX
#define REG_RSP     REG_RSP
#define REG_RIP     REG_RIP
#define REG_EFL     REG_EFL
#define REG_CSGSFS  REG_CSGSFS
#define REG_ERR     REG_ERR
#define REG_TRAPNO  REG_TRAPNO
#define REG_OLDMASK REG_OLDMASK
#define REG_CR2     REG_CR2

enum GeneralRegister {
  REG_R8,
  REG_R9,
  REG_R10,
  REG_R11,
  REG_R12,
  REG_R13,
  REG_R14,
  REG_R15,
  REG_RDI,
  REG_RSI,
  REG_RBP,
  REG_RBX,
  REG_RDX,
  REG_RAX,
  REG_RCX,
  REG_RSP,
  REG_RIP,
  REG_EFL,
  REG_CSGSFS,
  REG_ERR,
  REG_TRAPNO,
  REG_OLDMASK,
  REG_CR2
};

struct XmmRegister {
  uint64_t u64[2];
};

struct FpuStackEntry {
  uint16_t significand[4];
  uint16_t exponent;
  uint16_t padding[3];
};

struct thatispacked FpuState {
  uint16_t cwd;
  uint16_t swd;
  uint16_t ftw;
  uint16_t fop;
  uint64_t rip;
  uint64_t rdp;
  uint32_t mxcsr;
  uint32_t mxcr_mask;
  struct FpuStackEntry st[8];
  struct XmmRegister xmm[16];
  uint32_t __padding[24];
};

typedef uint64_t greg_t;
typedef greg_t gregset_t[23];
typedef struct FpuState *fpregset_t;

struct MachineContext {
  union {
    struct {
      uint64_t r8;
      uint64_t r9;
      uint64_t r10;
      uint64_t r11;
      uint64_t r12;
      uint64_t r13;
      uint64_t r14;
      uint64_t r15;
      uint64_t rdi;
      uint64_t rsi;
      uint64_t rbp;
      uint64_t rbx;
      uint64_t rdx;
      uint64_t rax;
      uint64_t rcx;
      uint64_t rsp;
      uint64_t rip;
      uint64_t eflags;
      uint16_t cs;
      uint16_t gs;
      uint16_t fs;
      uint16_t __pad0;
      uint64_t err;
      uint64_t trapno;
      uint64_t oldmask;
      uint64_t cr2;
    };
    gregset_t gregs;
  };
  struct FpuState *fpregs;
  uint64_t __pad1[8];
};

typedef struct MachineContext mcontext_t;

struct ucontext {
  uint64_t uc_flags;
  struct ucontext *uc_link;
  stack_t uc_stack;
  mcontext_t uc_mcontext; /* use this */
  sigset_t uc_sigmask;
  struct FpuState __fpustate; /* for cosmo on non-linux */
};

typedef struct ucontext ucontext_t;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#if !(__ASSEMBLER__ + __LINKER__ + 0)

typedef void (*sigaction_f)(int, struct siginfo *, struct ucontext *);

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/calls/typedef/sighandler_t.h */

#define COSMOPOLITAN_LIBC_CALLS_TYPEDEF_SIGHANDLER_T_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

typedef void (*sighandler_t)(int);

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/calls/struct/dirent.h */

#define COSMOPOLITAN_LIBC_CALLS_STRUCT_DIRENT_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct dirent {      /* linux getdents64 abi */
  uint64_t d_ino;    /* inode number */
  int64_t d_off;     /* implementation-dependent location number */
  uint16_t d_reclen; /* byte length of this whole struct and string */
  uint8_t d_type;    /* DT_UNKNOWN, DT_BLK, DT_DIR, etc. */
  char d_name[256];  /* NUL-terminated basename */
};

struct dirstream;
typedef struct dirstream DIR;

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/calls/struct/flock.h */

#define COSMOPOLITAN_LIBC_CALLS_STRUCT_FLOCK_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct flock {
  short l_type;
  short l_whence;
  int64_t l_start;
  int64_t l_len;
  int l_pid;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/calls/struct/framebufferfixedscreeninfo.h */

#define COSMOPOLITAN_LIBC_CALLS_STRUCT_FRAMEBUFFERFIXEDSCREENINFO_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct FrameBufferFixedScreenInfo {
  char id[16];
  uint64_t smem_start;
  uint32_t smem_len;
  uint32_t type;
  uint32_t type_aux;
  uint32_t visual;
  uint16_t xpanstep;
  uint16_t ypanstep;
  uint16_t ywrapstep;
  uint32_t line_length;
  uint64_t mmio_start;
  uint32_t mmio_len;
  uint32_t accel;
  uint16_t capabilities;
  uint16_t reserved[2];
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/calls/struct/framebuffervirtualscreeninfo.h */

#define COSMOPOLITAN_LIBC_CALLS_STRUCT_FRAMEBUFFERVIRTUALSCREENINFO_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct FrameBufferBitField {
  uint32_t offset;
  uint32_t length;
  uint32_t msb_right;
};

struct FrameBufferVirtualScreenInfo {
  uint32_t xres;
  uint32_t yres;
  uint32_t xres_virtual;
  uint32_t yres_virtual;
  uint32_t xoffset;
  uint32_t yoffset;
  uint32_t bits_per_pixel;
  uint32_t grayscale;
  struct FrameBufferBitField red;
  struct FrameBufferBitField green;
  struct FrameBufferBitField blue;
  struct FrameBufferBitField transp;
  uint32_t nonstd;
  uint32_t activate;
  uint32_t height;
  uint32_t width;
  uint32_t accel_flags;
  uint32_t pixclock;
  uint32_t left_margin;
  uint32_t right_margin;
  uint32_t upper_margin;
  uint32_t lower_margin;
  uint32_t hsync_len;
  uint32_t vsync_len;
  uint32_t sync;
  uint32_t vmode;
  uint32_t rotate;
  uint32_t colorspace;
  uint32_t reserved[4];
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/calls/struct/iovec.h */

#define COSMOPOLITAN_LIBC_CALLS_STRUCT_IOVEC_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct iovec {
  void *iov_base;
  size_t iov_len;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/calls/struct/itimerval.h */

#define COSMOPOLITAN_LIBC_CALLS_STRUCT_ITIMERVAL_H_


/*!BEGIN libc/calls/struct/timeval.h */

#define COSMOPOLITAN_LIBC_CALLS_STRUCT_TIMEVAL_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct timeval {
  int64_t tv_sec;
  int64_t tv_usec; /* microseconds */
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct itimerval {
  struct timeval it_interval; /* {0,0} means singleshot */
  struct timeval it_value;    /* {0,0} means disarm */
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/calls/struct/rlimit.h */

#define COSMOPOLITAN_LIBC_CALLS_STRUCT_RLIMIT_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct rlimit {
  int64_t rlim_cur;
  int64_t rlim_max;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/calls/struct/rusage.h */

#define COSMOPOLITAN_LIBC_CALLS_STRUCT_RUSAGE_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct rusage {
  union {
    struct {
      struct timeval ru_utime; /* user CPU time used */
      struct timeval ru_stime; /* system CPU time used */
      int64_t ru_maxrss;       /* maximum resident set size */
      int64_t ru_ixrss;        /* integral shared memory size */
      int64_t ru_idrss;        /* integral unshared data size */
      int64_t ru_isrss;        /* integral unshared stack size */
      int64_t ru_minflt;       /* page reclaims (soft page faults) */
      int64_t ru_majflt;       /* page faults (hard page faults) */
      int64_t ru_nswap;        /* swaps */
      int64_t ru_inblock;      /* block input operations */
      int64_t ru_oublock;      /* block output operations */
      int64_t ru_msgsnd;       /* IPC messages sent */
      int64_t ru_msgrcv;       /* IPC messages received */
      int64_t ru_nsignals;     /* signals received */
      int64_t ru_nvcsw;        /* voluntary context switches */
      int64_t ru_nivcsw;       /* involuntary context switches */
    };
    uint8_t __conservatism[1024];
  };
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/calls/struct/sched_param.h */

#define COSMOPOLITAN_LIBC_CALLS_STRUCT_SCHED_PARAM_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct sched_param {
  int32_t sched_priority;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/calls/struct/sigaction-netbsd.h */

#define COSMOPOLITAN_LIBC_CALLS_STRUCT_SIGACTION_NETBSD_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

struct sigset_netbsd {
  uint32_t sig[4];
};

struct sigaction_netbsd {
  intptr_t sa_handler;
  struct sigset_netbsd sa_mask;
  uint32_t sa_flags;
};

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/calls/struct/sigaction.h */

#define COSMOPOLITAN_LIBC_CALLS_STRUCT_SIGACTION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct sigaction { /* cosmo abi */
  union {
    sighandler_t sa_handler;
    sigaction_f sa_sigaction;
  };
  uint64_t sa_flags;
  void (*sa_restorer)(void);
  struct sigset sa_mask;
  int64_t __pad;
} forcealign(8);

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/calls/struct/stat.h */

#define COSMOPOLITAN_LIBC_CALLS_STRUCT_STAT_H_


/*!BEGIN libc/calls/struct/timespec.h */

#define COSMOPOLITAN_LIBC_CALLS_STRUCT_TIMESPEC_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct timespec {
  int64_t tv_sec;
  int64_t tv_nsec; /* nanoseconds */
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct stat {               /* linux abi */
  int64_t st_dev;           /* 0: id of device with file */
  int64_t st_ino;           /* 8: inode number in disk b-tree */
  int64_t st_nlink;         /* 16: hard link count */
  int32_t st_mode;          /* 24: octal file mask thing */
  int32_t st_uid;           /* 28: user id of owner */
  int32_t st_gid;           /* group id of owning group */
  int32_t __pad;            /* ignore this */
  int64_t st_rdev;          /* id of device if a special file */
  int64_t st_size;          /* bytes in file */
  int64_t st_blksize;       /* preferred chunking for underlying filesystem */
  int64_t st_blocks;        /* number of 512-byte pages allocated to file */
  struct timespec st_atim;  /* access time (consider noatime) */
  struct timespec st_mtim;  /* modified time */
  struct timespec st_ctim;  /* complicated time */
  int64_t __future[3 + 10]; /* reserved for future use */
#define st_atime st_atim.tv_sec
#define st_mtime st_mtim.tv_sec
#define st_ctime st_ctim.tv_sec
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/calls/struct/sysinfo.h */

#define COSMOPOLITAN_LIBC_CALLS_STRUCT_SYSINFO_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct sysinfo {
  int64_t uptime;     /* seconds since boot */
  uint64_t loads[3];  /* 1-5-15 min active process averages */
  uint64_t totalram;  /* system physical memory */
  uint64_t freeram;   /* amount of ram currently going to waste */
  uint64_t sharedram; /* bytes w/ pages mapped into multiple progs */
  uint64_t bufferram; /* lingering disk pages; see fadvise */
  uint64_t totalswap; /* size of emergency memory */
  uint64_t freeswap;  /* hopefully equal to totalswap */
  int16_t procs;      /* number of processes */
  int16_t __ignore;   /* padding */
  uint64_t totalhigh; /* wut */
  uint64_t freehigh;  /* wut */
  uint32_t mem_unit;  /* ram stuff above is multiples of this */
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/calls/struct/termios.h */

#define COSMOPOLITAN_LIBC_CALLS_STRUCT_TERMIOS_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

struct termios {     /* GNU/Systemd ABI */
  uint32_t c_iflag;  /* input modes */
  uint32_t c_oflag;  /* output modes */
  uint32_t c_cflag;  /* control modes */
  uint32_t c_lflag;  /* local modes */
  uint8_t c_cc[32];  /* code mappings */
  uint32_t c_ispeed; /* input speed */
  uint32_t c_ospeed; /* output speed */
};

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/calls/struct/tms.h */

#define COSMOPOLITAN_LIBC_CALLS_STRUCT_TMS_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct tms {
  int64_t tms_utime;  /* userspace time */
  int64_t tms_stime;  /* kernelspace time */
  int64_t tms_cutime; /* children userspace time */
  int64_t tms_cstime; /* children kernelspace time */
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/calls/struct/user_regs_struct.h */

#define COSMOPOLITAN_LIBC_CALLS_STRUCT_USER_REGS_STRUCT_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

/**
 * Linux Kernel user registers.
 *
 * @note superset of struct pt_regs
 * @see ptrace() w/ PTRACE_SYSCALL
 */
struct user_regs_struct {
  uint64_t r15;
  uint64_t r14;
  uint64_t r13;
  uint64_t r12;
  uint64_t rbp;
  uint64_t rbx;
  uint64_t r11;
  uint64_t r10;
  uint64_t r9;
  uint64_t r8;
  uint64_t rax;
  uint64_t rcx;
  uint64_t rdx;
  uint64_t rsi;
  uint64_t rdi;
  uint64_t orig_rax;
  uint64_t rip;
  uint64_t cs;
  uint64_t eflags;
  uint64_t rsp;
  uint64_t ss;
  uint64_t fs_base;
  uint64_t gs_base;
  uint64_t ds;
  uint64_t es;
  uint64_t fs;
  uint64_t gs;
};

struct useregs_struct_freebsd {
  int64_t r15;
  int64_t r14;
  int64_t r13;
  int64_t r12;
  int64_t r11;
  int64_t r10;
  int64_t r9;
  int64_t r8;
  int64_t rdi;
  int64_t rsi;
  int64_t rbp;
  int64_t rbx;
  int64_t rdx;
  int64_t rcx;
  int64_t rax;
  uint32_t trapno;
  uint16_t fs;
  uint16_t gs;
  uint32_t err;
  uint16_t es;
  uint16_t ds;
  int64_t rip;
  int64_t cs;
  int64_t rflags;
  int64_t rsp;
  int64_t ss;
};

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/calls/struct/utsname.h */

#define COSMOPOLITAN_LIBC_CALLS_STRUCT_UTSNAME_H_

#define SYS_NMLN 321

#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct utsname {
  char sysname[SYS_NMLN];
  char nodename[SYS_NMLN];
  char release[SYS_NMLN];
  char version[SYS_NMLN];
  char machine[SYS_NMLN];
  char domainname[SYS_NMLN];
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/calls/struct/winsize.h */

#define COSMOPOLITAN_LIBC_CALLS_STRUCT_WINSIZE_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

struct winsize {
  uint16_t ws_row;
  uint16_t ws_col;
  uint16_t ws_xpixel;
  uint16_t ws_ypixel;
};

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/calls/calls.h */

#define COSMOPOLITAN_LIBC_CALLS_SYSCALLS_H_


/*!BEGIN libc/fmt/pflink.h */

#define COSMOPOLITAN_LIBC_FMT_PFLINK_H_


/*!BEGIN libc/fmt/fmts.h */

#define COSMOPOLITAN_LIBC_FMT_FMTS_H_

#define PRINTF_NTOA_BUFFER_SIZE 144

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

int __fmt_pad(int (*)(long, void *), void *, unsigned long) hidden;
int __fmt_stoa(int (*)(long, void *), void *, void *, unsigned long,
               unsigned long, unsigned long, unsigned char,
               unsigned char) hidden;
int __fmt_ntoa(int (*)(long, void *), void *, va_list, unsigned char,
               unsigned long, unsigned long, unsigned long, unsigned char,
               const char *) hidden;
char *__fmt_dtoa(double, int, int, int *, int *, char **) hidden;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/mem/mem.h */

#define COSMOPOLITAN_LIBC_MEM_MEM_H_

#define M_TRIM_THRESHOLD (-1)
#define M_GRANULARITY    (-2)
#define M_MMAP_THRESHOLD (-3)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § dynamic memory                                            ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

void free(void *) libcesque;
void *malloc(size_t) attributeallocsize((1)) mallocesque;
void *calloc(size_t, size_t) attributeallocsize((1, 2)) mallocesque;
void *memalign(size_t, size_t) attributeallocalign((1))
    attributeallocsize((2)) mallocesque;
void *realloc(void *, size_t) reallocesque;
void *realloc_in_place(void *, size_t);
void *reallocarray(void *, size_t, size_t) nodiscard;
void *valloc(size_t) attributeallocsize((1)) vallocesque;
void *pvalloc(size_t) attributeallocsize((1)) mallocesque;
char *strdup(const char *) paramsnonnull() mallocesque;
char *strndup(const char *, size_t) paramsnonnull() mallocesque;
int posix_memalign(void **, size_t, size_t); /* wut */
bool __grow(void *, size_t *, size_t, size_t) paramsnonnull((1, 2)) libcesque;

int malloc_trim(size_t);
size_t bulk_free(void **, size_t);
size_t malloc_usable_size(const void *);
void **independent_calloc(size_t, size_t, void **);
void **independent_comalloc(size_t, size_t *, void **);

wchar_t *wcsdup(const wchar_t *) strlenesque nodiscard;

struct mallinfo {
  size_t arena;    /* non-mmapped space allocated from system */
  size_t ordblks;  /* number of free chunks */
  size_t smblks;   /* always 0 */
  size_t hblks;    /* always 0 */
  size_t hblkhd;   /* space in mmapped regions */
  size_t usmblks;  /* maximum total allocated space */
  size_t fsmblks;  /* always 0 */
  size_t uordblks; /* total allocated space */
  size_t fordblks; /* total free space */
  size_t keepcost; /* releasable (via malloc_trim) space */
};
struct mallinfo mallinfo(void);

void malloc_stats(void);
bool32 mallopt(int, int);
size_t malloc_footprint(void);
size_t malloc_max_footprint(void);
size_t malloc_footprint_limit(void);
size_t malloc_set_footprint_limit(size_t);
void malloc_inspect_all(void (*handler)(void *, void *, size_t, void *),
                        void *);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/runtime/runtime.h */

#define COSMOPOLITAN_LIBC_RUNTIME_RUNTIME_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § runtime                                                   ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

typedef long jmp_buf[8] forcealign(CACHELINE);

extern int __argc;                                  /* CRT */
extern char **__argv;                               /* CRT */
extern char **environ;                              /* CRT */
extern unsigned long *__auxv;                       /* CRT */
extern char *program_invocation_name;               /* RII */
extern char *program_invocation_short_name;         /* RII */
extern uint64_t g_syscount;                         /* RII */
extern const uint64_t kStartTsc;                    /* RII */
extern const char kTmpPath[];                       /* RII */
extern const char kNtSystemDirectory[];             /* RII */
extern const char kNtWindowsDirectory[];            /* RII */
extern unsigned char _base[] forcealign(PAGESIZE);  /* αpε */
extern unsigned char _ehead[] forcealign(PAGESIZE); /* αpε */
extern unsigned char _etext[] forcealign(PAGESIZE); /* αpε */
extern unsigned char _edata[] forcealign(PAGESIZE); /* αpε */
extern unsigned char _end[] forcealign(FRAMESIZE);  /* αpε */
extern unsigned char _ereal;                        /* αpε */
extern unsigned char __privileged_start;            /* αpε */
extern unsigned char __test_start;                  /* αpε */
extern unsigned char __ro;                          /* αpε */
extern unsigned char *__relo_start[];               /* αpε */
extern unsigned char *__relo_end[];                 /* αpε */
extern uint8_t __zip_start[];                       /* αpε */
extern uint8_t __zip_end[];                         /* αpε */

void mcount(void);
unsigned long getauxval(unsigned long);
void *mapanon(size_t) vallocesque attributeallocsize((1));
int setjmp(jmp_buf) libcesque returnstwice paramsnonnull();
void longjmp(jmp_buf, int) libcesque wontreturn paramsnonnull();
int _setjmp(jmp_buf) libcesque returnstwice paramsnonnull();
void _longjmp(jmp_buf, int) libcesque wontreturn paramsnonnull();
void exit(int) wontreturn;
void _exit(int) libcesque wontreturn;
void _Exit(int) libcesque wontreturn;
void abort(void) wontreturn noinstrument;
int __cxa_atexit(void *, void *, void *) libcesque;
int atfork(void *, void *) libcesque;
int atexit(void (*)(void)) libcesque;
char *getenv(const char *) paramsnonnull() nosideeffect libcesque;
int putenv(char *) paramsnonnull();
int setenv(const char *, const char *, int) paramsnonnull();
int unsetenv(const char *);
int clearenv(void);
void fpreset(void);
int issetugid(void);
void *mmap(void *, uint64_t, int32_t, int32_t, int32_t, int64_t);
void *mremap(void *, uint64_t, uint64_t, int32_t, void *);
int munmap(void *, uint64_t);
int mprotect(void *, uint64_t, int) privileged;
int msync(void *, size_t, int);
void *sbrk(intptr_t);
int brk(void *);

bool _isheap(void *);
int NtGetVersion(void);
long missingno();
void __print(const void *, size_t);
void __print_string(const char *);
void _loadxmm(void *);
void _peekall(void);
void _savexmm(void *);
void _weakfree(void *);
void free_s(void *) paramsnonnull() libcesque;
int close_s(int *) paramsnonnull() libcesque;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/unicode/unicode.h */

#define COSMOPOLITAN_LIBC_UNICODE_UNICODE_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

struct lconv {
  char *decimal_point;
  char *thousands_sep;
  char *grouping;
  char *int_curr_symbol;
  char *currency_symbol;
  char *mon_decimal_point;
  char *mon_thousands_sep;
  char *mon_grouping;
  char *positive_sign;
  char *negative_sign;
  char int_frac_digits;
  char frac_digits;
  char p_cs_precedes;
  char p_sep_by_space;
  char n_cs_precedes;
  char n_sep_by_space;
  char p_sign_posn;
  char n_sign_posn;
  char int_p_cs_precedes;
  char int_n_cs_precedes;
  char int_p_sep_by_space;
  char int_n_sep_by_space;
  char int_p_sign_posn;
  char int_n_sign_posn;
};

int wcwidth(wchar_t) pureconst;
int wcswidth(const wchar_t *, size_t) strlenesque;
int wcsnwidth(const wchar_t *, size_t, size_t) strlenesque;
int strwidth(const char *, size_t) strlenesque;
int strnwidth(const char *, size_t, size_t) strlenesque;
int strwidth16(const char16_t *, size_t) strlenesque;
int strnwidth16(const char16_t *, size_t, size_t) strlenesque;
struct lconv *localeconv(void);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#if !(__ASSEMBLER__ + __LINKER__ + 0)
#ifndef __STRICT_ANSI__

/**
 * @fileoverview builtin+preprocessor+linker tricks for printf/scanf.
 *
 * Your printf() function only requires that you pay for what you use.
 * These macros ensure that its code size starts at under 4kb, growing
 * to about 40kb for a fully-loaded implementation. This works best when
 * format strings are constexprs that only contain directives.
 */

#define PFLINK(FMT)                                                     \
  ({                                                                    \
    if (___PFLINK(FMT, strpbrk, "faAeEgG")) STATIC_YOINK("__fmt_dtoa"); \
    if (___PFLINK(FMT, strpbrk, "cmrqs")) {                             \
      if (___PFLINK(FMT, strchr, '#')) STATIC_YOINK("kCp437");          \
      if (___PFLINK(FMT, strstr, "%m")) STATIC_YOINK("strerror");       \
      if (!IsTiny() && (___PFLINK(FMT, strstr, "%*") ||                 \
                        ___PFLINK(FMT, strpbrk, "0123456789"))) {       \
        STATIC_YOINK("strnwidth");                                      \
        STATIC_YOINK("strnwidth16");                                    \
        STATIC_YOINK("wcsnwidth");                                      \
      }                                                                 \
    }                                                                   \
    FMT;                                                                \
  })

#define SFLINK(FMT)                    \
  ({                                   \
    if (___PFLINK(FMT, strchr, 'm')) { \
      STATIC_YOINK("malloc");          \
      STATIC_YOINK("calloc");          \
      STATIC_YOINK("free");            \
      STATIC_YOINK("__grow");          \
    }                                  \
    FMT;                               \
  })

#if __GNUC__ + 0 < 4 || defined(__llvm__)
#define ___PFLINK(FMT, FN, C) 1
#else
#define ___PFLINK(FMT, FN, C) \
  !__builtin_constant_p(FMT) || ((FMT) && __builtin_##FN(FMT, C) != NULL)
#endif

#if defined(__GNUC__) && __GNUC__ < 6
/*
 * Compilers don't understand the features we've added to the format
 * string DSL, such as c string escaping, therefore we can't use it.
 * Ideally compilers should grant us more flexibility to define DSLs
 *
 * The recommended approach to turning this back on is `CFLAGS=-std=c11`
 * which puts the compiler in __STRICT_ANSI__ mode, which Cosmopolitan
 * respects by disabling all the esoteric tuning in headers like this.
 */
#pragma GCC diagnostic ignored "-Wformat-security"
#endif /* __GNUC__ + 0 < 6 */
#else
#define PFLINK(FMT) FMT
#define SFLINK(FMT) FMT
#ifdef __GNUC__
__asm__(".section .yoink\n\t"
        "nopl\t__fmt_dtoa(%rip)\n\t"
        "nopl\tkCp437(%rip)\n\t"
        "nopl\tstrerror(%rip)\n\t"
        "nopl\tstrnwidth(%rip)\n\t"
        "nopl\tstrnwidth16(%rip)\n\t"
        "nopl\twcsnwidth(%rip)\n\t"
        "nopl\tmalloc(%rip)\n\t"
        "nopl\tcalloc(%rip)\n\t"
        "nopl\t__grow(%rip)\n\t"
        ".previous");
#else
static long __pflink(long x) {
  x |= kCp437[0];
  x |= __fmt_dtoa(0, 0, 0, 0, 0, 0);
  x |= strnwidth(0, 0, 0);
  x |= strnwidth16(0, 0, 0);
  x |= wcsnwidth(0, 0, 0);
  x |= malloc(0);
  x |= __grow(0, 0, 0, 0);
  x |= (intptr_t)strerror(0);
  x |= (intptr_t)calloc(0, 0);
  return x;
}
#endif
#endif /* __STRICT_ANSI__ */
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/s.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_S_H_


/*!BEGIN libc/runtime/symbolic.h */

#define COSMOPOLITAN_LIBC_RUNTIME_SYMBOLIC_H_

#ifdef __ASSEMBLER__
/* clang-format off */
#define SYMBOLIC(NAME) NAME(%rip)
#define LITERALLY(NAME) $NAME
/* clang-format on */
#else
#define SYMBOLIC(NAME) NAME
#define LITERALLY(NAME) NAME
#endif

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long S_IEXEC;
extern const long S_IFBLK;
extern const long S_IFCHR;
extern const long S_IFDIR;
extern const long S_IFIFO;
extern const long S_IFLNK;
extern const long S_IFMT;
extern const long S_IFREG;
extern const long S_IFSOCK;
extern const long S_IREAD;
extern const long S_IRGRP;
extern const long S_IROTH;
extern const long S_IRUSR;
extern const long S_IRWXG;
extern const long S_IRWXO;
extern const long S_IRWXU;
extern const long S_ISGID;
extern const long S_ISUID;
extern const long S_ISVTX;
extern const long S_IWGRP;
extern const long S_IWOTH;
extern const long S_IWRITE;
extern const long S_IWUSR;
extern const long S_IXGRP;
extern const long S_IXOTH;
extern const long S_IXUSR;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define S_IFREG LITERALLY(0100000)
#define S_IFBLK LITERALLY(0060000)
#define S_IFCHR LITERALLY(0020000)
#define S_IFDIR LITERALLY(0040000)
#define S_IFIFO LITERALLY(0010000)
#define S_IFMT LITERALLY(0170000)
#define S_IFLNK LITERALLY(0120000)
#define S_IFSOCK LITERALLY(0140000)
#define S_ISVTX LITERALLY(01000)
#define S_ISGID LITERALLY(02000)
#define S_ISUID LITERALLY(04000)
#define S_IEXEC LITERALLY(00100)
#define S_IWRITE LITERALLY(00200)
#define S_IREAD LITERALLY(00400)
#define S_IXUSR LITERALLY(00100)
#define S_IWUSR LITERALLY(00200)
#define S_IRUSR LITERALLY(00400)
#define S_IRWXU LITERALLY(00700)
#define S_IXGRP LITERALLY(00010)
#define S_IWGRP LITERALLY(00020)
#define S_IRGRP LITERALLY(00040)
#define S_IRWXG LITERALLY(00070)
#define S_IXOTH LITERALLY(00001)
#define S_IWOTH LITERALLY(00002)
#define S_IROTH LITERALLY(00004)
#define S_IRWXO LITERALLY(00007)



/*!BEGIN libc/sysv/consts/sig.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_SIG_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long SIGABRT;
extern const long SIGALRM;
extern const long SIGBUS;
extern const long SIGCHLD;
extern const long SIGCONT;
extern const long SIGFPE;
extern const long SIGHUP;
extern const long SIGILL;
extern const long SIGINT;
extern const long SIGIO;
extern const long SIGIOT;
extern const long SIGKILL;
extern const long SIGPIPE;
extern const long SIGPOLL;
extern const long SIGPROF;
extern const long SIGPWR;
extern const long SIGQUIT;
extern const long SIGRTMAX;
extern const long SIGRTMIN;
extern const long SIGSEGV;
extern const long SIGSTKFLT;
extern const long SIGSTKSZ;
extern const long SIGSTOP;
extern const long SIGSYS;
extern const long SIGTERM;
extern const long SIGTRAP;
extern const long SIGTSTP;
extern const long SIGTTIN;
extern const long SIGTTOU;
extern const long SIGUNUSED;
extern const long SIGURG;
extern const long SIGUSR1;
extern const long SIGUSR2;
extern const long SIGVTALRM;
extern const long SIGWINCH;
extern const long SIGXCPU;
extern const long SIGXFSZ;

extern const long SIG_ATOMIC_MIN;
extern const long SIG_BLOCK;
extern const long SIG_SETMASK;
extern const long SIG_UNBLOCK;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define SIGABRT LITERALLY(6)
#define SIGALRM LITERALLY(14)
#define SIGBUS SYMBOLIC(SIGBUS)
#define SIGCHLD SYMBOLIC(SIGCHLD)
#define SIGCONT SYMBOLIC(SIGCONT)
#define SIGFPE LITERALLY(8)
#define SIGHUP LITERALLY(1)
#define SIGILL LITERALLY(4)
#define SIGINT LITERALLY(2)
#define SIGIO SYMBOLIC(SIGIO)
#define SIGIOT LITERALLY(6)
#define SIGKILL LITERALLY(9)
#define SIGPIPE LITERALLY(13)
#define SIGPOLL SYMBOLIC(SIGPOLL)
#define SIGPROF LITERALLY(27)
#define SIGPWR SYMBOLIC(SIGPWR)
#define SIGQUIT LITERALLY(3)
#define SIGRTMAX SYMBOLIC(SIGRTMAX)
#define SIGRTMIN SYMBOLIC(SIGRTMIN)
#define SIGSEGV LITERALLY(11)
#define SIGSTKFLT SYMBOLIC(SIGSTKFLT)
#define SIGSTKSZ SYMBOLIC(SIGSTKSZ)
#define SIGSTOP SYMBOLIC(SIGSTOP)
#define SIGSYS SYMBOLIC(SIGSYS)
#define SIGTERM LITERALLY(15)
#define SIGTRAP LITERALLY(5)
#define SIGTSTP SYMBOLIC(SIGTSTP)
#define SIGTTIN LITERALLY(21)
#define SIGTTOU LITERALLY(22)
#define SIGUNUSED SYMBOLIC(SIGUNUSED)
#define SIGURG SYMBOLIC(SIGURG)
#define SIGUSR1 SYMBOLIC(SIGUSR1)
#define SIGUSR2 SYMBOLIC(SIGUSR2)
#define SIGVTALRM LITERALLY(26)
#define SIGWINCH LITERALLY(28)
#define SIGXCPU LITERALLY(24)
#define SIGXFSZ LITERALLY(25)

#define SIG_ATOMIC_MIN SYMBOLIC(SIG_ATOMIC_MIN)
#define SIG_BLOCK SYMBOLIC(SIG_BLOCK)
#define SIG_SETMASK SYMBOLIC(SIG_SETMASK)
#define SIG_UNBLOCK SYMBOLIC(SIG_UNBLOCK)


#define EOF      -1  /* end of file */
#define WEOF     -1u /* end of file (multibyte) */
#define _IOFBF   0   /* fully buffered */
#define _IOLBF   1   /* line buffered */
#define _IONBF   2   /* no buffering */
#define SEEK_SET 0   /* relative to beginning */
#define SEEK_CUR 1   /* relative to current position */
#define SEEK_END 2   /* relative to end */

#define SIG_ERR ((void (*)(int))(-1))
#define SIG_DFL ((void *)0)
#define SIG_IGN ((void *)1)

#define MAP_FAILED ((void *)__SIZE_MAX__)

#define ARCH_SET_GS 0x1001
#define ARCH_SET_FS 0x1002
#define ARCH_GET_FS 0x1003
#define ARCH_GET_GS 0x1004

#define MAP_HUGE_2MB (21 << MAP_HUGE_SHIFT)
#define MAP_HUGE_1GB (30 << MAP_HUGE_SHIFT)

#define S_ISDIR(mode)  (((mode)&S_IFMT) == S_IFDIR)
#define S_ISCHR(mode)  (((mode)&S_IFMT) == S_IFCHR)
#define S_ISBLK(mode)  (((mode)&S_IFMT) == S_IFBLK)
#define S_ISREG(mode)  (((mode)&S_IFMT) == S_IFREG)
#define S_ISFIFO(mode) (((mode)&S_IFMT) == S_IFIFO)
#define S_ISLNK(mode)  (((mode)&S_IFMT) == S_IFLNK)
#define S_ISSOCK(mode) (((mode)&S_IFMT) == S_IFSOCK)

#define WCOREDUMP(s)    ((s)&0x80)
#define WEXITSTATUS(s)  (((s)&0xff00) >> 8)
#define WIFCONTINUED(s) ((s) == 0xffff)
#define WIFEXITED(s)    (!WTERMSIG(s))
#define WIFSIGNALED(s)  (((s)&0xffff) - 1u < 0xffu)
#define WIFSTOPPED(s)   ((short)((((s)&0xffff) * 0x10001) >> 8) > 0x7f00)
#define WSTOPSIG(s)     WEXITSTATUS(s)
#define WTERMSIG(s)     ((s)&0x7f)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § system calls                                              ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

typedef int sig_atomic_t;

DIR *fdopendir(int) nodiscard;
DIR *opendir(const char *) nodiscard;
bool fileexists(const char *);
bool isdirectory(const char *);
bool isexecutable(const char *);
bool isregularfile(const char *);
bool32 isatty(int) nosideeffect;
bool32 ischardev(int) nosideeffect;
char *commandv(const char *, char[hasatleast PATH_MAX]);
char *get_current_dir_name(void) nodiscard;
char *getcwd(char *, size_t);
char *realpath(const char *, char *);
char *replaceuser(const char *) nodiscard;
char *ttyname(int);
int access(const char *, int) nothrow;
int arch_prctl();
int chdir(const char *);
int chmod(const char *, uint32_t);
int chown(const char *, uint32_t, uint32_t);
int close(int);
int closedir(DIR *);
int creat(const char *, uint32_t) nodiscard;
int dirfd(DIR *);
int dup(int) nodiscard;
int dup2(int, int);
int dup3(int, int, int);
int execl(const char *, const char *, ...) nullterminated();
int execle(const char *, const char *, ...) nullterminated((1));
int execlp(const char *, const char *, ...) nullterminated();
int execv(const char *, char *const[]) paramsnonnull();
int execve(const char *, char *const[], char *const[]) paramsnonnull();
int execvp(const char *, char *const[]) paramsnonnull();
int execvpe(const char *, char *const[], char *const[]) paramsnonnull();
int faccessat(int, const char *, int, uint32_t);
int fadvise(int, uint64_t, uint64_t, int);
int fchmod(int, uint32_t) nothrow;
int fchmodat(int, const char *, uint32_t, uint32_t);
int fchown(int, uint32_t, uint32_t);
int fchownat(int, const char *, uint32_t, uint32_t, uint32_t);
int fcntl(int, int, ...);
int fdatasync(int);
int filecmp(const char *, const char *);
int flock(int, int);
int fork(void);
int fstat(int, struct stat *);
int fstatat(int, const char *, struct stat *, uint32_t);
int fsync(int);
int ftruncate(int, int64_t);
int getdomainname(char *, size_t);
int gethostname(char *, size_t);
int getppid(void);
int getpriority(int, unsigned);
int getrlimit(int, struct rlimit *);
int getrusage(int, struct rusage *);
int kill(int, int);
int killpg(int, int);
int link(const char *, const char *) nothrow;
int linkat(int, const char *, int, const char *, uint32_t);
int lstat(const char *, struct stat *);
int madvise(void *, uint64_t, int);
int mkdir(const char *, uint32_t);
int mkdirat(int, const char *, uint32_t);
int mkfifo(const char *, uint32_t);
int mknod(const char *, uint32_t, uint64_t);
int mknodat(int, const char *, int32_t, uint64_t);
int mlock(const void *, size_t);
int mlock2(const void *, size_t, int);
int mlockall(int);
int munlock(const void *, size_t);
int munlockall(void);
int nice(int);
int open(const char *, int, ...) nodiscard;
int openanon(char *, unsigned) nodiscard;
int openat(int, const char *, int, ...);
int pause(void);
int personality(uint64_t);
int pipe(int[hasatleast 2]);
int pipe2(int[hasatleast 2], int);
int posix_fadvise(int, uint64_t, uint64_t, int);
int posix_madvise(void *, uint64_t, int);
int raise(int);
int readlink(const char *, char *, size_t);
int remove(const char *);
int rename(const char *, const char *);
int renameat(int, const char *, int, const char *);
int renameat2(long, const char *, long, const char *, int);
int rmdir(const char *);
int sched_getaffinity(int, uint64_t, void *);
int sched_setaffinity(int, uint64_t, const void *);
int sched_yield(void);
int setegid(uint32_t);
int seteuid(uint32_t);
int setgid(uint32_t);
int setpgid(int, int);
int setpriority(int, unsigned, int);
int setregid(uint32_t, uint32_t);
int setresgid(uint32_t, uint32_t, uint32_t);
int setresuid(uint32_t, uint32_t, uint32_t);
int setreuid(uint32_t, uint32_t);
int setrlimit(int, const struct rlimit *);
int setsid(void);
int setuid(uint32_t);
int sigaction(int, const struct sigaction *, struct sigaction *);
int sigignore(int);
int sigprocmask(int, const struct sigset *, struct sigset *);
int sigsuspend(const struct sigset *);
int stat(const char *, struct stat *);
int symlink(const char *, const char *);
int symlinkat(const char *, int, const char *);
int sync_file_range(int, int64_t, int64_t, unsigned);
int sysinfo(struct sysinfo *) paramsnonnull();
int touch(const char *, uint32_t);
int truncate(const char *, uint64_t);
int ttyname_r(int, char *, size_t);
int uname(struct utsname *);
int unlink(const char *);
int unlink_s(const char **);
int unlinkat(int, const char *, int);
int vfork(void) returnstwice;
int wait(int *);
int wait3(int *, int, struct rusage *);
int wait4(int, int *, int, struct rusage *);
int waitpid(int, int *, int);
ssize_t lseek(int, int64_t, unsigned);
ssize_t pread(int, void *, size_t, int64_t);
ssize_t preadv(int, struct iovec *, int, int64_t);
ssize_t pwrite(int, const void *, size_t, int64_t);
ssize_t pwritev(int, const struct iovec *, int, int64_t);
intptr_t syscall(int, ...);
void sync(void);
long telldir(DIR *);
int getpid(void);
long times(struct tms *);
sighandler_t signal(int, sighandler_t);
size_t GetFileSize(const char *);
size_t getfiledescriptorsize(int);
ssize_t copy_file_range(int, long *, int, long *, size_t, uint32_t);
ssize_t copyfd(int, int64_t *, int, int64_t *, size_t, uint32_t);
ssize_t read(int, void *, size_t);
ssize_t readansi(int, char *, size_t);
ssize_t readlinkat(int, const char *, char *, size_t);
ssize_t splice(int, int64_t *, int, int64_t *, size_t, uint32_t);
ssize_t vmsplice(int, const struct iovec *, int64_t, uint32_t);
ssize_t write(int, const void *, size_t);
struct dirent *readdir(DIR *);
uint32_t getegid(void) nosideeffect;
uint32_t geteuid(void) nosideeffect;
uint32_t getgid(void) nosideeffect;
uint32_t getpgrp(void) nosideeffect;
uint32_t getsid(int) nosideeffect;
uint32_t gettid(void) nosideeffect;
uint32_t getuid(void) nosideeffect;
uint32_t umask(int32_t);
long ptrace(int, int, void *, void *);
int chroot(const char *);
int prctl();
int sysctl(const int *, unsigned, void *, size_t *, void *, size_t);
int fchdir(int);

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § system calls » formatting                                 ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

int dprintf(int, const char *, ...) printfesque(2) paramsnonnull((2));
int vdprintf(int, const char *, va_list) paramsnonnull();

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § system calls » link-time optimizations                    ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)

#define getcwd(BUF, SIZE)                                       \
  (__builtin_constant_p(BUF) && !(BUF) ? get_current_dir_name() \
                                       : getcwd(BUF, SIZE))

void _init_onntconsoleevent(void);
void _init_wincrash(void);

#ifndef __SIGACTION_YOINK
#define __SIGACTION_YOINK(SIG)             \
  do {                                     \
    if (SupportsWindows()) {               \
      if (__builtin_constant_p(SIG)) {     \
        switch (SIG) {                     \
          case SIGINT:                     \
          case SIGQUIT:                    \
          case SIGHUP:                     \
          case SIGTERM:                    \
            YOINK(_init_onntconsoleevent); \
            break;                         \
          case SIGTRAP:                    \
          case SIGILL:                     \
          case SIGSEGV:                    \
          case SIGABRT:                    \
          case SIGFPE:                     \
            YOINK(_init_wincrash);         \
            break;                         \
          default:                         \
            break;                         \
        }                                  \
      } else {                             \
        YOINK(_init_onntconsoleevent);     \
        YOINK(_init_wincrash);             \
      }                                    \
    }                                      \
  } while (0)
#endif

#define sigaction(SIG, ACT, OLD) \
  ({                             \
    __SIGACTION_YOINK(SIG);      \
    sigaction(SIG, (ACT), OLD);  \
  })

#define signal(SIG, HAND)   \
  ({                        \
    __SIGACTION_YOINK(SIG); \
    signal(SIG, HAND);      \
  })

#define dprintf(FD, FMT, ...) (dprintf)(FD, PFLINK(FMT), ##__VA_ARGS__)
#define vdprintf(FD, FMT, VA) (vdprintf)(FD, PFLINK(FMT), VA)

#endif /* GNU && !ANSI */
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/calls/copyfile.h */

#define COSMOPOLITAN_LIBC_CALLS_COPYFILE_H_

#define COPYFILE_NOCLOBBER           1
#define COPYFILE_PRESERVE_OWNER      2
#define COPYFILE_PRESERVE_TIMESTAMPS 4

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

int copyfile(const char *, const char *, int) paramsnonnull();

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/calls/ioctl.h */

#define COSMOPOLITAN_LIBC_CALLS_IOCTL_H_


/*!BEGIN libc/sysv/consts/termios.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_TERMIOS_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long BRKINT;
extern const long BSDLY;
extern const long BUSY;
extern const long CANBSIZ;
extern const long CBAUD;
extern const long CBAUDEX;
extern const long CBRK;
extern const long CEOL;
extern const long CIBAUD;
extern const long CLOCAL;
extern const long CMSPAR;
extern const long CRDLY;
extern const long CS6;
extern const long CS7;
extern const long CS8;
extern const long CSIZE;
extern const long ECHO;
extern const long ECHOCTL;
extern const long ECHOE;
extern const long ECHOK;
extern const long ECHOKE;
extern const long ECHONL;
extern const long ECHOPRT;
extern const long ENDRUNDISC;
extern const long EXTPROC;
extern const long FFDLY;
extern const long FLUSHO;
extern const long H4DISC;
extern const long ICANON;
extern const long ICRNL;
extern const long IEXTEN;
extern const long IGNBRK;
extern const long IGNCR;
extern const long IGNPAR;
extern const long IMAXBEL;
extern const long INLCR;
extern const long INPCK;
extern const long ISIG;
extern const long ISTRIP;
extern const long IUCLC;
extern const long IUTF8;
extern const long IXANY;
extern const long IXOFF;
extern const long IXON;
extern const long NCCS;
extern const long NETGRAPHDISC;
extern const long NLDLY;
extern const long NMEADISC;
extern const long NOFLSH;
extern const long OCRNL;
extern const long OFDEL;
extern const long OFILL;
extern const long OLCUC;
extern const long ONLCR;
extern const long ONLRET;
extern const long ONOCR;
extern const long OPOST;
extern const long PARENB;
extern const long PARMRK;
extern const long PARODD;
extern const long PENDIN;
extern const long PPPDISC;
extern const long SLIPDISC;
extern const long STRIPDISC;
extern const long TABDLY;
extern const long TABLDISC;
extern const long TCGETS;
extern const long TCSADRAIN;
extern const long TCSAFLUSH;
extern const long TCSANOW;
extern const long TCSETS;
extern const long TCSETSF;
extern const long TCSETSW;
extern const long TIOCCBRK;
extern const long TIOCCDTR;
extern const long TIOCCHKVERAUTH;
extern const long TIOCCONS;
extern const long TIOCDRAIN;
extern const long TIOCEXT;
extern const long TIOCFLAG_CLOCAL;
extern const long TIOCFLAG_MDMBUF;
extern const long TIOCFLAG_PPS;
extern const long TIOCFLAG_SOFTCAR;
extern const long TIOCFLUSH;
extern const long TIOCGDRAINWAIT;
extern const long TIOCGETD;
extern const long TIOCGFLAGS;
extern const long TIOCGPGRP;
extern const long TIOCGPTN;
extern const long TIOCGSID;
extern const long TIOCGTSTAMP;
extern const long TIOCGWINSZ;
extern const long TIOCNOTTY;
extern const long TIOCNXCL;
extern const long TIOCOUTQ;
extern const long TIOCPTMASTER;
extern const long TIOCREMOTE;
extern const long TIOCSBRK;
extern const long TIOCSCTTY;
extern const long TIOCSDRAINWAIT;
extern const long TIOCSDTR;
extern const long TIOCSERGETLSR;
extern const long TIOCSERGETMULTI;
extern const long TIOCSERSETMULTI;
extern const long TIOCSER_TEMT;
extern const long TIOCSETD;
extern const long TIOCSETVERAUTH;
extern const long TIOCSFLAGS;
extern const long TIOCSIG;
extern const long TIOCSPGRP;
extern const long TIOCSTART;
extern const long TIOCSTAT;
extern const long TIOCSTI;
extern const long TIOCSTSTAMP;
extern const long TIOCSWINSZ;
extern const long TIOCTIMESTAMP;
extern const long TIOCUCNTL_CBRK;
extern const long TOSTOP;
extern const long TTYDISC;
extern const long VDISCARD;
extern const long VEOF;
extern const long VEOL;
extern const long VEOL2;
extern const long VERASE;
extern const long VERIFY;
extern const long VINTR;
extern const long VKILL;
extern const long VLNEXT;
extern const long VMIN;
extern const long VQUIT;
extern const long VREPRINT;
extern const long VSTART;
extern const long VSTOP;
extern const long VSUSP;
extern const long VSWTC;
extern const long VTDLY;
extern const long VTIME;
extern const long VWERASE;
extern const long XCASE;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define IGNBRK  LITERALLY(0x01)
#define BRKINT  LITERALLY(0x02)
#define IGNPAR  LITERALLY(0x04)
#define PARMRK  LITERALLY(0x08)
#define INPCK   LITERALLY(0x10)
#define ISTRIP  LITERALLY(0x20)
#define INLCR   LITERALLY(0x40)
#define IGNCR   LITERALLY(0x80)
#define ICRNL   LITERALLY(0x0100)
#define IXANY   LITERALLY(0x0800)
#define IMAXBEL LITERALLY(0x2000)
#define OPOST   LITERALLY(0x01)

#define NLDLY  SYMBOLIC(NLDLY)
#define NL0    LITERALLY(0)
#define NL1    SYMBOLIC(NL1)
#define NL2    SYMBOLIC(NL2)
#define NL3    SYMBOLIC(NL3)
#define CRDLY  SYMBOLIC(CRDLY)
#define CR0    LITERALLY(0)
#define CR1    SYMBOLIC(CR1)
#define CR2    SYMBOLIC(CR2)
#define CR3    SYMBOLIC(CR3)
#define TABDLY SYMBOLIC(TABDLY)
#define TAB0   LITERALLY(0)
#define TAB1   SYMBOLIC(TAB1)
#define TAB2   SYMBOLIC(TAB2)
#define TAB3   SYMBOLIC(TAB3)
#define XTABS  SYMBOLIC(XTABS)
#define BSDLY  SYMBOLIC(BSDLY)
#define BS0    LITERALLY(0)
#define BS1    SYMBOLIC(BS1)
#define BS2    SYMBOLIC(BS2)
#define VTDLY  SYMBOLIC(VTDLY)
#define VT0    LITERALLY(0)
#define VT1    SYMBOLIC(VT1)
#define VT2    SYMBOLIC(VT2)
#define FFDLY  SYMBOLIC(FFDLY)
#define FF0    LITERALLY(0)
#define FF1    SYMBOLIC(FF1)
#define FF2    SYMBOLIC(FF2)

#define BUSY             SYMBOLIC(BUSY)
#define CANBSIZ          SYMBOLIC(CANBSIZ)
#define CBAUD            SYMBOLIC(CBAUD)
#define CBAUDEX          SYMBOLIC(CBAUDEX)
#define CBRK             SYMBOLIC(CBRK)
#define CEOL             SYMBOLIC(CEOL)
#define CIBAUD           SYMBOLIC(CIBAUD)
#define CLOCAL           SYMBOLIC(CLOCAL)
#define CMSPAR           SYMBOLIC(CMSPAR)
#define CS6              SYMBOLIC(CS6)
#define CS7              SYMBOLIC(CS7)
#define CS8              SYMBOLIC(CS8)
#define CSIZE            SYMBOLIC(CSIZE)
#define ECHO             LITERALLY(8)
#define ECHOCTL          SYMBOLIC(ECHOCTL)
#define ECHOE            SYMBOLIC(ECHOE)
#define ECHOK            SYMBOLIC(ECHOK)
#define ECHOKE           SYMBOLIC(ECHOKE)
#define ECHONL           SYMBOLIC(ECHONL)
#define ECHOPRT          SYMBOLIC(ECHOPRT)
#define ENDRUNDISC       SYMBOLIC(ENDRUNDISC)
#define EXTPROC          SYMBOLIC(EXTPROC)
#define FLUSHO           SYMBOLIC(FLUSHO)
#define H4DISC           SYMBOLIC(H4DISC)
#define ICANON           SYMBOLIC(ICANON)
#define IEXTEN           SYMBOLIC(IEXTEN)
#define ISIG             SYMBOLIC(ISIG)
#define IUCLC            SYMBOLIC(IUCLC)
#define IUTF8            SYMBOLIC(IUTF8)
#define IXOFF            SYMBOLIC(IXOFF)
#define IXON             SYMBOLIC(IXON)
#define NCCS             LITERALLY(32)
#define NETGRAPHDISC     SYMBOLIC(NETGRAPHDISC)
#define NMEADISC         SYMBOLIC(NMEADISC)
#define NOFLSH           SYMBOLIC(NOFLSH)
#define OCRNL            SYMBOLIC(OCRNL)
#define OFDEL            SYMBOLIC(OFDEL)
#define OFILL            SYMBOLIC(OFILL)
#define OLCUC            SYMBOLIC(OLCUC)
#define ONLCR            SYMBOLIC(ONLCR)
#define ONLRET           SYMBOLIC(ONLRET)
#define ONOCR            SYMBOLIC(ONOCR)
#define PARENB           SYMBOLIC(PARENB)
#define PARODD           SYMBOLIC(PARODD)
#define PENDIN           SYMBOLIC(PENDIN)
#define PPPDISC          SYMBOLIC(PPPDISC)
#define SLIPDISC         SYMBOLIC(SLIPDISC)
#define STRIPDISC        SYMBOLIC(STRIPDISC)
#define TABLDISC         SYMBOLIC(TABLDISC)
#define TCGETS           SYMBOLIC(TCGETS)
#define TCSANOW          LITERALLY(0)
#define TCSADRAIN        LITERALLY(1)
#define TCSAFLUSH        LITERALLY(2)
#define TCSETS           SYMBOLIC(TCSETS)
#define TCSETSF          SYMBOLIC(TCSETSF)
#define TCSETSW          SYMBOLIC(TCSETSW)
#define TIOCCBRK         SYMBOLIC(TIOCCBRK)
#define TIOCCDTR         SYMBOLIC(TIOCCDTR)
#define TIOCCHKVERAUTH   SYMBOLIC(TIOCCHKVERAUTH)
#define TIOCCONS         SYMBOLIC(TIOCCONS)
#define TIOCDRAIN        SYMBOLIC(TIOCDRAIN)
#define TIOCEXT          SYMBOLIC(TIOCEXT)
#define TIOCFLAG_CLOCAL  SYMBOLIC(TIOCFLAG_CLOCAL)
#define TIOCFLAG_MDMBUF  SYMBOLIC(TIOCFLAG_MDMBUF)
#define TIOCFLAG_PPS     SYMBOLIC(TIOCFLAG_PPS)
#define TIOCFLAG_SOFTCAR SYMBOLIC(TIOCFLAG_SOFTCAR)
#define TIOCFLUSH        SYMBOLIC(TIOCFLUSH)
#define TIOCGDRAINWAIT   SYMBOLIC(TIOCGDRAINWAIT)
#define TIOCGETD         SYMBOLIC(TIOCGETD)
#define TIOCGFLAGS       SYMBOLIC(TIOCGFLAGS)
#define TIOCGPGRP        SYMBOLIC(TIOCGPGRP)
#define TIOCGPTN         SYMBOLIC(TIOCGPTN)
#define TIOCGSID         SYMBOLIC(TIOCGSID)
#define TIOCGTSTAMP      SYMBOLIC(TIOCGTSTAMP)
#define TIOCGWINSZ       SYMBOLIC(TIOCGWINSZ)
#define TIOCNOTTY        SYMBOLIC(TIOCNOTTY)
#define TIOCNXCL         SYMBOLIC(TIOCNXCL)
#define TIOCOUTQ         SYMBOLIC(TIOCOUTQ)
#define TIOCPTMASTER     SYMBOLIC(TIOCPTMASTER)
#define TIOCREMOTE       SYMBOLIC(TIOCREMOTE)
#define TIOCSBRK         SYMBOLIC(TIOCSBRK)
#define TIOCSCTTY        SYMBOLIC(TIOCSCTTY)
#define TIOCSDRAINWAIT   SYMBOLIC(TIOCSDRAINWAIT)
#define TIOCSDTR         SYMBOLIC(TIOCSDTR)
#define TIOCSERGETLSR    SYMBOLIC(TIOCSERGETLSR)
#define TIOCSERGETMULTI  SYMBOLIC(TIOCSERGETMULTI)
#define TIOCSERSETMULTI  SYMBOLIC(TIOCSERSETMULTI)
#define TIOCSER_TEMT     SYMBOLIC(TIOCSER_TEMT)
#define TIOCSETD         SYMBOLIC(TIOCSETD)
#define TIOCSETVERAUTH   SYMBOLIC(TIOCSETVERAUTH)
#define TIOCSFLAGS       SYMBOLIC(TIOCSFLAGS)
#define TIOCSIG          SYMBOLIC(TIOCSIG)
#define TIOCSPGRP        SYMBOLIC(TIOCSPGRP)
#define TIOCSTART        SYMBOLIC(TIOCSTART)
#define TIOCSTAT         SYMBOLIC(TIOCSTAT)
#define TIOCSTI          SYMBOLIC(TIOCSTI)
#define TIOCSTSTAMP      SYMBOLIC(TIOCSTSTAMP)
#define TIOCSWINSZ       SYMBOLIC(TIOCSWINSZ)
#define TIOCTIMESTAMP    SYMBOLIC(TIOCTIMESTAMP)
#define TIOCUCNTL_CBRK   SYMBOLIC(TIOCUCNTL_CBRK)
#define TOSTOP           SYMBOLIC(TOSTOP)
#define TTYDISC          SYMBOLIC(TTYDISC)
#define VDISCARD         SYMBOLIC(VDISCARD)
#define VEOF             SYMBOLIC(VEOF)
#define VEOL             SYMBOLIC(VEOL)
#define VEOL2            SYMBOLIC(VEOL2)
#define VERASE           SYMBOLIC(VERASE)
#define VERIFY           SYMBOLIC(VERIFY)
#define VINTR            SYMBOLIC(VINTR)
#define VKILL            SYMBOLIC(VKILL)
#define VLNEXT           SYMBOLIC(VLNEXT)
#define VMIN             SYMBOLIC(VMIN)
#define VQUIT            SYMBOLIC(VQUIT)
#define VREPRINT         SYMBOLIC(VREPRINT)
#define VSTART           SYMBOLIC(VSTART)
#define VSTOP            SYMBOLIC(VSTOP)
#define VSUSP            SYMBOLIC(VSUSP)
#define VSWTC            SYMBOLIC(VSWTC)
#define VTIME            SYMBOLIC(VTIME)
#define VWERASE          SYMBOLIC(VWERASE)
#define XCASE            SYMBOLIC(XCASE)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § system calls » ioctl                                      ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

int ioctl(int, uint64_t, void *);

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § system calls » ioctl » undiamonding (size optimization)   ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)

#define ioctl(FD, REQUEST, MEMORY) ioctl_dispatch(FD, REQUEST, MEMORY)

#define __EQUIVALENT(X, Y) (__builtin_constant_p((X) == (Y)) && ((X) == (Y)))
#define __IOCTL_DISPATCH(CMP, FD, REQUEST, MEMORY)                       \
  do {                                                                   \
    if (CMP(request, TIOCGWINSZ)) return ioctl_tiocgwinsz(FD, MEMORY);   \
    if (CMP(request, TIOCSWINSZ)) return ioctl_tiocswinsz(FD, MEMORY);   \
    if (CMP(request, TCGETS)) return ioctl_tcgets(FD, MEMORY);           \
    if (CMP(request, TCSETS)) return ioctl_tcsets(FD, REQUEST, MEMORY);  \
    if (CMP(request, TCSETSW)) return ioctl_tcsets(FD, REQUEST, MEMORY); \
    if (CMP(request, TCSETSF)) return ioctl_tcsets(FD, REQUEST, MEMORY); \
  } while (0)

int ioctl_tcgets(int, void *);
int ioctl_tcgets_nt(int, void *);
int ioctl_tcsets(int, uint64_t, void *);
int ioctl_tcsets_nt(int, uint64_t, void *);
int ioctl_tiocgwinsz(int, void *);
int ioctl_tiocgwinsz_nt(int, void *);
int ioctl_tiocswinsz(int, void *);
int ioctl_tiocswinsz_nt(int, void *);
int ioctl_default(int, uint64_t, void *);

forceinline int ioctl_dispatch(int fd, uint64_t request, void *memory) {
  __IOCTL_DISPATCH(__EQUIVALENT, fd, request, memory);
  return ioctl_default(fd, request, memory);
}

#endif /* GNUC && !ANSI */
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/calls/ntspawn.h */

#define COSMOPOLITAN_LIBC_CALLS_NTSPAWN_H_


/*!BEGIN libc/nt/struct/processinformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_PROCESSINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtProcessInformation {
  int64_t hProcess;
  int64_t hThread;
  uint32_t dwProcessId;
  uint32_t dwThreadId;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/securityattributes.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_SECURITYATTRIBUTES_H_


/*!BEGIN libc/nt/struct/securitydescriptor.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_SECURITYDESCRIPTOR_H_


/*!BEGIN libc/nt/struct/acl.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_ACL_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtAcl {
  uint8_t AclRevision;
  uint8_t Sbz1;
  uint16_t AclSize;
  uint16_t AceCount;
  uint16_t Sbz2;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtSecurityDescriptor {
  uint8_t Revision;
  uint8_t Sbz1;
  uint16_t Control;
  void *Owner;
  void *Group;
  struct NtAcl *Sacl;
  struct NtAcl *Dacl;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtSecurityAttributes {
  uint32_t nLength;
  struct NtSecurityDescriptor *lpSecurityDescriptor;
  bool32 bInheritHandle;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/startupinfo.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_STARTUPINFO_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtStartupInfo {
  uint32_t cb /* = sizeof(struct NtStartupInfo) */;
  uint16_t *lpReserved;
  char16_t *lpDesktop;
  char16_t *lpTitle; /* title of *new* console window only */
  uint32_t dwX;      /* position of window on screen */
  uint32_t dwY;
  uint32_t dwXSize;
  uint32_t dwYSize;
  uint32_t dwXCountChars; /* used to dimension the dos terminal */
  uint32_t dwYCountChars;
  uint32_t dwFillAttribute;
  uint32_t dwFlags;
  uint16_t wShowWindow;
  uint16_t cbReserved2;
  uint8_t *lpReserved2;
  union {
    struct {
      int64_t hStdInput;
      int64_t hStdOutput;
      int64_t hStdError;
    };
    int64_t stdiofds[3];
  };
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

int mkntcmdline(char16_t[ARG_MAX], const char *, char *const[]) hidden;
int mkntenvblock(char16_t[ARG_MAX], char *const[], const char *) hidden;
int ntspawn(const char *, char *const[], char *const[], const char *,
            struct NtSecurityAttributes *, struct NtSecurityAttributes *,
            bool32, uint32_t, const char16_t *, const struct NtStartupInfo *,
            struct NtProcessInformation *) hidden;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/calls/scheduler.h */

#define COSMOPOLITAN_LIBC_CALLS_SCHED_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

int sched_setscheduler(int, int, const struct sched_param *);
int sched_getscheduler(int);
int sched_setparam(int, const struct sched_param *);
int sched_getparam(int, struct sched_param *);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/calls/sigbits.h */

#define COSMOPOLITAN_LIBC_CALLS_SIGBITS_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

int sigaddset(sigset_t *, int) paramsnonnull();
int sigdelset(sigset_t *, int) paramsnonnull();
int sigemptyset(sigset_t *) paramsnonnull();
int sigfillset(sigset_t *) paramsnonnull();
int sigismember(const sigset_t *, int) paramsnonnull() nosideeffect;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/calls/termios.h */

#define COSMOPOLITAN_LIBC_CALLS_TERMIOS_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § teletypewriter control                                    ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

int tcgetattr(int, struct termios *);
int tcsetattr(int, int, const struct termios *);
int tcsetpgrp(int, int32_t);
int32_t tcgetpgrp(int);

int openpty(int *, int *, char *, const struct termios *,
            const struct winsize *) paramsnonnull((1, 2)) nodiscard;
int forkpty(int *, char *, const struct termios *, const struct winsize *)
    paramsnonnull((1, 2)) nodiscard;
errno_t ptsname_r(int, char *, size_t);

int grantpt(int);
int unlockpt(int);
int posix_openpt(int) nodiscard;

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § teletypewriter » undiamonding                             ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)

#define tcsetattr(FD, OPT, TIO) tcsetattr_dispatch(FD, OPT, TIO)
forceinline int tcsetattr_dispatch(int fd, int opt, const struct termios *tio) {
  if (__EQUIVALENT(opt, TCSANOW)) return ioctl(fd, TCSETS, (void *)tio);
  if (__EQUIVALENT(opt, TCSADRAIN)) return ioctl(fd, TCSETSW, (void *)tio);
  if (__EQUIVALENT(opt, TCSAFLUSH)) return ioctl(fd, TCSETSF, (void *)tio);
  return (tcsetattr)(fd, opt, tio);
}

#define tcgetattr(FD, TIO) tcgetattr_dispatch(FD, TIO)
forceinline int tcgetattr_dispatch(int fd, const struct termios *tio) {
  return ioctl(fd, TCGETS, (void *)tio);
}

#endif /* GNUC && !ANSI */
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/calls/wait4.h */

#define COSMOPOLITAN_LIBC_CALLS_WAIT4_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

int sys_wait4_nt(int, int *, int, struct rusage *) hidden;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/calls/weirdtypes.h */

#define COSMOPOLITAN_LIBC_CALLS_WEIRDTYPES_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

/**
 * @fileoverview Types we'd prefer hadn't been invented.
 */

#define blkcnt_t      int64_t
#define blksize_t     int64_t /* int32_t on xnu */
#define cc_t          uint8_t
#define clock_t       int64_t /* uint64_t on xnu */
#define cpu_set_t     uint64_t
#define dev_t         uint64_t /* int32_t on xnu */
#define fsblkcnt_t    int64_t
#define fsfilcnt_t    int64_t /* uint32_t on xnu */
#define gid_t         uint32_t
#define id_t          uint32_t /* int32_t on linux/freebsd/etc. */
#define in_addr_t     uint32_t
#define in_addr_t     uint32_t
#define in_port_t     uint16_t
#define in_port_t     uint16_t
#define ino_t         uint64_t
#define key_t         int32_t
#define loff_t        int64_t
#define mode_t        uint32_t /* uint16_t on xnu */
#define nfds_t        uint64_t
#define off_t         int64_t
#define pid_t         int32_t
#define register_t    int64_t
#define sa_family_t   uint16_t /* bsd:uint8_t */
#define socklen_t     uint32_t
#define speed_t       uint32_t
#define suseconds_t   int64_t /* int32_t on xnu */
#define syscall_arg_t int64_t /* uint64_t on xnu */
#define tcflag_t      uint32_t
#define time_t        int64_t
#define timer_t       void*
#define uid_t         uint32_t

#define int_fast8_t   __INT_FAST8_TYPE__
#define uint_fast8_t  __UINT_FAST8_TYPE__
#define int_fast16_t  __INT_FAST16_TYPE__
#define uint_fast16_t __UINT_FAST16_TYPE__
#define int_fast32_t  __INT_FAST32_TYPE__
#define uint_fast32_t __UINT_FAST32_TYPE__
#define int_fast64_t  __INT_FAST64_TYPE__
#define uint_fast64_t __UINT_FAST64_TYPE__

#define atomic_bool           _Atomic(_Bool)
#define atomic_bool32         atomic_int_fast32_t
#define atomic_char           _Atomic(char)
#define atomic_schar          _Atomic(signed char)
#define atomic_uchar          _Atomic(unsigned char)
#define atomic_short          _Atomic(short)
#define atomic_ushort         _Atomic(unsigned short)
#define atomic_int            _Atomic(int)
#define atomic_uint           _Atomic(unsigned int)
#define atomic_long           _Atomic(long)
#define atomic_ulong          _Atomic(unsigned long)
#define atomic_llong          _Atomic(long long)
#define atomic_ullong         _Atomic(unsigned long long)
#define atomic_char16_t       _Atomic(char16_t)
#define atomic_char32_t       _Atomic(char32_t)
#define atomic_wchar_t        _Atomic(wchar_t)
#define atomic_int_least8_t   _Atomic(int_least8_t)
#define atomic_uint_least8_t  _Atomic(uint_least8_t)
#define atomic_int_least16_t  _Atomic(int_least16_t)
#define atomic_uint_least16_t _Atomic(uint_least16_t)
#define atomic_int_least32_t  _Atomic(int_least32_t)
#define atomic_uint_least32_t _Atomic(uint_least32_t)
#define atomic_int_least64_t  _Atomic(int_least64_t)
#define atomic_uint_least64_t _Atomic(uint_least64_t)
#define atomic_int_fast8_t    _Atomic(int_fast8_t)
#define atomic_uint_fast8_t   _Atomic(uint_fast8_t)
#define atomic_int_fast16_t   _Atomic(int_fast16_t)
#define atomic_uint_fast16_t  _Atomic(uint_fast16_t)
#define atomic_int_fast32_t   _Atomic(int_fast32_t)
#define atomic_uint_fast32_t  _Atomic(uint_fast32_t)
#define atomic_int_fast64_t   _Atomic(int_fast64_t)
#define atomic_uint_fast64_t  _Atomic(uint_fast64_t)
#define atomic_intptr_t       _Atomic(intptr_t)
#define atomic_uintptr_t      _Atomic(uintptr_t)
#define atomic_size_t         _Atomic(size_t)
#define atomic_ptrdiff_t      _Atomic(ptrdiff_t)

#ifdef __CLANG_ATOMIC_BOOL_LOCK_FREE
#define ATOMIC_BOOL_LOCK_FREE     __CLANG_ATOMIC_BOOL_LOCK_FREE
#define ATOMIC_CHAR_LOCK_FREE     __CLANG_ATOMIC_CHAR_LOCK_FREE
#define ATOMIC_CHAR16_T_LOCK_FREE __CLANG_ATOMIC_CHAR16_T_LOCK_FREE
#define ATOMIC_CHAR32_T_LOCK_FREE __CLANG_ATOMIC_CHAR32_T_LOCK_FREE
#define ATOMIC_WCHAR_T_LOCK_FREE  __CLANG_ATOMIC_WCHAR_T_LOCK_FREE
#define ATOMIC_SHORT_LOCK_FREE    __CLANG_ATOMIC_SHORT_LOCK_FREE
#define ATOMIC_INT_LOCK_FREE      __CLANG_ATOMIC_INT_LOCK_FREE
#define ATOMIC_LONG_LOCK_FREE     __CLANG_ATOMIC_LONG_LOCK_FREE
#define ATOMIC_LLONG_LOCK_FREE    __CLANG_ATOMIC_LLONG_LOCK_FREE
#define ATOMIC_POINTER_LOCK_FREE  __CLANG_ATOMIC_POINTER_LOCK_FREE
#else
#define ATOMIC_BOOL_LOCK_FREE     __GCC_ATOMIC_BOOL_LOCK_FREE
#define ATOMIC_CHAR_LOCK_FREE     __GCC_ATOMIC_CHAR_LOCK_FREE
#define ATOMIC_CHAR16_T_LOCK_FREE __GCC_ATOMIC_CHAR16_T_LOCK_FREE
#define ATOMIC_CHAR32_T_LOCK_FREE __GCC_ATOMIC_CHAR32_T_LOCK_FREE
#define ATOMIC_WCHAR_T_LOCK_FREE  __GCC_ATOMIC_WCHAR_T_LOCK_FREE
#define ATOMIC_SHORT_LOCK_FREE    __GCC_ATOMIC_SHORT_LOCK_FREE
#define ATOMIC_INT_LOCK_FREE      __GCC_ATOMIC_INT_LOCK_FREE
#define ATOMIC_LONG_LOCK_FREE     __GCC_ATOMIC_LONG_LOCK_FREE
#define ATOMIC_LLONG_LOCK_FREE    __GCC_ATOMIC_LLONG_LOCK_FREE
#define ATOMIC_POINTER_LOCK_FREE  __GCC_ATOMIC_POINTER_LOCK_FREE
#endif

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/calls/xattr.h */

#define COSMOPOLITAN_LIBC_CALLS_XATTR_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

ssize_t flistxattr(int, char *, size_t);
ssize_t fgetxattr(int, const char *, void *, size_t);
int fsetxattr(int, const char *, const void *, size_t, int);
int fremovexattr(int, const char *);
ssize_t listxattr(const char *, char *, size_t);
ssize_t getxattr(const char *, const char *, void *, size_t);
int setxattr(const char *, const char *, const void *, size_t, int);
int removexattr(const char *, const char *);
ssize_t llistxattr(const char *, char *, size_t);
ssize_t lgetxattr(const char *, const char *, void *, size_t);
int lsetxattr(const char *, const char *, const void *, size_t, int);
int lremovexattr(const char *, const char *);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/crypto/rijndael.h */

#define COSMOPOLITAN_LIBC_CRYPTO_RIJNDAEL_H_
#ifndef __STRICT_ANSI__
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § cryptography » advanced encryption standard               ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│─┘
    AES-256 Latency                                  x86 2010+    SSE2
    ───────────────                                  ─────────   ──────
    rijndael(14, block, &ctx)                           23 ns    218 ns
    unrijndael(14, block, &ctx)                         23 ns    690 ns
    rijndaelinit(&ctx, 14, k1, k2)                     136 ns    135 ns
    unrijndaelinit(&ctx, 14, k1, k2)                   186 ns    639 ns

    Untrustworthy System Viability                   x86 2010+    SSE2
    ──────────────────────────────                   ─────────   ──────
    rijndael(14, block, &ctx)                             A        C
    unrijndael(14, block, &ctx)                           A        C
    rijndaelinit(&ctx, 14, k1, k2)                        B        B
    unrijndaelinit(&ctx, 14, k1, k2)                      B        C

    Comparison                                   Cosmo    Rijndael  Tiny-AES
    ──────────────────────────────              ───────   ────────  ────────
    Generalized Math                               Yes        Yes       No
    Footprint                                  1,782 b    9,258 b     903 b
    Performance (New Hardware)                   ~20 ns     ~40 ns   ~400 ns
    Performance (Old Hardware)                  ~400 ns     ~40 ns   ~400 ns */

typedef uint32_t aes_block_t _Vector_size(16) forcealign(16);

struct Rijndael {
  union {
    aes_block_t xmm;
    uint32_t u32[4];
    uint8_t u8[16];
  } rk[15];
};

void rijndaelinit(struct Rijndael *, uint32_t, aes_block_t, aes_block_t);
aes_block_t rijndael(uint32_t, aes_block_t, const struct Rijndael *);
void unrijndaelinit(struct Rijndael *, uint32_t, aes_block_t, aes_block_t);
aes_block_t unrijndael(uint32_t, aes_block_t, const struct Rijndael *);

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § cryptography » implementation details                     ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

extern const uint8_t kAesSbox[256] forcealign(64);
extern const uint8_t kAesSboxInverse[256] forcealign(64);

aes_block_t InvMixColumns(aes_block_t) hidden;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#endif /* !ANSI */


/*!BEGIN libc/dns/consts.h */

#define COSMOPOLITAN_LIBC_DNS_CONSTS_H_


/*!BEGIN libc/sock/sock.h */

#define COSMOPOLITAN_LIBC_SOCK_SOCK_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § system api » berkeley sockets                             ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#define INET_ADDRSTRLEN 22

#define NI_DGRAM   0x10
#define NI_MAXSERV 0x20

#define htons(u16) bswap_16(u16)
#define ntohs(u16) bswap_16(u16)
#define htonl(u32) bswap_32(u32)
#define ntohl(u32) bswap_32(u32)

struct iovec;
struct sigset;
struct timespec;
struct timeval;
struct addrinfo;

struct in_addr { /* ARPA ABI */
  /* e.g. 127|0<<8|0<<16|1<<24 or inet_pton(AF_INET, "127.0.0.1", &s_addr) */
  uint32_t s_addr;
};

struct sockaddr {     /* Linux+NT ABI */
  uint16_t sa_family; /* AF_XXX */
  char sa_data[14];
};

struct sockaddr_in {   /* Linux+NT ABI */
  uint16_t sin_family; /* AF_XXX */
  uint16_t sin_port;   /* htons(XXX) i.e. big endian */
  struct in_addr sin_addr;
  uint8_t sin_zero[8];
};

struct sockaddr_storage {
  union {
    uint16_t ss_family;
    intptr_t __ss_align;
    char __ss_storage[128];
  };
};

struct pollfd {
  int32_t fd;
  int16_t events;
  int16_t revents;
};

struct msghdr {            /* Linux+NT ABI */
  void *msg_name;          /* optional address */
  int32_t msg_namelen;     /* size of msg_name */
  struct iovec *msg_iov;   /* scatter/gather array */
  uint64_t msg_iovlen;     /* iovec count */
  void *msg_control;       /* credentials and stuff */
  uint64_t msg_controllen; /* size of msg_control */
  uint32_t msg_flags;      /* MSG_XXX */
};

const char *inet_ntop(int, const void *, char *, uint32_t);
int inet_aton(const char *, struct in_addr *);
int inet_pton(int, const char *, void *);
uint32_t inet_addr(const char *);
char *inet_ntoa(struct in_addr);
int parseport(const char *);

int socket(int, int, int) nodiscard;
int accept(int, void *, uint32_t *) nodiscard;
int accept4(int, void *, uint32_t *, int) nodiscard;
int bind(int, const void *, uint32_t);
int connect(int, const void *, uint32_t);
int socketconnect(const struct addrinfo *, int);
int listen(int, int);
int shutdown(int, int);
int getsockname(int, void *, uint32_t *) paramsnonnull();
int getpeername(int, void *, uint32_t *) paramsnonnull();
ssize_t send(int, const void *, size_t, int) paramsnonnull();
ssize_t recv(int, void *, size_t, int);
ssize_t recvmsg(int, struct msghdr *, uint32_t) paramsnonnull();
ssize_t recvfrom(int, void *, size_t, uint32_t, void *, uint32_t *);
ssize_t sendmsg(int, const struct msghdr *, int) paramsnonnull();
ssize_t readv(int, const struct iovec *, int);
ssize_t writev(int, const struct iovec *, int);
ssize_t sendfile(int, int, int64_t *, size_t);
int getsockopt(int, int, int, void *, uint32_t *) paramsnonnull((5));
int setsockopt(int, int, int, const void *, uint32_t);
int socketpair(int, int, int, int[2]) paramsnonnull();
int poll(struct pollfd *, uint64_t, int32_t) paramsnonnull();
int ppoll(struct pollfd *, uint64_t, const struct timespec *,
          const struct sigset *) paramsnonnull((1, 4));
ssize_t sendto(int, const void *, size_t, uint32_t, const void *, uint32_t)
    paramsnonnull((2));

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#if !(__ASSEMBLER__ + __LINKER__ + 0)

#define DNS_TYPE_A 1
#define DNS_CLASS_IN 1

#define kMinSockaddr4Size \
  (offsetof(struct sockaddr_in, sin_addr) + sizeof(struct in_addr))

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/dns/dns.h */

#define COSMOPOLITAN_LIBC_DNS_DNS_H_


/*!BEGIN libc/dns/resolvconf.h */

#define COSMOPOLITAN_LIBC_DNS_RESOLVCONF_H_


/*!BEGIN libc/stdio/stdio.h */

#define COSMOPOLITAN_LIBC_STDIO_STDIO_H_

#define FILENAME_MAX PATH_MAX

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § standard i/o                                              ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

typedef struct FILE {
  uint8_t bufmode; /* 0x00 _IOFBF, etc. (ignored if fd=-1) */
  bool noclose;    /* 0x01 for fake dup() */
  uint32_t iomode; /* 0x04 O_RDONLY, etc. (ignored if fd=-1) */
  int32_t state;   /* 0x08 0=OK, -1=EOF, >0=errno */
  int fd;          /* 0x0c ≥0=fd, -1=closed|buffer */
  uint32_t beg;    /* 0x10 */
  uint32_t end;    /* 0x14 */
  char *buf;       /* 0x18 */
  uint32_t size;   /* 0x20 */
  uint32_t nofree; /* 0x24 */
  int pid;         /* 0x28 */
} FILE;

extern FILE *stdin;
extern FILE *stdout;
extern FILE *stderr;

errno_t ferror(FILE *) paramsnonnull();
void clearerr(FILE *) paramsnonnull();
int feof(FILE *) paramsnonnull();
int getc(FILE *) paramsnonnull();
int putc(int, FILE *) paramsnonnull();
int fflush(FILE *);
int fgetc(FILE *) paramsnonnull();
int ungetc(int, FILE *) paramsnonnull();
int fileno(FILE *) paramsnonnull() nosideeffect;
int fputc(int, FILE *) paramsnonnull();
int fputs(const char *, FILE *) paramsnonnull();
int fputws(const wchar_t *, FILE *) paramsnonnull();
char *fgets(char *, int, FILE *) paramsnonnull();
wchar_t *fgetws(wchar_t *, int, FILE *) paramsnonnull();
wint_t putwc(wchar_t, FILE *) paramsnonnull();
wint_t fputwc(wchar_t, FILE *) paramsnonnull();
wint_t putwchar(wchar_t);
wint_t getwchar(void);
wint_t getwc(FILE *) paramsnonnull();
wint_t fgetwc(FILE *) paramsnonnull();
wint_t ungetwc(wint_t, FILE *) paramsnonnull();
int getchar(void);
int putchar(int);
int puts(const char *) paramsnonnull();
ssize_t getline(char **, size_t *, FILE *) paramsnonnull();
ssize_t getdelim(char **, size_t *, int, FILE *) paramsnonnull();
FILE *fopen(const char *, const char *) paramsnonnull() nodiscard;
FILE *fdopen(int, const char *) paramsnonnull() nodiscard;
FILE *fmemopen(void *, size_t, const char *) paramsnonnull((3)) nodiscard;
FILE *freopen(const char *, const char *, FILE *) paramsnonnull((2, 3));
size_t fread(void *, size_t, size_t, FILE *) paramsnonnull((4));
size_t fwrite(const void *, size_t, size_t, FILE *) paramsnonnull((4));
int fclose(FILE *);
int fclose_s(FILE **) paramsnonnull();
int fseek(FILE *, long, int) paramsnonnull();
long ftell(FILE *) paramsnonnull();
int fseeko(FILE *, int64_t, int) paramsnonnull();
int64_t ftello(FILE *) paramsnonnull();
void rewind(FILE *) paramsnonnull();
int fopenflags(const char *) paramsnonnull();
void setbuf(FILE *, char *);
void setbuffer(FILE *, char *, size_t);
int setvbuf(FILE *, char *, int, size_t);
FILE *popen(const char *, const char *);
int pclose(FILE *);

typedef uint64_t fpos_t;
compatfn char *gets(char *) paramsnonnull();
compatfn int fgetpos(FILE *, fpos_t *) paramsnonnull();
compatfn int fsetpos(FILE *, const fpos_t *) paramsnonnull();

int system(const char *);
int systemexec(const char *);

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § standard i/o » formatting                                 ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

int printf(const char *, ...) printfesque(1)
    paramsnonnull((1)) nothrow nocallback;
int vprintf(const char *, va_list) paramsnonnull() nothrow nocallback;
int fprintf(FILE *, const char *, ...) printfesque(2)
    paramsnonnull((1, 2)) nothrow nocallback;
int vfprintf(FILE *, const char *, va_list) paramsnonnull() nothrow nocallback;
int scanf(const char *, ...) scanfesque(1);
int vscanf(const char *, va_list);
int fscanf(FILE *, const char *, ...) scanfesque(2);
int vfscanf(FILE *, const char *, va_list);

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § standard i/o » optimizations                              ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#define getc(f)     fgetc(f)
#define getwc(f)    fgetwc(f)
#define putc(c, f)  fputc(c, f)
#define putwc(c, f) fputwc(c, f)

#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
#define printf(FMT, ...)     (printf)(PFLINK(FMT), ##__VA_ARGS__)
#define vprintf(FMT, VA)     (vprintf)(PFLINK(FMT), VA)
#define fprintf(F, FMT, ...) (fprintf)(F, PFLINK(FMT), ##__VA_ARGS__)
#define vfprintf(F, FMT, VA) (vfprintf)(F, PFLINK(FMT), VA)
#define vscanf(FMT, VA)      (vscanf)(SFLINK(FMT), VA)
#define scanf(FMT, ...)      (scanf)(SFLINK(FMT), ##__VA_ARGS__)
#define fscanf(F, FMT, ...)  (fscanf)(F, SFLINK(FMT), ##__VA_ARGS__)
#define vfscanf(F, FMT, VA)  (vfscanf)(F, SFLINK(FMT), VA)
#endif

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define stdin  SYMBOLIC(stdin)
#define stdout SYMBOLIC(stdout)
#define stderr SYMBOLIC(stderr)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

struct Nameservers {
  size_t i, n;
  struct sockaddr_in *p;
};

struct ResolvConf {
  struct Nameservers nameservers;
};

const struct ResolvConf *getresolvconf(void) returnsnonnull;
int parseresolvconf(struct ResolvConf *, struct FILE *) paramsnonnull();
void freeresolvconf(struct ResolvConf **) paramsnonnull();
int getntnameservers(struct ResolvConf *) paramsnonnull();

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define DNS_PORT      53
#define DNS_NAME_MAX  253
#define DNS_LABEL_MAX 63

#define EAI_SUCCESS     0
#define EAI_BADFLAGS    -1
#define EAI_NONAME      -2
#define EAI_AGAIN       -3
#define EAI_FAIL        -4
#define EAI_NODATA      -5
#define EAI_FAMILY      -6
#define EAI_SOCKTYPE    -7
#define EAI_SERVICE     -8
#define EAI_ADDRFAMILY  -9
#define EAI_MEMORY      -10
#define EAI_OVERFLOW    -12
#define EAI_SYSTEM      -11
#define EAI_ALLDONE     -103
#define EAI_CANCELED    -101
#define EAI_IDN_ENCODE  -105
#define EAI_INPROGRESS  -100
#define EAI_INTR        -104
#define EAI_NOTCANCELED -102

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

struct addrinfo {
  int32_t ai_flags;    /* AI_XXX */
  int32_t ai_family;   /* AF_INET */
  int32_t ai_socktype; /* SOCK_XXX */
  int32_t ai_protocol; /* IPPROTO_XXX */
  uint32_t ai_addrlen;
  union {
    struct sockaddr *ai_addr;
    struct sockaddr_in *ai_addr4;
  };
  char *ai_canonname /*[DNS_NAME_MAX + 1]*/;
  struct addrinfo *ai_next;
};

int getaddrinfo(const char *, const char *, const struct addrinfo *,
                struct addrinfo **) paramsnonnull((4));
int freeaddrinfo(struct addrinfo *);
const char *gai_strerror(int);
int dnsnamecmp(const char *, const char *) paramsnonnull();
int pascalifydnsname(uint8_t *, size_t, const char *) paramsnonnull();
int resolvedns(const struct ResolvConf *, int, const char *, struct sockaddr *,
               uint32_t) paramsnonnull();
struct addrinfo *newaddrinfo(uint16_t);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/dns/dnsheader.h */

#define COSMOPOLITAN_LIBC_DNS_DNSHEADER_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

struct DnsHeader {
  uint16_t id;      /* transaction id */
  uint8_t bf1;      /* bit field 1 */
  uint8_t bf2;      /* bit field 2 */
  uint16_t qdcount; /* question count */
  uint16_t ancount; /* answer count */
  uint16_t nscount; /* nameserver count */
  uint16_t arcount; /* additional record count */
};

int serializednsheader(uint8_t *, size_t, const struct DnsHeader);
int deserializednsheader(struct DnsHeader *, const uint8_t *, size_t);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/dns/dnsquestion.h */

#define COSMOPOLITAN_LIBC_DNS_DNSQUESTION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

struct DnsQuestion {
  const char *qname;
  uint16_t qtype;
  uint16_t qclass;
};

int serializednsquestion(uint8_t *, size_t, struct DnsQuestion);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/dns/hoststxt.h */

#define COSMOPOLITAN_LIBC_DNS_HOSTSTXT_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

struct FILE;
struct sockaddr;

struct HostsTxtEntry {
  unsigned char ip[4]; /* inet_ntop(AF_INET, he->ip, buf, size) */
  uint32_t name;       /* &ht->strings.p[he->name] */
  uint32_t canon;      /* &ht->strings.p[he->canon] */
};

struct HostsTxtEntries {
  size_t i;
  size_t n;
  struct HostsTxtEntry *p;
};

struct HostsTxtStrings {
  size_t i;
  size_t n;
  char *p;
};

struct HostsTxt {
  struct HostsTxtEntries entries;
  struct HostsTxtStrings strings;
};

const struct HostsTxt *gethoststxt(void) returnsnonnull;
void freehoststxt(struct HostsTxt **) paramsnonnull();
int parsehoststxt(struct HostsTxt *, struct FILE *) paramsnonnull();
void sorthoststxt(struct HostsTxt *) paramsnonnull();
int resolvehoststxt(const struct HostsTxt *, int, const char *,
                    struct sockaddr *, uint32_t, const char **)
    paramsnonnull((1, 3));

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/elf/def.h */

#define COSMOPOLITAN_LIBC_ELF_STRUCT_DEF_H_

/**
 * @fileoverview Executable and Linkable Format Definitions.
 */

#define EI_MAG0 0
#define EI_MAG1 1
#define EI_MAG2 2
#define EI_MAG3 3

#define ELFMAG  "\177ELF"
#define ELFMAG0 0x7f
#define ELFMAG1 'E'
#define ELFMAG2 'L'
#define ELFMAG3 'F'
#define SELFMAG 4

#define EI_CLASS     4
#define ELFCLASSNONE 0
#define ELFCLASS32   1
#define ELFCLASS64   2
#define ELFCLASSNUM  3

#define EI_DATA     5
#define ELFDATANONE 0
#define ELFDATA2LSB 1
#define ELFDATA2MSB 2
#define ELFDATANUM  3

#define EI_VERSION 6

#define EI_OSABI            7
#define ELFOSABI_NONE       0
#define ELFOSABI_SYSV       0
#define ELFOSABI_HPUX       1
#define ELFOSABI_NETBSD     2
#define ELFOSABI_LINUX      3
#define ELFOSABI_GNU        3
#define ELFOSABI_SOLARIS    6
#define ELFOSABI_AIX        7
#define ELFOSABI_IRIX       8
#define ELFOSABI_FREEBSD    9
#define ELFOSABI_TRU64      10
#define ELFOSABI_MODESTO    11
#define ELFOSABI_OPENBSD    12
#define ELFOSABI_ARM        97
#define ELFOSABI_STANDALONE 255

#define EI_ABIVERSION 8

#define EI_PAD 9

#define ET_NONE   0
#define ET_REL    1
#define ET_EXEC   2
#define ET_DYN    3
#define ET_CORE   4
#define ET_NUM    5
#define ET_LOOS   0xfe00
#define ET_HIOS   0xfeff
#define ET_LOPROC 0xff00
#define ET_HIPROC 0xffff

#define EM_NONE      0
#define EM_M32       1
#define EM_386       3
#define EM_S390      22
#define EM_ARM       40
#define EM_NEXGEN32E 62
#define EM_X86_64    EM_NEXGEN32E
#define EM_IA32E     EM_NEXGEN32E
#define EM_AMD64     EM_NEXGEN32E
#define EM_PDP11     65
#define EM_CRAYNV2   172
#define EM_L10M      180
#define EM_K10M      181
#define EM_AARCH64   183
#define EM_CUDA      190
#define EM_Z80       220
#define EM_RISCV     243
#define EM_BPF       247

#define GRP_COMDAT 0x1
#define STN_UNDEF  0

#define EV_NONE    0
#define EV_CURRENT 1
#define EV_NUM     2

#define SYMINFO_NONE          0
#define SYMINFO_CURRENT       1
#define SYMINFO_NUM           2
#define SYMINFO_BT_SELF       0xffff
#define SYMINFO_BT_PARENT     0xfffe
#define SYMINFO_BT_LOWRESERVE 0xff00
#define SYMINFO_FLG_DIRECT    0x0001
#define SYMINFO_FLG_PASSTHRU  0x0002
#define SYMINFO_FLG_COPY      0x0004
#define SYMINFO_FLG_LAZYLOAD  0x0008

#define PT_NULL         0
#define PT_LOAD         1
#define PT_DYNAMIC      2
#define PT_INTERP       3
#define PT_NOTE         4
#define PT_SHLIB        5
#define PT_PHDR         6
#define PT_TLS          7
#define PT_NUM          8
#define PT_LOOS         0x60000000
#define PT_GNU_EH_FRAME 0x6474e550
#define PT_GNU_STACK    0x6474e551
#define PT_GNU_RELRO    0x6474e552
#define PT_LOSUNW       0x6ffffffa
#define PT_SUNWBSS      0x6ffffffa
#define PT_SUNWSTACK    0x6ffffffb
#define PT_HISUNW       0x6fffffff
#define PT_HIOS         0x6fffffff
#define PT_LOPROC       0x70000000
#define PT_HIPROC       0x7fffffff

#define PN_XNUM 0xffff

#define PF_X        (1 << 0)
#define PF_W        (1 << 1)
#define PF_R        (1 << 2)
#define PF_MASKOS   0x0ff00000
#define PF_MASKPROC 0xf0000000

#define R_X86_64_NONE            0
#define R_X86_64_64              1
#define R_X86_64_PC32            2
#define R_X86_64_GOT32           3
#define R_X86_64_PLT32           4
#define R_X86_64_COPY            5
#define R_X86_64_GLOB_DAT        6
#define R_X86_64_JUMP_SLOT       7
#define R_X86_64_RELATIVE        8
#define R_X86_64_GOTPCREL        9
#define R_X86_64_32              10
#define R_X86_64_32S             11
#define R_X86_64_16              12
#define R_X86_64_PC16            13
#define R_X86_64_8               14
#define R_X86_64_PC8             15
#define R_X86_64_DTPMOD64        16
#define R_X86_64_DTPOFF64        17
#define R_X86_64_TPOFF64         18
#define R_X86_64_TLSGD           19
#define R_X86_64_TLSLD           20
#define R_X86_64_DTPOFF32        21
#define R_X86_64_GOTTPOFF        22
#define R_X86_64_TPOFF32         23
#define R_X86_64_PC64            24
#define R_X86_64_GOTOFF64        25
#define R_X86_64_GOTPC32         26
#define R_X86_64_GOT64           27
#define R_X86_64_GOTPCREL64      28
#define R_X86_64_GOTPC64         29
#define R_X86_64_GOTPLT64        30
#define R_X86_64_PLTOFF64        31
#define R_X86_64_SIZE32          32
#define R_X86_64_SIZE64          33
#define R_X86_64_GOTPC32_TLSDESC 34
#define R_X86_64_TLSDESC_CALL    35
#define R_X86_64_TLSDESC         36
#define R_X86_64_IRELATIVE       37
#define R_X86_64_RELATIVE64      38
#define R_X86_64_GOTPCRELX       41 /* 6 bytes */
#define R_X86_64_REX_GOTPCRELX   42 /* 7 bytes */
#define R_X86_64_NUM             43

#define STB_LOCAL      0
#define STB_GLOBAL     1
#define STB_WEAK       2
#define STB_NUM        3
#define STB_LOOS       10
#define STB_GNU_UNIQUE 10
#define STB_HIOS       12
#define STB_LOPROC     13
#define STB_HIPROC     15

#define STT_NOTYPE    0
#define STT_OBJECT    1
#define STT_FUNC      2
#define STT_SECTION   3
#define STT_FILE      4
#define STT_COMMON    5
#define STT_TLS       6
#define STT_NUM       7
#define STT_LOOS      10
#define STT_GNU_IFUNC 10
#define STT_HIOS      12
#define STT_LOPROC    13
#define STT_HIPROC    15

#define STV_DEFAULT   0
#define STV_INTERNAL  1
#define STV_HIDDEN    2
#define STV_PROTECTED 3

#define SHN_UNDEF     0
#define SHN_LORESERVE 0xff00
#define SHN_LOPROC    0xff00
#define SHN_BEFORE    0xff00
#define SHN_AFTER     0xff01
#define SHN_HIPROC    0xff1f
#define SHN_LOOS      0xff20
#define SHN_HIOS      0xff3f
#define SHN_ABS       0xfff1
#define SHN_COMMON    0xfff2
#define SHN_XINDEX    0xffff
#define SHN_HIRESERVE 0xffff

#define SHF_WRITE            (1 << 0)
#define SHF_ALLOC            (1 << 1)
#define SHF_EXECINSTR        (1 << 2)
#define SHF_MERGE            (1 << 4)
#define SHF_STRINGS          (1 << 5)
#define SHF_INFO_LINK        (1 << 6)
#define SHF_LINK_ORDER       (1 << 7)
#define SHF_OS_NONCONFORMING (1 << 8)
#define SHF_GROUP            (1 << 9)
#define SHF_TLS              (1 << 10)
#define SHF_COMPRESSED       (1 << 11)
#define SHF_MASKOS           0x0ff00000
#define SHF_MASKPROC         0xf0000000
#define SHF_ORDERED          (1 << 30)
#define SHF_EXCLUDE          (1U << 31)

#define ELFCOMPRESS_ZLIB   1
#define ELFCOMPRESS_LOOS   0x60000000
#define ELFCOMPRESS_HIOS   0x6fffffff
#define ELFCOMPRESS_LOPROC 0x70000000
#define ELFCOMPRESS_HIPROC 0x7fffffff

#define SHT_NULL           0
#define SHT_PROGBITS       1
#define SHT_SYMTAB         2
#define SHT_STRTAB         3
#define SHT_RELA           4
#define SHT_HASH           5
#define SHT_DYNAMIC        6
#define SHT_NOTE           7
#define SHT_NOBITS         8
#define SHT_REL            9
#define SHT_SHLIB          10
#define SHT_DYNSYM         11
#define SHT_INIT_ARRAY     14
#define SHT_FINI_ARRAY     15
#define SHT_PREINIT_ARRAY  16
#define SHT_GROUP          17
#define SHT_SYMTAB_SHNDX   18
#define SHT_NUM            19
#define SHT_LOOS           0x60000000
#define SHT_GNU_ATTRIBUTES 0x6ffffff5
#define SHT_GNU_HASH       0x6ffffff6
#define SHT_GNU_LIBLIST    0x6ffffff7
#define SHT_CHECKSUM       0x6ffffff8
#define SHT_LOSUNW         0x6ffffffa
#define SHT_SUNW_move      0x6ffffffa
#define SHT_SUNW_COMDAT    0x6ffffffb
#define SHT_SUNW_syminfo   0x6ffffffc
#define SHT_GNU_verdef     0x6ffffffd
#define SHT_GNU_verneed    0x6ffffffe
#define SHT_GNU_versym     0x6fffffff
#define SHT_HISUNW         0x6fffffff
#define SHT_HIOS           0x6fffffff
#define SHT_LOPROC         0x70000000
#define SHT_HIPROC         0x7fffffff
#define SHT_LOUSER         0x80000000
#define SHT_HIUSER         0x8fffffff

#define DT_NULL               0
#define DT_NEEDED             1
#define DT_PLTRELSZ           2
#define DT_PLTGOT             3
#define DT_HASH               4
#define DT_STRTAB             5
#define DT_SYMTAB             6
#define DT_RELA               7
#define DT_RELASZ             8
#define DT_RELAENT            9
#define DT_STRSZ              10
#define DT_SYMENT             11
#define DT_INIT               12
#define DT_FINI               13
#define DT_SONAME             14
#define DT_RPATH              15
#define DT_SYMBOLIC           16
#define DT_REL                17
#define DT_RELSZ              18
#define DT_RELENT             19
#define DT_PLTREL             20
#define DT_DEBUG              21
#define DT_TEXTREL            22
#define DT_JMPREL             23
#define DT_BIND_NOW           24
#define DT_INIT_ARRAY         25
#define DT_FINI_ARRAY         26
#define DT_INIT_ARRAYSZ       27
#define DT_FINI_ARRAYSZ       28
#define DT_RUNPATH            29
#define DT_FLAGS              30
#define DT_ENCODING           32
#define DT_PREINIT_ARRAY      32
#define DT_PREINIT_ARRAYSZ    33
#define DT_SYMTAB_SHNDX       34
#define DT_NUM                35
#define DT_LOOS               0x6000000d
#define DT_HIOS               0x6ffff000
#define DT_LOPROC             0x70000000
#define DT_HIPROC             0x7fffffff
#define DT_VALRNGLO           0x6ffffd00
#define DT_GNU_PRELINKED      0x6ffffdf5
#define DT_GNU_CONFLICTSZ     0x6ffffdf6
#define DT_GNU_LIBLISTSZ      0x6ffffdf7
#define DT_CHECKSUM           0x6ffffdf8
#define DT_PLTPADSZ           0x6ffffdf9
#define DT_MOVEENT            0x6ffffdfa
#define DT_MOVESZ             0x6ffffdfb
#define DT_FEATURE_1          0x6ffffdfc
#define DT_POSFLAG_1          0x6ffffdfd
#define DT_SYMINSZ            0x6ffffdfe
#define DT_SYMINENT           0x6ffffdff
#define DT_VALRNGHI           0x6ffffdff
#define DT_VALTAGIDX(tag)     (DT_VALRNGHI - (tag))
#define DT_VALNUM             12
#define DT_ADDRRNGLO          0x6ffffe00
#define DT_GNU_HASH           0x6ffffef5
#define DT_TLSDESC_PLT        0x6ffffef6
#define DT_TLSDESC_GOT        0x6ffffef7
#define DT_GNU_CONFLICT       0x6ffffef8
#define DT_GNU_LIBLIST        0x6ffffef9
#define DT_CONFIG             0x6ffffefa
#define DT_DEPAUDIT           0x6ffffefb
#define DT_AUDIT              0x6ffffefc
#define DT_PLTPAD             0x6ffffefd
#define DT_MOVETAB            0x6ffffefe
#define DT_SYMINFO            0x6ffffeff
#define DT_ADDRRNGHI          0x6ffffeff
#define DT_ADDRTAGIDX(tag)    (DT_ADDRRNGHI - (tag))
#define DT_ADDRNUM            11
#define DT_VERSYM             0x6ffffff0
#define DT_RELACOUNT          0x6ffffff9
#define DT_RELCOUNT           0x6ffffffa
#define DT_FLAGS_1            0x6ffffffb
#define DT_VERDEF             0x6ffffffc
#define DT_VERDEFNUM          0x6ffffffd
#define DT_VERNEED            0x6ffffffe
#define DT_VERNEEDNUM         0x6fffffff
#define DT_VERSIONTAGIDX(tag) (DT_VERNEEDNUM - (tag))
#define DT_VERSIONTAGNUM      16
#define DT_AUXILIARY          0x7ffffffd
#define DT_FILTER             0x7fffffff
#define DT_EXTRATAGIDX(tag)   ((Elf32_Word) - ((Elf32_Sword)(tag) << 1 >> 1) - 1)
#define DT_EXTRANUM           3

#define VER_NEED_NONE    0
#define VER_NEED_CURRENT 1
#define VER_NEED_NUM     2
#define VER_FLG_WEAK     0x2

#define ELF_NOTE_SOLARIS       "SUNW Solaris"
#define ELF_NOTE_GNU           "GNU"
#define ELF_NOTE_PAGESIZE_HINT 1
#define ELF_NOTE_ABI           NT_GNU_ABI_TAG
#define ELF_NOTE_OS_LINUX      0
#define ELF_NOTE_OS_GNU        1
#define ELF_NOTE_OS_SOLARIS2   2
#define ELF_NOTE_OS_FREEBSD    3

#define NT_GNU_ABI_TAG      1
#define NT_GNU_BUILD_ID     3
#define NT_GNU_GOLD_VERSION 4

#define EF_CPU32 0x00810000

#define DF_ORIGIN       0x00000001
#define DF_SYMBOLIC     0x00000002
#define DF_TEXTREL      0x00000004
#define DF_BIND_NOW     0x00000008
#define DF_STATIC_TLS   0x00000010
#define DF_1_NOW        0x00000001
#define DF_1_GLOBAL     0x00000002
#define DF_1_GROUP      0x00000004
#define DF_1_NODELETE   0x00000008
#define DF_1_LOADFLTR   0x00000010
#define DF_1_INITFIRST  0x00000020
#define DF_1_NOOPEN     0x00000040
#define DF_1_ORIGIN     0x00000080
#define DF_1_DIRECT     0x00000100
#define DF_1_TRANS      0x00000200
#define DF_1_INTERPOSE  0x00000400
#define DF_1_NODEFLIB   0x00000800
#define DF_1_NODUMP     0x00001000
#define DF_1_CONFALT    0x00002000
#define DF_1_ENDFILTEE  0x00004000
#define DF_1_DISPRELDNE 0x00008000
#define DF_1_DISPRELPND 0x00010000
#define DF_1_NODIRECT   0x00020000
#define DF_1_IGNMULDEF  0x00040000
#define DF_1_NOKSYMS    0x00080000
#define DF_1_NOHDR      0x00100000
#define DF_1_EDITED     0x00200000
#define DF_1_NORELOC    0x00400000
#define DF_1_SYMINTPOSE 0x00800000
#define DF_1_GLOBAUDIT  0x01000000
#define DF_1_SINGLETON  0x02000000
#define DF_1_STUB       0x04000000
#define DF_1_PIE        0x08000000
#define DTF_1_PARINIT   0x00000001
#define DTF_1_CONFEXP   0x00000002
#define DF_P1_LAZYLOAD  0x00000001
#define DF_P1_GROUPPERM 0x00000002

#define ELF64_ST_BIND(val)        (((unsigned char)(val)) >> 4)
#define ELF64_ST_TYPE(val)        ((val)&0xf)
#define ELF64_ST_INFO(bind, type) (((bind) << 4) + ((type)&0xf))
#define ELF64_ST_VISIBILITY(o)    ((o)&0x03)

#define ELF64_R_SYM(i)          ((i) >> 32)
#define ELF64_R_TYPE(i)         ((i)&0xffffffff)
#define ELF64_R_INFO(sym, type) ((((Elf64_Xword)(sym)) << 32) + (type))

#define ELF64_M_SYM(info)       ((info) >> 8)
#define ELF64_M_SIZE(info)      ((unsigned char)(info))
#define ELF64_M_INFO(sym, size) (((sym) << 8) + (unsigned char)(size))

#define NT_PRSTATUS         1
#define NT_PRFPREG          2
#define NT_FPREGSET         2
#define NT_PRPSINFO         3
#define NT_PRXREG           4
#define NT_TASKSTRUCT       4
#define NT_PLATFORM         5
#define NT_AUXV             6
#define NT_GWINDOWS         7
#define NT_ASRS             8
#define NT_PSTATUS          10
#define NT_PSINFO           13
#define NT_PRCRED           14
#define NT_UTSNAME          15
#define NT_LWPSTATUS        16
#define NT_LWPSINFO         17
#define NT_PRFPXREG         20
#define NT_SIGINFO          0x53494749
#define NT_FILE             0x46494c45
#define NT_PRXFPREG         0x46e62b7f
#define NT_PPC_VMX          0x100
#define NT_PPC_SPE          0x101
#define NT_PPC_VSX          0x102
#define NT_PPC_TAR          0x103
#define NT_PPC_PPR          0x104
#define NT_PPC_DSCR         0x105
#define NT_PPC_EBB          0x106
#define NT_PPC_PMU          0x107
#define NT_PPC_TM_CGPR      0x108
#define NT_PPC_TM_CFPR      0x109
#define NT_PPC_TM_CVMX      0x10a
#define NT_PPC_TM_CVSX      0x10b
#define NT_PPC_TM_SPR       0x10c
#define NT_PPC_TM_CTAR      0x10d
#define NT_PPC_TM_CPPR      0x10e
#define NT_PPC_TM_CDSCR     0x10f
#define NT_X86_XSTATE       0x202
#define NT_S390_HIGH_GPRS   0x300
#define NT_S390_TIMER       0x301
#define NT_S390_TODCMP      0x302
#define NT_S390_TODPREG     0x303
#define NT_S390_CTRS        0x304
#define NT_S390_PREFIX      0x305
#define NT_S390_LAST_BREAK  0x306
#define NT_S390_SYSTEM_CALL 0x307
#define NT_S390_TDB         0x308
#define NT_S390_VXRS_LOW    0x309
#define NT_S390_VXRS_HIGH   0x30a
#define NT_S390_GS_CB       0x30b
#define NT_S390_GS_BC       0x30c
#define NT_S390_RI_CB       0x30d
#define NT_ARM_VFP          0x400
#define NT_ARM_TLS          0x401
#define NT_ARM_HW_BREAK     0x402
#define NT_ARM_HW_WATCH     0x403
#define NT_ARM_SYSTEM_CALL  0x404
#define NT_ARM_SVE          0x405
#define NT_ARM_PAC_MASK     0x406
#define NT_METAG_CBUF       0x500
#define NT_METAG_RPIPE      0x501
#define NT_METAG_TLS        0x502
#define NT_ARC_V2           0x600
#define NT_VMCOREDD         0x700
#define NT_VERSION          1

#define VER_DEF_NONE      0
#define VER_DEF_CURRENT   1
#define VER_DEF_NUM       2
#define VER_FLG_BASE      0x1
#define VER_FLG_WEAK      0x2
#define VER_NDX_LOCAL     0
#define VER_NDX_GLOBAL    1
#define VER_NDX_LORESERVE 0xff00
#define VER_NDX_ELIMINATE 0xff01

#define LL_NONE           0
#define LL_EXACT_MATCH    (1 << 0)
#define LL_IGNORE_INT_VER (1 << 1)
#define LL_REQUIRE_MINOR  (1 << 2)
#define LL_EXPORTS        (1 << 3)
#define LL_DELAY_LOAD     (1 << 4)
#define LL_DELTA          (1 << 5)

#define R_BPF_NONE   0
#define R_BPF_MAP_FD 1



/*!BEGIN libc/elf/elf.h */

#define COSMOPOLITAN_LIBC_ELF_H_


/*!BEGIN libc/elf/struct/ehdr.h */

#define COSMOPOLITAN_LIBC_ELF_STRUCT_EHDR_H_


/*!BEGIN libc/elf/scalar.h */

#define COSMOPOLITAN_LIBC_ELF_SCALAR_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

#define Elf64_Half uint16_t
#define Elf64_Word uint32_t
#define Elf64_Sword int32_t
#define Elf64_Xword uint64_t
#define Elf64_Sxword int64_t
#define Elf64_Addr uint64_t
#define Elf64_Off uint64_t
#define Elf64_Section uint16_t
#define Elf64_Versym Elf64_Half

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#if !(__ASSEMBLER__ + __LINKER__ + 0)

#define EI_NIDENT 16

typedef struct Elf64_Ehdr {
  unsigned char e_ident[EI_NIDENT];
  Elf64_Half e_type;
  Elf64_Half e_machine;
  Elf64_Word e_version;
  Elf64_Addr e_entry;
  Elf64_Off e_phoff;
  Elf64_Off e_shoff;
  Elf64_Word e_flags;
  Elf64_Half e_ehsize;
  Elf64_Half e_phentsize;
  Elf64_Half e_phnum;
  Elf64_Half e_shentsize;
  Elf64_Half e_shnum;
  Elf64_Half e_shstrndx;
} Elf64_Ehdr;

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/elf/struct/phdr.h */

#define COSMOPOLITAN_LIBC_ELF_STRUCT_PHDR_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

typedef struct Elf64_Phdr {
  Elf64_Word p_type;
  Elf64_Word p_flags;
  Elf64_Off p_offset;
  Elf64_Addr p_vaddr;
  Elf64_Addr p_paddr;
  Elf64_Xword p_filesz;
  Elf64_Xword p_memsz;
  Elf64_Xword p_align;
} Elf64_Phdr;

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/elf/struct/shdr.h */

#define COSMOPOLITAN_LIBC_ELF_STRUCT_SHDR_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

/**
 * Section header.
 * @see https://docs.oracle.com/cd/E19683-01/816-1386/chapter6-94076/index.html
 */
typedef struct Elf64_Shdr {
  Elf64_Word sh_name;
  Elf64_Word sh_type;   /* SHT_{PROGBITS,NOBITS,STRTAB,SYMTAB,RELA,...} */
  Elf64_Xword sh_flags; /* SHF_{WRITE,ALLOC,EXECINSTR,MERGE,STRINGS,...} */
  Elf64_Addr sh_addr;
  Elf64_Off sh_offset;
  Elf64_Xword sh_size;
  /*
   * If SHT_RELA: Index of section of associated symbol table.
   * If SHT_SYMTAB: Index of section of associated string table.
   */
  Elf64_Word sh_link;
  /*
   * If SHT_RELA: Index of section to which relocations apply.
   * If SHT_SYMTAB: One greater than symbol table index of last local symbol.
   */
  Elf64_Word sh_info;
  Elf64_Xword sh_addralign;
  Elf64_Xword sh_entsize;
} Elf64_Shdr;

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/elf/struct/sym.h */

#define COSMOPOLITAN_LIBC_ELF_STRUCT_SYM_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

typedef struct Elf64_Sym {
  Elf64_Word st_name;
  /* ELF64_ST_TYPE(st_info) → STT_{NOTYPE,OBJECT,FUNC,SECTION,FILE,COMMON,...}
   * ELF64_ST_BIND(st_info) → STB_{LOCAL,GLOBAL,WEAK,...} */
  uint8_t st_info;
  /* STV_{DEFAULT,INTERNAL,HIDDEN,PROTECTED} */
  uint8_t st_other;
  /* SHN_UNDEF, <section index>, SHN_ABS, SHN_COMMON, etc. */
  Elf64_Section st_shndx;
  Elf64_Addr st_value;
  Elf64_Xword st_size;
} Elf64_Sym;

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § executable & linkable format                              ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

char *GetElfStringTable(const Elf64_Ehdr *, size_t);
Elf64_Sym *GetElfSymbolTable(const Elf64_Ehdr *, size_t, Elf64_Xword *);
bool IsElf64Binary(const Elf64_Ehdr *, size_t);
void CheckElfAddress(const Elf64_Ehdr *, size_t, intptr_t, size_t);
bool IsElfSymbolContent(const Elf64_Sym *);
Elf64_Phdr *GetElfSegmentHeaderAddress(const Elf64_Ehdr *, size_t, unsigned);
Elf64_Shdr *GetElfSectionHeaderAddress(const Elf64_Ehdr *, size_t, Elf64_Half);
void *GetElfSectionAddress(const Elf64_Ehdr *, size_t, const Elf64_Shdr *);
char *GetElfSectionNameStringTable(const Elf64_Ehdr *, size_t);
void GetElfVirtualAddressRange(const Elf64_Ehdr *, size_t, intptr_t *,
                               intptr_t *);
char *GetElfString(const Elf64_Ehdr *, size_t, const char *, Elf64_Word);
const char *GetElfSectionName(const Elf64_Ehdr *, size_t, Elf64_Shdr *);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/elf/struct/auxv.h */

#define COSMOPOLITAN_LIBC_ELF_STRUCT_AUXV_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

typedef struct Elf64_auxv_t {
  uint64_t a_type;
  union {
    uint64_t a_val;
  } a_un;
} Elf64_auxv_t;

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/elf/struct/chdr.h */

#define COSMOPOLITAN_LIBC_ELF_STRUCT_CHDR_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

typedef struct Elf64_Chdr {
  Elf64_Word ch_type;
  Elf64_Word ch_reserved;
  Elf64_Xword ch_size;
  Elf64_Xword ch_addralign;
} Elf64_Chdr;

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/elf/struct/dyn.h */

#define COSMOPOLITAN_LIBC_ELF_STRUCT_DYN_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

typedef struct Elf64_Dyn {
  Elf64_Sxword d_tag;
  union {
    Elf64_Xword d_val;
    Elf64_Addr d_ptr;
  } d_un;
} Elf64_Dyn;

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/elf/struct/lib.h */

#define COSMOPOLITAN_LIBC_ELF_STRUCT_LIB_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

typedef struct Elf64_Lib {
  Elf64_Word l_name;
  Elf64_Word l_time_stamp;
  Elf64_Word l_checksum;
  Elf64_Word l_version;
  Elf64_Word l_flags;
} Elf64_Lib;

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/elf/struct/move.h */

#define COSMOPOLITAN_LIBC_ELF_STRUCT_MOVE_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

typedef struct Elf64_Move {
  Elf64_Xword m_value;
  Elf64_Xword m_info;
  Elf64_Xword m_poffset;
  Elf64_Half m_repeat;
  Elf64_Half m_stride;
} Elf64_Move;

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/elf/struct/nhdr.h */

#define COSMOPOLITAN_LIBC_ELF_STRUCT_NHDR_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

typedef struct Elf64_Nhdr {
  Elf64_Word n_namesz;
  Elf64_Word n_descsz;
  Elf64_Word n_type;
} Elf64_Nhdr;

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/elf/struct/rel.h */

#define COSMOPOLITAN_LIBC_ELF_STRUCT_REL_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

typedef struct Elf64_Rel {
  Elf64_Addr r_offset;
  Elf64_Xword r_info; /** @see ELF64_R_{SYM,SIZE,INFO} */
} Elf64_Rel;

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/elf/struct/rela.h */

#define COSMOPOLITAN_LIBC_ELF_STRUCT_RELA_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

typedef struct Elf64_Rela {
  /*u64*/ Elf64_Addr r_offset;
  /*
   * ELF64_R_SYM(r_info) → sym
   * ELF64_R_TYPE(r_info) → R_X86_64_{64,PC32,GOTPCRELX,...}
   * ELF64_R_INFO(sym, type) → r_info
   */
  /*u64*/ Elf64_Xword r_info; /* ELF64_R_{SYM,SIZE,INFO} */
  /*i64*/ Elf64_Sxword r_addend;
} Elf64_Rela;

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/elf/struct/syminfo.h */

#define COSMOPOLITAN_LIBC_ELF_STRUCT_SYMINFO_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

typedef struct Elf64_Syminfo {
  Elf64_Half si_boundto;
  Elf64_Half si_flags;
} Elf64_Syminfo;

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/elf/struct/verdaux.h */

#define COSMOPOLITAN_LIBC_ELF_STRUCT_VERDAUX_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

typedef struct Elf64_Verdaux {
  Elf64_Word vda_name;
  Elf64_Word vda_next;
} Elf64_Verdaux;

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/elf/struct/verdef.h */

#define COSMOPOLITAN_LIBC_ELF_STRUCT_VERDEF_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

typedef struct Elf64_Verdef {
  Elf64_Half vd_version;
  Elf64_Half vd_flags;
  Elf64_Half vd_ndx;
  Elf64_Half vd_cnt;
  Elf64_Word vd_hash;
  Elf64_Word vd_aux;
  Elf64_Word vd_next;
} Elf64_Verdef;

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/elf/struct/vernaux.h */

#define COSMOPOLITAN_LIBC_ELF_STRUCT_VERNAUX_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

typedef struct Elf64_Vernaux {
  Elf64_Word vna_hash;
  Elf64_Half vna_flags;
  Elf64_Half vna_other;
  Elf64_Word vna_name;
  Elf64_Word vna_next;
} Elf64_Vernaux;

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/elf/struct/verneed.h */

#define COSMOPOLITAN_LIBC_ELF_STRUCT_VERNEED_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

typedef struct Elf64_Verneed {
  Elf64_Half vn_version;
  Elf64_Half vn_cnt;
  Elf64_Word vn_file;
  Elf64_Word vn_aux;
  Elf64_Word vn_next;
} Elf64_Verneed;

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/fmt/conv.h */

#define COSMOPOLITAN_LIBC_FMT_CONV_H_


/*!BEGIN libc/nt/struct/filetime.h */

#define COSMOPOLITAN_LIBC_NT_FILETIME_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtFileTime {
  uint32_t dwLowDateTime;
  uint32_t dwHighDateTime;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § conversion                                                ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#define MODERNITYSECONDS 11644473600ull
#define HECTONANOSECONDS 10000000ull

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

int abs(int) libcesque pureconst;
long labs(long) libcesque pureconst;
long long llabs(long long) libcesque pureconst;
int llog10(unsigned long) libcesque pureconst;
int atoi(const char *) paramsnonnull() libcesque;
long atol(const char *) paramsnonnull() libcesque;
long long atoll(const char *) paramsnonnull() libcesque;
unsigned long strtoul(const char *, char **, int) paramsnonnull((1));
long long strtoll(const char *, char **, int) paramsnonnull((1));
unsigned long long strtoull(const char *, char **, int) paramsnonnull((1));
long long strtonum(const char *, long long, long long, const char **);
intmax_t div10(intmax_t, unsigned *) hidden;
intmax_t strtoimax(const char *, char **, int) paramsnonnull((1));
uintmax_t strtoumax(const char *, char **, int) paramsnonnull((1));
intmax_t wcstoimax(const wchar_t *, wchar_t **, int);
long wcstol(const wchar_t *, wchar_t **, int);
long strtol(const char *, char **, int) paramsnonnull((1)) libcesque;

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § conversion » time                                         ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

int64_t DosDateTimeToUnix(unsigned, unsigned);
struct timespec FileTimeToTimeSpec(struct NtFileTime);
struct NtFileTime TimeSpecToFileTime(struct timespec);
struct NtFileTime TimeToFileTime(int64_t) nothrow pureconst;
int64_t filetimetotime(struct NtFileTime) nothrow pureconst;
void FileTimeToTimeVal(struct timeval *, struct NtFileTime) nothrow;
struct NtFileTime TimeValToFileTime(const struct timeval *) nosideeffect;
long convertmicros(const struct timeval *, long) paramsnonnull() nosideeffect;

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § conversion » manipulation                                 ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

char *dirname(char *);
char *basename(const char *) nosideeffect;
char *basename_n(const char *, size_t) nosideeffect;
bool isabspath(const char *) paramsnonnull() nosideeffect;

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § conversion » computation                                  ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

typedef struct {
  int quot;
  int rem;
} div_t;

typedef struct {
  long int quot;
  long int rem;
} ldiv_t;

typedef struct {
  long long int quot;
  long long int rem;
} lldiv_t;

typedef struct {
  intmax_t quot;
  intmax_t rem;
} imaxdiv_t;

div_t div(int, int) pureconst;
ldiv_t ldiv(long, long) pureconst;
lldiv_t lldiv(long long, long long) pureconst;
imaxdiv_t imaxdiv(intmax_t, intmax_t) pureconst;

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § conversion » optimizations                                ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#if __STDC_VERSION__ + 0 >= 199901L
#define div(num, den)   ((div_t){(num) / (den), (num) % (den)})
#define ldiv(num, den)  ((ldiv_t){(num) / (den), (num) % (den)})
#define lldiv(num, den) ((lldiv_t){(num) / (den), (num) % (den)})
#endif

#ifndef __STRICT_ANSI__
intmax_t __imaxabs(intmax_t) libcesque pureconst;
#define imaxabs(x) __imaxabs(x)
#endif /* !ANSI */

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/fmt/fmt.h */

#define COSMOPOLITAN_LIBC_FMT_FMT_H_
/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § string formatting                                         ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#if __SIZEOF_POINTER__ == 8
#define POINTER_XDIGITS 12 /* math.log(2**48-1,16) */
#else
#define POINTER_XDIGITS 8
#endif

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

int snprintf(char *, size_t, const char *, ...) printfesque(3)
    paramsnonnull((3)) nothrow nocallback;
int vsnprintf(char *, size_t, const char *, va_list)
    paramsnonnull((3)) nothrow nocallback;
int sprintf(char *, const char *, ...) printfesque(2)
    paramsnonnull((2)) nothrow nocallback frownedupon(snprintf);
int vsprintf(char *, const char *, va_list)
    paramsnonnull((2)) nothrow nocallback frownedupon(vsnprintf);
int sscanf(const char *, const char *, ...) scanfesque(2);
int vsscanf(const char *, const char *, va_list);
int vcscanf(int (*)(void *), int (*)(int, void *), void *, const char *,
            va_list);
int strerror_r(int, char *, size_t) nothrow nocallback;
int __fmt(void *, void *, const char *, va_list) hidden;
char *itoa(int, char *, int) compatfn;
char *fcvt(double, int, int *, int *);
char *ecvt(double, int, int *, int *);

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § string formatting » optimizations                         ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
#define sprintf(BUF, FMT, ...)        (sprintf)(BUF, PFLINK(FMT), ##__VA_ARGS__)
#define vsprintf(BUF, FMT, VA)        (vsprintf)(BUF, PFLINK(FMT), VA)
#define snprintf(B, Z, F, ...)        (snprintf)(B, Z, PFLINK(F), ##__VA_ARGS__)
#define vsnprintf(BUF, SIZE, FMT, VA) (vsnprintf)(BUF, SIZE, PFLINK(FMT), VA)
#define sscanf(STR, FMT, ...)         (sscanf)(STR, SFLINK(FMT), ##__VA_ARGS__)
#define vsscanf(STR, FMT, VA)         (vsscanf)(STR, SFLINK(FMT), VA)
#endif

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/fmt/itoa.h */

#define COSMOPOLITAN_LIBC_FMT_ITOA_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § integer conversion                                        ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│─╝
  FASTEST + TINY

  - uint64toarray_radix10(0x31337, a)         l: 68 (20ns) m: 112 (33ns)
  - int64toarray_radix10(0x31337, a)          l: 69 (20ns) m: 134 (39ns)

  FAST + AWESOME

  - snprintf(a, sizeof(a), "%d", 0x31337)     l: 199 (58ns) m: 421 (123ns)
  - uint128toarray_radix10(0x31337, a)        l: 93 (27ns) m: 141 (41ns)
  - int128toarray_radix10(0x31337, a)         l: 96 (28ns) m: 173 (51ns) */

size_t int64toarray_radix10(int64_t, char[hasatleast 21]);
size_t uint64toarray_radix10(uint64_t, char[hasatleast 21]);
size_t uint64toarray_radix16(uint64_t, char[hasatleast 17]);
size_t uint64toarray_fixed16(uint64_t, char[hasatleast 17], uint8_t);
size_t uint64toarray_radix8(uint64_t, char[hasatleast 24]);

#ifndef __STRICT_ANSI__
size_t int128toarray_radix10(int128_t, char *);
size_t uint128toarray_radix10(uint128_t, char *);
#endif

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/fmt/leb128.h */

#define COSMOPOLITAN_LIBC_FMT_LEB128_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

#ifndef __STRICT_ANSI__
int sleb128(const void *, size_t, int128_t);
int unsleb128(const void *, size_t, int128_t *);
#endif /* ANSI */

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/macros.h */

#define COSMOPOLITAN_LIBC_INTRIN_MACROS_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

#define INTRIN_COMMUTATIVE "%"
#define INTRIN_NONCOMMUTATIVE

#if defined(__x86_64__) && !defined(__STRICT_ANSI__)

typedef char __intrin_xmm_t _Vector_size(16) forcealign(16) mayalias;

#define INTRIN_SSEVEX_X_X_X_(PURE, ISA, OP, FLAGS, A, B, C)                    \
  do {                                                                         \
    if (!IsModeDbg() && X86_HAVE(ISA)) {                                       \
      __intrin_xmm_t *Xmm0 = (void *)(A);                                      \
      const __intrin_xmm_t *Xmm1 = (const __intrin_xmm_t *)(B);                \
      const __intrin_xmm_t *Xmm2 = (const __intrin_xmm_t *)(C);                \
      if (!X86_NEED(AVX)) {                                                    \
        asm(OP "\t%1,%0" : "=x"(*Xmm0) : FLAGS "x"(*Xmm2), "0"(*Xmm1));        \
      } else {                                                                 \
        asm("v" OP "\t%2,%1,%0" : "=x"(*Xmm0) : FLAGS "x"(*Xmm1), "x"(*Xmm2)); \
      }                                                                        \
    } else {                                                                   \
      PURE(A, B, C);                                                           \
    }                                                                          \
  } while (0)

#define INTRIN_SSEVEX_X_X_I_(PURE, ISA, OP, A, B, I)                 \
  do {                                                               \
    if (!IsModeDbg() && X86_HAVE(ISA)) {                             \
      __intrin_xmm_t *Xmm0 = (void *)(A);                            \
      const __intrin_xmm_t *Xmm1 = (const __intrin_xmm_t *)(B);      \
      if (!X86_NEED(AVX)) {                                          \
        asm(OP "\t%2,%1,%0" : "=x"(*Xmm0) : "x"(*Xmm1), "i"(I));     \
      } else {                                                       \
        asm("v" OP "\t%2,%1,%0" : "=x"(*Xmm0) : "x"(*Xmm1), "i"(I)); \
      }                                                              \
    } else {                                                         \
      PURE(A, B, I);                                                 \
    }                                                                \
  } while (0)

#define INTRIN_SSEVEX_X_X_(PURE, ISA, OP, A, B)                 \
  do {                                                          \
    if (!IsModeDbg() && X86_HAVE(ISA)) {                        \
      __intrin_xmm_t *Xmm0 = (void *)(A);                       \
      const __intrin_xmm_t *Xmm1 = (const __intrin_xmm_t *)(B); \
      if (!X86_NEED(AVX)) {                                     \
        asm(OP "\t%1,%0" : "=x"(*Xmm0) : "0"(*Xmm1));           \
      } else {                                                  \
        asm("v" OP "\t%1,%0" : "=x"(*Xmm0) : "x"(*Xmm1));       \
      }                                                         \
    } else {                                                    \
      PURE(A, B);                                               \
    }                                                           \
  } while (0)

#define INTRIN_SSEVEX_X_I_(PURE, ISA, OP, A, B, I)                   \
  do {                                                               \
    if (!IsModeDbg() && X86_HAVE(ISA)) {                             \
      __intrin_xmm_t *Xmm0 = (void *)(A);                            \
      const __intrin_xmm_t *Xmm1 = (const __intrin_xmm_t *)(B);      \
      if (!X86_NEED(AVX)) {                                          \
        asm(OP "\t%1,%0" : "=x"(*Xmm0) : "i"(I), "0"(*Xmm1));        \
      } else {                                                       \
        asm("v" OP "\t%2,%1,%0" : "=x"(*Xmm0) : "x"(*Xmm1), "i"(I)); \
      }                                                              \
    } else {                                                         \
      PURE(A, B, I);                                                 \
    }                                                                \
  } while (0)

#else
#define INTRIN_SSEVEX_X_X_X_(PURE, ISA, OP, FLAGS, A, B, C) PURE(A, B, C)
#define INTRIN_SSEVEX_X_X_I_(PURE, ISA, OP, A, B, I)        PURE(A, B, I)
#define INTRIN_SSEVEX_X_I_(PURE, ISA, OP, A, B, I)          PURE(A, B, I)
#endif /* X86 && !ANSI */

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/mpsadbw.h */

#define COSMOPOLITAN_LIBC_INTRIN_MPSADBW_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void mpsadbw(uint16_t[8], const uint8_t[16], const uint8_t[16], uint8_t);

#ifndef __STRICT_ANSI__
__intrin_xmm_t __mpsadbws(__intrin_xmm_t, __intrin_xmm_t);
#define mpsadbw(C, B, A, I)                                                   \
  do {                                                                        \
    if (__builtin_expect(!IsModeDbg() && X86_NEED(SSE) && X86_HAVE(SSE4_1),   \
                         1)) {                                                \
      __intrin_xmm_t *Xmm0 = (void *)(C);                                     \
      const __intrin_xmm_t *Xmm1 = (const __intrin_xmm_t *)(B);               \
      const __intrin_xmm_t *Xmm2 = (const __intrin_xmm_t *)(A);               \
      if (__builtin_constant_p(I)) {                                          \
        if (!X86_NEED(AVX)) {                                                 \
          asm("mpsadbw\t%2,%1,%0"                                             \
              : "=x"(*Xmm0)                                                   \
              : "x"(*Xmm2), "i"(I), "0"(*Xmm1));                              \
        } else {                                                              \
          asm("vmpsadbw\t%3,%2,%1,%0"                                         \
              : "=x"(*Xmm0)                                                   \
              : "x"(*Xmm1), "x"(*Xmm2), "i"(I));                              \
        }                                                                     \
      } else {                                                                \
        unsigned long Vimm = (I);                                             \
        typeof(__mpsadbws) *Fn;                                               \
        Fn = (typeof(__mpsadbws) *)((uintptr_t)&__mpsadbws + (Vimm & 7) * 8); \
        *Xmm0 = Fn(*Xmm1, *Xmm2);                                             \
      }                                                                       \
    } else {                                                                  \
      mpsadbw(C, B, A, I);                                                    \
    }                                                                         \
  } while (0)
#endif

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/pabsb.h */

#define COSMOPOLITAN_LIBC_INTRIN_PABSB_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void pabsb(uint8_t[16], const int8_t[16]);

#define pabsb(A, B) INTRIN_SSEVEX_X_X_(pabsb, SSSE3, "pabsb", A, B)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/pabsd.h */

#define COSMOPOLITAN_LIBC_INTRIN_PABSD_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void pabsd(uint32_t[4], const int32_t[4]);

#define pabsd(A, B) INTRIN_SSEVEX_X_X_(pabsd, SSSE3, "pabsd", A, B)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/pabsw.h */

#define COSMOPOLITAN_LIBC_INTRIN_PABSW_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void pabsw(uint16_t[8], const int16_t[8]);

#define pabsw(A, B) INTRIN_SSEVEX_X_X_(pabsw, SSSE3, "pabsw", A, B)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/packssdw.h */

#define COSMOPOLITAN_LIBC_INTRIN_PACKSSDW_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void packssdw(int16_t[8], const int32_t[4], const int32_t[4]);

#define packssdw(A, B, C)                                                    \
  INTRIN_SSEVEX_X_X_X_(packssdw, SSE2, "packssdw", INTRIN_NONCOMMUTATIVE, A, \
                       B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/packsswb.h */

#define COSMOPOLITAN_LIBC_INTRIN_PACKSSWB_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void packsswb(int8_t[16], const int16_t[8], const int16_t[8]);

#define packsswb(A, B, C)                                                    \
  INTRIN_SSEVEX_X_X_X_(packsswb, SSE2, "packsswb", INTRIN_NONCOMMUTATIVE, A, \
                       B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/packusdw.h */

#define COSMOPOLITAN_LIBC_INTRIN_PACKUSDW_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void packusdw(uint16_t[8], const int32_t[4], const int32_t[4]);

#define packusdw(A, B, C)                                                      \
  INTRIN_SSEVEX_X_X_X_(packusdw, SSE4_1, "packusdw", INTRIN_NONCOMMUTATIVE, A, \
                       B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/packuswb.h */

#define COSMOPOLITAN_LIBC_INTRIN_PACKUSWB_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void packuswb(uint8_t[16], const int16_t[8], const int16_t[8]);

#define packuswb(A, B, C)                                                    \
  INTRIN_SSEVEX_X_X_X_(packuswb, SSE2, "packuswb", INTRIN_NONCOMMUTATIVE, A, \
                       B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/paddb.h */

#define COSMOPOLITAN_LIBC_INTRIN_PADDB_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void paddb(int8_t[16], const int8_t[16], const int8_t[16]);

#define paddb(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(paddb, SSE2, "paddb", INTRIN_COMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/paddd.h */

#define COSMOPOLITAN_LIBC_INTRIN_PADDD_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void paddd(int32_t[4], const int32_t[4], const int32_t[4]);

#define paddd(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(paddd, SSE2, "paddd", INTRIN_COMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/paddq.h */

#define COSMOPOLITAN_LIBC_INTRIN_PADDQ_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void paddq(int64_t[2], const int64_t[2], const int64_t[2]);

#define paddq(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(paddq, SSE2, "paddq", INTRIN_COMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/paddsb.h */

#define COSMOPOLITAN_LIBC_INTRIN_PADDSB_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void paddsb(int8_t[16], const int8_t[16], const int8_t[16]);

#define paddsb(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(paddsb, SSE2, "paddsb", INTRIN_COMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/paddsw.h */

#define COSMOPOLITAN_LIBC_INTRIN_PADDSW_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void paddsw(int16_t[8], const int16_t[8], const int16_t[8]);

#define paddsw(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(paddsw, SSE2, "paddsw", INTRIN_COMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/paddusb.h */

#define COSMOPOLITAN_LIBC_INTRIN_PADDUSB_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void paddusb(uint8_t[16], const uint8_t[16], const uint8_t[16]);

#define paddusb(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(paddusb, SSE2, "paddusb", INTRIN_COMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/paddusw.h */

#define COSMOPOLITAN_LIBC_INTRIN_PADDUSW_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void paddusw(uint16_t[8], const uint16_t[8], const uint16_t[8]);

#define paddusw(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(paddusw, SSE2, "paddusw", INTRIN_COMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/paddw.h */

#define COSMOPOLITAN_LIBC_INTRIN_PADDW_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void paddw(int16_t[8], const int16_t[8], const int16_t[8]);

#define paddw(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(paddw, SSE2, "paddw", INTRIN_COMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/palignr.h */

#define COSMOPOLITAN_LIBC_INTRIN_PALIGNR_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void palignr(void *, const void *, const void *, unsigned long);

#if !defined(__STRICT_ANSI__) && !defined(__chibicc__)
__intrin_xmm_t __palignrs(__intrin_xmm_t, __intrin_xmm_t);
#define palignr(C, B, A, I)                                                \
  do {                                                                     \
    if (__builtin_expect(!IsModeDbg() && X86_NEED(SSE) && X86_HAVE(SSSE3), \
                         1)) {                                             \
      __intrin_xmm_t *Xmm0 = (void *)(C);                                  \
      const __intrin_xmm_t *Xmm1 = (const __intrin_xmm_t *)(B);            \
      const __intrin_xmm_t *Xmm2 = (const __intrin_xmm_t *)(A);            \
      if (__builtin_constant_p(I)) {                                       \
        if (!X86_NEED(AVX)) {                                              \
          asm("palignr\t%2,%1,%0"                                          \
              : "=x"(*Xmm0)                                                \
              : "x"(*Xmm2), "i"(I), "0"(*Xmm1));                           \
        } else {                                                           \
          asm("vpalignr\t%3,%2,%1,%0"                                      \
              : "=x"(*Xmm0)                                                \
              : "x"(*Xmm1), "x"(*Xmm2), "i"(I));                           \
        }                                                                  \
      } else {                                                             \
        unsigned long Vimm = (I);                                          \
        typeof(__palignrs) *Fn;                                            \
        if (__builtin_expect(Vimm < 32, 1)) {                              \
          Fn = (typeof(__palignrs) *)((uintptr_t)&__palignrs + Vimm * 8);  \
          *Xmm0 = Fn(*Xmm1, *Xmm2);                                        \
        } else {                                                           \
          memset(Xmm0, 0, 16);                                             \
        }                                                                  \
      }                                                                    \
    } else {                                                               \
      palignr(C, B, A, I);                                                 \
    }                                                                      \
  } while (0)
#endif

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/pand.h */

#define COSMOPOLITAN_LIBC_INTRIN_PAND_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void pand(uint64_t[2], const uint64_t[2], const uint64_t[2]);

#define pand(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(pand, SSE2, "pand", INTRIN_COMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/pandn.h */

#define COSMOPOLITAN_LIBC_INTRIN_PANDN_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void pandn(uint64_t[2], const uint64_t[2], const uint64_t[2]);

#define pandn(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(pandn, SSE2, "pandn", INTRIN_NONCOMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/pavgb.h */

#define COSMOPOLITAN_LIBC_INTRIN_PAVGB_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void pavgb(uint8_t[16], const uint8_t[16], const uint8_t[16]);

#define pavgb(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(pavgb, SSE2, "pavgb", INTRIN_COMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/pavgw.h */

#define COSMOPOLITAN_LIBC_INTRIN_PAVGW_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void pavgw(uint16_t[8], const uint16_t[8], const uint16_t[8]);

#define pavgw(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(pavgw, SSE2, "pavgw", INTRIN_COMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/pcmpeqb.h */

#define COSMOPOLITAN_LIBC_INTRIN_PCMPEQB_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void pcmpeqb(uint8_t[16], const uint8_t[16], const uint8_t[16]);

#define pcmpeqb(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(pcmpeqb, SSE2, "pcmpeqb", INTRIN_NONCOMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/pcmpeqd.h */

#define COSMOPOLITAN_LIBC_INTRIN_PCMPEQD_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void pcmpeqd(int32_t[4], const int32_t[4], const int32_t[4]);

#define pcmpeqd(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(pcmpeqd, SSE2, "pcmpeqd", INTRIN_NONCOMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/pcmpeqw.h */

#define COSMOPOLITAN_LIBC_INTRIN_PCMPEQW_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void pcmpeqw(int16_t[8], const int16_t[8], const int16_t[8]);

#define pcmpeqw(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(pcmpeqw, SSE2, "pcmpeqw", INTRIN_NONCOMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/pcmpgtb.h */

#define COSMOPOLITAN_LIBC_INTRIN_PCMPGTB_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void pcmpgtb(int8_t[16], const int8_t[16], const int8_t[16]);

#define pcmpgtb(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(pcmpgtb, SSE2, "pcmpgtb", INTRIN_NONCOMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/pcmpgtd.h */

#define COSMOPOLITAN_LIBC_INTRIN_PCMPGTD_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void pcmpgtd(int32_t[4], const int32_t[4], const int32_t[4]);

#define pcmpgtd(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(pcmpgtd, SSE2, "pcmpgtd", INTRIN_NONCOMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/pcmpgtw.h */

#define COSMOPOLITAN_LIBC_INTRIN_PCMPGTW_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void pcmpgtw(int16_t[8], const int16_t[8], const int16_t[8]);

#define pcmpgtw(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(pcmpgtw, SSE2, "pcmpgtw", INTRIN_NONCOMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/phaddd.h */

#define COSMOPOLITAN_LIBC_INTRIN_PHADDD_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void phaddd(int32_t[4], const int32_t[4], const int32_t[4]);

#define phaddd(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(phaddd, SSSE3, "phaddd", INTRIN_NONCOMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/phaddsw.h */

#define COSMOPOLITAN_LIBC_INTRIN_PHADDSW_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void phaddsw(int16_t[8], const int16_t[8], const int16_t[8]);

#define phaddsw(A, B, C)                                                       \
  INTRIN_SSEVEX_X_X_X_(phaddsw, SSSE3, "phaddsw", INTRIN_NONCOMMUTATIVE, A, B, \
                       C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/phaddw.h */

#define COSMOPOLITAN_LIBC_INTRIN_PHADDW_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void phaddw(int16_t[8], const int16_t[8], const int16_t[8]);

#define phaddw(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(phaddw, SSSE3, "phaddw", INTRIN_NONCOMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/phsubd.h */

#define COSMOPOLITAN_LIBC_INTRIN_PHSUBD_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void phsubd(int32_t[4], const int32_t[4], const int32_t[4]);

#define phsubd(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(phsubd, SSSE3, "phsubd", INTRIN_NONCOMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/phsubsw.h */

#define COSMOPOLITAN_LIBC_INTRIN_PHSUBSW_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void phsubsw(int16_t[8], const int16_t[8], const int16_t[8]);

#define phsubsw(A, B, C)                                                       \
  INTRIN_SSEVEX_X_X_X_(phsubsw, SSSE3, "phsubsw", INTRIN_NONCOMMUTATIVE, A, B, \
                       C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/phsubw.h */

#define COSMOPOLITAN_LIBC_INTRIN_PHSUBW_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void phsubw(int16_t[8], const int16_t[8], const int16_t[8]);

#define phsubw(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(phsubw, SSSE3, "phsubw", INTRIN_NONCOMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/pmaddubsw.h */

#define COSMOPOLITAN_LIBC_INTRIN_PMADDUBSW_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void pmaddubsw(int16_t[8], const uint8_t[16], const int8_t[16]);

#define pmaddubsw(W, B, C)                                                   \
  INTRIN_SSEVEX_X_X_X_(pmaddubsw, SSSE3, "pmaddubsw", INTRIN_NONCOMMUTATIVE, \
                       W, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/pmaddwd.h */

#define COSMOPOLITAN_LIBC_INTRIN_PMADDWD_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void pmaddwd(int32_t[4], const int16_t[8], const int16_t[8]);

#define pmaddwd(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(pmaddwd, SSE2, "pmaddwd", INTRIN_COMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/pmaxsw.h */

#define COSMOPOLITAN_LIBC_INTRIN_PMAXSW_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void pmaxsw(int16_t[8], const int16_t[8], const int16_t[8]);

#define pmaxsw(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(pmaxsw, SSE2, "pmaxsw", INTRIN_COMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/pmaxub.h */

#define COSMOPOLITAN_LIBC_INTRIN_PMAXUB_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void pmaxub(unsigned char[16], const unsigned char[16],
            const unsigned char[16]);

#define pmaxub(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(pmaxub, SSE2, "pmaxub", INTRIN_COMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/pminsw.h */

#define COSMOPOLITAN_LIBC_INTRIN_PMINSW_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void pminsw(int16_t[8], const int16_t[8], const int16_t[8]);

#define pminsw(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(pminsw, SSE2, "pminsw", INTRIN_COMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/pminub.h */

#define COSMOPOLITAN_LIBC_INTRIN_PMINUB_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void pminub(unsigned char[16], const unsigned char[16],
            const unsigned char[16]);

#define pminub(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(pminub, SSE2, "pminub", INTRIN_COMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/pmovmskb.h */

#define COSMOPOLITAN_LIBC_INTRIN_PMOVMSKB_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

uint32_t pmovmskb(const uint8_t[16]);

#define pmovmskb(A)                                            \
  ({                                                           \
    uint32_t Mask;                                             \
    if (!IsModeDbg() && X86_HAVE(SSE2)) {                      \
      const __intrin_xmm_t *Xmm = (const __intrin_xmm_t *)(A); \
      if (!X86_NEED(AVX)) {                                    \
        asm("pmovmskb\t%1,%0" : "=r"(Mask) : "x"(*Xmm));       \
      } else {                                                 \
        asm("vpmovmskb\t%1,%0" : "=r"(Mask) : "x"(*Xmm));      \
      }                                                        \
    } else {                                                   \
      Mask = pmovmskb(A);                                      \
    }                                                          \
    Mask;                                                      \
  })

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/pmulhrsw.h */

#define COSMOPOLITAN_LIBC_INTRIN_PMULHRSW_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void pmulhrsw(int16_t a[8], const int16_t b[8], const int16_t c[8]);

#define pmulhrsw(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(pmulhrsw, SSSE3, "pmulhrsw", INTRIN_COMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/pmulhuw.h */

#define COSMOPOLITAN_LIBC_INTRIN_PMULHUW_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void pmulhuw(uint16_t[8], const uint16_t[8], const uint16_t[8]);

#define pmulhuw(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(pmulhuw, SSE2, "pmulhuw", INTRIN_COMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/pmulhw.h */

#define COSMOPOLITAN_LIBC_INTRIN_PMULHW_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void pmulhw(int16_t[8], const int16_t[8], const int16_t[8]);

#define pmulhw(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(pmulhw, SSE2, "pmulhw", INTRIN_COMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/pmulld.h */

#define COSMOPOLITAN_LIBC_INTRIN_PMULLD_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void pmulld(int32_t[4], const int32_t[4], const int32_t[4]);

#define pmulld(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(pmulld, SSE4_1, "pmulld", INTRIN_COMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/pmullw.h */

#define COSMOPOLITAN_LIBC_INTRIN_PMULLW_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void pmullw(int16_t[8], const int16_t[8], const int16_t[8]);

#define pmullw(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(pmullw, SSE2, "pmullw", INTRIN_COMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/pmuludq.h */

#define COSMOPOLITAN_LIBC_INTRIN_PMULUDQ_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void pmuludq(uint64_t[2], const uint32_t[4], const uint32_t[4]);

#define pmuludq(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(pmuludq, SSE2, "pmuludq", INTRIN_COMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/por.h */

#define COSMOPOLITAN_LIBC_INTRIN_POR_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void por(uint64_t[2], const uint64_t[2], const uint64_t[2]);

#define por(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(por, SSE2, "por", INTRIN_COMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/psadbw.h */

#define COSMOPOLITAN_LIBC_INTRIN_PSADBW_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void psadbw(uint64_t[2], const uint8_t[16], const uint8_t[16]);

#define psadbw(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(psadbw, SSE2, "psadbw", INTRIN_COMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/pshufb.h */

#define COSMOPOLITAN_LIBC_INTRIN_PSHUFB_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void pshufb(uint8_t[16], const uint8_t[16], const uint8_t[16]);

#define pshufb(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(pshufb, SSSE3, "pshufb", INTRIN_NONCOMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/pshufd.h */

#define COSMOPOLITAN_LIBC_INTRIN_PSHUFD_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void pshufd(int32_t[4], const int32_t[4], uint8_t);

#define pshufd(A, B, I) INTRIN_SSEVEX_X_X_I_(pshufd, SSE2, "pshufd", A, B, I)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/pshufhw.h */

#define COSMOPOLITAN_LIBC_INTRIN_PSHUFHW_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void pshufhw(int16_t[8], const int16_t[8], uint8_t);

#define pshufhw(A, B, I) INTRIN_SSEVEX_X_X_I_(pshufhw, SSE2, "pshufhw", A, B, I)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/pshuflw.h */

#define COSMOPOLITAN_LIBC_INTRIN_PSHUFLW_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void pshuflw(int16_t[8], const int16_t[8], uint8_t);

#define pshuflw(A, B, I) INTRIN_SSEVEX_X_X_I_(pshuflw, SSE2, "pshuflw", A, B, I)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/pshufw.h */

#define COSMOPOLITAN_LIBC_INTRIN_PSHUFW_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void pshufw(int16_t[4], const int16_t[4], uint8_t);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/psignb.h */

#define COSMOPOLITAN_LIBC_INTRIN_PSIGNB_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void psignb(int8_t[16], const int8_t[16], const int8_t[16]);

#define psignb(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(psignb, SSSE3, "psignb", INTRIN_NONCOMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/psignd.h */

#define COSMOPOLITAN_LIBC_INTRIN_PSIGND_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void psignd(int32_t[4], const int32_t[4], const int32_t[4]);

#define psignd(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(psignd, SSSE3, "psignd", INTRIN_NONCOMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/psignw.h */

#define COSMOPOLITAN_LIBC_INTRIN_PSIGNW_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void psignw(int16_t[8], const int16_t[8], const int16_t[8]);

#define psignw(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(psignw, SSSE3, "psignw", INTRIN_NONCOMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/pslld.h */

#define COSMOPOLITAN_LIBC_INTRIN_PSLLD_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void pslld(uint32_t[4], const uint32_t[4], unsigned char);
void pslldv(uint32_t[4], const uint32_t[4], const uint64_t[2]);

#define pslld(A, B, I) INTRIN_SSEVEX_X_I_(pslld, SSE2, "pslld", A, B, I)
#define pslldv(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(pslldv, SSE2, "pslld", INTRIN_NONCOMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/pslldq.h */

#define COSMOPOLITAN_LIBC_INTRIN_PSLLDQ_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void pslldq(uint8_t[16], const uint8_t[16], unsigned long);

#ifndef __STRICT_ANSI__
__intrin_xmm_t __pslldqs(__intrin_xmm_t);
#define pslldq(B, A, I)                                                   \
  do {                                                                    \
    if (__builtin_expect(!IsModeDbg() && X86_NEED(SSE) && X86_HAVE(SSE2), \
                         1)) {                                            \
      __intrin_xmm_t *Xmm0 = (void *)(B);                                 \
      const __intrin_xmm_t *Xmm1 = (const __intrin_xmm_t *)(A);           \
      if (__builtin_constant_p(I)) {                                      \
        if (!X86_NEED(AVX)) {                                             \
          asm("pslldq\t%1,%0" : "=x"(*Xmm0) : "i"(I), "0"(*Xmm1));        \
        } else {                                                          \
          asm("vpslldq\t%2,%1,%0" : "=x"(*Xmm0) : "x"(*Xmm1), "i"(I));    \
        }                                                                 \
      } else {                                                            \
        unsigned long Vimm = (I);                                         \
        typeof(__pslldqs) *Fn;                                            \
        if (Vimm > 16) Vimm = 16;                                         \
        Fn = (typeof(__pslldqs) *)((uintptr_t)&__pslldqs + Vimm * 8);     \
        *Xmm0 = Fn(*Xmm1);                                                \
      }                                                                   \
    } else {                                                              \
      pslldq(B, A, I);                                                    \
    }                                                                     \
  } while (0)
#endif

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/psllq.h */

#define COSMOPOLITAN_LIBC_INTRIN_PSLLQ_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void psllq(uint64_t[2], const uint64_t[2], unsigned char);
void psllqv(uint64_t[2], const uint64_t[2], const uint64_t[2]);

#define psllq(A, B, I) INTRIN_SSEVEX_X_I_(psllq, SSE2, "psllq", A, B, I)
#define psllqv(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(psllqv, SSE2, "psllq", INTRIN_NONCOMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/psllw.h */

#define COSMOPOLITAN_LIBC_INTRIN_PSLLW_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void psllw(uint16_t[8], const uint16_t[8], unsigned char);
void psllwv(uint16_t[8], const uint16_t[8], const uint64_t[2]);

#define psllw(A, B, I) INTRIN_SSEVEX_X_I_(psllw, SSE2, "psllw", A, B, I)
#define psllwv(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(psllwv, SSE2, "psllw", INTRIN_NONCOMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/psrad.h */

#define COSMOPOLITAN_LIBC_INTRIN_PSRAD_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void psrad(int32_t[4], const int32_t[4], unsigned char);
void psradv(int32_t[4], const int32_t[4], const uint64_t[2]);

#define psrad(A, B, I) INTRIN_SSEVEX_X_I_(psrad, SSE2, "psrad", A, B, I)
#define psradv(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(psradv, SSE2, "psrad", INTRIN_NONCOMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/psraw.h */

#define COSMOPOLITAN_LIBC_INTRIN_PSRAW_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void psraw(int16_t[8], const int16_t[8], unsigned char);
void psrawv(int16_t[8], const int16_t[8], const uint64_t[2]);

#define psraw(A, B, I) INTRIN_SSEVEX_X_I_(psraw, SSE2, "psraw", A, B, I)
#define psrawv(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(psrawv, SSE2, "psraw", INTRIN_NONCOMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/psrld.h */

#define COSMOPOLITAN_LIBC_INTRIN_PSRLD_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void psrld(uint32_t[4], const uint32_t[4], unsigned char);
void psrldv(uint32_t[4], const uint32_t[4], const uint64_t[2]);

#define psrld(A, B, I) INTRIN_SSEVEX_X_I_(psrld, SSE2, "psrld", A, B, I)
#define psrldv(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(psrldv, SSE2, "psrld", INTRIN_NONCOMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/psrldq.h */

#define COSMOPOLITAN_LIBC_INTRIN_PSRLDQ_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void psrldq(uint8_t[16], const uint8_t[16], unsigned long);

#ifndef __STRICT_ANSI__
__intrin_xmm_t __psrldqs(__intrin_xmm_t);
#define psrldq(B, A, I)                                                   \
  do {                                                                    \
    if (__builtin_expect(!IsModeDbg() && X86_NEED(SSE) && X86_HAVE(SSE2), \
                         1)) {                                            \
      __intrin_xmm_t *Xmm0 = (void *)(B);                                 \
      const __intrin_xmm_t *Xmm1 = (const __intrin_xmm_t *)(A);           \
      if (__builtin_constant_p(I)) {                                      \
        if (!X86_NEED(AVX)) {                                             \
          asm("psrldq\t%1,%0" : "=x"(*Xmm0) : "i"(I), "0"(*Xmm1));        \
        } else {                                                          \
          asm("vpsrldq\t%2,%1,%0" : "=x"(*Xmm0) : "x"(*Xmm1), "i"(I));    \
        }                                                                 \
      } else {                                                            \
        unsigned long Vimm = (I);                                         \
        typeof(__psrldqs) *Fn;                                            \
        if (Vimm > 16) Vimm = 16;                                         \
        Fn = (typeof(__psrldqs) *)((uintptr_t)&__psrldqs + Vimm * 8);     \
        *Xmm0 = Fn(*Xmm1);                                                \
      }                                                                   \
    } else {                                                              \
      psrldq(B, A, I);                                                    \
    }                                                                     \
  } while (0)
#endif

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/psrlq.h */

#define COSMOPOLITAN_LIBC_INTRIN_PSRLQ_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void psrlq(uint64_t[2], const uint64_t[2], unsigned char);
void psrlqv(uint64_t[2], const uint64_t[2], const uint64_t[2]);

#define psrlq(A, B, I) INTRIN_SSEVEX_X_I_(psrlq, SSE2, "psrlq", A, B, I)
#define psrlqv(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(psrlqv, SSE2, "psrlq", INTRIN_NONCOMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/psrlw.h */

#define COSMOPOLITAN_LIBC_INTRIN_PSRLW_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void psrlw(uint16_t[8], const uint16_t[8], unsigned char);
void psrlwv(uint16_t[8], const uint16_t[8], const uint64_t[2]);

#define psrlw(A, B, I) INTRIN_SSEVEX_X_I_(psrlw, SSE2, "psrlw", A, B, I)
#define psrlwv(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(psrlwv, SSE2, "psrlw", INTRIN_NONCOMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/psubb.h */

#define COSMOPOLITAN_LIBC_INTRIN_PSUBB_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void psubb(uint8_t[16], const uint8_t[16], const uint8_t[16]);

#define psubb(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(psubb, SSE2, "psubb", INTRIN_NONCOMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/psubd.h */

#define COSMOPOLITAN_LIBC_INTRIN_PSUBD_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void psubd(int32_t[4], const int32_t[4], const int32_t[4]);

#define psubd(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(psubd, SSE2, "psubd", INTRIN_NONCOMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/psubq.h */

#define COSMOPOLITAN_LIBC_INTRIN_PSUBQ_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void psubq(int64_t[2], const int64_t[2], const int64_t[2]);

#define psubq(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(psubq, SSE2, "psubq", INTRIN_NONCOMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/psubsb.h */

#define COSMOPOLITAN_LIBC_INTRIN_PSUBSB_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void psubsb(int8_t[16], const int8_t[16], const int8_t[16]);

#define psubsb(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(psubsb, SSE2, "psubsb", INTRIN_NONCOMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/psubsw.h */

#define COSMOPOLITAN_LIBC_INTRIN_PSUBSW_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void psubsw(int16_t[8], const int16_t[8], const int16_t[8]);

#define psubsw(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(psubsw, SSE2, "psubsw", INTRIN_NONCOMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/psubusb.h */

#define COSMOPOLITAN_LIBC_INTRIN_PSUBUSB_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void psubusb(uint8_t[16], const uint8_t[16], const uint8_t[16]);

#define psubusb(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(psubusb, SSE2, "psubusb", INTRIN_NONCOMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/psubusw.h */

#define COSMOPOLITAN_LIBC_INTRIN_PSUBUSW_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void psubusw(uint16_t[8], const uint16_t[8], const uint16_t[8]);

#define psubusw(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(psubusw, SSE2, "psubusw", INTRIN_NONCOMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/psubw.h */

#define COSMOPOLITAN_LIBC_INTRIN_PSUBW_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void(psubw)(int16_t[8], const int16_t[8], const int16_t[8]);

#define psubw(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(psubw, SSE2, "psubw", INTRIN_NONCOMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/punpckhbw.h */

#define COSMOPOLITAN_LIBC_INTRIN_PUNPCKHBW_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void punpckhbw(uint8_t[16], const uint8_t[16], const uint8_t[16]);

#define punpckhbw(A, B, C)                                                     \
  INTRIN_SSEVEX_X_X_X_(punpckhbw, SSE2, "punpckhbw", INTRIN_NONCOMMUTATIVE, A, \
                       B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/punpckhdq.h */

#define COSMOPOLITAN_LIBC_INTRIN_PUNPCKHDQ_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void punpckhdq(uint32_t[4], const uint32_t[4], const uint32_t[4]);

#define punpckhdq(A, B, C)                                                     \
  INTRIN_SSEVEX_X_X_X_(punpckhdq, SSE2, "punpckhdq", INTRIN_NONCOMMUTATIVE, A, \
                       B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/punpckhqdq.h */

#define COSMOPOLITAN_LIBC_INTRIN_PUNPCKHQDQ_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void punpckhqdq(uint64_t[2], const uint64_t[2], const uint64_t[2]);

#define punpckhqdq(A, B, C)                                                   \
  INTRIN_SSEVEX_X_X_X_(punpckhqdq, SSE2, "punpckhqdq", INTRIN_NONCOMMUTATIVE, \
                       A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/punpckhwd.h */

#define COSMOPOLITAN_LIBC_INTRIN_PUNPCKHWD_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void punpckhwd(uint16_t[8], const uint16_t[8], const uint16_t[8]);

#define punpckhwd(A, B, C)                                                     \
  INTRIN_SSEVEX_X_X_X_(punpckhwd, SSE2, "punpckhwd", INTRIN_NONCOMMUTATIVE, A, \
                       B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/punpcklbw.h */

#define COSMOPOLITAN_LIBC_INTRIN_PUNPCKLBW_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void punpcklbw(uint8_t[16], const uint8_t[16], const uint8_t[16]);

#define punpcklbw(A, B, C)                                                     \
  INTRIN_SSEVEX_X_X_X_(punpcklbw, SSE2, "punpcklbw", INTRIN_NONCOMMUTATIVE, A, \
                       B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/punpckldq.h */

#define COSMOPOLITAN_LIBC_INTRIN_PUNPCKLDQ_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void punpckldq(uint32_t[4], const uint32_t[4], const uint32_t[4]);

#define punpckldq(A, B, C)                                                     \
  INTRIN_SSEVEX_X_X_X_(punpckldq, SSE2, "punpckldq", INTRIN_NONCOMMUTATIVE, A, \
                       B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/punpcklqdq.h */

#define COSMOPOLITAN_LIBC_INTRIN_PUNPCKLQDQ_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void punpcklqdq(uint64_t[2], const uint64_t[2], const uint64_t[2]);

#define punpcklqdq(A, B, C)                                                   \
  INTRIN_SSEVEX_X_X_X_(punpcklqdq, SSE2, "punpcklqdq", INTRIN_NONCOMMUTATIVE, \
                       A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/punpcklwd.h */

#define COSMOPOLITAN_LIBC_INTRIN_PUNPCKLWD_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void punpcklwd(uint16_t[8], const uint16_t[8], const uint16_t[8]);

#define punpcklwd(A, B, C)                                                     \
  INTRIN_SSEVEX_X_X_X_(punpcklwd, SSE2, "punpcklwd", INTRIN_NONCOMMUTATIVE, A, \
                       B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/pxor.h */

#define COSMOPOLITAN_LIBC_INTRIN_PXOR_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void pxor(uint64_t[2], const uint64_t[2], const uint64_t[2]);

#define pxor(A, B, C) \
  INTRIN_SSEVEX_X_X_X_(pxor, SSE2, "pxor", INTRIN_COMMUTATIVE, A, B, C)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/repmovsb.h */

#define COSMOPOLITAN_LIBC_INTRIN_REPMOVSB_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

forceinline void repmovsb(void **dest, const void **src, size_t cx) {
  char *di = (char *)*dest;
  const char *si = (const char *)*src;
  while (cx) *di++ = *si++, cx--;
  *dest = di, *src = si;
}

#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
#define repmovsb(DI, SI, CX)                                       \
  ({                                                               \
    void *Di = *(DI);                                              \
    const void *Si = *(SI);                                        \
    size_t Cx = (CX);                                              \
    asm("rep movsb"                                                \
        : "=D"(Di), "=S"(Si), "=c"(Cx), "=m"(*(char(*)[Cx])Di)     \
        : "0"(Di), "1"(Si), "2"(Cx), "m"(*(const char(*)[Cx])Si)); \
    *(DI) = Di, *(SI) = Si;                                        \
  })
#endif

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/repstosb.h */

#define COSMOPOLITAN_LIBC_INTRIN_REPSTOSB_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

forceinline void *repstosb(void *dest, unsigned char al, size_t cx) {
  unsigned char *di = (unsigned char *)dest;
  while (cx) *di++ = al, cx--;
  return di;
}

#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
#define repstosb(DI, AL, CX)                         \
  ({                                                 \
    void *Di = (DI);                                 \
    size_t Cx = (CX);                                \
    unsigned char Al = (AL);                         \
    asm("rep stosb %b5,(%0)"                         \
        : "=D"(Di), "=c"(Cx), "=m"(*(char(*)[Cx])Di) \
        : "0"(Di), "1"(Cx), "a"(Al));                \
    Di;                                              \
  })
#endif

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/shufpd.h */

#define COSMOPOLITAN_LIBC_INTRIN_SHUFPD_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void shufpd(double[2], const double[2], const double[2], uint8_t);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/intrin/shufps.h */

#define COSMOPOLITAN_LIBC_INTRIN_SHUFPS_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void shufps(float[4], const float[4], const float[4], uint8_t);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/log/bsd.h */

#define COSMOPOLITAN_LIBC_LOG_BSD_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § logging » berkeley logger                                 ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

void err(int, const char *, ...) printfesque(2) wontreturn;
void errx(int, const char *, ...) printfesque(2) wontreturn;
void verr(int, const char *, va_list) paramsnonnull((3)) wontreturn;
void verrx(int, const char *, va_list) paramsnonnull((3)) wontreturn;
void vwarn(const char *, va_list) paramsnonnull((2));
void vwarnx(const char *, va_list) paramsnonnull((2));
void warn(const char *, ...) printfesque(1);
void warnx(const char *, ...) printfesque(1);

#define err(EVAL, FMT, ...)  (err)(EVAL, PFLINK(FMT), ##__VA_ARGS__)
#define errx(EVAL, FMT, ...) (errx)(EVAL, PFLINK(FMT), ##__VA_ARGS__)
#define verr(EVAL, FMT, VA)  (verr)(EVAL, PFLINK(FMT), VA)
#define verrx(EVAL, FMT, VA) (verrx)(EVAL, PFLINK(FMT), VA)
#define vwarn(FMT, VA)       (vwarn)(PFLINK(FMT), VA)
#define vwarnx(FMT, VA)      (vwarnx)(PFLINK(FMT), VA)
#define warn(FMT, ...)       (warn)(PFLINK(FMT), ##__VA_ARGS__)
#define warnx(FMT, ...)      (warn)(PFLINK(FMT), ##__VA_ARGS__)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/log/check.h */

#define COSMOPOLITAN_LIBC_LOG_CHECK_H_

/**
 * @fileoverview Modern assertions, courtesy of Elgoog.
 */

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

#define CHECK(X, ...)         __CHK(ne, !=, false, "false", !!(X), #X, "" __VA_ARGS__)
#define CHECK_EQ(Y, X, ...)   __CHK(eq, ==, Y, #Y, X, #X, "" __VA_ARGS__)
#define CHECK_NE(Y, X, ...)   __CHK(ne, !=, Y, #Y, X, #X, "" __VA_ARGS__)
#define CHECK_LE(Y, X, ...)   __CHK(le, <=, Y, #Y, X, #X, "" __VA_ARGS__)
#define CHECK_LT(Y, X, ...)   __CHK(lt, <, Y, #Y, X, #X, "" __VA_ARGS__)
#define CHECK_GE(Y, X, ...)   __CHK(ge, >=, Y, #Y, X, #X, "" __VA_ARGS__)
#define CHECK_GT(Y, X, ...)   __CHK(gt, >, Y, #Y, X, #X, "" __VA_ARGS__)
#define CHECK_NOTNULL(X, ...) __CHK(ne, !=, NULL, "NULL", X, #X, "" __VA_ARGS__)

#define DCHECK(X, ...)       __DCHK(ne, !=, false, "false", !!(X), #X, "" __VA_ARGS__)
#define DCHECK_EQ(Y, X, ...) __DCHK(eq, ==, Y, #Y, X, #X, "" __VA_ARGS__)
#define DCHECK_NE(Y, X, ...) __DCHK(ne, !=, Y, #Y, X, #X, "" __VA_ARGS__)
#define DCHECK_LE(Y, X, ...) __DCHK(le, <=, Y, #Y, X, #X, "" __VA_ARGS__)
#define DCHECK_LT(Y, X, ...) __DCHK(lt, <, Y, #Y, X, #X, "" __VA_ARGS__)
#define DCHECK_GE(Y, X, ...) __DCHK(ge, >=, Y, #Y, X, #X, "" __VA_ARGS__)
#define DCHECK_GT(Y, X, ...) __DCHK(gt, >, Y, #Y, X, #X, "" __VA_ARGS__)
#define DCHECK_NOTNULL(X, ...) \
  __DCHK(ne, !=, NULL, "NULL", X, #X, "" __VA_ARGS__)

#define CHECK_ALIGNED(BYTES, VAR)                            \
  do {                                                       \
    if (((uintptr_t)VAR & ((BYTES)-1u))) {                   \
      __check_fail_aligned(BYTES, (uintptr_t)VAR);           \
      unreachable;                                           \
    }                                                        \
    VAR = (typeof(VAR))__builtin_assume_aligned(VAR, BYTES); \
  } while (0)

#define DCHECK_ALIGNED(BYTES, VAR)                           \
  do {                                                       \
    if (((uintptr_t)VAR & ((BYTES)-1u))) {                   \
      __DCHK_ALIGNED(BYTES, (uintptr_t)VAR);                 \
      unreachable;                                           \
    }                                                        \
    VAR = (typeof(VAR))__builtin_assume_aligned(VAR, BYTES); \
  } while (0)

#if defined(__VSCODE_INTELLISENSE__)
#define __CHK(...)
#else
#define __CHK(SUFFIX, OP, WANT, WANTSTR, GOT, GOTSTR, ...)                   \
  do {                                                                       \
    autotype(GOT) Got = (GOT);                                               \
    autotype(WANT) Want = (WANT);                                            \
    if (!(Want OP Got)) {                                                    \
      if (!NoDebug()) {                                                      \
        __check_fail(#SUFFIX, #OP, (uint64_t)Want, (WANTSTR), (uint64_t)Got, \
                     (GOTSTR), __FILE__, __LINE__, __VA_ARGS__);             \
      } else {                                                               \
        __check_fail_##SUFFIX((uint64_t)Want, (uint64_t)Got);                \
      }                                                                      \
      unreachable;                                                           \
    }                                                                        \
  } while (0)
#endif /* defined(__VSCODE_INTELLISENSE__) */

#if defined(__VSCODE_INTELLISENSE__)
#define __DCHK(...)
#else
#ifdef NDEBUG
#define __DCHK(SUFFIX, OP, WANT, WANTSTR, GOT, ...) \
  do {                                              \
    autotype(GOT) Got = (GOT);                      \
    autotype(WANT) Want = (WANT);                   \
    if (!(Want OP Got)) {                           \
      unreachable;                                  \
    }                                               \
  } while (0)
#else
#define __DCHK(SUFFIX, OP, WANT, WANTSTR, GOT, GOTSTR, ...) \
  __CHK(SUFFIX, OP, WANT, WANTSTR, GOT, GOTSTR, __VA_ARGS__)
#endif /* NDEBUG */
#endif /* defined(__VSCODE_INTELLISENSE__) */

#ifdef NDEBUG
#define __DCHK_ALIGNED(BYTES, VAR)
#else
#define __DCHK_ALIGNED(BYTES, VAR) __check_fail_aligned(BYTES, VAR)
#endif

void __check_fail(const char *, const char *, uint64_t, const char *, uint64_t,
                  const char *, const char *, int, const char *,
                  ...) relegated wontreturn;

void __check_fail_eq(uint64_t, uint64_t) relegated wontreturn;
void __check_fail_ne(uint64_t, uint64_t) relegated wontreturn;
void __check_fail_le(uint64_t, uint64_t) relegated wontreturn;
void __check_fail_lt(uint64_t, uint64_t) relegated wontreturn;
void __check_fail_ge(uint64_t, uint64_t) relegated wontreturn;
void __check_fail_gt(uint64_t, uint64_t) relegated wontreturn;
void __check_fail_aligned(unsigned, uint64_t) relegated wontreturn;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/log/gdb.h */

#define COSMOPOLITAN_LIBC_LOG_GDB_H_


/*!BEGIN libc/sysv/consts/nr.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_NR_H_

#define __NR_exit                    SYMBOLIC(__NR_exit)
#define __NR_exit_group              SYMBOLIC(__NR_exit_group)
#define __NR_read                    SYMBOLIC(__NR_read)
#define __NR_write                   SYMBOLIC(__NR_write)
#define __NR_open                    SYMBOLIC(__NR_open)
#define __NR_close                   SYMBOLIC(__NR_close)
#define __NR_stat                    SYMBOLIC(__NR_stat)
#define __NR_fstat                   SYMBOLIC(__NR_fstat)
#define __NR_lstat                   SYMBOLIC(__NR_lstat)
#define __NR_poll                    SYMBOLIC(__NR_poll)
#define __NR_ppoll                   SYMBOLIC(__NR_ppoll)
#define __NR_lseek                   SYMBOLIC(__NR_lseek)
#define __NR_mmap                    SYMBOLIC(__NR_mmap)
#define __NR_msync                   SYMBOLIC(__NR_msync)
#define __NR_mprotect                SYMBOLIC(__NR_mprotect)
#define __NR_munmap                  SYMBOLIC(__NR_munmap)
#define __NR_sigaction               SYMBOLIC(__NR_sigaction)
#define __NR_sigprocmask             SYMBOLIC(__NR_sigprocmask)
#define __NR_ioctl                   SYMBOLIC(__NR_ioctl)
#define __NR_pread                   SYMBOLIC(__NR_pread)
#define __NR_pwrite                  SYMBOLIC(__NR_pwrite)
#define __NR_readv                   SYMBOLIC(__NR_readv)
#define __NR_writev                  SYMBOLIC(__NR_writev)
#define __NR_access                  SYMBOLIC(__NR_access)
#define __NR_pipe                    SYMBOLIC(__NR_pipe)
#define __NR_select                  SYMBOLIC(__NR_select)
#define __NR_pselect                 SYMBOLIC(__NR_pselect)
#define __NR_pselect6                SYMBOLIC(__NR_pselect6)
#define __NR_sched_yield             SYMBOLIC(__NR_sched_yield)
#define __NR_mremap                  SYMBOLIC(__NR_mremap)
#define __NR_mincore                 SYMBOLIC(__NR_mincore)
#define __NR_madvise                 SYMBOLIC(__NR_madvise)
#define __NR_shmget                  SYMBOLIC(__NR_shmget)
#define __NR_shmat                   SYMBOLIC(__NR_shmat)
#define __NR_shmctl                  SYMBOLIC(__NR_shmctl)
#define __NR_dup                     SYMBOLIC(__NR_dup)
#define __NR_dup2                    SYMBOLIC(__NR_dup2)
#define __NR_pause                   SYMBOLIC(__NR_pause)
#define __NR_nanosleep               SYMBOLIC(__NR_nanosleep)
#define __NR_getitimer               SYMBOLIC(__NR_getitimer)
#define __NR_setitimer               SYMBOLIC(__NR_setitimer)
#define __NR_alarm                   SYMBOLIC(__NR_alarm)
#define __NR_getpid                  SYMBOLIC(__NR_getpid)
#define __NR_sendfile                SYMBOLIC(__NR_sendfile)
#define __NR_socket                  SYMBOLIC(__NR_socket)
#define __NR_connect                 SYMBOLIC(__NR_connect)
#define __NR_accept                  SYMBOLIC(__NR_accept)
#define __NR_sendto                  SYMBOLIC(__NR_sendto)
#define __NR_recvfrom                SYMBOLIC(__NR_recvfrom)
#define __NR_sendmsg                 SYMBOLIC(__NR_sendmsg)
#define __NR_recvmsg                 SYMBOLIC(__NR_recvmsg)
#define __NR_shutdown                SYMBOLIC(__NR_shutdown)
#define __NR_bind                    SYMBOLIC(__NR_bind)
#define __NR_listen                  SYMBOLIC(__NR_listen)
#define __NR_getsockname             SYMBOLIC(__NR_getsockname)
#define __NR_getpeername             SYMBOLIC(__NR_getpeername)
#define __NR_socketpair              SYMBOLIC(__NR_socketpair)
#define __NR_setsockopt              SYMBOLIC(__NR_setsockopt)
#define __NR_getsockopt              SYMBOLIC(__NR_getsockopt)
#define __NR_fork                    SYMBOLIC(__NR_fork)
#define __NR_vfork                   SYMBOLIC(__NR_vfork)
#define __NR_posix_spawn             SYMBOLIC(__NR_posix_spawn)
#define __NR_execve                  SYMBOLIC(__NR_execve)
#define __NR_wait4                   SYMBOLIC(__NR_wait4)
#define __NR_kill                    SYMBOLIC(__NR_kill)
#define __NR_killpg                  SYMBOLIC(__NR_killpg)
#define __NR_clone                   SYMBOLIC(__NR_clone)
#define __NR_tkill                   SYMBOLIC(__NR_tkill)
#define __NR_futex                   SYMBOLIC(__NR_futex)
#define __NR_set_robust_list         SYMBOLIC(__NR_set_robust_list)
#define __NR_get_robust_list         SYMBOLIC(__NR_get_robust_list)
#define __NR_uname                   SYMBOLIC(__NR_uname)
#define __NR_semget                  SYMBOLIC(__NR_semget)
#define __NR_semop                   SYMBOLIC(__NR_semop)
#define __NR_semctl                  SYMBOLIC(__NR_semctl)
#define __NR_shmdt                   SYMBOLIC(__NR_shmdt)
#define __NR_msgget                  SYMBOLIC(__NR_msgget)
#define __NR_msgsnd                  SYMBOLIC(__NR_msgsnd)
#define __NR_msgrcv                  SYMBOLIC(__NR_msgrcv)
#define __NR_msgctl                  SYMBOLIC(__NR_msgctl)
#define __NR_fcntl                   SYMBOLIC(__NR_fcntl)
#define __NR_flock                   SYMBOLIC(__NR_flock)
#define __NR_fsync                   SYMBOLIC(__NR_fsync)
#define __NR_fdatasync               SYMBOLIC(__NR_fdatasync)
#define __NR_truncate                SYMBOLIC(__NR_truncate)
#define __NR_ftruncate               SYMBOLIC(__NR_ftruncate)
#define __NR_getcwd                  SYMBOLIC(__NR_getcwd)
#define __NR_chdir                   SYMBOLIC(__NR_chdir)
#define __NR_fchdir                  SYMBOLIC(__NR_fchdir)
#define __NR_rename                  SYMBOLIC(__NR_rename)
#define __NR_mkdir                   SYMBOLIC(__NR_mkdir)
#define __NR_rmdir                   SYMBOLIC(__NR_rmdir)
#define __NR_creat                   SYMBOLIC(__NR_creat)
#define __NR_link                    SYMBOLIC(__NR_link)
#define __NR_unlink                  SYMBOLIC(__NR_unlink)
#define __NR_symlink                 SYMBOLIC(__NR_symlink)
#define __NR_readlink                SYMBOLIC(__NR_readlink)
#define __NR_chmod                   SYMBOLIC(__NR_chmod)
#define __NR_fchmod                  SYMBOLIC(__NR_fchmod)
#define __NR_chown                   SYMBOLIC(__NR_chown)
#define __NR_fchown                  SYMBOLIC(__NR_fchown)
#define __NR_lchown                  SYMBOLIC(__NR_lchown)
#define __NR_umask                   SYMBOLIC(__NR_umask)
#define __NR_gettimeofday            SYMBOLIC(__NR_gettimeofday)
#define __NR_getrlimit               SYMBOLIC(__NR_getrlimit)
#define __NR_getrusage               SYMBOLIC(__NR_getrusage)
#define __NR_sysinfo                 SYMBOLIC(__NR_sysinfo)
#define __NR_times                   SYMBOLIC(__NR_times)
#define __NR_ptrace                  SYMBOLIC(__NR_ptrace)
#define __NR_syslog                  SYMBOLIC(__NR_syslog)
#define __NR_getuid                  SYMBOLIC(__NR_getuid)
#define __NR_getgid                  SYMBOLIC(__NR_getgid)
#define __NR_getppid                 SYMBOLIC(__NR_getppid)
#define __NR_getpgrp                 SYMBOLIC(__NR_getpgrp)
#define __NR_setsid                  SYMBOLIC(__NR_setsid)
#define __NR_getsid                  SYMBOLIC(__NR_getsid)
#define __NR_getpgid                 SYMBOLIC(__NR_getpgid)
#define __NR_setpgid                 SYMBOLIC(__NR_setpgid)
#define __NR_geteuid                 SYMBOLIC(__NR_geteuid)
#define __NR_getegid                 SYMBOLIC(__NR_getegid)
#define __NR_getgroups               SYMBOLIC(__NR_getgroups)
#define __NR_setgroups               SYMBOLIC(__NR_setgroups)
#define __NR_setreuid                SYMBOLIC(__NR_setreuid)
#define __NR_setregid                SYMBOLIC(__NR_setregid)
#define __NR_setuid                  SYMBOLIC(__NR_setuid)
#define __NR_setgid                  SYMBOLIC(__NR_setgid)
#define __NR_setresuid               SYMBOLIC(__NR_setresuid)
#define __NR_setresgid               SYMBOLIC(__NR_setresgid)
#define __NR_getresuid               SYMBOLIC(__NR_getresuid)
#define __NR_getresgid               SYMBOLIC(__NR_getresgid)
#define __NR_sigpending              SYMBOLIC(__NR_sigpending)
#define __NR_sigsuspend              SYMBOLIC(__NR_sigsuspend)
#define __NR_sigaltstack             SYMBOLIC(__NR_sigaltstack)
#define __NR_mknod                   SYMBOLIC(__NR_mknod)
#define __NR_mknodat                 SYMBOLIC(__NR_mknodat)
#define __NR_mkfifo                  SYMBOLIC(__NR_mkfifo)
#define __NR_mkfifoat                SYMBOLIC(__NR_mkfifoat)
#define __NR_statfs                  SYMBOLIC(__NR_statfs)
#define __NR_fstatfs                 SYMBOLIC(__NR_fstatfs)
#define __NR_getpriority             SYMBOLIC(__NR_getpriority)
#define __NR_setpriority             SYMBOLIC(__NR_setpriority)
#define __NR_mlock                   SYMBOLIC(__NR_mlock)
#define __NR_munlock                 SYMBOLIC(__NR_munlock)
#define __NR_mlockall                SYMBOLIC(__NR_mlockall)
#define __NR_munlockall              SYMBOLIC(__NR_munlockall)
#define __NR_setrlimit               SYMBOLIC(__NR_setrlimit)
#define __NR_chroot                  SYMBOLIC(__NR_chroot)
#define __NR_sync                    SYMBOLIC(__NR_sync)
#define __NR_acct                    SYMBOLIC(__NR_acct)
#define __NR_settimeofday            SYMBOLIC(__NR_settimeofday)
#define __NR_mount                   SYMBOLIC(__NR_mount)
#define __NR_reboot                  SYMBOLIC(__NR_reboot)
#define __NR_quotactl                SYMBOLIC(__NR_quotactl)
#define __NR_setfsuid                SYMBOLIC(__NR_setfsuid)
#define __NR_setfsgid                SYMBOLIC(__NR_setfsgid)
#define __NR_capget                  SYMBOLIC(__NR_capget)
#define __NR_capset                  SYMBOLIC(__NR_capset)
#define __NR_sigtimedwait            SYMBOLIC(__NR_sigtimedwait)
#define __NR_rt_sigqueueinfo         SYMBOLIC(__NR_rt_sigqueueinfo)
#define __NR_personality             SYMBOLIC(__NR_personality)
#define __NR_ustat                   SYMBOLIC(__NR_ustat)
#define __NR_sysfs                   SYMBOLIC(__NR_sysfs)
#define __NR_sched_setparam          SYMBOLIC(__NR_sched_setparam)
#define __NR_sched_getparam          SYMBOLIC(__NR_sched_getparam)
#define __NR_sched_setscheduler      SYMBOLIC(__NR_sched_setscheduler)
#define __NR_sched_getscheduler      SYMBOLIC(__NR_sched_getscheduler)
#define __NR_sched_get_priority_max  SYMBOLIC(__NR_sched_get_priority_max)
#define __NR_sched_get_priority_min  SYMBOLIC(__NR_sched_get_priority_min)
#define __NR_sched_rr_get_interval   SYMBOLIC(__NR_sched_rr_get_interval)
#define __NR_vhangup                 SYMBOLIC(__NR_vhangup)
#define __NR_modify_ldt              SYMBOLIC(__NR_modify_ldt)
#define __NR_pivot_root              SYMBOLIC(__NR_pivot_root)
#define __NR__sysctl                 SYMBOLIC(__NR__sysctl)
#define __NR_prctl                   SYMBOLIC(__NR_prctl)
#define __NR_arch_prctl              SYMBOLIC(__NR_arch_prctl)
#define __NR_adjtimex                SYMBOLIC(__NR_adjtimex)
#define __NR_umount2                 SYMBOLIC(__NR_umount2)
#define __NR_swapon                  SYMBOLIC(__NR_swapon)
#define __NR_swapoff                 SYMBOLIC(__NR_swapoff)
#define __NR_sethostname             SYMBOLIC(__NR_sethostname)
#define __NR_setdomainname           SYMBOLIC(__NR_setdomainname)
#define __NR_iopl                    SYMBOLIC(__NR_iopl)
#define __NR_ioperm                  SYMBOLIC(__NR_ioperm)
#define __NR_init_module             SYMBOLIC(__NR_init_module)
#define __NR_delete_module           SYMBOLIC(__NR_delete_module)
#define __NR_gettid                  SYMBOLIC(__NR_gettid)
#define __NR_readahead               SYMBOLIC(__NR_readahead)
#define __NR_setxattr                SYMBOLIC(__NR_setxattr)
#define __NR_fsetxattr               SYMBOLIC(__NR_fsetxattr)
#define __NR_getxattr                SYMBOLIC(__NR_getxattr)
#define __NR_fgetxattr               SYMBOLIC(__NR_fgetxattr)
#define __NR_listxattr               SYMBOLIC(__NR_listxattr)
#define __NR_flistxattr              SYMBOLIC(__NR_flistxattr)
#define __NR_removexattr             SYMBOLIC(__NR_removexattr)
#define __NR_fremovexattr            SYMBOLIC(__NR_fremovexattr)
#define __NR_lsetxattr               SYMBOLIC(__NR_lsetxattr)
#define __NR_lgetxattr               SYMBOLIC(__NR_lgetxattr)
#define __NR_llistxattr              SYMBOLIC(__NR_llistxattr)
#define __NR_lremovexattr            SYMBOLIC(__NR_lremovexattr)
#define __NR_sched_setaffinity       SYMBOLIC(__NR_sched_setaffinity)
#define __NR_sched_getaffinity       SYMBOLIC(__NR_sched_getaffinity)
#define __NR_cpuset_getaffinity      SYMBOLIC(__NR_cpuset_getaffinity)
#define __NR_cpuset_setaffinity      SYMBOLIC(__NR_cpuset_setaffinity)
#define __NR_io_setup                SYMBOLIC(__NR_io_setup)
#define __NR_io_destroy              SYMBOLIC(__NR_io_destroy)
#define __NR_io_getevents            SYMBOLIC(__NR_io_getevents)
#define __NR_io_submit               SYMBOLIC(__NR_io_submit)
#define __NR_io_cancel               SYMBOLIC(__NR_io_cancel)
#define __NR_lookup_dcookie          SYMBOLIC(__NR_lookup_dcookie)
#define __NR_epoll_create            SYMBOLIC(__NR_epoll_create)
#define __NR_epoll_wait              SYMBOLIC(__NR_epoll_wait)
#define __NR_epoll_ctl               SYMBOLIC(__NR_epoll_ctl)
#define __NR_getdents                SYMBOLIC(__NR_getdents)
#define __NR_set_tid_address         SYMBOLIC(__NR_set_tid_address)
#define __NR_restart_syscall         SYMBOLIC(__NR_restart_syscall)
#define __NR_semtimedop              SYMBOLIC(__NR_semtimedop)
#define __NR_fadvise                 SYMBOLIC(__NR_fadvise)
#define __NR_timer_create            SYMBOLIC(__NR_timer_create)
#define __NR_timer_settime           SYMBOLIC(__NR_timer_settime)
#define __NR_timer_gettime           SYMBOLIC(__NR_timer_gettime)
#define __NR_timer_getoverrun        SYMBOLIC(__NR_timer_getoverrun)
#define __NR_timer_delete            SYMBOLIC(__NR_timer_delete)
#define __NR_clock_settime           SYMBOLIC(__NR_clock_settime)
#define __NR_clock_gettime           SYMBOLIC(__NR_clock_gettime)
#define __NR_clock_getres            SYMBOLIC(__NR_clock_getres)
#define __NR_clock_nanosleep         SYMBOLIC(__NR_clock_nanosleep)
#define __NR_tgkill                  SYMBOLIC(__NR_tgkill)
#define __NR_mbind                   SYMBOLIC(__NR_mbind)
#define __NR_set_mempolicy           SYMBOLIC(__NR_set_mempolicy)
#define __NR_get_mempolicy           SYMBOLIC(__NR_get_mempolicy)
#define __NR_mq_open                 SYMBOLIC(__NR_mq_open)
#define __NR_mq_unlink               SYMBOLIC(__NR_mq_unlink)
#define __NR_mq_timedsend            SYMBOLIC(__NR_mq_timedsend)
#define __NR_mq_timedreceive         SYMBOLIC(__NR_mq_timedreceive)
#define __NR_mq_notify               SYMBOLIC(__NR_mq_notify)
#define __NR_mq_getsetattr           SYMBOLIC(__NR_mq_getsetattr)
#define __NR_kexec_load              SYMBOLIC(__NR_kexec_load)
#define __NR_waitid                  SYMBOLIC(__NR_waitid)
#define __NR_add_key                 SYMBOLIC(__NR_add_key)
#define __NR_request_key             SYMBOLIC(__NR_request_key)
#define __NR_keyctl                  SYMBOLIC(__NR_keyctl)
#define __NR_ioprio_set              SYMBOLIC(__NR_ioprio_set)
#define __NR_ioprio_get              SYMBOLIC(__NR_ioprio_get)
#define __NR_inotify_init            SYMBOLIC(__NR_inotify_init)
#define __NR_inotify_add_watch       SYMBOLIC(__NR_inotify_add_watch)
#define __NR_inotify_rm_watch        SYMBOLIC(__NR_inotify_rm_watch)
#define __NR_openat                  SYMBOLIC(__NR_openat)
#define __NR_mkdirat                 SYMBOLIC(__NR_mkdirat)
#define __NR_fchownat                SYMBOLIC(__NR_fchownat)
#define __NR_utime                   SYMBOLIC(__NR_utime)
#define __NR_utimes                  SYMBOLIC(__NR_utimes)
#define __NR_futimesat               SYMBOLIC(__NR_futimesat)
#define __NR_futimes                 SYMBOLIC(__NR_futimes)
#define __NR_futimens                SYMBOLIC(__NR_futimens)
#define __NR_fstatat                 SYMBOLIC(__NR_fstatat)
#define __NR_unlinkat                SYMBOLIC(__NR_unlinkat)
#define __NR_renameat                SYMBOLIC(__NR_renameat)
#define __NR_linkat                  SYMBOLIC(__NR_linkat)
#define __NR_symlinkat               SYMBOLIC(__NR_symlinkat)
#define __NR_readlinkat              SYMBOLIC(__NR_readlinkat)
#define __NR_fchmodat                SYMBOLIC(__NR_fchmodat)
#define __NR_faccessat               SYMBOLIC(__NR_faccessat)
#define __NR_unshare                 SYMBOLIC(__NR_unshare)
#define __NR_splice                  SYMBOLIC(__NR_splice)
#define __NR_tee                     SYMBOLIC(__NR_tee)
#define __NR_sync_file_range         SYMBOLIC(__NR_sync_file_range)
#define __NR_vmsplice                SYMBOLIC(__NR_vmsplice)
#define __NR_migrate_pages           SYMBOLIC(__NR_migrate_pages)
#define __NR_move_pages              SYMBOLIC(__NR_move_pages)
#define __NR_preadv                  SYMBOLIC(__NR_preadv)
#define __NR_pwritev                 SYMBOLIC(__NR_pwritev)
#define __NR_utimensat               SYMBOLIC(__NR_utimensat)
#define __NR_fallocate               SYMBOLIC(__NR_fallocate)
#define __NR_posix_fallocate         SYMBOLIC(__NR_posix_fallocate)
#define __NR_accept4                 SYMBOLIC(__NR_accept4)
#define __NR_dup3                    SYMBOLIC(__NR_dup3)
#define __NR_pipe2                   SYMBOLIC(__NR_pipe2)
#define __NR_epoll_pwait             SYMBOLIC(__NR_epoll_pwait)
#define __NR_epoll_create1           SYMBOLIC(__NR_epoll_create1)
#define __NR_perf_event_open         SYMBOLIC(__NR_perf_event_open)
#define __NR_inotify_init1           SYMBOLIC(__NR_inotify_init1)
#define __NR_rt_tgsigqueueinfo       SYMBOLIC(__NR_rt_tgsigqueueinfo)
#define __NR_signalfd                SYMBOLIC(__NR_signalfd)
#define __NR_signalfd4               SYMBOLIC(__NR_signalfd4)
#define __NR_eventfd                 SYMBOLIC(__NR_eventfd)
#define __NR_eventfd2                SYMBOLIC(__NR_eventfd2)
#define __NR_timerfd_create          SYMBOLIC(__NR_timerfd_create)
#define __NR_timerfd_settime         SYMBOLIC(__NR_timerfd_settime)
#define __NR_timerfd_gettime         SYMBOLIC(__NR_timerfd_gettime)
#define __NR_recvmmsg                SYMBOLIC(__NR_recvmmsg)
#define __NR_fanotify_init           SYMBOLIC(__NR_fanotify_init)
#define __NR_fanotify_mark           SYMBOLIC(__NR_fanotify_mark)
#define __NR_prlimit                 SYMBOLIC(__NR_prlimit)
#define __NR_name_to_handle_at       SYMBOLIC(__NR_name_to_handle_at)
#define __NR_open_by_handle_at       SYMBOLIC(__NR_open_by_handle_at)
#define __NR_clock_adjtime           SYMBOLIC(__NR_clock_adjtime)
#define __NR_syncfs                  SYMBOLIC(__NR_syncfs)
#define __NR_sendmmsg                SYMBOLIC(__NR_sendmmsg)
#define __NR_setns                   SYMBOLIC(__NR_setns)
#define __NR_getcpu                  SYMBOLIC(__NR_getcpu)
#define __NR_process_vm_readv        SYMBOLIC(__NR_process_vm_readv)
#define __NR_process_vm_writev       SYMBOLIC(__NR_process_vm_writev)
#define __NR_kcmp                    SYMBOLIC(__NR_kcmp)
#define __NR_finit_module            SYMBOLIC(__NR_finit_module)
#define __NR_sched_setattr           SYMBOLIC(__NR_sched_setattr)
#define __NR_sched_getattr           SYMBOLIC(__NR_sched_getattr)
#define __NR_renameat2               SYMBOLIC(__NR_renameat2)
#define __NR_seccomp                 SYMBOLIC(__NR_seccomp)
#define __NR_getrandom               SYMBOLIC(__NR_getrandom)
#define __NR_memfd_create            SYMBOLIC(__NR_memfd_create)
#define __NR_kexec_file_load         SYMBOLIC(__NR_kexec_file_load)
#define __NR_bpf                     SYMBOLIC(__NR_bpf)
#define __NR_execveat                SYMBOLIC(__NR_execveat)
#define __NR_userfaultfd             SYMBOLIC(__NR_userfaultfd)
#define __NR_membarrier              SYMBOLIC(__NR_membarrier)
#define __NR_mlock2                  SYMBOLIC(__NR_mlock2)
#define __NR_copy_file_range         SYMBOLIC(__NR_copy_file_range)
#define __NR_preadv2                 SYMBOLIC(__NR_preadv2)
#define __NR_pwritev2                SYMBOLIC(__NR_pwritev2)
#define __NR_pkey_mprotect           SYMBOLIC(__NR_pkey_mprotect)
#define __NR_pkey_alloc              SYMBOLIC(__NR_pkey_alloc)
#define __NR_pkey_free               SYMBOLIC(__NR_pkey_free)
#define __NR_statx                   SYMBOLIC(__NR_statx)
#define __NR_io_pgetevents           SYMBOLIC(__NR_io_pgetevents)
#define __NR_rseq                    SYMBOLIC(__NR_rseq)
#define __NR_pidfd_send_signal       SYMBOLIC(__NR_pidfd_send_signal)
#define __NR_io_uring_setup          SYMBOLIC(__NR_io_uring_setup)
#define __NR_io_uring_enter          SYMBOLIC(__NR_io_uring_enter)
#define __NR_io_uring_register       SYMBOLIC(__NR_io_uring_register)
#define __NR_pledge                  SYMBOLIC(__NR_pledge)
#define __NR_msyscall                SYMBOLIC(__NR_msyscall)
#define __NR_ktrace                  SYMBOLIC(__NR_ktrace)
#define __NR_kqueue                  SYMBOLIC(__NR_kqueue)
#define __NR_kevent                  SYMBOLIC(__NR_kevent)
#define __NR_revoke                  SYMBOLIC(__NR_revoke)
#define __NR_setlogin                SYMBOLIC(__NR_setlogin)
#define __NR_getfh                   SYMBOLIC(__NR_getfh)
#define __NR_chflags                 SYMBOLIC(__NR_chflags)
#define __NR_getfsstat               SYMBOLIC(__NR_getfsstat)
#define __NR_nfssvc                  SYMBOLIC(__NR_nfssvc)
#define __NR_adjtime                 SYMBOLIC(__NR_adjtime)
#define __NR_fchflags                SYMBOLIC(__NR_fchflags)
#define __NR_seteuid                 SYMBOLIC(__NR_seteuid)
#define __NR_setegid                 SYMBOLIC(__NR_setegid)
#define __NR_fpathconf               SYMBOLIC(__NR_fpathconf)
#define __NR_fhopen                  SYMBOLIC(__NR_fhopen)
#define __NR_unmount                 SYMBOLIC(__NR_unmount)
#define __NR_issetugid               SYMBOLIC(__NR_issetugid)
#define __NR_minherit                SYMBOLIC(__NR_minherit)
#define __NR_pathconf                SYMBOLIC(__NR_pathconf)
#define __NR_sysctl                  SYMBOLIC(__NR_sysctl)
#define __NR_ntp_adjtime             SYMBOLIC(__NR_ntp_adjtime)
#define __NR_ntp_gettime             SYMBOLIC(__NR_ntp_gettime)
#define __NR_shm_unlink              SYMBOLIC(__NR_shm_unlink)
#define __NR_shm_open                SYMBOLIC(__NR_shm_open)
#define __NR_aio_read                SYMBOLIC(__NR_aio_read)
#define __NR_aio_suspend             SYMBOLIC(__NR_aio_suspend)
#define __NR_aio_cancel              SYMBOLIC(__NR_aio_cancel)
#define __NR_aio_fsync               SYMBOLIC(__NR_aio_fsync)
#define __NR_aio_error               SYMBOLIC(__NR_aio_error)
#define __NR_aio_return              SYMBOLIC(__NR_aio_return)
#define __NR_aio_write               SYMBOLIC(__NR_aio_write)
#define __NR_aio_waitcomplete        SYMBOLIC(__NR_aio_waitcomplete)
#define __NR_aio_suspend_nocancel    SYMBOLIC(__NR_aio_suspend_nocancel)
#define __NR_aio_mlock               SYMBOLIC(__NR_aio_mlock)
#define __NR_sigwait                 SYMBOLIC(__NR_sigwait)
#define __NR_undelete                SYMBOLIC(__NR_undelete)
#define __NR_getlogin                SYMBOLIC(__NR_getlogin)
#define __NR_getdtablesize           SYMBOLIC(__NR_getdtablesize)
#define __NR_setauid                 SYMBOLIC(__NR_setauid)
#define __NR_audit                   SYMBOLIC(__NR_audit)
#define __NR_auditctl                SYMBOLIC(__NR_auditctl)
#define __NR_getaudit_addr           SYMBOLIC(__NR_getaudit_addr)
#define __NR_getdirentries           SYMBOLIC(__NR_getdirentries)
#define __NR_lio_listio              SYMBOLIC(__NR_lio_listio)
#define __NR_setaudit_addr           SYMBOLIC(__NR_setaudit_addr)
#define __NR_getauid                 SYMBOLIC(__NR_getauid)
#define __NR_semsys                  SYMBOLIC(__NR_semsys)
#define __NR_auditon                 SYMBOLIC(__NR_auditon)
#define __NR_msgsys                  SYMBOLIC(__NR_msgsys)
#define __NR_shmsys                  SYMBOLIC(__NR_shmsys)
#define __NR_fhstat                  SYMBOLIC(__NR_fhstat)
#define __NR_chflagsat               SYMBOLIC(__NR_chflagsat)
#define __NR_profil                  SYMBOLIC(__NR_profil)
#define __NR_fhstatfs                SYMBOLIC(__NR_fhstatfs)
#define __NR_utrace                  SYMBOLIC(__NR_utrace)
#define __NR_closefrom               SYMBOLIC(__NR_closefrom)
#define __NR_pthread_markcancel      SYMBOLIC(__NR_pthread_markcancel)
#define __NR_pthread_kill            SYMBOLIC(__NR_pthread_kill)
#define __NR_pthread_fchdir          SYMBOLIC(__NR_pthread_fchdir)
#define __NR_pthread_sigmask         SYMBOLIC(__NR_pthread_sigmask)
#define __NR_pthread_chdir           SYMBOLIC(__NR_pthread_chdir)
#define __NR_pthread_canceled        SYMBOLIC(__NR_pthread_canceled)
#define __NR_disable_threadsignal    SYMBOLIC(__NR_disable_threadsignal)
#define __NR_abort_with_payload      SYMBOLIC(__NR_abort_with_payload)
#define __NR_accept_nocancel         SYMBOLIC(__NR_accept_nocancel)
#define __NR_access_extended         SYMBOLIC(__NR_access_extended)
#define __NR_audit_session_join      SYMBOLIC(__NR_audit_session_join)
#define __NR_audit_session_port      SYMBOLIC(__NR_audit_session_port)
#define __NR_audit_session_self      SYMBOLIC(__NR_audit_session_self)
#define __NR_bsdthread_create        SYMBOLIC(__NR_bsdthread_create)
#define __NR_bsdthread_ctl           SYMBOLIC(__NR_bsdthread_ctl)
#define __NR_bsdthread_register      SYMBOLIC(__NR_bsdthread_register)
#define __NR_bsdthread_terminate     SYMBOLIC(__NR_bsdthread_terminate)
#define __NR_change_fdguard_np       SYMBOLIC(__NR_change_fdguard_np)
#define __NR_chmod_extended          SYMBOLIC(__NR_chmod_extended)
#define __NR_clonefileat             SYMBOLIC(__NR_clonefileat)
#define __NR_close_nocancel          SYMBOLIC(__NR_close_nocancel)
#define __NR_coalition               SYMBOLIC(__NR_coalition)
#define __NR_coalition_info          SYMBOLIC(__NR_coalition_info)
#define __NR_connect_nocancel        SYMBOLIC(__NR_connect_nocancel)
#define __NR_connectx                SYMBOLIC(__NR_connectx)
#define __NR_copyfile                SYMBOLIC(__NR_copyfile)
#define __NR_csops                   SYMBOLIC(__NR_csops)
#define __NR_csops_audittoken        SYMBOLIC(__NR_csops_audittoken)
#define __NR_csrctl                  SYMBOLIC(__NR_csrctl)
#define __NR_delete                  SYMBOLIC(__NR_delete)
#define __NR_disconnectx             SYMBOLIC(__NR_disconnectx)
#define __NR_exchangedata            SYMBOLIC(__NR_exchangedata)
#define __NR_fchmod_extended         SYMBOLIC(__NR_fchmod_extended)
#define __NR_fclonefileat            SYMBOLIC(__NR_fclonefileat)
#define __NR_fcntl_nocancel          SYMBOLIC(__NR_fcntl_nocancel)
#define __NR_ffsctl                  SYMBOLIC(__NR_ffsctl)
#define __NR_fgetattrlist            SYMBOLIC(__NR_fgetattrlist)
#define __NR_fileport_makefd         SYMBOLIC(__NR_fileport_makefd)
#define __NR_fileport_makeport       SYMBOLIC(__NR_fileport_makeport)
#define __NR_fmount                  SYMBOLIC(__NR_fmount)
#define __NR_fs_snapshot             SYMBOLIC(__NR_fs_snapshot)
#define __NR_fsctl                   SYMBOLIC(__NR_fsctl)
#define __NR_fsetattrlist            SYMBOLIC(__NR_fsetattrlist)
#define __NR_fstat_extended          SYMBOLIC(__NR_fstat_extended)
#define __NR_fsync_nocancel          SYMBOLIC(__NR_fsync_nocancel)
#define __NR_getattrlist             SYMBOLIC(__NR_getattrlist)
#define __NR_getattrlistat           SYMBOLIC(__NR_getattrlistat)
#define __NR_getattrlistbulk         SYMBOLIC(__NR_getattrlistbulk)
#define __NR_getdirentriesattr       SYMBOLIC(__NR_getdirentriesattr)
#define __NR_gethostuuid             SYMBOLIC(__NR_gethostuuid)
#define __NR_getsgroups              SYMBOLIC(__NR_getsgroups)
#define __NR_getwgroups              SYMBOLIC(__NR_getwgroups)
#define __NR_grab_pgo_data           SYMBOLIC(__NR_grab_pgo_data)
#define __NR_guarded_close_np        SYMBOLIC(__NR_guarded_close_np)
#define __NR_guarded_kqueue_np       SYMBOLIC(__NR_guarded_kqueue_np)
#define __NR_guarded_open_np         SYMBOLIC(__NR_guarded_open_np)
#define __NR_guarded_pwrite_np       SYMBOLIC(__NR_guarded_pwrite_np)
#define __NR_guarded_write_np        SYMBOLIC(__NR_guarded_write_np)
#define __NR_guarded_writev_np       SYMBOLIC(__NR_guarded_writev_np)
#define __NR_identitysvc             SYMBOLIC(__NR_identitysvc)
#define __NR_initgroups              SYMBOLIC(__NR_initgroups)
#define __NR_iopolicysys             SYMBOLIC(__NR_iopolicysys)
#define __NR_kas_info                SYMBOLIC(__NR_kas_info)
#define __NR_kdebug_trace            SYMBOLIC(__NR_kdebug_trace)
#define __NR_kdebug_trace_string     SYMBOLIC(__NR_kdebug_trace_string)
#define __NR_kdebug_typefilter       SYMBOLIC(__NR_kdebug_typefilter)
#define __NR_kevent_id               SYMBOLIC(__NR_kevent_id)
#define __NR_kevent_qos              SYMBOLIC(__NR_kevent_qos)
#define __NR_ledger                  SYMBOLIC(__NR_ledger)
#define __NR_lstat_extended          SYMBOLIC(__NR_lstat_extended)
#define __NR_memorystatus_control    SYMBOLIC(__NR_memorystatus_control)
#define __NR_memorystatus_get_level  SYMBOLIC(__NR_memorystatus_get_level)
#define __NR_microstackshot          SYMBOLIC(__NR_microstackshot)
#define __NR_mkdir_extended          SYMBOLIC(__NR_mkdir_extended)
#define __NR_mkfifo_extended         SYMBOLIC(__NR_mkfifo_extended)
#define __NR_modwatch                SYMBOLIC(__NR_modwatch)
#define __NR_mremap_encrypted        SYMBOLIC(__NR_mremap_encrypted)
#define __NR_msgrcv_nocancel         SYMBOLIC(__NR_msgrcv_nocancel)
#define __NR_msgsnd_nocancel         SYMBOLIC(__NR_msgsnd_nocancel)
#define __NR_msync_nocancel          SYMBOLIC(__NR_msync_nocancel)
#define __NR_necp_client_action      SYMBOLIC(__NR_necp_client_action)
#define __NR_necp_match_policy       SYMBOLIC(__NR_necp_match_policy)
#define __NR_necp_open               SYMBOLIC(__NR_necp_open)
#define __NR_necp_session_action     SYMBOLIC(__NR_necp_session_action)
#define __NR_necp_session_open       SYMBOLIC(__NR_necp_session_open)
#define __NR_net_qos_guideline       SYMBOLIC(__NR_net_qos_guideline)
#define __NR_netagent_trigger        SYMBOLIC(__NR_netagent_trigger)
#define __NR_nfsclnt                 SYMBOLIC(__NR_nfsclnt)
#define __NR_open_dprotected_np      SYMBOLIC(__NR_open_dprotected_np)
#define __NR_open_extended           SYMBOLIC(__NR_open_extended)
#define __NR_open_nocancel           SYMBOLIC(__NR_open_nocancel)
#define __NR_openat_nocancel         SYMBOLIC(__NR_openat_nocancel)
#define __NR_openbyid_np             SYMBOLIC(__NR_openbyid_np)
#define __NR_os_fault_with_payload   SYMBOLIC(__NR_os_fault_with_payload)
#define __NR_peeloff                 SYMBOLIC(__NR_peeloff)
#define __NR_persona                 SYMBOLIC(__NR_persona)
#define __NR_pid_hibernate           SYMBOLIC(__NR_pid_hibernate)
#define __NR_pid_resume              SYMBOLIC(__NR_pid_resume)
#define __NR_pid_shutdown_sockets    SYMBOLIC(__NR_pid_shutdown_sockets)
#define __NR_pid_suspend             SYMBOLIC(__NR_pid_suspend)
#define __NR_poll_nocancel           SYMBOLIC(__NR_poll_nocancel)
#define __NR_pread_nocancel          SYMBOLIC(__NR_pread_nocancel)
#define __NR_proc_info               SYMBOLIC(__NR_proc_info)
#define __NR_proc_rlimit_control     SYMBOLIC(__NR_proc_rlimit_control)
#define __NR_proc_trace_log          SYMBOLIC(__NR_proc_trace_log)
#define __NR_proc_uuid_policy        SYMBOLIC(__NR_proc_uuid_policy)
#define __NR_process_policy          SYMBOLIC(__NR_process_policy)
#define __NR_pselect_nocancel        SYMBOLIC(__NR_pselect_nocancel)
#define __NR_psynch_cvbroad          SYMBOLIC(__NR_psynch_cvbroad)
#define __NR_psynch_cvclrprepost     SYMBOLIC(__NR_psynch_cvclrprepost)
#define __NR_psynch_cvsignal         SYMBOLIC(__NR_psynch_cvsignal)
#define __NR_psynch_mutexdrop        SYMBOLIC(__NR_psynch_mutexdrop)
#define __NR_psynch_mutexwait        SYMBOLIC(__NR_psynch_mutexwait)
#define __NR_psynch_rw_downgrade     SYMBOLIC(__NR_psynch_rw_downgrade)
#define __NR_psynch_rw_longrdlock    SYMBOLIC(__NR_psynch_rw_longrdlock)
#define __NR_psynch_rw_rdlock        SYMBOLIC(__NR_psynch_rw_rdlock)
#define __NR_psynch_rw_unlock        SYMBOLIC(__NR_psynch_rw_unlock)
#define __NR_psynch_rw_unlock2       SYMBOLIC(__NR_psynch_rw_unlock2)
#define __NR_psynch_rw_upgrade       SYMBOLIC(__NR_psynch_rw_upgrade)
#define __NR_psynch_rw_wrlock        SYMBOLIC(__NR_psynch_rw_wrlock)
#define __NR_psynch_rw_yieldwrlock   SYMBOLIC(__NR_psynch_rw_yieldwrlock)
#define __NR_pwrite_nocancel         SYMBOLIC(__NR_pwrite_nocancel)
#define __NR_read_nocancel           SYMBOLIC(__NR_read_nocancel)
#define __NR_readv_nocancel          SYMBOLIC(__NR_readv_nocancel)
#define __NR_recvfrom_nocancel       SYMBOLIC(__NR_recvfrom_nocancel)
#define __NR_recvmsg_nocancel        SYMBOLIC(__NR_recvmsg_nocancel)
#define __NR_recvmsg_x               SYMBOLIC(__NR_recvmsg_x)
#define __NR_renameatx_np            SYMBOLIC(__NR_renameatx_np)
#define __NR_searchfs                SYMBOLIC(__NR_searchfs)
#define __NR_select_nocancel         SYMBOLIC(__NR_select_nocancel)
#define __NR_sem_close               SYMBOLIC(__NR_sem_close)
#define __NR_sem_open                SYMBOLIC(__NR_sem_open)
#define __NR_sem_post                SYMBOLIC(__NR_sem_post)
#define __NR_sem_trywait             SYMBOLIC(__NR_sem_trywait)
#define __NR_sem_unlink              SYMBOLIC(__NR_sem_unlink)
#define __NR_sem_wait                SYMBOLIC(__NR_sem_wait)
#define __NR_sem_wait_nocancel       SYMBOLIC(__NR_sem_wait_nocancel)
#define __NR_sendmsg_nocancel        SYMBOLIC(__NR_sendmsg_nocancel)
#define __NR_sendmsg_x               SYMBOLIC(__NR_sendmsg_x)
#define __NR_sendto_nocancel         SYMBOLIC(__NR_sendto_nocancel)
#define __NR_setattrlist             SYMBOLIC(__NR_setattrlist)
#define __NR_setattrlistat           SYMBOLIC(__NR_setattrlistat)
#define __NR_setprivexec             SYMBOLIC(__NR_setprivexec)
#define __NR_setsgroups              SYMBOLIC(__NR_setsgroups)
#define __NR_settid                  SYMBOLIC(__NR_settid)
#define __NR_settid_with_pid         SYMBOLIC(__NR_settid_with_pid)
#define __NR_setwgroups              SYMBOLIC(__NR_setwgroups)
#define __NR_sfi_ctl                 SYMBOLIC(__NR_sfi_ctl)
#define __NR_sfi_pidctl              SYMBOLIC(__NR_sfi_pidctl)
#define __NR_shared_region_check_np  SYMBOLIC(__NR_shared_region_check_np)
#define __NR_sigsuspend_nocancel     SYMBOLIC(__NR_sigsuspend_nocancel)
#define __NR_socket_delegate         SYMBOLIC(__NR_socket_delegate)
#define __NR_stat_extended           SYMBOLIC(__NR_stat_extended)
#define __NR_sysctlbyname            SYMBOLIC(__NR_sysctlbyname)
#define __NR_system_override         SYMBOLIC(__NR_system_override)
#define __NR_telemetry               SYMBOLIC(__NR_telemetry)
#define __NR_terminate_with_payload  SYMBOLIC(__NR_terminate_with_payload)
#define __NR_thread_selfcounts       SYMBOLIC(__NR_thread_selfcounts)
#define __NR_thread_selfid           SYMBOLIC(__NR_thread_selfid)
#define __NR_thread_selfusage        SYMBOLIC(__NR_thread_selfusage)
#define __NR_ulock_wait              SYMBOLIC(__NR_ulock_wait)
#define __NR_ulock_wake              SYMBOLIC(__NR_ulock_wake)
#define __NR_umask_extended          SYMBOLIC(__NR_umask_extended)
#define __NR_usrctl                  SYMBOLIC(__NR_usrctl)
#define __NR_vfs_purge               SYMBOLIC(__NR_vfs_purge)
#define __NR_vm_pressure_monitor     SYMBOLIC(__NR_vm_pressure_monitor)
#define __NR_wait4_nocancel          SYMBOLIC(__NR_wait4_nocancel)
#define __NR_waitevent               SYMBOLIC(__NR_waitevent)
#define __NR_waitid_nocancel         SYMBOLIC(__NR_waitid_nocancel)
#define __NR_watchevent              SYMBOLIC(__NR_watchevent)
#define __NR_work_interval_ctl       SYMBOLIC(__NR_work_interval_ctl)
#define __NR_workq_kernreturn        SYMBOLIC(__NR_workq_kernreturn)
#define __NR_workq_open              SYMBOLIC(__NR_workq_open)
#define __NR_write_nocancel          SYMBOLIC(__NR_write_nocancel)
#define __NR_writev_nocancel         SYMBOLIC(__NR_writev_nocancel)
#define __NR_abort2                  SYMBOLIC(__NR_abort2)
#define __NR_afs3_syscall            SYMBOLIC(__NR_afs3_syscall)
#define __NR_bindat                  SYMBOLIC(__NR_bindat)
#define __NR_break                   SYMBOLIC(__NR_break)
#define __NR_cap_enter               SYMBOLIC(__NR_cap_enter)
#define __NR_cap_fcntls_get          SYMBOLIC(__NR_cap_fcntls_get)
#define __NR_cap_fcntls_limit        SYMBOLIC(__NR_cap_fcntls_limit)
#define __NR_cap_getmode             SYMBOLIC(__NR_cap_getmode)
#define __NR_cap_ioctls_get          SYMBOLIC(__NR_cap_ioctls_get)
#define __NR_cap_ioctls_limit        SYMBOLIC(__NR_cap_ioctls_limit)
#define __NR_cap_rights_limit        SYMBOLIC(__NR_cap_rights_limit)
#define __NR_clock_getcpuclockid2    SYMBOLIC(__NR_clock_getcpuclockid2)
#define __NR_connectat               SYMBOLIC(__NR_connectat)
#define __NR_cpuset                  SYMBOLIC(__NR_cpuset)
#define __NR_cpuset_getdomain        SYMBOLIC(__NR_cpuset_getdomain)
#define __NR_cpuset_getid            SYMBOLIC(__NR_cpuset_getid)
#define __NR_cpuset_setdomain        SYMBOLIC(__NR_cpuset_setdomain)
#define __NR_cpuset_setid            SYMBOLIC(__NR_cpuset_setid)
#define __NR_eaccess                 SYMBOLIC(__NR_eaccess)
#define __NR_extattr_delete_fd       SYMBOLIC(__NR_extattr_delete_fd)
#define __NR_extattr_delete_file     SYMBOLIC(__NR_extattr_delete_file)
#define __NR_extattr_delete_link     SYMBOLIC(__NR_extattr_delete_link)
#define __NR_extattr_get_fd          SYMBOLIC(__NR_extattr_get_fd)
#define __NR_extattr_get_file        SYMBOLIC(__NR_extattr_get_file)
#define __NR_extattr_get_link        SYMBOLIC(__NR_extattr_get_link)
#define __NR_extattr_list_fd         SYMBOLIC(__NR_extattr_list_fd)
#define __NR_extattr_list_file       SYMBOLIC(__NR_extattr_list_file)
#define __NR_extattr_list_link       SYMBOLIC(__NR_extattr_list_link)
#define __NR_extattr_set_fd          SYMBOLIC(__NR_extattr_set_fd)
#define __NR_extattr_set_file        SYMBOLIC(__NR_extattr_set_file)
#define __NR_extattr_set_link        SYMBOLIC(__NR_extattr_set_link)
#define __NR_extattrctl              SYMBOLIC(__NR_extattrctl)
#define __NR_fexecve                 SYMBOLIC(__NR_fexecve)
#define __NR_ffclock_getcounter      SYMBOLIC(__NR_ffclock_getcounter)
#define __NR_ffclock_getestimate     SYMBOLIC(__NR_ffclock_getestimate)
#define __NR_ffclock_setestimate     SYMBOLIC(__NR_ffclock_setestimate)
#define __NR_fhlink                  SYMBOLIC(__NR_fhlink)
#define __NR_fhlinkat                SYMBOLIC(__NR_fhlinkat)
#define __NR_fhreadlink              SYMBOLIC(__NR_fhreadlink)
#define __NR_getaudit                SYMBOLIC(__NR_getaudit)
#define __NR_getcontext              SYMBOLIC(__NR_getcontext)
#define __NR_getfhat                 SYMBOLIC(__NR_getfhat)
#define __NR_gethostid               SYMBOLIC(__NR_gethostid)
#define __NR_getkerninfo             SYMBOLIC(__NR_getkerninfo)
#define __NR_getloginclass           SYMBOLIC(__NR_getloginclass)
#define __NR_getpagesize             SYMBOLIC(__NR_getpagesize)
#define __NR_gssd_syscall            SYMBOLIC(__NR_gssd_syscall)
#define __NR_jail                    SYMBOLIC(__NR_jail)
#define __NR_jail_attach             SYMBOLIC(__NR_jail_attach)
#define __NR_jail_get                SYMBOLIC(__NR_jail_get)
#define __NR_jail_remove             SYMBOLIC(__NR_jail_remove)
#define __NR_jail_set                SYMBOLIC(__NR_jail_set)
#define __NR_kenv                    SYMBOLIC(__NR_kenv)
#define __NR_kldfind                 SYMBOLIC(__NR_kldfind)
#define __NR_kldfirstmod             SYMBOLIC(__NR_kldfirstmod)
#define __NR_kldload                 SYMBOLIC(__NR_kldload)
#define __NR_kldnext                 SYMBOLIC(__NR_kldnext)
#define __NR_kldstat                 SYMBOLIC(__NR_kldstat)
#define __NR_kldsym                  SYMBOLIC(__NR_kldsym)
#define __NR_kldunload               SYMBOLIC(__NR_kldunload)
#define __NR_kldunloadf              SYMBOLIC(__NR_kldunloadf)
#define __NR_kmq_notify              SYMBOLIC(__NR_kmq_notify)
#define __NR_kmq_setattr             SYMBOLIC(__NR_kmq_setattr)
#define __NR_kmq_timedreceive        SYMBOLIC(__NR_kmq_timedreceive)
#define __NR_kmq_timedsend           SYMBOLIC(__NR_kmq_timedsend)
#define __NR_kmq_unlink              SYMBOLIC(__NR_kmq_unlink)
#define __NR_ksem_close              SYMBOLIC(__NR_ksem_close)
#define __NR_ksem_destroy            SYMBOLIC(__NR_ksem_destroy)
#define __NR_ksem_getvalue           SYMBOLIC(__NR_ksem_getvalue)
#define __NR_ksem_init               SYMBOLIC(__NR_ksem_init)
#define __NR_ksem_open               SYMBOLIC(__NR_ksem_open)
#define __NR_ksem_post               SYMBOLIC(__NR_ksem_post)
#define __NR_ksem_timedwait          SYMBOLIC(__NR_ksem_timedwait)
#define __NR_ksem_trywait            SYMBOLIC(__NR_ksem_trywait)
#define __NR_ksem_unlink             SYMBOLIC(__NR_ksem_unlink)
#define __NR_ksem_wait               SYMBOLIC(__NR_ksem_wait)
#define __NR_ktimer_create           SYMBOLIC(__NR_ktimer_create)
#define __NR_ktimer_delete           SYMBOLIC(__NR_ktimer_delete)
#define __NR_ktimer_getoverrun       SYMBOLIC(__NR_ktimer_getoverrun)
#define __NR_ktimer_gettime          SYMBOLIC(__NR_ktimer_gettime)
#define __NR_ktimer_settime          SYMBOLIC(__NR_ktimer_settime)
#define __NR_lchflags                SYMBOLIC(__NR_lchflags)
#define __NR_lchmod                  SYMBOLIC(__NR_lchmod)
#define __NR_lgetfh                  SYMBOLIC(__NR_lgetfh)
#define __NR_lpathconf               SYMBOLIC(__NR_lpathconf)
#define __NR_lutimes                 SYMBOLIC(__NR_lutimes)
#define __NR_mac_syscall             SYMBOLIC(__NR_mac_syscall)
#define __NR_modfind                 SYMBOLIC(__NR_modfind)
#define __NR_modfnext                SYMBOLIC(__NR_modfnext)
#define __NR_modnext                 SYMBOLIC(__NR_modnext)
#define __NR_modstat                 SYMBOLIC(__NR_modstat)
#define __NR_nfstat                  SYMBOLIC(__NR_nfstat)
#define __NR_nlm_syscall             SYMBOLIC(__NR_nlm_syscall)
#define __NR_nlstat                  SYMBOLIC(__NR_nlstat)
#define __NR_nmount                  SYMBOLIC(__NR_nmount)
#define __NR_nnpfs_syscall           SYMBOLIC(__NR_nnpfs_syscall)
#define __NR_nstat                   SYMBOLIC(__NR_nstat)
#define __NR_pdfork                  SYMBOLIC(__NR_pdfork)
#define __NR_pdgetpid                SYMBOLIC(__NR_pdgetpid)
#define __NR_pdkill                  SYMBOLIC(__NR_pdkill)
#define __NR_posix_openpt            SYMBOLIC(__NR_posix_openpt)
#define __NR_procctl                 SYMBOLIC(__NR_procctl)
#define __NR_psynch_cvwait           SYMBOLIC(__NR_psynch_cvwait)
#define __NR_quota                   SYMBOLIC(__NR_quota)
#define __NR_rctl_add_rule           SYMBOLIC(__NR_rctl_add_rule)
#define __NR_rctl_get_limits         SYMBOLIC(__NR_rctl_get_limits)
#define __NR_rctl_get_racct          SYMBOLIC(__NR_rctl_get_racct)
#define __NR_rctl_get_rules          SYMBOLIC(__NR_rctl_get_rules)
#define __NR_rctl_remove_rule        SYMBOLIC(__NR_rctl_remove_rule)
#define __NR_recv                    SYMBOLIC(__NR_recv)
#define __NR_rfork                   SYMBOLIC(__NR_rfork)
#define __NR_rtprio                  SYMBOLIC(__NR_rtprio)
#define __NR_rtprio_thread           SYMBOLIC(__NR_rtprio_thread)
#define __NR_send                    SYMBOLIC(__NR_send)
#define __NR_setaudit                SYMBOLIC(__NR_setaudit)
#define __NR_setcontext              SYMBOLIC(__NR_setcontext)
#define __NR_setfib                  SYMBOLIC(__NR_setfib)
#define __NR_sethostid               SYMBOLIC(__NR_sethostid)
#define __NR_setloginclass           SYMBOLIC(__NR_setloginclass)
#define __NR_sigblock                SYMBOLIC(__NR_sigblock)
#define __NR_sigqueue                SYMBOLIC(__NR_sigqueue)
#define __NR_sigsetmask              SYMBOLIC(__NR_sigsetmask)
#define __NR_sigstack                SYMBOLIC(__NR_sigstack)
#define __NR_sigvec                  SYMBOLIC(__NR_sigvec)
#define __NR_sigwaitinfo             SYMBOLIC(__NR_sigwaitinfo)
#define __NR_sstk                    SYMBOLIC(__NR_sstk)
#define __NR_swapcontext             SYMBOLIC(__NR_swapcontext)
#define __NR_thr_create              SYMBOLIC(__NR_thr_create)
#define __NR_thr_exit                SYMBOLIC(__NR_thr_exit)
#define __NR_thr_kill                SYMBOLIC(__NR_thr_kill)
#define __NR_thr_kill2               SYMBOLIC(__NR_thr_kill2)
#define __NR_thr_new                 SYMBOLIC(__NR_thr_new)
#define __NR_thr_self                SYMBOLIC(__NR_thr_self)
#define __NR_thr_set_name            SYMBOLIC(__NR_thr_set_name)
#define __NR_thr_suspend             SYMBOLIC(__NR_thr_suspend)
#define __NR_thr_wake                SYMBOLIC(__NR_thr_wake)
#define __NR_uuidgen                 SYMBOLIC(__NR_uuidgen)
#define __NR_vadvise                 SYMBOLIC(__NR_vadvise)
#define __NR_wait                    SYMBOLIC(__NR_wait)
#define __NR_wait6                   SYMBOLIC(__NR_wait6)
#define __NR_yield                   SYMBOLIC(__NR_yield)
#define __NR_tfork                   SYMBOLIC(__NR_tfork)
#define __NR_thrsleep                SYMBOLIC(__NR_thrsleep)
#define __NR_thrwakeup               SYMBOLIC(__NR_thrwakeup)
#define __NR_threxit                 SYMBOLIC(__NR_threxit)
#define __NR_thrsigdivert            SYMBOLIC(__NR_thrsigdivert)
#define __NR_set_tcb                 SYMBOLIC(__NR_set_tcb)
#define __NR_get_tcb                 SYMBOLIC(__NR_get_tcb)
#define __NR_adjfreq                 SYMBOLIC(__NR_adjfreq)
#define __NR_getdtablecount          SYMBOLIC(__NR_getdtablecount)
#define __NR_getlogin_r              SYMBOLIC(__NR_getlogin_r)
#define __NR_getrtable               SYMBOLIC(__NR_getrtable)
#define __NR_getthrid                SYMBOLIC(__NR_getthrid)
#define __NR_kbind                   SYMBOLIC(__NR_kbind)
#define __NR_mquery                  SYMBOLIC(__NR_mquery)
#define __NR_obreak                  SYMBOLIC(__NR_obreak)
#define __NR_sendsyslog              SYMBOLIC(__NR_sendsyslog)
#define __NR_setrtable               SYMBOLIC(__NR_setrtable)
#define __NR_swapctl                 SYMBOLIC(__NR_swapctl)
#define __NR_thrkill                 SYMBOLIC(__NR_thrkill)
#define __NR_unveil                  SYMBOLIC(__NR_unveil)
#define __NR_mac_get_link            SYMBOLIC(__NR_mac_get_link)
#define __NR_mac_set_link            SYMBOLIC(__NR_mac_set_link)
#define __NR_mac_get_fd              SYMBOLIC(__NR_mac_get_fd)
#define __NR_mac_get_file            SYMBOLIC(__NR_mac_get_file)
#define __NR_mac_get_proc            SYMBOLIC(__NR_mac_get_proc)
#define __NR_mac_set_fd              SYMBOLIC(__NR_mac_set_fd)
#define __NR_mac_get_pid             SYMBOLIC(__NR_mac_get_pid)
#define __NR_mac_set_proc            SYMBOLIC(__NR_mac_set_proc)
#define __NR_mac_set_file            SYMBOLIC(__NR_mac_set_file)
#define __NR_mac_execve              SYMBOLIC(__NR_mac_execve)
#define __NR_acl_get_link            SYMBOLIC(__NR_acl_get_link)
#define __NR_sigwait_nocancel        SYMBOLIC(__NR_sigwait_nocancel)
#define __NR_cap_rights_get          SYMBOLIC(__NR_cap_rights_get)
#define __NR_semwait_signal          SYMBOLIC(__NR_semwait_signal)
#define __NR_acl_set_link            SYMBOLIC(__NR_acl_set_link)
#define __NR_acl_set_fd              SYMBOLIC(__NR_acl_set_fd)
#define __NR_old_semwait_signal      SYMBOLIC(__NR_old_semwait_signal)
#define __NR_setugid                 SYMBOLIC(__NR_setugid)
#define __NR_acl_aclcheck_fd         SYMBOLIC(__NR_acl_aclcheck_fd)
#define __NR_acl_get_fd              SYMBOLIC(__NR_acl_get_fd)
#define __NR___sysctl                SYMBOLIC(__NR___sysctl)
#define __NR_mac_getfsstat           SYMBOLIC(__NR_mac_getfsstat)
#define __NR_mac_get_mount           SYMBOLIC(__NR_mac_get_mount)
#define __NR_acl_delete_link         SYMBOLIC(__NR_acl_delete_link)
#define __NR_mac_mount               SYMBOLIC(__NR_mac_mount)
#define __NR_acl_get_file            SYMBOLIC(__NR_acl_get_file)
#define __NR_acl_aclcheck_file       SYMBOLIC(__NR_acl_aclcheck_file)
#define __NR_acl_delete_fd           SYMBOLIC(__NR_acl_delete_fd)
#define __NR_acl_aclcheck_link       SYMBOLIC(__NR_acl_aclcheck_link)
#define __NR___mac_syscall           SYMBOLIC(__NR___mac_syscall)
#define __NR_acl_set_file            SYMBOLIC(__NR_acl_set_file)
#define __NR_acl_delete_file         SYMBOLIC(__NR_acl_delete_file)
#define __NR_syscall                 SYMBOLIC(__NR_syscall)
#define __NR__umtx_op                SYMBOLIC(__NR__umtx_op)
#define __NR_semwait_signal_nocancel SYMBOLIC(__NR_semwait_signal_nocancel)
#define __NR_old_semwait_signal_nocancel \
  SYMBOLIC(__NR_old_semwait_signal_nocancel)
#define __NR_sctp_peeloff             SYMBOLIC(__NR_sctp_peeloff)
#define __NR_sctp_generic_recvmsg     SYMBOLIC(__NR_sctp_generic_recvmsg)
#define __NR_sctp_generic_sendmsg     SYMBOLIC(__NR_sctp_generic_sendmsg)
#define __NR_sctp_generic_sendmsg_iov SYMBOLIC(__NR_sctp_generic_sendmsg_iov)
#define __NR_shared_region_map_and_slide_np \
  SYMBOLIC(__NR_shared_region_map_and_slide_np)
#define __NR_guarded_open_dprotected_np \
  SYMBOLIC(__NR_guarded_open_dprotected_np)
#define __NR_stack_snapshot_with_config \
  SYMBOLIC(__NR_stack_snapshot_with_config)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long __NR_exit;
extern const long __NR_exit_group;
extern const long __NR_read;
extern const long __NR_write;
extern const long __NR_open;
extern const long __NR_close;
extern const long __NR_stat;
extern const long __NR_fstat;
extern const long __NR_lstat;
extern const long __NR_poll;
extern const long __NR_ppoll;
extern const long __NR_lseek;
extern const long __NR_mmap;
extern const long __NR_msync;
extern const long __NR_mprotect;
extern const long __NR_munmap;
extern const long __NR_sigaction;
extern const long __NR_sigprocmask;
extern const long __NR_ioctl;
extern const long __NR_pread;
extern const long __NR_pwrite;
extern const long __NR_readv;
extern const long __NR_writev;
extern const long __NR_access;
extern const long __NR_pipe;
extern const long __NR_select;
extern const long __NR_pselect;
extern const long __NR_pselect6;
extern const long __NR_sched_yield;
extern const long __NR_mremap;
extern const long __NR_mincore;
extern const long __NR_madvise;
extern const long __NR_shmget;
extern const long __NR_shmat;
extern const long __NR_shmctl;
extern const long __NR_dup;
extern const long __NR_dup2;
extern const long __NR_pause;
extern const long __NR_nanosleep;
extern const long __NR_getitimer;
extern const long __NR_setitimer;
extern const long __NR_alarm;
extern const long __NR_getpid;
extern const long __NR_sendfile;
extern const long __NR_socket;
extern const long __NR_connect;
extern const long __NR_accept;
extern const long __NR_sendto;
extern const long __NR_recvfrom;
extern const long __NR_sendmsg;
extern const long __NR_recvmsg;
extern const long __NR_shutdown;
extern const long __NR_bind;
extern const long __NR_listen;
extern const long __NR_getsockname;
extern const long __NR_getpeername;
extern const long __NR_socketpair;
extern const long __NR_setsockopt;
extern const long __NR_getsockopt;
extern const long __NR_fork;
extern const long __NR_vfork;
extern const long __NR_posix_spawn;
extern const long __NR_execve;
extern const long __NR_wait4;
extern const long __NR_kill;
extern const long __NR_killpg;
extern const long __NR_clone;
extern const long __NR_tkill;
extern const long __NR_futex;
extern const long __NR_set_robust_list;
extern const long __NR_get_robust_list;
extern const long __NR_uname;
extern const long __NR_semget;
extern const long __NR_semop;
extern const long __NR_semctl;
extern const long __NR_shmdt;
extern const long __NR_msgget;
extern const long __NR_msgsnd;
extern const long __NR_msgrcv;
extern const long __NR_msgctl;
extern const long __NR_fcntl;
extern const long __NR_flock;
extern const long __NR_fsync;
extern const long __NR_fdatasync;
extern const long __NR_truncate;
extern const long __NR_ftruncate;
extern const long __NR_getcwd;
extern const long __NR_chdir;
extern const long __NR_fchdir;
extern const long __NR_rename;
extern const long __NR_mkdir;
extern const long __NR_rmdir;
extern const long __NR_creat;
extern const long __NR_link;
extern const long __NR_unlink;
extern const long __NR_symlink;
extern const long __NR_readlink;
extern const long __NR_chmod;
extern const long __NR_fchmod;
extern const long __NR_chown;
extern const long __NR_fchown;
extern const long __NR_lchown;
extern const long __NR_umask;
extern const long __NR_gettimeofday;
extern const long __NR_getrlimit;
extern const long __NR_getrusage;
extern const long __NR_sysinfo;
extern const long __NR_times;
extern const long __NR_ptrace;
extern const long __NR_syslog;
extern const long __NR_getuid;
extern const long __NR_getgid;
extern const long __NR_getppid;
extern const long __NR_getpgrp;
extern const long __NR_setsid;
extern const long __NR_getsid;
extern const long __NR_getpgid;
extern const long __NR_setpgid;
extern const long __NR_geteuid;
extern const long __NR_getegid;
extern const long __NR_getgroups;
extern const long __NR_setgroups;
extern const long __NR_setreuid;
extern const long __NR_setregid;
extern const long __NR_setuid;
extern const long __NR_setgid;
extern const long __NR_setresuid;
extern const long __NR_setresgid;
extern const long __NR_getresuid;
extern const long __NR_getresgid;
extern const long __NR_sigpending;
extern const long __NR_sigsuspend;
extern const long __NR_sigaltstack;
extern const long __NR_mknod;
extern const long __NR_mknodat;
extern const long __NR_mkfifo;
extern const long __NR_mkfifoat;
extern const long __NR_statfs;
extern const long __NR_fstatfs;
extern const long __NR_getpriority;
extern const long __NR_setpriority;
extern const long __NR_mlock;
extern const long __NR_munlock;
extern const long __NR_mlockall;
extern const long __NR_munlockall;
extern const long __NR_setrlimit;
extern const long __NR_chroot;
extern const long __NR_sync;
extern const long __NR_acct;
extern const long __NR_settimeofday;
extern const long __NR_mount;
extern const long __NR_reboot;
extern const long __NR_quotactl;
extern const long __NR_setfsuid;
extern const long __NR_setfsgid;
extern const long __NR_capget;
extern const long __NR_capset;
extern const long __NR_sigtimedwait;
extern const long __NR_rt_sigqueueinfo;
extern const long __NR_personality;
extern const long __NR_ustat;
extern const long __NR_sysfs;
extern const long __NR_sched_setparam;
extern const long __NR_sched_getparam;
extern const long __NR_sched_setscheduler;
extern const long __NR_sched_getscheduler;
extern const long __NR_sched_get_priority_max;
extern const long __NR_sched_get_priority_min;
extern const long __NR_sched_rr_get_interval;
extern const long __NR_vhangup;
extern const long __NR_modify_ldt;
extern const long __NR_pivot_root;
extern const long __NR__sysctl;
extern const long __NR_prctl;
extern const long __NR_arch_prctl;
extern const long __NR_adjtimex;
extern const long __NR_umount2;
extern const long __NR_swapon;
extern const long __NR_swapoff;
extern const long __NR_sethostname;
extern const long __NR_setdomainname;
extern const long __NR_iopl;
extern const long __NR_ioperm;
extern const long __NR_init_module;
extern const long __NR_delete_module;
extern const long __NR_gettid;
extern const long __NR_readahead;
extern const long __NR_setxattr;
extern const long __NR_fsetxattr;
extern const long __NR_getxattr;
extern const long __NR_fgetxattr;
extern const long __NR_listxattr;
extern const long __NR_flistxattr;
extern const long __NR_removexattr;
extern const long __NR_fremovexattr;
extern const long __NR_lsetxattr;
extern const long __NR_lgetxattr;
extern const long __NR_llistxattr;
extern const long __NR_lremovexattr;
extern const long __NR_sched_setaffinity;
extern const long __NR_sched_getaffinity;
extern const long __NR_cpuset_getaffinity;
extern const long __NR_cpuset_setaffinity;
extern const long __NR_io_setup;
extern const long __NR_io_destroy;
extern const long __NR_io_getevents;
extern const long __NR_io_submit;
extern const long __NR_io_cancel;
extern const long __NR_lookup_dcookie;
extern const long __NR_epoll_create;
extern const long __NR_epoll_wait;
extern const long __NR_epoll_ctl;
extern const long __NR_getdents;
extern const long __NR_set_tid_address;
extern const long __NR_restart_syscall;
extern const long __NR_semtimedop;
extern const long __NR_fadvise;
extern const long __NR_timer_create;
extern const long __NR_timer_settime;
extern const long __NR_timer_gettime;
extern const long __NR_timer_getoverrun;
extern const long __NR_timer_delete;
extern const long __NR_clock_settime;
extern const long __NR_clock_gettime;
extern const long __NR_clock_getres;
extern const long __NR_clock_nanosleep;
extern const long __NR_tgkill;
extern const long __NR_mbind;
extern const long __NR_set_mempolicy;
extern const long __NR_get_mempolicy;
extern const long __NR_mq_open;
extern const long __NR_mq_unlink;
extern const long __NR_mq_timedsend;
extern const long __NR_mq_timedreceive;
extern const long __NR_mq_notify;
extern const long __NR_mq_getsetattr;
extern const long __NR_kexec_load;
extern const long __NR_waitid;
extern const long __NR_add_key;
extern const long __NR_request_key;
extern const long __NR_keyctl;
extern const long __NR_ioprio_set;
extern const long __NR_ioprio_get;
extern const long __NR_inotify_init;
extern const long __NR_inotify_add_watch;
extern const long __NR_inotify_rm_watch;
extern const long __NR_openat;
extern const long __NR_mkdirat;
extern const long __NR_fchownat;
extern const long __NR_utime;
extern const long __NR_utimes;
extern const long __NR_futimesat;
extern const long __NR_futimes;
extern const long __NR_futimens;
extern const long __NR_fstatat;
extern const long __NR_unlinkat;
extern const long __NR_renameat;
extern const long __NR_linkat;
extern const long __NR_symlinkat;
extern const long __NR_readlinkat;
extern const long __NR_fchmodat;
extern const long __NR_faccessat;
extern const long __NR_unshare;
extern const long __NR_splice;
extern const long __NR_tee;
extern const long __NR_sync_file_range;
extern const long __NR_vmsplice;
extern const long __NR_migrate_pages;
extern const long __NR_move_pages;
extern const long __NR_preadv;
extern const long __NR_pwritev;
extern const long __NR_utimensat;
extern const long __NR_fallocate;
extern const long __NR_posix_fallocate;
extern const long __NR_accept4;
extern const long __NR_dup3;
extern const long __NR_pipe2;
extern const long __NR_epoll_pwait;
extern const long __NR_epoll_create1;
extern const long __NR_perf_event_open;
extern const long __NR_inotify_init1;
extern const long __NR_rt_tgsigqueueinfo;
extern const long __NR_signalfd;
extern const long __NR_signalfd4;
extern const long __NR_eventfd;
extern const long __NR_eventfd2;
extern const long __NR_timerfd_create;
extern const long __NR_timerfd_settime;
extern const long __NR_timerfd_gettime;
extern const long __NR_recvmmsg;
extern const long __NR_fanotify_init;
extern const long __NR_fanotify_mark;
extern const long __NR_prlimit;
extern const long __NR_name_to_handle_at;
extern const long __NR_open_by_handle_at;
extern const long __NR_clock_adjtime;
extern const long __NR_syncfs;
extern const long __NR_sendmmsg;
extern const long __NR_setns;
extern const long __NR_getcpu;
extern const long __NR_process_vm_readv;
extern const long __NR_process_vm_writev;
extern const long __NR_kcmp;
extern const long __NR_finit_module;
extern const long __NR_sched_setattr;
extern const long __NR_sched_getattr;
extern const long __NR_renameat2;
extern const long __NR_seccomp;
extern const long __NR_getrandom;
extern const long __NR_memfd_create;
extern const long __NR_kexec_file_load;
extern const long __NR_bpf;
extern const long __NR_execveat;
extern const long __NR_userfaultfd;
extern const long __NR_membarrier;
extern const long __NR_mlock2;
extern const long __NR_copy_file_range;
extern const long __NR_preadv2;
extern const long __NR_pwritev2;
extern const long __NR_pkey_mprotect;
extern const long __NR_pkey_alloc;
extern const long __NR_pkey_free;
extern const long __NR_statx;
extern const long __NR_io_pgetevents;
extern const long __NR_rseq;
extern const long __NR_pidfd_send_signal;
extern const long __NR_io_uring_setup;
extern const long __NR_io_uring_enter;
extern const long __NR_io_uring_register;
extern const long __NR_pledge;
extern const long __NR_msyscall;
extern const long __NR_ktrace;
extern const long __NR_kqueue;
extern const long __NR_kevent;
extern const long __NR_revoke;
extern const long __NR_setlogin;
extern const long __NR_getfh;
extern const long __NR_chflags;
extern const long __NR_getfsstat;
extern const long __NR_nfssvc;
extern const long __NR_adjtime;
extern const long __NR_fchflags;
extern const long __NR_seteuid;
extern const long __NR_setegid;
extern const long __NR_fpathconf;
extern const long __NR_fhopen;
extern const long __NR_unmount;
extern const long __NR_issetugid;
extern const long __NR_minherit;
extern const long __NR_pathconf;
extern const long __NR_sysctl;
extern const long __NR_ntp_adjtime;
extern const long __NR_ntp_gettime;
extern const long __NR_shm_unlink;
extern const long __NR_shm_open;
extern const long __NR_aio_read;
extern const long __NR_aio_suspend;
extern const long __NR_aio_cancel;
extern const long __NR_aio_fsync;
extern const long __NR_aio_error;
extern const long __NR_aio_return;
extern const long __NR_aio_write;
extern const long __NR_aio_waitcomplete;
extern const long __NR_aio_suspend_nocancel;
extern const long __NR_aio_mlock;
extern const long __NR_sigwait;
extern const long __NR_undelete;
extern const long __NR_getlogin;
extern const long __NR_getdtablesize;
extern const long __NR_setauid;
extern const long __NR_audit;
extern const long __NR_auditctl;
extern const long __NR_getaudit_addr;
extern const long __NR_getdirentries;
extern const long __NR_lio_listio;
extern const long __NR_setaudit_addr;
extern const long __NR_getauid;
extern const long __NR_semsys;
extern const long __NR_auditon;
extern const long __NR_msgsys;
extern const long __NR_shmsys;
extern const long __NR_fhstat;
extern const long __NR_chflagsat;
extern const long __NR_profil;
extern const long __NR_fhstatfs;
extern const long __NR_utrace;
extern const long __NR_closefrom;
extern const long __NR_pthread_markcancel;
extern const long __NR_pthread_kill;
extern const long __NR_pthread_fchdir;
extern const long __NR_pthread_sigmask;
extern const long __NR_pthread_chdir;
extern const long __NR_pthread_canceled;
extern const long __NR_disable_threadsignal;
extern const long __NR_abort_with_payload;
extern const long __NR_accept_nocancel;
extern const long __NR_access_extended;
extern const long __NR_audit_session_join;
extern const long __NR_audit_session_port;
extern const long __NR_audit_session_self;
extern const long __NR_bsdthread_create;
extern const long __NR_bsdthread_ctl;
extern const long __NR_bsdthread_register;
extern const long __NR_bsdthread_terminate;
extern const long __NR_change_fdguard_np;
extern const long __NR_chmod_extended;
extern const long __NR_clonefileat;
extern const long __NR_close_nocancel;
extern const long __NR_coalition;
extern const long __NR_coalition_info;
extern const long __NR_connect_nocancel;
extern const long __NR_connectx;
extern const long __NR_copyfile;
extern const long __NR_csops;
extern const long __NR_csops_audittoken;
extern const long __NR_csrctl;
extern const long __NR_delete;
extern const long __NR_disconnectx;
extern const long __NR_exchangedata;
extern const long __NR_fchmod_extended;
extern const long __NR_fclonefileat;
extern const long __NR_fcntl_nocancel;
extern const long __NR_ffsctl;
extern const long __NR_fgetattrlist;
extern const long __NR_fileport_makefd;
extern const long __NR_fileport_makeport;
extern const long __NR_fmount;
extern const long __NR_fs_snapshot;
extern const long __NR_fsctl;
extern const long __NR_fsetattrlist;
extern const long __NR_fstat_extended;
extern const long __NR_fsync_nocancel;
extern const long __NR_getattrlist;
extern const long __NR_getattrlistat;
extern const long __NR_getattrlistbulk;
extern const long __NR_getdirentriesattr;
extern const long __NR_gethostuuid;
extern const long __NR_getsgroups;
extern const long __NR_getwgroups;
extern const long __NR_grab_pgo_data;
extern const long __NR_guarded_close_np;
extern const long __NR_guarded_kqueue_np;
extern const long __NR_guarded_open_np;
extern const long __NR_guarded_pwrite_np;
extern const long __NR_guarded_write_np;
extern const long __NR_guarded_writev_np;
extern const long __NR_identitysvc;
extern const long __NR_initgroups;
extern const long __NR_iopolicysys;
extern const long __NR_kas_info;
extern const long __NR_kdebug_trace;
extern const long __NR_kdebug_trace_string;
extern const long __NR_kdebug_typefilter;
extern const long __NR_kevent_id;
extern const long __NR_kevent_qos;
extern const long __NR_ledger;
extern const long __NR_lstat_extended;
extern const long __NR_memorystatus_control;
extern const long __NR_memorystatus_get_level;
extern const long __NR_microstackshot;
extern const long __NR_mkdir_extended;
extern const long __NR_mkfifo_extended;
extern const long __NR_modwatch;
extern const long __NR_mremap_encrypted;
extern const long __NR_msgrcv_nocancel;
extern const long __NR_msgsnd_nocancel;
extern const long __NR_msync_nocancel;
extern const long __NR_necp_client_action;
extern const long __NR_necp_match_policy;
extern const long __NR_necp_open;
extern const long __NR_necp_session_action;
extern const long __NR_necp_session_open;
extern const long __NR_net_qos_guideline;
extern const long __NR_netagent_trigger;
extern const long __NR_nfsclnt;
extern const long __NR_open_dprotected_np;
extern const long __NR_open_extended;
extern const long __NR_open_nocancel;
extern const long __NR_openat_nocancel;
extern const long __NR_openbyid_np;
extern const long __NR_os_fault_with_payload;
extern const long __NR_peeloff;
extern const long __NR_persona;
extern const long __NR_pid_hibernate;
extern const long __NR_pid_resume;
extern const long __NR_pid_shutdown_sockets;
extern const long __NR_pid_suspend;
extern const long __NR_poll_nocancel;
extern const long __NR_pread_nocancel;
extern const long __NR_proc_info;
extern const long __NR_proc_rlimit_control;
extern const long __NR_proc_trace_log;
extern const long __NR_proc_uuid_policy;
extern const long __NR_process_policy;
extern const long __NR_pselect_nocancel;
extern const long __NR_psynch_cvbroad;
extern const long __NR_psynch_cvclrprepost;
extern const long __NR_psynch_cvsignal;
extern const long __NR_psynch_mutexdrop;
extern const long __NR_psynch_mutexwait;
extern const long __NR_psynch_rw_downgrade;
extern const long __NR_psynch_rw_longrdlock;
extern const long __NR_psynch_rw_rdlock;
extern const long __NR_psynch_rw_unlock;
extern const long __NR_psynch_rw_unlock2;
extern const long __NR_psynch_rw_upgrade;
extern const long __NR_psynch_rw_wrlock;
extern const long __NR_psynch_rw_yieldwrlock;
extern const long __NR_pwrite_nocancel;
extern const long __NR_read_nocancel;
extern const long __NR_readv_nocancel;
extern const long __NR_recvfrom_nocancel;
extern const long __NR_recvmsg_nocancel;
extern const long __NR_recvmsg_x;
extern const long __NR_renameatx_np;
extern const long __NR_searchfs;
extern const long __NR_select_nocancel;
extern const long __NR_sem_close;
extern const long __NR_sem_open;
extern const long __NR_sem_post;
extern const long __NR_sem_trywait;
extern const long __NR_sem_unlink;
extern const long __NR_sem_wait;
extern const long __NR_sem_wait_nocancel;
extern const long __NR_sendmsg_nocancel;
extern const long __NR_sendmsg_x;
extern const long __NR_sendto_nocancel;
extern const long __NR_setattrlist;
extern const long __NR_setattrlistat;
extern const long __NR_setprivexec;
extern const long __NR_setsgroups;
extern const long __NR_settid;
extern const long __NR_settid_with_pid;
extern const long __NR_setwgroups;
extern const long __NR_sfi_ctl;
extern const long __NR_sfi_pidctl;
extern const long __NR_shared_region_check_np;
extern const long __NR_sigsuspend_nocancel;
extern const long __NR_socket_delegate;
extern const long __NR_stat_extended;
extern const long __NR_sysctlbyname;
extern const long __NR_system_override;
extern const long __NR_telemetry;
extern const long __NR_terminate_with_payload;
extern const long __NR_thread_selfcounts;
extern const long __NR_thread_selfid;
extern const long __NR_thread_selfusage;
extern const long __NR_ulock_wait;
extern const long __NR_ulock_wake;
extern const long __NR_umask_extended;
extern const long __NR_usrctl;
extern const long __NR_vfs_purge;
extern const long __NR_vm_pressure_monitor;
extern const long __NR_wait4_nocancel;
extern const long __NR_waitevent;
extern const long __NR_waitid_nocancel;
extern const long __NR_watchevent;
extern const long __NR_work_interval_ctl;
extern const long __NR_workq_kernreturn;
extern const long __NR_workq_open;
extern const long __NR_write_nocancel;
extern const long __NR_writev_nocancel;
extern const long __NR_abort2;
extern const long __NR_afs3_syscall;
extern const long __NR_bindat;
extern const long __NR_break;
extern const long __NR_cap_enter;
extern const long __NR_cap_fcntls_get;
extern const long __NR_cap_fcntls_limit;
extern const long __NR_cap_getmode;
extern const long __NR_cap_ioctls_get;
extern const long __NR_cap_ioctls_limit;
extern const long __NR_cap_rights_limit;
extern const long __NR_clock_getcpuclockid2;
extern const long __NR_connectat;
extern const long __NR_cpuset;
extern const long __NR_cpuset_getdomain;
extern const long __NR_cpuset_getid;
extern const long __NR_cpuset_setdomain;
extern const long __NR_cpuset_setid;
extern const long __NR_eaccess;
extern const long __NR_extattr_delete_fd;
extern const long __NR_extattr_delete_file;
extern const long __NR_extattr_delete_link;
extern const long __NR_extattr_get_fd;
extern const long __NR_extattr_get_file;
extern const long __NR_extattr_get_link;
extern const long __NR_extattr_list_fd;
extern const long __NR_extattr_list_file;
extern const long __NR_extattr_list_link;
extern const long __NR_extattr_set_fd;
extern const long __NR_extattr_set_file;
extern const long __NR_extattr_set_link;
extern const long __NR_extattrctl;
extern const long __NR_fexecve;
extern const long __NR_ffclock_getcounter;
extern const long __NR_ffclock_getestimate;
extern const long __NR_ffclock_setestimate;
extern const long __NR_fhlink;
extern const long __NR_fhlinkat;
extern const long __NR_fhreadlink;
extern const long __NR_getaudit;
extern const long __NR_getcontext;
extern const long __NR_getfhat;
extern const long __NR_gethostid;
extern const long __NR_getkerninfo;
extern const long __NR_getloginclass;
extern const long __NR_getpagesize;
extern const long __NR_gssd_syscall;
extern const long __NR_jail;
extern const long __NR_jail_attach;
extern const long __NR_jail_get;
extern const long __NR_jail_remove;
extern const long __NR_jail_set;
extern const long __NR_kenv;
extern const long __NR_kldfind;
extern const long __NR_kldfirstmod;
extern const long __NR_kldload;
extern const long __NR_kldnext;
extern const long __NR_kldstat;
extern const long __NR_kldsym;
extern const long __NR_kldunload;
extern const long __NR_kldunloadf;
extern const long __NR_kmq_notify;
extern const long __NR_kmq_setattr;
extern const long __NR_kmq_timedreceive;
extern const long __NR_kmq_timedsend;
extern const long __NR_kmq_unlink;
extern const long __NR_ksem_close;
extern const long __NR_ksem_destroy;
extern const long __NR_ksem_getvalue;
extern const long __NR_ksem_init;
extern const long __NR_ksem_open;
extern const long __NR_ksem_post;
extern const long __NR_ksem_timedwait;
extern const long __NR_ksem_trywait;
extern const long __NR_ksem_unlink;
extern const long __NR_ksem_wait;
extern const long __NR_ktimer_create;
extern const long __NR_ktimer_delete;
extern const long __NR_ktimer_getoverrun;
extern const long __NR_ktimer_gettime;
extern const long __NR_ktimer_settime;
extern const long __NR_lchflags;
extern const long __NR_lchmod;
extern const long __NR_lgetfh;
extern const long __NR_lpathconf;
extern const long __NR_lutimes;
extern const long __NR_mac_syscall;
extern const long __NR_modfind;
extern const long __NR_modfnext;
extern const long __NR_modnext;
extern const long __NR_modstat;
extern const long __NR_nfstat;
extern const long __NR_nlm_syscall;
extern const long __NR_nlstat;
extern const long __NR_nmount;
extern const long __NR_nnpfs_syscall;
extern const long __NR_nstat;
extern const long __NR_pdfork;
extern const long __NR_pdgetpid;
extern const long __NR_pdkill;
extern const long __NR_posix_openpt;
extern const long __NR_procctl;
extern const long __NR_psynch_cvwait;
extern const long __NR_quota;
extern const long __NR_rctl_add_rule;
extern const long __NR_rctl_get_limits;
extern const long __NR_rctl_get_racct;
extern const long __NR_rctl_get_rules;
extern const long __NR_rctl_remove_rule;
extern const long __NR_recv;
extern const long __NR_rfork;
extern const long __NR_rtprio;
extern const long __NR_rtprio_thread;
extern const long __NR_send;
extern const long __NR_setaudit;
extern const long __NR_setcontext;
extern const long __NR_setfib;
extern const long __NR_sethostid;
extern const long __NR_setloginclass;
extern const long __NR_sigblock;
extern const long __NR_sigqueue;
extern const long __NR_sigsetmask;
extern const long __NR_sigstack;
extern const long __NR_sigvec;
extern const long __NR_sigwaitinfo;
extern const long __NR_sstk;
extern const long __NR_swapcontext;
extern const long __NR_thr_create;
extern const long __NR_thr_exit;
extern const long __NR_thr_kill;
extern const long __NR_thr_kill2;
extern const long __NR_thr_new;
extern const long __NR_thr_self;
extern const long __NR_thr_set_name;
extern const long __NR_thr_suspend;
extern const long __NR_thr_wake;
extern const long __NR_uuidgen;
extern const long __NR_vadvise;
extern const long __NR_wait;
extern const long __NR_wait6;
extern const long __NR_yield;
extern const long __NR_tfork;
extern const long __NR_thrsleep;
extern const long __NR_thrwakeup;
extern const long __NR_threxit;
extern const long __NR_thrsigdivert;
extern const long __NR_set_tcb;
extern const long __NR_get_tcb;
extern const long __NR_adjfreq;
extern const long __NR_getdtablecount;
extern const long __NR_getlogin_r;
extern const long __NR_getrtable;
extern const long __NR_getthrid;
extern const long __NR_kbind;
extern const long __NR_mquery;
extern const long __NR_obreak;
extern const long __NR_sendsyslog;
extern const long __NR_setrtable;
extern const long __NR_swapctl;
extern const long __NR_thrkill;
extern const long __NR_unveil;
extern const long __NR_mac_get_link;
extern const long __NR_mac_set_link;
extern const long __NR_mac_get_fd;
extern const long __NR_mac_get_file;
extern const long __NR_mac_get_proc;
extern const long __NR_mac_set_fd;
extern const long __NR_mac_get_pid;
extern const long __NR_mac_set_proc;
extern const long __NR_mac_set_file;
extern const long __NR_mac_execve;
extern const long __NR_acl_get_link;
extern const long __NR_sigwait_nocancel;
extern const long __NR_cap_rights_get;
extern const long __NR_semwait_signal;
extern const long __NR_acl_set_link;
extern const long __NR_acl_set_fd;
extern const long __NR_old_semwait_signal;
extern const long __NR_setugid;
extern const long __NR_acl_aclcheck_fd;
extern const long __NR_acl_get_fd;
extern const long __NR___sysctl;
extern const long __NR_mac_getfsstat;
extern const long __NR_mac_get_mount;
extern const long __NR_acl_delete_link;
extern const long __NR_mac_mount;
extern const long __NR_acl_get_file;
extern const long __NR_acl_aclcheck_file;
extern const long __NR_acl_delete_fd;
extern const long __NR_acl_aclcheck_link;
extern const long __NR___mac_syscall;
extern const long __NR_acl_set_file;
extern const long __NR_acl_delete_file;
extern const long __NR_syscall;
extern const long __NR__umtx_op;
extern const long __NR_semwait_signal_nocancel;
extern const long __NR_old_semwait_signal_nocancel;
extern const long __NR_sctp_peeloff;
extern const long __NR_sctp_generic_recvmsg;
extern const long __NR_sctp_generic_sendmsg;
extern const long __NR_sctp_generic_sendmsg_iov;
extern const long __NR_shared_region_map_and_slide_np;
extern const long __NR_guarded_open_dprotected_np;
extern const long __NR_stack_snapshot_with_config;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/w.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_W_H_

#define WNOHANG    SYMBOLIC(WNOHANG)
#define WUNTRACED  SYMBOLIC(WUNTRACED)
#define WCONTINUED SYMBOLIC(WCONTINUED)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long WNOHANG;
extern const long WUNTRACED;
extern const long WCONTINUED;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

/**
 * @fileoverview GDB Attach Support Code.
 *
 * The goal of these macros is to make the backtrace into the failing
 * code as short as possible. It also helps avoid GDB getting confused
 * about how we don't use its readability destroying unwind directives.
 */

extern volatile int g_gdbsync;

int gdbexec(const char *);
int attachdebugger(intptr_t);

#define attachdebugger(CONTINUE_TO_ADDR) /* shorten backtraces */ \
  SYNCHRONIZE_DEBUGGER((attachdebugger)(CONTINUE_TO_ADDR))

#define SYNCHRONIZE_DEBUGGER(PID)                                    \
  ({                                                                 \
    int Rc, Pid = (PID);                                             \
    if (Pid != -1) {                                                 \
      while ((Rc = __inline_wait4(Pid, NULL, WNOHANG, NULL)) == 0) { \
        if (g_gdbsync) {                                             \
          g_gdbsync = 0;                                             \
          if (Rc > 0) Pid = 0;                                       \
          break;                                                     \
        } else {                                                     \
          sched_yield();                                             \
        }                                                            \
      }                                                              \
    }                                                                \
    Pid;                                                             \
  })

#define __inline_wait4(PID, OPT_OUT_WSTATUS, OPTIONS, OPT_OUT_RUSAGE) \
  ({                                                                  \
    int64_t WaAx;                                                     \
    if (!IsWindows()) {                                               \
      asm volatile("mov\t%5,%%r10\n\t"                                \
                   "syscall"                                          \
                   : "=a"(WaAx)                                       \
                   : "0"(__NR_wait4), "D"(PID), "S"(OPT_OUT_WSTATUS), \
                     "d"(OPTIONS), "g"(OPT_OUT_RUSAGE)                \
                   : "rcx", "r10", "r11", "cc", "memory");            \
    } else {                                                          \
      WaAx = sys_wait4_nt(PID, OPT_OUT_WSTATUS, OPTIONS, OPT_OUT_RUSAGE); \
    }                                                                 \
    WaAx;                                                             \
  })

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/log/log.h */

#define COSMOPOLITAN_LIBC_LOG_LOG_H_
/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § liblog                                                    ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#define kLogFatal   0
#define kLogError   1
#define kLogWarn    2
#define kLogInfo    3
#define kLogVerbose 4
#define kLogDebug   5

/**
 * Log level for compile-time DCE.
 */
#ifndef LOGGABLELEVEL
#ifndef TINY
#define LOGGABLELEVEL kLogDebug
/* #elif IsTiny() */
/* #define LOGGABLELEVEL kLogInfo */
#else
#define LOGGABLELEVEL kLogVerbose
#endif
#endif

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern FILE *__log_file;

void perror(const char *) relegated;   /* print the last system error */
void __die(void) relegated wontreturn; /* print backtrace and abort() */
void meminfo(int);                     /* shows malloc statistics &c. */
void memsummary(int);                  /* light version of same thing */
uint16_t getttycols(uint16_t);
int getttysize(int, struct winsize *) paramsnonnull();
bool IsTerminalInarticulate(void) nosideeffect;
const char *commandvenv(const char *, const char *);
const char *GetAddr2linePath(void);
const char *GetGdbPath(void);

void showcrashreports(void);
void callexitontermination(struct sigset *);
bool32 IsDebuggerPresent(bool);
bool IsRunningUnderMake(void);

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § liblog » logging                                          ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/
#ifndef __STRICT_ANSI__

extern unsigned __log_level; /* log level for runtime check */

#define LOGGABLE(LEVEL)                                          \
  ((!__builtin_constant_p(LEVEL) || (LEVEL) <= LOGGABLELEVEL) && \
   (LEVEL) <= __log_level)

#define LOGF(FMT, ...)                                               \
  do {                                                               \
    if (LOGGABLE(kLogInfo)) {                                        \
      flogf(kLogInfo, __FILE__, __LINE__, NULL, FMT, ##__VA_ARGS__); \
    }                                                                \
  } while (0)

#define VFLOG(FMT, VA)                                     \
  do {                                                     \
    if (LOGGABLE(kLogInfo)) {                              \
      vflogf(kLogInfo, __FILE__, __LINE__, NULL, FMT, VA); \
    }                                                      \
  } while (0)

#define FLOGF(F, FMT, ...)                                        \
  do {                                                            \
    if (LOGGABLE(kLogInfo)) {                                     \
      flogf(kLogInfo, __FILE__, __LINE__, F, FMT, ##__VA_ARGS__); \
    }                                                             \
  } while (0)

#define VFLOGF(F, FMT, VA)                              \
  do {                                                  \
    if (LOGGABLE(kLogInfo)) {                           \
      vflogf(kLogInfo, __FILE__, __LINE__, F, FMT, VA); \
    }                                                   \
  } while (0)

#define WARNF(FMT, ...)                                              \
  do {                                                               \
    if (LOGGABLE(kLogWarn)) {                                        \
      flogf(kLogWarn, __FILE__, __LINE__, NULL, FMT, ##__VA_ARGS__); \
    }                                                                \
  } while (0)

#define VWARNF(FMT, VA)                                    \
  do {                                                     \
    if (LOGGABLE(kLogWarn)) {                              \
      vflogf(kLogWarn, __FILE__, __LINE__, NULL, FMT, VA); \
    }                                                      \
  } while (0)

#define FWARNF(F, FMT, ...)                                       \
  do {                                                            \
    if (LOGGABLE(kLogWarn)) {                                     \
      flogf(kLogWarn, __FILE__, __LINE__, F, FMT, ##__VA_ARGS__); \
    }                                                             \
  } while (0)

#define VFWARNF(F, FMT, VA)                             \
  do {                                                  \
    if (LOGGABLE(kLogWarn)) {                           \
      vflogf(kLogWarn, __FILE__, __LINE__, F, FMT, VA); \
    }                                                   \
  } while (0)

#define FATALF(FMT, ...)                                              \
  do {                                                                \
    ffatalf(kLogFatal, __FILE__, __LINE__, NULL, FMT, ##__VA_ARGS__); \
    unreachable;                                                      \
  } while (0)

#define VFATALF(FMT, VA)                                    \
  do {                                                      \
    vffatalf(kLogFatal, __FILE__, __LINE__, NULL, FMT, VA); \
    unreachable;                                            \
  } while (0)

#define FFATALF(F, FMT, ...)                                       \
  do {                                                             \
    ffatalf(kLogFatal, __FILE__, __LINE__, F, FMT, ##__VA_ARGS__); \
    unreachable;                                                   \
  } while (0)

#define VFFATALF(F, FMT, VA)                             \
  do {                                                   \
    vffatalf(kLogFatal, __FILE__, __LINE__, F, FMT, VA); \
    unreachable;                                         \
  } while (0)

#define DEBUGF(FMT, ...)                                                \
  do {                                                                  \
    if (LOGGABLE(kLogDebug)) {                                          \
      fdebugf(kLogDebug, __FILE__, __LINE__, NULL, FMT, ##__VA_ARGS__); \
    }                                                                   \
  } while (0)

#define VERBOSEF(FMT, ...)                                                  \
  do {                                                                      \
    if (LOGGABLE(kLogVerbose)) {                                            \
      fverbosef(kLogVerbose, __FILE__, __LINE__, NULL, FMT, ##__VA_ARGS__); \
    }                                                                       \
  } while (0)

#define VDEBUGF(FMT, VA)                                      \
  do {                                                        \
    if (LOGGABLE(kLogDebug)) {                                \
      vfdebugf(kLogDebug, __FILE__, __LINE__, NULL, FMT, VA); \
    }                                                         \
  } while (0)

#define FDEBUGF(F, FMT, ...)                                         \
  do {                                                               \
    if (LOGGABLE(kLogDebug)) {                                       \
      fdebugf(kLogDebug, __FILE__, __LINE__, F, FMT, ##__VA_ARGS__); \
    }                                                                \
  } while (0)

#define VFVERBOSEF(F, FMT, VA)                                 \
  do {                                                         \
    if (LOGGABLE(kLogVerbose)) {                               \
      vfverbosef(kLogVerbose, __FILE__, __LINE__, F, FMT, VA); \
    }                                                          \
  } while (0)

#define VFDEBUGF(F, FMT, VA)                               \
  do {                                                     \
    if (LOGGABLE(kLogDebug)) {                             \
      vfdebugf(kLogDebug, __FILE__, __LINE__, F, FMT, VA); \
    }                                                      \
  } while (0)

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § liblog » on error resume next                             ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#define LOGIFNEG1(FORM)                                 \
  ({                                                    \
    autotype(FORM) Ax = (FORM);                         \
    if (Ax == (typeof(Ax))(-1) && LOGGABLE(kLogWarn)) { \
      __logerrno(__FILE__, __LINE__, #FORM);            \
    }                                                   \
    Ax;                                                 \
  })

#define LOGIFNULL(FORM)                      \
  ({                                         \
    autotype(FORM) Ax = (FORM);              \
    if (Ax == NULL && LOGGABLE(kLogWarn)) {  \
      __logerrno(__FILE__, __LINE__, #FORM); \
    }                                        \
    Ax;                                      \
  })

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § liblog » implementation details                           ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

void __logerrno(const char *, int, const char *) relegated;

#define ARGS  unsigned, const char *, int, FILE *, const char *
#define ATTR  paramsnonnull((5)) printfesque(5)
#define ATTRV paramsnonnull((5, 6))
void flogf(ARGS, ...) ATTR libcesque;
void vflogf(ARGS, va_list) ATTRV libcesque;
void fverbosef(ARGS, ...) asm("flogf") ATTR relegated libcesque;
void vfverbosef(ARGS, va_list) asm("vflogf") ATTRV relegated libcesque;
void fdebugf(ARGS, ...) asm("flogf") ATTR relegated libcesque;
void vfdebugf(ARGS, va_list) asm("vflogf") ATTRV relegated libcesque;
void ffatalf(ARGS, ...) asm("flogf") ATTR relegated wontreturn libcesque;
void vffatalf(ARGS, va_list) asm("vflogf") ATTRV relegated wontreturn libcesque;
#undef ARGS
#undef ATTR
#undef ATTRV

#endif /* __STRICT_ANSI__ */
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/mem/alloca.h */

#define COSMOPOLITAN_LIBC_MEM_ALLOCA_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

#define alloca(size) __builtin_alloca(size)

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/mem/fmt.h */

#define COSMOPOLITAN_LIBC_MEM_FMT_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

int asprintf(char **, const char *, ...) printfesque(2)
    paramsnonnull((1, 2)) libcesque;
int vasprintf(char **, const char *, va_list) paramsnonnull() libcesque;

#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
#define asprintf(SP, FMT, ...) (asprintf)(SP, PFLINK(FMT), ##__VA_ARGS__)
#define vasprintf(SP, FMT, VA) (vasprintf)(SP, PFLINK(FMT), VA)
#endif

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nexgen32e/bench.h */

#define COSMOPOLITAN_LIBC_NEXGEN32E_BENCH_H_


/*!BEGIN libc/nexgen32e/rdtsc.h */

#define COSMOPOLITAN_LIBC_NEXGEN32E_RDTSC_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

/**
 * Reads CPU timestamp counter.
 *
 * This macro inhibits compiler magic.
 * This macro does not inhibit CPU magic.
 *
 * @see X86_HAVE(INVTSC)
 */
#define rdtsc() __RDTSC("rdtsc")

/**
 * Reads CPU timestamp counter w/ full serialization.
 *
 * This macro inhibits CPU magic.
 * This macro inhibits compiler magic.
 *
 * The clock isn't read until:
 *
 *   1. previous instructions finish executing; and
 *   2. previous loads are globally visible; and
 *   3. previous stores are globally visible.
 *
 * Later instructions won't dispatch until RDTSC completes.
 *
 * @see X86_HAVE(INVTSC)
 */
#define mfence_lfence_rdtsc_lfence() \
  __RDTSC("mfence\n\tlfence\n\trdtsc\n\tlfence")

#define __RDTSC(ASM)                                                       \
  ({                                                                       \
    uint64_t Rax, Rdx;                                                     \
    asm volatile(ASM : "=a"(Rax), "=d"(Rdx) : /* no inputs */ : "memory"); \
    Rdx << 32 | Rax;                                                       \
  })

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#if !(__ASSEMBLER__ + __LINKER__ + 0)

/**
 * @fileoverview NexGen32e Microbenchmarking.
 *
 * @see X86_HAVE(INVTSC)
 * @see libc/testlib/bench.h
 */

#define __startbench()                            \
  ({                                              \
    uint64_t Ticks;                               \
    asm volatile("lfence\n\t"                     \
                 "push\t%%rbx\n\t"                \
                 "cpuid\n\t"                      \
                 "pop\t%%rbx\n\t"                 \
                 "rdtsc\n\t"                      \
                 "shl\t%2,%%rdx\n\t"              \
                 "or\t%%rdx,%0"                   \
                 : "=a"(Ticks)                    \
                 : "0"(0), "J"(32)                \
                 : "rcx", "rdx", "memory", "cc"); \
    Ticks;                                        \
  })

#define __endbench()                                     \
  ({                                                     \
    uint64_t Ticks;                                      \
    asm volatile("rdtscp\n\t"                            \
                 "shl\t%1,%%rdx\n\t"                     \
                 "or\t%%rdx,%%rax\n\t"                   \
                 "mov\t%%rax,%0\n\t"                     \
                 "xor\t%%eax,%%eax\n\t"                  \
                 "push\t%%rbx\n\t"                       \
                 "cpuid\n\t"                             \
                 "pop\t%%rbx"                            \
                 : "=r"(Ticks)                           \
                 : "J"(32)                               \
                 : "rax", "rcx", "rdx", "memory", "cc"); \
    Ticks;                                               \
  })

#define __startbench_m() mfence_lfence_rdtsc_lfence()
#define __endbench_m()   __startbench_m()
#define __marker()       asm("nop")
#define __ordered()      asm volatile("" ::: "memory")
#define __fakeread(X)    asm volatile("" : /* no outputs */ : "g"(X))
#define __fakereadwrite(X)                 \
  ({                                       \
    autotype(X) Res = (X);                 \
    asm volatile("" : "=g"(Res) : "0"(X)); \
    Res;                                   \
  })

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nexgen32e/bsf.h */

#define COSMOPOLITAN_LIBC_NEXGEN32E_BSF_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

/*
 * BIT SCANNING 101
 *                          ctz(𝑥)         31^clz(𝑥)   clz(𝑥)
 *      uint32 𝑥   bsf(𝑥) tzcnt(𝑥)   ffs(𝑥)   bsr(𝑥) lzcnt(𝑥)
 *    0x00000000      wut       32        0      wut       32
 *    0x00000001        0        0        1        0       31
 *    0x80000001        0        0        1       31        0
 *    0x80000000       31       31       32       31        0
 *    0x00000010        4        4        5        4       27
 *    0x08000010        4        4        5       27        4
 *    0x08000000       27       27       28       27        4
 *    0xffffffff        0        0        1       31        0
 */

int bsf(int);
int bsfl(long);
int bsfll(long long);
int bsfmax(uintmax_t);

#ifdef __GNUC__
#define bsf(u)   __builtin_ctz(u)
#define bsfl(u)  __builtin_ctzl(u)
#define bsfll(u) __builtin_ctzll(u)
#endif

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nexgen32e/bsr.h */

#define COSMOPOLITAN_LIBC_NEXGEN32E_BSR_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

/*
 * BIT SCANNING 101
 *                          ctz(𝑥)         31^clz(𝑥)   clz(𝑥)
 *      uint32 𝑥   bsf(𝑥) tzcnt(𝑥)   ffs(𝑥)   bsr(𝑥) lzcnt(𝑥)
 *    0x00000000      wut       32        0      wut       32
 *    0x00000001        0        0        1        0       31
 *    0x80000001        0        0        1       31        0
 *    0x80000000       31       31       32       31        0
 *    0x00000010        4        4        5        4       27
 *    0x08000010        4        4        5       27        4
 *    0x08000000       27       27       28       27        4
 *    0xffffffff        0        0        1       31        0
 */

int bsr(int);
int bsrl(long);
int bsrll(long long);
int bsrmax(uintmax_t);

#ifdef __GNUC__
#define bsr(u)   ((sizeof(int) * 8 - 1) ^ __builtin_clz(u))
#define bsrl(u)  ((sizeof(long) * 8 - 1) ^ __builtin_clzl(u))
#define bsrll(u) ((sizeof(long long) * 8 - 1) ^ __builtin_clzll(u))
#endif

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nexgen32e/cachesize.h */

#define COSMOPOLITAN_LIBC_NEXGEN32E_CACHESIZE_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

#define kCpuCacheTypeData        1
#define kCpuCacheTypeInstruction 2
#define kCpuCacheTypeUnified     3

unsigned getcachesize(int, int);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nexgen32e/crc32.h */

#define COSMOPOLITAN_LIBC_NEXGEN32E_CRC32_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void crc32init(uint32_t[hasatleast 256], uint32_t);
uint32_t crc32_z(uint32_t, const void *, size_t);
extern uint32_t (*const crc32c)(uint32_t, const void *, size_t);
uint32_t crc32c_pure(uint32_t, const void *, size_t) strlenesque hidden;
uint32_t crc32c_sse42(uint32_t, const void *, size_t) strlenesque hidden;
uint32_t crc32_pclmul(uint32_t, const void *, size_t) hidden;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nexgen32e/ffs.h */

#define COSMOPOLITAN_LIBC_NEXGEN32E_FFS_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

/*
 * BIT SCANNING 101
 *                          ctz(𝑥)         31^clz(𝑥)   clz(𝑥)
 *      uint32 𝑥   bsf(𝑥) tzcnt(𝑥)   ffs(𝑥)   bsr(𝑥) lzcnt(𝑥)
 *    0x00000000      wut       32        0      wut       32
 *    0x00000001        0        0        1        0       31
 *    0x80000001        0        0        1       31        0
 *    0x80000000       31       31       32       31        0
 *    0x00000010        4        4        5        4       27
 *    0x08000010        4        4        5       27        4
 *    0x08000000       27       27       28       27        4
 *    0xffffffff        0        0        1       31        0
 */

int ffs(int) pureconst;
int ffsl(long) pureconst;
int ffsll(long long) pureconst;

#ifdef __GNUC__
#define ffs(u)   __builtin_ffs(u)
#define ffsl(u)  __builtin_ffsl(u)
#define ffsll(u) __builtin_ffsll(u)
#endif

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nexgen32e/kompressor.h */

#define COSMOPOLITAN_LIBC_KOMPRESSOR_KOMPRESSOR_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
#if 0
/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § standard library » compression                            ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/
#endif

struct RlDecode {
  uint8_t repititions;
  uint8_t byte;
};

void rldecode(void *dest, const struct RlDecode *) hidden;
const uint8_t *lz4check(const void *data) hidden;
void *lz4cpy(void *dest, const void *blockdata, size_t blocksize) hidden;
void *lz4decode(void *dest, const void *src) hidden;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nexgen32e/lz4.h */

#define COSMOPOLITAN_LIBC_LZ4_H_
/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § lz4                                                       ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│─╝
  LZ4 is a framing format for REP MOVSB designed by Yann Collet.

  @see https://github.com/lz4/lz4/blob/master/doc/lz4_Frame_format.md
  @see https://github.com/lz4/lz4/blob/master/doc/lz4_Block_format.md
  @see http://ticki.github.io/blog/how-lz4-works/ */

#define LZ4_EOF                0
#define LZ4_VERSION            1
#define LZ4_MAGICNUMBER        0x184D2204
#define LZ4_SKIPPABLE0         0x184D2A50
#define LZ4_SKIPPABLEMASK      0xFFFFFFF0
#define LZ4_MAXHEADERSIZE      (MAGICNUMBER_SIZE + 2 + 8 + 4 + 1)
#define LZ4_BLOCKMAXSIZE_64KB  4
#define LZ4_BLOCKMAXSIZE_256KB 5
#define LZ4_BLOCKMAXSIZE_1MB   6
#define LZ4_BLOCKMAXSIZE_4MB   7

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § lz4 » frames                                              ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#define LZ4_MAGIC(FRAME)                      READ32LE(FRAME)
#define LZ4_FRAME_VERSION(FRAME)              ((_LZ4_FRAME_FLG(FRAME) >> 6) & 3)
#define LZ4_FRAME_BLOCKINDEPENDENCE(FRAME)    ((_LZ4_FRAME_FLG(FRAME) >> 5) & 1)
#define LZ4_FRAME_BLOCKCHECKSUMFLAG(FRAME)    ((_LZ4_FRAME_FLG(FRAME) >> 4) & 1)
#define LZ4_FRAME_BLOCKCONTENTSIZEFLAG(FRAME) ((_LZ4_FRAME_FLG(FRAME) >> 3) & 1)
#define LZ4_FRAME_BLOCKCONTENTCHECKSUMFLAG(FRAME) \
  ((_LZ4_FRAME_FLG(FRAME) >> 2) & 1)
#define LZ4_FRAME_DICTIONARYIDFLAG(FRAME) ((_LZ4_FRAME_FLG(FRAME) >> 0) & 1)
#define LZ4_FRAME_BLOCKMAXSIZE(FRAME)     ((_LZ4_FRAME_BD(FRAME) >> 4) & 7)
#define LZ4_FRAME_RESERVED1(FRAME)        ((_LZ4_FRAME_FLG(FRAME) >> 1) & 1)
#define LZ4_FRAME_RESERVED2(FRAME)        ((_LZ4_FRAME_BD(FRAME) >> 7) & 1)
#define LZ4_FRAME_RESERVED3(FRAME)        ((_LZ4_FRAME_BD(FRAME) >> 0) & 15)
#define LZ4_FRAME_BLOCKCONTENTSIZE(FRAME) \
  (LZ4_FRAME_BLOCKCONTENTSIZEFLAG(FRAME) ? READ64LE((FRAME) + 4 + 1 + 1) : 0)
#define LZ4_FRAME_DICTIONARYID(FRAME)                          \
  (LZ4_FRAME_DICTIONARYIDFLAG(FRAME)                           \
       ? READ32LE(((FRAME) + 4 + 1 + 1 +                       \
                   8 * LZ4_FRAME_BLOCKCONTENTSIZEFLAG(FRAME))) \
       : 0)
#define LZ4_FRAME_HEADERCHECKSUM(FRAME)                                \
  (*((FRAME) + 4 + 1 + 1 + 8 * LZ4_FRAME_BLOCKCONTENTSIZEFLAG(FRAME) + \
     4 * LZ4_FRAME_DICTIONARYIDFLAG(FRAME)))
#define LZ4_FRAME_HEADERSIZE(FRAME)                        \
  (4 + 1 + 1 + 8 * LZ4_FRAME_BLOCKCONTENTSIZEFLAG(FRAME) + \
   4 * LZ4_FRAME_DICTIONARYIDFLAG(FRAME) + 1)
#define _LZ4_FRAME_FLG(FRAME) (*((FRAME) + 4))
#define _LZ4_FRAME_BD(FRAME)  (*((FRAME) + 5))

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § lz4 » blocks                                              ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#define LZ4_BLOCK_DATA(block)         (block + sizeof(uint32_t))
#define LZ4_BLOCK_DATASIZE(block)     (READ32LE(block) & 0x7fffffff)
#define LZ4_BLOCK_ISEOF(block)        (READ32LE(block) == LZ4_EOF)
#define LZ4_BLOCK_ISCOMPRESSED(block) ((READ32LE(block) & 0x80000000) == 0)
#define LZ4_BLOCK_SIZE(frame, block)              \
  (sizeof(uint32_t) + LZ4_BLOCK_DATASIZE(block) + \
   (LZ4_FRAME_BLOCKCHECKSUMFLAG(frame) ? sizeof(uint8_t) : 0))

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nexgen32e/lzcnt.h */

#define COSMOPOLITAN_LIBC_NEXGEN32E_LZCNT_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

unsigned lzcnt(unsigned) libcesque pureconst;
unsigned long lzcntl(unsigned long) libcesque pureconst;

#define lzcnt(X)                                           \
  ({                                                       \
    typeof(X) Res;                                         \
    if (X86_HAVE(ABM)) {                                   \
      /* amd piledriver+ (a.k.a. bdver1) c. 2011 */        \
      /* intel haswell+ c. 2013 */                         \
      asm("lzcnt\t%1,%0" : "=r,r"(Res) : "r,m"(X) : "cc"); \
    } else {                                               \
      Res = (lzcnt)(X);                                    \
    }                                                      \
    Res;                                                   \
  })

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nexgen32e/macros.h */

#define COSMOPOLITAN_LIBC_NEXGEN32E_MACROS_H_
#ifdef __ASSEMBLER__
#else

/* let's give auto-import tooling a helping hand */
#define pbroadcastb pbroadcastb

#endif /* __ASSEMBLER__ */


/*!BEGIN libc/nexgen32e/msr.h */

#define COSMOPOLITAN_LIBC_MSR_H_
/*─────────────────────────────────────────────────────────────────────────────╗
│ cosmopolitan § model specific registers                                      │
╚─────────────────────────────────────────────────────────────────────────────*/

#define MSR_P5_TSC 0x10       /* time stamp register */
#define MSR_P5_CESR 0x11      /* control and event select register */
#define MSR_P5_CTR0 0x12      /* counter #0 */
#define MSR_P5_CTR1 0x13      /* counter #1 */
#define MSR_P5_CESR_PC 0x0200 /* pin control */
#define MSR_P5_CESR_CC 0x01C0 /* counter control mask */
#define MSR_P5_CESR_ES 0x003F /* event control mask */
#define MSR_P5_CESR_SHIFT 16  /* shift to get counter 1 */
#define MSR_P5_CESR_MASK      /* mask Counter */ \
  (MSR_P5_CESR_PC | MSR_P5_CESR_CC | MSR_P5_CESR_ES)

#define MSR_CORE_THREAD_COUNT 0x35
#define MSR_FLEX_RATIO 0x194
#define MSR_IA32_APERF 0xE8
#define MSR_IA32_APIC_BASE 0x1b
#define MSR_IA32_APIC_BASE_BASE (0xfffff << 12)
#define MSR_IA32_APIC_BASE_BSP (1 << 8)
#define MSR_IA32_APIC_BASE_ENABLE (1 << 11)
#define MSR_IA32_APIC_BASE_EXTENDED (1 << 10)
#define MSR_IA32_BBL_CR_CTL 0x119
#define MSR_IA32_BIOS_SIGN_ID 0x8b
#define MSR_IA32_CLOCK_MODULATION 0x19a
#define MSR_IA32_CORE_C3_RESIDENCY 0x3FC
#define MSR_IA32_CORE_C6_RESIDENCY 0x3FD
#define MSR_IA32_CORE_C7_RESIDENCY 0x3FE
#define MSR_IA32_CR_PAT 0x277
#define MSR_IA32_CSTAR 0xC0000083
#define MSR_IA32_DDR_ENERGY_STATUS 0x619
#define MSR_IA32_DEBUGCTLMSR 0x1d9
#define MSR_IA32_DS_AREA 0x600
#define MSR_IA32_EBL_CR_POWERON 0x2a
#define MSR_IA32_EFER 0xC0000080
#define MSR_IA32_EFER_LMA 0x00000400
#define MSR_IA32_EFER_LME 0x00000100
#define MSR_IA32_EFER_NXE 0x00000800
#define MSR_IA32_EFER_SCE 0x00000001
#define MSR_IA32_EVNTSEL0 0x186
#define MSR_IA32_EVNTSEL1 0x187
#define MSR_IA32_EVNTSEL2 0x188
#define MSR_IA32_EVNTSEL3 0x189
#define MSR_IA32_FEATCTL_CSTATE_SMI (1 << 16)
#define MSR_IA32_FEATCTL_LOCK (1 << 0)
#define MSR_IA32_FEATCTL_VMXON (1 << 2)
#define MSR_IA32_FEATCTL_VMXON_SMX (1 << 1)
#define MSR_IA32_FEATURE_CONTROL 0x3a
#define MSR_IA32_FMASK 0xC0000084
#define MSR_IA32_FS_BASE 0xC0000100
#define MSR_IA32_GS_BASE 0xC0000101
#define MSR_IA32_GS_BASE_KERNEL 0xC0000102
#define MSR_IA32_GT_PERF_LIMIT_REASONS 0x6B0
#define MSR_IA32_IA_PERF_LIMIT_REASONS 0x690
#define MSR_IA32_IA_PERF_LIMIT_REASONS_SKL 0x64F
#define MSR_IA32_LASTBRANCHFROMIP 0x1db
#define MSR_IA32_LASTBRANCHTOIP 0x1dc
#define MSR_IA32_LASTINTFROMIP 0x1dd
#define MSR_IA32_LASTINTTOIP 0x1de
#define MSR_IA32_LLC_FLUSHED_RESIDENCY_TIMER 0x61D
#define MSR_IA32_LSTAR 0xC0000082
#define MSR_IA32_MC0_ADDR 0x402
#define MSR_IA32_MC0_CTL 0x400
#define MSR_IA32_MC0_MISC 0x403
#define MSR_IA32_MC0_STATUS 0x401
#define MSR_IA32_MCG_CAP 0x179
#define MSR_IA32_MCG_CTL 0x17b
#define MSR_IA32_MCG_STATUS 0x17a
#define MSR_IA32_MISC_ENABLE 0x1a0
#define MSR_IA32_MPERF 0xE7
#define MSR_IA32_MTRRCAP 0xfe
#define MSR_IA32_MTRR_DEF_TYPE 0x2ff
#define MSR_IA32_MTRR_FIX16K_80000 0x258
#define MSR_IA32_MTRR_FIX16K_A0000 0x259
#define MSR_IA32_MTRR_FIX4K_C0000 0x268
#define MSR_IA32_MTRR_FIX4K_C8000 0x269
#define MSR_IA32_MTRR_FIX4K_D0000 0x26a
#define MSR_IA32_MTRR_FIX4K_D8000 0x26b
#define MSR_IA32_MTRR_FIX4K_E0000 0x26c
#define MSR_IA32_MTRR_FIX4K_E8000 0x26d
#define MSR_IA32_MTRR_FIX4K_F0000 0x26e
#define MSR_IA32_MTRR_FIX4K_F8000 0x26f
#define MSR_IA32_MTRR_FIX64K_00000 0x250
#define MSR_IA32_MTRR_PHYSBASE(n) (0x200 + 2 * (n))
#define MSR_IA32_MTRR_PHYSMASK(n) (0x200 + 2 * (n) + 1)
#define MSR_IA32_P5_MC_ADDR 0
#define MSR_IA32_P5_MC_TYPE 1
#define MSR_IA32_PACKAGE_THERM_INTERRUPT 0x1b2
#define MSR_IA32_PACKAGE_THERM_STATUS 0x1b1
#define MSR_IA32_PERFCTR0 0xc1
#define MSR_IA32_PERFCTR1 0xc2
#define MSR_IA32_PERFCTR3 0xc3
#define MSR_IA32_PERFCTR4 0xc4
#define MSR_IA32_PERF_CTL 0x199
#define MSR_IA32_PERF_FIXED_CTR0 0x309
#define MSR_IA32_PERF_FIXED_CTR_CTRL 0x38D
#define MSR_IA32_PERF_GLOBAL_CTRL 0x38F
#define MSR_IA32_PERF_GLOBAL_OVF_CTRL 0x390
#define MSR_IA32_PERF_GLOBAL_STATUS 0x38E
#define MSR_IA32_PERF_STS 0x198
#define MSR_IA32_PKG_C10_RESIDENCY 0x632
#define MSR_IA32_PKG_C2_RESIDENCY 0x60D
#define MSR_IA32_PKG_C3_RESIDENCY 0x3F8
#define MSR_IA32_PKG_C6_RESIDENCY 0x3F9
#define MSR_IA32_PKG_C7_RESIDENCY 0x3FA
#define MSR_IA32_PKG_C8_RESIDENCY 0x630
#define MSR_IA32_PKG_C9_RESIDENCY 0x631
#define MSR_IA32_PKG_ENERGY_STATUS 0x611
#define MSR_IA32_PKG_POWER_SKU_UNIT 0x606
#define MSR_IA32_PLATFORM_ID 0x17
#define MSR_IA32_PP0_ENERGY_STATUS 0x639
#define MSR_IA32_PP1_ENERGY_STATUS 0x641
#define MSR_IA32_RING_PERF_STATUS 0x621
#define MSR_IA32_STAR 0xC0000081
#define MSR_IA32_SYSENTER_CS 0x174
#define MSR_IA32_SYSENTER_EIP 0x176
#define MSR_IA32_SYSENTER_ESP 0x175
#define MSR_IA32_TSC_AUX 0xC0000103
#define MSR_IA32_TSC_DEADLINE 0x6e0
#define MSR_IA32_UCODE_REV MSR_IA32_BIOS_SIGN_ID
#define MSR_IA32_UCODE_WRITE MSR_IA32_UPDT_TRIG
#define MSR_IA32_UPDT_TRIG 0x79
#define MSR_IA32_VMX_BASE 0x480
#define MSR_IA32_VMX_BASIC MSR_IA32_VMX_BASE
#define MSR_IA32_VMX_CR0_FIXED0 MSR_IA32_VMX_BASE + 6
#define MSR_IA32_VMX_CR0_FIXED1 MSR_IA32_VMX_BASE + 7
#define MSR_IA32_VMX_CR4_FIXED0 MSR_IA32_VMX_BASE + 8
#define MSR_IA32_VMX_CR4_FIXED1 MSR_IA32_VMX_BASE + 9
#define MSR_IA32_VMX_ENTRY_CTLS MSR_IA32_VMX_BASE + 4
#define MSR_IA32_VMX_EPT_VPID_CAP MSR_IA32_VMX_BASE + 12
#define MSR_IA32_VMX_EPT_VPID_CAP_AD_SHIFT 21
#define MSR_IA32_VMX_EXIT_CTLS MSR_IA32_VMX_BASE + 3
#define MSR_IA32_VMX_MISC MSR_IA32_VMX_BASE + 5
#define MSR_IA32_VMX_PINBASED_CTLS MSR_IA32_VMX_BASE + 1
#define MSR_IA32_VMX_PROCBASED_CTLS MSR_IA32_VMX_BASE + 2
#define MSR_IA32_VMX_PROCBASED_CTLS2 MSR_IA32_VMX_BASE + 11
#define MSR_IA32_VMX_TRUE_PINBASED_CTLS MSR_IA32_VMX_BASE + 13
#define MSR_IA32_VMX_TRUE_PROCBASED_CTLS MSR_IA32_VMX_BASE + 14
#define MSR_IA32_VMX_TRUE_VMENTRY_CTLS MSR_IA32_VMX_BASE + 16
#define MSR_IA32_VMX_TRUE_VMEXIT_CTLS MSR_IA32_VMX_BASE + 15
#define MSR_IA32_VMX_VMCS_ENUM MSR_IA32_VMX_BASE + 10
#define MSR_IA32_VMX_VMFUNC MSR_IA32_VMX_BASE + 17
#define MSR_P5_CESR_CC_CLOCK 0x0100   /* Clock Counting (otherwise Event) */
#define MSR_P5_CESR_CC_CPL 0x00C0     /* Count regardless of the CPL */
#define MSR_P5_CESR_CC_CPL012 0x0040  /* Count if the CPL == 0, 1, 2 */
#define MSR_P5_CESR_CC_CPL3 0x0080    /* Count if the CPL == 3 */
#define MSR_P5_CESR_CC_DISABLE 0x0000 /* Disable counter */
#define MSR_P5_CESR_ES_AGI 0x011111   /* Stall because of AGI */
#define MSR_P5_CESR_ES_BANK_CONFLICTS 0x001010  /* Bank conflicts */
#define MSR_P5_CESR_ES_BRANCHE 0x010010         /* Branches */
#define MSR_P5_CESR_ES_BRANCHE_BTB 0x010100     /* Taken branch or BTB Hit */
#define MSR_P5_CESR_ES_BREAK_DR0 0x100011       /* Breakpoint matches on DR0 */
#define MSR_P5_CESR_ES_BREAK_DR1 0x100100       /* Breakpoint matches on DR1 */
#define MSR_P5_CESR_ES_BREAK_DR2 0x100101       /* Breakpoint matches on DR2 */
#define MSR_P5_CESR_ES_BREAK_DR3 0x100110       /* Breakpoint matches on DR3 */
#define MSR_P5_CESR_ES_BTB_HIT 0x010011         /* BTB Hits */
#define MSR_P5_CESR_ES_BUS_CYCLE 0x011000       /* Clocks while bus cycle */
#define MSR_P5_CESR_ES_CACHE_SNOOP_HIT 0x001000 /* Data cache snoop hits */
#define MSR_P5_CESR_ES_CODE_CACHE_MISS 0x001110 /* Code Cache miss */
#define MSR_P5_CESR_ES_CODE_READ 0x001100       /* Code Read */
#define MSR_P5_CESR_ES_CODE_TLB_MISS 0x001101   /* Code TLB miss */
#define MSR_P5_CESR_ES_DATA_CACHE_WB 0x000110   /* Cache lines written back */
#define MSR_P5_CESR_ES_DATA_MEM_READ 0x011010   /* Pipeline waiting for read */
#define MSR_P5_CESR_ES_DATA_READ 0x000000       /* Data Read */
#define MSR_P5_CESR_ES_DATA_READ_MISS 0x000011  /* Data Read Miss */
#define MSR_P5_CESR_ES_DATA_RW 0x101000         /* Data Read or Write */
#define MSR_P5_CESR_ES_DATA_RW_MISS 0x101001    /* Data Read or Write Miss */
#define MSR_P5_CESR_ES_DATA_TLB_MISS 0x000010   /* Data TLB Miss */
#define MSR_P5_CESR_ES_DATA_WRITE 0x000001      /* Data Write */
#define MSR_P5_CESR_ES_DATA_WRITE_MISS 0x000100 /* Data Write Miss */
#define MSR_P5_CESR_ES_EXTERNAL_SNOOP 0x000111  /* External Snoop */
#define MSR_P5_CESR_ES_FLOP 0x100010            /* Floating Point operations */
#define MSR_P5_CESR_ES_FULL_WRITE_BUF 0x011001  /* Clocks while full wrt buf */
#define MSR_P5_CESR_ES_HARDWARE_IT 0x100111     /* Hardware interrupts */
#define MSR_P5_CESR_ES_HIT_EM 0x000101          /* Write (hit) to M|E state */
#define MSR_P5_CESR_ES_INSTRUCTION 0x010110     /* Instruction executed */
#define MSR_P5_CESR_ES_INSTRUCTION_V 0x010111   /* Inst. executed (v-pipe) */
#define MSR_P5_CESR_ES_IO_CYCLE 0x011101        /* I/O Read or Write cycles */
#define MSR_P5_CESR_ES_LOCKED_CYCLE 0x011100    /* Locked bus cycles */
#define MSR_P5_CESR_ES_MEM_ACCESS_PIPE 0x001001 /* mem access both pipes */
#define MSR_P5_CESR_ES_MISALIGNED 0x001011      /* Misaligned Memory or I/O */
#define MSR_P5_CESR_ES_NON_CACHEABLE 0x011110   /* Non-cacheable Mem. read */
#define MSR_P5_CESR_ES_PIPELINE_FLUSH 0x010101  /* Pipeline Flushes */
#define MSR_P5_CESR_ES_SEGMENT_LOADED 0x001111  /* Any segment reg. loaded */
#define MSR_P5_CESR_ES_WRITE_EM 0x011011        /* Stall on write E|M state */
#define MSR_PLATFORM_INFO 0xce



/*!BEGIN libc/nexgen32e/nexgen32e.h */

#define COSMOPOLITAN_LIBC_NEXGEN32E_NEXGEN32E_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern long kHalfCache3;

void imapxlatab(void *);
void insertionsort(int32_t *, size_t);

int64_t div10int64(int64_t) libcesque pureconst;
int64_t div100int64(int64_t) libcesque pureconst;
int64_t div1000int64(int64_t) libcesque pureconst;
int64_t div10000int64(int64_t) libcesque pureconst;
int64_t div1000000int64(int64_t) libcesque pureconst;
int64_t div1000000000int64(int64_t) libcesque pureconst;

int64_t rem10int64(int64_t) libcesque pureconst;
int64_t rem100int64(int64_t) libcesque pureconst;
int64_t rem1000int64(int64_t) libcesque pureconst;
int64_t rem10000int64(int64_t) libcesque pureconst;
int64_t rem1000000int64(int64_t) libcesque pureconst;
int64_t rem1000000000int64(int64_t) libcesque pureconst;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nexgen32e/nt2sysv.h */

#define COSMOPOLITAN_LIBC_NEXGEN32E_NT2SYSV_H_


/*!BEGIN libc/nexgen32e/trampoline.h */

#define COSMOPOLITAN_LIBC_NEXGEN32E_TRAMPOLINE_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

#define TRAMPOLINE(FUNCTION, THUNK)   \
  ({                                  \
    typeof(FUNCTION) *Tramp;          \
    asm(".section .text.trampoline\n" \
        "183:\n\t"                    \
        "mov\t%1,%%eax\n\t"           \
        "jmp\t" #THUNK "\n\t"         \
        ".previous\n\t"               \
        "mov\t$183b,%k0"              \
        : "=r"(Tramp)                 \
        : "i"(FUNCTION));             \
    Tramp;                            \
  })

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#if !(__ASSEMBLER__ + __LINKER__ + 0)

/**
 * Creates function to thunk FUNCTION from MSX64 to System V ABI.
 *
 * This macro should be used when specifying callbacks in the WIN32 API.
 */
#define NT2SYSV(FUNCTION) TRAMPOLINE(FUNCTION, __nt2sysv)

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nexgen32e/rdtscp.h */

#define COSMOPOLITAN_LIBC_NEXGEN32E_RDTSCP_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

#define TSC_AUX_CORE(MSR) ((MSR)&0xfff)
#define TSC_AUX_NODE(MSR) (((MSR) >> 12) & 0xfff)

/**
 * Reads CPU timestamp counter and IA32_TSC_AUX.
 *
 * This macro inhibits compiler magic.
 * This macro does not inhibit CPU magic.
 *
 * @see X86_HAVE(RDTSCP)
 */
#define rdtscp(OPT_OUT_IA32_TSC_AUX)               \
  ({                                               \
    uint32_t Ecx, *EcxOut;                         \
    uint64_t Rax, Rcx, Rdx;                        \
    asm volatile("rdtscp"                          \
                 : "=a"(Rax), "=c"(Ecx), "=d"(Rdx) \
                 : /* no inputs */                 \
                 : "memory");                      \
    EcxOut = (OPT_OUT_IA32_TSC_AUX);               \
    if (EcxOut) *EcxOut = Ecx;                     \
    Rdx << 32 | Rax;                               \
  })

/**
 * Reads timestamp counter auxiliary model specific register value.
 */
#define rdpid()                                                           \
  ({                                                                      \
    bool Ok;                                                              \
    long Msr;                                                             \
    Ok = false;                                                           \
    if (X86_HAVE(RDPID)) {                                                \
      asm volatile("rdpid\t%0" : "=r"(Msr) : /* no inputs */ : "memory"); \
      Ok = true;                                                          \
    } else if (IsLinux()) {                                               \
      asm volatile(ZFLAG_ASM("lsl\t%2,%1")                                \
                   : ZFLAG_CONSTRAINT(Ok), "=r"(Msr)                      \
                   : "r"(0x7b)                                            \
                   : "memory");                                           \
    }                                                                     \
    if (!Ok && X86_HAVE(RDTSCP)) {                                        \
      asm volatile("rdtscp"                                               \
                   : "=c"(Msr)                                            \
                   : /* no inputs */                                      \
                   : "eax", "edx", "memory");                             \
      Ok = true;                                                          \
    }                                                                     \
    if (!Ok) {                                                            \
      Msr = -1;                                                           \
    }                                                                     \
    Msr;                                                                  \
  })

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nexgen32e/slowcall.h */

#define COSMOPOLITAN_LIBC_NEXGEN32E_SLOWCALL_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

#define slowcall(fn, arg1, arg2, arg3, arg4, arg5, arg6)                \
  ({                                                                    \
    void *ax;                                                           \
    asm volatile("push\t%7\n\t"                                         \
                 "push\t%6\n\t"                                         \
                 "push\t%5\n\t"                                         \
                 "push\t%4\n\t"                                         \
                 "push\t%3\n\t"                                         \
                 "push\t%2\n\t"                                         \
                 "push\t%1\n\t"                                         \
                 "call\tslowcall"                                       \
                 : "=a"(ax)                                             \
                 : "g"(fn), "g"(arg1), "g"(arg2), "g"(arg3), "g"(arg4), \
                   "g"(arg5), "g"(arg6)                                 \
                 : "memory");                                           \
    ax;                                                                 \
  })

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nexgen32e/stackframe.h */

#define COSMOPOLITAN_LIBC_NEXGEN32E_STACKFRAME_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

struct StackFrame {
  struct StackFrame *next;
  intptr_t addr;
};

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nexgen32e/tzcnt.h */

#define COSMOPOLITAN_LIBC_NEXGEN32E_TZCNT_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

unsigned tzcnt(unsigned) libcesque pureconst;
unsigned long tzcntl(unsigned long) libcesque pureconst;

#define tzcnt(X)                                           \
  ({                                                       \
    typeof(X) Res;                                         \
    if (X86_HAVE(BMI)) {                                   \
      /* amd piledriver+ (a.k.a. bdver1) c. 2011 */        \
      /* intel haswell+ c. 2013 */                         \
      asm("tzcnt\t%1,%0" : "=r,r"(Res) : "r,m"(X) : "cc"); \
    } else {                                               \
      Res = (tzcnt)(X);                                    \
    }                                                      \
    Res;                                                   \
  })

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nexgen32e/x86info.h */

#define COSMOPOLITAN_LIBC_NEXGEN32E_X86INFO_H_

#define kX86CpuStepping    ((KCPUIDS(1H, EAX) >> 0) & 15)
#define kX86CpuModelid     ((KCPUIDS(1H, EAX) >> 4) & 15)
#define kX86CpuFamilyid    ((KCPUIDS(1H, EAX) >> 8) & 15)
#define kX86CpuType        ((KCPUIDS(1H, EAX) >> 12) & 3)
#define kX86CpuExtmodelid  ((KCPUIDS(1H, EAX) >> 16) & 15)
#define kX86CpuExtfamilyid ((KCPUIDS(1H, EAX) >> 20) & 255)

#define kX86CpuFamily \
  (kX86CpuFamilyid + (kX86CpuFamily == 15 ? kX86CpuExtfamilyid : 0))

#define kX86CpuModel \
  (kX86CpuModelid |  \
   (kX86CpuFamily == 6 || kX86CpuFamily == 15 ? kX86CpuExtmodelid : 0) << 4)

#define kX86ProcessorModelKey                                                 \
  (kX86CpuExtfamilyid << 12 | kX86CpuFamilyid << 8 | kX86CpuExtmodelid << 4 | \
   kX86CpuModelid)

#define X86_MARCH_UNKNOWN        0
#define X86_MARCH_CORE2          1
#define X86_MARCH_NEHALEM        2
#define X86_MARCH_WESTMERE       3
#define X86_MARCH_SANDYBRIDGE    4
#define X86_MARCH_IVYBRIDGE      5
#define X86_MARCH_HASWELL        6
#define X86_MARCH_BROADWELL      7
#define X86_MARCH_SKYLAKE        8
#define X86_MARCH_KABYLAKE       9
#define X86_MARCH_CANNONLAKE     10
#define X86_MARCH_ICELAKE        11
#define X86_MARCH_TIGERLAKE      12
#define X86_MARCH_BONNELL        13
#define X86_MARCH_SALTWELL       14
#define X86_MARCH_SILVERMONT     15
#define X86_MARCH_AIRMONT        16
#define X86_MARCH_GOLDMONT       17
#define X86_MARCH_GOLDMONTPLUS   18
#define X86_MARCH_TREMONT        19
#define X86_MARCH_KNIGHTSLANDING 20
#define X86_MARCH_KNIGHTSMILL    21

#define X86_GRADE_UNKNOWN   0
#define X86_GRADE_APPLIANCE 1
#define X86_GRADE_MOBILE    2
#define X86_GRADE_TABLET    3
#define X86_GRADE_DESKTOP   4
#define X86_GRADE_CLIENT    5
#define X86_GRADE_DENSITY   6
#define X86_GRADE_SERVER    7
#define X86_GRADE_SCIENCE   8

struct X86ProcessorModel {
  short key;
  unsigned char march;
  unsigned char grade;
};

extern const size_t kX86ProcessorModelCount;
extern const struct X86ProcessorModel kX86ProcessorModels[];

const struct X86ProcessorModel *getx86processormodel(short) nosideeffect;



/*!BEGIN libc/nt/enum/accessmask.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_ACCESSMASK_H_

/**
 * Can also be described as follows:
 *
 *   struct NtAccessMask {
 *     union {
 *       uint32_t value;
 *       struct {
 *         uint16_t SpecificRights;
 *         unsigned char StandardRights;
 *         unsigned AccessSystemAcl : 1;
 *         unsigned Reserved : 3;
 *         unsigned GenericAll : 1;
 *         unsigned GenericExecute : 1;
 *         unsigned GenericWrite : 1;
 *         unsigned GenericRead : 1;
 *       };
 *     };
 *   };
 */
#define kNtGenericRead 0x80000000u
#define kNtGenericWrite 0x40000000u
#define kNtGenericExecute 0x20000000u
#define kNtGenericAll 0x10000000u
#define kNtDelete 0x00010000u
#define kNtReadControl 0x00020000u
#define kNtWriteDac 0x00040000u
#define kNtWriteOwner 0x00080000u
#define kNtSynchronize 0x00100000u
#define kNtStandardRightsRequired 0x000F0000u
#define kNtStandardRightsRead kNtReadControl
#define kNtStandardRightsWrite kNtReadControl
#define kNtStandardRightsExecute kNtReadControl
#define kNtStandardRightsAll 0x001F0000u
#define kNtSpecificRightsAll 0x0000FFFFu
#define kNtAccessSystemSecurity 0x01000000u
#define kNtMaximumAllowed 0x02000000u
#define kNtFileReadData 0x0001u
#define kNtFileListDirectory 0x0001u
#define kNtFileWriteData 0x0002u
#define kNtFileAddFile 0x0002u
#define kNtFileAppendData 0x0004u
#define kNtFileAddSubdirectory 0x0004u
#define kNtFileCreatePipeInstance 0x0004u
#define kNtFileReadEa 0x0008u
#define kNtFileWriteEa 0x0010u
#define kNtFileExecute 0x0020u
#define kNtFileTraverse 0x0020u
#define kNtFileDeleteChild 0x0040u
#define kNtFileReadAttributes 0x0080u
#define kNtFileWriteAttributes 0x0100u
#define kNtFileAllAccess (kNtStandardRightsRequired | kNtSynchronize | 0x1FFu)
#define kNtFileGenericRead                                           \
  (kNtStandardRightsRead | kNtFileReadData | kNtFileReadAttributes | \
   kNtFileReadEa | kNtSynchronize)
#define kNtFileGenericWrite                                             \
  (kNtStandardRightsWrite | kNtFileWriteData | kNtFileWriteAttributes | \
   kNtFileWriteEa | kNtFileAppendData | kNtSynchronize)
#define kNtFileGenericExecute                                          \
  (kNtStandardRightsExecute | kNtFileReadAttributes | kNtFileExecute | \
   kNtSynchronize)
#define kNtTokenAssignPrimary 0x0001u
#define kNtTokenDuplicate 0x0002u
#define kNtTokenImpersonate 0x0004u
#define kNtTokenQuery 0x0008u
#define kNtTokenQuerySource 0x0010u
#define kNtTokenAdjustPrivileges 0x0020u
#define kNtTokenAdjustGroups 0x0040u
#define kNtTokenAdjustDefault 0x0080u
#define kNtTokenAdjustSessionid 0x0100u
#define kNtTokenAllAccessP                                                 \
  (kNtStandardRightsRequired | kNtTokenAssignPrimary | kNtTokenDuplicate | \
   kNtTokenImpersonate | kNtTokenQuery | kNtTokenQuerySource |             \
   kNtTokenAdjustPrivileges | kNtTokenAdjustGroups | kNtTokenAdjustDefault)
#define kNtTokenAllAccess kNtTokenAllAccessP | kNtTokenAdjustSessionid
#define kNtTokenRead kNtStandardRightsRead | kNtTokenQuery
#define kNtTokenWrite                                                         \
  (kNtStandardRightsWrite | kNtTokenAdjustPrivileges | kNtTokenAdjustGroups | \
   kNtTokenAdjustDefault)
#define kNtTokenExecute kNtStandardRightsExecute
#define kNtTokenTrustConstraintMask \
  (kNtStandardRightsRead | kNtTokenQuery | kNtTokenQuerySource)
#define kNtTokenAccessPseudoHandleWin8 kNtTokenQuery | kNtTokenQuerySource
#define kNtTokenAccessPseudoHandle kNtTokenAccessPseudoHandleWin8



/*!BEGIN libc/nt/enum/afd.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_AFD_H_

#define kNtAfdPollReceive          0x0001
#define kNtAfdPollReceiveExpedited 0x0002
#define kNtAfdPollSend             0x0004
#define kNtAfdPollDisconnect       0x0008
#define kNtAfdPollAbort            0x0010
#define kNtAfdPollLocalClose       0x0020
#define kNtAfdPollAccept           0x0080
#define kNtAfdPollConnectFail      0x0100



/*!BEGIN libc/nt/enum/bitblt.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_BITBLT_H_

#define kNtSrccopy     0x00CC0020u /* src */
#define kNtSrcpaint    0x00EE0086u /* src | dst */
#define kNtSrcand      0x008800C6u /* src & dst */
#define kNtSrcinvert   0x00660046u /* src ^ dst */
#define kNtSrcerase    0x00440328u /* src & ~dst */
#define kNtNotsrccopy  0x00330008u /* ~src */
#define kNtNotsrcerase 0x001100A6u /* ~src & ~dst */
#define kNtMergecopy   0x00C000CAu /* (src & pattern) */
#define kNtMergepaint  0x00BB0226u /* ~src | dst */
#define kNtPatcopy     0x00F00021u /* pat */
#define kNtPatpaint    0x00FB0A09u /* wut */
#define kNtPatinvert   0x005A0049u /* pat ^ dst */
#define kNtDstinvert   0x00550009u /* ~dst */
#define kNtBlackness   0x00000042u /* black */
#define kNtWhiteness   0x00FF0062u /* white */



/*!BEGIN libc/nt/enum/callback.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_CALLBACK_H_

#define kNtCallbackChunkFinished 0
#define kNtCallbackStreamSwitch  1



/*!BEGIN libc/nt/enum/color.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_COLOR_H_

#define kNtColorScrollbar               0
#define kNtColorBackground              1
#define kNtColorActivecaption           2
#define kNtColorInactivecaption         3
#define kNtColorMenu                    4
#define kNtColorWindow                  5
#define kNtColorWindowframe             6
#define kNtColorMenutext                7
#define kNtColorWindowtext              8
#define kNtColorCaptiontext             9
#define kNtColorActiveborder            10
#define kNtColorInactiveborder          11
#define kNtColorAppworkspace            12
#define kNtColorHighlight               13
#define kNtColorHighlighttext           14
#define kNtColorBtnface                 15
#define kNtColorBtnshadow               16
#define kNtColorGraytext                17
#define kNtColorBtntext                 18
#define kNtColorInactivecaptiontext     19
#define kNtColorBtnhighlight            20
#define kNtColor3ddkshadow              21
#define kNtColor3dlight                 22
#define kNtColorInfotext                23
#define kNtColorInfobk                  24
#define kNtColorHotlight                26
#define kNtColorGradientactivecaption   27
#define kNtColorGradientinactivecaption 28
#define kNtColorMenuhilight             29
#define kNtColorMenubar                 30



/*!BEGIN libc/nt/enum/computernameformat.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_COMPUTERNAMEFORMAT_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

#define kNtComputerNameNetBios                   0
#define kNtComputerNameDnsHostname               1
#define kNtComputerNameDnsDomain                 2
#define kNtComputerNameDnsFullyQualified         3
#define kNtComputerNamePhysicalNetBios           4
#define kNtComputerNamePhysicalDnsHostname       5
#define kNtComputerNamePhysicalDnsDomain         6
#define kNtComputerNamePhysicalDnsFullyQualified 7
#define kNtComputerName_MAX                      8

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/enum/consolemodeflags.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_CONSOLEMODEFLAGS_H_

/* input mode */
#define kNtEnableProcessedInput 0x0001u
#define kNtEnableLineInput 0x0002u
#define kNtEnableEchoInput 0x0004u
#define kNtEnableWindowInput 0x0008u
#define kNtEnableMouseInput 0x0010u
#define kNtEnableInsertMode 0x0020u
#define kNtEnableQuickEditMode 0x0040u
#define kNtEnableExtendedFlags 0x0080u
#define kNtEnableAutoPosition 0x0100u
#define kNtEnableVirtualTerminalInput 0x0200u

/* output mode */
#define kNtEnableProcessedOutput 0x0001u
#define kNtEnableWrapAtEolOutput 0x0002u
#define kNtEnableVirtualTerminalProcessing 0x0004u
#define kNtDisableNewlineAutoReturn 0x0008u
#define kNtEnableLvbGridWorldwide 0x0010u



/*!BEGIN libc/nt/enum/consoleselectionflags.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_CONSOLESELECTIONFLAGS_H_

#define kNtConsoleNoSelection 0x0000u
#define kNtConsoleSelectionInProgress 0x0001u
#define kNtConsoleSelectionNotEmpty 0x0002u
#define kNtConsoleMouseSelection 0x0004u
#define kNtConsoleMouseDown 0x0008u



/*!BEGIN libc/nt/enum/copyfile.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_COPYFILE_H_

#define kNtCopyFileFailIfExists              0x00000001
#define kNtCopyFileRestartable               0x00000002
#define kNtCopyFileOpenSourceForWrite        0x00000004
#define kNtCopyFileAllowDecryptedDestination 0x00000008
#define kNtCopyFileCopySymlink               0x00000800
#define kNtCopyFileNoBuffering               0x00001000
#define kNtCopyFileRequestSecurityPrivileges 0x00002000 /* Win8+ */
#define kNtCopyFileResumeFromPause           0x00004000 /* Win8+ */
#define kNtCopyFileRequestSecurityPrivileges 0x00002000 /* Win8+ */
#define kNtCopyFileNoOffload                 0x00040000 /* Win8+ */
#define kNtCopyFileIgnoreEdpBlock            0x00400000 /* Win10+ */
#define kNtCopyFileIgnoreSourceEncryption    0x00800000 /* Win10+ */



/*!BEGIN libc/nt/enum/creationdisposition.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_CREATIONDISPOSITION_H_

#define kNtCreateNew 1
#define kNtCreateAlways 2
#define kNtOpenExisting 3
#define kNtOpenAlways 4
#define kNtTruncateExisting 5



/*!BEGIN libc/nt/enum/cs.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_CS_H_

#define kNtCsVredraw         0x00000001
#define kNtCsHredraw         0x00000002
#define kNtCsDblclks         0x00000008
#define kNtCsOwndc           0x00000020
#define kNtCsClassdc         0x00000040
#define kNtCsParentdc        0x00000080
#define kNtCsNoclose         0x00000200
#define kNtCsSavebits        0x00000800
#define kNtCsBytealignclient 0x00001000
#define kNtCsBytealignwindow 0x00002000
#define kNtCsGlobalclass     0x00004000
#define kNtCsIme             0x00010000
#define kNtCsDropshadow      0x00020000



/*!BEGIN libc/nt/enum/ctrlevent.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_CTRLEVENT_H_

#define kNtCtrlCEvent 0      /* SIGINT */
#define kNtCtrlBreakEvent 1  /* SIGQUIT */
#define kNtCtrlCloseEvent 2  /* SIGHUP */
#define kNtCtrlLogoffEvent 5 /* SIGTERM */
#define kNtCtrlShutdownEvent 6



/*!BEGIN libc/nt/enum/cw.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_CW_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

#define kNtCwUsedefault ((int)0x80000000)

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/enum/dialogresult.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_DIALOGRESULT_H_

#define kNtIdok       1
#define kNtIdcancel   2
#define kNtIdabort    3
#define kNtIdretry    4
#define kNtIdignore   5
#define kNtIdyes      6
#define kNtIdno       7
#define kNtIdclose    8
#define kNtIdhelp     9
#define kNtIdtryagain 10
#define kNtIdcontinue 11



/*!BEGIN libc/nt/enum/errormodeflags.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_ERRORMODEFLAGS_H_

#define kNtErrorModeDefault      0x0
#define kNtSemFailcriticalerrors 0x1
#define kNtSemNogpfaulterrorbox  0x2
#define kNtSemNoopenfileerrorbox 0x8000



/*!BEGIN libc/nt/enum/event.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_EVENT_H_

#define kNtEventSystemSound            0x0001
#define kNtEventSystemAlert            0x0002
#define kNtEventSystemForeground       0x0003
#define kNtEventSystemMenustart        0x0004
#define kNtEventSystemMenuend          0x0005
#define kNtEventSystemMenupopupstart   0x0006
#define kNtEventSystemMenupopupend     0x0007
#define kNtEventSystemCapturestart     0x0008
#define kNtEventSystemCaptureend       0x0009
#define kNtEventSystemMovesizestart    0x000A
#define kNtEventSystemMovesizeend      0x000B
#define kNtEventSystemContexthelpstart 0x000C
#define kNtEventSystemContexthelpend   0x000D
#define kNtEventSystemDragdropstart    0x000E
#define kNtEventSystemDragdropend      0x000F
#define kNtEventSystemDialogstart      0x0010
#define kNtEventSystemDialogend        0x0011
#define kNtEventSystemScrollingstart   0x0012
#define kNtEventSystemScrollingend     0x0013
#define kNtEventSystemSwitchstart      0x0014
#define kNtEventSystemSwitchend        0x0015
#define kNtEventSystemMinimizestart    0x0016
#define kNtEventSystemMinimizeend      0x0017

#define kNtEventConsoleCaret            0x4001
#define kNtEventConsoleUpdateRegion     0x4002
#define kNtEventConsoleUpdateSimple     0x4003
#define kNtEventConsoleUpdateScroll     0x4004
#define kNtEventConsoleLayout           0x4005
#define kNtEventConsoleStartApplication 0x4006
#define kNtEventConsoleEndApplication   0x4007

#define kNtEventObjectCreate            0x8000
#define kNtEventObjectDestroy           0x8001
#define kNtEventObjectShow              0x8002
#define kNtEventObjectHide              0x8003
#define kNtEventObjectReorder           0x8004
#define kNtEventObjectFocus             0x8005
#define kNtEventObjectSelection         0x8006
#define kNtEventObjectSelectionadd      0x8007
#define kNtEventObjectSelectionremove   0x8008
#define kNtEventObjectSelectionwithin   0x8009
#define kNtEventObjectStatechange       0x800A
#define kNtEventObjectLocationchange    0x800B
#define kNtEventObjectNamechange        0x800C
#define kNtEventObjectDescriptionchange 0x800D
#define kNtEventObjectValuechange       0x800E
#define kNtEventObjectParentchange      0x800F
#define kNtEventObjectHelpchange        0x8010
#define kNtEventObjectDefactionchange   0x8011
#define kNtEventObjectAcceleratorchange 0x8012



/*!BEGIN libc/nt/enum/eventtype.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_EVENTTYPE_H_

#define kNtNotificationEvent    0
#define kNtSynchronizationEvent 1



/*!BEGIN libc/nt/enum/exceptionhandleractions.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_EXCEPTIONHANDLERACTIONS_H_

#define kNtExceptionExecuteHandler 0x1u
#define kNtExceptionContinueExecution 0xffffffffu
#define kNtExceptionContinueSearch 0x0u



/*!BEGIN libc/nt/enum/fileflagandattributes.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_FILEFLAGANDATTRIBUTES_H_

/**
 * MS-DOS File Attributes.
 *
 * @see GetFileInformationByHandle()
 * @see libc/sysv/consts.sh
 */
#define kNtFileAttributeReadonly 0x00000001u
#define kNtFileAttributeHidden 0x00000002u
#define kNtFileAttributeSystem 0x00000004u
#define kNtFileAttributeVolumelabel 0x00000008u
#define kNtFileAttributeDirectory 0x00000010u
#define kNtFileAttributeArchive 0x00000020u

/**
 * NT File Attributes.
 */
#define kNtFileAttributeDevice 0x00000040u
#define kNtFileAttributeNormal 0x00000080u
#define kNtFileAttributeTemporary 0x00000100u
#define kNtFileAttributeSparseFile 0x00000200u
#define kNtFileAttributeReparsePoint 0x00000400u
#define kNtFileAttributeCompressed 0x00000800u
#define kNtFileAttributeOffline 0x00001000u
#define kNtFileAttributeNotContentIndexed 0x00002000u
#define kNtFileAttributeEncrypted 0x00004000u

/**
 * NT File Flags.
 */
#define kNtFileFlagWriteThrough 0x80000000u
#define kNtFileFlagOverlapped 0x40000000u
#define kNtFileFlagNoBuffering 0x20000000u
#define kNtFileFlagRandomAccess 0x10000000u
#define kNtFileFlagSequentialScan 0x08000000u
#define kNtFileFlagDeleteOnClose 0x04000000u
#define kNtFileFlagBackupSemantics 0x02000000u
#define kNtFileFlagPosixSemantics 0x01000000u
#define kNtFileFlagOpenReparsePoint 0x00200000u /* or symlink */
#define kNtFileFlagOpenNoRecall 0x00100000u
#define kNtFileFlagFirstPipeInstance 0x00080000u



/*!BEGIN libc/nt/enum/fileinfobyhandleclass.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_FILEINFOBYHANDLECLASS_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

#define kNtFileBasicInfo 0        /* struct NtFileBasicInformation */
#define kNtFileStandardInfo 1     /* struct NtFileStandardInformation */
#define kNtFileNameInfo 2         /* struct NtFileNameInformation */
#define kNtFileStreamInfo 7       /* struct NtFileStreamInformation */
#define kNtFileCompressionInfo 8  /* struct NtFileCompressionInfo */
#define kNtFileAttributeTagInfo 9 /* struct NtFileAttributeTagInformation */
#define kNtFileIdBothDirectoryInfo 10
#define kNtFileIdBothDirectoryRestartInfo 11
#define kNtFileRemoteProtocolInfo 13
#define kNtFileFullDirectoryInfo 14 /* NtFileFullDirectoryInformation */
#define kNtFileFullDirectoryRestartInfo 15
#define kNtFileStorageInfo 16                /* win8+ */
#define kNtFileAlignmentInfo 17              /* win8+ */
#define kNtFileIdInfo 18                     /* win8+ */
#define kNtFileIdExtdDirectoryInfo 19        /* win8+ */
#define kNtFileIdExtdDirectoryRestartInfo 20 /* win8+ */

/* #define kNtFileRenameInfo 4 */
/* #define kNtFileDispositionInfo 5 */
/* #define kNtFileAllocationInfo 6 */
/* #define kNtFileEndOfFileInfo 7 */
/* #define kNtFileIoPriorityHintInfo 13 */
/* #define kNtFileDispositionInfoEx 22          /\* win10+ *\/ */
/* #define kNtFileRenameInfoEx 23               /\* win10+ *\/ */

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/enum/fileinformationclass.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_FILEINFORMATIONCLASS_H_

#define kNtFileDirectoryInformation 1 /*→ struct NtFileDirectoryInformation */
#define kNtFileFullDirectoryInformation 2 /*→ etc. */
#define kNtFileBothDirectoryInformation 3
#define kNtFileBasicInformation 4
#define kNtFileStandardInformation 5
#define kNtFileInternalInformation 6
#define kNtFileEaInformation 7
#define kNtFileAccessInformation 8
#define kNtFileNameInformation 9
#define kNtFileRenameInformation 10
#define kNtFileLinkInformation 11
#define kNtFileNamesInformation 12
#define kNtFileDispositionInformation 13
#define kNtFilePositionInformation 14
#define kNtFileFullEaInformation 15
#define kNtFileModeInformation 16
#define kNtFileAlignmentInformation 17
#define kNtFileAllInformation 18
#define kNtFileAllocationInformation 19
#define kNtFileEndOfFileInformation 20
#define kNtFileAlternateNameInformation 21
#define kNtFileStreamInformation 22
#define kNtFilePipeInformation 23
#define kNtFilePipeLocalInformation 24
#define kNtFilePipeRemoteInformation 25
#define kNtFileMailslotQueryInformation 26
#define kNtFileMailslotSetInformation 27
#define kNtFileCompressionInformation 28
#define kNtFileObjectIdInformation 29
#define kNtFileCompletionInformation 30
#define kNtFileMoveClusterInformation 31
#define kNtFileQuotaInformation 32
#define kNtFileReparsePointInformation 33
#define kNtFileNetworkOpenInformation 34
#define kNtFileAttributeTagInformation 35
#define kNtFileTrackingInformation 36
#define kNtFileIdBothDirectoryInformation 37
#define kNtFileIdFullDirectoryInformation 38
#define kNtFileValidDataLengthInformation 39
#define kNtFileShortNameInformation 40
#define kNtFileInformation_MAX 40



/*!BEGIN libc/nt/enum/filelockflags.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_FILELOCKFLAGS_H_

#define kNtLockfileFailImmediately 1
#define kNtLockfileExclusiveLock   2



/*!BEGIN libc/nt/enum/filemapflags.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_FILEMAPFLAGS_H_

#define kNtFileMapCopy           0x00000001u
#define kNtFileMapWrite          0x00000002u
#define kNtFileMapRead           0x00000004u
#define kNtFileMapExecute        0x00000020u
#define kNtFileMapReserve        0x80000000u
#define kNtFileMapTargetsInvalid 0x40000000u
#define kNtFileMapLargePages     0x20000000u



/*!BEGIN libc/nt/enum/filemovemethod.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_FILEMOVEMETHOD_H_

#define kNtFileBegin   0
#define kNtFileCurrent 1
#define kNtFileEnd     2



/*!BEGIN libc/nt/enum/filesharemode.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_FILESHAREFLAGS_H_

#define kNtFileShareExclusive 0x00000000u
#define kNtFileShareRead 0x00000001u
#define kNtFileShareWrite 0x00000002u
#define kNtFileShareDelete 0x00000004u



/*!BEGIN libc/nt/enum/filetype.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_FILETYPE_H_

#define kNtFileTypeUnknown 0x0000
#define kNtFileTypeDisk    0x0001 /* @see S_ISBLK() */
#define kNtFileTypeChar    0x0002 /* @see S_ISCHR() */
#define kNtFileTypePipe    0x0003 /* @see S_ISFIFO() */
#define kNtFileTypeRemote  0x8000 /* unused -MSDN */



/*!BEGIN libc/nt/enum/fillattribute.h */

#define COSMOPOLITAN_LIBC_NT_NTFILLATTRIBUTE_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

#define kNtForegroundBlue 0x0001
#define kNtForegroundGreen 0x0002
#define kNtForegroundRed 0x0004
#define kNtForegroundIntensity 0x0008
#define kNtBackgroundBlue 0x0010
#define kNtBackgroundGreen 0x0020
#define kNtBackgroundRed 0x0040
#define kNtBackgroundIntensity 0x0080

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/enum/findexinfolevels.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_FINDEXINFOLEVELS_H_

#define kNtFindExInfoStandard     0
#define kNtFindExInfoBasic        1
#define kNtFindExInfoMaxInfoLevel 2



/*!BEGIN libc/nt/enum/findexsearchops.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_FINDEXSEARCHOPS_H_

#define kNtFindExSearchNameMatch          0
#define kNtFindExSearchLimitToDirectories 1
#define kNtFindExSearchLimitToDevices     2
#define kNtFindExSearchMaxSearchOp        3



/*!BEGIN libc/nt/enum/formatmessageflags.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_FORMATMESSAGEFLAGS_H_

#define kNtFormatMessageAllocateBuffer 0x100
#define kNtFormatMessageIgnoreInserts  0x200
#define kNtFormatMessageFromString     0x400
#define kNtFormatMessageFromHmodule    0x800
#define kNtFormatMessageFromSystem     0x1000
#define kNtFormatMessageArgumentArray  0x2000
#define kNtFormatMessageMaxWidthMask   0xff



/*!BEGIN libc/nt/enum/fsctl.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_FSCTL_H_

#define kNtFsctlDisableLocalBuffering 0x000902B8u
#define kNtFsctlFilePrefetch 0x00090120u
#define kNtFsctlFilesystemGetStatistics 0x00090060u
#define kNtFsctlGetCompression 0x0009003Cu
#define kNtFsctlGetNtfsFileRecord 0x00090068u
#define kNtFsctlGetNtfsVolumeData 0x00090064u
#define kNtFsctlQueryAllocatedRanges 0x000940CFu
#define kNtFsctlScrubData 0x000902B0u
#define kNtFsctlSetCompression 0x0009C040u
#define kNtFsctlSetSparse 0x000900C4u
#define kNtFsctlSetZeroData 0x000980C8u



/*!BEGIN libc/nt/enum/fsinformationclass.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_FSINFORMATIONCLASS_H_

#define kNtFileFsVolumeInformation 1
#define kNtFileFsLabelInformation 2
#define kNtFileFsSizeInformation 3
#define kNtFileFsDeviceInformation 4
#define kNtFileFsAttributeInformation 5
#define kNtFileFsControlInformation 6
#define kNtFileFsFullSizeInformation 7
#define kNtFileFsObjectIdInformation 8
#define kNtFileFsDriverPathInformation 9
#define kNtFileFsInformation_MAX 10



/*!BEGIN libc/nt/enum/getfileexinfolevels.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_GETFILEEXINFOLEVELS_H_

#define kNtGetFileExInfoStandard 0



/*!BEGIN libc/nt/enum/ht.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_HT_H_

#define kNtHterror       -2
#define kNtHttransparent -1
#define kNtHtnowhere     0
#define kNtHtclient      1
#define kNtHtcaption     2
#define kNtHtsysmenu     3
#define kNtHtgrowbox     4
#define kNtHtsize        kNtHtgrowbox
#define kNtHtmenu        5
#define kNtHthscroll     6
#define kNtHtvscroll     7
#define kNtHtminbutton   8
#define kNtHtmaxbutton   9
#define kNtHtleft        10
#define kNtHtright       11
#define kNtHttop         12
#define kNtHttopleft     13
#define kNtHttopright    14
#define kNtHtbottom      15
#define kNtHtbottomleft  16
#define kNtHtbottomright 17
#define kNtHtborder      18
#define kNtHtreduce      kNtHtminbutton
#define kNtHtzoom        kNtHtmaxbutton
#define kNtHtsizefirst   kNtHtleft
#define kNtHtsizelast    kNtHtbottomright
#define kNtHtobject      19
#define kNtHtclose       20
#define kNtHthelp        21



/*!BEGIN libc/nt/enum/idc.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_IDC_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

#define kNtIdcArrow    ((const char16_t *)32512)
#define kNtIdcIbeam    ((const char16_t *)32513)
#define kNtIdcWait     ((const char16_t *)32514)
#define kNtIdcCross    ((const char16_t *)32515)
#define kNtIdcUparrow  ((const char16_t *)32516)
#define kNtIdcSizenwse ((const char16_t *)32642)
#define kNtIdcSizenesw ((const char16_t *)32643)
#define kNtIdcSizewe   ((const char16_t *)32644)
#define kNtIdcSizens   ((const char16_t *)32645)
#define kNtIdcSizeall  ((const char16_t *)32646)
#define kNtIdcNo       ((const char16_t *)32648)
#define kNtIdcHand     ((const char16_t *)32649)
#define kNtIdcHelp     ((const char16_t *)32651)
#define kNtIdcPin      ((const char16_t *)32671)
#define kNtIdcPerson   ((const char16_t *)32672)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/enum/imageauxsymboltype.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_IMAGEAUXSYMBOLTYPE_H_

#define kNtImageAuxSymbolTypeTokenDef 1



/*!BEGIN libc/nt/enum/importobjectnametype.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_IMPORTOBJECTNAMETYPE_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

enum NtImportObjectNameType {
  IMPORT_OBJECT_ORDINAL,
  IMPORT_OBJECT_NAME,
  IMPORT_OBJECT_NAME_NO_PREFIX,
  IMPORT_OBJECT_NAME_UNDECORATE,
  IMPORT_OBJECT_NAME_EXPORTAS
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/enum/importobjecttype.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_IMPORTOBJECTTYPE_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

enum NtImportObjectType {
  IMPORT_OBJECT_CODE,
  IMPORT_OBJECT_DATA,
  IMPORT_OBJECT_CONST
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/enum/ioctl.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_IOCTL_H_

#define kNtIoctlDiskGetDriveGeometry 0x00070000u
#define kNtIoctlAfdPoll              0x00012024u



/*!BEGIN libc/nt/enum/jobobjectinfoclass.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_JOBOBJECTINFOCLASS_H_

#define kNtJobObjectBasicAccountingInformation         1
#define kNtJobObjectBasicLimitInformation              2
#define kNtJobObjectBasicProcessIdList                 3
#define kNtJobObjectBasicUIRestrictions                4
#define kNtJobObjectSecurityLimitInformation           5
#define kNtJobObjectEndOfJobTimeInformation            6
#define kNtJobObjectAssociateCompletionPortInformation 7
#define kNtJobObjectBasicAndIoAccountingInformation    8
#define kNtJobObjectExtendedLimitInformation           9
#define kNtJobObjectJobSetInformation                  10



/*!BEGIN libc/nt/enum/keyaccess.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_KEYACCESS_H_

#define kNtKeyRead      0x00020019
#define kNtKeyWrite     0x00020006
#define kNtKeyExecute   0x00020019
#define kNtKeyAllAccess 0x000f003f



/*!BEGIN libc/nt/enum/keyedevent.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_KEYEDEVENT_H_

#define kNtKeyedeventWait 0x00000001u
#define kNtKeyedeventWake 0x00000002u
#define kNtKeyedeventAllAccess \
  (kNtStandardRightsRequired | kNtKeyedeventWait | kNtKeyedeventWake)



/*!BEGIN libc/nt/enum/keyinformationclass.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_KEYINFORMATIONCLASS_H_

#define kNtKeyBasicInformation 0
#define kNtKeyNodeInformation  1
#define kNtKeyFullInformation  2
#define kNtKeyNameInformation  3



/*!BEGIN libc/nt/enum/kwaitreason.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_KWAITREASON_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

#define kNtExecutive 0
#define kNtFreePage 1
#define kNtPageIn 2
#define kNtPoolAllocation 3
#define kNtDelayExecution 4
#define kNtSuspended 5
#define kNtUserRequest 6
#define kNtWrExecutive 7
#define kNtWrFreePage 8
#define kNtWrPageIn 9
#define kNtWrPoolAllocation 10
#define kNtWrDelayExecution 11
#define kNtWrSuspended 12
#define kNtWrUserRequest 13
#define kNtWrEventPair 14
#define kNtWrQueue 15
#define kNtWrLpcReceive 16
#define kNtWrLpcReply 17
#define kNtWrVirtualMemory 18
#define kNtWrPageOut 19
#define kNtWrRendezvous 20
#define kNtSpare2 21
#define kNtSpare3 22
#define kNtSpare4 23
#define kNtSpare5 24
#define kNtSpare6 25
#define kNtWrKernel 26
#define kNtMaximumWaitReason 27

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/enum/loadlibrarysearch.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_LOADLIBRARYSEARCH_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

#define kNtLoadLibrarySearchApplicationDir 0x00000200u
#define kNtLoadLibrarySearchSearchSystem32 0x00000800u
#define kNtLoadLibrarySearchUserDirs       0x00000400u
#define kNtLoadLibrarySearchDefaultDirs    0x00001000u

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/enum/mb.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_MB_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

#define kNtMbOk                      0x00000000
#define kNtMbOkcancel                0x00000001
#define kNtMbAbortretryignore        0x00000002
#define kNtMbYesnocancel             0x00000003
#define kNtMbYesno                   0x00000004
#define kNtMbRetrycancel             0x00000005
#define kNtMbCanceltrycontinue       0x00000006
#define kNtMbIconhand                0x00000010
#define kNtMbIconquestion            0x00000020
#define kNtMbIconexclamation         0x00000030
#define kNtMbIconasterisk            0x00000040
#define kNtMbUsericon                0x00000080
#define kNtMbIconwarning             kNtMbIconexclamation
#define kNtMbIconerror               kNtMbIconhand
#define kNtMbIconinformation         kNtMbIconasterisk
#define kNtMbIconstop                kNtMbIconhand
#define kNtMbDefbutton1              0x00000000
#define kNtMbDefbutton2              0x00000100
#define kNtMbDefbutton3              0x00000200
#define kNtMbDefbutton4              0x00000300
#define kNtMbApplmodal               0x00000000
#define kNtMbSystemmodal             0x00001000
#define kNtMbTaskmodal               0x00002000
#define kNtMbHelp                    0x00004000
#define kNtMbNofocus                 0x00008000
#define kNtMbSetforeground           0x00010000
#define kNtMbDefaultDesktopOnly      0x00020000
#define kNtMbTopmost                 0x00040000
#define kNtMbRight                   0x00080000
#define kNtMbRtlreading              0x00100000
#define kNtMbServiceNotification     0x00200000
#define kNtMbServiceNotificationNt3x 0x00040000
#define kNtMbTypemask                0x0000000F
#define kNtMbIconmask                0x000000F0
#define kNtMbDefmask                 0x00000F00
#define kNtMbModemask                0x00003000
#define kNtMbMiscmask                0x0000C000

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/enum/memflags.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_MEMFLAGS_H_

#define kNtMemCommit 0x1000  /* perform physical memory reservation step */
#define kNtMemReserve 0x2000 /* perform virtual memory reservation step */
#define kNtMemDecommit 0x4000
#define kNtMemRelease 0x8000
#define kNtMemFree 0x10000
#define kNtMemPrivate 0x20000
#define kNtMemMapped 0x40000
#define kNtMemReset 0x80000
#define kNtMemTopDown 0x100000
#define kNtMemWriteWatch 0x200000
#define kNtMemPhysical 0x400000
#define kNtMemLargePages 0x20000000
#define kNtMem4mbPages 0x80000000



/*!BEGIN libc/nt/enum/memoryinformationclass.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_MEMORYINFORMATIONCLASS_H_

#define kNtMemoryBasicInformation    0
#define kNtMemoryWorkingSetList      1
#define kNtMemorySectionName         2
#define kNtMemoryBasicVlmInformation 3



/*!BEGIN libc/nt/enum/mf.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_MF_H_

#define kNtMfInsert          0x00000000
#define kNtMfChange          0x00000080
#define kNtMfAppend          0x00000100
#define kNtMfDelete          0x00000200
#define kNtMfRemove          0x00001000
#define kNtMfBycommand       0x00000000
#define kNtMfByposition      0x00000400
#define kNtMfSeparator       0x00000800
#define kNtMfEnabled         0x00000000
#define kNtMfGrayed          0x00000001
#define kNtMfDisabled        0x00000002
#define kNtMfUnchecked       0x00000000
#define kNtMfChecked         0x00000008
#define kNtMfUsecheckbitmaps 0x00000200
#define kNtMfString          0x00000000
#define kNtMfBitmap          0x00000004
#define kNtMfOwnerdraw       0x00000100
#define kNtMfPopup           0x00000010
#define kNtMfMenubarbreak    0x00000020
#define kNtMfMenubreak       0x00000040
#define kNtMfUnhilite        0x00000000
#define kNtMfHilite          0x00000080
#define kNtMfDefault         0x00001000
#define kNtMfSysmenu         0x00002000
#define kNtMfHelp            0x00004000
#define kNtMfRightjustify    0x00004000
#define kNtMfMouseselect     0x00008000



/*!BEGIN libc/nt/enum/mk.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_MK_H_

#define kNtMkLbutton  0x0001
#define kNtMkRbutton  0x0002
#define kNtMkShift    0x0004
#define kNtMkControl  0x0008
#define kNtMkMbutton  0x0010
#define kNtMkXbutton1 0x0020
#define kNtMkXbutton2 0x0040



/*!BEGIN libc/nt/enum/movefileexflags.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_MOVEFILEEXFLAGS_H_

#define kNtMovefileReplaceExisting    1
#define kNtMovefileCopyAllowed        2
#define kNtMovefileDelayUntilReboot   4
#define kNtMovefileCreateHardlink     16
#define kNtMovefileFailIfNotTrackable 32
#define kNtMovefileWriteThrough       8



/*!BEGIN libc/nt/enum/objectinformationclass.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_OBJECTINFORMATIONCLASS_H_

#define kNtObjectBasicInformation 0 /*→ struct NtObjectBasicInformation */
#define kNtObjectNameInformation  1 /*→ etc. */
#define kNtObjectTypeInformation  2
#define kNtObjectAllInformation   3
#define kNtObjectDataInformation  4



/*!BEGIN libc/nt/enum/offerpriority.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_OFFERPRIORITY_H_

/* TODO(jart): Are these values correct? */
#define kNtVmOfferPriorityVeryLow     1 /* 0x00001000? */
#define kNtVmOfferPriorityLow         2 /* 0x00002000? */
#define kNtVmOfferPriorityBelowNormal 3 /* 0x00002000? */
#define kNtVmOfferPriorityNormal      4 /* 0x00002000? */



/*!BEGIN libc/nt/enum/ofn.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_OFN_H_

#define kNtOfnReadonly             0x00000001
#define kNtOfnOverwriteprompt      0x00000002
#define kNtOfnHidereadonly         0x00000004
#define kNtOfnNochangedir          0x00000008
#define kNtOfnShowhelp             0x00000010
#define kNtOfnEnablehook           0x00000020
#define kNtOfnEnabletemplate       0x00000040
#define kNtOfnEnabletemplatehandle 0x00000080
#define kNtOfnNovalidate           0x00000100
#define kNtOfnAllowmultiselect     0x00000200
#define kNtOfnExtensiondifferent   0x00000400
#define kNtOfnPathmustexist        0x00000800
#define kNtOfnFilemustexist        0x00001000
#define kNtOfnCreateprompt         0x00002000
#define kNtOfnShareaware           0x00004000
#define kNtOfnNoreadonlyreturn     0x00008000
#define kNtOfnNotestfilecreate     0x00010000
#define kNtOfnNonetworkbutton      0x00020000
#define kNtOfnNolongnames          0x00040000
#define kNtOfnExplorer             0x00080000
#define kNtOfnNodereferencelinks   0x00100000
#define kNtOfnLongnames            0x00200000
#define kNtOfnEnableincludenotify  0x00400000
#define kNtOfnEnablesizing         0x00800000
#define kNtOfnDontaddtorecent      0x02000000
#define kNtOfnForceshowhidden      0x10000000



/*!BEGIN libc/nt/enum/pageflags.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_PAGEFLAGS_H_

/* Pick One */
#define kNtPageNoaccess 0x01
#define kNtPageReadonly 0x02
#define kNtPageReadwrite 0x04
#define kNtPageWritecopy 0x08
#define kNtPageExecute 0x10
#define kNtPageExecuteRead 0x20
#define kNtPageExecuteReadwrite 0x40
#define kNtPageExecuteWritecopy 0x80
#define kNtPageGuard 0x100
#define kNtPageNocache 0x200
#define kNtPageWritecombine 0x400

/* These may be OR'd */
#define kNtSecReserve 0x4000000
#define kNtSecCommit 0x8000000 /* ←default */
#define kNtSecImage 0x1000000
#define kNtSecImageNoExecute 0x11000000
#define kNtSecLargePages 0x80000000
#define kNtSecNocache 0x10000000
#define kNtSecWritecombine 0x40000000



/*!BEGIN libc/nt/enum/processaccess.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_PROCESSACCESS_H_

#define kNtProcessCreateProcess 0x0080u
#define kNtProcessCreateThread 0x0002u
#define kNtProcessDupHandle 0x0040u
#define kNtProcessQueryInformation 0x0400u
#define kNtProcessQueryLimitedInformation 0x1000u
#define kNtProcessSetInformation 0x0200u
#define kNtProcessSetQuota 0x0100u
#define kNtProcessSuspendResume 0x0800u
#define kNtProcessTerminate 0x0001u
#define kNtProcessVmOperation 0x0008u
#define kNtProcessVmRead 0x0010u
#define kNtProcessVmWrite 0x0020u
#define kNtProcessSynchronize kNtSynchronize
#define kNtProcessAllAccess \
  (kNtStandardRightsRequired | kNtSynchronize | 0xffffu)



/*!BEGIN libc/nt/enum/processcreationflags.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_PROCESSCREATIONFLAGS_H_

#define kNtIdlePriorityClass        0x00000040u
#define kNtBelowNormalPriorityClass 0x00004000u
#define kNtNormalPriorityClass      0x00000020u
#define kNtAboveNormalPriorityClass 0x00008000u
#define kNtHighPriorityClass        0x00000080u
#define kNtRealtimePriorityClass    0x00000100u

#define kNtDebugProcess                 0x00000001u
#define kNtDebugOnlyThisProcess         0x00000002u
#define kNtCreateSuspended              0x00000004u
#define kNtDetachedProcess              0x00000008u
#define kNtCreateNewConsole             0x00000010u
#define kNtCreateNewProcessGroup        0x00000200u
#define kNtCreateUnicodeEnvironment     0x00000400u
#define kNtCreateSeparateWowVdm         0x00000800u
#define kNtCreateSharedWowVdm           0x00001000u
#define kNtCreateForcedos               0x00002000u
#define kNtInheritParentAffinity        0x00010000u
#define kNtCreateProtectedProcess       0x00040000u
#define kNtExtendedStartupinfoPresent   0x00080000u
#define kNtProcessModeBackgroundBegin   0x00100000u
#define kNtProcessModeBackgroundEnd     0x00200000u
#define kNtCreateSecureProcess          0x00400000u
#define kNtCreateBreakawayFromJob       0x01000000u
#define kNtCreatePreserveCodeAuthzLevel 0x02000000u
#define kNtCreateDefaultErrorMode       0x04000000u
#define kNtCreateNoWindow               0x08000000u
#define kNtProfileUser                  0x10000000u
#define kNtProfileKernel                0x20000000u
#define kNtProfileServer                0x40000000u
#define kNtCreateIgnoreSystemDefault    0x80000000u



/*!BEGIN libc/nt/enum/processinfoclass.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_PROCESSINFOCLASS_H_

#define kNtProcessBasicInformation 0
#define kNtProcessQuotaLimits      1
#define kNtProcessIoCounters       2
#define kNtProcessVmCounters       3
#define kNtProcessTimes            4
#define kNtProcessBasePriority     5
#define kNtProcessRaisePriority    6
#define kNtProcessDebugPort        7
#define kNtProcessExceptionPort    8
#define kNtProcessAccessToken      9
#define kNtProcessWow64Information 26
#define kNtProcessImageFileName    27



/*!BEGIN libc/nt/enum/procthreadattributes.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_PROCTHREADATTRIBUTES_H_

#define kNtProcThreadAttributeReplaceValue 1
#define kNtProcThreadAttributeHandleList 0x00020002



/*!BEGIN libc/nt/enum/progress.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_PROGRESS_H_

#define kNtProgressContinue 0
#define kNtProgressCancel   1
#define kNtProgressStop     2
#define kNtProgressQuiet    3



/*!BEGIN libc/nt/enum/pwr.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_PWR_H_

#define kNtPwrOk             1
#define kNtPwrFail           (-1)
#define kNtPwrSuspendrequest 1
#define kNtPwrSuspendresume  2
#define kNtPwrCriticalresume 3



/*!BEGIN libc/nt/enum/rdw.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_RDW_H_

#define kNtRdwInvalidate      0x0001
#define kNtRdwInternalpaint   0x0002
#define kNtRdwErase           0x0004
#define kNtRdwValidate        0x0008
#define kNtRdwNointernalpaint 0x0010
#define kNtRdwNoerase         0x0020
#define kNtRdwNochildren      0x0040
#define kNtRdwAllchildren     0x0080
#define kNtRdwUpdatenow       0x0100
#define kNtRdwErasenow        0x0200
#define kNtRdwFrame           0x0400
#define kNtRdwNoframe         0x0800



/*!BEGIN libc/nt/enum/reggetvalueflags.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_REGGETVALUEFLAGS_H_

#define kNtRrfRtRegNone        0x00000001
#define kNtRrfRtRegSz          0x00000002
#define kNtRrfRtRegExpandSz    0x00000004
#define kNtRrfRtRegBinary      0x00000008
#define kNtRrfRtRegDword       0x00000010
#define kNtRrfRtRegMultiSz     0x00000020
#define kNtRrfRtRegQword       0x00000040
#define kNtRrfRtDword          (kNtRrfRtRegBinary | kNtRrfRtRegDword)
#define kNtRrfRtQword          (kNtRrfRtRegBinary | kNtRrfRtRegQword)
#define kNtRrfRtAny            0x0000ffff
#define kNtRrfSubkeyWow6464key 0x00010000
#define kNtRrfSubkeyWow6432key 0x00020000
#define kNtRrfWow64Mask        0x00030000
#define kNtRrfNoexpand         0x10000000
#define kNtRrfZeroonfailure    0x20000000



/*!BEGIN libc/nt/enum/regtype.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_REGTYPE_H_

#define kNtRegNone                     0
#define kNtRegSz                       1 /* UTF-16 string */
#define kNtRegExpandSz                 2 /* UTF-16 string w/ env vars refs */
#define kNtRegBinary                   3
#define kNtRegDword                    4
#define kNtRegDwordBigEndian           5
#define kNtRegLink                     6
#define kNtRegMultiSz                  7 /* UTF-16 double-nul-terminated */
#define kNtRegResourceList             8
#define kNtRegFullResourceDescriptor   9
#define kNtRegResourceRequirementsList 10
#define kNtRegQword                    11



/*!BEGIN libc/nt/enum/replacefile.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_REPLACEFILE_H_

#define kNtReplacefileWriteThrough      1
#define kNtReplacefileIgnoreMergeErrors 2
#define kNtReplacefileIgnoreAclErrors   4



/*!BEGIN libc/nt/enum/sc.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_SC_H_

#define kNtScSize         0xF000
#define kNtScMove         0xF010
#define kNtScMinimize     0xF020
#define kNtScMaximize     0xF030
#define kNtScNextwindow   0xF040
#define kNtScPrevwindow   0xF050
#define kNtScClose        0xF060
#define kNtScVscroll      0xF070
#define kNtScHscroll      0xF080
#define kNtScMousemenu    0xF090
#define kNtScKeymenu      0xF100
#define kNtScArrange      0xF110
#define kNtScRestore      0xF120
#define kNtScTasklist     0xF130
#define kNtScScreensave   0xF140
#define kNtScHotkey       0xF150
#define kNtScDefault      0xF160
#define kNtScMonitorpower 0xF170
#define kNtScContexthelp  0xF180
#define kNtScSeparator    0xF00F



/*!BEGIN libc/nt/enum/sectioninformationclass.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_SECTIONINFORMATIONCLASS_H_

#define kNtSectionBasicInformation 0
#define kNtSectionImageInformation 1



/*!BEGIN libc/nt/enum/sectioninherit.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_SECTIONINHERIT_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

enum NtSectionInherit { kNtViewShare = 1, kNtViewUnmap = 2 };

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/enum/sectionmapflags.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_SECTIONMAPFLAGS_H_

#define kNtSectionQuery              0x0001
#define kNtSectionMapWrite           0x0002
#define kNtSectionMapRead            0x0004
#define kNtSectionMapExecute         0x0008
#define kNtSectionExtendSize         0x0010
#define kNtSectionMapExecuteExplicit 0x0020



/*!BEGIN libc/nt/enum/securityimpersonationlevel.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_SECURITYIMPERSONATIONLEVEL_H_

#define kNtSecurityAnonymous      0
#define kNtSecurityIdentification 1
#define kNtSecurityImpersonation  2
#define kNtSecurityDelegation     3



/*!BEGIN libc/nt/enum/securityinformation.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_SECURITYINFORMATION_H_

#define kNtOwnerSecurityInformation 0x00000001
#define kNtGroupSecurityInformation 0x00000002
#define kNtDaclSecurityInformation 0x00000004
#define kNtSaclSecurityInformation 0x00000008
#define kNtLabelSecurityInformation 0x00000010
#define kNtAttributeSecurityInformation 0x00000020
#define kNtScopeSecurityInformation 0x00000040
#define kNtProcessTrustLabelSecurityInformation 0x00000080
#define kNtAccessFilterSecurityInformation 0x00000100
#define kNtBackupSecurityInformation 0x00010000
#define kNtProtectedDaclSecurityInformation 0x80000000
#define kNtProtectedSaclSecurityInformation 0x40000000
#define kNtUnprotectedDaclSecurityInformation 0x20000000
#define kNtUnprotectedSaclSecurityInformation 0x10000000



/*!BEGIN libc/nt/enum/signal.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_SIGNAL_H_

#define kNtSignalBreakpoint          0x80000003u
#define kNtSignalIllegalInstruction  0xC000001Du
#define kNtSignalPrivInstruction     0xC0000096u
#define kNtSignalGuardPage           0x80000001u
#define kNtSignalAccessViolation     0xC0000005u
#define kNtSignalInPageError         0xC0000006u
#define kNtSignalInvalidHandle       0xC0000008u
#define kNtSignalInvalidParameter    0xC000000du
#define kNtSignalFltDenormalOperand  0xC000008Du
#define kNtSignalFltDivideByZero     0xC000008Eu
#define kNtSignalFltInexactResult    0xC000008Fu
#define kNtSignalFltInvalidOperation 0xC0000090u
#define kNtSignalFltOverflow         0xC0000091u
#define kNtSignalFltStackCheck       0xC0000092u
#define kNtSignalFltUnderflow        0xC0000093u
#define kNtSignalIntegerDivideByZero 0xC0000094u
#define kNtSignalDllNotFound         0xC0000135u
#define kNtSignalOrdinalNotFound     0xC0000138u
#define kNtSignalEntrypointNotFound  0xC0000139u
#define kNtSignalControlCExit        0xC000013Au
#define kNtSignalDllInitFailed       0xC0000142u
#define kNtSignalFloatMultipleFaults 0xC00002B4u
#define kNtSignalFloatMultipleTraps  0xC00002B5u
#define kNtSignalAssertionFailure    0xC0000420u



/*!BEGIN libc/nt/enum/sio.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_SIO_H_

#define kNtSioBspHandlePoll 0x4800001D
#define kNtSioBaseHandle    0x48000022



/*!BEGIN libc/nt/enum/size.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_SIZE_H_

#define kNtSizeRestored  0
#define kNtSizeMinimized 1
#define kNtSizeMaximized 2
#define kNtSizeMaxshow   3
#define kNtSizeMaxhide   4



/*!BEGIN libc/nt/enum/startf.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_STARTF_H_

#define kNtStartfUseshowwindow 0x00000001 /* otherwise wShowWindow ignored */
#define kNtStartfUsesize 0x00000002       /* otherwise dwX / dwY ignored */
#define kNtStartfUseposition 0x00000004   /* otherwise dwX/YSize ignored */
#define kNtStartfUsecountchars 0x00000008 /* otherwise dwX/YCountChars ign. */
#define kNtStartfUsefillattribute 0x00000010 /* etc. */
#define kNtStartfRunfullscreen 0x00000020
#define kNtStartfForceonfeedback 0x00000040
#define kNtStartfForceofffeedback 0x00000080
#define kNtStartfUsestdhandles 0x00000100 /* otherwise hStd... ignored */
#define kNtStartfUsehotkey 0x00000200
#define kNtStartfTitleislinkname 0x00000800
#define kNtStartfTitleisappid 0x00001000
#define kNtStartfPreventpinning 0x00002000
#define kNtStartfUntrustedsource 0x00008000



/*!BEGIN libc/nt/enum/status.h */

#define COSMOPOLITAN_LIBC_NT_STATUS_H_

/* high two bits = {success,informational,warning,error} */
#define kNtStatusSuccess                  0x00000000 /* success statuses */
#define kNtStatusWait0                    0x00000000
#define kNtStatusAbandonedWait0           0x00000080
#define kNtStatusUserApc                  0x000000C0
#define kNtStatusTimeout                  0x00000102
#define kNtStatusPending                  0x00000103
#define kNtStatusGuardPageViolation       0x80000001 /* warning statuses */
#define kNtStatusDatatypeMisalignment     0x80000002
#define kNtStatusBreakpoint               0x80000003
#define kNtStatusSingleStep               0x80000004
#define kNtStatusLongjump                 0x80000026
#define kNtStatusUnwindConsolidate        0x80000029
#define kNtStatusAccessViolation          0xC0000005 /* error statuses */
#define kNtStatusInPageError              0xC0000006
#define kNtStatusInvalidHandle            0xC0000008
#define kNtStatusInvalidParameter         0xC000000D
#define kNtStatusNoMemory                 0xC0000017
#define kNtStatusIllegalInstruction       0xC000001D
#define kNtStatusNoncontinuableException  0xC0000025
#define kNtStatusInvalidDisposition       0xC0000026
#define kNtStatusArrayBoundsExceeded      0xC000008C
#define kNtStatusFloatDenormalOperand     0xC000008D
#define kNtStatusFloatDivideByZero        0xC000008E
#define kNtStatusFloatInexactResult       0xC000008F
#define kNtStatusFloatInvalidOperation    0xC0000090
#define kNtStatusFloatOverflow            0xC0000091
#define kNtStatusFloatStackCheck          0xC0000092
#define kNtStatusFloatUnderflow           0xC0000093
#define kNtStatusIntegerDivideBYZero      0xC0000094
#define kNtStatusIntegerOverflow          0xC0000095
#define kNtStatusPrivilegedInstruction    0xC0000096
#define kNtStatusStackOverflow            0xC00000FD
#define kNtStatusDllNotFound              0xC0000135
#define kNtStatusOrdinalNotFound          0xC0000138
#define kNtStatusEntrypointNotFound       0xC0000139
#define kNtStatusControlCExit             0xC000013A
#define kNtStatusDllInitFailed            0xC0000142
#define kNtStatusFloatMultipleFaults      0xC00002B4
#define kNtStatusFloatMultipleTraps       0xC00002B5
#define kNtStatusRegNatConsumption        0xC00002C9
#define kNtStatusHeapCorruption           0xC0000374
#define kNtStatusStackBufferOverrun       0xC0000409
#define kNtStatusInvalidCruntimeParameter 0xC0000417
#define kNtStatusAssertionFailure         0xC0000420
#define kNtStatusEnclaveViolation         0xC00004A2
#define kNtStatusSegmentNotification      0x40000005
#define kNtStatusFatalAppExit             0x40000015
#define kNtStatusNotFound                 0xC0000225
#define kNtStatusCancelled                0xC0000120

#define kNtDbgExceptionHandled    0x00010001
#define kNtDbgContinue            0x00010002
#define kNtDbgReplyLater          0x40010001
#define kNtDbgTerminateThread     0x40010003
#define kNtDbgTerminateProcess    0x40010004
#define kNtDbgControlC            0x40010005
#define kNtDbgPrintexceptionC     0x40010006
#define kNtDbgRipexception        0x40010007
#define kNtDbgControlBreak        0x40010008
#define kNtDbgCommandException    0x40010009
#define kNtDbgPrintexceptionWideC 0x4001000A
#define kNtDbgExceptionNotHandled 0x80010001
#define kNtStillActive            kNtStatusPending

#if !(__ASSEMBLER__ + __LINKER__ + 0)

typedef uint32_t NtStatus;

#define NtSuccess(s)      ((NtStatus)(s) >= 0)
#define NtInformation(s)  (NtSeverity(s) == 1)
#define NtWarning(s)      (NtSeverity(s) == 2)
#define NtError(s)        (NtSeverity(s) == 3)
#define NtCode(s)         ((NtStatus)(s)&0xffff)
#define NtSeverity(s)     ((NtStatus)(s) >> 30)
#define NtFacility(s)     (((NtStatus)(s) >> 16) & 0xfff)
#define NtFacilityCode(s) ((NtStatus)(s)&0x0FFFFFFF)

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/enum/sw.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_SW_H_

#define kNtSwHide            0
#define kNtSwShownormal      1
#define kNtSwNormal          1
#define kNtSwShowminimized   2
#define kNtSwShowmaximized   3
#define kNtSwMaximize        3
#define kNtSwShownoactivate  4
#define kNtSwShow            5
#define kNtSwMinimize        6
#define kNtSwShowminnoactive 7
#define kNtSwShowna          8
#define kNtSwRestore         9
#define kNtSwShowdefault     10
#define kNtSwForceminimize   11



/*!BEGIN libc/nt/enum/systeminformationclass.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_SYSTEMINFORMATIONCLASS_H_

#define kNtSystemBasicInformation 0
#define kNtSystemProcessorInformation 1
#define kNtSystemPerformanceInformation 2
#define kNtSystemTimeOfDayInformation 3
#define kNtSystemProcessInformation 5
#define kNtSystemProcessorTimes 8
#define kNtSystemGlobalFlag 9
#define kNtSystemModuleInformation 11
#define kNtSystemLockInformation 12
#define kNtSystemHandleInformation 16
#define kNtSystemObjectInformation 17
#define kNtSystemInterruptInformation 23
#define kNtSystemExceptionInformation 33
#define kNtSystemRegistryQuotaInformation 37
#define kNtSystemLookasideInformation 45



/*!BEGIN libc/nt/enum/threadaccess.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_THREADACCESS_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

#define kNtThreadTerminate 0x0001
#define kNtThreadSuspendResume 0x0002
#define kNtThreadGetContext 0x0008
#define kNtThreadSetContext 0x0010
#define kNtThreadQueryInformation 0x0040
#define kNtThreadSetInformation 0x0020
#define kNtThreadSetThreadToken 0x0080
#define kNtThreadImpersonate 0x0100
#define kNtThreadDirectImpersonation 0x0200
#define kNtThreadSetLimitedInformation 0x0400
#define kNtThreadQueryLimitedInformation 0x0800
#define kNtThreadResume 0x1000
#define kNtThreadAllAccess (kNtStandardRightsRequired | kNtSynchronize | 0xFFFF)

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/enum/threadinfoclass.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_THREADINFOCLASS_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

enum NtThreadInfoClass {
  kNtThreadBasicInformation,
  kNtThreadTimes,
  kNtThreadPriority,
  kNtThreadBasePriority,
  kNtThreadAffinityMask,
  kNtThreadImpersonationToken,
  kNtThreadDescriptorTableEntry,
  kNtThreadEnableAlignmentFaultFixup,
  kNtThreadEventPair_Reusable,
  kNtThreadQuerySetWin32StartAddress,
  kNtThreadZeroTlsCell,
  kNtThreadPerformanceCount,
  kNtThreadAmILastThread,
  kNtThreadIdealProcessor,
  kNtThreadPriorityBoost,
  kNtThreadSetTlsArrayAddress,
  kNtThreadIsIoPending,
  kNtThreadHideFromDebugger,
  kNtThreadInfoClass_MAX
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/enum/threadpriority.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_THREADPRIORITY_H_

#define kNtThreadBasePriorityIdle  (-15)
#define kNtThreadBasePriorityMin   (-2)
#define kNtThreadBasePriorityMax   2
#define kNtThreadBasePriorityLowrt 15

#define kNtThreadPriorityIdle         kNtThreadBasePriorityIdle
#define kNtThreadPriorityLowest       kNtThreadBasePriorityMin
#define kNtThreadPriorityBelowNormal  (kNtThreadPriorityLowest + 1)
#define kNtThreadPriorityNormal       0
#define kNtThreadPriorityAboveNormal  (kNtThreadPriorityHighest - 1)
#define kNtThreadPriorityHighest      kNtThreadBasePriorityMax
#define kNtThreadPriorityTimeCritical kNtThreadBasePriorityLowrt



/*!BEGIN libc/nt/enum/threadstate.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_THREADSTATE_H_

#define kNtStateInitialized 0
#define kNtStateReady       1
#define kNtStateRunning     2
#define kNtStateStandby     3
#define kNtStateTerminated  4
#define kNtStateWait        5
#define kNtStateTransition  6
#define kNtStateUnknown     7



/*!BEGIN libc/nt/enum/tokeninformationclass.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_TOKENINFORMATIONCLASS_H_

#define kNtTokenUser 1
#define kNtTokenGroups 2
#define kNtTokenPrivileges 3
#define kNtTokenOwner 4
#define kNtTokenPrimaryGroup 5
#define kNtTokenDefaultDacl 6
#define kNtTokenSource 7
#define kNtTokenType 8
#define kNtTokenImpersonationLevel 9
#define kNtTokenStatistics 10
#define kNtTokenRestrictedSids 11
#define kNtTokenSessionId 12
#define kNtTokenGroupsAndPrivileges 13
#define kNtTokenSessionReference 14
#define kNtTokenSandBoxInert 15
#define kNtTokenAuditPolicy 16
#define kNtTokenOrigin 17
#define kNtTokenInfoClass_MAX 18



/*!BEGIN libc/nt/enum/tokentype.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_TOKENTYPE_H_

#define kNtTokenPrimary       1
#define kNtTokenImpersonation 2



/*!BEGIN libc/nt/enum/tpm.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_TPM_H_

#define kNtTpmLeftbutton      0x00000
#define kNtTpmRightbutton     0x00002
#define kNtTpmLeftalign       0x00000
#define kNtTpmCenteralign     0x00004
#define kNtTpmRightalign      0x00008
#define kNtTpmTopalign        0x00000
#define kNtTpmVcenteralign    0x00010
#define kNtTpmBottomalign     0x00020
#define kNtTpmHorizontal      0x00000
#define kNtTpmVertical        0x00040
#define kNtTpmNonotify        0x00080
#define kNtTpmReturncmd       0x00100
#define kNtTpmRecurse         0x00001
#define kNtTpmHorposanimation 0x00400
#define kNtTpmHorneganimation 0x00800
#define kNtTpmVerposanimation 0x01000
#define kNtTpmVerneganimation 0x02000
#define kNtTpmNoanimation     0x04000
#define kNtTpmLayoutrtl       0x08000
#define kNtTpmWorkarea        0x10000



/*!BEGIN libc/nt/enum/valueinformationclass.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_VALUEINFORMATIONCLASS_H_

#define kNtKeyValueBasicInformation          0
#define kNtKeyValueFullInformation           1
#define kNtKeyValuePartialInformation        2
#define kNtKeyValueFullInformationAlign64    3
#define kNtKeyValuePartialInformationAlign64 4



/*!BEGIN libc/nt/enum/version.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_VERSION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

/**
 * Known versions of the New Technology executive.
 * @see NtGetVersion()
 */
#define kNtVersionWindows10 0x0a00
#define kNtVersionWindows81 0x0603
#define kNtVersionWindows8 0x0602
#define kNtVersionWindows7 0x0601
#define kNtVersionWindowsVista 0x0600 /* intended baseline */
#define kNtVersionWindowsXp64 0x0502  /* end of the road */
#define kNtVersionWindowsXp 0x0501    /* snowball's chance */
#define kNtVersionWindows2000 0x0500  /* the golden age */
#define kNtVersionFuture 0x0b00

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/enum/vk.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_VK_H_

#define kNtVkLbutton                      0x01
#define kNtVkRbutton                      0x02
#define kNtVkCancel                       0x03
#define kNtVkMbutton                      0x04
#define kNtVkXbutton1                     0x05
#define kNtVkXbutton2                     0x06
#define kNtVkBack                         0x08
#define kNtVkTab                          0x09
#define kNtVkClear                        0x0C
#define kNtVkReturn                       0x0D
#define kNtVkShift                        0x10
#define kNtVkControl                      0x11
#define kNtVkMenu                         0x12 /* alt? */
#define kNtVkPause                        0x13
#define kNtVkCapital                      0x14
#define kNtVkKana                         0x15
#define kNtVkHangul                       0x15
#define kNtVkJunja                        0x17
#define kNtVkFinal                        0x18
#define kNtVkHanja                        0x19
#define kNtVkKanji                        0x19
#define kNtVkEscape                       0x1B
#define kNtVkConvert                      0x1C
#define kNtVkNonconvert                   0x1D
#define kNtVkAccept                       0x1E
#define kNtVkModechange                   0x1F
#define kNtVkSpace                        0x20
#define kNtVkPrior                        0x21
#define kNtVkNext                         0x22
#define kNtVkEnd                          0x23
#define kNtVkHome                         0x24
#define kNtVkLeft                         0x25
#define kNtVkUp                           0x26
#define kNtVkRight                        0x27
#define kNtVkDown                         0x28
#define kNtVkSelect                       0x29
#define kNtVkPrint                        0x2A
#define kNtVkExecute                      0x2B
#define kNtVkSnapshot                     0x2C
#define kNtVkInsert                       0x2D
#define kNtVkDelete                       0x2E
#define kNtVkHelp                         0x2F
#define kNtVkLwin                         0x5B
#define kNtVkRwin                         0x5C
#define kNtVkApps                         0x5D
#define kNtVkSleep                        0x5F
#define kNtVkNumpad0                      0x60
#define kNtVkNumpad1                      0x61
#define kNtVkNumpad2                      0x62
#define kNtVkNumpad3                      0x63
#define kNtVkNumpad4                      0x64
#define kNtVkNumpad5                      0x65
#define kNtVkNumpad6                      0x66
#define kNtVkNumpad7                      0x67
#define kNtVkNumpad8                      0x68
#define kNtVkNumpad9                      0x69
#define kNtVkMultiply                     0x6A
#define kNtVkAdd                          0x6B
#define kNtVkSeparator                    0x6C
#define kNtVkSubtract                     0x6D
#define kNtVkDecimal                      0x6E
#define kNtVkDivide                       0x6F
#define kNtVkF1                           0x70
#define kNtVkF2                           0x71
#define kNtVkF3                           0x72
#define kNtVkF4                           0x73
#define kNtVkF5                           0x74
#define kNtVkF6                           0x75
#define kNtVkF7                           0x76
#define kNtVkF8                           0x77
#define kNtVkF9                           0x78
#define kNtVkF10                          0x79
#define kNtVkF11                          0x7A
#define kNtVkF12                          0x7B
#define kNtVkF13                          0x7C
#define kNtVkF14                          0x7D
#define kNtVkF15                          0x7E
#define kNtVkF16                          0x7F
#define kNtVkF17                          0x80
#define kNtVkF18                          0x81
#define kNtVkF19                          0x82
#define kNtVkF20                          0x83
#define kNtVkF21                          0x84
#define kNtVkF22                          0x85
#define kNtVkF23                          0x86
#define kNtVkF24                          0x87
#define kNtVkNumlock                      0x90
#define kNtVkScroll                       0x91
#define kNtVkLshift                       0xA0
#define kNtVkRshift                       0xA1
#define kNtVkLcontrol                     0xA2
#define kNtVkRcontrol                     0xA3
#define kNtVkLmenu                        0xA4
#define kNtVkRmenu                        0xA5
#define kNtVkBrowserBack                  0xA6
#define kNtVkBrowserForward               0xA7
#define kNtVkBrowserRefresh               0xA8
#define kNtVkBrowserStop                  0xA9
#define kNtVkBrowserSearch                0xAA
#define kNtVkBrowserFavorites             0xAB
#define kNtVkBrowserHome                  0xAC
#define kNtVkVolumeMute                   0xAD
#define kNtVkVolumeDown                   0xAE
#define kNtVkVolumeUp                     0xAF
#define kNtVkMediaNextTrack               0xB0
#define kNtVkMediaPrevTrack               0xB1
#define kNtVkMediaStop                    0xB2
#define kNtVkMediaPlayPause               0xB3
#define kNtVkLaunchMail                   0xB4
#define kNtVkLaunchMediaSelect            0xB5
#define kNtVkLaunchApp1                   0xB6
#define kNtVkLaunchApp2                   0xB7
#define kNtVkOem_1                        0xBA
#define kNtVkOemPlus                      0xBB
#define kNtVkOemComma                     0xBC
#define kNtVkOemMinus                     0xBD
#define kNtVkOemPeriod                    0xBE
#define kNtVkOem_2                        0xBF
#define kNtVkOem_3                        0xC0
#define kNtVkGamepadA                     0xC3
#define kNtVkGamepadB                     0xC4
#define kNtVkGamepadX                     0xC5
#define kNtVkGamepadY                     0xC6
#define kNtVkGamepadRightShoulder         0xC7
#define kNtVkGamepadLeftShoulder          0xC8
#define kNtVkGamepadLeftTrigger           0xC9
#define kNtVkGamepadRightTrigger          0xCA
#define kNtVkGamepadDpadUp                0xCB
#define kNtVkGamepadDpadDown              0xCC
#define kNtVkGamepadDpadLeft              0xCD
#define kNtVkGamepadDpadRight             0xCE
#define kNtVkGamepadMenu                  0xCF
#define kNtVkGamepadView                  0xD0
#define kNtVkGamepadLeftThumbstickButton  0xD1
#define kNtVkGamepadRightThumbstickButton 0xD2
#define kNtVkGamepadLeftThumbstickUp      0xD3
#define kNtVkGamepadLeftThumbstickDown    0xD4
#define kNtVkGamepadLeftThumbstickRight   0xD5
#define kNtVkGamepadLeftThumbstickLeft    0xD6
#define kNtVkGamepadRightThumbstickUp     0xD7
#define kNtVkGamepadRightThumbstickDown   0xD8
#define kNtVkGamepadRightThumbstickRight  0xD9
#define kNtVkGamepadRightThumbstickLeft   0xDA
#define kNtVkOem_4                        0xDB
#define kNtVkOem_5                        0xDC
#define kNtVkOem_6                        0xDD
#define kNtVkOem_7                        0xDE
#define kNtVkOem_8                        0xDF
#define kNtVkOemAx                        0xE1
#define kNtVkOem_102                      0xE2
#define kNtVkIcoHelp                      0xE3
#define kNtVkIco_00                       0xE4
#define kNtVkProcesskey                   0xE5
#define kNtVkIcoClear                     0xE6
#define kNtVkPacket                       0xE7
#define kNtVkOemReset                     0xE9
#define kNtVkOemJump                      0xEA
#define kNtVkOemPa1                       0xEB
#define kNtVkOemPa2                       0xEC
#define kNtVkOemPa3                       0xED
#define kNtVkOemWsctrl                    0xEE
#define kNtVkOemCusel                     0xEF
#define kNtVkOemAttn                      0xF0
#define kNtVkOemFinish                    0xF1
#define kNtVkOemCopy                      0xF2
#define kNtVkOemAuto                      0xF3
#define kNtVkOemEnlw                      0xF4
#define kNtVkOemBacktab                   0xF5
#define kNtVkAttn                         0xF6
#define kNtVkCrsel                        0xF7
#define kNtVkExsel                        0xF8
#define kNtVkEreof                        0xF9
#define kNtVkPlay                         0xFA
#define kNtVkZoom                         0xFB
#define kNtVkNoname                       0xFC
#define kNtVkPa1                          0xFD
#define kNtVkOemClear                     0xFE



/*!BEGIN libc/nt/enum/wa.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_WA_H_

#define kNtWaInactive    0
#define kNtWaActive      1
#define kNtWaClickactive 2



/*!BEGIN libc/nt/enum/wait.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_WAIT_H_

#define kNtWaitFailed  0xffffffffu
#define kNtWaitTimeout 0x00000102u



/*!BEGIN libc/nt/enum/wm.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_WM_H_

#define kNtWmNull                   0x0000
#define kNtWmCreate                 0x0001
#define kNtWmDestroy                0x0002
#define kNtWmMove                   0x0003
#define kNtWmSize                   0x0005
#define kNtWmActivate               0x0006
#define kNtWmSetfocus               0x0007
#define kNtWmKillfocus              0x0008
#define kNtWmEnable                 0x000A
#define kNtWmSetredraw              0x000B
#define kNtWmSettext                0x000C
#define kNtWmGettext                0x000D
#define kNtWmGettextlength          0x000E
#define kNtWmPaint                  0x000F
#define kNtWmClose                  0x0010
#define kNtWmQueryendsession        0x0011
#define kNtWmQueryopen              0x0013
#define kNtWmEndsession             0x0016
#define kNtWmQuit                   0x0012
#define kNtWmErasebkgnd             0x0014
#define kNtWmSyscolorchange         0x0015
#define kNtWmShowwindow             0x0018
#define kNtWmWininichange           0x001A
#define kNtWmSettingchange          kNtWmWininichange
#define kNtWmDevmodechange          0x001B
#define kNtWmActivateapp            0x001C
#define kNtWmFontchange             0x001D
#define kNtWmTimechange             0x001E
#define kNtWmCancelmode             0x001F
#define kNtWmSetcursor              0x0020
#define kNtWmMouseactivate          0x0021
#define kNtWmChildactivate          0x0022
#define kNtWmQueuesync              0x0023
#define kNtWmGetminmaxinfo          0x0024
#define kNtWmPainticon              0x0026
#define kNtWmIconerasebkgnd         0x0027
#define kNtWmNextdlgctl             0x0028
#define kNtWmSpoolerstatus          0x002A
#define kNtWmDrawitem               0x002B
#define kNtWmMeasureitem            0x002C
#define kNtWmDeleteitem             0x002D
#define kNtWmVkeytoitem             0x002E
#define kNtWmChartoitem             0x002F
#define kNtWmSetfont                0x0030
#define kNtWmGetfont                0x0031
#define kNtWmSethotkey              0x0032
#define kNtWmGethotkey              0x0033
#define kNtWmQuerydragicon          0x0037
#define kNtWmCompareitem            0x0039
#define kNtWmGetobject              0x003D
#define kNtWmCompacting             0x0041
#define kNtWmWindowposchanging      0x0046
#define kNtWmWindowposchanged       0x0047
#define kNtWmPower                  0x0048
#define kNtWmCopydata               0x004A
#define kNtWmCanceljournal          0x004B
#define kNtWmNotify                 0x004E
#define kNtWmInputlangchangerequest 0x0050
#define kNtWmInputlangchange        0x0051
#define kNtWmTcard                  0x0052
#define kNtWmHelp                   0x0053
#define kNtWmUserchanged            0x0054
#define kNtWmNotifyformat           0x0055
#define kNtWmContextmenu            0x007B
#define kNtWmStylechanging          0x007C
#define kNtWmStylechanged           0x007D
#define kNtWmDisplaychange          0x007E
#define kNtWmGeticon                0x007F
#define kNtWmSeticon                0x0080
#define kNtWmNccreate               0x0081
#define kNtWmNcdestroy              0x0082
#define kNtWmNccalcsize             0x0083
#define kNtWmNchittest              0x0084
#define kNtWmNcpaint                0x0085
#define kNtWmNcactivate             0x0086
#define kNtWmGetdlgcode             0x0087
#define kNtWmNcmousemove            0x00A0
#define kNtWmNclbuttondown          0x00A1
#define kNtWmNclbuttonup            0x00A2
#define kNtWmNclbuttondblclk        0x00A3
#define kNtWmNcrbuttondown          0x00A4
#define kNtWmNcrbuttonup            0x00A5
#define kNtWmNcrbuttondblclk        0x00A6
#define kNtWmNcmbuttondown          0x00A7
#define kNtWmNcmbuttonup            0x00A8
#define kNtWmNcmbuttondblclk        0x00A9
#define kNtWmNcxbuttondown          0x00AB
#define kNtWmNcxbuttonup            0x00AC
#define kNtWmNcxbuttondblclk        0x00AD
#define kNtWmKeyfirst               0x0100
#define kNtWmKeydown                0x0100
#define kNtWmKeyup                  0x0101
#define kNtWmChar                   0x0102
#define kNtWmDeadchar               0x0103
#define kNtWmSyskeydown             0x0104
#define kNtWmSyskeyup               0x0105
#define kNtWmSyschar                0x0106
#define kNtWmSysdeadchar            0x0107
#define kNtWmUnichar                0x0109
#define kNtWmKeylast                0x0109
#define kNtWmInitdialog             0x0110
#define kNtWmCommand                0x0111
#define kNtWmSyscommand             0x0112
#define kNtWmTimer                  0x0113
#define kNtWmHscroll                0x0114
#define kNtWmVscroll                0x0115
#define kNtWmInitmenu               0x0116
#define kNtWmInitmenupopup          0x0117
#define kNtWmGesture                0x0119
#define kNtWmGesturenotify          0x011A
#define kNtWmMenuselect             0x011F
#define kNtWmMenuchar               0x0120
#define kNtWmEnteridle              0x0121
#define kNtWmMenurbuttonup          0x0122
#define kNtWmMenudrag               0x0123
#define kNtWmMenugetobject          0x0124
#define kNtWmUninitmenupopup        0x0125
#define kNtWmMenucommand            0x0126
#define kNtWmChangeuistate          0x0127
#define kNtWmUpdateuistate          0x0128
#define kNtWmQueryuistate           0x0129
#define kNtWmMousefirst             0x0200
#define kNtWmMousemove              0x0200
#define kNtWmLbuttondown            0x0201
#define kNtWmLbuttonup              0x0202
#define kNtWmLbuttondblclk          0x0203
#define kNtWmRbuttondown            0x0204
#define kNtWmRbuttonup              0x0205
#define kNtWmRbuttondblclk          0x0206
#define kNtWmMbuttondown            0x0207
#define kNtWmMbuttonup              0x0208
#define kNtWmMbuttondblclk          0x0209
#define kNtWmMousewheel             0x020A
#define kNtWmXbuttondown            0x020B
#define kNtWmXbuttonup              0x020C
#define kNtWmXbuttondblclk          0x020D
#define kNtWmMousehwheel            0x020E
#define kNtWmMouselast              0x020E
#define kNtWmParentnotify           0x0210
#define kNtWmEntermenuloop          0x0211
#define kNtWmExitmenuloop           0x0212
#define kNtWmNextmenu               0x0213
#define kNtWmSizing                 0x0214
#define kNtWmCapturechanged         0x0215
#define kNtWmMoving                 0x0216
#define kNtWmPowerbroadcast         0x0218
#define kNtWmMdicreate              0x0220
#define kNtWmMdidestroy             0x0221
#define kNtWmMdiactivate            0x0222
#define kNtWmMdirestore             0x0223
#define kNtWmMdinext                0x0224
#define kNtWmMdimaximize            0x0225
#define kNtWmMditile                0x0226
#define kNtWmMdicascade             0x0227
#define kNtWmMdiiconarrange         0x0228
#define kNtWmMdigetactive           0x0229
#define kNtWmMdisetmenu             0x0230
#define kNtWmEntersizemove          0x0231
#define kNtWmExitsizemove           0x0232
#define kNtWmDropfiles              0x0233
#define kNtWmMdirefreshmenu         0x0234
#define kNtWmCut                    0x0300
#define kNtWmCopy                   0x0301
#define kNtWmPaste                  0x0302
#define kNtWmClear                  0x0303
#define kNtWmUndo                   0x0304
#define kNtWmRenderformat           0x0305
#define kNtWmRenderallformats       0x0306
#define kNtWmDestroyclipboard       0x0307
#define kNtWmDrawclipboard          0x0308
#define kNtWmPaintclipboard         0x0309
#define kNtWmVscrollclipboard       0x030A
#define kNtWmSizeclipboard          0x030B
#define kNtWmAskcbformatname        0x030C
#define kNtWmChangecbchain          0x030D
#define kNtWmHscrollclipboard       0x030E
#define kNtWmQuerynewpalette        0x030F
#define kNtWmPaletteischanging      0x0310
#define kNtWmPalettechanged         0x0311
#define kNtWmHotkey                 0x0312



/*!BEGIN libc/nt/enum/ws.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_WS_H_

#define kNtWsOverlapped   0x00000000
#define kNtWsPopup        0x80000000
#define kNtWsChild        0x40000000
#define kNtWsMinimize     0x20000000
#define kNtWsVisible      0x10000000
#define kNtWsDisabled     0x08000000
#define kNtWsClipsiblings 0x04000000
#define kNtWsClipchildren 0x02000000
#define kNtWsMaximize     0x01000000
#define kNtWsCaption      0x00C00000
#define kNtWsBorder       0x00800000
#define kNtWsDlgframe     0x00400000
#define kNtWsVscroll      0x00200000
#define kNtWsHscroll      0x00100000
#define kNtWsSysmenu      0x00080000
#define kNtWsThickframe   0x00040000
#define kNtWsGroup        0x00020000
#define kNtWsTabstop      0x00010000
#define kNtWsMinimizebox  0x00020000
#define kNtWsMaximizebox  0x00010000
#define kNtWsTiled        kNtWsOverlapped
#define kNtWsIconic       kNtWsMinimize
#define kNtWsSizebox      kNtWsThickframe
#define kNtWsTiledwindow  kNtWsOverlappedwindow
#define kNtWsOverlappedwindow                                        \
  (kNtWsOverlapped | kNtWsCaption | kNtWsSysmenu | kNtWsThickframe | \
   kNtWsMinimizebox | kNtWsMaximizebox)
#define kNtWsPopupwindow (kNtWsPopup | kNtWsBorder | kNtWsSysmenu)

#define kNtWsExDlgmodalframe       0x00000001
#define kNtWsExNoparentnotify      0x00000004
#define kNtWsExTopmost             0x00000008
#define kNtWsExAcceptfiles         0x00000010
#define kNtWsExTransparent         0x00000020
#define kNtWsExMdichild            0x00000040
#define kNtWsExToolwindow          0x00000080
#define kNtWsExWindowedge          0x00000100
#define kNtWsExClientedge          0x00000200
#define kNtWsExContexthelp         0x00000400
#define kNtWsExRight               0x00001000
#define kNtWsExLeft                0x00000000
#define kNtWsExRtlreading          0x00002000
#define kNtWsExLtrreading          0x00000000
#define kNtWsExLeftscrollbar       0x00004000
#define kNtWsExRightscrollbar      0x00000000
#define kNtWsExControlparent       0x00010000
#define kNtWsExStaticedge          0x00020000
#define kNtWsExAppwindow           0x00040000
#define kNtWsExNoinheritlayout     0x00100000
#define kNtWsExNoredirectionbitmap 0x00200000
#define kNtWsExLayoutrtl           0x00400000
#define kNtWsExComposited          0x02000000
#define kNtWsExNoactivate          0x08000000

#define kNtWsExOverlappedwindow (kNtWsExWindowedge | kNtWsExClientedge)
#define kNtWsExPalettewindow \
  (kNtWsExWindowedge | kNtWsExToolwindow | kNtWsExTopmost)



/*!BEGIN libc/nt/enum/wt.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_WT_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

#define kNtWtExecuteonlyonce 8

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/afd.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_AFD_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

struct NtAfdPollHandleInfo {
  int64_t Handle;
  uint32_t Events;
  NtStatus Status;
};

struct NtAfdPollInfo {
  int64_t Timeout;
  uint32_t NumberOfHandles;
  uint32_t Exclusive;
  struct NtAfdPollHandleInfo Handles[1];
};

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/ansistring.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_ANSISTRING_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtAnsiString {
  unsigned short Length;
  unsigned short MaximumLength;
  char *Buffer;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/byhandlefileinformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_BYHANDLEFILEINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtByHandleFileInformation {
  uint32_t dwFileAttributes; /* ←NtFileFlagAndAttributes */
  struct NtFileTime ftCreationFileTime;
  struct NtFileTime ftLastAccessFileTime;
  struct NtFileTime ftLastWriteFileTime;
  uint32_t dwVolumeSerialNumber;
  uint32_t nFileSizeHigh;
  uint32_t nFileSizeLow;
  uint32_t nNumberOfLinks;
  uint32_t nFileIndexHigh;
  uint32_t nFileIndexLow;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/charinfo.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_CHARINFO_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtCharInfo {
  union {
    char16_t UnicodeChar;
    char AsciiChar;
  } Char;
  uint16_t Attributes;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/clientid.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_CLIENTID_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtClientId {
  void *UniqueProcess;
  void *UniqueThread;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/consolecursorinfo.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_CONSOLECURSORINFO_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtConsoleCursorInfo {
  uint32_t dwSize;
  bool32 bVisible;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/consolescreenbufferinfo.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_CONSOLESCREENBUFFERINFO_H_


/*!BEGIN libc/nt/struct/coord.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_COORD_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtCoord {
  int16_t X;
  int16_t Y;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/smallrect.h */

#define COSMOPOLITAN_LIBC_NT_ENUM_SMALLRECT_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtSmallRect {
  int16_t Left;
  int16_t Top;
  int16_t Right;
  int16_t Bottom;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtConsoleScreenBufferInfo {
  struct NtCoord dwSize;
  struct NtCoord dwCursorPosition;
  uint16_t wAttributes;
  struct NtSmallRect srWindow;
  struct NtCoord dwMaximumWindowSize;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/consolescreenbufferinfoex.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_CONSOLESCREENBUFFERINFOEX_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtConsoleScreenBufferInfoEx {
  uint32_t cbSize; /* sizeof(struct NtConsoleScreenBufferInfoEx) */
  struct NtCoord dwSize;
  struct NtCoord dwCursorPosition;
  uint16_t wAttributes; /* kNt{Foreground,Background}... */
  struct NtSmallRect srWindow;
  struct NtCoord dwMaximumWindowSize;
  uint16_t wPopupAttributes;
  bool32 bFullscreenSupported;
  uint32_t ColorTable[16]; /* 0x00BBGGRR */
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/consoleselectioninfo.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_CONSOLESELECTIONINFO_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtConsoleSelectionInfo {
  uint32_t dwFlags;
  struct NtCoord dwSelectionAnchor;
  struct NtSmallRect srSelection;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/context.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_CONTEXT_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtM128A {
  uint64_t Low;
  int64_t High;
};

struct NtXmmSaveArea32 { /* basically same as struct FpuState */
  uint16_t ControlWord;
  uint16_t StatusWord;
  uint8_t TagWord;
  uint8_t Reserved1;
  uint16_t ErrorOpcode;
  uint32_t ErrorOffset;
  uint16_t ErrorSelector;
  uint16_t Reserved2;
  uint32_t DataOffset;
  uint16_t DataSelector;
  uint16_t Reserved3;
  uint32_t MxCsr;
  uint32_t MxCsr_Mask;
  struct NtM128A FloatRegisters[8];
  struct NtM128A XmmRegisters[16];
  uint8_t Reserved4[96];
};

struct NtContext {
  uint64_t P1Home, P2Home, P3Home, P4Home, P5Home, P6Home;
  uint32_t ContextFlags;
  uint32_t MxCsr;
  uint16_t SegCs, SegDs, SegEs, SegFs, SegGs, SegSs;
  uint32_t EFlags;
  uint64_t Dr0, Dr1, Dr2, Dr3, Dr6, Dr7;
  uint64_t Rax, Rcx, Rdx, Rbx, Rsp, Rbp, Rsi, Rdi;
  uint64_t R8, R9, R10, R11, R12, R13, R14, R15;
  uint64_t Rip;
  union {
    struct NtXmmSaveArea32 FltSave;
    struct NtXmmSaveArea32 FloatSave;
    struct {
      struct NtM128A Header[2];
      struct NtM128A Legacy[8];
      struct NtM128A Xmm0, Xmm1, Xmm2, Xmm3, Xmm4, Xmm5, Xmm6, Xmm7;
      struct NtM128A Xmm8, Xmm9, Xmm10, Xmm11, Xmm12, Xmm13, Xmm14, Xmm15;
    };
  };
  struct NtM128A VectorRegister[26];
  uint64_t VectorControl;
  uint64_t DebugControl;
  uint64_t LastBranchToRip;
  uint64_t LastBranchFromRip;
  uint64_t LastExceptionToRip;
  uint64_t LastExceptionFromRip;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/criticalsection.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_CRITICALSECTION_H_


/*!BEGIN libc/nt/struct/criticalsectiondebug.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_CRITICALSECTIONDEBUG_H_


/*!BEGIN libc/nt/struct/linkedlist.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_LINKEDLIST_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

/**
 * Dynamic linked list overlay.
 */
struct NtLinkedList {
  struct NtLinkedList *Next;
  struct NtLinkedList *Prev;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtCriticalSectionDebug {
  uint16_t Type;
  uint16_t CreatorBackTraceIndex;
  struct NtCriticalSection *CriticalSection;
  struct NtLinkedList ProcessLocksList;
  uint32_t EntryCount;
  uint32_t ContentionCount;
  uint32_t Spare[2];
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtCriticalSection {
  struct NtCriticalSectionDebug *DebugInfo;
  int32_t LockCount;
  int32_t RecursionCount;
  void *OwningThread;
  void *LockSemaphore;
  uintptr_t SpinCount;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/drawtextparams.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_DRAWTEXTPARAMS_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

struct NtDrawTextParams {
  uint32_t cbSize;
  int32_t iTabLength;
  int32_t iLeftMargin;
  int32_t iRightMargin;
  uint32_t uiLengthDrawn;
};

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/editmenu.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_EDITMENU_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtEditMenu {
  int64_t hmenu;
  uint16_t idEdit;
  uint16_t idCut;
  uint16_t idCopy;
  uint16_t idPaste;
  uint16_t idClear;
  uint16_t idUndo;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/exceptionframe.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_EXCEPTIONFRAME_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtExceptionFrame {
  struct NtExceptionFrame *Prev;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/fileaccessinformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEACCESSINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtFileAccessInformation {
  uint32_t AccessFlags;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/filealignmentinformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEALIGNMENTINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtFileAlignmentInformation {
  uint32_t AlignmentRequirement;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/fileallinformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEALLINFORMATION_H_


/*!BEGIN libc/nt/struct/filebasicinformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEBASICINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtFileBasicInformation {
  int64_t CreationTime;    /* in 100ns units */
  int64_t LastAccessTime;  /* in 100ns units */
  int64_t LastWriteTime;   /* in 100ns units */
  int64_t ChangeTime;      /* in 100ns units */
  uint32_t FileAttributes; /* kNtFileAttributeXXX */
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/fileeainformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEEAINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtFileEaInformation {
  uint32_t EaSize;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/fileinternalinformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEINTERNALINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtFileInternalInformation {
  int64_t IndexNumber;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/filemodeinformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEMODEINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtFileModeInformation {
  uint32_t Mode;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/filenameinformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_FILENAMEINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtFileNameInformation {
  uint32_t FileNameLength;
  char16_t FileName[1];
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/filepositioninformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEPOSITIONINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtFilePositionInformation {
  int64_t CurrentByteOffset;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/filestandardinformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_FILESTANDARDINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtFileStandardInformation {
  int64_t AllocationSize;
  int64_t EndOfFile;
  uint32_t NumberOfLinks;
  bool32 DeletePending;
  bool32 Directory;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtFileAllInformation {
  struct NtFileBasicInformation BasicInformation;
  struct NtFileStandardInformation StandardInformation;
  struct NtFileInternalInformation InternalInformation;
  struct NtFileEaInformation EaInformation;
  struct NtFileAccessInformation AccessInformation;
  struct NtFilePositionInformation PositionInformation;
  struct NtFileModeInformation ModeInformation;
  struct NtFileAlignmentInformation AlignmentInformation;
  struct NtFileNameInformation NameInformation;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/fileallocationinformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEALLOCATIONINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtFileAllocationInformation {
  int64_t AllocationSize;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/fileattributetaginformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEATTRIBUTETAGINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtFileAttributeTagInformation {
  uint32_t FileAttributes;
  uint32_t ReparseTag;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/filebasicinfo.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEBASICINFO_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtFileBasicInfo {
  int64_t CreationTime;    /* in 100ns units */
  int64_t LastAccessTime;  /* in 100ns units */
  int64_t LastWriteTime;   /* in 100ns units */
  int64_t ChangeTime;      /* in 100ns units */
  uint32_t FileAttributes; /* kNtFileAttributeXXX */
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/filebothdirectoryinformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEBOTHDIRECTORYINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

struct NtFileBothDirectoryInformation {
  uint32_t NextEntryOffset;
  uint32_t FileIndex;
  int64_t CreationTime;
  int64_t LastAccessTime;
  int64_t LastWriteTime;
  int64_t ChangeTime;
  int64_t EndOfFile;
  int64_t AllocationSize;
  uint32_t FileAttributes;
  uint32_t FileNameLength;
  uint32_t EaSize;
  unsigned char ShortNameLength;
  char16_t ShortName[12];
  char16_t FileName[1];
};

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/filecompressioninfo.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_FILECOMPRESSIONINFO_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtFileCompressionInfo {
  int64_t CompressedFileSize;
  uint16_t CompressionFormat;
  uint8_t CompressionUnitShift;
  uint8_t ChunkShift;
  uint8_t ClusterShift;
  uint8_t Reserved[3];
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/filedirectoryinformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEDIRECTORYINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtFileDirectoryInformation {
  uint32_t NextEntryOffset;
  uint32_t FileIndex;
  int64_t CreationTime;
  int64_t LastAccessTime;
  int64_t LastWriteTime;
  int64_t ChangeTime;
  int64_t EndOfFile;
  int64_t AllocationSize;
  uint32_t FileAttributes;
  uint32_t FileNameLength;
  char16_t FileName[1];
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/filedispositioninformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEDISPOSITIONINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtFileDispositionInformation {
  bool32 DoDeleteFile;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/fileendoffileinformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEENDOFFILEINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct FileEndOfFileInformation {
  int64_t EndOfFile;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/filefulldirectoryinformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEFULLDIRECTORYINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtFileFullDirectoryInformation {
  uint32_t NextEntryOffset;
  uint32_t FileIndex;
  int64_t CreationTime;
  int64_t LastAccessTime;
  int64_t LastWriteTime;
  int64_t ChangeTime;
  int64_t EndOfFile;
  int64_t AllocationSize;
  uint32_t FileAttributes;
  uint32_t FileNameLength;
  uint32_t EaSize;
  char16_t FileName[1];
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/filefulleainformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEFULLEAINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtFileFullEaInformation {
  uint32_t NextEntryOffset;
  uint8_t Flags;
  uint8_t EaNameLength;
  uint16_t EaValueLength;
  char EaName[1];
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/filemailslotqueryinformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEMAILSLOTQUERYINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtFileMailslotQueryInformation {
  uint32_t MaximumMessageSize;
  uint32_t MailslotQuota;
  uint32_t NextMessageSize;
  uint32_t MessagesAvailable;
  int64_t ReadTimeout;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/filemailslotsetinformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEMAILSLOTSETINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtFileMailslotSetInformation {
  int64_t ReadTimeout;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/filenamesinformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_FILENAMESINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtFileNamesInformation {
  uint32_t NextEntryOffset;
  uint32_t FileIndex;
  uint32_t FileNameLength;
  char16_t FileName[1];
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/filenetworkopeninformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_FILENETWORKOPENINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtFileNetworkOpenInformation {
  int64_t CreationTime;
  int64_t LastAccessTime;
  int64_t LastWriteTime;
  int64_t ChangeTime;
  int64_t AllocationSize;
  int64_t EndOfFile;
  uint32_t FileAttributes;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/filepipelocalinformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEPIPELOCALINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtFilePipeLocalInformation {
  uint32_t NamedPipeType;
  uint32_t NamedPipeConfiguration;
  uint32_t MaximumInstances;
  uint32_t CurrentInstances;
  uint32_t InboundQuota;
  uint32_t ReadDataAvailable;
  uint32_t OutboundQuota;
  uint32_t WriteQuotaAvailable;
  uint32_t NamedPipeState;
  uint32_t NamedPipeEnd;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/filerenameinformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_FILERENAMEINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtFileRenameInformation {
  bool32 Replace;
  void *RootDir;
  uint32_t FileNameLength;
  char16_t FileName[1];
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/filesegmentelement.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_FILESEGMENTELEMENT_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

union NtFileSegmentElement {
  void *Buffer;
  uint64_t Alignment;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/filestreaminformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_FILESTREAMINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtFileStreamInformation {
  uint32_t NextEntryOffset;
  uint32_t StreamNameLength;
  int64_t StreamSize;
  int64_t StreamAllocationSize;
  char16_t StreamName[1];
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/filezerodatainformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_FILEZERODATAINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtFileZeroDataInformation {
  uint64_t FileOffset;
  uint64_t BeyondFinalZero;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/fpodata.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_FPODATA_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtFpoData {
  /* TODO(jart): No bitfields. */
  uint32_t ulOffStart;
  uint32_t cbProcSize;
  uint32_t cdwLocals;
  uint16_t cdwParams;
  uint16_t cbProlog : 8;
  uint16_t cbRegs : 3;
  uint16_t fHasSEH : 1;
  uint16_t fUseBP : 1;
  uint16_t reserved : 1;
  uint16_t cbFrame : 2;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/genericmapping.h */

#define COSMOPOLITAN_LIBC_NT_GENERICMAPPING_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtGenericMapping {
  unsigned int GenericRead;
  unsigned int GenericWrite;
  unsigned int GenericExecute;
  unsigned int GenericAll;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/guid.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_GUID_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

struct NtGuid {
  uint32_t Data1;
  uint16_t Data2;
  uint16_t Data3;
  uint8_t Data4[8];
};

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/inputrecord.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_INPUTRECORD_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtKeyEventRecord {
  bool32 bKeyDown;
  uint16_t wRepeatCount;
  uint16_t wVirtualKeyCode;
  uint16_t wVirtualScanCode;
  union {
    int16_t UnicodeChar;
    char AsciiChar;
  } uChar;
  unsigned int dwControlKeyState;
};

struct NtMouseEventRecord {
  struct NtCoord dwMousePosition;
  uint32_t dwButtonState;
  uint32_t dwControlKeyState;
  uint32_t dwEventFlags;
};

struct NtWindowBufferSizeRecord {
  struct NtCoord dwSize;
};

struct NtMenuEventRecord {
  uint32_t dwCommandId;
};

struct NtFocusEventRecord {
  bool32 bSetFocus;
};

struct NtInputRecord {
  uint16_t EventType;
  union {
    struct NtKeyEventRecord KeyEvent;
    struct NtMouseEventRecord MouseEvent;
    struct NtWindowBufferSizeRecord WindowBufferSizeEvent;
    struct NtMenuEventRecord MenuEvent;
    struct NtFocusEventRecord FocusEvent;
  } Event;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/iocounters.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_IOCOUNTERS_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtIoCounters {
  uint64_t ReadOperationCount;
  uint64_t WriteOperationCount;
  uint64_t OtherOperationCount;
  uint64_t ReadTransferCount;
  uint64_t WriteTransferCount;
  uint64_t OtherTransferCount;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/iostatusblock.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_IOSTATUSBLOCK_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtIoStatusBlock {
  union {
    NtStatus Status;
    void *Pointer; /* reserved for internal use */
  };
  uint32_t *Information; /* request dependent */
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/kernelusertimes.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_KERNELUSERTIMES_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtKernelUserTimes {
  uint64_t CreateFileTime;
  uint64_t ExitFileTime;
  int64_t KernelTime;
  int64_t UserTime;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/ldr.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_LDR_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtLdr {
  uint32_t SizeOfThis;                       /* msdn:reserved */
  uint32_t IsInitialized;                    /* msdn:reserved */
  void *SsHandle;                            /* msdn:reserved */
  struct NtLinkedList InLoadOrderModuleList; /* msdn:reserved */
  struct NtLinkedList /*∩NtLdrDataTableEntry*/ InMemoryOrderModuleList;
  struct NtLinkedList InInitOrderModuleList; /* msdn:reserved */
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/ldrdatatableentry.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_LDRDATATABLEENTRY_H_


/*!BEGIN libc/nt/struct/unicodestring.h */

#define COSMOPOLITAN_LIBC_NT_UNICODE_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtUnicodeString {
  uint16_t Length;
  uint16_t MaxLength;
  char16_t *Data;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtLdrDataTableEntry {
  struct NtLinkedList InLoadOrderLinks; /* msdn:reserved */
  struct NtLinkedList InMemoryOrderLinks;
  struct NtLinkedList InInitOrderLinks; /* msdn:reserved */
  void *DllBase;
  void *EntryPoint;
  union {
    uint32_t SizeOfImage;
    unsigned char SizeOfImagePadding[__SIZEOF_POINTER__];
  };
  struct NtUnicodeString FullDllName;
  struct NtUnicodeString BaseDllName;
  uint32_t Flags;
  uint16_t Load_Count;
  uint16_t TlsIndex;
  union {
    struct NtLinkedList HashLinks;
    struct {
      void *SectionPointer;
      uint32_t CheckSum;
    };
  };
  union {
    void *LoadedImports;
    uint32_t TimeDateStamp;
  };
  void *EntryPointActivationContext;
  void *PatchInformation;
  struct NtLinkedList ForwarderLinks;
  struct NtLinkedList ServiceTagLinks;
  struct NtLinkedList StaticLinks;
  void *ContextInformation;
  uintptr_t OriginalBase;
  int64_t LoadTime;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/luid.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_LUID_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtLuid {
  uint32_t LowPart;
  int32_t HighPart;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/luidandattributes.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_LUIDANDATTRIBUTES_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtLuidAndAttributes {
  struct NtLuid Luid;
  uint32_t Attributes;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/memorybasicinformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_MEMORYBASICINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtMemoryBasicInformation {
  void *BaseAddress;
  void *AllocationBase;
  uint32_t AllocationProtect;
  uint64_t RegionSize;
  uint32_t State;
  uint32_t Protect;
  uint32_t Type;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/memoryrangeentry.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_MEMORYRANGEENTRY_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtMemoryRangeEntry {
  void *VirtualAddress;
  size_t NumberOfBytes;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/memorystatusex.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_MEMORYSTATUSEX_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtMemoryStatusEx {
  uint32_t dwLength;
  uint32_t dwMemoryLoad;
  uint64_t ullTotalPhys;
  uint64_t ullAvailPhys;
  uint64_t ullTotalPageFile;
  uint64_t ullAvailPageFile;
  uint64_t ullTotalVirtual;
  uint64_t ullAvailVirtual;
  uint64_t ullAvailExtendedVirtual;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/msg.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_MSG_H_


/*!BEGIN libc/nt/struct/point.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_POINT_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtPoint {
  int32_t x;
  int32_t y;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtMsg {
  int64_t hwnd;
  uint32_t message;
  uint64_t wParam;
  int64_t lParam;
  uint32_t time;
  struct NtPoint pt;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/nonpageddebuginfo.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_NONPAGEDDEBUGINFO_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtNonPagedDebugInfo {
  uint16_t Signature;
  uint16_t Flags;
  uint32_t Size;
  uint16_t Machine;
  uint16_t Characteristics;
  uint32_t TimeDateStamp;
  uint32_t CheckSum;
  uint32_t SizeOfImage;
  uint64_t ImageBase;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/ntexceptionpointers.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_NTEXCEPTIONPOINTERS_H_


/*!BEGIN libc/nt/struct/ntexceptionrecord.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_NTEXCEPTIONRECORD_H_

#define kNtExceptionMaximumParameters 15
#define kNtExceptionNoncontinuable 1

#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtExceptionRecord {
  uint32_t ExceptionCode;                    /* kNtException... */
  uint32_t ExceptionFlags;                   /* kNtExceptionNoncontinuable */
  struct NtExceptionRecord *ExceptionRecord; /* nested exceptions */
  void *ExceptionAddress;                    /* %rip */
  uint32_t NumberParameters;                 /* #ExceptionInformation */
  uint32_t *ExceptionInformation[kNtExceptionMaximumParameters];
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtExceptionPointers {
  struct NtExceptionRecord *ExceptionRecord;
  struct NtContext *ContextRecord;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/objectallinformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_OBJECTALLINFORMATION_H_


/*!BEGIN libc/nt/struct/objecttypeinformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_OBJECTTYPEINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtObjectTypeInformation {
  struct NtUnicodeString TypeName;
  uint32_t TotalNumberOfObjects;
  uint32_t TotalNumberOfHandles;
  uint32_t TotalPagedPoolUsage;
  uint32_t TotalNonPagedPoolUsage;
  uint32_t TotalNamePoolUsage;
  uint32_t TotalHandleTableUsage;
  uint32_t HighWaterNumberOfObjects;
  uint32_t HighWaterNumberOfHandles;
  uint32_t HighWaterPagedPoolUsage;
  uint32_t HighWaterNonPagedPoolUsage;
  uint32_t HighWaterNamePoolUsage;
  uint32_t HighWaterHandleTableUsage;
  uint32_t InvalidAttributes;
  struct NtGenericMapping GenericMapping;
  uint32_t ValidAccessMask;
  bool32 SecurityRequired;
  bool32 MaintainHandleCount;
  uint32_t PoolType;
  uint32_t DefaultPagedPoolCharge;
  uint32_t DefaultNonPagedPoolCharge;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtObjectAllInformation {
  uint32_t NumberOfObjects;
  struct NtObjectTypeInformation ObjectTypeInformation[1];
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/objectattributes.h */

#define COSMOPOLITAN_LIBC_NT_I_OBJECTATTRIBUTES_H_


/*!BEGIN libc/nt/struct/rtluserprocessparameters.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_RTLUSERPROCESSPARAMETERS_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtRtlUserProcessParameters {
  uint32_t MaximumLength;
  uint32_t Length;
  uint32_t Flags;
  uint32_t DebugFlags;
  int64_t ConsoleHandle;
  uint32_t ConsoleFlags;
  int64_t StdInputHandle;
  int64_t StdOutputHandle;
  int64_t StdErrorHandle;
  struct NtUnicodeString *CurrentDirectoryPath;
  int64_t CurrentDirectoryHandle;
  struct NtUnicodeString *DllPath;
  struct NtUnicodeString *ImagePathName;
  struct NtUnicodeString *CommandLine;
  void *Environment;
  uint32_t StartingPositionLeft;
  uint32_t StartingPositionTop;
  uint32_t Width;
  uint32_t Height;
  uint32_t CharWidth;
  uint32_t CharHeight;
  uint32_t ConsoleTextAttributes;
  uint32_t WindowFlags;
  uint32_t ShowWindowFlags;
  struct NtUnicodeString *WindowTitle;
  struct NtUnicodeString *DesktopName;
  struct NtUnicodeString *ShellInfo;
  struct NtUnicodeString *RuntimeData;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtObjectAttributes {
  uint32_t Length;
  int64_t RootDirectory;
  struct NtUnicodeString *ObjectName;
  uint32_t Attributes; /* OBJ_INHERIT, etc. */
  struct NtSecurityDescriptor *SecurityDescriptor;
  void *SecurityQualityOfService;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/objectbasicinformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_OBJECTBASICINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtObjectBasicInformation {
  uint32_t Attributes;
  uint32_t GrantedAccess;
  uint32_t HandleCount;
  uint32_t PointerCount;
  uint32_t PagedPoolUsage;
  uint32_t NonPagedPoolUsage;
  uint32_t Reserved[3];
  uint32_t NameInformationLength;
  uint32_t TypeInformationLength;
  uint32_t SecurityDescriptorLength;
  int64_t CreateTime;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/objectnameinformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_OBJECTNAMEINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtObjectNameInformation {
  struct NtUnicodeString Name;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/openfilename.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_OPENFILENAME_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtOpenFilename {
  uint32_t lStructSize;
  int64_t hwndOwner;
  int64_t hInstance;
  const char16_t *lpstrFilter;
  char16_t *lpstrCustomFilter;
  uint32_t nMaxCustFilter;
  uint32_t nFilterIndex;
  char16_t *lpstrFile;
  uint32_t nMaxFile;
  char16_t *lpstrFileTitle;
  uint32_t nMaxFileTitle;
  const char16_t *lpstrInitialDir;
  const char16_t *lpstrTitle;
  uint32_t Flags;
  uint16_t nFileOffset;
  uint16_t nFileExtension;
  const char16_t *lpstrDefExt;
  intptr_t lCustData;
  uint64_t (*lpfnHook)(int64_t, uint32_t, uint64_t, int64_t);
  const char16_t *lpTemplateName;
  void *pvReserved;
  uint32_t dwReserved;
  uint32_t FlagsEx;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/overlapped.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_OVERLAPPED_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtOverlapped {
  uintptr_t Internal;
  uintptr_t InternalHigh;
  union {
    struct {
      uint32_t Offset;
      uint32_t OffsetHigh;
    };
    void *Pointer;
  };
  int64_t hEvent;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/overlappedentry.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_OVERLAPPEDENTRY_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

struct NtOverlappedEntry {
  uint32_t *lpCompletionKey;
  struct NtOverlapped *lpOverlapped;
  uint32_t *Internal;
  uint32_t dwNumberOfBytesTransferred;
};

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/paintstruct.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_PAINTSTRUCT_H_


/*!BEGIN libc/nt/struct/rect.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_RECT_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtRect {
  int32_t left;
  int32_t top;
  int32_t right;
  int32_t bottom;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtPaintStruct {
  int64_t hdc;
  bool32 fErase;
  struct NtRect rcPaint;
  bool32 fRestore;
  bool32 fIncUpdate;
  uint8_t rgbReserved[32];
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/peb.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_PEB_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtPeb {
  union {
    struct {
      unsigned char InheritedAddressSpace;
      unsigned char ReadImageFileExecOptions;
      unsigned char BeingDebugged;
      unsigned char __wut1;
    };
    uint64_t __wut2;
  };
  uint64_t Mutant;
  uint64_t ImageBaseAddress;
  struct NtLdr *Ldr;
  uint64_t ProcessParameters;
  uint64_t SubSystemData;
  uint64_t ProcessHeap;
  uint64_t FastPebLock;
  uint64_t __wut3;
  uint64_t __wut4;
  uint64_t __wut5;
  union {
    uint64_t KernelCallbackTable;
    uint64_t UserSharedInfoPtr;
  };
  uint32_t SystemReserved;
  uint32_t __wut6;
  uint64_t __wut7;
  uint64_t TlsExpansionCounter;
  uint64_t TlsBitmap;
  uint32_t TlsBitmapBits[2];
  uint64_t ReadOnlySharedMemoryBase;
  uint64_t __wut8;
  uint64_t ReadOnlyStaticServerData;
  uint64_t AnsiCodePageData;
  uint64_t OemCodePageData;
  uint64_t UnicodeCaseTableData;
  uint32_t NumberOfProcessors;
#ifdef __x86_64__
  uint32_t NtGlobalFlag;
#else
  uint64_t NtGlobalFlag;
#endif
  int64_t CriticalSectionTimeout;
  uint64_t HeapSegmentReserve;
  uint64_t HeapSegmentCommit;
  uint64_t HeapDeCommitTotalFreeThreshold;
  uint64_t HeapDeCommitFreeBlockThreshold;
  uint32_t NumberOfHeaps;
  uint32_t MaximumNumberOfHeaps;
  uint64_t ProcessHeaps;
  uint64_t GdiSharedHandleTable;
  uint64_t ProcessStarterHelper;
  uint64_t GdiDCAttributeList;
  uint64_t LoaderLock;
  union {
    struct {
      uint32_t OSMajorVersion;
      uint32_t OSMinorVersion;
    };
    uint64_t OSVersion;
  };
  uint16_t OSBuildNumber;
  uint16_t OSCSDVersion;
  uint32_t OSPlatformId;
  uint32_t ImageSubsystem;
  uint32_t ImageSubsystemMajorVersion;
  uint64_t ImageSubsystemMinorVersion;
  union {
    uint64_t ImageProcessAffinityMask;
    uint64_t ActiveProcessAffinityMask;
  };
  uint64_t GdiHandleBuffer[38 - __SIZEOF_POINTER__];
  uint64_t PostProcessInitRoutine;
  uint64_t TlsExpansionBitmap;
  uint32_t TlsExpansionBitmapBits[32];
  uint64_t SessionId;
  uint64_t AppCompatFlags;
  uint64_t AppCompatFlagsUser;
  uint64_t pShimData;
  uint64_t AppCompatInfo;
  struct NtUnicodeString CSDVersion;
  uint64_t ActivationContextData;
  uint64_t ProcessAssemblyStorageMap;
  uint64_t SystemDefaultActivationContextData;
  uint64_t SystemAssemblyStorageMap;
  uint64_t MinimumStackCommit;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/pollfd.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_POLLFD_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct sys_pollfd_nt {
  int64_t handle;
  int16_t events;
  int16_t revents;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/privilegeset.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_PRIVILEGESET_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtPrivilegeSet {
  uint32_t PrivilegeCount;
  uint32_t Control;
  struct NtLuidAndAttributes Privilege[1];
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/processbasicinformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_PROCESSBASICINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtProcessBasicInformation {
  int32_t ExitStatus;
  struct NtPeb *PebBaseAddress;
  uint32_t *AffinityMask;
  int32_t BasePriority;
  int64_t UniqueProcessId;
  int64_t InheritedFromUniqueProcessId;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/procthreadattributelist.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_PROCTHREADATTRIBUTELIST_H_

struct NtProcThreadAttributeList;



/*!BEGIN libc/nt/struct/rtluserprocessinformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_RTLUSERPROCESSINFORMATION_H_


/*!BEGIN libc/nt/struct/sectionimageinformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_SECTIONIMAGEINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtSectionImageInformation {
  void *EntryPoint;
  uint32_t Unknown1;
  uint32_t StackReserve;
  uint32_t StackCommit;
  uint32_t Subsystem;
  uint16_t MinorSubsystemVersion;
  uint16_t MajorSubsystemVersion;
  uint32_t Unknown2;
  uint32_t Characteristics;
  uint16_t ImageNumber;
  uint32_t IsExecutable;
  uint8_t __wut1;
  uint32_t __wut2[3];
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtRtlUserProcessInformation {
  uint32_t SizeOfThis;
  int64_t ProcessHandle;
  int64_t ThreadHandle;
  struct NtClientId ClientId;
  struct NtSectionImageInformation ImageInformation;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/size.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_SIZE_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

struct NtSize {
  int32_t cx;
  int32_t cy;
};

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/startupinfoex.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_STARTUPINFOEX_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtStartupInfoEx {
  struct NtStartupInfo StartupInfo;
  struct NtProcThreadAttributeList *lpAttributeList;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/systembasicinformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_SYSTEMBASICINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtSystemBasicInformation {
  unsigned char Reserved1[4];
  uint32_t MaximumIncrement;
  uint32_t PhysicalPageSize;
  uint32_t NumberOfPhysicalPages;
  uint32_t LowestPhysicalPage;
  uint32_t HighestPhysicalPage;
  uint32_t AllocationGranularity;
  uint32_t LowestUserAddress;
  uint32_t HighestUserAddress;
  uint32_t ActiveProcessors;
  char NumberOfProcessors;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/systemexceptioninformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_SYSTEMEXCEPTIONINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtSystemExceptionInformation {
  unsigned char Reserved1[16];
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/systemhandleentry.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_SYSTEMHANDLEENTRY_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtSystemHandleEntry {
  uint32_t OwnerPid;
  unsigned char ObjectType;
  unsigned char HandleFlags;
  unsigned short HandleValue;
  void *ObjectPointer;
  uint32_t AccessMask;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/systemhandleinformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_SYSTEMHANDLEINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtSystemHandleInformation {
  uint32_t Count;
  struct NtSystemHandleEntry Handle[1];
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/systeminfo.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_SYSTEMINFO_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtSystemInfo {
  union {
    uint32_t dwOemId;
    struct {
      uint16_t wProcessorArchitecture;
      uint16_t wReserved;
    };
  };
  uint32_t dwPageSize;
  void *lpMinimumApplicationAddress;
  void *lpMaximumApplicationAddress;
  uintptr_t dwActiveProcessorMask;
  uint32_t dwNumberOfProcessors;
  uint32_t dwProcessorType;
  uint32_t dwAllocationGranularity;
  uint16_t wProcessorLevel;
  uint16_t wProcessorRevision;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/systeminterruptinformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_SYSTEMINTERRUPTINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtSystemInterruptInformation {
  unsigned char Reserved1[24];
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/systemlookasideinformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_SYSTEMLOOKASIDEINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtSystemLookasideInformation {
  unsigned char Reserved1[32];
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/systemperformanceinformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_SYSTEMPERFORMANCEINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtSystemPerformanceInformation {
  int64_t IdleTime;
  int64_t ReadTransferCount;
  int64_t WriteTransferCount;
  int64_t OtherTransferCount;
  uint32_t ReadOperationCount;
  uint32_t WriteOperationCount;
  uint32_t OtherOperationCount;
  uint32_t AvailablePages;
  uint32_t TotalCommittedPages;
  uint32_t TotalCommitLimit;
  uint32_t PeakCommitment;
  uint32_t PageFaults;
  uint32_t WriteCopyFaults;
  uint32_t TransitionFaults;
  uint32_t CacheTransitionFaults;
  uint32_t DemandZeroFaults;
  uint32_t PagesRead;
  uint32_t PageReadIos;
  uint32_t CacheReads;
  uint32_t CacheIos;
  uint32_t PagefilePagesWritten;
  uint32_t PagefilePageWriteIos;
  uint32_t MappedFilePagesWritten;
  uint32_t MappedFilePageWriteIos;
  uint32_t PagedPoolUsage;
  uint32_t NonPagedPoolUsage;
  uint32_t PagedPoolAllocs;
  uint32_t PagedPoolFrees;
  uint32_t NonPagedPoolAllocs;
  uint32_t NonPagedPoolFrees;
  uint32_t TotalFreeSystemPtes;
  uint32_t SystemCodePage;
  uint32_t TotalSystemDriverPages;
  uint32_t TotalSystemCodePages;
  uint32_t SmallNonPagedLookasideListAllocateHits;
  uint32_t SmallPagedLookasideListAllocateHits;
  uint32_t Reserved3;
  uint32_t MmSystemCachePage;
  uint32_t PagedPoolPage;
  uint32_t SystemDriverPage;
  uint32_t FastReadNoWait;
  uint32_t FastReadWait;
  uint32_t FastReadResourceMiss;
  uint32_t FastReadNotPossible;
  uint32_t FastMdlReadNoWait;
  uint32_t FastMdlReadWait;
  uint32_t FastMdlReadResourceMiss;
  uint32_t FastMdlReadNotPossible;
  uint32_t MapDataNoWait;
  uint32_t MapDataWait;
  uint32_t MapDataNoWaitMiss;
  uint32_t MapDataWaitMiss;
  uint32_t PinMappedDataCount;
  uint32_t PinReadNoWait;
  uint32_t PinReadWait;
  uint32_t PinReadNoWaitMiss;
  uint32_t PinReadWaitMiss;
  uint32_t CopyReadNoWait;
  uint32_t CopyReadWait;
  uint32_t CopyReadNoWaitMiss;
  uint32_t CopyReadWaitMiss;
  uint32_t MdlReadNoWait;
  uint32_t MdlReadWait;
  uint32_t MdlReadNoWaitMiss;
  uint32_t MdlReadWaitMiss;
  uint32_t ReadAheadIos;
  uint32_t LazyWriteIos;
  uint32_t LazyWritePages;
  uint32_t DataFlushes;
  uint32_t DataPages;
  uint32_t ContextSwitches;
  uint32_t FirstLevelTbFills;
  uint32_t SecondLevelTbFills;
  uint32_t SystemCalls;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/systemprocessinformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_SYSTEMPROCESSINFORMATION_H_


/*!BEGIN libc/nt/struct/vmcounters.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_VMCOUNTERS_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtVmCounters {
  size_t PeakVirtualSize;
  size_t VirtualSize;
  uint32_t PageFaultCount;
  size_t PeakWorkingSetSize;
  size_t WorkingSetSize;
  size_t QuotaPeakPagedPoolUsage;
  size_t QuotaPagedPoolUsage;
  size_t QuotaPeakNonPagedPoolUsage;
  size_t QuotaNonPagedPoolUsage;
  size_t PagefileUsage;
  size_t PeakPagefileUsage;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtSystemProcessInformation {
  uint32_t NextEntryOffset;
  uint32_t NumberOfThreads;
  int64_t Reserved[3];
  int64_t CreateTime;
  int64_t UserTime;
  int64_t KernelTime;
  struct NtUnicodeString ImageName;
  int32_t BasePriority;
  int64_t UniqueProcessId;
  int64_t InheritedFromUniqueProcessId;
  uint32_t HandleCount;
  uint32_t SessionId;
  uint32_t PageDirectoryBase;
  struct NtVmCounters VirtualMemoryCounters;
  size_t PrivatePageCount;
  struct NtIoCounters IoCounters;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/systemprocessorinformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_SYSTEMPROCESSORINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtSystemProcessorInformation {
  unsigned short ProcessorArchitecture;
  unsigned short ProcessorLevel;
  unsigned short ProcessorRevision;
  unsigned short Unknown;
  uint32_t FeatureBits;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/systemprocessorperformanceinformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_SYSTEMPROCESSORPERFORMANCEINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtSystemProcessorPerformanceInformation {
  int64_t IdleTime;
  int64_t KernelTime;
  int64_t UserTime;
  int64_t Reserved1[2];
  uint32_t Reserved2;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/systemregistryquotainformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_SYSTEMREGISTRYQUOTAINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtSystemRegistryQuotaInformation {
  uint32_t RegistryQuotaAllowed;
  uint32_t RegistryQuotaUsed;
  void *Reserved1;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/systemthreads.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_SYSTEMTHREADS_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtSystemThreads {
  int64_t KernelTime;
  int64_t UserTime;
  int64_t CreateTime;
  uint32_t WaitTime;
  void *StartAddress;
  struct NtClientId ClientId;
  int32_t Priority;
  int32_t BasePriority;
  uint32_t ContextSwitchCount;
  int State;
  uint32_t WaitReason;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/systemtime.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_SYSTEMTIME_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtSystemTime {
  uint16_t wYear;
  uint16_t wMonth;
  uint16_t wDayOfWeek;
  uint16_t wDay;
  uint16_t wHour;
  uint16_t wMinute;
  uint16_t wSecond;
  uint16_t wMilliseconds;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/systemtimeofdayinformation.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_SYSTEMTIMEOFDAYINFORMATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtSystemTimeofdayInformation {
  int64_t BootTime;
  int64_t CurrentTime;
  int64_t TimeZoneBias;
  uint32_t CurrentTimeZoneId;
  unsigned char Reserved1[20];
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/teb.h */

#define COSMOPOLITAN_LIBC_NT_TEB_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
#if defined(__GNUC__) && !defined(__STRICT_ANSI__)

/*
 * These macros address directly into NT's TEB a.k.a. TIB
 * Any function that does this needs the `noasan` keyword
 */
#define NtGetPeb()           gs((struct NtPeb **)(0x60ULL))
#define NtGetTeb()           gs((void **)(0x30))    /* %gs:0 linear address */
#define NtGetPid()           gs((uint32_t *)(0x40)) /* GetCurrentProcessId() */
#define NtGetTid()           gs((uint32_t *)(0x48)) /* GetCurrentThreadId() */
#define NtGetErr()           gs((int *)(0x68))
#define _NtGetSeh()          gs((void **)(0x00))
#define _NtGetStackHigh()    gs((void **)(0x08))
#define _NtGetStackLow()     gs((void **)(0x10))
#define _NtGetSubsystemTib() gs((void **)(0x18))
#define _NtGetFib()          gs((void **)(0x20))
#define _NtGetEnv()          gs((char16_t **)(0x38))
#define _NtGetRpc()          gs((void **)(0x50))
#define _NtGetTls()          gs((void **)(0x58))

#endif /* __GNUC__ && !__STRICT_ANSI__ */
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/tokenprivileges.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_TOKENPRIVILEGES_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtTokenPrivileges {
  uint32_t PrivilegeCount;
  struct NtLuidAndAttributes Privileges[1];
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/userstack.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_NTUSERSTACK_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtUserStack {
  void *FixedStackBase;
  void *FixedStackLimit;
  void *ExpandableStackBase;
  void *ExpandableStackLimit;
  void *ExpandableStackBottom;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/valent.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_VALENT_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtValent {
  char16_t *ve_valuename;
  uint32_t ve_valuelen;
  uintptr_t ve_valueptr;
  uint32_t ve_type;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/win32fileattributedata.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_WIN32FILEATTRIBUTEDATA_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtWin32FileAttributeData {
  uint32_t dwFileAttributes; /* ←NtFileFlagAndAttributes */
  struct NtFileTime ftCreationTime;
  struct NtFileTime ftLastAccessTime;
  struct NtFileTime ftLastWriteTime;
  uint32_t nFileSizeHigh;
  uint32_t nFileSizeLow;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/win32finddata.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_WIN32FINDDATA_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtWin32FindData {
  uint32_t dwFileAttributes;
  struct NtFileTime ftCreationTime;
  struct NtFileTime ftLastAccessTime;
  struct NtFileTime ftLastWriteTime;
  uint32_t nFileSizeHigh;
  uint32_t nFileSizeLow;
  uint32_t dwReserved0;
  uint32_t dwReserved1;
  char16_t cFileName[260];
  char16_t cAlternateFileName[14];
  uint32_t dwFileType;
  uint32_t dwCreatorType;
  uint16_t wFinderFlags;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/windowplacement.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_WINDOWPLACEMENT_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct NtWindowPlacement {
  uint32_t length;
  uint32_t flags;
  uint32_t showCmd;
  struct NtPoint ptMinPosition;
  struct NtPoint ptMaxPosition;
  struct NtRect rcNormalPosition;
  struct NtRect rcDevice;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/wndclass.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_WNDCLASS_H_


/*!BEGIN libc/nt/typedef/wndproc.h */

#define COSMOPOLITAN_LIBC_NT_TYPEDEF_WNDPROC_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

typedef int64_t (*NtWndProc)(int64_t, uint32_t, uint64_t, int64_t);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

struct NtWndClass {
  uint32_t style;
  NtWndProc lpfnWndProc;
  int32_t cbClsExtra;
  int32_t cbWndExtra;
  int64_t hInstance;
  int64_t hIcon;
  int64_t hCursor;
  int64_t hbrBackground;
  const char16_t *lpszMenuName;
  const char16_t *lpszClassName;
};

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/struct/wndclassex.h */

#define COSMOPOLITAN_LIBC_NT_STRUCT_WNDCLASSEX_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

struct NtWndClassEx {
  uint32_t cbSize;
  uint32_t style;
  NtWndProc lpfnWndProc;
  int32_t cbClsExtra;
  int32_t cbWndExtra;
  int64_t hInstance;
  int64_t hIcon;
  int64_t hCursor;
  int64_t hbrBackground;
  const char16_t *lpszMenuName;
  const char16_t *lpszClassName;
  int64_t hIconSm;
};

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/typedef/exceptionhandler.h */

#define COSMOPOLITAN_LIBC_NT_TYPEDEF_EXCEPTIONHANDLER_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

typedef unsigned (*NtExceptionHandler)(struct NtExceptionRecord *,
                                       struct NtExceptionFrame *,
                                       struct NtContext *, void *);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/typedef/handlerroutine.h */

#define COSMOPOLITAN_LIBC_NT_TYPEDEF_HANDLERROUTINE_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

typedef bool32 (*NtHandlerRoutine)(uint32_t);

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/typedef/hookproc.h */

#define COSMOPOLITAN_LIBC_NT_TYPEDEF_HOOKPROC_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

typedef intptr_t (*NtHookProc)(int code, uintptr_t wParam, intptr_t lParam);

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/typedef/imagetlscallback.h */

#define COSMOPOLITAN_LIBC_NT_TYPEDEF_IMAGETLSCALLBACK_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

typedef void (*NtImageTlsCallback)(void *DllHandle, uint32_t Reason,
                                   void *Reserved);

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/typedef/ioapcroutine.h */

#define COSMOPOLITAN_LIBC_NT_TYPEDEF_IOAPCROUTINE_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

typedef void (*NtIoApcRoutine)(void *ApcContext,
                               struct NtIoStatusBlock *IoStatusBlock,
                               uint32_t Reserved);

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/typedef/pknormalroutine.h */

#define COSMOPOLITAN_LIBC_NT_TYPEDEF_PKNORMALROUTINE_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

typedef void (*NtPkNormalRoutine)(void *NormalContext, void *SystemArgument1,
                                  void *SystemArgument2);

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/typedef/timerproc.h */

#define COSMOPOLITAN_LIBC_NT_TYPEDEF_TIMERPROC_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

typedef void (*NtTimerProc)(int64_t, uint32_t, uintptr_t, uint32_t);

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/typedef/wambda.h */

#define COSMOPOLITAN_LIBC_NT_WAMBDA_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

typedef intptr_t (*wambda)();

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/typedef/wndenumproc.h */

#define COSMOPOLITAN_LIBC_NT_TYPEDEF_WNDENUMPROC_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

typedef int (*NtWndEnumProc)(int64_t foo, intptr_t bar);

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/thunk/msabi.h */

#define COSMOPOLITAN_LIBC_NT_THUNK_MSABI_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

#if !defined(__STRICT_ANSI__) &&               \
    (__GNUC__ * 100 + __GNUC_MINOR__ >= 408 || \
     (__has_attribute(__ms_abi__) || defined(__llvm__)))
/**
 * Defines function as using Microsoft x64 calling convention.
 *
 * This can be used to define prototypes that allow modern compilers to
 * generate code that calls MS ABI functions directly, without needing
 * to jump through the assembly thunks.
 */
#define __msabi __attribute__((__ms_abi__))
#endif

/*
 * Returns true if header should provide MS-ABI overrides.
 */
#ifndef ShouldUseMsabiAttribute
#if defined(__msabi) && defined(NDEBUG) && !defined(__PG__)
#define ShouldUseMsabiAttribute() 1
#else
#define ShouldUseMsabiAttribute() 0
#endif
#endif

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/nt/debug.h */

#define COSMOPOLITAN_LIBC_NT_NT_DEBUG_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/*                            ░░░░
                       ▒▒▒░░░▒▒▒▒▒▒▒▓▓▓░
                      ▒▒▒▒░░░▒▒▒▒▒▒▓▓▓▓▓▓░
                     ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓░
                     ▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   ▓▓▓▓▓▓▒        ▒▒▒▓▓█
                    ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                   ░▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   █▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                   ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓░  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                  ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▒
                  ▒▒▒▒▓▓      ▓▒▒▓▓▓▓   ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                                   ▒▓  ▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓
                  ░░░░░░░░░░░▒▒▒▒      ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                ▒▒░░░░░░░░░░▒▒▒▒▒▓▓▓     ▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
               ░▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓░      ░▓███▓
               ▒▒░░░░░░░░░░▒▒▒▒▒▓▓░  ▒▓▓▓▒▒▒         ░▒▒▒▓   ████████████
              ▒▒░░░░░░░░░░░▒▒▒▒▒▓▓  ▒▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒░           ░███
              ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓            ███
             ▒▒░░░░░░░░░░▒▒▒▒▒▒▓▓  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒            ▓██
             ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒▓           ▓██
            ▒▒░░░▒▒▒░░░▒▒░▒▒▒▓▓▒  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒           ███
                            ░▒▓  ░▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓          ▓██
╔────────────────────────────────────────────────────────────────▀▀▀─────────│─╗
│ cosmopolitan § new technology » beyond the pale » debugging              ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│─╝
    “The functions and structures in [for these APIs] are internal to
     the operating system and subject to change from one release of
     Windows to the next, and possibly even between service packs for
     each release.” ──Quoth MSDN */

NtStatus NtContinue(struct NtContext *Context, int32_t TestAlert);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/nt/file.h */

#define COSMOPOLITAN_LIBC_NT_NT_FILE_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/*                            ░░░░
                       ▒▒▒░░░▒▒▒▒▒▒▒▓▓▓░
                      ▒▒▒▒░░░▒▒▒▒▒▒▓▓▓▓▓▓░
                     ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓░
                     ▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   ▓▓▓▓▓▓▒        ▒▒▒▓▓█
                    ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                   ░▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   █▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                   ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓░  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                  ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▒
                  ▒▒▒▒▓▓      ▓▒▒▓▓▓▓   ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                                   ▒▓  ▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓
                  ░░░░░░░░░░░▒▒▒▒      ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                ▒▒░░░░░░░░░░▒▒▒▒▒▓▓▓     ▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
               ░▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓░      ░▓███▓
               ▒▒░░░░░░░░░░▒▒▒▒▒▓▓░  ▒▓▓▓▒▒▒         ░▒▒▒▓   ████████████
              ▒▒░░░░░░░░░░░▒▒▒▒▒▓▓  ▒▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒░           ░███
              ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓            ███
             ▒▒░░░░░░░░░░▒▒▒▒▒▒▓▓  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒            ▓██
             ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒▓           ▓██
            ▒▒░░░▒▒▒░░░▒▒░▒▒▒▓▓▒  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒           ███
                            ░▒▓  ░▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓          ▓██
╔────────────────────────────────────────────────────────────────▀▀▀─────────│─╗
│ cosmopolitan § new technology » beyond the pale » files                  ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│─╝
    “The functions and structures in [for these APIs] are internal to
     the operating system and subject to change from one release of
     Windows to the next, and possibly even between service packs for
     each release.” ──Quoth MSDN */

struct NtIoStatusBlock;
struct NtObjectAttributes;

NtStatus NtClose(int64_t handle);

NtStatus NtCreateFile(int64_t *out_FileHandle, uint32_t DesiredAccess,
                      struct NtObjectAttributes *ObjectAttributes,
                      struct NtIoStatusBlock *out_IoStatusBlock,
                      int64_t *opt_AllocationSize, uint32_t FileAttributes,
                      uint32_t ShareAccess, uint32_t CreateDisposition,
                      uint32_t CreateOptions, void *opt_EaBuffer,
                      uint32_t EaLength);

NtStatus NtReadFile(int64_t FileHandle, void *opt_Event,
                    NtIoApcRoutine opt_ApcRoutine, void *opt_ApcContext,
                    struct NtIoStatusBlock *out_IoStatusBlock, void *out_Buffer,
                    uint32_t Length, int64_t *opt_ByteOffset,
                    uint32_t *opt_Key);

NtStatus NtWriteFile(int64_t FileHandle, void *opt_Event,
                     NtIoApcRoutine opt_ApcRoutine, void *opt_ApcContext,
                     struct NtIoStatusBlock *out_IoStatusBlock,
                     const void *Buffer, uint32_t Length,
                     int64_t *opt_ByteOffset, uint32_t *opt_Key);

NtStatus NtDuplicateObject(int64_t SourceProcessHandle, void *SourceHandle,
                           void *TargetProcessHandle,
                           void **opt_out_TargetHandle, uint32_t DesiredAcess,
                           uint32_t Atrributes, uint32_t options_t);

NtStatus NtQueryInformationFile(int64_t FileHandle,
                                struct NtIoStatusBlock *out_IoStatusBlock,
                                void *out_FileInformation,
                                uint32_t FileInformationLength,
                                uint32_t FileInformationClass);

NtStatus NtSetInformationFile(int64_t FileHandle,
                              struct NtIoStatusBlock *out_IoStatusBlock,
                              void *FileInformation,
                              uint32_t FileInformationLength,
                              uint32_t FileInformationClass);

NtStatus NtDeviceIoControlFile(
    int64_t FileHandle, int64_t opt_Event, NtIoApcRoutine opt_ApcRoutine,
    void *opt_ApcContext, struct NtIoStatusBlock *out_IoStatusBlock,
    uint32_t IoControlCode, void *opt_InputBuffer, uint32_t InputBufferLength,
    void *opt_out_OutputBuffer, uint32_t OutputBufferLength);

NtStatus NtCancelIoFileEx(int64_t FileHandle,
                          struct NtIoStatusBlock *IoRequestToCancel,
                          struct NtIoStatusBlock *IoStatusBlock);

NtStatus RtlNtStatusToDosError(NtStatus Status);

#if ShouldUseMsabiAttribute()


/*!BEGIN libc/nt/thunk/ntfile.inc */

#define NtQueryInformationFile(...) __imp_NtQueryInformationFile(__VA_ARGS__)

extern typeof(NtQueryInformationFile) *const
    __imp_NtQueryInformationFile __msabi;
#endif /* ShouldUseMsabiAttribute() */
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/nt/ipc.h */

#define COSMOPOLITAN_LIBC_NT_NT_IPC_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/*                            ░░░░
                       ▒▒▒░░░▒▒▒▒▒▒▒▓▓▓░
                      ▒▒▒▒░░░▒▒▒▒▒▒▓▓▓▓▓▓░
                     ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓░
                     ▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   ▓▓▓▓▓▓▒        ▒▒▒▓▓█
                    ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                   ░▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   █▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                   ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓░  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                  ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▒
                  ▒▒▒▒▓▓      ▓▒▒▓▓▓▓   ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                                   ▒▓  ▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓
                  ░░░░░░░░░░░▒▒▒▒      ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                ▒▒░░░░░░░░░░▒▒▒▒▒▓▓▓     ▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
               ░▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓░      ░▓███▓
               ▒▒░░░░░░░░░░▒▒▒▒▒▓▓░  ▒▓▓▓▒▒▒         ░▒▒▒▓   ████████████
              ▒▒░░░░░░░░░░░▒▒▒▒▒▓▓  ▒▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒░           ░███
              ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓            ███
             ▒▒░░░░░░░░░░▒▒▒▒▒▒▓▓  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒            ▓██
             ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒▓           ▓██
            ▒▒░░░▒▒▒░░░▒▒░▒▒▒▓▓▒  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒           ███
                            ░▒▓  ░▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓          ▓██
╔────────────────────────────────────────────────────────────────▀▀▀─────────│─╗
│ cosmopolitan § new technology » beyond the pale » ipc                    ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│─╝
    “The functions and structures in [for these APIs] are internal to
     the operating system and subject to change from one release of
     Windows to the next, and possibly even between service packs for
     each release.” ──Quoth MSDN */

struct NtIoStatusBlock;
struct NtObjectAttributes;

NtStatus NtCreateNamedPipeFile(int64_t *out_FileHandle, uint32_t DesiredAccess,
                               struct NtObjectAttributes *ObjectAttributes,
                               struct NtIoStatusBlock *out_IoStatusBlock,
                               uint32_t ShareAccess, uint32_t CreateDisposition,
                               uint32_t CreateOptions, int32_t TypeMessage,
                               int32_t ReadmodeMessage, int32_t Nonblocking,
                               uint32_t MaxInstances, uint32_t InBufferSize,
                               uint32_t OutBufferSize,
                               int64_t *opt_DefaultTimeout);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/nt/key.h */

#define COSMOPOLITAN_LIBC_NT_NT_EVENT_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/*                            ░░░░
                       ▒▒▒░░░▒▒▒▒▒▒▒▓▓▓░
                      ▒▒▒▒░░░▒▒▒▒▒▒▓▓▓▓▓▓░
                     ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓░
                     ▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   ▓▓▓▓▓▓▒        ▒▒▒▓▓█
                    ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                   ░▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   █▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                   ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓░  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                  ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▒
                  ▒▒▒▒▓▓      ▓▒▒▓▓▓▓   ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                                   ▒▓  ▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓
                  ░░░░░░░░░░░▒▒▒▒      ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                ▒▒░░░░░░░░░░▒▒▒▒▒▓▓▓     ▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
               ░▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓░      ░▓███▓
               ▒▒░░░░░░░░░░▒▒▒▒▒▓▓░  ▒▓▓▓▒▒▒         ░▒▒▒▓   ████████████
              ▒▒░░░░░░░░░░░▒▒▒▒▒▓▓  ▒▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒░           ░███
              ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓            ███
             ▒▒░░░░░░░░░░▒▒▒▒▒▒▓▓  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒            ▓██
             ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒▓           ▓██
            ▒▒░░░▒▒▒░░░▒▒░▒▒▒▓▓▒  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒           ███
                            ░▒▓  ░▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓          ▓██
╔────────────────────────────────────────────────────────────────▀▀▀─────────│─╗
│ cosmopolitan § new technology » beyond the pale » files                  ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│─╝
    “The functions and structures in [for these APIs] are internal to
     the operating system and subject to change from one release of
     Windows to the next, and possibly even between service packs for
     each release.” ──Quoth MSDN */

NtStatus NtCreateKeyedEvent(int64_t *KeyedEventHandle, uint32_t DesiredAccess,
                            struct NtObjectAttributes *ObjectAttributes,
                            uint32_t Flags);

NtStatus NtReleaseKeyedEvent(int64_t KeyedEventHandle, void *KeyValue,
                             bool32 Alertable, int64_t *Timeout);

NtStatus NtWaitForKeyedEvent(int64_t KeyedEventHandle, void *KeyValue,
                             bool32 Alertable, int64_t *Timeout);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/nt/loader.h */

#define COSMOPOLITAN_LIBC_NT_NT_LOADER_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/*                            ░░░░
                       ▒▒▒░░░▒▒▒▒▒▒▒▓▓▓░
                      ▒▒▒▒░░░▒▒▒▒▒▒▓▓▓▓▓▓░
                     ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓░
                     ▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   ▓▓▓▓▓▓▒        ▒▒▒▓▓█
                    ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                   ░▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   █▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                   ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓░  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                  ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▒
                  ▒▒▒▒▓▓      ▓▒▒▓▓▓▓   ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                                   ▒▓  ▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓
                  ░░░░░░░░░░░▒▒▒▒      ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                ▒▒░░░░░░░░░░▒▒▒▒▒▓▓▓     ▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
               ░▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓░      ░▓███▓
               ▒▒░░░░░░░░░░▒▒▒▒▒▓▓░  ▒▓▓▓▒▒▒         ░▒▒▒▓   ████████████
              ▒▒░░░░░░░░░░░▒▒▒▒▒▓▓  ▒▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒░           ░███
              ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓            ███
             ▒▒░░░░░░░░░░▒▒▒▒▒▒▓▓  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒            ▓██
             ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒▓           ▓██
            ▒▒░░░▒▒▒░░░▒▒░▒▒▒▓▓▒  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒           ███
                            ░▒▓  ░▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓          ▓██
╔────────────────────────────────────────────────────────────────▀▀▀─────────│─╗
│ cosmopolitan § new technology » beyond the pale » loader                 ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│─╝
    “The functions and structures in [for these APIs] are internal to
     the operating system and subject to change from one release of
     Windows to the next, and possibly even between service packs for
     each release.” ──Quoth MSDN */

struct NtAnsiString;
struct NtLdrDataTableEntry;
struct NtUnicodeString;

NtStatus LdrLoadDll(const char16_t *opt_PathToFile, uint32_t *opt_Flags,
                    struct NtUnicodeString *ModuleFileName,
                    void **out_ModuleHandle);
NtStatus LdrUnloadDll(void *ModuleHandle);
NtStatus LdrGetProcedureAddress(void *ModuleHandle,
                                struct NtAnsiString *opt_ProcedureName,
                                uint32_t opt_Ordinal,
                                wambda *out_ProcedureAddress);
NtStatus LdrGetDllHandle(const char16_t *opt_PathToFile, uint32_t opt_Unused,
                         struct NtUnicodeString *ModuleFileName,
                         void **out_ModuleHandle);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/nt/memory.h */

#define COSMOPOLITAN_LIBC_NT_NT_MEMORY_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/*                            ░░░░
                       ▒▒▒░░░▒▒▒▒▒▒▒▓▓▓░
                      ▒▒▒▒░░░▒▒▒▒▒▒▓▓▓▓▓▓░
                     ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓░
                     ▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   ▓▓▓▓▓▓▒        ▒▒▒▓▓█
                    ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                   ░▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   █▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                   ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓░  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                  ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▒
                  ▒▒▒▒▓▓      ▓▒▒▓▓▓▓   ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                                   ▒▓  ▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓
                  ░░░░░░░░░░░▒▒▒▒      ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                ▒▒░░░░░░░░░░▒▒▒▒▒▓▓▓     ▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
               ░▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓░      ░▓███▓
               ▒▒░░░░░░░░░░▒▒▒▒▒▓▓░  ▒▓▓▓▒▒▒         ░▒▒▒▓   ████████████
              ▒▒░░░░░░░░░░░▒▒▒▒▒▓▓  ▒▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒░           ░███
              ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓            ███
             ▒▒░░░░░░░░░░▒▒▒▒▒▒▓▓  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒            ▓██
             ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒▓           ▓██
            ▒▒░░░▒▒▒░░░▒▒░▒▒▒▓▓▒  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒           ███
                            ░▒▓  ░▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓          ▓██
╔────────────────────────────────────────────────────────────────▀▀▀─────────│─╗
│ cosmopolitan § new technology » beyond the pale » memory                 ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│─╝
    “The functions and structures in [for these APIs] are internal to
     the operating system and subject to change from one release of
     Windows to the next, and possibly even between service packs for
     each release.” ──Quoth MSDN */

NtStatus NtAllocateVirtualMemory(int64_t ProcessHandle,
                                 void **inout_BaseAddress, uint32_t dwZeroBits,
                                 uint32_t *inout_AllocationSize,
                                 uint32_t dwMemAllocationType,
                                 uint32_t dwPageProtect);
NtStatus NtFreeVirtualMemory(int64_t ProcessHandle, void **inout_BaseAddress,
                             size_t *inout_FreeSize, uint32_t FreeType);
NtStatus NtQueryVirtualMemory(int64_t ProcessHandle, const void *BaseAddress,
                              int MemoryInformationClass,
                              void *out_MemoryInformation,
                              size_t MemoryInformationLength,
                              size_t *opt_out_ReturnLength);
NtStatus NtProtectVirtualMemory(int64_t ProcessHandle, void **inout_BaseAddress,
                                uint32_t *inout_ProtectSize,
                                uint32_t NewProtect, uint32_t *out_OldProtect);
NtStatus NtWriteVirtualMemory(int64_t ProcessHandle, void *BaseAddress,
                              const void *Buffer, size_t BufferLength,
                              size_t *opt_out_ReturnLength);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/nt/process.h */

#define COSMOPOLITAN_LIBC_NT_NT_PROCESS_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/*                            ░░░░
                       ▒▒▒░░░▒▒▒▒▒▒▒▓▓▓░
                      ▒▒▒▒░░░▒▒▒▒▒▒▓▓▓▓▓▓░
                     ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓░
                     ▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   ▓▓▓▓▓▓▒        ▒▒▒▓▓█
                    ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                   ░▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   █▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                   ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓░  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                  ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▒
                  ▒▒▒▒▓▓      ▓▒▒▓▓▓▓   ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                                   ▒▓  ▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓
                  ░░░░░░░░░░░▒▒▒▒      ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                ▒▒░░░░░░░░░░▒▒▒▒▒▓▓▓     ▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
               ░▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓░      ░▓███▓
               ▒▒░░░░░░░░░░▒▒▒▒▒▓▓░  ▒▓▓▓▒▒▒         ░▒▒▒▓   ████████████
              ▒▒░░░░░░░░░░░▒▒▒▒▒▓▓  ▒▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒░           ░███
              ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓            ███
             ▒▒░░░░░░░░░░▒▒▒▒▒▒▓▓  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒            ▓██
             ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒▓           ▓██
            ▒▒░░░▒▒▒░░░▒▒░▒▒▒▓▓▒  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒           ███
                            ░▒▓  ░▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓          ▓██
╔────────────────────────────────────────────────────────────────▀▀▀─────────│─╗
│ cosmopolitan § new technology » beyond the pale » processes              ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│─╝
    “The functions and structures in [for these APIs] are internal to
     the operating system and subject to change from one release of
     Windows to the next, and possibly even between service packs for
     each release.” ──Quoth MSDN */

struct NtClientId;
struct NtObjectAttributes;
struct NtRtlUserProcessInformation;
struct NtRtlUserProcessParameters;
struct NtSecurityDescriptor;
struct NtUnicodeString;

NtStatus NtCreateProcess(int64_t *out_ProcessHandle, uint32_t dwDesiredAccess,
                         struct NtObjectAttributes *opt_ObjectAttributes,
                         void *InheritFromProcessHandle, int32_t InheritHandles,
                         void *opt_SectionHandle, void *opt_DebugPort,
                         void *opt_ExceptionPort);
NtStatus NtTerminateProcess(int64_t opt_ProcessHandle, int32_t ExitStatus);

NtStatus NtQueryInformationProcess(int64_t ProcessHandle,
                                   int ProcessInformationClass,
                                   void *out_ProcessInformation,
                                   uint32_t ProcessInformationLength,
                                   uint32_t *opt_out_ReturnLength);
NtStatus NtOpenProcessToken(int64_t ProcessToken, uint32_t DesiredAccess,
                            int64_t *out_TokenHandle);
NtStatus NtOpenProcess(int64_t *out_ProcessHandle, uint32_t DesiredAccess,
                       struct NtObjectAttributes *ObjectAttributes,
                       struct NtClientId *ClientId);

NtStatus RtlCreateProcessParameters(
    struct NtRtlUserProcessParameters **out_ProcessParameters,
    struct NtUnicodeString *ImageFile, struct NtUnicodeString *opt_DllPath,
    struct NtUnicodeString *opt_CurrentDirectory,
    struct NtUnicodeString *opt_CommandLine, uint32_t CreationFlags,
    struct NtUnicodeString *opt_WindowTitle,
    struct NtUnicodeString *opt_Desktop, struct NtUnicodeString *opt_Reserved,
    struct NtUnicodeString *opt_Reserved2);

NtStatus RtlDestroyProcessParameters(
    struct NtRtlUserProcessParameters *ProcessParameters);

NtStatus RtlCloneUserProcess(
    uint32_t ProcessFlags,
    struct NtSecurityDescriptor *opt_ProcessSecurityDescriptor,
    struct NtSecurityDescriptor *opt_ThreadSecurityDescriptor,
    void *opt_DebugPort,
    struct NtRtlUserProcessInformation *ProcessInformation);

#if ShouldUseMsabiAttribute()


/*!BEGIN libc/nt/nt/thunk/process.inc */

#define NtQueryInformationProcess(...) \
  __imp_NtQueryInformationProcess(__VA_ARGS__)

extern typeof(NtQueryInformationProcess) *const
    __imp_NtQueryInformationProcess __msabi;
#endif /* ShouldUseMsabiAttribute() */
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/nt/sections.h */

#define COSMOPOLITAN_LIBC_NT_NT_SECTIONS_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

NtStatus NtCreateSection(int64_t *out_SectionHandle, uint32_t DesiredAccess,
                         struct NtObjectAttributes *ObjectAttributes,
                         int64_t *opt_SectionSize, uint32_t Protect,
                         uint32_t Attributes, int64_t FileHandle);
NtStatus NtOpenSection(int64_t *out_SectionHandle, uint32_t DesiredAccess,
                       struct NtObjectAttributes *ObjectAttributes);
NtStatus NtMapViewOfSection(int64_t SectionHandle, int64_t ProcessHandle,
                            void **inout_BaseAddress, uint32_t *ZeroBits,
                            size_t CommitSize, int64_t *opt_inout_SectionOffset,
                            size_t *inout_ViewSize, int InheritDisposition,
                            uint32_t AllocationType, uint32_t Protect);
NtStatus NtUnmapViewOfSection(int64_t ProcessHandle, void *BaseAddress);
NtStatus NtQuerySection(int64_t SectionHandle, int SectionInformationClass,
                        void *out_SectionInformation,
                        uint32_t SectionInformationLength,
                        uint32_t *opt_out_ResultLength);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/nt/signing.h */

#define COSMOPOLITAN_LIBC_NT_NT_SIGNING_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/*                            ░░░░
                       ▒▒▒░░░▒▒▒▒▒▒▒▓▓▓░
                      ▒▒▒▒░░░▒▒▒▒▒▒▓▓▓▓▓▓░
                     ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓░
                     ▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   ▓▓▓▓▓▓▒        ▒▒▒▓▓█
                    ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                   ░▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   █▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                   ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓░  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                  ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▒
                  ▒▒▒▒▓▓      ▓▒▒▓▓▓▓   ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                                   ▒▓  ▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓
                  ░░░░░░░░░░░▒▒▒▒      ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                ▒▒░░░░░░░░░░▒▒▒▒▒▓▓▓     ▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
               ░▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓░      ░▓███▓
               ▒▒░░░░░░░░░░▒▒▒▒▒▓▓░  ▒▓▓▓▒▒▒         ░▒▒▒▓   ████████████
              ▒▒░░░░░░░░░░░▒▒▒▒▒▓▓  ▒▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒░           ░███
              ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓            ███
             ▒▒░░░░░░░░░░▒▒▒▒▒▒▓▓  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒            ▓██
             ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒▓           ▓██
            ▒▒░░░▒▒▒░░░▒▒░▒▒▒▓▓▒  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒           ███
                            ░▒▓  ░▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓          ▓██
╔────────────────────────────────────────────────────────────────▀▀▀─────────│─╗
│ cosmopolitan § new technology » beyond the pale » code signing           ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│─╝
    “The functions and structures in [for these APIs] are internal to
     the operating system and subject to change from one release of
     Windows to the next, and possibly even between service packs for
     each release.” ──Quoth MSDN */

NtStatus CsrClientCallServer(void *inout_Message, void *unknown,
                             uint32_t Opcode, uint32_t Size);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/nt/thread.h */

#define COSMOPOLITAN_LIBC_NT_NT_THREAD_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/*                            ░░░░
                       ▒▒▒░░░▒▒▒▒▒▒▒▓▓▓░
                      ▒▒▒▒░░░▒▒▒▒▒▒▓▓▓▓▓▓░
                     ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓░
                     ▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   ▓▓▓▓▓▓▒        ▒▒▒▓▓█
                    ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                   ░▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   █▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                   ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓░  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                  ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▒
                  ▒▒▒▒▓▓      ▓▒▒▓▓▓▓   ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                                   ▒▓  ▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓
                  ░░░░░░░░░░░▒▒▒▒      ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                ▒▒░░░░░░░░░░▒▒▒▒▒▓▓▓     ▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
               ░▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓░      ░▓███▓
               ▒▒░░░░░░░░░░▒▒▒▒▒▓▓░  ▒▓▓▓▒▒▒         ░▒▒▒▓   ████████████
              ▒▒░░░░░░░░░░░▒▒▒▒▒▓▓  ▒▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒░           ░███
              ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓            ███
             ▒▒░░░░░░░░░░▒▒▒▒▒▒▓▓  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒            ▓██
             ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒▓           ▓██
            ▒▒░░░▒▒▒░░░▒▒░▒▒▒▓▓▒  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒           ███
                            ░▒▓  ░▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓          ▓██
╔────────────────────────────────────────────────────────────────▀▀▀─────────│─╗
│ cosmopolitan § new technology » beyond the pale » threads                ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│─╝
    “The functions and structures in [for these APIs] are internal to
     the operating system and subject to change from one release of
     Windows to the next, and possibly even between service packs for
     each release.” ──Quoth MSDN */

struct NtClientId;
struct NtContext;
struct NtObjectAttributes;
struct NtUserStack;

NtStatus NtCreateThread(int64_t *out_ThreadHandle, uint32_t DesiredAccess,
                        struct NtObjectAttributes *ObjectAttributes,
                        int64_t ProcessHandle, struct NtClientId *out_ClientId,
                        struct NtContext *ThreadContext,
                        struct NtUserStack *UserStack, int32_t CreateSuspended);

NtStatus NtTerminateThread(void *opt_ThreadHandle, int32_t ExitStatus);

NtStatus NtOpenThread(int64_t *out_ThreadHandle, uint32_t DesiredAccess,
                      struct NtObjectAttributes *ObjectAttributes,
                      struct NtClientId *ClientId);

NtStatus NtQueryInformationThread(int64_t ThreadHandle,
                                  enum NtThreadInfoClass ThreadInformationClass,
                                  void *out_ThreadInformation,
                                  uint32_t ThreadInformationLength,
                                  uint32_t *opt_out_ReturnLength);

NtStatus NtGetContextThread(int64_t ThreadHandle,
                            struct NtContext *out_Context);
NtStatus NtSetContextThread(int64_t ThreadHandle, struct NtContext *Context);
NtStatus NtSuspendThread(int64_t ThreadHandle,
                         uint32_t *opt_out_PreviousSuspendCount);
NtStatus NtResumeThread(int64_t ThreadHandle,
                        uint32_t *opt_out_PreviousSuspendCount);

NtStatus NtOpenThreadToken(int64_t ThreadHandle, uint32_t DesiredAccess,
                           int32_t OpenAsSelf, int64_t *out_TokenHandle);

NtStatus NtSetInformationThread(int64_t ThreadHandle,
                                enum NtThreadInfoClass ThreadInformationClass,
                                void *ThreadInformation,
                                uint32_t ThreadInformationLength);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/nt/time.h */

#define COSMOPOLITAN_LIBC_NT_NT_THREAD_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/*                            ░░░░
                       ▒▒▒░░░▒▒▒▒▒▒▒▓▓▓░
                      ▒▒▒▒░░░▒▒▒▒▒▒▓▓▓▓▓▓░
                     ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓░
                     ▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   ▓▓▓▓▓▓▒        ▒▒▒▓▓█
                    ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                   ░▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   █▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                   ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓░  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                  ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▒
                  ▒▒▒▒▓▓      ▓▒▒▓▓▓▓   ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                                   ▒▓  ▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓
                  ░░░░░░░░░░░▒▒▒▒      ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                ▒▒░░░░░░░░░░▒▒▒▒▒▓▓▓     ▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
               ░▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓░      ░▓███▓
               ▒▒░░░░░░░░░░▒▒▒▒▒▓▓░  ▒▓▓▓▒▒▒         ░▒▒▒▓   ████████████
              ▒▒░░░░░░░░░░░▒▒▒▒▒▓▓  ▒▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒░           ░███
              ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓            ███
             ▒▒░░░░░░░░░░▒▒▒▒▒▒▓▓  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒            ▓██
             ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒▓           ▓██
            ▒▒░░░▒▒▒░░░▒▒░▒▒▒▓▓▒  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒           ███
                            ░▒▓  ░▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓          ▓██
╔────────────────────────────────────────────────────────────────▀▀▀─────────│─╗
│ cosmopolitan § new technology » beyond the pale » time                   ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│─╝
    “The functions and structures in [for these APIs] are internal to
     the operating system and subject to change from one release of
     Windows to the next, and possibly even between service packs for
     each release.” ──Quoth MSDN */

NtStatus NtDelayExecution(bool32 alertable, int64_t *AbsCobolOrNegRelHectoNano);

#if ShouldUseMsabiAttribute()


/*!BEGIN libc/nt/nt/thunk/time.inc */

#define NtDelayExecution(...) __imp_NtDelayExecution(__VA_ARGS__)

extern typeof(NtDelayExecution) *const __imp_NtDelayExecution __msabi;
#endif /* ShouldUseMsabiAttribute() */
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/accounting.h */

#define COSMOPOLITAN_LIBC_NT_ACCOUNTING_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/*                            ░░░░
                       ▒▒▒░░░▒▒▒▒▒▒▒▓▓▓░
                      ▒▒▒▒░░░▒▒▒▒▒▒▓▓▓▓▓▓░
                     ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓░
                     ▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   ▓▓▓▓▓▓▒        ▒▒▒▓▓█
                    ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                   ░▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   █▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                   ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓░  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                  ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▒
                  ▒▒▒▒▓▓      ▓▒▒▓▓▓▓   ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                                   ▒▓  ▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓
                  ░░░░░░░░░░░▒▒▒▒      ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                ▒▒░░░░░░░░░░▒▒▒▒▒▓▓▓     ▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
               ░▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓░      ░▓███▓
               ▒▒░░░░░░░░░░▒▒▒▒▒▓▓░  ▒▓▓▓▒▒▒         ░▒▒▒▓   ████████████
              ▒▒░░░░░░░░░░░▒▒▒▒▒▓▓  ▒▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒░           ░███
              ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓            ███
             ▒▒░░░░░░░░░░▒▒▒▒▒▒▓▓  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒            ▓██
             ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒▓           ▓██
            ▒▒░░░▒▒▒░░░▒▒░▒▒▒▓▓▒  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒           ███
                            ░▒▓  ░▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓          ▓██
╔────────────────────────────────────────────────────────────────▀▀▀─────────│─╗
│ cosmopolitan § new technology » accounting                               ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

int GetUserName(char16_t (*buf)[257], uint32_t *in_out_size);
bool32 GlobalMemoryStatusEx(struct NtMemoryStatusEx *lpBuffer);
int32_t GetExitCodeProcess(int64_t hProcess, uint32_t *lpExitCode);
int32_t GetProcessHandleCount(int64_t hProcess, uint32_t *pdwHandleCount);
bool32 GetProcessTimes(int64_t hProcess,
                       struct NtFileTime *out_lpCreationFileTime,
                       struct NtFileTime *out_lpExitFileTime,
                       struct NtFileTime *out_lpKernelFileTime,
                       struct NtFileTime *out_lpUserFileTime);
bool32 GetThreadTimes(int64_t hThread,
                      struct NtFileTime *out_lpCreationFileTime,
                      struct NtFileTime *out_lpExitFileTime,
                      struct NtFileTime *out_lpKernelFileTime,
                      struct NtFileTime *out_lpUserFileTime);
int32_t GetProcessIoCounters(int64_t hProcess,
                             struct NtIoCounters *lpIoCounters);
int32_t GetProcessWorkingSetSize(int64_t hProcess,
                                 uint64_t *lpMinimumWorkingSetSize,
                                 uint64_t *lpMaximumWorkingSetSize);
int32_t GetProcessWorkingSetSizeEx(int64_t hProcess,
                                   uint64_t *lpMinimumWorkingSetSize,
                                   uint64_t *lpMaximumWorkingSetSize,
                                   uint32_t *Flags);
int32_t SetProcessWorkingSetSize(int64_t hProcess,
                                 uint64_t dwMinimumWorkingSetSize,
                                 uint64_t dwMaximumWorkingSetSize);
int32_t SetProcessWorkingSetSizeEx(int64_t hProcess,
                                   uint64_t dwMinimumWorkingSetSize,
                                   uint64_t dwMaximumWorkingSetSize,
                                   uint32_t Flags);

#if ShouldUseMsabiAttribute()


/*!BEGIN libc/nt/thunk/accounting.inc */

#define GetProcessTimes(...) __imp_GetProcessTimes(__VA_ARGS__)
extern typeof(GetProcessTimes) *const __imp_GetProcessTimes __msabi;

#define GetThreadTimes(...) __imp_GetThreadTimes(__VA_ARGS__)
extern typeof(GetThreadTimes) *const __imp_GetThreadTimes __msabi;

#define GetUserName(...) __imp_GetUserNameW(__VA_ARGS__)
extern typeof(GetUserName) *const __imp_GetUserNameW __msabi;

#define GetExitCodeProcess(...) __imp_GetExitCodeProcess(__VA_ARGS__)
extern typeof(GetExitCodeProcess) *const __imp_GetExitCodeProcess __msabi;
#endif /* ShouldUseMsabiAttribute() */
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/automation.h */

#define COSMOPOLITAN_LIBC_NT_AUTOMATION_H_
/*                            ░░░░
                       ▒▒▒░░░▒▒▒▒▒▒▒▓▓▓░
                      ▒▒▒▒░░░▒▒▒▒▒▒▓▓▓▓▓▓░
                     ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓░
                     ▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   ▓▓▓▓▓▓▒        ▒▒▒▓▓█
                    ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                   ░▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   █▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                   ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓░  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                  ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▒
                  ▒▒▒▒▓▓      ▓▒▒▓▓▓▓   ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                                   ▒▓  ▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓
                  ░░░░░░░░░░░▒▒▒▒      ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                ▒▒░░░░░░░░░░▒▒▒▒▒▓▓▓     ▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
               ░▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓░      ░▓███▓
               ▒▒░░░░░░░░░░▒▒▒▒▒▓▓░  ▒▓▓▓▒▒▒         ░▒▒▒▓   ████████████
              ▒▒░░░░░░░░░░░▒▒▒▒▒▓▓  ▒▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒░           ░███
              ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓            ███
             ▒▒░░░░░░░░░░▒▒▒▒▒▒▓▓  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒            ▓██
             ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒▓           ▓██
            ▒▒░░░▒▒▒░░░▒▒░▒▒▒▓▓▒  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒           ███
                            ░▒▓  ░▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓          ▓██
╔────────────────────────────────────────────────────────────────▀▀▀─────────│─╗
│ cosmopolitan § new technology » aol hacking                              ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

int64_t GetShellWindow(void);
int64_t GetDesktopWindow(void);
int64_t GetParent(int64_t hWnd);
int64_t SetParent(int64_t hWndChild, int64_t hWndNewParent);
int32_t EnumChildWindows(int64_t hWndParent, NtWndEnumProc lpEnumFunc,
                         intptr_t lParam);
int64_t FindWindow(const char16_t *lpClassName, const char16_t *lpWindowName);
int64_t FindWindowEx(int64_t hWndParent, int64_t hWndChildAfter,
                     const char16_t *lpszClass, const char16_t *lpszWindow);
int64_t GetWindow(int64_t hWnd, uint32_t uCmd);
int64_t SetWindowsHook(int nFilterType, NtHookProc pfnFilterProc);
int32_t UnhookWindowsHook(int nCode, NtHookProc pfnFilterProc);
int64_t SetWindowsHookEx(int idHook, NtHookProc lpfn, int64_t hmod,
                         uint32_t dwThreadId);
int32_t UnhookWindowsHookEx(int64_t hhk);
intptr_t CallNextHookEx(int64_t hhk, int nCode, uintptr_t wParam,
                        intptr_t lParam);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/codegen.h */

#define COSMOPOLITAN_LIBC_NT_CODEGEN_H_


/*!BEGIN libc/nt/comdlg.h */

#define COSMOPOLITAN_LIBC_NT_COMDLG_H_
/*                            ░░░░
                       ▒▒▒░░░▒▒▒▒▒▒▒▓▓▓░
                      ▒▒▒▒░░░▒▒▒▒▒▒▓▓▓▓▓▓░
                     ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓░
                     ▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   ▓▓▓▓▓▓▒        ▒▒▒▓▓█
                    ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                   ░▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   █▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                   ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓░  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                  ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▒
                  ▒▒▒▒▓▓      ▓▒▒▓▓▓▓   ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                                   ▒▓  ▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓
                  ░░░░░░░░░░░▒▒▒▒      ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                ▒▒░░░░░░░░░░▒▒▒▒▒▓▓▓     ▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
               ░▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓░      ░▓███▓
               ▒▒░░░░░░░░░░▒▒▒▒▒▓▓░  ▒▓▓▓▒▒▒         ░▒▒▒▓   ████████████
              ▒▒░░░░░░░░░░░▒▒▒▒▒▓▓  ▒▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒░           ░███
              ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓            ███
             ▒▒░░░░░░░░░░▒▒▒▒▒▒▓▓  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒            ▓██
             ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒▓           ▓██
            ▒▒░░░▒▒▒░░░▒▒░▒▒▒▓▓▒  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒           ███
                            ░▒▓  ░▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓          ▓██
╔────────────────────────────────────────────────────────────────▀▀▀─────────│─╗
│ cosmopolitan § new technology » common dialogs                           ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

bool32 GetOpenFileName(struct NtOpenFilename *arg);
bool32 GetSaveFileName(struct NtOpenFilename *arg);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/console.h */

#define COSMOPOLITAN_LIBC_NT_CONSOLE_H_
/*                            ░░░░
                       ▒▒▒░░░▒▒▒▒▒▒▒▓▓▓░
                      ▒▒▒▒░░░▒▒▒▒▒▒▓▓▓▓▓▓░
                     ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓░
                     ▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   ▓▓▓▓▓▓▒        ▒▒▒▓▓█
                    ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                   ░▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   █▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                   ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓░  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                  ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▒
                  ▒▒▒▒▓▓      ▓▒▒▓▓▓▓   ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                                   ▒▓  ▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓
                  ░░░░░░░░░░░▒▒▒▒      ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                ▒▒░░░░░░░░░░▒▒▒▒▒▓▓▓     ▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
               ░▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓░      ░▓███▓
               ▒▒░░░░░░░░░░▒▒▒▒▒▓▓░  ▒▓▓▓▒▒▒         ░▒▒▒▓   ████████████
              ▒▒░░░░░░░░░░░▒▒▒▒▒▓▓  ▒▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒░           ░███
              ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓            ███
             ▒▒░░░░░░░░░░▒▒▒▒▒▒▓▓  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒            ▓██
             ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒▓           ▓██
            ▒▒░░░▒▒▒░░░▒▒░▒▒▒▓▓▒  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒           ███
                            ░▒▓  ░▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓          ▓██
╔────────────────────────────────────────────────────────────────▀▀▀─────────│─╗
│ cosmopolitan § new technology » console                                  ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#define kNtAttachParentProcess -1u

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

bool32 WriteConsoleOutput(int64_t hConsoleOutput,
                          const struct NtCharInfo *lpBuffer,
                          struct NtCoord dwBufferSize,
                          struct NtCoord dwBufferCoord,
                          struct NtSmallRect *lpWriteRegion);
bool32 ReadConsoleInput(int64_t hConsoleInput, struct NtInputRecord *lpBuffer,
                        uint32_t nLength, uint32_t *lpNumberOfEventsRead);
bool32 PeekConsoleInput(int64_t hConsoleInput, struct NtInputRecord *lpBuffer,
                        uint32_t nLength, uint32_t *lpNumberOfEventsRead);
bool32 GetNumberOfConsoleInputEvent(int64_t hConsoleInput,
                                    uint32_t *lpNumberOfEvents);
bool32 ReadConsoleOutput(int64_t hConsoleOutput, struct NtCharInfo *lpBuffer,
                         struct NtCoord dwBufferSize,
                         struct NtCoord dwBufferCoord,
                         struct NtSmallRect *lpReadRegion);
bool32 WriteConsoleInput(int64_t hConsoleInput,
                         const struct NtInputRecord *lpBuffer, uint32_t nLength,
                         uint32_t *lpNumberOfEventsWritten);
bool32 FlushConsoleInputBuffer(int64_t hConsoleInput);

int64_t GetConsoleWindow(void);
bool32 GetConsoleMode(int64_t hConsoleHandle, uint32_t *lpMode);
bool32 SetConsoleMode(int64_t hConsoleHandle, uint32_t dwMode);
int32_t AllocConsole(void);
int32_t FreeConsole(void);
int32_t AttachConsole(uint32_t dwProcessId);
uint32_t GetConsoleTitle(char16_t *lpConsoleTitle, uint32_t nSize);
int32_t SetConsoleTitle(const char16_t *lpConsoleTitle);
bool32 GetConsoleScreenBufferInfo(
    int64_t hConsoleOutput,
    struct NtConsoleScreenBufferInfo *out_lpConsoleScreenBufferInfo);
bool32 GetConsoleScreenBufferInfoEx(
    int64_t hConsoleOutput,
    struct NtConsoleScreenBufferInfoEx *in_out_lpConsoleScreenBufferInfo);
bool32 SetConsoleScreenBufferInfoEx(
    int64_t hConsoleOutput,
    const struct NtConsoleScreenBufferInfoEx *lpConsoleScreenBufferInfo);
bool32 SetConsoleScreenBufferSize(int64_t lpConsoleOutput,
                                  struct NtCoord dwSize);
struct NtCoord GetLargestConsoleWindowSize(int64_t hConsoleHandle);
int32_t ReadConsole(int64_t hConsoleInput, void *lpBuffer,
                    uint32_t nNumberOfCharsToRead,
                    uint32_t *lpNumberOfCharsRead, void *lpReserved);
int32_t WriteConsole(int64_t hConsoleOutput, const void *lpBuffer,
                     uint32_t nNumberOfCharsToWrite,
                     uint32_t *lpNumberOfCharsWritten, void *lpReserved)
    paramsnonnull((2, 4));
bool32 GetNumberOfConsoleMouseButtons(uint32_t *out_lpNumberOfMouseButtons)
    paramsnonnull();
bool32 GetConsoleSelectionInfo(
    struct NtConsoleSelectionInfo *out_lpConsoleSelectionInfo);
uint32_t WaitForInputIdle(int64_t hProcess, uint32_t dwMilliseconds);
uint32_t GetConsoleCP(void);
bool32 SetConsoleCP(uint32_t wCodePageID);
bool32 SetConsoleOutputCP(uint32_t wCodePageID);
uint32_t GetConsoleOutputCP(void);
bool32 SetConsoleCtrlHandler(NtHandlerRoutine opt_HandlerRoutine, bool32 Add);
bool32 GenerateConsoleCtrlEvent(uint32_t dwCtrlEvent,
                                uint32_t dwProcessGroupId);

bool32 GetConsoleCursorInfo(
    int64_t hConsoleOutput,
    struct NtConsoleCursorInfo *out_lpConsoleCursorInfo);
bool32 SetConsoleCursorInfo(
    int64_t hConsoleOutput,
    const struct NtConsoleCursorInfo *lpConsoleCursorInfo);

#if ShouldUseMsabiAttribute()


/*!BEGIN libc/nt/thunk/console.inc */

#define GetConsoleMode(...) __imp_GetConsoleMode(__VA_ARGS__)
extern typeof(GetConsoleMode) *const __imp_GetConsoleMode __msabi;

#define SetConsoleCP(...) __imp_SetConsoleCP(__VA_ARGS__)
extern typeof(SetConsoleCP) *const __imp_SetConsoleCP __msabi;

#define GetConsoleCP(...) __imp_GetConsoleCP(__VA_ARGS__)
extern typeof(GetConsoleCP) *const __imp_GetConsoleCP __msabi;

#define SetConsoleCtrlHandler(...) __imp_SetConsoleCtrlHandler(__VA_ARGS__)
extern typeof(SetConsoleCtrlHandler) *const __imp_SetConsoleCtrlHandler __msabi;

#define SetConsoleMode(...) __imp_SetConsoleMode(__VA_ARGS__)
extern typeof(SetConsoleMode) *const __imp_SetConsoleMode __msabi;

#define SetConsoleOutputCP(...) __imp_SetConsoleOutputCP(__VA_ARGS__)
extern typeof(SetConsoleOutputCP) *const __imp_SetConsoleOutputCP __msabi;

#define GetConsoleOutputCP(...) __imp_GetConsoleOutputCP(__VA_ARGS__)
extern typeof(GetConsoleOutputCP) *const __imp_GetConsoleOutputCP __msabi;
#endif /* ShouldUseMsabiAttribute() */
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/createfile.h */

#define COSMOPOLITAN_LIBC_NT_CREATEFILE_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

int64_t CreateFile(
    const char16_t *lpFileName, uint32_t dwDesiredAccess, uint32_t dwShareMode,
    struct NtSecurityAttributes *opt_lpSecurityAttributes,
    int dwCreationDisposition,
    uint32_t dwFlagsAndAttributes, /* libc/nt/enum/fileflagandattributes.h */
    int64_t opt_hTemplateFile) paramsnonnull((1));

int64_t CreateFileA(
    const char *lpFileName, uint32_t dwDesiredAccess, uint32_t dwShareMode,
    struct NtSecurityAttributes *opt_lpSecurityAttributes,
    int dwCreationDisposition,
    uint32_t dwFlagsAndAttributes, /* libc/nt/enum/fileflagandattributes.h */
    int64_t opt_hTemplateFile) paramsnonnull((1));

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/debug.h */

#define COSMOPOLITAN_LIBC_NT_DEBUG_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/*                            ░░░░
                       ▒▒▒░░░▒▒▒▒▒▒▒▓▓▓░
                      ▒▒▒▒░░░▒▒▒▒▒▒▓▓▓▓▓▓░
                     ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓░
                     ▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   ▓▓▓▓▓▓▒        ▒▒▒▓▓█
                    ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                   ░▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   █▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                   ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓░  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                  ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▒
                  ▒▒▒▒▓▓      ▓▒▒▓▓▓▓   ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                                   ▒▓  ▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓
                  ░░░░░░░░░░░▒▒▒▒      ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                ▒▒░░░░░░░░░░▒▒▒▒▒▓▓▓     ▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
               ░▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓░      ░▓███▓
               ▒▒░░░░░░░░░░▒▒▒▒▒▓▓░  ▒▓▓▓▒▒▒         ░▒▒▒▓   ████████████
              ▒▒░░░░░░░░░░░▒▒▒▒▒▓▓  ▒▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒░           ░███
              ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓            ███
             ▒▒░░░░░░░░░░▒▒▒▒▒▒▓▓  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒            ▓██
             ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒▓           ▓██
            ▒▒░░░▒▒▒░░░▒▒░▒▒▒▓▓▒  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒           ███
                            ░▒▓  ░▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓          ▓██
╔────────────────────────────────────────────────────────────────▀▀▀─────────│─╗
│ cosmopolitan § new technology » debugging                                ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

/* Some of these APIs were moved to system.h and libc.h */
int32_t DebugBreakProcess(void *Process);
int32_t DebugActiveProcess(uint32_t dwProcessId);
int32_t DebugActiveProcessStop(uint32_t dwProcessId);
int32_t CheckRemoteDebuggerPresent(int64_t hProcess, int *pbDebuggerPresent);
int32_t ContinueDebugEvent(uint32_t dwProcessId, uint32_t dwThreadId,
                           uint32_t dwContinueStatus);
void FatalExit(int uExitCode);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/dll.h */

#define COSMOPOLITAN_LIBC_NT_DLL_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/*                            ░░░░
                       ▒▒▒░░░▒▒▒▒▒▒▒▓▓▓░
                      ▒▒▒▒░░░▒▒▒▒▒▒▓▓▓▓▓▓░
                     ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓░
                     ▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   ▓▓▓▓▓▓▒        ▒▒▒▓▓█
                    ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                   ░▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   █▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                   ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓░  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                  ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▒
                  ▒▒▒▒▓▓      ▓▒▒▓▓▓▓   ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                                   ▒▓  ▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓
                  ░░░░░░░░░░░▒▒▒▒      ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                ▒▒░░░░░░░░░░▒▒▒▒▒▓▓▓     ▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
               ░▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓░      ░▓███▓
               ▒▒░░░░░░░░░░▒▒▒▒▒▓▓░  ▒▓▓▓▒▒▒         ░▒▒▒▓   ████████████
              ▒▒░░░░░░░░░░░▒▒▒▒▒▓▓  ▒▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒░           ░███
              ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓            ███
             ▒▒░░░░░░░░░░▒▒▒▒▒▒▓▓  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒            ▓██
             ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒▓           ▓██
            ▒▒░░░▒▒▒░░░▒▒░▒▒▒▓▓▒  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒           ███
                            ░▒▓  ░▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓          ▓██
╔────────────────────────────────────────────────────────────────▀▀▀─────────│─╗
│ cosmopolitan § new technology » dynamic link libraries                   ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

int64_t LoadLibrary(const char16_t *lpLibFileName);
int64_t LoadLibraryEx(const char16_t *lpLibFileName, int64_t hFile,
                      uint32_t dwFlags);
uint32_t GetModuleFileName(int64_t hModule, char16_t *lpFilename,
                           uint32_t nSize);
uint32_t GetModuleFileNameA(int64_t hModule, char *lpFilename, uint32_t nSize);
intptr_t GetModuleHandle(const char *opt_lpModuleName);
intptr_t GetModuleHandleW(const char16_t *opt_lpModuleName);
void *GetProcAddress(int64_t hModule, const char *lpProcName);
int32_t FreeResource(int64_t hResData);
intptr_t LockResource(int64_t hResData);
int32_t FreeLibrary(int64_t hLibModule);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/efi.h */

#define COSMOPOLITAN_LIBC_NT_EFI_H_
/*
    ▐██ ░█████████▓   ▐██▌     ██▓░   ▐█▌  ▐██  ░██░    ▓█▌  ▓██▒     ▓██
    ▐██     ░██░     ▒█▓██░    ████░  ▐█▌  ▐██  ░██░    ▓█▌  ▓███░   ▓███
    ▐██     ░██░     ██░▐█▓    ██▒▓█░ ▐█▌  ▐██  ░██░    ▓█▌  ▓█▌▓█░ ▓█▒██
    ▐██     ░██░    ▐█▌  ▓█▌   ██░░▓█░▐█▌  ▐██  ░██░    ▓█▌  ▓█▌░█▓▓█▒░██
    ▐██     ░██░   ▒██▓█████░  ██░ ░▓▓▓█▌  ▐██  ░██░    ██░  ▓█▌ ░██▌ ░██
    ▐██     ░██░   ▓█▌    ▓█▓  ██░  ░███▌  ▐██   ▐██▄▄▄▓█▓   ▓█▌      ░██
╔────────────────────────────────────────────────────────────────────────────│─╗
│ αcτµαlly pδrταblε εxεcµταblε § the unified extensible firmware interface ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#define EFI_SUCCESS           0x8000000000000000
#define EFI_LOAD_ERROR        0x8000000000000001
#define EFI_INVALID_PARAMETER 0x8000000000000002
#define EFI_UNSUPPORTED       0x8000000000000003
#define EFI_BAD_BUFFER_SIZE   0x8000000000000004
#define EFI_BUFFER_TOO_SMALL  0x8000000000000005
#define EFI_NOT_READY         0x8000000000000006
#define EFI_DEVICE_ERROR      0x8000000000000007
#define EFI_WRITE_PROTECTED   0x8000000000000008
#define EFI_OUT_OF_RESOURCES  0x8000000000000009
#define EFI_VOLUME_CORRUPTED  0x800000000000000a
#define EFI_VOLUME_FULL       0x800000000000000b
#define EFI_NO_MEDIA          0x800000000000000c
#define EFI_MEDIA_CHANGED     0x800000000000000d
#define EFI_NOT_FOUND         0x800000000000000e
#define EFI_ACCESS_DENIED     0x800000000000000f
#define EFI_NO_RESPONSE       0x8000000000000010
#define EFI_NO_MAPPING        0x8000000000000011
#define EFI_TIMEOUT           0x8000000000000012
#define EFI_NOT_STARTED       0x8000000000000013
#define EFI_ALREADY_STARTED   0x8000000000000014
#define EFI_ABORTED           0x8000000000000015
#define EFI_ICMP_ERROR        0x8000000000000016
#define EFI_TFTP_ERROR        0x8000000000000017
#define EFI_PROTOCOL_ERROR    0x8000000000000018

#define EFI_VARIABLE_NON_VOLATILE                          0x00000001
#define EFI_VARIABLE_BOOTSERVICE_ACCESS                    0x00000002
#define EFI_VARIABLE_RUNTIME_ACCESS                        0x00000004
#define EFI_VARIABLE_HARDWARE_ERROR_RECORD                 0x00000008
#define EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS            0x00000010
#define EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS 0x00000020
#define EFI_VARIABLE_APPEND_WRITE                          0x00000040

#define EFI_MEMORY_UC            0x0000000000000001U
#define EFI_MEMORY_WC            0x0000000000000002U
#define EFI_MEMORY_WT            0x0000000000000004U
#define EFI_MEMORY_WB            0x0000000000000008U
#define EFI_MEMORY_UCE           0x0000000000000010U
#define EFI_MEMORY_WP            0x0000000000001000U
#define EFI_MEMORY_RP            0x0000000000002000U
#define EFI_MEMORY_XP            0x0000000000004000U
#define EFI_MEMORY_RO            0x0000000000020000U
#define EFI_MEMORY_NV            0x0000000000008000U
#define EFI_MEMORY_MORE_RELIABLE 0x0000000000010000U
#define EFI_MEMORY_RUNTIME       0x8000000000000000U

#define EFI_OPTIONAL_PTR 0x00000001

#define EFI_SCAN_NULL      0x0000
#define EFI_SCAN_UP        0x0001
#define EFI_SCAN_DOWN      0x0002
#define EFI_SCAN_RIGHT     0x0003
#define EFI_SCAN_LEFT      0x0004
#define EFI_SCAN_HOME      0x0005
#define EFI_SCAN_END       0x0006
#define EFI_SCAN_INSERT    0x0007
#define EFI_SCAN_DELETE    0x0008
#define EFI_SCAN_PAGE_UP   0x0009
#define EFI_SCAN_PAGE_DOWN 0x000A
#define EFI_SCAN_F1        0x000B
#define EFI_SCAN_F2        0x000C
#define EFI_SCAN_F3        0x000D
#define EFI_SCAN_F4        0x000E
#define EFI_SCAN_F5        0x000F
#define EFI_SCAN_F6        0x0010
#define EFI_SCAN_F7        0x0011
#define EFI_SCAN_F8        0x0012
#define EFI_SCAN_F9        0x0013
#define EFI_SCAN_F10       0x0014
#define EFI_SCAN_ESC       0x0017

#define EFI_EVT_TIMER                         0x80000000
#define EFI_EVT_RUNTIME                       0x40000000
#define EFI_EVT_NOTIFY_WAIT                   0x00000100
#define EFI_EVT_NOTIFY_SIGNAL                 0x00000200
#define EFI_EVT_SIGNAL_EXIT_BOOT_SERVICES     0x00000201
#define EFI_EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE 0x60000202
#define EFI_EVT_RUNTIME_CONTEXT               0x20000000

#define LOADED_IMAGE_PROTOCOL                        \
  {                                                  \
    0x5B1B31A1, 0x9562, 0x11d2, {                    \
      0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B \
    }                                                \
  }

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

#define EFIAPI     __attribute__((__ms_abi__))
#define EFI_STATUS uint64_t
#define EFI_EVENT  uintptr_t
#define EFI_HANDLE uintptr_t

typedef struct _EFI_SIMPLE_TEXT_INPUT_PROTOCOL EFI_SIMPLE_TEXT_INPUT_PROTOCOL;
typedef struct _EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL;

typedef enum {
  EfiReservedMemoryType,
  EfiLoaderCode,
  EfiLoaderData,
  EfiBootServicesCode,
  EfiBootServicesData,
  EfiRuntimeServicesCode,
  EfiRuntimeServicesData,
  EfiConventionalMemory,
  EfiUnusableMemory,
  EfiACPIReclaimMemory,
  EfiACPIMemoryNVS,
  EfiMemoryMappedIO,
  EfiMemoryMappedIOPortSpace,
  EfiPalCode,
  EfiPersistentMemory,
  EfiMaxMemoryType
} EFI_MEMORY_TYPE;

typedef enum {
  EfiResetCold,
  EfiResetWarm,
  EfiResetShutdown,
  EfiResetPlatformSpecific
} EFI_RESET_TYPE;

typedef enum {
  AllocateAnyPages,
  AllocateMaxAddress,
  AllocateAddress,
  MaxAllocateType
} EFI_ALLOCATE_TYPE;

typedef enum {
  TimerCancel,
  TimerPeriodic,
  TimerRelative,
} EFI_TIMER_DELAY;

typedef struct {
  uint32_t Resolution;
  uint32_t Accuracy;
  bool SetsToZero;
} EFI_TIME_CAPABILITIES;

typedef struct {
  uint32_t Data1;
  uint16_t Data2;
  uint16_t Data3;
  uint8_t Data4[8];
} EFI_GUID;

typedef struct {
  uint16_t Year;
  uint8_t Month;
  uint8_t Day;
  uint8_t Hour;
  uint8_t Minute;
  uint8_t Second;
  uint8_t Pad1;
  uint32_t Nanosecond;
  int16_t TimeZone;
  uint8_t Daylight;
  uint8_t Pad2;
} EFI_TIME;

typedef struct {
  uint32_t Type;
  uint64_t PhysicalStart;
  uint64_t VirtualStart;
  uint64_t NumberOfPages;
  uint64_t Attribute;
} EFI_MEMORY_DESCRIPTOR;

typedef struct {
  EFI_GUID VendorGuid;
  void *VendorTable;
} EFI_CONFIGURATION_TABLE;

typedef struct {
  EFI_GUID CapsuleGuid;
  uint32_t HeaderSize;
  uint32_t Flags;
  uint32_t CapsuleImageSize;
} EFI_CAPSULE_HEADER;

typedef struct {
  uint16_t ScanCode;
  char16_t UnicodeChar;
} EFI_INPUT_KEY;

typedef struct {
  int32_t MaxMode;
  int32_t Mode;
  int32_t Attribute;
  int32_t CursorColumn;
  int32_t CursorRow;
  bool CursorVisible;
} EFI_SIMPLE_TEXT_OUTPUT_MODE;

typedef struct {
  uint64_t Signature;
  uint32_t Revision;
  uint32_t HeaderSize;
  uint32_t CRC32;
  uint32_t Reserved;
} EFI_TABLE_HEADER;

typedef struct {
  uint8_t Type;
  uint8_t SubType;
  uint8_t Length[2];
} EFI_DEVICE_PATH_PROTOCOL;

typedef EFI_STATUS(EFIAPI *EFI_EXIT)(EFI_HANDLE ImageHandle,
                                     EFI_STATUS ExitStatus,
                                     uintptr_t ExitDataSize,
                                     char16_t *opt_ExitData);

typedef EFI_STATUS(EFIAPI *EFI_GET_VARIABLE)(char16_t *VariableName,
                                             EFI_GUID *VendorGuid,
                                             uint32_t *outopt_Attributes,
                                             uintptr_t *inout_DataSize,
                                             void *outopt_Data);
typedef EFI_STATUS(EFIAPI *EFI_SET_VARIABLE)(char16_t *VariableName,
                                             EFI_GUID *VendorGuid,
                                             uint32_t Attributes,
                                             uintptr_t DataSize, void *Data);
typedef EFI_STATUS(EFIAPI *EFI_GET_NEXT_VARIABLE_NAME)(
    uintptr_t *inout_VariableNameSize, char16_t *inout_VariableName,
    EFI_GUID *inout_VendorGuid);
typedef EFI_STATUS(EFIAPI *EFI_QUERY_VARIABLE_INFO)(
    uint32_t Attributes, uint64_t *out_MaximumVariableStorageSize,
    uint64_t *out_RemainingVariableStorageSize,
    uint64_t *out_MaximumVariableSize);

typedef EFI_STATUS(EFIAPI *EFI_ALLOCATE_PAGES)(EFI_ALLOCATE_TYPE Type,
                                               EFI_MEMORY_TYPE MemoryType,
                                               uintptr_t Pages,
                                               uint64_t *inout_Memory);
typedef EFI_STATUS(EFIAPI *EFI_FREE_PAGES)(uint64_t Memory, uintptr_t Pages);
typedef EFI_STATUS(EFIAPI *EFI_GET_MEMORY_MAP)(
    uintptr_t *inout_MemoryMapSize, EFI_MEMORY_DESCRIPTOR *inout_MemoryMap,
    uintptr_t *out_MapKey, uintptr_t *out_DescriptorSize,
    uint32_t *out_DescriptorVersion);

typedef EFI_STATUS(EFIAPI *EFI_ALLOCATE_POOL)(EFI_MEMORY_TYPE PoolType,
                                              uintptr_t Size, void *out_Buffer);
typedef EFI_STATUS(EFIAPI *EFI_FREE_POOL)(void *Buffer);
typedef void(EFIAPI *EFI_SET_MEM)(void *Buffer, uintptr_t Size, uint8_t Value);
typedef void(EFIAPI *EFI_COPY_MEM)(void *Destination, void *Source,
                                   uintptr_t Length);

typedef EFI_STATUS(EFIAPI *EFI_CHECK_EVENT)(EFI_EVENT Event);
typedef EFI_STATUS(EFIAPI *EFI_CLOSE_EVENT)(EFI_EVENT Event);
typedef EFI_STATUS(EFIAPI *EFI_SIGNAL_EVENT)(EFI_EVENT Event);
typedef EFI_STATUS(EFIAPI *EFI_WAIT_FOR_EVENT)(uintptr_t NumberOfEvents,
                                               EFI_EVENT *Events,
                                               uintptr_t *out_Index);
typedef EFI_STATUS(EFIAPI *EFI_SET_TIMER)(EFI_EVENT Event, EFI_TIMER_DELAY Type,
                                          uint64_t TriggerTime);
typedef void(EFIAPI *EFI_EVENT_NOTIFY)(EFI_EVENT Event, void *Context);
typedef EFI_STATUS(EFIAPI *EFI_CREATE_EVENT)(uint32_t Type, uintptr_t NotifyTpl,
                                             EFI_EVENT_NOTIFY NotifyFunction,
                                             void *NotifyContext,
                                             EFI_EVENT *out_Event);
typedef EFI_STATUS(EFIAPI *EFI_CREATE_EVENT_EX)(
    uint32_t Type, uintptr_t NotifyTpl, EFI_EVENT_NOTIFY opt_NotifyFunction,
    const void *opt_NotifyContext, const EFI_GUID *opt_EventGroup,
    EFI_EVENT *out_Event);

typedef EFI_STATUS(EFIAPI *EFI_UPDATE_CAPSULE)(
    EFI_CAPSULE_HEADER **CapsuleHeaderArray, uintptr_t CapsuleCount,
    uint64_t opt_ScatterGatherList);
typedef EFI_STATUS(EFIAPI *EFI_QUERY_CAPSULE_CAPABILITIES)(
    EFI_CAPSULE_HEADER **CapsuleHeaderArray, uintptr_t CapsuleCount,
    uint64_t *out_MaximumCapsuleSize, EFI_RESET_TYPE *out_ResetType);
typedef EFI_STATUS(EFIAPI *EFI_GET_WAKEUP_TIME)(bool *out_Enabled,
                                                bool *out_Pending,
                                                EFI_TIME *out_Time);
typedef EFI_STATUS(EFIAPI *EFI_SET_WAKEUP_TIME)(bool Enable,
                                                EFI_TIME *opt_Time);
typedef EFI_STATUS(EFIAPI *EFI_SET_WATCHDOG_TIMER)(uintptr_t Timeout,
                                                   uint64_t WatchdogCode,
                                                   uintptr_t DataSize,
                                                   char16_t *opt_WatchdogData);

typedef EFI_STATUS(EFIAPI *EFI_SET_TIME)(EFI_TIME *Time);
typedef EFI_STATUS(EFIAPI *EFI_GET_TIME)(
    EFI_TIME *out_Time, EFI_TIME_CAPABILITIES *outopt_Capabilities);
typedef EFI_STATUS(EFIAPI *EFI_GET_NEXT_HIGH_MONO_COUNT)(
    uint32_t *out_HighCount);
typedef EFI_STATUS(EFIAPI *EFI_STALL)(uintptr_t Microseconds);
typedef EFI_STATUS(EFIAPI *EFI_GET_NEXT_MONOTONIC_COUNT)(uint64_t *out_Count);

typedef EFI_STATUS(EFIAPI *EFI_SET_VIRTUAL_ADDRESS_MAP)(
    uintptr_t MemoryMapSize, uintptr_t DescriptorSize,
    uint32_t DescriptorVersion, EFI_MEMORY_DESCRIPTOR *VirtualMap);
typedef void(EFIAPI *EFI_RESET_SYSTEM)(EFI_RESET_TYPE ResetType,
                                       EFI_STATUS ResetStatus,
                                       uintptr_t DataSize, void *opt_ResetData);
typedef EFI_STATUS(EFIAPI *EFI_CONVERT_POINTER)(uintptr_t DebugDisposition,
                                                void **inout_Address);

typedef EFI_STATUS(EFIAPI *EFI_INPUT_RESET)(
    EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This, bool ExtendedVerification);
typedef EFI_STATUS(EFIAPI *EFI_INPUT_READ_KEY)(
    EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This, EFI_INPUT_KEY *out_Key);

typedef EFI_STATUS(EFIAPI *EFI_TEXT_RESET)(
    EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, bool ExtendedVerification);
typedef EFI_STATUS(EFIAPI *EFI_TEXT_STRING)(
    EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, char16_t *String);
typedef EFI_STATUS(EFIAPI *EFI_TEXT_TEST_STRING)(
    EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, char16_t *String);
typedef EFI_STATUS(EFIAPI *EFI_TEXT_QUERY_MODE)(
    EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, uint64_t ModeNumber,
    uint64_t *out_Columns, uint64_t *out_Rows);
typedef EFI_STATUS(EFIAPI *EFI_TEXT_SET_MODE)(
    EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, uint64_t ModeNumber);
typedef EFI_STATUS(EFIAPI *EFI_TEXT_SET_ATTRIBUTE)(
    EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, uint64_t Attribute);
typedef EFI_STATUS(EFIAPI *EFI_TEXT_CLEAR_SCREEN)(
    EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This);
typedef EFI_STATUS(EFIAPI *EFI_TEXT_SET_CURSOR_POSITION)(
    EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, uint64_t Column, uint64_t Row);
typedef EFI_STATUS(EFIAPI *EFI_TEXT_ENABLE_CURSOR)(
    EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This, bool Visible);

typedef EFI_STATUS(EFIAPI *EFI_HANDLE_PROTOCOL)(EFI_HANDLE Handle,
                                                EFI_GUID *Protocol,
                                                void *out_Interface);

typedef EFI_STATUS(EFIAPI *EFI_IMAGE_LOAD)(bool BootPolicy,
                                           EFI_HANDLE ParentImageHandle,
                                           EFI_DEVICE_PATH_PROTOCOL *DevicePath,
                                           void *opt_SourceBuffer,
                                           uintptr_t SourceSize,
                                           EFI_HANDLE *out_ImageHandle);
typedef EFI_STATUS(EFIAPI *EFI_IMAGE_UNLOAD)(EFI_HANDLE ImageHandle);
typedef EFI_STATUS(EFIAPI *EFI_EXIT_BOOT_SERVICES)(EFI_HANDLE ImageHandle,
                                                   uintptr_t MapKey);

typedef struct {
  EFI_TABLE_HEADER Hdr;
  EFI_GET_TIME GetTime;
  EFI_SET_TIME SetTime;
  EFI_GET_WAKEUP_TIME GetWakeupTime;
  EFI_SET_WAKEUP_TIME SetWakeupTime;
  EFI_SET_VIRTUAL_ADDRESS_MAP SetVirtualAddressMap;
  EFI_CONVERT_POINTER ConvertPointer;
  EFI_GET_VARIABLE GetVariable;
  EFI_GET_NEXT_VARIABLE_NAME GetNextVariableName;
  EFI_SET_VARIABLE SetVariable;
  EFI_GET_NEXT_HIGH_MONO_COUNT GetNextHighMonotonicCount;
  EFI_RESET_SYSTEM ResetSystem;
  EFI_UPDATE_CAPSULE UpdateCapsule;
  EFI_QUERY_CAPSULE_CAPABILITIES QueryCapsuleCapabilities;
  EFI_QUERY_VARIABLE_INFO QueryVariableInfo;
} EFI_RUNTIME_SERVICES;

typedef struct {
  EFI_TABLE_HEADER Hdr;
  void *RaiseTPL;
  void *RestoreTPL;
  EFI_ALLOCATE_PAGES AllocatePages;
  EFI_FREE_PAGES FreePages;
  EFI_GET_MEMORY_MAP GetMemoryMap;
  EFI_ALLOCATE_POOL AllocatePool;
  EFI_FREE_POOL FreePool;
  EFI_CREATE_EVENT CreateEvent;
  EFI_SET_TIMER SetTimer;
  EFI_WAIT_FOR_EVENT WaitForEvent;
  EFI_SIGNAL_EVENT SignalEvent;
  EFI_CLOSE_EVENT CloseEvent;
  EFI_CHECK_EVENT CheckEvent;
  void *InstallProtocolInterface;
  void *ReinstallProtocolInterface;
  void *UninstallProtocolInterface;
  EFI_HANDLE_PROTOCOL HandleProtocol;
  void *Reserved;
  void *RegisterProtocolNotify;
  void *LocateHandle;
  void *LocateDevicePath;
  void *InstallConfigurationTable;
  EFI_IMAGE_LOAD LoadImage;
  void *StartImage;
  EFI_EXIT Exit;
  EFI_IMAGE_UNLOAD UnloadImage;
  EFI_EXIT_BOOT_SERVICES ExitBootServices;
  EFI_GET_NEXT_MONOTONIC_COUNT GetNextMonotonicCount;
  EFI_STALL Stall;
  EFI_SET_WATCHDOG_TIMER SetWatchdogTimer;
  void *ConnectController;
  void *DisconnectController;
  void *OpenProtocol;
  void *CloseProtocol;
  void *OpenProtocolInformation;
  void *ProtocolsPerHandle;
  void *LocateHandleBuffer;
  void *LocateProtocol;
  void *InstallMultipleProtocolInterfaces;
  void *UninstallMultipleProtocolInterfaces;
  void *CalculateCrc32;
  EFI_COPY_MEM CopyMem;
  EFI_SET_MEM SetMem;
  EFI_CREATE_EVENT_EX CreateEventEx;
} EFI_BOOT_SERVICES;

typedef struct {
  EFI_TABLE_HEADER Hdr;
  char16_t *FirmwareVendor;
  uint32_t FirmwareRevision;
  EFI_HANDLE ConsoleInHandle;
  EFI_SIMPLE_TEXT_INPUT_PROTOCOL *ConIn;
  EFI_HANDLE ConsoleOutHandle;
  EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *ConOut;
  EFI_HANDLE StandardErrorHandle;
  EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *StdErr;
  EFI_RUNTIME_SERVICES *RuntimeServices;
  EFI_BOOT_SERVICES *BootServices;
  uintptr_t NumberOfTableEntries;
  EFI_CONFIGURATION_TABLE *ConfigurationTable;
} EFI_SYSTEM_TABLE;

struct _EFI_SIMPLE_TEXT_INPUT_PROTOCOL {
  EFI_INPUT_RESET Reset;
  EFI_INPUT_READ_KEY ReadKeyStroke;
  EFI_EVENT WaitForKey;
};

struct _EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL {
  EFI_TEXT_RESET Reset;
  EFI_TEXT_STRING OutputString;
  EFI_TEXT_TEST_STRING TestString;
  EFI_TEXT_QUERY_MODE QueryMode;
  EFI_TEXT_SET_MODE SetMode;
  EFI_TEXT_SET_ATTRIBUTE SetAttribute;
  EFI_TEXT_CLEAR_SCREEN ClearScreen;
  EFI_TEXT_SET_CURSOR_POSITION SetCursorPosition;
  EFI_TEXT_ENABLE_CURSOR EnableCursor;
  EFI_SIMPLE_TEXT_OUTPUT_MODE *Mode;
};

typedef struct {
  uint32_t Revision;
  EFI_HANDLE ParentHandle;
  EFI_SYSTEM_TABLE *SystemTable;
  EFI_HANDLE DeviceHandle;
  EFI_DEVICE_PATH_PROTOCOL *FilePath;
  void *Reserved;
  uint32_t LoadOptionsSize;
  void *LoadOptions;
  void *ImageBase;
  uint64_t ImageSize;
  EFI_MEMORY_TYPE ImageCodeType;
  EFI_MEMORY_TYPE ImageDataType;
  EFI_IMAGE_UNLOAD Unload;
} EFI_LOADED_IMAGE;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/errors.h */

#define COSMOPOLITAN_NT_ERRORS_H_

#define kNtErrorInsufficientBuffer 122

#define kNtErrorSuccess 0
#define kNtErrorInvalidFunction 1  /* ENOSYS */
#define kNtErrorFileNotFound 2     /* ENOENT */
#define kNtErrorPathNotFound 3     /* ENOTDIR */
#define kNtErrorTooManyOpenFiles 4 /* EMFILE */
#define kNtErrorAccessDenied 5     /* EACCES */
#define kNtErrorInvalidHandle 6    /* EBADF */
#define kNtErrorArenaTrashed 7
#define kNtErrorNotEnoughMemory 8
#define kNtErrorInvalidBlock 9
#define kNtErrorBadEnvironment 10
#define kNtErrorBadFormat 11
#define kNtErrorInvalidAccess 12 /* EPERM */
#define kNtErrorInvalidData 13
#define kNtErrorOutofmemory 14 /* ENOMEM */
#define kNtErrorInvalidDrive 15
#define kNtErrorCurrentDirectory 16
#define kNtErrorNotSameDevice 17
#define kNtErrorNoMoreFiles 18
#define kNtErrorWriteProtect 19
#define kNtErrorBadUnit 20
#define kNtErrorNotReady 21
#define kNtErrorBadCommand 22
#define kNtErrorCrc 23
#define kNtErrorBadLength 24
#define kNtErrorSeek 25       /* ESPIPE */
#define kNtErrorNotDosDisk 26 /* ENOTBLK */
#define kNtErrorSectorNotFound 27
#define kNtErrorOutOfPaper 28
#define kNtErrorWriteFault 29
#define kNtErrorReadFault 30
#define kNtErrorGenFailure 31
#define kNtErrorSharingViolation 32
#define kNtErrorLockViolation 33
#define kNtErrorWrongDisk 34
#define kNtErrorSharingBufferExceeded 36
#define kNtErrorHandleEof 38 /* w/ GetOverlappedResult() */
#define kNtErrorHandleDiskFull 39
#define kNtErrorNotSupported 50
#define kNtErrorRemNotList 51
#define kNtErrorDupName 52
#define kNtErrorBadNetpath 53
#define kNtErrorNetworkBusy 54
#define kNtErrorDevNotExist 55
#define kNtErrorTooManyCmds 56
#define kNtErrorAdapHdwErr 57
#define kNtErrorBadNetResp 58
#define kNtErrorUnexpNetErr 59
#define kNtErrorBadRemAdap 60
#define kNtErrorPrintqFull 61
#define kNtErrorNoSpoolSpace 62
#define kNtErrorPrintCancelled 63
#define kNtErrorNetnameDeleted 64
#define kNtErrorNetworkAccessDenied 65
#define kNtErrorBadDevType 66
#define kNtErrorBadNetName 67
#define kNtErrorTooManyNames 68
#define kNtErrorTooManySess 69
#define kNtErrorSharingPaused 70
#define kNtErrorReqNotAccep 71
#define kNtErrorRedirPaused 72
#define kNtErrorFileExists 80 /* EEXIST */
#define kNtErrorCannotMake 82
#define kNtErrorFailI24 83
#define kNtErrorOutOfStructures 84
#define kNtErrorAlreadyAssigned 85
#define kNtErrorInvalidPassword 86
#define kNtErrorInvalidParameter 87 /* EINVAL */
#define kNtErrorNetWriteFault 88
#define kNtErrorNoProcSlots 89
#define kNtErrorTooManySemaphores 100
#define kNtErrorExclSemAlreadyOwned 101
#define kNtErrorSemIsSet 102
#define kNtErrorTooManySemRequests 103
#define kNtErrorInvalidAtInterruptTime 104
#define kNtErrorSemOwnerDied 105
#define kNtErrorSemUserLimit 106
#define kNtErrorDiskChange 107
#define kNtErrorDriveLocked 108
#define kNtErrorBrokenPipe 109 /* EPIPE; happens on ReadFile() too */
#define kNtErrorOpenFailed 110
#define kNtErrorBufferOverflow 111
#define kNtErrorDiskFull 112 /* ENOSPC */
#define kNtErrorNoMoreSearchHandles 113
#define kNtErrorInvalidTargetHandle 114
#define kNtErrorInvalidCategory 117
#define kNtErrorInvalidVerifySwitch 118
#define kNtErrorBadDriverLevel 119
#define kNtErrorCallNotImplemented 120
#define kNtErrorSemTimeout 121
#define kNtErrorInsufficientBuffer 122
#define kNtErrorInvalidName 123
#define kNtErrorInvalidLevel 124
#define kNtErrorNoVolumeLabel 125
#define kNtErrorModNotFound 126
#define kNtErrorProcNotFound 127
#define kNtErrorWaitNoChildren 128 /* ECHILD */
#define kNtErrorChildNotComplete 129
#define kNtErrorDirectAccessHandle 130
#define kNtErrorNegativeSeek 131
#define kNtErrorSeekOnDevice 132
#define kNtErrorIsJoinTarget 133
#define kNtErrorIsJoined 134
#define kNtErrorIsSubsted 135
#define kNtErrorNotJoined 136
#define kNtErrorNotSubsted 137
#define kNtErrorJoinToJoin 138
#define kNtErrorSubstToSubst 139
#define kNtErrorJoinToSubst 140
#define kNtErrorSubstToJoin 141
#define kNtErrorBusyDrive 142
#define kNtErrorSameDrive 143
#define kNtErrorDirNotRoot 144
#define kNtErrorDirNotEmpty 145
#define kNtErrorIsSubstPath 146
#define kNtErrorIsJoinPath 147
#define kNtErrorPathBusy 148 /* ETXTBSY */
#define kNtErrorIsSubstTarget 149
#define kNtErrorSystemTrace 150
#define kNtErrorInvalidEventCount 151
#define kNtErrorTooManyMuxwaiters 152
#define kNtErrorInvalidListFormat 153
#define kNtErrorLabelTooLong 154
#define kNtErrorTooManyTcbs 155
#define kNtErrorSignalRefused 156
#define kNtErrorDiscarded 157
#define kNtErrorNotLocked 158
#define kNtErrorBadThreadidAddr 159
#define kNtErrorBadArguments 160
#define kNtErrorBadPathname 161
#define kNtErrorSignalPending 162
#define kNtErrorMaxThrdsReached 164
#define kNtErrorLockFailed 167
#define kNtErrorBusy 170 /* EBUSY */
#define kNtErrorDeviceSupportInProgress 171
#define kNtErrorCancelViolation 173
#define kNtErrorAtomicLocksNotSupported 174
#define kNtErrorInvalidSegmentNumber 180
#define kNtErrorInvalidOrdinal 182
#define kNtErrorAlreadyExists 183 /* EEXIST */
#define kNtErrorInvalidFlagNumber 186
#define kNtErrorSemNotFound 187
#define kNtErrorInvalidStartingCodeseg 188
#define kNtErrorInvalidStackseg 189
#define kNtErrorInvalidModuletype 190
#define kNtErrorInvalidExeSignature 191
#define kNtErrorExeMarkedInvalid 192
#define kNtErrorBadExeFormat 193 /* ENOEXEC */
#define kNtErrorIteratedDataExceeds_64k 194
#define kNtErrorInvalidMinallocsize 195
#define kNtErrorDynlinkFromInvalidRing 196
#define kNtErrorIoplNotEnabled 197
#define kNtErrorInvalidSegdpl 198
#define kNtErrorAutodatasegExceeds_64k 199
#define kNtErrorRing2segMustBeMovable 200
#define kNtErrorRelocChainXeedsSeglim 201
#define kNtErrorInfloopInRelocChain 202
#define kNtErrorEnvvarNotFound 203
#define kNtErrorNoSignalSent 205
#define kNtErrorFilenameExcedRange 206
#define kNtErrorRing2StackInUse 207
#define kNtErrorMetaExpansionTooLong 208
#define kNtErrorInvalidSignalNumber 209
#define kNtErrorThread_1Inactive 210
#define kNtErrorLocked 212
#define kNtErrorTooManyModules 214
#define kNtErrorNestingNotAllowed 215
#define kNtErrorExeMachineTypeMismatch 216
#define kNtErrorExeCannotModifySignedBinary 217
#define kNtErrorExeCannotModifyStrongSignedBinary 218
#define kNtErrorFileCheckedOut 220
#define kNtErrorCheckoutRequired 221
#define kNtErrorBadFileType 222
#define kNtErrorFileTooLarge 223 /* EFBIG */
#define kNtErrorFormsAuthRequired 224
#define kNtErrorVirusInfected 225
#define kNtErrorVirusDeleted 226
#define kNtErrorPipeLocal 229
#define kNtErrorBadPipe 230
#define kNtErrorPipeBusy 231
#define kNtErrorNoData 232
#define kNtErrorPipeNotConnected 233
#define kNtErrorMoreData 234
#define kNtErrorNoWorkDone 235
#define kNtErrorVcDisconnected 240
#define kNtErrorInvalidEaName 254
#define kNtErrorEaListInconsistent 255
#define kNtErrorNoMoreItems 259
#define kNtErrorCannotCopy 266
#define kNtErrorDirectory 267
#define kNtErrorEasDidntFit 275
#define kNtErrorEaFileCorrupt 276
#define kNtErrorEaTableFull 277
#define kNtErrorInvalidEaHandle 278
#define kNtErrorEasNotSupported 282
#define kNtErrorNotOwner 288
#define kNtErrorTooManyPosts 298
#define kNtErrorPartialCopy 299
#define kNtErrorOplockNotGranted 300
#define kNtErrorInvalidOplockProtocol 301
#define kNtErrorDiskTooFragmented 302
#define kNtErrorDeletePending 303
#define kNtErrorIncompatibleWithGlobalShortNameRegistrySetting 304
#define kNtErrorShortNamesNotEnabledOnVolume 305
#define kNtErrorSecurityStreamIsInconsistent 306
#define kNtErrorInvalidLockRange 307
#define kNtErrorImageSubsystemNotPresent 308
#define kNtErrorNotificationGuidAlreadyDefined 309
#define kNtErrorInvalidExceptionHandler 310
#define kNtErrorDuplicatePrivileges 311
#define kNtErrorNoRangesProcessed 312
#define kNtErrorNotAllowedOnSystemFile 313
#define kNtErrorDiskResourcesExhausted 314
#define kNtErrorInvalidToken 315
#define kNtErrorDeviceFeatureNotSupported 316
#define kNtErrorMrMidNotFound 317
#define kNtErrorScopeNotFound 318
#define kNtErrorUndefinedScope 319
#define kNtErrorInvalidCap 320
#define kNtErrorDeviceUnreachable 321
#define kNtErrorDeviceNoResources 322
#define kNtErrorDataChecksumError 323
#define kNtErrorIntermixedKernelEaOperation 324
#define kNtErrorFileLevelTrimNotSupported 326
#define kNtErrorOffsetAlignmentViolation 327
#define kNtErrorInvalidFieldInParameterList 328
#define kNtErrorOperationInProgress 329
#define kNtErrorBadDevicePath 330
#define kNtErrorTooManyDescriptors 331 /* ENFILE */
#define kNtErrorScrubDataDisabled 332
#define kNtErrorNotRedundantStorage 333
#define kNtErrorResidentFileNotSupported 334
#define kNtErrorCompressedFileNotSupported 335
#define kNtErrorDirectoryNotSupported 336 /* EISDIR */
#define kNtErrorNotReadFromCopy 337
#define kNtErrorFtWriteFailure 338
#define kNtErrorFtDiScanRequired 339
#define kNtErrorInvalidKernelInfoVersion 340
#define kNtErrorInvalidPepInfoVersion 341
#define kNtErrorObjectNotExternallyBacked 342
#define kNtErrorExternalBackingProviderUnknown 343
#define kNtErrorCompressionNotBeneficial 344
#define kNtErrorStorageTopologyIdMismatch 345
#define kNtErrorBlockedByParentalControls 346
#define kNtErrorBlockTooManyReferences 347
#define kNtErrorMarkedToDisallowWrites 348
#define kNtErrorEnclaveFailure 349
#define kNtErrorFailNoactionReboot 350
#define kNtErrorFailShutdown 351
#define kNtErrorFailRestart 352
#define kNtErrorMaxSessionsReached 353
#define kNtErrorNetworkAccessDeniedEdp 354
#define kNtErrorDeviceHintNameBufferTooSmall 355
#define kNtErrorEdpPolicyDeniesOperation 356
#define kNtErrorEdpDplPolicyCantBeSatisfied 357
#define kNtErrorCloudFileSyncRootMetadataCorrupt 358
#define kNtErrorDeviceInMaintenance 359
#define kNtErrorNotSupportedOnDax 360
#define kNtErrorDaxMappingExists 361
#define kNtErrorCloudFileProviderNotRunning 362
#define kNtErrorCloudFileMetadataCorrupt 363
#define kNtErrorCloudFileMetadataTooLarge 364
#define kNtErrorCloudFilePropertyBlobTooLarge 365
#define kNtErrorCloudFilePropertyBlobChecksumMismatch 366
#define kNtErrorChildProcessBlocked 367
#define kNtErrorStorageLostDataPersistence 368
#define kNtErrorFileSystemVirtualizationUnavailable 369
#define kNtErrorFileSystemVirtualizationMetadataCorrupt 370
#define kNtErrorFileSystemVirtualizationBusy 371
#define kNtErrorFileSystemVirtualizationProviderUnknown 372
#define kNtErrorGdiHandleLeak 373
#define kNtErrorCloudFileTooManyPropertyBlobs 374
#define kNtErrorCloudFilePropertyVersionNotSupported 375
#define kNtErrorNotACloudFile 376
#define kNtErrorCloudFileNotInSync 377
#define kNtErrorCloudFileAlreadyConnected 378
#define kNtErrorCloudFileNotSupported 379
#define kNtErrorCloudFileInvalidRequest 380
#define kNtErrorCloudFileReadOnlyVolume 381
#define kNtErrorCloudFileConnectedProviderOnly 382
#define kNtErrorCloudFileValidationFailed 383
#define kNtErrorSmb1NotAvailable 384
#define kNtErrorFileSystemVirtualizationInvalidOperation 385
#define kNtErrorCloudFileAuthenticationFailed 386
#define kNtErrorCloudFileInsufficientResources 387
#define kNtErrorCloudFileNetworkUnavailable 388
#define kNtErrorCloudFileUnsuccessful 389
#define kNtErrorCloudFileNotUnderSyncRoot 390
#define kNtErrorCloudFileInUse 391
#define kNtErrorCloudFilePinned 392
#define kNtErrorCloudFileRequestAborted 393
#define kNtErrorCloudFilePropertyCorrupt 394
#define kNtErrorCloudFileAccessDenied 395
#define kNtErrorCloudFileIncompatibleHardlinks 396
#define kNtErrorCloudFilePropertyLockConflict 397
#define kNtErrorCloudFileRequestCanceled 398
#define kNtErrorExternalSyskeyNotSupported 399
#define kNtErrorThreadModeAlreadyBackground 400
#define kNtErrorThreadModeNotBackground 401
#define kNtErrorProcessModeAlreadyBackground 402
#define kNtErrorProcessModeNotBackground 403
#define kNtErrorCloudFileProviderTerminated 404
#define kNtErrorNotACloudSyncRoot 405
#define kNtErrorFileProtectedUnderDpl 406
#define kNtErrorVolumeNotClusterAligned 407
#define kNtErrorNoPhysicallyAlignedFreeSpaceFound 408
#define kNtErrorAppxFileNotEncrypted 409
#define kNtErrorRwrawEncryptedFileNotEncrypted 410
#define kNtErrorRwrawEncryptedInvalidEdatainfoFileoffset 411
#define kNtErrorRwrawEncryptedInvalidEdatainfoFilerange 412
#define kNtErrorRwrawEncryptedInvalidEdatainfoParameter 413
#define kNtErrorLinuxSubsystemNotPresent 414
#define kNtErrorCapauthzNotDevunlocked 450
#define kNtErrorCapauthzChangeType 451
#define kNtErrorCapauthzNotProvisioned 452
#define kNtErrorCapauthzNotAuthorized 453
#define kNtErrorCapauthzNoPolicy 454
#define kNtErrorCapauthzDbCorrupted 455
#define kNtErrorCapauthzSccdInvalidCatalog 456
#define kNtErrorCapauthzSccdNoAuthEntity 457
#define kNtErrorCapauthzSccdParseError 458
#define kNtErrorCapauthzSccdDevModeRequired 459
#define kNtErrorCapauthzSccdNoCapabilityMatch 460
#define kNtErrorPnpQueryRemoveDeviceTimeout 480
#define kNtErrorPnpQueryRemoveRelatedDeviceTimeout 481
#define kNtErrorPnpQueryRemoveUnrelatedDeviceTimeout 482
#define kNtErrorDeviceHardwareError 483
#define kNtErrorInvalidAddress 487 /* EFAULT */
#define kNtErrorVrfCfgEnabled 1183
#define kNtErrorPartitionTerminating 1184
#define kNtErrorUserProfileLoad 500
#define kNtErrorArithmeticOverflow 534
#define kNtErrorPipeConnected 535
#define kNtErrorPipeListening 536
#define kNtErrorVerifierStop 537
#define kNtErrorAbiosError 538
#define kNtErrorWx86Warning 539
#define kNtErrorWx86Error 540
#define kNtErrorTimerNotCanceled 541
#define kNtErrorUnwind 542
#define kNtErrorBadStack 543
#define kNtErrorInvalidUnwindTarget 544
#define kNtErrorInvalidPortAttributes 545
#define kNtErrorPortMessageTooLong 546
#define kNtErrorInvalidQuotaLower 547
#define kNtErrorDeviceAlreadyAttached 548
#define kNtErrorInstructionMisalignment 549
#define kNtErrorProfilingNotStarted 550
#define kNtErrorProfilingNotStopped 551
#define kNtErrorCouldNotInterpret 552
#define kNtErrorProfilingAtLimit 553
#define kNtErrorCantWait 554
#define kNtErrorCantTerminateSelf 555
#define kNtErrorUnexpectedMmCreateErr 556
#define kNtErrorUnexpectedMmMapError 557
#define kNtErrorUnexpectedMmExtendErr 558
#define kNtErrorBadFunctionTable 559
#define kNtErrorNoGuidTranslation 560
#define kNtErrorInvalidLdtSize 561
#define kNtErrorInvalidLdtOffset 563
#define kNtErrorInvalidLdtDescriptor 564
#define kNtErrorTooManyThreads 565
#define kNtErrorThreadNotInProcess 566 /* ESRCH */
#define kNtErrorPagefileQuotaExceeded 567
#define kNtErrorLogonServerConflict 568
#define kNtErrorSynchronizationRequired 569
#define kNtErrorNetOpenFailed 570
#define kNtErrorIoPrivilegeFailed 571
#define kNtErrorControlCExit 572
#define kNtErrorMissingSystemfile 573
#define kNtErrorUnhandledException 574
#define kNtErrorAppInitFailure 575
#define kNtErrorPagefileCreateFailed 576
#define kNtErrorInvalidImageHash 577
#define kNtErrorNoPagefile 578
#define kNtErrorIllegalFloatContext 579
#define kNtErrorNoEventPair 580
#define kNtErrorDomainCtrlrConfigError 581
#define kNtErrorIllegalCharacter 582
#define kNtErrorUndefinedCharacter 583
#define kNtErrorFloppyVolume 584
#define kNtErrorBiosFailedToConnectInterrupt 585
#define kNtErrorBackupController 586
#define kNtErrorMutantLimitExceeded 587
#define kNtErrorFsDriverRequired 588
#define kNtErrorCannotLoadRegistryFile 589
#define kNtErrorDebugAttachFailed 590
#define kNtErrorSystemProcessTerminated 591
#define kNtErrorDataNotAccepted 592
#define kNtErrorVdmHardError 593
#define kNtErrorDriverCancelTimeout 594
#define kNtErrorReplyMessageMismatch 595
#define kNtErrorLostWritebehindData 596
#define kNtErrorClientServerParametersInvalid 597
#define kNtErrorNotTinyStream 598
#define kNtErrorStackOverflowRead 599
#define kNtErrorConvertToLarge 600
#define kNtErrorFoundOutOfScope 601
#define kNtErrorAllocateBucket 602
#define kNtErrorMarshallOverflow 603
#define kNtErrorInvalidVariant 604
#define kNtErrorBadCompressionBuffer 605
#define kNtErrorAuditFailed 606
#define kNtErrorTimerResolutionNotSet 607
#define kNtErrorInsufficientLogonInfo 608
#define kNtErrorBadDllEntrypoint 609
#define kNtErrorBadServiceEntrypoint 610
#define kNtErrorIpAddressConflict1 611
#define kNtErrorIpAddressConflict2 612
#define kNtErrorRegistryQuotaLimit 613
#define kNtErrorNoCallbackActive 614
#define kNtErrorPwdTooShort 615
#define kNtErrorPwdTooRecent 616
#define kNtErrorPwdHistoryConflict 617
#define kNtErrorUnsupportedCompression 618
#define kNtErrorInvalidHwProfile 619
#define kNtErrorInvalidPlugplayDevicePath 620
#define kNtErrorQuotaListInconsistent 621
#define kNtErrorEvaluationExpiration 622
#define kNtErrorIllegalDllRelocation 623
#define kNtErrorDllInitFailedLogoff 624
#define kNtErrorValidateContinue 625
#define kNtErrorNoMoreMatches 626
#define kNtErrorRangeListConflict 627
#define kNtErrorServerSidMismatch 628
#define kNtErrorCantEnableDenyOnly 629
#define kNtErrorFloatMultipleFaults 630
#define kNtErrorFloatMultipleTraps 631
#define kNtErrorNointerface 632
#define kNtErrorDriverFailedSleep 633
#define kNtErrorCorruptSystemFile 634
#define kNtErrorCommitmentMinimum 635
#define kNtErrorPnpRestartEnumeration 636
#define kNtErrorSystemImageBadSignature 637
#define kNtErrorPnpRebootRequired 638
#define kNtErrorInsufficientPower 639
#define kNtErrorMultipleFaultViolation 640
#define kNtErrorSystemShutdown 641
#define kNtErrorPortNotSet 642
#define kNtErrorDsVersionCheckFailure 643
#define kNtErrorRangeNotFound 644
#define kNtErrorNotSafeModeDriver 646
#define kNtErrorFailedDriverEntry 647
#define kNtErrorDeviceEnumerationError 648
#define kNtErrorMountPointNotResolved 649
#define kNtErrorInvalidDeviceObjectParameter 650
#define kNtErrorMcaOccured 651
#define kNtErrorDriverDatabaseError 652
#define kNtErrorSystemHiveTooLarge 653
#define kNtErrorDriverFailedPriorUnload 654
#define kNtErrorVolsnapPrepareHibernate 655
#define kNtErrorHibernationFailure 656
#define kNtErrorPwdTooLong 657
#define kNtErrorFileSystemLimitation 665
#define kNtErrorAssertionFailure 668
#define kNtErrorAcpiError 669
#define kNtErrorWowAssertion 670
#define kNtErrorPnpBadMpsTable 671
#define kNtErrorPnpTranslationFailed 672
#define kNtErrorPnpIrqTranslationFailed 673
#define kNtErrorPnpInvalidId 674
#define kNtErrorWakeSystemDebugger 675
#define kNtErrorHandlesClosed 676
#define kNtErrorExtraneousInformation 677
#define kNtErrorRxactCommitNecessary 678
#define kNtErrorMediaCheck 679
#define kNtErrorGuidSubstitutionMade 680
#define kNtErrorStoppedOnSymlink 681
#define kNtErrorLongjump 682
#define kNtErrorPlugplayQueryVetoed 683
#define kNtErrorUnwindConsolidate 684
#define kNtErrorRegistryHiveRecovered 685
#define kNtErrorDllMightBeInsecure 686
#define kNtErrorDllMightBeIncompatible 687
#define kNtErrorDbgExceptionNotHandled 688
#define kNtErrorDbgReplyLater 689
#define kNtErrorDbgUnableToProvideHandle 690
#define kNtErrorDbgTerminateThread 691
#define kNtErrorDbgTerminateProcess 692
#define kNtErrorDbgControlC 693
#define kNtErrorDbgPrintexceptionC 694
#define kNtErrorDbgRipexception 695
#define kNtErrorDbgControlBreak 696
#define kNtErrorDbgCommandException 697
#define kNtErrorObjectNameExists 698
#define kNtErrorThreadWasSuspended 699
#define kNtErrorImageNotAtBase 700
#define kNtErrorRxactStateCreated 701
#define kNtErrorSegmentNotification 702
#define kNtErrorBadCurrentDirectory 703
#define kNtErrorFtReadRecoveryFromBackup 704
#define kNtErrorFtWriteRecovery 705
#define kNtErrorImageMachineTypeMismatch 706
#define kNtErrorReceivePartial 707
#define kNtErrorReceiveExpedited 708
#define kNtErrorReceivePartialExpedited 709
#define kNtErrorEventDone 710
#define kNtErrorEventPending 711
#define kNtErrorCheckingFileSystem 712
#define kNtErrorFatalAppExit 713
#define kNtErrorPredefinedHandle 714
#define kNtErrorWasUnlocked 715
#define kNtErrorServiceNotification 716
#define kNtErrorWasLocked 717
#define kNtErrorLogHardError 718
#define kNtErrorAlreadyWin32 719
#define kNtErrorImageMachineTypeMismatchExe 720
#define kNtErrorNoYieldPerformed 721
#define kNtErrorTimerResumeIgnored 722
#define kNtErrorArbitrationUnhandled 723
#define kNtErrorCardbusNotSupported 724
#define kNtErrorMpProcessorMismatch 725
#define kNtErrorHibernated 726
#define kNtErrorResumeHibernation 727
#define kNtErrorFirmwareUpdated 728
#define kNtErrorDriversLeakingLockedPages 729
#define kNtErrorWakeSystem 730
#define kNtErrorWait_1 731
#define kNtErrorWait_2 732
#define kNtErrorWait_3 733
#define kNtErrorWait_63 734
#define kNtErrorAbandonedWait_0 735
#define kNtErrorAbandonedWait_63 736
#define kNtErrorUserApc 737
#define kNtErrorKernelApc 738
#define kNtErrorAlerted 739
#define kNtErrorElevationRequired 740
#define kNtErrorReparse 741
#define kNtErrorOplockBreakInProgress 742
#define kNtErrorVolumeMounted 743
#define kNtErrorRxactCommitted 744
#define kNtErrorNotifyCleanup 745
#define kNtErrorPrimaryTransportConnectFailed 746
#define kNtErrorPageFaultTransition 747
#define kNtErrorPageFaultDemandZero 748
#define kNtErrorPageFaultCopyOnWrite 749
#define kNtErrorPageFaultGuardPage 750
#define kNtErrorPageFaultPagingFile 751
#define kNtErrorCachePageLocked 752
#define kNtErrorCrashDump 753
#define kNtErrorBufferAllZeros 754
#define kNtErrorReparseObject 755
#define kNtErrorResourceRequirementsChanged 756
#define kNtErrorTranslationComplete 757
#define kNtErrorNothingToTerminate 758
#define kNtErrorProcessNotInJob 759
#define kNtErrorProcessInJob 760
#define kNtErrorVolsnapHibernateReady 761
#define kNtErrorFsfilterOpCompletedSuccessfully 762
#define kNtErrorInterruptVectorAlreadyConnected 763
#define kNtErrorInterruptStillConnected 764
#define kNtErrorWaitForOplock 765
#define kNtErrorDbgExceptionHandled 766
#define kNtErrorDbgContinue 767
#define kNtErrorCallbackPopStack 768
#define kNtErrorCompressionDisabled 769
#define kNtErrorCantfetchbackwards 770
#define kNtErrorCantscrollbackwards 771
#define kNtErrorRowsnotreleased 772
#define kNtErrorBadAccessorFlags 773
#define kNtErrorErrorsEncountered 774
#define kNtErrorNotCapable 775
#define kNtErrorRequestOutOfSequence 776
#define kNtErrorVersionParseError 777
#define kNtErrorBadstartposition 778
#define kNtErrorMemoryHardware 779
#define kNtErrorDiskRepairDisabled 780
#define kNtErrorInsufficientResourceForSpecifiedSharedSectionSize 781
#define kNtErrorSystemPowerstateTransition 782
#define kNtErrorSystemPowerstateComplexTransition 783
#define kNtErrorMcaException 784
#define kNtErrorAccessAuditByPolicy 785
#define kNtErrorAccessDisabledNoSaferUiByPolicy 786
#define kNtErrorAbandonHiberfile 787
#define kNtErrorLostWritebehindDataNetworkDisconnected 788
#define kNtErrorLostWritebehindDataNetworkServerError 789
#define kNtErrorLostWritebehindDataLocalDiskError 790
#define kNtErrorBadMcfgTable 791
#define kNtErrorDiskRepairRedirected 792
#define kNtErrorDiskRepairUnsuccessful 793
#define kNtErrorCorruptLogOverfull 794
#define kNtErrorCorruptLogCorrupted 795
#define kNtErrorCorruptLogUnavailable 796
#define kNtErrorCorruptLogDeletedFull 797
#define kNtErrorCorruptLogCleared 798
#define kNtErrorOrphanNameExhausted 799
#define kNtErrorOplockSwitchedToNewHandle 800
#define kNtErrorCannotGrantRequestedOplock 801
#define kNtErrorCannotBreakOplock 802
#define kNtErrorOplockHandleClosed 803
#define kNtErrorNoAceCondition 804
#define kNtErrorInvalidAceCondition 805
#define kNtErrorFileHandleRevoked 806
#define kNtErrorImageAtDifferentBase 807
#define kNtErrorEncryptedIoNotPossible 808
#define kNtErrorFileMetadataOptimizationInProgress 809
#define kNtErrorQuotaActivity 810
#define kNtErrorHandleRevoked 811
#define kNtErrorCallbackInvokeInline 812
#define kNtErrorCpuSetInvalid 813
#define kNtErrorEnclaveNotTerminated 814
#define kNtErrorEnclaveViolation 815
#define kNtErrorEaAccessDenied 994
#define kNtErrorOperationAborted 995
#define kNtErrorIoIncomplete 996
#define kNtErrorIoPending 997
#define kNtErrorNoaccess 998
#define kNtErrorSwaperror 999
#define kNtErrorStackOverflow 1001
#define kNtErrorInvalidMessage 1002
#define kNtErrorCanNotComplete 1003
#define kNtErrorInvalidFlags 1004
#define kNtErrorUnrecognizedVolume 1005
#define kNtErrorFileInvalid 1006
#define kNtErrorFullscreenMode 1007
#define kNtErrorNoToken 1008
#define kNtErrorBaddb 1009
#define kNtErrorBadkey 1010
#define kNtErrorCantopen 1011
#define kNtErrorCantread 1012
#define kNtErrorCantwrite 1013
#define kNtErrorRegistryRecovered 1014
#define kNtErrorRegistryCorrupt 1015
#define kNtErrorRegistryIoFailed 1016
#define kNtErrorNotRegistryFile 1017
#define kNtErrorKeyDeleted 1018
#define kNtErrorNoLogSpace 1019
#define kNtErrorKeyHasChildren 1020
#define kNtErrorChildMustBeVolatile 1021
#define kNtErrorNotifyEnumDir 1022
#define kNtErrorDependentServicesRunning 1051
#define kNtErrorInvalidServiceControl 1052
#define kNtErrorServiceRequestTimeout 1053
#define kNtErrorServiceNoThread 1054
#define kNtErrorServiceDatabaseLocked 1055
#define kNtErrorServiceAlreadyRunning 1056
#define kNtErrorInvalidServiceAccount 1057
#define kNtErrorServiceDisabled 1058
#define kNtErrorCircularDependency 1059
#define kNtErrorServiceDoesNotExist 1060
#define kNtErrorServiceCannotAcceptCtrl 1061
#define kNtErrorServiceNotActive 1062
#define kNtErrorFailedServiceControllerConnect 1063
#define kNtErrorExceptionInService 1064
#define kNtErrorDatabaseDoesNotExist 1065
#define kNtErrorServiceSpecificError 1066
#define kNtErrorProcessAborted 1067
#define kNtErrorServiceDependencyFail 1068
#define kNtErrorServiceLogonFailed 1069
#define kNtErrorServiceStartHang 1070
#define kNtErrorInvalidServiceLock 1071
#define kNtErrorServiceMarkedForDelete 1072
#define kNtErrorServiceExists 1073
#define kNtErrorAlreadyRunningLkg 1074
#define kNtErrorServiceDependencyDeleted 1075
#define kNtErrorBootAlreadyAccepted 1076
#define kNtErrorServiceNeverStarted 1077
#define kNtErrorDuplicateServiceName 1078
#define kNtErrorDifferentServiceAccount 1079
#define kNtErrorCannotDetectDriverFailure 1080
#define kNtErrorCannotDetectProcessAbort 1081
#define kNtErrorNoRecoveryProgram 1082
#define kNtErrorServiceNotInExe 1083
#define kNtErrorNotSafebootService 1084
#define kNtErrorEndOfMedia 1100
#define kNtErrorFilemarkDetected 1101
#define kNtErrorBeginningOfMedia 1102
#define kNtErrorSetmarkDetected 1103
#define kNtErrorNoDataDetected 1104
#define kNtErrorPartitionFailure 1105
#define kNtErrorInvalidBlockLength 1106
#define kNtErrorDeviceNotPartitioned 1107
#define kNtErrorUnableToLockMedia 1108
#define kNtErrorUnableToUnloadMedia 1109
#define kNtErrorMediaChanged 1110
#define kNtErrorBusReset 1111
#define kNtErrorNoMediaInDrive 1112 /* ENXIO */
#define kNtErrorNoUnicodeTranslation 1113
#define kNtErrorDllInitFailed 1114
#define kNtErrorShutdownInProgress 1115
#define kNtErrorNoShutdownInProgress 1116
#define kNtErrorIoDevice 1117       /* EIO */
#define kNtErrorSerialNoDevice 1118 /* ENOTTY */
#define kNtErrorIrqBusy 1119
#define kNtErrorMoreWrites 1120
#define kNtErrorCounterTimeout 1121
#define kNtErrorFloppyIdMarkNotFound 1122
#define kNtErrorFloppyWrongCylinder 1123
#define kNtErrorFloppyUnknownError 1124
#define kNtErrorFloppyBadRegisters 1125
#define kNtErrorDiskRecalibrateFailed 1126
#define kNtErrorDiskOperationFailed 1127
#define kNtErrorDiskResetFailed 1128
#define kNtErrorEomOverflow 1129
#define kNtErrorNotEnoughServerMemory 1130
#define kNtErrorPossibleDeadlock 1131 /* EDEADLK */
#define kNtErrorMappedAlignment 1132
#define kNtErrorSetPowerStateVetoed 1140
#define kNtErrorSetPowerStateFailed 1141
#define kNtErrorTooManyLinks 1142
#define kNtErrorOldWinVersion 1150
#define kNtErrorAppWrongOs 1151
#define kNtErrorSingleInstanceApp 1152
#define kNtErrorRmodeApp 1153
#define kNtErrorInvalidDll 1154
#define kNtErrorNoAssociation 1155
#define kNtErrorDdeFail 1156
#define kNtErrorDllNotFound 1157
#define kNtErrorNoMoreUserHandles 1158
#define kNtErrorMessageSyncOnly 1159
#define kNtErrorSourceElementEmpty 1160
#define kNtErrorDestinationElementFull 1161
#define kNtErrorIllegalElementAddress 1162
#define kNtErrorMagazineNotPresent 1163
#define kNtErrorDeviceReinitializationNeeded 1164
#define kNtErrorDeviceRequiresCleaning 1165
#define kNtErrorDeviceDoorOpen 1166
#define kNtErrorDeviceNotConnected 1167
#define kNtErrorNotFound 1168
#define kNtErrorNoMatch 1169
#define kNtErrorSetNotFound 1170
#define kNtErrorPointNotFound 1171
#define kNtErrorNoTrackingService 1172
#define kNtErrorNoVolumeId 1173
#define kNtErrorUnableToRemoveReplaced 1175
#define kNtErrorUnableToMoveReplacement 1176
#define kNtErrorUnableToMoveReplacement_2 1177
#define kNtErrorJournalDeleteInProgress 1178
#define kNtErrorJournalNotActive 1179
#define kNtErrorPotentialFileFound 1180
#define kNtErrorJournalEntryDeleted 1181
#define kNtErrorShutdownIsScheduled 1190
#define kNtErrorShutdownUsersLoggedOn 1191
#define kNtErrorBadDevice 1200 /* ENODEV */
#define kNtErrorConnectionUnavail 1201
#define kNtErrorDeviceAlreadyRemembered 1202
#define kNtErrorNoNetOrBadPath 1203
#define kNtErrorBadProvider 1204
#define kNtErrorCannotOpenProfile 1205
#define kNtErrorBadProfile 1206
#define kNtErrorNotContainer 1207
#define kNtErrorExtendedError 1208
#define kNtErrorInvalidGroupname 1209
#define kNtErrorInvalidComputername 1210
#define kNtErrorInvalidEventname 1211
#define kNtErrorInvalidDomainname 1212
#define kNtErrorInvalidServicename 1213
#define kNtErrorInvalidNetname 1214
#define kNtErrorInvalidSharename 1215
#define kNtErrorInvalidPasswordname 1216
#define kNtErrorInvalidMessagename 1217
#define kNtErrorInvalidMessagedest 1218
#define kNtErrorSessionCredentialConflict 1219
#define kNtErrorRemoteSessionLimitExceeded 1220
#define kNtErrorDupDomainname 1221
#define kNtErrorNoNetwork 1222
#define kNtErrorCancelled 1223
#define kNtErrorUserMappedFile 1224
#define kNtErrorConnectionRefused 1225
#define kNtErrorGracefulDisconnect 1226
#define kNtErrorAddressAlreadyAssociated 1227
#define kNtErrorAddressNotAssociated 1228
#define kNtErrorConnectionInvalid 1229
#define kNtErrorConnectionActive 1230
#define kNtErrorNetworkUnreachable 1231
#define kNtErrorHostUnreachable 1232
#define kNtErrorProtocolUnreachable 1233
#define kNtErrorPortUnreachable 1234
#define kNtErrorRequestAborted 1235
#define kNtErrorConnectionAborted 1236
#define kNtErrorRetry 1237
#define kNtErrorConnectionCountLimit 1238
#define kNtErrorLoginTimeRestriction 1239
#define kNtErrorLoginWkstaRestriction 1240
#define kNtErrorIncorrectAddress 1241
#define kNtErrorAlreadyRegistered 1242
#define kNtErrorServiceNotFound 1243
#define kNtErrorNotAuthenticated 1244
#define kNtErrorNotLoggedOn 1245
#define kNtErrorContinue 1246
#define kNtErrorAlreadyInitialized 1247
#define kNtErrorNoMoreDevices 1248
#define kNtErrorNoSuchSite 1249
#define kNtErrorDomainControllerExists 1250
#define kNtErrorOnlyIfConnected 1251
#define kNtErrorOverrideNochanges 1252
#define kNtErrorBadUserProfile 1253
#define kNtErrorNotSupportedOnSbs 1254
#define kNtErrorServerShutdownInProgress 1255
#define kNtErrorHostDown 1256
#define kNtErrorNonAccountSid 1257
#define kNtErrorNonDomainSid 1258
#define kNtErrorApphelpBlock 1259
#define kNtErrorAccessDisabledByPolicy 1260
#define kNtErrorRegNatConsumption 1261
#define kNtErrorCscshareOffline 1262
#define kNtErrorPkinitFailure 1263
#define kNtErrorSmartcardSubsystemFailure 1264
#define kNtErrorDowngradeDetected 1265
#define kNtErrorMachineLocked 1271
#define kNtErrorSmbGuestLogonBlocked 1272
#define kNtErrorCallbackSuppliedInvalidData 1273
#define kNtErrorSyncForegroundRefreshRequired 1274
#define kNtErrorDriverBlocked 1275
#define kNtErrorInvalidImportOfNonDll 1276
#define kNtErrorAccessDisabledWebblade 1277
#define kNtErrorAccessDisabledWebbladeTamper 1278
#define kNtErrorRecoveryFailure 1279
#define kNtErrorAlreadyFiber 1280
#define kNtErrorAlreadyThread 1281
#define kNtErrorStackBufferOverrun 1282
#define kNtErrorParameterQuotaExceeded 1283
#define kNtErrorDebuggerInactive 1284
#define kNtErrorDelayLoadFailed 1285
#define kNtErrorVdmDisallowed 1286
#define kNtErrorUnidentifiedError 1287
#define kNtErrorInvalidCruntimeParameter 1288
#define kNtErrorBeyondVdl 1289
#define kNtErrorIncompatibleServiceSidType 1290
#define kNtErrorDriverProcessTerminated 1291
#define kNtErrorImplementationLimit 1292
#define kNtErrorProcessIsProtected 1293
#define kNtErrorServiceNotifyClientLagging 1294
#define kNtErrorDiskQuotaExceeded 1295
#define kNtErrorContentBlocked 1296
#define kNtErrorIncompatibleServicePrivilege 1297
#define kNtErrorAppHang 1298
#define kNtErrorInvalidLabel 1299
#define kNtErrorNotAllAssigned 1300
#define kNtErrorSomeNotMapped 1301
#define kNtErrorNoQuotasForAccount 1302
#define kNtErrorLocalUserSessionKey 1303
#define kNtErrorNullLmPassword 1304
#define kNtErrorUnknownRevision 1305
#define kNtErrorRevisionMismatch 1306
#define kNtErrorInvalidOwner 1307
#define kNtErrorInvalidPrimaryGroup 1308
#define kNtErrorNoImpersonationToken 1309
#define kNtErrorCantDisableMandatory 1310
#define kNtErrorNoLogonServers 1311
#define kNtErrorNoSuchLogonSession 1312
#define kNtErrorNoSuchPrivilege 1313
#define kNtErrorPrivilegeNotHeld 1314
#define kNtErrorInvalidAccountName 1315
#define kNtErrorUserExists 1316
#define kNtErrorNoSuchUser 1317
#define kNtErrorGroupExists 1318
#define kNtErrorNoSuchGroup 1319
#define kNtErrorMemberInGroup 1320
#define kNtErrorMemberNotInGroup 1321
#define kNtErrorLastAdmin 1322
#define kNtErrorWrongPassword 1323
#define kNtErrorIllFormedPassword 1324
#define kNtErrorPasswordRestriction 1325
#define kNtErrorLogonFailure 1326
#define kNtErrorAccountRestriction 1327
#define kNtErrorInvalidLogonHours 1328
#define kNtErrorInvalidWorkstation 1329
#define kNtErrorPasswordExpired 1330
#define kNtErrorAccountDisabled 1331
#define kNtErrorNoneMapped 1332
#define kNtErrorTooManyLuidsRequested 1333
#define kNtErrorLuidsExhausted 1334
#define kNtErrorInvalidSubAuthority 1335
#define kNtErrorInvalidAcl 1336
#define kNtErrorInvalidSid 1337
#define kNtErrorInvalidSecurityDescr 1338
#define kNtErrorBadInheritanceAcl 1340
#define kNtErrorServerDisabled 1341
#define kNtErrorServerNotDisabled 1342
#define kNtErrorInvalidIdAuthority 1343
#define kNtErrorAllottedSpaceExceeded 1344
#define kNtErrorInvalidGroupAttributes 1345
#define kNtErrorBadImpersonationLevel 1346
#define kNtErrorCantOpenAnonymous 1347
#define kNtErrorBadValidationClass 1348
#define kNtErrorBadTokenType 1349
#define kNtErrorNoSecurityOnObject 1350
#define kNtErrorCantAccessDomainInfo 1351
#define kNtErrorInvalidServerState 1352
#define kNtErrorInvalidDomainState 1353
#define kNtErrorInvalidDomainRole 1354
#define kNtErrorNoSuchDomain 1355
#define kNtErrorDomainExists 1356
#define kNtErrorDomainLimitExceeded 1357
#define kNtErrorInternalDbCorruption 1358
#define kNtErrorInternalError 1359
#define kNtErrorGenericNotMapped 1360
#define kNtErrorBadDescriptorFormat 1361
#define kNtErrorNotLogonProcess 1362
#define kNtErrorLogonSessionExists 1363
#define kNtErrorNoSuchPackage 1364
#define kNtErrorBadLogonSessionState 1365
#define kNtErrorLogonSessionCollision 1366
#define kNtErrorInvalidLogonType 1367
#define kNtErrorCannotImpersonate 1368
#define kNtErrorRxactInvalidState 1369
#define kNtErrorRxactCommitFailure 1370
#define kNtErrorSpecialAccount 1371
#define kNtErrorSpecialGroup 1372
#define kNtErrorSpecialUser 1373
#define kNtErrorMembersPrimaryGroup 1374
#define kNtErrorTokenAlreadyInUse 1375
#define kNtErrorNoSuchAlias 1376
#define kNtErrorMemberNotInAlias 1377
#define kNtErrorMemberInAlias 1378
#define kNtErrorAliasExists 1379
#define kNtErrorLogonNotGranted 1380
#define kNtErrorTooManySecrets 1381
#define kNtErrorSecretTooLong 1382
#define kNtErrorInternalDbError 1383
#define kNtErrorTooManyContextIds 1384
#define kNtErrorLogonTypeNotGranted 1385
#define kNtErrorNtCrossEncryptionRequired 1386
#define kNtErrorNoSuchMember 1387
#define kNtErrorInvalidMember 1388
#define kNtErrorTooManySids 1389
#define kNtErrorLmCrossEncryptionRequired 1390
#define kNtErrorNoInheritance 1391
#define kNtErrorFileCorrupt 1392
#define kNtErrorDiskCorrupt 1393
#define kNtErrorNoUserSessionKey 1394
#define kNtErrorLicenseQuotaExceeded 1395
#define kNtErrorWrongTargetName 1396
#define kNtErrorMutualAuthFailed 1397
#define kNtErrorTimeSkew 1398
#define kNtErrorCurrentDomainNotAllowed 1399
#define kNtErrorInvalidWindowHandle 1400
#define kNtErrorInvalidMenuHandle 1401
#define kNtErrorInvalidCursorHandle 1402
#define kNtErrorInvalidAccelHandle 1403
#define kNtErrorInvalidHookHandle 1404
#define kNtErrorInvalidDwpHandle 1405
#define kNtErrorTlwWithWschild 1406
#define kNtErrorCannotFindWndClass 1407
#define kNtErrorWindowOfOtherThread 1408
#define kNtErrorHotkeyAlreadyRegistered 1409
#define kNtErrorClassAlreadyExists 1410
#define kNtErrorClassDoesNotExist 1411
#define kNtErrorClassHasWindows 1412
#define kNtErrorInvalidIndex 1413
#define kNtErrorInvalidIconHandle 1414
#define kNtErrorPrivateDialogIndex 1415
#define kNtErrorListboxIdNotFound 1416
#define kNtErrorNoWildcardCharacters 1417
#define kNtErrorClipboardNotOpen 1418
#define kNtErrorHotkeyNotRegistered 1419
#define kNtErrorWindowNotDialog 1420
#define kNtErrorControlIdNotFound 1421
#define kNtErrorInvalidComboboxMessage 1422
#define kNtErrorWindowNotCombobox 1423
#define kNtErrorInvalidEditHeight 1424
#define kNtErrorDcNotFound 1425
#define kNtErrorInvalidHookFilter 1426
#define kNtErrorInvalidFilterProc 1427
#define kNtErrorHookNeedsHmod 1428
#define kNtErrorGlobalOnlyHook 1429
#define kNtErrorJournalHookSet 1430
#define kNtErrorHookNotInstalled 1431
#define kNtErrorInvalidLbMessage 1432
#define kNtErrorSetcountOnBadLb 1433
#define kNtErrorLbWithoutTabstops 1434
#define kNtErrorDestroyObjectOfOtherThread 1435
#define kNtErrorChildWindowMenu 1436
#define kNtErrorNoSystemMenu 1437
#define kNtErrorInvalidMsgboxStyle 1438
#define kNtErrorInvalidSpiValue 1439
#define kNtErrorScreenAlreadyLocked 1440
#define kNtErrorHwndsHaveDiffParent 1441
#define kNtErrorNotChildWindow 1442
#define kNtErrorInvalidGwCommand 1443
#define kNtErrorInvalidThreadId 1444
#define kNtErrorNonMdichildWindow 1445
#define kNtErrorPopupAlreadyActive 1446
#define kNtErrorNoScrollbars 1447
#define kNtErrorInvalidScrollbarRange 1448
#define kNtErrorInvalidShowwinCommand 1449
#define kNtErrorNoSystemResources 1450
#define kNtErrorNonpagedSystemResources 1451
#define kNtErrorPagedSystemResources 1452
#define kNtErrorWorkingSetQuota 1453
#define kNtErrorPagefileQuota 1454
#define kNtErrorCommitmentLimit 1455
#define kNtErrorMenuItemNotFound 1456
#define kNtErrorInvalidKeyboardHandle 1457
#define kNtErrorHookTypeNotAllowed 1458
#define kNtErrorRequiresInteractiveWindowstation 1459
#define kNtErrorTimeout 1460
#define kNtErrorInvalidMonitorHandle 1461
#define kNtErrorIncorrectSize 1462
#define kNtErrorSymlinkClassDisabled 1463
#define kNtErrorSymlinkNotSupported 1464
#define kNtErrorXmlParseError 1465
#define kNtErrorXmldsigError 1466
#define kNtErrorRestartApplication 1467
#define kNtErrorWrongCompartment 1468
#define kNtErrorAuthipFailure 1469
#define kNtErrorNoNvramResources 1470
#define kNtErrorNotGuiProcess 1471
#define kNtErrorEventlogFileCorrupt 1500
#define kNtErrorEventlogCantStart 1501
#define kNtErrorLogFileFull 1502
#define kNtErrorEventlogFileChanged 1503
#define kNtErrorContainerAssigned 1504
#define kNtErrorJobNoContainer 1505
#define kNtErrorInvalidTaskName 1550
#define kNtErrorInvalidTaskIndex 1551
#define kNtErrorThreadAlreadyInTask 1552
#define kNtErrorInstallServiceFailure 1601
#define kNtErrorInstallUserexit 1602
#define kNtErrorInstallFailure 1603
#define kNtErrorInstallSuspend 1604
#define kNtErrorUnknownProduct 1605
#define kNtErrorUnknownFeature 1606
#define kNtErrorUnknownComponent 1607
#define kNtErrorUnknownProperty 1608
#define kNtErrorInvalidHandleState 1609
#define kNtErrorBadConfiguration 1610
#define kNtErrorIndexAbsent 1611
#define kNtErrorInstallSourceAbsent 1612
#define kNtErrorInstallPackageVersion 1613
#define kNtErrorProductUninstalled 1614
#define kNtErrorBadQuerySyntax 1615
#define kNtErrorInvalidField 1616
#define kNtErrorDeviceRemoved 1617
#define kNtErrorInstallAlreadyRunning 1618
#define kNtErrorInstallPackageOpenFailed 1619
#define kNtErrorInstallPackageInvalid 1620
#define kNtErrorInstallUiFailure 1621
#define kNtErrorInstallLogFailure 1622
#define kNtErrorInstallLanguageUnsupported 1623
#define kNtErrorInstallTransformFailure 1624
#define kNtErrorInstallPackageRejected 1625
#define kNtErrorFunctionNotCalled 1626
#define kNtErrorFunctionFailed 1627
#define kNtErrorInvalidTable 1628
#define kNtErrorDatatypeMismatch 1629
#define kNtErrorUnsupportedType 1630
#define kNtErrorCreateFailed 1631
#define kNtErrorInstallTempUnwritable 1632
#define kNtErrorInstallPlatformUnsupported 1633
#define kNtErrorInstallNotused 1634
#define kNtErrorPatchPackageOpenFailed 1635
#define kNtErrorPatchPackageInvalid 1636
#define kNtErrorPatchPackageUnsupported 1637
#define kNtErrorProductVersion 1638
#define kNtErrorInvalidCommandLine 1639 /* E2BIG */
#define kNtErrorInstallRemoteDisallowed 1640
#define kNtErrorSuccessRebootInitiated 1641
#define kNtErrorPatchTargetNotFound 1642
#define kNtErrorPatchPackageRejected 1643
#define kNtErrorInstallTransformRejected 1644
#define kNtErrorInstallRemoteProhibited 1645
#define kNtErrorPatchRemovalUnsupported 1646
#define kNtErrorUnknownPatch 1647
#define kNtErrorPatchNoSequence 1648
#define kNtErrorPatchRemovalDisallowed 1649
#define kNtErrorInvalidPatchXml 1650
#define kNtErrorPatchManagedAdvertisedProduct 1651
#define kNtErrorInstallServiceSafeboot 1652
#define kNtErrorFailFastException 1653
#define kNtErrorInstallRejected 1654
#define kNtErrorDynamicCodeBlocked 1655
#define kNtErrorNotSameObject 1656
#define kNtErrorStrictCfgViolation 1657
#define kNtErrorSetContextDenied 1660
#define kNtErrorCrossPartitionViolation 1661
#define kNtErrorInvalidUserBuffer 1784
#define kNtErrorUnrecognizedMedia 1785
#define kNtErrorNoTrustLsaSecret 1786
#define kNtErrorNoTrustSamAccount 1787
#define kNtErrorTrustedDomainFailure 1788
#define kNtErrorTrustedRelationshipFailure 1789
#define kNtErrorTrustFailure 1790
#define kNtErrorNetlogonNotStarted 1792
#define kNtErrorAccountExpired 1793
#define kNtErrorRedirectorHasOpenHandles 1794
#define kNtErrorPrinterDriverAlreadyInstalled 1795
#define kNtErrorUnknownPort 1796
#define kNtErrorUnknownPrinterDriver 1797
#define kNtErrorUnknownPrintprocessor 1798
#define kNtErrorInvalidSeparatorFile 1799
#define kNtErrorInvalidPriority 1800
#define kNtErrorInvalidPrinterName 1801
#define kNtErrorPrinterAlreadyExists 1802
#define kNtErrorInvalidPrinterCommand 1803
#define kNtErrorInvalidDatatype 1804
#define kNtErrorInvalidEnvironment 1805
#define kNtErrorNologonInterdomainTrustAccount 1807
#define kNtErrorNologonWorkstationTrustAccount 1808
#define kNtErrorNologonServerTrustAccount 1809
#define kNtErrorDomainTrustInconsistent 1810
#define kNtErrorServerHasOpenHandles 1811
#define kNtErrorResourceDataNotFound 1812
#define kNtErrorResourceTypeNotFound 1813
#define kNtErrorResourceNameNotFound 1814
#define kNtErrorResourceLangNotFound 1815
#define kNtErrorNotEnoughQuota 1816
#define kNtErrorInvalidTime 1901
#define kNtErrorInvalidFormName 1902
#define kNtErrorInvalidFormSize 1903
#define kNtErrorAlreadyWaiting 1904
#define kNtErrorPrinterDeleted 1905
#define kNtErrorInvalidPrinterState 1906
#define kNtErrorPasswordMustChange 1907
#define kNtErrorDomainControllerNotFound 1908
#define kNtErrorAccountLockedOut 1909
#define kNtErrorNoSitename 1919
#define kNtErrorCantAccessFile 1920
#define kNtErrorCantResolveFilename 1921
#define kNtErrorKmDriverBlocked 1930
#define kNtErrorContextExpired 1931
#define kNtErrorPerUserTrustQuotaExceeded 1932
#define kNtErrorAllUserTrustQuotaExceeded 1933
#define kNtErrorUserDeleteTrustQuotaExceeded 1934
#define kNtErrorAuthenticationFirewallFailed 1935
#define kNtErrorRemotePrintConnectionsBlocked 1936
#define kNtErrorNtlmBlocked 1937
#define kNtErrorPasswordChangeRequired 1938
#define kNtErrorLostModeLogonRestriction 1939
#define kNtErrorInvalidPixelFormat 2000
#define kNtErrorBadDriver 2001
#define kNtErrorInvalidWindowStyle 2002
#define kNtErrorMetafileNotSupported 2003
#define kNtErrorTransformNotSupported 2004
#define kNtErrorClippingNotSupported 2005
#define kNtErrorInvalidCmm 2010
#define kNtErrorInvalidProfile 2011
#define kNtErrorTagNotFound 2012
#define kNtErrorTagNotPresent 2013
#define kNtErrorDuplicateTag 2014
#define kNtErrorProfileNotAssociatedWithDevice 2015
#define kNtErrorProfileNotFound 2016
#define kNtErrorInvalidColorspace 2017
#define kNtErrorIcmNotEnabled 2018
#define kNtErrorDeletingIcmXform 2019
#define kNtErrorInvalidTransform 2020
#define kNtErrorColorspaceMismatch 2021
#define kNtErrorInvalidColorindex 2022
#define kNtErrorProfileDoesNotMatchDevice 2023
#define kNtErrorConnectedOtherPassword 2108
#define kNtErrorConnectedOtherPasswordDefault 2109
#define kNtErrorBadUsername 2202
#define kNtErrorNotConnected 2250
#define kNtErrorOpenFiles 2401
#define kNtErrorActiveConnections 2402
#define kNtErrorDeviceInUse 2404
#define kNtErrorUnknownPrintMonitor 3000
#define kNtErrorPrinterDriverInUse 3001
#define kNtErrorSpoolFileNotFound 3002
#define kNtErrorSplNoStartdoc 3003
#define kNtErrorSplNoAddjob 3004
#define kNtErrorPrintProcessorAlreadyInstalled 3005
#define kNtErrorPrintMonitorAlreadyInstalled 3006
#define kNtErrorInvalidPrintMonitor 3007
#define kNtErrorPrintMonitorInUse 3008
#define kNtErrorPrinterHasJobsQueued 3009
#define kNtErrorSuccessRebootRequired 3010
#define kNtErrorSuccessRestartRequired 3011
#define kNtErrorPrinterNotFound 3012
#define kNtErrorPrinterDriverWarned 3013
#define kNtErrorPrinterDriverBlocked 3014
#define kNtErrorPrinterDriverPackageInUse 3015
#define kNtErrorCoreDriverPackageNotFound 3016
#define kNtErrorFailRebootRequired 3017
#define kNtErrorFailRebootInitiated 3018
#define kNtErrorPrinterDriverDownloadNeeded 3019
#define kNtErrorPrintJobRestartRequired 3020
#define kNtErrorInvalidPrinterDriverManifest 3021
#define kNtErrorPrinterNotShareable 3022
#define kNtErrorRequestPaused 3050
#define kNtErrorAppexecConditionNotSatisfied 3060
#define kNtErrorAppexecHandleInvalidated 3061
#define kNtErrorAppexecInvalidHostGeneration 3062
#define kNtErrorAppexecUnexpectedProcessRegistration 3063
#define kNtErrorAppexecInvalidHostState 3064
#define kNtErrorAppexecNoDonor 3065
#define kNtErrorAppexecHostIdMismatch 3066
#define kNtErrorIoReissueAsCached 3950
#define kNtErrorWinsInternal 4000
#define kNtErrorCanNotDelLocalWins 4001
#define kNtErrorStaticInit 4002
#define kNtErrorIncBackup 4003
#define kNtErrorFullBackup 4004
#define kNtErrorRecNonExistent 4005
#define kNtErrorRplNotAllowed 4006
#define kNtErrorDhcpAddressConflict 4100
#define kNtErrorWmiGuidNotFound 4200
#define kNtErrorWmiInstanceNotFound 4201
#define kNtErrorWmiItemidNotFound 4202
#define kNtErrorWmiTryAgain 4203
#define kNtErrorWmiDpNotFound 4204
#define kNtErrorWmiUnresolvedInstanceRef 4205
#define kNtErrorWmiAlreadyEnabled 4206
#define kNtErrorWmiGuidDisconnected 4207
#define kNtErrorWmiServerUnavailable 4208
#define kNtErrorWmiDpFailed 4209
#define kNtErrorWmiInvalidMof 4210
#define kNtErrorWmiInvalidReginfo 4211
#define kNtErrorWmiAlreadyDisabled 4212
#define kNtErrorWmiReadOnly 4213
#define kNtErrorWmiSetFailure 4214
#define kNtErrorNotAppcontainer 4250
#define kNtErrorAppcontainerRequired 4251
#define kNtErrorNotSupportedInAppcontainer 4252
#define kNtErrorInvalidPackageSidLength 4253
#define kNtErrorInvalidMedia 4300
#define kNtErrorInvalidLibrary 4301
#define kNtErrorInvalidMediaPool 4302
#define kNtErrorDriveMediaMismatch 4303
#define kNtErrorMediaOffline 4304
#define kNtErrorLibraryOffline 4305
#define kNtErrorEmpty 4306
#define kNtErrorNotEmpty 4307
#define kNtErrorMediaUnavailable 4308
#define kNtErrorResourceDisabled 4309
#define kNtErrorInvalidCleaner 4310
#define kNtErrorUnableToClean 4311
#define kNtErrorObjectNotFound 4312
#define kNtErrorDatabaseFailure 4313
#define kNtErrorDatabaseFull 4314
#define kNtErrorMediaIncompatible 4315
#define kNtErrorResourceNotPresent 4316
#define kNtErrorInvalidOperation 4317
#define kNtErrorMediaNotAvailable 4318
#define kNtErrorDeviceNotAvailable 4319
#define kNtErrorRequestRefused 4320
#define kNtErrorInvalidDriveObject 4321
#define kNtErrorLibraryFull 4322
#define kNtErrorMediumNotAccessible 4323
#define kNtErrorUnableToLoadMedium 4324
#define kNtErrorUnableToInventoryDrive 4325
#define kNtErrorUnableToInventorySlot 4326
#define kNtErrorUnableToInventoryTransport 4327
#define kNtErrorTransportFull 4328
#define kNtErrorControllingIeport 4329
#define kNtErrorUnableToEjectMountedMedia 4330
#define kNtErrorCleanerSlotSet 4331
#define kNtErrorCleanerSlotNotSet 4332
#define kNtErrorCleanerCartridgeSpent 4333
#define kNtErrorUnexpectedOmid 4334
#define kNtErrorCantDeleteLastItem 4335
#define kNtErrorMessageExceedsMaxSize 4336
#define kNtErrorVolumeContainsSysFiles 4337
#define kNtErrorIndigenousType 4338
#define kNtErrorNoSupportingDrives 4339
#define kNtErrorCleanerCartridgeInstalled 4340
#define kNtErrorIeportFull 4341
#define kNtErrorFileOffline 4350
#define kNtErrorRemoteStorageNotActive 4351
#define kNtErrorRemoteStorageMediaError 4352
#define kNtErrorNotAReparsePoint 4390
#define kNtErrorReparseAttributeConflict 4391
#define kNtErrorInvalidReparseData 4392
#define kNtErrorReparseTagInvalid 4393
#define kNtErrorReparseTagMismatch 4394
#define kNtErrorReparsePointEncountered 4395
#define kNtErrorAppDataNotFound 4400
#define kNtErrorAppDataExpired 4401
#define kNtErrorAppDataCorrupt 4402
#define kNtErrorAppDataLimitExceeded 4403
#define kNtErrorAppDataRebootRequired 4404
#define kNtErrorSecurebootRollbackDetected 4420
#define kNtErrorSecurebootPolicyViolation 4421
#define kNtErrorSecurebootInvalidPolicy 4422
#define kNtErrorSecurebootPolicyPublisherNotFound 4423
#define kNtErrorSecurebootPolicyNotSigned 4424
#define kNtErrorSecurebootNotEnabled 4425
#define kNtErrorSecurebootFileReplaced 4426
#define kNtErrorSecurebootPolicyNotAuthorized 4427
#define kNtErrorSecurebootPolicyUnknown 4428
#define kNtErrorSecurebootPolicyMissingAntirollbackversion 4429
#define kNtErrorSecurebootPlatformIdMismatch 4430
#define kNtErrorSecurebootPolicyRollbackDetected 4431
#define kNtErrorSecurebootPolicyUpgradeMismatch 4432
#define kNtErrorSecurebootRequiredPolicyFileMissing 4433
#define kNtErrorSecurebootNotBasePolicy 4434
#define kNtErrorSecurebootNotSupplementalPolicy 4435
#define kNtErrorOffloadReadFltNotSupported 4440
#define kNtErrorOffloadWriteFltNotSupported 4441
#define kNtErrorOffloadReadFileNotSupported 4442
#define kNtErrorOffloadWriteFileNotSupported 4443
#define kNtErrorAlreadyHasStreamId 4444
#define kNtErrorSmrGarbageCollectionRequired 4445
#define kNtErrorWofWimHeaderCorrupt 4446
#define kNtErrorWofWimResourceTableCorrupt 4447
#define kNtErrorWofFileResourceTableCorrupt 4448
#define kNtErrorVolumeNotSisEnabled 4500
#define kNtErrorSystemIntegrityRollbackDetected 4550
#define kNtErrorSystemIntegrityPolicyViolation 4551
#define kNtErrorSystemIntegrityInvalidPolicy 4552
#define kNtErrorSystemIntegrityPolicyNotSigned 4553
#define kNtErrorVsmNotInitialized 4560
#define kNtErrorVsmDmaProtectionNotInUse 4561
#define kNtErrorPlatformManifestNotAuthorized 4570
#define kNtErrorPlatformManifestInvalid 4571
#define kNtErrorPlatformManifestFileNotAuthorized 4572
#define kNtErrorPlatformManifestCatalogNotAuthorized 4573
#define kNtErrorPlatformManifestBinaryIdNotFound 4574
#define kNtErrorPlatformManifestNotActive 4575
#define kNtErrorPlatformManifestNotSigned 4576
#define kNtErrorDependentResourceExists 5001
#define kNtErrorDependencyNotFound 5002
#define kNtErrorDependencyAlreadyExists 5003
#define kNtErrorResourceNotOnline 5004
#define kNtErrorHostNodeNotAvailable 5005
#define kNtErrorResourceNotAvailable 5006
#define kNtErrorResourceNotFound 5007
#define kNtErrorShutdownCluster 5008
#define kNtErrorCantEvictActiveNode 5009
#define kNtErrorObjectAlreadyExists 5010
#define kNtErrorObjectInList 5011
#define kNtErrorGroupNotAvailable 5012
#define kNtErrorGroupNotFound 5013
#define kNtErrorGroupNotOnline 5014
#define kNtErrorHostNodeNotResourceOwner 5015
#define kNtErrorHostNodeNotGroupOwner 5016
#define kNtErrorResmonCreateFailed 5017
#define kNtErrorResmonOnlineFailed 5018
#define kNtErrorResourceOnline 5019
#define kNtErrorQuorumResource 5020
#define kNtErrorNotQuorumCapable 5021
#define kNtErrorClusterShuttingDown 5022
#define kNtErrorInvalidState 5023
#define kNtErrorResourcePropertiesStored 5024
#define kNtErrorNotQuorumClass 5025
#define kNtErrorCoreResource 5026
#define kNtErrorQuorumResourceOnlineFailed 5027
#define kNtErrorQuorumlogOpenFailed 5028
#define kNtErrorClusterlogCorrupt 5029
#define kNtErrorClusterlogRecordExceedsMaxsize 5030
#define kNtErrorClusterlogExceedsMaxsize 5031
#define kNtErrorClusterlogChkpointNotFound 5032
#define kNtErrorClusterlogNotEnoughSpace 5033
#define kNtErrorQuorumOwnerAlive 5034
#define kNtErrorNetworkNotAvailable 5035
#define kNtErrorNodeNotAvailable 5036
#define kNtErrorAllNodesNotAvailable 5037
#define kNtErrorResourceFailed 5038
#define kNtErrorClusterInvalidNode 5039
#define kNtErrorClusterNodeExists 5040
#define kNtErrorClusterJoinInProgress 5041
#define kNtErrorClusterNodeNotFound 5042
#define kNtErrorClusterLocalNodeNotFound 5043
#define kNtErrorClusterNetworkExists 5044
#define kNtErrorClusterNetworkNotFound 5045
#define kNtErrorClusterNetinterfaceExists 5046
#define kNtErrorClusterNetinterfaceNotFound 5047
#define kNtErrorClusterInvalidRequest 5048
#define kNtErrorClusterInvalidNetworkProvider 5049
#define kNtErrorClusterNodeDown 5050
#define kNtErrorClusterNodeUnreachable 5051
#define kNtErrorClusterNodeNotMember 5052
#define kNtErrorClusterJoinNotInProgress 5053
#define kNtErrorClusterInvalidNetwork 5054
#define kNtErrorClusterNodeUp 5056
#define kNtErrorClusterIpaddrInUse 5057
#define kNtErrorClusterNodeNotPaused 5058
#define kNtErrorClusterNoSecurityContext 5059
#define kNtErrorClusterNetworkNotInternal 5060
#define kNtErrorClusterNodeAlreadyUp 5061
#define kNtErrorClusterNodeAlreadyDown 5062
#define kNtErrorClusterNetworkAlreadyOnline 5063
#define kNtErrorClusterNetworkAlreadyOffline 5064
#define kNtErrorClusterNodeAlreadyMember 5065
#define kNtErrorClusterLastInternalNetwork 5066
#define kNtErrorClusterNetworkHasDependents 5067
#define kNtErrorInvalidOperationOnQuorum 5068
#define kNtErrorDependencyNotAllowed 5069
#define kNtErrorClusterNodePaused 5070
#define kNtErrorNodeCantHostResource 5071
#define kNtErrorClusterNodeNotReady 5072
#define kNtErrorClusterNodeShuttingDown 5073
#define kNtErrorClusterJoinAborted 5074
#define kNtErrorClusterIncompatibleVersions 5075
#define kNtErrorClusterMaxnumOfResourcesExceeded 5076
#define kNtErrorClusterSystemConfigChanged 5077
#define kNtErrorClusterResourceTypeNotFound 5078
#define kNtErrorClusterRestypeNotSupported 5079
#define kNtErrorClusterResnameNotFound 5080
#define kNtErrorClusterNoRpcPackagesRegistered 5081
#define kNtErrorClusterOwnerNotInPreflist 5082
#define kNtErrorClusterDatabaseSeqmismatch 5083
#define kNtErrorResmonInvalidState 5084
#define kNtErrorClusterGumNotLocker 5085
#define kNtErrorQuorumDiskNotFound 5086
#define kNtErrorDatabaseBackupCorrupt 5087
#define kNtErrorClusterNodeAlreadyHasDfsRoot 5088
#define kNtErrorResourcePropertyUnchangeable 5089
#define kNtErrorNoAdminAccessPoint 5090
#define kNtErrorClusterMembershipInvalidState 5890
#define kNtErrorClusterQuorumlogNotFound 5891
#define kNtErrorClusterMembershipHalt 5892
#define kNtErrorClusterInstanceIdMismatch 5893
#define kNtErrorClusterNetworkNotFoundForIp 5894
#define kNtErrorClusterPropertyDataTypeMismatch 5895
#define kNtErrorClusterEvictWithoutCleanup 5896
#define kNtErrorClusterParameterMismatch 5897
#define kNtErrorNodeCannotBeClustered 5898
#define kNtErrorClusterWrongOsVersion 5899
#define kNtErrorClusterCantCreateDupClusterName 5900
#define kNtErrorCluscfgAlreadyCommitted 5901
#define kNtErrorCluscfgRollbackFailed 5902
#define kNtErrorCluscfgSystemDiskDriveLetterConflict 5903
#define kNtErrorClusterOldVersion 5904
#define kNtErrorClusterMismatchedComputerAcctName 5905
#define kNtErrorClusterNoNetAdapters 5906
#define kNtErrorClusterPoisoned 5907
#define kNtErrorClusterGroupMoving 5908
#define kNtErrorClusterResourceTypeBusy 5909
#define kNtErrorResourceCallTimedOut 5910
#define kNtErrorInvalidClusterIpv6Address 5911
#define kNtErrorClusterInternalInvalidFunction 5912
#define kNtErrorClusterParameterOutOfBounds 5913
#define kNtErrorClusterPartialSend 5914
#define kNtErrorClusterRegistryInvalidFunction 5915
#define kNtErrorClusterInvalidStringTermination 5916
#define kNtErrorClusterInvalidStringFormat 5917
#define kNtErrorClusterDatabaseTransactionInProgress 5918
#define kNtErrorClusterDatabaseTransactionNotInProgress 5919
#define kNtErrorClusterNullData 5920
#define kNtErrorClusterPartialRead 5921
#define kNtErrorClusterPartialWrite 5922
#define kNtErrorClusterCantDeserializeData 5923
#define kNtErrorDependentResourcePropertyConflict 5924
#define kNtErrorClusterNoQuorum 5925
#define kNtErrorClusterInvalidIpv6Network 5926
#define kNtErrorClusterInvalidIpv6TunnelNetwork 5927
#define kNtErrorQuorumNotAllowedInThisGroup 5928
#define kNtErrorDependencyTreeTooComplex 5929
#define kNtErrorExceptionInResourceCall 5930
#define kNtErrorClusterRhsFailedInitialization 5931
#define kNtErrorClusterNotInstalled 5932
#define kNtErrorClusterResourcesMustBeOnlineOnTheSameNode 5933
#define kNtErrorClusterMaxNodesInCluster 5934
#define kNtErrorClusterTooManyNodes 5935
#define kNtErrorClusterObjectAlreadyUsed 5936
#define kNtErrorNoncoreGroupsFound 5937
#define kNtErrorFileShareResourceConflict 5938
#define kNtErrorClusterEvictInvalidRequest 5939
#define kNtErrorClusterSingletonResource 5940
#define kNtErrorClusterGroupSingletonResource 5941
#define kNtErrorClusterResourceProviderFailed 5942
#define kNtErrorClusterResourceConfigurationError 5943
#define kNtErrorClusterGroupBusy 5944
#define kNtErrorClusterNotSharedVolume 5945
#define kNtErrorClusterInvalidSecurityDescriptor 5946
#define kNtErrorClusterSharedVolumesInUse 5947
#define kNtErrorClusterUseSharedVolumesApi 5948
#define kNtErrorClusterBackupInProgress 5949
#define kNtErrorNonCsvPath 5950
#define kNtErrorCsvVolumeNotLocal 5951
#define kNtErrorClusterWatchdogTerminating 5952
#define kNtErrorClusterResourceVetoedMoveIncompatibleNodes 5953
#define kNtErrorClusterInvalidNodeWeight 5954
#define kNtErrorClusterResourceVetoedCall 5955
#define kNtErrorResmonSystemResourcesLacking 5956
#define kNtErrorClusterResourceVetoedMoveNotEnoughResourcesOnSource 5958
#define kNtErrorClusterGroupQueued 5959
#define kNtErrorClusterResourceLockedStatus 5960
#define kNtErrorClusterSharedVolumeFailoverNotAllowed 5961
#define kNtErrorClusterNodeDrainInProgress 5962
#define kNtErrorClusterDiskNotConnected 5963
#define kNtErrorDiskNotCsvCapable 5964
#define kNtErrorResourceNotInAvailableStorage 5965
#define kNtErrorClusterSharedVolumeRedirected 5966
#define kNtErrorClusterSharedVolumeNotRedirected 5967
#define kNtErrorClusterCannotReturnProperties 5968
#define kNtErrorClusterResourceIsInMaintenanceMode 5970
#define kNtErrorClusterAffinityConflict 5971
#define kNtErrorClusterResourceIsReplicaVirtualMachine 5972
#define kNtErrorClusterUpgradeIncompatibleVersions 5973
#define kNtErrorClusterUpgradeFixQuorumNotSupported 5974
#define kNtErrorClusterUpgradeRestartRequired 5975
#define kNtErrorClusterUpgradeInProgress 5976
#define kNtErrorClusterUpgradeIncomplete 5977
#define kNtErrorClusterNodeInGracePeriod 5978
#define kNtErrorClusterCsvIoPauseTimeout 5979
#define kNtErrorNodeNotActiveClusterMember 5980
#define kNtErrorClusterResourceNotMonitored 5981
#define kNtErrorClusterResourceDoesNotSupportUnmonitored 5982
#define kNtErrorClusterResourceIsReplicated 5983
#define kNtErrorClusterNodeIsolated 5984
#define kNtErrorClusterNodeQuarantined 5985
#define kNtErrorClusterDatabaseUpdateConditionFailed 5986
#define kNtErrorClusterSpaceDegraded 5987
#define kNtErrorClusterTokenDelegationNotSupported 5988
#define kNtErrorClusterCsvInvalidHandle 5989
#define kNtErrorClusterCsvSupportedOnlyOnCoordinator 5990
#define kNtErrorGroupsetNotAvailable 5991
#define kNtErrorGroupsetNotFound 5992
#define kNtErrorGroupsetCantProvide 5993
#define kNtErrorClusterFaultDomainParentNotFound 5994
#define kNtErrorClusterFaultDomainInvalidHierarchy 5995
#define kNtErrorClusterFaultDomainFailedS2dValidation 5996
#define kNtErrorClusterFaultDomainS2dConnectivityLoss 5997
#define kNtErrorClusterInvalidInfrastructureFileserverName 5998
#define kNtErrorClustersetManagementClusterUnreachable 5999
#define kNtErrorEncryptionFailed 6000
#define kNtErrorDecryptionFailed 6001
#define kNtErrorFileEncrypted 6002
#define kNtErrorNoRecoveryPolicy 6003
#define kNtErrorNoEfs 6004
#define kNtErrorWrongEfs 6005
#define kNtErrorNoUserKeys 6006
#define kNtErrorFileNotEncrypted 6007
#define kNtErrorNotExportFormat 6008
#define kNtErrorFileReadOnly 6009 /* EROFS */
#define kNtErrorDirEfsDisallowed 6010
#define kNtErrorEfsServerNotTrusted 6011
#define kNtErrorBadRecoveryPolicy 6012
#define kNtErrorEfsAlgBlobTooBig 6013
#define kNtErrorVolumeNotSupportEfs 6014
#define kNtErrorEfsDisabled 6015
#define kNtErrorEfsVersionNotSupport 6016
#define kNtErrorCsEncryptionInvalidServerResponse 6017
#define kNtErrorCsEncryptionUnsupportedServer 6018
#define kNtErrorCsEncryptionExistingEncryptedFile 6019
#define kNtErrorCsEncryptionNewEncryptedFile 6020
#define kNtErrorCsEncryptionFileNotCse 6021
#define kNtErrorEncryptionPolicyDeniesOperation 6022
#define kNtErrorNoBrowserServersFound 6118
#define kNtErrorLogSectorInvalid 6600
#define kNtErrorLogSectorParityInvalid 6601
#define kNtErrorLogSectorRemapped 6602
#define kNtErrorLogBlockIncomplete 6603
#define kNtErrorLogInvalidRange 6604
#define kNtErrorLogBlocksExhausted 6605
#define kNtErrorLogReadContextInvalid 6606
#define kNtErrorLogRestartInvalid 6607
#define kNtErrorLogBlockVersion 6608
#define kNtErrorLogBlockInvalid 6609
#define kNtErrorLogReadModeInvalid 6610
#define kNtErrorLogNoRestart 6611
#define kNtErrorLogMetadataCorrupt 6612
#define kNtErrorLogMetadataInvalid 6613
#define kNtErrorLogMetadataInconsistent 6614
#define kNtErrorLogReservationInvalid 6615
#define kNtErrorLogCantDelete 6616
#define kNtErrorLogContainerLimitExceeded 6617
#define kNtErrorLogStartOfLog 6618
#define kNtErrorLogPolicyAlreadyInstalled 6619
#define kNtErrorLogPolicyNotInstalled 6620
#define kNtErrorLogPolicyInvalid 6621
#define kNtErrorLogPolicyConflict 6622
#define kNtErrorLogPinnedArchiveTail 6623
#define kNtErrorLogRecordNonexistent 6624
#define kNtErrorLogRecordsReservedInvalid 6625
#define kNtErrorLogSpaceReservedInvalid 6626
#define kNtErrorLogTailInvalid 6627
#define kNtErrorLogFull 6628
#define kNtErrorCouldNotResizeLog 6629
#define kNtErrorLogMultiplexed 6630
#define kNtErrorLogDedicated 6631
#define kNtErrorLogArchiveNotInProgress 6632
#define kNtErrorLogArchiveInProgress 6633
#define kNtErrorLogEphemeral 6634
#define kNtErrorLogNotEnoughContainers 6635
#define kNtErrorLogClientAlreadyRegistered 6636
#define kNtErrorLogClientNotRegistered 6637
#define kNtErrorLogFullHandlerInProgress 6638
#define kNtErrorLogContainerReadFailed 6639
#define kNtErrorLogContainerWriteFailed 6640
#define kNtErrorLogContainerOpenFailed 6641
#define kNtErrorLogContainerStateInvalid 6642
#define kNtErrorLogStateInvalid 6643
#define kNtErrorLogPinned 6644
#define kNtErrorLogMetadataFlushFailed 6645
#define kNtErrorLogInconsistentSecurity 6646
#define kNtErrorLogAppendedFlushFailed 6647
#define kNtErrorLogPinnedReservation 6648
#define kNtErrorInvalidTransaction 6700
#define kNtErrorTransactionNotActive 6701
#define kNtErrorTransactionRequestNotValid 6702
#define kNtErrorTransactionNotRequested 6703
#define kNtErrorTransactionAlreadyAborted 6704
#define kNtErrorTransactionAlreadyCommitted 6705
#define kNtErrorTmInitializationFailed 6706
#define kNtErrorResourcemanagerReadOnly 6707
#define kNtErrorTransactionNotJoined 6708
#define kNtErrorTransactionSuperiorExists 6709
#define kNtErrorCrmProtocolAlreadyExists 6710
#define kNtErrorTransactionPropagationFailed 6711
#define kNtErrorCrmProtocolNotFound 6712
#define kNtErrorTransactionInvalidMarshallBuffer 6713
#define kNtErrorCurrentTransactionNotValid 6714
#define kNtErrorTransactionNotFound 6715
#define kNtErrorResourcemanagerNotFound 6716
#define kNtErrorEnlistmentNotFound 6717
#define kNtErrorTransactionmanagerNotFound 6718
#define kNtErrorTransactionmanagerNotOnline 6719
#define kNtErrorTransactionmanagerRecoveryNameCollision 6720
#define kNtErrorTransactionNotRoot 6721
#define kNtErrorTransactionObjectExpired 6722
#define kNtErrorTransactionResponseNotEnlisted 6723
#define kNtErrorTransactionRecordTooLong 6724
#define kNtErrorImplicitTransactionNotSupported 6725
#define kNtErrorTransactionIntegrityViolated 6726
#define kNtErrorTransactionmanagerIdentityMismatch 6727
#define kNtErrorRmCannotBeFrozenForSnapshot 6728
#define kNtErrorTransactionMustWritethrough 6729
#define kNtErrorTransactionNoSuperior 6730
#define kNtErrorHeuristicDamagePossible 6731
#define kNtErrorTransactionalConflict 6800
#define kNtErrorRmNotActive 6801
#define kNtErrorRmMetadataCorrupt 6802
#define kNtErrorDirectoryNotRm 6803
#define kNtErrorTransactionsUnsupportedRemote 6805
#define kNtErrorLogResizeInvalidSize 6806
#define kNtErrorObjectNoLongerExists 6807
#define kNtErrorStreamMiniversionNotFound 6808
#define kNtErrorStreamMiniversionNotValid 6809
#define kNtErrorMiniversionInaccessibleFromSpecifiedTransaction 6810
#define kNtErrorCantOpenMiniversionWithModifyIntent 6811
#define kNtErrorCantCreateMoreStreamMiniversions 6812
#define kNtErrorRemoteFileVersionMismatch 6814
#define kNtErrorHandleNoLongerValid 6815
#define kNtErrorNoTxfMetadata 6816
#define kNtErrorLogCorruptionDetected 6817
#define kNtErrorCantRecoverWithHandleOpen 6818
#define kNtErrorRmDisconnected 6819
#define kNtErrorEnlistmentNotSuperior 6820
#define kNtErrorRecoveryNotNeeded 6821
#define kNtErrorRmAlreadyStarted 6822
#define kNtErrorFileIdentityNotPersistent 6823
#define kNtErrorCantBreakTransactionalDependency 6824
#define kNtErrorCantCrossRmBoundary 6825
#define kNtErrorTxfDirNotEmpty 6826
#define kNtErrorIndoubtTransactionsExist 6827
#define kNtErrorTmVolatile 6828
#define kNtErrorRollbackTimerExpired 6829
#define kNtErrorTxfAttributeCorrupt 6830
#define kNtErrorEfsNotAllowedInTransaction 6831
#define kNtErrorTransactionalOpenNotAllowed 6832
#define kNtErrorLogGrowthFailed 6833
#define kNtErrorTransactedMappingUnsupportedRemote 6834
#define kNtErrorTxfMetadataAlreadyPresent 6835
#define kNtErrorTransactionScopeCallbacksNotSet 6836
#define kNtErrorTransactionRequiredPromotion 6837
#define kNtErrorCannotExecuteFileInTransaction 6838
#define kNtErrorTransactionsNotFrozen 6839
#define kNtErrorTransactionFreezeInProgress 6840
#define kNtErrorNotSnapshotVolume 6841
#define kNtErrorNoSavepointWithOpenFiles 6842
#define kNtErrorDataLostRepair 6843
#define kNtErrorSparseNotAllowedInTransaction 6844
#define kNtErrorTmIdentityMismatch 6845
#define kNtErrorFloatedSection 6846
#define kNtErrorCannotAcceptTransactedWork 6847
#define kNtErrorCannotAbortTransactions 6848
#define kNtErrorBadClusters 6849
#define kNtErrorCompressionNotAllowedInTransaction 6850
#define kNtErrorVolumeDirty 6851
#define kNtErrorNoLinkTrackingInTransaction 6852
#define kNtErrorOperationNotSupportedInTransaction 6853
#define kNtErrorExpiredHandle 6854
#define kNtErrorTransactionNotEnlisted 6855
#define kNtErrorCtxWinstationNameInvalid 7001
#define kNtErrorCtxInvalidPd 7002
#define kNtErrorCtxPdNotFound 7003
#define kNtErrorCtxWdNotFound 7004
#define kNtErrorCtxCannotMakeEventlogEntry 7005
#define kNtErrorCtxServiceNameCollision 7006
#define kNtErrorCtxClosePending 7007
#define kNtErrorCtxNoOutbuf 7008
#define kNtErrorCtxModemInfNotFound 7009
#define kNtErrorCtxInvalidModemname 7010
#define kNtErrorCtxModemResponseError 7011
#define kNtErrorCtxModemResponseTimeout 7012
#define kNtErrorCtxModemResponseNoCarrier 7013
#define kNtErrorCtxModemResponseNoDialtone 7014
#define kNtErrorCtxModemResponseBusy 7015
#define kNtErrorCtxModemResponseVoice 7016
#define kNtErrorCtxTdError 7017
#define kNtErrorCtxWinstationNotFound 7022
#define kNtErrorCtxWinstationAlreadyExists 7023
#define kNtErrorCtxWinstationBusy 7024
#define kNtErrorCtxBadVideoMode 7025
#define kNtErrorCtxGraphicsInvalid 7035
#define kNtErrorCtxLogonDisabled 7037
#define kNtErrorCtxNotConsole 7038
#define kNtErrorCtxClientQueryTimeout 7040
#define kNtErrorCtxConsoleDisconnect 7041
#define kNtErrorCtxConsoleConnect 7042
#define kNtErrorCtxShadowDenied 7044
#define kNtErrorCtxWinstationAccessDenied 7045
#define kNtErrorCtxInvalidWd 7049
#define kNtErrorCtxShadowInvalid 7050
#define kNtErrorCtxShadowDisabled 7051
#define kNtErrorCtxClientLicenseInUse 7052
#define kNtErrorCtxClientLicenseNotSet 7053
#define kNtErrorCtxLicenseNotAvailable 7054
#define kNtErrorCtxLicenseClientInvalid 7055
#define kNtErrorCtxLicenseExpired 7056
#define kNtErrorCtxShadowNotRunning 7057
#define kNtErrorCtxShadowEndedByModeChange 7058
#define kNtErrorActivationCountExceeded 7059
#define kNtErrorCtxWinstationsDisabled 7060
#define kNtErrorCtxEncryptionLevelRequired 7061
#define kNtErrorCtxSessionInUse 7062
#define kNtErrorCtxNoForceLogoff 7063
#define kNtErrorCtxAccountRestriction 7064
#define kNtErrorRdpProtocolError 7065
#define kNtErrorCtxCdmConnect 7066
#define kNtErrorCtxCdmDisconnect 7067
#define kNtErrorCtxSecurityLayerError 7068
#define kNtErrorTsIncompatibleSessions 7069
#define kNtErrorTsVideoSubsystemError 7070
#define kNtErrorDsNotInstalled 8200
#define kNtErrorDsMembershipEvaluatedLocally 8201
#define kNtErrorDsNoAttributeOrValue 8202
#define kNtErrorDsInvalidAttributeSyntax 8203
#define kNtErrorDsAttributeTypeUndefined 8204
#define kNtErrorDsAttributeOrValueExists 8205
#define kNtErrorDsBusy 8206
#define kNtErrorDsUnavailable 8207
#define kNtErrorDsNoRidsAllocated 8208
#define kNtErrorDsNoMoreRids 8209
#define kNtErrorDsIncorrectRoleOwner 8210
#define kNtErrorDsRidmgrInitError 8211
#define kNtErrorDsObjClassViolation 8212
#define kNtErrorDsCantOnNonLeaf 8213
#define kNtErrorDsCantOnRdn 8214
#define kNtErrorDsCantModObjClass 8215
#define kNtErrorDsCrossDomMoveError 8216
#define kNtErrorDsGcNotAvailable 8217
#define kNtErrorSharedPolicy 8218
#define kNtErrorPolicyObjectNotFound 8219
#define kNtErrorPolicyOnlyInDs 8220
#define kNtErrorPromotionActive 8221
#define kNtErrorNoPromotionActive 8222
#define kNtErrorDsOperationsError 8224
#define kNtErrorDsProtocolError 8225
#define kNtErrorDsTimelimitExceeded 8226
#define kNtErrorDsSizelimitExceeded 8227
#define kNtErrorDsAdminLimitExceeded 8228
#define kNtErrorDsCompareFalse 8229
#define kNtErrorDsCompareTrue 8230
#define kNtErrorDsAuthMethodNotSupported 8231
#define kNtErrorDsStrongAuthRequired 8232
#define kNtErrorDsInappropriateAuth 8233
#define kNtErrorDsAuthUnknown 8234
#define kNtErrorDsReferral 8235
#define kNtErrorDsUnavailableCritExtension 8236
#define kNtErrorDsConfidentialityRequired 8237
#define kNtErrorDsInappropriateMatching 8238
#define kNtErrorDsConstraintViolation 8239
#define kNtErrorDsNoSuchObject 8240
#define kNtErrorDsAliasProblem 8241
#define kNtErrorDsInvalidDnSyntax 8242
#define kNtErrorDsIsLeaf 8243
#define kNtErrorDsAliasDerefProblem 8244
#define kNtErrorDsUnwillingToPerform 8245
#define kNtErrorDsLoopDetect 8246
#define kNtErrorDsNamingViolation 8247
#define kNtErrorDsObjectResultsTooLarge 8248
#define kNtErrorDsAffectsMultipleDsas 8249
#define kNtErrorDsServerDown 8250
#define kNtErrorDsLocalError 8251
#define kNtErrorDsEncodingError 8252
#define kNtErrorDsDecodingError 8253
#define kNtErrorDsFilterUnknown 8254
#define kNtErrorDsParamError 8255
#define kNtErrorDsNotSupported 8256
#define kNtErrorDsNoResultsReturned 8257
#define kNtErrorDsControlNotFound 8258
#define kNtErrorDsClientLoop 8259
#define kNtErrorDsReferralLimitExceeded 8260
#define kNtErrorDsSortControlMissing 8261
#define kNtErrorDsOffsetRangeError 8262
#define kNtErrorDsRidmgrDisabled 8263
#define kNtErrorDsRootMustBeNc 8301
#define kNtErrorDsAddReplicaInhibited 8302
#define kNtErrorDsAttNotDefInSchema 8303
#define kNtErrorDsMaxObjSizeExceeded 8304
#define kNtErrorDsObjStringNameExists 8305
#define kNtErrorDsNoRdnDefinedInSchema 8306
#define kNtErrorDsRdnDoesntMatchSchema 8307
#define kNtErrorDsNoRequestedAttsFound 8308
#define kNtErrorDsUserBufferToSmall 8309
#define kNtErrorDsAttIsNotOnObj 8310
#define kNtErrorDsIllegalModOperation 8311
#define kNtErrorDsObjTooLarge 8312
#define kNtErrorDsBadInstanceType 8313
#define kNtErrorDsMasterdsaRequired 8314
#define kNtErrorDsObjectClassRequired 8315
#define kNtErrorDsMissingRequiredAtt 8316
#define kNtErrorDsAttNotDefForClass 8317
#define kNtErrorDsAttAlreadyExists 8318
#define kNtErrorDsCantAddAttValues 8320
#define kNtErrorDsSingleValueConstraint 8321
#define kNtErrorDsRangeConstraint 8322
#define kNtErrorDsAttValAlreadyExists 8323
#define kNtErrorDsCantRemMissingAtt 8324
#define kNtErrorDsCantRemMissingAttVal 8325
#define kNtErrorDsRootCantBeSubref 8326
#define kNtErrorDsNoChaining 8327
#define kNtErrorDsNoChainedEval 8328
#define kNtErrorDsNoParentObject 8329
#define kNtErrorDsParentIsAnAlias 8330
#define kNtErrorDsCantMixMasterAndReps 8331
#define kNtErrorDsChildrenExist 8332
#define kNtErrorDsObjNotFound 8333
#define kNtErrorDsAliasedObjMissing 8334
#define kNtErrorDsBadNameSyntax 8335
#define kNtErrorDsAliasPointsToAlias 8336
#define kNtErrorDsCantDerefAlias 8337
#define kNtErrorDsOutOfScope 8338
#define kNtErrorDsObjectBeingRemoved 8339
#define kNtErrorDsCantDeleteDsaObj 8340
#define kNtErrorDsGenericError 8341
#define kNtErrorDsDsaMustBeIntMaster 8342
#define kNtErrorDsClassNotDsa 8343
#define kNtErrorDsInsuffAccessRights 8344
#define kNtErrorDsIllegalSuperior 8345
#define kNtErrorDsAttributeOwnedBySam 8346
#define kNtErrorDsNameTooManyParts 8347
#define kNtErrorDsNameTooLong 8348
#define kNtErrorDsNameValueTooLong 8349
#define kNtErrorDsNameUnparseable 8350
#define kNtErrorDsNameTypeUnknown 8351
#define kNtErrorDsNotAnObject 8352
#define kNtErrorDsSecDescTooShort 8353
#define kNtErrorDsSecDescInvalid 8354
#define kNtErrorDsNoDeletedName 8355
#define kNtErrorDsSubrefMustHaveParent 8356
#define kNtErrorDsNcnameMustBeNc 8357
#define kNtErrorDsCantAddSystemOnly 8358
#define kNtErrorDsClassMustBeConcrete 8359
#define kNtErrorDsInvalidDmd 8360
#define kNtErrorDsObjGuidExists 8361
#define kNtErrorDsNotOnBacklink 8362
#define kNtErrorDsNoCrossrefForNc 8363
#define kNtErrorDsShuttingDown 8364
#define kNtErrorDsUnknownOperation 8365
#define kNtErrorDsInvalidRoleOwner 8366
#define kNtErrorDsCouldntContactFsmo 8367
#define kNtErrorDsCrossNcDnRename 8368
#define kNtErrorDsCantModSystemOnly 8369
#define kNtErrorDsReplicatorOnly 8370
#define kNtErrorDsObjClassNotDefined 8371
#define kNtErrorDsObjClassNotSubclass 8372
#define kNtErrorDsNameReferenceInvalid 8373
#define kNtErrorDsCrossRefExists 8374
#define kNtErrorDsCantDelMasterCrossref 8375
#define kNtErrorDsSubtreeNotifyNotNcHead 8376
#define kNtErrorDsNotifyFilterTooComplex 8377
#define kNtErrorDsDupRdn 8378
#define kNtErrorDsDupOid 8379
#define kNtErrorDsDupMapiId 8380
#define kNtErrorDsDupSchemaIdGuid 8381
#define kNtErrorDsDupLdapDisplayName 8382
#define kNtErrorDsSemanticAttTest 8383
#define kNtErrorDsSyntaxMismatch 8384
#define kNtErrorDsExistsInMustHave 8385
#define kNtErrorDsExistsInMayHave 8386
#define kNtErrorDsNonexistentMayHave 8387
#define kNtErrorDsNonexistentMustHave 8388
#define kNtErrorDsAuxClsTestFail 8389
#define kNtErrorDsNonexistentPossSup 8390
#define kNtErrorDsSubClsTestFail 8391
#define kNtErrorDsBadRdnAttIdSyntax 8392
#define kNtErrorDsExistsInAuxCls 8393
#define kNtErrorDsExistsInSubCls 8394
#define kNtErrorDsExistsInPossSup 8395
#define kNtErrorDsRecalcschemaFailed 8396
#define kNtErrorDsTreeDeleteNotFinished 8397
#define kNtErrorDsCantDelete 8398
#define kNtErrorDsAttSchemaReqId 8399
#define kNtErrorDsBadAttSchemaSyntax 8400
#define kNtErrorDsCantCacheAtt 8401
#define kNtErrorDsCantCacheClass 8402
#define kNtErrorDsCantRemoveAttCache 8403
#define kNtErrorDsCantRemoveClassCache 8404
#define kNtErrorDsCantRetrieveDn 8405
#define kNtErrorDsMissingSupref 8406
#define kNtErrorDsCantRetrieveInstance 8407
#define kNtErrorDsCodeInconsistency 8408
#define kNtErrorDsDatabaseError 8409
#define kNtErrorDsGovernsidMissing 8410
#define kNtErrorDsMissingExpectedAtt 8411
#define kNtErrorDsNcnameMissingCrRef 8412
#define kNtErrorDsSecurityCheckingError 8413
#define kNtErrorDsSchemaNotLoaded 8414
#define kNtErrorDsSchemaAllocFailed 8415
#define kNtErrorDsAttSchemaReqSyntax 8416
#define kNtErrorDsGcverifyError 8417
#define kNtErrorDsDraSchemaMismatch 8418
#define kNtErrorDsCantFindDsaObj 8419
#define kNtErrorDsCantFindExpectedNc 8420
#define kNtErrorDsCantFindNcInCache 8421
#define kNtErrorDsCantRetrieveChild 8422
#define kNtErrorDsSecurityIllegalModify 8423
#define kNtErrorDsCantReplaceHiddenRec 8424
#define kNtErrorDsBadHierarchyFile 8425
#define kNtErrorDsBuildHierarchyTableFailed 8426
#define kNtErrorDsConfigParamMissing 8427
#define kNtErrorDsCountingAbIndicesFailed 8428
#define kNtErrorDsHierarchyTableMallocFailed 8429
#define kNtErrorDsInternalFailure 8430
#define kNtErrorDsUnknownError 8431
#define kNtErrorDsRootRequiresClassTop 8432
#define kNtErrorDsRefusingFsmoRoles 8433
#define kNtErrorDsMissingFsmoSettings 8434
#define kNtErrorDsUnableToSurrenderRoles 8435
#define kNtErrorDsDraGeneric 8436
#define kNtErrorDsDraInvalidParameter 8437
#define kNtErrorDsDraBusy 8438
#define kNtErrorDsDraBadDn 8439
#define kNtErrorDsDraBadNc 8440
#define kNtErrorDsDraDnExists 8441
#define kNtErrorDsDraInternalError 8442
#define kNtErrorDsDraInconsistentDit 8443
#define kNtErrorDsDraConnectionFailed 8444
#define kNtErrorDsDraBadInstanceType 8445
#define kNtErrorDsDraOutOfMem 8446
#define kNtErrorDsDraMailProblem 8447
#define kNtErrorDsDraRefAlreadyExists 8448
#define kNtErrorDsDraRefNotFound 8449
#define kNtErrorDsDraObjIsRepSource 8450
#define kNtErrorDsDraDbError 8451
#define kNtErrorDsDraNoReplica 8452
#define kNtErrorDsDraAccessDenied 8453
#define kNtErrorDsDraNotSupported 8454
#define kNtErrorDsDraRpcCancelled 8455
#define kNtErrorDsDraSourceDisabled 8456
#define kNtErrorDsDraSinkDisabled 8457
#define kNtErrorDsDraNameCollision 8458
#define kNtErrorDsDraSourceReinstalled 8459
#define kNtErrorDsDraMissingParent 8460
#define kNtErrorDsDraPreempted 8461
#define kNtErrorDsDraAbandonSync 8462
#define kNtErrorDsDraShutdown 8463
#define kNtErrorDsDraIncompatiblePartialSet 8464
#define kNtErrorDsDraSourceIsPartialReplica 8465
#define kNtErrorDsDraExtnConnectionFailed 8466
#define kNtErrorDsInstallSchemaMismatch 8467
#define kNtErrorDsDupLinkId 8468
#define kNtErrorDsNameErrorResolving 8469
#define kNtErrorDsNameErrorNotFound 8470
#define kNtErrorDsNameErrorNotUnique 8471
#define kNtErrorDsNameErrorNoMapping 8472
#define kNtErrorDsNameErrorDomainOnly 8473
#define kNtErrorDsNameErrorNoSyntacticalMapping 8474
#define kNtErrorDsConstructedAttMod 8475
#define kNtErrorDsWrongOmObjClass 8476
#define kNtErrorDsDraReplPending 8477
#define kNtErrorDsDsRequired 8478
#define kNtErrorDsInvalidLdapDisplayName 8479
#define kNtErrorDsNonBaseSearch 8480
#define kNtErrorDsCantRetrieveAtts 8481
#define kNtErrorDsBacklinkWithoutLink 8482
#define kNtErrorDsEpochMismatch 8483
#define kNtErrorDsSrcNameMismatch 8484
#define kNtErrorDsSrcAndDstNcIdentical 8485
#define kNtErrorDsDstNcMismatch 8486
#define kNtErrorDsNotAuthoritiveForDstNc 8487
#define kNtErrorDsSrcGuidMismatch 8488
#define kNtErrorDsCantMoveDeletedObject 8489
#define kNtErrorDsPdcOperationInProgress 8490
#define kNtErrorDsCrossDomainCleanupReqd 8491
#define kNtErrorDsIllegalXdomMoveOperation 8492
#define kNtErrorDsCantWithAcctGroupMembershps 8493
#define kNtErrorDsNcMustHaveNcParent 8494
#define kNtErrorDsCrImpossibleToValidate 8495
#define kNtErrorDsDstDomainNotNative 8496
#define kNtErrorDsMissingInfrastructureContainer 8497
#define kNtErrorDsCantMoveAccountGroup 8498
#define kNtErrorDsCantMoveResourceGroup 8499
#define kNtErrorDsInvalidSearchFlag 8500
#define kNtErrorDsNoTreeDeleteAboveNc 8501
#define kNtErrorDsCouldntLockTreeForDelete 8502
#define kNtErrorDsCouldntIdentifyObjectsForTreeDelete 8503
#define kNtErrorDsSamInitFailure 8504
#define kNtErrorDsSensitiveGroupViolation 8505
#define kNtErrorDsCantModPrimarygroupid 8506
#define kNtErrorDsIllegalBaseSchemaMod 8507
#define kNtErrorDsNonsafeSchemaChange 8508
#define kNtErrorDsSchemaUpdateDisallowed 8509
#define kNtErrorDsCantCreateUnderSchema 8510
#define kNtErrorDsInstallNoSrcSchVersion 8511
#define kNtErrorDsInstallNoSchVersionInInifile 8512
#define kNtErrorDsInvalidGroupType 8513
#define kNtErrorDsNoNestGlobalgroupInMixeddomain 8514
#define kNtErrorDsNoNestLocalgroupInMixeddomain 8515
#define kNtErrorDsGlobalCantHaveLocalMember 8516
#define kNtErrorDsGlobalCantHaveUniversalMember 8517
#define kNtErrorDsUniversalCantHaveLocalMember 8518
#define kNtErrorDsGlobalCantHaveCrossdomainMember 8519
#define kNtErrorDsLocalCantHaveCrossdomainLocalMember 8520
#define kNtErrorDsHavePrimaryMembers 8521
#define kNtErrorDsStringSdConversionFailed 8522
#define kNtErrorDsNamingMasterGc 8523
#define kNtErrorDsDnsLookupFailure 8524
#define kNtErrorDsCouldntUpdateSpns 8525
#define kNtErrorDsCantRetrieveSd 8526
#define kNtErrorDsKeyNotUnique 8527
#define kNtErrorDsWrongLinkedAttSyntax 8528
#define kNtErrorDsSamNeedBootkeyPassword 8529
#define kNtErrorDsSamNeedBootkeyFloppy 8530
#define kNtErrorDsCantStart 8531
#define kNtErrorDsInitFailure 8532
#define kNtErrorDsNoPktPrivacyOnConnection 8533
#define kNtErrorDsSourceDomainInForest 8534
#define kNtErrorDsDestinationDomainNotInForest 8535
#define kNtErrorDsDestinationAuditingNotEnabled 8536
#define kNtErrorDsCantFindDcForSrcDomain 8537
#define kNtErrorDsSrcObjNotGroupOrUser 8538
#define kNtErrorDsSrcSidExistsInForest 8539
#define kNtErrorDsSrcAndDstObjectClassMismatch 8540
#define kNtErrorSamInitFailure 8541
#define kNtErrorDsDraSchemaInfoShip 8542
#define kNtErrorDsDraSchemaConflict 8543
#define kNtErrorDsDraEarlierSchemaConflict 8544
#define kNtErrorDsDraObjNcMismatch 8545
#define kNtErrorDsNcStillHasDsas 8546
#define kNtErrorDsGcRequired 8547
#define kNtErrorDsLocalMemberOfLocalOnly 8548
#define kNtErrorDsNoFpoInUniversalGroups 8549
#define kNtErrorDsCantAddToGc 8550
#define kNtErrorDsNoCheckpointWithPdc 8551
#define kNtErrorDsSourceAuditingNotEnabled 8552
#define kNtErrorDsCantCreateInNondomainNc 8553
#define kNtErrorDsInvalidNameForSpn 8554
#define kNtErrorDsFilterUsesContructedAttrs 8555
#define kNtErrorDsUnicodepwdNotInQuotes 8556
#define kNtErrorDsMachineAccountQuotaExceeded 8557
#define kNtErrorDsMustBeRunOnDstDc 8558
#define kNtErrorDsSrcDcMustBeSp4OrGreater 8559
#define kNtErrorDsCantTreeDeleteCriticalObj 8560
#define kNtErrorDsInitFailureConsole 8561
#define kNtErrorDsSamInitFailureConsole 8562
#define kNtErrorDsForestVersionTooHigh 8563
#define kNtErrorDsDomainVersionTooHigh 8564
#define kNtErrorDsForestVersionTooLow 8565
#define kNtErrorDsDomainVersionTooLow 8566
#define kNtErrorDsIncompatibleVersion 8567
#define kNtErrorDsLowDsaVersion 8568
#define kNtErrorDsNoBehaviorVersionInMixeddomain 8569
#define kNtErrorDsNotSupportedSortOrder 8570
#define kNtErrorDsNameNotUnique 8571
#define kNtErrorDsMachineAccountCreatedPrent4 8572
#define kNtErrorDsOutOfVersionStore 8573
#define kNtErrorDsIncompatibleControlsUsed 8574
#define kNtErrorDsNoRefDomain 8575
#define kNtErrorDsReservedLinkId 8576
#define kNtErrorDsLinkIdNotAvailable 8577
#define kNtErrorDsAgCantHaveUniversalMember 8578
#define kNtErrorDsModifydnDisallowedByInstanceType 8579
#define kNtErrorDsNoObjectMoveInSchemaNc 8580
#define kNtErrorDsModifydnDisallowedByFlag 8581
#define kNtErrorDsModifydnWrongGrandparent 8582
#define kNtErrorDsNameErrorTrustReferral 8583
#define kNtErrorNotSupportedOnStandardServer 8584
#define kNtErrorDsCantAccessRemotePartOfAd 8585
#define kNtErrorDsCrImpossibleToValidateV2 8586
#define kNtErrorDsThreadLimitExceeded 8587
#define kNtErrorDsNotClosest 8588
#define kNtErrorDsCantDeriveSpnWithoutServerRef 8589
#define kNtErrorDsSingleUserModeFailed 8590
#define kNtErrorDsNtdscriptSyntaxError 8591
#define kNtErrorDsNtdscriptProcessError 8592
#define kNtErrorDsDifferentReplEpochs 8593
#define kNtErrorDsDrsExtensionsChanged 8594
#define kNtErrorDsReplicaSetChangeNotAllowedOnDisabledCr 8595
#define kNtErrorDsNoMsdsIntid 8596
#define kNtErrorDsDupMsdsIntid 8597
#define kNtErrorDsExistsInRdnattid 8598
#define kNtErrorDsAuthorizationFailed 8599
#define kNtErrorDsInvalidScript 8600
#define kNtErrorDsRemoteCrossrefOpFailed 8601
#define kNtErrorDsCrossRefBusy 8602
#define kNtErrorDsCantDeriveSpnForDeletedDomain 8603
#define kNtErrorDsCantDemoteWithWriteableNc 8604
#define kNtErrorDsDuplicateIdFound 8605
#define kNtErrorDsInsufficientAttrToCreateObject 8606
#define kNtErrorDsGroupConversionError 8607
#define kNtErrorDsCantMoveAppBasicGroup 8608
#define kNtErrorDsCantMoveAppQueryGroup 8609
#define kNtErrorDsRoleNotVerified 8610
#define kNtErrorDsWkoContainerCannotBeSpecial 8611
#define kNtErrorDsDomainRenameInProgress 8612
#define kNtErrorDsExistingAdChildNc 8613
#define kNtErrorDsReplLifetimeExceeded 8614
#define kNtErrorDsDisallowedInSystemContainer 8615
#define kNtErrorDsLdapSendQueueFull 8616
#define kNtErrorDsDraOutScheduleWindow 8617
#define kNtErrorDsPolicyNotKnown 8618
#define kNtErrorNoSiteSettingsObject 8619
#define kNtErrorNoSecrets 8620
#define kNtErrorNoWritableDcFound 8621
#define kNtErrorDsNoServerObject 8622
#define kNtErrorDsNoNtdsaObject 8623
#define kNtErrorDsNonAsqSearch 8624
#define kNtErrorDsAuditFailure 8625
#define kNtErrorDsInvalidSearchFlagSubtree 8626
#define kNtErrorDsInvalidSearchFlagTuple 8627
#define kNtErrorDsHierarchyTableTooDeep 8628
#define kNtErrorDsDraCorruptUtdVector 8629
#define kNtErrorDsDraSecretsDenied 8630
#define kNtErrorDsReservedMapiId 8631
#define kNtErrorDsMapiIdNotAvailable 8632
#define kNtErrorDsDraMissingKrbtgtSecret 8633
#define kNtErrorDsDomainNameExistsInForest 8634
#define kNtErrorDsFlatNameExistsInForest 8635
#define kNtErrorInvalidUserPrincipalName 8636
#define kNtErrorDsOidMappedGroupCantHaveMembers 8637
#define kNtErrorDsOidNotFound 8638
#define kNtErrorDsDraRecycledTarget 8639
#define kNtErrorDsDisallowedNcRedirect 8640
#define kNtErrorDsHighAdldsFfl 8641
#define kNtErrorDsHighDsaVersion 8642
#define kNtErrorDsLowAdldsFfl 8643
#define kNtErrorDomainSidSameAsLocalWorkstation 8644
#define kNtErrorDsUndeleteSamValidationFailed 8645
#define kNtErrorIncorrectAccountType 8646
#define kNtErrorDsSpnValueNotUniqueInForest 8647
#define kNtErrorDsUpnValueNotUniqueInForest 8648
#define kNtErrorDsMissingForestTrust 8649
#define kNtErrorDsValueKeyNotUnique 8650
#define kNtErrorIpsecQmPolicyExists 13000
#define kNtErrorIpsecQmPolicyNotFound 13001
#define kNtErrorIpsecQmPolicyInUse 13002
#define kNtErrorIpsecMmPolicyExists 13003
#define kNtErrorIpsecMmPolicyNotFound 13004
#define kNtErrorIpsecMmPolicyInUse 13005
#define kNtErrorIpsecMmFilterExists 13006
#define kNtErrorIpsecMmFilterNotFound 13007
#define kNtErrorIpsecTransportFilterExists 13008
#define kNtErrorIpsecTransportFilterNotFound 13009
#define kNtErrorIpsecMmAuthExists 13010
#define kNtErrorIpsecMmAuthNotFound 13011
#define kNtErrorIpsecMmAuthInUse 13012
#define kNtErrorIpsecDefaultMmPolicyNotFound 13013
#define kNtErrorIpsecDefaultMmAuthNotFound 13014
#define kNtErrorIpsecDefaultQmPolicyNotFound 13015
#define kNtErrorIpsecTunnelFilterExists 13016
#define kNtErrorIpsecTunnelFilterNotFound 13017
#define kNtErrorIpsecMmFilterPendingDeletion 13018
#define kNtErrorIpsecTransportFilterPendingDeletion 13019
#define kNtErrorIpsecTunnelFilterPendingDeletion 13020
#define kNtErrorIpsecMmPolicyPendingDeletion 13021
#define kNtErrorIpsecMmAuthPendingDeletion 13022
#define kNtErrorIpsecQmPolicyPendingDeletion 13023
#define kNtErrorIpsecIkeNegStatusBegin 13800
#define kNtErrorIpsecIkeAuthFail 13801
#define kNtErrorIpsecIkeAttribFail 13802
#define kNtErrorIpsecIkeNegotiationPending 13803
#define kNtErrorIpsecIkeGeneralProcessingError 13804
#define kNtErrorIpsecIkeTimedOut 13805
#define kNtErrorIpsecIkeNoCert 13806
#define kNtErrorIpsecIkeSaDeleted 13807
#define kNtErrorIpsecIkeSaReaped 13808
#define kNtErrorIpsecIkeMmAcquireDrop 13809
#define kNtErrorIpsecIkeQmAcquireDrop 13810
#define kNtErrorIpsecIkeQueueDropMm 13811
#define kNtErrorIpsecIkeQueueDropNoMm 13812
#define kNtErrorIpsecIkeDropNoResponse 13813
#define kNtErrorIpsecIkeMmDelayDrop 13814
#define kNtErrorIpsecIkeQmDelayDrop 13815
#define kNtErrorIpsecIkeError 13816
#define kNtErrorIpsecIkeCrlFailed 13817
#define kNtErrorIpsecIkeInvalidKeyUsage 13818
#define kNtErrorIpsecIkeInvalidCertType 13819
#define kNtErrorIpsecIkeNoPrivateKey 13820
#define kNtErrorIpsecIkeSimultaneousRekey 13821
#define kNtErrorIpsecIkeDhFail 13822
#define kNtErrorIpsecIkeCriticalPayloadNotRecognized 13823
#define kNtErrorIpsecIkeInvalidHeader 13824
#define kNtErrorIpsecIkeNoPolicy 13825
#define kNtErrorIpsecIkeInvalidSignature 13826
#define kNtErrorIpsecIkeKerberosError 13827
#define kNtErrorIpsecIkeNoPublicKey 13828
#define kNtErrorIpsecIkeProcessErr 13829
#define kNtErrorIpsecIkeProcessErrSa 13830
#define kNtErrorIpsecIkeProcessErrProp 13831
#define kNtErrorIpsecIkeProcessErrTrans 13832
#define kNtErrorIpsecIkeProcessErrKe 13833
#define kNtErrorIpsecIkeProcessErrId 13834
#define kNtErrorIpsecIkeProcessErrCert 13835
#define kNtErrorIpsecIkeProcessErrCertReq 13836
#define kNtErrorIpsecIkeProcessErrHash 13837
#define kNtErrorIpsecIkeProcessErrSig 13838
#define kNtErrorIpsecIkeProcessErrNonce 13839
#define kNtErrorIpsecIkeProcessErrNotify 13840
#define kNtErrorIpsecIkeProcessErrDelete 13841
#define kNtErrorIpsecIkeProcessErrVendor 13842
#define kNtErrorIpsecIkeInvalidPayload 13843
#define kNtErrorIpsecIkeLoadSoftSa 13844
#define kNtErrorIpsecIkeSoftSaTornDown 13845
#define kNtErrorIpsecIkeInvalidCookie 13846
#define kNtErrorIpsecIkeNoPeerCert 13847
#define kNtErrorIpsecIkePeerCrlFailed 13848
#define kNtErrorIpsecIkePolicyChange 13849
#define kNtErrorIpsecIkeNoMmPolicy 13850
#define kNtErrorIpsecIkeNotcbpriv 13851
#define kNtErrorIpsecIkeSecloadfail 13852
#define kNtErrorIpsecIkeFailsspinit 13853
#define kNtErrorIpsecIkeFailqueryssp 13854
#define kNtErrorIpsecIkeSrvacqfail 13855
#define kNtErrorIpsecIkeSrvquerycred 13856
#define kNtErrorIpsecIkeGetspifail 13857
#define kNtErrorIpsecIkeInvalidFilter 13858
#define kNtErrorIpsecIkeOutOfMemory 13859
#define kNtErrorIpsecIkeAddUpdateKeyFailed 13860
#define kNtErrorIpsecIkeInvalidPolicy 13861
#define kNtErrorIpsecIkeUnknownDoi 13862
#define kNtErrorIpsecIkeInvalidSituation 13863
#define kNtErrorIpsecIkeDhFailure 13864
#define kNtErrorIpsecIkeInvalidGroup 13865
#define kNtErrorIpsecIkeEncrypt 13866
#define kNtErrorIpsecIkeDecrypt 13867
#define kNtErrorIpsecIkePolicyMatch 13868
#define kNtErrorIpsecIkeUnsupportedId 13869
#define kNtErrorIpsecIkeInvalidHash 13870
#define kNtErrorIpsecIkeInvalidHashAlg 13871
#define kNtErrorIpsecIkeInvalidHashSize 13872
#define kNtErrorIpsecIkeInvalidEncryptAlg 13873
#define kNtErrorIpsecIkeInvalidAuthAlg 13874
#define kNtErrorIpsecIkeInvalidSig 13875
#define kNtErrorIpsecIkeLoadFailed 13876
#define kNtErrorIpsecIkeRpcDelete 13877
#define kNtErrorIpsecIkeBenignReinit 13878
#define kNtErrorIpsecIkeInvalidResponderLifetimeNotify 13879
#define kNtErrorIpsecIkeInvalidMajorVersion 13880
#define kNtErrorIpsecIkeInvalidCertKeylen 13881
#define kNtErrorIpsecIkeMmLimit 13882
#define kNtErrorIpsecIkeNegotiationDisabled 13883
#define kNtErrorIpsecIkeQmLimit 13884
#define kNtErrorIpsecIkeMmExpired 13885
#define kNtErrorIpsecIkePeerMmAssumedInvalid 13886
#define kNtErrorIpsecIkeCertChainPolicyMismatch 13887
#define kNtErrorIpsecIkeUnexpectedMessageId 13888
#define kNtErrorIpsecIkeInvalidAuthPayload 13889
#define kNtErrorIpsecIkeDosCookieSent 13890
#define kNtErrorIpsecIkeShuttingDown 13891
#define kNtErrorIpsecIkeCgaAuthFailed 13892
#define kNtErrorIpsecIkeProcessErrNatoa 13893
#define kNtErrorIpsecIkeInvalidMmForQm 13894
#define kNtErrorIpsecIkeQmExpired 13895
#define kNtErrorIpsecIkeTooManyFilters 13896
#define kNtErrorIpsecIkeNegStatusEnd 13897
#define kNtErrorIpsecIkeKillDummyNapTunnel 13898
#define kNtErrorIpsecIkeInnerIpAssignmentFailure 13899
#define kNtErrorIpsecIkeRequireCpPayloadMissing 13900
#define kNtErrorIpsecKeyModuleImpersonationNegotiationPending 13901
#define kNtErrorIpsecIkeCoexistenceSuppress 13902
#define kNtErrorIpsecIkeRatelimitDrop 13903
#define kNtErrorIpsecIkePeerDoesntSupportMobike 13904
#define kNtErrorIpsecIkeAuthorizationFailure 13905
#define kNtErrorIpsecIkeStrongCredAuthorizationFailure 13906
#define kNtErrorIpsecIkeAuthorizationFailureWithOptionalRetry 13907
#define kNtErrorIpsecIkeStrongCredAuthorizationAndCertmapFailure 13908
#define kNtErrorIpsecIkeNegStatusExtendedEnd 13909
#define kNtErrorIpsecBadSpi 13910
#define kNtErrorIpsecSaLifetimeExpired 13911
#define kNtErrorIpsecWrongSa 13912
#define kNtErrorIpsecReplayCheckFailed 13913
#define kNtErrorIpsecInvalidPacket 13914
#define kNtErrorIpsecIntegrityCheckFailed 13915
#define kNtErrorIpsecClearTextDrop 13916
#define kNtErrorIpsecAuthFirewallDrop 13917
#define kNtErrorIpsecThrottleDrop 13918
#define kNtErrorIpsecDospBlock 13925
#define kNtErrorIpsecDospReceivedMulticast 13926
#define kNtErrorIpsecDospInvalidPacket 13927
#define kNtErrorIpsecDospStateLookupFailed 13928
#define kNtErrorIpsecDospMaxEntries 13929
#define kNtErrorIpsecDospKeymodNotAllowed 13930
#define kNtErrorIpsecDospNotInstalled 13931
#define kNtErrorIpsecDospMaxPerIpRatelimitQueues 13932
#define kNtErrorSxsSectionNotFound 14000
#define kNtErrorSxsCantGenActctx 14001
#define kNtErrorSxsInvalidActctxdataFormat 14002
#define kNtErrorSxsAssemblyNotFound 14003
#define kNtErrorSxsManifestFormatError 14004
#define kNtErrorSxsManifestParseError 14005
#define kNtErrorSxsActivationContextDisabled 14006
#define kNtErrorSxsKeyNotFound 14007
#define kNtErrorSxsVersionConflict 14008
#define kNtErrorSxsWrongSectionType 14009
#define kNtErrorSxsThreadQueriesDisabled 14010
#define kNtErrorSxsProcessDefaultAlreadySet 14011
#define kNtErrorSxsUnknownEncodingGroup 14012
#define kNtErrorSxsUnknownEncoding 14013
#define kNtErrorSxsInvalidXmlNamespaceUri 14014
#define kNtErrorSxsRootManifestDependencyNotInstalled 14015
#define kNtErrorSxsLeafManifestDependencyNotInstalled 14016
#define kNtErrorSxsInvalidAssemblyIdentityAttribute 14017
#define kNtErrorSxsManifestMissingRequiredDefaultNamespace 14018
#define kNtErrorSxsManifestInvalidRequiredDefaultNamespace 14019
#define kNtErrorSxsPrivateManifestCrossPathWithReparsePoint 14020
#define kNtErrorSxsDuplicateDllName 14021
#define kNtErrorSxsDuplicateWindowclassName 14022
#define kNtErrorSxsDuplicateClsid 14023
#define kNtErrorSxsDuplicateIid 14024
#define kNtErrorSxsDuplicateTlbid 14025
#define kNtErrorSxsDuplicateProgid 14026
#define kNtErrorSxsDuplicateAssemblyName 14027
#define kNtErrorSxsFileHashMismatch 14028
#define kNtErrorSxsPolicyParseError 14029
#define kNtErrorSxsXmlEMissingquote 14030
#define kNtErrorSxsXmlECommentsyntax 14031
#define kNtErrorSxsXmlEBadstartnamechar 14032
#define kNtErrorSxsXmlEBadnamechar 14033
#define kNtErrorSxsXmlEBadcharinstring 14034
#define kNtErrorSxsXmlEXmldeclsyntax 14035
#define kNtErrorSxsXmlEBadchardata 14036
#define kNtErrorSxsXmlEMissingwhitespace 14037
#define kNtErrorSxsXmlEExpectingtagend 14038
#define kNtErrorSxsXmlEMissingsemicolon 14039
#define kNtErrorSxsXmlEUnbalancedparen 14040
#define kNtErrorSxsXmlEInternalerror 14041
#define kNtErrorSxsXmlEUnexpectedWhitespace 14042
#define kNtErrorSxsXmlEIncompleteEncoding 14043
#define kNtErrorSxsXmlEMissingParen 14044
#define kNtErrorSxsXmlEExpectingclosequote 14045
#define kNtErrorSxsXmlEMultipleColons 14046
#define kNtErrorSxsXmlEInvalidDecimal 14047
#define kNtErrorSxsXmlEInvalidHexidecimal 14048
#define kNtErrorSxsXmlEInvalidUnicode 14049
#define kNtErrorSxsXmlEWhitespaceorquestionmark 14050
#define kNtErrorSxsXmlEUnexpectedendtag 14051
#define kNtErrorSxsXmlEUnclosedtag 14052
#define kNtErrorSxsXmlEDuplicateattribute 14053
#define kNtErrorSxsXmlEMultipleroots 14054
#define kNtErrorSxsXmlEInvalidatrootlevel 14055
#define kNtErrorSxsXmlEBadxmldecl 14056
#define kNtErrorSxsXmlEMissingroot 14057
#define kNtErrorSxsXmlEUnexpectedeof 14058
#define kNtErrorSxsXmlEBadperefinsubset 14059
#define kNtErrorSxsXmlEUnclosedstarttag 14060
#define kNtErrorSxsXmlEUnclosedendtag 14061
#define kNtErrorSxsXmlEUnclosedstring 14062
#define kNtErrorSxsXmlEUnclosedcomment 14063
#define kNtErrorSxsXmlEUncloseddecl 14064
#define kNtErrorSxsXmlEUnclosedcdata 14065
#define kNtErrorSxsXmlEReservednamespace 14066
#define kNtErrorSxsXmlEInvalidencoding 14067
#define kNtErrorSxsXmlEInvalidswitch 14068
#define kNtErrorSxsXmlEBadxmlcase 14069
#define kNtErrorSxsXmlEInvalidStandalone 14070
#define kNtErrorSxsXmlEUnexpectedStandalone 14071
#define kNtErrorSxsXmlEInvalidVersion 14072
#define kNtErrorSxsXmlEMissingequals 14073
#define kNtErrorSxsProtectionRecoveryFailed 14074
#define kNtErrorSxsProtectionPublicKeyTooShort 14075
#define kNtErrorSxsProtectionCatalogNotValid 14076
#define kNtErrorSxsUntranslatableHresult 14077
#define kNtErrorSxsProtectionCatalogFileMissing 14078
#define kNtErrorSxsMissingAssemblyIdentityAttribute 14079
#define kNtErrorSxsInvalidAssemblyIdentityAttributeName 14080
#define kNtErrorSxsAssemblyMissing 14081
#define kNtErrorSxsCorruptActivationStack 14082
#define kNtErrorSxsCorruption 14083
#define kNtErrorSxsEarlyDeactivation 14084
#define kNtErrorSxsInvalidDeactivation 14085
#define kNtErrorSxsMultipleDeactivation 14086
#define kNtErrorSxsProcessTerminationRequested 14087
#define kNtErrorSxsReleaseActivationContext 14088
#define kNtErrorSxsSystemDefaultActivationContextEmpty 14089
#define kNtErrorSxsInvalidIdentityAttributeValue 14090
#define kNtErrorSxsInvalidIdentityAttributeName 14091
#define kNtErrorSxsIdentityDuplicateAttribute 14092
#define kNtErrorSxsIdentityParseError 14093
#define kNtErrorMalformedSubstitutionString 14094
#define kNtErrorSxsIncorrectPublicKeyToken 14095
#define kNtErrorUnmappedSubstitutionString 14096
#define kNtErrorSxsAssemblyNotLocked 14097
#define kNtErrorSxsComponentStoreCorrupt 14098
#define kNtErrorAdvancedInstallerFailed 14099
#define kNtErrorXmlEncodingMismatch 14100
#define kNtErrorSxsManifestIdentitySameButContentsDifferent 14101
#define kNtErrorSxsIdentitiesDifferent 14102
#define kNtErrorSxsAssemblyIsNotADeployment 14103
#define kNtErrorSxsFileNotPartOfAssembly 14104
#define kNtErrorSxsManifestTooBig 14105
#define kNtErrorSxsSettingNotRegistered 14106
#define kNtErrorSxsTransactionClosureIncomplete 14107
#define kNtErrorSmiPrimitiveInstallerFailed 14108
#define kNtErrorGenericCommandFailed 14109
#define kNtErrorSxsFileHashMissing 14110
#define kNtErrorEvtInvalidChannelPath 15000
#define kNtErrorEvtInvalidQuery 15001
#define kNtErrorEvtPublisherMetadataNotFound 15002
#define kNtErrorEvtEventTemplateNotFound 15003
#define kNtErrorEvtInvalidPublisherName 15004
#define kNtErrorEvtInvalidEventData 15005
#define kNtErrorEvtChannelNotFound 15007
#define kNtErrorEvtMalformedXmlText 15008
#define kNtErrorEvtSubscriptionToDirectChannel 15009
#define kNtErrorEvtConfigurationError 15010
#define kNtErrorEvtQueryResultStale 15011
#define kNtErrorEvtQueryResultInvalidPosition 15012
#define kNtErrorEvtNonValidatingMsxml 15013
#define kNtErrorEvtFilterAlreadyscoped 15014
#define kNtErrorEvtFilterNoteltset 15015
#define kNtErrorEvtFilterInvarg 15016
#define kNtErrorEvtFilterInvtest 15017
#define kNtErrorEvtFilterInvtype 15018
#define kNtErrorEvtFilterParseerr 15019
#define kNtErrorEvtFilterUnsupportedop 15020
#define kNtErrorEvtFilterUnexpectedtoken 15021
#define kNtErrorEvtInvalidOperationOverEnabledDirectChannel 15022
#define kNtErrorEvtInvalidChannelPropertyValue 15023
#define kNtErrorEvtInvalidPublisherPropertyValue 15024
#define kNtErrorEvtChannelCannotActivate 15025
#define kNtErrorEvtFilterTooComplex 15026
#define kNtErrorEvtMessageNotFound 15027
#define kNtErrorEvtMessageIdNotFound 15028
#define kNtErrorEvtUnresolvedValueInsert 15029
#define kNtErrorEvtUnresolvedParameterInsert 15030
#define kNtErrorEvtMaxInsertsReached 15031
#define kNtErrorEvtEventDefinitionNotFound 15032
#define kNtErrorEvtMessageLocaleNotFound 15033
#define kNtErrorEvtVersionTooOld 15034
#define kNtErrorEvtVersionTooNew 15035
#define kNtErrorEvtCannotOpenChannelOfQuery 15036
#define kNtErrorEvtPublisherDisabled 15037
#define kNtErrorEvtFilterOutOfRange 15038
#define kNtErrorEcSubscriptionCannotActivate 15080
#define kNtErrorEcLogDisabled 15081
#define kNtErrorEcCircularForwarding 15082
#define kNtErrorEcCredstoreFull 15083
#define kNtErrorEcCredNotFound 15084
#define kNtErrorEcNoActiveChannel 15085
#define kNtErrorMuiFileNotFound 15100
#define kNtErrorMuiInvalidFile 15101
#define kNtErrorMuiInvalidRcConfig 15102
#define kNtErrorMuiInvalidLocaleName 15103
#define kNtErrorMuiInvalidUltimatefallbackName 15104
#define kNtErrorMuiFileNotLoaded 15105
#define kNtErrorResourceEnumUserStop 15106
#define kNtErrorMuiIntlsettingsUilangNotInstalled 15107
#define kNtErrorMuiIntlsettingsInvalidLocaleName 15108
#define kNtErrorMrmRuntimeNoDefaultOrNeutralResource 15110
#define kNtErrorMrmInvalidPriconfig 15111
#define kNtErrorMrmInvalidFileType 15112
#define kNtErrorMrmUnknownQualifier 15113
#define kNtErrorMrmInvalidQualifierValue 15114
#define kNtErrorMrmNoCandidate 15115
#define kNtErrorMrmNoMatchOrDefaultCandidate 15116
#define kNtErrorMrmResourceTypeMismatch 15117
#define kNtErrorMrmDuplicateMapName 15118
#define kNtErrorMrmDuplicateEntry 15119
#define kNtErrorMrmInvalidResourceIdentifier 15120
#define kNtErrorMrmFilepathTooLong 15121
#define kNtErrorMrmUnsupportedDirectoryType 15122
#define kNtErrorMrmInvalidPriFile 15126
#define kNtErrorMrmNamedResourceNotFound 15127
#define kNtErrorMrmMapNotFound 15135
#define kNtErrorMrmUnsupportedProfileType 15136
#define kNtErrorMrmInvalidQualifierOperator 15137
#define kNtErrorMrmIndeterminateQualifierValue 15138
#define kNtErrorMrmAutomergeEnabled 15139
#define kNtErrorMrmTooManyResources 15140
#define kNtErrorMrmUnsupportedFileTypeForMerge 15141
#define kNtErrorMrmUnsupportedFileTypeForLoadUnloadPriFile 15142
#define kNtErrorMrmNoCurrentViewOnThread 15143
#define kNtErrorDifferentProfileResourceManagerExist 15144
#define kNtErrorOperationNotAllowedFromSystemComponent 15145
#define kNtErrorMrmDirectRefToNonDefaultResource 15146
#define kNtErrorMrmGenerationCountMismatch 15147
#define kNtErrorPriMergeVersionMismatch 15148
#define kNtErrorPriMergeMissingSchema 15149
#define kNtErrorPriMergeLoadFileFailed 15150
#define kNtErrorPriMergeAddFileFailed 15151
#define kNtErrorPriMergeWriteFileFailed 15152
#define kNtErrorPriMergeMultiplePackageFamiliesNotAllowed 15153
#define kNtErrorPriMergeMultipleMainPackagesNotAllowed 15154
#define kNtErrorPriMergeBundlePackagesNotAllowed 15155
#define kNtErrorPriMergeMainPackageRequired 15156
#define kNtErrorPriMergeResourcePackageRequired 15157
#define kNtErrorPriMergeInvalidFileName 15158
#define kNtErrorMcaInvalidCapabilitiesString 15200
#define kNtErrorMcaInvalidVcpVersion 15201
#define kNtErrorMcaMonitorViolatesMccsSpecification 15202
#define kNtErrorMcaMccsVersionMismatch 15203
#define kNtErrorMcaUnsupportedMccsVersion 15204
#define kNtErrorMcaInternalError 15205
#define kNtErrorMcaInvalidTechnologyTypeReturned 15206
#define kNtErrorMcaUnsupportedColorTemperature 15207
#define kNtErrorAmbiguousSystemDevice 15250
#define kNtErrorSystemDeviceNotFound 15299
#define kNtErrorHashNotSupported 15300
#define kNtErrorHashNotPresent 15301
#define kNtErrorSecondaryIcProviderNotRegistered 15321
#define kNtErrorGpioClientInformationInvalid 15322
#define kNtErrorGpioVersionNotSupported 15323
#define kNtErrorGpioInvalidRegistrationPacket 15324
#define kNtErrorGpioOperationDenied 15325
#define kNtErrorGpioIncompatibleConnectMode 15326
#define kNtErrorGpioInterruptAlreadyUnmasked 15327
#define kNtErrorCannotSwitchRunlevel 15400
#define kNtErrorInvalidRunlevelSetting 15401
#define kNtErrorRunlevelSwitchTimeout 15402
#define kNtErrorRunlevelSwitchAgentTimeout 15403
#define kNtErrorRunlevelSwitchInProgress 15404
#define kNtErrorServicesFailedAutostart 15405
#define kNtErrorComTaskStopPending 15501
#define kNtErrorInstallOpenPackageFailed 15600
#define kNtErrorInstallPackageNotFound 15601
#define kNtErrorInstallInvalidPackage 15602
#define kNtErrorInstallResolveDependencyFailed 15603
#define kNtErrorInstallOutOfDiskSpace 15604
#define kNtErrorInstallNetworkFailure 15605
#define kNtErrorInstallRegistrationFailure 15606
#define kNtErrorInstallDeregistrationFailure 15607
#define kNtErrorInstallCancel 15608
#define kNtErrorInstallFailed 15609
#define kNtErrorRemoveFailed 15610
#define kNtErrorPackageAlreadyExists 15611
#define kNtErrorNeedsRemediation 15612
#define kNtErrorInstallPrerequisiteFailed 15613
#define kNtErrorPackageRepositoryCorrupted 15614
#define kNtErrorInstallPolicyFailure 15615
#define kNtErrorPackageUpdating 15616
#define kNtErrorDeploymentBlockedByPolicy 15617
#define kNtErrorPackagesInUse 15618
#define kNtErrorRecoveryFileCorrupt 15619
#define kNtErrorInvalidStagedSignature 15620
#define kNtErrorDeletingExistingApplicationdataStoreFailed 15621
#define kNtErrorInstallPackageDowngrade 15622
#define kNtErrorSystemNeedsRemediation 15623
#define kNtErrorAppxIntegrityFailureClrNgen 15624
#define kNtErrorResiliencyFileCorrupt 15625
#define kNtErrorInstallFirewallServiceNotRunning 15626
#define kNtErrorPackageMoveFailed 15627
#define kNtErrorInstallVolumeNotEmpty 15628
#define kNtErrorInstallVolumeOffline 15629
#define kNtErrorInstallVolumeCorrupt 15630
#define kNtErrorNeedsRegistration 15631
#define kNtErrorInstallWrongProcessorArchitecture 15632
#define kNtErrorDevSideloadLimitExceeded 15633
#define kNtErrorInstallOptionalPackageRequiresMainPackage 15634
#define kNtErrorPackageNotSupportedOnFilesystem 15635
#define kNtErrorPackageMoveBlockedByStreaming 15636
#define kNtErrorInstallOptionalPackageApplicationidNotUnique 15637
#define kNtErrorPackageStagingOnhold 15638
#define kNtErrorInstallInvalidRelatedSetUpdate 15639
#define kNtErrorPackagesReputationCheckFailed 15643
#define kNtErrorPackagesReputationCheckTimedout 15644
#define kNtErrorStateLoadStoreFailed 15800
#define kNtErrorStateGetVersionFailed 15801
#define kNtErrorStateSetVersionFailed 15802
#define kNtErrorStateStructuredResetFailed 15803
#define kNtErrorStateOpenContainerFailed 15804
#define kNtErrorStateCreateContainerFailed 15805
#define kNtErrorStateDeleteContainerFailed 15806
#define kNtErrorStateReadSettingFailed 15807
#define kNtErrorStateWriteSettingFailed 15808
#define kNtErrorStateDeleteSettingFailed 15809
#define kNtErrorStateQuerySettingFailed 15810
#define kNtErrorStateReadCompositeSettingFailed 15811
#define kNtErrorStateWriteCompositeSettingFailed 15812
#define kNtErrorStateEnumerateContainerFailed 15813
#define kNtErrorStateEnumerateSettingsFailed 15814
#define kNtErrorStateCompositeSettingValueSizeLimitExceeded 15815
#define kNtErrorStateSettingValueSizeLimitExceeded 15816
#define kNtErrorStateSettingNameSizeLimitExceeded 15817
#define kNtErrorStateContainerNameSizeLimitExceeded 15818
#define kNtErrorApiUnavailable 15841

#define kNtWaitIoCompletion 0xc0

/* WinSock Error Codes: 10000-11999 */
#define WSABASEERR 10000
#define WSAEINTR 10004
#define WSAEBADF 10009
#define WSAEACCES 10013
#define WSAEFAULT 10014
#define WSAEINVAL 10022
#define WSAEMFILE 10024
#define WSAEWOULDBLOCK 10035
#define WSAEINPROGRESS 10036
#define WSAEALREADY 10037
#define WSAENOTSOCK 10038
#define WSAEDESTADDRREQ 10039
#define WSAEMSGSIZE 10040
#define WSAEPROTOTYPE 10041
#define WSAENOPROTOOPT 10042
#define WSAEPROTONOSUPPORT 10043
#define WSAESOCKTNOSUPPORT 10044
#define WSAEOPNOTSUPP 10045
#define WSAEPFNOSUPPORT 10046
#define WSAEAFNOSUPPORT 10047
#define WSAEADDRINUSE 10048
#define WSAEADDRNOTAVAIL 10049
#define WSAENETDOWN 10050
#define WSAENETUNREACH 10051
#define WSAENETRESET 10052
#define WSAECONNABORTED 10053
#define WSAECONNRESET 10054
#define WSAENOBUFS 10055
#define WSAEISCONN 10056
#define WSAENOTCONN 10057
#define WSAESHUTDOWN 10058
#define WSAETOOMANYREFS 10059
#define WSAETIMEDOUT 10060
#define WSAECONNREFUSED 10061
#define WSAELOOP 10062
#define WSAENAMETOOLONG 10063
#define WSAEHOSTDOWN 10064
#define WSAEHOSTUNREACH 10065
#define WSAENOTEMPTY 10066
#define WSAEPROCLIM 10067
#define WSAEUSERS 10068
#define WSAEDQUOT 10069
#define WSAESTALE 10070
#define WSAEREMOTE 10071
#define WSASYSNOTREADY 10091
#define WSAVERNOTSUPPORTED 10092
#define WSANOTINITIALISED 10093
#define WSAEDISCON 10101
#define WSAENOMORE 10102
#define WSAECANCELLED 10103
#define WSAEINVALIDPROCTABLE 10104
#define WSAEINVALIDPROVIDER 10105
#define WSAEPROVIDERFAILEDINIT 10106
#define WSASYSCALLFAILURE 10107
#define WSASERVICE_NOT_FOUND 10108
#define WSATYPE_NOT_FOUND 10109
#define WSA_E_NO_MORE 10110
#define WSA_E_CANCELLED 10111
#define WSAEREFUSED 10112
#define WSAHOST_NOT_FOUND 11001
#define WSATRY_AGAIN 11002
#define WSANO_RECOVERY 11003
#define WSANO_DATA 11004
#define WSA_QOS_RECEIVERS 11005
#define WSA_QOS_SENDERS 11006
#define WSA_QOS_NO_SENDERS 11007
#define WSA_QOS_NO_RECEIVERS 11008
#define WSA_QOS_REQUEST_CONFIRMED 11009
#define WSA_QOS_ADMISSION_FAILURE 11010
#define WSA_QOS_POLICY_FAILURE 11011
#define WSA_QOS_BAD_STYLE 11012
#define WSA_QOS_BAD_OBJECT 11013
#define WSA_QOS_TRAFFIC_CTRL_ERROR 11014
#define WSA_QOS_GENERIC_ERROR 11015
#define WSA_QOS_ESERVICETYPE 11016
#define WSA_QOS_EFLOWSPEC 11017
#define WSA_QOS_EPROVSPECBUF 11018
#define WSA_QOS_EFILTERSTYLE 11019
#define WSA_QOS_EFILTERTYPE 11020
#define WSA_QOS_EFILTERCOUNT 11021
#define WSA_QOS_EOBJLENGTH 11022
#define WSA_QOS_EFLOWCOUNT 11023
#define WSA_QOS_EUNKOWNPSOBJ 11024
#define WSA_QOS_EPOLICYOBJ 11025
#define WSA_QOS_EFLOWDESC 11026
#define WSA_QOS_EPSFLOWSPEC 11027
#define WSA_QOS_EPSFILTERSPEC 11028
#define WSA_QOS_ESDMODEOBJ 11029
#define WSA_QOS_ESHAPERATEOBJ 11030
#define WSA_QOS_RESERVED_PETYPE 11031
#define WSA_SECURE_HOST_NOT_FOUND 11032
#define WSA_IPSEC_NAME_POLICY_ERROR 11033

#define WSA_WAIT_FAILED -1u
#define WSA_WAIT_EVENT_0 0
#define WSA_WAIT_IO_COMPLETION 0xc0
#define WSA_WAIT_TIMEOUT 258
#define WSA_MAXIMUM_WAIT_EVENTS 64
#define WSA_IO_PENDING 997



/*!BEGIN libc/nt/events.h */

#define COSMOPOLITAN_LIBC_NT_EVENTS_H_
/*                            ░░░░
                       ▒▒▒░░░▒▒▒▒▒▒▒▓▓▓░
                      ▒▒▒▒░░░▒▒▒▒▒▒▓▓▓▓▓▓░
                     ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓░
                     ▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   ▓▓▓▓▓▓▒        ▒▒▒▓▓█
                    ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                   ░▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   █▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                   ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓░  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                  ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▒
                  ▒▒▒▒▓▓      ▓▒▒▓▓▓▓   ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                                   ▒▓  ▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓
                  ░░░░░░░░░░░▒▒▒▒      ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                ▒▒░░░░░░░░░░▒▒▒▒▒▓▓▓     ▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
               ░▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓░      ░▓███▓
               ▒▒░░░░░░░░░░▒▒▒▒▒▓▓░  ▒▓▓▓▒▒▒         ░▒▒▒▓   ████████████
              ▒▒░░░░░░░░░░░▒▒▒▒▒▓▓  ▒▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒░           ░███
              ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓            ███
             ▒▒░░░░░░░░░░▒▒▒▒▒▒▓▓  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒            ▓██
             ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒▓           ▓██
            ▒▒░░░▒▒▒░░░▒▒░▒▒▒▓▓▒  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒           ███
                            ░▒▓  ░▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓          ▓██
╔────────────────────────────────────────────────────────────────▀▀▀─────────│─╗
│ cosmopolitan § new technology » events                                   ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

int32_t GetMessage(struct NtMsg *lpMsg, int64_t hWnd, uint32_t wMsgFilterMin,
                   uint32_t wMsgFilterMax);
int32_t TranslateMessage(const struct NtMsg *lpMsg);
intptr_t DispatchMessage(const struct NtMsg *lpMsg);
void PostQuitMessage(int nExitCode);
bool32 GetCursorPos(struct NtPoint *lpPoint);
int64_t SendMessage(int64_t hWnd, uint32_t Msg, uint64_t wParam,
                    int64_t lParam);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/files.h */

#define COSMOPOLITAN_LIBC_NT_FILES_H_
/*                            ░░░░
                       ▒▒▒░░░▒▒▒▒▒▒▒▓▓▓░
                      ▒▒▒▒░░░▒▒▒▒▒▒▓▓▓▓▓▓░
                     ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓░
                     ▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   ▓▓▓▓▓▓▒        ▒▒▒▓▓█
                    ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                   ░▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   █▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                   ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓░  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                  ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▒
                  ▒▒▒▒▓▓      ▓▒▒▓▓▓▓   ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                                   ▒▓  ▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓
                  ░░░░░░░░░░░▒▒▒▒      ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                ▒▒░░░░░░░░░░▒▒▒▒▒▓▓▓     ▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
               ░▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓░      ░▓███▓
               ▒▒░░░░░░░░░░▒▒▒▒▒▓▓░  ▒▓▓▓▒▒▒         ░▒▒▒▓   ████████████
              ▒▒░░░░░░░░░░░▒▒▒▒▒▓▓  ▒▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒░           ░███
              ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓            ███
             ▒▒░░░░░░░░░░▒▒▒▒▒▒▓▓  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒            ▓██
             ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒▓           ▓██
            ▒▒░░░▒▒▒░░░▒▒░▒▒▒▓▓▒  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒           ███
                            ░▒▓  ░▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓          ▓██
╔────────────────────────────────────────────────────────────────▀▀▀─────────│─╗
│ cosmopolitan § new technology » files                                    ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#define kNtHandleFlagInherit          1 /* SetHandleInformation */
#define kNtHandleFlagProtectFromClose 2

#define kNtFindFirstExCaseSensitive 1
#define kNtFindFirstExLargeFetch    2

#define kNtDuplicateCloseSource 1
#define kNtDuplicateSameAccess  2

#define kNtSymbolicLinkFlagDirectory 1

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

intptr_t LoadResource(int64_t hModule, int64_t hResInfo);
uint32_t SetHandleCount(uint32_t uNumber);
uint32_t GetLogicalDrives(void);
bool32 FlushFileBuffers(int64_t hFile);

int64_t ReOpenFile(int64_t hOriginalFile, uint32_t dwDesiredAccess,
                   uint32_t dwShareMode, uint32_t dwFlagsAndAttributes);

bool32 DeleteFile(const char16_t *lpFileName) paramsnonnull();

bool32 CopyFile(const char16_t *lpExistingFileName,
                const char16_t *lpNewFileName, bool32 bFailIfExists)
    paramsnonnull();

bool32 MoveFile(const char16_t *lpExistingFileName,
                const char16_t *lpNewFileName) paramsnonnull();
bool32 MoveFileEx(const char16_t *lpExistingFileName,
                  const char16_t *lpNewFileName, int dwFlags) paramsnonnull();

bool32 SetCurrentDirectory(const char16_t *lpPathName);
uint32_t GetCurrentDirectory(uint32_t nBufferLength, char16_t *out_lpBuffer);

bool32 CreateDirectory(const char16_t *lpPathName,
                       struct NtSecurityAttributes *lpSecurityAttributes);
bool32 RemoveDirectory(const char16_t *lpPathName);

bool32 DuplicateHandle(int64_t hSourceProcessHandle, int64_t hSourceHandle,
                       int64_t hTargetProcessHandle, int64_t *lpTargetHandle,
                       uint32_t dwDesiredAccess, bool32 bInheritHandle,
                       uint32_t dwOptions);

bool32 GetHandleInformation(int64_t hObject, uint32_t *out_lpdwFlags);
bool32 SetHandleInformation(int64_t hObject, uint32_t dwMask, uint32_t dwFlags);
int GetFileType(int64_t hFile);

bool32 GetFileInformationByHandleEx(int64_t hFile,
                                    uint32_t FileInformationClass,
                                    void *out_lpFileInformation,
                                    uint32_t dwBufferSize);

bool32 GetFileInformationByHandle(
    int64_t hFile, struct NtByHandleFileInformation *lpFileInformation);

uint32_t GetFileAttributes(const char16_t *lpFileName);
bool32 GetFileAttributesEx(
    const char16_t *lpFileName, int fInfoLevelId /* kNtGetFileExInfoStandard */,
    void *out_lpFileInformation /* → struct NtWin32FileAttributeData * */)
    paramsnonnull();

uint32_t GetCompressedFileSize(const char16_t *lpFileName,
                               uint32_t *lpFileSizeHigh);
bool32 SetFileAttributes(const char16_t *lpFileName, uint32_t dwFileAttributes);
bool32 GetFileTime(int64_t hFile, struct NtFileTime *opt_lpCreationFileTime,
                   struct NtFileTime *opt_lpLastAccessFileTime,
                   struct NtFileTime *opt_lpLastWriteFileTime);
bool32 SetFileTime(int64_t hFile,
                   const struct NtFileTime *opt_lpCreationFileTime,
                   const struct NtFileTime *opt_lpLastAccessFileTime,
                   const struct NtFileTime *opt_lpLastWriteFileTime);

bool32 DeviceIoControl(int64_t hDevice, uint32_t dwIoControlCode,
                       void *lpInBuffer, uint32_t nInBufferSize,
                       void *lpOutBuffer, uint32_t nOutBufferSize,
                       uint32_t *lpBytesReturned,
                       struct NtOverlapped *lpOverlapped);

bool32 LockFile(int64_t hFile, uint32_t dwFileOffsetLow,
                uint32_t dwFileOffsetHigh, uint32_t nNumberOfBytesToLockLow,
                uint32_t nNumberOfBytesToLockHigh);
bool32 LockFileEx(int64_t hFile, uint32_t dwFlags, uint32_t dwReserved,
                  uint32_t nNumberOfBytesToLockLow,
                  uint32_t nNumberOfBytesToLockHigh,
                  struct NtOverlapped *lpOverlapped) paramsnonnull();
bool32 UnlockFile(int64_t hFile, uint32_t dwFileOffsetLow,
                  uint32_t dwFileOffsetHigh, uint32_t nNumberOfBytesToUnlockLow,
                  uint32_t nNumberOfBytesToUnlockHigh);
bool32 UnlockFileEx(int64_t hFile, uint32_t dwReserved,
                    uint32_t nNumberOfBytesToUnlockLow,
                    uint32_t nNumberOfBytesToUnlockHigh,
                    struct NtOverlapped *lpOverlapped) paramsnonnull();

bool32 CreateHardLink(const char16_t *lpFileName,
                      const char16_t *lpExistingFileName,
                      struct NtSecurityAttributes *reserved)
    paramsnonnull((1, 2));
bool32 CreateSymbolicLink(const char16_t *lpSymlinkFileName,
                          const char16_t *lpTargetPathName, uint32_t dwFlags)
    paramsnonnull();

uint32_t SetFilePointer(int64_t hFile, int32_t lDistanceToMove,
                        int32_t *optional_lpDistanceToMoveHigh,
                        int dwMoveMethod);
bool32 SetFilePointerEx(int64_t hFile, int64_t liDistanceToMove,
                        int64_t *optional_lpNewFilePointer, int dwMoveMethod);

bool32 SetEndOfFile(int64_t hFile);
bool32 SetFileValidData(int64_t hFile, int64_t ValidDataLength);

bool32 GetFileSecurity(const char16_t *lpFileName,
                       uint32_t RequestedInformation,
                       struct NtSecurityDescriptor *pSecurityDescriptor,
                       uint32_t nLength, uint32_t *lpnLengthNeeded);

bool32 OpenProcessToken(int64_t hProcessHandle, uint32_t dwDesiredAccess,
                        int64_t *out_hTokenHandle);
bool32 DuplicateToken(int64_t hExistingTokenHandle, int dwImpersonationLevel,
                      int64_t *out_hDuplicateTokenHandle);
bool32 DuplicateTokenEx(int64_t hExistingToken, unsigned int dwDesiredAccess,
                        struct NtSecurityAttributes *lpTokenAttributes,
                        int ImpersonationLevel, int TokenType,
                        int64_t *out_phNewToken);

bool32 AccessCheck(struct NtSecurityDescriptor *pSecurityDescriptor,
                   int64_t ClientToken, unsigned int DesiredAccess,
                   struct NtGenericMapping *lpGenericMapping,
                   struct NtPrivilegeSet *lpPrivilegeSet,
                   unsigned int *PrivilegeSetLength,
                   unsigned int *GrantedAccess, bool32 *AccessStatus);

void MapGenericMask(uint32_t *AccessMask,
                    struct NtGenericMapping *GenericMapping);

int64_t FindFirstFile(const char16_t *lpFileName,
                      struct NtWin32FindData *out_lpFindFileData);
int64_t FindFirstFileEx(const char16_t *lpFileName, int fInfoLevelId,
                        void *out_lpFindFileData, int fSearchOp,
                        void *reserved_lpSearchFilter,
                        uint32_t dwAdditionalFlags);
bool32 FindNextFile(int64_t hFindFile,
                    struct NtWin32FindData *out_lpFindFileData);
bool32 FindClose(int64_t inout_hFindFile);

int64_t FindFirstVolume(char16_t *out_lpszVolumeName, uint32_t cchBufferLength);
bool32 FindNextVolume(int64_t inout_hFindVolume, char16_t *out_lpszVolumeName,
                      uint32_t cchBufferLength);
bool32 FindVolumeClose(int64_t hFindVolume);

bool32 ReadFileScatter(
    int64_t hFileOpenedWithOverlappedAndNoBuffering,
    const union NtFileSegmentElement
        aNullTerminatedPageAlignedSizedSegmentArray[],
    uint32_t nNumberOfBytesToReadThatsMultipleOfFileVolumeSectorSize,
    uint32_t *lpReserved, struct NtOverlapped *inout_lpOverlapped)
    paramsnonnull();

bool32 WriteFileGather(int64_t hFileOpenedWithOverlappedAndNoBuffering,
                       const union NtFileSegmentElement aSegmentArray[],
                       uint32_t nNumberOfBytesToWrite, uint32_t *lpReserved,
                       struct NtOverlapped inout_lpOverlapped) paramsnonnull();

#define kNtFileNameNormalized 0x0
#define kNtFileNameOpened     0x8
#define kNtVolumeNameDos      0x0 /* e.g. \\?\C:\Users\jart */
#define kNtVolumeNameGuid     0x1 /* e.g. \\?\Volume{ea38-etc.}\Users\jart */
#define kNtVolumeNameNt       0x2 /* e.g. \Device\HarddiskVolume4\Users\jart */
#define kNtVolumeNameNone     0x4 /* e.g. \Users\jart */
uint32_t GetFinalPathNameByHandle(int64_t hFile, char16_t *out_path,
                                  uint32_t arraylen, uint32_t flags);

#if ShouldUseMsabiAttribute()


/*!BEGIN libc/nt/thunk/files.inc */

#define CopyFile(...) __imp_CopyFileW(__VA_ARGS__)
extern typeof(CopyFile) *const __imp_CopyFileW __msabi;

#define FlushFileBuffers(...) __imp_FlushFileBuffers(__VA_ARGS__)
extern typeof(FlushFileBuffers) *const __imp_FlushFileBuffers __msabi;

#define GetFileType(...) __imp_GetFileType(__VA_ARGS__)
extern typeof(GetFileType) *const __imp_GetFileType __msabi;
#endif /* ShouldUseMsabiAttribute() */
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/iocp.h */

#define COSMOPOLITAN_LIBC_NT_IOCP_H_
/*                            ░░░░
                       ▒▒▒░░░▒▒▒▒▒▒▒▓▓▓░
                      ▒▒▒▒░░░▒▒▒▒▒▒▓▓▓▓▓▓░
                     ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓░
                     ▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   ▓▓▓▓▓▓▒        ▒▒▒▓▓█
                    ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                   ░▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   █▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                   ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓░  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                  ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▒
                  ▒▒▒▒▓▓      ▓▒▒▓▓▓▓   ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                                   ▒▓  ▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓
                  ░░░░░░░░░░░▒▒▒▒      ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                ▒▒░░░░░░░░░░▒▒▒▒▒▓▓▓     ▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
               ░▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓░      ░▓███▓
               ▒▒░░░░░░░░░░▒▒▒▒▒▓▓░  ▒▓▓▓▒▒▒         ░▒▒▒▓   ████████████
              ▒▒░░░░░░░░░░░▒▒▒▒▒▓▓  ▒▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒░           ░███
              ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓            ███
             ▒▒░░░░░░░░░░▒▒▒▒▒▒▓▓  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒            ▓██
             ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒▓           ▓██
            ▒▒░░░▒▒▒░░░▒▒░▒▒▒▓▓▒  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒           ███
                            ░▒▓  ░▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓          ▓██
╔────────────────────────────────────────────────────────────────▀▀▀─────────│─╗
│ cosmopolitan § new technology » i/o completion ports                     ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#define kNtFileSkipCompletionPortOnSuccess 1
#define kNtFileSkipSetEventOnHandle        2

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

typedef void (*NtOverlappedCompletionRoutine)(
    uint32_t dwErrorCode, uint32_t dwNumberOfBytesTransfered,
    struct NtOverlapped *inout_lpOverlapped);

int64_t CreateIoCompletionPort(int64_t FileHandleOrNeg1,
                               int64_t opt_ExistingCompletionPortOrZero,
                               void *StatePointer,
                               uint32_t NumberOfConcurrentThreads);

bool32 GetQueuedCompletionStatus(int64_t CompletionPort,
                                 uint32_t *lpNumberOfBytesTransferred,
                                 void *StatePointerPointer,
                                 struct NtOverlapped **lpOverlapped,
                                 uint32_t dwMilliseconds);

bool32 GetQueuedCompletionStatusEx(
    int64_t CompletionPort,
    struct NtOverlappedEntry *out_lpCompletionPortEntries, uint32_t ulCount,
    uint32_t *out_ulNumEntriesRemoved, uint32_t dwMilliseconds,
    bool32 fAlertable);

bool32 PostQueuedCompletionStatus(int64_t CompletionPort,
                                  uint32_t dwNumberOfBytesTransferred,
                                  uint32_t *dwCompletionKey,
                                  struct NtOverlapped *opt_lpOverlapped);

bool32 SetFileCompletionNotificationModes(int64_t FileHandle,
                                          unsigned char Flags);

bool32 ReadFileEx(int64_t hFile, void *lpBuffer, uint32_t nNumberOfBytesToRead,
                  uint32_t *lpNumberOfBytesRead,
                  struct NtOverlapped *opt_lpOverlapped,
                  NtOverlappedCompletionRoutine lpCompletionRoutine);

bool32 WriteFileEx(int64_t hFile, const void *lpBuffer,
                   uint32_t nNumberOfBytesToWrite,
                   struct NtOverlapped *lpOverlapped,
                   NtOverlappedCompletionRoutine lpCompletionRoutine);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/ipc.h */

#define COSMOPOLITAN_LIBC_NT_IPC_H_
/*                            ░░░░
                       ▒▒▒░░░▒▒▒▒▒▒▒▓▓▓░
                      ▒▒▒▒░░░▒▒▒▒▒▒▓▓▓▓▓▓░
                     ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓░
                     ▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   ▓▓▓▓▓▓▒        ▒▒▒▓▓█
                    ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                   ░▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   █▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                   ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓░  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                  ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▒
                  ▒▒▒▒▓▓      ▓▒▒▓▓▓▓   ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                                   ▒▓  ▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓
                  ░░░░░░░░░░░▒▒▒▒      ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                ▒▒░░░░░░░░░░▒▒▒▒▒▓▓▓     ▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
               ░▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓░      ░▓███▓
               ▒▒░░░░░░░░░░▒▒▒▒▒▓▓░  ▒▓▓▓▒▒▒         ░▒▒▒▓   ████████████
              ▒▒░░░░░░░░░░░▒▒▒▒▒▓▓  ▒▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒░           ░███
              ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓            ███
             ▒▒░░░░░░░░░░▒▒▒▒▒▒▓▓  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒            ▓██
             ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒▓           ▓██
            ▒▒░░░▒▒▒░░░▒▒░▒▒▒▓▓▒  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒           ███
                            ░▒▓  ░▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓          ▓██
╔────────────────────────────────────────────────────────────────▀▀▀─────────│─╗
│ cosmopolitan § new technology » ipc                                      ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

/* CreateNamedPipe:dwOpenMode */
#define kNtPipeAccessInbound  0x00000001
#define kNtPipeAccessOutbound 0x00000002
#define kNtPipeAccessDuplex   0x00000003

/* CreateNamedPipe::dwPipeMode */
#define kNtPipeWait                0x00000000
#define kNtPipeNowait              0x00000001
#define kNtPipeReadmodeByte        0x00000000
#define kNtPipeReadmodeMessage     0x00000002
#define kNtPipeTypeByte            0x00000000
#define kNtPipeTypeMessage         0x00000004
#define kNtPipeAcceptRemoteClients 0x00000000
#define kNtPipeRejectRemoteClients 0x00000008

/* CreateNamedPipe::nMaxInstances */
#define NT_PIPE_UNLIMITED_INSTANCES 255

/* CreateNamedPipeInfo */
#define PIPE_CLIENT_END 0x00000000
#define PIPE_SERVER_END 0x00000001

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

bool32 CreatePipe(int64_t *out_hReadPipe, int64_t *out_hWritePipe,
                  const struct NtSecurityAttributes *opt_lpPipeAttributes,
                  uint32_t nSize) paramsnonnull((1, 2));

int64_t CreateNamedPipe(
    const char16_t *lpName, uint32_t dwOpenMode, uint32_t dwPipeMode,
    uint32_t nMaxInstances, uint32_t nOutBufferSize, uint32_t nInBufferSize,
    uint32_t nDefaultTimeOut,
    const struct NtSecurityAttributes *opt_lpSecurityAttributes)
    paramsnonnull((1));

bool32 CallNamedPipe(const char16_t *lpNamedPipeName, void *lpInBuffer,
                     uint32_t nInBufferSize, void *lpOutBuffer,
                     uint32_t nOutBufferSize, uint32_t *lpBytesRead,
                     uint32_t nTimeOut);

bool32 ConnectNamedPipe(int64_t *hNamedPipe, struct NtOverlapped *lpOverlapped);
bool32 WaitNamedPipe(const char16_t *lpNamedPipeName, uint32_t nTimeOut);
bool32 DisconnectNamedPipe(int64_t *hNamedPipe);

bool32 SetNamedPipeHandleState(int64_t *hNamedPipe, uint32_t *lpMode,
                               uint32_t *lpMaxCollectionCount,
                               uint32_t *lpCollectDataTimeout);

bool32 PeekNamedPipe(int64_t *hNamedPipe, void *lpBuffer, uint32_t nBufferSize,
                     uint32_t *lpBytesRead, uint32_t *lpTotalBytesAvail,
                     uint32_t *lpBytesLeftThisMessage);

bool32 TransactNamedPipe(int64_t *hNamedPipe, void *lpInBuffer,
                         uint32_t nInBufferSize, void *lpOutBuffer,
                         uint32_t nOutBufferSize, uint32_t *lpBytesRead,
                         struct NtOverlapped *lpOverlapped);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/memory.h */

#define COSMOPOLITAN_LIBC_NT_MEMORY_H_
/*                            ░░░░
                       ▒▒▒░░░▒▒▒▒▒▒▒▓▓▓░
                      ▒▒▒▒░░░▒▒▒▒▒▒▓▓▓▓▓▓░
                     ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓░
                     ▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   ▓▓▓▓▓▓▒        ▒▒▒▓▓█
                    ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                   ░▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   █▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                   ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓░  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                  ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▒
                  ▒▒▒▒▓▓      ▓▒▒▓▓▓▓   ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                                   ▒▓  ▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓
                  ░░░░░░░░░░░▒▒▒▒      ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                ▒▒░░░░░░░░░░▒▒▒▒▒▓▓▓     ▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
               ░▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓░      ░▓███▓
               ▒▒░░░░░░░░░░▒▒▒▒▒▓▓░  ▒▓▓▓▒▒▒         ░▒▒▒▓   ████████████
              ▒▒░░░░░░░░░░░▒▒▒▒▒▓▓  ▒▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒░           ░███
              ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓            ███
             ▒▒░░░░░░░░░░▒▒▒▒▒▒▓▓  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒            ▓██
             ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒▓           ▓██
            ▒▒░░░▒▒▒░░░▒▒░▒▒▒▓▓▒  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒           ███
                            ░▒▓  ░▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓          ▓██
╔────────────────────────────────────────────────────────────────▀▀▀─────────│─╗
│ cosmopolitan § new technology » memory                                   ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#define kNtNumaNoPreferredNode 0xffffffffu

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

int64_t CreateFileMappingNuma(
    int64_t opt_hFile /* -1ul is MAP_ANONYMOUS */,
    const struct NtSecurityAttributes *opt_lpFileMappingAttributes,
    uint32_t flProtect, uint32_t dwMaximumSizeHigh, uint32_t dwMaximumSizeLow,
    const char16_t *opt_lpName, uint32_t nndDesiredNumaNode);

void *MapViewOfFileExNuma(
    int64_t hFileMappingObject, /* @see CreateFileMapping() */
    uint32_t dwDesiredAccess, uint32_t dwFileOffsetHigh, /* high order bits */
    uint32_t dwFileOffsetLow,                            /* low order bits */
    size_t dwNumberOfBytesToMap, void *opt_lpDesiredBaseAddress,
    uint32_t nndDesiredNumaNode);

bool32 UnmapViewOfFile(const void *lpBaseAddress);
bool32 FlushViewOfFile(const void *lpBaseAddress,
                       size_t dwNumberOfBytesToFlush);

void *VirtualAlloc(void *opt_lpAddress, uint64_t dwSize,
                   uint32_t flAllocationType, uint32_t flProtect);
bool32 VirtualFree(void *lpAddress, uint64_t dwSize, uint32_t dwFreeType);
bool32 VirtualProtect(void *lpAddress, uint64_t dwSize, uint32_t flNewProtect,
                      uint32_t *lpflOldProtect) paramsnonnull();
uint64_t VirtualQuery(const void *lpAddress,
                      struct NtMemoryBasicInformation *lpBuffer,
                      uint64_t dwLength);
void *VirtualAllocEx(int64_t hProcess, void *lpAddress, uint64_t dwSize,
                     uint32_t flAllocationType, uint32_t flProtect);

bool32 PrefetchVirtualMemory(int64_t hProcess, const uint32_t *NumberOfEntries,
                             struct NtMemoryRangeEntry *VirtualAddresses,
                             uint32_t reserved_Flags);
bool32 OfferVirtualMemory(void *inout_VirtualAddress, size_t Size,
                          int Priority);

#if ShouldUseMsabiAttribute()


/*!BEGIN libc/nt/thunk/memory.inc */

#define CreateFileMappingNuma(...) __imp_CreateFileMappingNumaW(__VA_ARGS__)
#define MapViewOfFileExNuma(...)   __imp_MapViewOfFileExNuma(__VA_ARGS__)
#define FlushViewOfFile(...)       __imp_FlushViewOfFile(__VA_ARGS__)
#define UnmapViewOfFile(...)       __imp_UnmapViewOfFile(__VA_ARGS__)

extern typeof(UnmapViewOfFile) *const __imp_UnmapViewOfFile __msabi;
extern typeof(FlushViewOfFile) *const __imp_FlushViewOfFile __msabi;
extern typeof(MapViewOfFileExNuma) *const __imp_MapViewOfFileExNuma __msabi;
extern typeof(CreateFileMappingNuma) *const
    __imp_CreateFileMappingNumaW __msabi;
#endif /* ShouldUseMsabiAttribute() */
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/messagebox.h */

#define COSMOPOLITAN_LIBC_NT_MESSAGEBOX_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

int MessageBox(int64_t hWnd, const char16_t *lpText, const char16_t *lpCaption,
               uint32_t mbType);
int MessageBoxEx(int64_t hWnd, const char16_t *lpText,
                 const char16_t *lpCaption, uint32_t mbType,
                 uint16_t wLanguageId);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/ntdll.h */

#define COSMOPOLITAN_LIBC_NT_NTDLL_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/*                            ░░░░
                       ▒▒▒░░░▒▒▒▒▒▒▒▓▓▓░
                      ▒▒▒▒░░░▒▒▒▒▒▒▓▓▓▓▓▓░
                     ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓░
                     ▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   ▓▓▓▓▓▓▒        ▒▒▒▓▓█
                    ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                   ░▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   █▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                   ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓░  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                  ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▒
                  ▒▒▒▒▓▓      ▓▒▒▓▓▓▓   ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                                   ▒▓  ▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓
                  ░░░░░░░░░░░▒▒▒▒      ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                ▒▒░░░░░░░░░░▒▒▒▒▒▓▓▓     ▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
               ░▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓░      ░▓███▓
               ▒▒░░░░░░░░░░▒▒▒▒▒▓▓░  ▒▓▓▓▒▒▒         ░▒▒▒▓   ████████████
              ▒▒░░░░░░░░░░░▒▒▒▒▒▓▓  ▒▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒░           ░███
              ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓            ███
             ▒▒░░░░░░░░░░▒▒▒▒▒▒▓▓  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒            ▓██
             ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒▓           ▓██
            ▒▒░░░▒▒▒░░░▒▒░▒▒▒▓▓▒  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒           ███
                            ░▒▓  ░▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓          ▓██
╔────────────────────────────────────────────────────────────────▀▀▀─────────│─╗
│ cosmopolitan § new technology » beyond the pale                          ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│─╝
    “The functions and structures in [for these APIs] are internal to
     the operating system and subject to change from one release of
     Windows to the next, and possibly even between service packs for
     each release.” ──Quoth MSDN */

#define __nt_system_call_dispatcher (wambda *)0x7ffe0308

extern const struct NtUnicodeString *const RtlNtdllName;

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § new technology » beyond the pale » eponymous runtime      ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#define NT_PROCESS_FLAGS_CREATE_SUSPENDED 0x00000001
#define NT_PROCESS_FLAGS_INHERIT_HANDLES  0x00000002
#define NT_PROCESS_FLAGS_NO_SYNCHRONIZE   0x00000004
#define NT_RTL_CLONE_PARENT               0
#define NT_RTL_CLONE_CHILD                297

NtStatus NtCallbackReturn(void *opt_Result, uint32_t ResultLength,
                          int32_t Status);
NtStatus NtTestAlert(void);

NtStatus NtOpenFile(int64_t *out_FileHandle, uint32_t DesiredAccess,
                    struct NtObjectAttributes *ObjectAttributes,
                    struct NtIoStatusBlock *out_IoStatusBlock,
                    uint32_t ShareAccess, uint32_t OpenOptions);

NtStatus NtQueryInformationToken(int64_t TokenHandle,
                                 uint32_t TokenInformationClass,
                                 void *out_TokenInformation,
                                 uint32_t TokenInformationLength,
                                 uint32_t *out_ReturnLength);
NtStatus NtYieldExecution(void);
NtStatus NtQuerySystemInformation(uint32_t info_class, void *out_info,
                                  uint32_t info_size,
                                  uint32_t *out_bytes_received);
NtStatus NtReadVirtualMemory(int64_t ProcessHandle, const void *BaseAddress,
                             void *out_Buffer, size_t BufferLength,
                             size_t *opt_out_ReturnLength);
NtStatus NtCreateTimer(void **out_TimerHandle, uint32_t DesiredAccess,
                       struct NtObjectAttributes *ObjectAttributes,
                       uint32_t TimerType);
NtStatus NtSetTimer(void *TimerHandle, int64_t *DueTime, void *TimerApcRoutine,
                    void *TimerContext, int32_t Resume, int32_t Period,
                    int32_t *out_PreviousState);
NtStatus NtQueryObject(void *ObjectHandle, int ObjectInformationClass,
                       void *out_ObjectInformation,
                       uint32_t ObjectInformationLength,
                       uint32_t *opt_out_ReturnLength);
NtStatus NtQueryFullAttributesFile(
    struct NtObjectAttributes *attributes,
    struct NtFileNetworkOpenInformation *out_info);
NtStatus NtCreateKey(void **out_KeyHandle, uint32_t DesiredAccess,
                     struct NtObjectAttributes *ObjectAttributes,
                     uint32_t TitleIndex, struct NtUnicodeString *opt_Class,
                     uint32_t CreateOptions, uint32_t *opt_out_Disposition);
NtStatus NtOpenKey(void **out_KeyHandle, uint32_t DesiredAccess,
                   struct NtObjectAttributes *ObjectAttributes);
NtStatus NtSetValueKey(void *KeyHandle, struct NtUnicodeString *ValueName,
                       uint32_t opt_TitleIndex, uint32_t Type, void *Data,
                       uint32_t DataSize);
NtStatus NtDeleteKey(void *KeyHandle);
NtStatus NtQueryValueKey(void *KeyHandle, struct NtUnicodeString *ValueName,
                         int KeyValueInformationClass,
                         void *out_KeyValueInformation, uint32_t Length,
                         uint32_t *out_ResultLength);
NtStatus NtFlushKey(void *KeyHandle);
NtStatus NtEnumerateKey(int64_t hkey, uint32_t index, int info_class,
                        void *out_key_info, uint32_t key_info_size,
                        uint32_t *out_bytes_received);
NtStatus NtEnumerateValueKey(int64_t hKey, uint32_t index, int info_class,
                             void *out_key_info, uint32_t key_info_size,
                             uint32_t *out_bytes_received);
NtStatus NtQuerySystemTime(int64_t *SystemTime);
NtStatus NtDeleteFile(struct NtObjectAttributes *ObjectAttributes);
NtStatus NtFlushBuffersFile(int64_t FileHandle,
                            struct NtIoStatusBlock *out_IoStatusBlock);
NtStatus NtCreateIoCompletion(void **out_IoCompletionHandle,
                              uint32_t DesiredAccess,
                              struct NtObjectAttributes *ObjectAttributes,
                              uint32_t NumberOfConcurrentThreads);
NtStatus NtRaiseHardError(int32_t ErrorStatus, uint32_t NumberOfArguments,
                          uint32_t UnicodeStringArgumentsMask, void *Arguments,
                          uint32_t MessageBoxType,
                          uint32_t *out_MessageBoxResult);
NtStatus NtRaiseException(struct NtExceptionRecord *ExceptionRecord,
                          struct NtContext *Context, int32_t SearchFrames);
NtStatus NtCreateEvent(void **out_EventHandle, uint32_t DesiredAccess,
                       struct NtObjectAttributes *ObjectAttributes,
                       int EventType, int32_t InitialState);
NtStatus NtWaitForSingleObject(void *ObjectHandle, int32_t Alertable,
                               int64_t *TimeOut);
NtStatus NtSetEvent(void *EventHandle, int32_t *opt_out_PreviousState);
NtStatus NtClearEvent(void *EventHandle);
NtStatus NtSignalAndWaitForSingleObject(void *ObjectToSignal,
                                        void *WaitableObject, int32_t Alertable,
                                        int64_t *opt_Time);
NtStatus NtQueryPerformanceCounter(int64_t *out_PerformanceCount,
                                   int64_t *opt_out_PerformanceFrequency);
NtStatus NtFsControlFile(int64_t FileHandle, void *opt_Event,
                         NtIoApcRoutine opt_ApcRoutine, void *opt_ApcContext,
                         struct NtIoStatusBlock *out_IoStatusBlock,
                         uint32_t FsControlCode, void *opt_InputBuffer,
                         uint32_t InputBufferLength, void *opt_out_OutputBuffer,
                         uint32_t OutputBufferLength);
NtStatus NtCancelIoFile(int64_t FileHandle,
                        struct NtIoStatusBlock *out_IoStatusBlock);
NtStatus NtCreateProfile(void **out_ProfileHandle, int64_t ProcessHandle,
                         void *Base, uint32_t Size, uint32_t BucketShift,
                         uint32_t *Buffer, uint32_t BufferLength, int Source,
                         uint32_t ProcessorMask);
NtStatus NtSetIntervalProfile(uint32_t Interval, int Source);
NtStatus NtQueryIntervalProfile(int Source, uint32_t *out_Interval);
NtStatus NtStartProfile(void *ProfileHandle);
NtStatus NtStopProfile(void *ProfileHandle);
NtStatus NtCreateDirectoryObject(int64_t *out_DirectoryHandle,
                                 uint32_t DesiredAccess,
                                 struct NtObjectAttributes *ObjectAttributes);
NtStatus NtOpenDirectoryObject(int64_t *out_DirectoryHandle,
                               uint32_t DesiredAccess,
                               struct NtObjectAttributes *ObjectAttributes);
NtStatus NtOpenSymbolicLinkObject(int64_t *out_DirectoryHandle,
                                  uint32_t DesiredAccess,
                                  struct NtObjectAttributes *ObjectAttributes);
NtStatus NtQuerySymbolicLinkObject(int64_t DirectoryHandle,
                                   struct NtUnicodeString *inout_TargetName,
                                   uint32_t *opt_out_ReturnLength);
NtStatus ZwAreMappedFilesTheSame(void *Address1, void *Address2);
NtStatus NtQueryVolumeInformationFile(int64_t FileHandle,
                                      struct NtIoStatusBlock *out_IoStatusBlock,
                                      void *out_FsInformation, uint32_t Length,
                                      uint32_t FsInformationClass);
NtStatus NtQuerySecurityObject(
    int64_t handle, int RequestedInformation,
    struct NtSecurityDescriptor *out_SecurityDescriptor,
    uint32_t SecurityDescriptorLength, uint32_t *out_ReturnLength);
NtStatus NtQueueApcThread(int64_t ThreadHandle, NtPkNormalRoutine ApcRoutine,
                          void *opt_ApcContext, void *opt_Argument1,
                          void *opt_Argument2);
NtStatus NtFlushInstructionCache(int64_t ProcessHandle, void *opt_BaseAddress,
                                 size_t FlushSize);
NtStatus NtQueryAttributesFile(const struct NtObjectAttributes *object,
                               struct NtFileBasicInformation *file_information);
NtStatus NtQueryDirectoryFile(
    int64_t FileHandle, void *opt_Event, NtIoApcRoutine opt_ApcRoutine,
    void *opt_ApcContext, struct NtIoStatusBlock *out_IoStatusBlock,
    void *out_FileInformation, uint32_t FileInformationLength,
    uint32_t FileInformationClass, int32_t ReturnSingleEntry,
    struct NtUnicodeString *opt_FileName, int32_t RestartScan);
NtStatus NtFlushVirtualMemory(int64_t ProcessHandle, void **inout_BaseAddress,
                              uint32_t **inout_FlushSize,
                              struct NtIoStatusBlock *out_IoStatusBlock);
NtStatus NtQueryInformationJobObject(void *JobHandle, int JobInformationClass,
                                     void *out_JobInformation,
                                     uint32_t JobInformationLength,
                                     uint32_t *opt_out_ReturnLength);

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § new technology » beyond the pale » runtime library        ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

NtStatus RtlInitializeCriticalSection(struct NtCriticalSection *out_crit);
NtStatus RtlDeleteCriticalSection(struct NtCriticalSection *crit);
NtStatus RtlEnterCriticalSection(struct NtCriticalSection *inout_crit);
NtStatus RtlLeaveCriticalSection(struct NtCriticalSection *inout_crit);
NtStatus RtlTryEnterCriticalSection(struct NtCriticalSection *inout_crit);
NtStatus RtlInitUnicodeString(struct NtUnicodeString *inout_DestinationString,
                              const char16_t *SourceString);
void RtlFreeUnicodeString(struct NtUnicodeString **string);
NtStatus RtlQueryEnvironmentVariable_U(char16_t *Environment,
                                       struct NtUnicodeString *Name,
                                       struct NtUnicodeString *Value);
NtStatus RtlConvertSidToUnicodeString(struct NtUnicodeString *out_UnicodeString,
                                      void *Sid,
                                      int32_t AllocateDestinationString);
void *RtlCreateHeap(uint32_t flags, void *base, size_t reserve_sz,
                    size_t commit_sz, void *lock, void *params);
NtStatus RtlDestroyHeap(void *base);
void *RtlAllocateHeap(int64_t heap, uint32_t flags, size_t size);
void *RtlReAllocateHeap(int64_t heap, uint32_t flags, void *ptr, size_t size);
NtStatus RtlFreeHeap(int64_t heap, uint32_t flags, void *ptr);
size_t RtlSizeHeap(int64_t heap, uint32_t flags, void *ptr);
NtStatus RtlValidateHeap(int64_t heap, uint32_t flags, void *ptr);
NtStatus RtlLockHeap(int64_t heap);
NtStatus RtlUnlockHeap(int64_t heap);
NtStatus RtlGetProcessHeaps(uint32_t count, void **out_Heaps);
NtStatus RtlWalkHeap(int64_t heap, void *out_Info);

#if ShouldUseMsabiAttribute()


/*!BEGIN libc/nt/thunk/ntdll.inc */

#define NtYieldExecution(...) __imp_NtYieldExecution(__VA_ARGS__)

extern typeof(NtYieldExecution) *const __imp_NtYieldExecution __msabi;
#endif /* ShouldUseMsabiAttribute() */
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/ntdllimport.h */

/*-*- mode:unix-assembly; indent-tabs-mode:t; tab-width:8; coding:utf-8     -*-│
│vi: set et ft=asm ts=8 tw=8 fenc=utf-8                                     :vi│
╞══════════════════════════════════════════════════════════════════════════════╡
│ Copyright 2020 Justine Alexandra Roberts Tunney                              │
│                                                                              │
│ Permission to use, copy, modify, and/or distribute this software for         │
│ any purpose with or without fee is hereby granted, provided that the         │
│ above copyright notice and this permission notice appear in all copies.      │
│                                                                              │
│ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL                │
│ WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED                │
│ WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE             │
│ AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL         │
│ DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR        │
│ PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER               │
│ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR             │
│ PERFORMANCE OF THIS SOFTWARE.                                                │
╚─────────────────────────────────────────────────────────────────────────────*/
#define COSMOPOLITAN_LIBC_NT_NTDLLIMPORT_H_


/*!BEGIN ape/relocations.h */

#define COSMOPOLITAN_APE_RELOCATIONS_H_
/*─────────────────────────────────────────────────────────────────────────────╗
│ αcτµαlly pδrταblε εxεcµταblε § relocations                                   │
╚──────────────────────────────────────────────────────────────────────────────╝
  One of the things αcτµαlly pδrταblε εxεcµταblε does a good job
  abstracting, is how a program needs to exist at three addresses
  simultaneously during the early stages of the loading process.

  By default, the linker calculates all symbols using virtual addresses.
  In some cases it's necessary to use addend macros that change virtual
  addresses into the other two types: physical and real. */

#define IMAGE_BASE_REAL 0x2000

#ifndef IMAGE_BASE_VIRTUAL
#define IMAGE_BASE_VIRTUAL 0x400000
#endif

#ifndef IMAGE_BASE_PHYSICAL
#define IMAGE_BASE_PHYSICAL 0x100000
#endif

/**
 * Returns Relative Virtual Address.
 */
#define RVA(x) ((x) - (IMAGE_BASE_VIRTUAL))

/**
 * Adjusts virtual address so it's relative to load address.
 */
#define PHYSICAL(x) ((x) - (IMAGE_BASE_VIRTUAL - IMAGE_BASE_PHYSICAL))

/**
 * Makes high-entropy read-only addresses relocatable in real mode.
 */
#define REAL(x) ((x) - (IMAGE_BASE_VIRTUAL - IMAGE_BASE_REAL))

#if IMAGE_BASE_VIRTUAL % 0x200000 != 0
#error "IMAGE_BASE_VIRTUAL must be 2mb aligned"
#endif
#if IMAGE_BASE_PHYSICAL % 0x1000 != 0
#error "IMAGE_BASE_PHYSICAL must be 4kb aligned"
#endif
#if IMAGE_BASE_REAL % 0x1000 != 0
#error "IMAGE_BASE_REAL must be 4kb aligned"
#endif

#ifdef __ASSEMBLER__
/* clang-format off */

.macro	.ntimp	fn:req
	yoink	_init_ntdll
	.initbss 202,_init_ntdll.\fn
__imp_\fn:
	.quad	0
	.endobj	__imp_\fn,globl,hidden
	.previous
	.initro 202,_init_ntdll.2.\fn
	.quad	RVA(.L\fn)
	.previous
	.section .rodata.str1.1,"aSM",@progbits,1
.L\fn:
	.asciz	"\fn"
	.previous
.endm

/* clang-format on */
#endif /* __ASSEMBLER__ */


/*!BEGIN libc/nt/paint.h */

#define COSMOPOLITAN_LIBC_NT_PAINT_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § new technology » cpu graphics                             ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

int64_t BeginPaint(int64_t hWnd, struct NtPaintStruct *lpPaint);
int32_t EndPaint(int64_t hWnd, const struct NtPaintStruct *lpPaint);
int32_t BitBlt(int64_t hdc, int x, int y, int cx, int cy, int64_t hdcSrc,
               int x1, int y1, uint32_t rop);
int32_t GetClientRect(int64_t hWnd, struct NtRect *lpRect);
int32_t GetWindowRect(int64_t hWnd, struct NtRect *lpRect);
int32_t SetBkMode(int64_t hdc, int mode);
uint32_t SetTextColor(int64_t hdc, uint32_t color);
uint32_t SetTextAlign(int64_t hdc, uint32_t align);
int32_t SetTextJustification(int64_t hdc, int extra, int count);
int32_t DrawText(int64_t hdc, const char16_t *lpchText, int cchText,
                 struct NtRect *lprc, uint32_t format);
int32_t DrawTextEx(int64_t hdc, char16_t *lpchText, int cchText,
                   struct NtRect *lprc, uint32_t format,
                   struct NtDrawTextParams *lpdtp);
int32_t FillRect(int64_t hDC, const struct NtRect *lpRC, int64_t hBrush);
uint32_t GetPixel(int64_t hdc, int x, int y);
uint32_t SetPixel(int64_t hdc, int x, int y, uint32_t color);
bool32 RedrawWindow(int64_t hWnd, const struct NtRect *opt_lprcUpdate,
                    int64_t opt_hrgnUpdate, uint32_t rdwFlags);
int64_t CreateCompatibleDC(int64_t hdc);
int64_t CreateCompatibleBitmap(int64_t hdc, int cx, int cy);
int64_t SelectObject(int64_t hdc, int64_t h);
bool32 DeleteObject(int64_t ho);
bool32 DeleteDC(int64_t hdc);
int SaveDC(int64_t hdc);
bool32 RestoreDC(int64_t hdc, int nSavedDC);

#if ShouldUseMsabiAttribute()


/*!BEGIN libc/nt/thunk/paint.inc */

#define SetPixel(...) __imp_SetPixel(__VA_ARGS__)
#define GetPixel(...) __imp_GetPixel(__VA_ARGS__)

extern typeof(SetPixel) *const __imp_SetPixel __msabi;
extern typeof(GetPixel) *const __imp_GetPixel __msabi;
#endif /* ShouldUseMsabiAttribute() */
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/privilege.h */

#define COSMOPOLITAN_LIBC_NT_PRIVILEGE_H_
/*                            ░░░░
                       ▒▒▒░░░▒▒▒▒▒▒▒▓▓▓░
                      ▒▒▒▒░░░▒▒▒▒▒▒▓▓▓▓▓▓░
                     ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓░
                     ▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   ▓▓▓▓▓▓▒        ▒▒▒▓▓█
                    ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                   ░▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   █▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                   ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓░  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                  ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▒
                  ▒▒▒▒▓▓      ▓▒▒▓▓▓▓   ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                                   ▒▓  ▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓
                  ░░░░░░░░░░░▒▒▒▒      ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                ▒▒░░░░░░░░░░▒▒▒▒▒▓▓▓     ▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
               ░▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓░      ░▓███▓
               ▒▒░░░░░░░░░░▒▒▒▒▒▓▓░  ▒▓▓▓▒▒▒         ░▒▒▒▓   ████████████
              ▒▒░░░░░░░░░░░▒▒▒▒▒▓▓  ▒▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒░           ░███
              ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓            ███
             ▒▒░░░░░░░░░░▒▒▒▒▒▒▓▓  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒            ▓██
             ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒▓           ▓██
            ▒▒░░░▒▒▒░░░▒▒░▒▒▒▓▓▒  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒           ███
                            ░▒▓  ░▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓          ▓██
╔────────────────────────────────────────────────────────────────▀▀▀─────────│─╗
│ cosmopolitan § new technology » check your privilege                     ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#define kNtSePrivilegeEnabledByDefault 0x00000001u
#define kNtSePrivilegeEnabled          0x00000002u
#define kNtSePrivilegeRemoved          0x00000004u
#define kNtSePrivilegeUsedForAccess    0x80000000u

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

bool32 LookupPrivilegeValue(const char16_t *opt_lpSystemName,
                            const char16_t *lpName, struct NtLuid *out_lpLuid);

bool32 AdjustTokenPrivileges(int64_t TokenHandle, bool32 DisableAllPrivileges,
                             const struct NtTokenPrivileges *opt_NewState,
                             uint32_t BufferLength,
                             struct NtTokenPrivileges *opt_out_PreviousState,
                             uint32_t *opt_out_ReturnLength);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/process.h */

#define COSMOPOLITAN_LIBC_NT_PROCESS_H_


/*!BEGIN libc/nt/startupinfo.h */

#define COSMOPOLITAN_LIBC_NT_NTSTARTUPINFO_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void GetStartupInfo(struct NtStartupInfo *lpStartupInfo);

bool32 InitializeProcThreadAttributeList(
    struct NtProcThreadAttributeList *opt_inout_lpAttributeList,
    uint32_t dwAttributeCount, uint32_t reserved_dwFlags, size_t *inout_lpSize)
    paramsnonnull((4));
bool32 UpdateProcThreadAttribute(
    struct NtProcThreadAttributeList *inout_lpAttributeList, uint32_t dwFlags,
    const uint32_t *Attribute, const void *lpValue, size_t cbSize,
    void *reserved_lpPreviousValue, size_t *reserved_lpReturnSize)
    paramsnonnull((1, 3, 4));
void DeleteProcThreadAttributeList(
    struct NtProcThreadAttributeList *inout_lpAttributeList) paramsnonnull();

#if ShouldUseMsabiAttribute()


/*!BEGIN libc/nt/thunk/startupinfo.inc */

#define GetStartupInfo(...) __imp_GetStartupInfoW(__VA_ARGS__)

extern typeof(GetStartupInfo) *const __imp_GetStartupInfoW __msabi;
#endif /* ShouldUseMsabiAttribute() */
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
/*                            ░░░░
                       ▒▒▒░░░▒▒▒▒▒▒▒▓▓▓░
                      ▒▒▒▒░░░▒▒▒▒▒▒▓▓▓▓▓▓░
                     ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓░
                     ▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   ▓▓▓▓▓▓▒        ▒▒▒▓▓█
                    ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                   ░▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   █▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                   ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓░  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                  ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▒
                  ▒▒▒▒▓▓      ▓▒▒▓▓▓▓   ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                                   ▒▓  ▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓
                  ░░░░░░░░░░░▒▒▒▒      ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                ▒▒░░░░░░░░░░▒▒▒▒▒▓▓▓     ▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
               ░▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓░      ░▓███▓
               ▒▒░░░░░░░░░░▒▒▒▒▒▓▓░  ▒▓▓▓▒▒▒         ░▒▒▒▓   ████████████
              ▒▒░░░░░░░░░░░▒▒▒▒▒▓▓  ▒▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒░           ░███
              ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓            ███
             ▒▒░░░░░░░░░░▒▒▒▒▒▒▓▓  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒            ▓██
             ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒▓           ▓██
            ▒▒░░░▒▒▒░░░▒▒░▒▒▒▓▓▒  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒           ███
                            ░▒▓  ░▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓          ▓██
╔────────────────────────────────────────────────────────────────▀▀▀─────────│─╗
│ cosmopolitan § new technology » processes                                ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

bool32 CreateProcess(const char16_t *opt_lpApplicationName,
                     char16_t *lpCommandLine,
                     struct NtSecurityAttributes *opt_lpProcessAttributes,
                     struct NtSecurityAttributes *opt_lpThreadAttributes,
                     bool32 bInheritHandles, uint32_t dwCreationFlags,
                     void *opt_lpEnvironment,
                     const char16_t *opt_lpCurrentDirectory,
                     const struct NtStartupInfo *lpStartupInfo,
                     struct NtProcessInformation *opt_out_lpProcessInformation)
    paramsnonnull((2, 9));

uint32_t GetThreadId(int64_t hThread);   /* cf. NT_TID */
uint32_t GetProcessId(int64_t hProcess); /* cf. NT_PID */
void SetLastError(uint32_t dwErrCode);
uint32_t FormatMessage(uint32_t dwFlags, const void *lpSource,
                       uint32_t dwMessageId, uint32_t dwLanguageId,
                       char16_t *lpBuffer, uint32_t nSize, va_list *Arguments);
int64_t OpenProcess(uint32_t dwDesiredAccess, bool32 bInheritHandle,
                    uint32_t dwProcessId);
uint32_t GetCurrentProcessId(void); /* %gs:0x40 */
uint32_t GetEnvironmentVariable(const char16_t *lpName, char16_t *lpBuffer,
                                uint32_t nSize);
uint32_t SetEnvironmentVariable(const char16_t *lpName, char16_t *lpValue);
int32_t SetEnvironmentStrings(char16_t *NewEnvironment);
bool32 GetProcessAffinityMask(int64_t hProcess,
                              uintptr_t *lpProcessAffinityMask,
                              uintptr_t *lpSystemAffinityMask);
uint64_t /*bool32*/ SetProcessAffinityMask(int64_t hProcess,
                                           uintptr_t dwProcessAffinityMask);

/* e.g. kNtAboveNormalPriorityClass, kNtHighPriorityClass */
uint32_t GetPriorityClass(int64_t hProcess);
bool32 SetPriorityClass(int64_t hProcess, uint32_t dwPriorityClass);
bool32 SetProcessPriorityBoost(int64_t hProcess, bool32 bDisablePriorityBoost);
bool32 GetProcessPriorityBoost(int64_t hProcess, bool32 *pDisablePriorityBoost);

#if ShouldUseMsabiAttribute()


/*!BEGIN libc/nt/thunk/process.inc */

#define GetEnvironmentVariable(...) __imp_GetEnvironmentVariableW(__VA_ARGS__)
extern typeof(GetEnvironmentVariable) *const
    __imp_GetEnvironmentVariableW __msabi;

#define SetEnvironmentVariable(...) __imp_SetEnvironmentVariableW(__VA_ARGS__)
extern typeof(SetEnvironmentVariable) *const
    __imp_SetEnvironmentVariableW __msabi;

#define GetPriorityClass(...) __imp_GetPriorityClass(__VA_ARGS__)
extern typeof(GetPriorityClass) *const __imp_GetPriorityClass __msabi;

#define SetPriorityClass(...) __imp_SetPriorityClass(__VA_ARGS__)
extern typeof(SetPriorityClass) *const __imp_SetPriorityClass __msabi;

#define GetCurrentProcessId(...) __imp_GetCurrentProcessId(__VA_ARGS__)
extern typeof(GetCurrentProcessId) *const __imp_GetCurrentProcessId __msabi;

#define CreateProcess(...) __imp_CreateProcessW(__VA_ARGS__)
extern typeof(CreateProcess) *const __imp_CreateProcessW __msabi;
#endif /* ShouldUseMsabiAttribute() */
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/registry.h */

#define COSMOPOLITAN_LIBC_NT_REGISTRY_H_
/*                            ░░░░
                       ▒▒▒░░░▒▒▒▒▒▒▒▓▓▓░
                      ▒▒▒▒░░░▒▒▒▒▒▒▓▓▓▓▓▓░
                     ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓░
                     ▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   ▓▓▓▓▓▓▒        ▒▒▒▓▓█
                    ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                   ░▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   █▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                   ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓░  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                  ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▒
                  ▒▒▒▒▓▓      ▓▒▒▓▓▓▓   ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                                   ▒▓  ▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓
                  ░░░░░░░░░░░▒▒▒▒      ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                ▒▒░░░░░░░░░░▒▒▒▒▒▓▓▓     ▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
               ░▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓░      ░▓███▓
               ▒▒░░░░░░░░░░▒▒▒▒▒▓▓░  ▒▓▓▓▒▒▒         ░▒▒▒▓   ████████████
              ▒▒░░░░░░░░░░░▒▒▒▒▒▓▓  ▒▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒░           ░███
              ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓            ███
             ▒▒░░░░░░░░░░▒▒▒▒▒▒▓▓  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒            ▓██
             ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒▓           ▓██
            ▒▒░░░▒▒▒░░░▒▒░▒▒▒▓▓▒  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒           ███
                            ░▒▓  ░▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓          ▓██
╔────────────────────────────────────────────────────────────────▀▀▀─────────│─╗
│ cosmopolitan § new technology » registry                                 ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#define kNtMaxKeyNameChars   255
#define kNtMaxValueNameChars 16383
#define kNtMaxValueBytes     0x100000

#define kNtHkeyClassesRoot              0x80000000l
#define kNtHkeyCurrentUser              0x80000001l
#define kNtHkeyLocalMachine             0x80000002l
#define kNtHkeyUsers                    0x80000003l
#define kNtHkeyPerformanceData          0x80000004l
#define kNtHkeyPerformanceText          0x80000050l
#define kNtHkeyPerformanceNlstext       0x80000060l
#define kNtHkeyCurrentConfig            0x80000005l
#define kNtHkeyDynData                  0x80000006l
#define kNtHkeyCurrentUserLocalSettings 0x80000007l

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

int RegOpenKey(int64_t hKey, const char16_t *opt_lpSubKey,
               int64_t *out_phkResult) paramsnonnull((3));
int RegOpenKeyEx(int64_t hKey, const char16_t *opt_lpSubKey,
                 uint32_t opt_ulOptions, int samDesired, int64_t *out_phkResult)
    paramsnonnull((5));
int RegCloseKey(int64_t hKey);

int RegGetValue(int64_t hkey, const char16_t *opt_lpSubKey,
                const char16_t *opt_lpValue, unsigned dwFlags, int *opt_pdwType,
                void *opt_out_pvData, uint32_t *opt_inout_pcbDataBytes);
int RegSetValue(int64_t hKey, const char16_t *lpSubKey, int dwType,
                const char16_t *lpData, uint32_t cbData);
int RegSetValueEx(int64_t hKey, const char16_t *lpValueName, uint32_t Reserved,
                  int dwType, const unsigned char *lpData, uint32_t cbData);

int RegQueryInfoKey(int64_t hKey, char16_t *opt_out_lpClass,
                    uint32_t *opt_inout_lpClassLen, uint32_t *lpReserved,
                    uint32_t *opt_out_lpcSubKeys,
                    uint32_t *opt_out_lpcbMaxSubKeyBytes,
                    uint32_t *opt_out_lpcbMaxClassBytes,
                    uint32_t *opt_out_lpcValues,
                    uint32_t *opt_out_lpcbMaxValueNameBytes,
                    uint32_t *opt_out_lpcbMaxValueBytes,
                    uint32_t *opt_out_lpcbSecurityDescriptorBytes,
                    struct NtFileTime *opt_out_lpftLastWriteTime);
int RegEnumKey(int64_t hKey, uint32_t dwIndex, char16_t *opt_lpName,
               uint32_t NameLen);
int RegEnumKeyEx(int64_t hKey, uint32_t dwIndex, char16_t *out_lpName,
                 uint32_t *inout_lpcchName, uint32_t *lpReserved,
                 char16_t *opt_out_lpClass, uint32_t *opt_inout_lpcchClassLen,
                 struct NtFileTime *opt_out_lpftLastWriteTime);

int RegEnumValue(int64_t hKey, uint32_t dwIndex, char16_t *lpValueName,
                 uint32_t *lpValueNameLen, uint32_t *lpReserved,
                 int *opt_out_lpType, unsigned char *opt_out_lpData,
                 uint32_t *opt_inout_lpcbDataBytes);
int RegQueryValue(int64_t hKey, const char16_t *opt_lpSubKey,
                  char16_t *opt_out_lpData, int32_t *opt_inout_lpcbDataBytes);
int RegQueryValueEx(int64_t hKey, const char16_t *opt_lpValueName,
                    uint32_t *lpReserved, int *opt_out_lpType,
                    unsigned char *opt_out_lpData,
                    uint32_t *opt_inout_lpcbDataBytes);

int RegOverridePredefKey(int64_t hKey, int64_t hNewHKey);
int RegOpenUserClassesRoot(void *hToken, uint32_t dwOptions, int samDesired,
                           int64_t *phkResult);
int RegOpenCurrentUser(int samDesired, int64_t *phkResult);
int RegDisablePredefinedCache();
int RegConnectRegistry(const char16_t *lpMachineName, int64_t hKey,
                       int64_t *phkResult);
int RegConnectRegistryEx(const char16_t *lpMachineName, int64_t hKey,
                         uint32_t Flags, int64_t *phkResult);
int RegCreateKey(int64_t hKey, const char16_t *lpSubKey, int64_t *phkResult);
int RegCreateKeyEx(int64_t hKey, const char16_t *lpSubKey, uint32_t Reserved,
                   int16_t *lpClass, uint32_t dwOptions, int samDesired,
                   struct NtSecurityAttributes *lpSecurityAttributes,
                   int64_t *phkResult, uint32_t *lpdwDisposition);
int RegDeleteKey(int64_t hKey, const char16_t *lpSubKey);
int RegDeleteKeyEx(int64_t hKey, const char16_t *lpSubKey, int samDesired,
                   uint32_t Reserved);
int RegDeleteTree(int64_t hKey, const char16_t *opt_lpSubKey);
int RegDisableReflectionKey(int64_t hBase);
int RegEnableReflectionKey(int64_t hBase);
int RegQueryReflectionKey(int64_t hBase, bool32 *bIsReflectionDisabled);
int RegDeleteValue(int64_t hKey, const char16_t *lpValueName);
int RegFlushKey(int64_t hKey);
int RegGetKeySecurity(int64_t hKey, uint32_t SecurityInformation,
                      void *pSecurityDescriptor,
                      uint32_t *lpcbSecurityDescriptorBytes);
int RegLoadKey(int64_t hKey, const char16_t *lpSubKey, const char16_t *lpFile);
int RegNotifyChangeKeyValue(int64_t hKey, bool32 bWatchSubtree,
                            uint32_t dwNotifyFilter, void *hEvent,
                            int fAsynchronous);
int RegQueryMultipleValues(int64_t hKey, struct NtValent *inout_val_list,
                           uint32_t num_vals, int16_t *out_lpValueBuf,
                           uint32_t *inout_ldwTotsize) paramsnonnull();
int RegReplaceKey(int64_t hKey, const char16_t *lpSubKey,
                  const char16_t *lpNewFile, const char16_t *lpOldFile);
int RegRestoreKey(int64_t hKey, const char16_t *lpFile, uint32_t dwFlags);
int RegSaveKey(int64_t hKey, const char16_t *lpFile,
               struct NtSecurityAttributes *lpSecurityAttributes);
int RegSetKeySecurity(int64_t hKey, uint32_t SecurityInformation,
                      void *pSecurityDescriptor);
int RegUnLoadKey(int64_t hKey, const char16_t *lpSubKey);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/runtime.h */

#define COSMOPOLITAN_LIBC_NT_RUNTIME_H_

/**
 * @fileoverview NT Obligatory Runtime Functions.
 *
 * These functions are placed in their own file because they're (a)
 * abstracted by the Cosmopolitan runtime; and (b) it helps GCC avoid
 * bloating binaries with debug information the user doesn't need.
 */

#define kNtCpUtf8             65001
#define kNtInvalidHandleValue -1L
#define kNtStdInputHandle     -10L
#define kNtStdOutputHandle    -11L
#define kNtStdErrorHandle     -12L

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

char16_t *GetCommandLine(void) nosideeffect;
char16_t *GetEnvironmentStrings(void) nodiscard;
bool32 FreeEnvironmentStrings(char16_t *) paramsnonnull();
bool32 ReadFile(int64_t hFile, void *lpBuffer, uint32_t nNumberOfBytesToRead,
                uint32_t *lpNumberOfBytesRead,
                struct NtOverlapped *opt_lpOverlapped);
bool32 WriteFile(int64_t hFile, const void *lpBuffer,
                 uint32_t nNumberOfBytesToWrite,
                 uint32_t *lpNumberOfBytesWritten,
                 struct NtOverlapped *opt_lpOverlapped);
bool32 TerminateProcess(int64_t hProcess, uint32_t uExitCode);
int64_t GetCurrentProcess(void) pureconst;
void ExitProcess(uint32_t uExitCode) wontreturn;
uint32_t GetLastError(void) nosideeffect;
bool32 CloseHandle(int64_t hObject) nothrow nocallback;
intptr_t GetStdHandle(int64_t nStdHandle) nosideeffect;
bool32 SetStdHandle(int64_t nStdHandle, int64_t hHandle);
bool32 SetDefaultDllDirectories(unsigned dirflags);

#if ShouldUseMsabiAttribute()


/*!BEGIN libc/nt/thunk/runtime.inc */

#define FreeEnvironmentStrings(...) __imp_FreeEnvironmentStringsW(__VA_ARGS__)
extern typeof(FreeEnvironmentStrings) *const
    __imp_FreeEnvironmentStringsW __msabi;

#define GetCommandLine(...) __imp_GetCommandLineW(__VA_ARGS__)
extern typeof(GetCommandLine) *const __imp_GetCommandLineW __msabi;

#define GetEnvironmentStrings(...) __imp_GetEnvironmentStringsW(__VA_ARGS__)
extern typeof(GetEnvironmentStrings) *const
    __imp_GetEnvironmentStringsW __msabi;

#define GetStdHandle(...) __imp_GetStdHandle(__VA_ARGS__)
extern typeof(GetStdHandle) *const __imp_GetStdHandle __msabi;

#define SetStdHandle(...) __imp_SetStdHandle(__VA_ARGS__)
extern typeof(SetStdHandle) *const __imp_SetStdHandle __msabi;

#define ReadFile(...) __imp_ReadFile(__VA_ARGS__)
extern typeof(ReadFile) *const __imp_ReadFile __msabi;

#define WriteFile(...) __imp_WriteFile(__VA_ARGS__)
extern typeof(WriteFile) *const __imp_WriteFile __msabi;

#define SetDefaultDllDirectories(...) \
  __imp_SetDefaultDllDirectories(__VA_ARGS__)
extern typeof(SetDefaultDllDirectories) *const
    __imp_SetDefaultDllDirectories __msabi;

#define GetCurrentProcess(...) __imp_GetCurrentProcess(__VA_ARGS__)
extern typeof(GetCurrentProcess) *const __imp_GetCurrentProcess __msabi;
#endif /* ShouldUseMsabiAttribute() */
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/signals.h */

#define COSMOPOLITAN_LIBC_NT_EXCEPTIONS_H_
/*                            ░░░░
                       ▒▒▒░░░▒▒▒▒▒▒▒▓▓▓░
                      ▒▒▒▒░░░▒▒▒▒▒▒▓▓▓▓▓▓░
                     ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓░
                     ▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   ▓▓▓▓▓▓▒        ▒▒▒▓▓█
                    ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                   ░▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   █▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                   ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓░  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                  ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▒
                  ▒▒▒▒▓▓      ▓▒▒▓▓▓▓   ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                                   ▒▓  ▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓
                  ░░░░░░░░░░░▒▒▒▒      ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                ▒▒░░░░░░░░░░▒▒▒▒▒▓▓▓     ▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
               ░▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓░      ░▓███▓
               ▒▒░░░░░░░░░░▒▒▒▒▒▓▓░  ▒▓▓▓▒▒▒         ░▒▒▒▓   ████████████
              ▒▒░░░░░░░░░░░▒▒▒▒▒▓▓  ▒▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒░           ░███
              ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓            ███
             ▒▒░░░░░░░░░░▒▒▒▒▒▒▓▓  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒            ▓██
             ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒▓           ▓██
            ▒▒░░░▒▒▒░░░▒▒░▒▒▒▓▓▒  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒           ███
                            ░▒▓  ░▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓          ▓██
╔────────────────────────────────────────────────────────────────▀▀▀─────────│─╗
│ cosmopolitan § new technology » signals                                  ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

typedef int (*NtTopLevelExceptionFilter)(const struct NtExceptionPointers *);
typedef int32_t (*NtVectoredExceptionHandler)(struct NtExceptionPointers *);

int SetErrorMode(int uMode);

int64_t AddVectoredExceptionHandler(uint32_t First,
                                    NtVectoredExceptionHandler pHandler);
int64_t AddVectoredContinueHandler(uint32_t First,
                                   NtVectoredExceptionHandler pHandler);

uint32_t RemoveVectoredExceptionHandler(int64_t hHandle);
uint32_t RemoveVectoredContinueHandler(int64_t hHandle);

NtTopLevelExceptionFilter SetUnhandledExceptionFilter(
    NtTopLevelExceptionFilter opt_lpTopLevelExceptionFilter);

#if ShouldUseMsabiAttribute()


/*!BEGIN libc/nt/thunk/signals.inc */

#define SetErrorMode(...) __imp_SetErrorMode(__VA_ARGS__)
#define AddVectoredExceptionHandler(...) \
  __imp_AddVectoredExceptionHandler(__VA_ARGS__)
#define AddVectoredContinueHandler(...) \
  __imp_AddVectoredContinueHandler(__VA_ARGS__)
#define RemoveVectoredExceptionHandler(...) \
  __imp_RemoveVectoredExceptionHandler(__VA_ARGS__)
#define RemoveVectoredContinueHandler(...) \
  __imp_RemoveVectoredContinueHandler(__VA_ARGS__)
#define SetUnhandledExceptionFilter(...) \
  __imp_SetUnhandledExceptionFilter(__VA_ARGS__)

extern typeof(SetErrorMode) *const __imp_SetErrorMode __msabi;
extern typeof(AddVectoredExceptionHandler) *const
    __imp_AddVectoredExceptionHandler __msabi;
extern typeof(AddVectoredContinueHandler) *const
    __imp_AddVectoredContinueHandler __msabi;
extern typeof(RemoveVectoredExceptionHandler) *const
    __imp_RemoveVectoredExceptionHandler __msabi;
extern typeof(RemoveVectoredContinueHandler) *const
    __imp_RemoveVectoredContinueHandler __msabi;
extern typeof(SetUnhandledExceptionFilter) *const
    __imp_SetUnhandledExceptionFilter __msabi;
#endif /* ShouldUseMsabiAttribute() */
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/synchronization.h */

#define COSMOPOLITAN_LIBC_NT_SYNCHRONIZATION_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/*                            ░░░░
                       ▒▒▒░░░▒▒▒▒▒▒▒▓▓▓░
                      ▒▒▒▒░░░▒▒▒▒▒▒▓▓▓▓▓▓░
                     ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓░
                     ▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   ▓▓▓▓▓▓▒        ▒▒▒▓▓█
                    ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                   ░▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   █▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                   ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓░  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                  ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▒
                  ▒▒▒▒▓▓      ▓▒▒▓▓▓▓   ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                                   ▒▓  ▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓
                  ░░░░░░░░░░░▒▒▒▒      ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                ▒▒░░░░░░░░░░▒▒▒▒▒▓▓▓     ▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
               ░▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓░      ░▓███▓
               ▒▒░░░░░░░░░░▒▒▒▒▒▓▓░  ▒▓▓▓▒▒▒         ░▒▒▒▓   ████████████
              ▒▒░░░░░░░░░░░▒▒▒▒▒▓▓  ▒▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒░           ░███
              ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓            ███
             ▒▒░░░░░░░░░░▒▒▒▒▒▒▓▓  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒            ▓██
             ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒▓           ▓██
            ▒▒░░░▒▒▒░░░▒▒░▒▒▒▓▓▒  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒           ███
                            ░▒▓  ░▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓          ▓██
╔────────────────────────────────────────────────────────────────▀▀▀─────────│─╗
│ cosmopolitan § new technology » synchronization                          ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#define InterlockedAdd(PTR, VAL)                                           \
  ({                                                                       \
    typeof(*(PTR)) Res;                                                    \
    typeof(Res) Val = (VAL);                                               \
    asm volatile("lock xadd\t%0,%1" : "=r"(Res), "+m"(*(PTR)) : "0"(Val)); \
    Res + Val;                                                             \
  })

#define InterlockedExchange(PTR, VAL)                      \
  ({                                                       \
    typeof(*(PTR)) Res = (VAL);                            \
    asm volatile("xchg\t%0,%1" : "+r"(Res), "+m"(*(PTR))); \
    Res;                                                   \
  })

typedef void (*NtTimerapcroutine)(void *lpArgToCompletionRoutine,
                                  uint32_t dwTimerLowValue,
                                  uint32_t dwTimerHighValue);
typedef void (*NtWaitOrTimerCallback)(void *lpParameter,
                                      bool32 TimerOrWaitFired);

void Sleep(uint32_t dwMilliseconds);
uint32_t SleepEx(uint32_t dwMilliseconds, bool32 bAlertable);

void GetSystemTime(struct NtSystemTime *lpSystemTime);
bool32 SystemTimeToFileTime(const struct NtSystemTime *lpSystemTime,
                            struct NtFileTime *lpFileTime);
void GetSystemTimeAsFileTime(struct NtFileTime *);        /* win8+ */
void GetSystemTimePreciseAsFileTime(struct NtFileTime *); /* win8+ */

uint32_t WaitForSingleObject(int64_t hHandle, uint32_t dwMilliseconds);
uint32_t WaitForMultipleObjects(uint32_t nCount, const int64_t *lpHandles,
                                bool32 bWaitAll, uint32_t dwMilliseconds);
uint32_t WaitForSingleObjectEx(int64_t hHandle, uint32_t dwMilliseconds,
                               bool32 bAlertable);
uint32_t WaitForMultipleObjectsEx(unsigned int nCount, const int64_t *lpHandles,
                                  bool32 bWaitAll, uint32_t dwMilliseconds,
                                  bool32 bAlertable);
bool32 RegisterWaitForSingleObject(int64_t *phNewWaitObject, int64_t hObject,
                                   NtWaitOrTimerCallback Callback,
                                   void *Context, uint32_t dwMilliseconds,
                                   uint32_t dwFlags);

int64_t CreateWaitableTimer(struct NtSecurityAttributes *lpTimerAttributes,
                            bool32 bManualReset, const char16_t *lpTimerName);
bool32 SetWaitableTimer(int64_t hTimer, const int64_t *lpDueTimeAsFtOrNegRela,
                        int32_t opt_lPeriodMs, NtTimerapcroutine opt_callback,
                        void *lpArgToCallback, bool32 fUnsleepSystem);

int32_t SetEvent(int64_t hEvent);
int32_t ResetEvent(int64_t hEvent);
int32_t PulseEvent(int64_t hEvent);

int32_t ReleaseMutex(int64_t hMutex);
int32_t ReleaseSemaphore(int64_t hSemaphore, int32_t lReleaseCount,
                         int *lpPreviousCount);

void InitializeCriticalSection(struct NtCriticalSection *lpCriticalSection);
void EnterCriticalSection(struct NtCriticalSection *lpCriticalSection);
void LeaveCriticalSection(struct NtCriticalSection *lpCriticalSection);
int32_t TryEnterCriticalSection(struct NtCriticalSection *lpCriticalSection);
void DeleteCriticalSection(struct NtCriticalSection *lpCriticalSection);
int32_t InitializeCriticalSectionAndSpinCount(
    struct NtCriticalSection *lpCriticalSection, uint32_t dwSpinCount);
uint32_t SetCriticalSectionSpinCount(
    struct NtCriticalSection *lpCriticalSection, uint32_t dwSpinCount);

void InitializeSRWLock(intptr_t *);
void AcquireSRWLockExclusive(intptr_t *);
void AcquireSRWLockShared(intptr_t *);
void ReleaseSRWLockExclusive(intptr_t *);
void ReleaseSRWLockShared(intptr_t *);
void TryAcquireSRWLockExclusive(intptr_t *);
void TryAcquireSRWLockShared(intptr_t *);

uint64_t GetTickCount64(void);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/systeminfo.h */

#define COSMOPOLITAN_LIBC_NT_INFO_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void GetSystemInfo(struct NtSystemInfo *lpSystemInfo);
uint32_t GetSystemDirectory(char16_t *lpBuffer, uint32_t uSize);
uint32_t GetSystemDirectoryA(char *lpBuffer, uint32_t uSize);
uint32_t GetWindowsDirectory(char16_t *lpBuffer, uint32_t uSize);
uint32_t GetTempPath(uint32_t uSize, char16_t *lpBuffer);

bool32 GetComputerNameEx(/* enum/computernameformat.h */ int NameType,
                         char16_t *opt_lpBuffer, uint32_t *nSize);

#if ShouldUseMsabiAttribute()


/*!BEGIN libc/nt/thunk/systeminfo.inc */

#define GetSystemInfo(...) __imp_GetSystemInfo(__VA_ARGS__)
#define GetTempPath(...) __imp_GetTempPathW(__VA_ARGS__)

extern typeof(GetSystemInfo) *const __imp_GetSystemInfo __msabi;
extern typeof(GetTempPath) *const __imp_GetTempPathW __msabi;
#endif /* ShouldUseMsabiAttribute() */
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/thread.h */

#define COSMOPOLITAN_LIBC_NT_THREADS_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/*                            ░░░░
                       ▒▒▒░░░▒▒▒▒▒▒▒▓▓▓░
                      ▒▒▒▒░░░▒▒▒▒▒▒▓▓▓▓▓▓░
                     ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓░
                     ▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   ▓▓▓▓▓▓▒        ▒▒▒▓▓█
                    ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                   ░▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   █▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                   ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓░  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                  ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▒
                  ▒▒▒▒▓▓      ▓▒▒▓▓▓▓   ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                                   ▒▓  ▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓
                  ░░░░░░░░░░░▒▒▒▒      ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                ▒▒░░░░░░░░░░▒▒▒▒▒▓▓▓     ▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
               ░▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓░      ░▓███▓
               ▒▒░░░░░░░░░░▒▒▒▒▒▓▓░  ▒▓▓▓▒▒▒         ░▒▒▒▓   ████████████
              ▒▒░░░░░░░░░░░▒▒▒▒▒▓▓  ▒▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒░           ░███
              ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓            ███
             ▒▒░░░░░░░░░░▒▒▒▒▒▒▓▓  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒            ▓██
             ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒▓           ▓██
            ▒▒░░░▒▒▒░░░▒▒░▒▒▒▓▓▒  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒           ███
                            ░▒▓  ░▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓          ▓██
╔────────────────────────────────────────────────────────────────▀▀▀─────────│─╗
│ cosmopolitan § new technology » threads                                  ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

typedef uint32_t (*NtThreadStartRoutine)(void *lpParameter);

int64_t CreateThread(struct NtSecurityAttributes *lpThreadAttributes,
                     size_t dwStackSize, NtThreadStartRoutine lpStartAddress,
                     void *lpParameter, uint32_t dwCreationFlags,
                     uint32_t *opt_lpThreadId);

void ExitThread(uint32_t dwExitCode) wontreturn;
int64_t GetCurrentThread(void);
uint32_t GetCurrentThreadId(void);
uint64_t SetThreadAffinityMask(int64_t hThread, uintptr_t dwThreadAffinityMask);
int64_t OpenThread(uint32_t dwDesiredAccess, bool32 bInheritHandle,
                   uint32_t dwThreadId);
bool32 TerminateThread(int64_t hThread, uint32_t dwExitCode);
bool32 GetExitCodeThread(int64_t hThread, uint32_t *lpExitCode);

/* e.g. kNtThreadPriorityAboveNormal, -1u on error */
uint32_t GetThreadPriority(int64_t hThread);
bool32 SetThreadPriority(int64_t hThread, int32_t nPriority);
bool32 SetThreadPriorityBoost(int64_t hThread, bool32 bDisablePriorityBoost);
bool32 GetThreadPriorityBoost(int64_t hThread, bool32 *pDisablePriorityBoost);
bool32 GetThreadIOPendingFlag(int64_t hThread, bool32 *lpIOIsPending);

bool32 CancelSynchronousIo(int64_t hThread);
bool32 CancelIo(int64_t hFile);
bool32 CancelIoEx(int64_t hFile, struct NtOverlapped opt_lpOverlapped);

#if ShouldUseMsabiAttribute()


/*!BEGIN libc/nt/thunk/thread.inc */

#define GetCurrentThread(...)  __imp_GetCurrentThread(__VA_ARGS__)
#define GetThreadPriority(...) __imp_GetThreadPriority(__VA_ARGS__)
#define SetThreadPriority(...) __imp_SetThreadPriority(__VA_ARGS__)

extern typeof(GetCurrentThread) *const __imp_GetCurrentThread __msabi;
extern typeof(GetThreadPriority) *const __imp_GetThreadPriority __msabi;
extern typeof(SetThreadPriority) *const __imp_SetThreadPriority __msabi;
#endif /* ShouldUseMsabiAttribute() */
COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/windows.h */

#define COSMOPOLITAN_LIBC_NT_WINDOWS_H_
/*                            ░░░░
                       ▒▒▒░░░▒▒▒▒▒▒▒▓▓▓░
                      ▒▒▒▒░░░▒▒▒▒▒▒▓▓▓▓▓▓░
                     ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓░
                     ▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   ▓▓▓▓▓▓▒        ▒▒▒▓▓█
                    ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                   ░▒▒▒░░░░▒▒▒▒▒▒▓▓▓▓▓▓   █▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                   ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓░  ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
                  ▒▒▒▒░░░▒▒▒▒▒▒▒▓▓▓▓▓▓  ▒▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▒
                  ▒▒▒▒▓▓      ▓▒▒▓▓▓▓   ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                                   ▒▓  ▓▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓
                  ░░░░░░░░░░░▒▒▒▒      ▓▓▓▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓█
                ▒▒░░░░░░░░░░▒▒▒▒▒▓▓▓     ▓▓▓▓▓▒▒▒▒▒▒▒▒▒▒▓▓▓
               ░▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓░      ░▓███▓
               ▒▒░░░░░░░░░░▒▒▒▒▒▓▓░  ▒▓▓▓▒▒▒         ░▒▒▒▓   ████████████
              ▒▒░░░░░░░░░░░▒▒▒▒▒▓▓  ▒▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒░           ░███
              ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓            ███
             ▒▒░░░░░░░░░░▒▒▒▒▒▒▓▓  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒            ▓██
             ▒░░░░░░░░░░░▒▒▒▒▒▓▓   ▓▓▓▓▒▒▒▒▒▒▒▒░░░▒▒▒▒▒▓           ▓██
            ▒▒░░░▒▒▒░░░▒▒░▒▒▒▓▓▒  ▒▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▒           ███
                            ░▒▓  ░▓▓▓▓▒▒▒▒▒▒▒▒░░░░▒▒▒▒▓          ▓██
╔────────────────────────────────────────────────────────────────▀▀▀─────────│─╗
│ cosmopolitan § new technology » windows                                  ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

int64_t CreateWindowEx(uint32_t dwExStyle, const char16_t *lpClassName,
                       const char16_t *lpWindowName, uint32_t dwStyle, int X,
                       int Y, int nWidth, int nHeight, int64_t hWndParent,
                       int64_t hMenu, int64_t hInstance, int64_t lpParam);

uint16_t RegisterClass(const struct NtWndClass *lpWndClass);

int64_t DefWindowProc(int64_t hWnd, uint32_t Msg, uint64_t wParam,
                      int64_t lParam);

int32_t CloseWindow(int64_t hWnd);
int32_t DestroyWindow(int64_t hWnd);
int32_t ShowWindow(int64_t hWnd, int sw);
int32_t ShowCaret(bool32 bShow);
int32_t AnimateWindow(int64_t hWnd, uint32_t dwTime, uint32_t dwFlags);
int64_t LoadIcon(int64_t hInstance, const char16_t *lpIconName);
int32_t MoveWindow(int64_t hWnd, int X, int Y, int nWidth, int nHeight,
                   bool32 bRepaint);
int32_t BringWindowToTop(int64_t hWnd);
int32_t IsWindowVisible(int64_t hWnd);
int32_t SetWindowText(int64_t hWnd, const char16_t *lpString);
int32_t GetWindowText(int64_t hWnd, char16_t *lpString, int nMaxCount);
int32_t SetWindowPos(int64_t hWnd, int64_t hWndInsertAfter, int X, int Y,
                     int cx, int cy, uint32_t uFlags);
bool32 GetWindowPlacement(int64_t hWnd, struct NtWindowPlacement *lpwndpl);
bool32 SetWindowPlacement(int64_t hWnd,
                          const struct NtWindowPlacement *lpwndpl);

int64_t GetCursor(void);
int64_t SetCursor(int64_t hCursor);
int32_t ShowCursor(bool32 bShow);
int64_t LoadCursor(int64_t opt_hInstance, const char16_t *lpCursorNameOrIdc);

bool32 IsWindow(int64_t hWnd);
bool32 IsMenu(int64_t hMenu);
bool32 IsChild(int64_t hWndParent, int64_t hWnd);
bool32 IsZoomed(int64_t hWnd);
bool32 IsIconic(int64_t hWnd);

uintptr_t SetTimer(int64_t opt_hWnd, uintptr_t nIDEvent, uint32_t uElapseMs,
                   NtTimerProc lpTimerFunc);
int32_t KillTimer(int64_t hWnd, uintptr_t uIDEvent);

int64_t SetCapture(int64_t hWnd);
bool32 ReleaseCapture(void);
int16_t GetKeyState(int32_t nVirtKey);

int64_t CreateMenu(void);
int64_t CreatePopupMenu(void);
int64_t GetMenu(int64_t hWnd);
bool32 DestroyMenu(int64_t hMenu);
int64_t GetSystemMenu(int64_t hWnd, bool32 bRevert);
bool32 AppendMenu(int64_t hMenu, uint32_t mfFlags, uintptr_t uIDNewItem,
                  const char16_t *lpNewItem);
bool32 InsertMenu(int64_t hMenu, uint32_t uPosition, uint32_t uFlags,
                  uintptr_t uIDNewItem, const char16_t *lpNewItem);
bool32 TrackPopupMenu(int64_t hMenu, uint32_t uFlags, int32_t x, int32_t y,
                      int32_t nReserved, int64_t hWnd,
                      const struct NtRect *prcRect);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/nt/winsock.h */

#define COSMOPOLITAN_LIBC_NT_WINSOCK_H_
/* ░▓█████████████████████████████████████████████▓▒
   ░█▓░░░░░░░░░▓██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██▓▒░
   ░█▓░ ░▒▒▒▒  ▓██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██▓▒▒
   ░█▓░ ░▓▓▓▒  ▓██▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒██▓▒▒
   ░█▓░       ░▓██▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓██▓▒▒
   ░███████████████████████████████████████████████▓▒▒
   ░█▓░                                          ▒█▓▒▒
   ░█▓░                                          ▒█▓▒▒
   ░█▓░          ░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░             ▒█▓▒▒
   ░█▓░        ░▒░                 ▒█▓░          ▒█▓▒▒
   ░█▓░      ░░░░    ░░░░░░░░      ▒▓▓▓▒░        ▒█▓▒▒
   ░█▓░    ░░░░  ░░░░░▒▒▓███▓░░░░░░░░▒▓▓▓▓▒      ▒█▓▒▒
   ░█▓░   ░▒▒  ░░░░░░░▒▒████▓░░░░░░░░░░▒██▓      ▒█▓▒▒
   ░█▓░   ░▒▒  ░░░░░░░▒▒▓▓▓▓▓░░░░░░░░░▒▒██▓      ▒█▓▒▒
   ░█▓░   ░▒▒   ░░▒▒▒▒░░░░░ ░▒▒▒▒░░░░░▒▒██▓      ▒█▓▒▒
   ░█▓░   ░▒▒   ░░▒▓█▓░░░░░░░▒▓██▓░░░░▒▒██▓      ▒█▓▒▒
   ░█▓░   ░▒▒   ░░▒▓█▓░░░░░░░▒▓██▓░░░░▒▒██▓      ▒█▓▒▒
   ░█▓░   ░▒▒   ░░▒▓█▓░░░░░░░▒▓██▓░░░░▒▒██▓   ░▓█▓▒▒▒▒
   ░█▓░   ░▒▒   ░░▒▓█▓░░░░░░░▒▓██▓░░░░░▒██▓   ░████▓▒░
   ░█▓░     ░░░░░░░░▒▒░░░░░░░░░▒▒░░░▒▒▓▓▒░░    ░░▓███▓▒░
   ░█▓░      ░░░░░░░░░░░░░░░░░░░░░░▒▓▓▓▒░        ▒████▓▒░░░░░░
   ░█▓░        ░░▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒░░        ░▓▓▓▓██▒░░░░░░░░
   ░█▓░          ▒█████████████████▒  ▓█▓▒░      ▒█▓ ░█▓      ░▓▓░
   ░█▓░                              ░▓████▒░    ▒█▓▒░  ░░░░░░░  ▓█▓░
   ░█▓░                                ░▓████▒░  ░▒░  ░░░░░░░░░░░  ░█▓
   ░█▓                                    ▒███▓▒▒░  ░░░░░░░░░░░░░░░  ▒▓▓
   ░██████████████████████████████████████▓▒▓█▓░  ░░░░░░░░░░░░░░░░░░ ▒█▓
    ▒▒▒▒▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▒░ ░░░░░░░░░░░░░░░░░░░░▒█▓
         ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒██▒▒▒░░░░░░░░░░░░░░░░░░░░░▒█▓
                                          ░██▒▒▒▒▒░░░░░░░░░░░░░░░░░░░▒█▓
                                          ░▓▓▓▒▒▒▒▒▒░░░░░░░░░░░░░░░░▒▓█▓
                                            ░▓▓▓▒▒▒▒▒▒░░░░░░░░░░░▒▒▒▒▓▓▒
                                              ░██▓▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒  ░█▓
                                                 ▒█▓▒▒▒▒▒▒▒▒▒▒▒██▓▒░ ░█▓
                                                   ▒█████████████▓▒▒░  ░██▒
╔────────────────────────────────────────────────────────────────▀▀▀▀───▀▀▀▀─│─╗
│ cosmopolitan § new technology » winsock                                  ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#define kNtCompEqual   0
#define kNtCompNotless 1

#define kNtWsaFlagOverlapped      0x01
#define kNtWsaFlagNoHandleInherit 0x80

#define kNtTfDisconnect       0x01
#define kNtTfReuseSocket      0x02
#define kNtTfWriteBehind      0x04
#define kNtTfUseDefaultWorker 0x00
#define kNtTfUseSystemThread  0x10
#define kNtTfUseKernelApc     0x20

#define kNtSoConnectTime          0x700C
#define kNtSoUpdateAcceptContext  0x700B
#define kNtSoUpdateConnectContext 0x7010

#define kNtSioAddressListChange           0x28000017u
#define kNtSioAddressListQuery            0x48000016u
#define kNtSioAddressListSort             0xC8000019u
#define kNtSioAssociateHandle             0x88000001u
#define kNtSioEnableCircularQueueing      0x28000002u
#define kNtSioFindRoute                   0x48000003u
#define kNtSioFlush                       0x28000004u
#define kNtSioGetBroadcastAddress         0x48000005u
#define kNtSioGetExtensionFunctionPointer 0xC8000006u
#define kNtSioGetGroupQos                 0xC8000008u
#define kNtSioGetQos                      0xC8000007u
#define kNtSioMulticastScope              0x8800000Au
#define kNtSioMultipointLoopback          0x88000009u
#define kNtSioQueryRssProcessorInfo       0x48000025u
#define kNtSioQueryTargetPnpHandle        0x48000018u
#define kNtSioReserved1                   0x8800001Au
#define kNtSioReserved2                   0x88000021u
#define kNtSioRoutingInterfaceChange      0x88000015u
#define kNtSioRoutingInterfaceQuery       0xC8000014u
#define kNtSioSetGroupQos                 0x8800000Cu
#define kNtSioSetQos                      0x8800000Bu
#define kNtSioSocketCloseNotify           0x9800000Du
#define kNtSioTranslateHandle             0xC800000Du
#define kNtSioUdpConnreset                0x9800000Cu
#define kNtSioUdpNetreset                 0x9800000Fu

#define kNtNspNotifyImmediately 0
#define kNtNspNotifyHwnd        1
#define kNtNspNotifyEvent       2
#define kNtNspNotifyPort        3
#define kNtNspNotifyApc         4

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

struct NtTimeval {
  int32_t tv_sec; /* [sic] */
  int32_t tv_usec;
};

struct NtIovec {
  uint32_t len;
  char *buf;
};

struct NtMsgHdr {
  struct sockaddr *name;
  int32_t namelen;
  struct NtIovec *lpBuffers;
  uint32_t dwBufferCount;
  struct NtIovec Control;
  uint32_t dwFlags;
};

struct NtWsaData {
  uint16_t wVersion;
  uint16_t wHighVersion;
  uint16_t iMaxSockets;
  uint16_t iMaxUdpDg;
  char *lpVendorInfo;
  char szDescription[257];
  char szSystemStatus[129];
};

struct NtSocketAddress {
  struct sockaddr *lpSockaddr;
  int32_t iSockaddrLength;
};

struct NtSocketAddressList {
  int32_t iAddressCount;
  struct NtSocketAddress Address[1];
};

struct NtAddrInfoEx {  /* win8+ */
  int32_t ai_flags;    /* AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST */
  int32_t ai_family;   /* PF_XXX */
  int32_t ai_socktype; /* SOCK_XXX */
  int32_t ai_protocol;
  uint64_t ai_addrlen;
  char16_t *ai_canonname;
  struct sockaddr *ai_addr;
  void *ai_blob;
  uint64_t ai_bloblen;
  struct NtGuid *ai_provider;
  struct NtAddrInfoEx *ai_next;
  int32_t ai_version;          /* v2 */
  char16_t *ai_fqdn;           /* v2 */
  int32_t ai_interfaceindex;   /* v3 */
  int64_t ai_resolutionhandle; /* v4 */
};

struct NtWsaProtocolChain {
  int32_t ChainLen;
  uint32_t ChainEntries[7];
};

struct NtWsaProtocolInfo {
  uint32_t dwServiceFlags1;
  uint32_t dwServiceFlags2;
  uint32_t dwServiceFlags3;
  uint32_t dwServiceFlags4;
  uint32_t dwProviderFlags;
  struct NtGuid ProviderId;
  uint32_t dwCatalogEntryId;
  struct NtWsaProtocolChain ProtocolChain;
  int32_t iVersion;
  int32_t iAddressFamily;
  int32_t iMaxSockAddr;
  int32_t iMinSockAddr;
  int32_t iSocketType;
  int32_t iProtocol;
  int32_t iProtocolMaxOffset;
  int32_t iNetworkByteOrder;
  int32_t iSecurityScheme;
  uint32_t dwMessageSize;
  uint32_t dwProviderReserved;
  char16_t szProtocol[256];
};

struct NtFlowSpec {
  uint32_t TokenRate;          /* bytes/sec */
  uint32_t TokenBucketSize;    /* bytes */
  uint32_t PeakBandwidth;      /* bytes/sec */
  uint32_t Latency;            /* µs */
  uint32_t DelayVariation;     /* µs */
  uint32_t ServiceType;        /* kNtServicetypeXxx */
  uint32_t MaxSduSize;         /* bytes */
  uint32_t MinimumPolicedSize; /* bytes */
};

struct NtQos {
  struct NtFlowSpec SendingFlowspec;
  struct NtFlowSpec ReceivingFlowspec;
  struct NtIovec ProviderSpecific;
};

struct NtWsaVersion {
  uint32_t dwVersion;
  int ecHow;
};

struct NtAfProtocols {
  int32_t iAddressFamily;
  int32_t iProtocol;
};

struct NtBlob {
  uint32_t cbSize;
  uint8_t pBlobData;
};

struct NtCsAddrInfo {
  struct NtSocketAddress LocalAddr;
  struct NtSocketAddress RemoteAddr;
  int32_t iSocketType;
  int32_t iProtocol;
};

struct NtWsaQuerySet {
  uint32_t dwSize; /* of this */
  char16_t *lpszServiceInstanceName;
  struct NtGuid *lpServiceClassId;
  struct NtWsaVersion *lpVersion;
  char16_t *lpszComment;
  uint32_t dwNameSpace;
  struct NtGuid *lpNSProviderId;
  char16_t *lpszContext;
  uint32_t dwNumberOfProtocols;
  struct NtAfProtocols *lpafpProtocols /*[dwNumberOfProtocols]*/;
  char16_t *lpszQueryString;
  uint32_t dwNumberOfCsAddrs;
  struct NtCsAddrInfo *lpcsaBuffer /*[dwNumberOfCsAddrs]*/;
  uint32_t dwOutputFlags;
  struct NtBlob *lpBlob;
};

struct NtWsaNamespaceInfoEx {
  struct NtGuid NSProviderId;
  uint32_t dwNameSpace;
  bool32 fActive;
  uint32_t dwVersion;
  char16_t *lpszIdentifier;
  struct NtBlob *ProviderSpecific;
};

struct NtWsansClassInfo {
  char16_t *lpszName;
  uint32_t dwNameSpace;
  uint32_t dwValueType;
  uint32_t dwValueSize;
  void *lpValue;
};

struct NtWsaServiceClassInfo {
  struct NtGuid *lpServiceClassId;
  char16_t *lpszServiceClassName;
  uint32_t dwCount;
  struct NtWsansClassInfo *lpClassInfos;
};

struct NtWsaNetworkEvents {
  int32_t lNetworkEvents;
  int32_t iErrorCode[10];
};

struct NtTransmitFileBuffers {
  void *Head;
  uint32_t HeadLength;
  void *Tail;
  uint32_t TailLength;
};

typedef int (*NtConditionProc)(
    const struct NtIovec *lpCallerId, const struct NtIovec *lpCallerData,
    struct NtQos *inout_lpSQOS, struct NtQos *inout_lpGQOS,
    const struct NtIovec *lpCalleeId, const struct NtIovec *lpCalleeData,
    uint32_t *out_group, const uint32_t *dwCallbackData);

typedef void (*NtWsaOverlappedCompletionRoutine)(
    uint32_t dwError, uint32_t cbTransferred,
    const struct NtOverlapped *lpOverlapped, uint32_t dwFlags);

struct NtWsaCompletion {
  int Type;
  union {
    struct {
      int64_t hWnd;
      uint32_t uMsg;
      uintptr_t context;
    } WindowMessage;
    struct {
      struct NtOverlapped *lpOverlapped;
    } Event;
    struct {
      struct NtOverlapped *lpOverlapped;
      NtWsaOverlappedCompletionRoutine lpfnCompletionProc;
    } Apc;
    struct {
      struct NtOverlapped *lpOverlapped;
      int64_t hPort;
      uint32_t Key;
    } Port;
  } Parameters;
};

struct NtFdSet {
  uint32_t fd_count;
  int64_t fd_array[64];
};

/**
 * Winsock2 prototypes.
 *
 * @note Some of the functions exported by WS2_32.DLL, e.g. bind(),
 *       overlap with the names used by System V. Prototypes for these
 *       functions are declared within their respective wrappers.
 */

int32_t WSAStartup(uint16_t wVersionRequested, struct NtWsaData *lpWSAData)
    paramsnonnull() nodiscard;

int WSACleanup(void);
int WSAGetLastError(void);
void WSASetLastError(int);

int __sys_bind_nt(uint64_t, const void *, int);
int __sys_closesocket_nt(uint64_t);
int __sys_getpeername_nt(uint64_t, void *, uint32_t *);
int __sys_getsockname_nt(uint64_t, void *, uint32_t *);
int __sys_getsockopt_nt(uint64_t, int, int, void *, uint32_t *);
int __sys_ioctlsocket_nt(uint64_t, int32_t, uint32_t *);
int __sys_listen_nt(uint64_t, int);
int __sys_setsockopt_nt(uint64_t, int, int, const void *, int);
int __sys_shutdown_nt(uint64_t, int);
int __sys_select_nt(int, struct NtFdSet *, struct NtFdSet *, struct NtFdSet *,
                    struct NtTimeval *);

uint64_t WSASocket(int af, int type, int protocol,
                   const struct NtWsaProtocolInfo *opt_lpProtocolInfo,
                   const uint32_t opt_group, uint32_t dwFlags) nodiscard;

int WSAConnect(uint64_t s, const struct sockaddr *name, const int namelen,
               const struct NtIovec *opt_lpCallerData,
               struct NtIovec *opt_out_lpCalleeData,
               const struct NtQos *opt_lpSQOS, const struct NtQos *opt_lpGQOS)
    paramsnonnull((2));

bool32 WSAConnectByName(uint64_t s, const char16_t *nodename,
                        const char16_t *servicename,
                        uint32_t *opt_inout_LocalAddressLength,
                        struct sockaddr *out_LocalAddress,
                        uint32_t *opt_inout_RemoteAddressLength,
                        struct sockaddr *out_RemoteAddress,
                        const struct NtTimeval *opt_timeout,
                        struct NtOverlapped *__Reserved) paramsnonnull((2, 3));

bool32 WSAConnectByList(uint64_t s,
                        const struct NtSocketAddressList *SocketAddress,
                        uint32_t *opt_inout_LocalAddressLength,
                        struct sockaddr *out_LocalAddress,
                        uint32_t *opt_inout_RemoteAddressLength,
                        struct sockaddr *out_RemoteAddress,
                        const struct NtTimeval *opt_timeout,
                        struct NtOverlapped *__Reserved) paramsnonnull((2));

int64_t WSAAccept(uint64_t s, struct sockaddr *out_addr,
                  int32_t *opt_inout_addrlen,
                  const NtConditionProc opt_lpfnCondition,
                  const uint32_t *opt_dwCallbackData)
    paramsnonnull((2)) nodiscard;

int WSASend(uint64_t s, const struct NtIovec *lpBuffers, uint32_t dwBufferCount,
            uint32_t *opt_out_lpNumberOfBytesSent, uint32_t dwFlags,
            struct NtOverlapped *opt_inout_lpOverlapped,
            const NtWsaOverlappedCompletionRoutine opt_lpCompletionRoutine)
    paramsnonnull((2));

int WSASendMsg(int64_t Handle, const struct NtMsgHdr *lpMsg, uint32_t dwFlags,
               uint32_t *opt_out_lpNumberOfBytesSent,
               struct NtOverlapped *opt_inout_lpOverlapped,
               const NtWsaOverlappedCompletionRoutine opt_lpCompletionRoutine)
    paramsnonnull((2));

int WSASendTo(uint64_t s, const struct NtIovec *lpBuffers,
              uint32_t dwBufferCount,
              uint32_t *opt_out_lpNumberOfBytesSent /* opt if !overlapped */,
              uint32_t dwFlags, const void *opt_tosockaddr,
              int32_t tosockaddrlen,
              struct NtOverlapped *opt_inout_lpOverlapped,
              const NtWsaOverlappedCompletionRoutine opt_lpCompletionRoutine)
    paramsnonnull((2));

int WSAPoll(struct sys_pollfd_nt *inout_fdArray, uint32_t nfds,
            signed timeout_ms) paramsnonnull();

int WSARecv(uint64_t s, const struct NtIovec *out_lpBuffers,
            uint32_t dwBufferCount, uint32_t *opt_out_lpNumberOfBytesRecvd,
            uint32_t *inout_lpFlags,
            struct NtOverlapped *opt_inout_lpOverlapped,
            const NtWsaOverlappedCompletionRoutine opt_lpCompletionRoutine)
    paramsnonnull((2, 5));

int WSARecvFrom(uint64_t s, const struct NtIovec *out_lpBuffers,
                uint32_t dwBufferCount, uint32_t *opt_out_lpNumberOfBytesRecvd,
                uint32_t *inout_lpFlags, void *out_fromsockaddr,
                uint32_t *inout_fromsockaddrlen,
                struct NtOverlapped *opt_inout_lpOverlapped,
                const NtWsaOverlappedCompletionRoutine opt_lpCompletionRoutine)
    paramsnonnull((2, 5));

int WSARecvDisconnect(uint64_t s,
                      const struct NtIovec *opt_lpInboundDisconnectData);

int WSADuplicateSocket(uint64_t s, uint32_t dwProcessId,
                       struct NtWsaProtocolInfo *out_lpProtocolInfo)
    paramsnonnull((3));

int WSAIoctl(uint64_t s, uint32_t dwIoControlCode, const void *lpvInBuffer,
             uint32_t cbInBuffer, void *out_lpvOutBuffer, uint32_t cbOutBuffer,
             uint32_t *out_lpcbBytesReturned,
             struct NtOverlapped *opt_inout_lpOverlapped,
             const NtWsaOverlappedCompletionRoutine opt_lpCompletionRoutine)
    paramsnonnull((5, 7));

int WSANSPIoctl(int64_t hLookup, uint32_t dwControlCode,
                const void *lpvInBuffer, uint32_t cbInBuffer,
                void *out_lpvOutBuffer, uint32_t cbOutBuffer,
                uint32_t *out_lpcbBytesReturned,
                const struct NtWsaCompletion *opt_lpCompletion)
    paramsnonnull((3, 5, 7));

int64_t WSACreateEvent(void) nodiscard;
bool32 WSACloseEvent(const int64_t hEvent);
bool32 WSAResetEvent(const int64_t hEvent);
bool32 WSASetEvent(const int64_t hEvent);

int WSAEventSelect(uint64_t s, const int64_t opt_hEventObject,
                   long lNetworkEvents);

uint32_t WSAWaitForMultipleEvents(uint32_t cEvents, const int64_t *lphEvents,
                                  bool32 fWaitAll, uint32_t dwTimeout_ms,
                                  bool32 fAlertable) paramsnonnull();

int WSAEnumNetworkEvents(uint64_t s, const int64_t hEventObject,
                         struct NtWsaNetworkEvents *out_lpNetworkEvents)
    paramsnonnull();

bool32 WSAGetOverlappedResult(uint64_t s,
                              const struct NtOverlapped *lpOverlapped,
                              uint32_t *out_lpcbTransfer, bool32 fWait,
                              uint32_t *out_lpdwFlags) paramsnonnull();

int WSAEnumProtocols(const int32_t *opt_lpiProtocols,
                     struct NtWsaProtocolInfo *out_lpProtocolBuffer,
                     uint32_t *inout_lpdwBufferLength) paramsnonnull();

bool32 WSAGetQOSByName(uint64_t s, const struct NtIovec *lpQOSName,
                       struct NtQos *out_lpQOS) paramsnonnull();

uint64_t WSAJoinLeaf(uint64_t s, const struct sockaddr *name, const int namelen,
                     const struct NtIovec *opt_lpCallerData,
                     struct NtIovec *opt_out_lpCalleeData,
                     const struct NtQos *opt_lpSQOS,
                     const struct NtQos *opt_lpGQOS, uint32_t dwFlags)
    paramsnonnull((2, 4));

int WSALookupServiceBegin(const struct NtWsaQuerySet *lpqsRestrictions,
                          uint32_t dwControlFlags, int64_t *out_lphLookup)
    paramsnonnull();

int WSALookupServiceNext(const int64_t hLookup, uint32_t dwControlFlags,
                         uint32_t *inout_lpdwBufferLength,
                         struct NtWsaQuerySet *out_lpqsResults) paramsnonnull();

int WSALookupServiceEnd(int64_t hLookup);

int WSAAddressToString(const struct sockaddr *lpsaAddress,
                       uint32_t dwAddressLength,
                       const struct NtWsaProtocolInfo *opt_lpProtocolInfo,
                       char16_t *out_lpszAddressString,
                       uint32_t *inout_lpdwAddressStringLength)
    paramsnonnull((1, 4, 5));

int WSAStringToAddress(const char16_t *AddressString, int AddressFamily,
                       const struct NtWsaProtocolInfo *opt_lpProtocolInfo,
                       struct sockaddr *out_lpAddress,
                       int *inout_lpAddressLength) paramsnonnull((1, 3, 4));

int WSAEnumNameSpaceProvidersEx(uint32_t *inout_lpdwBufferLength,
                                struct NtWsaNamespaceInfoEx *out_lpnspBuffer)
    paramsnonnull();

int WSAProviderConfigChange(
    int64_t *inout_lpNotificationHandle,
    struct NtOverlapped *opt_inout_lpOverlapped,
    NtWsaOverlappedCompletionRoutine opt_lpCompletionRoutine)
    paramsnonnull((1));

int WSAInstallServiceClass(
    const struct NtWsaServiceClassInfo *lpServiceClassInfo) paramsnonnull();

int WSARemoveServiceClass(const struct NtGuid *lpServiceClassId)
    paramsnonnull();

int WSAGetServiceClassInfo(const struct NtGuid *lpProviderId,
                           const struct NtGuid *lpServiceClassId,
                           uint32_t *inout_lpdwBufSize,
                           struct NtWsaServiceClassInfo *out_lpServiceClassInfo)
    paramsnonnull((1, 2, 3));

int WSASetService(const struct NtWsaQuerySet *lpqsRegInfo, int essoperation,
                  uint32_t dwControlFlags) paramsnonnull();

int /* success==0 */ WSAGetServiceClassNameByClassId(
    const struct NtGuid *lpServiceClassId, char16_t *out_lpszServiceClassName,
    uint32_t *inout_lpdwBufferLength) paramsnonnull();

bool32 TransmitFile(int64_t hSocket, int64_t hFile,
                    uint32_t opt_nNumberOfBytesToWrite,
                    uint32_t opt_nNumberOfBytesPerSend,
                    struct NtOverlapped *opt_inout_lpOverlapped,
                    const struct NtTransmitFileBuffers *opt_lpTransmitBuffers,
                    uint32_t dwReserved);

bool32 AcceptEx(int64_t sListenSocket, int64_t sAcceptSocket,
                void *out_lpOutputBuffer /*[recvlen+local+remoteaddrlen]*/,
                uint32_t dwReceiveDataLength, uint32_t dwLocalAddressLength,
                uint32_t dwRemoteAddressLength, uint32_t *out_lpdwBytesReceived,
                struct NtOverlapped *inout_lpOverlapped);

void GetAcceptExSockaddrs(
    const void *lpOutputBuffer /*[recvsize+addrsize+addrlen]*/,
    uint32_t dwReceiveDataLength, uint32_t dwLocalAddressLength,
    uint32_t dwRemoteAddressLength,
    struct sockaddr **out_LocalSockaddr /*[*LocalSockaddrLength]*/,
    int *out_LocalSockaddrLength,
    struct sockaddr **out_RemoteSockaddr /*[*RemoteSockaddrLength]*/,
    int *out_RemoteSockaddrLength);

bool32 ConnectEx(int64_t s, const struct sockaddr *name, int namelen,
                 const void *opt_lpSendBuffer, uint32_t dwSendDataLength,
                 uint32_t *out_lpdwBytesSent,
                 struct NtOverlapped *inout_lpOverlapped);

bool32 DisconnectEx(int64_t s, struct NtOverlapped *inout_opt_lpOverlapped,
                    uint32_t dwFlags, uint32_t dwReserved);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/ohmyplus/vector.h */

#define COSMOPOLITAN_LIBC_OHMYPLUS_VECTOR_H_
#ifdef __cplusplus
extern "C" {
void __vector_reserve(size_t, size_t, intptr_t **, size_t *);
} /* extern c */
namespace std {

template <class T>
class vector {
 public:
  vector() : data_(NULL), size_(0), toto_(0) {
  }
  vector(size_t n) : data_(NULL), size_(n), toto_(0) {
    VectorReserve(n);
  }
  size_t size() const {
    return size_;
  }
  size_t capacity() const {
    return toto_;
  }
  T &front() {
    return data_[0];
  }
  T &back() {
    return data_[size_ - 1];
  }
  void clear() {
    size_ = 0;
  }
  void reserve(size_t n) {
    VectorReserve(n);
  }
  void resize(size_t n) {
    reserve((size_ = n));
  }
  bool empty() const {
    return !size_;
  }
  T &operator[](size_t i) {
    return data_[i];
  }

 private:
  T *data_;
  size_t size_;
  size_t toto_;
  void VectorReserve(size_t n) {
    __vector_reserve(n, sizeof(T), (intptr_t **)&data_, &toto_);
  }
};

};     /* namespace std */
#endif /* __cplusplus */


/*!BEGIN libc/rand/rand.h */

#define COSMOPOLITAN_LIBC_RAND_RAND_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § random                                                    ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#define RAND_MAX __INT_MAX__ /* only applies to rand() */
void srand(uint64_t) nothrow nocallback;  /* seeds rand() only      */
int rand(void) nothrow nocallback;        /* ≥0 unseeded lcg prng   */
uint32_t rand32(void) nothrow nocallback; /* random as possible rng */
uint64_t rand64(void) nothrow nocallback; /* random as possible rng */
double poz(double);                       /* verify our claims      */
double pochisq(double, int);
void rt_init(int);
void rt_add(void *, int);
void rt_end(double *, double *, double *, double *, double *);
void *rngset(void *, size_t, uint64_t (*)(void), size_t) paramsnonnull();
char *strfry(char *);
int getentropy(void *, size_t);
ssize_t getrandom(void *, size_t, unsigned);
int devrand(void *, size_t);
int64_t winrandish(void);
uint64_t rdrand(void);
uint64_t rdseed(void);
float randf(void);
char *initstate(unsigned, char *, size_t);
char *setstate(char *);
long random(void);
void srandom(unsigned);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/rand/xorshift.h */

#define COSMOPOLITAN_LIBC_RAND_XORSHIFT_H_

#define kMarsagliaXorshift64Seed 88172645463325252
#define kMarsagliaXorshift32Seed 2463534242

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

uint32_t MarsagliaXorshift32(uint32_t[hasatleast 1]);
uint64_t MarsagliaXorshift64(uint64_t[hasatleast 1]);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/runtime/buffer.h */

#define COSMOPOLITAN_LIBC_RUNTIME_BUFFER_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

struct GuardedBuffer {
  void *p;
};

void *balloc(struct GuardedBuffer *, unsigned, size_t);
void bfree(struct GuardedBuffer *);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/runtime/carsort.h */

#define COSMOPOLITAN_LIBC_RUNTIME_CARSORT_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void carsort100(size_t, int32_t (*)[2]) paramsnonnull() nocallback nothrow;
void carsort1000(size_t, int32_t (*)[2]) paramsnonnull() nocallback nothrow;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/runtime/gc.h */

#define COSMOPOLITAN_LIBC_RUNTIME_GC_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void *_gc(void *) hidden;
void *_defer(void *, void *) hidden;
void __defer(struct StackFrame *, void *, void *) hidden;
void __deferer(struct StackFrame *, void *, void *) hidden;
void _gclongjmp(jmp_buf, int) nothrow wontreturn;

#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
#define _gc(THING) _defer((void *)_weakfree, (void *)(THING))
#define _defer(FN, ARG)                                                \
  ({                                                                   \
    autotype(ARG) Arg = (ARG);                                         \
    /* prevent weird opts like tail call */                            \
    asm volatile("" : "+g"(Arg) : : "memory");                         \
    __defer((struct StackFrame *)__builtin_frame_address(0), FN, Arg); \
    asm volatile("" : "+g"(Arg) : : "memory");                         \
    Arg;                                                               \
  })
#endif /* defined(__GNUC__) && !defined(__STRICT_ANSI__) */

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/runtime/interruptiblecall.h */

#define COSMOPOLITAN_LIBC_RUNTIME_INTERRUPTIBLECALL_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

struct InterruptibleCall {
  struct InterruptibleCall *prev;
  intptr_t returnval;
  int sig;
  int flags;
  jmp_buf jb;
  struct sigaction sa_new;
  struct sigaction sa_old;
};

intptr_t interruptiblecall(struct InterruptibleCall *state,
                           intptr_t callback(intptr_t p1, intptr_t p2,
                                             intptr_t p3, intptr_t p4),
                           intptr_t p1, intptr_t p2, intptr_t p3, intptr_t p4);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/runtime/memtrack.h */

#define COSMOPOLITAN_LIBC_RUNTIME_MEMTRACK_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

#define _kAutomapStart  0x0000100080000000 /* asan can't spread its poison */
#define _kAutomapSize   0x00000fff80000000 /* beyond the above mem address */
#define _kFixedmapStart 0x0000200000000000

/*
 * TODO: Why can't we allocate addresses above 4GB on Windows 7 x64?
 * https://github.com/jart/cosmopolitan/issues/19
 */
#define MEMTRACK_ADDRESS(NORMAL, WIN7) \
  (!(IsWindows() && NtGetVersion() < kNtVersionWindows10) ? NORMAL : WIN7)
#define kAutomapStart  MEMTRACK_ADDRESS(_kAutomapStart, 0x10000000)
#define kAutomapSize   MEMTRACK_ADDRESS(_kAutomapSize, 0x40000000)
#define kFixedmapStart MEMTRACK_ADDRESS(_kFixedmapStart, 0x40000000)

struct MemoryIntervals {
  long i;
  struct MemoryInterval {
    int x;
    int y;
    long h;
    int prot;
    int flags;
  } p[128];
};

extern struct MemoryIntervals _mmi;

unsigned FindMemoryInterval(const struct MemoryIntervals *, int) nosideeffect;
bool AreMemoryIntervalsOk(const struct MemoryIntervals *) nosideeffect;
void PrintMemoryIntervals(int, const struct MemoryIntervals *);
int TrackMemoryInterval(struct MemoryIntervals *, int, int, long, int, int);
int ReleaseMemoryIntervals(struct MemoryIntervals *, int, int,
                           void (*)(struct MemoryIntervals *, int, int));
void ReleaseMemoryNt(struct MemoryIntervals *, int, int);
int UntrackMemoryIntervals(void *, size_t);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/runtime/sysconf.h */

#define COSMOPOLITAN_LIBC_RUNTIME_SYSCONF_H_


/*!BEGIN libc/sysv/consts/auxv.h */

#define COSMOPOLITAN_LIBC_CALLS_AUXV_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long AT_BASE;
extern const long AT_BASE_PLATFORM;
extern const long AT_CLKTCK;
extern const long AT_DCACHEBSIZE;
extern const long AT_EGID;
extern const long AT_ENTRY;
extern const long AT_EUID;
extern const long AT_EXECFD;
extern const long AT_EXECFN;
extern const long AT_FLAGS;
extern const long AT_GID;
extern const long AT_HWCAP2;
extern const long AT_HWCAP;
extern const long AT_ICACHEBSIZE;
extern const long AT_NOTELF;
extern const long AT_NO_AUTOMOUNT;
extern const long AT_OSRELDATE;
extern const long AT_PAGESZ;
extern const long AT_PHDR;
extern const long AT_PHENT;
extern const long AT_PHNUM;
extern const long AT_PLATFORM;
extern const long AT_RANDOM;
extern const long AT_SECURE;
extern const long AT_SYSINFO_EHDR;
extern const long AT_UCACHEBSIZE;
extern const long AT_UID;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define AT_BASE          SYMBOLIC(AT_BASE)
#define AT_BASE_PLATFORM SYMBOLIC(AT_BASE_PLATFORM)
#define AT_CLKTCK        SYMBOLIC(AT_CLKTCK)
#define AT_DCACHEBSIZE   SYMBOLIC(AT_DCACHEBSIZE)
#define AT_EGID          SYMBOLIC(AT_EGID)
#define AT_ENTRY         SYMBOLIC(AT_ENTRY)
#define AT_EUID          SYMBOLIC(AT_EUID)
#define AT_EXECFD        SYMBOLIC(AT_EXECFD)
#define AT_EXECFN        SYMBOLIC(AT_EXECFN)
#define AT_FLAGS         SYMBOLIC(AT_FLAGS)
#define AT_GID           SYMBOLIC(AT_GID)
#define AT_HWCAP         SYMBOLIC(AT_HWCAP)
#define AT_HWCAP2        SYMBOLIC(AT_HWCAP2)
#define AT_ICACHEBSIZE   SYMBOLIC(AT_ICACHEBSIZE)
#define AT_NOTELF        SYMBOLIC(AT_NOTELF)
#define AT_NO_AUTOMOUNT  SYMBOLIC(AT_NO_AUTOMOUNT)
#define AT_OSRELDATE     SYMBOLIC(AT_OSRELDATE)
#define AT_PAGESZ        SYMBOLIC(AT_PAGESZ)
#define AT_PHDR          SYMBOLIC(AT_PHDR)
#define AT_PHENT         SYMBOLIC(AT_PHENT)
#define AT_PHNUM         SYMBOLIC(AT_PHNUM)
#define AT_PLATFORM      SYMBOLIC(AT_PLATFORM)
#define AT_RANDOM        SYMBOLIC(AT_RANDOM)
#define AT_SECURE        SYMBOLIC(AT_SECURE)
#define AT_SYSINFO_EHDR  SYMBOLIC(AT_SYSINFO_EHDR)
#define AT_UCACHEBSIZE   SYMBOLIC(AT_UCACHEBSIZE)
#define AT_UID           SYMBOLIC(AT_UID)


#define _SC_ARG_MAX   0
#define _SC_CLK_TCK   2
#define _SC_PAGESIZE  30
#define _SC_PAGE_SIZE 30

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

long sysconf(int);

#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
#define sysconf(X) __sysconf(X)
forceinline long __sysconf(int thing) {
  switch (thing) {
    case _SC_ARG_MAX:
      return ARG_MAX;
    case _SC_CLK_TCK: {
      extern const long __AT_CLKTCK asm("AT_CLKTCK");
      long res = getauxval(__AT_CLKTCK);
      if (!res) res = 100;
      return res;
    }
    case _SC_PAGESIZE:
      return FRAMESIZE;
    default:
      return -1;
  }
}
#endif /* GNU && !ANSI */

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sock/epoll.h */

#define COSMOPOLITAN_LIBC_SOCK_WEPOLL_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

typedef union epoll_data {
  void *ptr;
  int fd;
  uint32_t u32;
  uint64_t u64;
} epoll_data_t;

struct thatispacked epoll_event {
  uint32_t events;
  epoll_data_t data;
};

int epoll_create(int);
int epoll_create1(int);
int epoll_ctl(int, int, int, struct epoll_event *);
int epoll_wait(int, struct epoll_event *, int, int);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sock/select.h */

#define COSMOPOLITAN_LIBC_SOCK_SELECT_H_

#define FD_SETSIZE 1024 /* it's 64 on windows */

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

typedef struct fd_set {
  uint64_t fds_bits[FD_SETSIZE / 64];
} fd_set;

#define FD_ISSET(FD, SET) (((SET)->fds_bits[(FD) >> 6] >> ((FD)&63)) & 1)
#define FD_SET(FD, SET)   ((SET)->fds_bits[(FD) >> 6] |= 1ull << ((FD)&63))
#define FD_CLR(FD, SET)   ((SET)->fds_bits[(FD) >> 6] &= ~(1ull << ((FD)&63)))
#define FD_ZERO(SET)      memset((SET)->fds_bits, 0, sizeof((SET)->fds_bits))

int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/stdio/spawn.h */

#define COSMOPOLITAN_LIBC_STDIO_SPAWN_H_

#define POSIX_SPAWN_RESETIDS      0x01
#define POSIX_SPAWN_SETPGROUP     0x02
#define POSIX_SPAWN_SETSIGDEF     0x04
#define POSIX_SPAWN_SETSIGMASK    0x08
#define POSIX_SPAWN_SETSCHEDPARAM 0x10
#define POSIX_SPAWN_SETSCHEDULER  0x20

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

typedef char *posix_spawn_file_actions_t;
typedef struct _posix_spawnattr posix_spawnattr_t;

int posix_spawn(int *, const char *, const posix_spawn_file_actions_t *,
                const posix_spawnattr_t *, char *const[], char *const[]);
int posix_spawnp(int *, const char *, const posix_spawn_file_actions_t *,
                 const posix_spawnattr_t *, char *const[], char *const[]);

int posix_spawn_file_actions_init(posix_spawn_file_actions_t *);
int posix_spawn_file_actions_destroy(posix_spawn_file_actions_t *);
int posix_spawn_file_actions_addclose(posix_spawn_file_actions_t *, int);
int posix_spawn_file_actions_adddup2(posix_spawn_file_actions_t *, int, int);
int posix_spawn_file_actions_addopen(posix_spawn_file_actions_t *, int,
                                     const char *, int, unsigned);

int posix_spawnattr_init(posix_spawnattr_t *);
int posix_spawnattr_destroy(posix_spawnattr_t *);
int posix_spawnattr_getflags(const posix_spawnattr_t *, short *);
int posix_spawnattr_setflags(posix_spawnattr_t *, short);
int posix_spawnattr_getpgroup(const posix_spawnattr_t *, int *);
int posix_spawnattr_setpgroup(posix_spawnattr_t *, int);
int posix_spawnattr_getschedpolicy(const posix_spawnattr_t *, int *);
int posix_spawnattr_setschedpolicy(posix_spawnattr_t *, int);
int posix_spawnattr_getschedparam(const posix_spawnattr_t *,
                                  struct sched_param *);
int posix_spawnattr_setschedparam(posix_spawnattr_t *,
                                  const struct sched_param *);
int posix_spawnattr_getsigmask(const posix_spawnattr_t *, sigset_t *);
int posix_spawnattr_setsigmask(posix_spawnattr_t *, const sigset_t *);
int posix_spawnattr_getdefault(const posix_spawnattr_t *, sigset_t *);
int posix_spawnattr_setsigdefault(posix_spawnattr_t *, const sigset_t *);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/stdio/stdio_ext.h */

#define COSMOPOLITAN_LIBC_STDIO_STDIO_EXT_H_

#define FSETLOCKING_QUERY    0
#define FSETLOCKING_INTERNAL 1
#define FSETLOCKING_BYCALLER 2

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

size_t __fbufsize(FILE *);
size_t __fpending(FILE *);
int __flbf(FILE *);
int __freadable(FILE *);
int __fwritable(FILE *);
int __freading(FILE *);
int __fwriting(FILE *);
int __fsetlocking(FILE *, int);
void _flushlbf(void);
void __fpurge(FILE *);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/stdio/temp.h */

#define COSMOPOLITAN_LIBC_STDIO_TEMP_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

nodiscard FILE *tmpfile(void);
nodiscard int mkstemp(char *);
nodiscard int mkostemp(char *, unsigned);
nodiscard int mkstemps(char *, int);
nodiscard int mkostemps(char *, int, unsigned);
nodiscard int mkostempsm(char *, int, unsigned, int);
compatfn char *mktemp(char *);

int mkostempsmi(char *, int, unsigned, uint64_t *, int,
                int (*)(const char *, int, ...)) hidden nodiscard;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/stdio/unlocked.h */

#define COSMOPOLITAN_LIBC_STDIO_UNLOCKED_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

void flockfile(FILE *);
void funlockfile(FILE *);
int ftrylockfile(FILE *);
int getc_unlocked(FILE *) paramsnonnull();
int getchar_unlocked(void);
int putc_unlocked(int, FILE *) paramsnonnull();
int putchar_unlocked(int);
void clearerr_unlocked(FILE *);
int feof_unlocked(FILE *);
int ferror_unlocked(FILE *);
int fileno_unlocked(FILE *);
int fflush_unlocked(FILE *);
int fgetc_unlocked(FILE *);
int fputc_unlocked(int, FILE *);
size_t fread_unlocked(void *, size_t, size_t, FILE *);
size_t fwrite_unlocked(const void *, size_t, size_t, FILE *);
char *fgets_unlocked(char *, int, FILE *);
int fputs_unlocked(const char *, FILE *);
wint_t getwc_unlocked(FILE *);
wint_t getwchar_unlocked(void);
wint_t fgetwc_unlocked(FILE *);
wint_t fputwc_unlocked(wchar_t, FILE *);
wint_t putwc_unlocked(wchar_t, FILE *);
wint_t putwchar_unlocked(wchar_t);
wchar_t *fgetws_unlocked(wchar_t *, int, FILE *);
int fputws_unlocked(const wchar_t *, FILE *);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/str/highwayhash64.h */

#define COSMOPOLITAN_LIBC_STR_HIGHWAYHASH64_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

uint64_t HighwayHash64(const uint8_t *, size_t, const uint64_t[4]);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/str/thompike.h */

#define COSMOPOLITAN_LIBC_STR_THOMPIKE_H_

#define ThomPikeCont(x)     (((x)&0300) == 0200)
#define ThomPikeByte(x)     ((x) & (((1 << ThomPikeMsb(x)) - 1) | 3))
#define ThomPikeLen(x)      (7 - ThomPikeMsb(x))
#define ThomPikeMsb(x)      (((x)&0xff) < 252 ? bsr(~(x)&0xff) : 1)
#define ThomPikeMerge(x, y) ((x) << 6 | (y)&077)



/*!BEGIN libc/str/tpenc.h */

#define COSMOPOLITAN_LIBC_STR_TPENC_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

uint64_t tpenc(int32_t) pureconst;

#ifndef __STRICT_ANSI__
#define tpenc(CODE)            \
  ({                           \
    long Edi, Buf;             \
    asm("call\ttpenc"          \
        : "=a"(Buf), "=D"(Edi) \
        : "1"(CODE)            \
        : "rcx", "rdx", "cc"); \
    Buf;                       \
  })
#endif

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/str/undeflate.h */

#define COSMOPOLITAN_LIBC_STR_UNDEFLATE_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

struct DeflateState {
  uint8_t lenlens[19];
  uint32_t lencodes[19];
  uint32_t distcodes[32];
  uint32_t litcodes[288];
  uint8_t lens[288 + 32];
};

ssize_t undeflate(void *output, size_t outputsize, void *input,
                  size_t inputsize, struct DeflateState *ds);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/str/utf16.h */

#define COSMOPOLITAN_LIBC_STR_UTF16_H_

#define UTF16_MASK 0xfc00
#define UTF16_MOAR 0xd800 /* 0xD800..0xDBFF */
#define UTF16_CONT 0xdc00 /* 0xDC00..0xDBFF */

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

#define IsUcs2(wc)         (((wc)&UTF16_MASK) != UTF16_MOAR)
#define IsUtf16Cont(wc)    (((wc)&UTF16_MASK) == UTF16_CONT)
#define MergeUtf16(lo, hi) ((((lo)-0xD800) << 10) + ((hi)-0xDC00) + 0x10000)
#define EncodeUtf16(wc)                                    \
  (__builtin_expect(((0x0000 <= (wc) && (wc) <= 0xFFFF) || \
                     (0xE000 <= (wc) && (wc) <= 0xFFFF)),  \
                    1)                                     \
       ? (wc)                                              \
       : 0x10000 <= (wc) && (wc) <= 0x10FFFF               \
             ? (((((wc)-0x10000) >> 10) + 0xD800) |        \
                ((((wc)-0x10000) & 1023) + 0xDC00) << 16)  \
             : 0xFFFD)

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/errfuns.h */

#define COSMOPOLITAN_LIBC_SYSV_ERRFUNS_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

/**
 * @fileoverview Optimized error return paths.
 *
 * Saying this:
 *
 *     return einval();
 *
 * Instead of this:
 *
 *     errno = EINVAL;
 *     return -1;
 *
 * Allows the compiler to generate 11 fewer bytes of code each time.
 *
 * @return always -1
 * @see libc/sysv/errfuns.inc (for implementation)
 */

intptr_t einval(void) relegated;
intptr_t eperm(void) relegated;
intptr_t enoent(void) relegated;
intptr_t esrch(void) relegated;
intptr_t eintr(void) relegated;
intptr_t eio(void) relegated;
intptr_t enxio(void) relegated;
intptr_t e2big(void) relegated;
intptr_t enoexec(void) relegated;
intptr_t ebadf(void) relegated;
intptr_t echild(void) relegated;
intptr_t eagain(void) relegated;
intptr_t enomem(void) relegated;
intptr_t eacces(void) relegated;
intptr_t efault(void) relegated;
intptr_t enotblk(void) relegated;
intptr_t ebusy(void) relegated;
intptr_t eexist(void) relegated;
intptr_t exdev(void) relegated;
intptr_t enodev(void) relegated;
intptr_t enotdir(void) relegated;
intptr_t eisdir(void) relegated;
intptr_t enfile(void) relegated;
intptr_t emfile(void) relegated;
intptr_t enotty(void) relegated;
intptr_t enotsup(void) relegated;
intptr_t etxtbsy(void) relegated;
intptr_t efbig(void) relegated;
intptr_t enospc(void) relegated;
intptr_t espipe(void) relegated;
intptr_t erofs(void) relegated;
intptr_t emlink(void) relegated;
intptr_t epipe(void) relegated;
intptr_t edom(void) relegated;
intptr_t erange(void) relegated;
intptr_t edeadlk(void) relegated;
intptr_t enametoolong(void) relegated;
intptr_t enolck(void) relegated;
intptr_t enosys(void) relegated;
intptr_t enotempty(void) relegated;
intptr_t eloop(void) relegated;
intptr_t enomsg(void) relegated;
intptr_t eidrm(void) relegated;
intptr_t echrng(void) relegated;
intptr_t el2nsync(void) relegated;
intptr_t el3hlt(void) relegated;
intptr_t el3rst(void) relegated;
intptr_t elnrng(void) relegated;
intptr_t eunatch(void) relegated;
intptr_t enocsi(void) relegated;
intptr_t el2hlt(void) relegated;
intptr_t ebade(void) relegated;
intptr_t ebadr(void) relegated;
intptr_t exfull(void) relegated;
intptr_t enoano(void) relegated;
intptr_t ebadrqc(void) relegated;
intptr_t ebadslt(void) relegated;
intptr_t enostr(void) relegated;
intptr_t enodata(void) relegated;
intptr_t etime(void) relegated;
intptr_t enosr(void) relegated;
intptr_t enonet(void) relegated;
intptr_t enopkg(void) relegated;
intptr_t eremote(void) relegated;
intptr_t enolink(void) relegated;
intptr_t eadv(void) relegated;
intptr_t esrmnt(void) relegated;
intptr_t ecomm(void) relegated;
intptr_t eproto(void) relegated;
intptr_t emultihop(void) relegated;
intptr_t edotdot(void) relegated;
intptr_t ebadmsg(void) relegated;
intptr_t eoverflow(void) relegated;
intptr_t enotuniq(void) relegated;
intptr_t ebadfd(void) relegated;
intptr_t eremchg(void) relegated;
intptr_t elibacc(void) relegated;
intptr_t elibbad(void) relegated;
intptr_t elibscn(void) relegated;
intptr_t elibmax(void) relegated;
intptr_t elibexec(void) relegated;
intptr_t eilseq(void) relegated;
intptr_t erestart(void) relegated;
intptr_t estrpipe(void) relegated;
intptr_t eusers(void) relegated;
intptr_t enotsock(void) relegated;
intptr_t edestaddrreq(void) relegated;
intptr_t emsgsize(void) relegated;
intptr_t eprototype(void) relegated;
intptr_t enoprotoopt(void) relegated;
intptr_t eprotonosupport(void) relegated;
intptr_t esocktnosupport(void) relegated;
intptr_t eopnotsupp(void) relegated;
intptr_t epfnosupport(void) relegated;
intptr_t eafnosupport(void) relegated;
intptr_t eaddrinuse(void) relegated;
intptr_t eaddrnotavail(void) relegated;
intptr_t enetdown(void) relegated;
intptr_t enetunreach(void) relegated;
intptr_t enetreset(void) relegated;
intptr_t econnaborted(void) relegated;
intptr_t econnreset(void) relegated;
intptr_t enobufs(void) relegated;
intptr_t eisconn(void) relegated;
intptr_t enotconn(void) relegated;
intptr_t eshutdown(void) relegated;
intptr_t etoomanyrefs(void) relegated;
intptr_t etimedout(void) relegated;
intptr_t econnrefused(void) relegated;
intptr_t ehostdown(void) relegated;
intptr_t ehostunreach(void) relegated;
intptr_t ealready(void) relegated;
intptr_t einprogress(void) relegated;
intptr_t estale(void) relegated;
intptr_t euclean(void) relegated;
intptr_t enotnam(void) relegated;
intptr_t enavail(void) relegated;
intptr_t eisnam(void) relegated;
intptr_t eremoteio(void) relegated;
intptr_t edquot(void) relegated;
intptr_t enomedium(void) relegated;
intptr_t emediumtype(void) relegated;
intptr_t ecanceled(void) relegated;
intptr_t enokey(void) relegated;
intptr_t ekeyexpired(void) relegated;
intptr_t ekeyrevoked(void) relegated;
intptr_t ekeyrejected(void) relegated;
intptr_t eownerdead(void) relegated;
intptr_t enotrecoverable(void) relegated;
intptr_t erfkill(void) relegated;
intptr_t ehwpoison(void) relegated;

#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
#define __ERRFUN(FUNC)                              \
  ({                                                \
    intptr_t NegOne;                                \
    asm("call\t" FUNC : "=a"(NegOne), "=m"(errno)); \
    NegOne;                                         \
  })
#define einval()          __ERRFUN("einval")
#define eperm()           __ERRFUN("eperm")
#define enoent()          __ERRFUN("enoent")
#define esrch()           __ERRFUN("esrch")
#define eintr()           __ERRFUN("eintr")
#define eio()             __ERRFUN("eio")
#define enxio()           __ERRFUN("enxio")
#define e2big()           __ERRFUN("e2big")
#define enoexec()         __ERRFUN("enoexec")
#define ebadf()           __ERRFUN("ebadf")
#define echild()          __ERRFUN("echild")
#define eagain()          __ERRFUN("eagain")
#define enomem()          __ERRFUN("enomem")
#define eacces()          __ERRFUN("eacces")
#define efault()          __ERRFUN("efault")
#define enotblk()         __ERRFUN("enotblk")
#define ebusy()           __ERRFUN("ebusy")
#define eexist()          __ERRFUN("eexist")
#define exdev()           __ERRFUN("exdev")
#define enodev()          __ERRFUN("enodev")
#define enotdir()         __ERRFUN("enotdir")
#define eisdir()          __ERRFUN("eisdir")
#define enfile()          __ERRFUN("enfile")
#define emfile()          __ERRFUN("emfile")
#define enotty()          __ERRFUN("enotty")
#define enotsup()         __ERRFUN("enotsup")
#define etxtbsy()         __ERRFUN("etxtbsy")
#define efbig()           __ERRFUN("efbig")
#define enospc()          __ERRFUN("enospc")
#define espipe()          __ERRFUN("espipe")
#define erofs()           __ERRFUN("erofs")
#define emlink()          __ERRFUN("emlink")
#define epipe()           __ERRFUN("epipe")
#define edom()            __ERRFUN("edom")
#define erange()          __ERRFUN("erange")
#define edeadlk()         __ERRFUN("edeadlk")
#define enametoolong()    __ERRFUN("enametoolong")
#define enolck()          __ERRFUN("enolck")
#define enosys()          __ERRFUN("enosys")
#define enotempty()       __ERRFUN("enotempty")
#define eloop()           __ERRFUN("eloop")
#define enomsg()          __ERRFUN("enomsg")
#define eidrm()           __ERRFUN("eidrm")
#define echrng()          __ERRFUN("echrng")
#define el2nsync()        __ERRFUN("el2nsync")
#define el3hlt()          __ERRFUN("el3hlt")
#define el3rst()          __ERRFUN("el3rst")
#define elnrng()          __ERRFUN("elnrng")
#define eunatch()         __ERRFUN("eunatch")
#define enocsi()          __ERRFUN("enocsi")
#define el2hlt()          __ERRFUN("el2hlt")
#define ebade()           __ERRFUN("ebade")
#define ebadr()           __ERRFUN("ebadr")
#define exfull()          __ERRFUN("exfull")
#define enoano()          __ERRFUN("enoano")
#define ebadrqc()         __ERRFUN("ebadrqc")
#define ebadslt()         __ERRFUN("ebadslt")
#define enostr()          __ERRFUN("enostr")
#define enodata()         __ERRFUN("enodata")
#define etime()           __ERRFUN("etime")
#define enosr()           __ERRFUN("enosr")
#define enonet()          __ERRFUN("enonet")
#define enopkg()          __ERRFUN("enopkg")
#define eremote()         __ERRFUN("eremote")
#define enolink()         __ERRFUN("enolink")
#define eadv()            __ERRFUN("eadv")
#define esrmnt()          __ERRFUN("esrmnt")
#define ecomm()           __ERRFUN("ecomm")
#define eproto()          __ERRFUN("eproto")
#define emultihop()       __ERRFUN("emultihop")
#define edotdot()         __ERRFUN("edotdot")
#define ebadmsg()         __ERRFUN("ebadmsg")
#define eoverflow()       __ERRFUN("eoverflow")
#define enotuniq()        __ERRFUN("enotuniq")
#define ebadfd()          __ERRFUN("ebadfd")
#define eremchg()         __ERRFUN("eremchg")
#define elibacc()         __ERRFUN("elibacc")
#define elibbad()         __ERRFUN("elibbad")
#define elibscn()         __ERRFUN("elibscn")
#define elibmax()         __ERRFUN("elibmax")
#define elibexec()        __ERRFUN("elibexec")
#define eilseq()          __ERRFUN("eilseq")
#define erestart()        __ERRFUN("erestart")
#define estrpipe()        __ERRFUN("estrpipe")
#define eusers()          __ERRFUN("eusers")
#define enotsock()        __ERRFUN("enotsock")
#define edestaddrreq()    __ERRFUN("edestaddrreq")
#define emsgsize()        __ERRFUN("emsgsize")
#define eprototype()      __ERRFUN("eprototype")
#define enoprotoopt()     __ERRFUN("enoprotoopt")
#define eprotonosupport() __ERRFUN("eprotonosupport")
#define esocktnosupport() __ERRFUN("esocktnosupport")
#define eopnotsupp()      __ERRFUN("eopnotsupp")
#define epfnosupport()    __ERRFUN("epfnosupport")
#define eafnosupport()    __ERRFUN("eafnosupport")
#define eaddrinuse()      __ERRFUN("eaddrinuse")
#define eaddrnotavail()   __ERRFUN("eaddrnotavail")
#define enetdown()        __ERRFUN("enetdown")
#define enetunreach()     __ERRFUN("enetunreach")
#define enetreset()       __ERRFUN("enetreset")
#define econnaborted()    __ERRFUN("econnaborted")
#define econnreset()      __ERRFUN("econnreset")
#define enobufs()         __ERRFUN("enobufs")
#define eisconn()         __ERRFUN("eisconn")
#define enotconn()        __ERRFUN("enotconn")
#define eshutdown()       __ERRFUN("eshutdown")
#define etoomanyrefs()    __ERRFUN("etoomanyrefs")
#define etimedout()       __ERRFUN("etimedout")
#define econnrefused()    __ERRFUN("econnrefused")
#define ehostdown()       __ERRFUN("ehostdown")
#define ehostunreach()    __ERRFUN("ehostunreach")
#define ealready()        __ERRFUN("ealready")
#define einprogress()     __ERRFUN("einprogress")
#define estale()          __ERRFUN("estale")
#define euclean()         __ERRFUN("euclean")
#define enotnam()         __ERRFUN("enotnam")
#define enavail()         __ERRFUN("enavail")
#define eisnam()          __ERRFUN("eisnam")
#define eremoteio()       __ERRFUN("eremoteio")
#define edquot()          __ERRFUN("edquot")
#define enomedium()       __ERRFUN("enomedium")
#define emediumtype()     __ERRFUN("emediumtype")
#define ecanceled()       __ERRFUN("ecanceled")
#define enokey()          __ERRFUN("enokey")
#define ekeyexpired()     __ERRFUN("ekeyexpired")
#define ekeyrevoked()     __ERRFUN("ekeyrevoked")
#define ekeyrejected()    __ERRFUN("ekeyrejected")
#define eownerdead()      __ERRFUN("eownerdead")
#define enotrecoverable() __ERRFUN("enotrecoverable")
#define erfkill()         __ERRFUN("erfkill")
#define ehwpoison()       __ERRFUN("ehwpoison")
#endif

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/_posix.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS__POSIX_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long _POSIX_ADVISORY_INFO;
extern const long _POSIX_AIO_LISTIO_MAX;
extern const long _POSIX_AIO_MAX;
extern const long _POSIX_ARG_MAX;
extern const long _POSIX_ASYNCHRONOUS_IO;
extern const long _POSIX_BARRIERS;
extern const long _POSIX_CHILD_MAX;
extern const long _POSIX_CHOWN_RESTRICTED;
extern const long _POSIX_CLOCKRES_MIN;
extern const long _POSIX_CLOCK_SELECTION;
extern const long _POSIX_CPUTIME;
extern const long _POSIX_DELAYTIMER_MAX;
extern const long _POSIX_FSYNC;
extern const long _POSIX_HOST_NAME_MAX;
extern const long _POSIX_IPV6;
extern const long _POSIX_JOB_CONTROL;
extern const long _POSIX_LINK_MAX;
extern const long _POSIX_LOGIN_NAME_MAX;
extern const long _POSIX_MAPPED_FILES;
extern const long _POSIX_MAX_CANON;
extern const long _POSIX_MAX_INPUT;
extern const long _POSIX_MEMLOCK;
extern const long _POSIX_MEMLOCK_RANGE;
extern const long _POSIX_MEMORY_PROTECTION;
extern const long _POSIX_MESSAGE_PASSING;
extern const long _POSIX_MONOTONIC_CLOCK;
extern const long _POSIX_MQ_OPEN_MAX;
extern const long _POSIX_MQ_PRIO_MAX;
extern const long _POSIX_NAME_MAX;
extern const long _POSIX_NGROUPS_MAX;
extern const long _POSIX_NO_TRUNC;
extern const long _POSIX_OPEN_MAX;
extern const long _POSIX_PATH_MAX;
extern const long _POSIX_PIPE_BUF;
extern const long _POSIX_RAW_SOCKETS;
extern const long _POSIX_READER_WRITER_LOCKS;
extern const long _POSIX_REALTIME_SIGNALS;
extern const long _POSIX_REGEXP;
extern const long _POSIX_RE_DUP_MAX;
extern const long _POSIX_RTSIG_MAX;
extern const long _POSIX_SAVED_IDS;
extern const long _POSIX_SEMAPHORES;
extern const long _POSIX_SEM_NSEMS_MAX;
extern const long _POSIX_SEM_VALUE_MAX;
extern const long _POSIX_SHARED_MEMORY_OBJECTS;
extern const long _POSIX_SHELL;
extern const long _POSIX_SIGQUEUE_MAX;
extern const long _POSIX_SPAWN;
extern const long _POSIX_SPIN_LOCKS;
extern const long _POSIX_SSIZE_MAX;
extern const long _POSIX_SS_REPL_MAX;
extern const long _POSIX_STREAM_MAX;
extern const long _POSIX_SYMLINK_MAX;
extern const long _POSIX_SYMLOOP_MAX;
extern const long _POSIX_THREADS;
extern const long _POSIX_THREAD_ATTR_STACKADDR;
extern const long _POSIX_THREAD_ATTR_STACKSIZE;
extern const long _POSIX_THREAD_CPUTIME;
extern const long _POSIX_THREAD_DESTRUCTOR_ITERATIONS;
extern const long _POSIX_THREAD_KEYS_MAX;
extern const long _POSIX_THREAD_PRIORITY_SCHEDULING;
extern const long _POSIX_THREAD_PROCESS_SHARED;
extern const long _POSIX_THREAD_SAFE_FUNCTIONS;
extern const long _POSIX_THREAD_THREADS_MAX;
extern const long _POSIX_TIMEOUTS;
extern const long _POSIX_TIMERS;
extern const long _POSIX_TIMER_MAX;
extern const long _POSIX_TRACE_EVENT_NAME_MAX;
extern const long _POSIX_TRACE_NAME_MAX;
extern const long _POSIX_TRACE_SYS_MAX;
extern const long _POSIX_TRACE_USER_EVENT_MAX;
extern const long _POSIX_TTY_NAME_MAX;
extern const long _POSIX_TZNAME_MAX;
extern const long _POSIX_V6_LP64_OFF64;
extern const long _POSIX_V7_LP64_OFF64;
extern const long _POSIX_VDISABLE;
extern const long _POSIX_VERSION;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define _POSIX_ADVISORY_INFO         SYMBOLIC(_POSIX_ADVISORY_INFO)
#define _POSIX_AIO_LISTIO_MAX        SYMBOLIC(_POSIX_AIO_LISTIO_MAX)
#define _POSIX_AIO_MAX               SYMBOLIC(_POSIX_AIO_MAX)
#define _POSIX_ARG_MAX               SYMBOLIC(_POSIX_ARG_MAX)
#define _POSIX_ASYNCHRONOUS_IO       SYMBOLIC(_POSIX_ASYNCHRONOUS_IO)
#define _POSIX_BARRIERS              SYMBOLIC(_POSIX_BARRIERS)
#define _POSIX_CHILD_MAX             SYMBOLIC(_POSIX_CHILD_MAX)
#define _POSIX_CHOWN_RESTRICTED      SYMBOLIC(_POSIX_CHOWN_RESTRICTED)
#define _POSIX_CLOCKRES_MIN          SYMBOLIC(_POSIX_CLOCKRES_MIN)
#define _POSIX_CLOCK_SELECTION       SYMBOLIC(_POSIX_CLOCK_SELECTION)
#define _POSIX_CPUTIME               SYMBOLIC(_POSIX_CPUTIME)
#define _POSIX_DELAYTIMER_MAX        SYMBOLIC(_POSIX_DELAYTIMER_MAX)
#define _POSIX_FSYNC                 SYMBOLIC(_POSIX_FSYNC)
#define _POSIX_HOST_NAME_MAX         SYMBOLIC(_POSIX_HOST_NAME_MAX)
#define _POSIX_IPV6                  SYMBOLIC(_POSIX_IPV6)
#define _POSIX_JOB_CONTROL           SYMBOLIC(_POSIX_JOB_CONTROL)
#define _POSIX_LINK_MAX              SYMBOLIC(_POSIX_LINK_MAX)
#define _POSIX_LOGIN_NAME_MAX        SYMBOLIC(_POSIX_LOGIN_NAME_MAX)
#define _POSIX_MAPPED_FILES          SYMBOLIC(_POSIX_MAPPED_FILES)
#define _POSIX_MAX_CANON             SYMBOLIC(_POSIX_MAX_CANON)
#define _POSIX_MAX_INPUT             SYMBOLIC(_POSIX_MAX_INPUT)
#define _POSIX_MEMLOCK               SYMBOLIC(_POSIX_MEMLOCK)
#define _POSIX_MEMLOCK_RANGE         SYMBOLIC(_POSIX_MEMLOCK_RANGE)
#define _POSIX_MEMORY_PROTECTION     SYMBOLIC(_POSIX_MEMORY_PROTECTION)
#define _POSIX_MESSAGE_PASSING       SYMBOLIC(_POSIX_MESSAGE_PASSING)
#define _POSIX_MONOTONIC_CLOCK       SYMBOLIC(_POSIX_MONOTONIC_CLOCK)
#define _POSIX_MQ_OPEN_MAX           SYMBOLIC(_POSIX_MQ_OPEN_MAX)
#define _POSIX_MQ_PRIO_MAX           SYMBOLIC(_POSIX_MQ_PRIO_MAX)
#define _POSIX_NAME_MAX              SYMBOLIC(_POSIX_NAME_MAX)
#define _POSIX_NGROUPS_MAX           SYMBOLIC(_POSIX_NGROUPS_MAX)
#define _POSIX_NO_TRUNC              SYMBOLIC(_POSIX_NO_TRUNC)
#define _POSIX_OPEN_MAX              SYMBOLIC(_POSIX_OPEN_MAX)
#define _POSIX_PATH_MAX              SYMBOLIC(_POSIX_PATH_MAX)
#define _POSIX_PIPE_BUF              SYMBOLIC(_POSIX_PIPE_BUF)
#define _POSIX_RAW_SOCKETS           SYMBOLIC(_POSIX_RAW_SOCKETS)
#define _POSIX_READER_WRITER_LOCKS   SYMBOLIC(_POSIX_READER_WRITER_LOCKS)
#define _POSIX_REALTIME_SIGNALS      SYMBOLIC(_POSIX_REALTIME_SIGNALS)
#define _POSIX_REGEXP                SYMBOLIC(_POSIX_REGEXP)
#define _POSIX_RE_DUP_MAX            SYMBOLIC(_POSIX_RE_DUP_MAX)
#define _POSIX_RTSIG_MAX             SYMBOLIC(_POSIX_RTSIG_MAX)
#define _POSIX_SAVED_IDS             SYMBOLIC(_POSIX_SAVED_IDS)
#define _POSIX_SEMAPHORES            SYMBOLIC(_POSIX_SEMAPHORES)
#define _POSIX_SEM_NSEMS_MAX         SYMBOLIC(_POSIX_SEM_NSEMS_MAX)
#define _POSIX_SEM_VALUE_MAX         SYMBOLIC(_POSIX_SEM_VALUE_MAX)
#define _POSIX_SHARED_MEMORY_OBJECTS SYMBOLIC(_POSIX_SHARED_MEMORY_OBJECTS)
#define _POSIX_SHELL                 SYMBOLIC(_POSIX_SHELL)
#define _POSIX_SIGQUEUE_MAX          SYMBOLIC(_POSIX_SIGQUEUE_MAX)
#define _POSIX_SPAWN                 SYMBOLIC(_POSIX_SPAWN)
#define _POSIX_SPIN_LOCKS            SYMBOLIC(_POSIX_SPIN_LOCKS)
#define _POSIX_SSIZE_MAX             SYMBOLIC(_POSIX_SSIZE_MAX)
#define _POSIX_SS_REPL_MAX           SYMBOLIC(_POSIX_SS_REPL_MAX)
#define _POSIX_STREAM_MAX            SYMBOLIC(_POSIX_STREAM_MAX)
#define _POSIX_SYMLINK_MAX           SYMBOLIC(_POSIX_SYMLINK_MAX)
#define _POSIX_SYMLOOP_MAX           SYMBOLIC(_POSIX_SYMLOOP_MAX)
#define _POSIX_THREADS               SYMBOLIC(_POSIX_THREADS)
#define _POSIX_THREAD_ATTR_STACKADDR SYMBOLIC(_POSIX_THREAD_ATTR_STACKADDR)
#define _POSIX_THREAD_ATTR_STACKSIZE SYMBOLIC(_POSIX_THREAD_ATTR_STACKSIZE)
#define _POSIX_THREAD_CPUTIME        SYMBOLIC(_POSIX_THREAD_CPUTIME)
#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS \
  SYMBOLIC(_POSIX_THREAD_DESTRUCTOR_ITERATIONS)
#define _POSIX_THREAD_KEYS_MAX SYMBOLIC(_POSIX_THREAD_KEYS_MAX)
#define _POSIX_THREAD_PRIORITY_SCHEDULING \
  SYMBOLIC(_POSIX_THREAD_PRIORITY_SCHEDULING)
#define _POSIX_THREAD_PROCESS_SHARED SYMBOLIC(_POSIX_THREAD_PROCESS_SHARED)
#define _POSIX_THREAD_SAFE_FUNCTIONS SYMBOLIC(_POSIX_THREAD_SAFE_FUNCTIONS)
#define _POSIX_THREAD_THREADS_MAX    SYMBOLIC(_POSIX_THREAD_THREADS_MAX)
#define _POSIX_TIMEOUTS              SYMBOLIC(_POSIX_TIMEOUTS)
#define _POSIX_TIMERS                SYMBOLIC(_POSIX_TIMERS)
#define _POSIX_TIMER_MAX             SYMBOLIC(_POSIX_TIMER_MAX)
#define _POSIX_TRACE_EVENT_NAME_MAX  SYMBOLIC(_POSIX_TRACE_EVENT_NAME_MAX)
#define _POSIX_TRACE_NAME_MAX        SYMBOLIC(_POSIX_TRACE_NAME_MAX)
#define _POSIX_TRACE_SYS_MAX         SYMBOLIC(_POSIX_TRACE_SYS_MAX)
#define _POSIX_TRACE_USER_EVENT_MAX  SYMBOLIC(_POSIX_TRACE_USER_EVENT_MAX)
#define _POSIX_TTY_NAME_MAX          SYMBOLIC(_POSIX_TTY_NAME_MAX)
#define _POSIX_TZNAME_MAX            SYMBOLIC(_POSIX_TZNAME_MAX)
#define _POSIX_V6_LP64_OFF64         SYMBOLIC(_POSIX_V6_LP64_OFF64)
#define _POSIX_V7_LP64_OFF64         SYMBOLIC(_POSIX_V7_LP64_OFF64)
#define _POSIX_VDISABLE              SYMBOLIC(_POSIX_VDISABLE)
#define _POSIX_VERSION               SYMBOLIC(_POSIX_VERSION)



/*!BEGIN libc/sysv/consts/_posix2.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS__POSIX2_H_

#define _POSIX2_BC_BASE_MAX SYMBOLIC(_POSIX2_BC_BASE_MAX)
#define _POSIX2_BC_DIM_MAX SYMBOLIC(_POSIX2_BC_DIM_MAX)
#define _POSIX2_BC_SCALE_MAX SYMBOLIC(_POSIX2_BC_SCALE_MAX)
#define _POSIX2_BC_STRING_MAX SYMBOLIC(_POSIX2_BC_STRING_MAX)
#define _POSIX2_CHARCLASS_NAME_MAX SYMBOLIC(_POSIX2_CHARCLASS_NAME_MAX)
#define _POSIX2_COLL_WEIGHTS_MAX SYMBOLIC(_POSIX2_COLL_WEIGHTS_MAX)
#define _POSIX2_C_BIND SYMBOLIC(_POSIX2_C_BIND)
#define _POSIX2_EXPR_NEST_MAX SYMBOLIC(_POSIX2_EXPR_NEST_MAX)
#define _POSIX2_LINE_MAX SYMBOLIC(_POSIX2_LINE_MAX)
#define _POSIX2_RE_DUP_MAX SYMBOLIC(_POSIX2_RE_DUP_MAX)
#define _POSIX2_VERSION SYMBOLIC(_POSIX2_VERSION)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long _POSIX2_BC_BASE_MAX;
extern const long _POSIX2_BC_DIM_MAX;
extern const long _POSIX2_BC_SCALE_MAX;
extern const long _POSIX2_BC_STRING_MAX;
extern const long _POSIX2_CHARCLASS_NAME_MAX;
extern const long _POSIX2_COLL_WEIGHTS_MAX;
extern const long _POSIX2_C_BIND;
extern const long _POSIX2_EXPR_NEST_MAX;
extern const long _POSIX2_LINE_MAX;
extern const long _POSIX2_RE_DUP_MAX;
extern const long _POSIX2_VERSION;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/af.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_AF_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long AF_ALG;
extern const long AF_APPLETALK;
extern const long AF_ASH;
extern const long AF_ATMPVC;
extern const long AF_ATMSVC;
extern const long AF_AX25;
extern const long AF_BLUETOOTH;
extern const long AF_BRIDGE;
extern const long AF_CAIF;
extern const long AF_CAN;
extern const long AF_ECONET;
extern const long AF_FILE;
extern const long AF_IB;
extern const long AF_IEEE802154;
extern const long AF_INET6;
extern const long AF_INET;
extern const long AF_IPX;
extern const long AF_IRDA;
extern const long AF_ISDN;
extern const long AF_IUCV;
extern const long AF_KCM;
extern const long AF_KEY;
extern const long AF_LLC;
extern const long AF_LOCAL;
extern const long AF_MAX;
extern const long AF_MPLS;
extern const long AF_NETBEUI;
extern const long AF_NETLINK;
extern const long AF_NETROM;
extern const long AF_NFC;
extern const long AF_PACKET;
extern const long AF_PHONET;
extern const long AF_PPPOX;
extern const long AF_RDS;
extern const long AF_ROSE;
extern const long AF_ROUTE;
extern const long AF_RXRPC;
extern const long AF_SECURITY;
extern const long AF_SNA;
extern const long AF_TIPC;
extern const long AF_UNIX;
extern const long AF_UNSPEC;
extern const long AF_VSOCK;
extern const long AF_WANPIPE;
extern const long AF_X25;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define AF_ALG SYMBOLIC(AF_ALG)
#define AF_APPLETALK SYMBOLIC(AF_APPLETALK)
#define AF_ASH SYMBOLIC(AF_ASH)
#define AF_ATMPVC SYMBOLIC(AF_ATMPVC)
#define AF_ATMSVC SYMBOLIC(AF_ATMSVC)
#define AF_AX25 SYMBOLIC(AF_AX25)
#define AF_BLUETOOTH SYMBOLIC(AF_BLUETOOTH)
#define AF_BRIDGE SYMBOLIC(AF_BRIDGE)
#define AF_CAIF SYMBOLIC(AF_CAIF)
#define AF_CAN SYMBOLIC(AF_CAN)
#define AF_ECONET SYMBOLIC(AF_ECONET)
#define AF_FILE SYMBOLIC(AF_FILE)
#define AF_IB SYMBOLIC(AF_IB)
#define AF_IEEE802154 SYMBOLIC(AF_IEEE802154)
#define AF_INET LITERALLY(2)
#define AF_INET6 SYMBOLIC(AF_INET6)
#define AF_IPX SYMBOLIC(AF_IPX)
#define AF_IRDA SYMBOLIC(AF_IRDA)
#define AF_ISDN SYMBOLIC(AF_ISDN)
#define AF_IUCV SYMBOLIC(AF_IUCV)
#define AF_KCM SYMBOLIC(AF_KCM)
#define AF_KEY SYMBOLIC(AF_KEY)
#define AF_LLC SYMBOLIC(AF_LLC)
#define AF_LOCAL SYMBOLIC(AF_LOCAL)
#define AF_MAX SYMBOLIC(AF_MAX)
#define AF_MPLS SYMBOLIC(AF_MPLS)
#define AF_NETBEUI SYMBOLIC(AF_NETBEUI)
#define AF_NETLINK SYMBOLIC(AF_NETLINK)
#define AF_NETROM SYMBOLIC(AF_NETROM)
#define AF_NFC SYMBOLIC(AF_NFC)
#define AF_PACKET SYMBOLIC(AF_PACKET)
#define AF_PHONET SYMBOLIC(AF_PHONET)
#define AF_PPPOX SYMBOLIC(AF_PPPOX)
#define AF_RDS SYMBOLIC(AF_RDS)
#define AF_ROSE SYMBOLIC(AF_ROSE)
#define AF_ROUTE SYMBOLIC(AF_ROUTE)
#define AF_RXRPC SYMBOLIC(AF_RXRPC)
#define AF_SECURITY SYMBOLIC(AF_SECURITY)
#define AF_SNA SYMBOLIC(AF_SNA)
#define AF_TIPC SYMBOLIC(AF_TIPC)
#define AF_UNIX LITERALLY(1)
#define AF_UNSPEC LITERALLY(0)
#define AF_VSOCK SYMBOLIC(AF_VSOCK)
#define AF_WANPIPE SYMBOLIC(AF_WANPIPE)
#define AF_X25 SYMBOLIC(AF_X25)



/*!BEGIN libc/sysv/consts/ai.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_AI_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long AI_ADDRCONFIG;
extern const long AI_ALL;
extern const long AI_CANONNAME;
extern const long AI_NUMERICHOST;
extern const long AI_NUMERICSERV;
extern const long AI_PASSIVE;
extern const long AI_V4MAPPED;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define AI_ADDRCONFIG SYMBOLIC(AI_ADDRCONFIG)
#define AI_ALL SYMBOLIC(AI_ALL)
#define AI_CANONNAME LITERALLY(2)
#define AI_NUMERICHOST LITERALLY(4)
#define AI_NUMERICSERV SYMBOLIC(AI_NUMERICSERV)
#define AI_PASSIVE LITERALLY(1)
#define AI_V4MAPPED SYMBOLIC(AI_V4MAPPED)



/*!BEGIN libc/sysv/consts/arphrd.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_ARPHRD_H_

#define ARPHRD_ETHER SYMBOLIC(ARPHRD_ETHER)
#define ARPHRD_FCFABRIC SYMBOLIC(ARPHRD_FCFABRIC)
#define ARPHRD_IEEE80211 SYMBOLIC(ARPHRD_IEEE80211)
#define ARPHRD_IEEE80211_PRISM SYMBOLIC(ARPHRD_IEEE80211_PRISM)
#define ARPHRD_IEEE80211_RADIOTAP SYMBOLIC(ARPHRD_IEEE80211_RADIOTAP)
#define ARPHRD_IEEE802154 SYMBOLIC(ARPHRD_IEEE802154)
#define ARPHRD_IEEE802_TR SYMBOLIC(ARPHRD_IEEE802_TR)
#define ARPHRD_LOCALTLK SYMBOLIC(ARPHRD_LOCALTLK)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long ARPHRD_ETHER;
extern const long ARPHRD_FCFABRIC;
extern const long ARPHRD_IEEE80211;
extern const long ARPHRD_IEEE80211_PRISM;
extern const long ARPHRD_IEEE80211_RADIOTAP;
extern const long ARPHRD_IEEE802154;
extern const long ARPHRD_IEEE802_TR;
extern const long ARPHRD_LOCALTLK;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/at.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_AT_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

/**
 * @fileoverview AT_xxx constants for fcntl(), fopenat(), etc..
 * @see libc/sysv/consts/auxv.h for getauxval() constants
 */

extern const long AT_FDCWD;
extern const long AT_SYMLINK_FOLLOW;
extern const long AT_SYMLINK_NOFOLLOW;
extern const long AT_REMOVEDIR;
extern const long AT_EACCESS;
extern const long AT_EMPTY_PATH;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define AT_FDCWD            SYMBOLIC(AT_FDCWD)
#define AT_SYMLINK_FOLLOW   SYMBOLIC(AT_SYMLINK_FOLLOW)
#define AT_SYMLINK_NOFOLLOW SYMBOLIC(AT_SYMLINK_NOFOLLOW)
#define AT_REMOVEDIR        SYMBOLIC(AT_REMOVEDIR)
#define AT_EACCESS          SYMBOLIC(AT_EACCESS)
#define AT_EMPTY_PATH       SYMBOLIC(AT_EMPTY_PATH)



/*!BEGIN libc/sysv/consts/blk.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_BLK_H_

#define BLK_BYTECOUNT SYMBOLIC(BLK_BYTECOUNT)
#define BLK_EOF SYMBOLIC(BLK_EOF)
#define BLK_EOR SYMBOLIC(BLK_EOR)
#define BLK_ERRORS SYMBOLIC(BLK_ERRORS)
#define BLK_RESTART SYMBOLIC(BLK_RESTART)

#define BLKBSZGET SYMBOLIC(BLKBSZGET)
#define BLKBSZSET SYMBOLIC(BLKBSZSET)
#define BLKFLSBUF SYMBOLIC(BLKFLSBUF)
#define BLKFRAGET SYMBOLIC(BLKFRAGET)
#define BLKFRASET SYMBOLIC(BLKFRASET)
#define BLKGETSIZE SYMBOLIC(BLKGETSIZE)
#define BLKGETSIZE64 SYMBOLIC(BLKGETSIZE64)
#define BLKRAGET SYMBOLIC(BLKRAGET)
#define BLKRASET SYMBOLIC(BLKRASET)
#define BLKROGET SYMBOLIC(BLKROGET)
#define BLKROSET SYMBOLIC(BLKROSET)
#define BLKRRPART SYMBOLIC(BLKRRPART)
#define BLKSECTGET SYMBOLIC(BLKSECTGET)
#define BLKSECTSET SYMBOLIC(BLKSECTSET)
#define BLKSSZGET SYMBOLIC(BLKSSZGET)
#define BLKTYPE SYMBOLIC(BLKTYPE)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long BLK_BYTECOUNT;
extern const long BLK_EOF;
extern const long BLK_EOR;
extern const long BLK_ERRORS;
extern const long BLK_RESTART;

extern const long BLKBSZGET;
extern const long BLKBSZSET;
extern const long BLKFLSBUF;
extern const long BLKFRAGET;
extern const long BLKFRASET;
extern const long BLKGETSIZE64;
extern const long BLKGETSIZE;
extern const long BLKRAGET;
extern const long BLKRASET;
extern const long BLKROGET;
extern const long BLKROSET;
extern const long BLKRRPART;
extern const long BLKSECTGET;
extern const long BLKSECTSET;
extern const long BLKSSZGET;
extern const long BLKTYPE;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/bus.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_BUS_H_

#define BUS_ADRALN SYMBOLIC(BUS_ADRALN)
#define BUS_ADRERR SYMBOLIC(BUS_ADRERR)
#define BUS_DEVICE_RESET SYMBOLIC(BUS_DEVICE_RESET)
#define BUS_MCEERR_AO SYMBOLIC(BUS_MCEERR_AO)
#define BUS_MCEERR_AR SYMBOLIC(BUS_MCEERR_AR)
#define BUS_OBJERR SYMBOLIC(BUS_OBJERR)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long BUS_ADRALN;
extern const long BUS_ADRERR;
extern const long BUS_DEVICE_RESET;
extern const long BUS_MCEERR_AO;
extern const long BUS_MCEERR_AR;
extern const long BUS_OBJERR;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/c.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_C_H_

#define C_IRGRP SYMBOLIC(C_IRGRP)
#define C_IROTH SYMBOLIC(C_IROTH)
#define C_IRUSR SYMBOLIC(C_IRUSR)
#define C_ISBLK SYMBOLIC(C_ISBLK)
#define C_ISCHR SYMBOLIC(C_ISCHR)
#define C_ISCTG SYMBOLIC(C_ISCTG)
#define C_ISDIR SYMBOLIC(C_ISDIR)
#define C_ISFIFO SYMBOLIC(C_ISFIFO)
#define C_ISGID SYMBOLIC(C_ISGID)
#define C_ISLNK SYMBOLIC(C_ISLNK)
#define C_ISREG SYMBOLIC(C_ISREG)
#define C_ISSOCK SYMBOLIC(C_ISSOCK)
#define C_ISUID SYMBOLIC(C_ISUID)
#define C_ISVTX SYMBOLIC(C_ISVTX)
#define C_IWGRP SYMBOLIC(C_IWGRP)
#define C_IWOTH SYMBOLIC(C_IWOTH)
#define C_IWUSR SYMBOLIC(C_IWUSR)
#define C_IXGRP SYMBOLIC(C_IXGRP)
#define C_IXOTH SYMBOLIC(C_IXOTH)
#define C_IXUSR SYMBOLIC(C_IXUSR)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long C_IRGRP;
extern const long C_IROTH;
extern const long C_IRUSR;
extern const long C_ISBLK;
extern const long C_ISCHR;
extern const long C_ISCTG;
extern const long C_ISDIR;
extern const long C_ISFIFO;
extern const long C_ISGID;
extern const long C_ISLNK;
extern const long C_ISREG;
extern const long C_ISSOCK;
extern const long C_ISUID;
extern const long C_ISVTX;
extern const long C_IWGRP;
extern const long C_IWOTH;
extern const long C_IWUSR;
extern const long C_IXGRP;
extern const long C_IXOTH;
extern const long C_IXUSR;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/cld.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_CLD_H_

#define CLD_CONTINUED 6
#define CLD_DUMPED    3
#define CLD_EXITED    1
#define CLD_KILLED    2
#define CLD_STOPPED   5
#define CLD_TRAPPED   4



/*!BEGIN libc/sysv/consts/clock.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_CLOCK_H_

#define CLOCK_BOOTTIME SYMBOLIC(CLOCK_BOOTTIME)
#define CLOCK_BOOTTIME_ALARM SYMBOLIC(CLOCK_BOOTTIME_ALARM)
#define CLOCK_MONOTONIC SYMBOLIC(CLOCK_MONOTONIC)
#define CLOCK_MONOTONIC_COARSE SYMBOLIC(CLOCK_MONOTONIC_COARSE)
#define CLOCK_MONOTONIC_RAW SYMBOLIC(CLOCK_MONOTONIC_RAW)
#define CLOCK_PROCESS_CPUTIME_ID SYMBOLIC(CLOCK_PROCESS_CPUTIME_ID)
#define CLOCK_REALTIME SYMBOLIC(CLOCK_REALTIME)
#define CLOCK_REALTIME_ALARM SYMBOLIC(CLOCK_REALTIME_ALARM)
#define CLOCK_REALTIME_COARSE SYMBOLIC(CLOCK_REALTIME_COARSE)
#define CLOCK_TAI SYMBOLIC(CLOCK_TAI)
#define CLOCK_THREAD_CPUTIME_ID SYMBOLIC(CLOCK_THREAD_CPUTIME_ID)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long CLOCK_BOOTTIME;
extern const long CLOCK_BOOTTIME_ALARM;
extern const long CLOCK_MONOTONIC;
extern const long CLOCK_MONOTONIC_COARSE;
extern const long CLOCK_MONOTONIC_RAW;
extern const long CLOCK_PROCESS_CPUTIME_ID;
extern const long CLOCK_REALTIME;
extern const long CLOCK_REALTIME_ALARM;
extern const long CLOCK_REALTIME_COARSE;
extern const long CLOCK_TAI;
extern const long CLOCK_THREAD_CPUTIME_ID;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/dt.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_DT_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long DT_UNKNOWN;
extern const long DT_FIFO;
extern const long DT_CHR;
extern const long DT_DIR;
extern const long DT_BLK;
extern const long DT_REG;
extern const long DT_LNK;
extern const long DT_SOCK;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define DT_UNKNOWN LITERALLY(0)
#define DT_FIFO    LITERALLY(1)
#define DT_CHR     LITERALLY(2)
#define DT_DIR     LITERALLY(4)
#define DT_BLK     LITERALLY(6)
#define DT_REG     LITERALLY(8)
#define DT_LNK     LITERALLY(10)
#define DT_SOCK    LITERALLY(12)



/*!BEGIN libc/sysv/consts/epoll.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_EPOLL_H_


/*!BEGIN libc/sysv/consts/o.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_O_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long O_ACCMODE;
extern const long O_APPEND;
extern const long O_ASYNC;
extern const long O_CLOEXEC;
extern const long O_CREAT;
extern const long O_DIRECT;
extern const long O_DIRECTORY;
extern const long O_DSYNC;
extern const long O_EXCL;
extern const long O_EXEC;
extern const long O_LARGEFILE;
extern const long O_NDELAY;
extern const long O_NOATIME;
extern const long O_NOCTTY;
extern const long O_NOFOLLOW;
extern const long O_NONBLOCK;
extern const long O_PATH;
extern const long O_RDONLY;
extern const long O_RDWR;
extern const long O_RSYNC;
extern const long O_SPARSE;
extern const long O_SYNC;
extern const long O_TMPFILE;
extern const long O_TRUNC;
extern const long O_TTY_INIT;
extern const long O_WRONLY;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define O_ACCMODE SYMBOLIC(O_ACCMODE)
#define O_APPEND SYMBOLIC(O_APPEND)
#define O_ASYNC SYMBOLIC(O_ASYNC)
#define O_CLOEXEC SYMBOLIC(O_CLOEXEC)
#define O_CREAT SYMBOLIC(O_CREAT)
#define O_DIRECT SYMBOLIC(O_DIRECT)
#define O_DIRECTORY SYMBOLIC(O_DIRECTORY)
#define O_DSYNC SYMBOLIC(O_DSYNC)
#define O_EXCL SYMBOLIC(O_EXCL)
#define O_EXEC SYMBOLIC(O_EXEC)
#define O_LARGEFILE SYMBOLIC(O_LARGEFILE)
#define O_NDELAY SYMBOLIC(O_NDELAY)
#define O_NOATIME SYMBOLIC(O_NOATIME)
#define O_NOCTTY SYMBOLIC(O_NOCTTY)
#define O_NOFOLLOW SYMBOLIC(O_NOFOLLOW)
#define O_NONBLOCK SYMBOLIC(O_NONBLOCK)
#define O_PATH SYMBOLIC(O_PATH)
#define O_RDONLY SYMBOLIC(O_RDONLY)
#define O_RDWR SYMBOLIC(O_RDWR)
#define O_RSYNC SYMBOLIC(O_RSYNC)
#define O_SPARSE SYMBOLIC(O_SPARSE)
#define O_SYNC SYMBOLIC(O_SYNC)
#define O_TMPFILE SYMBOLIC(O_TMPFILE)
#define O_TRUNC SYMBOLIC(O_TRUNC)
#define O_TTY_INIT SYMBOLIC(O_TTY_INIT)
#define O_WRONLY SYMBOLIC(O_WRONLY)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long EPOLL_CLOEXEC;

extern const long EPOLL_CTL_ADD;
extern const long EPOLL_CTL_DEL;
extern const long EPOLL_CTL_MOD;

extern const long EPOLLIN;
extern const long EPOLLPRI;
extern const long EPOLLOUT;
extern const long EPOLLERR;
extern const long EPOLLHUP;
extern const long EPOLLRDNORM;
extern const long EPOLLRDBAND;
extern const long EPOLLWRNORM;
extern const long EPOLLWRBAND;
extern const long EPOLLMSG;
extern const long EPOLLRDHUP;
extern const long EPOLLEXCLUSIVE;
extern const long EPOLLWAKEUP;
extern const long EPOLLONESHOT;
extern const long EPOLLET;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define EPOLL_CLOEXEC O_CLOEXEC

#define EPOLL_CTL_ADD LITERALLY(1)
#define EPOLL_CTL_DEL LITERALLY(2)
#define EPOLL_CTL_MOD LITERALLY(3)

#define EPOLLIN        LITERALLY(1)
#define EPOLLPRI       LITERALLY(2)
#define EPOLLOUT       LITERALLY(4)
#define EPOLLERR       LITERALLY(8)
#define EPOLLHUP       LITERALLY(0x10)
#define EPOLLRDNORM    LITERALLY(0x40)
#define EPOLLRDBAND    LITERALLY(0x80)
#define EPOLLWRNORM    LITERALLY(0x0100)
#define EPOLLWRBAND    LITERALLY(0x0200)
#define EPOLLMSG       LITERALLY(0x0400)
#define EPOLLRDHUP     LITERALLY(0x2000)
#define EPOLLEXCLUSIVE LITERALLY(0x10000000)
#define EPOLLWAKEUP    LITERALLY(0x20000000)
#define EPOLLONESHOT   LITERALLY(0x40000000)
#define EPOLLET        LITERALLY(0x80000000)



/*!BEGIN libc/sysv/consts/eth.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_ETH_H_

#define ETH_P_CUST SYMBOLIC(ETH_P_CUST)
#define ETH_P_DDCMP SYMBOLIC(ETH_P_DDCMP)
#define ETH_P_DEC SYMBOLIC(ETH_P_DEC)
#define ETH_P_DIAG SYMBOLIC(ETH_P_DIAG)
#define ETH_P_DNA_DL SYMBOLIC(ETH_P_DNA_DL)
#define ETH_P_DNA_RC SYMBOLIC(ETH_P_DNA_RC)
#define ETH_P_DNA_RT SYMBOLIC(ETH_P_DNA_RT)
#define ETH_P_IEEE802154 SYMBOLIC(ETH_P_IEEE802154)
#define ETH_P_LAT SYMBOLIC(ETH_P_LAT)
#define ETH_P_LOCALTALK SYMBOLIC(ETH_P_LOCALTALK)
#define ETH_P_PPP_MP SYMBOLIC(ETH_P_PPP_MP)
#define ETH_P_RARP SYMBOLIC(ETH_P_RARP)
#define ETH_P_SCA SYMBOLIC(ETH_P_SCA)
#define ETH_P_WAN_PPP SYMBOLIC(ETH_P_WAN_PPP)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long ETH_P_CUST;
extern const long ETH_P_DDCMP;
extern const long ETH_P_DEC;
extern const long ETH_P_DIAG;
extern const long ETH_P_DNA_DL;
extern const long ETH_P_DNA_RC;
extern const long ETH_P_DNA_RT;
extern const long ETH_P_IEEE802154;
extern const long ETH_P_LAT;
extern const long ETH_P_LOCALTALK;
extern const long ETH_P_PPP_MP;
extern const long ETH_P_RARP;
extern const long ETH_P_SCA;
extern const long ETH_P_WAN_PPP;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/ex.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_EX_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long EX_CANTCREAT;
extern const long EX_CONFIG;
extern const long EX_DATAERR;
extern const long EX_IOERR;
extern const long EX_NOHOST;
extern const long EX_NOINPUT;
extern const long EX_NOPERM;
extern const long EX_NOUSER;
extern const long EX_OK;
extern const long EX_OSERR;
extern const long EX_OSFILE;
extern const long EX_PROTOCOL;
extern const long EX_SOFTWARE;
extern const long EX_TEMPFAIL;
extern const long EX_UNAVAILABLE;
extern const long EX_USAGE;
extern const long EX__BASE;
extern const long EX__MAX;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define EX_CANTCREAT LITERALLY(73)
#define EX_CONFIG LITERALLY(78)
#define EX_DATAERR LITERALLY(65)
#define EX_IOERR LITERALLY(74)
#define EX_NOHOST LITERALLY(68)
#define EX_NOINPUT LITERALLY(66)
#define EX_NOPERM LITERALLY(77)
#define EX_NOUSER LITERALLY(67)
#define EX_OK LITERALLY(0)
#define EX_OSERR LITERALLY(71)
#define EX_OSFILE LITERALLY(72)
#define EX_PROTOCOL LITERALLY(76)
#define EX_SOFTWARE LITERALLY(70)
#define EX_TEMPFAIL LITERALLY(75)
#define EX_UNAVAILABLE LITERALLY(69)
#define EX_USAGE LITERALLY(64)
#define EX__BASE LITERALLY(64)
#define EX__MAX LITERALLY(78)



/*!BEGIN libc/sysv/consts/exit.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_EXIT_H_

#define EXIT_FAILURE SYMBOLIC(EXIT_FAILURE)
#define EXIT_SUCCESS SYMBOLIC(EXIT_SUCCESS)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long EXIT_FAILURE;
extern const long EXIT_SUCCESS;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/f.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_F_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long F_DUPFD;
extern const long F_DUPFD_CLOEXEC;
extern const long F_GETFD;
extern const long F_GETFL;
extern const long F_GETLEASE;
extern const long F_GETLK64;
extern const long F_GETLK;
extern const long F_GETOWN;
extern const long F_GETOWN_EX;
extern const long F_GETPIPE_SZ;
extern const long F_GETSIG;
extern const long F_LOCK;
extern const long F_NOTIFY;
extern const long F_OFD_GETLK;
extern const long F_OFD_SETLK;
extern const long F_OFD_SETLKW;
extern const long F_RDLCK;
extern const long F_SETFD;
extern const long F_SETFL;
extern const long F_SETLEASE;
extern const long F_SETLK64;
extern const long F_SETLK;
extern const long F_SETLKW64;
extern const long F_SETLKW;
extern const long F_SETOWN;
extern const long F_SETOWN_EX;
extern const long F_SETPIPE_SZ;
extern const long F_SETSIG;
extern const long F_TEST;
extern const long F_TLOCK;
extern const long F_ULOCK;
extern const long F_UNLCK;
extern const long F_WRLCK;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define F_GETFD LITERALLY(1)
#define F_SETFD LITERALLY(2)
#define F_GETFL LITERALLY(3)
#define F_SETFL LITERALLY(4)

#define F_DUPFD SYMBOLIC(F_DUPFD)
#define F_DUPFD_CLOEXEC SYMBOLIC(F_DUPFD_CLOEXEC)
#define F_GETLEASE SYMBOLIC(F_GETLEASE)
#define F_GETLK SYMBOLIC(F_GETLK)
#define F_GETLK64 SYMBOLIC(F_GETLK64)
#define F_GETOWN SYMBOLIC(F_GETOWN)
#define F_GETOWN_EX SYMBOLIC(F_GETOWN_EX)
#define F_GETPIPE_SZ SYMBOLIC(F_GETPIPE_SZ)
#define F_GETSIG SYMBOLIC(F_GETSIG)
#define F_LOCK SYMBOLIC(F_LOCK)
#define F_NOTIFY SYMBOLIC(F_NOTIFY)
#define F_OFD_GETLK SYMBOLIC(F_OFD_GETLK)
#define F_OFD_SETLK SYMBOLIC(F_OFD_SETLK)
#define F_OFD_SETLKW SYMBOLIC(F_OFD_SETLKW)
#define F_RDLCK SYMBOLIC(F_RDLCK)
#define F_SETLEASE SYMBOLIC(F_SETLEASE)
#define F_SETLK SYMBOLIC(F_SETLK)
#define F_SETLK64 SYMBOLIC(F_SETLK64)
#define F_SETLKW SYMBOLIC(F_SETLKW)
#define F_SETLKW64 SYMBOLIC(F_SETLKW64)
#define F_SETOWN SYMBOLIC(F_SETOWN)
#define F_SETOWN_EX SYMBOLIC(F_SETOWN_EX)
#define F_SETPIPE_SZ SYMBOLIC(F_SETPIPE_SZ)
#define F_SETSIG SYMBOLIC(F_SETSIG)
#define F_TEST SYMBOLIC(F_TEST)
#define F_TLOCK SYMBOLIC(F_TLOCK)
#define F_ULOCK SYMBOLIC(F_ULOCK)
#define F_UNLCK SYMBOLIC(F_UNLCK)
#define F_WRLCK SYMBOLIC(F_WRLCK)



/*!BEGIN libc/sysv/consts/falloc.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_FALLOC_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long FALLOC_FL_KEEP_SIZE;
extern const long FALLOC_FL_PUNCH_HOLE;
extern const long FALLOC_FL_NO_HIDE_STALE;
extern const long FALLOC_FL_COLLAPSE_RANGE;
extern const long FALLOC_FL_ZERO_RANGE;
extern const long FALLOC_FL_INSERT_RANGE;
extern const long FALLOC_FL_UNSHARE_RANGE;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define FALLOC_FL_KEEP_SIZE SYMBOLIC(FALLOC_FL_KEEP_SIZE)
#define FALLOC_FL_PUNCH_HOLE SYMBOLIC(FALLOC_FL_PUNCH_HOLE)
#define FALLOC_FL_NO_HIDE_STALE SYMBOLIC(FALLOC_FL_NO_HIDE_STALE)
#define FALLOC_FL_COLLAPSE_RANGE SYMBOLIC(FALLOC_FL_COLLAPSE_RANGE)
#define FALLOC_FL_ZERO_RANGE SYMBOLIC(FALLOC_FL_ZERO_RANGE)
#define FALLOC_FL_INSERT_RANGE SYMBOLIC(FALLOC_FL_INSERT_RANGE)
#define FALLOC_FL_UNSHARE_RANGE SYMBOLIC(FALLOC_FL_UNSHARE_RANGE)



/*!BEGIN libc/sysv/consts/fan.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_FAN_H_

#define FAN_ACCESS SYMBOLIC(FAN_ACCESS)
#define FAN_ACCESS_PERM SYMBOLIC(FAN_ACCESS_PERM)
#define FAN_ALLOW SYMBOLIC(FAN_ALLOW)
#define FAN_ALL_CLASS_BITS SYMBOLIC(FAN_ALL_CLASS_BITS)
#define FAN_ALL_EVENTS SYMBOLIC(FAN_ALL_EVENTS)
#define FAN_ALL_INIT_FLAGS SYMBOLIC(FAN_ALL_INIT_FLAGS)
#define FAN_ALL_MARK_FLAGS SYMBOLIC(FAN_ALL_MARK_FLAGS)
#define FAN_ALL_OUTGOING_EVENTS SYMBOLIC(FAN_ALL_OUTGOING_EVENTS)
#define FAN_ALL_PERM_EVENTS SYMBOLIC(FAN_ALL_PERM_EVENTS)
#define FAN_CLASS_CONTENT SYMBOLIC(FAN_CLASS_CONTENT)
#define FAN_CLASS_NOTIF SYMBOLIC(FAN_CLASS_NOTIF)
#define FAN_CLASS_PRE_CONTENT SYMBOLIC(FAN_CLASS_PRE_CONTENT)
#define FAN_CLOEXEC SYMBOLIC(FAN_CLOEXEC)
#define FAN_CLOSE SYMBOLIC(FAN_CLOSE)
#define FAN_CLOSE_NOWRITE SYMBOLIC(FAN_CLOSE_NOWRITE)
#define FAN_CLOSE_WRITE SYMBOLIC(FAN_CLOSE_WRITE)
#define FAN_DENY SYMBOLIC(FAN_DENY)
#define FAN_EVENT_METADATA_LEN SYMBOLIC(FAN_EVENT_METADATA_LEN)
#define FAN_EVENT_ON_CHILD SYMBOLIC(FAN_EVENT_ON_CHILD)
#define FAN_MARK_ADD SYMBOLIC(FAN_MARK_ADD)
#define FAN_MARK_DONT_FOLLOW SYMBOLIC(FAN_MARK_DONT_FOLLOW)
#define FAN_MARK_FLUSH SYMBOLIC(FAN_MARK_FLUSH)
#define FAN_MARK_IGNORED_MASK SYMBOLIC(FAN_MARK_IGNORED_MASK)
#define FAN_MARK_IGNORED_SURV_MODIFY SYMBOLIC(FAN_MARK_IGNORED_SURV_MODIFY)
#define FAN_MARK_MOUNT SYMBOLIC(FAN_MARK_MOUNT)
#define FAN_MARK_ONLYDIR SYMBOLIC(FAN_MARK_ONLYDIR)
#define FAN_MARK_REMOVE SYMBOLIC(FAN_MARK_REMOVE)
#define FAN_MODIFY SYMBOLIC(FAN_MODIFY)
#define FAN_NOFD SYMBOLIC(FAN_NOFD)
#define FAN_NONBLOCK SYMBOLIC(FAN_NONBLOCK)
#define FAN_ONDIR SYMBOLIC(FAN_ONDIR)
#define FAN_OPEN SYMBOLIC(FAN_OPEN)
#define FAN_OPEN_PERM SYMBOLIC(FAN_OPEN_PERM)
#define FAN_Q_OVERFLOW SYMBOLIC(FAN_Q_OVERFLOW)
#define FAN_UNLIMITED_MARKS SYMBOLIC(FAN_UNLIMITED_MARKS)
#define FAN_UNLIMITED_QUEUE SYMBOLIC(FAN_UNLIMITED_QUEUE)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long FAN_ACCESS;
extern const long FAN_ACCESS_PERM;
extern const long FAN_ALLOW;
extern const long FAN_ALL_CLASS_BITS;
extern const long FAN_ALL_EVENTS;
extern const long FAN_ALL_INIT_FLAGS;
extern const long FAN_ALL_MARK_FLAGS;
extern const long FAN_ALL_OUTGOING_EVENTS;
extern const long FAN_ALL_PERM_EVENTS;
extern const long FAN_CLASS_CONTENT;
extern const long FAN_CLASS_NOTIF;
extern const long FAN_CLASS_PRE_CONTENT;
extern const long FAN_CLOEXEC;
extern const long FAN_CLOSE;
extern const long FAN_CLOSE_NOWRITE;
extern const long FAN_CLOSE_WRITE;
extern const long FAN_DENY;
extern const long FAN_EVENT_METADATA_LEN;
extern const long FAN_EVENT_ON_CHILD;
extern const long FAN_MARK_ADD;
extern const long FAN_MARK_DONT_FOLLOW;
extern const long FAN_MARK_FLUSH;
extern const long FAN_MARK_IGNORED_MASK;
extern const long FAN_MARK_IGNORED_SURV_MODIFY;
extern const long FAN_MARK_MOUNT;
extern const long FAN_MARK_ONLYDIR;
extern const long FAN_MARK_REMOVE;
extern const long FAN_MODIFY;
extern const long FAN_NOFD;
extern const long FAN_NONBLOCK;
extern const long FAN_ONDIR;
extern const long FAN_OPEN;
extern const long FAN_OPEN_PERM;
extern const long FAN_Q_OVERFLOW;
extern const long FAN_UNLIMITED_MARKS;
extern const long FAN_UNLIMITED_QUEUE;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/fd.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_FD_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long FD_CLOEXEC;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define FD_CLOEXEC LITERALLY(1)



/*!BEGIN libc/sysv/consts/fe.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_FE_H_

#define FE_ALL_EXCEPT SYMBOLIC(FE_ALL_EXCEPT)
#define FE_DIVBYZERO SYMBOLIC(FE_DIVBYZERO)
#define FE_DOWNWARD SYMBOLIC(FE_DOWNWARD)
#define FE_INEXACT SYMBOLIC(FE_INEXACT)
#define FE_INVALID SYMBOLIC(FE_INVALID)
#define FE_OVERFLOW SYMBOLIC(FE_OVERFLOW)
#define FE_TONEAREST SYMBOLIC(FE_TONEAREST)
#define FE_TOWARDZERO SYMBOLIC(FE_TOWARDZERO)
#define FE_UNDERFLOW SYMBOLIC(FE_UNDERFLOW)
#define FE_UPWARD SYMBOLIC(FE_UPWARD)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long FE_ALL_EXCEPT;
extern const long FE_DIVBYZERO;
extern const long FE_DOWNWARD;
extern const long FE_INEXACT;
extern const long FE_INVALID;
extern const long FE_OVERFLOW;
extern const long FE_TONEAREST;
extern const long FE_TOWARDZERO;
extern const long FE_UNDERFLOW;
extern const long FE_UPWARD;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/fileno.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_FILENO_H_

#define STDIN_FILENO LITERALLY(0)
#define STDOUT_FILENO LITERALLY(1)
#define STDERR_FILENO LITERALLY(2)



/*!BEGIN libc/sysv/consts/fio.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_FIO_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long FIONBIO;
extern const long FIONREAD;
extern const long FIOASYNC;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define FIONBIO SYMBOLIC(FIONBIO)
#define FIONREAD SYMBOLIC(FIONREAD)
#define FIOASYNC SYMBOLIC(FIOASYNC)



/*!BEGIN libc/sysv/consts/ftw.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_FTW_H_

#define FTW_CHDIR SYMBOLIC(FTW_CHDIR)
#define FTW_D SYMBOLIC(FTW_D)
#define FTW_DEPTH SYMBOLIC(FTW_DEPTH)
#define FTW_DNR SYMBOLIC(FTW_DNR)
#define FTW_DP SYMBOLIC(FTW_DP)
#define FTW_F SYMBOLIC(FTW_F)
#define FTW_MOUNT SYMBOLIC(FTW_MOUNT)
#define FTW_NS SYMBOLIC(FTW_NS)
#define FTW_PHYS SYMBOLIC(FTW_PHYS)
#define FTW_SL SYMBOLIC(FTW_SL)
#define FTW_SLN SYMBOLIC(FTW_SLN)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long FTW_CHDIR;
extern const long FTW_D;
extern const long FTW_DEPTH;
extern const long FTW_DNR;
extern const long FTW_DP;
extern const long FTW_F;
extern const long FTW_MOUNT;
extern const long FTW_NS;
extern const long FTW_PHYS;
extern const long FTW_SL;
extern const long FTW_SLN;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/futex.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_FUTEX_H_

#define FUTEX_PRIVATE_FLAG    SYMBOLIC(FUTEX_PRIVATE_FLAG)
#define FUTEX_REQUEUE         SYMBOLIC(FUTEX_REQUEUE)
#define FUTEX_REQUEUE_PRIVATE SYMBOLIC(FUTEX_REQUEUE_PRIVATE)
#define FUTEX_WAIT            SYMBOLIC(FUTEX_WAIT)
#define FUTEX_WAIT_PRIVATE    SYMBOLIC(FUTEX_WAIT_PRIVATE)
#define FUTEX_WAKE            SYMBOLIC(FUTEX_WAKE)
#define FUTEX_WAKE_PRIVATE    SYMBOLIC(FUTEX_WAKE_PRIVATE)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long FUTEX_PRIVATE_FLAG;
extern const long FUTEX_REQUEUE;
extern const long FUTEX_REQUEUE_PRIVATE;
extern const long FUTEX_WAIT;
extern const long FUTEX_WAIT_PRIVATE;
extern const long FUTEX_WAKE;
extern const long FUTEX_WAKE_PRIVATE;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/grnd.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_GRND_H_

#define GRND_NONBLOCK LITERALLY(1)
#define GRND_RANDOM LITERALLY(2)



/*!BEGIN libc/sysv/consts/icmp6.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_ICMP6_H_

#define ICMP6_DST_UNREACH SYMBOLIC(ICMP6_DST_UNREACH)
#define ICMP6_DST_UNREACH_ADDR SYMBOLIC(ICMP6_DST_UNREACH_ADDR)
#define ICMP6_DST_UNREACH_ADMIN SYMBOLIC(ICMP6_DST_UNREACH_ADMIN)
#define ICMP6_DST_UNREACH_BEYONDSCOPE SYMBOLIC(ICMP6_DST_UNREACH_BEYONDSCOPE)
#define ICMP6_DST_UNREACH_NOPORT SYMBOLIC(ICMP6_DST_UNREACH_NOPORT)
#define ICMP6_DST_UNREACH_NOROUTE SYMBOLIC(ICMP6_DST_UNREACH_NOROUTE)
#define ICMP6_ECHO_REPLY SYMBOLIC(ICMP6_ECHO_REPLY)
#define ICMP6_ECHO_REQUEST SYMBOLIC(ICMP6_ECHO_REQUEST)
#define ICMP6_FILTER SYMBOLIC(ICMP6_FILTER)
#define ICMP6_INFOMSG_MASK SYMBOLIC(ICMP6_INFOMSG_MASK)
#define ICMP6_PACKET_TOO_BIG SYMBOLIC(ICMP6_PACKET_TOO_BIG)
#define ICMP6_PARAMPROB_HEADER SYMBOLIC(ICMP6_PARAMPROB_HEADER)
#define ICMP6_PARAMPROB_NEXTHEADER SYMBOLIC(ICMP6_PARAMPROB_NEXTHEADER)
#define ICMP6_PARAMPROB_OPTION SYMBOLIC(ICMP6_PARAMPROB_OPTION)
#define ICMP6_PARAM_PROB SYMBOLIC(ICMP6_PARAM_PROB)
#define ICMP6_ROUTER_RENUMBERING SYMBOLIC(ICMP6_ROUTER_RENUMBERING)
#define ICMP6_RR_FLAGS_FORCEAPPLY SYMBOLIC(ICMP6_RR_FLAGS_FORCEAPPLY)
#define ICMP6_RR_FLAGS_PREVDONE SYMBOLIC(ICMP6_RR_FLAGS_PREVDONE)
#define ICMP6_RR_FLAGS_REQRESULT SYMBOLIC(ICMP6_RR_FLAGS_REQRESULT)
#define ICMP6_RR_FLAGS_SPECSITE SYMBOLIC(ICMP6_RR_FLAGS_SPECSITE)
#define ICMP6_RR_FLAGS_TEST SYMBOLIC(ICMP6_RR_FLAGS_TEST)
#define ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME \
  SYMBOLIC(ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME)
#define ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME \
  SYMBOLIC(ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME)
#define ICMP6_RR_PCOUSE_RAFLAGS_AUTO SYMBOLIC(ICMP6_RR_PCOUSE_RAFLAGS_AUTO)
#define ICMP6_RR_PCOUSE_RAFLAGS_ONLINK SYMBOLIC(ICMP6_RR_PCOUSE_RAFLAGS_ONLINK)
#define ICMP6_RR_RESULT_FLAGS_FORBIDDEN \
  SYMBOLIC(ICMP6_RR_RESULT_FLAGS_FORBIDDEN)
#define ICMP6_RR_RESULT_FLAGS_OOB SYMBOLIC(ICMP6_RR_RESULT_FLAGS_OOB)
#define ICMP6_TIME_EXCEEDED SYMBOLIC(ICMP6_TIME_EXCEEDED)
#define ICMP6_TIME_EXCEED_REASSEMBLY SYMBOLIC(ICMP6_TIME_EXCEED_REASSEMBLY)
#define ICMP6_TIME_EXCEED_TRANSIT SYMBOLIC(ICMP6_TIME_EXCEED_TRANSIT)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long ICMP6_DST_UNREACH;
extern const long ICMP6_DST_UNREACH_ADDR;
extern const long ICMP6_DST_UNREACH_ADMIN;
extern const long ICMP6_DST_UNREACH_BEYONDSCOPE;
extern const long ICMP6_DST_UNREACH_NOPORT;
extern const long ICMP6_DST_UNREACH_NOROUTE;
extern const long ICMP6_ECHO_REPLY;
extern const long ICMP6_ECHO_REQUEST;
extern const long ICMP6_FILTER;
extern const long ICMP6_INFOMSG_MASK;
extern const long ICMP6_PACKET_TOO_BIG;
extern const long ICMP6_PARAMPROB_HEADER;
extern const long ICMP6_PARAMPROB_NEXTHEADER;
extern const long ICMP6_PARAMPROB_OPTION;
extern const long ICMP6_PARAM_PROB;
extern const long ICMP6_ROUTER_RENUMBERING;
extern const long ICMP6_RR_FLAGS_FORCEAPPLY;
extern const long ICMP6_RR_FLAGS_PREVDONE;
extern const long ICMP6_RR_FLAGS_REQRESULT;
extern const long ICMP6_RR_FLAGS_SPECSITE;
extern const long ICMP6_RR_FLAGS_TEST;
extern const long ICMP6_RR_PCOUSE_FLAGS_DECRPLTIME;
extern const long ICMP6_RR_PCOUSE_FLAGS_DECRVLTIME;
extern const long ICMP6_RR_PCOUSE_RAFLAGS_AUTO;
extern const long ICMP6_RR_PCOUSE_RAFLAGS_ONLINK;
extern const long ICMP6_RR_RESULT_FLAGS_FORBIDDEN;
extern const long ICMP6_RR_RESULT_FLAGS_OOB;
extern const long ICMP6_TIME_EXCEEDED;
extern const long ICMP6_TIME_EXCEED_REASSEMBLY;
extern const long ICMP6_TIME_EXCEED_TRANSIT;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/iff.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_IFF_H_

#define IFF_ALLMULTI SYMBOLIC(IFF_ALLMULTI)
#define IFF_AUTOMEDIA SYMBOLIC(IFF_AUTOMEDIA)
#define IFF_BROADCAST SYMBOLIC(IFF_BROADCAST)
#define IFF_DEBUG SYMBOLIC(IFF_DEBUG)
#define IFF_DYNAMIC SYMBOLIC(IFF_DYNAMIC)
#define IFF_LOOPBACK SYMBOLIC(IFF_LOOPBACK)
#define IFF_MASTER SYMBOLIC(IFF_MASTER)
#define IFF_MULTICAST SYMBOLIC(IFF_MULTICAST)
#define IFF_NOARP SYMBOLIC(IFF_NOARP)
#define IFF_NOTRAILERS SYMBOLIC(IFF_NOTRAILERS)
#define IFF_POINTOPOINT SYMBOLIC(IFF_POINTOPOINT)
#define IFF_PORTSEL SYMBOLIC(IFF_PORTSEL)
#define IFF_PROMISC SYMBOLIC(IFF_PROMISC)
#define IFF_RUNNING SYMBOLIC(IFF_RUNNING)
#define IFF_SLAVE SYMBOLIC(IFF_SLAVE)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long IFF_ALLMULTI;
extern const long IFF_AUTOMEDIA;
extern const long IFF_BROADCAST;
extern const long IFF_DEBUG;
extern const long IFF_DYNAMIC;
extern const long IFF_LOOPBACK;
extern const long IFF_MASTER;
extern const long IFF_MULTICAST;
extern const long IFF_NOARP;
extern const long IFF_NOTRAILERS;
extern const long IFF_POINTOPOINT;
extern const long IFF_PORTSEL;
extern const long IFF_PROMISC;
extern const long IFF_RUNNING;
extern const long IFF_SLAVE;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/ill.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_ILL_H_

#define ILL_BADSTK SYMBOLIC(ILL_BADSTK)
#define ILL_COPROC SYMBOLIC(ILL_COPROC)
#define ILL_ILLADR SYMBOLIC(ILL_ILLADR)
#define ILL_ILLOPC SYMBOLIC(ILL_ILLOPC)
#define ILL_ILLOPN SYMBOLIC(ILL_ILLOPN)
#define ILL_ILLTRP SYMBOLIC(ILL_ILLTRP)
#define ILL_PRVOPC SYMBOLIC(ILL_PRVOPC)
#define ILL_PRVREG SYMBOLIC(ILL_PRVREG)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long ILL_BADSTK;
extern const long ILL_COPROC;
extern const long ILL_ILLADR;
extern const long ILL_ILLOPC;
extern const long ILL_ILLOPN;
extern const long ILL_ILLTRP;
extern const long ILL_PRVOPC;
extern const long ILL_PRVREG;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/in.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_IN_H_

#define IN_ACCESS SYMBOLIC(IN_ACCESS)
#define IN_ALL_EVENTS SYMBOLIC(IN_ALL_EVENTS)
#define IN_ATTRIB SYMBOLIC(IN_ATTRIB)
#define IN_CLOEXEC SYMBOLIC(IN_CLOEXEC)
#define IN_CLOSE SYMBOLIC(IN_CLOSE)
#define IN_CLOSE_NOWRITE SYMBOLIC(IN_CLOSE_NOWRITE)
#define IN_CLOSE_WRITE SYMBOLIC(IN_CLOSE_WRITE)
#define IN_CREATE SYMBOLIC(IN_CREATE)
#define IN_DELETE SYMBOLIC(IN_DELETE)
#define IN_DELETE_SELF SYMBOLIC(IN_DELETE_SELF)
#define IN_DONT_FOLLOW SYMBOLIC(IN_DONT_FOLLOW)
#define IN_EXCL_UNLINK SYMBOLIC(IN_EXCL_UNLINK)
#define IN_IGNORED SYMBOLIC(IN_IGNORED)
#define IN_ISDIR SYMBOLIC(IN_ISDIR)
#define IN_LOOPBACKNET SYMBOLIC(IN_LOOPBACKNET)
#define IN_MASK_ADD SYMBOLIC(IN_MASK_ADD)
#define IN_MODIFY SYMBOLIC(IN_MODIFY)
#define IN_MOVE SYMBOLIC(IN_MOVE)
#define IN_MOVED_FROM SYMBOLIC(IN_MOVED_FROM)
#define IN_MOVED_TO SYMBOLIC(IN_MOVED_TO)
#define IN_MOVE_SELF SYMBOLIC(IN_MOVE_SELF)
#define IN_NONBLOCK SYMBOLIC(IN_NONBLOCK)
#define IN_ONESHOT SYMBOLIC(IN_ONESHOT)
#define IN_ONLYDIR SYMBOLIC(IN_ONLYDIR)
#define IN_OPEN SYMBOLIC(IN_OPEN)
#define IN_Q_OVERFLOW SYMBOLIC(IN_Q_OVERFLOW)
#define IN_UNMOUNT SYMBOLIC(IN_UNMOUNT)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long IN_ACCESS;
extern const long IN_ALL_EVENTS;
extern const long IN_ATTRIB;
extern const long IN_CLOEXEC;
extern const long IN_CLOSE;
extern const long IN_CLOSE_NOWRITE;
extern const long IN_CLOSE_WRITE;
extern const long IN_CREATE;
extern const long IN_DELETE;
extern const long IN_DELETE_SELF;
extern const long IN_DONT_FOLLOW;
extern const long IN_EXCL_UNLINK;
extern const long IN_IGNORED;
extern const long IN_ISDIR;
extern const long IN_LOOPBACKNET;
extern const long IN_MASK_ADD;
extern const long IN_MODIFY;
extern const long IN_MOVE;
extern const long IN_MOVED_FROM;
extern const long IN_MOVED_TO;
extern const long IN_MOVE_SELF;
extern const long IN_NONBLOCK;
extern const long IN_ONESHOT;
extern const long IN_ONLYDIR;
extern const long IN_OPEN;
extern const long IN_Q_OVERFLOW;
extern const long IN_UNMOUNT;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/inaddr.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_INADDR_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

/**
 * @fileoverview Well-known Internet addresses.
 * These need to be hard-coded as little-endian, so htonl() is needed.
 */

extern const long INADDR_ALLHOSTS_GROUP;
extern const long INADDR_ALLRTRS_GROUP;
extern const long INADDR_ANY;
extern const long INADDR_BROADCAST;
extern const long INADDR_LOOPBACK;
extern const long INADDR_MAX_LOCAL_GROUP;
extern const long INADDR_NONE;
extern const long INADDR_TESTNET1;
extern const long INADDR_TESTNET2;
extern const long INADDR_TESTNET3;
extern const long INADDR_UNSPEC_GROUP;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define INADDR_ANY LITERALLY(0x00000000u)       /* 0.0.0.0 */
#define INADDR_BROADCAST LITERALLY(0xffffffffu) /* 255.255.255.255 */
#define INADDR_NONE LITERALLY(0xffffffffu)      /* 255.255.255.255 */
#define INADDR_LOOPBACK LITERALLY(0x7f000001u)  /* 127.0.0.1 */
#define INADDR_TESTNET1 LITERALLY(0xc0000200u)  /* 192.0.2.0/24 (RFC5737§3) */
#define INADDR_TESTNET2 LITERALLY(0xc6336400u)  /* 198.51.100.0/24 */
#define INADDR_TESTNET3 LITERALLY(0xcb007100u)  /* 203.0.113.0/24 */

#define INADDR_ALLHOSTS_GROUP SYMBOLIC(INADDR_ALLHOSTS_GROUP)
#define INADDR_ALLRTRS_GROUP SYMBOLIC(INADDR_ALLRTRS_GROUP)
#define INADDR_MAX_LOCAL_GROUP SYMBOLIC(INADDR_MAX_LOCAL_GROUP)
#define INADDR_UNSPEC_GROUP SYMBOLIC(INADDR_UNSPEC_GROUP)



/*!BEGIN libc/sysv/consts/iov.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_IOV_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long IOV_MAX;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define IOV_MAX SYMBOLIC(IOV_MAX)



/*!BEGIN libc/sysv/consts/ip.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_IP_H_

#define IP_ADD_MEMBERSHIP SYMBOLIC(IP_ADD_MEMBERSHIP)
#define IP_ADD_SOURCE_MEMBERSHIP SYMBOLIC(IP_ADD_SOURCE_MEMBERSHIP)
#define IP_BIND_ADDRESS_NO_PORT SYMBOLIC(IP_BIND_ADDRESS_NO_PORT)
#define IP_BLOCK_SOURCE SYMBOLIC(IP_BLOCK_SOURCE)
#define IP_CHECKSUM SYMBOLIC(IP_CHECKSUM)
#define IP_DEFAULT_MULTICAST_LOOP SYMBOLIC(IP_DEFAULT_MULTICAST_LOOP)
#define IP_DEFAULT_MULTICAST_TTL SYMBOLIC(IP_DEFAULT_MULTICAST_TTL)
#define IP_DROP_MEMBERSHIP SYMBOLIC(IP_DROP_MEMBERSHIP)
#define IP_DROP_SOURCE_MEMBERSHIP SYMBOLIC(IP_DROP_SOURCE_MEMBERSHIP)
#define IP_FREEBIND SYMBOLIC(IP_FREEBIND)
#define IP_HDRINCL SYMBOLIC(IP_HDRINCL)
#define IP_IPSEC_POLICY SYMBOLIC(IP_IPSEC_POLICY)
#define IP_MAX_MEMBERSHIPS SYMBOLIC(IP_MAX_MEMBERSHIPS)
#define IP_MINTTL SYMBOLIC(IP_MINTTL)
#define IP_MSFILTER SYMBOLIC(IP_MSFILTER)
#define IP_MTU SYMBOLIC(IP_MTU)
#define IP_MTU_DISCOVER SYMBOLIC(IP_MTU_DISCOVER)
#define IP_MULTICAST_ALL SYMBOLIC(IP_MULTICAST_ALL)
#define IP_MULTICAST_IF SYMBOLIC(IP_MULTICAST_IF)
#define IP_MULTICAST_LOOP SYMBOLIC(IP_MULTICAST_LOOP)
#define IP_MULTICAST_TTL SYMBOLIC(IP_MULTICAST_TTL)
#define IP_NODEFRAG SYMBOLIC(IP_NODEFRAG)
#define IP_OPTIONS SYMBOLIC(IP_OPTIONS)
#define IP_ORIGDSTADDR SYMBOLIC(IP_ORIGDSTADDR)
#define IP_PASSSEC SYMBOLIC(IP_PASSSEC)
#define IP_PKTINFO SYMBOLIC(IP_PKTINFO)
#define IP_PKTOPTIONS SYMBOLIC(IP_PKTOPTIONS)
#define IP_PMTUDISC SYMBOLIC(IP_PMTUDISC)
#define IP_PMTUDISC_DO SYMBOLIC(IP_PMTUDISC_DO)
#define IP_PMTUDISC_DONT SYMBOLIC(IP_PMTUDISC_DONT)
#define IP_PMTUDISC_INTERFACE SYMBOLIC(IP_PMTUDISC_INTERFACE)
#define IP_PMTUDISC_OMIT SYMBOLIC(IP_PMTUDISC_OMIT)
#define IP_PMTUDISC_PROBE SYMBOLIC(IP_PMTUDISC_PROBE)
#define IP_PMTUDISC_WANT SYMBOLIC(IP_PMTUDISC_WANT)
#define IP_RECVERR SYMBOLIC(IP_RECVERR)
#define IP_RECVOPTS SYMBOLIC(IP_RECVOPTS)
#define IP_RECVORIGDSTADDR SYMBOLIC(IP_RECVORIGDSTADDR)
#define IP_RECVRETOPTS SYMBOLIC(IP_RECVRETOPTS)
#define IP_RECVTOS SYMBOLIC(IP_RECVTOS)
#define IP_RECVTTL SYMBOLIC(IP_RECVTTL)
#define IP_RETOPTS SYMBOLIC(IP_RETOPTS)
#define IP_ROUTER_ALERT SYMBOLIC(IP_ROUTER_ALERT)
#define IP_TOS SYMBOLIC(IP_TOS)
#define IP_TRANSPARENT SYMBOLIC(IP_TRANSPARENT)
#define IP_TTL SYMBOLIC(IP_TTL)
#define IP_UNBLOCK_SOURCE SYMBOLIC(IP_UNBLOCK_SOURCE)
#define IP_UNICAST_IF SYMBOLIC(IP_UNICAST_IF)
#define IP_XFRM_POLICY SYMBOLIC(IP_XFRM_POLICY)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long IP_ADD_MEMBERSHIP;
extern const long IP_ADD_SOURCE_MEMBERSHIP;
extern const long IP_BIND_ADDRESS_NO_PORT;
extern const long IP_BLOCK_SOURCE;
extern const long IP_CHECKSUM;
extern const long IP_DEFAULT_MULTICAST_LOOP;
extern const long IP_DEFAULT_MULTICAST_TTL;
extern const long IP_DROP_MEMBERSHIP;
extern const long IP_DROP_SOURCE_MEMBERSHIP;
extern const long IP_FREEBIND;
extern const long IP_HDRINCL;
extern const long IP_IPSEC_POLICY;
extern const long IP_MAX_MEMBERSHIPS;
extern const long IP_MINTTL;
extern const long IP_MSFILTER;
extern const long IP_MTU;
extern const long IP_MTU_DISCOVER;
extern const long IP_MULTICAST_ALL;
extern const long IP_MULTICAST_IF;
extern const long IP_MULTICAST_LOOP;
extern const long IP_MULTICAST_TTL;
extern const long IP_NODEFRAG;
extern const long IP_OPTIONS;
extern const long IP_ORIGDSTADDR;
extern const long IP_PASSSEC;
extern const long IP_PKTINFO;
extern const long IP_PKTOPTIONS;
extern const long IP_PMTUDISC;
extern const long IP_PMTUDISC_DO;
extern const long IP_PMTUDISC_DONT;
extern const long IP_PMTUDISC_INTERFACE;
extern const long IP_PMTUDISC_OMIT;
extern const long IP_PMTUDISC_PROBE;
extern const long IP_PMTUDISC_WANT;
extern const long IP_RECVERR;
extern const long IP_RECVOPTS;
extern const long IP_RECVORIGDSTADDR;
extern const long IP_RECVRETOPTS;
extern const long IP_RECVTOS;
extern const long IP_RECVTTL;
extern const long IP_RETOPTS;
extern const long IP_ROUTER_ALERT;
extern const long IP_TOS;
extern const long IP_TRANSPARENT;
extern const long IP_TTL;
extern const long IP_UNBLOCK_SOURCE;
extern const long IP_UNICAST_IF;
extern const long IP_XFRM_POLICY;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/ipc.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_IPC_H_

#define IPC_CREAT SYMBOLIC(IPC_CREAT)
#define IPC_EXCL SYMBOLIC(IPC_EXCL)
#define IPC_INFO SYMBOLIC(IPC_INFO)
#define IPC_NOWAIT SYMBOLIC(IPC_NOWAIT)
#define IPC_PRIVATE SYMBOLIC(IPC_PRIVATE)
#define IPC_RMID SYMBOLIC(IPC_RMID)
#define IPC_SET SYMBOLIC(IPC_SET)
#define IPC_STAT SYMBOLIC(IPC_STAT)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long IPC_CREAT;
extern const long IPC_EXCL;
extern const long IPC_INFO;
extern const long IPC_NOWAIT;
extern const long IPC_PRIVATE;
extern const long IPC_RMID;
extern const long IPC_SET;
extern const long IPC_STAT;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/ipport.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_IPPORT_H_

/**
 * ARPA network ports.
 */
#define IPPORT_ECHO 7
#define IPPORT_DISCARD 9
#define IPPORT_SYSTAT 11
#define IPPORT_DAYTIME 13
#define IPPORT_NETSTAT 15
#define IPPORT_FTP 21
#define IPPORT_TELNET 23
#define IPPORT_SMTP 25
#define IPPORT_TIMESERVER 37
#define IPPORT_NAMESERVER 42
#define IPPORT_WHOIS 43
#define IPPORT_MTP 57
#define IPPORT_TFTP 69
#define IPPORT_RJE 77
#define IPPORT_FINGER 79
#define IPPORT_TTYLINK 87
#define IPPORT_SUPDUP 95
#define IPPORT_EXECSERVER 512
#define IPPORT_LOGINSERVER 513
#define IPPORT_CMDSERVER 514
#define IPPORT_EFSSERVER 520
#define IPPORT_BIFFUDP 512
#define IPPORT_WHOSERVER 513
#define IPPORT_ROUTESERVER 520
#define IPPORT_RESERVED 1024
#define IPPORT_USERRESERVED 5000

/**
 * Modern network ports.
 */
#define IPPORT_SSH 22
#define IPPORT_DOMAIN 53
#define IPPORT_HTTP 80
#define IPPORT_POP3 110
#define IPPORT_SFTP 115
#define IPPORT_NTP 123
#define IPPORT_IMAP2 143
#define IPPORT_NETBIOS_NS 137
#define IPPORT_NETBIOS_DGM 138
#define IPPORT_NETBIOS_SSN 139
#define IPPORT_BGP 179
#define IPPORT_IRC 194
#define IPPORT_HTTPS 443
#define IPPORT_PRINTER 515
#define IPPORT_NFS 2049
#define IPPORT_DISTCC 3632
#define IPPORT_SIP 5060
#define IPPORT_POSTGRESQL 5432
#define IPPORT_X11 6000
#define IPPORT_GIT 9418
#define IPPORT_IRCD 6667
#define IPPORT_IMAPS 993
#define IPPORT_POP3S 995



/*!BEGIN libc/sysv/consts/ipproto.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_IPPROTO_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long IPPROTO_AH;
extern const long IPPROTO_BEETPH;
extern const long IPPROTO_COMP;
extern const long IPPROTO_DCCP;
extern const long IPPROTO_DSTOPTS;
extern const long IPPROTO_EGP;
extern const long IPPROTO_ENCAP;
extern const long IPPROTO_ESP;
extern const long IPPROTO_FRAGMENT;
extern const long IPPROTO_GRE;
extern const long IPPROTO_HOPOPTS;
extern const long IPPROTO_ICMP;
extern const long IPPROTO_ICMPV6;
extern const long IPPROTO_IDP;
extern const long IPPROTO_IGMP;
extern const long IPPROTO_IP;
extern const long IPPROTO_IPIP;
extern const long IPPROTO_IPV6;
extern const long IPPROTO_MAX;
extern const long IPPROTO_MH;
extern const long IPPROTO_MPLS;
extern const long IPPROTO_MTP;
extern const long IPPROTO_NONE;
extern const long IPPROTO_PIM;
extern const long IPPROTO_PUP;
extern const long IPPROTO_RAW;
extern const long IPPROTO_ROUTING;
extern const long IPPROTO_RSVP;
extern const long IPPROTO_SCTP;
extern const long IPPROTO_TCP;
extern const long IPPROTO_TP;
extern const long IPPROTO_UDP;
extern const long IPPROTO_UDPLITE;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define IPPROTO_IP   LITERALLY(0)
#define IPPROTO_ICMP LITERALLY(1)
#define IPPROTO_TCP  LITERALLY(6)
#define IPPROTO_UDP  LITERALLY(17)
#define IPPROTO_RAW  LITERALLY(255)

#define IPPROTO_AH       SYMBOLIC(IPPROTO_AH)
#define IPPROTO_BEETPH   SYMBOLIC(IPPROTO_BEETPH)
#define IPPROTO_COMP     SYMBOLIC(IPPROTO_COMP)
#define IPPROTO_DCCP     SYMBOLIC(IPPROTO_DCCP)
#define IPPROTO_DSTOPTS  SYMBOLIC(IPPROTO_DSTOPTS)
#define IPPROTO_EGP      SYMBOLIC(IPPROTO_EGP)
#define IPPROTO_ENCAP    SYMBOLIC(IPPROTO_ENCAP)
#define IPPROTO_ESP      SYMBOLIC(IPPROTO_ESP)
#define IPPROTO_FRAGMENT SYMBOLIC(IPPROTO_FRAGMENT)
#define IPPROTO_GRE      SYMBOLIC(IPPROTO_GRE)
#define IPPROTO_HOPOPTS  SYMBOLIC(IPPROTO_HOPOPTS)
#define IPPROTO_ICMPV6   SYMBOLIC(IPPROTO_ICMPV6)
#define IPPROTO_IDP      SYMBOLIC(IPPROTO_IDP)
#define IPPROTO_IGMP     SYMBOLIC(IPPROTO_IGMP)
#define IPPROTO_IPIP     SYMBOLIC(IPPROTO_IPIP)
#define IPPROTO_IPV6     SYMBOLIC(IPPROTO_IPV6)
#define IPPROTO_MAX      SYMBOLIC(IPPROTO_MAX)
#define IPPROTO_MH       SYMBOLIC(IPPROTO_MH)
#define IPPROTO_MPLS     SYMBOLIC(IPPROTO_MPLS)
#define IPPROTO_MTP      SYMBOLIC(IPPROTO_MTP)
#define IPPROTO_NONE     SYMBOLIC(IPPROTO_NONE)
#define IPPROTO_PIM      SYMBOLIC(IPPROTO_PIM)
#define IPPROTO_PUP      SYMBOLIC(IPPROTO_PUP)
#define IPPROTO_ROUTING  SYMBOLIC(IPPROTO_ROUTING)
#define IPPROTO_RSVP     SYMBOLIC(IPPROTO_RSVP)
#define IPPROTO_SCTP     SYMBOLIC(IPPROTO_SCTP)
#define IPPROTO_TP       SYMBOLIC(IPPROTO_TP)
#define IPPROTO_UDPLITE  SYMBOLIC(IPPROTO_UDPLITE)



/*!BEGIN libc/sysv/consts/ipv6.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_IPV6_H_

#define IPV6_2292DSTOPTS SYMBOLIC(IPV6_2292DSTOPTS)
#define IPV6_2292HOPLIMIT SYMBOLIC(IPV6_2292HOPLIMIT)
#define IPV6_2292HOPOPTS SYMBOLIC(IPV6_2292HOPOPTS)
#define IPV6_2292PKTINFO SYMBOLIC(IPV6_2292PKTINFO)
#define IPV6_2292PKTOPTIONS SYMBOLIC(IPV6_2292PKTOPTIONS)
#define IPV6_2292RTHDR SYMBOLIC(IPV6_2292RTHDR)
#define IPV6_ADDRFORM SYMBOLIC(IPV6_ADDRFORM)
#define IPV6_ADD_MEMBERSHIP SYMBOLIC(IPV6_ADD_MEMBERSHIP)
#define IPV6_AUTHHDR SYMBOLIC(IPV6_AUTHHDR)
#define IPV6_AUTOFLOWLABEL SYMBOLIC(IPV6_AUTOFLOWLABEL)
#define IPV6_CHECKSUM SYMBOLIC(IPV6_CHECKSUM)
#define IPV6_DONTFRAG SYMBOLIC(IPV6_DONTFRAG)
#define IPV6_DROP_MEMBERSHIP SYMBOLIC(IPV6_DROP_MEMBERSHIP)
#define IPV6_DSTOPTS SYMBOLIC(IPV6_DSTOPTS)
#define IPV6_HDRINCL SYMBOLIC(IPV6_HDRINCL)
#define IPV6_HOPLIMIT SYMBOLIC(IPV6_HOPLIMIT)
#define IPV6_HOPOPTS SYMBOLIC(IPV6_HOPOPTS)
#define IPV6_IPSEC_POLICY SYMBOLIC(IPV6_IPSEC_POLICY)
#define IPV6_JOIN_ANYCAST SYMBOLIC(IPV6_JOIN_ANYCAST)
#define IPV6_JOIN_GROUP SYMBOLIC(IPV6_JOIN_GROUP)
#define IPV6_LEAVE_ANYCAST SYMBOLIC(IPV6_LEAVE_ANYCAST)
#define IPV6_LEAVE_GROUP SYMBOLIC(IPV6_LEAVE_GROUP)
#define IPV6_MINHOPCOUNT SYMBOLIC(IPV6_MINHOPCOUNT)
#define IPV6_MTU SYMBOLIC(IPV6_MTU)
#define IPV6_MTU_DISCOVER SYMBOLIC(IPV6_MTU_DISCOVER)
#define IPV6_MULTICAST_HOPS SYMBOLIC(IPV6_MULTICAST_HOPS)
#define IPV6_MULTICAST_IF SYMBOLIC(IPV6_MULTICAST_IF)
#define IPV6_MULTICAST_LOOP SYMBOLIC(IPV6_MULTICAST_LOOP)
#define IPV6_NEXTHOP SYMBOLIC(IPV6_NEXTHOP)
#define IPV6_ORIGDSTADDR SYMBOLIC(IPV6_ORIGDSTADDR)
#define IPV6_PATHMTU SYMBOLIC(IPV6_PATHMTU)
#define IPV6_PKTINFO SYMBOLIC(IPV6_PKTINFO)
#define IPV6_PMTUDISC_DO SYMBOLIC(IPV6_PMTUDISC_DO)
#define IPV6_PMTUDISC_DONT SYMBOLIC(IPV6_PMTUDISC_DONT)
#define IPV6_PMTUDISC_INTERFACE SYMBOLIC(IPV6_PMTUDISC_INTERFACE)
#define IPV6_PMTUDISC_OMIT SYMBOLIC(IPV6_PMTUDISC_OMIT)
#define IPV6_PMTUDISC_PROBE SYMBOLIC(IPV6_PMTUDISC_PROBE)
#define IPV6_PMTUDISC_WANT SYMBOLIC(IPV6_PMTUDISC_WANT)
#define IPV6_RECVDSTOPTS SYMBOLIC(IPV6_RECVDSTOPTS)
#define IPV6_RECVERR SYMBOLIC(IPV6_RECVERR)
#define IPV6_RECVHOPLIMIT SYMBOLIC(IPV6_RECVHOPLIMIT)
#define IPV6_RECVHOPOPTS SYMBOLIC(IPV6_RECVHOPOPTS)
#define IPV6_RECVORIGDSTADDR SYMBOLIC(IPV6_RECVORIGDSTADDR)
#define IPV6_RECVPATHMTU SYMBOLIC(IPV6_RECVPATHMTU)
#define IPV6_RECVPKTINFO SYMBOLIC(IPV6_RECVPKTINFO)
#define IPV6_RECVRTHDR SYMBOLIC(IPV6_RECVRTHDR)
#define IPV6_RECVTCLASS SYMBOLIC(IPV6_RECVTCLASS)
#define IPV6_ROUTER_ALERT SYMBOLIC(IPV6_ROUTER_ALERT)
#define IPV6_RTHDR SYMBOLIC(IPV6_RTHDR)
#define IPV6_RTHDRDSTOPTS SYMBOLIC(IPV6_RTHDRDSTOPTS)
#define IPV6_RTHDR_LOOSE SYMBOLIC(IPV6_RTHDR_LOOSE)
#define IPV6_RTHDR_STRICT SYMBOLIC(IPV6_RTHDR_STRICT)
#define IPV6_RTHDR_TYPE_0 SYMBOLIC(IPV6_RTHDR_TYPE_0)
#define IPV6_RXDSTOPTS SYMBOLIC(IPV6_RXDSTOPTS)
#define IPV6_RXHOPOPTS SYMBOLIC(IPV6_RXHOPOPTS)
#define IPV6_TCLASS SYMBOLIC(IPV6_TCLASS)
#define IPV6_UNICAST_HOPS SYMBOLIC(IPV6_UNICAST_HOPS)
#define IPV6_V6ONLY SYMBOLIC(IPV6_V6ONLY)
#define IPV6_XFRM_POLICY SYMBOLIC(IPV6_XFRM_POLICY)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long IPV6_2292DSTOPTS;
extern const long IPV6_2292HOPLIMIT;
extern const long IPV6_2292HOPOPTS;
extern const long IPV6_2292PKTINFO;
extern const long IPV6_2292PKTOPTIONS;
extern const long IPV6_2292RTHDR;
extern const long IPV6_ADDRFORM;
extern const long IPV6_ADD_MEMBERSHIP;
extern const long IPV6_AUTHHDR;
extern const long IPV6_AUTOFLOWLABEL;
extern const long IPV6_CHECKSUM;
extern const long IPV6_DONTFRAG;
extern const long IPV6_DROP_MEMBERSHIP;
extern const long IPV6_DSTOPTS;
extern const long IPV6_HDRINCL;
extern const long IPV6_HOPLIMIT;
extern const long IPV6_HOPOPTS;
extern const long IPV6_IPSEC_POLICY;
extern const long IPV6_JOIN_ANYCAST;
extern const long IPV6_JOIN_GROUP;
extern const long IPV6_LEAVE_ANYCAST;
extern const long IPV6_LEAVE_GROUP;
extern const long IPV6_MINHOPCOUNT;
extern const long IPV6_MTU;
extern const long IPV6_MTU_DISCOVER;
extern const long IPV6_MULTICAST_HOPS;
extern const long IPV6_MULTICAST_IF;
extern const long IPV6_MULTICAST_LOOP;
extern const long IPV6_NEXTHOP;
extern const long IPV6_ORIGDSTADDR;
extern const long IPV6_PATHMTU;
extern const long IPV6_PKTINFO;
extern const long IPV6_PMTUDISC_DO;
extern const long IPV6_PMTUDISC_DONT;
extern const long IPV6_PMTUDISC_INTERFACE;
extern const long IPV6_PMTUDISC_OMIT;
extern const long IPV6_PMTUDISC_PROBE;
extern const long IPV6_PMTUDISC_WANT;
extern const long IPV6_RECVDSTOPTS;
extern const long IPV6_RECVERR;
extern const long IPV6_RECVHOPLIMIT;
extern const long IPV6_RECVHOPOPTS;
extern const long IPV6_RECVORIGDSTADDR;
extern const long IPV6_RECVPATHMTU;
extern const long IPV6_RECVPKTINFO;
extern const long IPV6_RECVRTHDR;
extern const long IPV6_RECVTCLASS;
extern const long IPV6_ROUTER_ALERT;
extern const long IPV6_RTHDR;
extern const long IPV6_RTHDRDSTOPTS;
extern const long IPV6_RTHDR_LOOSE;
extern const long IPV6_RTHDR_STRICT;
extern const long IPV6_RTHDR_TYPE_0;
extern const long IPV6_RXDSTOPTS;
extern const long IPV6_RXHOPOPTS;
extern const long IPV6_TCLASS;
extern const long IPV6_UNICAST_HOPS;
extern const long IPV6_V6ONLY;
extern const long IPV6_XFRM_POLICY;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/itimer.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_ITIMER_H_

#define ITIMER_REAL 0
#define ITIMER_VIRTUAL 1
#define ITIMER_PROF 2



/*!BEGIN libc/sysv/consts/limits.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_LIMITS_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long PIPE_BUF;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define PIPE_BUF SYMBOLIC(PIPE_BUF)



/*!BEGIN libc/sysv/consts/lio.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_LIO_H_

#define LIO_NOP SYMBOLIC(LIO_NOP)
#define LIO_NOWAIT SYMBOLIC(LIO_NOWAIT)
#define LIO_READ SYMBOLIC(LIO_READ)
#define LIO_WAIT SYMBOLIC(LIO_WAIT)
#define LIO_WRITE SYMBOLIC(LIO_WRITE)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long LIO_NOP;
extern const long LIO_NOWAIT;
extern const long LIO_READ;
extern const long LIO_WAIT;
extern const long LIO_WRITE;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/lock.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_LOCK_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long LOCK_EX;
extern const long LOCK_NB;
extern const long LOCK_SH;
extern const long LOCK_UN;
extern const long LOCK_UNLOCK_CACHE;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define LOCK_EX LITERALLY(2)
#define LOCK_NB SYMBOLIC(LOCK_NB)
#define LOCK_SH SYMBOLIC(LOCK_SH)
#define LOCK_UN SYMBOLIC(LOCK_UN)
#define LOCK_UNLOCK_CACHE SYMBOLIC(LOCK_UNLOCK_CACHE)



/*!BEGIN libc/sysv/consts/log.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_LOG_H_

#define LOG_ALERT SYMBOLIC(LOG_ALERT)
#define LOG_AUTH SYMBOLIC(LOG_AUTH)
#define LOG_CONS SYMBOLIC(LOG_CONS)
#define LOG_CRIT SYMBOLIC(LOG_CRIT)
#define LOG_CRON SYMBOLIC(LOG_CRON)
#define LOG_DAEMON SYMBOLIC(LOG_DAEMON)
#define LOG_DEBUG SYMBOLIC(LOG_DEBUG)
#define LOG_EMERG SYMBOLIC(LOG_EMERG)
#define LOG_ERR SYMBOLIC(LOG_ERR)
#define LOG_FACMASK SYMBOLIC(LOG_FACMASK)
#define LOG_INFO SYMBOLIC(LOG_INFO)
#define LOG_KERN SYMBOLIC(LOG_KERN)
#define LOG_LOCAL0 SYMBOLIC(LOG_LOCAL0)
#define LOG_LOCAL1 SYMBOLIC(LOG_LOCAL1)
#define LOG_LOCAL2 SYMBOLIC(LOG_LOCAL2)
#define LOG_LOCAL3 SYMBOLIC(LOG_LOCAL3)
#define LOG_LOCAL4 SYMBOLIC(LOG_LOCAL4)
#define LOG_LOCAL5 SYMBOLIC(LOG_LOCAL5)
#define LOG_LOCAL6 SYMBOLIC(LOG_LOCAL6)
#define LOG_LOCAL7 SYMBOLIC(LOG_LOCAL7)
#define LOG_LPR SYMBOLIC(LOG_LPR)
#define LOG_MAIL SYMBOLIC(LOG_MAIL)
#define LOG_NDELAY SYMBOLIC(LOG_NDELAY)
#define LOG_NEWS SYMBOLIC(LOG_NEWS)
#define LOG_NFACILITIES SYMBOLIC(LOG_NFACILITIES)
#define LOG_NOTICE SYMBOLIC(LOG_NOTICE)
#define LOG_NOWAIT SYMBOLIC(LOG_NOWAIT)
#define LOG_ODELAY SYMBOLIC(LOG_ODELAY)
#define LOG_PERROR SYMBOLIC(LOG_PERROR)
#define LOG_PID SYMBOLIC(LOG_PID)
#define LOG_PRIMASK SYMBOLIC(LOG_PRIMASK)
#define LOG_SELECT SYMBOLIC(LOG_SELECT)
#define LOG_SENSE SYMBOLIC(LOG_SENSE)
#define LOG_SYSLOG SYMBOLIC(LOG_SYSLOG)
#define LOG_USER SYMBOLIC(LOG_USER)
#define LOG_UUCP SYMBOLIC(LOG_UUCP)
#define LOG_WARNING SYMBOLIC(LOG_WARNING)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long LOG_ALERT;
extern const long LOG_AUTH;
extern const long LOG_CONS;
extern const long LOG_CRIT;
extern const long LOG_CRON;
extern const long LOG_DAEMON;
extern const long LOG_DEBUG;
extern const long LOG_EMERG;
extern const long LOG_ERR;
extern const long LOG_FACMASK;
extern const long LOG_INFO;
extern const long LOG_KERN;
extern const long LOG_LOCAL0;
extern const long LOG_LOCAL1;
extern const long LOG_LOCAL2;
extern const long LOG_LOCAL3;
extern const long LOG_LOCAL4;
extern const long LOG_LOCAL5;
extern const long LOG_LOCAL6;
extern const long LOG_LOCAL7;
extern const long LOG_LPR;
extern const long LOG_MAIL;
extern const long LOG_NDELAY;
extern const long LOG_NEWS;
extern const long LOG_NFACILITIES;
extern const long LOG_NOTICE;
extern const long LOG_NOWAIT;
extern const long LOG_ODELAY;
extern const long LOG_PERROR;
extern const long LOG_PID;
extern const long LOG_PRIMASK;
extern const long LOG_SELECT;
extern const long LOG_SENSE;
extern const long LOG_SYSLOG;
extern const long LOG_USER;
extern const long LOG_UUCP;
extern const long LOG_WARNING;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/madv.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_MADV_H_

#define MADV_DODUMP SYMBOLIC(MADV_DODUMP)
#define MADV_DOFORK SYMBOLIC(MADV_DOFORK)
#define MADV_DONTDUMP SYMBOLIC(MADV_DONTDUMP)
#define MADV_DONTFORK SYMBOLIC(MADV_DONTFORK)
#define MADV_DONTNEED SYMBOLIC(MADV_DONTNEED)
#define MADV_FREE SYMBOLIC(MADV_FREE)
#define MADV_HUGEPAGE SYMBOLIC(MADV_HUGEPAGE)
#define MADV_HWPOISON SYMBOLIC(MADV_HWPOISON)
#define MADV_MERGEABLE SYMBOLIC(MADV_MERGEABLE)
#define MADV_NOHUGEPAGE SYMBOLIC(MADV_NOHUGEPAGE)
#define MADV_NORMAL SYMBOLIC(MADV_NORMAL)
#define MADV_RANDOM SYMBOLIC(MADV_RANDOM)
#define MADV_REMOVE SYMBOLIC(MADV_REMOVE)
#define MADV_SEQUENTIAL SYMBOLIC(MADV_SEQUENTIAL)
#define MADV_UNMERGEABLE SYMBOLIC(MADV_UNMERGEABLE)
#define MADV_WILLNEED SYMBOLIC(MADV_WILLNEED)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long MADV_DODUMP;
extern const long MADV_DOFORK;
extern const long MADV_DONTDUMP;
extern const long MADV_DONTFORK;
extern const long MADV_DONTNEED;
extern const long MADV_FREE;
extern const long MADV_HUGEPAGE;
extern const long MADV_HWPOISON;
extern const long MADV_MERGEABLE;
extern const long MADV_NOHUGEPAGE;
extern const long MADV_NORMAL;
extern const long MADV_RANDOM;
extern const long MADV_REMOVE;
extern const long MADV_SEQUENTIAL;
extern const long MADV_UNMERGEABLE;
extern const long MADV_WILLNEED;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/map.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_MAP_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long MAP_32BIT;
extern const long MAP_ANON;
extern const long MAP_ANONYMOUS;
extern const long MAP_DENYWRITE;
extern const long MAP_EXECUTABLE;
extern const long MAP_FILE;
extern const long MAP_FIXED;
extern const long MAP_GROWSDOWN;
extern const long MAP_HUGETLB;
extern const long MAP_HUGE_MASK;
extern const long MAP_HUGE_SHIFT;
extern const long MAP_LOCKED;
extern const long MAP_NONBLOCK;
extern const long MAP_NORESERVE;
extern const long MAP_POPULATE;
extern const long MAP_PRIVATE;
extern const long MAP_SHARED;
extern const long MAP_TYPE;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define MAP_FILE    0
#define MAP_SHARED  1
#define MAP_PRIVATE 2
#define MAP_FIXED   16

#define MAP_32BIT      SYMBOLIC(MAP_32BIT)
#define MAP_ANONYMOUS  SYMBOLIC(MAP_ANONYMOUS)
#define MAP_CONCEAL    SYMBOLIC(MAP_CONCEAL)
#define MAP_DENYWRITE  SYMBOLIC(MAP_DENYWRITE)
#define MAP_EXECUTABLE SYMBOLIC(MAP_EXECUTABLE)
#define MAP_GROWSDOWN  SYMBOLIC(MAP_GROWSDOWN)
#define MAP_HUGETLB    SYMBOLIC(MAP_HUGETLB)
#define MAP_HUGE_MASK  SYMBOLIC(MAP_HUGE_MASK)
#define MAP_HUGE_SHIFT SYMBOLIC(MAP_HUGE_SHIFT)
#define MAP_LOCKED     SYMBOLIC(MAP_LOCKED)
#define MAP_NONBLOCK   SYMBOLIC(MAP_NONBLOCK)
#define MAP_NORESERVE  SYMBOLIC(MAP_NORESERVE)
#define MAP_POPULATE   SYMBOLIC(MAP_POPULATE)
#define MAP_TYPE       SYMBOLIC(MAP_TYPE)

#define MAP_ANON   MAP_ANONYMOUS
#define MAP_NOCORE MAP_CONCEAL
#define MAP_STACK  MAP_GROWSDOWN



/*!BEGIN libc/sysv/consts/mcast.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_MCAST_H_

#define MCAST_BLOCK_SOURCE SYMBOLIC(MCAST_BLOCK_SOURCE)
#define MCAST_EXCLUDE SYMBOLIC(MCAST_EXCLUDE)
#define MCAST_INCLUDE SYMBOLIC(MCAST_INCLUDE)
#define MCAST_JOIN_GROUP SYMBOLIC(MCAST_JOIN_GROUP)
#define MCAST_JOIN_SOURCE_GROUP SYMBOLIC(MCAST_JOIN_SOURCE_GROUP)
#define MCAST_LEAVE_GROUP SYMBOLIC(MCAST_LEAVE_GROUP)
#define MCAST_LEAVE_SOURCE_GROUP SYMBOLIC(MCAST_LEAVE_SOURCE_GROUP)
#define MCAST_MSFILTER SYMBOLIC(MCAST_MSFILTER)
#define MCAST_UNBLOCK_SOURCE SYMBOLIC(MCAST_UNBLOCK_SOURCE)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long MCAST_BLOCK_SOURCE;
extern const long MCAST_EXCLUDE;
extern const long MCAST_INCLUDE;
extern const long MCAST_JOIN_GROUP;
extern const long MCAST_JOIN_SOURCE_GROUP;
extern const long MCAST_LEAVE_GROUP;
extern const long MCAST_LEAVE_SOURCE_GROUP;
extern const long MCAST_MSFILTER;
extern const long MCAST_UNBLOCK_SOURCE;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/mfd.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_MFD_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long MFD_CLOEXEC;
extern const long MFD_ALLOW_SEALING;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define MFD_CLOEXEC       SYMBOLIC(MFD_CLOEXEC)
#define MFD_ALLOW_SEALING SYMBOLIC(MFD_ALLOW_SEALING)



/*!BEGIN libc/sysv/consts/mlock.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_MLOCK_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long MCL_CURRENT;
extern const long MCL_FUTURE;
extern const long MCL_ONFAULT;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define MCL_CURRENT LITERALLY(1)
#define MCL_FUTURE  LITERALLY(2)
#define MCL_ONFAULT SYMBOLIC(MCL_ONFAULT)



/*!BEGIN libc/sysv/consts/mnt.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_MNT_H_

#define MNT_DETACH SYMBOLIC(MNT_DETACH)
#define MNT_EXPIRE SYMBOLIC(MNT_EXPIRE)
#define MNT_FORCE SYMBOLIC(MNT_FORCE)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long MNT_DETACH;
extern const long MNT_EXPIRE;
extern const long MNT_FORCE;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/modem.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_MODEM_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long TIOCMGET;
extern const long TIOCMSET;
extern const long TIOCMBIC;
extern const long TIOCMBIS;

extern const long TIOCM_CAR;
extern const long TIOCM_CD;
extern const long TIOCM_CTS;
extern const long TIOCM_DSR;
extern const long TIOCM_DTR;
extern const long TIOCM_LE;
extern const long TIOCM_RI;
extern const long TIOCM_RNG;
extern const long TIOCM_RTS;
extern const long TIOCM_SR;
extern const long TIOCM_ST;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define TIOCMGET SYMBOLIC(TIOCMGET)
#define TIOCMSET SYMBOLIC(TIOCMSET)
#define TIOCMBIC SYMBOLIC(TIOCMBIC)
#define TIOCMBIS SYMBOLIC(TIOCMBIS)

#define TIOCM_LE  LITERALLY(0x01)
#define TIOCM_DTR LITERALLY(0x02)
#define TIOCM_RTS LITERALLY(0x04)
#define TIOCM_ST  LITERALLY(0x08)
#define TIOCM_SR  LITERALLY(0x10)
#define TIOCM_CTS LITERALLY(0x20)
#define TIOCM_CAR LITERALLY(0x40)
#define TIOCM_CD  LITERALLY(0x40)
#define TIOCM_RI  LITERALLY(0x80)
#define TIOCM_RNG LITERALLY(0x80)
#define TIOCM_DSR LITERALLY(0x0100)



/*!BEGIN libc/sysv/consts/mount.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_MOUNT_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long MS_ACTIVE;
extern const long MS_BIND;
extern const long MS_DIRSYNC;
extern const long MS_I_VERSION;
extern const long MS_KERNMOUNT;
extern const long MS_LAZYTIME;
extern const long MS_MANDLOCK;
extern const long MS_MGC_MSK;
extern const long MS_MGC_VAL;
extern const long MS_MOVE;
extern const long MS_NOATIME;
extern const long MS_NODEV;
extern const long MS_NODIRATIME;
extern const long MS_NOEXEC;
extern const long MS_NOSUID;
extern const long MS_NOUSER;
extern const long MS_POSIXACL;
extern const long MS_PRIVATE;
extern const long MS_RDONLY;
extern const long MS_REC;
extern const long MS_RELATIME;
extern const long MS_REMOUNT;
extern const long MS_RMT_MASK;
extern const long MS_SHARED;
extern const long MS_SILENT;
extern const long MS_SLAVE;
extern const long MS_STRICTATIME;
extern const long MS_SYNCHRONOUS;
extern const long MS_UNBINDABLE;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define MS_ACTIVE      SYMBOLIC(MS_ACTIVE)
#define MS_BIND        SYMBOLIC(MS_BIND)
#define MS_DIRSYNC     SYMBOLIC(MS_DIRSYNC)
#define MS_I_VERSION   SYMBOLIC(MS_I_VERSION)
#define MS_KERNMOUNT   SYMBOLIC(MS_KERNMOUNT)
#define MS_LAZYTIME    SYMBOLIC(MS_LAZYTIME)
#define MS_MANDLOCK    SYMBOLIC(MS_MANDLOCK)
#define MS_MGC_MSK     SYMBOLIC(MS_MGC_MSK)
#define MS_MGC_VAL     SYMBOLIC(MS_MGC_VAL)
#define MS_MOVE        SYMBOLIC(MS_MOVE)
#define MS_NOATIME     SYMBOLIC(MS_NOATIME)
#define MS_NODEV       SYMBOLIC(MS_NODEV)
#define MS_NODIRATIME  SYMBOLIC(MS_NODIRATIME)
#define MS_NOEXEC      SYMBOLIC(MS_NOEXEC)
#define MS_NOSUID      SYMBOLIC(MS_NOSUID)
#define MS_NOUSER      SYMBOLIC(MS_NOUSER)
#define MS_POSIXACL    SYMBOLIC(MS_POSIXACL)
#define MS_PRIVATE     SYMBOLIC(MS_PRIVATE)
#define MS_RDONLY      SYMBOLIC(MS_RDONLY)
#define MS_REC         SYMBOLIC(MS_REC)
#define MS_RELATIME    SYMBOLIC(MS_RELATIME)
#define MS_REMOUNT     SYMBOLIC(MS_REMOUNT)
#define MS_RMT_MASK    SYMBOLIC(MS_RMT_MASK)
#define MS_SHARED      SYMBOLIC(MS_SHARED)
#define MS_SILENT      SYMBOLIC(MS_SILENT)
#define MS_SLAVE       SYMBOLIC(MS_SLAVE)
#define MS_STRICTATIME SYMBOLIC(MS_STRICTATIME)
#define MS_SYNCHRONOUS SYMBOLIC(MS_SYNCHRONOUS)
#define MS_UNBINDABLE  SYMBOLIC(MS_UNBINDABLE)



/*!BEGIN libc/sysv/consts/mremap.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_MREMAP_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long MREMAP_FIXED;
extern const long MREMAP_MAYMOVE;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define MREMAP_MAYMOVE LITERALLY(1)
#define MREMAP_FIXED   LITERALLY(2)



/*!BEGIN libc/sysv/consts/msg.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_MSG_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long MSG_BATCH;
extern const long MSG_CMSG_CLOEXEC;
extern const long MSG_CONFIRM;
extern const long MSG_CTRUNC;
extern const long MSG_DONTROUTE;
extern const long MSG_DONTWAIT;
extern const long MSG_EOR;
extern const long MSG_ERRQUEUE;
extern const long MSG_EXCEPT;
extern const long MSG_FASTOPEN;
extern const long MSG_FIN;
extern const long MSG_INFO;
extern const long MSG_MORE;
extern const long MSG_NOERROR;
extern const long MSG_NOSIGNAL;
extern const long MSG_OOB;
extern const long MSG_PARITY_ERROR;
extern const long MSG_PEEK;
extern const long MSG_PROXY;
extern const long MSG_RST;
extern const long MSG_STAT;
extern const long MSG_SYN;
extern const long MSG_TRUNC;
extern const long MSG_WAITALL;
extern const long MSG_WAITFORONE;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define MSG_BATCH SYMBOLIC(MSG_BATCH)
#define MSG_CMSG_CLOEXEC SYMBOLIC(MSG_CMSG_CLOEXEC)
#define MSG_CONFIRM SYMBOLIC(MSG_CONFIRM)
#define MSG_CTRUNC SYMBOLIC(MSG_CTRUNC)
#define MSG_DONTROUTE LITERALLY(4)
#define MSG_DONTWAIT SYMBOLIC(MSG_DONTWAIT)
#define MSG_EOR SYMBOLIC(MSG_EOR)
#define MSG_ERRQUEUE SYMBOLIC(MSG_ERRQUEUE)
#define MSG_EXCEPT SYMBOLIC(MSG_EXCEPT)
#define MSG_FASTOPEN SYMBOLIC(MSG_FASTOPEN)
#define MSG_FIN SYMBOLIC(MSG_FIN)
#define MSG_INFO SYMBOLIC(MSG_INFO)
#define MSG_MORE SYMBOLIC(MSG_MORE)
#define MSG_NOERROR SYMBOLIC(MSG_NOERROR)
#define MSG_NOSIGNAL SYMBOLIC(MSG_NOSIGNAL)
#define MSG_OOB LITERALLY(1)
#define MSG_PARITY_ERROR SYMBOLIC(MSG_PARITY_ERROR)
#define MSG_PEEK LITERALLY(2)
#define MSG_PROXY SYMBOLIC(MSG_PROXY)
#define MSG_RST SYMBOLIC(MSG_RST)
#define MSG_STAT SYMBOLIC(MSG_STAT)
#define MSG_SYN SYMBOLIC(MSG_SYN)
#define MSG_TRUNC SYMBOLIC(MSG_TRUNC)
#define MSG_WAITALL SYMBOLIC(MSG_WAITALL)
#define MSG_WAITFORONE SYMBOLIC(MSG_WAITFORONE)



/*!BEGIN libc/sysv/consts/msync.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_MSYNC_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long MS_SYNC;
extern const long MS_ASYNC;
extern const long MS_INVALIDATE;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define MS_SYNC       SYMBOLIC(MS_SYNC)
#define MS_ASYNC      LITERALLY(1)
#define MS_INVALIDATE SYMBOLIC(MS_INVALIDATE)



/*!BEGIN libc/sysv/consts/n.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_N_H_

#define N_6PACK SYMBOLIC(N_6PACK)
#define N_AX25 SYMBOLIC(N_AX25)
#define N_HCI SYMBOLIC(N_HCI)
#define N_HDLC SYMBOLIC(N_HDLC)
#define N_IRDA SYMBOLIC(N_IRDA)
#define N_MASC SYMBOLIC(N_MASC)
#define N_MOUSE SYMBOLIC(N_MOUSE)
#define N_PPP SYMBOLIC(N_PPP)
#define N_PROFIBUS_FDL SYMBOLIC(N_PROFIBUS_FDL)
#define N_R3964 SYMBOLIC(N_R3964)
#define N_SLIP SYMBOLIC(N_SLIP)
#define N_SMSBLOCK SYMBOLIC(N_SMSBLOCK)
#define N_STRIP SYMBOLIC(N_STRIP)
#define N_SYNC_PPP SYMBOLIC(N_SYNC_PPP)
#define N_TTY SYMBOLIC(N_TTY)
#define N_X25 SYMBOLIC(N_X25)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long N_6PACK;
extern const long N_AX25;
extern const long N_HCI;
extern const long N_HDLC;
extern const long N_IRDA;
extern const long N_MASC;
extern const long N_MOUSE;
extern const long N_PPP;
extern const long N_PROFIBUS_FDL;
extern const long N_R3964;
extern const long N_SLIP;
extern const long N_SMSBLOCK;
extern const long N_STRIP;
extern const long N_SYNC_PPP;
extern const long N_TTY;
extern const long N_X25;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/nd.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_ND_H_

#define ND_NA_FLAG_OVERRIDE SYMBOLIC(ND_NA_FLAG_OVERRIDE)
#define ND_NA_FLAG_ROUTER SYMBOLIC(ND_NA_FLAG_ROUTER)
#define ND_NA_FLAG_SOLICITED SYMBOLIC(ND_NA_FLAG_SOLICITED)
#define ND_NEIGHBOR_ADVERT SYMBOLIC(ND_NEIGHBOR_ADVERT)
#define ND_NEIGHBOR_SOLICIT SYMBOLIC(ND_NEIGHBOR_SOLICIT)
#define ND_RA_FLAG_HOME_AGENT SYMBOLIC(ND_RA_FLAG_HOME_AGENT)
#define ND_RA_FLAG_MANAGED SYMBOLIC(ND_RA_FLAG_MANAGED)
#define ND_RA_FLAG_OTHER SYMBOLIC(ND_RA_FLAG_OTHER)
#define ND_REDIRECT SYMBOLIC(ND_REDIRECT)
#define ND_ROUTER_ADVERT SYMBOLIC(ND_ROUTER_ADVERT)
#define ND_ROUTER_SOLICIT SYMBOLIC(ND_ROUTER_SOLICIT)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long ND_NA_FLAG_OVERRIDE;
extern const long ND_NA_FLAG_ROUTER;
extern const long ND_NA_FLAG_SOLICITED;
extern const long ND_NEIGHBOR_ADVERT;
extern const long ND_NEIGHBOR_SOLICIT;
extern const long ND_RA_FLAG_HOME_AGENT;
extern const long ND_RA_FLAG_MANAGED;
extern const long ND_RA_FLAG_OTHER;
extern const long ND_REDIRECT;
extern const long ND_ROUTER_ADVERT;
extern const long ND_ROUTER_SOLICIT;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/ok.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_OK_H_

#define F_OK SYMBOLIC(F_OK)
#define R_OK SYMBOLIC(R_OK)
#define W_OK SYMBOLIC(W_OK)
#define X_OK SYMBOLIC(X_OK)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long F_OK;
extern const long R_OK;
extern const long W_OK;
extern const long X_OK;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/personality.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_PERSONALITY_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long ADDR_COMPAT_LAYOUT;
extern const long READ_IMPLIES_EXEC;
extern const long ADDR_LIMIT_3GB;
extern const long FDPIC_FUNCPTRS;
extern const long STICKY_TIMEOUTS;
extern const long MMAP_PAGE_ZERO;
extern const long ADDR_LIMIT_32BIT;
extern const long WHOLE_SECONDS;
extern const long ADDR_NO_RANDOMIZE;
extern const long SHORT_INODE;
extern const long UNAME26;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define ADDR_COMPAT_LAYOUT SYMBOLIC(ADDR_COMPAT_LAYOUT)
#define READ_IMPLIES_EXEC SYMBOLIC(READ_IMPLIES_EXEC)
#define ADDR_LIMIT_3GB SYMBOLIC(ADDR_LIMIT_3GB)
#define FDPIC_FUNCPTRS SYMBOLIC(FDPIC_FUNCPTRS)
#define STICKY_TIMEOUTS SYMBOLIC(STICKY_TIMEOUTS)
#define MMAP_PAGE_ZERO SYMBOLIC(MMAP_PAGE_ZERO)
#define ADDR_LIMIT_32BIT SYMBOLIC(ADDR_LIMIT_32BIT)
#define WHOLE_SECONDS SYMBOLIC(WHOLE_SECONDS)
#define ADDR_NO_RANDOMIZE SYMBOLIC(ADDR_NO_RANDOMIZE)
#define SHORT_INODE SYMBOLIC(SHORT_INODE)
#define UNAME26 SYMBOLIC(UNAME26)



/*!BEGIN libc/sysv/consts/pf.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_PF_H_

#define PF_ALG SYMBOLIC(PF_ALG)
#define PF_APPLETALK SYMBOLIC(PF_APPLETALK)
#define PF_ASH SYMBOLIC(PF_ASH)
#define PF_ATMPVC SYMBOLIC(PF_ATMPVC)
#define PF_ATMSVC SYMBOLIC(PF_ATMSVC)
#define PF_AX25 SYMBOLIC(PF_AX25)
#define PF_BLUETOOTH SYMBOLIC(PF_BLUETOOTH)
#define PF_BRIDGE SYMBOLIC(PF_BRIDGE)
#define PF_CAIF SYMBOLIC(PF_CAIF)
#define PF_CAN SYMBOLIC(PF_CAN)
#define PF_ECONET SYMBOLIC(PF_ECONET)
#define PF_FILE SYMBOLIC(PF_FILE)
#define PF_IB SYMBOLIC(PF_IB)
#define PF_IEEE802154 SYMBOLIC(PF_IEEE802154)
#define PF_INET SYMBOLIC(PF_INET)
#define PF_INET6 SYMBOLIC(PF_INET6)
#define PF_IPX SYMBOLIC(PF_IPX)
#define PF_IRDA SYMBOLIC(PF_IRDA)
#define PF_ISDN SYMBOLIC(PF_ISDN)
#define PF_IUCV SYMBOLIC(PF_IUCV)
#define PF_KCM SYMBOLIC(PF_KCM)
#define PF_KEY SYMBOLIC(PF_KEY)
#define PF_LLC SYMBOLIC(PF_LLC)
#define PF_LOCAL SYMBOLIC(PF_LOCAL)
#define PF_MAX SYMBOLIC(PF_MAX)
#define PF_MPLS SYMBOLIC(PF_MPLS)
#define PF_NETBEUI SYMBOLIC(PF_NETBEUI)
#define PF_NETLINK SYMBOLIC(PF_NETLINK)
#define PF_NETROM SYMBOLIC(PF_NETROM)
#define PF_NFC SYMBOLIC(PF_NFC)
#define PF_PACKET SYMBOLIC(PF_PACKET)
#define PF_PHONET SYMBOLIC(PF_PHONET)
#define PF_PPPOX SYMBOLIC(PF_PPPOX)
#define PF_RDS SYMBOLIC(PF_RDS)
#define PF_ROSE SYMBOLIC(PF_ROSE)
#define PF_ROUTE SYMBOLIC(PF_ROUTE)
#define PF_RXRPC SYMBOLIC(PF_RXRPC)
#define PF_SECURITY SYMBOLIC(PF_SECURITY)
#define PF_SNA SYMBOLIC(PF_SNA)
#define PF_TIPC SYMBOLIC(PF_TIPC)
#define PF_UNIX SYMBOLIC(PF_UNIX)
#define PF_UNSPEC SYMBOLIC(PF_UNSPEC)
#define PF_VSOCK SYMBOLIC(PF_VSOCK)
#define PF_WANPIPE SYMBOLIC(PF_WANPIPE)
#define PF_X25 SYMBOLIC(PF_X25)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long PF_ALG;
extern const long PF_APPLETALK;
extern const long PF_ASH;
extern const long PF_ATMPVC;
extern const long PF_ATMSVC;
extern const long PF_AX25;
extern const long PF_BLUETOOTH;
extern const long PF_BRIDGE;
extern const long PF_CAIF;
extern const long PF_CAN;
extern const long PF_ECONET;
extern const long PF_FILE;
extern const long PF_IB;
extern const long PF_IEEE802154;
extern const long PF_INET6;
extern const long PF_INET;
extern const long PF_IPX;
extern const long PF_IRDA;
extern const long PF_ISDN;
extern const long PF_IUCV;
extern const long PF_KCM;
extern const long PF_KEY;
extern const long PF_LLC;
extern const long PF_LOCAL;
extern const long PF_MAX;
extern const long PF_MPLS;
extern const long PF_NETBEUI;
extern const long PF_NETLINK;
extern const long PF_NETROM;
extern const long PF_NFC;
extern const long PF_PACKET;
extern const long PF_PHONET;
extern const long PF_PPPOX;
extern const long PF_RDS;
extern const long PF_ROSE;
extern const long PF_ROUTE;
extern const long PF_RXRPC;
extern const long PF_SECURITY;
extern const long PF_SNA;
extern const long PF_TIPC;
extern const long PF_UNIX;
extern const long PF_UNSPEC;
extern const long PF_VSOCK;
extern const long PF_WANPIPE;
extern const long PF_X25;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/poll.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_POLL_H_

#define POLLERR    SYMBOLIC(POLLERR)
#define POLLHUP    SYMBOLIC(POLLHUP)
#define POLLIN     SYMBOLIC(POLLIN)
#define POLLNVAL   SYMBOLIC(POLLNVAL)
#define POLLOUT    SYMBOLIC(POLLOUT)
#define POLLPRI    SYMBOLIC(POLLPRI)
#define POLLRDBAND SYMBOLIC(POLLRDBAND)
#define POLLRDHUP  SYMBOLIC(POLLRDHUP)
#define POLLRDNORM SYMBOLIC(POLLRDNORM)
#define POLLWRBAND SYMBOLIC(POLLWRBAND)
#define POLLWRNORM SYMBOLIC(POLLWRNORM)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const int16_t POLLERR;
extern const int16_t POLLHUP;
extern const int16_t POLLIN;
extern const int16_t POLLNVAL;
extern const int16_t POLLOUT;
extern const int16_t POLLPRI;
extern const int16_t POLLRDBAND;
extern const int16_t POLLRDHUP;
extern const int16_t POLLRDNORM;
extern const int16_t POLLWRBAND;
extern const int16_t POLLWRNORM;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/posix.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_POSIX_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long POSIX_FADV_DONTNEED;
extern const long POSIX_FADV_NOREUSE;
extern const long POSIX_FADV_NORMAL;
extern const long POSIX_FADV_RANDOM;
extern const long POSIX_FADV_SEQUENTIAL;
extern const long POSIX_FADV_WILLNEED;
extern const long POSIX_MADV_DONTNEED;
extern const long POSIX_MADV_NORMAL;
extern const long POSIX_MADV_RANDOM;
extern const long POSIX_MADV_SEQUENTIAL;
extern const long POSIX_MADV_WILLNEED;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define POSIX_FADV_DONTNEED   SYMBOLIC(POSIX_FADV_DONTNEED)
#define POSIX_FADV_NOREUSE    SYMBOLIC(POSIX_FADV_NOREUSE)
#define POSIX_FADV_NORMAL     SYMBOLIC(POSIX_FADV_NORMAL)
#define POSIX_FADV_RANDOM     SYMBOLIC(POSIX_FADV_RANDOM)
#define POSIX_FADV_SEQUENTIAL SYMBOLIC(POSIX_FADV_SEQUENTIAL)
#define POSIX_FADV_WILLNEED   SYMBOLIC(POSIX_FADV_WILLNEED)
#define POSIX_MADV_DONTNEED   SYMBOLIC(POSIX_MADV_DONTNEED)
#define POSIX_MADV_NORMAL     SYMBOLIC(POSIX_MADV_NORMAL)
#define POSIX_MADV_RANDOM     SYMBOLIC(POSIX_MADV_RANDOM)
#define POSIX_MADV_SEQUENTIAL SYMBOLIC(POSIX_MADV_SEQUENTIAL)
#define POSIX_MADV_WILLNEED   SYMBOLIC(POSIX_MADV_WILLNEED)



/*!BEGIN libc/sysv/consts/pr.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_PR_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long PR_CAPBSET_DROP;
extern const long PR_CAPBSET_READ;
extern const long PR_CAP_AMBIENT;
extern const long PR_CAP_AMBIENT_CLEAR_ALL;
extern const long PR_CAP_AMBIENT_IS_SET;
extern const long PR_CAP_AMBIENT_LOWER;
extern const long PR_CAP_AMBIENT_RAISE;
extern const long PR_ENDIAN_BIG;
extern const long PR_ENDIAN_LITTLE;
extern const long PR_ENDIAN_PPC_LITTLE;
extern const long PR_FPEMU_NOPRINT;
extern const long PR_FPEMU_SIGFPE;
extern const long PR_FP_EXC_ASYNC;
extern const long PR_FP_EXC_DISABLED;
extern const long PR_FP_EXC_DIV;
extern const long PR_FP_EXC_INV;
extern const long PR_FP_EXC_NONRECOV;
extern const long PR_FP_EXC_OVF;
extern const long PR_FP_EXC_PRECISE;
extern const long PR_FP_EXC_RES;
extern const long PR_FP_EXC_SW_ENABLE;
extern const long PR_FP_EXC_UND;
extern const long PR_FP_MODE_FR;
extern const long PR_FP_MODE_FRE;
extern const long PR_GET_CHILD_SUBREAPER;
extern const long PR_GET_DUMPABLE;
extern const long PR_GET_ENDIAN;
extern const long PR_GET_FPEMU;
extern const long PR_GET_FPEXC;
extern const long PR_GET_FP_MODE;
extern const long PR_GET_KEEPCAPS;
extern const long PR_GET_NAME;
extern const long PR_GET_NO_NEW_PRIVS;
extern const long PR_GET_PDEATHSIG;
extern const long PR_GET_SECCOMP;
extern const long PR_GET_SECUREBITS;
extern const long PR_GET_SPECULATION_CTRL;
extern const long PR_GET_THP_DISABLE;
extern const long PR_GET_TID_ADDRESS;
extern const long PR_GET_TIMERSLACK;
extern const long PR_GET_TIMING;
extern const long PR_GET_TSC;
extern const long PR_GET_UNALIGN;
extern const long PR_MCE_KILL;
extern const long PR_MCE_KILL_CLEAR;
extern const long PR_MCE_KILL_DEFAULT;
extern const long PR_MCE_KILL_EARLY;
extern const long PR_MCE_KILL_GET;
extern const long PR_MCE_KILL_LATE;
extern const long PR_MCE_KILL_SET;
extern const long PR_MPX_DISABLE_MANAGEMENT;
extern const long PR_MPX_ENABLE_MANAGEMENT;
extern const long PR_SET_CHILD_SUBREAPER;
extern const long PR_SET_DUMPABLE;
extern const long PR_SET_ENDIAN;
extern const long PR_SET_FPEMU;
extern const long PR_SET_FPEXC;
extern const long PR_SET_FP_MODE;
extern const long PR_SET_KEEPCAPS;
extern const long PR_SET_MM;
extern const long PR_SET_MM_ARG_END;
extern const long PR_SET_MM_ARG_START;
extern const long PR_SET_MM_AUXV;
extern const long PR_SET_MM_BRK;
extern const long PR_SET_MM_END_CODE;
extern const long PR_SET_MM_END_DATA;
extern const long PR_SET_MM_ENV_END;
extern const long PR_SET_MM_ENV_START;
extern const long PR_SET_MM_EXE_FILE;
extern const long PR_SET_MM_MAP;
extern const long PR_SET_MM_MAP_SIZE;
extern const long PR_SET_MM_START_BRK;
extern const long PR_SET_MM_START_CODE;
extern const long PR_SET_MM_START_DATA;
extern const long PR_SET_MM_START_STACK;
extern const long PR_SET_NAME;
extern const long PR_SET_NO_NEW_PRIVS;
extern const long PR_SET_PDEATHSIG;
extern const long PR_SET_PTRACER;
extern const long PR_SET_PTRACER_ANY;
extern const long PR_SET_SECCOMP;
extern const long PR_SET_SECUREBITS;
extern const long PR_SET_SPECULATION_CTRL;
extern const long PR_SET_THP_DISABLE;
extern const long PR_SET_TIMERSLACK;
extern const long PR_SET_TIMING;
extern const long PR_SET_TSC;
extern const long PR_SET_UNALIGN;
extern const long PR_SPEC_DISABLE;
extern const long PR_SPEC_ENABLE;
extern const long PR_SPEC_FORCE_DISABLE;
extern const long PR_SPEC_NOT_AFFECTED;
extern const long PR_SPEC_PRCTL;
extern const long PR_SPEC_STORE_BYPASS;
extern const long PR_TASK_PERF_EVENTS_DISABLE;
extern const long PR_TASK_PERF_EVENTS_ENABLE;
extern const long PR_TIMING_STATISTICAL;
extern const long PR_TIMING_TIMESTAMP;
extern const long PR_TSC_ENABLE;
extern const long PR_TSC_SIGSEGV;
extern const long PR_UNALIGN_NOPRINT;
extern const long PR_UNALIGN_SIGBUS;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define PR_CAPBSET_DROP             SYMBOLIC(PR_CAPBSET_DROP)
#define PR_CAPBSET_READ             SYMBOLIC(PR_CAPBSET_READ)
#define PR_CAP_AMBIENT              SYMBOLIC(PR_CAP_AMBIENT)
#define PR_CAP_AMBIENT_CLEAR_ALL    SYMBOLIC(PR_CAP_AMBIENT_CLEAR_ALL)
#define PR_CAP_AMBIENT_IS_SET       SYMBOLIC(PR_CAP_AMBIENT_IS_SET)
#define PR_CAP_AMBIENT_LOWER        SYMBOLIC(PR_CAP_AMBIENT_LOWER)
#define PR_CAP_AMBIENT_RAISE        SYMBOLIC(PR_CAP_AMBIENT_RAISE)
#define PR_ENDIAN_BIG               SYMBOLIC(PR_ENDIAN_BIG)
#define PR_ENDIAN_LITTLE            SYMBOLIC(PR_ENDIAN_LITTLE)
#define PR_ENDIAN_PPC_LITTLE        SYMBOLIC(PR_ENDIAN_PPC_LITTLE)
#define PR_FPEMU_NOPRINT            SYMBOLIC(PR_FPEMU_NOPRINT)
#define PR_FPEMU_SIGFPE             SYMBOLIC(PR_FPEMU_SIGFPE)
#define PR_FP_EXC_ASYNC             SYMBOLIC(PR_FP_EXC_ASYNC)
#define PR_FP_EXC_DISABLED          SYMBOLIC(PR_FP_EXC_DISABLED)
#define PR_FP_EXC_DIV               SYMBOLIC(PR_FP_EXC_DIV)
#define PR_FP_EXC_INV               SYMBOLIC(PR_FP_EXC_INV)
#define PR_FP_EXC_NONRECOV          SYMBOLIC(PR_FP_EXC_NONRECOV)
#define PR_FP_EXC_OVF               SYMBOLIC(PR_FP_EXC_OVF)
#define PR_FP_EXC_PRECISE           SYMBOLIC(PR_FP_EXC_PRECISE)
#define PR_FP_EXC_RES               SYMBOLIC(PR_FP_EXC_RES)
#define PR_FP_EXC_SW_ENABLE         SYMBOLIC(PR_FP_EXC_SW_ENABLE)
#define PR_FP_EXC_UND               SYMBOLIC(PR_FP_EXC_UND)
#define PR_FP_MODE_FR               SYMBOLIC(PR_FP_MODE_FR)
#define PR_FP_MODE_FRE              SYMBOLIC(PR_FP_MODE_FRE)
#define PR_GET_CHILD_SUBREAPER      SYMBOLIC(PR_GET_CHILD_SUBREAPER)
#define PR_GET_DUMPABLE             SYMBOLIC(PR_GET_DUMPABLE)
#define PR_GET_ENDIAN               SYMBOLIC(PR_GET_ENDIAN)
#define PR_GET_FPEMU                SYMBOLIC(PR_GET_FPEMU)
#define PR_GET_FPEXC                SYMBOLIC(PR_GET_FPEXC)
#define PR_GET_FP_MODE              SYMBOLIC(PR_GET_FP_MODE)
#define PR_GET_KEEPCAPS             SYMBOLIC(PR_GET_KEEPCAPS)
#define PR_GET_NAME                 SYMBOLIC(PR_GET_NAME)
#define PR_GET_NO_NEW_PRIVS         SYMBOLIC(PR_GET_NO_NEW_PRIVS)
#define PR_GET_PDEATHSIG            SYMBOLIC(PR_GET_PDEATHSIG)
#define PR_GET_SECCOMP              SYMBOLIC(PR_GET_SECCOMP)
#define PR_GET_SECUREBITS           SYMBOLIC(PR_GET_SECUREBITS)
#define PR_GET_SPECULATION_CTRL     SYMBOLIC(PR_GET_SPECULATION_CTRL)
#define PR_GET_THP_DISABLE          SYMBOLIC(PR_GET_THP_DISABLE)
#define PR_GET_TID_ADDRESS          SYMBOLIC(PR_GET_TID_ADDRESS)
#define PR_GET_TIMERSLACK           SYMBOLIC(PR_GET_TIMERSLACK)
#define PR_GET_TIMING               SYMBOLIC(PR_GET_TIMING)
#define PR_GET_TSC                  SYMBOLIC(PR_GET_TSC)
#define PR_GET_UNALIGN              SYMBOLIC(PR_GET_UNALIGN)
#define PR_MCE_KILL                 SYMBOLIC(PR_MCE_KILL)
#define PR_MCE_KILL_CLEAR           SYMBOLIC(PR_MCE_KILL_CLEAR)
#define PR_MCE_KILL_DEFAULT         SYMBOLIC(PR_MCE_KILL_DEFAULT)
#define PR_MCE_KILL_EARLY           SYMBOLIC(PR_MCE_KILL_EARLY)
#define PR_MCE_KILL_GET             SYMBOLIC(PR_MCE_KILL_GET)
#define PR_MCE_KILL_LATE            SYMBOLIC(PR_MCE_KILL_LATE)
#define PR_MCE_KILL_SET             SYMBOLIC(PR_MCE_KILL_SET)
#define PR_MPX_DISABLE_MANAGEMENT   SYMBOLIC(PR_MPX_DISABLE_MANAGEMENT)
#define PR_MPX_ENABLE_MANAGEMENT    SYMBOLIC(PR_MPX_ENABLE_MANAGEMENT)
#define PR_SET_CHILD_SUBREAPER      SYMBOLIC(PR_SET_CHILD_SUBREAPER)
#define PR_SET_DUMPABLE             SYMBOLIC(PR_SET_DUMPABLE)
#define PR_SET_ENDIAN               SYMBOLIC(PR_SET_ENDIAN)
#define PR_SET_FPEMU                SYMBOLIC(PR_SET_FPEMU)
#define PR_SET_FPEXC                SYMBOLIC(PR_SET_FPEXC)
#define PR_SET_FP_MODE              SYMBOLIC(PR_SET_FP_MODE)
#define PR_SET_KEEPCAPS             SYMBOLIC(PR_SET_KEEPCAPS)
#define PR_SET_MM                   SYMBOLIC(PR_SET_MM)
#define PR_SET_MM_ARG_END           SYMBOLIC(PR_SET_MM_ARG_END)
#define PR_SET_MM_ARG_START         SYMBOLIC(PR_SET_MM_ARG_START)
#define PR_SET_MM_AUXV              SYMBOLIC(PR_SET_MM_AUXV)
#define PR_SET_MM_BRK               SYMBOLIC(PR_SET_MM_BRK)
#define PR_SET_MM_END_CODE          SYMBOLIC(PR_SET_MM_END_CODE)
#define PR_SET_MM_END_DATA          SYMBOLIC(PR_SET_MM_END_DATA)
#define PR_SET_MM_ENV_END           SYMBOLIC(PR_SET_MM_ENV_END)
#define PR_SET_MM_ENV_START         SYMBOLIC(PR_SET_MM_ENV_START)
#define PR_SET_MM_EXE_FILE          SYMBOLIC(PR_SET_MM_EXE_FILE)
#define PR_SET_MM_MAP               SYMBOLIC(PR_SET_MM_MAP)
#define PR_SET_MM_MAP_SIZE          SYMBOLIC(PR_SET_MM_MAP_SIZE)
#define PR_SET_MM_START_BRK         SYMBOLIC(PR_SET_MM_START_BRK)
#define PR_SET_MM_START_CODE        SYMBOLIC(PR_SET_MM_START_CODE)
#define PR_SET_MM_START_DATA        SYMBOLIC(PR_SET_MM_START_DATA)
#define PR_SET_MM_START_STACK       SYMBOLIC(PR_SET_MM_START_STACK)
#define PR_SET_NAME                 SYMBOLIC(PR_SET_NAME)
#define PR_SET_NO_NEW_PRIVS         SYMBOLIC(PR_SET_NO_NEW_PRIVS)
#define PR_SET_PDEATHSIG            SYMBOLIC(PR_SET_PDEATHSIG)
#define PR_SET_PTRACER              SYMBOLIC(PR_SET_PTRACER)
#define PR_SET_PTRACER_ANY          SYMBOLIC(PR_SET_PTRACER_ANY)
#define PR_SET_SECCOMP              SYMBOLIC(PR_SET_SECCOMP)
#define PR_SET_SECUREBITS           SYMBOLIC(PR_SET_SECUREBITS)
#define PR_SET_SPECULATION_CTRL     SYMBOLIC(PR_SET_SPECULATION_CTRL)
#define PR_SET_THP_DISABLE          SYMBOLIC(PR_SET_THP_DISABLE)
#define PR_SET_TIMERSLACK           SYMBOLIC(PR_SET_TIMERSLACK)
#define PR_SET_TIMING               SYMBOLIC(PR_SET_TIMING)
#define PR_SET_TSC                  SYMBOLIC(PR_SET_TSC)
#define PR_SET_UNALIGN              SYMBOLIC(PR_SET_UNALIGN)
#define PR_SPEC_DISABLE             SYMBOLIC(PR_SPEC_DISABLE)
#define PR_SPEC_ENABLE              SYMBOLIC(PR_SPEC_ENABLE)
#define PR_SPEC_FORCE_DISABLE       SYMBOLIC(PR_SPEC_FORCE_DISABLE)
#define PR_SPEC_NOT_AFFECTED        SYMBOLIC(PR_SPEC_NOT_AFFECTED)
#define PR_SPEC_PRCTL               SYMBOLIC(PR_SPEC_PRCTL)
#define PR_SPEC_STORE_BYPASS        SYMBOLIC(PR_SPEC_STORE_BYPASS)
#define PR_TASK_PERF_EVENTS_DISABLE SYMBOLIC(PR_TASK_PERF_EVENTS_DISABLE)
#define PR_TASK_PERF_EVENTS_ENABLE  SYMBOLIC(PR_TASK_PERF_EVENTS_ENABLE)
#define PR_TIMING_STATISTICAL       SYMBOLIC(PR_TIMING_STATISTICAL)
#define PR_TIMING_TIMESTAMP         SYMBOLIC(PR_TIMING_TIMESTAMP)
#define PR_TSC_ENABLE               SYMBOLIC(PR_TSC_ENABLE)
#define PR_TSC_SIGSEGV              SYMBOLIC(PR_TSC_SIGSEGV)
#define PR_UNALIGN_NOPRINT          SYMBOLIC(PR_UNALIGN_NOPRINT)
#define PR_UNALIGN_SIGBUS           SYMBOLIC(PR_UNALIGN_SIGBUS)



/*!BEGIN libc/sysv/consts/prio.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_PRIO_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long PRIO_MAX;
extern const long PRIO_MIN;
extern const long PRIO_PGRP;
extern const long PRIO_PROCESS;
extern const long PRIO_USER;
extern const long NZERO;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define PRIO_PROCESS LITERALLY(0)
#define PRIO_PGRP    LITERALLY(1)
#define PRIO_USER    LITERALLY(2)
#define PRIO_MIN     LITERALLY(-20)
#define PRIO_MAX     LITERALLY(20)
#define NZERO        LITERALLY(20)



/*!BEGIN libc/sysv/consts/prot.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_PROT_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long PROT_NONE;
extern const long PROT_READ;
extern const long PROT_WRITE;
extern const long PROT_EXEC;
extern const long PROT_GROWSDOWN;
extern const long PROT_GROWSUP;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define PROT_NONE 0
#define PROT_READ 1
#define PROT_WRITE 2
#define PROT_EXEC 4
#define PROT_GROWSDOWN SYMBOLIC(PROT_GROWSDOWN)
#define PROT_GROWSUP SYMBOLIC(PROT_GROWSUP)



/*!BEGIN libc/sysv/consts/pt.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_PT_H_


/*!BEGIN libc/sysv/consts/ptrace.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_PTRACE_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long PTRACE_TRACEME;
extern const long PTRACE_PEEKTEXT;
extern const long PTRACE_PEEKDATA;
extern const long PTRACE_PEEKUSER;
extern const long PTRACE_POKETEXT;
extern const long PTRACE_POKEDATA;
extern const long PTRACE_POKEUSER;
extern const long PTRACE_CONT;
extern const long PTRACE_KILL;
extern const long PTRACE_SINGLESTEP;
extern const long PTRACE_GETREGS;
extern const long PTRACE_SETREGS;
extern const long PTRACE_GETFPREGS;
extern const long PTRACE_SETFPREGS;
extern const long PTRACE_ATTACH;
extern const long PTRACE_DETACH;
extern const long PTRACE_GETFPXREGS;
extern const long PTRACE_SETFPXREGS;
extern const long PTRACE_SYSCALL;
extern const long PTRACE_GETEVENTMSG;
extern const long PTRACE_GETSIGINFO;
extern const long PTRACE_SETOPTIONS;
extern const long PTRACE_SETSIGINFO;
extern const long PTRACE_GETREGSET;
extern const long PTRACE_GETSIGMASK;
extern const long PTRACE_INTERRUPT;
extern const long PTRACE_LISTEN;
extern const long PTRACE_PEEKSIGINFO;
extern const long PTRACE_SECCOMP_GET_FILTER;
extern const long PTRACE_SEIZE;
extern const long PTRACE_SETREGSET;
extern const long PTRACE_SETSIGMASK;
extern const long PTRACE_O_TRACESYSGOOD;
extern const long PTRACE_O_TRACEFORK;
extern const long PTRACE_O_TRACEVFORK;
extern const long PTRACE_O_TRACECLONE;
extern const long PTRACE_O_TRACEEXEC;
extern const long PTRACE_O_TRACEVFORKDONE;
extern const long PTRACE_O_TRACEEXIT;
extern const long PTRACE_O_MASK;
extern const long PTRACE_EVENT_FORK;
extern const long PTRACE_EVENT_VFORK;
extern const long PTRACE_EVENT_CLONE;
extern const long PTRACE_EVENT_EXEC;
extern const long PTRACE_EVENT_VFORK_DONE;
extern const long PTRACE_EVENT_EXIT;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define PTRACE_TRACEME            SYMBOLIC(PTRACE_TRACEME)
#define PTRACE_PEEKTEXT           SYMBOLIC(PTRACE_PEEKTEXT)
#define PTRACE_PEEKDATA           SYMBOLIC(PTRACE_PEEKDATA)
#define PTRACE_PEEKUSER           SYMBOLIC(PTRACE_PEEKUSER)
#define PTRACE_POKETEXT           SYMBOLIC(PTRACE_POKETEXT)
#define PTRACE_POKEDATA           SYMBOLIC(PTRACE_POKEDATA)
#define PTRACE_POKEUSER           SYMBOLIC(PTRACE_POKEUSER)
#define PTRACE_CONT               SYMBOLIC(PTRACE_CONT)
#define PTRACE_KILL               SYMBOLIC(PTRACE_KILL)
#define PTRACE_SINGLESTEP         SYMBOLIC(PTRACE_SINGLESTEP)
#define PTRACE_GETREGS            SYMBOLIC(PTRACE_GETREGS)
#define PTRACE_SETREGS            SYMBOLIC(PTRACE_SETREGS)
#define PTRACE_GETFPREGS          SYMBOLIC(PTRACE_GETFPREGS)
#define PTRACE_SETFPREGS          SYMBOLIC(PTRACE_SETFPREGS)
#define PTRACE_ATTACH             SYMBOLIC(PTRACE_ATTACH)
#define PTRACE_DETACH             SYMBOLIC(PTRACE_DETACH)
#define PTRACE_GETFPXREGS         SYMBOLIC(PTRACE_GETFPXREGS)
#define PTRACE_SETFPXREGS         SYMBOLIC(PTRACE_SETFPXREGS)
#define PTRACE_SYSCALL            SYMBOLIC(PTRACE_SYSCALL)
#define PTRACE_GETEVENTMSG        SYMBOLIC(PTRACE_GETEVENTMSG)
#define PTRACE_GETSIGINFO         SYMBOLIC(PTRACE_GETSIGINFO)
#define PTRACE_SETOPTIONS         SYMBOLIC(PTRACE_SETOPTIONS)
#define PTRACE_SETSIGINFO         SYMBOLIC(PTRACE_SETSIGINFO)
#define PTRACE_GETREGSET          SYMBOLIC(PTRACE_GETREGSET)
#define PTRACE_GETSIGMASK         SYMBOLIC(PTRACE_GETSIGMASK)
#define PTRACE_INTERRUPT          SYMBOLIC(PTRACE_INTERRUPT)
#define PTRACE_LISTEN             SYMBOLIC(PTRACE_LISTEN)
#define PTRACE_PEEKSIGINFO        SYMBOLIC(PTRACE_PEEKSIGINFO)
#define PTRACE_SECCOMP_GET_FILTER SYMBOLIC(PTRACE_SECCOMP_GET_FILTER)
#define PTRACE_SEIZE              SYMBOLIC(PTRACE_SEIZE)
#define PTRACE_SETREGSET          SYMBOLIC(PTRACE_SETREGSET)
#define PTRACE_SETSIGMASK         SYMBOLIC(PTRACE_SETSIGMASK)
#define PTRACE_O_TRACESYSGOOD     SYMBOLIC(PTRACE_O_TRACESYSGOOD)
#define PTRACE_O_TRACEFORK        SYMBOLIC(PTRACE_O_TRACEFORK)
#define PTRACE_O_TRACEVFORK       SYMBOLIC(PTRACE_O_TRACEVFORK)
#define PTRACE_O_TRACECLONE       SYMBOLIC(PTRACE_O_TRACECLONE)
#define PTRACE_O_TRACEEXEC        SYMBOLIC(PTRACE_O_TRACEEXEC)
#define PTRACE_O_TRACEVFORKDONE   SYMBOLIC(PTRACE_O_TRACEVFORKDONE)
#define PTRACE_O_TRACEEXIT        SYMBOLIC(PTRACE_O_TRACEEXIT)
#define PTRACE_O_MASK             SYMBOLIC(PTRACE_O_MASK)
#define PTRACE_EVENT_FORK         SYMBOLIC(PTRACE_EVENT_FORK)
#define PTRACE_EVENT_VFORK        SYMBOLIC(PTRACE_EVENT_VFORK)
#define PTRACE_EVENT_CLONE        SYMBOLIC(PTRACE_EVENT_CLONE)
#define PTRACE_EVENT_EXEC         SYMBOLIC(PTRACE_EVENT_EXEC)
#define PTRACE_EVENT_VFORK_DONE   SYMBOLIC(PTRACE_EVENT_VFORK_DONE)
#define PTRACE_EVENT_EXIT         SYMBOLIC(PTRACE_EVENT_EXIT)


#define PT_ATTACH      PTRACE_ATTACH
#define PT_CONTINUE    PTRACE_CONT
#define PT_DETACH      PTRACE_DETACH
#define PT_GETEVENTMSG PTRACE_GETEVENTMSG
#define PT_GETFPREGS   PTRACE_GETFPREGS
#define PT_GETFPXREGS  PTRACE_GETFPXREGS
#define PT_GETREGS     PTRACE_GETREGS
#define PT_GETSIGINFO  PTRACE_GETSIGINFO
#define PT_KILL        PTRACE_KILL
#define PT_READ_D      PTRACE_PEEKDATA
#define PT_READ_I      PTRACE_PEEKTEXT
#define PT_READ_U      PTRACE_PEEKUSER
#define PT_SETFPREGS   PTRACE_SETFPREGS
#define PT_SETFPXREGS  PTRACE_SETFPXREGS
#define PT_SETOPTIONS  PTRACE_SETOPTIONS
#define PT_SETREGS     PTRACE_SETREGS
#define PT_SETSIGINFO  PTRACE_SETSIGINFO
#define PT_STEP        PTRACE_SINGLESTEP
#define PT_SYSCALL     PTRACE_SYSCALL
#define PT_WRITE_D     PTRACE_POKEDATA
#define PT_WRITE_I     PTRACE_POKETEXT
#define PT_WRITE_U     PTRACE_POKEUSER



/*!BEGIN libc/sysv/consts/pty.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_PTY_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long TIOCPKT;
extern const long TIOCPKT_DATA;
extern const long TIOCPKT_DOSTOP;
extern const long TIOCPKT_FLUSHREAD;
extern const long TIOCPKT_FLUSHWRITE;
extern const long TIOCPKT_IOCTL;
extern const long TIOCPKT_NOSTOP;
extern const long TIOCPKT_START;
extern const long TIOCPKT_STOP;
extern const long TIOCSPTLCK;
extern const long PTMGET;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define TIOCPKT            SYMBOLIC(TIOCPKT)
#define TIOCSPTLCK         SYMBOLIC(TIOCSPTLCK)
#define PTMGET             SYMBOLIC(PTMGET)
#define TIOCPKT_DATA       LITERALLY(0x00)
#define TIOCPKT_DOSTOP     LITERALLY(0x01)
#define TIOCPKT_FLUSHREAD  LITERALLY(0x02)
#define TIOCPKT_FLUSHWRITE LITERALLY(0x04)
#define TIOCPKT_IOCTL      LITERALLY(0x08)
#define TIOCPKT_NOSTOP     LITERALLY(0x10)
#define TIOCPKT_START      LITERALLY(0x20)
#define TIOCPKT_STOP       LITERALLY(0x40)



/*!BEGIN libc/sysv/consts/read.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_READ_H_

#define READ_10 SYMBOLIC(READ_10)
#define READ_12 SYMBOLIC(READ_12)
#define READ_6 SYMBOLIC(READ_6)
#define READ_BLOCK_LIMITS SYMBOLIC(READ_BLOCK_LIMITS)
#define READ_BUFFER SYMBOLIC(READ_BUFFER)
#define READ_CAPACITY SYMBOLIC(READ_CAPACITY)
#define READ_DEFECT_DATA SYMBOLIC(READ_DEFECT_DATA)
#define READ_ELEMENT_STATUS SYMBOLIC(READ_ELEMENT_STATUS)
#define READ_LONG SYMBOLIC(READ_LONG)
#define READ_POSITION SYMBOLIC(READ_POSITION)
#define READ_REVERSE SYMBOLIC(READ_REVERSE)
#define READ_TOC SYMBOLIC(READ_TOC)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long READ_10;
extern const long READ_12;
extern const long READ_6;
extern const long READ_BLOCK_LIMITS;
extern const long READ_BUFFER;
extern const long READ_CAPACITY;
extern const long READ_DEFECT_DATA;
extern const long READ_ELEMENT_STATUS;
extern const long READ_LONG;
extern const long READ_POSITION;
extern const long READ_REVERSE;
extern const long READ_TOC;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/rlim.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_RLIM_H_

#define RLIM_INFINITY SYMBOLIC(RLIM_INFINITY)
#define RLIM_NLIMITS SYMBOLIC(RLIM_NLIMITS)
#define RLIM_SAVED_CUR SYMBOLIC(RLIM_SAVED_CUR)
#define RLIM_SAVED_MAX SYMBOLIC(RLIM_SAVED_MAX)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long RLIM_INFINITY;
extern const long RLIM_NLIMITS;
extern const long RLIM_SAVED_CUR;
extern const long RLIM_SAVED_MAX;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/rlimit.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_RLIMIT_H_

#define RLIMIT_AS SYMBOLIC(RLIMIT_AS)
#define RLIMIT_CORE SYMBOLIC(RLIMIT_CORE)
#define RLIMIT_CPU SYMBOLIC(RLIMIT_CPU)
#define RLIMIT_DATA SYMBOLIC(RLIMIT_DATA)
#define RLIMIT_FSIZE SYMBOLIC(RLIMIT_FSIZE)
#define RLIMIT_LOCKS SYMBOLIC(RLIMIT_LOCKS)
#define RLIMIT_MEMLOCK SYMBOLIC(RLIMIT_MEMLOCK)
#define RLIMIT_MSGQUEUE SYMBOLIC(RLIMIT_MSGQUEUE)
#define RLIMIT_NICE SYMBOLIC(RLIMIT_NICE)
#define RLIMIT_NLIMITS SYMBOLIC(RLIMIT_NLIMITS)
#define RLIMIT_NOFILE SYMBOLIC(RLIMIT_NOFILE)
#define RLIMIT_NPROC SYMBOLIC(RLIMIT_NPROC)
#define RLIMIT_RSS SYMBOLIC(RLIMIT_RSS)
#define RLIMIT_RTPRIO SYMBOLIC(RLIMIT_RTPRIO)
#define RLIMIT_SIGPENDING SYMBOLIC(RLIMIT_SIGPENDING)
#define RLIMIT_STACK SYMBOLIC(RLIMIT_STACK)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long RLIMIT_AS;
extern const long RLIMIT_CORE;
extern const long RLIMIT_CPU;
extern const long RLIMIT_DATA;
extern const long RLIMIT_FSIZE;
extern const long RLIMIT_LOCKS;
extern const long RLIMIT_MEMLOCK;
extern const long RLIMIT_MSGQUEUE;
extern const long RLIMIT_NICE;
extern const long RLIMIT_NLIMITS;
extern const long RLIMIT_NOFILE;
extern const long RLIMIT_NPROC;
extern const long RLIMIT_RSS;
extern const long RLIMIT_RTPRIO;
extern const long RLIMIT_SIGPENDING;
extern const long RLIMIT_STACK;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/rtld.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_RTLD_H_

#define RTLD_DI_LINKMAP SYMBOLIC(RTLD_DI_LINKMAP)
#define RTLD_GLOBAL SYMBOLIC(RTLD_GLOBAL)
#define RTLD_LAZY SYMBOLIC(RTLD_LAZY)
#define RTLD_LOCAL SYMBOLIC(RTLD_LOCAL)
#define RTLD_NODELETE SYMBOLIC(RTLD_NODELETE)
#define RTLD_NOLOAD SYMBOLIC(RTLD_NOLOAD)
#define RTLD_NOW SYMBOLIC(RTLD_NOW)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long RTLD_DI_LINKMAP;
extern const long RTLD_GLOBAL;
extern const long RTLD_LAZY;
extern const long RTLD_LOCAL;
extern const long RTLD_NODELETE;
extern const long RTLD_NOLOAD;
extern const long RTLD_NOW;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/rusage.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_RUSAGE_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long RUSAGE_CHILDREN;
extern const long RUSAGE_SELF;
extern const long RUSAGE_THREAD;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define RUSAGE_SELF LITERALLY(0)
#define RUSAGE_CHILDREN SYMBOLIC(RUSAGE_CHILDREN)
#define RUSAGE_THREAD SYMBOLIC(RUSAGE_THREAD)



/*!BEGIN libc/sysv/consts/sa.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_SA_H_

#define SA_NOCLDSTOP SYMBOLIC(SA_NOCLDSTOP)
#define SA_NOCLDWAIT SYMBOLIC(SA_NOCLDWAIT)
#define SA_NODEFER SYMBOLIC(SA_NODEFER)
#define SA_NOMASK SYMBOLIC(SA_NOMASK)
#define SA_ONESHOT SYMBOLIC(SA_ONESHOT)
#define SA_ONSTACK SYMBOLIC(SA_ONSTACK)
#define SA_RESETHAND SYMBOLIC(SA_RESETHAND)
#define SA_RESTART SYMBOLIC(SA_RESTART)
#define SA_RESTORER SYMBOLIC(SA_RESTORER)
#define SA_SIGINFO SYMBOLIC(SA_SIGINFO)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long SA_NOCLDSTOP;
extern const long SA_NOCLDWAIT;
extern const long SA_NODEFER;
extern const long SA_NOMASK;
extern const long SA_ONESHOT;
extern const long SA_ONSTACK;
extern const long SA_RESETHAND;
extern const long SA_RESTART;
extern const long SA_RESTORER;
extern const long SA_SIGINFO;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/sched.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_SCHED_H_

#define SCHED_BATCH SYMBOLIC(SCHED_BATCH)
#define SCHED_FIFO SYMBOLIC(SCHED_FIFO)
#define SCHED_IDLE SYMBOLIC(SCHED_IDLE)
#define SCHED_OTHER SYMBOLIC(SCHED_OTHER)
#define SCHED_RESET_ON_FORK SYMBOLIC(SCHED_RESET_ON_FORK)
#define SCHED_RR SYMBOLIC(SCHED_RR)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long SCHED_BATCH;
extern const long SCHED_FIFO;
extern const long SCHED_IDLE;
extern const long SCHED_OTHER;
extern const long SCHED_RESET_ON_FORK;
extern const long SCHED_RR;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/scsi.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_SCSI_H_

#define SCSI_IOCTL_BENCHMARK_COMMAND SYMBOLIC(SCSI_IOCTL_BENCHMARK_COMMAND)
#define SCSI_IOCTL_DOORLOCK SYMBOLIC(SCSI_IOCTL_DOORLOCK)
#define SCSI_IOCTL_DOORUNLOCK SYMBOLIC(SCSI_IOCTL_DOORUNLOCK)
#define SCSI_IOCTL_GET_BUS_NUMBER SYMBOLIC(SCSI_IOCTL_GET_BUS_NUMBER)
#define SCSI_IOCTL_GET_IDLUN SYMBOLIC(SCSI_IOCTL_GET_IDLUN)
#define SCSI_IOCTL_PROBE_HOST SYMBOLIC(SCSI_IOCTL_PROBE_HOST)
#define SCSI_IOCTL_SEND_COMMAND SYMBOLIC(SCSI_IOCTL_SEND_COMMAND)
#define SCSI_IOCTL_START_UNIT SYMBOLIC(SCSI_IOCTL_START_UNIT)
#define SCSI_IOCTL_STOP_UNIT SYMBOLIC(SCSI_IOCTL_STOP_UNIT)
#define SCSI_IOCTL_SYNC SYMBOLIC(SCSI_IOCTL_SYNC)
#define SCSI_IOCTL_TAGGED_DISABLE SYMBOLIC(SCSI_IOCTL_TAGGED_DISABLE)
#define SCSI_IOCTL_TAGGED_ENABLE SYMBOLIC(SCSI_IOCTL_TAGGED_ENABLE)
#define SCSI_IOCTL_TEST_UNIT_READY SYMBOLIC(SCSI_IOCTL_TEST_UNIT_READY)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long SCSI_IOCTL_BENCHMARK_COMMAND;
extern const long SCSI_IOCTL_DOORLOCK;
extern const long SCSI_IOCTL_DOORUNLOCK;
extern const long SCSI_IOCTL_GET_BUS_NUMBER;
extern const long SCSI_IOCTL_GET_IDLUN;
extern const long SCSI_IOCTL_PROBE_HOST;
extern const long SCSI_IOCTL_SEND_COMMAND;
extern const long SCSI_IOCTL_START_UNIT;
extern const long SCSI_IOCTL_STOP_UNIT;
extern const long SCSI_IOCTL_SYNC;
extern const long SCSI_IOCTL_TAGGED_DISABLE;
extern const long SCSI_IOCTL_TAGGED_ENABLE;
extern const long SCSI_IOCTL_TEST_UNIT_READY;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/segv.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_SEGV_H_

#define SEGV_ACCERR SYMBOLIC(SEGV_ACCERR)
#define SEGV_MAPERR SYMBOLIC(SEGV_MAPERR)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long SEGV_ACCERR;
extern const long SEGV_MAPERR;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/sg.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_SG_H_

#define SG_BIG_BUFF SYMBOLIC(SG_BIG_BUFF)
#define SG_DEFAULT_RETRIES SYMBOLIC(SG_DEFAULT_RETRIES)
#define SG_DEFAULT_TIMEOUT SYMBOLIC(SG_DEFAULT_TIMEOUT)
#define SG_DEF_COMMAND_Q SYMBOLIC(SG_DEF_COMMAND_Q)
#define SG_DEF_FORCE_LOW_DMA SYMBOLIC(SG_DEF_FORCE_LOW_DMA)
#define SG_DEF_FORCE_PACK_ID SYMBOLIC(SG_DEF_FORCE_PACK_ID)
#define SG_DEF_KEEP_ORPHAN SYMBOLIC(SG_DEF_KEEP_ORPHAN)
#define SG_DEF_RESERVED_SIZE SYMBOLIC(SG_DEF_RESERVED_SIZE)
#define SG_DEF_UNDERRUN_FLAG SYMBOLIC(SG_DEF_UNDERRUN_FLAG)
#define SG_DXFER_FROM_DEV SYMBOLIC(SG_DXFER_FROM_DEV)
#define SG_DXFER_NONE SYMBOLIC(SG_DXFER_NONE)
#define SG_DXFER_TO_DEV SYMBOLIC(SG_DXFER_TO_DEV)
#define SG_DXFER_TO_FROM_DEV SYMBOLIC(SG_DXFER_TO_FROM_DEV)
#define SG_EMULATED_HOST SYMBOLIC(SG_EMULATED_HOST)
#define SG_FLAG_DIRECT_IO SYMBOLIC(SG_FLAG_DIRECT_IO)
#define SG_FLAG_LUN_INHIBIT SYMBOLIC(SG_FLAG_LUN_INHIBIT)
#define SG_FLAG_NO_DXFER SYMBOLIC(SG_FLAG_NO_DXFER)
#define SG_GET_COMMAND_Q SYMBOLIC(SG_GET_COMMAND_Q)
#define SG_GET_KEEP_ORPHAN SYMBOLIC(SG_GET_KEEP_ORPHAN)
#define SG_GET_LOW_DMA SYMBOLIC(SG_GET_LOW_DMA)
#define SG_GET_NUM_WAITING SYMBOLIC(SG_GET_NUM_WAITING)
#define SG_GET_PACK_ID SYMBOLIC(SG_GET_PACK_ID)
#define SG_GET_REQUEST_TABLE SYMBOLIC(SG_GET_REQUEST_TABLE)
#define SG_GET_RESERVED_SIZE SYMBOLIC(SG_GET_RESERVED_SIZE)
#define SG_GET_SCSI_ID SYMBOLIC(SG_GET_SCSI_ID)
#define SG_GET_SG_TABLESIZE SYMBOLIC(SG_GET_SG_TABLESIZE)
#define SG_GET_TIMEOUT SYMBOLIC(SG_GET_TIMEOUT)
#define SG_GET_TRANSFORM SYMBOLIC(SG_GET_TRANSFORM)
#define SG_GET_VERSION_NUM SYMBOLIC(SG_GET_VERSION_NUM)
#define SG_INFO_CHECK SYMBOLIC(SG_INFO_CHECK)
#define SG_INFO_DIRECT_IO SYMBOLIC(SG_INFO_DIRECT_IO)
#define SG_INFO_DIRECT_IO_MASK SYMBOLIC(SG_INFO_DIRECT_IO_MASK)
#define SG_INFO_INDIRECT_IO SYMBOLIC(SG_INFO_INDIRECT_IO)
#define SG_INFO_MIXED_IO SYMBOLIC(SG_INFO_MIXED_IO)
#define SG_INFO_OK SYMBOLIC(SG_INFO_OK)
#define SG_INFO_OK_MASK SYMBOLIC(SG_INFO_OK_MASK)
#define SG_IO SYMBOLIC(SG_IO)
#define SG_MAX_QUEUE SYMBOLIC(SG_MAX_QUEUE)
#define SG_MAX_SENSE SYMBOLIC(SG_MAX_SENSE)
#define SG_NEXT_CMD_LEN SYMBOLIC(SG_NEXT_CMD_LEN)
#define SG_SCATTER_SZ SYMBOLIC(SG_SCATTER_SZ)
#define SG_SCSI_RESET SYMBOLIC(SG_SCSI_RESET)
#define SG_SCSI_RESET_BUS SYMBOLIC(SG_SCSI_RESET_BUS)
#define SG_SCSI_RESET_DEVICE SYMBOLIC(SG_SCSI_RESET_DEVICE)
#define SG_SCSI_RESET_HOST SYMBOLIC(SG_SCSI_RESET_HOST)
#define SG_SCSI_RESET_NOTHING SYMBOLIC(SG_SCSI_RESET_NOTHING)
#define SG_SET_COMMAND_Q SYMBOLIC(SG_SET_COMMAND_Q)
#define SG_SET_DEBUG SYMBOLIC(SG_SET_DEBUG)
#define SG_SET_FORCE_LOW_DMA SYMBOLIC(SG_SET_FORCE_LOW_DMA)
#define SG_SET_FORCE_PACK_ID SYMBOLIC(SG_SET_FORCE_PACK_ID)
#define SG_SET_KEEP_ORPHAN SYMBOLIC(SG_SET_KEEP_ORPHAN)
#define SG_SET_RESERVED_SIZE SYMBOLIC(SG_SET_RESERVED_SIZE)
#define SG_SET_TIMEOUT SYMBOLIC(SG_SET_TIMEOUT)
#define SG_SET_TRANSFORM SYMBOLIC(SG_SET_TRANSFORM)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long SG_BIG_BUFF;
extern const long SG_DEFAULT_RETRIES;
extern const long SG_DEFAULT_TIMEOUT;
extern const long SG_DEF_COMMAND_Q;
extern const long SG_DEF_FORCE_LOW_DMA;
extern const long SG_DEF_FORCE_PACK_ID;
extern const long SG_DEF_KEEP_ORPHAN;
extern const long SG_DEF_RESERVED_SIZE;
extern const long SG_DEF_UNDERRUN_FLAG;
extern const long SG_DXFER_FROM_DEV;
extern const long SG_DXFER_NONE;
extern const long SG_DXFER_TO_DEV;
extern const long SG_DXFER_TO_FROM_DEV;
extern const long SG_EMULATED_HOST;
extern const long SG_FLAG_DIRECT_IO;
extern const long SG_FLAG_LUN_INHIBIT;
extern const long SG_FLAG_NO_DXFER;
extern const long SG_GET_COMMAND_Q;
extern const long SG_GET_KEEP_ORPHAN;
extern const long SG_GET_LOW_DMA;
extern const long SG_GET_NUM_WAITING;
extern const long SG_GET_PACK_ID;
extern const long SG_GET_REQUEST_TABLE;
extern const long SG_GET_RESERVED_SIZE;
extern const long SG_GET_SCSI_ID;
extern const long SG_GET_SG_TABLESIZE;
extern const long SG_GET_TIMEOUT;
extern const long SG_GET_TRANSFORM;
extern const long SG_GET_VERSION_NUM;
extern const long SG_INFO_CHECK;
extern const long SG_INFO_DIRECT_IO;
extern const long SG_INFO_DIRECT_IO_MASK;
extern const long SG_INFO_INDIRECT_IO;
extern const long SG_INFO_MIXED_IO;
extern const long SG_INFO_OK;
extern const long SG_INFO_OK_MASK;
extern const long SG_IO;
extern const long SG_MAX_QUEUE;
extern const long SG_MAX_SENSE;
extern const long SG_NEXT_CMD_LEN;
extern const long SG_SCATTER_SZ;
extern const long SG_SCSI_RESET;
extern const long SG_SCSI_RESET_BUS;
extern const long SG_SCSI_RESET_DEVICE;
extern const long SG_SCSI_RESET_HOST;
extern const long SG_SCSI_RESET_NOTHING;
extern const long SG_SET_COMMAND_Q;
extern const long SG_SET_DEBUG;
extern const long SG_SET_FORCE_LOW_DMA;
extern const long SG_SET_FORCE_PACK_ID;
extern const long SG_SET_KEEP_ORPHAN;
extern const long SG_SET_RESERVED_SIZE;
extern const long SG_SET_TIMEOUT;
extern const long SG_SET_TRANSFORM;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/shm.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_SHM_H_

#define SHM_DEST SYMBOLIC(SHM_DEST)
#define SHM_EXEC SYMBOLIC(SHM_EXEC)
#define SHM_HUGETLB SYMBOLIC(SHM_HUGETLB)
#define SHM_INFO SYMBOLIC(SHM_INFO)
#define SHM_LOCK SYMBOLIC(SHM_LOCK)
#define SHM_LOCKED SYMBOLIC(SHM_LOCKED)
#define SHM_NORESERVE SYMBOLIC(SHM_NORESERVE)
#define SHM_R SYMBOLIC(SHM_R)
#define SHM_RDONLY SYMBOLIC(SHM_RDONLY)
#define SHM_REMAP SYMBOLIC(SHM_REMAP)
#define SHM_RND SYMBOLIC(SHM_RND)
#define SHM_STAT SYMBOLIC(SHM_STAT)
#define SHM_UNLOCK SYMBOLIC(SHM_UNLOCK)
#define SHM_W SYMBOLIC(SHM_W)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long SHM_DEST;
extern const long SHM_EXEC;
extern const long SHM_HUGETLB;
extern const long SHM_INFO;
extern const long SHM_LOCK;
extern const long SHM_LOCKED;
extern const long SHM_NORESERVE;
extern const long SHM_R;
extern const long SHM_RDONLY;
extern const long SHM_REMAP;
extern const long SHM_RND;
extern const long SHM_STAT;
extern const long SHM_UNLOCK;
extern const long SHM_W;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/shut.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_SHUT_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long SHUT_RD;
extern const long SHUT_RDWR;
extern const long SHUT_WR;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define SHUT_RD LITERALLY(0)
#define SHUT_RDWR LITERALLY(2)
#define SHUT_WR LITERALLY(1)



/*!BEGIN libc/sysv/consts/sigpoll.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_POLL_H_

#define POLL_ERR SYMBOLIC(POLL_ERR)
#define POLL_HUP SYMBOLIC(POLL_HUP)
#define POLL_IN SYMBOLIC(POLL_IN)
#define POLL_MSG SYMBOLIC(POLL_MSG)
#define POLL_OUT SYMBOLIC(POLL_OUT)
#define POLL_PRI SYMBOLIC(POLL_PRI)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long POLL_ERR;
extern const long POLL_HUP;
extern const long POLL_IN;
extern const long POLL_MSG;
extern const long POLL_OUT;
extern const long POLL_PRI;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/sio.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_SIO_H_

#define SIOCADDDLCI SYMBOLIC(SIOCADDDLCI)
#define SIOCADDMULTI SYMBOLIC(SIOCADDMULTI)
#define SIOCADDRT SYMBOLIC(SIOCADDRT)
#define SIOCATMARK SYMBOLIC(SIOCATMARK)
#define SIOCDARP SYMBOLIC(SIOCDARP)
#define SIOCDELDLCI SYMBOLIC(SIOCDELDLCI)
#define SIOCDELMULTI SYMBOLIC(SIOCDELMULTI)
#define SIOCDELRT SYMBOLIC(SIOCDELRT)
#define SIOCDEVPRIVATE SYMBOLIC(SIOCDEVPRIVATE)
#define SIOCDIFADDR SYMBOLIC(SIOCDIFADDR)
#define SIOCDRARP SYMBOLIC(SIOCDRARP)
#define SIOCGARP SYMBOLIC(SIOCGARP)
#define SIOCGIFADDR SYMBOLIC(SIOCGIFADDR)
#define SIOCGIFBR SYMBOLIC(SIOCGIFBR)
#define SIOCGIFBRDADDR SYMBOLIC(SIOCGIFBRDADDR)
#define SIOCGIFCONF SYMBOLIC(SIOCGIFCONF)
#define SIOCGIFCOUNT SYMBOLIC(SIOCGIFCOUNT)
#define SIOCGIFDSTADDR SYMBOLIC(SIOCGIFDSTADDR)
#define SIOCGIFENCAP SYMBOLIC(SIOCGIFENCAP)
#define SIOCGIFFLAGS SYMBOLIC(SIOCGIFFLAGS)
#define SIOCGIFHWADDR SYMBOLIC(SIOCGIFHWADDR)
#define SIOCGIFINDEX SYMBOLIC(SIOCGIFINDEX)
#define SIOCGIFMAP SYMBOLIC(SIOCGIFMAP)
#define SIOCGIFMEM SYMBOLIC(SIOCGIFMEM)
#define SIOCGIFMETRIC SYMBOLIC(SIOCGIFMETRIC)
#define SIOCGIFMTU SYMBOLIC(SIOCGIFMTU)
#define SIOCGIFNAME SYMBOLIC(SIOCGIFNAME)
#define SIOCGIFNETMASK SYMBOLIC(SIOCGIFNETMASK)
#define SIOCGIFPFLAGS SYMBOLIC(SIOCGIFPFLAGS)
#define SIOCGIFSLAVE SYMBOLIC(SIOCGIFSLAVE)
#define SIOCGIFTXQLEN SYMBOLIC(SIOCGIFTXQLEN)
#define SIOCGPGRP SYMBOLIC(SIOCGPGRP)
#define SIOCGRARP SYMBOLIC(SIOCGRARP)
#define SIOCGSTAMP SYMBOLIC(SIOCGSTAMP)
#define SIOCGSTAMPNS SYMBOLIC(SIOCGSTAMPNS)
#define SIOCPROTOPRIVATE SYMBOLIC(SIOCPROTOPRIVATE)
#define SIOCRTMSG SYMBOLIC(SIOCRTMSG)
#define SIOCSARP SYMBOLIC(SIOCSARP)
#define SIOCSIFADDR SYMBOLIC(SIOCSIFADDR)
#define SIOCSIFBR SYMBOLIC(SIOCSIFBR)
#define SIOCSIFBRDADDR SYMBOLIC(SIOCSIFBRDADDR)
#define SIOCSIFDSTADDR SYMBOLIC(SIOCSIFDSTADDR)
#define SIOCSIFENCAP SYMBOLIC(SIOCSIFENCAP)
#define SIOCSIFFLAGS SYMBOLIC(SIOCSIFFLAGS)
#define SIOCSIFHWADDR SYMBOLIC(SIOCSIFHWADDR)
#define SIOCSIFHWBROADCAST SYMBOLIC(SIOCSIFHWBROADCAST)
#define SIOCSIFLINK SYMBOLIC(SIOCSIFLINK)
#define SIOCSIFMAP SYMBOLIC(SIOCSIFMAP)
#define SIOCSIFMEM SYMBOLIC(SIOCSIFMEM)
#define SIOCSIFMETRIC SYMBOLIC(SIOCSIFMETRIC)
#define SIOCSIFMTU SYMBOLIC(SIOCSIFMTU)
#define SIOCSIFNAME SYMBOLIC(SIOCSIFNAME)
#define SIOCSIFNETMASK SYMBOLIC(SIOCSIFNETMASK)
#define SIOCSIFPFLAGS SYMBOLIC(SIOCSIFPFLAGS)
#define SIOCSIFSLAVE SYMBOLIC(SIOCSIFSLAVE)
#define SIOCSIFTXQLEN SYMBOLIC(SIOCSIFTXQLEN)
#define SIOCSPGRP SYMBOLIC(SIOCSPGRP)
#define SIOCSRARP SYMBOLIC(SIOCSRARP)
#define SIOGIFINDEX SYMBOLIC(SIOGIFINDEX)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long SIOCADDDLCI;
extern const long SIOCADDMULTI;
extern const long SIOCADDRT;
extern const long SIOCATMARK;
extern const long SIOCDARP;
extern const long SIOCDELDLCI;
extern const long SIOCDELMULTI;
extern const long SIOCDELRT;
extern const long SIOCDEVPRIVATE;
extern const long SIOCDIFADDR;
extern const long SIOCDRARP;
extern const long SIOCGARP;
extern const long SIOCGIFADDR;
extern const long SIOCGIFBR;
extern const long SIOCGIFBRDADDR;
extern const long SIOCGIFCONF;
extern const long SIOCGIFCOUNT;
extern const long SIOCGIFDSTADDR;
extern const long SIOCGIFENCAP;
extern const long SIOCGIFFLAGS;
extern const long SIOCGIFHWADDR;
extern const long SIOCGIFINDEX;
extern const long SIOCGIFMAP;
extern const long SIOCGIFMEM;
extern const long SIOCGIFMETRIC;
extern const long SIOCGIFMTU;
extern const long SIOCGIFNAME;
extern const long SIOCGIFNETMASK;
extern const long SIOCGIFPFLAGS;
extern const long SIOCGIFSLAVE;
extern const long SIOCGIFTXQLEN;
extern const long SIOCGPGRP;
extern const long SIOCGRARP;
extern const long SIOCGSTAMP;
extern const long SIOCGSTAMPNS;
extern const long SIOCPROTOPRIVATE;
extern const long SIOCRTMSG;
extern const long SIOCSARP;
extern const long SIOCSIFADDR;
extern const long SIOCSIFBR;
extern const long SIOCSIFBRDADDR;
extern const long SIOCSIFDSTADDR;
extern const long SIOCSIFENCAP;
extern const long SIOCSIFFLAGS;
extern const long SIOCSIFHWADDR;
extern const long SIOCSIFHWBROADCAST;
extern const long SIOCSIFLINK;
extern const long SIOCSIFMAP;
extern const long SIOCSIFMEM;
extern const long SIOCSIFMETRIC;
extern const long SIOCSIFMTU;
extern const long SIOCSIFNAME;
extern const long SIOCSIFNETMASK;
extern const long SIOCSIFPFLAGS;
extern const long SIOCSIFSLAVE;
extern const long SIOCSIFTXQLEN;
extern const long SIOCSPGRP;
extern const long SIOCSRARP;
extern const long SIOGIFINDEX;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/so.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_SO_H_

#define SO_ACCEPTCONN SYMBOLIC(SO_ACCEPTCONN)
#define SO_ATTACH_BPF SYMBOLIC(SO_ATTACH_BPF)
#define SO_ATTACH_FILTER SYMBOLIC(SO_ATTACH_FILTER)
#define SO_ATTACH_REUSEPORT_CBPF SYMBOLIC(SO_ATTACH_REUSEPORT_CBPF)
#define SO_ATTACH_REUSEPORT_EBPF SYMBOLIC(SO_ATTACH_REUSEPORT_EBPF)
#define SO_BINDTODEVICE SYMBOLIC(SO_BINDTODEVICE)
#define SO_BPF_EXTENSIONS SYMBOLIC(SO_BPF_EXTENSIONS)
#define SO_BROADCAST SYMBOLIC(SO_BROADCAST)
#define SO_BSDCOMPAT SYMBOLIC(SO_BSDCOMPAT)
#define SO_BUSY_POLL SYMBOLIC(SO_BUSY_POLL)
#define SO_CNX_ADVICE SYMBOLIC(SO_CNX_ADVICE)
#define SO_DEBUG SYMBOLIC(SO_DEBUG)
#define SO_DETACH_BPF SYMBOLIC(SO_DETACH_BPF)
#define SO_DETACH_FILTER SYMBOLIC(SO_DETACH_FILTER)
#define SO_DOMAIN SYMBOLIC(SO_DOMAIN)
#define SO_DONTROUTE SYMBOLIC(SO_DONTROUTE)
#define SO_ERROR SYMBOLIC(SO_ERROR)
#define SO_EXCLUSIVEADDRUSE SYMBOLIC(SO_EXCLUSIVEADDRUSE)
#define SO_GET_FILTER SYMBOLIC(SO_GET_FILTER)
#define SO_INCOMING_CPU SYMBOLIC(SO_INCOMING_CPU)
#define SO_KEEPALIVE SYMBOLIC(SO_KEEPALIVE)
#define SO_LINGER SYMBOLIC(SO_LINGER)
#define SO_LOCK_FILTER SYMBOLIC(SO_LOCK_FILTER)
#define SO_MARK SYMBOLIC(SO_MARK)
#define SO_MAX_PACING_RATE SYMBOLIC(SO_MAX_PACING_RATE)
#define SO_NOFCS SYMBOLIC(SO_NOFCS)
#define SO_NO_CHECK SYMBOLIC(SO_NO_CHECK)
#define SO_OOBINLINE SYMBOLIC(SO_OOBINLINE)
#define SO_PASSCRED SYMBOLIC(SO_PASSCRED)
#define SO_PASSSEC SYMBOLIC(SO_PASSSEC)
#define SO_PEEK_OFF SYMBOLIC(SO_PEEK_OFF)
#define SO_PEERCRED SYMBOLIC(SO_PEERCRED)
#define SO_PEERNAME SYMBOLIC(SO_PEERNAME)
#define SO_PEERSEC SYMBOLIC(SO_PEERSEC)
#define SO_PRIORITY SYMBOLIC(SO_PRIORITY)
#define SO_PROTOCOL SYMBOLIC(SO_PROTOCOL)
#define SO_RCVBUF SYMBOLIC(SO_RCVBUF)
#define SO_RCVBUFFORCE SYMBOLIC(SO_RCVBUFFORCE)
#define SO_RCVLOWAT SYMBOLIC(SO_RCVLOWAT)
#define SO_RCVTIMEO SYMBOLIC(SO_RCVTIMEO)
#define SO_REUSEADDR SYMBOLIC(SO_REUSEADDR)
#define SO_REUSEPORT SYMBOLIC(SO_REUSEPORT)
#define SO_RXQ_OVFL SYMBOLIC(SO_RXQ_OVFL)
#define SO_SECURITY_AUTHENTICATION SYMBOLIC(SO_SECURITY_AUTHENTICATION)
#define SO_SECURITY_ENCRYPTION_NETWORK SYMBOLIC(SO_SECURITY_ENCRYPTION_NETWORK)
#define SO_SECURITY_ENCRYPTION_TRANSPORT SYMBOLIC(SO_SECURITY_ENCRYPTION_TRANSPORT)
#define SO_SELECT_ERR_QUEUE SYMBOLIC(SO_SELECT_ERR_QUEUE)
#define SO_SNDBUF SYMBOLIC(SO_SNDBUF)
#define SO_SNDBUFFORCE SYMBOLIC(SO_SNDBUFFORCE)
#define SO_SNDLOWAT SYMBOLIC(SO_SNDLOWAT)
#define SO_SNDTIMEO SYMBOLIC(SO_SNDTIMEO)
#define SO_TIMESTAMP SYMBOLIC(SO_TIMESTAMP)
#define SO_TIMESTAMPING SYMBOLIC(SO_TIMESTAMPING)
#define SO_TIMESTAMPNS SYMBOLIC(SO_TIMESTAMPNS)
#define SO_TYPE SYMBOLIC(SO_TYPE)
#define SO_WIFI_STATUS SYMBOLIC(SO_WIFI_STATUS)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long SO_ACCEPTCONN;
extern const long SO_ATTACH_BPF;
extern const long SO_ATTACH_FILTER;
extern const long SO_ATTACH_REUSEPORT_CBPF;
extern const long SO_ATTACH_REUSEPORT_EBPF;
extern const long SO_BINDTODEVICE;
extern const long SO_BPF_EXTENSIONS;
extern const long SO_BROADCAST;
extern const long SO_BSDCOMPAT;
extern const long SO_BUSY_POLL;
extern const long SO_CNX_ADVICE;
extern const long SO_DEBUG;
extern const long SO_DETACH_BPF;
extern const long SO_DETACH_FILTER;
extern const long SO_DOMAIN;
extern const long SO_DONTROUTE;
extern const long SO_ERROR;
extern const long SO_EXCLUSIVEADDRUSE;
extern const long SO_GET_FILTER;
extern const long SO_INCOMING_CPU;
extern const long SO_KEEPALIVE;
extern const long SO_LINGER;
extern const long SO_LOCK_FILTER;
extern const long SO_MARK;
extern const long SO_MAX_PACING_RATE;
extern const long SO_NOFCS;
extern const long SO_NO_CHECK;
extern const long SO_OOBINLINE;
extern const long SO_PASSCRED;
extern const long SO_PASSSEC;
extern const long SO_PEEK_OFF;
extern const long SO_PEERCRED;
extern const long SO_PEERNAME;
extern const long SO_PEERSEC;
extern const long SO_PRIORITY;
extern const long SO_PROTOCOL;
extern const long SO_RCVBUF;
extern const long SO_RCVBUFFORCE;
extern const long SO_RCVLOWAT;
extern const long SO_RCVTIMEO;
extern const long SO_REUSEADDR;
extern const long SO_REUSEPORT;
extern const long SO_RXQ_OVFL;
extern const long SO_SECURITY_AUTHENTICATION;
extern const long SO_SECURITY_ENCRYPTION_NETWORK;
extern const long SO_SECURITY_ENCRYPTION_TRANSPORT;
extern const long SO_SELECT_ERR_QUEUE;
extern const long SO_SNDBUF;
extern const long SO_SNDBUFFORCE;
extern const long SO_SNDLOWAT;
extern const long SO_SNDTIMEO;
extern const long SO_TIMESTAMP;
extern const long SO_TIMESTAMPING;
extern const long SO_TIMESTAMPNS;
extern const long SO_TYPE;
extern const long SO_WIFI_STATUS;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/sock.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_SOCK_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long SOCK_CLOEXEC;
extern const long SOCK_DCCP;
extern const long SOCK_DGRAM;
extern const long SOCK_NONBLOCK;
extern const long SOCK_PACKET;
extern const long SOCK_RAW;
extern const long SOCK_RDM;
extern const long SOCK_SEQPACKET;
extern const long SOCK_STREAM;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define SOCK_CLOEXEC SYMBOLIC(SOCK_CLOEXEC)
#define SOCK_DCCP SYMBOLIC(SOCK_DCCP)
#define SOCK_DGRAM LITERALLY(2)
#define SOCK_NONBLOCK SYMBOLIC(SOCK_NONBLOCK)
#define SOCK_PACKET SYMBOLIC(SOCK_PACKET)
#define SOCK_RAW LITERALLY(3)
#define SOCK_RDM LITERALLY(4)
#define SOCK_SEQPACKET LITERALLY(5)
#define SOCK_STREAM LITERALLY(1)



/*!BEGIN libc/sysv/consts/sol.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_SOL_H_

#define SOL_AAL SYMBOLIC(SOL_AAL)
#define SOL_ALG SYMBOLIC(SOL_ALG)
#define SOL_ATM SYMBOLIC(SOL_ATM)
#define SOL_BLUETOOTH SYMBOLIC(SOL_BLUETOOTH)
#define SOL_CAIF SYMBOLIC(SOL_CAIF)
#define SOL_DCCP SYMBOLIC(SOL_DCCP)
#define SOL_DECNET SYMBOLIC(SOL_DECNET)
#define SOL_ICMPV6 SYMBOLIC(SOL_ICMPV6)
#define SOL_IP SYMBOLIC(SOL_IP)
#define SOL_IPV6 SYMBOLIC(SOL_IPV6)
#define SOL_IRDA SYMBOLIC(SOL_IRDA)
#define SOL_IUCV SYMBOLIC(SOL_IUCV)
#define SOL_KCM SYMBOLIC(SOL_KCM)
#define SOL_LLC SYMBOLIC(SOL_LLC)
#define SOL_NETBEUI SYMBOLIC(SOL_NETBEUI)
#define SOL_NETLINK SYMBOLIC(SOL_NETLINK)
#define SOL_NFC SYMBOLIC(SOL_NFC)
#define SOL_PACKET SYMBOLIC(SOL_PACKET)
#define SOL_PNPIPE SYMBOLIC(SOL_PNPIPE)
#define SOL_PPPOL2TP SYMBOLIC(SOL_PPPOL2TP)
#define SOL_RAW SYMBOLIC(SOL_RAW)
#define SOL_RDS SYMBOLIC(SOL_RDS)
#define SOL_RXRPC SYMBOLIC(SOL_RXRPC)
#define SOL_SOCKET SYMBOLIC(SOL_SOCKET)
#define SOL_TCP SYMBOLIC(SOL_TCP)
#define SOL_TIPC SYMBOLIC(SOL_TIPC)
#define SOL_UDP SYMBOLIC(SOL_UDP)
#define SOL_X25 SYMBOLIC(SOL_X25)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long SOL_AAL;
extern const long SOL_ALG;
extern const long SOL_ATM;
extern const long SOL_BLUETOOTH;
extern const long SOL_CAIF;
extern const long SOL_DCCP;
extern const long SOL_DECNET;
extern const long SOL_ICMPV6;
extern const long SOL_IP;
extern const long SOL_IPV6;
extern const long SOL_IRDA;
extern const long SOL_IUCV;
extern const long SOL_KCM;
extern const long SOL_LLC;
extern const long SOL_NETBEUI;
extern const long SOL_NETLINK;
extern const long SOL_NFC;
extern const long SOL_PACKET;
extern const long SOL_PNPIPE;
extern const long SOL_PPPOL2TP;
extern const long SOL_RAW;
extern const long SOL_RDS;
extern const long SOL_RXRPC;
extern const long SOL_SOCKET;
extern const long SOL_TCP;
extern const long SOL_TIPC;
extern const long SOL_UDP;
extern const long SOL_X25;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/splice.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_SPLICE_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long SPLICE_F_GIFT;
extern const long SPLICE_F_MORE;
extern const long SPLICE_F_MOVE;
extern const long SPLICE_F_NONBLOCK;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define SPLICE_F_GIFT SYMBOLIC(SPLICE_F_GIFT)
#define SPLICE_F_MORE SYMBOLIC(SPLICE_F_MORE)
#define SPLICE_F_MOVE SYMBOLIC(SPLICE_F_MOVE)
#define SPLICE_F_NONBLOCK SYMBOLIC(SPLICE_F_NONBLOCK)



/*!BEGIN libc/sysv/consts/st.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_ST_H_

#define ST_APPEND SYMBOLIC(ST_APPEND)
#define ST_IMMUTABLE SYMBOLIC(ST_IMMUTABLE)
#define ST_MANDLOCK SYMBOLIC(ST_MANDLOCK)
#define ST_NOATIME SYMBOLIC(ST_NOATIME)
#define ST_NODEV SYMBOLIC(ST_NODEV)
#define ST_NODIRATIME SYMBOLIC(ST_NODIRATIME)
#define ST_NOEXEC SYMBOLIC(ST_NOEXEC)
#define ST_NOSUID SYMBOLIC(ST_NOSUID)
#define ST_RDONLY SYMBOLIC(ST_RDONLY)
#define ST_RELATIME SYMBOLIC(ST_RELATIME)
#define ST_SYNCHRONOUS SYMBOLIC(ST_SYNCHRONOUS)
#define ST_WRITE SYMBOLIC(ST_WRITE)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long ST_APPEND;
extern const long ST_IMMUTABLE;
extern const long ST_MANDLOCK;
extern const long ST_NOATIME;
extern const long ST_NODEV;
extern const long ST_NODIRATIME;
extern const long ST_NOEXEC;
extern const long ST_NOSUID;
extern const long ST_RDONLY;
extern const long ST_RELATIME;
extern const long ST_SYNCHRONOUS;
extern const long ST_WRITE;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/tcp.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_TCP_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long TCP_CC_INFO;
extern const long TCP_CONGESTION;
extern const long TCP_COOKIE_TRANSACTIONS;
extern const long TCP_CORK;
extern const long TCP_DEFER_ACCEPT;
extern const long TCP_FASTOPEN;
extern const long TCP_INFO;
extern const long TCP_KEEPCNT;
extern const long TCP_KEEPIDLE;
extern const long TCP_KEEPINTVL;
extern const long TCP_LINGER2;
extern const long TCP_MAXSEG;
extern const long TCP_MD5SIG;
extern const long TCP_MD5SIG_MAXKEYLEN;
extern const long TCP_NODELAY;
extern const long TCP_NOTSENT_LOWAT;
extern const long TCP_QUEUE_SEQ;
extern const long TCP_QUICKACK;
extern const long TCP_REPAIR;
extern const long TCP_REPAIR_OPTIONS;
extern const long TCP_REPAIR_QUEUE;
extern const long TCP_SAVED_SYN;
extern const long TCP_SAVE_SYN;
extern const long TCP_SYNCNT;
extern const long TCP_THIN_DUPACK;
extern const long TCP_THIN_LINEAR_TIMEOUTS;
extern const long TCP_TIMESTAMP;
extern const long TCP_USER_TIMEOUT;
extern const long TCP_WINDOW_CLAMP;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define TCP_CC_INFO SYMBOLIC(TCP_CC_INFO)
#define TCP_CONGESTION SYMBOLIC(TCP_CONGESTION)
#define TCP_COOKIE_TRANSACTIONS SYMBOLIC(TCP_COOKIE_TRANSACTIONS)
#define TCP_CORK SYMBOLIC(TCP_CORK)
#define TCP_DEFER_ACCEPT SYMBOLIC(TCP_DEFER_ACCEPT)
#define TCP_FASTOPEN SYMBOLIC(TCP_FASTOPEN)
#define TCP_INFO SYMBOLIC(TCP_INFO)
#define TCP_KEEPCNT SYMBOLIC(TCP_KEEPCNT)
#define TCP_KEEPIDLE SYMBOLIC(TCP_KEEPIDLE)
#define TCP_KEEPINTVL SYMBOLIC(TCP_KEEPINTVL)
#define TCP_LINGER2 SYMBOLIC(TCP_LINGER2)
#define TCP_MAXSEG SYMBOLIC(TCP_MAXSEG)
#define TCP_MD5SIG SYMBOLIC(TCP_MD5SIG)
#define TCP_MD5SIG_MAXKEYLEN SYMBOLIC(TCP_MD5SIG_MAXKEYLEN)
#define TCP_NODELAY LITERALLY(1)
#define TCP_NOTSENT_LOWAT SYMBOLIC(TCP_NOTSENT_LOWAT)
#define TCP_QUEUE_SEQ SYMBOLIC(TCP_QUEUE_SEQ)
#define TCP_QUICKACK SYMBOLIC(TCP_QUICKACK)
#define TCP_REPAIR SYMBOLIC(TCP_REPAIR)
#define TCP_REPAIR_OPTIONS SYMBOLIC(TCP_REPAIR_OPTIONS)
#define TCP_REPAIR_QUEUE SYMBOLIC(TCP_REPAIR_QUEUE)
#define TCP_SAVED_SYN SYMBOLIC(TCP_SAVED_SYN)
#define TCP_SAVE_SYN SYMBOLIC(TCP_SAVE_SYN)
#define TCP_SYNCNT SYMBOLIC(TCP_SYNCNT)
#define TCP_THIN_DUPACK SYMBOLIC(TCP_THIN_DUPACK)
#define TCP_THIN_LINEAR_TIMEOUTS SYMBOLIC(TCP_THIN_LINEAR_TIMEOUTS)
#define TCP_TIMESTAMP SYMBOLIC(TCP_TIMESTAMP)
#define TCP_USER_TIMEOUT SYMBOLIC(TCP_USER_TIMEOUT)
#define TCP_WINDOW_CLAMP SYMBOLIC(TCP_WINDOW_CLAMP)



/*!BEGIN libc/sysv/consts/tcpopt.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_TCPOPT_H_

#define TCPOPT_EOL SYMBOLIC(TCPOPT_EOL)
#define TCPOPT_MAXSEG SYMBOLIC(TCPOPT_MAXSEG)
#define TCPOPT_NOP SYMBOLIC(TCPOPT_NOP)
#define TCPOPT_SACK SYMBOLIC(TCPOPT_SACK)
#define TCPOPT_SACK_PERMITTED SYMBOLIC(TCPOPT_SACK_PERMITTED)
#define TCPOPT_TIMESTAMP SYMBOLIC(TCPOPT_TIMESTAMP)
#define TCPOPT_WINDOW SYMBOLIC(TCPOPT_WINDOW)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long TCPOPT_EOL;
extern const long TCPOPT_MAXSEG;
extern const long TCPOPT_NOP;
extern const long TCPOPT_SACK;
extern const long TCPOPT_SACK_PERMITTED;
extern const long TCPOPT_TIMESTAMP;
extern const long TCPOPT_WINDOW;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/th.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_TH_H_

#define TH_ACK SYMBOLIC(TH_ACK)
#define TH_FIN SYMBOLIC(TH_FIN)
#define TH_PUSH SYMBOLIC(TH_PUSH)
#define TH_RST SYMBOLIC(TH_RST)
#define TH_SYN SYMBOLIC(TH_SYN)
#define TH_URG SYMBOLIC(TH_URG)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long TH_ACK;
extern const long TH_FIN;
extern const long TH_PUSH;
extern const long TH_RST;
extern const long TH_SYN;
extern const long TH_URG;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/trap.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_TRAP_H_

#define TRAP_BRKPT SYMBOLIC(TRAP_BRKPT)
#define TRAP_TRACE SYMBOLIC(TRAP_TRACE)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long TRAP_BRKPT;
extern const long TRAP_TRACE;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/type.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_TYPE_H_

#define TYPE_A SYMBOLIC(TYPE_A)
#define TYPE_DISK SYMBOLIC(TYPE_DISK)
#define TYPE_E SYMBOLIC(TYPE_E)
#define TYPE_ENCLOSURE SYMBOLIC(TYPE_ENCLOSURE)
#define TYPE_I SYMBOLIC(TYPE_I)
#define TYPE_L SYMBOLIC(TYPE_L)
#define TYPE_MEDIUM_CHANGER SYMBOLIC(TYPE_MEDIUM_CHANGER)
#define TYPE_MOD SYMBOLIC(TYPE_MOD)
#define TYPE_NO_LUN SYMBOLIC(TYPE_NO_LUN)
#define TYPE_PROCESSOR SYMBOLIC(TYPE_PROCESSOR)
#define TYPE_ROM SYMBOLIC(TYPE_ROM)
#define TYPE_SCANNER SYMBOLIC(TYPE_SCANNER)
#define TYPE_TAPE SYMBOLIC(TYPE_TAPE)
#define TYPE_WORM SYMBOLIC(TYPE_WORM)

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const long TYPE_A;
extern const long TYPE_DISK;
extern const long TYPE_E;
extern const long TYPE_ENCLOSURE;
extern const long TYPE_I;
extern const long TYPE_L;
extern const long TYPE_MEDIUM_CHANGER;
extern const long TYPE_MOD;
extern const long TYPE_NO_LUN;
extern const long TYPE_PROCESSOR;
extern const long TYPE_ROM;
extern const long TYPE_SCANNER;
extern const long TYPE_TAPE;
extern const long TYPE_WORM;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/sysv/consts/utime.h */

#define COSMOPOLITAN_LIBC_SYSV_CONSTS_UTIME_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern const int UTIME_NOW;
extern const int UTIME_OMIT;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#define UTIME_NOW  SYMBOLIC(UTIME_NOW)
#define UTIME_OMIT SYMBOLIC(UTIME_OMIT)



/*!BEGIN libc/time/struct/timezone.h */

#define COSMOPOLITAN_LIBC_TIME_STRUCT_TIMEZONE_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct timezone {
  int32_t tz_minuteswest;
  int32_t tz_dsttime;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/time/struct/tm.h */

#define COSMOPOLITAN_LIBC_TIME_STRUCT_TM_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct tm {
  int32_t tm_sec;
  int32_t tm_min;
  int32_t tm_hour;
  int32_t tm_mday; /* 1-indexed */
  int32_t tm_mon;  /* 0-indexed */
  int32_t tm_year; /* minus 1900 */
  int32_t tm_wday;
  int32_t tm_yday;
  int32_t tm_isdst;
  int64_t tm_gmtoff;
  const char *tm_zone;
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/time/struct/utimbuf.h */

#define COSMOPOLITAN_LIBC_TIME_STRUCT_UTIMBUF_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

struct utimbuf {
  int64_t actime;  /* access time */
  int64_t modtime; /* modified time */
};

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/time/time.h */

#define COSMOPOLITAN_LIBC_TIME_TIME_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

hidden extern const char kWeekdayNameShort[7][4];
hidden extern const char kWeekdayName[7][10];
hidden extern const char kMonthNameShort[12][4];
hidden extern const char kMonthName[12][10];
hidden extern const unsigned short kMonthYearDay[2][12];

extern char *tzname[2];
extern long CLOCKS_PER_SEC;

int64_t clock(void);
int64_t time(int64_t *);
int gettimeofday(struct timeval *, struct timezone *);
int clock_gettime(int, struct timespec *);
int clock_getres(int, struct timespec *);

int sleep(uint32_t);
int usleep(uint32_t);
int nanosleep(const struct timespec *, struct timespec *);
unsigned alarm(unsigned);
int getitimer(int, struct itimerval *);
int setitimer(int, const struct itimerval *, struct itimerval *);

void tzset(void);
struct tm *gmtime(const int64_t *);
struct tm *gmtime_r(const int64_t *, struct tm *);
struct tm *localtime(const int64_t *);
struct tm *localtime_r(const int64_t *, struct tm *);
int64_t timegm(struct tm *);
int64_t mktime(struct tm *);
int64_t timelocal(struct tm *);
int64_t timeoff(struct tm *, long);
int64_t time2posix(int64_t) pureconst;
int64_t posix2time(int64_t) pureconst;

char *strptime(const char *, const char *, struct tm *);
size_t strftime(char *, size_t, const char *, const struct tm *)
    strftimeesque(3);
char *asctime(const struct tm *);
char *ctime(const int64_t *);
char *ctime_r(const int64_t *, char[hasatleast 64]);
char *asctime_r(const struct tm *, char[hasatleast 64]);

int futimens(int, const struct timespec[2]);
int utimensat(int, const char *, const struct timespec[2], int);
int utimes(const char *, const struct timeval[2]);
int utime(const char *, const struct utimbuf *);
int futimes(int, const struct timeval[2]);
int futimesat(int, const char *, const struct timeval[2]);

long double dtime(int);
long double dsleep(long double);
extern long double (*nowl)(void);
long double ConvertTicksToNanos(uint64_t);

double difftime(int64_t, int64_t) nothrow pureconst;

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/tinymath/emod.h */

#define COSMOPOLITAN_LIBC_TINYMATH_EMOD_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

/**
 * Returns Euclidean floating-point division remainder.
 *
 * @return (𝑥 mod 𝑦) ∈ [0.,𝑦)
 * @see fmod()
 */
static inline double emod(double x, double y) {
  return x - fabs(y) * floor(x / fabs(y));
}

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/tinymath/emodl.h */

#define COSMOPOLITAN_LIBC_TINYMATH_EMODL_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)

/**
 * Returns Euclidean floating-point division remainder.
 *
 * @return (𝑥 mod 𝑦) ∈ [0.,𝑦)
 * @see fmodl()
 */
static inline long double emodl(long double x, long double y) {
  return x - fabsl(y) * floorl(x / fabsl(y));
}

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/unicode/locale.h */

#define COSMOPOLITAN_LIBC_UNICODE_LOCALE_H_

#define LC_CTYPE         0
#define LC_NUMERIC       1
#define LC_CTYPE_MASK    1
#define LC_TIME          2
#define LC_NUMERIC_MASK  2
#define LC_COLLATE       3
#define LC_MONETARY      4
#define LC_TIME_MASK     4
#define LC_MESSAGES      5
#define LC_ALL           6
#define LC_COLLATE_MASK  8
#define LC_MONETARY_MASK 16
#define LC_MESSAGES_MASK 32
#define LC_ALL_MASK      0x1fbf

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

char *setlocale(int, const char *);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN libc/x/x.h */

#define COSMOPOLITAN_LIBC_X_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_
/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § eXtended apis                                             ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│─╝
  Standard Library veneers for folks not building embedded RTOS */

#define _XPNN   paramsnonnull()
#define _XRET   nothrow nocallback nodiscard returnsnonnull
#define _XMAL   returnspointerwithnoaliases _XRET
#define _XMALPG returnsaligned((PAGESIZE)) _XMAL

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § eXtended apis » system calls                              ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

int xsigaction(int, void *, uint64_t, uint64_t, struct sigaction *);
int xwrite(int, const void *, uint64_t);

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § eXtended apis » memory                                    ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

void xdie(void) wontreturn;
char *xdtoa(double) _XMAL;
char *xdtoaf(float) _XMAL;
char *xdtoal(long double) _XMAL;
char *xasprintf(const char *, ...) printfesque(1) paramsnonnull((1)) _XMAL;
char *xvasprintf(const char *, va_list) _XPNN _XMAL;
char *xgetline(struct FILE *) _XPNN mallocesque;
void *xmalloc(size_t) attributeallocsize((1)) _XMAL;
void *xrealloc(void *, size_t) attributeallocsize((2)) _XRET;
void *xcalloc(size_t, size_t) attributeallocsize((1, 2)) _XMAL;
void *xvalloc(size_t) attributeallocsize((1)) _XMALPG;
void *xmemalign(size_t, size_t) attributeallocalign((1))
    attributeallocsize((2)) _XMAL;
void *xmemalignzero(size_t, size_t) attributeallocalign((1))
    attributeallocsize((2)) _XMAL;
char *xstrdup(const char *) _XPNN _XMAL;
char *xstrndup(const char *, size_t) _XPNN _XMAL;
char *xstrcat(const char *, ...) paramsnonnull((1)) nullterminated() _XMAL;
char *xstrmul(const char *, size_t) paramsnonnull((1)) _XMAL;
char *xinet_ntop(int, const void *) _XPNN _XMAL;
void *xunbinga(size_t, const char16_t *) attributeallocalign((1)) _XMAL _XRET;
void *xunbing(const char16_t *) _XMAL _XRET;

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § eXtended apis » files                                     ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

int rmrf(const char *);
int makedirs(const char *, unsigned);
char *xdirname(const char *) paramsnonnull() _XMAL;
char *xjoinpaths(const char *, const char *) paramsnonnull() _XMAL;

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § eXtended apis » time                                      ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

char *xiso8601i(int) mallocesque;
char *xiso8601tv(struct timeval *) mallocesque;
char *xiso8601ts(struct timespec *) mallocesque;

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § eXtended apis » input / output                            ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

char *xslurp(const char *, size_t *) paramsnonnull((1)) _XMALPG nodiscard;
int xbarf(const char *, const void *, size_t);

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § eXtended apis » safety                                    ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#define xstrcat(...) (xstrcat)(__VA_ARGS__, NULL)

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § eXtended apis » generic typing                            ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#if __STDC_VERSION__ + 0 >= 201112

#define xiso8601(TS) \
  _Generic(*(TS), struct timeval : xiso8601tv, default : xiso8601ts)(TS)

#endif /* C11 */

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § eXtended apis » link-time optimizations                   ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
#define xasprintf(FMT, ...) (xasprintf)(PFLINK(FMT), ##__VA_ARGS__)
#define xvasprintf(FMT, VA) (xvasprintf)(PFLINK(FMT), VA)
#endif

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN third_party/gdtoa/gdtoa.h */

#define COSMOPOLITAN_THIRD_PARTY_GDTOA_GDTOA_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

enum {
  /* return values from strtodg */
  STRTOG_Zero = 0,
  STRTOG_Normal = 1,
  STRTOG_Denormal = 2,
  STRTOG_Infinite = 3,
  STRTOG_NaN = 4,
  STRTOG_NaNbits = 5,
  STRTOG_NoNumber = 6,
  STRTOG_Retmask = 7,

  /* The following may be or-ed into one of the above values. */
  STRTOG_Neg = 0x08,    /* does not affect STRTOG_Inexlo or STRTOG_Inexhi */
  STRTOG_Inexlo = 0x10, /* returned result rounded toward zero */
  STRTOG_Inexhi = 0x20, /* returned result rounded away from zero */
  STRTOG_Inexact = 0x30,
  STRTOG_Underflow = 0x40,
  STRTOG_Overflow = 0x80
};

typedef struct FPI {
  int nbits;
  int emin;
  int emax;
  int rounding;
  int sudden_underflow;
  int int_max;
} FPI;

enum {
  /* FPI.rounding values: same as FLT_ROUNDS */
  FPI_Round_zero = 0,
  FPI_Round_near = 1,
  FPI_Round_up = 2,
  FPI_Round_down = 3
};

char *dtoa(double d, int mode, int ndigits, int *decpt, int *sign, char **rve);
char *gdtoa(const FPI *fpi, int be, unsigned *bits, int *kindp, int mode,
            int ndigits, int *decpt, char **rve);
void freedtoa(char *);

double atof(const char *);
float strtof(const char *, char **);
double strtod(const char *, char **);
int strtodg(const char *, char **, const FPI *, int *, unsigned *);
long double strtold(const char *, char **);

char *g_ddfmt(char *, double *, int, size_t);
char *g_ddfmt_p(char *, double *, int, size_t, int);
char *g_dfmt(char *, double *, int, size_t);
char *g_dfmt_p(char *, double *, int, size_t, int);
char *g_ffmt(char *, float *, int, size_t);
char *g_ffmt_p(char *, float *, int, size_t, int);
char *g_Qfmt(char *, void *, int, size_t);
char *g_Qfmt_p(char *, void *, int, size_t, int);
char *g_xfmt(char *, void *, int, size_t);
char *g_xfmt_p(char *, void *, int, size_t, int);
char *g_xLfmt(char *, void *, int, size_t);
char *g_xLfmt_p(char *, void *, int, size_t, int);

int strtoId(const char *, char **, double *, double *);
int strtoIdd(const char *, char **, double *, double *);
int strtoIf(const char *, char **, float *, float *);
int strtoIQ(const char *, char **, void *, void *);
int strtoIx(const char *, char **, void *, void *);
int strtoIxL(const char *, char **, void *, void *);
int strtord(const char *, char **, int, double *);
int strtordd(const char *, char **, int, double *);
int strtorf(const char *, char **, int, float *);
int strtorQ(const char *, char **, int, void *);
int strtorx(const char *, char **, int, void *);
int strtorxL(const char *, char **, int, void *);

#if 1
int strtodI(const char *, char **, double *);
int strtopd(const char *, char **, double *);
int strtopdd(const char *, char **, double *);
int strtopf(const char *, char **, float *);
int strtopQ(const char *, char **, void *);
int strtopx(const char *, char **, void *);
int strtopxL(const char *, char **, void *);
#else
#define strtopd(s, se, x)  strtord(s, se, 1, x)
#define strtopdd(s, se, x) strtordd(s, se, 1, x)
#define strtopf(s, se, x)  strtorf(s, se, 1, x)
#define strtopQ(s, se, x)  strtorQ(s, se, 1, x)
#define strtopx(s, se, x)  strtorx(s, se, 1, x)
#define strtopxL(s, se, x) strtorxL(s, se, 1, x)
#endif

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN third_party/getopt/getopt.h */

#define COSMOPOLITAN_THIRD_PARTY_GETOPT_GETOPT_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

extern char *optarg;
extern int optind, opterr, optopt, optreset;
int getopt(int nargc, char *const nargv[], const char *ostr);

#define no_argument 0
#define required_argument 1
#define optional_argument 2
struct option {
  const char *name;
  int has_arg;
  int *flag;
  int val;
};
int getopt_long(int nargc, char *const *nargv, const char *options,
                const struct option *long_options, int *idx);
int getopt_long_only(int nargc, char *const *nargv, const char *options,
                     const struct option *long_options, int *idx);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN third_party/musl/fnmatch.h */

#define COSMOPOLITAN_THIRD_PARTY_REGEX_FNMATCH_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

#define FNM_PATHNAME    0x1
#define FNM_NOESCAPE    0x2
#define FNM_PERIOD      0x4
#define FNM_LEADING_DIR 0x8
#define FNM_CASEFOLD    0x10
#define FNM_FILE_NAME   FNM_PATHNAME

#define FNM_NOMATCH 1
#define FNM_NOSYS   (-1)

int fnmatch(const char *, const char *, int);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN third_party/musl/glob.h */

#define COSMOPOLITAN_THIRD_PARTY_MUSL_GLOB_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

#define GLOB_ERR      0x01
#define GLOB_MARK     0x02
#define GLOB_NOSORT   0x04
#define GLOB_DOOFFS   0x08 /* reserves null slots at start of gl_pathv */
#define GLOB_NOCHECK  0x10 /* just yield pattern if GLOB_NOMATCH happens */
#define GLOB_APPEND   0x20 /* enables us to call glob() multiple times */
#define GLOB_NOESCAPE 0x40 /* don't allow things like \*\?\[\] escaping */
#define GLOB_PERIOD   0x80

#define GLOB_TILDE       0x1000
#define GLOB_TILDE_CHECK 0x4000

#define GLOB_NOSPACE 1
#define GLOB_ABORTED 2
#define GLOB_NOMATCH 3
#define GLOB_NOSYS   4

typedef struct {
  size_t gl_pathc;
  char **gl_pathv;
  size_t gl_offs;
  int __dummy1;
  void *__dummy2[5];
} glob_t;

int glob(const char *, int, int (*)(const char *, int), glob_t *);
void globfree(glob_t *);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN third_party/musl/passwd.h */

#define COSMOPOLITAN_LIBC_PASSWD_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

struct FILE;

struct passwd {
  char *pw_name;
  char *pw_passwd;
  uint32_t pw_uid;
  uint32_t pw_gid;
  char *pw_gecos;
  char *pw_dir;
  char *pw_shell;
};

void setpwent(void);
void endpwent(void);
struct passwd *getpwent(void);
struct passwd *getpwuid(uint32_t);
struct passwd *getpwnam(const char *);
int getpwuid_r(uint32_t, struct passwd *, char *, size_t, struct passwd **);
int getpwnam_r(const char *, struct passwd *, char *, size_t, struct passwd **);
struct passwd *fgetpwent(struct FILE *);
int putpwent(const struct passwd *, struct FILE *);

struct group {
  char *gr_name;
  char *gr_passwd;
  int32_t gr_gid;
  char **gr_mem;
};

struct group *getgrgid(gid_t);
struct group *getgrnam(const char *);
int getgrgid_r(gid_t, struct group *, char *, size_t, struct group **);
int getgrnam_r(const char *, struct group *, char *, size_t, struct group **);
struct group *getgrent(void);
void endgrent(void);
void setgrent(void);
struct group *fgetgrent(struct FILE *);
int putgrent(const struct group *, struct FILE *);
int getgrouplist(const char *, gid_t, gid_t *, int *);
int setgroups(size_t, const int32_t *);
int initgroups(const char *, int32_t);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN third_party/musl/tempnam.h */

#define COSMOPOLITAN_THIRD_PARTY_MUSL_TEMPNAM_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

char *tempnam(const char *, const char *);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN third_party/zlib/zlib.h */

#define COSMOPOLITAN_THIRD_PARTY_ZLIB_ZLIB_H_


/*!BEGIN third_party/zlib/zconf.h */

#define COSMOPOLITAN_THIRD_PARTY_ZLIB_ZCONF_H_

#define STDC
#define STDC99
#define MAX_MEM_LEVEL 9
#define DEF_MEM_LEVEL 8
#define MAX_WBITS 15 /* 32K LZ77 window */

#if !(__ASSEMBLER__ + __LINKER__ + 0)

typedef unsigned char Byte;
typedef unsigned int uInt;   /* 16 bits or more */
typedef unsigned long uLong; /* 32 bits or more */
typedef Byte Bytef;
typedef char charf;
typedef int intf;
typedef uInt uIntf;
typedef uLong uLongf;
typedef void const *voidpc;
typedef void *voidpf;
typedef void *voidp;

#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

/**
 * @fileoverview zlib
 *
 * The 'zlib' compression library provides in-memory
 * compression and decompression functions, including integrity checks
 * of the uncompressed data. This version of the library supports only
 * one compression method (deflation) but other algorithms will be added
 * later and will have the same stream interface.
 *
 * Compression can be done in a single step if the buffers are large enough,
 * or can be done by repeated calls of the compression function.  In the latter
 * case, the application must provide more input and/or consume the output
 * (providing more output space) before each call.
 *
 * The compressed data format used by default by the in-memory functions is
 * the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped
 * around a deflate stream, which is itself documented in RFC 1951.
 *
 * The library also supports reading and writing files in gzip (.gz) format
 * with an interface similar to that of stdio using the functions that start
 * with "gz".  The gzip format is different from the zlib format.  gzip is a
 * gzip wrapper, documented in RFC 1952, wrapped around a deflate stream.
 *
 * This library can optionally read and write gzip and raw deflate streams in
 * memory as well.
 *
 * The zlib format was designed to be compact and fast for use in memory
 * and on communications channels.  The gzip format was designed for single-
 * file compression on file systems, has a larger header than zlib to maintain
 * directory information, and uses a different, slower check method than zlib.
 *
 * The library does not install any signal handler.  The decoder checks
 * the consistency of the compressed data, so the library should never crash
 * even in the case of corrupted input.
 */

#define ZLIB_VERSION         "1.2.11"
#define ZLIB_VERNUM          0x12b0
#define ZLIB_VER_MAJOR       1
#define ZLIB_VER_MINOR       2
#define ZLIB_VER_REVISION    11
#define ZLIB_VER_SUBREVISION 0

/**
 * The application must update next_in and avail_in when avail_in has
 * dropped to zero. It must update next_out and avail_out when avail_out
 * has dropped to zero. The application must initialize zalloc, zfree
 * and opaque before calling the init function. All other fields are set
 * by the compression library and must not be updated by the
 * application.
 *
 * The opaque value provided by the application will be passed as the
 * first parameter for calls of zalloc and zfree. This can be useful for
 * custom memory management. The compression library attaches no meaning
 * to the opaque value.
 *
 * zalloc must return Z_NULL if there is not enough memory for the
 * object. If zlib is used in a multi-threaded application, zalloc and
 * zfree must be thread safe. In that case, zlib is thread-safe. When
 * zalloc and zfree are Z_NULL on entry to the initialization function,
 * they are set to internal routines that use the standard library
 * functions malloc() and free().
 *
 * On 16-bit systems, the functions zalloc and zfree must be able to
 * allocate exactly 65536 bytes, but will not be required to allocate
 * more than this if the symbol MAXSEG_64K is defined (see zconf.h).
 * WARNING: On MSDOS, pointers returned by zalloc for objects of exactly
 * 65536 bytes *must* have their offset normalized to zero. The default
 * allocation function provided by this library ensures this (see
 * zutil.c). To reduce memory requirements and avoid any allocation of
 * 64K objects, at the expense of compression ratio, compile the library
 * with -DMAX_WBITS=14 (see zconf.h).
 *
 * The fields total_in and total_out can be used for statistics or
 * progress reports. After compression, total_in holds the total size of
 * the uncompressed data and may be saved for use by the decompressor
 * (particularly if the decompressor wants to decompress everything in a
 * single step).
 */
#define Z_NO_FLUSH      0
#define Z_PARTIAL_FLUSH 1
#define Z_SYNC_FLUSH    2
#define Z_FULL_FLUSH    3
#define Z_FINISH        4
#define Z_BLOCK         5
#define Z_TREES         6

/**
 * Allowed flush values; see deflate() and inflate() below for details.
 */
#define Z_OK            0
#define Z_STREAM_END    1
#define Z_NEED_DICT     2
#define Z_ERRNO         (-1)
#define Z_STREAM_ERROR  (-2)
#define Z_DATA_ERROR    (-3)
#define Z_MEM_ERROR     (-4)
#define Z_BUF_ERROR     (-5)
#define Z_VERSION_ERROR (-6)

/**
 * Return codes for the compression/decompression functions. Negative
 * values are errors, positive values are used for special but normal
 * events.
 */
#define Z_NO_COMPRESSION      0
#define Z_BEST_SPEED          1
#define Z_BEST_COMPRESSION    9
#define Z_DEFAULT_COMPRESSION (-1)

/**
 * Compression levels.
 */
#define Z_FILTERED         1
#define Z_HUFFMAN_ONLY     2
#define Z_RLE              3
#define Z_FIXED            4
#define Z_DEFAULT_STRATEGY 0

/**
 * Compression strategy; see deflateInit2() below for details
 */
#define Z_BINARY  0
#define Z_TEXT    1
#define Z_ASCII   Z_TEXT /* for compatibility with 1.2.2 and earlier */
#define Z_UNKNOWN 2

/**
 * Possible values of the data_type field for deflate()
 */
#define Z_DEFLATED 8

/* The deflate compression method (the only one supported in this version) */
#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */

#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

typedef voidpf (*alloc_func)(voidpf opaque, uInt items, uInt size);
typedef void (*free_func)(voidpf opaque, voidpf address);

struct DeflateState;

typedef struct z_stream_s {
  const Bytef *next_in;       /* next input byte */
  uInt avail_in;              /* number of bytes available at next_in */
  uLong total_in;             /* total number of input bytes read so far */
  Bytef *next_out;            /* next output byte will go here */
  uInt avail_out;             /* remaining free space at next_out */
  uLong total_out;            /* total number of bytes output so far */
  const char *msg;            /* last error message, NULL if no error */
  struct DeflateState *state; /* not visible by applications */
  alloc_func zalloc;          /* used to allocate the internal state */
  free_func zfree;            /* used to free the internal state */
  voidpf opaque;  /* private data object passed to zalloc and zfree */
  int data_type;  /* best guess about the data type: binary or text
                     for deflate, or the decoding state for inflate */
  uLong adler;    /* Adler-32 or CRC-32 value of the uncompressed data */
  uLong reserved; /* reserved for future use */
} z_stream;

typedef z_stream *z_streamp;

/**
 * gzip header information passed to and from zlib routines. See RFC
 * 1952 for more details on the meanings of these fields.
 */
typedef struct gz_header_s {
  int text;       /* true if compressed data believed to be text */
  uLong time;     /* modification time */
  int xflags;     /* extra flags (not used when writing a gzip file) */
  int os;         /* operating system */
  Bytef *extra;   /* pointer to extra field or Z_NULL if none */
  uInt extra_len; /* extra field length (valid if extra != Z_NULL) */
  uInt extra_max; /* space at extra (only when reading header) */
  Bytef *name;    /* pointer to zero-terminated file name or Z_NULL */
  uInt name_max;  /* space at name (only when reading header) */
  Bytef *comment; /* pointer to zero-terminated comment or Z_NULL */
  uInt comm_max;  /* space at comment (only when reading header) */
  int hcrc;       /* true if there was or will be a header crc */
  int done;       /* true when done reading gzip header (not used
                     when writing a gzip file) */
} gz_header;

typedef gz_header *gz_headerp;

#define zlib_version zlibVersion()

/**
 * The application can compare zlibVersion and ZLIB_VERSION for consistency.
 * If the first character differs, the library code actually used is not
 * compatible with the zlib.h header file used by the application.  This check
 * is automatically made by deflateInit and inflateInit.
 */
const char *zlibVersion(void);

/**
 * Initializes the internal stream state for compression.  The fields
 * zalloc, zfree and opaque must be initialized before by the caller.  If
 * zalloc and zfree are set to Z_NULL, deflateInit updates them to use default
 * allocation functions.
 *
 * The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:
 * 1 gives best speed, 9 gives best compression, 0 gives no compression at all
 * (the input data is simply copied a block at a time).  Z_DEFAULT_COMPRESSION
 * requests a default compromise between speed and compression (currently
 * equivalent to level 6).
 *
 * @return Z_OK if success, Z_MEM_ERROR if there was not enough memory,
 *     or Z_STREAM_ERROR if level is not a valid compression level. msg
 *     is set to null if there is no error message. deflateInit does not
 *     perform any compression: this will be done by deflate().
 */
int deflateInit(z_streamp strm, int level);

/**
 * deflate compresses as much data as possible, and stops when the input
 * buffer becomes empty or the output buffer becomes full. It may
 * introduce some output latency (reading input without producing any
 * output) except when forced to flush.
 *
 * The detailed semantics are as follows. deflate performs one or both
 * of the following actions:
 *
 * - Compress more input starting at next_in and update next_in and
 *  avail_in accordingly. If not all input can be processed (because
 *  there is not enough room in the output buffer), next_in and avail_in
 *  are updated and processing will resume at this point for the next
 *  call of deflate().
 *
 * - Generate more output starting at next_out and update next_out and
 *  avail_out accordingly. This action is forced if the parameter flush
 *  is non zero. Forcing flush frequently degrades the compression
 *  ratio, so this parameter should be set only when necessary. Some
 *  output may be provided even if flush is zero.
 *
 * Before the call of deflate(), the application should ensure that at
 * least one of the actions is possible, by providing more input and/or
 * consuming more output, and updating avail_in or avail_out
 * accordingly; avail_out should never be zero before the call. The
 * application can consume the compressed output when it wants, for
 * example when the output buffer is full (avail_out == 0), or after
 * each call of deflate(). If deflate returns Z_OK and with zero
 * avail_out, it must be called again after making room in the output
 * buffer because there might be more output pending. See
 * deflatePending(), which can be used if desired to determine whether
 * or not there is more ouput in that case.
 *
 * Normally the parameter flush is set to Z_NO_FLUSH, which allows
 * deflate to decide how much data to accumulate before producing
 * output, in order to maximize compression.
 *
 * If the parameter flush is set to Z_SYNC_FLUSH, all pending output is
 * flushed to the output buffer and the output is aligned on a byte
 * boundary, so that the decompressor can get all input data available
 * so far. (In particular avail_in is zero after the call if enough
 * output space has been provided before the call.) Flushing may degrade
 * compression for some compression algorithms and so it should be used
 * only when necessary. This completes the current deflate block and
 * follows it with an empty stored block that is three bits plus filler
 * bits to the next byte, followed by four bytes (00 00 ff ff).
 *
 * If flush is set to Z_PARTIAL_FLUSH, all pending output is flushed to
 * the output buffer, but the output is not aligned to a byte boundary.
 * All of the input data so far will be available to the decompressor,
 * as for Z_SYNC_FLUSH. This completes the current deflate block and
 * follows it with an empty fixed codes block that is 10 bits long. This
 * assures that enough bytes are output in order for the decompressor to
 * finish the block before the empty fixed codes block.
 *
 * If flush is set to Z_BLOCK, a deflate block is completed and emitted,
 * as for Z_SYNC_FLUSH, but the output is not aligned on a byte
 * boundary, and up to seven bits of the current block are held to be
 * written as the next byte after the next deflate block is completed.
 * In this case, the decompressor may not be provided enough bits at
 * this point in order to complete decompression of the data provided so
 * far to the compressor. It may need to wait for the next block to be
 * emitted. This is for advanced applications that need to control the
 * emission of deflate blocks.
 *
 * If flush is set to Z_FULL_FLUSH, all output is flushed as with
 * Z_SYNC_FLUSH, and the compression state is reset so that
 * decompression can restart from this point if previous compressed data
 * has been damaged or if random access is desired. Using Z_FULL_FLUSH
 * too often can seriously degrade compression.
 *
 * If deflate returns with avail_out == 0, this function must be called
 * again with the same value of the flush parameter and more output
 * space (updated avail_out), until the flush is complete (deflate
 * returns with non-zero avail_out). In the case of a Z_FULL_FLUSH or
 * Z_SYNC_FLUSH, make sure that avail_out is greater than six to avoid
 * repeated flush markers due to avail_out == 0 on return.
 *
 * If the parameter flush is set to Z_FINISH, pending input is
 * processed, pending output is flushed and deflate returns with
 * Z_STREAM_END if there was enough output space. If deflate returns
 * with Z_OK or Z_BUF_ERROR, this function must be called again with
 * Z_FINISH and more output space (updated avail_out) but no more input
 * data, until it returns with Z_STREAM_END or an error. After deflate
 * has returned Z_STREAM_END, the only possible operations on the stream
 * are deflateReset or deflateEnd.
 *
 * Z_FINISH can be used in the first deflate call after deflateInit if
 * all the compression is to be done in a single step. In order to
 * complete in one call, avail_out must be at least the value returned
 * by deflateBound (see below). Then deflate is guaranteed to return
 * Z_STREAM_END. If not enough output space is provided, deflate will
 * not return Z_STREAM_END, and it must be called again as described
 * above.
 *
 * deflate() sets strm->adler to the Adler-32 checksum of all input read
 * so far (that is, total_in bytes). If a gzip stream is being
 * generated, then strm->adler will be the CRC-32 checksum of the input
 * read so far. (See deflateInit2 below.)
 *
 * deflate() may update strm->data_type if it can make a good guess about
 * the input data type (Z_BINARY or Z_TEXT).  If in doubt, the data is
 * considered binary.  This field is only for information purposes and does not
 * affect the compression algorithm in any manner.
 *
 * @return Z_OK if some progress has been made (more input processed or
 *     more output produced), Z_STREAM_END if all input has been
 *     consumed and all output has been produced (only when flush is set
 *     to Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent
 *     (for example if next_in or next_out was Z_NULL or the state was
 *     inadvertently written over by the application), or Z_BUF_ERROR if
 *     no progress is possible (for example avail_in or avail_out was
 *     zero). Note that Z_BUF_ERROR is not fatal, and deflate() can be
 *     called again with more input and more output space to continue
 *     compressing.
 */
int deflate(z_streamp strm, int flush);

/**
 * All dynamically allocated data structures for this stream are freed.
 * This function discards any unprocessed input and does not flush any
 * pending output.
 *
 * @return Z_OK if success, Z_STREAM_ERROR if the stream state was
 *     inconsistent, Z_DATA_ERROR if the stream was freed prematurely
 *     (some input or output was discarded). In the error case, msg may
 *     be set but then points to a static string (which must not be
 *     deallocated).
 */
int deflateEnd(z_streamp strm);

/**
 * Initializes the internal stream state for decompression. The fields
 * next_in, avail_in, zalloc, zfree and opaque must be initialized
 * before by the caller. In the current version of inflate, the provided
 * input is not read or consumed. The allocation of a sliding window
 * will be deferred to the first call of inflate (if the decompression
 * does not complete on the first call). If zalloc and zfree are set to
 * Z_NULL, inflateInit updates them to use default allocation functions.
 *
 * @return Z_OK if success, Z_MEM_ERROR if there was not enough memory,
 *     or Z_STREAM_ERROR if the parameters are invalid, such as a null
 *     pointer to the structure. msg is set to null if there is no error
 *     message. inflateInit does not perform any decompression. Actual
 *     decompression will be done by inflate(). So next_in, and
 *     avail_in, next_out, and avail_out are unused and unchanged. The
 *     current implementation of inflateInit() does not process any
 *     header information -- that is deferred until inflate() is called.
 */
int inflateInit(z_streamp strm);

/**
 * inflate decompresses as much data as possible, and stops when the input
 * buffer becomes empty or the output buffer becomes full.  It may introduce
 * some output latency (reading input without producing any output) except when
 * forced to flush.
 *
 * The detailed semantics are as follows.  inflate performs one or both of the
 * following actions:
 *
 * - Decompress more input starting at next_in and update next_in and
 *   avail_in accordingly. If not all input can be processed (because
 *   there is not enough room in the output buffer), then next_in and
 *   avail_in are updated accordingly, and processing will resume at
 *   this point for the next call of inflate().
 *
 * - Generate more output starting at next_out and update next_out and
 *   avail_out accordingly. inflate() provides as much output as
 *   possible, until there is no more input data or no more space in the
 *   output buffer (see below about the flush parameter).
 *
 * Before the call of inflate(), the application should ensure that at
 * least one of the actions is possible, by providing more input and/or
 * consuming more output, and updating the next_* and avail_* values
 * accordingly. If the caller of inflate() does not provide both
 * available input and available output space, it is possible that there
 * will be no progress made. The application can consume the
 * uncompressed output when it wants, for example when the output buffer
 * is full (avail_out == 0), or after each call of inflate(). If inflate
 * returns Z_OK and with zero avail_out, it must be called again after
 * making room in the output buffer because there might be more output
 * pending.
 *
 * The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH,
 * Z_FINISH, Z_BLOCK, or Z_TREES. Z_SYNC_FLUSH requests that inflate()
 * flush as much output as possible to the output buffer. Z_BLOCK
 * requests that inflate() stop if and when it gets to the next deflate
 * block boundary. When decoding the zlib or gzip format, this will
 * cause inflate() to return immediately after the header and before the
 * first block. When doing a raw inflate, inflate() will go ahead and
 * process the first block, and will return when it gets to the end of
 * that block, or when it runs out of data.
 *
 * The Z_BLOCK option assists in appending to or combining deflate
 * streams. To assist in this, on return inflate() always sets
 * strm->data_type to the number of unused bits in the last byte taken
 * from strm->next_in, plus 64 if inflate() is currently decoding the
 * last block in the deflate stream, plus 128 if inflate() returned
 * immediately after decoding an end-of-block code or decoding the
 * complete header up to just before the first byte of the deflate
 * stream. The end-of-block will not be indicated until all of the
 * uncompressed data from that block has been written to strm->next_out.
 * The number of unused bits may in general be greater than seven,
 * except when bit 7 of data_type is set, in which case the number of
 * unused bits will be less than eight. data_type is set as noted here
 * every time inflate() returns for all flush options, and so can be
 * used to determine the amount of currently consumed input in bits.
 *
 * The Z_TREES option behaves as Z_BLOCK does, but it also returns when
 * the end of each deflate block header is reached, before any actual
 * data in that block is decoded. This allows the caller to determine
 * the length of the deflate block header for later use in random access
 * within a deflate block. 256 is added to the value of strm->data_type
 * when inflate() returns immediately after reaching the end of the
 * deflate block header.
 *
 * inflate() should normally be called until it returns Z_STREAM_END or
 * an error. However if all decompression is to be performed in a single
 * step (a single call of inflate), the parameter flush should be set to
 * Z_FINISH. In this case all pending input is processed and all pending
 * output is flushed; avail_out must be large enough to hold all of the
 * uncompressed data for the operation to complete. (The size of the
 * uncompressed data may have been saved by the compressor for this
 * purpose.) The use of Z_FINISH is not required to perform an inflation
 * in one step. However it may be used to inform inflate that a faster
 * approach can be used for the single inflate() call. Z_FINISH also
 * informs inflate to not maintain a sliding window if the stream
 * completes, which reduces inflate's memory footprint. If the stream
 * does not complete, either because not all of the stream is provided
 * or not enough output space is provided, then a sliding window will be
 * allocated and inflate() can be called again to continue the operation
 * as if Z_NO_FLUSH had been used.
 *
 * In this implementation, inflate() always flushes as much output as
 * possible to the output buffer, and always uses the faster approach on
 * the first call. So the effects of the flush parameter in this
 * implementation are on the return value of inflate() as noted below,
 * when inflate() returns early when Z_BLOCK or Z_TREES is used, and
 * when inflate() avoids the allocation of memory for a sliding window
 * when Z_FINISH is used.
 *
 * If a preset dictionary is needed after this call (see
 * inflateSetDictionary below), inflate sets strm->adler to the Adler-32
 * checksum of the dictionary chosen by the compressor and returns
 * Z_NEED_DICT; otherwise it sets strm->adler to the Adler-32 checksum
 * of all output produced so far (that is, total_out bytes) and returns
 * Z_OK, Z_STREAM_END or an error code as described below. At the end of
 * the stream, inflate() checks that its computed Adler-32 checksum is
 * equal to that saved by the compressor and returns Z_STREAM_END only
 * if the checksum is correct.
 *
 * inflate() can decompress and check either zlib-wrapped or
 * gzip-wrapped deflate data. The header type is detected automatically,
 * if requested when initializing with inflateInit2(). Any information
 * contained in the gzip header is not retained unless
 * inflateGetHeader() is used. When processing gzip-wrapped deflate
 * data, strm->adler32 is set to the CRC-32 of the output produced so
 * far. The CRC-32 is checked against the gzip trailer, as is the
 * uncompressed length, modulo 2^32.
 *
 * @return Z_OK if some progress has been made (more input processed or
 *     more output produced), Z_STREAM_END if the end of the compressed
 *     data has been reached and all uncompressed output has been
 *     produced, Z_NEED_DICT if a preset dictionary is needed at this
 *     point, Z_DATA_ERROR if the input data was corrupted (input stream
 *     not conforming to the zlib format or incorrect check value, in
 *     which case strm->msg points to a string with a more specific
 *     error), Z_STREAM_ERROR if the stream structure was inconsistent
 *     (for example next_in or next_out was Z_NULL, or the state was
 *     inadvertently written over by the application), Z_MEM_ERROR if
 *     there was not enough memory, Z_BUF_ERROR if no progress was
 *     possible or if there was not enough room in the output buffer
 *     when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and
 *     inflate() can be called again with more input and more output
 *     space to continue decompressing. If Z_DATA_ERROR is returned, the
 *     application may then call inflateSync() to look for a good
 *     compression block if a partial recovery of the data is to be
 *     attempted.
 */
int inflate(z_streamp strm, int flush);

/**
 * All dynamically allocated data structures for this stream are freed.
 * This function discards any unprocessed input and does not flush any
 * pending output.
 *
 * @return Z_OK or Z_STREAM_ERROR if stream state inconsistent
 */
int inflateEnd(z_streamp strm);

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § zlib » special functions                                  ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│─╝
  the following functions are needed only in some special applications */

/**
 * This is another version of deflateInit with more compression options.
 * The fields next_in, zalloc, zfree and opaque must be initialized
 * before by the caller.
 *
 * The method parameter is the compression method. It must be Z_DEFLATED
 * in this version of the library.
 *
 * The windowBits parameter is the base two logarithm of the window size
 * (the size of the history buffer). It should be in the range 8..15 for
 * this version of the library. Larger values of this parameter result
 * in better compression at the expense of memory usage. The default
 * value is 15 if deflateInit is used instead.
 *
 * For the current implementation of deflate(), a windowBits value of 8
 * (a window size of 256 bytes) is not supported. As a result, a request
 * for 8 will result in 9 (a 512-byte window). In that case, providing 8
 * to inflateInit2() will result in an error when the zlib header with 9
 * is checked against the initialization of inflate(). The remedy is to
 * not use 8 with deflateInit2() with this initialization, or at least
 * in that case use 9 with inflateInit2().
 *
 * windowBits can also be -8..-15 for raw deflate. In this case,
 * -windowBits determines the window size. deflate() will then generate
 * raw deflate data with no zlib header or trailer, and will not compute
 * a check value.
 *
 * windowBits can also be greater than 15 for optional gzip encoding.
 * Add 16 to windowBits to write a simple gzip header and trailer around
 * the compressed data instead of a zlib wrapper. The gzip header will
 * have no file name, no extra data, no comment, no modification time
 * (set to zero), no header crc, and the operating system will be set to
 * the appropriate value, if the operating system was determined at
 * compile time. If a gzip stream is being written, strm->adler is a
 * CRC-32 instead of an Adler-32.
 *
 * For raw deflate or gzip encoding, a request for a 256-byte window is
 * rejected as invalid, since only the zlib header provides a means of
 * transmitting the window size to the decompressor.
 *
 * The memLevel parameter specifies how much memory should be allocated
 * for the internal compression state. memLevel=1 uses minimum memory
 * but is slow and reduces compression ratio; memLevel=9 uses maximum
 * memory for optimal speed. The default value is 8. See zconf.h for
 * total memory usage as a function of windowBits and memLevel.
 *
 * The strategy parameter is used to tune the compression algorithm. Use
 * the value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data
 * produced by a filter (or predictor), Z_HUFFMAN_ONLY to force Huffman
 * encoding only (no string match), or Z_RLE to limit match distances to
 * one (run-length encoding). Filtered data consists mostly of small
 * values with a somewhat random distribution. In this case, the
 * compression algorithm is tuned to compress them better. The effect of
 * Z_FILTERED is to force more Huffman coding and less string matching;
 * it is somewhat intermediate between Z_DEFAULT_STRATEGY and
 * Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as fast as
 * Z_HUFFMAN_ONLY, but give better compression for PNG image data. The
 * strategy parameter only affects the compression ratio but not the
 * correctness of the compressed output even if it is not set
 * appropriately. Z_FIXED prevents the use of dynamic Huffman codes,
 * allowing for a simpler decoder for special applications.
 *
 * @return Z_OK if success, Z_MEM_ERROR if there was not enough memory,
 *     or Z_STREAM_ERROR if any parameter is invalid (such as an invalid
 *     method). msg is set to null if there is no error message.
 *     deflateInit2 does not perform any compression: this will be done
 *     by deflate().
 */
int deflateInit2(z_streamp strm, int level, int method, int windowBits,
                 int memLevel, int strategy);

/**
 * Initializes the compression dictionary from the given byte sequence
 * without producing any compressed output. When using the zlib format,
 * this function must be called immediately after deflateInit,
 * deflateInit2 or deflateReset, and before any call of deflate. When
 * doing raw deflate, this function must be called either before any
 * call of deflate, or immediately after the completion of a deflate
 * block, i.e. after all input has been consumed and all output has been
 * delivered when using any of the flush options Z_BLOCK,
 * Z_PARTIAL_FLUSH, Z_SYNC_FLUSH, or Z_FULL_FLUSH. The compressor and
 * decompressor must use exactly the same dictionary (see
 * inflateSetDictionary).
 *
 * The dictionary should consist of strings (byte sequences) that are
 * likely to be encountered later in the data to be compressed, with the
 * most commonly used strings preferably put towards the end of the
 * dictionary. Using a dictionary is most useful when the data to be
 * compressed is short and can be predicted with good accuracy; the data
 * can then be compressed better than with the default empty dictionary.
 *
 * Depending on the size of the compression data structures selected by
 * deflateInit or deflateInit2, a part of the dictionary may in effect
 * be discarded, for example if the dictionary is larger than the window
 * size provided in deflateInit or deflateInit2. Thus the strings most
 * likely to be useful should be put at the end of the dictionary, not
 * at the front. In addition, the current implementation of deflate will
 * use at most the window size minus 262 bytes of the provided
 * dictionary.
 *
 * Upon return of this function, strm->adler is set to the Adler-32
 * value of the dictionary; the decompressor may later use this value to
 * determine which dictionary has been used by the compressor. (The
 * Adler-32 value applies to the whole dictionary even if only a subset
 * of the dictionary is actually used by the compressor.) If a raw
 * deflate was requested, then the Adler-32 value is not computed and
 * strm->adler is not set.
 *
 * @return Z_OK if success, or Z_STREAM_ERROR if a parameter is invalid
 *     (e.g. dictionary being Z_NULL) or the stream state is
 *     inconsistent (for example if deflate has already been called for
 *     this stream or if not at a block boundary for raw deflate).
 *     deflateSetDictionary does not perform any compression: this will
 *     be done by deflate().
 */
int deflateSetDictionary(z_streamp strm, const Bytef *dictionary,
                         uInt dictLength);

/**
 * Returns the sliding dictionary being maintained by deflate.  dictLength is
 * set to the number of bytes in the dictionary, and that many bytes are copied
 * to dictionary.  dictionary must have enough space, where 32768 bytes is
 * always enough.  If deflateGetDictionary() is called with dictionary equal to
 * Z_NULL, then only the dictionary length is returned, and nothing is copied.
 * Similary, if dictLength is Z_NULL, then it is not set.
 *
 * deflateGetDictionary() may return a length less than the window size, even
 * when more than the window size in input has been provided. It may return up
 * to 258 bytes less in that case, due to how zlib's implementation of deflate
 * manages the sliding window and lookahead for matches, where matches can be
 * up to 258 bytes long. If the application needs the last window-size bytes of
 * input, then that would need to be saved by the application outside of zlib.
 *
 * @return Z_OK on success, or Z_STREAM_ERROR if the stream state is
 *     inconsistent.
 */
int deflateGetDictionary(z_streamp strm, Bytef *dictionary, uInt *dictLength);

/**
 * Sets destination stream as a complete copy of the source stream.
 *
 * This function can be useful when several compression strategies will be
 * tried, for example when there are several ways of pre-processing the input
 * data with a filter.  The streams that will be discarded should then be freed
 * by calling deflateEnd.  Note that deflateCopy duplicates the internal
 * compression state which can be quite large, so this strategy is slow and can
 * consume lots of memory.
 *
 * @return Z_OK if success, Z_MEM_ERROR if there was not enough memory,
 *     Z_STREAM_ERROR if the source stream state was inconsistent (such
 *     as zalloc being Z_NULL). msg is left unchanged in both source and
 *     destination.
 */
int deflateCopy(z_streamp dest, z_streamp source);

/**
 * This function is equivalent to deflateEnd followed by deflateInit, but
 * does not free and reallocate the internal compression state.  The stream
 * will leave the compression level and any other attributes that may have been
 * set unchanged.
 *
 * deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
 * stream state was inconsistent (such as zalloc or state being Z_NULL).
 */
int deflateReset(z_streamp strm);

/**
 * Dynamically update the compression level and compression strategy.  The
 * interpretation of level and strategy is as in deflateInit2().  This can be
 * used to switch between compression and straight copy of the input data, or
 * to switch to a different kind of input data requiring a different strategy.
 * If the compression approach (which is a function of the level) or the
 * strategy is changed, and if any input has been consumed in a previous
 * deflate() call, then the input available so far is compressed with the old
 * level and strategy using deflate(strm, Z_BLOCK).  There are three approaches
 * for the compression levels 0, 1..3, and 4..9 respectively.  The new level
 * and strategy will take effect at the next call of deflate().
 *
 * If a deflate(strm, Z_BLOCK) is performed by deflateParams(), and it does
 * not have enough output space to complete, then the parameter change will not
 * take effect.  In this case, deflateParams() can be called again with the
 * same parameters and more output space to try again.
 *
 * In order to assure a change in the parameters on the first try, the
 * deflate stream should be flushed using deflate() with Z_BLOCK or other flush
 * request until strm.avail_out is not zero, before calling deflateParams().
 * Then no more input data should be provided before the deflateParams() call.
 * If this is done, the old level and strategy will be applied to the data
 * compressed before deflateParams(), and the new level and strategy will be
 * applied to the the data compressed after deflateParams().
 *
 * deflateParams returns Z_OK on success, Z_STREAM_ERROR if the source stream
 * state was inconsistent or if a parameter was invalid, or Z_BUF_ERROR if
 * there was not enough output space to complete the compression of the
 * available input data before a change in the strategy or approach.  Note that
 * in the case of a Z_BUF_ERROR, the parameters are not changed.  A return
 * value of Z_BUF_ERROR is not fatal, in which case deflateParams() can be
 * retried with more output space.
 */
int deflateParams(z_streamp strm, int level, int strategy);

/**
 * Fine tune deflate's internal compression parameters. This should only
 * be used by someone who understands the algorithm used by zlib's
 * deflate for searching for the best matching string, and even then
 * only by the most fanatic optimizer trying to squeeze out the last
 * compressed bit for their specific input data. Read the deflate.c
 * source code for the meaning of the max_lazy, good_length,
 * nice_length, and max_chain parameters.
 *
 * deflateTune() can be called after deflateInit() or deflateInit2(), and
 * returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream.
 */
int deflateTune(z_streamp strm, int good_length, int max_lazy, int nice_length,
                int max_chain);

/**
 * deflateBound() returns an upper bound on the compressed size after
 * deflation of sourceLen bytes. It must be called after deflateInit()
 * or deflateInit2(), and after deflateSetHeader(), if used. This would
 * be used to allocate an output buffer for deflation in a single pass,
 * and so would be called before deflate(). If that first deflate() call
 * is provided the sourceLen input bytes, an output buffer allocated to
 * the size returned by deflateBound(), and the flush value Z_FINISH,
 * then deflate() is guaranteed to return Z_STREAM_END. Note that it is
 * possible for the compressed size to be larger than the value returned
 * by deflateBound() if flush options other than Z_FINISH or Z_NO_FLUSH
 * are used.
 */
uLong deflateBound(z_streamp strm, uLong sourceLen);

/**
 * deflatePending() returns the number of bytes and bits of output that
 * have been generated, but not yet provided in the available output.
 * The bytes not provided would be due to the available output space
 * having being consumed. The number of bits of output not provided are
 * between 0 and 7, where they await more bits to join them in order to
 * fill out a full byte. If pending or bits are Z_NULL, then those
 * values are not set.
 *
 * @return Z_OK if success, or Z_STREAM_ERROR if the source stream state
 *     was inconsistent.
 */
int deflatePending(z_streamp strm, unsigned *pending, int *bits);

/**
 * deflatePrime() inserts bits in the deflate output stream.  The intent
 * is that this function is used to start off the deflate output with the bits
 * leftover from a previous deflate stream when appending to it.  As such, this
 * function can only be used for raw deflate, and must be used before the first
 * deflate() call after a deflateInit2() or deflateReset().  bits must be less
 * than or equal to 16, and that many of the least significant bits of value
 * will be inserted in the output.
 *
 * @return Z_OK if success, Z_BUF_ERROR if there was not enough room in
 *     the internal buffer to insert the bits, or Z_STREAM_ERROR if the
 *     source stream state was inconsistent.
 */
int deflatePrime(z_streamp strm, int bits, int value);

/**
 * Provides gzip header information for when a gzip stream is requested
 * by deflateInit2(). deflateSetHeader() may be called after
 * deflateInit2() or deflateReset() and before the first call of
 * deflate(). The text, time, os, extra field, name, and comment
 * information in the provided gz_header structure are written to the
 * gzip header (xflag is ignored -- the extra flags are set according to
 * the compression level). The caller must assure that, if not Z_NULL,
 * name and comment are terminated with a zero byte, and that if extra
 * is not Z_NULL, that extra_len bytes are available there. If hcrc is
 * true, a gzip header crc is included. Note that the current versions
 * of the command-line version of gzip (up through version 1.3.x) do not
 * support header crc's, and will report that it is a "multi-part gzip
 * file" and give up.
 *
 * If deflateSetHeader is not used, the default gzip header has text
 * false, the time set to zero, and os set to 255, with no extra, name,
 * or comment fields. The gzip header is returned to the default state
 * by deflateReset().
 *
 * deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the
 * source stream state was inconsistent.
 */
int deflateSetHeader(z_streamp strm, gz_headerp head);

/**
 * This is another version of inflateInit with an extra parameter. The
 * fields next_in, avail_in, zalloc, zfree and opaque must be
 * initialized before by the caller.
 *
 * The windowBits parameter is the base two logarithm of the maximum
 * window size (the size of the history buffer). It should be in the
 * range 8..15 for this version of the library. The default value is 15
 * if inflateInit is used instead. windowBits must be greater than or
 * equal to the windowBits value provided to deflateInit2() while
 * compressing, or it must be equal to 15 if deflateInit2() was not
 * used. If a compressed stream with a larger window size is given as
 * input, inflate() will return with the error code Z_DATA_ERROR instead
 * of trying to allocate a larger window.
 *
 * windowBits can also be zero to request that inflate use the window
 * size in the zlib header of the compressed stream.
 *
 * windowBits can also be -8..-15 for raw inflate. In this case,
 * -windowBits determines the window size. inflate() will then process
 * raw deflate data, not looking for a zlib or gzip header, not
 * generating a check value, and not looking for any check values for
 * comparison at the end of the stream. This is for use with other
 * formats that use the deflate compressed data format such as zip.
 * Those formats provide their own check values. If a custom format is
 * developed using the raw deflate format for compressed data, it is
 * recommended that a check value such as an Adler-32 or a CRC-32 be
 * applied to the uncompressed data as is done in the zlib, gzip, and
 * zip formats. For most applications, the zlib format should be used as
 * is. Note that comments above on the use in deflateInit2() applies to
 * the magnitude of windowBits.
 *
 * windowBits can also be greater than 15 for optional gzip decoding.
 * Add 32 to windowBits to enable zlib and gzip decoding with automatic
 * header detection, or add 16 to decode only the gzip format (the zlib
 * format will return a Z_DATA_ERROR). If a gzip stream is being
 * decoded, strm->adler is a CRC-32 instead of an Adler-32. Unlike the
 * gunzip utility and gzread() (see below), inflate() will not
 * automatically decode concatenated gzip streams. inflate() will return
 * Z_STREAM_END at the end of the gzip stream. The state would need to
 * be reset to continue decoding a subsequent gzip stream.
 *
 * @return Z_OK if success, Z_MEM_ERROR if there was not enough memory,
 *     or Z_STREAM_ERROR if the parameters are invalid, such as a null
 *     pointer to the structure. msg is set to null if there is no error
 *     message. inflateInit2 does not perform any decompression apart
 *     from possibly reading the zlib header if present: actual
 *     decompression will be done by inflate(). (So next_in and avail_in
 *     may be modified, but next_out and avail_out are unused and
 *     unchanged.) The current implementation of inflateInit2() does not
 *     process any header information -- that is deferred until
 *     inflate() is called.
 */
int inflateInit2(z_streamp strm, int windowBits);

/**
 * Initializes the decompression dictionary from the given uncompressed
 * byte sequence. This function must be called immediately after a call
 * of inflate, if that call returned Z_NEED_DICT. The dictionary chosen
 * by the compressor can be determined from the Adler-32 value returned
 * by that call of inflate. The compressor and decompressor must use
 * exactly the same dictionary (see deflateSetDictionary). For raw
 * inflate, this function can be called at any time to set the
 * dictionary. If the provided dictionary is smaller than the window and
 * there is already data in the window, then the provided dictionary
 * will amend what's there. The application must insure that the
 * dictionary that was used for compression is provided.
 *
 * @return Z_OK if success, Z_STREAM_ERROR if a parameter is invalid
 *     (e.g. dictionary being Z_NULL) or the stream state is
 *     inconsistent, Z_DATA_ERROR if the given dictionary doesn't match
 *     the expected one (incorrect Adler-32 value). inflateSetDictionary
 *     does not perform any decompression: this will be done by
 *     subsequent calls of inflate().
 */
int inflateSetDictionary(z_streamp strm, const Bytef *dictionary,
                         uInt dictLength);

/**
 * Returns the sliding dictionary being maintained by inflate.  dictLength is
 * set to the number of bytes in the dictionary, and that many bytes are copied
 * to dictionary.  dictionary must have enough space, where 32768 bytes is
 * always enough.  If inflateGetDictionary() is called with dictionary equal to
 * Z_NULL, then only the dictionary length is returned, and nothing is copied.
 * Similary, if dictLength is Z_NULL, then it is not set.
 *
 * @return Z_OK on success, or Z_STREAM_ERROR if the stream state is
 *     inconsistent.
 */
int inflateGetDictionary(z_streamp strm, Bytef *dictionary, uInt *dictLength);

/**
 * Skips invalid compressed data until a possible full flush point (see
 * above for the description of deflate with Z_FULL_FLUSH) can be found,
 * or until all available input is skipped. No output is provided.
 *
 * inflateSync searches for a 00 00 FF FF pattern in the compressed
 * data. All full flush points have this pattern, but not all
 * occurrences of this pattern are full flush points.
 *
 * @return Z_OK if a possible full flush point has been found,
 *     Z_BUF_ERROR if no more input was provided, Z_DATA_ERROR if no
 *     flush point has been found, or Z_STREAM_ERROR if the stream
 *     structure was inconsistent. In the success case, the application
 *     may save the current current value of total_in which indicates
 *     where valid compressed data was found. In the error case, the
 *     application may repeatedly call inflateSync, providing more input
 *     each time, until success or end of the input data.
 */
int inflateSync(z_streamp strm);

/**
 * Sets the destination stream as a complete copy of the source stream.
 *
 * This function can be useful when randomly accessing a large stream.
 * The first pass through the stream can periodically record the inflate
 * state, allowing restarting inflate at those points when randomly
 * accessing the stream.
 *
 * @return Z_OK if success, Z_MEM_ERROR if there was not enough memory,
 *     Z_STREAM_ERROR if the source stream state was inconsistent (such
 *     as zalloc being Z_NULL). msg is left unchanged in both source and
 *     destination.
 */
int inflateCopy(z_streamp dest, z_streamp source);

/**
 * This function is equivalent to inflateEnd followed by inflateInit,
 * but does not free and reallocate the internal decompression state.  The
 * stream will keep attributes that may have been set by inflateInit2.
 *
 * @return Z_OK if success, or Z_STREAM_ERROR if the source stream state
 *     was inconsistent (such as zalloc or state being Z_NULL).
 */
int inflateReset(z_streamp strm);

/**
 * This function is the same as inflateReset, but it also permits changing
 * the wrap and window size requests.  The windowBits parameter is interpreted
 * the same as it is for inflateInit2.  If the window size is changed, then the
 * memory allocated for the window is freed, and the window will be reallocated
 * by inflate() if needed.
 *
 * @return Z_OK if success, or Z_STREAM_ERROR if the source stream state
 *     was inconsistent (such as zalloc or state being Z_NULL), or if
 *     the windowBits parameter is invalid.
 */
int inflateReset2(z_streamp strm, int windowBits);

/**
 * This function inserts bits in the inflate input stream.  The intent is
 * that this function is used to start inflating at a bit position in the
 * middle of a byte.  The provided bits will be used before any bytes are used
 * from next_in.  This function should only be used with raw inflate, and
 * should be used before the first inflate() call after inflateInit2() or
 * inflateReset().  bits must be less than or equal to 16, and that many of the
 * least significant bits of value will be inserted in the input.
 *
 * If bits is negative, then the input stream bit buffer is emptied.  Then
 * inflatePrime() can be called again to put bits in the buffer.  This is used
 * to clear out bits leftover after feeding inflate a block description prior
 * to feeding inflate codes.
 *
 * @return Z_OK if success, or Z_STREAM_ERROR if the source stream state
 *     was inconsistent.
 */
int inflatePrime(z_streamp strm, int bits, int value);

/**
 * Returns two values, one in the lower 16 bits of the return value, and
 * the other in the remaining upper bits, obtained by shifting the
 * return value down 16 bits. If the upper value is -1 and the lower
 * value is zero, then inflate() is currently decoding information
 * outside of a block. If the upper value is -1 and the lower value is
 * non-zero, then inflate is in the middle of a stored block, with the
 * lower value equaling the number of bytes from the input remaining to
 * copy. If the upper value is not -1, then it is the number of bits
 * back from the current bit position in the input of the code (literal
 * or length/distance pair) currently being processed. In that case the
 * lower value is the number of bytes already emitted for that code.
 *
 * A code is being processed if inflate is waiting for more input to
 * complete decoding of the code, or if it has completed decoding but is
 * waiting for more output space to write the literal or match data.
 *
 * inflateMark() is used to mark locations in the input data for random
 * access, which may be at bit positions, and to note those cases where
 * the output of a code may span boundaries of random access blocks. The
 * current location in the input stream can be determined from avail_in
 * and data_type as noted in the description for the Z_BLOCK flush
 * parameter for inflate.
 *
 * @return the value noted above, or -65536 if the provided source
 *     stream state was inconsistent.
 */
long inflateMark(z_streamp strm);

/**
 * inflateGetHeader() requests that gzip header information be stored in
 * the provided gz_header structure. inflateGetHeader() may be called
 * after inflateInit2() or inflateReset(), and before the first call of
 * inflate(). As inflate() processes the gzip stream, head->done is zero
 * until the header is completed, at which time head->done is set to
 * one. If a zlib stream is being decoded, then head->done is set to -1
 * to indicate that there will be no gzip header information
 * forthcoming. Note that Z_BLOCK or Z_TREES can be used to force
 * inflate() to return immediately after header processing is complete
 * and before any actual data is decompressed.
 *
 * The text, time, xflags, and os fields are filled in with the gzip
 * header contents. hcrc is set to true if there is a header CRC. (The
 * header CRC was valid if done is set to one.) If extra is not Z_NULL,
 * then extra_max contains the maximum number of bytes to write to
 * extra. Once done is true, extra_len contains the actual extra field
 * length, and extra contains the extra field, or that field truncated
 * if extra_max is less than extra_len. If name is not Z_NULL, then up
 * to name_max characters are written there, terminated with a zero
 * unless the length is greater than name_max. If comment is not Z_NULL,
 * then up to comm_max characters are written there, terminated with a
 * zero unless the length is greater than comm_max. When any of extra,
 * name, or comment are not Z_NULL and the respective field is not
 * present in the header, then that field is set to Z_NULL to signal its
 * absence. This allows the use of deflateSetHeader() with the returned
 * structure to duplicate the header. However if those fields are set to
 * allocated memory, then the application will need to save those
 * pointers elsewhere so that they can be eventually freed.
 *
 * If inflateGetHeader is not used, then the header information is
 * simply discarded. The header is always checked for validity,
 * including the header CRC if present. inflateReset() will reset the
 * process to discard the header information. The application would need
 * to call inflateGetHeader() again to retrieve the header from the next
 * gzip stream.
 *
 * @return Z_OK if success, or Z_STREAM_ERROR if the source stream state
 *     was inconsistent.
 */
int inflateGetHeader(z_streamp strm, gz_headerp head);

/**
 * Initialize internal stream state for decompression using
 * inflateBack() calls. The fields zalloc, zfree and opaque in strm must
 * be initialized before the call. If zalloc and zfree are Z_NULL, then
 * the default library- derived memory allocation routines are used.
 * windowBits is the base two logarithm of the window size, in the range
 * 8..15. window is a caller supplied buffer of that size. Except for
 * special applications where it is assured that deflate was used with
 * small window sizes, windowBits must be 15 and a 32K byte window must
 * be supplied to be able to decompress general deflate streams.
 *
 * See inflateBack() for the usage of these routines.
 *
 * @return Z_OK on success, Z_STREAM_ERROR if any of the parameters are
 *     invalid, or Z_MEM_ERROR if the internal state could not be
 *     allocated.
 */
int inflateBackInit(z_streamp strm, int windowBits, unsigned char *window);

typedef unsigned (*in_func)(void *, const unsigned char **);
typedef int (*out_func)(void *, unsigned char *, unsigned);

/**
 * inflateBack() does a raw inflate with a single call using a call-back
 * interface for input and output. This is potentially more efficient
 * than inflate() for file i/o applications, in that it avoids copying
 * between the output and the sliding window by simply making the window
 * itself the output buffer. inflate() can be faster on modern CPUs when
 * used with large buffers. inflateBack() trusts the application to not
 * change the output buffer passed by the output function, at least
 * until inflateBack() returns.
 *
 * inflateBackInit() must be called first to allocate the internal state
 * and to initialize the state with the user-provided window buffer.
 * inflateBack() may then be used multiple times to inflate a complete,
 * raw deflate stream with each call. inflateBackEnd() is then called to
 * free the allocated state.
 *
 * A raw deflate stream is one with no zlib or gzip header or trailer.
 * This routine would normally be used in a utility that reads zip or
 * gzip files and writes out uncompressed files. The utility would
 * decode the header and process the trailer on its own, hence this
 * routine expects only the raw deflate stream to decompress. This is
 * different from the default behavior of inflate(), which expects a
 * zlib header and trailer around the deflate stream.
 *
 * inflateBack() uses two subroutines supplied by the caller that are
 * then called by inflateBack() for input and output. inflateBack()
 * calls those routines until it reads a complete deflate stream and
 * writes out all of the uncompressed data, or until it encounters an
 * error. The function's parameters and return types are defined above
 * in the in_func and out_func typedefs. inflateBack() will call
 * in(in_desc, &buf) which should return the number of bytes of provided
 * input, and a pointer to that input in buf. If there is no input
 * available, in() must return zero -- buf is ignored in that case --
 * and inflateBack() will return a buffer error. inflateBack() will call
 * out(out_desc, buf, len) to write the uncompressed data buf[0..len-1].
 * out() should return zero on success, or non-zero on failure. If out()
 * returns non-zero, inflateBack() will return with an error. Neither
 * in() nor out() are permitted to change the contents of the window
 * provided to inflateBackInit(), which is also the buffer that out()
 * uses to write from. The length written by out() will be at most the
 * window size. Any non-zero amount of input may be provided by in().
 *
 * For convenience, inflateBack() can be provided input on the first
 * call by setting strm->next_in and strm->avail_in. If that input is
 * exhausted, then in() will be called. Therefore strm->next_in must be
 * initialized before calling inflateBack(). If strm->next_in is Z_NULL,
 * then in() will be called immediately for input. If strm->next_in is
 * not Z_NULL, then strm->avail_in must also be initialized, and then if
 * strm->avail_in is not zero, input will initially be taken from
 * strm->next_in[0 .. strm->avail_in - 1].
 *
 * The in_desc and out_desc parameters of inflateBack() is passed as the
 * first parameter of in() and out() respectively when they are called.
 * These descriptors can be optionally used to pass any information that
 * the caller- supplied in() and out() functions need to do their job.
 *
 * On return, inflateBack() will set strm->next_in and strm->avail_in to
 * pass back any unused input that was provided by the last in() call.
 * The return values of inflateBack() can be Z_STREAM_END on success,
 * Z_BUF_ERROR if in() or out() returned an error, Z_DATA_ERROR if there
 * was a format error in the deflate stream (in which case strm->msg is
 * set to indicate the nature of the error), or Z_STREAM_ERROR if the
 * stream was not properly initialized. In the case of Z_BUF_ERROR, an
 * input or output error can be distinguished using strm->next_in which
 * will be Z_NULL only if in() returned an error. If strm->next_in is
 * not Z_NULL, then the Z_BUF_ERROR was due to out() returning non-zero.
 * (in() will always be called before out(), so strm->next_in is assured
 * to be defined if out() returns non-zero.) Note that inflateBack()
 * cannot return Z_OK.
 */
int inflateBack(z_streamp strm, in_func in, void *in_desc, out_func out,
                void *out_desc);

/**
 * All memory allocated by inflateBackInit() is freed.
 *
 * @return Z_OK on success, or Z_STREAM_ERROR if the stream state was
 *     inconsistent.
 */
int inflateBackEnd(z_streamp strm);

/*
 * Return flags indicating compile-time options.
 *
 * Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other:
 *   1.0: size of uInt
 *   3.2: size of uLong
 *   5.4: size of voidpf (pointer)
 *   7.6: size of off_t
 *
 * Compiler, assembler, and debug options:
 *   8: ZLIB_DEBUG
 *   9: ASMV or ASMINF -- use ASM code
 *   10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention
 *   11: 0 (reserved)
 *
 * One-time table building (smaller code, but not thread-safe if true):
 *   12: BUILDFIXED -- build static block decoding tables when needed
 *   13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed
 *   14,15: 0 (reserved)
 *
 * Library content (indicates missing functionality):
 *
 *   16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking
 *   deflate code when not needed)
 *
 *   17: NO_GZIP -- deflate can't write gzip streams, and inflate can't
 *   detect and decode gzip streams (to avoid linking crc code)
 *
 *   18-19: 0 (reserved)
 *
 * Operation variations (changes in library functionality):
 *   20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate
 *   21: FASTEST -- deflate algorithm with only one, lowest compression level
 *   22,23: 0 (reserved)
 *
 * The sprintf variant used by gzprintf (zero is best):
 *   24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format
 *   25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure!
 *   26: 0 = returns value, 1 = void -- 1 means inferred string length returned
 *
 * Remainder is:
 *   27-31: 0 (reserved)
 */
uLong zlibCompileFlags(void);

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § zlib » utility functions                                  ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│─╝
  The following utility functions are implemented on top of the basic
  stream-oriented functions. To simplify the interface, some default
  options are assumed (compression level and memory usage, standard
  memory allocation functions). The source code of these utility
  functions can be modified if you need special options. */

/**
 * Compresses source buffer into the destination buffer. sourceLen is
 * the byte length of the source buffer. Upon entry, destLen is the
 * total size of the destination buffer, which must be at least the
 * value returned by compressBound(sourceLen). Upon exit, destLen is the
 * actual size of the compressed data. compress() is equivalent to
 * compress2() with a level parameter of Z_DEFAULT_COMPRESSION.
 *
 * @return Z_OK if success, Z_MEM_ERROR if there was not enough memory,
 *     Z_BUF_ERROR if there was not enough room in the output buffer.
 */
int compress(Bytef *dest, uLongf *destLen, const Bytef *source,
             uLong sourceLen);

/**
 * Compresses source buffer into the destination buffer. The level
 * parameter has the same meaning as in deflateInit. sourceLen is the
 * byte length of the source buffer. Upon entry, destLen is the total
 * size of the destination buffer, which must be at least the value
 * returned by compressBound(sourceLen). Upon exit, destLen is the
 * actual size of the compressed data.
 *
 * @return Z_OK if success, Z_MEM_ERROR if there was not enough memory,
 *     Z_BUF_ERROR if there was not enough room in the output buffer,
 *     Z_STREAM_ERROR if the level parameter is invalid.
 */
int compress2(Bytef *dest, uLongf *destLen, const Bytef *source,
              uLong sourceLen, int level);

/**
 * Returns an upper bound on the compressed size after compress() or
 * compress2() on sourceLen bytes. It would be used before a compress()
 * or compress2() call to allocate the destination buffer.
 */
uLong compressBound(uLong sourceLen);

/**
 * Decompresses the source buffer into the destination buffer.  sourceLen is
 * the byte length of the source buffer.  Upon entry, destLen is the total size
 * of the destination buffer, which must be large enough to hold the entire
 * uncompressed data.  (The size of the uncompressed data must have been saved
 * previously by the compressor and transmitted to the decompressor by some
 * mechanism outside the scope of this compression library.) Upon exit, destLen
 * is the actual size of the uncompressed data.
 *
 * @return Z_OK if success, Z_MEM_ERROR if there was not enough memory,
 *     Z_BUF_ERROR if there was not enough room in the output buffer, or
 *     Z_DATA_ERROR if the input data was corrupted or incomplete. In
 *     the case where there is not enough room, uncompress() will fill
 *     the output buffer with the uncompressed data up to that point.
 */
int uncompress(Bytef *dest, uLongf *destLen, const Bytef *source,
               uLong sourceLen);

/**
 * Same as uncompress, except that sourceLen is a pointer, where the
 * length of the source is *sourceLen.  On return, *sourceLen is the number of
 * source bytes consumed.
 */
int uncompress2(Bytef *dest, uLongf *destLen, const Bytef *source,
                uLong *sourceLen);

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § zlib » gzip                                               ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│─╝
  This library supports reading and writing files in gzip (.gz) format
  with an interface similar to that of stdio, using the functions that
  start with "gz". The gzip format is different from the zlib format.
  gzip is a gzip wrapper, documented in RFC 1952, wrapped around a
  deflate stream. */

typedef struct gzFile_s *gzFile; /* semi-opaque gzip file descriptor */

/**
 * Opens a gzip (.gz) file for reading or writing.
 *
 * The mode parameter is as in fopen ("rb" or "wb") but can also include
 * a compression level ("wb9") or a strategy: 'f' for filtered data as
 * in "wb6f", 'h' for Huffman-only compression as in "wb1h", 'R' for
 * run-length encoding as in "wb1R", or 'F' for fixed code compression
 * as in "wb9F". (See the description of deflateInit2 for more
 * information about the strategy parameter.) 'T' will request
 * transparent writing or appending with no compression and not using
 * the gzip format.
 *
 * "a" can be used instead of "w" to request that the gzip stream that
 * will be written be appended to the file. "+" will result in an error,
 * since reading and writing to the same gzip file is not supported. The
 * addition of "x" when writing will create the file exclusively, which
 * fails if the file already exists. On systems that support it, the
 * addition of "e" when reading or writing will set the flag to close
 * the file on an execve() call.
 *
 * These functions, as well as gzip, will read and decode a sequence of
 * gzip streams in a file. The append function of gzopen() can be used
 * to create such a file. (Also see gzflush() for another way to do
 * this.) When appending, gzopen does not test whether the file begins
 * with a gzip stream, nor does it look for the end of the gzip streams
 * to begin appending. gzopen will simply append a gzip stream to the
 * existing file.
 *
 * gzopen can be used to read a file which is not in gzip format; in
 * this case gzread will directly read from the file without
 * decompression. When reading, this will be detected automatically by
 * looking for the magic two- byte gzip header.
 *
 * @return Z_OK if the file could not be opened, if there was insufficient
 *     memory to allocate the gzFile state, or if an invalid mode was
 *     specified (an 'r', 'w', or 'a' was not provided, or '+' was
 *     provided). errno can be checked to determine if the reason gzopen
 *     failed was that the file could not be opened.
 */
gzFile gzopen(const char *path, const char *mode);

/**
 * Associates gzFile with the file descriptor.
 *
 * File descriptors are obtained from calls like open, dup, creat, pipe
 * or fileno (if the file has been previously opened with fopen). The
 * mode parameter is as in gzopen.
 *
 * The next call of gzclose on the returned gzFile will also close the file
 * descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor
 * fd.  If you want to keep fd open, use fd = dup(fd_keep); gz = gzdopen(fd,
 * mode);.  The duplicated descriptor should be saved to avoid a leak, since
 * gzdopen does not close fd if it fails.  If you are using fileno() to get the
 * file descriptor from a FILE *, then you will have to use dup() to avoid
 * double-close()ing the file descriptor.  Both gzclose() and fclose() will
 * close the associated file descriptor, so they need to have different file
 * descriptors.
 *
 * @return Z_OK if there was insufficient memory to allocate the gzFile
 *     state, if an invalid mode was specified (an 'r', 'w', or 'a' was
 *     not provided, or '+' was provided), or if fd is -1. The file
 *     descriptor is not used until the next gz* read, write, seek, or
 *     close operation, so gzdopen will not detect if fd is invalid
 *     (unless fd is -1).
 */
gzFile gzdopen(int fd, const char *mode);

/**
 * Sets internal buffer size used by this library's functions. The
 * default buffer size is 8192 bytes. This function must be called after
 * gzopen() or gzdopen(), and before any other calls that read or write
 * the file. The buffer memory allocation is always deferred to the
 * first read or write. Three times that size in buffer space is
 * allocated. A larger buffer size of, for example, 64K or 128K bytes
 * will noticeably increase the speed of decompression (reading).
 *
 * The new buffer size also affects the maximum length for gzprintf().
 *
 * @return Z_OK on success, or -1 on failure, such as being called too
 *     late.
 */
int gzbuffer(gzFile file, unsigned size);

/**
 * Dynamically update the compression level or strategy.  See the description
 * of deflateInit2 for the meaning of these parameters.  Previously provided
 * data is flushed before the parameter change.
 *
 * @return Z_OK if success, Z_STREAM_ERROR if the file was not opened for
 *     writing, Z_ERRNO if there is an error writing the flushed data,
 *     or Z_MEM_ERROR if there is a memory allocation error.
 */
int gzsetparams(gzFile file, int level, int strategy);

/**
 * Reads given number of uncompressed bytes from the compressed file. If
 * the input file is not in gzip format, gzread copies the given number
 * of bytes into the buffer directly from the file.
 *
 * After reaching the end of a gzip stream in the input, gzread will continue
 * to read, looking for another gzip stream.  Any number of gzip streams may be
 * concatenated in the input file, and will all be decompressed by gzread().
 * If something other than a gzip stream is encountered after a gzip stream,
 * that remaining trailing garbage is ignored (and no error is returned).
 *
 * gzread can be used to read a gzip file that is being concurrently written.
 * Upon reaching the end of the input, gzread will return with the available
 * data.  If the error code returned by gzerror is Z_OK or Z_BUF_ERROR, then
 * gzclearerr can be used to clear the end of file indicator in order to permit
 * gzread to be tried again.  Z_OK indicates that a gzip stream was completed
 * on the last gzread.  Z_BUF_ERROR indicates that the input file ended in the
 * middle of a gzip stream.  Note that gzread does not return -1 in the event
 * of an incomplete gzip stream.  This error is deferred until gzclose(), which
 * will return Z_BUF_ERROR if the last gzread ended in the middle of a gzip
 * stream.  Alternatively, gzerror can be used before gzclose to detect this
 * case.
 *
 * @return Z_OK number of uncompressed bytes actually read, less than
 *     len for end of file, or -1 for error. If len is too large to fit
 *     in an int, then nothing is read, -1 is returned, and the error
 *     state is set to Z_STREAM_ERROR.
 */
int gzread(gzFile file, voidp buf, unsigned len);

/**
 * Read up to nitems items of size size from file to buf, otherwise operating
 * as gzread() does.  This duplicates the interface of stdio's fread(), with
 * size_t request and return types.  If the library defines size_t, then
 * size_t is identical to size_t.  If not, then size_t is an unsigned
 * integer type that can contain a pointer.
 *
 * gzfread() returns the number of full items read of size size, or zero if
 * the end of the file was reached and a full item could not be read, or if
 * there was an error.  gzerror() must be consulted if zero is returned in
 * order to determine if there was an error.  If the multiplication of size and
 * nitems overflows, i.e. the product does not fit in a size_t, then nothing
 * is read, zero is returned, and the error state is set to Z_STREAM_ERROR.
 *
 * In the event that the end of file is reached and only a partial item is
 * available at the end, i.e. the remaining uncompressed data length is not a
 * multiple of size, then the final partial item is nevetheless read into buf
 * and the end-of-file flag is set.  The length of the partial item read is not
 * provided, but could be inferred from the result of gztell().  This behavior
 * is the same as the behavior of fread() implementations in common libraries,
 * but it prevents the direct use of gzfread() to read a concurrently written
 * file, reseting and retrying on end-of-file, when size is not 1.
 */
size_t gzfread(voidp buf, size_t size, size_t nitems, gzFile file);

/**
 * Writes given number of uncompressed bytes into the compressed file.
 * gzwrite returns the number of uncompressed bytes written or 0 in case
 * of error.
 */
int gzwrite(gzFile file, voidpc buf, unsigned len);

/**
 * Writes nitems items of size size from buf to file, duplicating the
 * interface of stdio's fwrite(), with size_t request and return types.
 * If the library defines size_t, then size_t is identical to size_t. If
 * not, then size_t is an unsigned integer type that can contain a
 * pointer.
 *
 * gzfwrite() returns the number of full items written of size size, or zero
 * if there was an error.  If the multiplication of size and nitems overflows,
 * i.e. the product does not fit in a size_t, then nothing is written, zero
 * is returned, and the error state is set to Z_STREAM_ERROR.
 */
size_t gzfwrite(voidpc buf, size_t size, size_t nitems, gzFile file);

/**
 * Converts, formats, and writes the arguments to the compressed file
 * under control of the format string, as in fprintf. gzprintf returns
 * the number of uncompressed bytes actually written, or a negative zlib
 * error code in case of error. The number of uncompressed bytes written
 * is limited to 8191, or one less than the buffer size given to
 * gzbuffer(). The caller should assure that this limit is not exceeded.
 * If it is exceeded, then gzprintf() will return an error (0) with
 * nothing written. In this case, there may also be a buffer overflow
 * with unpredictable consequences, which is possible only if zlib was
 * compiled with the insecure functions sprintf() or vsprintf() because
 * the secure snprintf() or vsnprintf() functions were not available.
 * This can be determined using zlibCompileFlags().
 */
int gzprintf(gzFile file, const char *format, ...);

/**
 * Writes the given null-terminated string to the compressed file, excluding
 * the terminating null character.
 *
 * @return Z_OK number of characters written, or -1 in case of error.
 */
int gzputs(gzFile file, const char *s);

/**
 * Reads bytes from the compressed file until len-1 characters are read,
 * or a newline character is read and transferred to buf, or an
 * end-of-file condition is encountered. If any characters are read or
 * if len == 1, the string is terminated with a null character. If no
 * characters are read due to an end-of-file or len < 1, then the buffer
 * is left untouched.
 *
 * @return buf which is a null-terminated string, or it returns NULL for
 *     end-of-file or in case of error. If there was an error, the
 *     contents at buf are indeterminate.
 */
char *gzgets(gzFile file, char *buf, int len);

/**
 * Writes character converted to an unsigned char into compressed file.
 * @return value that was written, or -1 on error
 */
int gzputc(gzFile file, int c);

/**
 * Reads one byte from the compressed file. gzgetc returns this byte or
 * -1 in case of end of file or error. This is implemented as a macro
 * for speed. As such, it does not do all of the checking the other
 * functions do. I.e. it does not check to see if file is NULL, nor
 * whether the structure file points to has been clobbered or not.
 */
int gzgetc(gzFile file);

/**
 * Pushes one character back onto the stream to be read as the first
 * character on the next read. At least one character of push-back is
 * allowed. gzungetc() returns the character pushed, or -1 on failure.
 * gzungetc() will fail if c is -1, and may fail if a character has been
 * pushed but not read yet. If gzungetc is used immediately after gzopen
 * or gzdopen, at least the output buffer size of pushed characters is
 * allowed. (See gzbuffer above.) The pushed character will be discarded
 * if the stream is repositioned with gzseek() or gzrewind().
 */
int gzungetc(int c, gzFile file);

/**
 * Flushes all pending output into the compressed file. The parameter
 * flush is as in the deflate() function. The return value is the zlib
 * error number (see function gzerror below). gzflush is only permitted
 * when writing.
 *
 * If the flush parameter is Z_FINISH, the remaining data is written and
 * the gzip stream is completed in the output. If gzwrite() is called
 * again, a new gzip stream will be started in the output. gzread() is
 * able to read such concatenated gzip streams.
 *
 * gzflush should be called only when strictly necessary because it will
 * degrade compression if called too often.
 */
int gzflush(gzFile file, int flush);

/**
 * Sets starting position for the next gzread or gzwrite on the given
 * compressed file. The offset represents a number of bytes in the
 * uncompressed data stream. The whence parameter is defined as in
 * lseek(2); the value SEEK_END is not supported.
 *
 * If the file is opened for reading, this function is emulated but can be
 * extremely slow.  If the file is opened for writing, only forward seeks are
 * supported; gzseek then compresses a sequence of zeroes up to the new
 * starting position.
 *
 * @return resulting offset location as measured in bytes from the
 *     beginning of the uncompressed stream, or -1 in case of error, in
 *     particular if the file is opened for writing and the new starting
 *     position would be before the current position.
 */
ssize_t gzseek(gzFile file, int64_t offset, int whence);

/**
 * Rewinds file.
 *
 * This function is supported only for reading.
 *
 * @note gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)
 */
int gzrewind(gzFile file);

/**
 * Returns starting position for the next gzread or gzwrite on the given
 * compressed file. This position represents a number of bytes in the
 * uncompressed data stream, and is zero when starting, even if
 * appending or reading a gzip stream from the middle of a file using
 * gzdopen().
 *
 * @note gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
 */
ssize_t gztell(gzFile file);

/**
 * Returns current offset in the file being read or written. This offset
 * includes the count of bytes that precede the gzip stream, for example
 * when appending or when using gzdopen() for reading. When reading, the
 * offset does not include as yet unused buffered input. This
 * information can be used for a progress indicator. On error,
 * gzoffset() returns -1.
 */
ssize_t gzoffset(gzFile file);

/**
 * Returns true (1) if the end-of-file indicator has been set while
 * reading, false (0) otherwise. Note that the end-of-file indicator is
 * set only if the read tried to go past the end of the input, but came
 * up short. Therefore, just like feof(), gzeof() may return false even
 * if there is no more data to read, in the event that the last read
 * request was for the exact number of bytes remaining in the input
 * file. This will happen if the input file size is an exact multiple of
 * the buffer size.
 *
 * If gzeof() returns true, then the read functions will return no more
 * data, unless the end-of-file indicator is reset by gzclearerr() and
 * the input file has grown since the previous end of file was detected.
 */
int gzeof(gzFile file);

/**
 * Returns true (1) if file is being copied directly while reading, or
 * false (0) if file is a gzip stream being decompressed.
 *
 * If the input file is empty, gzdirect() will return true, since the
 * input does not contain a gzip stream.
 *
 * If gzdirect() is used immediately after gzopen() or gzdopen() it will
 * cause buffers to be allocated to allow reading the file to determine
 * if it is a gzip file. Therefore if gzbuffer() is used, it should be
 * called before gzdirect().
 *
 * When writing, gzdirect() returns true (1) if transparent writing was
 * requested ("wT" for the gzopen() mode), or false (0) otherwise.
 * (Note: gzdirect() is not needed when writing. Transparent writing
 * must be explicitly requested, so the application already knows the
 * answer. When linking statically, using gzdirect() will include all of
 * the zlib code for gzip file reading and decompression, which may not
 * be desired.)
 */
int gzdirect(gzFile file);

/**
 * Flushes all pending output if necessary, closes the compressed file
 * and deallocates the (de)compression state. Note that once file is
 * closed, you cannot call gzerror with file, since its structures have
 * been deallocated. gzclose must not be called more than once on the
 * same file, just as free must not be called more than once on the same
 * allocation.
 *
 * @return Z_STREAM_ERROR if file is not valid, Z_ERRNO on a file
 *     operation error, Z_MEM_ERROR if out of memory, Z_BUF_ERROR if the
 *     last read ended in the middle of a gzip stream, or Z_OK on
 *     success.
 */
int gzclose(gzFile file);

/**
 * Same as gzclose(), but gzclose_r() is only for use when reading, and
 * gzclose_w() is only for use when writing or appending. The advantage
 * to using these instead of gzclose() is that they avoid linking in
 * zlib compression or decompression code that is not used when only
 * reading or only writing respectively. If gzclose() is used, then both
 * compression and decompression code will be included the application
 * when linking to a static zlib library.
 */
int gzclose_r(gzFile file);
int gzclose_w(gzFile file);

/**
 * Returns the error message for the last error which occurred on the given
 * compressed file.  errnum is set to zlib error number.  If an error occurred
 * in the file system and not in the compression library, errnum is set to
 * Z_ERRNO and the application may consult errno to get the exact error code.
 *
 * The application must not modify the returned string.  Future calls to
 * this function may invalidate the previously returned string.  If file is
 * closed, then the string previously returned by gzerror will no longer be
 * available.
 *
 * gzerror() should be used to distinguish errors from end-of-file for those
 * functions above that do not distinguish those cases in their return values.
 */
const char *gzerror(gzFile file, int *errnum);

/**
 * Clears the error and end-of-file flags for file.  This is analogous to the
 * clearerr() function in stdio.  This is useful for continuing to read a gzip
 * file that is being written concurrently.
 */
void gzclearerr(gzFile file);

/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § zlib » checksums                                          ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/

/**
 * Updates running Adler-32 checksum with the bytes buf[0..len-1] and
 * return the updated checksum. If buf is Z_NULL, this function returns
 * the required initial value for the checksum.
 */
uLong adler32(uLong adler, const Bytef *buf, uInt len);

/**
 * Same as adler32(), but with a size_t length.
 */
uLong adler32_z(uLong adler, const Bytef *buf, size_t len);

/**
 * Combine two Adler-32 checksums into one. For two sequences of bytes,
 * seq1 and seq2 with lengths len1 and len2, Adler-32 checksums were
 * calculated for each, adler1 and adler2. adler32_combine() returns the
 * Adler-32 checksum of seq1 and seq2 concatenated, requiring only
 * adler1, adler2, and len2. Note that the off_t type (like off_t) is a
 * signed integer. If len2 is negative, the result has no meaning or
 * utility.
 */
uLong adler32_combine(uLong adler1, uLong adler2, int64_t len2);

/**
 * Update a running CRC-32 with the bytes buf[0..len-1] and return the
 * updated CRC-32.  If buf is Z_NULL, this function returns the required
 * initial value for the crc.  Pre- and post-conditioning (one's complement) is
 * performed within this function so it shouldn't be done by the application.
 *
 * Usage example:
 *
 *     uLong crc = crc32(0L, Z_NULL, 0);
 *     while (read_buffer(buffer, length) != EOF) {
 *       crc = crc32(crc, buffer, length);
 *     }
 *     if (crc != original_crc) error();
 */
uLong crc32(uLong crc, const Bytef *buf, uInt len);

/**
 * Combine two CRC-32 check values into one. For two sequences of bytes,
 * seq1 and seq2 with lengths len1 and len2, CRC-32 check values were
 * calculated for each, crc1 and crc2. crc32_combine() returns the
 * CRC-32 check value of seq1 and seq2 concatenated, requiring only
 * crc1, crc2, and len2.
 */
uLong crc32_combine(uLong crc1, uLong crc2, int64_t len2);

/**
 * gzgetc() macro and its supporting function and exposed data
 * structure. Note that the real internal state is much larger than the
 * exposed structure. This abbreviated structure exposes just enough for
 * the gzgetc() macro. The user should not mess with these exposed
 * elements, since their names or behavior could change in the future,
 * perhaps even capriciously. They can only be used by the gzgetc()
 * macro. You have been warned.
 */
struct gzFile_s {
  unsigned have;
  unsigned char *next;
  int64_t pos;
};

int gzgetc_(gzFile file); /* backward compatibility */
#ifdef Z_PREFIX_SET
#undef z_gzgetc
#define z_gzgetc(g) \
  ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g))
#elif defined(Z_CR_PREFIX_SET)
#undef gzgetc
#define gzgetc(g) \
  ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (Cr_z_gzgetc)(g))
#else
#define gzgetc(g) \
  ((g)->have ? ((g)->have--, (g)->pos++, *((g)->next)++) : (gzgetc)(g))
#endif

/* undocumented functions */
const char *zError(int);
int inflateSyncPoint(z_streamp);
int inflateUndermine(z_streamp, int);
int inflateValidate(z_streamp, int);
unsigned long inflateCodesUsed(z_streamp);
int inflateResetKeep(z_streamp);
int deflateResetKeep(z_streamp);
int gzvprintf(gzFile file, const char *format, va_list va);
void inflate_fast_chunk(z_streamp strm, unsigned start);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */


/*!BEGIN third_party/regex/regex.h */

#define COSMOPOLITAN_LIBC_REGEX_REGEX_H_
#if !(__ASSEMBLER__ + __LINKER__ + 0)
COSMOPOLITAN_C_START_

#if 0
/*───────────────────────────────────────────────────────────────────────────│─╗
│ cosmopolitan § regular expressions                                       ─╬─│┼
╚────────────────────────────────────────────────────────────────────────────│*/
#endif

#define REG_EXTENDED 1
#define REG_ICASE    2
#define REG_NEWLINE  4
#define REG_NOSUB    8

#define REG_NOTBOL 1
#define REG_NOTEOL 2

#define REG_OK       0
#define REG_NOMATCH  1
#define REG_BADPAT   2
#define REG_ECOLLATE 3
#define REG_ECTYPE   4
#define REG_EESCAPE  5
#define REG_ESUBREG  6
#define REG_EBRACK   7
#define REG_EPAREN   8
#define REG_EBRACE   9
#define REG_BADBR    10
#define REG_ERANGE   11
#define REG_ESPACE   12
#define REG_BADRPT   13

#define REG_ENOSYS -1

typedef long regoff_t;

struct Regex {
  size_t re_nsub;
  void *__opaque, *__padding[4];
  size_t __nsub2;
  char __padding2;
};

struct RegexMatch {
  regoff_t rm_so;
  regoff_t rm_eo;
};

typedef struct Regex regex_t;
typedef struct RegexMatch regmatch_t;

int regcomp(regex_t *, const char *, int);
int regexec(const regex_t *, const char *, size_t, regmatch_t *, int);
size_t regerror(int, const regex_t *, char *, size_t);
void regfree(regex_t *);

COSMOPOLITAN_C_END_
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */

#endif /* COSMOPOLITAN_H_ */