simpleos 0.6.3

A Simple OS use for MCU, that implements single-threaded asynchronous runtime.
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
/* automatically generated by rust-bindgen 0.72.1 */

#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]

pub const SFUD_MF_ID_CYPRESS: u32 = 1;
pub const SFUD_MF_ID_FUJITSU: u32 = 4;
pub const SFUD_MF_ID_EON: u32 = 28;
pub const SFUD_MF_ID_ATMEL: u32 = 31;
pub const SFUD_MF_ID_MICRON: u32 = 32;
pub const SFUD_MF_ID_AMIC: u32 = 55;
pub const SFUD_MF_ID_NOR_MEM: u32 = 82;
pub const SFUD_MF_ID_SANYO: u32 = 98;
pub const SFUD_MF_ID_INTEL: u32 = 137;
pub const SFUD_MF_ID_ESMT: u32 = 140;
pub const SFUD_MF_ID_FUDAN: u32 = 161;
pub const SFUD_MF_ID_HYUNDAI: u32 = 173;
pub const SFUD_MF_ID_SST: u32 = 191;
pub const SFUD_MF_ID_MACRONIX: u32 = 194;
pub const SFUD_MF_ID_GIGADEVICE: u32 = 200;
pub const SFUD_MF_ID_ISSI: u32 = 213;
pub const SFUD_MF_ID_WINBOND: u32 = 239;
pub const __NEWLIB_H__: u32 = 1;
pub const _NEWLIB_VERSION_H__: u32 = 1;
pub const _NEWLIB_VERSION: &[u8; 6] = b"4.4.0\0";
pub const __NEWLIB__: u32 = 4;
pub const __NEWLIB_MINOR__: u32 = 4;
pub const __NEWLIB_PATCHLEVEL__: u32 = 0;
pub const _ATEXIT_DYNAMIC_ALLOC: u32 = 1;
pub const _FSEEK_OPTIMIZATION: u32 = 1;
pub const _FVWRITE_IN_STREAMIO: u32 = 1;
pub const _HAVE_CC_INHIBIT_LOOP_TO_LIBCALL: u32 = 1;
pub const _HAVE_INITFINI_ARRAY: u32 = 1;
pub const _HAVE_LONG_DOUBLE: u32 = 1;
pub const _LDBL_EQ_DBL: u32 = 1;
pub const _MB_LEN_MAX: u32 = 1;
pub const _REENT_CHECK_VERIFY: u32 = 1;
pub const _UNBUF_STREAM_OPT: u32 = 1;
pub const _WANT_IO_LONG_LONG: u32 = 1;
pub const _WANT_REGISTER_FINI: u32 = 1;
pub const _WANT_USE_GDTOA: u32 = 1;
pub const _WIDE_ORIENT: u32 = 1;
pub const __OBSOLETE_MATH_DEFAULT: u32 = 1;
pub const __OBSOLETE_MATH: u32 = 1;
pub const _DEFAULT_SOURCE: u32 = 1;
pub const _POSIX_SOURCE: u32 = 1;
pub const _POSIX_C_SOURCE: u32 = 200809;
pub const _ATFILE_SOURCE: u32 = 1;
pub const __ATFILE_VISIBLE: u32 = 1;
pub const __BSD_VISIBLE: u32 = 1;
pub const __GNU_VISIBLE: u32 = 0;
pub const __ISO_C_VISIBLE: u32 = 2011;
pub const __LARGEFILE_VISIBLE: u32 = 0;
pub const __MISC_VISIBLE: u32 = 1;
pub const __POSIX_VISIBLE: u32 = 200809;
pub const __SVID_VISIBLE: u32 = 1;
pub const __XSI_VISIBLE: u32 = 0;
pub const __SSP_FORTIFY_LEVEL: u32 = 0;
pub const __RAND_MAX: u32 = 2147483647;
pub const __have_longlong64: u32 = 1;
pub const __have_long64: u32 = 1;
pub const ___int8_t_defined: u32 = 1;
pub const ___int16_t_defined: u32 = 1;
pub const ___int32_t_defined: u32 = 1;
pub const ___int64_t_defined: u32 = 1;
pub const ___int_least8_t_defined: u32 = 1;
pub const ___int_least16_t_defined: u32 = 1;
pub const ___int_least32_t_defined: u32 = 1;
pub const ___int_least64_t_defined: u32 = 1;
pub const __GNUCLIKE_ASM: u32 = 3;
pub const __GNUCLIKE___TYPEOF: u32 = 1;
pub const __GNUCLIKE___SECTION: u32 = 1;
pub const __GNUCLIKE_CTOR_SECTION_HANDLING: u32 = 1;
pub const __GNUCLIKE_BUILTIN_CONSTANT_P: u32 = 1;
pub const __GNUCLIKE_BUILTIN_VARARGS: u32 = 1;
pub const __GNUCLIKE_BUILTIN_STDARG: u32 = 1;
pub const __GNUCLIKE_BUILTIN_VAALIST: u32 = 1;
pub const __GNUC_VA_LIST_COMPATIBILITY: u32 = 1;
pub const __GNUCLIKE_BUILTIN_NEXT_ARG: u32 = 1;
pub const __GNUCLIKE_BUILTIN_MEMCPY: u32 = 1;
pub const __CC_SUPPORTS_INLINE: u32 = 1;
pub const __CC_SUPPORTS___INLINE: u32 = 1;
pub const __CC_SUPPORTS___INLINE__: u32 = 1;
pub const __CC_SUPPORTS___FUNC__: u32 = 1;
pub const __CC_SUPPORTS_WARNING: u32 = 1;
pub const __CC_SUPPORTS_VARADIC_XXX: u32 = 1;
pub const __CC_SUPPORTS_DYNAMIC_ARRAY_INIT: u32 = 1;
pub const _NULL: u32 = 0;
pub const _ATEXIT_SIZE: u32 = 32;
pub const _RAND48_SEED_0: u32 = 13070;
pub const _RAND48_SEED_1: u32 = 43981;
pub const _RAND48_SEED_2: u32 = 4660;
pub const _RAND48_MULT_0: u32 = 58989;
pub const _RAND48_MULT_1: u32 = 57068;
pub const _RAND48_MULT_2: u32 = 5;
pub const _RAND48_ADD: u32 = 11;
pub const _REENT_EMERGENCY_SIZE: u32 = 25;
pub const _REENT_ASCTIME_SIZE: u32 = 26;
pub const _REENT_SIGNAL_SIZE: u32 = 24;
pub const __SLBF: u32 = 1;
pub const __SNBF: u32 = 2;
pub const __SRD: u32 = 4;
pub const __SWR: u32 = 8;
pub const __SRW: u32 = 16;
pub const __SEOF: u32 = 32;
pub const __SERR: u32 = 64;
pub const __SMBF: u32 = 128;
pub const __SAPP: u32 = 256;
pub const __SSTR: u32 = 512;
pub const __SOPT: u32 = 1024;
pub const __SNPT: u32 = 2048;
pub const __SOFF: u32 = 4096;
pub const __SORD: u32 = 8192;
pub const __SL64: u32 = 32768;
pub const __SNLK: u32 = 1;
pub const __SWID: u32 = 8192;
pub const _IOFBF: u32 = 0;
pub const _IOLBF: u32 = 1;
pub const _IONBF: u32 = 2;
pub const EOF: i32 = -1;
pub const BUFSIZ: u32 = 1024;
pub const FOPEN_MAX: u32 = 20;
pub const FILENAME_MAX: u32 = 1024;
pub const L_tmpnam: u32 = 1024;
pub const P_tmpdir: &[u8; 5] = b"/tmp\0";
pub const SEEK_SET: u32 = 0;
pub const SEEK_CUR: u32 = 1;
pub const SEEK_END: u32 = 2;
pub const TMP_MAX: u32 = 26;
pub const L_ctermid: u32 = 16;
pub const EXIT_FAILURE: u32 = 1;
pub const EXIT_SUCCESS: u32 = 0;
pub const RAND_MAX: u32 = 2147483647;
pub const true_: u32 = 1;
pub const false_: u32 = 0;
pub const __bool_true_false_are_defined: u32 = 1;
pub const SFUD_SW_VERSION: &[u8; 6] = b"1.1.0\0";
pub const SFUD_CMD_WRITE_ENABLE: u32 = 6;
pub const SFUD_CMD_WRITE_DISABLE: u32 = 4;
pub const SFUD_CMD_READ_STATUS_REGISTER: u32 = 5;
pub const SFUD_VOLATILE_SR_WRITE_ENABLE: u32 = 80;
pub const SFUD_CMD_WRITE_STATUS_REGISTER: u32 = 1;
pub const SFUD_CMD_PAGE_PROGRAM: u32 = 2;
pub const SFUD_CMD_AAI_WORD_PROGRAM: u32 = 173;
pub const SFUD_CMD_ERASE_CHIP: u32 = 199;
pub const SFUD_CMD_READ_DATA: u32 = 3;
pub const SFUD_CMD_DUAL_OUTPUT_READ_DATA: u32 = 59;
pub const SFUD_CMD_DUAL_IO_READ_DATA: u32 = 187;
pub const SFUD_CMD_QUAD_IO_READ_DATA: u32 = 235;
pub const SFUD_CMD_QUAD_OUTPUT_READ_DATA: u32 = 107;
pub const SFUD_CMD_MANUFACTURER_DEVICE_ID: u32 = 144;
pub const SFUD_CMD_JEDEC_ID: u32 = 159;
pub const SFUD_CMD_READ_UNIQUE_ID: u32 = 75;
pub const SFUD_CMD_READ_SFDP_REGISTER: u32 = 90;
pub const SFUD_CMD_ENABLE_RESET: u32 = 102;
pub const SFUD_CMD_RESET: u32 = 153;
pub const SFUD_CMD_ENTER_4B_ADDRESS_MODE: u32 = 183;
pub const SFUD_CMD_EXIT_4B_ADDRESS_MODE: u32 = 233;
pub const SFUD_WRITE_MAX_PAGE_SIZE: u32 = 256;
pub const SFUD_DUMMY_DATA: u32 = 255;
pub const SFUD_SFDP_ERASE_TYPE_MAX_NUM: u32 = 4;
pub const __int20: u32 = 2;
pub const __int20__: u32 = 2;
pub const __INT8: &[u8; 3] = b"hh\0";
pub const __INT16: &[u8; 2] = b"h\0";
pub const __INT64: &[u8; 2] = b"l\0";
pub const __FAST8: &[u8; 3] = b"hh\0";
pub const __FAST16: &[u8; 2] = b"h\0";
pub const __FAST64: &[u8; 2] = b"l\0";
pub const __LEAST8: &[u8; 3] = b"hh\0";
pub const __LEAST16: &[u8; 2] = b"h\0";
pub const __LEAST64: &[u8; 2] = b"l\0";
pub const LFS_VERSION: u32 = 131083;
pub const LFS_VERSION_MAJOR: u32 = 2;
pub const LFS_VERSION_MINOR: u32 = 11;
pub const LFS_DISK_VERSION: u32 = 131073;
pub const LFS_DISK_VERSION_MAJOR: u32 = 2;
pub const LFS_DISK_VERSION_MINOR: u32 = 1;
pub const LFS_NAME_MAX: u32 = 255;
pub const LFS_FILE_MAX: u32 = 2147483647;
pub const LFS_ATTR_MAX: u32 = 1022;
pub type int_least8_t = ::core::ffi::c_schar;
pub type int_least16_t = ::core::ffi::c_short;
pub type int_least32_t = ::core::ffi::c_int;
pub type int_least64_t = ::core::ffi::c_long;
pub type uint_least8_t = ::core::ffi::c_uchar;
pub type uint_least16_t = ::core::ffi::c_ushort;
pub type uint_least32_t = ::core::ffi::c_uint;
pub type uint_least64_t = ::core::ffi::c_ulong;
pub type int_fast8_t = ::core::ffi::c_schar;
pub type int_fast16_t = ::core::ffi::c_short;
pub type int_fast32_t = ::core::ffi::c_int;
pub type int_fast64_t = ::core::ffi::c_long;
pub type uint_fast8_t = ::core::ffi::c_uchar;
pub type uint_fast16_t = ::core::ffi::c_ushort;
pub type uint_fast32_t = ::core::ffi::c_uint;
pub type uint_fast64_t = ::core::ffi::c_ulong;
pub type intmax_t = ::core::ffi::c_long;
pub type uintmax_t = ::core::ffi::c_ulong;
#[doc = "< write 1 to 256 bytes per page"]
pub const sfud_write_mode_SFUD_WM_PAGE_256B: sfud_write_mode = 1;
#[doc = "< byte write"]
pub const sfud_write_mode_SFUD_WM_BYTE: sfud_write_mode = 2;
#[doc = "< auto address increment"]
pub const sfud_write_mode_SFUD_WM_AAI: sfud_write_mode = 4;
#[doc = "< dual-buffer write, like AT45DB series"]
pub const sfud_write_mode_SFUD_WM_DUAL_BUFFER: sfud_write_mode = 8;
#[doc = " flash program(write) data mode"]
pub type sfud_write_mode = ::core::ffi::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sfud_mf {
    pub name: *mut ::core::ffi::c_char,
    pub id: u8,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of sfud_mf"][::core::mem::size_of::<sfud_mf>() - 16usize];
    ["Alignment of sfud_mf"][::core::mem::align_of::<sfud_mf>() - 8usize];
    ["Offset of field: sfud_mf::name"][::core::mem::offset_of!(sfud_mf, name) - 0usize];
    ["Offset of field: sfud_mf::id"][::core::mem::offset_of!(sfud_mf, id) - 8usize];
};
impl Default for sfud_mf {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sfud_flash_chip {
    #[doc = "< flash chip name"]
    pub name: *mut ::core::ffi::c_char,
    #[doc = "< manufacturer ID"]
    pub mf_id: u8,
    #[doc = "< memory type ID"]
    pub type_id: u8,
    #[doc = "< capacity ID"]
    pub capacity_id: u8,
    #[doc = "< flash capacity (bytes)"]
    pub capacity: u32,
    #[doc = "< write mode @see sfud_write_mode"]
    pub write_mode: u16,
    #[doc = "< erase granularity (bytes)"]
    pub erase_gran: u32,
    #[doc = "< erase granularity size block command"]
    pub erase_gran_cmd: u8,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of sfud_flash_chip"][::core::mem::size_of::<sfud_flash_chip>() - 32usize];
    ["Alignment of sfud_flash_chip"][::core::mem::align_of::<sfud_flash_chip>() - 8usize];
    ["Offset of field: sfud_flash_chip::name"]
        [::core::mem::offset_of!(sfud_flash_chip, name) - 0usize];
    ["Offset of field: sfud_flash_chip::mf_id"]
        [::core::mem::offset_of!(sfud_flash_chip, mf_id) - 8usize];
    ["Offset of field: sfud_flash_chip::type_id"]
        [::core::mem::offset_of!(sfud_flash_chip, type_id) - 9usize];
    ["Offset of field: sfud_flash_chip::capacity_id"]
        [::core::mem::offset_of!(sfud_flash_chip, capacity_id) - 10usize];
    ["Offset of field: sfud_flash_chip::capacity"]
        [::core::mem::offset_of!(sfud_flash_chip, capacity) - 12usize];
    ["Offset of field: sfud_flash_chip::write_mode"]
        [::core::mem::offset_of!(sfud_flash_chip, write_mode) - 16usize];
    ["Offset of field: sfud_flash_chip::erase_gran"]
        [::core::mem::offset_of!(sfud_flash_chip, erase_gran) - 20usize];
    ["Offset of field: sfud_flash_chip::erase_gran_cmd"]
        [::core::mem::offset_of!(sfud_flash_chip, erase_gran_cmd) - 24usize];
};
impl Default for sfud_flash_chip {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type __int8_t = ::core::ffi::c_schar;
pub type __uint8_t = ::core::ffi::c_uchar;
pub type __int16_t = ::core::ffi::c_short;
pub type __uint16_t = ::core::ffi::c_ushort;
pub type __int32_t = ::core::ffi::c_int;
pub type __uint32_t = ::core::ffi::c_uint;
pub type __int64_t = ::core::ffi::c_long;
pub type __uint64_t = ::core::ffi::c_ulong;
pub type __int_least8_t = ::core::ffi::c_schar;
pub type __uint_least8_t = ::core::ffi::c_uchar;
pub type __int_least16_t = ::core::ffi::c_short;
pub type __uint_least16_t = ::core::ffi::c_ushort;
pub type __int_least32_t = ::core::ffi::c_int;
pub type __uint_least32_t = ::core::ffi::c_uint;
pub type __int_least64_t = ::core::ffi::c_long;
pub type __uint_least64_t = ::core::ffi::c_ulong;
pub type __intmax_t = ::core::ffi::c_long;
pub type __uintmax_t = ::core::ffi::c_ulong;
pub type __intptr_t = ::core::ffi::c_long;
pub type __uintptr_t = ::core::ffi::c_ulong;
pub type wchar_t = ::core::ffi::c_int;
#[repr(C)]
#[repr(align(16))]
#[derive(Debug, Default, Copy, Clone)]
pub struct max_align_t {
    pub __max_align_ll: ::core::ffi::c_longlong,
    pub __bindgen_padding_0: u64,
    pub __max_align_ld: u128,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of max_align_t"][::core::mem::size_of::<max_align_t>() - 32usize];
    ["Alignment of max_align_t"][::core::mem::align_of::<max_align_t>() - 16usize];
    ["Offset of field: max_align_t::__max_align_ll"]
        [::core::mem::offset_of!(max_align_t, __max_align_ll) - 0usize];
    ["Offset of field: max_align_t::__max_align_ld"]
        [::core::mem::offset_of!(max_align_t, __max_align_ld) - 16usize];
};
pub type __gnuc_va_list = __builtin_va_list;
pub type va_list = __gnuc_va_list;
pub type wint_t = ::core::ffi::c_uint;
pub type __blkcnt_t = ::core::ffi::c_long;
pub type __blksize_t = ::core::ffi::c_long;
pub type __fsblkcnt_t = __uint64_t;
pub type __fsfilcnt_t = __uint32_t;
pub type _off_t = ::core::ffi::c_long;
pub type __pid_t = ::core::ffi::c_int;
pub type __dev_t = ::core::ffi::c_short;
pub type __uid_t = ::core::ffi::c_ushort;
pub type __gid_t = ::core::ffi::c_ushort;
pub type __id_t = __uint32_t;
pub type __ino_t = ::core::ffi::c_ushort;
pub type __mode_t = __uint32_t;
pub type _off64_t = ::core::ffi::c_longlong;
pub type __off_t = _off_t;
pub type __loff_t = _off64_t;
pub type __key_t = ::core::ffi::c_long;
pub type _fpos_t = ::core::ffi::c_long;
pub type __size_t = ::core::ffi::c_ulong;
pub type _ssize_t = ::core::ffi::c_long;
pub type __ssize_t = _ssize_t;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct _mbstate_t {
    pub __count: ::core::ffi::c_int,
    pub __value: _mbstate_t__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union _mbstate_t__bindgen_ty_1 {
    pub __wch: wint_t,
    pub __wchb: [::core::ffi::c_uchar; 4usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of _mbstate_t__bindgen_ty_1"]
        [::core::mem::size_of::<_mbstate_t__bindgen_ty_1>() - 4usize];
    ["Alignment of _mbstate_t__bindgen_ty_1"]
        [::core::mem::align_of::<_mbstate_t__bindgen_ty_1>() - 4usize];
    ["Offset of field: _mbstate_t__bindgen_ty_1::__wch"]
        [::core::mem::offset_of!(_mbstate_t__bindgen_ty_1, __wch) - 0usize];
    ["Offset of field: _mbstate_t__bindgen_ty_1::__wchb"]
        [::core::mem::offset_of!(_mbstate_t__bindgen_ty_1, __wchb) - 0usize];
};
impl Default for _mbstate_t__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of _mbstate_t"][::core::mem::size_of::<_mbstate_t>() - 8usize];
    ["Alignment of _mbstate_t"][::core::mem::align_of::<_mbstate_t>() - 4usize];
    ["Offset of field: _mbstate_t::__count"][::core::mem::offset_of!(_mbstate_t, __count) - 0usize];
    ["Offset of field: _mbstate_t::__value"][::core::mem::offset_of!(_mbstate_t, __value) - 4usize];
};
impl Default for _mbstate_t {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type _iconv_t = *mut ::core::ffi::c_void;
pub type __clock_t = ::core::ffi::c_ulong;
pub type __time_t = ::core::ffi::c_long;
pub type __clockid_t = ::core::ffi::c_ulong;
pub type __daddr_t = ::core::ffi::c_long;
pub type __timer_t = ::core::ffi::c_ulong;
pub type __sa_family_t = __uint8_t;
pub type __socklen_t = __uint32_t;
pub type __nl_item = ::core::ffi::c_int;
pub type __nlink_t = ::core::ffi::c_ushort;
pub type __suseconds_t = ::core::ffi::c_long;
pub type __useconds_t = ::core::ffi::c_ulong;
pub type __va_list = __builtin_va_list;
pub type __ULong = ::core::ffi::c_uint;
pub type _LOCK_T = ::core::ffi::c_int;
pub type _LOCK_RECURSIVE_T = ::core::ffi::c_int;
pub type _flock_t = _LOCK_RECURSIVE_T;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __locale_t {
    _unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _Bigint {
    pub _next: *mut _Bigint,
    pub _k: ::core::ffi::c_int,
    pub _maxwds: ::core::ffi::c_int,
    pub _sign: ::core::ffi::c_int,
    pub _wds: ::core::ffi::c_int,
    pub _x: [__ULong; 1usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of _Bigint"][::core::mem::size_of::<_Bigint>() - 32usize];
    ["Alignment of _Bigint"][::core::mem::align_of::<_Bigint>() - 8usize];
    ["Offset of field: _Bigint::_next"][::core::mem::offset_of!(_Bigint, _next) - 0usize];
    ["Offset of field: _Bigint::_k"][::core::mem::offset_of!(_Bigint, _k) - 8usize];
    ["Offset of field: _Bigint::_maxwds"][::core::mem::offset_of!(_Bigint, _maxwds) - 12usize];
    ["Offset of field: _Bigint::_sign"][::core::mem::offset_of!(_Bigint, _sign) - 16usize];
    ["Offset of field: _Bigint::_wds"][::core::mem::offset_of!(_Bigint, _wds) - 20usize];
    ["Offset of field: _Bigint::_x"][::core::mem::offset_of!(_Bigint, _x) - 24usize];
};
impl Default for _Bigint {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct __tm {
    pub __tm_sec: ::core::ffi::c_int,
    pub __tm_min: ::core::ffi::c_int,
    pub __tm_hour: ::core::ffi::c_int,
    pub __tm_mday: ::core::ffi::c_int,
    pub __tm_mon: ::core::ffi::c_int,
    pub __tm_year: ::core::ffi::c_int,
    pub __tm_wday: ::core::ffi::c_int,
    pub __tm_yday: ::core::ffi::c_int,
    pub __tm_isdst: ::core::ffi::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of __tm"][::core::mem::size_of::<__tm>() - 36usize];
    ["Alignment of __tm"][::core::mem::align_of::<__tm>() - 4usize];
    ["Offset of field: __tm::__tm_sec"][::core::mem::offset_of!(__tm, __tm_sec) - 0usize];
    ["Offset of field: __tm::__tm_min"][::core::mem::offset_of!(__tm, __tm_min) - 4usize];
    ["Offset of field: __tm::__tm_hour"][::core::mem::offset_of!(__tm, __tm_hour) - 8usize];
    ["Offset of field: __tm::__tm_mday"][::core::mem::offset_of!(__tm, __tm_mday) - 12usize];
    ["Offset of field: __tm::__tm_mon"][::core::mem::offset_of!(__tm, __tm_mon) - 16usize];
    ["Offset of field: __tm::__tm_year"][::core::mem::offset_of!(__tm, __tm_year) - 20usize];
    ["Offset of field: __tm::__tm_wday"][::core::mem::offset_of!(__tm, __tm_wday) - 24usize];
    ["Offset of field: __tm::__tm_yday"][::core::mem::offset_of!(__tm, __tm_yday) - 28usize];
    ["Offset of field: __tm::__tm_isdst"][::core::mem::offset_of!(__tm, __tm_isdst) - 32usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _on_exit_args {
    pub _fnargs: [*mut ::core::ffi::c_void; 32usize],
    pub _dso_handle: [*mut ::core::ffi::c_void; 32usize],
    pub _fntypes: __ULong,
    pub _is_cxa: __ULong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of _on_exit_args"][::core::mem::size_of::<_on_exit_args>() - 520usize];
    ["Alignment of _on_exit_args"][::core::mem::align_of::<_on_exit_args>() - 8usize];
    ["Offset of field: _on_exit_args::_fnargs"]
        [::core::mem::offset_of!(_on_exit_args, _fnargs) - 0usize];
    ["Offset of field: _on_exit_args::_dso_handle"]
        [::core::mem::offset_of!(_on_exit_args, _dso_handle) - 256usize];
    ["Offset of field: _on_exit_args::_fntypes"]
        [::core::mem::offset_of!(_on_exit_args, _fntypes) - 512usize];
    ["Offset of field: _on_exit_args::_is_cxa"]
        [::core::mem::offset_of!(_on_exit_args, _is_cxa) - 516usize];
};
impl Default for _on_exit_args {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _atexit {
    pub _next: *mut _atexit,
    pub _ind: ::core::ffi::c_int,
    pub _fns: [::core::option::Option<unsafe extern "C" fn()>; 32usize],
    pub _on_exit_args: _on_exit_args,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of _atexit"][::core::mem::size_of::<_atexit>() - 792usize];
    ["Alignment of _atexit"][::core::mem::align_of::<_atexit>() - 8usize];
    ["Offset of field: _atexit::_next"][::core::mem::offset_of!(_atexit, _next) - 0usize];
    ["Offset of field: _atexit::_ind"][::core::mem::offset_of!(_atexit, _ind) - 8usize];
    ["Offset of field: _atexit::_fns"][::core::mem::offset_of!(_atexit, _fns) - 16usize];
    ["Offset of field: _atexit::_on_exit_args"]
        [::core::mem::offset_of!(_atexit, _on_exit_args) - 272usize];
};
impl Default for _atexit {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __sbuf {
    pub _base: *mut ::core::ffi::c_uchar,
    pub _size: ::core::ffi::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of __sbuf"][::core::mem::size_of::<__sbuf>() - 16usize];
    ["Alignment of __sbuf"][::core::mem::align_of::<__sbuf>() - 8usize];
    ["Offset of field: __sbuf::_base"][::core::mem::offset_of!(__sbuf, _base) - 0usize];
    ["Offset of field: __sbuf::_size"][::core::mem::offset_of!(__sbuf, _size) - 8usize];
};
impl Default for __sbuf {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct __sFILE {
    pub _p: *mut ::core::ffi::c_uchar,
    pub _r: ::core::ffi::c_int,
    pub _w: ::core::ffi::c_int,
    pub _flags: ::core::ffi::c_short,
    pub _file: ::core::ffi::c_short,
    pub _bf: __sbuf,
    pub _lbfsize: ::core::ffi::c_int,
    pub _cookie: *mut ::core::ffi::c_void,
    pub _read: ::core::option::Option<
        unsafe extern "C" fn(
            arg1: *mut _reent,
            arg2: *mut ::core::ffi::c_void,
            arg3: *mut ::core::ffi::c_char,
            arg4: ::core::ffi::c_int,
        ) -> ::core::ffi::c_int,
    >,
    pub _write: ::core::option::Option<
        unsafe extern "C" fn(
            arg1: *mut _reent,
            arg2: *mut ::core::ffi::c_void,
            arg3: *const ::core::ffi::c_char,
            arg4: ::core::ffi::c_int,
        ) -> ::core::ffi::c_int,
    >,
    pub _seek: ::core::option::Option<
        unsafe extern "C" fn(
            arg1: *mut _reent,
            arg2: *mut ::core::ffi::c_void,
            arg3: _fpos_t,
            arg4: ::core::ffi::c_int,
        ) -> _fpos_t,
    >,
    pub _close: ::core::option::Option<
        unsafe extern "C" fn(
            arg1: *mut _reent,
            arg2: *mut ::core::ffi::c_void,
        ) -> ::core::ffi::c_int,
    >,
    pub _ub: __sbuf,
    pub _up: *mut ::core::ffi::c_uchar,
    pub _ur: ::core::ffi::c_int,
    pub _ubuf: [::core::ffi::c_uchar; 3usize],
    pub _nbuf: [::core::ffi::c_uchar; 1usize],
    pub _lb: __sbuf,
    pub _blksize: ::core::ffi::c_int,
    pub _offset: _off_t,
    pub _data: *mut _reent,
    pub _lock: _flock_t,
    pub _mbstate: _mbstate_t,
    pub _flags2: ::core::ffi::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of __sFILE"][::core::mem::size_of::<__sFILE>() - 176usize];
    ["Alignment of __sFILE"][::core::mem::align_of::<__sFILE>() - 8usize];
    ["Offset of field: __sFILE::_p"][::core::mem::offset_of!(__sFILE, _p) - 0usize];
    ["Offset of field: __sFILE::_r"][::core::mem::offset_of!(__sFILE, _r) - 8usize];
    ["Offset of field: __sFILE::_w"][::core::mem::offset_of!(__sFILE, _w) - 12usize];
    ["Offset of field: __sFILE::_flags"][::core::mem::offset_of!(__sFILE, _flags) - 16usize];
    ["Offset of field: __sFILE::_file"][::core::mem::offset_of!(__sFILE, _file) - 18usize];
    ["Offset of field: __sFILE::_bf"][::core::mem::offset_of!(__sFILE, _bf) - 24usize];
    ["Offset of field: __sFILE::_lbfsize"][::core::mem::offset_of!(__sFILE, _lbfsize) - 40usize];
    ["Offset of field: __sFILE::_cookie"][::core::mem::offset_of!(__sFILE, _cookie) - 48usize];
    ["Offset of field: __sFILE::_read"][::core::mem::offset_of!(__sFILE, _read) - 56usize];
    ["Offset of field: __sFILE::_write"][::core::mem::offset_of!(__sFILE, _write) - 64usize];
    ["Offset of field: __sFILE::_seek"][::core::mem::offset_of!(__sFILE, _seek) - 72usize];
    ["Offset of field: __sFILE::_close"][::core::mem::offset_of!(__sFILE, _close) - 80usize];
    ["Offset of field: __sFILE::_ub"][::core::mem::offset_of!(__sFILE, _ub) - 88usize];
    ["Offset of field: __sFILE::_up"][::core::mem::offset_of!(__sFILE, _up) - 104usize];
    ["Offset of field: __sFILE::_ur"][::core::mem::offset_of!(__sFILE, _ur) - 112usize];
    ["Offset of field: __sFILE::_ubuf"][::core::mem::offset_of!(__sFILE, _ubuf) - 116usize];
    ["Offset of field: __sFILE::_nbuf"][::core::mem::offset_of!(__sFILE, _nbuf) - 119usize];
    ["Offset of field: __sFILE::_lb"][::core::mem::offset_of!(__sFILE, _lb) - 120usize];
    ["Offset of field: __sFILE::_blksize"][::core::mem::offset_of!(__sFILE, _blksize) - 136usize];
    ["Offset of field: __sFILE::_offset"][::core::mem::offset_of!(__sFILE, _offset) - 144usize];
    ["Offset of field: __sFILE::_data"][::core::mem::offset_of!(__sFILE, _data) - 152usize];
    ["Offset of field: __sFILE::_lock"][::core::mem::offset_of!(__sFILE, _lock) - 160usize];
    ["Offset of field: __sFILE::_mbstate"][::core::mem::offset_of!(__sFILE, _mbstate) - 164usize];
    ["Offset of field: __sFILE::_flags2"][::core::mem::offset_of!(__sFILE, _flags2) - 172usize];
};
impl Default for __sFILE {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type __FILE = __sFILE;
unsafe extern "C" {
    pub static mut __sf: [__FILE; 3usize];
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _glue {
    pub _next: *mut _glue,
    pub _niobs: ::core::ffi::c_int,
    pub _iobs: *mut __FILE,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of _glue"][::core::mem::size_of::<_glue>() - 24usize];
    ["Alignment of _glue"][::core::mem::align_of::<_glue>() - 8usize];
    ["Offset of field: _glue::_next"][::core::mem::offset_of!(_glue, _next) - 0usize];
    ["Offset of field: _glue::_niobs"][::core::mem::offset_of!(_glue, _niobs) - 8usize];
    ["Offset of field: _glue::_iobs"][::core::mem::offset_of!(_glue, _iobs) - 16usize];
};
impl Default for _glue {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
unsafe extern "C" {
    pub static mut __sglue: _glue;
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct _rand48 {
    pub _seed: [::core::ffi::c_ushort; 3usize],
    pub _mult: [::core::ffi::c_ushort; 3usize],
    pub _add: ::core::ffi::c_ushort,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of _rand48"][::core::mem::size_of::<_rand48>() - 14usize];
    ["Alignment of _rand48"][::core::mem::align_of::<_rand48>() - 2usize];
    ["Offset of field: _rand48::_seed"][::core::mem::offset_of!(_rand48, _seed) - 0usize];
    ["Offset of field: _rand48::_mult"][::core::mem::offset_of!(_rand48, _mult) - 6usize];
    ["Offset of field: _rand48::_add"][::core::mem::offset_of!(_rand48, _add) - 12usize];
};
#[repr(C)]
#[derive(Copy, Clone)]
pub struct _reent {
    pub _errno: ::core::ffi::c_int,
    pub _stdin: *mut __FILE,
    pub _stdout: *mut __FILE,
    pub _stderr: *mut __FILE,
    pub _inc: ::core::ffi::c_int,
    pub _emergency: [::core::ffi::c_char; 25usize],
    pub _locale: *mut __locale_t,
    pub __cleanup: ::core::option::Option<unsafe extern "C" fn(arg1: *mut _reent)>,
    pub _result: *mut _Bigint,
    pub _result_k: ::core::ffi::c_int,
    pub _p5s: *mut _Bigint,
    pub _freelist: *mut *mut _Bigint,
    pub _cvtlen: ::core::ffi::c_int,
    pub _cvtbuf: *mut ::core::ffi::c_char,
    pub _new: _reent__bindgen_ty_1,
    pub _sig_func: *mut ::core::option::Option<unsafe extern "C" fn(arg1: ::core::ffi::c_int)>,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union _reent__bindgen_ty_1 {
    pub _reent: _reent__bindgen_ty_1__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct _reent__bindgen_ty_1__bindgen_ty_1 {
    pub _strtok_last: *mut ::core::ffi::c_char,
    pub _asctime_buf: [::core::ffi::c_char; 26usize],
    pub _localtime_buf: __tm,
    pub _gamma_signgam: ::core::ffi::c_int,
    pub _rand_next: ::core::ffi::c_ulonglong,
    pub _r48: _rand48,
    pub _mblen_state: _mbstate_t,
    pub _mbtowc_state: _mbstate_t,
    pub _wctomb_state: _mbstate_t,
    pub _l64a_buf: [::core::ffi::c_char; 8usize],
    pub _signal_buf: [::core::ffi::c_char; 24usize],
    pub _getdate_err: ::core::ffi::c_int,
    pub _mbrlen_state: _mbstate_t,
    pub _mbrtowc_state: _mbstate_t,
    pub _mbsrtowcs_state: _mbstate_t,
    pub _wcrtomb_state: _mbstate_t,
    pub _wcsrtombs_state: _mbstate_t,
    pub _h_errno: ::core::ffi::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of _reent__bindgen_ty_1__bindgen_ty_1"]
        [::core::mem::size_of::<_reent__bindgen_ty_1__bindgen_ty_1>() - 208usize];
    ["Alignment of _reent__bindgen_ty_1__bindgen_ty_1"]
        [::core::mem::align_of::<_reent__bindgen_ty_1__bindgen_ty_1>() - 8usize];
    ["Offset of field: _reent__bindgen_ty_1__bindgen_ty_1::_strtok_last"]
        [::core::mem::offset_of!(_reent__bindgen_ty_1__bindgen_ty_1, _strtok_last) - 0usize];
    ["Offset of field: _reent__bindgen_ty_1__bindgen_ty_1::_asctime_buf"]
        [::core::mem::offset_of!(_reent__bindgen_ty_1__bindgen_ty_1, _asctime_buf) - 8usize];
    ["Offset of field: _reent__bindgen_ty_1__bindgen_ty_1::_localtime_buf"]
        [::core::mem::offset_of!(_reent__bindgen_ty_1__bindgen_ty_1, _localtime_buf) - 36usize];
    ["Offset of field: _reent__bindgen_ty_1__bindgen_ty_1::_gamma_signgam"]
        [::core::mem::offset_of!(_reent__bindgen_ty_1__bindgen_ty_1, _gamma_signgam) - 72usize];
    ["Offset of field: _reent__bindgen_ty_1__bindgen_ty_1::_rand_next"]
        [::core::mem::offset_of!(_reent__bindgen_ty_1__bindgen_ty_1, _rand_next) - 80usize];
    ["Offset of field: _reent__bindgen_ty_1__bindgen_ty_1::_r48"]
        [::core::mem::offset_of!(_reent__bindgen_ty_1__bindgen_ty_1, _r48) - 88usize];
    ["Offset of field: _reent__bindgen_ty_1__bindgen_ty_1::_mblen_state"]
        [::core::mem::offset_of!(_reent__bindgen_ty_1__bindgen_ty_1, _mblen_state) - 104usize];
    ["Offset of field: _reent__bindgen_ty_1__bindgen_ty_1::_mbtowc_state"]
        [::core::mem::offset_of!(_reent__bindgen_ty_1__bindgen_ty_1, _mbtowc_state) - 112usize];
    ["Offset of field: _reent__bindgen_ty_1__bindgen_ty_1::_wctomb_state"]
        [::core::mem::offset_of!(_reent__bindgen_ty_1__bindgen_ty_1, _wctomb_state) - 120usize];
    ["Offset of field: _reent__bindgen_ty_1__bindgen_ty_1::_l64a_buf"]
        [::core::mem::offset_of!(_reent__bindgen_ty_1__bindgen_ty_1, _l64a_buf) - 128usize];
    ["Offset of field: _reent__bindgen_ty_1__bindgen_ty_1::_signal_buf"]
        [::core::mem::offset_of!(_reent__bindgen_ty_1__bindgen_ty_1, _signal_buf) - 136usize];
    ["Offset of field: _reent__bindgen_ty_1__bindgen_ty_1::_getdate_err"]
        [::core::mem::offset_of!(_reent__bindgen_ty_1__bindgen_ty_1, _getdate_err) - 160usize];
    ["Offset of field: _reent__bindgen_ty_1__bindgen_ty_1::_mbrlen_state"]
        [::core::mem::offset_of!(_reent__bindgen_ty_1__bindgen_ty_1, _mbrlen_state) - 164usize];
    ["Offset of field: _reent__bindgen_ty_1__bindgen_ty_1::_mbrtowc_state"]
        [::core::mem::offset_of!(_reent__bindgen_ty_1__bindgen_ty_1, _mbrtowc_state) - 172usize];
    ["Offset of field: _reent__bindgen_ty_1__bindgen_ty_1::_mbsrtowcs_state"]
        [::core::mem::offset_of!(_reent__bindgen_ty_1__bindgen_ty_1, _mbsrtowcs_state) - 180usize];
    ["Offset of field: _reent__bindgen_ty_1__bindgen_ty_1::_wcrtomb_state"]
        [::core::mem::offset_of!(_reent__bindgen_ty_1__bindgen_ty_1, _wcrtomb_state) - 188usize];
    ["Offset of field: _reent__bindgen_ty_1__bindgen_ty_1::_wcsrtombs_state"]
        [::core::mem::offset_of!(_reent__bindgen_ty_1__bindgen_ty_1, _wcsrtombs_state) - 196usize];
    ["Offset of field: _reent__bindgen_ty_1__bindgen_ty_1::_h_errno"]
        [::core::mem::offset_of!(_reent__bindgen_ty_1__bindgen_ty_1, _h_errno) - 204usize];
};
impl Default for _reent__bindgen_ty_1__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of _reent__bindgen_ty_1"][::core::mem::size_of::<_reent__bindgen_ty_1>() - 208usize];
    ["Alignment of _reent__bindgen_ty_1"][::core::mem::align_of::<_reent__bindgen_ty_1>() - 8usize];
    ["Offset of field: _reent__bindgen_ty_1::_reent"]
        [::core::mem::offset_of!(_reent__bindgen_ty_1, _reent) - 0usize];
};
impl Default for _reent__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of _reent"][::core::mem::size_of::<_reent>() - 344usize];
    ["Alignment of _reent"][::core::mem::align_of::<_reent>() - 8usize];
    ["Offset of field: _reent::_errno"][::core::mem::offset_of!(_reent, _errno) - 0usize];
    ["Offset of field: _reent::_stdin"][::core::mem::offset_of!(_reent, _stdin) - 8usize];
    ["Offset of field: _reent::_stdout"][::core::mem::offset_of!(_reent, _stdout) - 16usize];
    ["Offset of field: _reent::_stderr"][::core::mem::offset_of!(_reent, _stderr) - 24usize];
    ["Offset of field: _reent::_inc"][::core::mem::offset_of!(_reent, _inc) - 32usize];
    ["Offset of field: _reent::_emergency"][::core::mem::offset_of!(_reent, _emergency) - 36usize];
    ["Offset of field: _reent::_locale"][::core::mem::offset_of!(_reent, _locale) - 64usize];
    ["Offset of field: _reent::__cleanup"][::core::mem::offset_of!(_reent, __cleanup) - 72usize];
    ["Offset of field: _reent::_result"][::core::mem::offset_of!(_reent, _result) - 80usize];
    ["Offset of field: _reent::_result_k"][::core::mem::offset_of!(_reent, _result_k) - 88usize];
    ["Offset of field: _reent::_p5s"][::core::mem::offset_of!(_reent, _p5s) - 96usize];
    ["Offset of field: _reent::_freelist"][::core::mem::offset_of!(_reent, _freelist) - 104usize];
    ["Offset of field: _reent::_cvtlen"][::core::mem::offset_of!(_reent, _cvtlen) - 112usize];
    ["Offset of field: _reent::_cvtbuf"][::core::mem::offset_of!(_reent, _cvtbuf) - 120usize];
    ["Offset of field: _reent::_new"][::core::mem::offset_of!(_reent, _new) - 128usize];
    ["Offset of field: _reent::_sig_func"][::core::mem::offset_of!(_reent, _sig_func) - 336usize];
};
impl Default for _reent {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
unsafe extern "C" {
    pub static mut _impure_ptr: *mut _reent;
}
unsafe extern "C" {
    pub static mut _impure_data: _reent;
}
unsafe extern "C" {
    pub static mut __atexit: *mut _atexit;
}
unsafe extern "C" {
    pub static mut __atexit0: _atexit;
}
unsafe extern "C" {
    pub static mut __stdio_exit_handler: ::core::option::Option<unsafe extern "C" fn()>;
}
unsafe extern "C" {
    pub fn _reclaim_reent(arg1: *mut _reent);
}
unsafe extern "C" {
    pub fn _fwalk_sglue(
        arg1: *mut _reent,
        arg2: ::core::option::Option<
            unsafe extern "C" fn(arg1: *mut _reent, arg2: *mut __FILE) -> ::core::ffi::c_int,
        >,
        arg3: *mut _glue,
    ) -> ::core::ffi::c_int;
}
pub type FILE = __FILE;
pub type fpos_t = _fpos_t;
pub type off_t = __off_t;
unsafe extern "C" {
    pub fn ctermid(arg1: *mut ::core::ffi::c_char) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn tmpfile() -> *mut FILE;
}
unsafe extern "C" {
    pub fn tmpnam(arg1: *mut ::core::ffi::c_char) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn tempnam(
        arg1: *const ::core::ffi::c_char,
        arg2: *const ::core::ffi::c_char,
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn fclose(arg1: *mut FILE) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn fflush(arg1: *mut FILE) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn freopen(
        arg1: *const ::core::ffi::c_char,
        arg2: *const ::core::ffi::c_char,
        arg3: *mut FILE,
    ) -> *mut FILE;
}
unsafe extern "C" {
    pub fn setbuf(arg1: *mut FILE, arg2: *mut ::core::ffi::c_char);
}
unsafe extern "C" {
    pub fn setvbuf(
        arg1: *mut FILE,
        arg2: *mut ::core::ffi::c_char,
        arg3: ::core::ffi::c_int,
        arg4: usize,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn fprintf(arg1: *mut FILE, arg2: *const ::core::ffi::c_char, ...) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn fscanf(arg1: *mut FILE, arg2: *const ::core::ffi::c_char, ...) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn printf(arg1: *const ::core::ffi::c_char, ...) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn scanf(arg1: *const ::core::ffi::c_char, ...) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn sscanf(
        arg1: *const ::core::ffi::c_char,
        arg2: *const ::core::ffi::c_char,
        ...
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn vfprintf(
        arg1: *mut FILE,
        arg2: *const ::core::ffi::c_char,
        arg3: *mut __va_list_tag,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn vprintf(
        arg1: *const ::core::ffi::c_char,
        arg2: *mut __va_list_tag,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn vsprintf(
        arg1: *mut ::core::ffi::c_char,
        arg2: *const ::core::ffi::c_char,
        arg3: *mut __va_list_tag,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn fgetc(arg1: *mut FILE) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn fgets(
        arg1: *mut ::core::ffi::c_char,
        arg2: ::core::ffi::c_int,
        arg3: *mut FILE,
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn fputc(arg1: ::core::ffi::c_int, arg2: *mut FILE) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn fputs(arg1: *const ::core::ffi::c_char, arg2: *mut FILE) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn getc(arg1: *mut FILE) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn getchar() -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn gets(arg1: *mut ::core::ffi::c_char) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn putc(arg1: ::core::ffi::c_int, arg2: *mut FILE) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn putchar(arg1: ::core::ffi::c_int) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn puts(arg1: *const ::core::ffi::c_char) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn ungetc(arg1: ::core::ffi::c_int, arg2: *mut FILE) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn fread(
        arg1: *mut ::core::ffi::c_void,
        _size: ::core::ffi::c_ulong,
        _n: ::core::ffi::c_ulong,
        arg2: *mut FILE,
    ) -> ::core::ffi::c_ulong;
}
unsafe extern "C" {
    pub fn fwrite(
        arg1: *const ::core::ffi::c_void,
        _size: ::core::ffi::c_ulong,
        _n: ::core::ffi::c_ulong,
        arg2: *mut FILE,
    ) -> ::core::ffi::c_ulong;
}
unsafe extern "C" {
    pub fn fgetpos(arg1: *mut FILE, arg2: *mut fpos_t) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn fseek(
        arg1: *mut FILE,
        arg2: ::core::ffi::c_long,
        arg3: ::core::ffi::c_int,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn fsetpos(arg1: *mut FILE, arg2: *const fpos_t) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn ftell(arg1: *mut FILE) -> ::core::ffi::c_long;
}
unsafe extern "C" {
    pub fn rewind(arg1: *mut FILE);
}
unsafe extern "C" {
    pub fn clearerr(arg1: *mut FILE);
}
unsafe extern "C" {
    pub fn feof(arg1: *mut FILE) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn ferror(arg1: *mut FILE) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn perror(arg1: *const ::core::ffi::c_char);
}
unsafe extern "C" {
    pub fn fopen(_name: *const ::core::ffi::c_char, _type: *const ::core::ffi::c_char)
    -> *mut FILE;
}
unsafe extern "C" {
    pub fn sprintf(
        arg1: *mut ::core::ffi::c_char,
        arg2: *const ::core::ffi::c_char,
        ...
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn remove(arg1: *const ::core::ffi::c_char) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn rename(
        arg1: *const ::core::ffi::c_char,
        arg2: *const ::core::ffi::c_char,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn fseeko(arg1: *mut FILE, arg2: off_t, arg3: ::core::ffi::c_int) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn ftello(arg1: *mut FILE) -> off_t;
}
unsafe extern "C" {
    pub fn snprintf(
        arg1: *mut ::core::ffi::c_char,
        arg2: ::core::ffi::c_ulong,
        arg3: *const ::core::ffi::c_char,
        ...
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn vsnprintf(
        arg1: *mut ::core::ffi::c_char,
        arg2: ::core::ffi::c_ulong,
        arg3: *const ::core::ffi::c_char,
        arg4: *mut __va_list_tag,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn vfscanf(
        arg1: *mut FILE,
        arg2: *const ::core::ffi::c_char,
        arg3: *mut __va_list_tag,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn vscanf(arg1: *const ::core::ffi::c_char, arg2: *mut __va_list_tag)
    -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn vsscanf(
        arg1: *const ::core::ffi::c_char,
        arg2: *const ::core::ffi::c_char,
        arg3: *mut __va_list_tag,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn asiprintf(
        arg1: *mut *mut ::core::ffi::c_char,
        arg2: *const ::core::ffi::c_char,
        ...
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn asniprintf(
        arg1: *mut ::core::ffi::c_char,
        arg2: *mut usize,
        arg3: *const ::core::ffi::c_char,
        ...
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn asnprintf(
        arg1: *mut ::core::ffi::c_char,
        arg2: *mut usize,
        arg3: *const ::core::ffi::c_char,
        ...
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn diprintf(
        arg1: ::core::ffi::c_int,
        arg2: *const ::core::ffi::c_char,
        ...
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn fiprintf(arg1: *mut FILE, arg2: *const ::core::ffi::c_char, ...) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn fiscanf(arg1: *mut FILE, arg2: *const ::core::ffi::c_char, ...) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn iprintf(arg1: *const ::core::ffi::c_char, ...) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn iscanf(arg1: *const ::core::ffi::c_char, ...) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn siprintf(
        arg1: *mut ::core::ffi::c_char,
        arg2: *const ::core::ffi::c_char,
        ...
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn siscanf(
        arg1: *const ::core::ffi::c_char,
        arg2: *const ::core::ffi::c_char,
        ...
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn sniprintf(
        arg1: *mut ::core::ffi::c_char,
        arg2: usize,
        arg3: *const ::core::ffi::c_char,
        ...
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn vasiprintf(
        arg1: *mut *mut ::core::ffi::c_char,
        arg2: *const ::core::ffi::c_char,
        arg3: *mut __va_list_tag,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn vasniprintf(
        arg1: *mut ::core::ffi::c_char,
        arg2: *mut usize,
        arg3: *const ::core::ffi::c_char,
        arg4: *mut __va_list_tag,
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn vasnprintf(
        arg1: *mut ::core::ffi::c_char,
        arg2: *mut usize,
        arg3: *const ::core::ffi::c_char,
        arg4: *mut __va_list_tag,
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn vdiprintf(
        arg1: ::core::ffi::c_int,
        arg2: *const ::core::ffi::c_char,
        arg3: *mut __va_list_tag,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn vfiprintf(
        arg1: *mut FILE,
        arg2: *const ::core::ffi::c_char,
        arg3: *mut __va_list_tag,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn vfiscanf(
        arg1: *mut FILE,
        arg2: *const ::core::ffi::c_char,
        arg3: *mut __va_list_tag,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn viprintf(
        arg1: *const ::core::ffi::c_char,
        arg2: *mut __va_list_tag,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn viscanf(
        arg1: *const ::core::ffi::c_char,
        arg2: *mut __va_list_tag,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn vsiprintf(
        arg1: *mut ::core::ffi::c_char,
        arg2: *const ::core::ffi::c_char,
        arg3: *mut __va_list_tag,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn vsiscanf(
        arg1: *const ::core::ffi::c_char,
        arg2: *const ::core::ffi::c_char,
        arg3: *mut __va_list_tag,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn vsniprintf(
        arg1: *mut ::core::ffi::c_char,
        arg2: usize,
        arg3: *const ::core::ffi::c_char,
        arg4: *mut __va_list_tag,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn fdopen(arg1: ::core::ffi::c_int, arg2: *const ::core::ffi::c_char) -> *mut FILE;
}
unsafe extern "C" {
    pub fn fileno(arg1: *mut FILE) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn pclose(arg1: *mut FILE) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn popen(arg1: *const ::core::ffi::c_char, arg2: *const ::core::ffi::c_char) -> *mut FILE;
}
unsafe extern "C" {
    pub fn setbuffer(arg1: *mut FILE, arg2: *mut ::core::ffi::c_char, arg3: ::core::ffi::c_int);
}
unsafe extern "C" {
    pub fn setlinebuf(arg1: *mut FILE) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn getw(arg1: *mut FILE) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn putw(arg1: ::core::ffi::c_int, arg2: *mut FILE) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn getc_unlocked(arg1: *mut FILE) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn getchar_unlocked() -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn flockfile(arg1: *mut FILE);
}
unsafe extern "C" {
    pub fn ftrylockfile(arg1: *mut FILE) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn funlockfile(arg1: *mut FILE);
}
unsafe extern "C" {
    pub fn putc_unlocked(arg1: ::core::ffi::c_int, arg2: *mut FILE) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn putchar_unlocked(arg1: ::core::ffi::c_int) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn dprintf(
        arg1: ::core::ffi::c_int,
        arg2: *const ::core::ffi::c_char,
        ...
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn fmemopen(
        arg1: *mut ::core::ffi::c_void,
        arg2: usize,
        arg3: *const ::core::ffi::c_char,
    ) -> *mut FILE;
}
unsafe extern "C" {
    pub fn open_memstream(arg1: *mut *mut ::core::ffi::c_char, arg2: *mut usize) -> *mut FILE;
}
unsafe extern "C" {
    pub fn vdprintf(
        arg1: ::core::ffi::c_int,
        arg2: *const ::core::ffi::c_char,
        arg3: *mut __va_list_tag,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn renameat(
        arg1: ::core::ffi::c_int,
        arg2: *const ::core::ffi::c_char,
        arg3: ::core::ffi::c_int,
        arg4: *const ::core::ffi::c_char,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _asiprintf_r(
        arg1: *mut _reent,
        arg2: *mut *mut ::core::ffi::c_char,
        arg3: *const ::core::ffi::c_char,
        ...
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _asniprintf_r(
        arg1: *mut _reent,
        arg2: *mut ::core::ffi::c_char,
        arg3: *mut usize,
        arg4: *const ::core::ffi::c_char,
        ...
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn _asnprintf_r(
        arg1: *mut _reent,
        arg2: *mut ::core::ffi::c_char,
        arg3: *mut usize,
        arg4: *const ::core::ffi::c_char,
        ...
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn _asprintf_r(
        arg1: *mut _reent,
        arg2: *mut *mut ::core::ffi::c_char,
        arg3: *const ::core::ffi::c_char,
        ...
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _diprintf_r(
        arg1: *mut _reent,
        arg2: ::core::ffi::c_int,
        arg3: *const ::core::ffi::c_char,
        ...
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _dprintf_r(
        arg1: *mut _reent,
        arg2: ::core::ffi::c_int,
        arg3: *const ::core::ffi::c_char,
        ...
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _fclose_r(arg1: *mut _reent, arg2: *mut FILE) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _fcloseall_r(arg1: *mut _reent) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _fdopen_r(
        arg1: *mut _reent,
        arg2: ::core::ffi::c_int,
        arg3: *const ::core::ffi::c_char,
    ) -> *mut FILE;
}
unsafe extern "C" {
    pub fn _fflush_r(arg1: *mut _reent, arg2: *mut FILE) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _fgetc_r(arg1: *mut _reent, arg2: *mut FILE) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _fgetc_unlocked_r(arg1: *mut _reent, arg2: *mut FILE) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _fgets_r(
        arg1: *mut _reent,
        arg2: *mut ::core::ffi::c_char,
        arg3: ::core::ffi::c_int,
        arg4: *mut FILE,
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn _fgets_unlocked_r(
        arg1: *mut _reent,
        arg2: *mut ::core::ffi::c_char,
        arg3: ::core::ffi::c_int,
        arg4: *mut FILE,
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn _fgetpos_r(arg1: *mut _reent, arg2: *mut FILE, arg3: *mut fpos_t) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _fsetpos_r(
        arg1: *mut _reent,
        arg2: *mut FILE,
        arg3: *const fpos_t,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _fiprintf_r(
        arg1: *mut _reent,
        arg2: *mut FILE,
        arg3: *const ::core::ffi::c_char,
        ...
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _fiscanf_r(
        arg1: *mut _reent,
        arg2: *mut FILE,
        arg3: *const ::core::ffi::c_char,
        ...
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _fmemopen_r(
        arg1: *mut _reent,
        arg2: *mut ::core::ffi::c_void,
        arg3: usize,
        arg4: *const ::core::ffi::c_char,
    ) -> *mut FILE;
}
unsafe extern "C" {
    pub fn _fopen_r(
        arg1: *mut _reent,
        arg2: *const ::core::ffi::c_char,
        arg3: *const ::core::ffi::c_char,
    ) -> *mut FILE;
}
unsafe extern "C" {
    pub fn _freopen_r(
        arg1: *mut _reent,
        arg2: *const ::core::ffi::c_char,
        arg3: *const ::core::ffi::c_char,
        arg4: *mut FILE,
    ) -> *mut FILE;
}
unsafe extern "C" {
    pub fn _fprintf_r(
        arg1: *mut _reent,
        arg2: *mut FILE,
        arg3: *const ::core::ffi::c_char,
        ...
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _fpurge_r(arg1: *mut _reent, arg2: *mut FILE) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _fputc_r(
        arg1: *mut _reent,
        arg2: ::core::ffi::c_int,
        arg3: *mut FILE,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _fputc_unlocked_r(
        arg1: *mut _reent,
        arg2: ::core::ffi::c_int,
        arg3: *mut FILE,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _fputs_r(
        arg1: *mut _reent,
        arg2: *const ::core::ffi::c_char,
        arg3: *mut FILE,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _fputs_unlocked_r(
        arg1: *mut _reent,
        arg2: *const ::core::ffi::c_char,
        arg3: *mut FILE,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _fread_r(
        arg1: *mut _reent,
        arg2: *mut ::core::ffi::c_void,
        _size: usize,
        _n: usize,
        arg3: *mut FILE,
    ) -> usize;
}
unsafe extern "C" {
    pub fn _fread_unlocked_r(
        arg1: *mut _reent,
        arg2: *mut ::core::ffi::c_void,
        _size: usize,
        _n: usize,
        arg3: *mut FILE,
    ) -> usize;
}
unsafe extern "C" {
    pub fn _fscanf_r(
        arg1: *mut _reent,
        arg2: *mut FILE,
        arg3: *const ::core::ffi::c_char,
        ...
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _fseek_r(
        arg1: *mut _reent,
        arg2: *mut FILE,
        arg3: ::core::ffi::c_long,
        arg4: ::core::ffi::c_int,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _fseeko_r(
        arg1: *mut _reent,
        arg2: *mut FILE,
        arg3: _off_t,
        arg4: ::core::ffi::c_int,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _ftell_r(arg1: *mut _reent, arg2: *mut FILE) -> ::core::ffi::c_long;
}
unsafe extern "C" {
    pub fn _ftello_r(arg1: *mut _reent, arg2: *mut FILE) -> _off_t;
}
unsafe extern "C" {
    pub fn _rewind_r(arg1: *mut _reent, arg2: *mut FILE);
}
unsafe extern "C" {
    pub fn _fwrite_r(
        arg1: *mut _reent,
        arg2: *const ::core::ffi::c_void,
        _size: usize,
        _n: usize,
        arg3: *mut FILE,
    ) -> usize;
}
unsafe extern "C" {
    pub fn _fwrite_unlocked_r(
        arg1: *mut _reent,
        arg2: *const ::core::ffi::c_void,
        _size: usize,
        _n: usize,
        arg3: *mut FILE,
    ) -> usize;
}
unsafe extern "C" {
    pub fn _getc_r(arg1: *mut _reent, arg2: *mut FILE) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _getc_unlocked_r(arg1: *mut _reent, arg2: *mut FILE) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _getchar_r(arg1: *mut _reent) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _getchar_unlocked_r(arg1: *mut _reent) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _gets_r(arg1: *mut _reent, arg2: *mut ::core::ffi::c_char) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn _iprintf_r(
        arg1: *mut _reent,
        arg2: *const ::core::ffi::c_char,
        ...
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _iscanf_r(
        arg1: *mut _reent,
        arg2: *const ::core::ffi::c_char,
        ...
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _open_memstream_r(
        arg1: *mut _reent,
        arg2: *mut *mut ::core::ffi::c_char,
        arg3: *mut usize,
    ) -> *mut FILE;
}
unsafe extern "C" {
    pub fn _perror_r(arg1: *mut _reent, arg2: *const ::core::ffi::c_char);
}
unsafe extern "C" {
    pub fn _printf_r(
        arg1: *mut _reent,
        arg2: *const ::core::ffi::c_char,
        ...
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _putc_r(
        arg1: *mut _reent,
        arg2: ::core::ffi::c_int,
        arg3: *mut FILE,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _putc_unlocked_r(
        arg1: *mut _reent,
        arg2: ::core::ffi::c_int,
        arg3: *mut FILE,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _putchar_unlocked_r(arg1: *mut _reent, arg2: ::core::ffi::c_int) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _putchar_r(arg1: *mut _reent, arg2: ::core::ffi::c_int) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _puts_r(arg1: *mut _reent, arg2: *const ::core::ffi::c_char) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _remove_r(arg1: *mut _reent, arg2: *const ::core::ffi::c_char) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _rename_r(
        arg1: *mut _reent,
        _old: *const ::core::ffi::c_char,
        _new: *const ::core::ffi::c_char,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _scanf_r(arg1: *mut _reent, arg2: *const ::core::ffi::c_char, ...)
    -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _siprintf_r(
        arg1: *mut _reent,
        arg2: *mut ::core::ffi::c_char,
        arg3: *const ::core::ffi::c_char,
        ...
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _siscanf_r(
        arg1: *mut _reent,
        arg2: *const ::core::ffi::c_char,
        arg3: *const ::core::ffi::c_char,
        ...
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _sniprintf_r(
        arg1: *mut _reent,
        arg2: *mut ::core::ffi::c_char,
        arg3: usize,
        arg4: *const ::core::ffi::c_char,
        ...
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _snprintf_r(
        arg1: *mut _reent,
        arg2: *mut ::core::ffi::c_char,
        arg3: usize,
        arg4: *const ::core::ffi::c_char,
        ...
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _sprintf_r(
        arg1: *mut _reent,
        arg2: *mut ::core::ffi::c_char,
        arg3: *const ::core::ffi::c_char,
        ...
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _sscanf_r(
        arg1: *mut _reent,
        arg2: *const ::core::ffi::c_char,
        arg3: *const ::core::ffi::c_char,
        ...
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _tempnam_r(
        arg1: *mut _reent,
        arg2: *const ::core::ffi::c_char,
        arg3: *const ::core::ffi::c_char,
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn _tmpfile_r(arg1: *mut _reent) -> *mut FILE;
}
unsafe extern "C" {
    pub fn _tmpnam_r(arg1: *mut _reent, arg2: *mut ::core::ffi::c_char)
    -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn _ungetc_r(
        arg1: *mut _reent,
        arg2: ::core::ffi::c_int,
        arg3: *mut FILE,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _vasiprintf_r(
        arg1: *mut _reent,
        arg2: *mut *mut ::core::ffi::c_char,
        arg3: *const ::core::ffi::c_char,
        arg4: *mut __va_list_tag,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _vasniprintf_r(
        arg1: *mut _reent,
        arg2: *mut ::core::ffi::c_char,
        arg3: *mut usize,
        arg4: *const ::core::ffi::c_char,
        arg5: *mut __va_list_tag,
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn _vasnprintf_r(
        arg1: *mut _reent,
        arg2: *mut ::core::ffi::c_char,
        arg3: *mut usize,
        arg4: *const ::core::ffi::c_char,
        arg5: *mut __va_list_tag,
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn _vasprintf_r(
        arg1: *mut _reent,
        arg2: *mut *mut ::core::ffi::c_char,
        arg3: *const ::core::ffi::c_char,
        arg4: *mut __va_list_tag,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _vdiprintf_r(
        arg1: *mut _reent,
        arg2: ::core::ffi::c_int,
        arg3: *const ::core::ffi::c_char,
        arg4: *mut __va_list_tag,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _vdprintf_r(
        arg1: *mut _reent,
        arg2: ::core::ffi::c_int,
        arg3: *const ::core::ffi::c_char,
        arg4: *mut __va_list_tag,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _vfiprintf_r(
        arg1: *mut _reent,
        arg2: *mut FILE,
        arg3: *const ::core::ffi::c_char,
        arg4: *mut __va_list_tag,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _vfiscanf_r(
        arg1: *mut _reent,
        arg2: *mut FILE,
        arg3: *const ::core::ffi::c_char,
        arg4: *mut __va_list_tag,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _vfprintf_r(
        arg1: *mut _reent,
        arg2: *mut FILE,
        arg3: *const ::core::ffi::c_char,
        arg4: *mut __va_list_tag,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _vfscanf_r(
        arg1: *mut _reent,
        arg2: *mut FILE,
        arg3: *const ::core::ffi::c_char,
        arg4: *mut __va_list_tag,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _viprintf_r(
        arg1: *mut _reent,
        arg2: *const ::core::ffi::c_char,
        arg3: *mut __va_list_tag,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _viscanf_r(
        arg1: *mut _reent,
        arg2: *const ::core::ffi::c_char,
        arg3: *mut __va_list_tag,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _vprintf_r(
        arg1: *mut _reent,
        arg2: *const ::core::ffi::c_char,
        arg3: *mut __va_list_tag,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _vscanf_r(
        arg1: *mut _reent,
        arg2: *const ::core::ffi::c_char,
        arg3: *mut __va_list_tag,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _vsiprintf_r(
        arg1: *mut _reent,
        arg2: *mut ::core::ffi::c_char,
        arg3: *const ::core::ffi::c_char,
        arg4: *mut __va_list_tag,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _vsiscanf_r(
        arg1: *mut _reent,
        arg2: *const ::core::ffi::c_char,
        arg3: *const ::core::ffi::c_char,
        arg4: *mut __va_list_tag,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _vsniprintf_r(
        arg1: *mut _reent,
        arg2: *mut ::core::ffi::c_char,
        arg3: usize,
        arg4: *const ::core::ffi::c_char,
        arg5: *mut __va_list_tag,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _vsnprintf_r(
        arg1: *mut _reent,
        arg2: *mut ::core::ffi::c_char,
        arg3: usize,
        arg4: *const ::core::ffi::c_char,
        arg5: *mut __va_list_tag,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _vsprintf_r(
        arg1: *mut _reent,
        arg2: *mut ::core::ffi::c_char,
        arg3: *const ::core::ffi::c_char,
        arg4: *mut __va_list_tag,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _vsscanf_r(
        arg1: *mut _reent,
        arg2: *const ::core::ffi::c_char,
        arg3: *const ::core::ffi::c_char,
        arg4: *mut __va_list_tag,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn fpurge(arg1: *mut FILE) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn __getdelim(
        arg1: *mut *mut ::core::ffi::c_char,
        arg2: *mut usize,
        arg3: ::core::ffi::c_int,
        arg4: *mut FILE,
    ) -> isize;
}
unsafe extern "C" {
    pub fn __getline(
        arg1: *mut *mut ::core::ffi::c_char,
        arg2: *mut usize,
        arg3: *mut FILE,
    ) -> isize;
}
unsafe extern "C" {
    pub fn clearerr_unlocked(arg1: *mut FILE);
}
unsafe extern "C" {
    pub fn feof_unlocked(arg1: *mut FILE) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn ferror_unlocked(arg1: *mut FILE) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn fileno_unlocked(arg1: *mut FILE) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn fflush_unlocked(arg1: *mut FILE) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn fgetc_unlocked(arg1: *mut FILE) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn fputc_unlocked(arg1: ::core::ffi::c_int, arg2: *mut FILE) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn fread_unlocked(
        arg1: *mut ::core::ffi::c_void,
        _size: usize,
        _n: usize,
        arg2: *mut FILE,
    ) -> usize;
}
unsafe extern "C" {
    pub fn fwrite_unlocked(
        arg1: *const ::core::ffi::c_void,
        _size: usize,
        _n: usize,
        arg2: *mut FILE,
    ) -> usize;
}
unsafe extern "C" {
    pub fn __srget_r(arg1: *mut _reent, arg2: *mut FILE) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn __swbuf_r(
        arg1: *mut _reent,
        arg2: ::core::ffi::c_int,
        arg3: *mut FILE,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn funopen(
        __cookie: *const ::core::ffi::c_void,
        __readfn: ::core::option::Option<
            unsafe extern "C" fn(
                __cookie: *mut ::core::ffi::c_void,
                __buf: *mut ::core::ffi::c_char,
                __n: ::core::ffi::c_int,
            ) -> ::core::ffi::c_int,
        >,
        __writefn: ::core::option::Option<
            unsafe extern "C" fn(
                __cookie: *mut ::core::ffi::c_void,
                __buf: *const ::core::ffi::c_char,
                __n: ::core::ffi::c_int,
            ) -> ::core::ffi::c_int,
        >,
        __seekfn: ::core::option::Option<
            unsafe extern "C" fn(
                __cookie: *mut ::core::ffi::c_void,
                __off: fpos_t,
                __whence: ::core::ffi::c_int,
            ) -> fpos_t,
        >,
        __closefn: ::core::option::Option<
            unsafe extern "C" fn(__cookie: *mut ::core::ffi::c_void) -> ::core::ffi::c_int,
        >,
    ) -> *mut FILE;
}
unsafe extern "C" {
    pub fn _funopen_r(
        arg1: *mut _reent,
        __cookie: *const ::core::ffi::c_void,
        __readfn: ::core::option::Option<
            unsafe extern "C" fn(
                __cookie: *mut ::core::ffi::c_void,
                __buf: *mut ::core::ffi::c_char,
                __n: ::core::ffi::c_int,
            ) -> ::core::ffi::c_int,
        >,
        __writefn: ::core::option::Option<
            unsafe extern "C" fn(
                __cookie: *mut ::core::ffi::c_void,
                __buf: *const ::core::ffi::c_char,
                __n: ::core::ffi::c_int,
            ) -> ::core::ffi::c_int,
        >,
        __seekfn: ::core::option::Option<
            unsafe extern "C" fn(
                __cookie: *mut ::core::ffi::c_void,
                __off: fpos_t,
                __whence: ::core::ffi::c_int,
            ) -> fpos_t,
        >,
        __closefn: ::core::option::Option<
            unsafe extern "C" fn(__cookie: *mut ::core::ffi::c_void) -> ::core::ffi::c_int,
        >,
    ) -> *mut FILE;
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct div_t {
    pub quot: ::core::ffi::c_int,
    pub rem: ::core::ffi::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of div_t"][::core::mem::size_of::<div_t>() - 8usize];
    ["Alignment of div_t"][::core::mem::align_of::<div_t>() - 4usize];
    ["Offset of field: div_t::quot"][::core::mem::offset_of!(div_t, quot) - 0usize];
    ["Offset of field: div_t::rem"][::core::mem::offset_of!(div_t, rem) - 4usize];
};
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct ldiv_t {
    pub quot: ::core::ffi::c_long,
    pub rem: ::core::ffi::c_long,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ldiv_t"][::core::mem::size_of::<ldiv_t>() - 16usize];
    ["Alignment of ldiv_t"][::core::mem::align_of::<ldiv_t>() - 8usize];
    ["Offset of field: ldiv_t::quot"][::core::mem::offset_of!(ldiv_t, quot) - 0usize];
    ["Offset of field: ldiv_t::rem"][::core::mem::offset_of!(ldiv_t, rem) - 8usize];
};
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct lldiv_t {
    pub quot: ::core::ffi::c_longlong,
    pub rem: ::core::ffi::c_longlong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of lldiv_t"][::core::mem::size_of::<lldiv_t>() - 16usize];
    ["Alignment of lldiv_t"][::core::mem::align_of::<lldiv_t>() - 8usize];
    ["Offset of field: lldiv_t::quot"][::core::mem::offset_of!(lldiv_t, quot) - 0usize];
    ["Offset of field: lldiv_t::rem"][::core::mem::offset_of!(lldiv_t, rem) - 8usize];
};
pub type __compar_fn_t = ::core::option::Option<
    unsafe extern "C" fn(
        arg1: *const ::core::ffi::c_void,
        arg2: *const ::core::ffi::c_void,
    ) -> ::core::ffi::c_int,
>;
unsafe extern "C" {
    pub fn __locale_mb_cur_max() -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn abort() -> !;
}
unsafe extern "C" {
    pub fn abs(arg1: ::core::ffi::c_int) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn arc4random() -> __uint32_t;
}
unsafe extern "C" {
    pub fn arc4random_uniform(arg1: __uint32_t) -> __uint32_t;
}
unsafe extern "C" {
    pub fn arc4random_buf(arg1: *mut ::core::ffi::c_void, arg2: usize);
}
unsafe extern "C" {
    pub fn atexit(__func: ::core::option::Option<unsafe extern "C" fn()>) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn atof(__nptr: *const ::core::ffi::c_char) -> f64;
}
unsafe extern "C" {
    pub fn atoff(__nptr: *const ::core::ffi::c_char) -> f32;
}
unsafe extern "C" {
    pub fn atoi(__nptr: *const ::core::ffi::c_char) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _atoi_r(arg1: *mut _reent, __nptr: *const ::core::ffi::c_char) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn atol(__nptr: *const ::core::ffi::c_char) -> ::core::ffi::c_long;
}
unsafe extern "C" {
    pub fn _atol_r(arg1: *mut _reent, __nptr: *const ::core::ffi::c_char) -> ::core::ffi::c_long;
}
unsafe extern "C" {
    pub fn bsearch(
        __key: *const ::core::ffi::c_void,
        __base: *const ::core::ffi::c_void,
        __nmemb: usize,
        __size: usize,
        _compar: __compar_fn_t,
    ) -> *mut ::core::ffi::c_void;
}
unsafe extern "C" {
    pub fn calloc(
        arg1: ::core::ffi::c_ulong,
        arg2: ::core::ffi::c_ulong,
    ) -> *mut ::core::ffi::c_void;
}
unsafe extern "C" {
    pub fn div(__numer: ::core::ffi::c_int, __denom: ::core::ffi::c_int) -> div_t;
}
unsafe extern "C" {
    pub fn exit(__status: ::core::ffi::c_int) -> !;
}
unsafe extern "C" {
    pub fn free(arg1: *mut ::core::ffi::c_void);
}
unsafe extern "C" {
    pub fn getenv(__string: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn _getenv_r(
        arg1: *mut _reent,
        __string: *const ::core::ffi::c_char,
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn _findenv(
        arg1: *const ::core::ffi::c_char,
        arg2: *mut ::core::ffi::c_int,
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn _findenv_r(
        arg1: *mut _reent,
        arg2: *const ::core::ffi::c_char,
        arg3: *mut ::core::ffi::c_int,
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub static mut suboptarg: *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn getsubopt(
        arg1: *mut *mut ::core::ffi::c_char,
        arg2: *const *mut ::core::ffi::c_char,
        arg3: *mut *mut ::core::ffi::c_char,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn labs(arg1: ::core::ffi::c_long) -> ::core::ffi::c_long;
}
unsafe extern "C" {
    pub fn ldiv(__numer: ::core::ffi::c_long, __denom: ::core::ffi::c_long) -> ldiv_t;
}
unsafe extern "C" {
    pub fn malloc(arg1: ::core::ffi::c_ulong) -> *mut ::core::ffi::c_void;
}
unsafe extern "C" {
    pub fn mblen(arg1: *const ::core::ffi::c_char, arg2: usize) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _mblen_r(
        arg1: *mut _reent,
        arg2: *const ::core::ffi::c_char,
        arg3: usize,
        arg4: *mut _mbstate_t,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn mbtowc(
        arg1: *mut wchar_t,
        arg2: *const ::core::ffi::c_char,
        arg3: usize,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _mbtowc_r(
        arg1: *mut _reent,
        arg2: *mut wchar_t,
        arg3: *const ::core::ffi::c_char,
        arg4: usize,
        arg5: *mut _mbstate_t,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn wctomb(arg1: *mut ::core::ffi::c_char, arg2: wchar_t) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _wctomb_r(
        arg1: *mut _reent,
        arg2: *mut ::core::ffi::c_char,
        arg3: wchar_t,
        arg4: *mut _mbstate_t,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn mbstowcs(arg1: *mut wchar_t, arg2: *const ::core::ffi::c_char, arg3: usize) -> usize;
}
unsafe extern "C" {
    pub fn _mbstowcs_r(
        arg1: *mut _reent,
        arg2: *mut wchar_t,
        arg3: *const ::core::ffi::c_char,
        arg4: usize,
        arg5: *mut _mbstate_t,
    ) -> usize;
}
unsafe extern "C" {
    pub fn wcstombs(arg1: *mut ::core::ffi::c_char, arg2: *const wchar_t, arg3: usize) -> usize;
}
unsafe extern "C" {
    pub fn _wcstombs_r(
        arg1: *mut _reent,
        arg2: *mut ::core::ffi::c_char,
        arg3: *const wchar_t,
        arg4: usize,
        arg5: *mut _mbstate_t,
    ) -> usize;
}
unsafe extern "C" {
    pub fn mkdtemp(arg1: *mut ::core::ffi::c_char) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn mkstemp(arg1: *mut ::core::ffi::c_char) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn mkstemps(arg1: *mut ::core::ffi::c_char, arg2: ::core::ffi::c_int)
    -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn mktemp(arg1: *mut ::core::ffi::c_char) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn _mkdtemp_r(
        arg1: *mut _reent,
        arg2: *mut ::core::ffi::c_char,
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn _mkostemp_r(
        arg1: *mut _reent,
        arg2: *mut ::core::ffi::c_char,
        arg3: ::core::ffi::c_int,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _mkostemps_r(
        arg1: *mut _reent,
        arg2: *mut ::core::ffi::c_char,
        arg3: ::core::ffi::c_int,
        arg4: ::core::ffi::c_int,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _mkstemp_r(arg1: *mut _reent, arg2: *mut ::core::ffi::c_char) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _mkstemps_r(
        arg1: *mut _reent,
        arg2: *mut ::core::ffi::c_char,
        arg3: ::core::ffi::c_int,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _mktemp_r(arg1: *mut _reent, arg2: *mut ::core::ffi::c_char)
    -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn qsort(
        __base: *mut ::core::ffi::c_void,
        __nmemb: usize,
        __size: usize,
        _compar: __compar_fn_t,
    );
}
unsafe extern "C" {
    pub fn rand() -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn realloc(
        arg1: *mut ::core::ffi::c_void,
        arg2: ::core::ffi::c_ulong,
    ) -> *mut ::core::ffi::c_void;
}
unsafe extern "C" {
    pub fn reallocarray(
        arg1: *mut ::core::ffi::c_void,
        arg2: usize,
        arg3: usize,
    ) -> *mut ::core::ffi::c_void;
}
unsafe extern "C" {
    pub fn reallocf(arg1: *mut ::core::ffi::c_void, arg2: usize) -> *mut ::core::ffi::c_void;
}
unsafe extern "C" {
    pub fn realpath(
        path: *const ::core::ffi::c_char,
        resolved_path: *mut ::core::ffi::c_char,
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn rpmatch(response: *const ::core::ffi::c_char) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn srand(__seed: ::core::ffi::c_uint);
}
unsafe extern "C" {
    pub fn strtod(__n: *const ::core::ffi::c_char, __end_PTR: *mut *mut ::core::ffi::c_char)
    -> f64;
}
unsafe extern "C" {
    pub fn _strtod_r(
        arg1: *mut _reent,
        __n: *const ::core::ffi::c_char,
        __end_PTR: *mut *mut ::core::ffi::c_char,
    ) -> f64;
}
unsafe extern "C" {
    pub fn strtof(__n: *const ::core::ffi::c_char, __end_PTR: *mut *mut ::core::ffi::c_char)
    -> f32;
}
unsafe extern "C" {
    pub fn strtol(
        __n: *const ::core::ffi::c_char,
        __end_PTR: *mut *mut ::core::ffi::c_char,
        __base: ::core::ffi::c_int,
    ) -> ::core::ffi::c_long;
}
unsafe extern "C" {
    pub fn _strtol_r(
        arg1: *mut _reent,
        __n: *const ::core::ffi::c_char,
        __end_PTR: *mut *mut ::core::ffi::c_char,
        __base: ::core::ffi::c_int,
    ) -> ::core::ffi::c_long;
}
unsafe extern "C" {
    pub fn strtoul(
        __n: *const ::core::ffi::c_char,
        __end_PTR: *mut *mut ::core::ffi::c_char,
        __base: ::core::ffi::c_int,
    ) -> ::core::ffi::c_ulong;
}
unsafe extern "C" {
    pub fn _strtoul_r(
        arg1: *mut _reent,
        __n: *const ::core::ffi::c_char,
        __end_PTR: *mut *mut ::core::ffi::c_char,
        __base: ::core::ffi::c_int,
    ) -> ::core::ffi::c_ulong;
}
unsafe extern "C" {
    pub fn system(__string: *const ::core::ffi::c_char) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn a64l(__input: *const ::core::ffi::c_char) -> ::core::ffi::c_long;
}
unsafe extern "C" {
    pub fn l64a(__input: ::core::ffi::c_long) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn _l64a_r(arg1: *mut _reent, __input: ::core::ffi::c_long) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn on_exit(
        __func: ::core::option::Option<
            unsafe extern "C" fn(arg1: ::core::ffi::c_int, arg2: *mut ::core::ffi::c_void),
        >,
        __arg: *mut ::core::ffi::c_void,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _Exit(__status: ::core::ffi::c_int) -> !;
}
unsafe extern "C" {
    pub fn putenv(__string: *mut ::core::ffi::c_char) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _putenv_r(arg1: *mut _reent, __string: *mut ::core::ffi::c_char) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _reallocf_r(
        arg1: *mut _reent,
        arg2: *mut ::core::ffi::c_void,
        arg3: usize,
    ) -> *mut ::core::ffi::c_void;
}
unsafe extern "C" {
    pub fn setenv(
        __string: *const ::core::ffi::c_char,
        __value: *const ::core::ffi::c_char,
        __overwrite: ::core::ffi::c_int,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _setenv_r(
        arg1: *mut _reent,
        __string: *const ::core::ffi::c_char,
        __value: *const ::core::ffi::c_char,
        __overwrite: ::core::ffi::c_int,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn __itoa(
        arg1: ::core::ffi::c_int,
        arg2: *mut ::core::ffi::c_char,
        arg3: ::core::ffi::c_int,
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn __utoa(
        arg1: ::core::ffi::c_uint,
        arg2: *mut ::core::ffi::c_char,
        arg3: ::core::ffi::c_int,
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn itoa(
        arg1: ::core::ffi::c_int,
        arg2: *mut ::core::ffi::c_char,
        arg3: ::core::ffi::c_int,
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn utoa(
        arg1: ::core::ffi::c_uint,
        arg2: *mut ::core::ffi::c_char,
        arg3: ::core::ffi::c_int,
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn rand_r(__seed: *mut ::core::ffi::c_uint) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn drand48() -> f64;
}
unsafe extern "C" {
    pub fn _drand48_r(arg1: *mut _reent) -> f64;
}
unsafe extern "C" {
    pub fn erand48(arg1: *mut ::core::ffi::c_ushort) -> f64;
}
unsafe extern "C" {
    pub fn _erand48_r(arg1: *mut _reent, arg2: *mut ::core::ffi::c_ushort) -> f64;
}
unsafe extern "C" {
    pub fn jrand48(arg1: *mut ::core::ffi::c_ushort) -> ::core::ffi::c_long;
}
unsafe extern "C" {
    pub fn _jrand48_r(arg1: *mut _reent, arg2: *mut ::core::ffi::c_ushort) -> ::core::ffi::c_long;
}
unsafe extern "C" {
    pub fn lcong48(arg1: *mut ::core::ffi::c_ushort);
}
unsafe extern "C" {
    pub fn _lcong48_r(arg1: *mut _reent, arg2: *mut ::core::ffi::c_ushort);
}
unsafe extern "C" {
    pub fn lrand48() -> ::core::ffi::c_long;
}
unsafe extern "C" {
    pub fn _lrand48_r(arg1: *mut _reent) -> ::core::ffi::c_long;
}
unsafe extern "C" {
    pub fn mrand48() -> ::core::ffi::c_long;
}
unsafe extern "C" {
    pub fn _mrand48_r(arg1: *mut _reent) -> ::core::ffi::c_long;
}
unsafe extern "C" {
    pub fn nrand48(arg1: *mut ::core::ffi::c_ushort) -> ::core::ffi::c_long;
}
unsafe extern "C" {
    pub fn _nrand48_r(arg1: *mut _reent, arg2: *mut ::core::ffi::c_ushort) -> ::core::ffi::c_long;
}
unsafe extern "C" {
    pub fn seed48(arg1: *mut ::core::ffi::c_ushort) -> *mut ::core::ffi::c_ushort;
}
unsafe extern "C" {
    pub fn _seed48_r(
        arg1: *mut _reent,
        arg2: *mut ::core::ffi::c_ushort,
    ) -> *mut ::core::ffi::c_ushort;
}
unsafe extern "C" {
    pub fn srand48(arg1: ::core::ffi::c_long);
}
unsafe extern "C" {
    pub fn _srand48_r(arg1: *mut _reent, arg2: ::core::ffi::c_long);
}
unsafe extern "C" {
    pub fn initstate(
        arg1: ::core::ffi::c_uint,
        arg2: *mut ::core::ffi::c_char,
        arg3: usize,
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn random() -> ::core::ffi::c_long;
}
unsafe extern "C" {
    pub fn setstate(arg1: *mut ::core::ffi::c_char) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn srandom(arg1: ::core::ffi::c_uint);
}
unsafe extern "C" {
    pub fn atoll(__nptr: *const ::core::ffi::c_char) -> ::core::ffi::c_longlong;
}
unsafe extern "C" {
    pub fn _atoll_r(
        arg1: *mut _reent,
        __nptr: *const ::core::ffi::c_char,
    ) -> ::core::ffi::c_longlong;
}
unsafe extern "C" {
    pub fn llabs(arg1: ::core::ffi::c_longlong) -> ::core::ffi::c_longlong;
}
unsafe extern "C" {
    pub fn lldiv(__numer: ::core::ffi::c_longlong, __denom: ::core::ffi::c_longlong) -> lldiv_t;
}
unsafe extern "C" {
    pub fn strtoll(
        __n: *const ::core::ffi::c_char,
        __end_PTR: *mut *mut ::core::ffi::c_char,
        __base: ::core::ffi::c_int,
    ) -> ::core::ffi::c_longlong;
}
unsafe extern "C" {
    pub fn _strtoll_r(
        arg1: *mut _reent,
        __n: *const ::core::ffi::c_char,
        __end_PTR: *mut *mut ::core::ffi::c_char,
        __base: ::core::ffi::c_int,
    ) -> ::core::ffi::c_longlong;
}
unsafe extern "C" {
    pub fn strtoull(
        __n: *const ::core::ffi::c_char,
        __end_PTR: *mut *mut ::core::ffi::c_char,
        __base: ::core::ffi::c_int,
    ) -> ::core::ffi::c_ulonglong;
}
unsafe extern "C" {
    pub fn _strtoull_r(
        arg1: *mut _reent,
        __n: *const ::core::ffi::c_char,
        __end_PTR: *mut *mut ::core::ffi::c_char,
        __base: ::core::ffi::c_int,
    ) -> ::core::ffi::c_ulonglong;
}
unsafe extern "C" {
    pub fn cfree(arg1: *mut ::core::ffi::c_void);
}
unsafe extern "C" {
    pub fn unsetenv(__string: *const ::core::ffi::c_char) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _unsetenv_r(
        arg1: *mut _reent,
        __string: *const ::core::ffi::c_char,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn posix_memalign(
        arg1: *mut *mut ::core::ffi::c_void,
        arg2: usize,
        arg3: usize,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _dtoa_r(
        arg1: *mut _reent,
        arg2: f64,
        arg3: ::core::ffi::c_int,
        arg4: ::core::ffi::c_int,
        arg5: *mut ::core::ffi::c_int,
        arg6: *mut ::core::ffi::c_int,
        arg7: *mut *mut ::core::ffi::c_char,
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn _malloc_r(arg1: *mut _reent, arg2: usize) -> *mut ::core::ffi::c_void;
}
unsafe extern "C" {
    pub fn _calloc_r(arg1: *mut _reent, arg2: usize, arg3: usize) -> *mut ::core::ffi::c_void;
}
unsafe extern "C" {
    pub fn _free_r(arg1: *mut _reent, arg2: *mut ::core::ffi::c_void);
}
unsafe extern "C" {
    pub fn _realloc_r(
        arg1: *mut _reent,
        arg2: *mut ::core::ffi::c_void,
        arg3: usize,
    ) -> *mut ::core::ffi::c_void;
}
unsafe extern "C" {
    pub fn _mstats_r(arg1: *mut _reent, arg2: *mut ::core::ffi::c_char);
}
unsafe extern "C" {
    pub fn _system_r(arg1: *mut _reent, arg2: *const ::core::ffi::c_char) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn __eprintf(
        arg1: *const ::core::ffi::c_char,
        arg2: *const ::core::ffi::c_char,
        arg3: ::core::ffi::c_uint,
        arg4: *const ::core::ffi::c_char,
    );
}
unsafe extern "C" {
    #[link_name = "\u{1}__bsd_qsort_r"]
    pub fn qsort_r(
        __base: *mut ::core::ffi::c_void,
        __nmemb: usize,
        __size: usize,
        __thunk: *mut ::core::ffi::c_void,
        _compar: ::core::option::Option<
            unsafe extern "C" fn(
                arg1: *mut ::core::ffi::c_void,
                arg2: *const ::core::ffi::c_void,
                arg3: *const ::core::ffi::c_void,
            ) -> ::core::ffi::c_int,
        >,
    );
}
unsafe extern "C" {
    pub fn _strtold_r(
        arg1: *mut _reent,
        arg2: *const ::core::ffi::c_char,
        arg3: *mut *mut ::core::ffi::c_char,
    ) -> u128;
}
unsafe extern "C" {
    pub fn strtold(arg1: *const ::core::ffi::c_char, arg2: *mut *mut ::core::ffi::c_char) -> u128;
}
unsafe extern "C" {
    pub fn aligned_alloc(
        arg1: ::core::ffi::c_ulong,
        arg2: ::core::ffi::c_ulong,
    ) -> *mut ::core::ffi::c_void;
}
unsafe extern "C" {
    pub fn at_quick_exit(
        arg1: ::core::option::Option<unsafe extern "C" fn()>,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn quick_exit(arg1: ::core::ffi::c_int);
}
#[doc = "< busing"]
pub const SFUD_STATUS_REGISTER_BUSY: _bindgen_ty_1 = 1;
#[doc = "< write enable latch"]
pub const SFUD_STATUS_REGISTER_WEL: _bindgen_ty_1 = 2;
#[doc = "< status register protect"]
pub const SFUD_STATUS_REGISTER_SRP: _bindgen_ty_1 = 128;
#[doc = " status register bits"]
pub type _bindgen_ty_1 = ::core::ffi::c_uint;
#[doc = "< success"]
pub const sfud_err_SFUD_SUCCESS: sfud_err = 0;
#[doc = "< not found or not supported"]
pub const sfud_err_SFUD_ERR_NOT_FOUND: sfud_err = 1;
#[doc = "< write error"]
pub const sfud_err_SFUD_ERR_WRITE: sfud_err = 2;
#[doc = "< read error"]
pub const sfud_err_SFUD_ERR_READ: sfud_err = 3;
#[doc = "< timeout error"]
pub const sfud_err_SFUD_ERR_TIMEOUT: sfud_err = 4;
#[doc = "< address is out of flash bound"]
pub const sfud_err_SFUD_ERR_ADDR_OUT_OF_BOUND: sfud_err = 5;
#[doc = " error code"]
pub type sfud_err = ::core::ffi::c_uint;
pub type spi_write_read_func = ::core::option::Option<
    unsafe extern "C" fn(
        write_buf: *const u8,
        write_size: usize,
        read_buf: *mut u8,
        read_size: usize,
    ) -> sfud_err,
>;
#[doc = " the SFDP (Serial Flash Discoverable Parameters) parameter info which used on this library"]
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct sfud_sfdp {
    #[doc = "< available when read SFDP OK"]
    pub available: bool,
    #[doc = "< SFDP Major Revision"]
    pub major_rev: u8,
    #[doc = "< SFDP Minor Revision"]
    pub minor_rev: u8,
    #[doc = "< write granularity (bytes)"]
    pub write_gran: u16,
    #[doc = "< 4 kilobyte erase is supported throughout the device"]
    pub erase_4k: u8,
    #[doc = "< 4 Kilobyte erase command"]
    pub erase_4k_cmd: u8,
    #[doc = "< status register is supports non-volatile"]
    pub sr_is_non_vola: bool,
    #[doc = "< volatile status register write enable command"]
    pub vola_sr_we_cmd: u8,
    #[doc = "< supports 3-Byte addressing"]
    pub addr_3_byte: bool,
    #[doc = "< supports 4-Byte addressing"]
    pub addr_4_byte: bool,
    #[doc = "< flash capacity (bytes)"]
    pub capacity: u32,
    #[doc = "< supported eraser types table"]
    pub eraser: [sfud_sfdp__bindgen_ty_1; 4usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct sfud_sfdp__bindgen_ty_1 {
    #[doc = "< erase sector size (bytes). 0x00: not available"]
    pub size: u32,
    #[doc = "< erase command"]
    pub cmd: u8,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of sfud_sfdp__bindgen_ty_1"][::core::mem::size_of::<sfud_sfdp__bindgen_ty_1>() - 8usize];
    ["Alignment of sfud_sfdp__bindgen_ty_1"]
        [::core::mem::align_of::<sfud_sfdp__bindgen_ty_1>() - 4usize];
    ["Offset of field: sfud_sfdp__bindgen_ty_1::size"]
        [::core::mem::offset_of!(sfud_sfdp__bindgen_ty_1, size) - 0usize];
    ["Offset of field: sfud_sfdp__bindgen_ty_1::cmd"]
        [::core::mem::offset_of!(sfud_sfdp__bindgen_ty_1, cmd) - 4usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of sfud_sfdp"][::core::mem::size_of::<sfud_sfdp>() - 48usize];
    ["Alignment of sfud_sfdp"][::core::mem::align_of::<sfud_sfdp>() - 4usize];
    ["Offset of field: sfud_sfdp::available"]
        [::core::mem::offset_of!(sfud_sfdp, available) - 0usize];
    ["Offset of field: sfud_sfdp::major_rev"]
        [::core::mem::offset_of!(sfud_sfdp, major_rev) - 1usize];
    ["Offset of field: sfud_sfdp::minor_rev"]
        [::core::mem::offset_of!(sfud_sfdp, minor_rev) - 2usize];
    ["Offset of field: sfud_sfdp::write_gran"]
        [::core::mem::offset_of!(sfud_sfdp, write_gran) - 4usize];
    ["Offset of field: sfud_sfdp::erase_4k"][::core::mem::offset_of!(sfud_sfdp, erase_4k) - 6usize];
    ["Offset of field: sfud_sfdp::erase_4k_cmd"]
        [::core::mem::offset_of!(sfud_sfdp, erase_4k_cmd) - 7usize];
    ["Offset of field: sfud_sfdp::sr_is_non_vola"]
        [::core::mem::offset_of!(sfud_sfdp, sr_is_non_vola) - 8usize];
    ["Offset of field: sfud_sfdp::vola_sr_we_cmd"]
        [::core::mem::offset_of!(sfud_sfdp, vola_sr_we_cmd) - 9usize];
    ["Offset of field: sfud_sfdp::addr_3_byte"]
        [::core::mem::offset_of!(sfud_sfdp, addr_3_byte) - 10usize];
    ["Offset of field: sfud_sfdp::addr_4_byte"]
        [::core::mem::offset_of!(sfud_sfdp, addr_4_byte) - 11usize];
    ["Offset of field: sfud_sfdp::capacity"]
        [::core::mem::offset_of!(sfud_sfdp, capacity) - 12usize];
    ["Offset of field: sfud_sfdp::eraser"][::core::mem::offset_of!(sfud_sfdp, eraser) - 16usize];
};
#[doc = " the SFDP (Serial Flash Discoverable Parameters) parameter info which used on this library"]
pub type sfud_sfdp_t = *mut sfud_sfdp;
#[doc = " SPI device"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __sfud_spi {
    pub name: *mut ::core::ffi::c_char,
    pub wr: ::core::option::Option<
        unsafe extern "C" fn(
            spi: *const __sfud_spi,
            write_buf: *const u8,
            write_size: usize,
            read_buf: *mut u8,
            read_size: usize,
        ) -> sfud_err,
    >,
    pub lock: ::core::option::Option<unsafe extern "C" fn(spi: *const __sfud_spi)>,
    pub unlock: ::core::option::Option<unsafe extern "C" fn(spi: *const __sfud_spi)>,
    pub user_data: *mut ::core::ffi::c_void,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of __sfud_spi"][::core::mem::size_of::<__sfud_spi>() - 40usize];
    ["Alignment of __sfud_spi"][::core::mem::align_of::<__sfud_spi>() - 8usize];
    ["Offset of field: __sfud_spi::name"][::core::mem::offset_of!(__sfud_spi, name) - 0usize];
    ["Offset of field: __sfud_spi::wr"][::core::mem::offset_of!(__sfud_spi, wr) - 8usize];
    ["Offset of field: __sfud_spi::lock"][::core::mem::offset_of!(__sfud_spi, lock) - 16usize];
    ["Offset of field: __sfud_spi::unlock"][::core::mem::offset_of!(__sfud_spi, unlock) - 24usize];
    ["Offset of field: __sfud_spi::user_data"]
        [::core::mem::offset_of!(__sfud_spi, user_data) - 32usize];
};
impl Default for __sfud_spi {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " SPI device"]
pub type sfud_spi = __sfud_spi;
#[doc = " SPI device"]
pub type sfud_spi_t = *mut __sfud_spi;
#[doc = " serial flash device"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sfud_flash {
    #[doc = "< serial flash name"]
    pub name: *mut ::core::ffi::c_char,
    #[doc = "< index of flash device information table  @see flash_table"]
    pub index: usize,
    #[doc = "< flash chip information"]
    pub chip: sfud_flash_chip,
    #[doc = "< SPI device"]
    pub spi: sfud_spi,
    #[doc = "< initialize OK flag"]
    pub init_ok: bool,
    #[doc = "< flash is in 4-Byte addressing"]
    pub addr_in_4_byte: bool,
    pub retry: sfud_flash__bindgen_ty_1,
    #[doc = "< some user data"]
    pub user_data: *mut ::core::ffi::c_void,
    #[doc = "< serial flash discoverable parameters by JEDEC standard"]
    pub sfdp: sfud_sfdp,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct sfud_flash__bindgen_ty_1 {
    #[doc = "< every retry's delay"]
    pub delay: ::core::option::Option<unsafe extern "C" fn()>,
    #[doc = "< default times for error retry"]
    pub times: usize,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of sfud_flash__bindgen_ty_1"]
        [::core::mem::size_of::<sfud_flash__bindgen_ty_1>() - 16usize];
    ["Alignment of sfud_flash__bindgen_ty_1"]
        [::core::mem::align_of::<sfud_flash__bindgen_ty_1>() - 8usize];
    ["Offset of field: sfud_flash__bindgen_ty_1::delay"]
        [::core::mem::offset_of!(sfud_flash__bindgen_ty_1, delay) - 0usize];
    ["Offset of field: sfud_flash__bindgen_ty_1::times"]
        [::core::mem::offset_of!(sfud_flash__bindgen_ty_1, times) - 8usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of sfud_flash"][::core::mem::size_of::<sfud_flash>() - 168usize];
    ["Alignment of sfud_flash"][::core::mem::align_of::<sfud_flash>() - 8usize];
    ["Offset of field: sfud_flash::name"][::core::mem::offset_of!(sfud_flash, name) - 0usize];
    ["Offset of field: sfud_flash::index"][::core::mem::offset_of!(sfud_flash, index) - 8usize];
    ["Offset of field: sfud_flash::chip"][::core::mem::offset_of!(sfud_flash, chip) - 16usize];
    ["Offset of field: sfud_flash::spi"][::core::mem::offset_of!(sfud_flash, spi) - 48usize];
    ["Offset of field: sfud_flash::init_ok"]
        [::core::mem::offset_of!(sfud_flash, init_ok) - 88usize];
    ["Offset of field: sfud_flash::addr_in_4_byte"]
        [::core::mem::offset_of!(sfud_flash, addr_in_4_byte) - 89usize];
    ["Offset of field: sfud_flash::retry"][::core::mem::offset_of!(sfud_flash, retry) - 96usize];
    ["Offset of field: sfud_flash::user_data"]
        [::core::mem::offset_of!(sfud_flash, user_data) - 112usize];
    ["Offset of field: sfud_flash::sfdp"][::core::mem::offset_of!(sfud_flash, sfdp) - 120usize];
};
impl Default for sfud_flash {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " serial flash device"]
pub type sfud_flash_t = *mut sfud_flash;
unsafe extern "C" {
    #[doc = " SFUD library initialize.\n\n @return result"]
    pub fn sfud_init() -> sfud_err;
}
unsafe extern "C" {
    #[doc = " SFUD initialize by flash device\n\n @param flash flash device\n\n @return result"]
    pub fn sfud_device_init(flash: *mut sfud_flash) -> sfud_err;
}
unsafe extern "C" {
    #[doc = " get flash device by its index which in the flash information table\n\n @param index the index which in the flash information table  @see flash_table\n\n @return flash device"]
    pub fn sfud_get_device(index: usize) -> *mut sfud_flash;
}
unsafe extern "C" {
    #[doc = " get flash device total number on flash device information table  @see flash_table\n\n @return flash device total number"]
    pub fn sfud_get_device_num() -> usize;
}
unsafe extern "C" {
    #[doc = " get flash device information table  @see flash_table\n\n @return flash device table pointer"]
    pub fn sfud_get_device_table() -> *const sfud_flash;
}
unsafe extern "C" {
    #[doc = " read flash data\n\n @param flash flash device\n @param addr start address\n @param size read size\n @param data read data pointer\n\n @return result"]
    pub fn sfud_read(flash: *const sfud_flash, addr: u32, size: usize, data: *mut u8) -> sfud_err;
}
unsafe extern "C" {
    #[doc = " erase flash data\n\n @note It will erase align by erase granularity.\n\n @param flash flash device\n @param addr start address\n @param size erase size\n\n @return result"]
    pub fn sfud_erase(flash: *const sfud_flash, addr: u32, size: usize) -> sfud_err;
}
unsafe extern "C" {
    #[doc = " write flash data (no erase operate)\n\n @param flash flash device\n @param addr start address\n @param data write data\n @param size write size\n\n @return result"]
    pub fn sfud_write(
        flash: *const sfud_flash,
        addr: u32,
        size: usize,
        data: *const u8,
    ) -> sfud_err;
}
unsafe extern "C" {
    #[doc = " erase and write flash data\n\n @param flash flash device\n @param addr start address\n @param size write size\n @param data write data\n\n @return result"]
    pub fn sfud_erase_write(
        flash: *const sfud_flash,
        addr: u32,
        size: usize,
        data: *const u8,
    ) -> sfud_err;
}
unsafe extern "C" {
    #[doc = " erase all flash data\n\n @param flash flash device\n\n @return result"]
    pub fn sfud_chip_erase(flash: *const sfud_flash) -> sfud_err;
}
unsafe extern "C" {
    #[doc = " read flash register status\n\n @param flash flash device\n @param status register status\n\n @return result"]
    pub fn sfud_read_status(flash: *const sfud_flash, status: *mut u8) -> sfud_err;
}
unsafe extern "C" {
    #[doc = " write status register\n\n @param flash flash device\n @param is_volatile true: volatile mode, false: non-volatile mode\n @param status register status\n\n @return result"]
    pub fn sfud_write_status(flash: *const sfud_flash, is_volatile: bool, status: u8) -> sfud_err;
}
pub type locale_t = *mut __locale_t;
unsafe extern "C" {
    pub fn bcmp(
        arg1: *const ::core::ffi::c_void,
        arg2: *const ::core::ffi::c_void,
        arg3: ::core::ffi::c_ulong,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn bcopy(
        arg1: *const ::core::ffi::c_void,
        arg2: *mut ::core::ffi::c_void,
        arg3: ::core::ffi::c_ulong,
    );
}
unsafe extern "C" {
    pub fn bzero(arg1: *mut ::core::ffi::c_void, arg2: ::core::ffi::c_ulong);
}
unsafe extern "C" {
    pub fn explicit_bzero(arg1: *mut ::core::ffi::c_void, arg2: usize);
}
unsafe extern "C" {
    pub fn ffs(arg1: ::core::ffi::c_int) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn ffsl(arg1: ::core::ffi::c_long) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn ffsll(arg1: ::core::ffi::c_longlong) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn fls(arg1: ::core::ffi::c_int) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn flsl(arg1: ::core::ffi::c_long) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn flsll(arg1: ::core::ffi::c_longlong) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn index(
        arg1: *const ::core::ffi::c_char,
        arg2: ::core::ffi::c_int,
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn rindex(
        arg1: *const ::core::ffi::c_char,
        arg2: ::core::ffi::c_int,
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn strcasecmp(
        arg1: *const ::core::ffi::c_char,
        arg2: *const ::core::ffi::c_char,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn strncasecmp(
        arg1: *const ::core::ffi::c_char,
        arg2: *const ::core::ffi::c_char,
        arg3: ::core::ffi::c_ulong,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn strcasecmp_l(
        arg1: *const ::core::ffi::c_char,
        arg2: *const ::core::ffi::c_char,
        arg3: locale_t,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn strncasecmp_l(
        arg1: *const ::core::ffi::c_char,
        arg2: *const ::core::ffi::c_char,
        arg3: usize,
        arg4: locale_t,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn memchr(
        arg1: *const ::core::ffi::c_void,
        arg2: ::core::ffi::c_int,
        arg3: ::core::ffi::c_ulong,
    ) -> *mut ::core::ffi::c_void;
}
unsafe extern "C" {
    pub fn memcmp(
        arg1: *const ::core::ffi::c_void,
        arg2: *const ::core::ffi::c_void,
        arg3: ::core::ffi::c_ulong,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn memcpy(
        arg1: *mut ::core::ffi::c_void,
        arg2: *const ::core::ffi::c_void,
        arg3: ::core::ffi::c_ulong,
    ) -> *mut ::core::ffi::c_void;
}
unsafe extern "C" {
    pub fn memmove(
        arg1: *mut ::core::ffi::c_void,
        arg2: *const ::core::ffi::c_void,
        arg3: ::core::ffi::c_ulong,
    ) -> *mut ::core::ffi::c_void;
}
unsafe extern "C" {
    pub fn memset(
        arg1: *mut ::core::ffi::c_void,
        arg2: ::core::ffi::c_int,
        arg3: ::core::ffi::c_ulong,
    ) -> *mut ::core::ffi::c_void;
}
unsafe extern "C" {
    pub fn strcat(
        arg1: *mut ::core::ffi::c_char,
        arg2: *const ::core::ffi::c_char,
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn strchr(
        arg1: *const ::core::ffi::c_char,
        arg2: ::core::ffi::c_int,
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn strcmp(
        arg1: *const ::core::ffi::c_char,
        arg2: *const ::core::ffi::c_char,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn strcoll(
        arg1: *const ::core::ffi::c_char,
        arg2: *const ::core::ffi::c_char,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn strcpy(
        arg1: *mut ::core::ffi::c_char,
        arg2: *const ::core::ffi::c_char,
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn strcspn(
        arg1: *const ::core::ffi::c_char,
        arg2: *const ::core::ffi::c_char,
    ) -> ::core::ffi::c_ulong;
}
unsafe extern "C" {
    pub fn strerror(arg1: ::core::ffi::c_int) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn strlen(arg1: *const ::core::ffi::c_char) -> ::core::ffi::c_ulong;
}
unsafe extern "C" {
    pub fn strncat(
        arg1: *mut ::core::ffi::c_char,
        arg2: *const ::core::ffi::c_char,
        arg3: ::core::ffi::c_ulong,
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn strncmp(
        arg1: *const ::core::ffi::c_char,
        arg2: *const ::core::ffi::c_char,
        arg3: ::core::ffi::c_ulong,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn strncpy(
        arg1: *mut ::core::ffi::c_char,
        arg2: *const ::core::ffi::c_char,
        arg3: ::core::ffi::c_ulong,
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn strpbrk(
        arg1: *const ::core::ffi::c_char,
        arg2: *const ::core::ffi::c_char,
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn strrchr(
        arg1: *const ::core::ffi::c_char,
        arg2: ::core::ffi::c_int,
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn strspn(
        arg1: *const ::core::ffi::c_char,
        arg2: *const ::core::ffi::c_char,
    ) -> ::core::ffi::c_ulong;
}
unsafe extern "C" {
    pub fn strstr(
        arg1: *const ::core::ffi::c_char,
        arg2: *const ::core::ffi::c_char,
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn strtok(
        arg1: *mut ::core::ffi::c_char,
        arg2: *const ::core::ffi::c_char,
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn strxfrm(
        arg1: *mut ::core::ffi::c_char,
        arg2: *const ::core::ffi::c_char,
        arg3: ::core::ffi::c_ulong,
    ) -> ::core::ffi::c_ulong;
}
unsafe extern "C" {
    pub fn strcoll_l(
        arg1: *const ::core::ffi::c_char,
        arg2: *const ::core::ffi::c_char,
        arg3: locale_t,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn strerror_l(arg1: ::core::ffi::c_int, arg2: locale_t) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn strxfrm_l(
        arg1: *mut ::core::ffi::c_char,
        arg2: *const ::core::ffi::c_char,
        arg3: usize,
        arg4: locale_t,
    ) -> usize;
}
unsafe extern "C" {
    pub fn strtok_r(
        arg1: *mut ::core::ffi::c_char,
        arg2: *const ::core::ffi::c_char,
        arg3: *mut *mut ::core::ffi::c_char,
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn timingsafe_bcmp(
        arg1: *const ::core::ffi::c_void,
        arg2: *const ::core::ffi::c_void,
        arg3: usize,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn timingsafe_memcmp(
        arg1: *const ::core::ffi::c_void,
        arg2: *const ::core::ffi::c_void,
        arg3: usize,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn memccpy(
        arg1: *mut ::core::ffi::c_void,
        arg2: *const ::core::ffi::c_void,
        arg3: ::core::ffi::c_int,
        arg4: ::core::ffi::c_ulong,
    ) -> *mut ::core::ffi::c_void;
}
unsafe extern "C" {
    pub fn stpcpy(
        arg1: *mut ::core::ffi::c_char,
        arg2: *const ::core::ffi::c_char,
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn stpncpy(
        arg1: *mut ::core::ffi::c_char,
        arg2: *const ::core::ffi::c_char,
        arg3: ::core::ffi::c_ulong,
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn strdup(arg1: *const ::core::ffi::c_char) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn _strdup_r(
        arg1: *mut _reent,
        arg2: *const ::core::ffi::c_char,
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn strndup(
        arg1: *const ::core::ffi::c_char,
        arg2: ::core::ffi::c_ulong,
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn _strndup_r(
        arg1: *mut _reent,
        arg2: *const ::core::ffi::c_char,
        arg3: usize,
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    #[link_name = "\u{1}__xpg_strerror_r"]
    pub fn strerror_r(
        arg1: ::core::ffi::c_int,
        arg2: *mut ::core::ffi::c_char,
        arg3: usize,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn _strerror_r(
        arg1: *mut _reent,
        arg2: ::core::ffi::c_int,
        arg3: ::core::ffi::c_int,
        arg4: *mut ::core::ffi::c_int,
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn strlcat(
        arg1: *mut ::core::ffi::c_char,
        arg2: *const ::core::ffi::c_char,
        arg3: usize,
    ) -> usize;
}
unsafe extern "C" {
    pub fn strlcpy(
        arg1: *mut ::core::ffi::c_char,
        arg2: *const ::core::ffi::c_char,
        arg3: usize,
    ) -> usize;
}
unsafe extern "C" {
    pub fn strnlen(arg1: *const ::core::ffi::c_char, arg2: usize) -> usize;
}
unsafe extern "C" {
    pub fn strsep(
        arg1: *mut *mut ::core::ffi::c_char,
        arg2: *const ::core::ffi::c_char,
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn strnstr(
        arg1: *const ::core::ffi::c_char,
        arg2: *const ::core::ffi::c_char,
        arg3: usize,
    ) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn strlwr(arg1: *mut ::core::ffi::c_char) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn strupr(arg1: *mut ::core::ffi::c_char) -> *mut ::core::ffi::c_char;
}
unsafe extern "C" {
    pub fn strsignal(__signo: ::core::ffi::c_int) -> *mut ::core::ffi::c_char;
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct imaxdiv_t {
    pub quot: intmax_t,
    pub rem: intmax_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of imaxdiv_t"][::core::mem::size_of::<imaxdiv_t>() - 16usize];
    ["Alignment of imaxdiv_t"][::core::mem::align_of::<imaxdiv_t>() - 8usize];
    ["Offset of field: imaxdiv_t::quot"][::core::mem::offset_of!(imaxdiv_t, quot) - 0usize];
    ["Offset of field: imaxdiv_t::rem"][::core::mem::offset_of!(imaxdiv_t, rem) - 8usize];
};
unsafe extern "C" {
    pub fn imaxabs(arg1: intmax_t) -> intmax_t;
}
unsafe extern "C" {
    pub fn imaxdiv(__numer: intmax_t, __denomer: intmax_t) -> imaxdiv_t;
}
unsafe extern "C" {
    pub fn strtoimax(
        arg1: *const ::core::ffi::c_char,
        arg2: *mut *mut ::core::ffi::c_char,
        arg3: ::core::ffi::c_int,
    ) -> intmax_t;
}
unsafe extern "C" {
    pub fn _strtoimax_r(
        arg1: *mut _reent,
        arg2: *const ::core::ffi::c_char,
        arg3: *mut *mut ::core::ffi::c_char,
        arg4: ::core::ffi::c_int,
    ) -> intmax_t;
}
unsafe extern "C" {
    pub fn strtoumax(
        arg1: *const ::core::ffi::c_char,
        arg2: *mut *mut ::core::ffi::c_char,
        arg3: ::core::ffi::c_int,
    ) -> uintmax_t;
}
unsafe extern "C" {
    pub fn _strtoumax_r(
        arg1: *mut _reent,
        arg2: *const ::core::ffi::c_char,
        arg3: *mut *mut ::core::ffi::c_char,
        arg4: ::core::ffi::c_int,
    ) -> uintmax_t;
}
unsafe extern "C" {
    pub fn wcstoimax(
        arg1: *const wchar_t,
        arg2: *mut *mut wchar_t,
        arg3: ::core::ffi::c_int,
    ) -> intmax_t;
}
unsafe extern "C" {
    pub fn _wcstoimax_r(
        arg1: *mut _reent,
        arg2: *const wchar_t,
        arg3: *mut *mut wchar_t,
        arg4: ::core::ffi::c_int,
    ) -> intmax_t;
}
unsafe extern "C" {
    pub fn wcstoumax(
        arg1: *const wchar_t,
        arg2: *mut *mut wchar_t,
        arg3: ::core::ffi::c_int,
    ) -> uintmax_t;
}
unsafe extern "C" {
    pub fn _wcstoumax_r(
        arg1: *mut _reent,
        arg2: *const wchar_t,
        arg3: *mut *mut wchar_t,
        arg4: ::core::ffi::c_int,
    ) -> uintmax_t;
}
unsafe extern "C" {
    pub fn strtoimax_l(
        arg1: *const ::core::ffi::c_char,
        _restrict: *mut *mut ::core::ffi::c_char,
        arg2: ::core::ffi::c_int,
        arg3: locale_t,
    ) -> intmax_t;
}
unsafe extern "C" {
    pub fn strtoumax_l(
        arg1: *const ::core::ffi::c_char,
        _restrict: *mut *mut ::core::ffi::c_char,
        arg2: ::core::ffi::c_int,
        arg3: locale_t,
    ) -> uintmax_t;
}
unsafe extern "C" {
    pub fn wcstoimax_l(
        arg1: *const wchar_t,
        _restrict: *mut *mut wchar_t,
        arg2: ::core::ffi::c_int,
        arg3: locale_t,
    ) -> intmax_t;
}
unsafe extern "C" {
    pub fn wcstoumax_l(
        arg1: *const wchar_t,
        _restrict: *mut *mut wchar_t,
        arg2: ::core::ffi::c_int,
        arg3: locale_t,
    ) -> uintmax_t;
}
unsafe extern "C" {
    pub fn __assert(
        arg1: *const ::core::ffi::c_char,
        arg2: ::core::ffi::c_int,
        arg3: *const ::core::ffi::c_char,
    ) -> !;
}
unsafe extern "C" {
    pub fn __assert_func(
        arg1: *const ::core::ffi::c_char,
        arg2: ::core::ffi::c_int,
        arg3: *const ::core::ffi::c_char,
        arg4: *const ::core::ffi::c_char,
    ) -> !;
}
unsafe extern "C" {
    pub fn lfs_crc(crc: u32, buffer: *const ::core::ffi::c_void, size: usize) -> u32;
}
#[doc = " Definitions ///"]
pub type lfs_size_t = u32;
pub type lfs_off_t = u32;
pub type lfs_ssize_t = i32;
pub type lfs_soff_t = i32;
pub type lfs_block_t = u32;
pub const lfs_error_LFS_ERR_OK: lfs_error = 0;
pub const lfs_error_LFS_ERR_IO: lfs_error = -5;
pub const lfs_error_LFS_ERR_CORRUPT: lfs_error = -84;
pub const lfs_error_LFS_ERR_NOENT: lfs_error = -2;
pub const lfs_error_LFS_ERR_EXIST: lfs_error = -17;
pub const lfs_error_LFS_ERR_NOTDIR: lfs_error = -20;
pub const lfs_error_LFS_ERR_ISDIR: lfs_error = -21;
pub const lfs_error_LFS_ERR_NOTEMPTY: lfs_error = -39;
pub const lfs_error_LFS_ERR_BADF: lfs_error = -9;
pub const lfs_error_LFS_ERR_FBIG: lfs_error = -27;
pub const lfs_error_LFS_ERR_INVAL: lfs_error = -22;
pub const lfs_error_LFS_ERR_NOSPC: lfs_error = -28;
pub const lfs_error_LFS_ERR_NOMEM: lfs_error = -12;
pub const lfs_error_LFS_ERR_NOATTR: lfs_error = -61;
pub const lfs_error_LFS_ERR_NAMETOOLONG: lfs_error = -36;
pub type lfs_error = ::core::ffi::c_int;
pub const lfs_type_LFS_TYPE_REG: lfs_type = 1;
pub const lfs_type_LFS_TYPE_DIR: lfs_type = 2;
pub const lfs_type_LFS_TYPE_SPLICE: lfs_type = 1024;
pub const lfs_type_LFS_TYPE_NAME: lfs_type = 0;
pub const lfs_type_LFS_TYPE_STRUCT: lfs_type = 512;
pub const lfs_type_LFS_TYPE_USERATTR: lfs_type = 768;
pub const lfs_type_LFS_TYPE_FROM: lfs_type = 256;
pub const lfs_type_LFS_TYPE_TAIL: lfs_type = 1536;
pub const lfs_type_LFS_TYPE_GLOBALS: lfs_type = 1792;
pub const lfs_type_LFS_TYPE_CRC: lfs_type = 1280;
pub const lfs_type_LFS_TYPE_CREATE: lfs_type = 1025;
pub const lfs_type_LFS_TYPE_DELETE: lfs_type = 1279;
pub const lfs_type_LFS_TYPE_SUPERBLOCK: lfs_type = 255;
pub const lfs_type_LFS_TYPE_DIRSTRUCT: lfs_type = 512;
pub const lfs_type_LFS_TYPE_CTZSTRUCT: lfs_type = 514;
pub const lfs_type_LFS_TYPE_INLINESTRUCT: lfs_type = 513;
pub const lfs_type_LFS_TYPE_SOFTTAIL: lfs_type = 1536;
pub const lfs_type_LFS_TYPE_HARDTAIL: lfs_type = 1537;
pub const lfs_type_LFS_TYPE_MOVESTATE: lfs_type = 2047;
pub const lfs_type_LFS_TYPE_CCRC: lfs_type = 1280;
pub const lfs_type_LFS_TYPE_FCRC: lfs_type = 1535;
pub const lfs_type_LFS_FROM_NOOP: lfs_type = 0;
pub const lfs_type_LFS_FROM_MOVE: lfs_type = 257;
pub const lfs_type_LFS_FROM_USERATTRS: lfs_type = 258;
pub type lfs_type = ::core::ffi::c_uint;
pub const lfs_open_flags_LFS_O_RDONLY: lfs_open_flags = 1;
pub const lfs_open_flags_LFS_O_WRONLY: lfs_open_flags = 2;
pub const lfs_open_flags_LFS_O_RDWR: lfs_open_flags = 3;
pub const lfs_open_flags_LFS_O_CREAT: lfs_open_flags = 256;
pub const lfs_open_flags_LFS_O_EXCL: lfs_open_flags = 512;
pub const lfs_open_flags_LFS_O_TRUNC: lfs_open_flags = 1024;
pub const lfs_open_flags_LFS_O_APPEND: lfs_open_flags = 2048;
pub const lfs_open_flags_LFS_F_DIRTY: lfs_open_flags = 65536;
pub const lfs_open_flags_LFS_F_WRITING: lfs_open_flags = 131072;
pub const lfs_open_flags_LFS_F_READING: lfs_open_flags = 262144;
pub const lfs_open_flags_LFS_F_ERRED: lfs_open_flags = 524288;
pub const lfs_open_flags_LFS_F_INLINE: lfs_open_flags = 1048576;
pub type lfs_open_flags = ::core::ffi::c_uint;
pub const lfs_whence_flags_LFS_SEEK_SET: lfs_whence_flags = 0;
pub const lfs_whence_flags_LFS_SEEK_CUR: lfs_whence_flags = 1;
pub const lfs_whence_flags_LFS_SEEK_END: lfs_whence_flags = 2;
pub type lfs_whence_flags = ::core::ffi::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct lfs_config {
    pub context: *mut ::core::ffi::c_void,
    pub read: ::core::option::Option<
        unsafe extern "C" fn(
            c: *const lfs_config,
            block: lfs_block_t,
            off: lfs_off_t,
            buffer: *mut ::core::ffi::c_void,
            size: lfs_size_t,
        ) -> ::core::ffi::c_int,
    >,
    pub prog: ::core::option::Option<
        unsafe extern "C" fn(
            c: *const lfs_config,
            block: lfs_block_t,
            off: lfs_off_t,
            buffer: *const ::core::ffi::c_void,
            size: lfs_size_t,
        ) -> ::core::ffi::c_int,
    >,
    pub erase: ::core::option::Option<
        unsafe extern "C" fn(c: *const lfs_config, block: lfs_block_t) -> ::core::ffi::c_int,
    >,
    pub sync:
        ::core::option::Option<unsafe extern "C" fn(c: *const lfs_config) -> ::core::ffi::c_int>,
    pub read_size: lfs_size_t,
    pub prog_size: lfs_size_t,
    pub block_size: lfs_size_t,
    pub block_count: lfs_size_t,
    pub block_cycles: i32,
    pub cache_size: lfs_size_t,
    pub lookahead_size: lfs_size_t,
    pub compact_thresh: lfs_size_t,
    pub read_buffer: *mut ::core::ffi::c_void,
    pub prog_buffer: *mut ::core::ffi::c_void,
    pub lookahead_buffer: *mut ::core::ffi::c_void,
    pub name_max: lfs_size_t,
    pub file_max: lfs_size_t,
    pub attr_max: lfs_size_t,
    pub metadata_max: lfs_size_t,
    pub inline_max: lfs_size_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of lfs_config"][::core::mem::size_of::<lfs_config>() - 120usize];
    ["Alignment of lfs_config"][::core::mem::align_of::<lfs_config>() - 8usize];
    ["Offset of field: lfs_config::context"][::core::mem::offset_of!(lfs_config, context) - 0usize];
    ["Offset of field: lfs_config::read"][::core::mem::offset_of!(lfs_config, read) - 8usize];
    ["Offset of field: lfs_config::prog"][::core::mem::offset_of!(lfs_config, prog) - 16usize];
    ["Offset of field: lfs_config::erase"][::core::mem::offset_of!(lfs_config, erase) - 24usize];
    ["Offset of field: lfs_config::sync"][::core::mem::offset_of!(lfs_config, sync) - 32usize];
    ["Offset of field: lfs_config::read_size"]
        [::core::mem::offset_of!(lfs_config, read_size) - 40usize];
    ["Offset of field: lfs_config::prog_size"]
        [::core::mem::offset_of!(lfs_config, prog_size) - 44usize];
    ["Offset of field: lfs_config::block_size"]
        [::core::mem::offset_of!(lfs_config, block_size) - 48usize];
    ["Offset of field: lfs_config::block_count"]
        [::core::mem::offset_of!(lfs_config, block_count) - 52usize];
    ["Offset of field: lfs_config::block_cycles"]
        [::core::mem::offset_of!(lfs_config, block_cycles) - 56usize];
    ["Offset of field: lfs_config::cache_size"]
        [::core::mem::offset_of!(lfs_config, cache_size) - 60usize];
    ["Offset of field: lfs_config::lookahead_size"]
        [::core::mem::offset_of!(lfs_config, lookahead_size) - 64usize];
    ["Offset of field: lfs_config::compact_thresh"]
        [::core::mem::offset_of!(lfs_config, compact_thresh) - 68usize];
    ["Offset of field: lfs_config::read_buffer"]
        [::core::mem::offset_of!(lfs_config, read_buffer) - 72usize];
    ["Offset of field: lfs_config::prog_buffer"]
        [::core::mem::offset_of!(lfs_config, prog_buffer) - 80usize];
    ["Offset of field: lfs_config::lookahead_buffer"]
        [::core::mem::offset_of!(lfs_config, lookahead_buffer) - 88usize];
    ["Offset of field: lfs_config::name_max"]
        [::core::mem::offset_of!(lfs_config, name_max) - 96usize];
    ["Offset of field: lfs_config::file_max"]
        [::core::mem::offset_of!(lfs_config, file_max) - 100usize];
    ["Offset of field: lfs_config::attr_max"]
        [::core::mem::offset_of!(lfs_config, attr_max) - 104usize];
    ["Offset of field: lfs_config::metadata_max"]
        [::core::mem::offset_of!(lfs_config, metadata_max) - 108usize];
    ["Offset of field: lfs_config::inline_max"]
        [::core::mem::offset_of!(lfs_config, inline_max) - 112usize];
};
impl Default for lfs_config {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct lfs_info {
    pub type_: u8,
    pub size: lfs_size_t,
    pub name: [::core::ffi::c_char; 256usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of lfs_info"][::core::mem::size_of::<lfs_info>() - 264usize];
    ["Alignment of lfs_info"][::core::mem::align_of::<lfs_info>() - 4usize];
    ["Offset of field: lfs_info::type_"][::core::mem::offset_of!(lfs_info, type_) - 0usize];
    ["Offset of field: lfs_info::size"][::core::mem::offset_of!(lfs_info, size) - 4usize];
    ["Offset of field: lfs_info::name"][::core::mem::offset_of!(lfs_info, name) - 8usize];
};
impl Default for lfs_info {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct lfs_fsinfo {
    pub disk_version: u32,
    pub block_size: lfs_size_t,
    pub block_count: lfs_size_t,
    pub name_max: lfs_size_t,
    pub file_max: lfs_size_t,
    pub attr_max: lfs_size_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of lfs_fsinfo"][::core::mem::size_of::<lfs_fsinfo>() - 24usize];
    ["Alignment of lfs_fsinfo"][::core::mem::align_of::<lfs_fsinfo>() - 4usize];
    ["Offset of field: lfs_fsinfo::disk_version"]
        [::core::mem::offset_of!(lfs_fsinfo, disk_version) - 0usize];
    ["Offset of field: lfs_fsinfo::block_size"]
        [::core::mem::offset_of!(lfs_fsinfo, block_size) - 4usize];
    ["Offset of field: lfs_fsinfo::block_count"]
        [::core::mem::offset_of!(lfs_fsinfo, block_count) - 8usize];
    ["Offset of field: lfs_fsinfo::name_max"]
        [::core::mem::offset_of!(lfs_fsinfo, name_max) - 12usize];
    ["Offset of field: lfs_fsinfo::file_max"]
        [::core::mem::offset_of!(lfs_fsinfo, file_max) - 16usize];
    ["Offset of field: lfs_fsinfo::attr_max"]
        [::core::mem::offset_of!(lfs_fsinfo, attr_max) - 20usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct lfs_attr {
    pub type_: u8,
    pub buffer: *mut ::core::ffi::c_void,
    pub size: lfs_size_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of lfs_attr"][::core::mem::size_of::<lfs_attr>() - 24usize];
    ["Alignment of lfs_attr"][::core::mem::align_of::<lfs_attr>() - 8usize];
    ["Offset of field: lfs_attr::type_"][::core::mem::offset_of!(lfs_attr, type_) - 0usize];
    ["Offset of field: lfs_attr::buffer"][::core::mem::offset_of!(lfs_attr, buffer) - 8usize];
    ["Offset of field: lfs_attr::size"][::core::mem::offset_of!(lfs_attr, size) - 16usize];
};
impl Default for lfs_attr {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct lfs_file_config {
    pub buffer: *mut ::core::ffi::c_void,
    pub attrs: *mut lfs_attr,
    pub attr_count: lfs_size_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of lfs_file_config"][::core::mem::size_of::<lfs_file_config>() - 24usize];
    ["Alignment of lfs_file_config"][::core::mem::align_of::<lfs_file_config>() - 8usize];
    ["Offset of field: lfs_file_config::buffer"]
        [::core::mem::offset_of!(lfs_file_config, buffer) - 0usize];
    ["Offset of field: lfs_file_config::attrs"]
        [::core::mem::offset_of!(lfs_file_config, attrs) - 8usize];
    ["Offset of field: lfs_file_config::attr_count"]
        [::core::mem::offset_of!(lfs_file_config, attr_count) - 16usize];
};
impl Default for lfs_file_config {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " internal littlefs data structures ///"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct lfs_cache {
    pub block: lfs_block_t,
    pub off: lfs_off_t,
    pub size: lfs_size_t,
    pub buffer: *mut u8,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of lfs_cache"][::core::mem::size_of::<lfs_cache>() - 24usize];
    ["Alignment of lfs_cache"][::core::mem::align_of::<lfs_cache>() - 8usize];
    ["Offset of field: lfs_cache::block"][::core::mem::offset_of!(lfs_cache, block) - 0usize];
    ["Offset of field: lfs_cache::off"][::core::mem::offset_of!(lfs_cache, off) - 4usize];
    ["Offset of field: lfs_cache::size"][::core::mem::offset_of!(lfs_cache, size) - 8usize];
    ["Offset of field: lfs_cache::buffer"][::core::mem::offset_of!(lfs_cache, buffer) - 16usize];
};
impl Default for lfs_cache {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[doc = " internal littlefs data structures ///"]
pub type lfs_cache_t = lfs_cache;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct lfs_mdir {
    pub pair: [lfs_block_t; 2usize],
    pub rev: u32,
    pub off: lfs_off_t,
    pub etag: u32,
    pub count: u16,
    pub erased: bool,
    pub split: bool,
    pub tail: [lfs_block_t; 2usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of lfs_mdir"][::core::mem::size_of::<lfs_mdir>() - 32usize];
    ["Alignment of lfs_mdir"][::core::mem::align_of::<lfs_mdir>() - 4usize];
    ["Offset of field: lfs_mdir::pair"][::core::mem::offset_of!(lfs_mdir, pair) - 0usize];
    ["Offset of field: lfs_mdir::rev"][::core::mem::offset_of!(lfs_mdir, rev) - 8usize];
    ["Offset of field: lfs_mdir::off"][::core::mem::offset_of!(lfs_mdir, off) - 12usize];
    ["Offset of field: lfs_mdir::etag"][::core::mem::offset_of!(lfs_mdir, etag) - 16usize];
    ["Offset of field: lfs_mdir::count"][::core::mem::offset_of!(lfs_mdir, count) - 20usize];
    ["Offset of field: lfs_mdir::erased"][::core::mem::offset_of!(lfs_mdir, erased) - 22usize];
    ["Offset of field: lfs_mdir::split"][::core::mem::offset_of!(lfs_mdir, split) - 23usize];
    ["Offset of field: lfs_mdir::tail"][::core::mem::offset_of!(lfs_mdir, tail) - 24usize];
};
pub type lfs_mdir_t = lfs_mdir;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct lfs_dir {
    pub next: *mut lfs_dir,
    pub id: u16,
    pub type_: u8,
    pub m: lfs_mdir_t,
    pub pos: lfs_off_t,
    pub head: [lfs_block_t; 2usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of lfs_dir"][::core::mem::size_of::<lfs_dir>() - 56usize];
    ["Alignment of lfs_dir"][::core::mem::align_of::<lfs_dir>() - 8usize];
    ["Offset of field: lfs_dir::next"][::core::mem::offset_of!(lfs_dir, next) - 0usize];
    ["Offset of field: lfs_dir::id"][::core::mem::offset_of!(lfs_dir, id) - 8usize];
    ["Offset of field: lfs_dir::type_"][::core::mem::offset_of!(lfs_dir, type_) - 10usize];
    ["Offset of field: lfs_dir::m"][::core::mem::offset_of!(lfs_dir, m) - 12usize];
    ["Offset of field: lfs_dir::pos"][::core::mem::offset_of!(lfs_dir, pos) - 44usize];
    ["Offset of field: lfs_dir::head"][::core::mem::offset_of!(lfs_dir, head) - 48usize];
};
impl Default for lfs_dir {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type lfs_dir_t = lfs_dir;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct lfs_file {
    pub next: *mut lfs_file,
    pub id: u16,
    pub type_: u8,
    pub m: lfs_mdir_t,
    pub ctz: lfs_file_lfs_ctz,
    pub flags: u32,
    pub pos: lfs_off_t,
    pub block: lfs_block_t,
    pub off: lfs_off_t,
    pub cache: lfs_cache_t,
    pub cfg: *const lfs_file_config,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct lfs_file_lfs_ctz {
    pub head: lfs_block_t,
    pub size: lfs_size_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of lfs_file_lfs_ctz"][::core::mem::size_of::<lfs_file_lfs_ctz>() - 8usize];
    ["Alignment of lfs_file_lfs_ctz"][::core::mem::align_of::<lfs_file_lfs_ctz>() - 4usize];
    ["Offset of field: lfs_file_lfs_ctz::head"]
        [::core::mem::offset_of!(lfs_file_lfs_ctz, head) - 0usize];
    ["Offset of field: lfs_file_lfs_ctz::size"]
        [::core::mem::offset_of!(lfs_file_lfs_ctz, size) - 4usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of lfs_file"][::core::mem::size_of::<lfs_file>() - 104usize];
    ["Alignment of lfs_file"][::core::mem::align_of::<lfs_file>() - 8usize];
    ["Offset of field: lfs_file::next"][::core::mem::offset_of!(lfs_file, next) - 0usize];
    ["Offset of field: lfs_file::id"][::core::mem::offset_of!(lfs_file, id) - 8usize];
    ["Offset of field: lfs_file::type_"][::core::mem::offset_of!(lfs_file, type_) - 10usize];
    ["Offset of field: lfs_file::m"][::core::mem::offset_of!(lfs_file, m) - 12usize];
    ["Offset of field: lfs_file::ctz"][::core::mem::offset_of!(lfs_file, ctz) - 44usize];
    ["Offset of field: lfs_file::flags"][::core::mem::offset_of!(lfs_file, flags) - 52usize];
    ["Offset of field: lfs_file::pos"][::core::mem::offset_of!(lfs_file, pos) - 56usize];
    ["Offset of field: lfs_file::block"][::core::mem::offset_of!(lfs_file, block) - 60usize];
    ["Offset of field: lfs_file::off"][::core::mem::offset_of!(lfs_file, off) - 64usize];
    ["Offset of field: lfs_file::cache"][::core::mem::offset_of!(lfs_file, cache) - 72usize];
    ["Offset of field: lfs_file::cfg"][::core::mem::offset_of!(lfs_file, cfg) - 96usize];
};
impl Default for lfs_file {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type lfs_file_t = lfs_file;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct lfs_superblock {
    pub version: u32,
    pub block_size: lfs_size_t,
    pub block_count: lfs_size_t,
    pub name_max: lfs_size_t,
    pub file_max: lfs_size_t,
    pub attr_max: lfs_size_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of lfs_superblock"][::core::mem::size_of::<lfs_superblock>() - 24usize];
    ["Alignment of lfs_superblock"][::core::mem::align_of::<lfs_superblock>() - 4usize];
    ["Offset of field: lfs_superblock::version"]
        [::core::mem::offset_of!(lfs_superblock, version) - 0usize];
    ["Offset of field: lfs_superblock::block_size"]
        [::core::mem::offset_of!(lfs_superblock, block_size) - 4usize];
    ["Offset of field: lfs_superblock::block_count"]
        [::core::mem::offset_of!(lfs_superblock, block_count) - 8usize];
    ["Offset of field: lfs_superblock::name_max"]
        [::core::mem::offset_of!(lfs_superblock, name_max) - 12usize];
    ["Offset of field: lfs_superblock::file_max"]
        [::core::mem::offset_of!(lfs_superblock, file_max) - 16usize];
    ["Offset of field: lfs_superblock::attr_max"]
        [::core::mem::offset_of!(lfs_superblock, attr_max) - 20usize];
};
pub type lfs_superblock_t = lfs_superblock;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct lfs_gstate {
    pub tag: u32,
    pub pair: [lfs_block_t; 2usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of lfs_gstate"][::core::mem::size_of::<lfs_gstate>() - 12usize];
    ["Alignment of lfs_gstate"][::core::mem::align_of::<lfs_gstate>() - 4usize];
    ["Offset of field: lfs_gstate::tag"][::core::mem::offset_of!(lfs_gstate, tag) - 0usize];
    ["Offset of field: lfs_gstate::pair"][::core::mem::offset_of!(lfs_gstate, pair) - 4usize];
};
pub type lfs_gstate_t = lfs_gstate;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct lfs {
    pub rcache: lfs_cache_t,
    pub pcache: lfs_cache_t,
    pub root: [lfs_block_t; 2usize],
    pub mlist: *mut lfs_lfs_mlist,
    pub seed: u32,
    pub gstate: lfs_gstate_t,
    pub gdisk: lfs_gstate_t,
    pub gdelta: lfs_gstate_t,
    pub lookahead: lfs_lfs_lookahead,
    pub cfg: *const lfs_config,
    pub block_count: lfs_size_t,
    pub name_max: lfs_size_t,
    pub file_max: lfs_size_t,
    pub attr_max: lfs_size_t,
    pub inline_max: lfs_size_t,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct lfs_lfs_mlist {
    pub next: *mut lfs_lfs_mlist,
    pub id: u16,
    pub type_: u8,
    pub m: lfs_mdir_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of lfs_lfs_mlist"][::core::mem::size_of::<lfs_lfs_mlist>() - 48usize];
    ["Alignment of lfs_lfs_mlist"][::core::mem::align_of::<lfs_lfs_mlist>() - 8usize];
    ["Offset of field: lfs_lfs_mlist::next"][::core::mem::offset_of!(lfs_lfs_mlist, next) - 0usize];
    ["Offset of field: lfs_lfs_mlist::id"][::core::mem::offset_of!(lfs_lfs_mlist, id) - 8usize];
    ["Offset of field: lfs_lfs_mlist::type_"]
        [::core::mem::offset_of!(lfs_lfs_mlist, type_) - 10usize];
    ["Offset of field: lfs_lfs_mlist::m"][::core::mem::offset_of!(lfs_lfs_mlist, m) - 12usize];
};
impl Default for lfs_lfs_mlist {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct lfs_lfs_lookahead {
    pub start: lfs_block_t,
    pub size: lfs_block_t,
    pub next: lfs_block_t,
    pub ckpoint: lfs_block_t,
    pub buffer: *mut u8,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of lfs_lfs_lookahead"][::core::mem::size_of::<lfs_lfs_lookahead>() - 24usize];
    ["Alignment of lfs_lfs_lookahead"][::core::mem::align_of::<lfs_lfs_lookahead>() - 8usize];
    ["Offset of field: lfs_lfs_lookahead::start"]
        [::core::mem::offset_of!(lfs_lfs_lookahead, start) - 0usize];
    ["Offset of field: lfs_lfs_lookahead::size"]
        [::core::mem::offset_of!(lfs_lfs_lookahead, size) - 4usize];
    ["Offset of field: lfs_lfs_lookahead::next"]
        [::core::mem::offset_of!(lfs_lfs_lookahead, next) - 8usize];
    ["Offset of field: lfs_lfs_lookahead::ckpoint"]
        [::core::mem::offset_of!(lfs_lfs_lookahead, ckpoint) - 12usize];
    ["Offset of field: lfs_lfs_lookahead::buffer"]
        [::core::mem::offset_of!(lfs_lfs_lookahead, buffer) - 16usize];
};
impl Default for lfs_lfs_lookahead {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of lfs"][::core::mem::size_of::<lfs>() - 160usize];
    ["Alignment of lfs"][::core::mem::align_of::<lfs>() - 8usize];
    ["Offset of field: lfs::rcache"][::core::mem::offset_of!(lfs, rcache) - 0usize];
    ["Offset of field: lfs::pcache"][::core::mem::offset_of!(lfs, pcache) - 24usize];
    ["Offset of field: lfs::root"][::core::mem::offset_of!(lfs, root) - 48usize];
    ["Offset of field: lfs::mlist"][::core::mem::offset_of!(lfs, mlist) - 56usize];
    ["Offset of field: lfs::seed"][::core::mem::offset_of!(lfs, seed) - 64usize];
    ["Offset of field: lfs::gstate"][::core::mem::offset_of!(lfs, gstate) - 68usize];
    ["Offset of field: lfs::gdisk"][::core::mem::offset_of!(lfs, gdisk) - 80usize];
    ["Offset of field: lfs::gdelta"][::core::mem::offset_of!(lfs, gdelta) - 92usize];
    ["Offset of field: lfs::lookahead"][::core::mem::offset_of!(lfs, lookahead) - 104usize];
    ["Offset of field: lfs::cfg"][::core::mem::offset_of!(lfs, cfg) - 128usize];
    ["Offset of field: lfs::block_count"][::core::mem::offset_of!(lfs, block_count) - 136usize];
    ["Offset of field: lfs::name_max"][::core::mem::offset_of!(lfs, name_max) - 140usize];
    ["Offset of field: lfs::file_max"][::core::mem::offset_of!(lfs, file_max) - 144usize];
    ["Offset of field: lfs::attr_max"][::core::mem::offset_of!(lfs, attr_max) - 148usize];
    ["Offset of field: lfs::inline_max"][::core::mem::offset_of!(lfs, inline_max) - 152usize];
};
impl Default for lfs {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type lfs_t = lfs;
unsafe extern "C" {
    pub fn lfs_format(lfs: *mut lfs_t, config: *const lfs_config) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn lfs_mount(lfs: *mut lfs_t, config: *const lfs_config) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn lfs_unmount(lfs: *mut lfs_t) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn lfs_remove(lfs: *mut lfs_t, path: *const ::core::ffi::c_char) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn lfs_rename(
        lfs: *mut lfs_t,
        oldpath: *const ::core::ffi::c_char,
        newpath: *const ::core::ffi::c_char,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn lfs_stat(
        lfs: *mut lfs_t,
        path: *const ::core::ffi::c_char,
        info: *mut lfs_info,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn lfs_getattr(
        lfs: *mut lfs_t,
        path: *const ::core::ffi::c_char,
        type_: u8,
        buffer: *mut ::core::ffi::c_void,
        size: lfs_size_t,
    ) -> lfs_ssize_t;
}
unsafe extern "C" {
    pub fn lfs_setattr(
        lfs: *mut lfs_t,
        path: *const ::core::ffi::c_char,
        type_: u8,
        buffer: *const ::core::ffi::c_void,
        size: lfs_size_t,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn lfs_removeattr(
        lfs: *mut lfs_t,
        path: *const ::core::ffi::c_char,
        type_: u8,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn lfs_file_open(
        lfs: *mut lfs_t,
        file: *mut lfs_file_t,
        path: *const ::core::ffi::c_char,
        flags: ::core::ffi::c_int,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn lfs_file_opencfg(
        lfs: *mut lfs_t,
        file: *mut lfs_file_t,
        path: *const ::core::ffi::c_char,
        flags: ::core::ffi::c_int,
        config: *const lfs_file_config,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn lfs_file_close(lfs: *mut lfs_t, file: *mut lfs_file_t) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn lfs_file_sync(lfs: *mut lfs_t, file: *mut lfs_file_t) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn lfs_file_read(
        lfs: *mut lfs_t,
        file: *mut lfs_file_t,
        buffer: *mut ::core::ffi::c_void,
        size: lfs_size_t,
    ) -> lfs_ssize_t;
}
unsafe extern "C" {
    pub fn lfs_file_write(
        lfs: *mut lfs_t,
        file: *mut lfs_file_t,
        buffer: *const ::core::ffi::c_void,
        size: lfs_size_t,
    ) -> lfs_ssize_t;
}
unsafe extern "C" {
    pub fn lfs_file_seek(
        lfs: *mut lfs_t,
        file: *mut lfs_file_t,
        off: lfs_soff_t,
        whence: ::core::ffi::c_int,
    ) -> lfs_soff_t;
}
unsafe extern "C" {
    pub fn lfs_file_truncate(
        lfs: *mut lfs_t,
        file: *mut lfs_file_t,
        size: lfs_off_t,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn lfs_file_tell(lfs: *mut lfs_t, file: *mut lfs_file_t) -> lfs_soff_t;
}
unsafe extern "C" {
    pub fn lfs_file_rewind(lfs: *mut lfs_t, file: *mut lfs_file_t) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn lfs_file_size(lfs: *mut lfs_t, file: *mut lfs_file_t) -> lfs_soff_t;
}
unsafe extern "C" {
    pub fn lfs_mkdir(lfs: *mut lfs_t, path: *const ::core::ffi::c_char) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn lfs_dir_open(
        lfs: *mut lfs_t,
        dir: *mut lfs_dir_t,
        path: *const ::core::ffi::c_char,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn lfs_dir_close(lfs: *mut lfs_t, dir: *mut lfs_dir_t) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn lfs_dir_read(
        lfs: *mut lfs_t,
        dir: *mut lfs_dir_t,
        info: *mut lfs_info,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn lfs_dir_seek(lfs: *mut lfs_t, dir: *mut lfs_dir_t, off: lfs_off_t)
    -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn lfs_dir_tell(lfs: *mut lfs_t, dir: *mut lfs_dir_t) -> lfs_soff_t;
}
unsafe extern "C" {
    pub fn lfs_dir_rewind(lfs: *mut lfs_t, dir: *mut lfs_dir_t) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    #[doc = " Filesystem-level filesystem operations"]
    pub fn lfs_fs_stat(lfs: *mut lfs_t, fsinfo: *mut lfs_fsinfo) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn lfs_fs_size(lfs: *mut lfs_t) -> lfs_ssize_t;
}
unsafe extern "C" {
    pub fn lfs_fs_traverse(
        lfs: *mut lfs_t,
        cb: ::core::option::Option<
            unsafe extern "C" fn(
                arg1: *mut ::core::ffi::c_void,
                arg2: lfs_block_t,
            ) -> ::core::ffi::c_int,
        >,
        data: *mut ::core::ffi::c_void,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn lfs_fs_mkconsistent(lfs: *mut lfs_t) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn lfs_fs_gc(lfs: *mut lfs_t) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn lfs_fs_grow(lfs: *mut lfs_t, block_count: lfs_size_t) -> ::core::ffi::c_int;
}
pub type __builtin_va_list = [__va_list_tag; 1usize];
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __va_list_tag {
    pub gp_offset: ::core::ffi::c_uint,
    pub fp_offset: ::core::ffi::c_uint,
    pub overflow_arg_area: *mut ::core::ffi::c_void,
    pub reg_save_area: *mut ::core::ffi::c_void,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of __va_list_tag"][::core::mem::size_of::<__va_list_tag>() - 24usize];
    ["Alignment of __va_list_tag"][::core::mem::align_of::<__va_list_tag>() - 8usize];
    ["Offset of field: __va_list_tag::gp_offset"]
        [::core::mem::offset_of!(__va_list_tag, gp_offset) - 0usize];
    ["Offset of field: __va_list_tag::fp_offset"]
        [::core::mem::offset_of!(__va_list_tag, fp_offset) - 4usize];
    ["Offset of field: __va_list_tag::overflow_arg_area"]
        [::core::mem::offset_of!(__va_list_tag, overflow_arg_area) - 8usize];
    ["Offset of field: __va_list_tag::reg_save_area"]
        [::core::mem::offset_of!(__va_list_tag, reg_save_area) - 16usize];
};
impl Default for __va_list_tag {
    fn default() -> Self {
        let mut s = ::core::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::core::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}