1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
8743
8744
8745
8746
8747
8748
8749
8750
8751
8752
8753
8754
8755
8756
8757
8758
8759
8760
8761
8762
8763
8764
8765
8766
8767
8768
8769
8770
8771
8772
8773
8774
8775
8776
8777
8778
8779
8780
8781
8782
8783
8784
8785
8786
8787
8788
8789
8790
8791
8792
8793
8794
8795
8796
8797
8798
8799
8800
8801
8802
8803
8804
8805
8806
8807
8808
8809
8810
8811
8812
8813
8814
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826
8827
8828
8829
8830
8831
8832
8833
8834
8835
8836
8837
8838
8839
8840
8841
8842
8843
8844
8845
8846
8847
8848
8849
8850
8851
8852
8853
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868
8869
8870
8871
8872
8873
8874
8875
8876
8877
8878
8879
8880
8881
8882
8883
8884
8885
8886
8887
8888
8889
8890
8891
8892
8893
8894
8895
8896
8897
8898
8899
8900
8901
8902
8903
8904
8905
8906
8907
8908
8909
8910
8911
8912
8913
8914
8915
8916
8917
8918
8919
8920
8921
8922
8923
8924
8925
8926
8927
8928
8929
8930
8931
8932
8933
8934
8935
8936
8937
8938
8939
8940
8941
8942
8943
8944
8945
8946
8947
8948
8949
8950
8951
8952
8953
8954
8955
8956
8957
8958
8959
8960
8961
8962
8963
8964
8965
8966
8967
8968
8969
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995
8996
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080
9081
9082
9083
9084
9085
9086
9087
9088
9089
9090
9091
9092
9093
9094
9095
9096
9097
9098
9099
9100
9101
9102
9103
9104
9105
9106
9107
9108
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136
9137
9138
9139
9140
9141
9142
9143
9144
9145
9146
9147
9148
9149
9150
9151
9152
9153
9154
9155
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170
9171
9172
9173
9174
9175
9176
9177
9178
9179
9180
9181
9182
9183
9184
9185
9186
9187
9188
9189
9190
9191
9192
9193
9194
9195
9196
9197
9198
9199
9200
9201
9202
9203
9204
9205
9206
9207
9208
9209
9210
9211
9212
9213
9214
9215
9216
9217
9218
9219
9220
9221
9222
9223
9224
9225
9226
9227
9228
9229
9230
9231
9232
9233
9234
9235
9236
9237
9238
9239
9240
9241
9242
9243
9244
9245
9246
9247
9248
9249
9250
9251
9252
9253
9254
9255
9256
9257
9258
9259
9260
9261
9262
9263
9264
9265
9266
9267
9268
9269
9270
9271
9272
9273
9274
9275
9276
9277
9278
9279
9280
9281
9282
9283
9284
9285
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299
9300
9301
9302
9303
9304
9305
9306
9307
9308
9309
9310
9311
9312
9313
9314
9315
9316
9317
9318
9319
9320
9321
9322
9323
9324
9325
9326
9327
9328
9329
9330
9331
9332
9333
9334
9335
9336
9337
9338
9339
9340
9341
9342
9343
9344
9345
9346
9347
9348
9349
9350
9351
9352
9353
9354
9355
9356
9357
9358
9359
9360
9361
9362
9363
9364
9365
9366
9367
9368
9369
9370
9371
9372
9373
9374
9375
9376
9377
9378
9379
9380
9381
9382
9383
9384
9385
9386
9387
9388
9389
9390
9391
9392
9393
9394
9395
9396
9397
9398
9399
9400
9401
9402
9403
9404
9405
9406
9407
9408
9409
9410
9411
9412
9413
9414
9415
9416
9417
9418
9419
9420
9421
9422
9423
9424
9425
9426
9427
9428
9429
9430
9431
9432
9433
9434
9435
9436
9437
9438
9439
9440
9441
9442
9443
9444
9445
9446
9447
9448
9449
9450
9451
9452
9453
9454
9455
9456
9457
9458
9459
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469
9470
9471
9472
9473
9474
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843
9844
9845
9846
9847
9848
9849
9850
9851
9852
9853
9854
9855
9856
9857
9858
9859
9860
9861
9862
9863
9864
9865
9866
9867
9868
9869
9870
9871
9872
9873
9874
9875
9876
9877
9878
9879
9880
9881
9882
9883
9884
9885
9886
9887
9888
9889
9890
9891
9892
9893
9894
9895
9896
9897
9898
9899
9900
9901
9902
9903
9904
9905
9906
9907
9908
9909
9910
9911
9912
9913
9914
9915
9916
9917
9918
9919
9920
9921
9922
9923
9924
9925
9926
9927
9928
9929
9930
9931
9932
9933
9934
9935
9936
9937
9938
9939
9940
9941
9942
9943
9944
9945
9946
9947
9948
9949
9950
9951
9952
9953
9954
9955
9956
9957
9958
9959
9960
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993
9994
9995
9996
9997
9998
9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302
11303
11304
11305
11306
11307
11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451
11452
11453
11454
11455
11456
11457
11458
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473
11474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622
11623
11624
11625
11626
11627
11628
11629
11630
11631
11632
11633
11634
11635
11636
11637
11638
11639
11640
11641
11642
11643
11644
11645
11646
11647
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669
11670
11671
11672
11673
11674
11675
11676
11677
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711
11712
11713
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809
11810
11811
11812
11813
11814
11815
11816
11817
11818
11819
11820
11821
11822
11823
11824
11825
11826
11827
11828
11829
11830
11831
11832
11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848
11849
11850
11851
11852
11853
11854
11855
11856
11857
11858
11859
11860
11861
11862
11863
11864
11865
11866
11867
11868
11869
11870
11871
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
11987
11988
11989
11990
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
12015
12016
12017
12018
12019
12020
12021
12022
12023
12024
12025
12026
12027
12028
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239
12240
12241
12242
12243
12244
12245
12246
12247
12248
12249
12250
12251
12252
12253
12254
12255
12256
12257
12258
12259
12260
12261
12262
12263
12264
12265
12266
12267
12268
12269
12270
12271
12272
12273
12274
12275
12276
12277
12278
12279
12280
12281
12282
12283
12284
12285
12286
12287
12288
12289
12290
12291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
12317
12318
12319
12320
12321
12322
12323
12324
12325
12326
12327
12328
12329
12330
12331
12332
12333
12334
12335
12336
12337
12338
12339
12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350
12351
12352
12353
12354
12355
12356
12357
12358
12359
12360
12361
12362
12363
12364
12365
12366
12367
12368
12369
12370
12371
12372
12373
12374
12375
12376
12377
12378
12379
12380
12381
12382
12383
12384
12385
12386
12387
12388
12389
12390
12391
12392
12393
12394
12395
12396
12397
12398
12399
12400
12401
12402
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415
12416
12417
12418
12419
12420
12421
12422
12423
12424
12425
12426
12427
12428
12429
12430
12431
12432
12433
12434
12435
12436
12437
12438
12439
12440
12441
12442
12443
12444
12445
12446
12447
12448
12449
12450
12451
12452
12453
12454
12455
12456
12457
12458
12459
12460
12461
12462
12463
12464
12465
12466
12467
12468
12469
12470
12471
12472
12473
12474
12475
12476
12477
12478
12479
12480
12481
12482
12483
12484
12485
12486
12487
12488
12489
12490
12491
12492
12493
12494
12495
12496
12497
12498
12499
12500
12501
12502
12503
12504
12505
12506
12507
12508
12509
12510
12511
12512
12513
12514
12515
12516
12517
12518
12519
12520
12521
12522
12523
12524
12525
12526
12527
12528
12529
12530
12531
12532
12533
12534
12535
12536
12537
12538
12539
12540
12541
12542
12543
12544
12545
12546
12547
12548
12549
12550
12551
12552
12553
12554
12555
12556
12557
12558
12559
12560
12561
12562
12563
12564
12565
12566
12567
12568
12569
12570
12571
12572
12573
12574
12575
12576
12577
12578
12579
12580
12581
12582
12583
12584
12585
12586
12587
12588
12589
12590
12591
12592
12593
12594
12595
12596
12597
12598
12599
12600
12601
12602
12603
12604
12605
12606
12607
12608
12609
12610
12611
12612
12613
12614
12615
12616
12617
12618
12619
12620
12621
12622
12623
12624
12625
12626
12627
12628
12629
12630
12631
12632
12633
12634
12635
12636
12637
12638
12639
12640
12641
12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12669
12670
12671
12672
12673
12674
12675
12676
12677
12678
12679
12680
12681
12682
12683
12684
12685
12686
12687
12688
12689
12690
12691
12692
12693
12694
12695
12696
12697
12698
12699
12700
12701
12702
12703
12704
12705
12706
12707
12708
12709
12710
12711
12712
12713
12714
12715
12716
12717
12718
12719
12720
12721
12722
12723
12724
12725
12726
12727
12728
12729
12730
12731
12732
12733
12734
12735
12736
12737
12738
12739
12740
12741
12742
12743
12744
12745
12746
12747
12748
12749
12750
12751
12752
12753
12754
12755
12756
12757
12758
12759
12760
12761
12762
12763
12764
12765
12766
12767
12768
12769
12770
12771
12772
12773
12774
12775
12776
12777
12778
12779
12780
12781
12782
12783
12784
12785
12786
12787
12788
12789
12790
12791
12792
12793
12794
12795
12796
12797
12798
12799
12800
12801
12802
12803
12804
12805
12806
12807
12808
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819
12820
12821
12822
12823
12824
12825
12826
12827
12828
12829
12830
12831
12832
12833
12834
12835
12836
12837
12838
12839
12840
12841
12842
12843
12844
12845
12846
12847
12848
12849
12850
12851
12852
12853
12854
12855
12856
12857
12858
12859
12860
12861
12862
12863
12864
12865
12866
12867
12868
12869
12870
12871
12872
12873
12874
12875
12876
12877
12878
12879
12880
12881
12882
12883
12884
12885
12886
12887
12888
12889
12890
12891
12892
12893
12894
12895
12896
12897
12898
12899
12900
12901
12902
12903
12904
12905
12906
12907
12908
12909
12910
12911
12912
12913
12914
12915
12916
12917
12918
12919
12920
12921
12922
12923
12924
12925
12926
12927
12928
12929
12930
12931
12932
12933
12934
12935
12936
12937
12938
12939
12940
12941
12942
12943
12944
12945
12946
12947
12948
12949
12950
12951
12952
12953
12954
12955
12956
12957
12958
12959
12960
12961
12962
12963
12964
12965
12966
12967
12968
12969
12970
12971
12972
12973
12974
12975
12976
12977
12978
12979
12980
12981
12982
12983
12984
12985
12986
12987
12988
12989
12990
12991
12992
12993
12994
12995
12996
12997
12998
12999
13000
13001
13002
13003
13004
13005
13006
13007
13008
13009
13010
13011
13012
13013
13014
13015
13016
13017
13018
13019
13020
13021
13022
13023
13024
13025
13026
13027
13028
13029
13030
13031
13032
13033
13034
13035
13036
13037
13038
13039
13040
13041
13042
13043
13044
13045
13046
13047
13048
13049
13050
13051
13052
13053
13054
13055
13056
13057
13058
13059
13060
13061
13062
13063
13064
13065
13066
13067
13068
13069
13070
13071
13072
13073
13074
13075
13076
13077
13078
13079
13080
13081
13082
13083
13084
13085
13086
13087
13088
13089
13090
13091
13092
13093
13094
13095
13096
13097
13098
13099
13100
13101
13102
13103
13104
13105
13106
13107
13108
13109
13110
13111
13112
13113
13114
13115
13116
13117
13118
13119
13120
13121
13122
13123
13124
13125
13126
13127
13128
13129
13130
13131
13132
13133
13134
13135
13136
13137
13138
13139
13140
13141
13142
13143
13144
13145
13146
13147
13148
13149
13150
13151
13152
13153
13154
13155
13156
13157
13158
13159
13160
13161
13162
13163
13164
13165
13166
13167
13168
13169
13170
13171
13172
13173
13174
13175
13176
|
/* automatically generated by rust-bindgen 0.57.0 */
#[repr(C)]
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct __BindgenBitfieldUnit<Storage> {
storage: Storage,
}
impl<Storage> __BindgenBitfieldUnit<Storage> {
#[inline]
pub const fn new(storage: Storage) -> Self {
Self { storage }
}
}
impl<Storage> __BindgenBitfieldUnit<Storage>
where
Storage: AsRef<[u8]> + AsMut<[u8]>,
{
#[inline]
pub fn get_bit(&self, index: usize) -> bool {
debug_assert!(index / 8 < self.storage.as_ref().len());
let byte_index = index / 8;
let byte = self.storage.as_ref()[byte_index];
let bit_index = if cfg!(target_endian = "big") {
7 - (index % 8)
} else {
index % 8
};
let mask = 1 << bit_index;
byte & mask == mask
}
#[inline]
pub fn set_bit(&mut self, index: usize, val: bool) {
debug_assert!(index / 8 < self.storage.as_ref().len());
let byte_index = index / 8;
let byte = &mut self.storage.as_mut()[byte_index];
let bit_index = if cfg!(target_endian = "big") {
7 - (index % 8)
} else {
index % 8
};
let mask = 1 << bit_index;
if val {
*byte |= mask;
} else {
*byte &= !mask;
}
}
#[inline]
pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
debug_assert!(bit_width <= 64);
debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
let mut val = 0;
for i in 0..(bit_width as usize) {
if self.get_bit(i + bit_offset) {
let index = if cfg!(target_endian = "big") {
bit_width as usize - 1 - i
} else {
i
};
val |= 1 << index;
}
}
val
}
#[inline]
pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) {
debug_assert!(bit_width <= 64);
debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
for i in 0..(bit_width as usize) {
let mask = 1 << i;
let val_bit_is_set = val & mask == mask;
let index = if cfg!(target_endian = "big") {
bit_width as usize - 1 - i
} else {
i
};
self.set_bit(index + bit_offset, val_bit_is_set);
}
}
}
#[repr(C)]
#[derive(Default)]
pub struct __IncompleteArrayField<T>(::core::marker::PhantomData<T>, [T; 0]);
impl<T> __IncompleteArrayField<T> {
#[inline]
pub const fn new() -> Self {
__IncompleteArrayField(::core::marker::PhantomData, [])
}
#[inline]
pub fn as_ptr(&self) -> *const T {
self as *const _ as *const T
}
#[inline]
pub fn as_mut_ptr(&mut self) -> *mut T {
self as *mut _ as *mut T
}
#[inline]
pub unsafe fn as_slice(&self, len: usize) -> &[T] {
::core::slice::from_raw_parts(self.as_ptr(), len)
}
#[inline]
pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
::core::slice::from_raw_parts_mut(self.as_mut_ptr(), len)
}
}
impl<T> ::core::fmt::Debug for __IncompleteArrayField<T> {
fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
fmt.write_str("__IncompleteArrayField")
}
}
#[repr(C)]
pub struct __BindgenUnionField<T>(::core::marker::PhantomData<T>);
impl<T> __BindgenUnionField<T> {
#[inline]
pub const fn new() -> Self {
__BindgenUnionField(::core::marker::PhantomData)
}
#[inline]
pub unsafe fn as_ref(&self) -> &T {
::core::mem::transmute(self)
}
#[inline]
pub unsafe fn as_mut(&mut self) -> &mut T {
::core::mem::transmute(self)
}
}
impl<T> ::core::default::Default for __BindgenUnionField<T> {
#[inline]
fn default() -> Self {
Self::new()
}
}
impl<T> ::core::clone::Clone for __BindgenUnionField<T> {
#[inline]
fn clone(&self) -> Self {
Self::new()
}
}
impl<T> ::core::marker::Copy for __BindgenUnionField<T> {}
impl<T> ::core::fmt::Debug for __BindgenUnionField<T> {
fn fmt(&self, fmt: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
fmt.write_str("__BindgenUnionField")
}
}
impl<T> ::core::hash::Hash for __BindgenUnionField<T> {
fn hash<H: ::core::hash::Hasher>(&self, _state: &mut H) {}
}
impl<T> ::core::cmp::PartialEq for __BindgenUnionField<T> {
fn eq(&self, _other: &__BindgenUnionField<T>) -> bool {
true
}
}
impl<T> ::core::cmp::Eq for __BindgenUnionField<T> {}
pub const _NEWLIB_VERSION_H__: u32 = 1;
pub const _NEWLIB_VERSION: &'static [u8; 6usize] = b"3.3.0\0";
pub const __NEWLIB__: u32 = 3;
pub const __NEWLIB_MINOR__: u32 = 3;
pub const __NEWLIB_PATCHLEVEL__: u32 = 0;
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 _POSIX_MONOTONIC_CLOCK: u32 = 200112;
pub const _POSIX_TIMERS: u32 = 1;
pub const __have_longlong64: u32 = 1;
pub const __have_long32: 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 __int20: u32 = 2;
pub const __int20__: u32 = 2;
pub const __INT8: &'static [u8; 3usize] = b"hh\0";
pub const __INT16: &'static [u8; 2usize] = b"h\0";
pub const __INT64: &'static [u8; 3usize] = b"ll\0";
pub const __FAST8: &'static [u8; 3usize] = b"hh\0";
pub const __FAST16: &'static [u8; 2usize] = b"h\0";
pub const __FAST64: &'static [u8; 3usize] = b"ll\0";
pub const __LEAST8: &'static [u8; 3usize] = b"hh\0";
pub const __LEAST16: &'static [u8; 2usize] = b"h\0";
pub const __LEAST64: &'static [u8; 3usize] = b"ll\0";
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 __int_fast8_t_defined: u32 = 1;
pub const __int_fast16_t_defined: u32 = 1;
pub const __int_fast32_t_defined: u32 = 1;
pub const __int_fast64_t_defined: u32 = 1;
pub const WINT_MIN: u32 = 0;
pub const true_: u32 = 1;
pub const false_: u32 = 0;
pub const __bool_true_false_are_defined: u32 = 1;
pub const CUR_PROCESS_HANDLE: u32 = 4294934529;
pub const ARBITRATION_SIGNAL_ALL: i32 = -1;
pub const CUR_THREAD_HANDLE: u32 = 4294934528;
pub const SYSCLOCK_SOC: u32 = 16756991;
pub const SYSCLOCK_ARM9: u32 = 134055928;
pub const SYSCLOCK_ARM11: u32 = 268111856;
pub const SYSCLOCK_ARM11_NEW: u32 = 804335568;
pub const CPU_TICKS_PER_MSEC: f64 = 268111.856;
pub const CPU_TICKS_PER_USEC: f64 = 268.111856;
pub const OS_HEAP_AREA_BEGIN: u32 = 134217728;
pub const OS_HEAP_AREA_END: u32 = 234881024;
pub const OS_MAP_AREA_BEGIN: u32 = 268435456;
pub const OS_MAP_AREA_END: u32 = 335544320;
pub const OS_OLD_FCRAM_VADDR: u32 = 335544320;
pub const OS_OLD_FCRAM_PADDR: u32 = 536870912;
pub const OS_OLD_FCRAM_SIZE: u32 = 134217728;
pub const OS_QTMRAM_VADDR: u32 = 511705088;
pub const OS_QTMRAM_PADDR: u32 = 520093696;
pub const OS_QTMRAM_SIZE: u32 = 4194304;
pub const OS_MMIO_VADDR: u32 = 515899392;
pub const OS_MMIO_PADDR: u32 = 269484032;
pub const OS_MMIO_SIZE: u32 = 4194304;
pub const OS_VRAM_VADDR: u32 = 520093696;
pub const OS_VRAM_PADDR: u32 = 402653184;
pub const OS_VRAM_SIZE: u32 = 6291456;
pub const OS_DSPRAM_VADDR: u32 = 535822336;
pub const OS_DSPRAM_PADDR: u32 = 535822336;
pub const OS_DSPRAM_SIZE: u32 = 524288;
pub const OS_KERNELCFG_VADDR: u32 = 536346624;
pub const OS_SHAREDCFG_VADDR: u32 = 536350720;
pub const OS_FCRAM_VADDR: u32 = 805306368;
pub const OS_FCRAM_PADDR: u32 = 536870912;
pub const OS_FCRAM_SIZE: u32 = 268435456;
pub const __NEWLIB_H__: u32 = 1;
pub const _WANT_IO_C99_FORMATS: u32 = 1;
pub const _WANT_IO_LONG_LONG: u32 = 1;
pub const _WANT_IO_POS_ARGS: u32 = 1;
pub const _REENT_CHECK_VERIFY: u32 = 1;
pub const _MB_CAPABLE: u32 = 1;
pub const _MB_LEN_MAX: u32 = 8;
pub const HAVE_INITFINI_ARRAY: u32 = 1;
pub const _ATEXIT_DYNAMIC_ALLOC: u32 = 1;
pub const _HAVE_LONG_DOUBLE: u32 = 1;
pub const _HAVE_CC_INHIBIT_LOOP_TO_LIBCALL: u32 = 1;
pub const _LDBL_EQ_DBL: u32 = 1;
pub const _FVWRITE_IN_STREAMIO: u32 = 1;
pub const _FSEEK_OPTIMIZATION: u32 = 1;
pub const _UNBUF_STREAM_OPT: u32 = 1;
pub const __OBSOLETE_MATH_DEFAULT: u32 = 0;
pub const __OBSOLETE_MATH: u32 = 0;
pub const __RAND_MAX: u32 = 2147483647;
pub const GSP_SCREEN_TOP: u32 = 0;
pub const GSP_SCREEN_BOTTOM: u32 = 1;
pub const GSP_SCREEN_WIDTH: u32 = 240;
pub const GSP_SCREEN_HEIGHT_TOP: u32 = 400;
pub const GSP_SCREEN_HEIGHT_TOP_2X: u32 = 800;
pub const GSP_SCREEN_HEIGHT_BOTTOM: u32 = 320;
pub const CONSOLE_COLOR_BOLD: u32 = 1;
pub const CONSOLE_COLOR_FAINT: u32 = 2;
pub const CONSOLE_ITALIC: u32 = 4;
pub const CONSOLE_UNDERLINE: u32 = 8;
pub const CONSOLE_BLINK_SLOW: u32 = 16;
pub const CONSOLE_BLINK_FAST: u32 = 32;
pub const CONSOLE_COLOR_REVERSE: u32 = 64;
pub const CONSOLE_CONCEAL: u32 = 128;
pub const CONSOLE_CROSSED_OUT: u32 = 256;
pub const __GNUCLIKE_ASM: u32 = 3;
pub const __GNUCLIKE___TYPEOF: u32 = 1;
pub const __GNUCLIKE___OFFSETOF: 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 __BIT_TYPES_DEFINED__: u32 = 1;
pub const _LITTLE_ENDIAN: u32 = 1234;
pub const _BIG_ENDIAN: u32 = 4321;
pub const _PDP_ENDIAN: u32 = 3412;
pub const _BYTE_ORDER: u32 = 1234;
pub const _QUAD_HIGHWORD: u32 = 1;
pub const _QUAD_LOWWORD: u32 = 0;
pub const LITTLE_ENDIAN: u32 = 1234;
pub const BIG_ENDIAN: u32 = 4321;
pub const PDP_ENDIAN: u32 = 3412;
pub const BYTE_ORDER: u32 = 1234;
pub const FD_SETSIZE: u32 = 64;
pub const SCHED_OTHER: u32 = 0;
pub const SCHED_FIFO: u32 = 1;
pub const SCHED_RR: u32 = 2;
pub const PTHREAD_SCOPE_PROCESS: u32 = 0;
pub const PTHREAD_SCOPE_SYSTEM: u32 = 1;
pub const PTHREAD_INHERIT_SCHED: u32 = 1;
pub const PTHREAD_EXPLICIT_SCHED: u32 = 2;
pub const PTHREAD_CREATE_DETACHED: u32 = 0;
pub const PTHREAD_CREATE_JOINABLE: u32 = 1;
pub const CSND_NUM_CHANNELS: u32 = 32;
pub const FRIEND_SCREEN_NAME_SIZE: u32 = 11;
pub const FRIEND_COMMENT_SIZE: u32 = 33;
pub const FRIEND_LIST_SIZE: u32 = 100;
pub const HTTPC_RESULTCODE_DOWNLOADPENDING: u32 = 3628113963;
pub const HTTPC_RESULTCODE_NOTFOUND: u32 = 3628113960;
pub const HTTPC_RESULTCODE_TIMEDOUT: u32 = 3626016873;
pub const UDS_MAXNODES: u32 = 16;
pub const UDS_BROADCAST_NETWORKNODEID: u32 = 65535;
pub const UDS_HOST_NETWORKNODEID: u32 = 1;
pub const UDS_DEFAULT_RECVBUFSIZE: u32 = 11824;
pub const UDS_DATAFRAME_MAXSIZE: u32 = 1478;
pub const DST_NONE: u32 = 0;
pub const DST_USA: u32 = 1;
pub const DST_AUST: u32 = 2;
pub const DST_WET: u32 = 3;
pub const DST_MET: u32 = 4;
pub const DST_EET: u32 = 5;
pub const DST_CAN: u32 = 6;
pub const SBT_MAX: u64 = 9223372036854775807;
pub const ITIMER_REAL: u32 = 0;
pub const ITIMER_VIRTUAL: u32 = 1;
pub const ITIMER_PROF: u32 = 2;
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 _N_LISTS: u32 = 30;
pub const _CLOCKS_PER_SEC_: u32 = 100;
pub const CLOCKS_PER_SEC: u32 = 100;
pub const CLK_TCK: u32 = 100;
pub const SIGEV_NONE: u32 = 1;
pub const SIGEV_SIGNAL: u32 = 2;
pub const SIGEV_THREAD: u32 = 3;
pub const SI_USER: u32 = 1;
pub const SI_QUEUE: u32 = 2;
pub const SI_TIMER: u32 = 3;
pub const SI_ASYNCIO: u32 = 4;
pub const SI_MESGQ: u32 = 5;
pub const SA_NOCLDSTOP: u32 = 1;
pub const MINSIGSTKSZ: u32 = 2048;
pub const SIGSTKSZ: u32 = 8192;
pub const SS_ONSTACK: u32 = 1;
pub const SS_DISABLE: u32 = 2;
pub const SIG_SETMASK: u32 = 0;
pub const SIG_BLOCK: u32 = 1;
pub const SIG_UNBLOCK: u32 = 2;
pub const SIGHUP: u32 = 1;
pub const SIGINT: u32 = 2;
pub const SIGQUIT: u32 = 3;
pub const SIGILL: u32 = 4;
pub const SIGTRAP: u32 = 5;
pub const SIGIOT: u32 = 6;
pub const SIGABRT: u32 = 6;
pub const SIGEMT: u32 = 7;
pub const SIGFPE: u32 = 8;
pub const SIGKILL: u32 = 9;
pub const SIGBUS: u32 = 10;
pub const SIGSEGV: u32 = 11;
pub const SIGSYS: u32 = 12;
pub const SIGPIPE: u32 = 13;
pub const SIGALRM: u32 = 14;
pub const SIGTERM: u32 = 15;
pub const SIGURG: u32 = 16;
pub const SIGSTOP: u32 = 17;
pub const SIGTSTP: u32 = 18;
pub const SIGCONT: u32 = 19;
pub const SIGCHLD: u32 = 20;
pub const SIGCLD: u32 = 20;
pub const SIGTTIN: u32 = 21;
pub const SIGTTOU: u32 = 22;
pub const SIGIO: u32 = 23;
pub const SIGPOLL: u32 = 23;
pub const SIGXCPU: u32 = 24;
pub const SIGXFSZ: u32 = 25;
pub const SIGVTALRM: u32 = 26;
pub const SIGPROF: u32 = 27;
pub const SIGWINCH: u32 = 28;
pub const SIGLOST: u32 = 29;
pub const SIGUSR1: u32 = 30;
pub const SIGUSR2: u32 = 31;
pub const NSIG: u32 = 32;
pub const CLOCK_ENABLED: u32 = 1;
pub const CLOCK_DISABLED: u32 = 0;
pub const CLOCK_ALLOWED: u32 = 1;
pub const CLOCK_DISALLOWED: u32 = 0;
pub const TIMER_ABSTIME: u32 = 4;
pub const SOL_SOCKET: u32 = 65535;
pub const PF_UNSPEC: u32 = 0;
pub const PF_INET: u32 = 2;
pub const PF_INET6: u32 = 23;
pub const AF_UNSPEC: u32 = 0;
pub const AF_INET: u32 = 2;
pub const AF_INET6: u32 = 23;
pub const SOCK_STREAM: u32 = 1;
pub const SOCK_DGRAM: u32 = 2;
pub const MSG_OOB: u32 = 1;
pub const MSG_PEEK: u32 = 2;
pub const MSG_DONTWAIT: u32 = 4;
pub const MSG_DONTROUTE: u32 = 0;
pub const MSG_WAITALL: u32 = 0;
pub const MSG_MORE: u32 = 0;
pub const MSG_NOSIGNAL: u32 = 0;
pub const SHUT_RD: u32 = 0;
pub const SHUT_WR: u32 = 1;
pub const SHUT_RDWR: u32 = 2;
pub const SO_REUSEADDR: u32 = 4;
pub const SO_LINGER: u32 = 128;
pub const SO_OOBINLINE: u32 = 256;
pub const SO_SNDBUF: u32 = 4097;
pub const SO_RCVBUF: u32 = 4098;
pub const SO_SNDLOWAT: u32 = 4099;
pub const SO_RCVLOWAT: u32 = 4100;
pub const SO_TYPE: u32 = 4104;
pub const SO_ERROR: u32 = 4105;
pub const SO_BROADCAST: u32 = 0;
pub const INADDR_LOOPBACK: u32 = 2130706433;
pub const INADDR_ANY: u32 = 0;
pub const INADDR_BROADCAST: u32 = 4294967295;
pub const INADDR_NONE: u32 = 4294967295;
pub const INET_ADDRSTRLEN: u32 = 16;
pub const IPPROTO_IP: u32 = 0;
pub const IPPROTO_UDP: u32 = 17;
pub const IPPROTO_TCP: u32 = 6;
pub const IP_TOS: u32 = 7;
pub const IP_TTL: u32 = 8;
pub const IP_MULTICAST_LOOP: u32 = 9;
pub const IP_MULTICAST_TTL: u32 = 10;
pub const IP_ADD_MEMBERSHIP: u32 = 11;
pub const IP_DROP_MEMBERSHIP: u32 = 12;
pub const SOL_CONFIG: u32 = 65534;
pub const ROUTING_FLAG_G: u32 = 1;
pub const TCP_STATE_CLOSED: u32 = 1;
pub const TCP_STATE_LISTEN: u32 = 2;
pub const TCP_STATE_ESTABLISHED: u32 = 5;
pub const TCP_STATE_FINWAIT1: u32 = 6;
pub const TCP_STATE_FINWAIT2: u32 = 7;
pub const TCP_STATE_CLOSE_WAIT: u32 = 8;
pub const TCP_STATE_LAST_ACK: u32 = 9;
pub const TCP_STATE_TIME_WAIT: u32 = 11;
pub const MVD_STATUS_OK: u32 = 94208;
pub const MVD_STATUS_PARAMSET: u32 = 94209;
pub const MVD_STATUS_BUSY: u32 = 94210;
pub const MVD_STATUS_FRAMEREADY: u32 = 94211;
pub const MVD_STATUS_INCOMPLETEPROCESSING: u32 = 94212;
pub const MVD_STATUS_NALUPROCFLAG: u32 = 94215;
pub const MVD_DEFAULT_WORKBUF_SIZE: u32 = 9438920;
pub const NFC_ERR_INVALID_STATE: u32 = 3366024704;
pub const NFC_ERR_APPDATA_UNINITIALIZED: u32 = 3366024736;
pub const NFC_ERR_AMIIBO_NOTSETUP: u32 = 3366024744;
pub const NFC_ERR_APPID_MISMATCH: u32 = 3366024760;
pub const NFC_ERR_DATACORRUPTION0: u32 = 3368121868;
pub const NFC_ERR_DATACORRUPTION1: u32 = 3366024728;
pub const NFC_STARTSCAN_DEFAULTINPUT: u32 = 0;
pub const GPUREG_0000: u32 = 0;
pub const GPUREG_0001: u32 = 1;
pub const GPUREG_0002: u32 = 2;
pub const GPUREG_0003: u32 = 3;
pub const GPUREG_0004: u32 = 4;
pub const GPUREG_0005: u32 = 5;
pub const GPUREG_0006: u32 = 6;
pub const GPUREG_0007: u32 = 7;
pub const GPUREG_0008: u32 = 8;
pub const GPUREG_0009: u32 = 9;
pub const GPUREG_000A: u32 = 10;
pub const GPUREG_000B: u32 = 11;
pub const GPUREG_000C: u32 = 12;
pub const GPUREG_000D: u32 = 13;
pub const GPUREG_000E: u32 = 14;
pub const GPUREG_000F: u32 = 15;
pub const GPUREG_FINALIZE: u32 = 16;
pub const GPUREG_0011: u32 = 17;
pub const GPUREG_0012: u32 = 18;
pub const GPUREG_0013: u32 = 19;
pub const GPUREG_0014: u32 = 20;
pub const GPUREG_0015: u32 = 21;
pub const GPUREG_0016: u32 = 22;
pub const GPUREG_0017: u32 = 23;
pub const GPUREG_0018: u32 = 24;
pub const GPUREG_0019: u32 = 25;
pub const GPUREG_001A: u32 = 26;
pub const GPUREG_001B: u32 = 27;
pub const GPUREG_001C: u32 = 28;
pub const GPUREG_001D: u32 = 29;
pub const GPUREG_001E: u32 = 30;
pub const GPUREG_001F: u32 = 31;
pub const GPUREG_0020: u32 = 32;
pub const GPUREG_0021: u32 = 33;
pub const GPUREG_0022: u32 = 34;
pub const GPUREG_0023: u32 = 35;
pub const GPUREG_0024: u32 = 36;
pub const GPUREG_0025: u32 = 37;
pub const GPUREG_0026: u32 = 38;
pub const GPUREG_0027: u32 = 39;
pub const GPUREG_0028: u32 = 40;
pub const GPUREG_0029: u32 = 41;
pub const GPUREG_002A: u32 = 42;
pub const GPUREG_002B: u32 = 43;
pub const GPUREG_002C: u32 = 44;
pub const GPUREG_002D: u32 = 45;
pub const GPUREG_002E: u32 = 46;
pub const GPUREG_002F: u32 = 47;
pub const GPUREG_0030: u32 = 48;
pub const GPUREG_0031: u32 = 49;
pub const GPUREG_0032: u32 = 50;
pub const GPUREG_0033: u32 = 51;
pub const GPUREG_0034: u32 = 52;
pub const GPUREG_0035: u32 = 53;
pub const GPUREG_0036: u32 = 54;
pub const GPUREG_0037: u32 = 55;
pub const GPUREG_0038: u32 = 56;
pub const GPUREG_0039: u32 = 57;
pub const GPUREG_003A: u32 = 58;
pub const GPUREG_003B: u32 = 59;
pub const GPUREG_003C: u32 = 60;
pub const GPUREG_003D: u32 = 61;
pub const GPUREG_003E: u32 = 62;
pub const GPUREG_003F: u32 = 63;
pub const GPUREG_FACECULLING_CONFIG: u32 = 64;
pub const GPUREG_VIEWPORT_WIDTH: u32 = 65;
pub const GPUREG_VIEWPORT_INVW: u32 = 66;
pub const GPUREG_VIEWPORT_HEIGHT: u32 = 67;
pub const GPUREG_VIEWPORT_INVH: u32 = 68;
pub const GPUREG_0045: u32 = 69;
pub const GPUREG_0046: u32 = 70;
pub const GPUREG_FRAGOP_CLIP: u32 = 71;
pub const GPUREG_FRAGOP_CLIP_DATA0: u32 = 72;
pub const GPUREG_FRAGOP_CLIP_DATA1: u32 = 73;
pub const GPUREG_FRAGOP_CLIP_DATA2: u32 = 74;
pub const GPUREG_FRAGOP_CLIP_DATA3: u32 = 75;
pub const GPUREG_004C: u32 = 76;
pub const GPUREG_DEPTHMAP_SCALE: u32 = 77;
pub const GPUREG_DEPTHMAP_OFFSET: u32 = 78;
pub const GPUREG_SH_OUTMAP_TOTAL: u32 = 79;
pub const GPUREG_SH_OUTMAP_O0: u32 = 80;
pub const GPUREG_SH_OUTMAP_O1: u32 = 81;
pub const GPUREG_SH_OUTMAP_O2: u32 = 82;
pub const GPUREG_SH_OUTMAP_O3: u32 = 83;
pub const GPUREG_SH_OUTMAP_O4: u32 = 84;
pub const GPUREG_SH_OUTMAP_O5: u32 = 85;
pub const GPUREG_SH_OUTMAP_O6: u32 = 86;
pub const GPUREG_0057: u32 = 87;
pub const GPUREG_0058: u32 = 88;
pub const GPUREG_0059: u32 = 89;
pub const GPUREG_005A: u32 = 90;
pub const GPUREG_005B: u32 = 91;
pub const GPUREG_005C: u32 = 92;
pub const GPUREG_005D: u32 = 93;
pub const GPUREG_005E: u32 = 94;
pub const GPUREG_005F: u32 = 95;
pub const GPUREG_0060: u32 = 96;
pub const GPUREG_EARLYDEPTH_FUNC: u32 = 97;
pub const GPUREG_EARLYDEPTH_TEST1: u32 = 98;
pub const GPUREG_EARLYDEPTH_CLEAR: u32 = 99;
pub const GPUREG_SH_OUTATTR_MODE: u32 = 100;
pub const GPUREG_SCISSORTEST_MODE: u32 = 101;
pub const GPUREG_SCISSORTEST_POS: u32 = 102;
pub const GPUREG_SCISSORTEST_DIM: u32 = 103;
pub const GPUREG_VIEWPORT_XY: u32 = 104;
pub const GPUREG_0069: u32 = 105;
pub const GPUREG_EARLYDEPTH_DATA: u32 = 106;
pub const GPUREG_006B: u32 = 107;
pub const GPUREG_006C: u32 = 108;
pub const GPUREG_DEPTHMAP_ENABLE: u32 = 109;
pub const GPUREG_RENDERBUF_DIM: u32 = 110;
pub const GPUREG_SH_OUTATTR_CLOCK: u32 = 111;
pub const GPUREG_0070: u32 = 112;
pub const GPUREG_0071: u32 = 113;
pub const GPUREG_0072: u32 = 114;
pub const GPUREG_0073: u32 = 115;
pub const GPUREG_0074: u32 = 116;
pub const GPUREG_0075: u32 = 117;
pub const GPUREG_0076: u32 = 118;
pub const GPUREG_0077: u32 = 119;
pub const GPUREG_0078: u32 = 120;
pub const GPUREG_0079: u32 = 121;
pub const GPUREG_007A: u32 = 122;
pub const GPUREG_007B: u32 = 123;
pub const GPUREG_007C: u32 = 124;
pub const GPUREG_007D: u32 = 125;
pub const GPUREG_007E: u32 = 126;
pub const GPUREG_007F: u32 = 127;
pub const GPUREG_TEXUNIT_CONFIG: u32 = 128;
pub const GPUREG_TEXUNIT0_BORDER_COLOR: u32 = 129;
pub const GPUREG_TEXUNIT0_DIM: u32 = 130;
pub const GPUREG_TEXUNIT0_PARAM: u32 = 131;
pub const GPUREG_TEXUNIT0_LOD: u32 = 132;
pub const GPUREG_TEXUNIT0_ADDR1: u32 = 133;
pub const GPUREG_TEXUNIT0_ADDR2: u32 = 134;
pub const GPUREG_TEXUNIT0_ADDR3: u32 = 135;
pub const GPUREG_TEXUNIT0_ADDR4: u32 = 136;
pub const GPUREG_TEXUNIT0_ADDR5: u32 = 137;
pub const GPUREG_TEXUNIT0_ADDR6: u32 = 138;
pub const GPUREG_TEXUNIT0_SHADOW: u32 = 139;
pub const GPUREG_008C: u32 = 140;
pub const GPUREG_008D: u32 = 141;
pub const GPUREG_TEXUNIT0_TYPE: u32 = 142;
pub const GPUREG_LIGHTING_ENABLE0: u32 = 143;
pub const GPUREG_0090: u32 = 144;
pub const GPUREG_TEXUNIT1_BORDER_COLOR: u32 = 145;
pub const GPUREG_TEXUNIT1_DIM: u32 = 146;
pub const GPUREG_TEXUNIT1_PARAM: u32 = 147;
pub const GPUREG_TEXUNIT1_LOD: u32 = 148;
pub const GPUREG_TEXUNIT1_ADDR: u32 = 149;
pub const GPUREG_TEXUNIT1_TYPE: u32 = 150;
pub const GPUREG_0097: u32 = 151;
pub const GPUREG_0098: u32 = 152;
pub const GPUREG_TEXUNIT2_BORDER_COLOR: u32 = 153;
pub const GPUREG_TEXUNIT2_DIM: u32 = 154;
pub const GPUREG_TEXUNIT2_PARAM: u32 = 155;
pub const GPUREG_TEXUNIT2_LOD: u32 = 156;
pub const GPUREG_TEXUNIT2_ADDR: u32 = 157;
pub const GPUREG_TEXUNIT2_TYPE: u32 = 158;
pub const GPUREG_009F: u32 = 159;
pub const GPUREG_00A0: u32 = 160;
pub const GPUREG_00A1: u32 = 161;
pub const GPUREG_00A2: u32 = 162;
pub const GPUREG_00A3: u32 = 163;
pub const GPUREG_00A4: u32 = 164;
pub const GPUREG_00A5: u32 = 165;
pub const GPUREG_00A6: u32 = 166;
pub const GPUREG_00A7: u32 = 167;
pub const GPUREG_TEXUNIT3_PROCTEX0: u32 = 168;
pub const GPUREG_TEXUNIT3_PROCTEX1: u32 = 169;
pub const GPUREG_TEXUNIT3_PROCTEX2: u32 = 170;
pub const GPUREG_TEXUNIT3_PROCTEX3: u32 = 171;
pub const GPUREG_TEXUNIT3_PROCTEX4: u32 = 10;
pub const GPUREG_TEXUNIT3_PROCTEX5: u32 = 13;
pub const GPUREG_00AE: u32 = 174;
pub const GPUREG_PROCTEX_LUT: u32 = 175;
pub const GPUREG_PROCTEX_LUT_DATA0: u32 = 176;
pub const GPUREG_PROCTEX_LUT_DATA1: u32 = 177;
pub const GPUREG_PROCTEX_LUT_DATA2: u32 = 178;
pub const GPUREG_PROCTEX_LUT_DATA3: u32 = 179;
pub const GPUREG_PROCTEX_LUT_DATA4: u32 = 180;
pub const GPUREG_PROCTEX_LUT_DATA5: u32 = 181;
pub const GPUREG_PROCTEX_LUT_DATA6: u32 = 182;
pub const GPUREG_PROCTEX_LUT_DATA7: u32 = 183;
pub const GPUREG_00B8: u32 = 184;
pub const GPUREG_00B9: u32 = 185;
pub const GPUREG_00BA: u32 = 186;
pub const GPUREG_00BB: u32 = 187;
pub const GPUREG_00BC: u32 = 188;
pub const GPUREG_00BD: u32 = 189;
pub const GPUREG_00BE: u32 = 190;
pub const GPUREG_00BF: u32 = 191;
pub const GPUREG_TEXENV0_SOURCE: u32 = 192;
pub const GPUREG_TEXENV0_OPERAND: u32 = 193;
pub const GPUREG_TEXENV0_COMBINER: u32 = 194;
pub const GPUREG_TEXENV0_COLOR: u32 = 195;
pub const GPUREG_TEXENV0_SCALE: u32 = 196;
pub const GPUREG_00C5: u32 = 197;
pub const GPUREG_00C6: u32 = 198;
pub const GPUREG_00C7: u32 = 199;
pub const GPUREG_TEXENV1_SOURCE: u32 = 200;
pub const GPUREG_TEXENV1_OPERAND: u32 = 201;
pub const GPUREG_TEXENV1_COMBINER: u32 = 202;
pub const GPUREG_TEXENV1_COLOR: u32 = 203;
pub const GPUREG_TEXENV1_SCALE: u32 = 204;
pub const GPUREG_00CD: u32 = 205;
pub const GPUREG_00CE: u32 = 206;
pub const GPUREG_00CF: u32 = 207;
pub const GPUREG_TEXENV2_SOURCE: u32 = 208;
pub const GPUREG_TEXENV2_OPERAND: u32 = 209;
pub const GPUREG_TEXENV2_COMBINER: u32 = 210;
pub const GPUREG_TEXENV2_COLOR: u32 = 211;
pub const GPUREG_TEXENV2_SCALE: u32 = 212;
pub const GPUREG_00D5: u32 = 213;
pub const GPUREG_00D6: u32 = 214;
pub const GPUREG_00D7: u32 = 215;
pub const GPUREG_TEXENV3_SOURCE: u32 = 216;
pub const GPUREG_TEXENV3_OPERAND: u32 = 217;
pub const GPUREG_TEXENV3_COMBINER: u32 = 218;
pub const GPUREG_TEXENV3_COLOR: u32 = 219;
pub const GPUREG_TEXENV3_SCALE: u32 = 220;
pub const GPUREG_00DD: u32 = 221;
pub const GPUREG_00DE: u32 = 222;
pub const GPUREG_00DF: u32 = 223;
pub const GPUREG_TEXENV_UPDATE_BUFFER: u32 = 224;
pub const GPUREG_FOG_COLOR: u32 = 225;
pub const GPUREG_00E2: u32 = 226;
pub const GPUREG_00E3: u32 = 227;
pub const GPUREG_GAS_ATTENUATION: u32 = 228;
pub const GPUREG_GAS_ACCMAX: u32 = 229;
pub const GPUREG_FOG_LUT_INDEX: u32 = 230;
pub const GPUREG_00E7: u32 = 231;
pub const GPUREG_FOG_LUT_DATA0: u32 = 232;
pub const GPUREG_FOG_LUT_DATA1: u32 = 233;
pub const GPUREG_FOG_LUT_DATA2: u32 = 234;
pub const GPUREG_FOG_LUT_DATA3: u32 = 235;
pub const GPUREG_FOG_LUT_DATA4: u32 = 236;
pub const GPUREG_FOG_LUT_DATA5: u32 = 237;
pub const GPUREG_FOG_LUT_DATA6: u32 = 238;
pub const GPUREG_FOG_LUT_DATA7: u32 = 239;
pub const GPUREG_TEXENV4_SOURCE: u32 = 240;
pub const GPUREG_TEXENV4_OPERAND: u32 = 241;
pub const GPUREG_TEXENV4_COMBINER: u32 = 242;
pub const GPUREG_TEXENV4_COLOR: u32 = 243;
pub const GPUREG_TEXENV4_SCALE: u32 = 244;
pub const GPUREG_00F5: u32 = 245;
pub const GPUREG_00F6: u32 = 246;
pub const GPUREG_00F7: u32 = 247;
pub const GPUREG_TEXENV5_SOURCE: u32 = 248;
pub const GPUREG_TEXENV5_OPERAND: u32 = 249;
pub const GPUREG_TEXENV5_COMBINER: u32 = 250;
pub const GPUREG_TEXENV5_COLOR: u32 = 251;
pub const GPUREG_TEXENV5_SCALE: u32 = 252;
pub const GPUREG_TEXENV_BUFFER_COLOR: u32 = 253;
pub const GPUREG_00FE: u32 = 254;
pub const GPUREG_00FF: u32 = 255;
pub const GPUREG_COLOR_OPERATION: u32 = 256;
pub const GPUREG_BLEND_FUNC: u32 = 257;
pub const GPUREG_LOGIC_OP: u32 = 258;
pub const GPUREG_BLEND_COLOR: u32 = 259;
pub const GPUREG_FRAGOP_ALPHA_TEST: u32 = 260;
pub const GPUREG_STENCIL_TEST: u32 = 261;
pub const GPUREG_STENCIL_OP: u32 = 262;
pub const GPUREG_DEPTH_COLOR_MASK: u32 = 263;
pub const GPUREG_0108: u32 = 264;
pub const GPUREG_0109: u32 = 265;
pub const GPUREG_010A: u32 = 266;
pub const GPUREG_010B: u32 = 267;
pub const GPUREG_010C: u32 = 268;
pub const GPUREG_010D: u32 = 269;
pub const GPUREG_010E: u32 = 270;
pub const GPUREG_010F: u32 = 271;
pub const GPUREG_FRAMEBUFFER_INVALIDATE: u32 = 272;
pub const GPUREG_FRAMEBUFFER_FLUSH: u32 = 273;
pub const GPUREG_COLORBUFFER_READ: u32 = 274;
pub const GPUREG_COLORBUFFER_WRITE: u32 = 275;
pub const GPUREG_DEPTHBUFFER_READ: u32 = 276;
pub const GPUREG_DEPTHBUFFER_WRITE: u32 = 277;
pub const GPUREG_DEPTHBUFFER_FORMAT: u32 = 278;
pub const GPUREG_COLORBUFFER_FORMAT: u32 = 279;
pub const GPUREG_EARLYDEPTH_TEST2: u32 = 280;
pub const GPUREG_0119: u32 = 281;
pub const GPUREG_011A: u32 = 282;
pub const GPUREG_FRAMEBUFFER_BLOCK32: u32 = 283;
pub const GPUREG_DEPTHBUFFER_LOC: u32 = 284;
pub const GPUREG_COLORBUFFER_LOC: u32 = 285;
pub const GPUREG_FRAMEBUFFER_DIM: u32 = 286;
pub const GPUREG_011F: u32 = 287;
pub const GPUREG_GAS_LIGHT_XY: u32 = 288;
pub const GPUREG_GAS_LIGHT_Z: u32 = 289;
pub const GPUREG_GAS_LIGHT_Z_COLOR: u32 = 290;
pub const GPUREG_GAS_LUT_INDEX: u32 = 291;
pub const GPUREG_GAS_LUT_DATA: u32 = 292;
pub const GPUREG_GAS_ACCMAX_FEEDBACK: u32 = 293;
pub const GPUREG_GAS_DELTAZ_DEPTH: u32 = 294;
pub const GPUREG_0127: u32 = 295;
pub const GPUREG_0128: u32 = 296;
pub const GPUREG_0129: u32 = 297;
pub const GPUREG_012A: u32 = 298;
pub const GPUREG_012B: u32 = 299;
pub const GPUREG_012C: u32 = 300;
pub const GPUREG_012D: u32 = 301;
pub const GPUREG_012E: u32 = 302;
pub const GPUREG_012F: u32 = 303;
pub const GPUREG_FRAGOP_SHADOW: u32 = 304;
pub const GPUREG_0131: u32 = 305;
pub const GPUREG_0132: u32 = 306;
pub const GPUREG_0133: u32 = 307;
pub const GPUREG_0134: u32 = 308;
pub const GPUREG_0135: u32 = 309;
pub const GPUREG_0136: u32 = 310;
pub const GPUREG_0137: u32 = 311;
pub const GPUREG_0138: u32 = 312;
pub const GPUREG_0139: u32 = 313;
pub const GPUREG_013A: u32 = 314;
pub const GPUREG_013B: u32 = 315;
pub const GPUREG_013C: u32 = 316;
pub const GPUREG_013D: u32 = 317;
pub const GPUREG_013E: u32 = 318;
pub const GPUREG_013F: u32 = 319;
pub const GPUREG_LIGHT0_SPECULAR0: u32 = 320;
pub const GPUREG_LIGHT0_SPECULAR1: u32 = 321;
pub const GPUREG_LIGHT0_DIFFUSE: u32 = 322;
pub const GPUREG_LIGHT0_AMBIENT: u32 = 323;
pub const GPUREG_LIGHT0_XY: u32 = 324;
pub const GPUREG_LIGHT0_Z: u32 = 325;
pub const GPUREG_LIGHT0_SPOTDIR_XY: u32 = 326;
pub const GPUREG_LIGHT0_SPOTDIR_Z: u32 = 327;
pub const GPUREG_0148: u32 = 328;
pub const GPUREG_LIGHT0_CONFIG: u32 = 329;
pub const GPUREG_LIGHT0_ATTENUATION_BIAS: u32 = 330;
pub const GPUREG_LIGHT0_ATTENUATION_SCALE: u32 = 331;
pub const GPUREG_014C: u32 = 332;
pub const GPUREG_014D: u32 = 333;
pub const GPUREG_014E: u32 = 334;
pub const GPUREG_014F: u32 = 335;
pub const GPUREG_LIGHT1_SPECULAR0: u32 = 336;
pub const GPUREG_LIGHT1_SPECULAR1: u32 = 337;
pub const GPUREG_LIGHT1_DIFFUSE: u32 = 338;
pub const GPUREG_LIGHT1_AMBIENT: u32 = 339;
pub const GPUREG_LIGHT1_XY: u32 = 340;
pub const GPUREG_LIGHT1_Z: u32 = 341;
pub const GPUREG_LIGHT1_SPOTDIR_XY: u32 = 342;
pub const GPUREG_LIGHT1_SPOTDIR_Z: u32 = 343;
pub const GPUREG_0158: u32 = 344;
pub const GPUREG_LIGHT1_CONFIG: u32 = 345;
pub const GPUREG_LIGHT1_ATTENUATION_BIAS: u32 = 346;
pub const GPUREG_LIGHT1_ATTENUATION_SCALE: u32 = 347;
pub const GPUREG_015C: u32 = 348;
pub const GPUREG_015D: u32 = 349;
pub const GPUREG_015E: u32 = 350;
pub const GPUREG_015F: u32 = 351;
pub const GPUREG_LIGHT2_SPECULAR0: u32 = 352;
pub const GPUREG_LIGHT2_SPECULAR1: u32 = 353;
pub const GPUREG_LIGHT2_DIFFUSE: u32 = 354;
pub const GPUREG_LIGHT2_AMBIENT: u32 = 355;
pub const GPUREG_LIGHT2_XY: u32 = 356;
pub const GPUREG_LIGHT2_Z: u32 = 357;
pub const GPUREG_LIGHT2_SPOTDIR_XY: u32 = 358;
pub const GPUREG_LIGHT2_SPOTDIR_Z: u32 = 359;
pub const GPUREG_0168: u32 = 360;
pub const GPUREG_LIGHT2_CONFIG: u32 = 361;
pub const GPUREG_LIGHT2_ATTENUATION_BIAS: u32 = 362;
pub const GPUREG_LIGHT2_ATTENUATION_SCALE: u32 = 363;
pub const GPUREG_016C: u32 = 364;
pub const GPUREG_016D: u32 = 365;
pub const GPUREG_016E: u32 = 366;
pub const GPUREG_016F: u32 = 367;
pub const GPUREG_LIGHT3_SPECULAR0: u32 = 368;
pub const GPUREG_LIGHT3_SPECULAR1: u32 = 369;
pub const GPUREG_LIGHT3_DIFFUSE: u32 = 370;
pub const GPUREG_LIGHT3_AMBIENT: u32 = 371;
pub const GPUREG_LIGHT3_XY: u32 = 372;
pub const GPUREG_LIGHT3_Z: u32 = 373;
pub const GPUREG_LIGHT3_SPOTDIR_XY: u32 = 374;
pub const GPUREG_LIGHT3_SPOTDIR_Z: u32 = 375;
pub const GPUREG_0178: u32 = 376;
pub const GPUREG_LIGHT3_CONFIG: u32 = 377;
pub const GPUREG_LIGHT3_ATTENUATION_BIAS: u32 = 378;
pub const GPUREG_LIGHT3_ATTENUATION_SCALE: u32 = 379;
pub const GPUREG_017C: u32 = 380;
pub const GPUREG_017D: u32 = 381;
pub const GPUREG_017E: u32 = 382;
pub const GPUREG_017F: u32 = 383;
pub const GPUREG_LIGHT4_SPECULAR0: u32 = 384;
pub const GPUREG_LIGHT4_SPECULAR1: u32 = 385;
pub const GPUREG_LIGHT4_DIFFUSE: u32 = 386;
pub const GPUREG_LIGHT4_AMBIENT: u32 = 387;
pub const GPUREG_LIGHT4_XY: u32 = 388;
pub const GPUREG_LIGHT4_Z: u32 = 389;
pub const GPUREG_LIGHT4_SPOTDIR_XY: u32 = 390;
pub const GPUREG_LIGHT4_SPOTDIR_Z: u32 = 391;
pub const GPUREG_0188: u32 = 392;
pub const GPUREG_LIGHT4_CONFIG: u32 = 393;
pub const GPUREG_LIGHT4_ATTENUATION_BIAS: u32 = 394;
pub const GPUREG_LIGHT4_ATTENUATION_SCALE: u32 = 395;
pub const GPUREG_018C: u32 = 396;
pub const GPUREG_018D: u32 = 397;
pub const GPUREG_018E: u32 = 398;
pub const GPUREG_018F: u32 = 399;
pub const GPUREG_LIGHT5_SPECULAR0: u32 = 400;
pub const GPUREG_LIGHT5_SPECULAR1: u32 = 401;
pub const GPUREG_LIGHT5_DIFFUSE: u32 = 402;
pub const GPUREG_LIGHT5_AMBIENT: u32 = 403;
pub const GPUREG_LIGHT5_XY: u32 = 404;
pub const GPUREG_LIGHT5_Z: u32 = 405;
pub const GPUREG_LIGHT5_SPOTDIR_XY: u32 = 406;
pub const GPUREG_LIGHT5_SPOTDIR_Z: u32 = 407;
pub const GPUREG_0198: u32 = 408;
pub const GPUREG_LIGHT5_CONFIG: u32 = 409;
pub const GPUREG_LIGHT5_ATTENUATION_BIAS: u32 = 410;
pub const GPUREG_LIGHT5_ATTENUATION_SCALE: u32 = 411;
pub const GPUREG_019C: u32 = 412;
pub const GPUREG_019D: u32 = 413;
pub const GPUREG_019E: u32 = 414;
pub const GPUREG_019F: u32 = 415;
pub const GPUREG_LIGHT6_SPECULAR0: u32 = 416;
pub const GPUREG_LIGHT6_SPECULAR1: u32 = 417;
pub const GPUREG_LIGHT6_DIFFUSE: u32 = 418;
pub const GPUREG_LIGHT6_AMBIENT: u32 = 419;
pub const GPUREG_LIGHT6_XY: u32 = 420;
pub const GPUREG_LIGHT6_Z: u32 = 421;
pub const GPUREG_LIGHT6_SPOTDIR_XY: u32 = 422;
pub const GPUREG_LIGHT6_SPOTDIR_Z: u32 = 423;
pub const GPUREG_01A8: u32 = 424;
pub const GPUREG_LIGHT6_CONFIG: u32 = 425;
pub const GPUREG_LIGHT6_ATTENUATION_BIAS: u32 = 426;
pub const GPUREG_LIGHT6_ATTENUATION_SCALE: u32 = 427;
pub const GPUREG_01AC: u32 = 428;
pub const GPUREG_01AD: u32 = 429;
pub const GPUREG_01AE: u32 = 430;
pub const GPUREG_01AF: u32 = 431;
pub const GPUREG_LIGHT7_SPECULAR0: u32 = 432;
pub const GPUREG_LIGHT7_SPECULAR1: u32 = 433;
pub const GPUREG_LIGHT7_DIFFUSE: u32 = 434;
pub const GPUREG_LIGHT7_AMBIENT: u32 = 435;
pub const GPUREG_LIGHT7_XY: u32 = 436;
pub const GPUREG_LIGHT7_Z: u32 = 437;
pub const GPUREG_LIGHT7_SPOTDIR_XY: u32 = 438;
pub const GPUREG_LIGHT7_SPOTDIR_Z: u32 = 439;
pub const GPUREG_01B8: u32 = 440;
pub const GPUREG_LIGHT7_CONFIG: u32 = 441;
pub const GPUREG_LIGHT7_ATTENUATION_BIAS: u32 = 442;
pub const GPUREG_LIGHT7_ATTENUATION_SCALE: u32 = 443;
pub const GPUREG_01BC: u32 = 444;
pub const GPUREG_01BD: u32 = 445;
pub const GPUREG_01BE: u32 = 446;
pub const GPUREG_01BF: u32 = 447;
pub const GPUREG_LIGHTING_AMBIENT: u32 = 448;
pub const GPUREG_01C1: u32 = 449;
pub const GPUREG_LIGHTING_NUM_LIGHTS: u32 = 450;
pub const GPUREG_LIGHTING_CONFIG0: u32 = 451;
pub const GPUREG_LIGHTING_CONFIG1: u32 = 452;
pub const GPUREG_LIGHTING_LUT_INDEX: u32 = 453;
pub const GPUREG_LIGHTING_ENABLE1: u32 = 454;
pub const GPUREG_01C7: u32 = 455;
pub const GPUREG_LIGHTING_LUT_DATA0: u32 = 456;
pub const GPUREG_LIGHTING_LUT_DATA1: u32 = 457;
pub const GPUREG_LIGHTING_LUT_DATA2: u32 = 458;
pub const GPUREG_LIGHTING_LUT_DATA3: u32 = 459;
pub const GPUREG_LIGHTING_LUT_DATA4: u32 = 460;
pub const GPUREG_LIGHTING_LUT_DATA5: u32 = 461;
pub const GPUREG_LIGHTING_LUT_DATA6: u32 = 462;
pub const GPUREG_LIGHTING_LUT_DATA7: u32 = 463;
pub const GPUREG_LIGHTING_LUTINPUT_ABS: u32 = 464;
pub const GPUREG_LIGHTING_LUTINPUT_SELECT: u32 = 465;
pub const GPUREG_LIGHTING_LUTINPUT_SCALE: u32 = 466;
pub const GPUREG_01D3: u32 = 467;
pub const GPUREG_01D4: u32 = 468;
pub const GPUREG_01D5: u32 = 469;
pub const GPUREG_01D6: u32 = 470;
pub const GPUREG_01D7: u32 = 471;
pub const GPUREG_01D8: u32 = 472;
pub const GPUREG_LIGHTING_LIGHT_PERMUTATION: u32 = 473;
pub const GPUREG_01DA: u32 = 474;
pub const GPUREG_01DB: u32 = 475;
pub const GPUREG_01DC: u32 = 476;
pub const GPUREG_01DD: u32 = 477;
pub const GPUREG_01DE: u32 = 478;
pub const GPUREG_01DF: u32 = 479;
pub const GPUREG_01E0: u32 = 480;
pub const GPUREG_01E1: u32 = 481;
pub const GPUREG_01E2: u32 = 482;
pub const GPUREG_01E3: u32 = 483;
pub const GPUREG_01E4: u32 = 484;
pub const GPUREG_01E5: u32 = 485;
pub const GPUREG_01E6: u32 = 486;
pub const GPUREG_01E7: u32 = 487;
pub const GPUREG_01E8: u32 = 488;
pub const GPUREG_01E9: u32 = 489;
pub const GPUREG_01EA: u32 = 490;
pub const GPUREG_01EB: u32 = 491;
pub const GPUREG_01EC: u32 = 492;
pub const GPUREG_01ED: u32 = 493;
pub const GPUREG_01EE: u32 = 494;
pub const GPUREG_01EF: u32 = 495;
pub const GPUREG_01F0: u32 = 496;
pub const GPUREG_01F1: u32 = 497;
pub const GPUREG_01F2: u32 = 498;
pub const GPUREG_01F3: u32 = 499;
pub const GPUREG_01F4: u32 = 500;
pub const GPUREG_01F5: u32 = 501;
pub const GPUREG_01F6: u32 = 502;
pub const GPUREG_01F7: u32 = 503;
pub const GPUREG_01F8: u32 = 504;
pub const GPUREG_01F9: u32 = 505;
pub const GPUREG_01FA: u32 = 506;
pub const GPUREG_01FB: u32 = 507;
pub const GPUREG_01FC: u32 = 508;
pub const GPUREG_01FD: u32 = 509;
pub const GPUREG_01FE: u32 = 510;
pub const GPUREG_01FF: u32 = 511;
pub const GPUREG_ATTRIBBUFFERS_LOC: u32 = 512;
pub const GPUREG_ATTRIBBUFFERS_FORMAT_LOW: u32 = 513;
pub const GPUREG_ATTRIBBUFFERS_FORMAT_HIGH: u32 = 514;
pub const GPUREG_ATTRIBBUFFER0_OFFSET: u32 = 515;
pub const GPUREG_ATTRIBBUFFER0_CONFIG1: u32 = 516;
pub const GPUREG_ATTRIBBUFFER0_CONFIG2: u32 = 517;
pub const GPUREG_ATTRIBBUFFER1_OFFSET: u32 = 518;
pub const GPUREG_ATTRIBBUFFER1_CONFIG1: u32 = 519;
pub const GPUREG_ATTRIBBUFFER1_CONFIG2: u32 = 520;
pub const GPUREG_ATTRIBBUFFER2_OFFSET: u32 = 521;
pub const GPUREG_ATTRIBBUFFER2_CONFIG1: u32 = 522;
pub const GPUREG_ATTRIBBUFFER2_CONFIG2: u32 = 523;
pub const GPUREG_ATTRIBBUFFER3_OFFSET: u32 = 524;
pub const GPUREG_ATTRIBBUFFER3_CONFIG1: u32 = 525;
pub const GPUREG_ATTRIBBUFFER3_CONFIG2: u32 = 526;
pub const GPUREG_ATTRIBBUFFER4_OFFSET: u32 = 527;
pub const GPUREG_ATTRIBBUFFER4_CONFIG1: u32 = 528;
pub const GPUREG_ATTRIBBUFFER4_CONFIG2: u32 = 529;
pub const GPUREG_ATTRIBBUFFER5_OFFSET: u32 = 530;
pub const GPUREG_ATTRIBBUFFER5_CONFIG1: u32 = 531;
pub const GPUREG_ATTRIBBUFFER5_CONFIG2: u32 = 532;
pub const GPUREG_ATTRIBBUFFER6_OFFSET: u32 = 533;
pub const GPUREG_ATTRIBBUFFER6_CONFIG1: u32 = 534;
pub const GPUREG_ATTRIBBUFFER6_CONFIG2: u32 = 535;
pub const GPUREG_ATTRIBBUFFER7_OFFSET: u32 = 536;
pub const GPUREG_ATTRIBBUFFER7_CONFIG1: u32 = 537;
pub const GPUREG_ATTRIBBUFFER7_CONFIG2: u32 = 538;
pub const GPUREG_ATTRIBBUFFER8_OFFSET: u32 = 539;
pub const GPUREG_ATTRIBBUFFER8_CONFIG1: u32 = 540;
pub const GPUREG_ATTRIBBUFFER8_CONFIG2: u32 = 541;
pub const GPUREG_ATTRIBBUFFER9_OFFSET: u32 = 542;
pub const GPUREG_ATTRIBBUFFER9_CONFIG1: u32 = 543;
pub const GPUREG_ATTRIBBUFFER9_CONFIG2: u32 = 544;
pub const GPUREG_ATTRIBBUFFERA_OFFSET: u32 = 545;
pub const GPUREG_ATTRIBBUFFERA_CONFIG1: u32 = 546;
pub const GPUREG_ATTRIBBUFFERA_CONFIG2: u32 = 547;
pub const GPUREG_ATTRIBBUFFERB_OFFSET: u32 = 548;
pub const GPUREG_ATTRIBBUFFERB_CONFIG1: u32 = 549;
pub const GPUREG_ATTRIBBUFFERB_CONFIG2: u32 = 550;
pub const GPUREG_INDEXBUFFER_CONFIG: u32 = 551;
pub const GPUREG_NUMVERTICES: u32 = 552;
pub const GPUREG_GEOSTAGE_CONFIG: u32 = 553;
pub const GPUREG_VERTEX_OFFSET: u32 = 554;
pub const GPUREG_022B: u32 = 555;
pub const GPUREG_022C: u32 = 556;
pub const GPUREG_POST_VERTEX_CACHE_NUM: u32 = 557;
pub const GPUREG_DRAWARRAYS: u32 = 558;
pub const GPUREG_DRAWELEMENTS: u32 = 559;
pub const GPUREG_0230: u32 = 560;
pub const GPUREG_VTX_FUNC: u32 = 561;
pub const GPUREG_FIXEDATTRIB_INDEX: u32 = 562;
pub const GPUREG_FIXEDATTRIB_DATA0: u32 = 563;
pub const GPUREG_FIXEDATTRIB_DATA1: u32 = 564;
pub const GPUREG_FIXEDATTRIB_DATA2: u32 = 565;
pub const GPUREG_0236: u32 = 566;
pub const GPUREG_0237: u32 = 567;
pub const GPUREG_CMDBUF_SIZE0: u32 = 568;
pub const GPUREG_CMDBUF_SIZE1: u32 = 569;
pub const GPUREG_CMDBUF_ADDR0: u32 = 570;
pub const GPUREG_CMDBUF_ADDR1: u32 = 571;
pub const GPUREG_CMDBUF_JUMP0: u32 = 572;
pub const GPUREG_CMDBUF_JUMP1: u32 = 573;
pub const GPUREG_023E: u32 = 574;
pub const GPUREG_023F: u32 = 575;
pub const GPUREG_0240: u32 = 576;
pub const GPUREG_0241: u32 = 577;
pub const GPUREG_VSH_NUM_ATTR: u32 = 578;
pub const GPUREG_0243: u32 = 579;
pub const GPUREG_VSH_COM_MODE: u32 = 580;
pub const GPUREG_START_DRAW_FUNC0: u32 = 581;
pub const GPUREG_0246: u32 = 582;
pub const GPUREG_0247: u32 = 583;
pub const GPUREG_0248: u32 = 584;
pub const GPUREG_0249: u32 = 585;
pub const GPUREG_VSH_OUTMAP_TOTAL1: u32 = 586;
pub const GPUREG_024B: u32 = 587;
pub const GPUREG_024C: u32 = 588;
pub const GPUREG_024D: u32 = 589;
pub const GPUREG_024E: u32 = 590;
pub const GPUREG_024F: u32 = 591;
pub const GPUREG_0250: u32 = 592;
pub const GPUREG_VSH_OUTMAP_TOTAL2: u32 = 593;
pub const GPUREG_GSH_MISC0: u32 = 594;
pub const GPUREG_GEOSTAGE_CONFIG2: u32 = 595;
pub const GPUREG_GSH_MISC1: u32 = 596;
pub const GPUREG_0255: u32 = 597;
pub const GPUREG_0256: u32 = 598;
pub const GPUREG_0257: u32 = 599;
pub const GPUREG_0258: u32 = 600;
pub const GPUREG_0259: u32 = 601;
pub const GPUREG_025A: u32 = 602;
pub const GPUREG_025B: u32 = 603;
pub const GPUREG_025C: u32 = 604;
pub const GPUREG_025D: u32 = 605;
pub const GPUREG_PRIMITIVE_CONFIG: u32 = 606;
pub const GPUREG_RESTART_PRIMITIVE: u32 = 607;
pub const GPUREG_0260: u32 = 608;
pub const GPUREG_0261: u32 = 609;
pub const GPUREG_0262: u32 = 610;
pub const GPUREG_0263: u32 = 611;
pub const GPUREG_0264: u32 = 612;
pub const GPUREG_0265: u32 = 613;
pub const GPUREG_0266: u32 = 614;
pub const GPUREG_0267: u32 = 615;
pub const GPUREG_0268: u32 = 616;
pub const GPUREG_0269: u32 = 617;
pub const GPUREG_026A: u32 = 618;
pub const GPUREG_026B: u32 = 619;
pub const GPUREG_026C: u32 = 620;
pub const GPUREG_026D: u32 = 621;
pub const GPUREG_026E: u32 = 622;
pub const GPUREG_026F: u32 = 623;
pub const GPUREG_0270: u32 = 624;
pub const GPUREG_0271: u32 = 625;
pub const GPUREG_0272: u32 = 626;
pub const GPUREG_0273: u32 = 627;
pub const GPUREG_0274: u32 = 628;
pub const GPUREG_0275: u32 = 629;
pub const GPUREG_0276: u32 = 630;
pub const GPUREG_0277: u32 = 631;
pub const GPUREG_0278: u32 = 632;
pub const GPUREG_0279: u32 = 633;
pub const GPUREG_027A: u32 = 634;
pub const GPUREG_027B: u32 = 635;
pub const GPUREG_027C: u32 = 636;
pub const GPUREG_027D: u32 = 637;
pub const GPUREG_027E: u32 = 638;
pub const GPUREG_027F: u32 = 639;
pub const GPUREG_GSH_BOOLUNIFORM: u32 = 640;
pub const GPUREG_GSH_INTUNIFORM_I0: u32 = 641;
pub const GPUREG_GSH_INTUNIFORM_I1: u32 = 642;
pub const GPUREG_GSH_INTUNIFORM_I2: u32 = 643;
pub const GPUREG_GSH_INTUNIFORM_I3: u32 = 644;
pub const GPUREG_0285: u32 = 645;
pub const GPUREG_0286: u32 = 646;
pub const GPUREG_0287: u32 = 647;
pub const GPUREG_0288: u32 = 648;
pub const GPUREG_GSH_INPUTBUFFER_CONFIG: u32 = 649;
pub const GPUREG_GSH_ENTRYPOINT: u32 = 650;
pub const GPUREG_GSH_ATTRIBUTES_PERMUTATION_LOW: u32 = 651;
pub const GPUREG_GSH_ATTRIBUTES_PERMUTATION_HIGH: u32 = 652;
pub const GPUREG_GSH_OUTMAP_MASK: u32 = 653;
pub const GPUREG_028E: u32 = 654;
pub const GPUREG_GSH_CODETRANSFER_END: u32 = 655;
pub const GPUREG_GSH_FLOATUNIFORM_CONFIG: u32 = 656;
pub const GPUREG_GSH_FLOATUNIFORM_DATA: u32 = 657;
pub const GPUREG_0299: u32 = 665;
pub const GPUREG_029A: u32 = 666;
pub const GPUREG_GSH_CODETRANSFER_CONFIG: u32 = 667;
pub const GPUREG_GSH_CODETRANSFER_DATA: u32 = 668;
pub const GPUREG_02A4: u32 = 676;
pub const GPUREG_GSH_OPDESCS_CONFIG: u32 = 677;
pub const GPUREG_GSH_OPDESCS_DATA: u32 = 678;
pub const GPUREG_02AE: u32 = 686;
pub const GPUREG_02AF: u32 = 687;
pub const GPUREG_VSH_BOOLUNIFORM: u32 = 688;
pub const GPUREG_VSH_INTUNIFORM_I0: u32 = 689;
pub const GPUREG_VSH_INTUNIFORM_I1: u32 = 690;
pub const GPUREG_VSH_INTUNIFORM_I2: u32 = 691;
pub const GPUREG_VSH_INTUNIFORM_I3: u32 = 692;
pub const GPUREG_02B5: u32 = 693;
pub const GPUREG_02B6: u32 = 694;
pub const GPUREG_02B7: u32 = 695;
pub const GPUREG_02B8: u32 = 696;
pub const GPUREG_VSH_INPUTBUFFER_CONFIG: u32 = 697;
pub const GPUREG_VSH_ENTRYPOINT: u32 = 698;
pub const GPUREG_VSH_ATTRIBUTES_PERMUTATION_LOW: u32 = 699;
pub const GPUREG_VSH_ATTRIBUTES_PERMUTATION_HIGH: u32 = 700;
pub const GPUREG_VSH_OUTMAP_MASK: u32 = 701;
pub const GPUREG_02BE: u32 = 702;
pub const GPUREG_VSH_CODETRANSFER_END: u32 = 703;
pub const GPUREG_VSH_FLOATUNIFORM_CONFIG: u32 = 704;
pub const GPUREG_VSH_FLOATUNIFORM_DATA: u32 = 705;
pub const GPUREG_02C9: u32 = 713;
pub const GPUREG_02CA: u32 = 714;
pub const GPUREG_VSH_CODETRANSFER_CONFIG: u32 = 715;
pub const GPUREG_VSH_CODETRANSFER_DATA: u32 = 716;
pub const GPUREG_02D4: u32 = 724;
pub const GPUREG_VSH_OPDESCS_CONFIG: u32 = 725;
pub const GPUREG_VSH_OPDESCS_DATA: u32 = 726;
pub const GPUREG_02DE: u32 = 734;
pub const GPUREG_02DF: u32 = 735;
pub const GPUREG_02E0: u32 = 736;
pub const GPUREG_02E1: u32 = 737;
pub const GPUREG_02E2: u32 = 738;
pub const GPUREG_02E3: u32 = 739;
pub const GPUREG_02E4: u32 = 740;
pub const GPUREG_02E5: u32 = 741;
pub const GPUREG_02E6: u32 = 742;
pub const GPUREG_02E7: u32 = 743;
pub const GPUREG_02E8: u32 = 744;
pub const GPUREG_02E9: u32 = 745;
pub const GPUREG_02EA: u32 = 746;
pub const GPUREG_02EB: u32 = 747;
pub const GPUREG_02EC: u32 = 748;
pub const GPUREG_02ED: u32 = 749;
pub const GPUREG_02EE: u32 = 750;
pub const GPUREG_02EF: u32 = 751;
pub const GPUREG_02F0: u32 = 752;
pub const GPUREG_02F1: u32 = 753;
pub const GPUREG_02F2: u32 = 754;
pub const GPUREG_02F3: u32 = 755;
pub const GPUREG_02F4: u32 = 756;
pub const GPUREG_02F5: u32 = 757;
pub const GPUREG_02F6: u32 = 758;
pub const GPUREG_02F7: u32 = 759;
pub const GPUREG_02F8: u32 = 760;
pub const GPUREG_02F9: u32 = 761;
pub const GPUREG_02FA: u32 = 762;
pub const GPUREG_02FB: u32 = 763;
pub const GPUREG_02FC: u32 = 764;
pub const GPUREG_02FD: u32 = 765;
pub const GPUREG_02FE: u32 = 766;
pub const GPUREG_02FF: u32 = 767;
pub const NDSP_SAMPLE_RATE: f64 = 32728.498046875;
pub const SWKBD_MAX_WORD_LEN: u32 = 40;
pub const SWKBD_MAX_BUTTON_TEXT_LEN: u32 = 16;
pub const SWKBD_MAX_HINT_TEXT_LEN: u32 = 64;
pub const SWKBD_MAX_CALLBACK_MSG_LEN: u32 = 256;
pub const MIISELECTOR_MAGIC: u32 = 333326543;
pub const MIISELECTOR_TITLE_LEN: u32 = 64;
pub const MIISELECTOR_GUESTMII_SLOTS: u32 = 6;
pub const MIISELECTOR_USERMII_SLOTS: u32 = 100;
pub const MIISELECTOR_GUESTMII_NAME_LEN: u32 = 12;
pub const ARCHIVE_DIRITER_MAGIC: u32 = 1751347809;
pub type __int8_t = ::libc::c_schar;
pub type __uint8_t = ::libc::c_uchar;
pub type __int16_t = ::libc::c_short;
pub type __uint16_t = ::libc::c_ushort;
pub type __int32_t = ::libc::c_int;
pub type __uint32_t = ::libc::c_uint;
pub type __int64_t = ::libc::c_longlong;
pub type __uint64_t = ::libc::c_ulonglong;
pub type __int_least8_t = ::libc::c_schar;
pub type __uint_least8_t = ::libc::c_uchar;
pub type __int_least16_t = ::libc::c_short;
pub type __uint_least16_t = ::libc::c_ushort;
pub type __int_least32_t = ::libc::c_int;
pub type __uint_least32_t = ::libc::c_uint;
pub type __int_least64_t = ::libc::c_longlong;
pub type __uint_least64_t = ::libc::c_ulonglong;
pub type __intmax_t = ::libc::c_longlong;
pub type __uintmax_t = ::libc::c_ulonglong;
pub type __intptr_t = ::libc::c_int;
pub type __uintptr_t = ::libc::c_uint;
pub type intmax_t = __intmax_t;
pub type uintmax_t = __uintmax_t;
pub type int_least8_t = __int_least8_t;
pub type uint_least8_t = __uint_least8_t;
pub type int_least16_t = __int_least16_t;
pub type uint_least16_t = __uint_least16_t;
pub type int_least32_t = __int_least32_t;
pub type uint_least32_t = __uint_least32_t;
pub type int_least64_t = __int_least64_t;
pub type uint_least64_t = __uint_least64_t;
pub type int_fast8_t = ::libc::c_schar;
pub type uint_fast8_t = ::libc::c_uchar;
pub type int_fast16_t = ::libc::c_short;
pub type uint_fast16_t = ::libc::c_ushort;
pub type int_fast32_t = ::libc::c_int;
pub type uint_fast32_t = ::libc::c_uint;
pub type int_fast64_t = ::libc::c_longlong;
pub type uint_fast64_t = ::libc::c_ulonglong;
pub type size_t = ::libc::c_uint;
pub type wchar_t = ::libc::c_uint;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct max_align_t {
pub __clang_max_align_nonce1: ::libc::c_longlong,
pub __clang_max_align_nonce2: f64,
}
pub type u8_ = u8;
pub type u16_ = u16;
pub type u32_ = u32;
pub type u64_ = u64;
pub type s8 = i8;
pub type s16 = i16;
pub type s32 = i32;
pub type s64 = i64;
pub type vu8 = u8_;
pub type vu16 = u16_;
pub type vu32 = u32_;
pub type vu64 = u64_;
pub type vs8 = s8;
pub type vs16 = s16;
pub type vs32 = s32;
pub type vs64 = s64;
pub type Handle = u32_;
pub type Result = s32;
pub type ThreadFunc = ::core::option::Option<unsafe extern "C" fn(arg1: *mut ::libc::c_void)>;
pub type voidfn = ::core::option::Option<unsafe extern "C" fn()>;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct CpuRegisters {
pub r: [u32_; 13usize],
pub sp: u32_,
pub lr: u32_,
pub pc: u32_,
pub cpsr: u32_,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct FpuRegisters {
pub __bindgen_anon_1: FpuRegisters__bindgen_ty_1,
pub fpscr: u32_,
pub fpexc: u32_,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union FpuRegisters__bindgen_ty_1 {
pub __bindgen_anon_1: FpuRegisters__bindgen_ty_1__bindgen_ty_1,
pub s: [f32; 32usize],
_bindgen_union_align: [u32; 32usize],
}
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone)]
pub struct FpuRegisters__bindgen_ty_1__bindgen_ty_1 {
pub d: [f64; 16usize],
}
impl Default for FpuRegisters__bindgen_ty_1 {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
impl Default for FpuRegisters {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
pub const RL_SUCCESS: ::libc::c_uint = 0;
pub const RL_INFO: ::libc::c_uint = 1;
pub const RL_FATAL: ::libc::c_uint = 31;
pub const RL_RESET: ::libc::c_uint = 30;
pub const RL_REINITIALIZE: ::libc::c_uint = 29;
pub const RL_USAGE: ::libc::c_uint = 28;
pub const RL_PERMANENT: ::libc::c_uint = 27;
pub const RL_TEMPORARY: ::libc::c_uint = 26;
pub const RL_STATUS: ::libc::c_uint = 25;
pub type _bindgen_ty_1 = ::libc::c_uint;
pub const RS_SUCCESS: ::libc::c_uint = 0;
pub const RS_NOP: ::libc::c_uint = 1;
pub const RS_WOULDBLOCK: ::libc::c_uint = 2;
pub const RS_OUTOFRESOURCE: ::libc::c_uint = 3;
pub const RS_NOTFOUND: ::libc::c_uint = 4;
pub const RS_INVALIDSTATE: ::libc::c_uint = 5;
pub const RS_NOTSUPPORTED: ::libc::c_uint = 6;
pub const RS_INVALIDARG: ::libc::c_uint = 7;
pub const RS_WRONGARG: ::libc::c_uint = 8;
pub const RS_CANCELED: ::libc::c_uint = 9;
pub const RS_STATUSCHANGED: ::libc::c_uint = 10;
pub const RS_INTERNAL: ::libc::c_uint = 11;
pub const RS_INVALIDRESVAL: ::libc::c_uint = 63;
pub type _bindgen_ty_2 = ::libc::c_uint;
pub const RM_COMMON: ::libc::c_uint = 0;
pub const RM_KERNEL: ::libc::c_uint = 1;
pub const RM_UTIL: ::libc::c_uint = 2;
pub const RM_FILE_SERVER: ::libc::c_uint = 3;
pub const RM_LOADER_SERVER: ::libc::c_uint = 4;
pub const RM_TCB: ::libc::c_uint = 5;
pub const RM_OS: ::libc::c_uint = 6;
pub const RM_DBG: ::libc::c_uint = 7;
pub const RM_DMNT: ::libc::c_uint = 8;
pub const RM_PDN: ::libc::c_uint = 9;
pub const RM_GSP: ::libc::c_uint = 10;
pub const RM_I2C: ::libc::c_uint = 11;
pub const RM_GPIO: ::libc::c_uint = 12;
pub const RM_DD: ::libc::c_uint = 13;
pub const RM_CODEC: ::libc::c_uint = 14;
pub const RM_SPI: ::libc::c_uint = 15;
pub const RM_PXI: ::libc::c_uint = 16;
pub const RM_FS: ::libc::c_uint = 17;
pub const RM_DI: ::libc::c_uint = 18;
pub const RM_HID: ::libc::c_uint = 19;
pub const RM_CAM: ::libc::c_uint = 20;
pub const RM_PI: ::libc::c_uint = 21;
pub const RM_PM: ::libc::c_uint = 22;
pub const RM_PM_LOW: ::libc::c_uint = 23;
pub const RM_FSI: ::libc::c_uint = 24;
pub const RM_SRV: ::libc::c_uint = 25;
pub const RM_NDM: ::libc::c_uint = 26;
pub const RM_NWM: ::libc::c_uint = 27;
pub const RM_SOC: ::libc::c_uint = 28;
pub const RM_LDR: ::libc::c_uint = 29;
pub const RM_ACC: ::libc::c_uint = 30;
pub const RM_ROMFS: ::libc::c_uint = 31;
pub const RM_AM: ::libc::c_uint = 32;
pub const RM_HIO: ::libc::c_uint = 33;
pub const RM_UPDATER: ::libc::c_uint = 34;
pub const RM_MIC: ::libc::c_uint = 35;
pub const RM_FND: ::libc::c_uint = 36;
pub const RM_MP: ::libc::c_uint = 37;
pub const RM_MPWL: ::libc::c_uint = 38;
pub const RM_AC: ::libc::c_uint = 39;
pub const RM_HTTP: ::libc::c_uint = 40;
pub const RM_DSP: ::libc::c_uint = 41;
pub const RM_SND: ::libc::c_uint = 42;
pub const RM_DLP: ::libc::c_uint = 43;
pub const RM_HIO_LOW: ::libc::c_uint = 44;
pub const RM_CSND: ::libc::c_uint = 45;
pub const RM_SSL: ::libc::c_uint = 46;
pub const RM_AM_LOW: ::libc::c_uint = 47;
pub const RM_NEX: ::libc::c_uint = 48;
pub const RM_FRIENDS: ::libc::c_uint = 49;
pub const RM_RDT: ::libc::c_uint = 50;
pub const RM_APPLET: ::libc::c_uint = 51;
pub const RM_NIM: ::libc::c_uint = 52;
pub const RM_PTM: ::libc::c_uint = 53;
pub const RM_MIDI: ::libc::c_uint = 54;
pub const RM_MC: ::libc::c_uint = 55;
pub const RM_SWC: ::libc::c_uint = 56;
pub const RM_FATFS: ::libc::c_uint = 57;
pub const RM_NGC: ::libc::c_uint = 58;
pub const RM_CARD: ::libc::c_uint = 59;
pub const RM_CARDNOR: ::libc::c_uint = 60;
pub const RM_SDMC: ::libc::c_uint = 61;
pub const RM_BOSS: ::libc::c_uint = 62;
pub const RM_DBM: ::libc::c_uint = 63;
pub const RM_CONFIG: ::libc::c_uint = 64;
pub const RM_PS: ::libc::c_uint = 65;
pub const RM_CEC: ::libc::c_uint = 66;
pub const RM_IR: ::libc::c_uint = 67;
pub const RM_UDS: ::libc::c_uint = 68;
pub const RM_PL: ::libc::c_uint = 69;
pub const RM_CUP: ::libc::c_uint = 70;
pub const RM_GYROSCOPE: ::libc::c_uint = 71;
pub const RM_MCU: ::libc::c_uint = 72;
pub const RM_NS: ::libc::c_uint = 73;
pub const RM_NEWS: ::libc::c_uint = 74;
pub const RM_RO: ::libc::c_uint = 75;
pub const RM_GD: ::libc::c_uint = 76;
pub const RM_CARD_SPI: ::libc::c_uint = 77;
pub const RM_EC: ::libc::c_uint = 78;
pub const RM_WEB_BROWSER: ::libc::c_uint = 79;
pub const RM_TEST: ::libc::c_uint = 80;
pub const RM_ENC: ::libc::c_uint = 81;
pub const RM_PIA: ::libc::c_uint = 82;
pub const RM_ACT: ::libc::c_uint = 83;
pub const RM_VCTL: ::libc::c_uint = 84;
pub const RM_OLV: ::libc::c_uint = 85;
pub const RM_NEIA: ::libc::c_uint = 86;
pub const RM_NPNS: ::libc::c_uint = 87;
pub const RM_AVD: ::libc::c_uint = 90;
pub const RM_L2B: ::libc::c_uint = 91;
pub const RM_MVD: ::libc::c_uint = 92;
pub const RM_NFC: ::libc::c_uint = 93;
pub const RM_UART: ::libc::c_uint = 94;
pub const RM_SPM: ::libc::c_uint = 95;
pub const RM_QTM: ::libc::c_uint = 96;
pub const RM_NFP: ::libc::c_uint = 97;
pub const RM_APPLICATION: ::libc::c_uint = 254;
pub const RM_INVALIDRESVAL: ::libc::c_uint = 255;
pub type _bindgen_ty_3 = ::libc::c_uint;
pub const RD_SUCCESS: ::libc::c_uint = 0;
pub const RD_INVALID_RESULT_VALUE: ::libc::c_uint = 1023;
pub const RD_TIMEOUT: ::libc::c_uint = 1022;
pub const RD_OUT_OF_RANGE: ::libc::c_uint = 1021;
pub const RD_ALREADY_EXISTS: ::libc::c_uint = 1020;
pub const RD_CANCEL_REQUESTED: ::libc::c_uint = 1019;
pub const RD_NOT_FOUND: ::libc::c_uint = 1018;
pub const RD_ALREADY_INITIALIZED: ::libc::c_uint = 1017;
pub const RD_NOT_INITIALIZED: ::libc::c_uint = 1016;
pub const RD_INVALID_HANDLE: ::libc::c_uint = 1015;
pub const RD_INVALID_POINTER: ::libc::c_uint = 1014;
pub const RD_INVALID_ADDRESS: ::libc::c_uint = 1013;
pub const RD_NOT_IMPLEMENTED: ::libc::c_uint = 1012;
pub const RD_OUT_OF_MEMORY: ::libc::c_uint = 1011;
pub const RD_MISALIGNED_SIZE: ::libc::c_uint = 1010;
pub const RD_MISALIGNED_ADDRESS: ::libc::c_uint = 1009;
pub const RD_BUSY: ::libc::c_uint = 1008;
pub const RD_NO_DATA: ::libc::c_uint = 1007;
pub const RD_INVALID_COMBINATION: ::libc::c_uint = 1006;
pub const RD_INVALID_ENUM_VALUE: ::libc::c_uint = 1005;
pub const RD_INVALID_SIZE: ::libc::c_uint = 1004;
pub const RD_ALREADY_DONE: ::libc::c_uint = 1003;
pub const RD_NOT_AUTHORIZED: ::libc::c_uint = 1002;
pub const RD_TOO_LARGE: ::libc::c_uint = 1001;
pub const RD_INVALID_SELECTION: ::libc::c_uint = 1000;
pub type _bindgen_ty_4 = ::libc::c_uint;
pub const IPC_BUFFER_R: IPC_BufferRights = 2;
pub const IPC_BUFFER_W: IPC_BufferRights = 4;
pub const IPC_BUFFER_RW: IPC_BufferRights = 6;
pub type IPC_BufferRights = ::libc::c_uint;
pub const MEMOP_FREE: MemOp = 1;
pub const MEMOP_RESERVE: MemOp = 2;
pub const MEMOP_ALLOC: MemOp = 3;
pub const MEMOP_MAP: MemOp = 4;
pub const MEMOP_UNMAP: MemOp = 5;
pub const MEMOP_PROT: MemOp = 6;
pub const MEMOP_REGION_APP: MemOp = 256;
pub const MEMOP_REGION_SYSTEM: MemOp = 512;
pub const MEMOP_REGION_BASE: MemOp = 768;
pub const MEMOP_OP_MASK: MemOp = 255;
pub const MEMOP_REGION_MASK: MemOp = 3840;
pub const MEMOP_LINEAR_FLAG: MemOp = 65536;
pub const MEMOP_ALLOC_LINEAR: MemOp = 65539;
pub type MemOp = ::libc::c_uint;
pub const MEMSTATE_FREE: MemState = 0;
pub const MEMSTATE_RESERVED: MemState = 1;
pub const MEMSTATE_IO: MemState = 2;
pub const MEMSTATE_STATIC: MemState = 3;
pub const MEMSTATE_CODE: MemState = 4;
pub const MEMSTATE_PRIVATE: MemState = 5;
pub const MEMSTATE_SHARED: MemState = 6;
pub const MEMSTATE_CONTINUOUS: MemState = 7;
pub const MEMSTATE_ALIASED: MemState = 8;
pub const MEMSTATE_ALIAS: MemState = 9;
pub const MEMSTATE_ALIASCODE: MemState = 10;
pub const MEMSTATE_LOCKED: MemState = 11;
pub type MemState = ::libc::c_uint;
pub const MEMPERM_READ: MemPerm = 1;
pub const MEMPERM_WRITE: MemPerm = 2;
pub const MEMPERM_EXECUTE: MemPerm = 4;
pub const MEMPERM_READWRITE: MemPerm = 3;
pub const MEMPERM_READEXECUTE: MemPerm = 5;
pub const MEMPERM_DONTCARE: MemPerm = 268435456;
pub type MemPerm = ::libc::c_uint;
pub const MEMREGION_ALL: MemRegion = 0;
pub const MEMREGION_APPLICATION: MemRegion = 1;
pub const MEMREGION_SYSTEM: MemRegion = 2;
pub const MEMREGION_BASE: MemRegion = 3;
pub type MemRegion = ::libc::c_uint;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct MemInfo {
pub base_addr: u32_,
pub size: u32_,
pub perm: u32_,
pub state: u32_,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct PageInfo {
pub flags: u32_,
}
pub const ARBITRATION_SIGNAL: ArbitrationType = 0;
pub const ARBITRATION_WAIT_IF_LESS_THAN: ArbitrationType = 1;
pub const ARBITRATION_DECREMENT_AND_WAIT_IF_LESS_THAN: ArbitrationType = 2;
pub const ARBITRATION_WAIT_IF_LESS_THAN_TIMEOUT: ArbitrationType = 3;
pub const ARBITRATION_DECREMENT_AND_WAIT_IF_LESS_THAN_TIMEOUT: ArbitrationType = 4;
pub type ArbitrationType = ::libc::c_uint;
pub const RESET_ONESHOT: ResetType = 0;
pub const RESET_STICKY: ResetType = 1;
pub const RESET_PULSE: ResetType = 2;
pub type ResetType = ::libc::c_uint;
pub const THREADINFO_TYPE_UNKNOWN: ThreadInfoType = 0;
pub type ThreadInfoType = ::libc::c_uint;
pub const RESLIMIT_PRIORITY: ResourceLimitType = 0;
pub const RESLIMIT_COMMIT: ResourceLimitType = 1;
pub const RESLIMIT_THREAD: ResourceLimitType = 2;
pub const RESLIMIT_EVENT: ResourceLimitType = 3;
pub const RESLIMIT_MUTEX: ResourceLimitType = 4;
pub const RESLIMIT_SEMAPHORE: ResourceLimitType = 5;
pub const RESLIMIT_TIMER: ResourceLimitType = 6;
pub const RESLIMIT_SHAREDMEMORY: ResourceLimitType = 7;
pub const RESLIMIT_ADDRESSARBITER: ResourceLimitType = 8;
pub const RESLIMIT_CPUTIME: ResourceLimitType = 9;
pub const RESLIMIT_BIT: ResourceLimitType = 2147483648;
pub type ResourceLimitType = ::libc::c_uint;
pub const DMASTATE_STARTING: DmaState = 0;
pub const DMASTATE_WFP_DST: DmaState = 1;
pub const DMASTATE_WFP_SRC: DmaState = 2;
pub const DMASTATE_RUNNING: DmaState = 3;
pub const DMASTATE_DONE: DmaState = 4;
pub type DmaState = ::libc::c_uint;
pub const DMACFG_SRC_IS_DEVICE: ::libc::c_uint = 1;
pub const DMACFG_DST_IS_DEVICE: ::libc::c_uint = 2;
pub const DMACFG_WAIT_AVAILABLE: ::libc::c_uint = 4;
pub const DMACFG_KEEP_LOCKED: ::libc::c_uint = 8;
pub const DMACFG_USE_SRC_CONFIG: ::libc::c_uint = 64;
pub const DMACFG_USE_DST_CONFIG: ::libc::c_uint = 128;
pub type _bindgen_ty_5 = ::libc::c_uint;
pub const DMARST_UNLOCK: ::libc::c_uint = 1;
pub const DMARST_RESUME_DEVICE: ::libc::c_uint = 2;
pub type _bindgen_ty_6 = ::libc::c_uint;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct DmaDeviceConfig {
pub deviceId: s8,
pub allowedAlignments: s8,
pub burstSize: s16,
pub transferSize: s16,
pub burstStride: s16,
pub transferStride: s16,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct DmaConfig {
pub channelId: s8,
pub endianSwapSize: s8,
pub flags: u8_,
pub _padding: u8_,
pub srcCfg: DmaDeviceConfig,
pub dstCfg: DmaDeviceConfig,
}
pub const PERFCOUNTEROP_ENABLE: PerfCounterOperation = 0;
pub const PERFCOUNTEROP_DISABLE: PerfCounterOperation = 1;
pub const PERFCOUNTEROP_GET_VALUE: PerfCounterOperation = 2;
pub const PERFCOUNTEROP_SET_VALUE: PerfCounterOperation = 3;
pub const PERFCOUNTEROP_GET_OVERFLOW_FLAGS: PerfCounterOperation = 4;
pub const PERFCOUNTEROP_RESET: PerfCounterOperation = 5;
pub const PERFCOUNTEROP_GET_EVENT: PerfCounterOperation = 6;
pub const PERFCOUNTEROP_SET_EVENT: PerfCounterOperation = 7;
pub const PERFCOUNTEROP_SET_VIRTUAL_COUNTER_ENABLED: PerfCounterOperation = 8;
pub type PerfCounterOperation = ::libc::c_uint;
pub const PERFCOUNTERREG_CORE_BASE: PerfCounterRegister = 0;
pub const PERFCOUNTERREG_CORE_COUNT_REG_0: PerfCounterRegister = 0;
pub const PERFCOUNTERREG_CORE_COUNT_REG_1: PerfCounterRegister = 1;
pub const PERFCOUNTERREG_CORE_CYCLE_COUNTER: PerfCounterRegister = 2;
pub const PERFCOUNTERREG_SCU_BASE: PerfCounterRegister = 16;
pub const PERFCOUNTERREG_SCU_0: PerfCounterRegister = 16;
pub const PERFCOUNTERREG_SCU_1: PerfCounterRegister = 17;
pub const PERFCOUNTERREG_SCU_2: PerfCounterRegister = 18;
pub const PERFCOUNTERREG_SCU_3: PerfCounterRegister = 19;
pub const PERFCOUNTERREG_SCU_4: PerfCounterRegister = 20;
pub const PERFCOUNTERREG_SCU_5: PerfCounterRegister = 21;
pub const PERFCOUNTERREG_SCU_6: PerfCounterRegister = 22;
pub const PERFCOUNTERREG_SCU_7: PerfCounterRegister = 23;
pub type PerfCounterRegister = ::libc::c_uint;
pub const PERFCOUNTEREVT_CORE_BASE: PerfCounterEvent = 0;
pub const PERFCOUNTEREVT_CORE_INST_CACHE_MISS: PerfCounterEvent = 0;
pub const PERFCOUNTEREVT_CORE_STALL_BY_LACK_OF_INST: PerfCounterEvent = 1;
pub const PERFCOUNTEREVT_CORE_STALL_BY_DATA_HAZARD: PerfCounterEvent = 2;
pub const PERFCOUNTEREVT_CORE_INST_MICRO_TLB_MISS: PerfCounterEvent = 3;
pub const PERFCOUNTEREVT_CORE_DATA_MICRO_TLB_MISS: PerfCounterEvent = 4;
pub const PERFCOUNTEREVT_CORE_BRANCH_INST: PerfCounterEvent = 5;
pub const PERFCOUNTEREVT_CORE_BRANCH_NOT_PREDICTED: PerfCounterEvent = 6;
pub const PERFCOUNTEREVT_CORE_BRANCH_MISS_PREDICTED: PerfCounterEvent = 7;
pub const PERFCOUNTEREVT_CORE_INST_EXECUTED: PerfCounterEvent = 8;
pub const PERFCOUNTEREVT_CORE_FOLDED_INST_EXECUTED: PerfCounterEvent = 9;
pub const PERFCOUNTEREVT_CORE_DATA_CACHE_READ: PerfCounterEvent = 10;
pub const PERFCOUNTEREVT_CORE_DATA_CACHE_READ_MISS: PerfCounterEvent = 11;
pub const PERFCOUNTEREVT_CORE_DATA_CACHE_WRITE: PerfCounterEvent = 12;
pub const PERFCOUNTEREVT_CORE_DATA_CACHE_WRITE_MISS: PerfCounterEvent = 13;
pub const PERFCOUNTEREVT_CORE_DATA_CACHE_LINE_EVICTION: PerfCounterEvent = 14;
pub const PERFCOUNTEREVT_CORE_PC_CHANGED: PerfCounterEvent = 15;
pub const PERFCOUNTEREVT_CORE_MAIN_TLB_MISS: PerfCounterEvent = 16;
pub const PERFCOUNTEREVT_CORE_EXTERNAL_REQUEST: PerfCounterEvent = 17;
pub const PERFCOUNTEREVT_CORE_STALL_BY_LSU_FULL: PerfCounterEvent = 18;
pub const PERFCOUNTEREVT_CORE_STORE_BUFFER_DRAIN: PerfCounterEvent = 19;
pub const PERFCOUNTEREVT_CORE_MERGE_IN_STORE_BUFFER: PerfCounterEvent = 20;
pub const PERFCOUNTEREVT_CORE_CYCLE_COUNT: PerfCounterEvent = 255;
pub const PERFCOUNTEREVT_CORE_CYCLE_COUNT_64: PerfCounterEvent = 4095;
pub const PERFCOUNTEREVT_SCU_BASE: PerfCounterEvent = 4096;
pub const PERFCOUNTEREVT_SCU_DISABLED: PerfCounterEvent = 4096;
pub const PERFCOUNTEREVT_SCU_LINEFILL_MISS_FROM_CORE0: PerfCounterEvent = 4097;
pub const PERFCOUNTEREVT_SCU_LINEFILL_MISS_FROM_CORE1: PerfCounterEvent = 4098;
pub const PERFCOUNTEREVT_SCU_LINEFILL_MISS_FROM_CORE2: PerfCounterEvent = 4099;
pub const PERFCOUNTEREVT_SCU_LINEFILL_MISS_FROM_CORE3: PerfCounterEvent = 4100;
pub const PERFCOUNTEREVT_SCU_LINEFILL_HIT_FROM_CORE0: PerfCounterEvent = 4101;
pub const PERFCOUNTEREVT_SCU_LINEFILL_HIT_FROM_CORE1: PerfCounterEvent = 4102;
pub const PERFCOUNTEREVT_SCU_LINEFILL_HIT_FROM_CORE2: PerfCounterEvent = 4103;
pub const PERFCOUNTEREVT_SCU_LINEFILL_HIT_FROM_CORE3: PerfCounterEvent = 4104;
pub const PERFCOUNTEREVT_SCU_LINE_MISSING_FROM_CORE0: PerfCounterEvent = 4105;
pub const PERFCOUNTEREVT_SCU_LINE_MISSING_FROM_CORE1: PerfCounterEvent = 4106;
pub const PERFCOUNTEREVT_SCU_LINE_MISSING_FROM_CORE2: PerfCounterEvent = 4107;
pub const PERFCOUNTEREVT_SCU_LINE_MISSING_FROM_CORE3: PerfCounterEvent = 4108;
pub const PERFCOUNTEREVT_SCU_LINE_MIGRATION: PerfCounterEvent = 4109;
pub const PERFCOUNTEREVT_SCU_READ_BUSY_PORT0: PerfCounterEvent = 4110;
pub const PERFCOUNTEREVT_SCU_READ_BUSY_PORT1: PerfCounterEvent = 4111;
pub const PERFCOUNTEREVT_SCU_WRITE_BUSY_PORT0: PerfCounterEvent = 4112;
pub const PERFCOUNTEREVT_SCU_WRITE_BUSY_PORT1: PerfCounterEvent = 4113;
pub const PERFCOUNTEREVT_SCU_EXTERNAL_READ: PerfCounterEvent = 4114;
pub const PERFCOUNTEREVT_SCU_EXTERNAL_WRITE: PerfCounterEvent = 4115;
pub const PERFCOUNTEREVT_SCU_CYCLE_COUNT: PerfCounterEvent = 4127;
pub type PerfCounterEvent = ::libc::c_uint;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct AttachProcessEvent {
pub program_id: u64_,
pub process_name: [::libc::c_char; 8usize],
pub process_id: u32_,
pub other_flags: u32_,
}
pub const EXITPROCESS_EVENT_EXIT: ExitProcessEventReason = 0;
pub const EXITPROCESS_EVENT_TERMINATE: ExitProcessEventReason = 1;
pub const EXITPROCESS_EVENT_DEBUG_TERMINATE: ExitProcessEventReason = 2;
pub type ExitProcessEventReason = ::libc::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ExitProcessEvent {
pub reason: ExitProcessEventReason,
}
impl Default for ExitProcessEvent {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct AttachThreadEvent {
pub creator_thread_id: u32_,
pub thread_local_storage: u32_,
pub entry_point: u32_,
}
pub const EXITTHREAD_EVENT_EXIT: ExitThreadEventReason = 0;
pub const EXITTHREAD_EVENT_TERMINATE: ExitThreadEventReason = 1;
pub const EXITTHREAD_EVENT_EXIT_PROCESS: ExitThreadEventReason = 2;
pub const EXITTHREAD_EVENT_TERMINATE_PROCESS: ExitThreadEventReason = 3;
pub type ExitThreadEventReason = ::libc::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ExitThreadEvent {
pub reason: ExitThreadEventReason,
}
impl Default for ExitThreadEvent {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
pub const USERBREAK_PANIC: UserBreakType = 0;
pub const USERBREAK_ASSERT: UserBreakType = 1;
pub const USERBREAK_USER: UserBreakType = 2;
pub const USERBREAK_LOAD_RO: UserBreakType = 3;
pub const USERBREAK_UNLOAD_RO: UserBreakType = 4;
pub type UserBreakType = ::libc::c_uint;
pub const EXCEVENT_UNDEFINED_INSTRUCTION: ExceptionEventType = 0;
pub const EXCEVENT_PREFETCH_ABORT: ExceptionEventType = 1;
pub const EXCEVENT_DATA_ABORT: ExceptionEventType = 2;
pub const EXCEVENT_UNALIGNED_DATA_ACCESS: ExceptionEventType = 3;
pub const EXCEVENT_ATTACH_BREAK: ExceptionEventType = 4;
pub const EXCEVENT_STOP_POINT: ExceptionEventType = 5;
pub const EXCEVENT_USER_BREAK: ExceptionEventType = 6;
pub const EXCEVENT_DEBUGGER_BREAK: ExceptionEventType = 7;
pub const EXCEVENT_UNDEFINED_SYSCALL: ExceptionEventType = 8;
pub type ExceptionEventType = ::libc::c_uint;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct FaultExceptionEvent {
pub fault_information: u32_,
}
pub const STOPPOINT_SVC_FF: StopPointType = 0;
pub const STOPPOINT_BREAKPOINT: StopPointType = 1;
pub const STOPPOINT_WATCHPOINT: StopPointType = 2;
pub type StopPointType = ::libc::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct StopPointExceptionEvent {
pub type_: StopPointType,
pub fault_information: u32_,
}
impl Default for StopPointExceptionEvent {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct UserBreakExceptionEvent {
pub type_: UserBreakType,
pub croInfo: u32_,
pub croInfoSize: u32_,
}
impl Default for UserBreakExceptionEvent {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct DebuggerBreakExceptionEvent {
pub thread_ids: [s32; 4usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ExceptionEvent {
pub type_: ExceptionEventType,
pub address: u32_,
pub __bindgen_anon_1: ExceptionEvent__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union ExceptionEvent__bindgen_ty_1 {
pub fault: FaultExceptionEvent,
pub stop_point: StopPointExceptionEvent,
pub user_break: UserBreakExceptionEvent,
pub debugger_break: DebuggerBreakExceptionEvent,
_bindgen_union_align: [u32; 4usize],
}
impl Default for ExceptionEvent__bindgen_ty_1 {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
impl Default for ExceptionEvent {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct ScheduleInOutEvent {
pub clock_tick: u64_,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct SyscallInOutEvent {
pub clock_tick: u64_,
pub syscall: u32_,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct OutputStringEvent {
pub string_addr: u32_,
pub string_size: u32_,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MapEvent {
pub mapped_addr: u32_,
pub mapped_size: u32_,
pub memperm: MemPerm,
pub memstate: MemState,
}
impl Default for MapEvent {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
pub const DBGEVENT_ATTACH_PROCESS: DebugEventType = 0;
pub const DBGEVENT_ATTACH_THREAD: DebugEventType = 1;
pub const DBGEVENT_EXIT_THREAD: DebugEventType = 2;
pub const DBGEVENT_EXIT_PROCESS: DebugEventType = 3;
pub const DBGEVENT_EXCEPTION: DebugEventType = 4;
pub const DBGEVENT_DLL_LOAD: DebugEventType = 5;
pub const DBGEVENT_DLL_UNLOAD: DebugEventType = 6;
pub const DBGEVENT_SCHEDULE_IN: DebugEventType = 7;
pub const DBGEVENT_SCHEDULE_OUT: DebugEventType = 8;
pub const DBGEVENT_SYSCALL_IN: DebugEventType = 9;
pub const DBGEVENT_SYSCALL_OUT: DebugEventType = 10;
pub const DBGEVENT_OUTPUT_STRING: DebugEventType = 11;
pub const DBGEVENT_MAP: DebugEventType = 12;
pub type DebugEventType = ::libc::c_uint;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct DebugEventInfo {
pub type_: DebugEventType,
pub thread_id: u32_,
pub flags: u32_,
pub remnants: [u8_; 4usize],
pub __bindgen_anon_1: DebugEventInfo__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union DebugEventInfo__bindgen_ty_1 {
pub attach_process: AttachProcessEvent,
pub attach_thread: AttachThreadEvent,
pub exit_thread: ExitThreadEvent,
pub exit_process: ExitProcessEvent,
pub exception: ExceptionEvent,
pub scheduler: ScheduleInOutEvent,
pub syscall: SyscallInOutEvent,
pub output_string: OutputStringEvent,
pub map: MapEvent,
_bindgen_union_align: [u64; 3usize],
}
impl Default for DebugEventInfo__bindgen_ty_1 {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
impl Default for DebugEventInfo {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
pub const DBG_INHIBIT_USER_CPU_EXCEPTION_HANDLERS: DebugFlags = 1;
pub const DBG_SIGNAL_FAULT_EXCEPTION_EVENTS: DebugFlags = 2;
pub const DBG_SIGNAL_SCHEDULE_EVENTS: DebugFlags = 4;
pub const DBG_SIGNAL_SYSCALL_EVENTS: DebugFlags = 8;
pub const DBG_SIGNAL_MAP_EVENTS: DebugFlags = 16;
pub type DebugFlags = ::libc::c_uint;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ThreadContext {
pub cpu_registers: CpuRegisters,
pub fpu_registers: FpuRegisters,
}
impl Default for ThreadContext {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
pub const THREADCONTEXT_CONTROL_CPU_GPRS: ThreadContextControlFlags = 1;
pub const THREADCONTEXT_CONTROL_CPU_SPRS: ThreadContextControlFlags = 2;
pub const THREADCONTEXT_CONTROL_FPU_GPRS: ThreadContextControlFlags = 4;
pub const THREADCONTEXT_CONTROL_FPU_SPRS: ThreadContextControlFlags = 8;
pub const THREADCONTEXT_CONTROL_CPU_REGS: ThreadContextControlFlags = 3;
pub const THREADCONTEXT_CONTROL_FPU_REGS: ThreadContextControlFlags = 12;
pub const THREADCONTEXT_CONTROL_ALL: ThreadContextControlFlags = 15;
pub type ThreadContextControlFlags = ::libc::c_uint;
pub const DBGTHREAD_PARAMETER_PRIORITY: DebugThreadParameter = 0;
pub const DBGTHREAD_PARAMETER_SCHEDULING_MASK_LOW: DebugThreadParameter = 1;
pub const DBGTHREAD_PARAMETER_CPU_IDEAL: DebugThreadParameter = 2;
pub const DBGTHREAD_PARAMETER_CPU_CREATOR: DebugThreadParameter = 3;
pub type DebugThreadParameter = ::libc::c_uint;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct CodeSetInfo {
pub name: [u8_; 8usize],
pub unk1: u16_,
pub unk2: u16_,
pub unk3: u32_,
pub text_addr: u32_,
pub text_size: u32_,
pub ro_addr: u32_,
pub ro_size: u32_,
pub rw_addr: u32_,
pub rw_size: u32_,
pub text_size_total: u32_,
pub ro_size_total: u32_,
pub rw_size_total: u32_,
pub unk4: u32_,
pub program_id: u64_,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct StartupInfo {
pub priority: ::libc::c_int,
pub stack_size: u32_,
pub argc: ::libc::c_int,
pub argv: *mut u16_,
pub envp: *mut u16_,
}
impl Default for StartupInfo {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
extern "C" {
pub fn svcControlMemory(
addr_out: *mut u32_,
addr0: u32_,
addr1: u32_,
size: u32_,
op: MemOp,
perm: MemPerm,
) -> Result;
}
extern "C" {
pub fn svcControlProcessMemory(
process: Handle,
addr0: u32_,
addr1: u32_,
size: u32_,
type_: u32_,
perm: u32_,
) -> Result;
}
extern "C" {
pub fn svcCreateMemoryBlock(
memblock: *mut Handle,
addr: u32_,
size: u32_,
my_perm: MemPerm,
other_perm: MemPerm,
) -> Result;
}
extern "C" {
pub fn svcMapMemoryBlock(
memblock: Handle,
addr: u32_,
my_perm: MemPerm,
other_perm: MemPerm,
) -> Result;
}
extern "C" {
pub fn svcMapProcessMemory(process: Handle, destAddress: u32_, size: u32_) -> Result;
}
extern "C" {
pub fn svcUnmapProcessMemory(process: Handle, destAddress: u32_, size: u32_) -> Result;
}
extern "C" {
pub fn svcUnmapMemoryBlock(memblock: Handle, addr: u32_) -> Result;
}
extern "C" {
pub fn svcQueryMemory(info: *mut MemInfo, out: *mut PageInfo, addr: u32_) -> Result;
}
extern "C" {
pub fn svcQueryProcessMemory(
info: *mut MemInfo,
out: *mut PageInfo,
process: Handle,
addr: u32_,
) -> Result;
}
extern "C" {
pub fn svcOpenProcess(process: *mut Handle, processId: u32_) -> Result;
}
extern "C" {
pub fn svcExitProcess();
}
extern "C" {
pub fn svcTerminateProcess(process: Handle) -> Result;
}
extern "C" {
pub fn svcGetProcessInfo(out: *mut s64, process: Handle, type_: u32_) -> Result;
}
extern "C" {
pub fn svcGetProcessId(out: *mut u32_, handle: Handle) -> Result;
}
extern "C" {
pub fn svcGetProcessList(
processCount: *mut s32,
processIds: *mut u32_,
processIdMaxCount: s32,
) -> Result;
}
extern "C" {
pub fn svcGetThreadList(
threadCount: *mut s32,
threadIds: *mut u32_,
threadIdMaxCount: s32,
process: Handle,
) -> Result;
}
extern "C" {
pub fn svcCreatePort(
portServer: *mut Handle,
portClient: *mut Handle,
name: *const ::libc::c_char,
maxSessions: s32,
) -> Result;
}
extern "C" {
pub fn svcConnectToPort(out: *mut Handle, portName: *const ::libc::c_char) -> Result;
}
extern "C" {
pub fn svcCreateCodeSet(
out: *mut Handle,
info: *const CodeSetInfo,
code_ptr: *mut ::libc::c_void,
ro_ptr: *mut ::libc::c_void,
data_ptr: *mut ::libc::c_void,
) -> Result;
}
extern "C" {
pub fn svcCreateProcess(
out: *mut Handle,
codeset: Handle,
arm11kernelcaps: *const u32_,
arm11kernelcaps_num: u32_,
) -> Result;
}
extern "C" {
pub fn svcGetProcessAffinityMask(
affinitymask: *mut u8_,
process: Handle,
processorcount: s32,
) -> Result;
}
extern "C" {
pub fn svcSetProcessAffinityMask(
process: Handle,
affinitymask: *const u8_,
processorcount: s32,
) -> Result;
}
extern "C" {
pub fn svcGetProcessIdealProcessor(processorid: *mut s32, process: Handle) -> Result;
}
extern "C" {
pub fn svcSetProcessIdealProcessor(process: Handle, processorid: s32) -> Result;
}
extern "C" {
pub fn svcRun(process: Handle, info: *const StartupInfo) -> Result;
}
extern "C" {
pub fn svcCreateThread(
thread: *mut Handle,
entrypoint: ThreadFunc,
arg: u32_,
stack_top: *mut u32_,
thread_priority: s32,
processor_id: s32,
) -> Result;
}
extern "C" {
pub fn svcOpenThread(thread: *mut Handle, process: Handle, threadId: u32_) -> Result;
}
extern "C" {
pub fn svcExitThread();
}
extern "C" {
pub fn svcSleepThread(ns: s64);
}
extern "C" {
pub fn svcGetThreadPriority(out: *mut s32, handle: Handle) -> Result;
}
extern "C" {
pub fn svcSetThreadPriority(thread: Handle, prio: s32) -> Result;
}
extern "C" {
pub fn svcGetThreadAffinityMask(
affinitymask: *mut u8_,
thread: Handle,
processorcount: s32,
) -> Result;
}
extern "C" {
pub fn svcSetThreadAffinityMask(
thread: Handle,
affinitymask: *const u8_,
processorcount: s32,
) -> Result;
}
extern "C" {
pub fn svcGetThreadIdealProcessor(processorid: *mut s32, thread: Handle) -> Result;
}
extern "C" {
pub fn svcSetThreadIdealProcessor(thread: Handle, processorid: s32) -> Result;
}
extern "C" {
pub fn svcGetProcessorID() -> s32;
}
extern "C" {
pub fn svcGetThreadId(out: *mut u32_, handle: Handle) -> Result;
}
extern "C" {
pub fn svcGetResourceLimit(resourceLimit: *mut Handle, process: Handle) -> Result;
}
extern "C" {
pub fn svcGetResourceLimitLimitValues(
values: *mut s64,
resourceLimit: Handle,
names: *mut ResourceLimitType,
nameCount: s32,
) -> Result;
}
extern "C" {
pub fn svcGetResourceLimitCurrentValues(
values: *mut s64,
resourceLimit: Handle,
names: *mut ResourceLimitType,
nameCount: s32,
) -> Result;
}
extern "C" {
pub fn svcSetProcessResourceLimits(process: Handle, resourceLimit: Handle) -> Result;
}
extern "C" {
pub fn svcCreateResourceLimit(resourceLimit: *mut Handle) -> Result;
}
extern "C" {
pub fn svcSetResourceLimitValues(
resourceLimit: Handle,
names: *const ResourceLimitType,
values: *const s64,
nameCount: s32,
) -> Result;
}
extern "C" {
pub fn svcGetProcessIdOfThread(out: *mut u32_, handle: Handle) -> Result;
}
extern "C" {
pub fn svcGetThreadInfo(out: *mut s64, thread: Handle, type_: ThreadInfoType) -> Result;
}
extern "C" {
pub fn svcCreateMutex(mutex: *mut Handle, initially_locked: bool) -> Result;
}
extern "C" {
pub fn svcReleaseMutex(handle: Handle) -> Result;
}
extern "C" {
pub fn svcCreateSemaphore(semaphore: *mut Handle, initial_count: s32, max_count: s32)
-> Result;
}
extern "C" {
pub fn svcReleaseSemaphore(count: *mut s32, semaphore: Handle, release_count: s32) -> Result;
}
extern "C" {
pub fn svcCreateEvent(event: *mut Handle, reset_type: ResetType) -> Result;
}
extern "C" {
pub fn svcSignalEvent(handle: Handle) -> Result;
}
extern "C" {
pub fn svcClearEvent(handle: Handle) -> Result;
}
extern "C" {
pub fn svcWaitSynchronization(handle: Handle, nanoseconds: s64) -> Result;
}
extern "C" {
pub fn svcWaitSynchronizationN(
out: *mut s32,
handles: *const Handle,
handles_num: s32,
wait_all: bool,
nanoseconds: s64,
) -> Result;
}
extern "C" {
pub fn svcCreateAddressArbiter(arbiter: *mut Handle) -> Result;
}
extern "C" {
pub fn svcArbitrateAddress(
arbiter: Handle,
addr: u32_,
type_: ArbitrationType,
value: s32,
timeout_ns: s64,
) -> Result;
}
extern "C" {
pub fn svcArbitrateAddressNoTimeout(
arbiter: Handle,
addr: u32_,
type_: ArbitrationType,
value: s32,
) -> Result;
}
extern "C" {
pub fn svcSendSyncRequest(session: Handle) -> Result;
}
extern "C" {
pub fn svcCreateSessionToPort(clientSession: *mut Handle, clientPort: Handle) -> Result;
}
extern "C" {
pub fn svcCreateSession(serverSession: *mut Handle, clientSession: *mut Handle) -> Result;
}
extern "C" {
pub fn svcAcceptSession(session: *mut Handle, port: Handle) -> Result;
}
extern "C" {
pub fn svcReplyAndReceive(
index: *mut s32,
handles: *const Handle,
handleCount: s32,
replyTarget: Handle,
) -> Result;
}
extern "C" {
pub fn svcCreateTimer(timer: *mut Handle, reset_type: ResetType) -> Result;
}
extern "C" {
pub fn svcSetTimer(timer: Handle, initial: s64, interval: s64) -> Result;
}
extern "C" {
pub fn svcCancelTimer(timer: Handle) -> Result;
}
extern "C" {
pub fn svcClearTimer(timer: Handle) -> Result;
}
extern "C" {
pub fn svcGetSystemTick() -> u64_;
}
extern "C" {
pub fn svcCloseHandle(handle: Handle) -> Result;
}
extern "C" {
pub fn svcDuplicateHandle(out: *mut Handle, original: Handle) -> Result;
}
extern "C" {
pub fn svcGetHandleInfo(out: *mut s64, handle: Handle, param: u32_) -> Result;
}
extern "C" {
pub fn svcGetSystemInfo(out: *mut s64, type_: u32_, param: s32) -> Result;
}
extern "C" {
pub fn svcKernelSetState(type_: u32_, ...) -> Result;
}
extern "C" {
pub fn svcBindInterrupt(
interruptId: u32_,
eventOrSemaphore: Handle,
priority: s32,
isManualClear: bool,
) -> Result;
}
extern "C" {
pub fn svcUnbindInterrupt(interruptId: u32_, eventOrSemaphore: Handle) -> Result;
}
extern "C" {
pub fn svcInvalidateProcessDataCache(process: Handle, addr: u32_, size: u32_) -> Result;
}
extern "C" {
pub fn svcStoreProcessDataCache(process: Handle, addr: u32_, size: u32_) -> Result;
}
extern "C" {
pub fn svcFlushProcessDataCache(process: Handle, addr: u32_, size: u32_) -> Result;
}
extern "C" {
pub fn svcStartInterProcessDma(
dma: *mut Handle,
dstProcess: Handle,
dstAddr: u32_,
srcProcess: Handle,
srcAddr: u32_,
size: u32_,
cfg: *const DmaConfig,
) -> Result;
}
extern "C" {
pub fn svcStopDma(dma: Handle) -> Result;
}
extern "C" {
pub fn svcGetDmaState(state: *mut DmaState, dma: Handle) -> Result;
}
extern "C" {
pub fn svcRestartDma(
dma: Handle,
dstAddr: u32_,
srcAddr: u32_,
size: u32_,
flags: s8,
) -> Result;
}
extern "C" {
pub fn svcSetGpuProt(useApplicationRestriction: bool) -> Result;
}
extern "C" {
pub fn svcSetWifiEnabled(enabled: bool) -> Result;
}
extern "C" {
pub fn svcBreak(breakReason: UserBreakType);
}
extern "C" {
pub fn svcBreakRO(
breakReason: UserBreakType,
croInfo: *const ::libc::c_void,
croInfoSize: u32_,
);
}
extern "C" {
pub fn svcOutputDebugString(str_: *const ::libc::c_char, length: s32) -> Result;
}
extern "C" {
pub fn svcControlPerformanceCounter(
out: *mut u64_,
op: PerfCounterOperation,
param1: u32_,
param2: u64_,
) -> Result;
}
extern "C" {
pub fn svcDebugActiveProcess(debug: *mut Handle, processId: u32_) -> Result;
}
extern "C" {
pub fn svcBreakDebugProcess(debug: Handle) -> Result;
}
extern "C" {
pub fn svcTerminateDebugProcess(debug: Handle) -> Result;
}
extern "C" {
pub fn svcGetProcessDebugEvent(info: *mut DebugEventInfo, debug: Handle) -> Result;
}
extern "C" {
pub fn svcContinueDebugEvent(debug: Handle, flags: DebugFlags) -> Result;
}
extern "C" {
pub fn svcGetDebugThreadContext(
context: *mut ThreadContext,
debug: Handle,
threadId: u32_,
controlFlags: ThreadContextControlFlags,
) -> Result;
}
extern "C" {
pub fn svcSetDebugThreadContext(
debug: Handle,
threadId: u32_,
context: *mut ThreadContext,
controlFlags: ThreadContextControlFlags,
) -> Result;
}
extern "C" {
pub fn svcQueryDebugProcessMemory(
info: *mut MemInfo,
out: *mut PageInfo,
debug: Handle,
addr: u32_,
) -> Result;
}
extern "C" {
pub fn svcReadProcessMemory(
buffer: *mut ::libc::c_void,
debug: Handle,
addr: u32_,
size: u32_,
) -> Result;
}
extern "C" {
pub fn svcWriteProcessMemory(
debug: Handle,
buffer: *const ::libc::c_void,
addr: u32_,
size: u32_,
) -> Result;
}
extern "C" {
pub fn svcSetHardwareBreakPoint(registerId: s32, control: u32_, value: u32_) -> Result;
}
extern "C" {
pub fn svcGetDebugThreadParam(
unused: *mut s64,
out: *mut u32_,
debug: Handle,
threadId: u32_,
parameter: DebugThreadParameter,
) -> Result;
}
extern "C" {
pub fn svcBackdoor(callback: ::core::option::Option<unsafe extern "C" fn() -> s32>) -> Result;
}
pub const ARM9DESC_MOUNT_NAND: ::libc::c_uint = 1;
pub const ARM9DESC_MOUNT_NANDRO_RW: ::libc::c_uint = 2;
pub const ARM9DESC_MOUNT_TWLN: ::libc::c_uint = 4;
pub const ARM9DESC_MOUNT_WNAND: ::libc::c_uint = 8;
pub const ARM9DESC_MOUNT_CARDSPI: ::libc::c_uint = 16;
pub const ARM9DESC_USE_SDIF3: ::libc::c_uint = 32;
pub const ARM9DESC_CREATE_SEED: ::libc::c_uint = 64;
pub const ARM9DESC_USE_CARD_SPI: ::libc::c_uint = 128;
pub const ARM9DESC_SD_APPLICATION: ::libc::c_uint = 256;
pub const ARM9DESC_MOUNT_SDMC_RW: ::libc::c_uint = 512;
pub type _bindgen_ty_7 = ::libc::c_uint;
pub const FSACCESS_CATEGORY_SYSTEM_APPLICATION: ::libc::c_uint = 1;
pub const FSACCESS_CATEGORY_HARDWARE_CHECK: ::libc::c_uint = 2;
pub const FSACCESS_CATEGORY_FILESYSTEM_TOOL: ::libc::c_uint = 4;
pub const FSACCESS_DEBUG: ::libc::c_uint = 8;
pub const FSACCESS_TWLCARD_BACKUP: ::libc::c_uint = 16;
pub const FSACCESS_TWLNAND_DATA: ::libc::c_uint = 32;
pub const FSACCESS_BOSS: ::libc::c_uint = 64;
pub const FSACCESS_SDMC_RW: ::libc::c_uint = 128;
pub const FSACCESS_CORE: ::libc::c_uint = 256;
pub const FSACCESS_NANDRO_RO: ::libc::c_uint = 512;
pub const FSACCESS_NANDRW: ::libc::c_uint = 1024;
pub const FSACCESS_NANDRO_RW: ::libc::c_uint = 2048;
pub const FSACCESS_CATEGORY_SYSTEM_SETTINGS: ::libc::c_uint = 4096;
pub const FSACCESS_CARDBOARD: ::libc::c_uint = 8192;
pub const FSACCESS_EXPORT_IMPORT_IVS: ::libc::c_uint = 16384;
pub const FSACCESS_SDMC_WO: ::libc::c_uint = 32768;
pub const FSACCESS_SWITCH_CLEANUP: ::libc::c_uint = 65536;
pub const FSACCESS_SAVEDATA_MOVE: ::libc::c_uint = 131072;
pub const FSACCESS_SHOP: ::libc::c_uint = 262144;
pub const FSACCESS_SHELL: ::libc::c_uint = 524288;
pub const FSACCESS_CATEGORY_HOME_MENU: ::libc::c_uint = 1048576;
pub const FSACCESS_SEEDDB: ::libc::c_uint = 2097152;
pub type _bindgen_ty_8 = ::libc::c_uint;
pub const RESLIMIT_CATEGORY_APPLICATION: ResourceLimitCategory = 0;
pub const RESLIMIT_CATEGORY_SYS_APPLET: ResourceLimitCategory = 1;
pub const RESLIMIT_CATEGORY_LIB_APPLET: ResourceLimitCategory = 2;
pub const RESLIMIT_CATEGORY_OTHER: ResourceLimitCategory = 3;
pub type ResourceLimitCategory = ::libc::c_uint;
pub const SYSMODE_O3DS_PROD: SystemMode = 0;
pub const SYSMODE_N3DS_PROD: SystemMode = 1;
pub const SYSMODE_DEV1: SystemMode = 2;
pub const SYSMODE_DEV2: SystemMode = 3;
pub const SYSMODE_DEV3: SystemMode = 4;
pub const SYSMODE_DEV4: SystemMode = 5;
pub type SystemMode = ::libc::c_uint;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct ExHeader_SystemInfoFlags {
pub reserved: [u8_; 5usize],
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
pub remaster_version: u16_,
}
impl ExHeader_SystemInfoFlags {
#[inline]
pub fn compress_exefs_code(&self) -> bool {
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
}
#[inline]
pub fn set_compress_exefs_code(&mut self, val: bool) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(0usize, 1u8, val as u64)
}
}
#[inline]
pub fn is_sd_application(&self) -> bool {
unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) }
}
#[inline]
pub fn set_is_sd_application(&mut self, val: bool) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(1usize, 1u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(
compress_exefs_code: bool,
is_sd_application: bool,
) -> __BindgenBitfieldUnit<[u8; 1usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let compress_exefs_code: u8 = unsafe { ::core::mem::transmute(compress_exefs_code) };
compress_exefs_code as u64
});
__bindgen_bitfield_unit.set(1usize, 1u8, {
let is_sd_application: u8 = unsafe { ::core::mem::transmute(is_sd_application) };
is_sd_application as u64
});
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct ExHeader_CodeSectionInfo {
pub address: u32_,
pub num_pages: u32_,
pub size: u32_,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct ExHeader_CodeSetInfo {
pub name: [::libc::c_char; 8usize],
pub flags: ExHeader_SystemInfoFlags,
pub text: ExHeader_CodeSectionInfo,
pub stack_size: u32_,
pub rodata: ExHeader_CodeSectionInfo,
pub reserved: u32_,
pub data: ExHeader_CodeSectionInfo,
pub bss_size: u32_,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ExHeader_SystemInfo {
pub savedata_size: u64_,
pub jump_id: u64_,
pub reserved: [u8_; 48usize],
}
impl Default for ExHeader_SystemInfo {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ExHeader_SystemControlInfo {
pub codeset_info: ExHeader_CodeSetInfo,
pub dependencies: [u64_; 48usize],
pub system_info: ExHeader_SystemInfo,
}
impl Default for ExHeader_SystemControlInfo {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct ExHeader_Arm11StorageInfo {
pub extdata_id: u64_,
pub system_savedata_ids: [u32_; 2usize],
pub accessible_savedata_ids: u64_,
pub fs_access_info: u32_,
pub _bitfield_align_1: [u32; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
}
impl ExHeader_Arm11StorageInfo {
#[inline]
pub fn reserved(&self) -> u32_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 24u8) as u32) }
}
#[inline]
pub fn set_reserved(&mut self, val: u32_) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(0usize, 24u8, val as u64)
}
}
#[inline]
pub fn no_romfs(&self) -> bool {
unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 1u8) as u8) }
}
#[inline]
pub fn set_no_romfs(&mut self, val: bool) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(24usize, 1u8, val as u64)
}
}
#[inline]
pub fn use_extended_savedata_access(&self) -> bool {
unsafe { ::core::mem::transmute(self._bitfield_1.get(25usize, 1u8) as u8) }
}
#[inline]
pub fn set_use_extended_savedata_access(&mut self, val: bool) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(25usize, 1u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(
reserved: u32_,
no_romfs: bool,
use_extended_savedata_access: bool,
) -> __BindgenBitfieldUnit<[u8; 4usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 24u8, {
let reserved: u32 = unsafe { ::core::mem::transmute(reserved) };
reserved as u64
});
__bindgen_bitfield_unit.set(24usize, 1u8, {
let no_romfs: u8 = unsafe { ::core::mem::transmute(no_romfs) };
no_romfs as u64
});
__bindgen_bitfield_unit.set(25usize, 1u8, {
let use_extended_savedata_access: u8 =
unsafe { ::core::mem::transmute(use_extended_savedata_access) };
use_extended_savedata_access as u64
});
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ExHeader_Arm11CoreInfo {
pub core_version: u32_,
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 3usize]>,
pub priority: u8_,
}
impl Default for ExHeader_Arm11CoreInfo {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
impl ExHeader_Arm11CoreInfo {
#[inline]
pub fn use_cpu_clockrate_804MHz(&self) -> bool {
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
}
#[inline]
pub fn set_use_cpu_clockrate_804MHz(&mut self, val: bool) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(0usize, 1u8, val as u64)
}
}
#[inline]
pub fn enable_l2c(&self) -> bool {
unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) }
}
#[inline]
pub fn set_enable_l2c(&mut self, val: bool) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(1usize, 1u8, val as u64)
}
}
#[inline]
pub fn flag1_unused(&self) -> u8_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 6u8) as u8) }
}
#[inline]
pub fn set_flag1_unused(&mut self, val: u8_) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(2usize, 6u8, val as u64)
}
}
#[inline]
pub fn n3ds_system_mode(&self) -> SystemMode {
unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 4u8) as u32) }
}
#[inline]
pub fn set_n3ds_system_mode(&mut self, val: SystemMode) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(8usize, 4u8, val as u64)
}
}
#[inline]
pub fn flag2_unused(&self) -> u8_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 4u8) as u8) }
}
#[inline]
pub fn set_flag2_unused(&mut self, val: u8_) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(12usize, 4u8, val as u64)
}
}
#[inline]
pub fn ideal_processor(&self) -> u8_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 2u8) as u8) }
}
#[inline]
pub fn set_ideal_processor(&mut self, val: u8_) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(16usize, 2u8, val as u64)
}
}
#[inline]
pub fn affinity_mask(&self) -> u8_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(18usize, 2u8) as u8) }
}
#[inline]
pub fn set_affinity_mask(&mut self, val: u8_) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(18usize, 2u8, val as u64)
}
}
#[inline]
pub fn o3ds_system_mode(&self) -> SystemMode {
unsafe { ::core::mem::transmute(self._bitfield_1.get(20usize, 4u8) as u32) }
}
#[inline]
pub fn set_o3ds_system_mode(&mut self, val: SystemMode) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(20usize, 4u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(
use_cpu_clockrate_804MHz: bool,
enable_l2c: bool,
flag1_unused: u8_,
n3ds_system_mode: SystemMode,
flag2_unused: u8_,
ideal_processor: u8_,
affinity_mask: u8_,
o3ds_system_mode: SystemMode,
) -> __BindgenBitfieldUnit<[u8; 3usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 3usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let use_cpu_clockrate_804MHz: u8 =
unsafe { ::core::mem::transmute(use_cpu_clockrate_804MHz) };
use_cpu_clockrate_804MHz as u64
});
__bindgen_bitfield_unit.set(1usize, 1u8, {
let enable_l2c: u8 = unsafe { ::core::mem::transmute(enable_l2c) };
enable_l2c as u64
});
__bindgen_bitfield_unit.set(2usize, 6u8, {
let flag1_unused: u8 = unsafe { ::core::mem::transmute(flag1_unused) };
flag1_unused as u64
});
__bindgen_bitfield_unit.set(8usize, 4u8, {
let n3ds_system_mode: u32 = unsafe { ::core::mem::transmute(n3ds_system_mode) };
n3ds_system_mode as u64
});
__bindgen_bitfield_unit.set(12usize, 4u8, {
let flag2_unused: u8 = unsafe { ::core::mem::transmute(flag2_unused) };
flag2_unused as u64
});
__bindgen_bitfield_unit.set(16usize, 2u8, {
let ideal_processor: u8 = unsafe { ::core::mem::transmute(ideal_processor) };
ideal_processor as u64
});
__bindgen_bitfield_unit.set(18usize, 2u8, {
let affinity_mask: u8 = unsafe { ::core::mem::transmute(affinity_mask) };
affinity_mask as u64
});
__bindgen_bitfield_unit.set(20usize, 4u8, {
let o3ds_system_mode: u32 = unsafe { ::core::mem::transmute(o3ds_system_mode) };
o3ds_system_mode as u64
});
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ExHeader_Arm11SystemLocalCapabilities {
pub title_id: u64_,
pub core_info: ExHeader_Arm11CoreInfo,
pub reslimits: [u16_; 16usize],
pub storage_info: ExHeader_Arm11StorageInfo,
pub service_access: [[::libc::c_char; 8usize]; 34usize],
pub reserved: [u8_; 15usize],
pub reslimit_category: ResourceLimitCategory,
}
impl Default for ExHeader_Arm11SystemLocalCapabilities {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct ExHeader_Arm11KernelCapabilities {
pub descriptors: [u32_; 28usize],
pub reserved: [u8_; 16usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct ExHeader_Arm9AccessControl {
pub descriptors: [u8_; 15usize],
pub descriptor_version: u8_,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ExHeader_AccessControlInfo {
pub local_caps: ExHeader_Arm11SystemLocalCapabilities,
pub kernel_caps: ExHeader_Arm11KernelCapabilities,
pub access_control: ExHeader_Arm9AccessControl,
}
impl Default for ExHeader_AccessControlInfo {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ExHeader_Info {
pub sci: ExHeader_SystemControlInfo,
pub aci: ExHeader_AccessControlInfo,
}
impl Default for ExHeader_Info {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ExHeader_AccessDescriptor {
pub signature: [u8_; 256usize],
pub ncchModulus: [u8_; 256usize],
pub acli: ExHeader_AccessControlInfo,
}
impl Default for ExHeader_AccessDescriptor {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ExHeader {
pub info: ExHeader_Info,
pub access_descriptor: ExHeader_AccessDescriptor,
}
impl Default for ExHeader {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
extern "C" {
pub fn srvInit() -> Result;
}
extern "C" {
pub fn srvExit();
}
extern "C" {
pub fn srvSetBlockingPolicy(nonBlocking: bool);
}
extern "C" {
pub fn srvGetSessionHandle() -> *mut Handle;
}
extern "C" {
pub fn srvGetServiceHandle(out: *mut Handle, name: *const ::libc::c_char) -> Result;
}
extern "C" {
pub fn srvRegisterClient() -> Result;
}
extern "C" {
pub fn srvEnableNotification(semaphoreOut: *mut Handle) -> Result;
}
extern "C" {
pub fn srvRegisterService(
out: *mut Handle,
name: *const ::libc::c_char,
maxSessions: ::libc::c_int,
) -> Result;
}
extern "C" {
pub fn srvUnregisterService(name: *const ::libc::c_char) -> Result;
}
extern "C" {
pub fn srvGetServiceHandleDirect(out: *mut Handle, name: *const ::libc::c_char) -> Result;
}
extern "C" {
pub fn srvRegisterPort(name: *const ::libc::c_char, clientHandle: Handle) -> Result;
}
extern "C" {
pub fn srvUnregisterPort(name: *const ::libc::c_char) -> Result;
}
extern "C" {
pub fn srvGetPort(out: *mut Handle, name: *const ::libc::c_char) -> Result;
}
extern "C" {
pub fn srvWaitForPortRegistered(name: *const ::libc::c_char) -> Result;
}
extern "C" {
pub fn srvSubscribe(notificationId: u32_) -> Result;
}
extern "C" {
pub fn srvUnsubscribe(notificationId: u32_) -> Result;
}
extern "C" {
pub fn srvReceiveNotification(notificationIdOut: *mut u32_) -> Result;
}
extern "C" {
pub fn srvPublishToSubscriber(notificationId: u32_, flags: u32_) -> Result;
}
extern "C" {
pub fn srvPublishAndGetSubscriber(
processIdCountOut: *mut u32_,
processIdsOut: *mut u32_,
notificationId: u32_,
) -> Result;
}
extern "C" {
pub fn srvIsServiceRegistered(registeredOut: *mut bool, name: *const ::libc::c_char) -> Result;
}
extern "C" {
pub fn srvIsPortRegistered(registeredOut: *mut bool, name: *const ::libc::c_char) -> Result;
}
pub const ERRF_ERRTYPE_GENERIC: ERRF_ErrType = 0;
pub const ERRF_ERRTYPE_MEM_CORRUPT: ERRF_ErrType = 1;
pub const ERRF_ERRTYPE_CARD_REMOVED: ERRF_ErrType = 2;
pub const ERRF_ERRTYPE_EXCEPTION: ERRF_ErrType = 3;
pub const ERRF_ERRTYPE_FAILURE: ERRF_ErrType = 4;
pub const ERRF_ERRTYPE_LOGGED: ERRF_ErrType = 5;
pub type ERRF_ErrType = ::libc::c_uint;
pub const ERRF_EXCEPTION_PREFETCH_ABORT: ERRF_ExceptionType = 0;
pub const ERRF_EXCEPTION_DATA_ABORT: ERRF_ExceptionType = 1;
pub const ERRF_EXCEPTION_UNDEFINED: ERRF_ExceptionType = 2;
pub const ERRF_EXCEPTION_VFP: ERRF_ExceptionType = 3;
pub type ERRF_ExceptionType = ::libc::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ERRF_ExceptionInfo {
pub type_: ERRF_ExceptionType,
pub reserved: [u8_; 3usize],
pub fsr: u32_,
pub far: u32_,
pub fpexc: u32_,
pub fpinst: u32_,
pub fpinst2: u32_,
}
impl Default for ERRF_ExceptionInfo {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ERRF_ExceptionData {
pub excep: ERRF_ExceptionInfo,
pub regs: CpuRegisters,
}
impl Default for ERRF_ExceptionData {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ERRF_FatalErrInfo {
pub type_: ERRF_ErrType,
pub revHigh: u8_,
pub revLow: u16_,
pub resCode: u32_,
pub pcAddr: u32_,
pub procId: u32_,
pub titleId: u64_,
pub appTitleId: u64_,
pub data: ERRF_FatalErrInfo__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union ERRF_FatalErrInfo__bindgen_ty_1 {
pub exception_data: ERRF_ExceptionData,
pub failure_mesg: [::libc::c_char; 96usize],
_bindgen_union_align: [u32; 24usize],
}
impl Default for ERRF_FatalErrInfo__bindgen_ty_1 {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
impl Default for ERRF_FatalErrInfo {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
extern "C" {
pub fn errfInit() -> Result;
}
extern "C" {
pub fn errfExit();
}
extern "C" {
pub fn errfGetSessionHandle() -> *mut Handle;
}
extern "C" {
pub fn ERRF_Throw(error: *const ERRF_FatalErrInfo) -> Result;
}
extern "C" {
pub fn ERRF_ThrowResult(failure: Result) -> Result;
}
extern "C" {
pub fn ERRF_ThrowResultWithMessage(failure: Result, message: *const ::libc::c_char) -> Result;
}
extern "C" {
pub fn ERRF_ExceptionHandler(excep: *mut ERRF_ExceptionInfo, regs: *mut CpuRegisters);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct osKernelConfig_s {
pub kernel_ver: u32_,
pub update_flag: u32_,
pub ns_tid: u64_,
pub kernel_syscore_ver: u32_,
pub env_info: u8_,
pub unit_info: u8_,
pub boot_env: u8_,
pub unk_0x17: u8_,
pub kernel_ctrsdk_ver: u32_,
pub unk_0x1c: u32_,
pub firmlaunch_flags: u32_,
pub unk_0x24: [u8_; 12usize],
pub app_memtype: u32_,
pub unk_0x34: [u8_; 12usize],
pub memregion_sz: [u32_; 3usize],
pub unk_0x4c: [u8_; 20usize],
pub firm_ver: u32_,
pub firm_syscore_ver: u32_,
pub firm_ctrsdk_ver: u32_,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct osTimeRef_s {
pub value_ms: u64_,
pub value_tick: u64_,
pub sysclock_hz: s64,
pub drift_ms: s64,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct osSharedConfig_s {
pub timeref_cnt: vu32,
pub running_hw: u8_,
pub mcu_hwinfo: u8_,
pub unk_0x06: [u8_; 26usize],
pub timeref: [osTimeRef_s; 2usize],
pub wifi_macaddr: [u8_; 6usize],
pub wifi_strength: vu8,
pub network_state: vu8,
pub unk_0x68: [u8_; 24usize],
pub slider_3d: f32,
pub led_3d: vu8,
pub led_battery: vu8,
pub unk_flag: vu8,
pub unk_0x87: u8_,
pub unk_0x88: [u8_; 24usize],
pub menu_tid: vu64,
pub cur_menu_tid: vu64,
pub unk_0xB0: [u8_; 16usize],
pub headset_connected: vu8,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct TickCounter {
pub elapsed: u64_,
pub reference: u64_,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct OS_VersionBin {
pub build: u8_,
pub minor: u8_,
pub mainver: u8_,
pub reserved_x3: u8_,
pub region: ::libc::c_char,
pub reserved_x5: [u8_; 3usize],
}
extern "C" {
pub fn osConvertVirtToPhys(vaddr: *const ::libc::c_void) -> u32_;
}
extern "C" {
pub fn osConvertOldLINEARMemToNew(vaddr: *const ::libc::c_void) -> *mut ::libc::c_void;
}
extern "C" {
pub fn osStrError(error: Result) -> *const ::libc::c_char;
}
extern "C" {
pub fn osGetTimeRef() -> osTimeRef_s;
}
extern "C" {
pub fn osGetTime() -> u64_;
}
extern "C" {
pub fn osTickCounterRead(cnt: *const TickCounter) -> f64;
}
extern "C" {
pub fn osSetSpeedupEnable(enable: bool);
}
extern "C" {
pub fn osGetSystemVersionData(
nver_versionbin: *mut OS_VersionBin,
cver_versionbin: *mut OS_VersionBin,
) -> Result;
}
extern "C" {
pub fn osGetSystemVersionDataString(
nver_versionbin: *mut OS_VersionBin,
cver_versionbin: *mut OS_VersionBin,
sysverstr: *mut ::libc::c_char,
sysverstr_maxsize: u32_,
) -> Result;
}
pub type _LOCK_T = i32;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct __lock_t {
pub lock: _LOCK_T,
pub thread_tag: u32,
pub counter: u32,
}
pub type _LOCK_RECURSIVE_T = __lock_t;
extern "C" {
pub fn __libc_lock_init(lock: *mut _LOCK_T);
}
extern "C" {
pub fn __libc_lock_init_recursive(lock: *mut _LOCK_RECURSIVE_T);
}
extern "C" {
pub fn __libc_lock_close(lock: *mut _LOCK_T);
}
extern "C" {
pub fn __libc_lock_close_recursive(lock: *mut _LOCK_RECURSIVE_T);
}
extern "C" {
pub fn __libc_lock_acquire(lock: *mut _LOCK_T);
}
extern "C" {
pub fn __libc_lock_acquire_recursive(lock: *mut _LOCK_RECURSIVE_T);
}
extern "C" {
pub fn __libc_lock_release(lock: *mut _LOCK_T);
}
extern "C" {
pub fn __libc_lock_release_recursive(lock: *mut _LOCK_RECURSIVE_T);
}
extern "C" {
pub fn __libc_lock_try_acquire(lock: *mut _LOCK_T) -> ::libc::c_int;
}
extern "C" {
pub fn __libc_lock_try_acquire_recursive(lock: *mut _LOCK_RECURSIVE_T) -> ::libc::c_int;
}
pub type LightLock = _LOCK_T;
pub type RecursiveLock = _LOCK_RECURSIVE_T;
pub type CondVar = s32;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct LightEvent {
pub state: s32,
pub lock: LightLock,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct LightSemaphore {
pub current_count: s32,
pub num_threads_acq: s16,
pub max_count: s16,
}
extern "C" {
pub fn syncArbitrateAddress(addr: *mut s32, type_: ArbitrationType, value: s32) -> Result;
}
extern "C" {
pub fn syncArbitrateAddressWithTimeout(
addr: *mut s32,
type_: ArbitrationType,
value: s32,
timeout_ns: s64,
) -> Result;
}
extern "C" {
pub fn LightLock_Init(lock: *mut LightLock);
}
extern "C" {
pub fn LightLock_Lock(lock: *mut LightLock);
}
extern "C" {
pub fn LightLock_TryLock(lock: *mut LightLock) -> ::libc::c_int;
}
extern "C" {
pub fn LightLock_Unlock(lock: *mut LightLock);
}
extern "C" {
pub fn RecursiveLock_Init(lock: *mut RecursiveLock);
}
extern "C" {
pub fn RecursiveLock_Lock(lock: *mut RecursiveLock);
}
extern "C" {
pub fn RecursiveLock_TryLock(lock: *mut RecursiveLock) -> ::libc::c_int;
}
extern "C" {
pub fn RecursiveLock_Unlock(lock: *mut RecursiveLock);
}
extern "C" {
pub fn CondVar_Init(cv: *mut CondVar);
}
extern "C" {
pub fn CondVar_Wait(cv: *mut CondVar, lock: *mut LightLock);
}
extern "C" {
pub fn CondVar_WaitTimeout(
cv: *mut CondVar,
lock: *mut LightLock,
timeout_ns: s64,
) -> ::libc::c_int;
}
extern "C" {
pub fn CondVar_WakeUp(cv: *mut CondVar, num_threads: s32);
}
extern "C" {
pub fn LightEvent_Init(event: *mut LightEvent, reset_type: ResetType);
}
extern "C" {
pub fn LightEvent_Clear(event: *mut LightEvent);
}
extern "C" {
pub fn LightEvent_Pulse(event: *mut LightEvent);
}
extern "C" {
pub fn LightEvent_Signal(event: *mut LightEvent);
}
extern "C" {
pub fn LightEvent_TryWait(event: *mut LightEvent) -> ::libc::c_int;
}
extern "C" {
pub fn LightEvent_Wait(event: *mut LightEvent);
}
extern "C" {
pub fn LightEvent_WaitTimeout(event: *mut LightEvent, timeout_ns: s64) -> ::libc::c_int;
}
extern "C" {
pub fn LightSemaphore_Init(semaphore: *mut LightSemaphore, initial_count: s16, max_count: s16);
}
extern "C" {
pub fn LightSemaphore_Acquire(semaphore: *mut LightSemaphore, count: s32);
}
extern "C" {
pub fn LightSemaphore_TryAcquire(semaphore: *mut LightSemaphore, count: s32) -> ::libc::c_int;
}
extern "C" {
pub fn LightSemaphore_Release(semaphore: *mut LightSemaphore, count: s32);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct Thread_tag {
_unused: [u8; 0],
}
pub type Thread = *mut Thread_tag;
pub type ExceptionHandler = ::core::option::Option<
unsafe extern "C" fn(excep: *mut ERRF_ExceptionInfo, regs: *mut CpuRegisters),
>;
extern "C" {
pub fn threadCreate(
entrypoint: ThreadFunc,
arg: *mut ::libc::c_void,
stack_size: size_t,
prio: ::libc::c_int,
core_id: ::libc::c_int,
detached: bool,
) -> Thread;
}
extern "C" {
pub fn threadGetHandle(thread: Thread) -> Handle;
}
extern "C" {
pub fn threadGetExitCode(thread: Thread) -> ::libc::c_int;
}
extern "C" {
pub fn threadFree(thread: Thread);
}
extern "C" {
pub fn threadJoin(thread: Thread, timeout_ns: u64_) -> Result;
}
extern "C" {
pub fn threadDetach(thread: Thread);
}
extern "C" {
pub fn threadGetCurrent() -> Thread;
}
extern "C" {
pub fn threadExit(rc: ::libc::c_int);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct GSPGPU_FramebufferInfo {
pub active_framebuf: u32_,
pub framebuf0_vaddr: *mut u32_,
pub framebuf1_vaddr: *mut u32_,
pub framebuf_widthbytesize: u32_,
pub format: u32_,
pub framebuf_dispselect: u32_,
pub unk: u32_,
}
impl Default for GSPGPU_FramebufferInfo {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
pub const GSP_RGBA8_OES: GSPGPU_FramebufferFormat = 0;
pub const GSP_BGR8_OES: GSPGPU_FramebufferFormat = 1;
pub const GSP_RGB565_OES: GSPGPU_FramebufferFormat = 2;
pub const GSP_RGB5_A1_OES: GSPGPU_FramebufferFormat = 3;
pub const GSP_RGBA4_OES: GSPGPU_FramebufferFormat = 4;
pub type GSPGPU_FramebufferFormat = ::libc::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct GSPGPU_CaptureInfoEntry {
pub framebuf0_vaddr: *mut u32_,
pub framebuf1_vaddr: *mut u32_,
pub format: u32_,
pub framebuf_widthbytesize: u32_,
}
impl Default for GSPGPU_CaptureInfoEntry {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct GSPGPU_CaptureInfo {
pub screencapture: [GSPGPU_CaptureInfoEntry; 2usize],
}
impl Default for GSPGPU_CaptureInfo {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
pub const GSPGPU_EVENT_PSC0: GSPGPU_Event = 0;
pub const GSPGPU_EVENT_PSC1: GSPGPU_Event = 1;
pub const GSPGPU_EVENT_VBlank0: GSPGPU_Event = 2;
pub const GSPGPU_EVENT_VBlank1: GSPGPU_Event = 3;
pub const GSPGPU_EVENT_PPF: GSPGPU_Event = 4;
pub const GSPGPU_EVENT_P3D: GSPGPU_Event = 5;
pub const GSPGPU_EVENT_DMA: GSPGPU_Event = 6;
pub const GSPGPU_EVENT_MAX: GSPGPU_Event = 7;
pub type GSPGPU_Event = ::libc::c_uint;
extern "C" {
pub fn gspInit() -> Result;
}
extern "C" {
pub fn gspExit();
}
extern "C" {
pub fn gspHasGpuRight() -> bool;
}
extern "C" {
pub fn gspPresentBuffer(
screen: ::libc::c_uint,
swap: ::libc::c_uint,
fb_a: *const ::libc::c_void,
fb_b: *const ::libc::c_void,
stride: u32_,
mode: u32_,
);
}
extern "C" {
pub fn gspSetEventCallback(
id: GSPGPU_Event,
cb: ThreadFunc,
data: *mut ::libc::c_void,
oneShot: bool,
);
}
extern "C" {
pub fn gspWaitForEvent(id: GSPGPU_Event, nextEvent: bool);
}
extern "C" {
pub fn gspWaitForAnyEvent() -> GSPGPU_Event;
}
extern "C" {
pub fn gspSubmitGxCommand(gxCommand: *const u32_) -> Result;
}
extern "C" {
pub fn GSPGPU_AcquireRight(flags: u8_) -> Result;
}
extern "C" {
pub fn GSPGPU_ReleaseRight() -> Result;
}
extern "C" {
pub fn GSPGPU_ImportDisplayCaptureInfo(captureinfo: *mut GSPGPU_CaptureInfo) -> Result;
}
extern "C" {
pub fn GSPGPU_SaveVramSysArea() -> Result;
}
extern "C" {
pub fn GSPGPU_ResetGpuCore() -> Result;
}
extern "C" {
pub fn GSPGPU_RestoreVramSysArea() -> Result;
}
extern "C" {
pub fn GSPGPU_SetLcdForceBlack(flags: u8_) -> Result;
}
extern "C" {
pub fn GSPGPU_SetBufferSwap(
screenid: u32_,
framebufinfo: *const GSPGPU_FramebufferInfo,
) -> Result;
}
extern "C" {
pub fn GSPGPU_FlushDataCache(adr: *const ::libc::c_void, size: u32_) -> Result;
}
extern "C" {
pub fn GSPGPU_InvalidateDataCache(adr: *const ::libc::c_void, size: u32_) -> Result;
}
extern "C" {
pub fn GSPGPU_WriteHWRegs(regAddr: u32_, data: *const u32_, size: u8_) -> Result;
}
extern "C" {
pub fn GSPGPU_WriteHWRegsWithMask(
regAddr: u32_,
data: *const u32_,
datasize: u8_,
maskdata: *const u32_,
masksize: u8_,
) -> Result;
}
extern "C" {
pub fn GSPGPU_ReadHWRegs(regAddr: u32_, data: *mut u32_, size: u8_) -> Result;
}
extern "C" {
pub fn GSPGPU_RegisterInterruptRelayQueue(
eventHandle: Handle,
flags: u32_,
outMemHandle: *mut Handle,
threadID: *mut u8_,
) -> Result;
}
extern "C" {
pub fn GSPGPU_UnregisterInterruptRelayQueue() -> Result;
}
extern "C" {
pub fn GSPGPU_TriggerCmdReqQueue() -> Result;
}
extern "C" {
pub fn GSPGPU_SetLedForceOff(disable: bool) -> Result;
}
pub const GFX_TOP: gfxScreen_t = 0;
pub const GFX_BOTTOM: gfxScreen_t = 1;
pub type gfxScreen_t = ::libc::c_uint;
pub const GFX_LEFT: gfx3dSide_t = 0;
pub const GFX_RIGHT: gfx3dSide_t = 1;
pub type gfx3dSide_t = ::libc::c_uint;
extern "C" {
pub fn gfxInitDefault();
}
extern "C" {
pub fn gfxInit(
topFormat: GSPGPU_FramebufferFormat,
bottomFormat: GSPGPU_FramebufferFormat,
vrambuffers: bool,
);
}
extern "C" {
pub fn gfxExit();
}
extern "C" {
pub fn gfxSet3D(enable: bool);
}
extern "C" {
pub fn gfxIs3D() -> bool;
}
extern "C" {
pub fn gfxIsWide() -> bool;
}
extern "C" {
pub fn gfxSetWide(enable: bool);
}
extern "C" {
pub fn gfxSetScreenFormat(screen: gfxScreen_t, format: GSPGPU_FramebufferFormat);
}
extern "C" {
pub fn gfxGetScreenFormat(screen: gfxScreen_t) -> GSPGPU_FramebufferFormat;
}
extern "C" {
pub fn gfxSetDoubleBuffering(screen: gfxScreen_t, enable: bool);
}
extern "C" {
pub fn gfxGetFramebuffer(
screen: gfxScreen_t,
side: gfx3dSide_t,
width: *mut u16_,
height: *mut u16_,
) -> *mut u8_;
}
extern "C" {
pub fn gfxFlushBuffers();
}
extern "C" {
pub fn gfxScreenSwapBuffers(scr: gfxScreen_t, hasStereo: bool);
}
extern "C" {
pub fn gfxConfigScreen(scr: gfxScreen_t, immediate: bool);
}
extern "C" {
pub fn gfxSwapBuffers();
}
extern "C" {
pub fn gfxSwapBuffersGpu();
}
pub type ConsolePrint = ::core::option::Option<
unsafe extern "C" fn(con: *mut ::libc::c_void, c: ::libc::c_int) -> bool,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ConsoleFont {
pub gfx: *mut u8_,
pub asciiOffset: u16_,
pub numChars: u16_,
}
impl Default for ConsoleFont {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PrintConsole {
pub font: ConsoleFont,
pub frameBuffer: *mut u16_,
pub cursorX: ::libc::c_int,
pub cursorY: ::libc::c_int,
pub prevCursorX: ::libc::c_int,
pub prevCursorY: ::libc::c_int,
pub consoleWidth: ::libc::c_int,
pub consoleHeight: ::libc::c_int,
pub windowX: ::libc::c_int,
pub windowY: ::libc::c_int,
pub windowWidth: ::libc::c_int,
pub windowHeight: ::libc::c_int,
pub tabSize: ::libc::c_int,
pub fg: ::libc::c_int,
pub bg: ::libc::c_int,
pub flags: ::libc::c_int,
pub PrintChar: ConsolePrint,
pub consoleInitialised: bool,
}
impl Default for PrintConsole {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
pub const debugDevice_NULL: debugDevice = 0;
pub const debugDevice_SVC: debugDevice = 1;
pub const debugDevice_CONSOLE: debugDevice = 2;
pub const debugDevice_3DMOO: debugDevice = 1;
pub type debugDevice = ::libc::c_uint;
extern "C" {
pub fn consoleSetFont(console: *mut PrintConsole, font: *mut ConsoleFont);
}
extern "C" {
pub fn consoleSetWindow(
console: *mut PrintConsole,
x: ::libc::c_int,
y: ::libc::c_int,
width: ::libc::c_int,
height: ::libc::c_int,
);
}
extern "C" {
pub fn consoleGetDefault() -> *mut PrintConsole;
}
extern "C" {
pub fn consoleSelect(console: *mut PrintConsole) -> *mut PrintConsole;
}
extern "C" {
pub fn consoleInit(screen: gfxScreen_t, console: *mut PrintConsole) -> *mut PrintConsole;
}
extern "C" {
pub fn consoleDebugInit(device: debugDevice);
}
extern "C" {
pub fn consoleClear();
}
pub const RUNFLAG_APTWORKAROUND: ::libc::c_uint = 1;
pub const RUNFLAG_APTREINIT: ::libc::c_uint = 2;
pub const RUNFLAG_APTCHAINLOAD: ::libc::c_uint = 4;
pub type _bindgen_ty_9 = ::libc::c_uint;
extern "C" {
pub fn envGetHandle(name: *const ::libc::c_char) -> Handle;
}
pub type _off_t = __int64_t;
pub type _fpos_t = __int64_t;
pub type __ino_t = __uint32_t;
pub type __dev_t = __uint32_t;
pub type u_int8_t = __uint8_t;
pub type u_int16_t = __uint16_t;
pub type u_int32_t = __uint32_t;
pub type u_int64_t = __uint64_t;
pub type register_t = __intptr_t;
pub type wint_t = ::libc::c_int;
pub type __blkcnt_t = ::libc::c_long;
pub type __blksize_t = ::libc::c_long;
pub type __fsblkcnt_t = __uint64_t;
pub type __fsfilcnt_t = __uint32_t;
pub type __pid_t = ::libc::c_int;
pub type __uid_t = ::libc::c_ushort;
pub type __gid_t = ::libc::c_ushort;
pub type __id_t = __uint32_t;
pub type __mode_t = __uint32_t;
pub type _off64_t = ::libc::c_longlong;
pub type __off_t = _off_t;
pub type __loff_t = _off64_t;
pub type __key_t = ::libc::c_long;
pub type __size_t = ::libc::c_uint;
pub type _ssize_t = ::libc::c_int;
pub type __ssize_t = _ssize_t;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct _mbstate_t {
pub __count: ::libc::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: [::libc::c_uchar; 4usize],
_bindgen_union_align: u32,
}
impl Default for _mbstate_t__bindgen_ty_1 {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
impl Default for _mbstate_t {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
pub type _iconv_t = *mut ::libc::c_void;
pub type __clock_t = ::libc::c_ulong;
pub type __time_t = __int_least64_t;
pub type __clockid_t = ::libc::c_ulong;
pub type __timer_t = ::libc::c_ulong;
pub type __sa_family_t = __uint8_t;
pub type __socklen_t = __uint32_t;
pub type __nl_item = ::libc::c_int;
pub type __nlink_t = ::libc::c_ushort;
pub type __suseconds_t = ::libc::c_long;
pub type __useconds_t = ::libc::c_ulong;
pub type __sigset_t = ::libc::c_ulong;
pub type suseconds_t = __suseconds_t;
pub type time_t = __int_least64_t;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct timeval {
pub tv_sec: time_t,
pub tv_usec: suseconds_t,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct timespec {
pub tv_sec: time_t,
pub tv_nsec: ::libc::c_long,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct itimerspec {
pub it_interval: timespec,
pub it_value: timespec,
}
pub type sigset_t = __sigset_t;
pub type fd_mask = ::libc::c_ulong;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct _types_fd_set {
pub fds_bits: [fd_mask; 2usize],
}
extern "C" {
pub fn select(
__n: ::libc::c_int,
__readfds: *mut _types_fd_set,
__writefds: *mut _types_fd_set,
__exceptfds: *mut _types_fd_set,
__timeout: *mut timeval,
) -> ::libc::c_int;
}
extern "C" {
pub fn pselect(
__n: ::libc::c_int,
__readfds: *mut _types_fd_set,
__writefds: *mut _types_fd_set,
__exceptfds: *mut _types_fd_set,
__timeout: *const timespec,
__set: *const sigset_t,
) -> ::libc::c_int;
}
pub type in_addr_t = __uint32_t;
pub type in_port_t = __uint16_t;
pub type u_register_t = __uintptr_t;
pub type u_char = ::libc::c_uchar;
pub type u_short = ::libc::c_ushort;
pub type u_int = ::libc::c_uint;
pub type u_long = ::libc::c_ulong;
pub type ushort = ::libc::c_ushort;
pub type uint = ::libc::c_uint;
pub type ulong = ::libc::c_ulong;
pub type blkcnt_t = __blkcnt_t;
pub type blksize_t = __blksize_t;
pub type clock_t = ::libc::c_ulong;
pub type daddr_t = ::libc::c_long;
pub type caddr_t = *mut ::libc::c_char;
pub type fsblkcnt_t = __fsblkcnt_t;
pub type fsfilcnt_t = __fsfilcnt_t;
pub type id_t = __id_t;
pub type ino_t = __ino_t;
pub type off_t = __off_t;
pub type dev_t = __dev_t;
pub type uid_t = __uid_t;
pub type gid_t = __gid_t;
pub type pid_t = __pid_t;
pub type key_t = __key_t;
pub type ssize_t = _ssize_t;
pub type mode_t = __mode_t;
pub type nlink_t = __nlink_t;
pub type clockid_t = __clockid_t;
pub type timer_t = __timer_t;
pub type useconds_t = __useconds_t;
pub type sbintime_t = __int64_t;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct sched_param {
pub sched_priority: ::libc::c_int,
}
pub type pthread_t = __uint32_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pthread_attr_t {
pub is_initialized: ::libc::c_int,
pub stackaddr: *mut ::libc::c_void,
pub stacksize: ::libc::c_int,
pub contentionscope: ::libc::c_int,
pub inheritsched: ::libc::c_int,
pub schedpolicy: ::libc::c_int,
pub schedparam: sched_param,
pub detachstate: ::libc::c_int,
}
impl Default for pthread_attr_t {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
pub type pthread_mutex_t = __uint32_t;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct pthread_mutexattr_t {
pub is_initialized: ::libc::c_int,
pub recursive: ::libc::c_int,
}
pub type pthread_cond_t = __uint32_t;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct pthread_condattr_t {
pub is_initialized: ::libc::c_int,
pub clock: clock_t,
}
pub type pthread_key_t = __uint32_t;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct pthread_once_t {
pub is_initialized: ::libc::c_int,
pub init_executed: ::libc::c_int,
}
pub const DECOMPRESS_DUMMY: decompressType = 0;
pub const DECOMPRESS_LZSS: decompressType = 16;
pub const DECOMPRESS_LZ10: decompressType = 16;
pub const DECOMPRESS_LZ11: decompressType = 17;
pub const DECOMPRESS_HUFF1: decompressType = 33;
pub const DECOMPRESS_HUFF2: decompressType = 34;
pub const DECOMPRESS_HUFF3: decompressType = 35;
pub const DECOMPRESS_HUFF4: decompressType = 36;
pub const DECOMPRESS_HUFF5: decompressType = 37;
pub const DECOMPRESS_HUFF6: decompressType = 38;
pub const DECOMPRESS_HUFF7: decompressType = 39;
pub const DECOMPRESS_HUFF8: decompressType = 40;
pub const DECOMPRESS_HUFF: decompressType = 40;
pub const DECOMPRESS_RLE: decompressType = 48;
pub type decompressType = ::libc::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct decompressIOVec {
pub data: *mut ::libc::c_void,
pub size: size_t,
}
impl Default for decompressIOVec {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
pub type decompressCallback = ::core::option::Option<
unsafe extern "C" fn(
userdata: *mut ::libc::c_void,
buffer: *mut ::libc::c_void,
size: size_t,
) -> ssize_t,
>;
extern "C" {
pub fn decompressCallback_FD(
userdata: *mut ::libc::c_void,
buffer: *mut ::libc::c_void,
size: size_t,
) -> ssize_t;
}
extern "C" {
pub fn decompressCallback_Stdio(
userdata: *mut ::libc::c_void,
buffer: *mut ::libc::c_void,
size: size_t,
) -> ssize_t;
}
extern "C" {
pub fn decompressHeader(
type_: *mut decompressType,
size: *mut size_t,
callback: decompressCallback,
userdata: *mut ::libc::c_void,
insize: size_t,
) -> ssize_t;
}
extern "C" {
pub fn decompressV(
iov: *const decompressIOVec,
iovcnt: size_t,
callback: decompressCallback,
userdata: *mut ::libc::c_void,
insize: size_t,
) -> bool;
}
extern "C" {
pub fn decompressV_LZSS(
iov: *const decompressIOVec,
iovcnt: size_t,
callback: decompressCallback,
userdata: *mut ::libc::c_void,
insize: size_t,
) -> bool;
}
extern "C" {
pub fn decompressV_LZ11(
iov: *const decompressIOVec,
iovcnt: size_t,
callback: decompressCallback,
userdata: *mut ::libc::c_void,
insize: size_t,
) -> bool;
}
extern "C" {
pub fn decompressV_Huff(
bits: size_t,
iov: *const decompressIOVec,
iovcnt: size_t,
callback: decompressCallback,
userdata: *mut ::libc::c_void,
insize: size_t,
) -> bool;
}
extern "C" {
pub fn decompressV_RLE(
iov: *const decompressIOVec,
iovcnt: size_t,
callback: decompressCallback,
userdata: *mut ::libc::c_void,
insize: size_t,
) -> bool;
}
extern "C" {
pub fn decode_utf8(out: *mut u32, in_: *const u8) -> ssize_t;
}
extern "C" {
pub fn decode_utf16(out: *mut u32, in_: *const u16) -> ssize_t;
}
extern "C" {
pub fn encode_utf8(out: *mut u8, in_: u32) -> ssize_t;
}
extern "C" {
pub fn encode_utf16(out: *mut u16, in_: u32) -> ssize_t;
}
extern "C" {
pub fn utf8_to_utf16(out: *mut u16, in_: *const u8, len: size_t) -> ssize_t;
}
extern "C" {
pub fn utf8_to_utf32(out: *mut u32, in_: *const u8, len: size_t) -> ssize_t;
}
extern "C" {
pub fn utf16_to_utf8(out: *mut u8, in_: *const u16, len: size_t) -> ssize_t;
}
extern "C" {
pub fn utf16_to_utf32(out: *mut u32, in_: *const u16, len: size_t) -> ssize_t;
}
extern "C" {
pub fn utf32_to_utf8(out: *mut u8, in_: *const u32, len: size_t) -> ssize_t;
}
extern "C" {
pub fn utf32_to_utf16(out: *mut u16, in_: *const u32, len: size_t) -> ssize_t;
}
extern "C" {
pub fn linearAlloc(size: size_t) -> *mut ::libc::c_void;
}
extern "C" {
pub fn linearMemAlign(size: size_t, alignment: size_t) -> *mut ::libc::c_void;
}
extern "C" {
pub fn linearRealloc(mem: *mut ::libc::c_void, size: size_t) -> *mut ::libc::c_void;
}
extern "C" {
pub fn linearGetSize(mem: *mut ::libc::c_void) -> size_t;
}
extern "C" {
pub fn linearFree(mem: *mut ::libc::c_void);
}
extern "C" {
pub fn linearSpaceFree() -> u32_;
}
extern "C" {
pub fn mappableInit(addrMin: u32_, addrMax: u32_);
}
extern "C" {
pub fn mappableAlloc(size: size_t) -> *mut ::libc::c_void;
}
extern "C" {
pub fn mappableFree(mem: *mut ::libc::c_void);
}
extern "C" {
pub fn vramAlloc(size: size_t) -> *mut ::libc::c_void;
}
extern "C" {
pub fn vramMemAlign(size: size_t, alignment: size_t) -> *mut ::libc::c_void;
}
extern "C" {
pub fn vramRealloc(mem: *mut ::libc::c_void, size: size_t) -> *mut ::libc::c_void;
}
extern "C" {
pub fn vramGetSize(mem: *mut ::libc::c_void) -> size_t;
}
extern "C" {
pub fn vramFree(mem: *mut ::libc::c_void);
}
extern "C" {
pub fn vramSpaceFree() -> u32_;
}
pub const AC_OPEN: acSecurityMode = 0;
pub const AC_WEP_40BIT: acSecurityMode = 1;
pub const AC_WEP_104BIT: acSecurityMode = 2;
pub const AC_WEP_128BIT: acSecurityMode = 3;
pub const AC_WPA_TKIP: acSecurityMode = 4;
pub const AC_WPA2_TKIP: acSecurityMode = 5;
pub const AC_WPA_AES: acSecurityMode = 6;
pub const AC_WPA2_AES: acSecurityMode = 7;
pub type acSecurityMode = ::libc::c_uint;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct acuConfig {
pub reserved: [u8_; 512usize],
}
impl Default for acuConfig {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
extern "C" {
pub fn acInit() -> Result;
}
extern "C" {
pub fn acExit();
}
extern "C" {
pub fn acWaitInternetConnection() -> Result;
}
extern "C" {
pub fn ACU_GetWifiStatus(out: *mut u32_) -> Result;
}
extern "C" {
pub fn ACU_GetStatus(out: *mut u32_) -> Result;
}
extern "C" {
pub fn ACU_GetSecurityMode(mode: *mut acSecurityMode) -> Result;
}
extern "C" {
pub fn ACU_GetSSID(SSID: *mut ::libc::c_char) -> Result;
}
extern "C" {
pub fn ACU_GetSSIDLength(out: *mut u32_) -> Result;
}
extern "C" {
pub fn ACU_GetProxyEnable(enable: *mut bool) -> Result;
}
extern "C" {
pub fn ACU_GetProxyPort(out: *mut u32_) -> Result;
}
extern "C" {
pub fn ACU_GetProxyUserName(username: *mut ::libc::c_char) -> Result;
}
extern "C" {
pub fn ACU_GetProxyPassword(password: *mut ::libc::c_char) -> Result;
}
extern "C" {
pub fn ACU_GetLastErrorCode(errorCode: *mut u32_) -> Result;
}
extern "C" {
pub fn ACU_GetLastDetailErrorCode(errorCode: *mut u32_) -> Result;
}
extern "C" {
pub fn ACU_CreateDefaultConfig(config: *mut acuConfig) -> Result;
}
extern "C" {
pub fn ACU_SetNetworkArea(config: *mut acuConfig, area: u8_) -> Result;
}
extern "C" {
pub fn ACU_SetAllowApType(config: *mut acuConfig, type_: u8_) -> Result;
}
extern "C" {
pub fn ACU_SetRequestEulaVersion(config: *mut acuConfig) -> Result;
}
extern "C" {
pub fn ACU_ConnectAsync(config: *const acuConfig, connectionHandle: Handle) -> Result;
}
pub const FS_OPEN_READ: ::libc::c_uint = 1;
pub const FS_OPEN_WRITE: ::libc::c_uint = 2;
pub const FS_OPEN_CREATE: ::libc::c_uint = 4;
pub type _bindgen_ty_10 = ::libc::c_uint;
pub const FS_WRITE_FLUSH: ::libc::c_uint = 1;
pub const FS_WRITE_UPDATE_TIME: ::libc::c_uint = 256;
pub type _bindgen_ty_11 = ::libc::c_uint;
pub const FS_ATTRIBUTE_DIRECTORY: ::libc::c_uint = 1;
pub const FS_ATTRIBUTE_HIDDEN: ::libc::c_uint = 256;
pub const FS_ATTRIBUTE_ARCHIVE: ::libc::c_uint = 65536;
pub const FS_ATTRIBUTE_READ_ONLY: ::libc::c_uint = 16777216;
pub type _bindgen_ty_12 = ::libc::c_uint;
pub const MEDIATYPE_NAND: FS_MediaType = 0;
pub const MEDIATYPE_SD: FS_MediaType = 1;
pub const MEDIATYPE_GAME_CARD: FS_MediaType = 2;
pub type FS_MediaType = ::libc::c_uint;
pub const SYSTEM_MEDIATYPE_CTR_NAND: FS_SystemMediaType = 0;
pub const SYSTEM_MEDIATYPE_TWL_NAND: FS_SystemMediaType = 1;
pub const SYSTEM_MEDIATYPE_SD: FS_SystemMediaType = 2;
pub const SYSTEM_MEDIATYPE_TWL_PHOTO: FS_SystemMediaType = 3;
pub type FS_SystemMediaType = ::libc::c_uint;
pub const ARCHIVE_ROMFS: FS_ArchiveID = 3;
pub const ARCHIVE_SAVEDATA: FS_ArchiveID = 4;
pub const ARCHIVE_EXTDATA: FS_ArchiveID = 6;
pub const ARCHIVE_SHARED_EXTDATA: FS_ArchiveID = 7;
pub const ARCHIVE_SYSTEM_SAVEDATA: FS_ArchiveID = 8;
pub const ARCHIVE_SDMC: FS_ArchiveID = 9;
pub const ARCHIVE_SDMC_WRITE_ONLY: FS_ArchiveID = 10;
pub const ARCHIVE_BOSS_EXTDATA: FS_ArchiveID = 305419896;
pub const ARCHIVE_CARD_SPIFS: FS_ArchiveID = 305419897;
pub const ARCHIVE_EXTDATA_AND_BOSS_EXTDATA: FS_ArchiveID = 305419899;
pub const ARCHIVE_SYSTEM_SAVEDATA2: FS_ArchiveID = 305419900;
pub const ARCHIVE_NAND_RW: FS_ArchiveID = 305419901;
pub const ARCHIVE_NAND_RO: FS_ArchiveID = 305419902;
pub const ARCHIVE_NAND_RO_WRITE_ACCESS: FS_ArchiveID = 305419903;
pub const ARCHIVE_SAVEDATA_AND_CONTENT: FS_ArchiveID = 591751050;
pub const ARCHIVE_SAVEDATA_AND_CONTENT2: FS_ArchiveID = 591751054;
pub const ARCHIVE_NAND_CTR_FS: FS_ArchiveID = 1450741931;
pub const ARCHIVE_TWL_PHOTO: FS_ArchiveID = 1450741932;
pub const ARCHIVE_TWL_SOUND: FS_ArchiveID = 1450741933;
pub const ARCHIVE_NAND_TWL_FS: FS_ArchiveID = 1450741934;
pub const ARCHIVE_NAND_W_FS: FS_ArchiveID = 1450741935;
pub const ARCHIVE_GAMECARD_SAVEDATA: FS_ArchiveID = 1450741937;
pub const ARCHIVE_USER_SAVEDATA: FS_ArchiveID = 1450741938;
pub const ARCHIVE_DEMO_SAVEDATA: FS_ArchiveID = 1450741940;
pub type FS_ArchiveID = ::libc::c_uint;
pub const PATH_INVALID: FS_PathType = 0;
pub const PATH_EMPTY: FS_PathType = 1;
pub const PATH_BINARY: FS_PathType = 2;
pub const PATH_ASCII: FS_PathType = 3;
pub const PATH_UTF16: FS_PathType = 4;
pub type FS_PathType = ::libc::c_uint;
pub const SECUREVALUE_SLOT_SD: FS_SecureValueSlot = 4096;
pub type FS_SecureValueSlot = ::libc::c_uint;
pub const BAUDRATE_512KHZ: FS_CardSpiBaudRate = 0;
pub const BAUDRATE_1MHZ: FS_CardSpiBaudRate = 1;
pub const BAUDRATE_2MHZ: FS_CardSpiBaudRate = 2;
pub const BAUDRATE_4MHZ: FS_CardSpiBaudRate = 3;
pub const BAUDRATE_8MHZ: FS_CardSpiBaudRate = 4;
pub const BAUDRATE_16MHZ: FS_CardSpiBaudRate = 5;
pub type FS_CardSpiBaudRate = ::libc::c_uint;
pub const BUSMODE_1BIT: FS_CardSpiBusMode = 0;
pub const BUSMODE_4BIT: FS_CardSpiBusMode = 1;
pub type FS_CardSpiBusMode = ::libc::c_uint;
pub const SPECIALCONTENT_UPDATE: FS_SpecialContentType = 1;
pub const SPECIALCONTENT_MANUAL: FS_SpecialContentType = 2;
pub const SPECIALCONTENT_DLP_CHILD: FS_SpecialContentType = 3;
pub type FS_SpecialContentType = ::libc::c_uint;
pub const CARD_CTR: FS_CardType = 0;
pub const CARD_TWL: FS_CardType = 1;
pub type FS_CardType = ::libc::c_uint;
pub const FS_ACTION_UNKNOWN: FS_Action = 0;
pub type FS_Action = ::libc::c_uint;
pub const ARCHIVE_ACTION_COMMIT_SAVE_DATA: FS_ArchiveAction = 0;
pub const ARCHIVE_ACTION_GET_TIMESTAMP: FS_ArchiveAction = 1;
pub const ARCHIVE_ACTION_UNKNOWN: FS_ArchiveAction = 30877;
pub type FS_ArchiveAction = ::libc::c_uint;
pub const SECURESAVE_ACTION_DELETE: FS_SecureSaveAction = 0;
pub const SECURESAVE_ACTION_FORMAT: FS_SecureSaveAction = 1;
pub type FS_SecureSaveAction = ::libc::c_uint;
pub const FILE_ACTION_UNKNOWN: FS_FileAction = 0;
pub type FS_FileAction = ::libc::c_uint;
pub const DIRECTORY_ACTION_UNKNOWN: FS_DirectoryAction = 0;
pub type FS_DirectoryAction = ::libc::c_uint;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct FS_DirectoryEntry {
pub name: [u16_; 262usize],
pub shortName: [::libc::c_char; 10usize],
pub shortExt: [::libc::c_char; 4usize],
pub valid: u8_,
pub reserved: u8_,
pub attributes: u32_,
pub fileSize: u64_,
}
impl Default for FS_DirectoryEntry {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct FS_ArchiveResource {
pub sectorSize: u32_,
pub clusterSize: u32_,
pub totalClusters: u32_,
pub freeClusters: u32_,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FS_ProgramInfo {
pub programId: u64_,
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
pub padding: [u8_; 7usize],
}
impl Default for FS_ProgramInfo {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
impl FS_ProgramInfo {
#[inline]
pub fn mediaType(&self) -> FS_MediaType {
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u32) }
}
#[inline]
pub fn set_mediaType(&mut self, val: FS_MediaType) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(0usize, 8u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(mediaType: FS_MediaType) -> __BindgenBitfieldUnit<[u8; 1usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 8u8, {
let mediaType: u32 = unsafe { ::core::mem::transmute(mediaType) };
mediaType as u64
});
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct FS_ProductInfo {
pub productCode: [::libc::c_char; 16usize],
pub companyCode: [::libc::c_char; 2usize],
pub remasterVersion: u16_,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct FS_IntegrityVerificationSeed {
pub aesCbcMac: [u8_; 16usize],
pub movableSed: [u8_; 288usize],
}
impl Default for FS_IntegrityVerificationSeed {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C, packed)]
#[derive(Debug, Copy, Clone)]
pub struct FS_ExtSaveDataInfo {
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
pub unknown: u8_,
pub reserved1: u16_,
pub saveId: u64_,
pub reserved2: u32_,
}
impl Default for FS_ExtSaveDataInfo {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
impl FS_ExtSaveDataInfo {
#[inline]
pub fn mediaType(&self) -> FS_MediaType {
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u32) }
}
#[inline]
pub fn set_mediaType(&mut self, val: FS_MediaType) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(0usize, 8u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(mediaType: FS_MediaType) -> __BindgenBitfieldUnit<[u8; 1usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 8u8, {
let mediaType: u32 = unsafe { ::core::mem::transmute(mediaType) };
mediaType as u64
});
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FS_SystemSaveDataInfo {
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
pub unknown: u8_,
pub reserved: u16_,
pub saveId: u32_,
}
impl Default for FS_SystemSaveDataInfo {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
impl FS_SystemSaveDataInfo {
#[inline]
pub fn mediaType(&self) -> FS_MediaType {
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u32) }
}
#[inline]
pub fn set_mediaType(&mut self, val: FS_MediaType) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(0usize, 8u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(mediaType: FS_MediaType) -> __BindgenBitfieldUnit<[u8; 1usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 8u8, {
let mediaType: u32 = unsafe { ::core::mem::transmute(mediaType) };
mediaType as u64
});
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct FS_DeviceMoveContext {
pub ivs: [u8_; 16usize],
pub encryptParameter: [u8_; 16usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FS_Path {
pub type_: FS_PathType,
pub size: u32_,
pub data: *const ::libc::c_void,
}
impl Default for FS_Path {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
pub type FS_Archive = u64_;
extern "C" {
pub fn fsInit() -> Result;
}
extern "C" {
pub fn fsExit();
}
extern "C" {
pub fn fsUseSession(session: Handle);
}
extern "C" {
pub fn fsEndUseSession();
}
extern "C" {
pub fn fsExemptFromSession(archive: FS_Archive);
}
extern "C" {
pub fn fsUnexemptFromSession(archive: FS_Archive);
}
extern "C" {
pub fn fsMakePath(type_: FS_PathType, path: *const ::libc::c_void) -> FS_Path;
}
extern "C" {
pub fn fsGetSessionHandle() -> *mut Handle;
}
extern "C" {
pub fn FSUSER_Control(
action: FS_Action,
input: *mut ::libc::c_void,
inputSize: u32_,
output: *mut ::libc::c_void,
outputSize: u32_,
) -> Result;
}
extern "C" {
pub fn FSUSER_Initialize(session: Handle) -> Result;
}
extern "C" {
pub fn FSUSER_OpenFile(
out: *mut Handle,
archive: FS_Archive,
path: FS_Path,
openFlags: u32_,
attributes: u32_,
) -> Result;
}
extern "C" {
pub fn FSUSER_OpenFileDirectly(
out: *mut Handle,
archiveId: FS_ArchiveID,
archivePath: FS_Path,
filePath: FS_Path,
openFlags: u32_,
attributes: u32_,
) -> Result;
}
extern "C" {
pub fn FSUSER_DeleteFile(archive: FS_Archive, path: FS_Path) -> Result;
}
extern "C" {
pub fn FSUSER_RenameFile(
srcArchive: FS_Archive,
srcPath: FS_Path,
dstArchive: FS_Archive,
dstPath: FS_Path,
) -> Result;
}
extern "C" {
pub fn FSUSER_DeleteDirectory(archive: FS_Archive, path: FS_Path) -> Result;
}
extern "C" {
pub fn FSUSER_DeleteDirectoryRecursively(archive: FS_Archive, path: FS_Path) -> Result;
}
extern "C" {
pub fn FSUSER_CreateFile(
archive: FS_Archive,
path: FS_Path,
attributes: u32_,
fileSize: u64_,
) -> Result;
}
extern "C" {
pub fn FSUSER_CreateDirectory(archive: FS_Archive, path: FS_Path, attributes: u32_) -> Result;
}
extern "C" {
pub fn FSUSER_RenameDirectory(
srcArchive: FS_Archive,
srcPath: FS_Path,
dstArchive: FS_Archive,
dstPath: FS_Path,
) -> Result;
}
extern "C" {
pub fn FSUSER_OpenDirectory(out: *mut Handle, archive: FS_Archive, path: FS_Path) -> Result;
}
extern "C" {
pub fn FSUSER_OpenArchive(archive: *mut FS_Archive, id: FS_ArchiveID, path: FS_Path) -> Result;
}
extern "C" {
pub fn FSUSER_ControlArchive(
archive: FS_Archive,
action: FS_ArchiveAction,
input: *mut ::libc::c_void,
inputSize: u32_,
output: *mut ::libc::c_void,
outputSize: u32_,
) -> Result;
}
extern "C" {
pub fn FSUSER_CloseArchive(archive: FS_Archive) -> Result;
}
extern "C" {
pub fn FSUSER_GetFreeBytes(freeBytes: *mut u64_, archive: FS_Archive) -> Result;
}
extern "C" {
pub fn FSUSER_GetCardType(type_: *mut FS_CardType) -> Result;
}
extern "C" {
pub fn FSUSER_GetSdmcArchiveResource(archiveResource: *mut FS_ArchiveResource) -> Result;
}
extern "C" {
pub fn FSUSER_GetNandArchiveResource(archiveResource: *mut FS_ArchiveResource) -> Result;
}
extern "C" {
pub fn FSUSER_GetSdmcFatfsError(error: *mut u32_) -> Result;
}
extern "C" {
pub fn FSUSER_IsSdmcDetected(detected: *mut bool) -> Result;
}
extern "C" {
pub fn FSUSER_IsSdmcWritable(writable: *mut bool) -> Result;
}
extern "C" {
pub fn FSUSER_GetSdmcCid(out: *mut u8_, length: u32_) -> Result;
}
extern "C" {
pub fn FSUSER_GetNandCid(out: *mut u8_, length: u32_) -> Result;
}
extern "C" {
pub fn FSUSER_GetSdmcSpeedInfo(speedInfo: *mut u32_) -> Result;
}
extern "C" {
pub fn FSUSER_GetNandSpeedInfo(speedInfo: *mut u32_) -> Result;
}
extern "C" {
pub fn FSUSER_GetSdmcLog(out: *mut u8_, length: u32_) -> Result;
}
extern "C" {
pub fn FSUSER_GetNandLog(out: *mut u8_, length: u32_) -> Result;
}
extern "C" {
pub fn FSUSER_ClearSdmcLog() -> Result;
}
extern "C" {
pub fn FSUSER_ClearNandLog() -> Result;
}
extern "C" {
pub fn FSUSER_CardSlotIsInserted(inserted: *mut bool) -> Result;
}
extern "C" {
pub fn FSUSER_CardSlotPowerOn(status: *mut bool) -> Result;
}
extern "C" {
pub fn FSUSER_CardSlotPowerOff(status: *mut bool) -> Result;
}
extern "C" {
pub fn FSUSER_CardSlotGetCardIFPowerStatus(status: *mut bool) -> Result;
}
extern "C" {
pub fn FSUSER_CardNorDirectCommand(commandId: u8_) -> Result;
}
extern "C" {
pub fn FSUSER_CardNorDirectCommandWithAddress(commandId: u8_, address: u32_) -> Result;
}
extern "C" {
pub fn FSUSER_CardNorDirectRead(
commandId: u8_,
size: u32_,
output: *mut ::libc::c_void,
) -> Result;
}
extern "C" {
pub fn FSUSER_CardNorDirectReadWithAddress(
commandId: u8_,
address: u32_,
size: u32_,
output: *mut ::libc::c_void,
) -> Result;
}
extern "C" {
pub fn FSUSER_CardNorDirectWrite(
commandId: u8_,
size: u32_,
input: *const ::libc::c_void,
) -> Result;
}
extern "C" {
pub fn FSUSER_CardNorDirectWriteWithAddress(
commandId: u8_,
address: u32_,
size: u32_,
input: *const ::libc::c_void,
) -> Result;
}
extern "C" {
pub fn FSUSER_CardNorDirectRead_4xIO(
commandId: u8_,
address: u32_,
size: u32_,
output: *mut ::libc::c_void,
) -> Result;
}
extern "C" {
pub fn FSUSER_CardNorDirectCpuWriteWithoutVerify(
address: u32_,
size: u32_,
input: *const ::libc::c_void,
) -> Result;
}
extern "C" {
pub fn FSUSER_CardNorDirectSectorEraseWithoutVerify(address: u32_) -> Result;
}
extern "C" {
pub fn FSUSER_GetProductInfo(info: *mut FS_ProductInfo, processId: u32_) -> Result;
}
extern "C" {
pub fn FSUSER_GetProgramLaunchInfo(info: *mut FS_ProgramInfo, processId: u32_) -> Result;
}
extern "C" {
pub fn FSUSER_SetCardSpiBaudRate(baudRate: FS_CardSpiBaudRate) -> Result;
}
extern "C" {
pub fn FSUSER_SetCardSpiBusMode(busMode: FS_CardSpiBusMode) -> Result;
}
extern "C" {
pub fn FSUSER_SendInitializeInfoTo9() -> Result;
}
extern "C" {
pub fn FSUSER_GetSpecialContentIndex(
index: *mut u16_,
mediaType: FS_MediaType,
programId: u64_,
type_: FS_SpecialContentType,
) -> Result;
}
extern "C" {
pub fn FSUSER_GetLegacyRomHeader(
mediaType: FS_MediaType,
programId: u64_,
header: *mut ::libc::c_void,
) -> Result;
}
extern "C" {
pub fn FSUSER_GetLegacyBannerData(
mediaType: FS_MediaType,
programId: u64_,
banner: *mut ::libc::c_void,
) -> Result;
}
extern "C" {
pub fn FSUSER_CheckAuthorityToAccessExtSaveData(
access: *mut bool,
mediaType: FS_MediaType,
saveId: u64_,
processId: u32_,
) -> Result;
}
extern "C" {
pub fn FSUSER_QueryTotalQuotaSize(
quotaSize: *mut u64_,
directories: u32_,
files: u32_,
fileSizeCount: u32_,
fileSizes: *mut u64_,
) -> Result;
}
extern "C" {
pub fn FSUSER_AbnegateAccessRight(accessRight: u32_) -> Result;
}
extern "C" {
pub fn FSUSER_DeleteSdmcRoot() -> Result;
}
extern "C" {
pub fn FSUSER_DeleteAllExtSaveDataOnNand() -> Result;
}
extern "C" {
pub fn FSUSER_InitializeCtrFileSystem() -> Result;
}
extern "C" {
pub fn FSUSER_CreateSeed() -> Result;
}
extern "C" {
pub fn FSUSER_GetFormatInfo(
totalSize: *mut u32_,
directories: *mut u32_,
files: *mut u32_,
duplicateData: *mut bool,
archiveId: FS_ArchiveID,
path: FS_Path,
) -> Result;
}
extern "C" {
pub fn FSUSER_GetLegacyRomHeader2(
headerSize: u32_,
mediaType: FS_MediaType,
programId: u64_,
header: *mut ::libc::c_void,
) -> Result;
}
extern "C" {
pub fn FSUSER_GetSdmcCtrRootPath(out: *mut u8_, length: u32_) -> Result;
}
extern "C" {
pub fn FSUSER_GetArchiveResource(
archiveResource: *mut FS_ArchiveResource,
mediaType: FS_SystemMediaType,
) -> Result;
}
extern "C" {
pub fn FSUSER_ExportIntegrityVerificationSeed(
seed: *mut FS_IntegrityVerificationSeed,
) -> Result;
}
extern "C" {
pub fn FSUSER_ImportIntegrityVerificationSeed(
seed: *mut FS_IntegrityVerificationSeed,
) -> Result;
}
extern "C" {
pub fn FSUSER_FormatSaveData(
archiveId: FS_ArchiveID,
path: FS_Path,
blocks: u32_,
directories: u32_,
files: u32_,
directoryBuckets: u32_,
fileBuckets: u32_,
duplicateData: bool,
) -> Result;
}
extern "C" {
pub fn FSUSER_GetLegacySubBannerData(
bannerSize: u32_,
mediaType: FS_MediaType,
programId: u64_,
banner: *mut ::libc::c_void,
) -> Result;
}
extern "C" {
pub fn FSUSER_UpdateSha256Context(
data: *const ::libc::c_void,
inputSize: u32_,
hash: *mut u8_,
) -> Result;
}
extern "C" {
pub fn FSUSER_ReadSpecialFile(
bytesRead: *mut u32_,
fileOffset: u64_,
size: u32_,
data: *mut ::libc::c_void,
) -> Result;
}
extern "C" {
pub fn FSUSER_GetSpecialFileSize(fileSize: *mut u64_) -> Result;
}
extern "C" {
pub fn FSUSER_CreateExtSaveData(
info: FS_ExtSaveDataInfo,
directories: u32_,
files: u32_,
sizeLimit: u64_,
smdhSize: u32_,
smdh: *mut u8_,
) -> Result;
}
extern "C" {
pub fn FSUSER_DeleteExtSaveData(info: FS_ExtSaveDataInfo) -> Result;
}
extern "C" {
pub fn FSUSER_ReadExtSaveDataIcon(
bytesRead: *mut u32_,
info: FS_ExtSaveDataInfo,
smdhSize: u32_,
smdh: *mut u8_,
) -> Result;
}
extern "C" {
pub fn FSUSER_GetExtDataBlockSize(
totalBlocks: *mut u64_,
freeBlocks: *mut u64_,
blockSize: *mut u32_,
info: FS_ExtSaveDataInfo,
) -> Result;
}
extern "C" {
pub fn FSUSER_EnumerateExtSaveData(
idsWritten: *mut u32_,
idsSize: u32_,
mediaType: FS_MediaType,
idSize: u32_,
shared: bool,
ids: *mut u8_,
) -> Result;
}
extern "C" {
pub fn FSUSER_CreateSystemSaveData(
info: FS_SystemSaveDataInfo,
totalSize: u32_,
blockSize: u32_,
directories: u32_,
files: u32_,
directoryBuckets: u32_,
fileBuckets: u32_,
duplicateData: bool,
) -> Result;
}
extern "C" {
pub fn FSUSER_DeleteSystemSaveData(info: FS_SystemSaveDataInfo) -> Result;
}
extern "C" {
pub fn FSUSER_StartDeviceMoveAsSource(context: *mut FS_DeviceMoveContext) -> Result;
}
extern "C" {
pub fn FSUSER_StartDeviceMoveAsDestination(
context: FS_DeviceMoveContext,
clear: bool,
) -> Result;
}
extern "C" {
pub fn FSUSER_SetArchivePriority(archive: FS_Archive, priority: u32_) -> Result;
}
extern "C" {
pub fn FSUSER_GetArchivePriority(priority: *mut u32_, archive: FS_Archive) -> Result;
}
extern "C" {
pub fn FSUSER_SetCtrCardLatencyParameter(latency: u64_, emulateEndurance: bool) -> Result;
}
extern "C" {
pub fn FSUSER_SwitchCleanupInvalidSaveData(enable: bool) -> Result;
}
extern "C" {
pub fn FSUSER_EnumerateSystemSaveData(
idsWritten: *mut u32_,
idsSize: u32_,
ids: *mut u32_,
) -> Result;
}
extern "C" {
pub fn FSUSER_InitializeWithSdkVersion(session: Handle, version: u32_) -> Result;
}
extern "C" {
pub fn FSUSER_SetPriority(priority: u32_) -> Result;
}
extern "C" {
pub fn FSUSER_GetPriority(priority: *mut u32_) -> Result;
}
extern "C" {
pub fn FSUSER_SetSaveDataSecureValue(
value: u64_,
slot: FS_SecureValueSlot,
titleUniqueId: u32_,
titleVariation: u8_,
) -> Result;
}
extern "C" {
pub fn FSUSER_GetSaveDataSecureValue(
exists: *mut bool,
value: *mut u64_,
slot: FS_SecureValueSlot,
titleUniqueId: u32_,
titleVariation: u8_,
) -> Result;
}
extern "C" {
pub fn FSUSER_ControlSecureSave(
action: FS_SecureSaveAction,
input: *mut ::libc::c_void,
inputSize: u32_,
output: *mut ::libc::c_void,
outputSize: u32_,
) -> Result;
}
extern "C" {
pub fn FSUSER_GetMediaType(mediaType: *mut FS_MediaType) -> Result;
}
extern "C" {
pub fn FSFILE_Control(
handle: Handle,
action: FS_FileAction,
input: *mut ::libc::c_void,
inputSize: u32_,
output: *mut ::libc::c_void,
outputSize: u32_,
) -> Result;
}
extern "C" {
pub fn FSFILE_OpenSubFile(
handle: Handle,
subFile: *mut Handle,
offset: u64_,
size: u64_,
) -> Result;
}
extern "C" {
pub fn FSFILE_Read(
handle: Handle,
bytesRead: *mut u32_,
offset: u64_,
buffer: *mut ::libc::c_void,
size: u32_,
) -> Result;
}
extern "C" {
pub fn FSFILE_Write(
handle: Handle,
bytesWritten: *mut u32_,
offset: u64_,
buffer: *const ::libc::c_void,
size: u32_,
flags: u32_,
) -> Result;
}
extern "C" {
pub fn FSFILE_GetSize(handle: Handle, size: *mut u64_) -> Result;
}
extern "C" {
pub fn FSFILE_SetSize(handle: Handle, size: u64_) -> Result;
}
extern "C" {
pub fn FSFILE_GetAttributes(handle: Handle, attributes: *mut u32_) -> Result;
}
extern "C" {
pub fn FSFILE_SetAttributes(handle: Handle, attributes: u32_) -> Result;
}
extern "C" {
pub fn FSFILE_Close(handle: Handle) -> Result;
}
extern "C" {
pub fn FSFILE_Flush(handle: Handle) -> Result;
}
extern "C" {
pub fn FSFILE_SetPriority(handle: Handle, priority: u32_) -> Result;
}
extern "C" {
pub fn FSFILE_GetPriority(handle: Handle, priority: *mut u32_) -> Result;
}
extern "C" {
pub fn FSFILE_OpenLinkFile(handle: Handle, linkFile: *mut Handle) -> Result;
}
extern "C" {
pub fn FSDIR_Control(
handle: Handle,
action: FS_DirectoryAction,
input: *mut ::libc::c_void,
inputSize: u32_,
output: *mut ::libc::c_void,
outputSize: u32_,
) -> Result;
}
extern "C" {
pub fn FSDIR_Read(
handle: Handle,
entriesRead: *mut u32_,
entryCount: u32_,
entries: *mut FS_DirectoryEntry,
) -> Result;
}
extern "C" {
pub fn FSDIR_Close(handle: Handle) -> Result;
}
extern "C" {
pub fn FSDIR_SetPriority(handle: Handle, priority: u32_) -> Result;
}
extern "C" {
pub fn FSDIR_GetPriority(handle: Handle, priority: *mut u32_) -> Result;
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct AM_TitleEntry {
pub titleID: u64_,
pub size: u64_,
pub version: u16_,
pub unk: [u8_; 6usize],
}
pub const AM_STATUS_MASK_INSTALLING: ::libc::c_uint = 1;
pub const AM_STATUS_MASK_AWAITING_FINALIZATION: ::libc::c_uint = 2;
pub type _bindgen_ty_13 = ::libc::c_uint;
pub const AM_STATUS_ABORTED: AM_InstallStatus = 2;
pub const AM_STATUS_SAVED: AM_InstallStatus = 3;
pub const AM_STATUS_INSTALL_IN_PROGRESS: AM_InstallStatus = 2050;
pub const AM_STATUS_AWAITING_FINALIZATION: AM_InstallStatus = 2051;
pub type AM_InstallStatus = ::libc::c_uint;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct AM_PendingTitleEntry {
pub titleId: u64_,
pub version: u16_,
pub status: u16_,
pub titleType: u32_,
pub unk: [u8_; 8usize],
}
pub const AM_DELETE_PENDING_NON_SYSTEM: ::libc::c_uint = 1;
pub const AM_DELETE_PENDING_SYSTEM: ::libc::c_uint = 2;
pub type _bindgen_ty_14 = ::libc::c_uint;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct AM_TWLPartitionInfo {
pub capacity: u64_,
pub freeSpace: u64_,
pub titlesCapacity: u64_,
pub titlesFreeSpace: u64_,
}
extern "C" {
pub fn amInit() -> Result;
}
extern "C" {
pub fn amAppInit() -> Result;
}
extern "C" {
pub fn amExit();
}
extern "C" {
pub fn amGetSessionHandle() -> *mut Handle;
}
extern "C" {
pub fn AM_GetTitleCount(mediatype: FS_MediaType, count: *mut u32_) -> Result;
}
extern "C" {
pub fn AM_GetTitleList(
titlesRead: *mut u32_,
mediatype: FS_MediaType,
titleCount: u32_,
titleIds: *mut u64_,
) -> Result;
}
extern "C" {
pub fn AM_GetTitleInfo(
mediatype: FS_MediaType,
titleCount: u32_,
titleIds: *mut u64_,
titleInfo: *mut AM_TitleEntry,
) -> Result;
}
extern "C" {
pub fn AM_GetTicketCount(count: *mut u32_) -> Result;
}
extern "C" {
pub fn AM_GetTicketList(
ticketsRead: *mut u32_,
ticketCount: u32_,
skip: u32_,
ticketIds: *mut u64_,
) -> Result;
}
extern "C" {
pub fn AM_GetPendingTitleCount(
count: *mut u32_,
mediatype: FS_MediaType,
statusMask: u32_,
) -> Result;
}
extern "C" {
pub fn AM_GetPendingTitleList(
titlesRead: *mut u32_,
titleCount: u32_,
mediatype: FS_MediaType,
statusMask: u32_,
titleIds: *mut u64_,
) -> Result;
}
extern "C" {
pub fn AM_GetPendingTitleInfo(
titleCount: u32_,
mediatype: FS_MediaType,
titleIds: *mut u64_,
titleInfo: *mut AM_PendingTitleEntry,
) -> Result;
}
extern "C" {
pub fn AM_GetDeviceId(deviceID: *mut u32_) -> Result;
}
extern "C" {
pub fn AM_ExportTwlBackup(
titleID: u64_,
operation: u8_,
workbuf: *mut ::libc::c_void,
workbuf_size: u32_,
filepath: *const ::libc::c_char,
) -> Result;
}
extern "C" {
pub fn AM_ImportTwlBackup(
filehandle: Handle,
operation: u8_,
buffer: *mut ::libc::c_void,
size: u32_,
) -> Result;
}
extern "C" {
pub fn AM_ReadTwlBackupInfo(
filehandle: Handle,
outinfo: *mut ::libc::c_void,
outinfo_size: u32_,
workbuf: *mut ::libc::c_void,
workbuf_size: u32_,
banner: *mut ::libc::c_void,
banner_size: u32_,
) -> Result;
}
extern "C" {
pub fn AM_GetTWLPartitionInfo(info: *mut AM_TWLPartitionInfo) -> Result;
}
extern "C" {
pub fn AM_StartCiaInstall(mediatype: FS_MediaType, ciaHandle: *mut Handle) -> Result;
}
extern "C" {
pub fn AM_StartDlpChildCiaInstall(ciaHandle: *mut Handle) -> Result;
}
extern "C" {
pub fn AM_CancelCIAInstall(ciaHandle: Handle) -> Result;
}
extern "C" {
pub fn AM_FinishCiaInstall(ciaHandle: Handle) -> Result;
}
extern "C" {
pub fn AM_FinishCiaInstallWithoutCommit(ciaHandle: Handle) -> Result;
}
extern "C" {
pub fn AM_CommitImportPrograms(
mediaType: FS_MediaType,
titleCount: u32_,
temp: bool,
titleIds: *const u64_,
) -> Result;
}
extern "C" {
pub fn AM_DeleteTitle(mediatype: FS_MediaType, titleID: u64_) -> Result;
}
extern "C" {
pub fn AM_DeleteAppTitle(mediatype: FS_MediaType, titleID: u64_) -> Result;
}
extern "C" {
pub fn AM_DeleteTicket(ticketId: u64_) -> Result;
}
extern "C" {
pub fn AM_DeletePendingTitle(mediatype: FS_MediaType, titleId: u64_) -> Result;
}
extern "C" {
pub fn AM_DeletePendingTitles(mediatype: FS_MediaType, flags: u32_) -> Result;
}
extern "C" {
pub fn AM_DeleteAllPendingTitles(mediatype: FS_MediaType) -> Result;
}
extern "C" {
pub fn AM_InstallNativeFirm() -> Result;
}
extern "C" {
pub fn AM_InstallFirm(titleID: u64_) -> Result;
}
extern "C" {
pub fn AM_GetTitleProductCode(
mediatype: FS_MediaType,
titleId: u64_,
productCode: *mut ::libc::c_char,
) -> Result;
}
extern "C" {
pub fn AM_GetTitleExtDataId(
extDataId: *mut u64_,
mediatype: FS_MediaType,
titleId: u64_,
) -> Result;
}
extern "C" {
pub fn AM_GetCiaFileInfo(
mediatype: FS_MediaType,
titleEntry: *mut AM_TitleEntry,
fileHandle: Handle,
) -> Result;
}
extern "C" {
pub fn AM_GetCiaIcon(icon: *mut ::libc::c_void, fileHandle: Handle) -> Result;
}
extern "C" {
pub fn AM_GetCiaDependencies(dependencies: *mut u64_, fileHandle: Handle) -> Result;
}
extern "C" {
pub fn AM_GetCiaMetaOffset(metaOffset: *mut u64_, fileHandle: Handle) -> Result;
}
extern "C" {
pub fn AM_GetCiaCoreVersion(coreVersion: *mut u32_, fileHandle: Handle) -> Result;
}
extern "C" {
pub fn AM_GetCiaRequiredSpace(
requiredSpace: *mut u64_,
mediaType: FS_MediaType,
fileHandle: Handle,
) -> Result;
}
extern "C" {
pub fn AM_GetCiaMetaSection(
meta: *mut ::libc::c_void,
size: u32_,
fileHandle: Handle,
) -> Result;
}
extern "C" {
pub fn AM_InitializeExternalTitleDatabase(overwrite: bool) -> Result;
}
extern "C" {
pub fn AM_QueryAvailableExternalTitleDatabase(available: *mut bool) -> Result;
}
extern "C" {
pub fn AM_InstallTicketBegin(ticketHandle: *mut Handle) -> Result;
}
extern "C" {
pub fn AM_InstallTicketAbort(ticketHandle: Handle) -> Result;
}
extern "C" {
pub fn AM_InstallTicketFinish(ticketHandle: Handle) -> Result;
}
extern "C" {
pub fn AM_InstallTitleBegin(mediaType: FS_MediaType, titleId: u64_, unk: bool) -> Result;
}
extern "C" {
pub fn AM_InstallTitleStop() -> Result;
}
extern "C" {
pub fn AM_InstallTitleResume(mediaType: FS_MediaType, titleId: u64_) -> Result;
}
extern "C" {
pub fn AM_InstallTitleAbort() -> Result;
}
extern "C" {
pub fn AM_InstallTitleFinish() -> Result;
}
extern "C" {
pub fn AM_CommitImportTitles(
mediaType: FS_MediaType,
titleCount: u32_,
temp: bool,
titleIds: *const u64_,
) -> Result;
}
extern "C" {
pub fn AM_InstallTmdBegin(tmdHandle: *mut Handle) -> Result;
}
extern "C" {
pub fn AM_InstallTmdAbort(tmdHandle: Handle) -> Result;
}
extern "C" {
pub fn AM_InstallTmdFinish(tmdHandle: Handle, unk: bool) -> Result;
}
extern "C" {
pub fn AM_CreateImportContentContexts(contentCount: u32_, contentIndices: *mut u16_) -> Result;
}
extern "C" {
pub fn AM_InstallContentBegin(contentHandle: *mut Handle, index: u16_) -> Result;
}
extern "C" {
pub fn AM_InstallContentStop(contentHandle: Handle) -> Result;
}
extern "C" {
pub fn AM_InstallContentResume(
contentHandle: *mut Handle,
resumeOffset: *mut u64_,
index: u16_,
) -> Result;
}
extern "C" {
pub fn AM_InstallContentCancel(contentHandle: Handle) -> Result;
}
extern "C" {
pub fn AM_InstallContentFinish(contentHandle: Handle) -> Result;
}
extern "C" {
pub fn AM_ImportCertificates(
cert1Size: u32_,
cert1: *mut ::libc::c_void,
cert2Size: u32_,
cert2: *mut ::libc::c_void,
cert3Size: u32_,
cert3: *mut ::libc::c_void,
cert4Size: u32_,
cert4: *mut ::libc::c_void,
) -> Result;
}
extern "C" {
pub fn AM_ImportCertificate(certSize: u32_, cert: *mut ::libc::c_void) -> Result;
}
extern "C" {
pub fn AM_CommitImportTitlesAndUpdateFirmwareAuto(
mediaType: FS_MediaType,
titleCount: u32_,
temp: bool,
titleIds: *mut u64_,
) -> Result;
}
extern "C" {
pub fn AM_DeleteAllDemoLaunchInfos() -> Result;
}
extern "C" {
pub fn AM_DeleteAllTemporaryTitles() -> Result;
}
extern "C" {
pub fn AM_DeleteAllExpiredTitles(mediatype: FS_MediaType) -> Result;
}
extern "C" {
pub fn AM_DeleteAllTwlTitles() -> Result;
}
extern "C" {
pub fn ampxiInit(servhandle: Handle) -> Result;
}
extern "C" {
pub fn ampxiExit();
}
extern "C" {
pub fn AMPXI_WriteTWLSavedata(
titleid: u64_,
buffer: *mut u8_,
size: u32_,
image_filepos: u32_,
section_type: u8_,
operation: u8_,
) -> Result;
}
extern "C" {
pub fn AMPXI_InstallTitlesFinish(
mediaType: FS_MediaType,
db: u8_,
titlecount: u32_,
tidlist: *mut u64_,
) -> Result;
}
pub const APPID_NONE: NS_APPID = 0;
pub const APPID_HOMEMENU: NS_APPID = 257;
pub const APPID_CAMERA: NS_APPID = 272;
pub const APPID_FRIENDS_LIST: NS_APPID = 274;
pub const APPID_GAME_NOTES: NS_APPID = 275;
pub const APPID_WEB: NS_APPID = 276;
pub const APPID_INSTRUCTION_MANUAL: NS_APPID = 277;
pub const APPID_NOTIFICATIONS: NS_APPID = 278;
pub const APPID_MIIVERSE: NS_APPID = 279;
pub const APPID_MIIVERSE_POSTING: NS_APPID = 280;
pub const APPID_AMIIBO_SETTINGS: NS_APPID = 281;
pub const APPID_APPLICATION: NS_APPID = 768;
pub const APPID_ESHOP: NS_APPID = 769;
pub const APPID_SOFTWARE_KEYBOARD: NS_APPID = 1025;
pub const APPID_APPLETED: NS_APPID = 1026;
pub const APPID_PNOTE_AP: NS_APPID = 1028;
pub const APPID_SNOTE_AP: NS_APPID = 1029;
pub const APPID_ERROR: NS_APPID = 1030;
pub const APPID_MINT: NS_APPID = 1031;
pub const APPID_EXTRAPAD: NS_APPID = 1032;
pub const APPID_MEMOLIB: NS_APPID = 1033;
pub type NS_APPID = ::libc::c_uint;
pub const APTPOS_NONE: APT_AppletPos = -1;
pub const APTPOS_APP: APT_AppletPos = 0;
pub const APTPOS_APPLIB: APT_AppletPos = 1;
pub const APTPOS_SYS: APT_AppletPos = 2;
pub const APTPOS_SYSLIB: APT_AppletPos = 3;
pub const APTPOS_RESIDENT: APT_AppletPos = 4;
pub type APT_AppletPos = ::libc::c_int;
pub type APT_AppletAttr = u8_;
pub const APTREPLY_REJECT: APT_QueryReply = 0;
pub const APTREPLY_ACCEPT: APT_QueryReply = 1;
pub const APTREPLY_LATER: APT_QueryReply = 2;
pub type APT_QueryReply = ::libc::c_uint;
pub const APTSIGNAL_NONE: APT_Signal = 0;
pub const APTSIGNAL_HOMEBUTTON: APT_Signal = 1;
pub const APTSIGNAL_HOMEBUTTON2: APT_Signal = 2;
pub const APTSIGNAL_SLEEP_QUERY: APT_Signal = 3;
pub const APTSIGNAL_SLEEP_CANCEL: APT_Signal = 4;
pub const APTSIGNAL_SLEEP_ENTER: APT_Signal = 5;
pub const APTSIGNAL_SLEEP_WAKEUP: APT_Signal = 6;
pub const APTSIGNAL_SHUTDOWN: APT_Signal = 7;
pub const APTSIGNAL_POWERBUTTON: APT_Signal = 8;
pub const APTSIGNAL_POWERBUTTON2: APT_Signal = 9;
pub const APTSIGNAL_TRY_SLEEP: APT_Signal = 10;
pub const APTSIGNAL_ORDERTOCLOSE: APT_Signal = 11;
pub type APT_Signal = ::libc::c_uint;
pub const APTCMD_NONE: APT_Command = 0;
pub const APTCMD_WAKEUP: APT_Command = 1;
pub const APTCMD_REQUEST: APT_Command = 2;
pub const APTCMD_RESPONSE: APT_Command = 3;
pub const APTCMD_EXIT: APT_Command = 4;
pub const APTCMD_MESSAGE: APT_Command = 5;
pub const APTCMD_HOMEBUTTON_ONCE: APT_Command = 6;
pub const APTCMD_HOMEBUTTON_TWICE: APT_Command = 7;
pub const APTCMD_DSP_SLEEP: APT_Command = 8;
pub const APTCMD_DSP_WAKEUP: APT_Command = 9;
pub const APTCMD_WAKEUP_EXIT: APT_Command = 10;
pub const APTCMD_WAKEUP_PAUSE: APT_Command = 11;
pub const APTCMD_WAKEUP_CANCEL: APT_Command = 12;
pub const APTCMD_WAKEUP_CANCELALL: APT_Command = 13;
pub const APTCMD_WAKEUP_POWERBUTTON: APT_Command = 14;
pub const APTCMD_WAKEUP_JUMPTOHOME: APT_Command = 15;
pub const APTCMD_SYSAPPLET_REQUEST: APT_Command = 16;
pub const APTCMD_WAKEUP_LAUNCHAPP: APT_Command = 17;
pub type APT_Command = ::libc::c_uint;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct aptCaptureBufInfo {
pub size: u32_,
pub is3D: u32_,
pub top: aptCaptureBufInfo__bindgen_ty_1,
pub bottom: aptCaptureBufInfo__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct aptCaptureBufInfo__bindgen_ty_1 {
pub leftOffset: u32_,
pub rightOffset: u32_,
pub format: u32_,
}
pub const APTHOOK_ONSUSPEND: APT_HookType = 0;
pub const APTHOOK_ONRESTORE: APT_HookType = 1;
pub const APTHOOK_ONSLEEP: APT_HookType = 2;
pub const APTHOOK_ONWAKEUP: APT_HookType = 3;
pub const APTHOOK_ONEXIT: APT_HookType = 4;
pub const APTHOOK_COUNT: APT_HookType = 5;
pub type APT_HookType = ::libc::c_uint;
pub type aptHookFn =
::core::option::Option<unsafe extern "C" fn(hook: APT_HookType, param: *mut ::libc::c_void)>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct tag_aptHookCookie {
pub next: *mut tag_aptHookCookie,
pub callback: aptHookFn,
pub param: *mut ::libc::c_void,
}
impl Default for tag_aptHookCookie {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
pub type aptHookCookie = tag_aptHookCookie;
pub type aptMessageCb = ::core::option::Option<
unsafe extern "C" fn(
user: *mut ::libc::c_void,
sender: NS_APPID,
msg: *mut ::libc::c_void,
msgsize: size_t,
),
>;
extern "C" {
pub fn aptInit() -> Result;
}
extern "C" {
pub fn aptExit();
}
extern "C" {
pub fn aptSendCommand(aptcmdbuf: *mut u32_) -> Result;
}
extern "C" {
pub fn aptIsActive() -> bool;
}
extern "C" {
pub fn aptShouldClose() -> bool;
}
extern "C" {
pub fn aptIsSleepAllowed() -> bool;
}
extern "C" {
pub fn aptSetSleepAllowed(allowed: bool);
}
extern "C" {
pub fn aptHandleSleep();
}
extern "C" {
pub fn aptIsHomeAllowed() -> bool;
}
extern "C" {
pub fn aptSetHomeAllowed(allowed: bool);
}
extern "C" {
pub fn aptShouldJumpToHome() -> bool;
}
extern "C" {
pub fn aptCheckHomePressRejected() -> bool;
}
extern "C" {
pub fn aptJumpToHomeMenu();
}
extern "C" {
pub fn aptMainLoop() -> bool;
}
extern "C" {
pub fn aptHook(cookie: *mut aptHookCookie, callback: aptHookFn, param: *mut ::libc::c_void);
}
extern "C" {
pub fn aptUnhook(cookie: *mut aptHookCookie);
}
extern "C" {
pub fn aptSetMessageCallback(callback: aptMessageCb, user: *mut ::libc::c_void);
}
extern "C" {
pub fn aptLaunchLibraryApplet(
appId: NS_APPID,
buf: *mut ::libc::c_void,
bufsize: size_t,
handle: Handle,
);
}
extern "C" {
pub fn aptClearChainloader();
}
extern "C" {
pub fn aptSetChainloader(programID: u64_, mediatype: u8_);
}
extern "C" {
pub fn aptSetChainloaderToSelf();
}
extern "C" {
pub fn APT_GetLockHandle(flags: u16_, lockHandle: *mut Handle) -> Result;
}
extern "C" {
pub fn APT_Initialize(
appId: NS_APPID,
attr: APT_AppletAttr,
signalEvent: *mut Handle,
resumeEvent: *mut Handle,
) -> Result;
}
extern "C" {
pub fn APT_Finalize(appId: NS_APPID) -> Result;
}
extern "C" {
pub fn APT_HardwareResetAsync() -> Result;
}
extern "C" {
pub fn APT_Enable(attr: APT_AppletAttr) -> Result;
}
extern "C" {
pub fn APT_GetAppletManInfo(
inpos: APT_AppletPos,
outpos: *mut APT_AppletPos,
req_appid: *mut NS_APPID,
menu_appid: *mut NS_APPID,
active_appid: *mut NS_APPID,
) -> Result;
}
extern "C" {
pub fn APT_GetAppletInfo(
appID: NS_APPID,
pProgramID: *mut u64_,
pMediaType: *mut u8_,
pRegistered: *mut bool,
pLoadState: *mut bool,
pAttributes: *mut APT_AppletAttr,
) -> Result;
}
extern "C" {
pub fn APT_GetAppletProgramInfo(id: u32_, flags: u32_, titleversion: *mut u16_) -> Result;
}
extern "C" {
pub fn APT_GetProgramID(pProgramID: *mut u64_) -> Result;
}
extern "C" {
pub fn APT_PrepareToJumpToHomeMenu() -> Result;
}
extern "C" {
pub fn APT_JumpToHomeMenu(
param: *const ::libc::c_void,
paramSize: size_t,
handle: Handle,
) -> Result;
}
extern "C" {
pub fn APT_PrepareToJumpToApplication(exiting: bool) -> Result;
}
extern "C" {
pub fn APT_JumpToApplication(
param: *const ::libc::c_void,
paramSize: size_t,
handle: Handle,
) -> Result;
}
extern "C" {
pub fn APT_IsRegistered(appID: NS_APPID, out: *mut bool) -> Result;
}
extern "C" {
pub fn APT_InquireNotification(appID: u32_, signalType: *mut APT_Signal) -> Result;
}
extern "C" {
pub fn APT_SleepSystem(wakeEvents: *const PtmWakeEvents) -> Result;
}
extern "C" {
pub fn APT_NotifyToWait(appID: NS_APPID) -> Result;
}
extern "C" {
pub fn APT_AppletUtility(
id: ::libc::c_int,
out: *mut ::libc::c_void,
outSize: size_t,
in_: *const ::libc::c_void,
inSize: size_t,
) -> Result;
}
extern "C" {
pub fn APT_SleepIfShellClosed() -> Result;
}
extern "C" {
pub fn APT_LockTransition(transition: u32_, flag: bool) -> Result;
}
extern "C" {
pub fn APT_TryLockTransition(transition: u32_, succeeded: *mut bool) -> Result;
}
extern "C" {
pub fn APT_UnlockTransition(transition: u32_) -> Result;
}
extern "C" {
pub fn APT_GlanceParameter(
appID: NS_APPID,
buffer: *mut ::libc::c_void,
bufferSize: size_t,
sender: *mut NS_APPID,
command: *mut APT_Command,
actualSize: *mut size_t,
parameter: *mut Handle,
) -> Result;
}
extern "C" {
pub fn APT_ReceiveParameter(
appID: NS_APPID,
buffer: *mut ::libc::c_void,
bufferSize: size_t,
sender: *mut NS_APPID,
command: *mut APT_Command,
actualSize: *mut size_t,
parameter: *mut Handle,
) -> Result;
}
extern "C" {
pub fn APT_SendParameter(
source: NS_APPID,
dest: NS_APPID,
command: APT_Command,
buffer: *const ::libc::c_void,
bufferSize: u32_,
parameter: Handle,
) -> Result;
}
extern "C" {
pub fn APT_CancelParameter(source: NS_APPID, dest: NS_APPID, success: *mut bool) -> Result;
}
extern "C" {
pub fn APT_SendCaptureBufferInfo(captureBuf: *const aptCaptureBufInfo) -> Result;
}
extern "C" {
pub fn APT_ReplySleepQuery(appID: NS_APPID, reply: APT_QueryReply) -> Result;
}
extern "C" {
pub fn APT_ReplySleepNotificationComplete(appID: NS_APPID) -> Result;
}
extern "C" {
pub fn APT_PrepareToCloseApplication(cancelPreload: bool) -> Result;
}
extern "C" {
pub fn APT_CloseApplication(
param: *const ::libc::c_void,
paramSize: size_t,
handle: Handle,
) -> Result;
}
extern "C" {
pub fn APT_SetAppCpuTimeLimit(percent: u32_) -> Result;
}
extern "C" {
pub fn APT_GetAppCpuTimeLimit(percent: *mut u32_) -> Result;
}
extern "C" {
pub fn APT_CheckNew3DS(out: *mut bool) -> Result;
}
extern "C" {
pub fn APT_PrepareToDoApplicationJump(flags: u8_, programID: u64_, mediatype: u8_) -> Result;
}
extern "C" {
pub fn APT_DoApplicationJump(
param: *const ::libc::c_void,
paramSize: size_t,
hmac: *const ::libc::c_void,
) -> Result;
}
extern "C" {
pub fn APT_PrepareToStartLibraryApplet(appID: NS_APPID) -> Result;
}
extern "C" {
pub fn APT_StartLibraryApplet(
appID: NS_APPID,
param: *const ::libc::c_void,
paramSize: size_t,
handle: Handle,
) -> Result;
}
extern "C" {
pub fn APT_PrepareToStartSystemApplet(appID: NS_APPID) -> Result;
}
extern "C" {
pub fn APT_StartSystemApplet(
appID: NS_APPID,
param: *const ::libc::c_void,
paramSize: size_t,
handle: Handle,
) -> Result;
}
extern "C" {
pub fn APT_GetSharedFont(fontHandle: *mut Handle, mapAddr: *mut u32_) -> Result;
}
extern "C" {
pub fn APT_ReceiveDeliverArg(
param: *const ::libc::c_void,
paramSize: size_t,
hmac: *const ::libc::c_void,
sender: *mut u64_,
received: *mut bool,
) -> Result;
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct bossContext {
pub property: [u32_; 7usize],
pub url: [::libc::c_char; 512usize],
pub property_x8: u32_,
pub property_x9: u8_,
pub property_xa: [u8_; 256usize],
pub property_xb: [u8_; 512usize],
pub property_xd: [::libc::c_char; 864usize],
pub property_xe: u32_,
pub property_xf: [u32_; 3usize],
pub property_x10: u8_,
pub property_x11: u8_,
pub property_x12: u8_,
pub property_x13: u32_,
pub property_x14: u32_,
pub property_x15: [u8_; 64usize],
pub property_x16: u32_,
pub property_x3b: u32_,
pub property_x3e: [u8_; 512usize],
}
impl Default for bossContext {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
pub const BOSSTASKSTATUS_STARTED: bossTaskStatus = 2;
pub const BOSSTASKSTATUS_ERROR: bossTaskStatus = 7;
pub type bossTaskStatus = ::libc::c_uint;
pub const bossNsDataHeaderInfoType_ContentSize: bossNsDataHeaderInfoTypes = 3;
pub type bossNsDataHeaderInfoTypes = ::libc::c_uint;
pub const bossNsDataHeaderInfoTypeSize_ContentSize: bossNsDataHeaderInfoTypeSizes = 4;
pub type bossNsDataHeaderInfoTypeSizes = ::libc::c_uint;
extern "C" {
pub fn bossInit(programID: u64_, force_user: bool) -> Result;
}
extern "C" {
pub fn bossReinit(programID: u64_) -> Result;
}
extern "C" {
pub fn bossExit();
}
extern "C" {
pub fn bossGetSessionHandle() -> Handle;
}
extern "C" {
pub fn bossSetStorageInfo(extdataID: u64_, boss_size: u32_, mediaType: u8_) -> Result;
}
extern "C" {
pub fn bossUnregisterStorage() -> Result;
}
extern "C" {
pub fn bossRegisterTask(taskID: *const ::libc::c_char, unk0: u8_, unk1: u8_) -> Result;
}
extern "C" {
pub fn bossSendProperty(PropertyID: u16_, buf: *const ::libc::c_void, size: u32_) -> Result;
}
extern "C" {
pub fn bossDeleteNsData(NsDataId: u32_) -> Result;
}
extern "C" {
pub fn bossGetNsDataHeaderInfo(
NsDataId: u32_,
type_: u8_,
buffer: *mut ::libc::c_void,
size: u32_,
) -> Result;
}
extern "C" {
pub fn bossReadNsData(
NsDataId: u32_,
offset: u64_,
buffer: *mut ::libc::c_void,
size: u32_,
transfer_total: *mut u32_,
unk_out: *mut u32_,
) -> Result;
}
extern "C" {
pub fn bossStartTaskImmediate(taskID: *const ::libc::c_char) -> Result;
}
extern "C" {
pub fn bossStartBgImmediate(taskID: *const ::libc::c_char) -> Result;
}
extern "C" {
pub fn bossDeleteTask(taskID: *const ::libc::c_char, unk: u32_) -> Result;
}
extern "C" {
pub fn bossGetTaskState(
taskID: *const ::libc::c_char,
inval: s8,
status: *mut u8_,
out1: *mut u32_,
out2: *mut u8_,
) -> Result;
}
extern "C" {
pub fn bossGetTaskProperty0(taskID: *const ::libc::c_char, out: *mut u8_) -> Result;
}
extern "C" {
pub fn bossSetupContextDefault(
ctx: *mut bossContext,
seconds_interval: u32_,
url: *const ::libc::c_char,
);
}
extern "C" {
pub fn bossSendContextConfig(ctx: *mut bossContext) -> Result;
}
pub const INPUT_YUV422_INDIV_8: Y2RU_InputFormat = 0;
pub const INPUT_YUV420_INDIV_8: Y2RU_InputFormat = 1;
pub const INPUT_YUV422_INDIV_16: Y2RU_InputFormat = 2;
pub const INPUT_YUV420_INDIV_16: Y2RU_InputFormat = 3;
pub const INPUT_YUV422_BATCH: Y2RU_InputFormat = 4;
pub type Y2RU_InputFormat = ::libc::c_uint;
pub const OUTPUT_RGB_32: Y2RU_OutputFormat = 0;
pub const OUTPUT_RGB_24: Y2RU_OutputFormat = 1;
pub const OUTPUT_RGB_16_555: Y2RU_OutputFormat = 2;
pub const OUTPUT_RGB_16_565: Y2RU_OutputFormat = 3;
pub type Y2RU_OutputFormat = ::libc::c_uint;
pub const ROTATION_NONE: Y2RU_Rotation = 0;
pub const ROTATION_CLOCKWISE_90: Y2RU_Rotation = 1;
pub const ROTATION_CLOCKWISE_180: Y2RU_Rotation = 2;
pub const ROTATION_CLOCKWISE_270: Y2RU_Rotation = 3;
pub type Y2RU_Rotation = ::libc::c_uint;
pub const BLOCK_LINE: Y2RU_BlockAlignment = 0;
pub const BLOCK_8_BY_8: Y2RU_BlockAlignment = 1;
pub type Y2RU_BlockAlignment = ::libc::c_uint;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct Y2RU_ColorCoefficients {
pub rgb_Y: u16_,
pub r_V: u16_,
pub g_V: u16_,
pub g_U: u16_,
pub b_U: u16_,
pub r_offset: u16_,
pub g_offset: u16_,
pub b_offset: u16_,
}
pub const COEFFICIENT_ITU_R_BT_601: Y2RU_StandardCoefficient = 0;
pub const COEFFICIENT_ITU_R_BT_709: Y2RU_StandardCoefficient = 1;
pub const COEFFICIENT_ITU_R_BT_601_SCALING: Y2RU_StandardCoefficient = 2;
pub const COEFFICIENT_ITU_R_BT_709_SCALING: Y2RU_StandardCoefficient = 3;
pub type Y2RU_StandardCoefficient = ::libc::c_uint;
#[repr(C)]
#[repr(align(4))]
#[derive(Debug, Copy, Clone)]
pub struct Y2RU_ConversionParams {
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
pub input_line_width: s16,
pub input_lines: s16,
pub _bitfield_align_2: [u8; 0],
pub _bitfield_2: __BindgenBitfieldUnit<[u8; 1usize]>,
pub unused: u8_,
pub alpha: u16_,
}
impl Default for Y2RU_ConversionParams {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
impl Y2RU_ConversionParams {
#[inline]
pub fn input_format(&self) -> Y2RU_InputFormat {
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 8u8) as u32) }
}
#[inline]
pub fn set_input_format(&mut self, val: Y2RU_InputFormat) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(0usize, 8u8, val as u64)
}
}
#[inline]
pub fn output_format(&self) -> Y2RU_OutputFormat {
unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 8u8) as u32) }
}
#[inline]
pub fn set_output_format(&mut self, val: Y2RU_OutputFormat) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(8usize, 8u8, val as u64)
}
}
#[inline]
pub fn rotation(&self) -> Y2RU_Rotation {
unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 8u8) as u32) }
}
#[inline]
pub fn set_rotation(&mut self, val: Y2RU_Rotation) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(16usize, 8u8, val as u64)
}
}
#[inline]
pub fn block_alignment(&self) -> Y2RU_BlockAlignment {
unsafe { ::core::mem::transmute(self._bitfield_1.get(24usize, 8u8) as u32) }
}
#[inline]
pub fn set_block_alignment(&mut self, val: Y2RU_BlockAlignment) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(24usize, 8u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(
input_format: Y2RU_InputFormat,
output_format: Y2RU_OutputFormat,
rotation: Y2RU_Rotation,
block_alignment: Y2RU_BlockAlignment,
) -> __BindgenBitfieldUnit<[u8; 4usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 8u8, {
let input_format: u32 = unsafe { ::core::mem::transmute(input_format) };
input_format as u64
});
__bindgen_bitfield_unit.set(8usize, 8u8, {
let output_format: u32 = unsafe { ::core::mem::transmute(output_format) };
output_format as u64
});
__bindgen_bitfield_unit.set(16usize, 8u8, {
let rotation: u32 = unsafe { ::core::mem::transmute(rotation) };
rotation as u64
});
__bindgen_bitfield_unit.set(24usize, 8u8, {
let block_alignment: u32 = unsafe { ::core::mem::transmute(block_alignment) };
block_alignment as u64
});
__bindgen_bitfield_unit
}
#[inline]
pub fn standard_coefficient(&self) -> Y2RU_StandardCoefficient {
unsafe { ::core::mem::transmute(self._bitfield_2.get(0usize, 8u8) as u32) }
}
#[inline]
pub fn set_standard_coefficient(&mut self, val: Y2RU_StandardCoefficient) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_2.set(0usize, 8u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_2(
standard_coefficient: Y2RU_StandardCoefficient,
) -> __BindgenBitfieldUnit<[u8; 1usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 8u8, {
let standard_coefficient: u32 = unsafe { ::core::mem::transmute(standard_coefficient) };
standard_coefficient as u64
});
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct Y2RU_DitheringWeightParams {
pub w0_xEven_yEven: u16_,
pub w0_xOdd_yEven: u16_,
pub w0_xEven_yOdd: u16_,
pub w0_xOdd_yOdd: u16_,
pub w1_xEven_yEven: u16_,
pub w1_xOdd_yEven: u16_,
pub w1_xEven_yOdd: u16_,
pub w1_xOdd_yOdd: u16_,
pub w2_xEven_yEven: u16_,
pub w2_xOdd_yEven: u16_,
pub w2_xEven_yOdd: u16_,
pub w2_xOdd_yOdd: u16_,
pub w3_xEven_yEven: u16_,
pub w3_xOdd_yEven: u16_,
pub w3_xEven_yOdd: u16_,
pub w3_xOdd_yOdd: u16_,
}
extern "C" {
pub fn y2rInit() -> Result;
}
extern "C" {
pub fn y2rExit();
}
extern "C" {
pub fn Y2RU_SetInputFormat(format: Y2RU_InputFormat) -> Result;
}
extern "C" {
pub fn Y2RU_GetInputFormat(format: *mut Y2RU_InputFormat) -> Result;
}
extern "C" {
pub fn Y2RU_SetOutputFormat(format: Y2RU_OutputFormat) -> Result;
}
extern "C" {
pub fn Y2RU_GetOutputFormat(format: *mut Y2RU_OutputFormat) -> Result;
}
extern "C" {
pub fn Y2RU_SetRotation(rotation: Y2RU_Rotation) -> Result;
}
extern "C" {
pub fn Y2RU_GetRotation(rotation: *mut Y2RU_Rotation) -> Result;
}
extern "C" {
pub fn Y2RU_SetBlockAlignment(alignment: Y2RU_BlockAlignment) -> Result;
}
extern "C" {
pub fn Y2RU_GetBlockAlignment(alignment: *mut Y2RU_BlockAlignment) -> Result;
}
extern "C" {
pub fn Y2RU_SetSpacialDithering(enable: bool) -> Result;
}
extern "C" {
pub fn Y2RU_GetSpacialDithering(enabled: *mut bool) -> Result;
}
extern "C" {
pub fn Y2RU_SetTemporalDithering(enable: bool) -> Result;
}
extern "C" {
pub fn Y2RU_GetTemporalDithering(enabled: *mut bool) -> Result;
}
extern "C" {
pub fn Y2RU_SetInputLineWidth(line_width: u16_) -> Result;
}
extern "C" {
pub fn Y2RU_GetInputLineWidth(line_width: *mut u16_) -> Result;
}
extern "C" {
pub fn Y2RU_SetInputLines(num_lines: u16_) -> Result;
}
extern "C" {
pub fn Y2RU_GetInputLines(num_lines: *mut u16_) -> Result;
}
extern "C" {
pub fn Y2RU_SetCoefficients(coefficients: *const Y2RU_ColorCoefficients) -> Result;
}
extern "C" {
pub fn Y2RU_GetCoefficients(coefficients: *mut Y2RU_ColorCoefficients) -> Result;
}
extern "C" {
pub fn Y2RU_SetStandardCoefficient(coefficient: Y2RU_StandardCoefficient) -> Result;
}
extern "C" {
pub fn Y2RU_GetStandardCoefficient(
coefficients: *mut Y2RU_ColorCoefficients,
standardCoeff: Y2RU_StandardCoefficient,
) -> Result;
}
extern "C" {
pub fn Y2RU_SetAlpha(alpha: u16_) -> Result;
}
extern "C" {
pub fn Y2RU_GetAlpha(alpha: *mut u16_) -> Result;
}
extern "C" {
pub fn Y2RU_SetTransferEndInterrupt(should_interrupt: bool) -> Result;
}
extern "C" {
pub fn Y2RU_GetTransferEndInterrupt(should_interrupt: *mut bool) -> Result;
}
extern "C" {
pub fn Y2RU_GetTransferEndEvent(end_event: *mut Handle) -> Result;
}
extern "C" {
pub fn Y2RU_SetSendingY(
src_buf: *const ::libc::c_void,
image_size: u32_,
transfer_unit: s16,
transfer_gap: s16,
) -> Result;
}
extern "C" {
pub fn Y2RU_SetSendingU(
src_buf: *const ::libc::c_void,
image_size: u32_,
transfer_unit: s16,
transfer_gap: s16,
) -> Result;
}
extern "C" {
pub fn Y2RU_SetSendingV(
src_buf: *const ::libc::c_void,
image_size: u32_,
transfer_unit: s16,
transfer_gap: s16,
) -> Result;
}
extern "C" {
pub fn Y2RU_SetSendingYUYV(
src_buf: *const ::libc::c_void,
image_size: u32_,
transfer_unit: s16,
transfer_gap: s16,
) -> Result;
}
extern "C" {
pub fn Y2RU_SetReceiving(
dst_buf: *mut ::libc::c_void,
image_size: u32_,
transfer_unit: s16,
transfer_gap: s16,
) -> Result;
}
extern "C" {
pub fn Y2RU_IsDoneSendingY(is_done: *mut bool) -> Result;
}
extern "C" {
pub fn Y2RU_IsDoneSendingU(is_done: *mut bool) -> Result;
}
extern "C" {
pub fn Y2RU_IsDoneSendingV(is_done: *mut bool) -> Result;
}
extern "C" {
pub fn Y2RU_IsDoneSendingYUYV(is_done: *mut bool) -> Result;
}
extern "C" {
pub fn Y2RU_IsDoneReceiving(is_done: *mut bool) -> Result;
}
extern "C" {
pub fn Y2RU_SetDitheringWeightParams(params: *const Y2RU_DitheringWeightParams) -> Result;
}
extern "C" {
pub fn Y2RU_GetDitheringWeightParams(params: *mut Y2RU_DitheringWeightParams) -> Result;
}
extern "C" {
pub fn Y2RU_SetConversionParams(params: *const Y2RU_ConversionParams) -> Result;
}
extern "C" {
pub fn Y2RU_StartConversion() -> Result;
}
extern "C" {
pub fn Y2RU_StopConversion() -> Result;
}
extern "C" {
pub fn Y2RU_IsBusyConversion(is_busy: *mut bool) -> Result;
}
extern "C" {
pub fn Y2RU_PingProcess(ping: *mut u8_) -> Result;
}
extern "C" {
pub fn Y2RU_DriverInitialize() -> Result;
}
extern "C" {
pub fn Y2RU_DriverFinalize() -> Result;
}
pub const PORT_NONE: ::libc::c_uint = 0;
pub const PORT_CAM1: ::libc::c_uint = 1;
pub const PORT_CAM2: ::libc::c_uint = 2;
pub const PORT_BOTH: ::libc::c_uint = 3;
pub type _bindgen_ty_15 = ::libc::c_uint;
pub const SELECT_NONE: ::libc::c_uint = 0;
pub const SELECT_OUT1: ::libc::c_uint = 1;
pub const SELECT_IN1: ::libc::c_uint = 2;
pub const SELECT_OUT2: ::libc::c_uint = 4;
pub const SELECT_IN1_OUT1: ::libc::c_uint = 3;
pub const SELECT_OUT1_OUT2: ::libc::c_uint = 5;
pub const SELECT_IN1_OUT2: ::libc::c_uint = 6;
pub const SELECT_ALL: ::libc::c_uint = 7;
pub type _bindgen_ty_16 = ::libc::c_uint;
pub const CONTEXT_NONE: CAMU_Context = 0;
pub const CONTEXT_A: CAMU_Context = 1;
pub const CONTEXT_B: CAMU_Context = 2;
pub const CONTEXT_BOTH: CAMU_Context = 3;
pub type CAMU_Context = ::libc::c_uint;
pub const FLIP_NONE: CAMU_Flip = 0;
pub const FLIP_HORIZONTAL: CAMU_Flip = 1;
pub const FLIP_VERTICAL: CAMU_Flip = 2;
pub const FLIP_REVERSE: CAMU_Flip = 3;
pub type CAMU_Flip = ::libc::c_uint;
pub const SIZE_VGA: CAMU_Size = 0;
pub const SIZE_QVGA: CAMU_Size = 1;
pub const SIZE_QQVGA: CAMU_Size = 2;
pub const SIZE_CIF: CAMU_Size = 3;
pub const SIZE_QCIF: CAMU_Size = 4;
pub const SIZE_DS_LCD: CAMU_Size = 5;
pub const SIZE_DS_LCDx4: CAMU_Size = 6;
pub const SIZE_CTR_TOP_LCD: CAMU_Size = 7;
pub const SIZE_CTR_BOTTOM_LCD: CAMU_Size = 1;
pub type CAMU_Size = ::libc::c_uint;
pub const FRAME_RATE_15: CAMU_FrameRate = 0;
pub const FRAME_RATE_15_TO_5: CAMU_FrameRate = 1;
pub const FRAME_RATE_15_TO_2: CAMU_FrameRate = 2;
pub const FRAME_RATE_10: CAMU_FrameRate = 3;
pub const FRAME_RATE_8_5: CAMU_FrameRate = 4;
pub const FRAME_RATE_5: CAMU_FrameRate = 5;
pub const FRAME_RATE_20: CAMU_FrameRate = 6;
pub const FRAME_RATE_20_TO_5: CAMU_FrameRate = 7;
pub const FRAME_RATE_30: CAMU_FrameRate = 8;
pub const FRAME_RATE_30_TO_5: CAMU_FrameRate = 9;
pub const FRAME_RATE_15_TO_10: CAMU_FrameRate = 10;
pub const FRAME_RATE_20_TO_10: CAMU_FrameRate = 11;
pub const FRAME_RATE_30_TO_10: CAMU_FrameRate = 12;
pub type CAMU_FrameRate = ::libc::c_uint;
pub const WHITE_BALANCE_AUTO: CAMU_WhiteBalance = 0;
pub const WHITE_BALANCE_3200K: CAMU_WhiteBalance = 1;
pub const WHITE_BALANCE_4150K: CAMU_WhiteBalance = 2;
pub const WHITE_BALANCE_5200K: CAMU_WhiteBalance = 3;
pub const WHITE_BALANCE_6000K: CAMU_WhiteBalance = 4;
pub const WHITE_BALANCE_7000K: CAMU_WhiteBalance = 5;
pub const WHITE_BALANCE_NORMAL: CAMU_WhiteBalance = 0;
pub const WHITE_BALANCE_TUNGSTEN: CAMU_WhiteBalance = 1;
pub const WHITE_BALANCE_WHITE_FLUORESCENT_LIGHT: CAMU_WhiteBalance = 2;
pub const WHITE_BALANCE_DAYLIGHT: CAMU_WhiteBalance = 3;
pub const WHITE_BALANCE_CLOUDY: CAMU_WhiteBalance = 4;
pub const WHITE_BALANCE_HORIZON: CAMU_WhiteBalance = 4;
pub const WHITE_BALANCE_SHADE: CAMU_WhiteBalance = 5;
pub type CAMU_WhiteBalance = ::libc::c_uint;
pub const PHOTO_MODE_NORMAL: CAMU_PhotoMode = 0;
pub const PHOTO_MODE_PORTRAIT: CAMU_PhotoMode = 1;
pub const PHOTO_MODE_LANDSCAPE: CAMU_PhotoMode = 2;
pub const PHOTO_MODE_NIGHTVIEW: CAMU_PhotoMode = 3;
pub const PHOTO_MODE_LETTER: CAMU_PhotoMode = 4;
pub type CAMU_PhotoMode = ::libc::c_uint;
pub const EFFECT_NONE: CAMU_Effect = 0;
pub const EFFECT_MONO: CAMU_Effect = 1;
pub const EFFECT_SEPIA: CAMU_Effect = 2;
pub const EFFECT_NEGATIVE: CAMU_Effect = 3;
pub const EFFECT_NEGAFILM: CAMU_Effect = 4;
pub const EFFECT_SEPIA01: CAMU_Effect = 5;
pub type CAMU_Effect = ::libc::c_uint;
pub const CONTRAST_PATTERN_01: CAMU_Contrast = 0;
pub const CONTRAST_PATTERN_02: CAMU_Contrast = 1;
pub const CONTRAST_PATTERN_03: CAMU_Contrast = 2;
pub const CONTRAST_PATTERN_04: CAMU_Contrast = 3;
pub const CONTRAST_PATTERN_05: CAMU_Contrast = 4;
pub const CONTRAST_PATTERN_06: CAMU_Contrast = 5;
pub const CONTRAST_PATTERN_07: CAMU_Contrast = 6;
pub const CONTRAST_PATTERN_08: CAMU_Contrast = 7;
pub const CONTRAST_PATTERN_09: CAMU_Contrast = 8;
pub const CONTRAST_PATTERN_10: CAMU_Contrast = 9;
pub const CONTRAST_PATTERN_11: CAMU_Contrast = 10;
pub const CONTRAST_LOW: CAMU_Contrast = 4;
pub const CONTRAST_NORMAL: CAMU_Contrast = 5;
pub const CONTRAST_HIGH: CAMU_Contrast = 6;
pub type CAMU_Contrast = ::libc::c_uint;
pub const LENS_CORRECTION_OFF: CAMU_LensCorrection = 0;
pub const LENS_CORRECTION_ON_70: CAMU_LensCorrection = 1;
pub const LENS_CORRECTION_ON_90: CAMU_LensCorrection = 2;
pub const LENS_CORRECTION_DARK: CAMU_LensCorrection = 0;
pub const LENS_CORRECTION_NORMAL: CAMU_LensCorrection = 1;
pub const LENS_CORRECTION_BRIGHT: CAMU_LensCorrection = 2;
pub type CAMU_LensCorrection = ::libc::c_uint;
pub const OUTPUT_YUV_422: CAMU_OutputFormat = 0;
pub const OUTPUT_RGB_565: CAMU_OutputFormat = 1;
pub type CAMU_OutputFormat = ::libc::c_uint;
pub const SHUTTER_SOUND_TYPE_NORMAL: CAMU_ShutterSoundType = 0;
pub const SHUTTER_SOUND_TYPE_MOVIE: CAMU_ShutterSoundType = 1;
pub const SHUTTER_SOUND_TYPE_MOVIE_END: CAMU_ShutterSoundType = 2;
pub type CAMU_ShutterSoundType = ::libc::c_uint;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct CAMU_ImageQualityCalibrationData {
pub aeBaseTarget: s16,
pub kRL: s16,
pub kGL: s16,
pub kBL: s16,
pub ccmPosition: s16,
pub awbCcmL9Right: u16_,
pub awbCcmL9Left: u16_,
pub awbCcmL10Right: u16_,
pub awbCcmL10Left: u16_,
pub awbX0Right: u16_,
pub awbX0Left: u16_,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct CAMU_StereoCameraCalibrationData {
pub isValidRotationXY: u8_,
pub padding: [u8_; 3usize],
pub scale: f32,
pub rotationZ: f32,
pub translationX: f32,
pub translationY: f32,
pub rotationX: f32,
pub rotationY: f32,
pub angleOfViewRight: f32,
pub angleOfViewLeft: f32,
pub distanceToChart: f32,
pub distanceCameras: f32,
pub imageWidth: s16,
pub imageHeight: s16,
pub reserved: [u8_; 16usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct CAMU_PackageParameterCameraSelect {
pub camera: u8_,
pub exposure: s8,
pub whiteBalance: u8_,
pub sharpness: s8,
pub autoExposureOn: u8_,
pub autoWhiteBalanceOn: u8_,
pub frameRate: u8_,
pub photoMode: u8_,
pub contrast: u8_,
pub lensCorrection: u8_,
pub noiseFilterOn: u8_,
pub padding: u8_,
pub autoExposureWindowX: s16,
pub autoExposureWindowY: s16,
pub autoExposureWindowWidth: s16,
pub autoExposureWindowHeight: s16,
pub autoWhiteBalanceWindowX: s16,
pub autoWhiteBalanceWindowY: s16,
pub autoWhiteBalanceWindowWidth: s16,
pub autoWhiteBalanceWindowHeight: s16,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct CAMU_PackageParameterContext {
pub camera: u8_,
pub context: u8_,
pub flip: u8_,
pub effect: u8_,
pub size: u8_,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct CAMU_PackageParameterContextDetail {
pub camera: u8_,
pub context: u8_,
pub flip: u8_,
pub effect: u8_,
pub width: s16,
pub height: s16,
pub cropX0: s16,
pub cropY0: s16,
pub cropX1: s16,
pub cropY1: s16,
}
extern "C" {
pub fn camInit() -> Result;
}
extern "C" {
pub fn camExit();
}
extern "C" {
pub fn CAMU_StartCapture(port: u32_) -> Result;
}
extern "C" {
pub fn CAMU_StopCapture(port: u32_) -> Result;
}
extern "C" {
pub fn CAMU_IsBusy(busy: *mut bool, port: u32_) -> Result;
}
extern "C" {
pub fn CAMU_ClearBuffer(port: u32_) -> Result;
}
extern "C" {
pub fn CAMU_GetVsyncInterruptEvent(event: *mut Handle, port: u32_) -> Result;
}
extern "C" {
pub fn CAMU_GetBufferErrorInterruptEvent(event: *mut Handle, port: u32_) -> Result;
}
extern "C" {
pub fn CAMU_SetReceiving(
event: *mut Handle,
dst: *mut ::libc::c_void,
port: u32_,
imageSize: u32_,
transferUnit: s16,
) -> Result;
}
extern "C" {
pub fn CAMU_IsFinishedReceiving(finishedReceiving: *mut bool, port: u32_) -> Result;
}
extern "C" {
pub fn CAMU_SetTransferLines(port: u32_, lines: s16, width: s16, height: s16) -> Result;
}
extern "C" {
pub fn CAMU_GetMaxLines(maxLines: *mut s16, width: s16, height: s16) -> Result;
}
extern "C" {
pub fn CAMU_SetTransferBytes(port: u32_, bytes: u32_, width: s16, height: s16) -> Result;
}
extern "C" {
pub fn CAMU_GetTransferBytes(transferBytes: *mut u32_, port: u32_) -> Result;
}
extern "C" {
pub fn CAMU_GetMaxBytes(maxBytes: *mut u32_, width: s16, height: s16) -> Result;
}
extern "C" {
pub fn CAMU_SetTrimming(port: u32_, trimming: bool) -> Result;
}
extern "C" {
pub fn CAMU_IsTrimming(trimming: *mut bool, port: u32_) -> Result;
}
extern "C" {
pub fn CAMU_SetTrimmingParams(
port: u32_,
xStart: s16,
yStart: s16,
xEnd: s16,
yEnd: s16,
) -> Result;
}
extern "C" {
pub fn CAMU_GetTrimmingParams(
xStart: *mut s16,
yStart: *mut s16,
xEnd: *mut s16,
yEnd: *mut s16,
port: u32_,
) -> Result;
}
extern "C" {
pub fn CAMU_SetTrimmingParamsCenter(
port: u32_,
trimWidth: s16,
trimHeight: s16,
camWidth: s16,
camHeight: s16,
) -> Result;
}
extern "C" {
pub fn CAMU_Activate(select: u32_) -> Result;
}
extern "C" {
pub fn CAMU_SwitchContext(select: u32_, context: CAMU_Context) -> Result;
}
extern "C" {
pub fn CAMU_SetExposure(select: u32_, exposure: s8) -> Result;
}
extern "C" {
pub fn CAMU_SetWhiteBalance(select: u32_, whiteBalance: CAMU_WhiteBalance) -> Result;
}
extern "C" {
pub fn CAMU_SetWhiteBalanceWithoutBaseUp(
select: u32_,
whiteBalance: CAMU_WhiteBalance,
) -> Result;
}
extern "C" {
pub fn CAMU_SetSharpness(select: u32_, sharpness: s8) -> Result;
}
extern "C" {
pub fn CAMU_SetAutoExposure(select: u32_, autoExposure: bool) -> Result;
}
extern "C" {
pub fn CAMU_IsAutoExposure(autoExposure: *mut bool, select: u32_) -> Result;
}
extern "C" {
pub fn CAMU_SetAutoWhiteBalance(select: u32_, autoWhiteBalance: bool) -> Result;
}
extern "C" {
pub fn CAMU_IsAutoWhiteBalance(autoWhiteBalance: *mut bool, select: u32_) -> Result;
}
extern "C" {
pub fn CAMU_FlipImage(select: u32_, flip: CAMU_Flip, context: CAMU_Context) -> Result;
}
extern "C" {
pub fn CAMU_SetDetailSize(
select: u32_,
width: s16,
height: s16,
cropX0: s16,
cropY0: s16,
cropX1: s16,
cropY1: s16,
context: CAMU_Context,
) -> Result;
}
extern "C" {
pub fn CAMU_SetSize(select: u32_, size: CAMU_Size, context: CAMU_Context) -> Result;
}
extern "C" {
pub fn CAMU_SetFrameRate(select: u32_, frameRate: CAMU_FrameRate) -> Result;
}
extern "C" {
pub fn CAMU_SetPhotoMode(select: u32_, photoMode: CAMU_PhotoMode) -> Result;
}
extern "C" {
pub fn CAMU_SetEffect(select: u32_, effect: CAMU_Effect, context: CAMU_Context) -> Result;
}
extern "C" {
pub fn CAMU_SetContrast(select: u32_, contrast: CAMU_Contrast) -> Result;
}
extern "C" {
pub fn CAMU_SetLensCorrection(select: u32_, lensCorrection: CAMU_LensCorrection) -> Result;
}
extern "C" {
pub fn CAMU_SetOutputFormat(
select: u32_,
format: CAMU_OutputFormat,
context: CAMU_Context,
) -> Result;
}
extern "C" {
pub fn CAMU_SetAutoExposureWindow(
select: u32_,
x: s16,
y: s16,
width: s16,
height: s16,
) -> Result;
}
extern "C" {
pub fn CAMU_SetAutoWhiteBalanceWindow(
select: u32_,
x: s16,
y: s16,
width: s16,
height: s16,
) -> Result;
}
extern "C" {
pub fn CAMU_SetNoiseFilter(select: u32_, noiseFilter: bool) -> Result;
}
extern "C" {
pub fn CAMU_SynchronizeVsyncTiming(select1: u32_, select2: u32_) -> Result;
}
extern "C" {
pub fn CAMU_GetLatestVsyncTiming(timing: *mut s64, port: u32_, past: u32_) -> Result;
}
extern "C" {
pub fn CAMU_GetStereoCameraCalibrationData(
data: *mut CAMU_StereoCameraCalibrationData,
) -> Result;
}
extern "C" {
pub fn CAMU_SetStereoCameraCalibrationData(data: CAMU_StereoCameraCalibrationData) -> Result;
}
extern "C" {
pub fn CAMU_WriteRegisterI2c(select: u32_, addr: u16_, data: u16_) -> Result;
}
extern "C" {
pub fn CAMU_WriteMcuVariableI2c(select: u32_, addr: u16_, data: u16_) -> Result;
}
extern "C" {
pub fn CAMU_ReadRegisterI2cExclusive(data: *mut u16_, select: u32_, addr: u16_) -> Result;
}
extern "C" {
pub fn CAMU_ReadMcuVariableI2cExclusive(data: *mut u16_, select: u32_, addr: u16_) -> Result;
}
extern "C" {
pub fn CAMU_SetImageQualityCalibrationData(data: CAMU_ImageQualityCalibrationData) -> Result;
}
extern "C" {
pub fn CAMU_GetImageQualityCalibrationData(
data: *mut CAMU_ImageQualityCalibrationData,
) -> Result;
}
extern "C" {
pub fn CAMU_SetPackageParameterWithoutContext(
param: CAMU_PackageParameterCameraSelect,
) -> Result;
}
extern "C" {
pub fn CAMU_SetPackageParameterWithContext(param: CAMU_PackageParameterContext) -> Result;
}
extern "C" {
pub fn CAMU_SetPackageParameterWithContextDetail(
param: CAMU_PackageParameterContextDetail,
) -> Result;
}
extern "C" {
pub fn CAMU_GetSuitableY2rStandardCoefficient(
coefficient: *mut Y2RU_StandardCoefficient,
) -> Result;
}
extern "C" {
pub fn CAMU_PlayShutterSound(sound: CAMU_ShutterSoundType) -> Result;
}
extern "C" {
pub fn CAMU_DriverInitialize() -> Result;
}
extern "C" {
pub fn CAMU_DriverFinalize() -> Result;
}
extern "C" {
pub fn CAMU_GetActivatedCamera(select: *mut u32_) -> Result;
}
extern "C" {
pub fn CAMU_GetSleepCamera(select: *mut u32_) -> Result;
}
extern "C" {
pub fn CAMU_SetSleepCamera(select: u32_) -> Result;
}
extern "C" {
pub fn CAMU_SetBrightnessSynchronization(brightnessSynchronization: bool) -> Result;
}
extern "C" {
pub fn cfgnorInit(value: u8_) -> Result;
}
extern "C" {
pub fn cfgnorExit();
}
extern "C" {
pub fn cfgnorDumpFlash(buf: *mut u32_, size: u32_) -> Result;
}
extern "C" {
pub fn cfgnorWriteFlash(buf: *mut u32_, size: u32_) -> Result;
}
extern "C" {
pub fn CFGNOR_Initialize(value: u8_) -> Result;
}
extern "C" {
pub fn CFGNOR_Shutdown() -> Result;
}
extern "C" {
pub fn CFGNOR_ReadData(offset: u32_, buf: *mut u32_, size: u32_) -> Result;
}
extern "C" {
pub fn CFGNOR_WriteData(offset: u32_, buf: *mut u32_, size: u32_) -> Result;
}
pub const CFG_REGION_JPN: CFG_Region = 0;
pub const CFG_REGION_USA: CFG_Region = 1;
pub const CFG_REGION_EUR: CFG_Region = 2;
pub const CFG_REGION_AUS: CFG_Region = 3;
pub const CFG_REGION_CHN: CFG_Region = 4;
pub const CFG_REGION_KOR: CFG_Region = 5;
pub const CFG_REGION_TWN: CFG_Region = 6;
pub type CFG_Region = ::libc::c_uint;
pub const CFG_LANGUAGE_JP: CFG_Language = 0;
pub const CFG_LANGUAGE_EN: CFG_Language = 1;
pub const CFG_LANGUAGE_FR: CFG_Language = 2;
pub const CFG_LANGUAGE_DE: CFG_Language = 3;
pub const CFG_LANGUAGE_IT: CFG_Language = 4;
pub const CFG_LANGUAGE_ES: CFG_Language = 5;
pub const CFG_LANGUAGE_ZH: CFG_Language = 6;
pub const CFG_LANGUAGE_KO: CFG_Language = 7;
pub const CFG_LANGUAGE_NL: CFG_Language = 8;
pub const CFG_LANGUAGE_PT: CFG_Language = 9;
pub const CFG_LANGUAGE_RU: CFG_Language = 10;
pub const CFG_LANGUAGE_TW: CFG_Language = 11;
pub type CFG_Language = ::libc::c_uint;
pub const CFG_MODEL_3DS: CFG_SystemModel = 0;
pub const CFG_MODEL_3DSXL: CFG_SystemModel = 1;
pub const CFG_MODEL_N3DS: CFG_SystemModel = 2;
pub const CFG_MODEL_2DS: CFG_SystemModel = 3;
pub const CFG_MODEL_N3DSXL: CFG_SystemModel = 4;
pub const CFG_MODEL_N2DSXL: CFG_SystemModel = 5;
pub type CFG_SystemModel = ::libc::c_uint;
extern "C" {
pub fn cfguInit() -> Result;
}
extern "C" {
pub fn cfguExit();
}
extern "C" {
pub fn CFGU_SecureInfoGetRegion(region: *mut u8_) -> Result;
}
extern "C" {
pub fn CFGU_GenHashConsoleUnique(appIDSalt: u32_, hash: *mut u64_) -> Result;
}
extern "C" {
pub fn CFGU_GetRegionCanadaUSA(value: *mut u8_) -> Result;
}
extern "C" {
pub fn CFGU_GetSystemModel(model: *mut u8_) -> Result;
}
extern "C" {
pub fn CFGU_GetModelNintendo2DS(value: *mut u8_) -> Result;
}
extern "C" {
pub fn CFGU_GetCountryCodeString(code: u16_, string: *mut u16_) -> Result;
}
extern "C" {
pub fn CFGU_GetCountryCodeID(string: u16_, code: *mut u16_) -> Result;
}
extern "C" {
pub fn CFGU_IsNFCSupported(isSupported: *mut bool) -> Result;
}
extern "C" {
pub fn CFGU_GetConfigInfoBlk2(size: u32_, blkID: u32_, outData: *mut ::libc::c_void) -> Result;
}
extern "C" {
pub fn CFG_GetConfigInfoBlk4(size: u32_, blkID: u32_, outData: *mut ::libc::c_void) -> Result;
}
extern "C" {
pub fn CFG_GetConfigInfoBlk8(size: u32_, blkID: u32_, outData: *mut ::libc::c_void) -> Result;
}
extern "C" {
pub fn CFG_SetConfigInfoBlk4(size: u32_, blkID: u32_, inData: *const ::libc::c_void) -> Result;
}
extern "C" {
pub fn CFG_SetConfigInfoBlk8(size: u32_, blkID: u32_, inData: *const ::libc::c_void) -> Result;
}
extern "C" {
pub fn CFG_UpdateConfigSavegame() -> Result;
}
extern "C" {
pub fn CFGU_GetSystemLanguage(language: *mut u8_) -> Result;
}
extern "C" {
pub fn CFGI_RestoreLocalFriendCodeSeed() -> Result;
}
extern "C" {
pub fn CFGI_RestoreSecureInfo() -> Result;
}
extern "C" {
pub fn CFGI_DeleteConfigSavefile() -> Result;
}
extern "C" {
pub fn CFGI_FormatConfig() -> Result;
}
extern "C" {
pub fn CFGI_ClearParentalControls() -> Result;
}
extern "C" {
pub fn CFGI_VerifySigLocalFriendCodeSeed() -> Result;
}
extern "C" {
pub fn CFGI_VerifySigSecureInfo() -> Result;
}
extern "C" {
pub fn CFGI_SecureInfoGetSerialNumber(serial: *mut u8_) -> Result;
}
extern "C" {
pub fn CFGI_GetLocalFriendCodeSeedData(data: *mut u8_) -> Result;
}
extern "C" {
pub fn CFGI_GetLocalFriendCodeSeed(seed: *mut u64_) -> Result;
}
extern "C" {
pub fn CFGI_GetSecureInfoData(data: *mut u8_) -> Result;
}
extern "C" {
pub fn CFGI_GetSecureInfoSignature(data: *mut u8_) -> Result;
}
pub const CSND_ENCODING_PCM8: ::libc::c_uint = 0;
pub const CSND_ENCODING_PCM16: ::libc::c_uint = 1;
pub const CSND_ENCODING_ADPCM: ::libc::c_uint = 2;
pub const CSND_ENCODING_PSG: ::libc::c_uint = 3;
pub type _bindgen_ty_17 = ::libc::c_uint;
pub const CSND_LOOPMODE_MANUAL: ::libc::c_uint = 0;
pub const CSND_LOOPMODE_NORMAL: ::libc::c_uint = 1;
pub const CSND_LOOPMODE_ONESHOT: ::libc::c_uint = 2;
pub const CSND_LOOPMODE_NORELOAD: ::libc::c_uint = 3;
pub type _bindgen_ty_18 = ::libc::c_uint;
pub const SOUND_LINEAR_INTERP: ::libc::c_uint = 64;
pub const SOUND_REPEAT: ::libc::c_uint = 1024;
pub const SOUND_ONE_SHOT: ::libc::c_uint = 2048;
pub const SOUND_FORMAT_8BIT: ::libc::c_uint = 0;
pub const SOUND_FORMAT_16BIT: ::libc::c_uint = 4096;
pub const SOUND_FORMAT_ADPCM: ::libc::c_uint = 8192;
pub const SOUND_FORMAT_PSG: ::libc::c_uint = 12288;
pub const SOUND_ENABLE: ::libc::c_uint = 16384;
pub type _bindgen_ty_19 = ::libc::c_uint;
pub const CAPTURE_REPEAT: ::libc::c_uint = 0;
pub const CAPTURE_ONE_SHOT: ::libc::c_uint = 1;
pub const CAPTURE_FORMAT_16BIT: ::libc::c_uint = 0;
pub const CAPTURE_FORMAT_8BIT: ::libc::c_uint = 2;
pub const CAPTURE_ENABLE: ::libc::c_uint = 32768;
pub type _bindgen_ty_20 = ::libc::c_uint;
pub const DutyCycle_0: CSND_DutyCycle = 7;
pub const DutyCycle_12: CSND_DutyCycle = 0;
pub const DutyCycle_25: CSND_DutyCycle = 1;
pub const DutyCycle_37: CSND_DutyCycle = 2;
pub const DutyCycle_50: CSND_DutyCycle = 3;
pub const DutyCycle_62: CSND_DutyCycle = 4;
pub const DutyCycle_75: CSND_DutyCycle = 5;
pub const DutyCycle_87: CSND_DutyCycle = 6;
pub type CSND_DutyCycle = ::libc::c_uint;
#[repr(C)]
#[derive(Copy, Clone)]
pub union CSND_ChnInfo {
pub value: [u32_; 3usize],
pub __bindgen_anon_1: CSND_ChnInfo__bindgen_ty_1,
_bindgen_union_align: [u32; 3usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct CSND_ChnInfo__bindgen_ty_1 {
pub active: u8_,
pub _pad1: u8_,
pub _pad2: u16_,
pub adpcmSample: s16,
pub adpcmIndex: u8_,
pub _pad3: u8_,
pub unknownZero: u32_,
}
impl Default for CSND_ChnInfo {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union CSND_CapInfo {
pub value: [u32_; 2usize],
pub __bindgen_anon_1: CSND_CapInfo__bindgen_ty_1,
_bindgen_union_align: [u32; 2usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct CSND_CapInfo__bindgen_ty_1 {
pub active: u8_,
pub _pad1: u8_,
pub _pad2: u16_,
pub unknownZero: u32_,
}
impl Default for CSND_CapInfo {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
extern "C" {
pub static mut csndSharedMem: *mut vu32;
}
extern "C" {
pub static mut csndSharedMemSize: u32_;
}
extern "C" {
pub static mut csndChannels: u32_;
}
extern "C" {
pub fn CSND_AcquireCapUnit(capUnit: *mut u32_) -> Result;
}
extern "C" {
pub fn CSND_ReleaseCapUnit(capUnit: u32_) -> Result;
}
extern "C" {
pub fn CSND_FlushDataCache(adr: *const ::libc::c_void, size: u32_) -> Result;
}
extern "C" {
pub fn CSND_StoreDataCache(adr: *const ::libc::c_void, size: u32_) -> Result;
}
extern "C" {
pub fn CSND_InvalidateDataCache(adr: *const ::libc::c_void, size: u32_) -> Result;
}
extern "C" {
pub fn CSND_Reset() -> Result;
}
extern "C" {
pub fn csndInit() -> Result;
}
extern "C" {
pub fn csndExit();
}
extern "C" {
pub fn csndAddCmd(cmdid: ::libc::c_int) -> *mut u32_;
}
extern "C" {
pub fn csndWriteCmd(cmdid: ::libc::c_int, cmdparams: *mut u8_);
}
extern "C" {
pub fn csndExecCmds(waitDone: bool) -> Result;
}
extern "C" {
pub fn CSND_SetPlayStateR(channel: u32_, value: u32_);
}
extern "C" {
pub fn CSND_SetPlayState(channel: u32_, value: u32_);
}
extern "C" {
pub fn CSND_SetEncoding(channel: u32_, value: u32_);
}
extern "C" {
pub fn CSND_SetBlock(channel: u32_, block: ::libc::c_int, physaddr: u32_, size: u32_);
}
extern "C" {
pub fn CSND_SetLooping(channel: u32_, value: u32_);
}
extern "C" {
pub fn CSND_SetBit7(channel: u32_, set: bool);
}
extern "C" {
pub fn CSND_SetInterp(channel: u32_, interp: bool);
}
extern "C" {
pub fn CSND_SetDuty(channel: u32_, duty: CSND_DutyCycle);
}
extern "C" {
pub fn CSND_SetTimer(channel: u32_, timer: u32_);
}
extern "C" {
pub fn CSND_SetVol(channel: u32_, chnVolumes: u32_, capVolumes: u32_);
}
extern "C" {
pub fn CSND_SetAdpcmState(
channel: u32_,
block: ::libc::c_int,
sample: ::libc::c_int,
index: ::libc::c_int,
);
}
extern "C" {
pub fn CSND_SetAdpcmReload(channel: u32_, reload: bool);
}
extern "C" {
pub fn CSND_SetChnRegs(
flags: u32_,
physaddr0: u32_,
physaddr1: u32_,
totalbytesize: u32_,
chnVolumes: u32_,
capVolumes: u32_,
);
}
extern "C" {
pub fn CSND_SetChnRegsPSG(
flags: u32_,
chnVolumes: u32_,
capVolumes: u32_,
duty: CSND_DutyCycle,
);
}
extern "C" {
pub fn CSND_SetChnRegsNoise(flags: u32_, chnVolumes: u32_, capVolumes: u32_);
}
extern "C" {
pub fn CSND_CapEnable(capUnit: u32_, enable: bool);
}
extern "C" {
pub fn CSND_CapSetRepeat(capUnit: u32_, repeat: bool);
}
extern "C" {
pub fn CSND_CapSetFormat(capUnit: u32_, eightbit: bool);
}
extern "C" {
pub fn CSND_CapSetBit2(capUnit: u32_, set: bool);
}
extern "C" {
pub fn CSND_CapSetTimer(capUnit: u32_, timer: u32_);
}
extern "C" {
pub fn CSND_CapSetBuffer(capUnit: u32_, addr: u32_, size: u32_);
}
extern "C" {
pub fn CSND_SetCapRegs(capUnit: u32_, flags: u32_, addr: u32_, size: u32_);
}
extern "C" {
pub fn CSND_SetDspFlags(waitDone: bool) -> Result;
}
extern "C" {
pub fn CSND_UpdateInfo(waitDone: bool) -> Result;
}
extern "C" {
pub fn csndPlaySound(
chn: ::libc::c_int,
flags: u32_,
sampleRate: u32_,
vol: f32,
pan: f32,
data0: *mut ::libc::c_void,
data1: *mut ::libc::c_void,
size: u32_,
) -> Result;
}
extern "C" {
pub fn csndGetDspFlags(outSemFlags: *mut u32_, outIrqFlags: *mut u32_);
}
extern "C" {
pub fn csndGetChnInfo(channel: u32_) -> *mut CSND_ChnInfo;
}
extern "C" {
pub fn csndGetCapInfo(capUnit: u32_) -> *mut CSND_CapInfo;
}
extern "C" {
pub fn csndGetState(channel: u32_, out: *mut CSND_ChnInfo) -> Result;
}
extern "C" {
pub fn csndIsPlaying(channel: u32_, status: *mut u8_) -> Result;
}
pub const DSP_INTERRUPT_PIPE: DSP_InterruptType = 2;
pub type DSP_InterruptType = ::libc::c_uint;
pub const DSPHOOK_ONSLEEP: DSP_HookType = 0;
pub const DSPHOOK_ONWAKEUP: DSP_HookType = 1;
pub const DSPHOOK_ONCANCEL: DSP_HookType = 2;
pub type DSP_HookType = ::libc::c_uint;
pub type dspHookFn = ::core::option::Option<unsafe extern "C" fn(hook: DSP_HookType)>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct tag_dspHookCookie {
pub next: *mut tag_dspHookCookie,
pub callback: dspHookFn,
}
impl Default for tag_dspHookCookie {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
pub type dspHookCookie = tag_dspHookCookie;
extern "C" {
pub fn dspInit() -> Result;
}
extern "C" {
pub fn dspExit();
}
extern "C" {
pub fn dspIsComponentLoaded() -> bool;
}
extern "C" {
pub fn dspHook(cookie: *mut dspHookCookie, callback: dspHookFn);
}
extern "C" {
pub fn dspUnhook(cookie: *mut dspHookCookie);
}
extern "C" {
pub fn DSP_GetHeadphoneStatus(is_inserted: *mut bool) -> Result;
}
extern "C" {
pub fn DSP_FlushDataCache(address: *const ::libc::c_void, size: u32_) -> Result;
}
extern "C" {
pub fn DSP_InvalidateDataCache(address: *const ::libc::c_void, size: u32_) -> Result;
}
extern "C" {
pub fn DSP_GetSemaphoreHandle(semaphore: *mut Handle) -> Result;
}
extern "C" {
pub fn DSP_SetSemaphore(value: u16_) -> Result;
}
extern "C" {
pub fn DSP_SetSemaphoreMask(mask: u16_) -> Result;
}
extern "C" {
pub fn DSP_LoadComponent(
component: *const ::libc::c_void,
size: u32_,
prog_mask: u16_,
data_mask: u16_,
is_loaded: *mut bool,
) -> Result;
}
extern "C" {
pub fn DSP_UnloadComponent() -> Result;
}
extern "C" {
pub fn DSP_RegisterInterruptEvents(handle: Handle, interrupt: u32_, channel: u32_) -> Result;
}
extern "C" {
pub fn DSP_ReadPipeIfPossible(
channel: u32_,
peer: u32_,
buffer: *mut ::libc::c_void,
length: u16_,
length_read: *mut u16_,
) -> Result;
}
extern "C" {
pub fn DSP_WriteProcessPipe(
channel: u32_,
buffer: *const ::libc::c_void,
length: u32_,
) -> Result;
}
extern "C" {
pub fn DSP_ConvertProcessAddressFromDspDram(
dsp_address: u32_,
arm_address: *mut u32_,
) -> Result;
}
extern "C" {
pub fn DSP_RecvData(regNo: u16_, value: *mut u16_) -> Result;
}
extern "C" {
pub fn DSP_RecvDataIsReady(regNo: u16_, is_ready: *mut bool) -> Result;
}
extern "C" {
pub fn DSP_SendData(regNo: u16_, value: u16_) -> Result;
}
extern "C" {
pub fn DSP_SendDataIsEmpty(regNo: u16_, is_empty: *mut bool) -> Result;
}
pub type FSPXI_Archive = u64_;
pub type FSPXI_File = u64_;
pub type FSPXI_Directory = u64_;
extern "C" {
pub fn FSPXI_OpenFile(
serviceHandle: Handle,
out: *mut FSPXI_File,
archive: FSPXI_Archive,
path: FS_Path,
flags: u32_,
attributes: u32_,
) -> Result;
}
extern "C" {
pub fn FSPXI_DeleteFile(serviceHandle: Handle, archive: FSPXI_Archive, path: FS_Path)
-> Result;
}
extern "C" {
pub fn FSPXI_RenameFile(
serviceHandle: Handle,
srcArchive: FSPXI_Archive,
srcPath: FS_Path,
dstArchive: FSPXI_Archive,
dstPath: FS_Path,
) -> Result;
}
extern "C" {
pub fn FSPXI_DeleteDirectory(
serviceHandle: Handle,
archive: FSPXI_Archive,
path: FS_Path,
) -> Result;
}
extern "C" {
pub fn FSPXI_CreateFile(
serviceHandle: Handle,
archive: FSPXI_Archive,
path: FS_Path,
attributes: u32_,
fileSize: u64_,
) -> Result;
}
extern "C" {
pub fn FSPXI_CreateDirectory(
serviceHandle: Handle,
archive: FSPXI_Archive,
path: FS_Path,
attributes: u32_,
) -> Result;
}
extern "C" {
pub fn FSPXI_RenameDirectory(
serviceHandle: Handle,
srcArchive: FSPXI_Archive,
srcPath: FS_Path,
dstArchive: FSPXI_Archive,
dstPath: FS_Path,
) -> Result;
}
extern "C" {
pub fn FSPXI_OpenDirectory(
serviceHandle: Handle,
out: *mut FSPXI_Directory,
archive: FSPXI_Archive,
path: FS_Path,
) -> Result;
}
extern "C" {
pub fn FSPXI_ReadFile(
serviceHandle: Handle,
file: FSPXI_File,
bytesRead: *mut u32_,
offset: u64_,
buffer: *mut ::libc::c_void,
size: u32_,
) -> Result;
}
extern "C" {
pub fn FSPXI_CalculateFileHashSHA256(
serviceHandle: Handle,
file: FSPXI_File,
buffer: *mut ::libc::c_void,
size: u32_,
) -> Result;
}
extern "C" {
pub fn FSPXI_WriteFile(
serviceHandle: Handle,
file: FSPXI_File,
bytesWritten: *mut u32_,
offset: u64_,
buffer: *const ::libc::c_void,
size: u32_,
flags: u32_,
) -> Result;
}
extern "C" {
pub fn FSPXI_CalcSavegameMAC(
serviceHandle: Handle,
file: FSPXI_File,
inBuffer: *const ::libc::c_void,
inSize: u32_,
outBuffer: *mut ::libc::c_void,
outSize: u32_,
) -> Result;
}
extern "C" {
pub fn FSPXI_GetFileSize(serviceHandle: Handle, file: FSPXI_File, size: *mut u64_) -> Result;
}
extern "C" {
pub fn FSPXI_SetFileSize(serviceHandle: Handle, file: FSPXI_File, size: u64_) -> Result;
}
extern "C" {
pub fn FSPXI_CloseFile(serviceHandle: Handle, file: FSPXI_File) -> Result;
}
extern "C" {
pub fn FSPXI_ReadDirectory(
serviceHandle: Handle,
directory: FSPXI_Directory,
entriesRead: *mut u32_,
entryCount: u32_,
entries: *mut FS_DirectoryEntry,
) -> Result;
}
extern "C" {
pub fn FSPXI_CloseDirectory(serviceHandle: Handle, directory: FSPXI_Directory) -> Result;
}
extern "C" {
pub fn FSPXI_OpenArchive(
serviceHandle: Handle,
archive: *mut FSPXI_Archive,
archiveID: FS_ArchiveID,
path: FS_Path,
) -> Result;
}
extern "C" {
pub fn FSPXI_HasFile(
serviceHandle: Handle,
archive: FSPXI_Archive,
out: *mut bool,
path: FS_Path,
) -> Result;
}
extern "C" {
pub fn FSPXI_HasDirectory(
serviceHandle: Handle,
archive: FSPXI_Archive,
out: *mut bool,
path: FS_Path,
) -> Result;
}
extern "C" {
pub fn FSPXI_CommitSaveData(serviceHandle: Handle, archive: FSPXI_Archive, id: u32_) -> Result;
}
extern "C" {
pub fn FSPXI_CloseArchive(serviceHandle: Handle, archive: FSPXI_Archive) -> Result;
}
extern "C" {
pub fn FSPXI_Unknown0x17(
serviceHandle: Handle,
archive: FSPXI_Archive,
out: *mut bool,
) -> Result;
}
extern "C" {
pub fn FSPXI_GetCardType(serviceHandle: Handle, out: *mut FS_CardType) -> Result;
}
extern "C" {
pub fn FSPXI_GetSdmcArchiveResource(
serviceHandle: Handle,
out: *mut FS_ArchiveResource,
) -> Result;
}
extern "C" {
pub fn FSPXI_GetNandArchiveResource(
serviceHandle: Handle,
out: *mut FS_ArchiveResource,
) -> Result;
}
extern "C" {
pub fn FSPXI_GetSdmcFatFsError(serviceHandle: Handle, out: *mut u32_) -> Result;
}
extern "C" {
pub fn FSPXI_IsSdmcDetected(serviceHandle: Handle, out: *mut bool) -> Result;
}
extern "C" {
pub fn FSPXI_IsSdmcWritable(serviceHandle: Handle, out: *mut bool) -> Result;
}
extern "C" {
pub fn FSPXI_GetSdmcCid(serviceHandle: Handle, out: *mut ::libc::c_void, size: u32_) -> Result;
}
extern "C" {
pub fn FSPXI_GetNandCid(serviceHandle: Handle, out: *mut ::libc::c_void, size: u32_) -> Result;
}
extern "C" {
pub fn FSPXI_GetSdmcSpeedInfo(serviceHandle: Handle, out: *mut u32_) -> Result;
}
extern "C" {
pub fn FSPXI_GetNandSpeedInfo(serviceHandle: Handle, out: *mut u32_) -> Result;
}
extern "C" {
pub fn FSPXI_GetSdmcLog(serviceHandle: Handle, out: *mut ::libc::c_void, size: u32_) -> Result;
}
extern "C" {
pub fn FSPXI_GetNandLog(serviceHandle: Handle, out: *mut ::libc::c_void, size: u32_) -> Result;
}
extern "C" {
pub fn FSPXI_ClearSdmcLog(serviceHandle: Handle) -> Result;
}
extern "C" {
pub fn FSPXI_ClearNandLog(serviceHandle: Handle) -> Result;
}
extern "C" {
pub fn FSPXI_CardSlotIsInserted(serviceHandle: Handle, inserted: *mut bool) -> Result;
}
extern "C" {
pub fn FSPXI_CardSlotPowerOn(serviceHandle: Handle, status: *mut bool) -> Result;
}
extern "C" {
pub fn FSPXI_CardSlotPowerOff(serviceHandle: Handle, status: *mut bool) -> Result;
}
extern "C" {
pub fn FSPXI_CardSlotGetCardIFPowerStatus(serviceHandle: Handle, status: *mut bool) -> Result;
}
extern "C" {
pub fn FSPXI_CardNorDirectCommand(serviceHandle: Handle, commandId: u8_) -> Result;
}
extern "C" {
pub fn FSPXI_CardNorDirectCommandWithAddress(
serviceHandle: Handle,
commandId: u8_,
address: u32_,
) -> Result;
}
extern "C" {
pub fn FSPXI_CardNorDirectRead(
serviceHandle: Handle,
commandId: u8_,
size: u32_,
output: *mut ::libc::c_void,
) -> Result;
}
extern "C" {
pub fn FSPXI_CardNorDirectReadWithAddress(
serviceHandle: Handle,
commandId: u8_,
address: u32_,
size: u32_,
output: *mut ::libc::c_void,
) -> Result;
}
extern "C" {
pub fn FSPXI_CardNorDirectWrite(
serviceHandle: Handle,
commandId: u8_,
size: u32_,
input: *const ::libc::c_void,
) -> Result;
}
extern "C" {
pub fn FSPXI_CardNorDirectWriteWithAddress(
serviceHandle: Handle,
commandId: u8_,
address: u32_,
size: u32_,
input: *const ::libc::c_void,
) -> Result;
}
extern "C" {
pub fn FSPXI_CardNorDirectRead_4xIO(
serviceHandle: Handle,
commandId: u8_,
address: u32_,
size: u32_,
output: *mut ::libc::c_void,
) -> Result;
}
extern "C" {
pub fn FSPXI_CardNorDirectCpuWriteWithoutVerify(
serviceHandle: Handle,
address: u32_,
size: u32_,
input: *const ::libc::c_void,
) -> Result;
}
extern "C" {
pub fn FSPXI_CardNorDirectSectorEraseWithoutVerify(
serviceHandle: Handle,
address: u32_,
) -> Result;
}
extern "C" {
pub fn FSPXI_GetProductInfo(
serviceHandle: Handle,
info: *mut FS_ProductInfo,
archive: FSPXI_Archive,
) -> Result;
}
extern "C" {
pub fn FSPXI_SetCardSpiBaudrate(serviceHandle: Handle, baudRate: FS_CardSpiBaudRate) -> Result;
}
extern "C" {
pub fn FSPXI_SetCardSpiBusMode(serviceHandle: Handle, busMode: FS_CardSpiBusMode) -> Result;
}
extern "C" {
pub fn FSPXI_SendInitializeInfoTo9(serviceHandle: Handle, unk: u8_) -> Result;
}
extern "C" {
pub fn FSPXI_CreateExtSaveData(serviceHandle: Handle, info: FS_ExtSaveDataInfo) -> Result;
}
extern "C" {
pub fn FSPXI_DeleteExtSaveData(serviceHandle: Handle, info: FS_ExtSaveDataInfo) -> Result;
}
extern "C" {
pub fn FSPXI_EnumerateExtSaveData(
serviceHandle: Handle,
idsWritten: *mut u32_,
idsSize: u32_,
mediaType: FS_MediaType,
idSize: u32_,
shared: bool,
ids: *mut u8_,
) -> Result;
}
extern "C" {
pub fn FSPXI_GetSpecialContentIndex(
serviceHandle: Handle,
index: *mut u16_,
mediaType: FS_MediaType,
programId: u64_,
type_: FS_SpecialContentType,
) -> Result;
}
extern "C" {
pub fn FSPXI_GetLegacyRomHeader(
serviceHandle: Handle,
mediaType: FS_MediaType,
programId: u64_,
header: *mut ::libc::c_void,
) -> Result;
}
extern "C" {
pub fn FSPXI_GetLegacyBannerData(
serviceHandle: Handle,
mediaType: FS_MediaType,
programId: u64_,
banner: *mut ::libc::c_void,
unk: u8_,
) -> Result;
}
extern "C" {
pub fn FSPXI_FormatCardNorDevice(serviceHandle: Handle, unk: u32_) -> Result;
}
extern "C" {
pub fn FSPXI_DeleteSdmcRoot(serviceHandle: Handle) -> Result;
}
extern "C" {
pub fn FSPXI_DeleteAllExtSaveDataOnNand(serviceHandle: Handle) -> Result;
}
extern "C" {
pub fn FSPXI_InitializeCtrFilesystem(serviceHandle: Handle) -> Result;
}
extern "C" {
pub fn FSPXI_CreateSeed(serviceHandle: Handle) -> Result;
}
extern "C" {
pub fn FSPXI_GetSdmcCtrRootPath(serviceHandle: Handle, out: *mut u16_, length: u32_) -> Result;
}
extern "C" {
pub fn FSPXI_GetArchiveResource(
serviceHandle: Handle,
archiveResource: *mut FS_ArchiveResource,
mediaType: FS_SystemMediaType,
) -> Result;
}
extern "C" {
pub fn FSPXI_ExportIntegrityVerificationSeed(
serviceHandle: Handle,
seed: *mut FS_IntegrityVerificationSeed,
) -> Result;
}
extern "C" {
pub fn FSPXI_ImportIntegrityVerificationSeed(
serviceHandle: Handle,
seed: *const FS_IntegrityVerificationSeed,
) -> Result;
}
extern "C" {
pub fn FSPXI_GetLegacySubBannerData(
serviceHandle: Handle,
bannerSize: u32_,
mediaType: FS_MediaType,
programId: u64_,
banner: *mut ::libc::c_void,
) -> Result;
}
extern "C" {
pub fn FSPXI_GenerateRandomBytes(
serviceHandle: Handle,
buffer: *mut ::libc::c_void,
size: u32_,
) -> Result;
}
extern "C" {
pub fn FSPXI_GetFileLastModified(
serviceHandle: Handle,
archive: FSPXI_Archive,
out: *mut u64_,
path: *const u16_,
size: u32_,
) -> Result;
}
extern "C" {
pub fn FSPXI_ReadSpecialFile(
serviceHandle: Handle,
bytesRead: *mut u32_,
fileOffset: u64_,
size: u32_,
data: *mut ::libc::c_void,
) -> Result;
}
extern "C" {
pub fn FSPXI_GetSpecialFileSize(serviceHandle: Handle, fileSize: *mut u64_) -> Result;
}
extern "C" {
pub fn FSPXI_StartDeviceMoveAsSource(
serviceHandle: Handle,
context: *mut FS_DeviceMoveContext,
) -> Result;
}
extern "C" {
pub fn FSPXI_StartDeviceMoveAsDestination(
serviceHandle: Handle,
context: FS_DeviceMoveContext,
clear: bool,
) -> Result;
}
extern "C" {
pub fn FSPXI_ReadFileSHA256(
serviceHandle: Handle,
file: FSPXI_File,
bytesRead: *mut u32_,
offset: u64_,
readBuffer: *mut ::libc::c_void,
readBufferSize: u32_,
hashtable: *mut ::libc::c_void,
hashtableSize: u32_,
unk: u32_,
) -> Result;
}
extern "C" {
pub fn FSPXI_WriteFileSHA256(
serviceHandle: Handle,
file: FSPXI_File,
bytesWritten: *mut u32_,
offset: u64_,
writeBuffer: *const ::libc::c_void,
writeBufferSize: u32_,
hashtable: *mut ::libc::c_void,
hashtableSize: u32_,
unk1: u32_,
unk2: u32_,
) -> Result;
}
extern "C" {
pub fn FSPXI_SetCtrCardLatencyParameter(serviceHandle: Handle, latency: u64_) -> Result;
}
extern "C" {
pub fn FSPXI_SetPriority(serviceHandle: Handle, priority: u32_) -> Result;
}
extern "C" {
pub fn FSPXI_SwitchCleanupInvalidSaveData(serviceHandle: Handle, enable: bool) -> Result;
}
extern "C" {
pub fn FSPXI_EnumerateSystemSaveData(
serviceHandle: Handle,
idsWritten: *mut u32_,
idsSize: u32_,
ids: *mut u32_,
) -> Result;
}
extern "C" {
pub fn FSPXI_ReadNandReport(
serviceHandle: Handle,
buffer: *mut ::libc::c_void,
size: u32_,
unk: u32_,
) -> Result;
}
extern "C" {
pub fn FSPXI_Unknown0x56(
serviceHandle: Handle,
out: *mut u32_,
archive: FS_Archive,
path: FS_Path,
) -> Result;
}
extern "C" {
pub fn fsRegInit() -> Result;
}
extern "C" {
pub fn fsRegExit();
}
extern "C" {
pub fn fsRegGetSessionHandle() -> *mut Handle;
}
extern "C" {
pub fn FSREG_Register(
pid: u32_,
programHandle: u64_,
programInfo: *const FS_ProgramInfo,
storageInfo: *const ExHeader_Arm11StorageInfo,
) -> Result;
}
extern "C" {
pub fn FSREG_Unregister(pid: u32_) -> Result;
}
extern "C" {
pub fn FSREG_GetProgramInfo(
exheaderInfos: *mut ExHeader_Info,
maxNumEntries: u32_,
programHandle: u64_,
) -> Result;
}
extern "C" {
pub fn FSREG_LoadProgram(
programHandle: *mut u64_,
programInfo: *const FS_ProgramInfo,
) -> Result;
}
extern "C" {
pub fn FSREG_UnloadProgram(programHandle: u64_) -> Result;
}
extern "C" {
pub fn FSREG_CheckHostLoadId(programHandle: u64_) -> Result;
}
#[repr(C)]
#[repr(align(1))]
pub struct MiiData {
pub _bindgen_opaque_blob: [u8; 92usize],
}
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone)]
pub struct MiiData__bindgen_ty_1 {
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
}
impl MiiData__bindgen_ty_1 {
#[inline]
pub fn allow_copying(&self) -> bool {
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
}
#[inline]
pub fn set_allow_copying(&mut self, val: bool) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(0usize, 1u8, val as u64)
}
}
#[inline]
pub fn is_private_name(&self) -> bool {
unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 1u8) as u8) }
}
#[inline]
pub fn set_is_private_name(&mut self, val: bool) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(1usize, 1u8, val as u64)
}
}
#[inline]
pub fn region_lock(&self) -> u8_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(2usize, 2u8) as u8) }
}
#[inline]
pub fn set_region_lock(&mut self, val: u8_) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(2usize, 2u8, val as u64)
}
}
#[inline]
pub fn char_set(&self) -> u8_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 2u8) as u8) }
}
#[inline]
pub fn set_char_set(&mut self, val: u8_) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(4usize, 2u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(
allow_copying: bool,
is_private_name: bool,
region_lock: u8_,
char_set: u8_,
) -> __BindgenBitfieldUnit<[u8; 1usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let allow_copying: u8 = unsafe { ::core::mem::transmute(allow_copying) };
allow_copying as u64
});
__bindgen_bitfield_unit.set(1usize, 1u8, {
let is_private_name: u8 = unsafe { ::core::mem::transmute(is_private_name) };
is_private_name as u64
});
__bindgen_bitfield_unit.set(2usize, 2u8, {
let region_lock: u8 = unsafe { ::core::mem::transmute(region_lock) };
region_lock as u64
});
__bindgen_bitfield_unit.set(4usize, 2u8, {
let char_set: u8 = unsafe { ::core::mem::transmute(char_set) };
char_set as u64
});
__bindgen_bitfield_unit
}
}
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone)]
pub struct MiiData__bindgen_ty_2 {
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
}
impl MiiData__bindgen_ty_2 {
#[inline]
pub fn page_index(&self) -> u8_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u8) }
}
#[inline]
pub fn set_page_index(&mut self, val: u8_) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(0usize, 4u8, val as u64)
}
}
#[inline]
pub fn slot_index(&self) -> u8_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) }
}
#[inline]
pub fn set_slot_index(&mut self, val: u8_) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(4usize, 4u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(page_index: u8_, slot_index: u8_) -> __BindgenBitfieldUnit<[u8; 1usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 4u8, {
let page_index: u8 = unsafe { ::core::mem::transmute(page_index) };
page_index as u64
});
__bindgen_bitfield_unit.set(4usize, 4u8, {
let slot_index: u8 = unsafe { ::core::mem::transmute(slot_index) };
slot_index as u64
});
__bindgen_bitfield_unit
}
}
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone)]
pub struct MiiData__bindgen_ty_3 {
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
}
impl MiiData__bindgen_ty_3 {
#[inline]
pub fn unknown0(&self) -> u8_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u8) }
}
#[inline]
pub fn set_unknown0(&mut self, val: u8_) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(0usize, 4u8, val as u64)
}
}
#[inline]
pub fn origin_console(&self) -> u8_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 3u8) as u8) }
}
#[inline]
pub fn set_origin_console(&mut self, val: u8_) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(4usize, 3u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(
unknown0: u8_,
origin_console: u8_,
) -> __BindgenBitfieldUnit<[u8; 1usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 4u8, {
let unknown0: u8 = unsafe { ::core::mem::transmute(unknown0) };
unknown0 as u64
});
__bindgen_bitfield_unit.set(4usize, 3u8, {
let origin_console: u8 = unsafe { ::core::mem::transmute(origin_console) };
origin_console as u64
});
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[repr(align(2))]
#[derive(Debug, Default, Copy, Clone)]
pub struct MiiData__bindgen_ty_4 {
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>,
}
impl MiiData__bindgen_ty_4 {
#[inline]
pub fn sex(&self) -> bool {
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
}
#[inline]
pub fn set_sex(&mut self, val: bool) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(0usize, 1u8, val as u64)
}
}
#[inline]
pub fn bday_month(&self) -> u16_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 4u8) as u16) }
}
#[inline]
pub fn set_bday_month(&mut self, val: u16_) {
unsafe {
let val: u16 = ::core::mem::transmute(val);
self._bitfield_1.set(1usize, 4u8, val as u64)
}
}
#[inline]
pub fn bday_day(&self) -> u16_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 5u8) as u16) }
}
#[inline]
pub fn set_bday_day(&mut self, val: u16_) {
unsafe {
let val: u16 = ::core::mem::transmute(val);
self._bitfield_1.set(5usize, 5u8, val as u64)
}
}
#[inline]
pub fn shirt_color(&self) -> u16_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 4u8) as u16) }
}
#[inline]
pub fn set_shirt_color(&mut self, val: u16_) {
unsafe {
let val: u16 = ::core::mem::transmute(val);
self._bitfield_1.set(10usize, 4u8, val as u64)
}
}
#[inline]
pub fn favorite(&self) -> bool {
unsafe { ::core::mem::transmute(self._bitfield_1.get(14usize, 1u8) as u8) }
}
#[inline]
pub fn set_favorite(&mut self, val: bool) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(14usize, 1u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(
sex: bool,
bday_month: u16_,
bday_day: u16_,
shirt_color: u16_,
favorite: bool,
) -> __BindgenBitfieldUnit<[u8; 2usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let sex: u8 = unsafe { ::core::mem::transmute(sex) };
sex as u64
});
__bindgen_bitfield_unit.set(1usize, 4u8, {
let bday_month: u16 = unsafe { ::core::mem::transmute(bday_month) };
bday_month as u64
});
__bindgen_bitfield_unit.set(5usize, 5u8, {
let bday_day: u16 = unsafe { ::core::mem::transmute(bday_day) };
bday_day as u64
});
__bindgen_bitfield_unit.set(10usize, 4u8, {
let shirt_color: u16 = unsafe { ::core::mem::transmute(shirt_color) };
shirt_color as u64
});
__bindgen_bitfield_unit.set(14usize, 1u8, {
let favorite: u8 = unsafe { ::core::mem::transmute(favorite) };
favorite as u64
});
__bindgen_bitfield_unit
}
}
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone)]
pub struct MiiData__bindgen_ty_5 {
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
}
impl MiiData__bindgen_ty_5 {
#[inline]
pub fn disable_sharing(&self) -> bool {
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
}
#[inline]
pub fn set_disable_sharing(&mut self, val: bool) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(0usize, 1u8, val as u64)
}
}
#[inline]
pub fn shape(&self) -> u8_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 4u8) as u8) }
}
#[inline]
pub fn set_shape(&mut self, val: u8_) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(1usize, 4u8, val as u64)
}
}
#[inline]
pub fn skinColor(&self) -> u8_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 3u8) as u8) }
}
#[inline]
pub fn set_skinColor(&mut self, val: u8_) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(5usize, 3u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(
disable_sharing: bool,
shape: u8_,
skinColor: u8_,
) -> __BindgenBitfieldUnit<[u8; 1usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let disable_sharing: u8 = unsafe { ::core::mem::transmute(disable_sharing) };
disable_sharing as u64
});
__bindgen_bitfield_unit.set(1usize, 4u8, {
let shape: u8 = unsafe { ::core::mem::transmute(shape) };
shape as u64
});
__bindgen_bitfield_unit.set(5usize, 3u8, {
let skinColor: u8 = unsafe { ::core::mem::transmute(skinColor) };
skinColor as u64
});
__bindgen_bitfield_unit
}
}
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone)]
pub struct MiiData__bindgen_ty_6 {
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
}
impl MiiData__bindgen_ty_6 {
#[inline]
pub fn wrinkles(&self) -> u8_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u8) }
}
#[inline]
pub fn set_wrinkles(&mut self, val: u8_) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(0usize, 4u8, val as u64)
}
}
#[inline]
pub fn makeup(&self) -> u8_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 4u8) as u8) }
}
#[inline]
pub fn set_makeup(&mut self, val: u8_) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(4usize, 4u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(wrinkles: u8_, makeup: u8_) -> __BindgenBitfieldUnit<[u8; 1usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 4u8, {
let wrinkles: u8 = unsafe { ::core::mem::transmute(wrinkles) };
wrinkles as u64
});
__bindgen_bitfield_unit.set(4usize, 4u8, {
let makeup: u8 = unsafe { ::core::mem::transmute(makeup) };
makeup as u64
});
__bindgen_bitfield_unit
}
}
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone)]
pub struct MiiData__bindgen_ty_7 {
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 1usize]>,
}
impl MiiData__bindgen_ty_7 {
#[inline]
pub fn color(&self) -> u8_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 3u8) as u8) }
}
#[inline]
pub fn set_color(&mut self, val: u8_) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(0usize, 3u8, val as u64)
}
}
#[inline]
pub fn flip(&self) -> bool {
unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 1u8) as u8) }
}
#[inline]
pub fn set_flip(&mut self, val: bool) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(3usize, 1u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(color: u8_, flip: bool) -> __BindgenBitfieldUnit<[u8; 1usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 1usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 3u8, {
let color: u8 = unsafe { ::core::mem::transmute(color) };
color as u64
});
__bindgen_bitfield_unit.set(3usize, 1u8, {
let flip: u8 = unsafe { ::core::mem::transmute(flip) };
flip as u64
});
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[repr(align(4))]
#[derive(Debug, Default, Copy, Clone)]
pub struct MiiData__bindgen_ty_8 {
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
}
impl MiiData__bindgen_ty_8 {
#[inline]
pub fn style(&self) -> u32_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 6u8) as u32) }
}
#[inline]
pub fn set_style(&mut self, val: u32_) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(0usize, 6u8, val as u64)
}
}
#[inline]
pub fn color(&self) -> u32_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 3u8) as u32) }
}
#[inline]
pub fn set_color(&mut self, val: u32_) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(6usize, 3u8, val as u64)
}
}
#[inline]
pub fn scale(&self) -> u32_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 4u8) as u32) }
}
#[inline]
pub fn set_scale(&mut self, val: u32_) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(9usize, 4u8, val as u64)
}
}
#[inline]
pub fn yscale(&self) -> u32_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 3u8) as u32) }
}
#[inline]
pub fn set_yscale(&mut self, val: u32_) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(13usize, 3u8, val as u64)
}
}
#[inline]
pub fn rotation(&self) -> u32_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 5u8) as u32) }
}
#[inline]
pub fn set_rotation(&mut self, val: u32_) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(16usize, 5u8, val as u64)
}
}
#[inline]
pub fn xspacing(&self) -> u32_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(21usize, 4u8) as u32) }
}
#[inline]
pub fn set_xspacing(&mut self, val: u32_) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(21usize, 4u8, val as u64)
}
}
#[inline]
pub fn yposition(&self) -> u32_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(25usize, 5u8) as u32) }
}
#[inline]
pub fn set_yposition(&mut self, val: u32_) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(25usize, 5u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(
style: u32_,
color: u32_,
scale: u32_,
yscale: u32_,
rotation: u32_,
xspacing: u32_,
yposition: u32_,
) -> __BindgenBitfieldUnit<[u8; 4usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 6u8, {
let style: u32 = unsafe { ::core::mem::transmute(style) };
style as u64
});
__bindgen_bitfield_unit.set(6usize, 3u8, {
let color: u32 = unsafe { ::core::mem::transmute(color) };
color as u64
});
__bindgen_bitfield_unit.set(9usize, 4u8, {
let scale: u32 = unsafe { ::core::mem::transmute(scale) };
scale as u64
});
__bindgen_bitfield_unit.set(13usize, 3u8, {
let yscale: u32 = unsafe { ::core::mem::transmute(yscale) };
yscale as u64
});
__bindgen_bitfield_unit.set(16usize, 5u8, {
let rotation: u32 = unsafe { ::core::mem::transmute(rotation) };
rotation as u64
});
__bindgen_bitfield_unit.set(21usize, 4u8, {
let xspacing: u32 = unsafe { ::core::mem::transmute(xspacing) };
xspacing as u64
});
__bindgen_bitfield_unit.set(25usize, 5u8, {
let yposition: u32 = unsafe { ::core::mem::transmute(yposition) };
yposition as u64
});
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[repr(align(4))]
#[derive(Debug, Default, Copy, Clone)]
pub struct MiiData__bindgen_ty_9 {
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 4usize]>,
}
impl MiiData__bindgen_ty_9 {
#[inline]
pub fn style(&self) -> u32_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 5u8) as u32) }
}
#[inline]
pub fn set_style(&mut self, val: u32_) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(0usize, 5u8, val as u64)
}
}
#[inline]
pub fn color(&self) -> u32_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 3u8) as u32) }
}
#[inline]
pub fn set_color(&mut self, val: u32_) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(5usize, 3u8, val as u64)
}
}
#[inline]
pub fn scale(&self) -> u32_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 4u8) as u32) }
}
#[inline]
pub fn set_scale(&mut self, val: u32_) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(8usize, 4u8, val as u64)
}
}
#[inline]
pub fn yscale(&self) -> u32_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(12usize, 3u8) as u32) }
}
#[inline]
pub fn set_yscale(&mut self, val: u32_) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(12usize, 3u8, val as u64)
}
}
#[inline]
pub fn pad(&self) -> u32_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(15usize, 1u8) as u32) }
}
#[inline]
pub fn set_pad(&mut self, val: u32_) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(15usize, 1u8, val as u64)
}
}
#[inline]
pub fn rotation(&self) -> u32_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(16usize, 5u8) as u32) }
}
#[inline]
pub fn set_rotation(&mut self, val: u32_) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(16usize, 5u8, val as u64)
}
}
#[inline]
pub fn xspacing(&self) -> u32_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(21usize, 4u8) as u32) }
}
#[inline]
pub fn set_xspacing(&mut self, val: u32_) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(21usize, 4u8, val as u64)
}
}
#[inline]
pub fn yposition(&self) -> u32_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(25usize, 5u8) as u32) }
}
#[inline]
pub fn set_yposition(&mut self, val: u32_) {
unsafe {
let val: u32 = ::core::mem::transmute(val);
self._bitfield_1.set(25usize, 5u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(
style: u32_,
color: u32_,
scale: u32_,
yscale: u32_,
pad: u32_,
rotation: u32_,
xspacing: u32_,
yposition: u32_,
) -> __BindgenBitfieldUnit<[u8; 4usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 4usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 5u8, {
let style: u32 = unsafe { ::core::mem::transmute(style) };
style as u64
});
__bindgen_bitfield_unit.set(5usize, 3u8, {
let color: u32 = unsafe { ::core::mem::transmute(color) };
color as u64
});
__bindgen_bitfield_unit.set(8usize, 4u8, {
let scale: u32 = unsafe { ::core::mem::transmute(scale) };
scale as u64
});
__bindgen_bitfield_unit.set(12usize, 3u8, {
let yscale: u32 = unsafe { ::core::mem::transmute(yscale) };
yscale as u64
});
__bindgen_bitfield_unit.set(15usize, 1u8, {
let pad: u32 = unsafe { ::core::mem::transmute(pad) };
pad as u64
});
__bindgen_bitfield_unit.set(16usize, 5u8, {
let rotation: u32 = unsafe { ::core::mem::transmute(rotation) };
rotation as u64
});
__bindgen_bitfield_unit.set(21usize, 4u8, {
let xspacing: u32 = unsafe { ::core::mem::transmute(xspacing) };
xspacing as u64
});
__bindgen_bitfield_unit.set(25usize, 5u8, {
let yposition: u32 = unsafe { ::core::mem::transmute(yposition) };
yposition as u64
});
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[repr(align(2))]
#[derive(Debug, Default, Copy, Clone)]
pub struct MiiData__bindgen_ty_10 {
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>,
}
impl MiiData__bindgen_ty_10 {
#[inline]
pub fn style(&self) -> u16_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 5u8) as u16) }
}
#[inline]
pub fn set_style(&mut self, val: u16_) {
unsafe {
let val: u16 = ::core::mem::transmute(val);
self._bitfield_1.set(0usize, 5u8, val as u64)
}
}
#[inline]
pub fn scale(&self) -> u16_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 4u8) as u16) }
}
#[inline]
pub fn set_scale(&mut self, val: u16_) {
unsafe {
let val: u16 = ::core::mem::transmute(val);
self._bitfield_1.set(5usize, 4u8, val as u64)
}
}
#[inline]
pub fn yposition(&self) -> u16_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 5u8) as u16) }
}
#[inline]
pub fn set_yposition(&mut self, val: u16_) {
unsafe {
let val: u16 = ::core::mem::transmute(val);
self._bitfield_1.set(9usize, 5u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(
style: u16_,
scale: u16_,
yposition: u16_,
) -> __BindgenBitfieldUnit<[u8; 2usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 5u8, {
let style: u16 = unsafe { ::core::mem::transmute(style) };
style as u64
});
__bindgen_bitfield_unit.set(5usize, 4u8, {
let scale: u16 = unsafe { ::core::mem::transmute(scale) };
scale as u64
});
__bindgen_bitfield_unit.set(9usize, 5u8, {
let yposition: u16 = unsafe { ::core::mem::transmute(yposition) };
yposition as u64
});
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[repr(align(2))]
#[derive(Debug, Default, Copy, Clone)]
pub struct MiiData__bindgen_ty_11 {
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>,
}
impl MiiData__bindgen_ty_11 {
#[inline]
pub fn style(&self) -> u16_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 6u8) as u16) }
}
#[inline]
pub fn set_style(&mut self, val: u16_) {
unsafe {
let val: u16 = ::core::mem::transmute(val);
self._bitfield_1.set(0usize, 6u8, val as u64)
}
}
#[inline]
pub fn color(&self) -> u16_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 3u8) as u16) }
}
#[inline]
pub fn set_color(&mut self, val: u16_) {
unsafe {
let val: u16 = ::core::mem::transmute(val);
self._bitfield_1.set(6usize, 3u8, val as u64)
}
}
#[inline]
pub fn scale(&self) -> u16_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(9usize, 4u8) as u16) }
}
#[inline]
pub fn set_scale(&mut self, val: u16_) {
unsafe {
let val: u16 = ::core::mem::transmute(val);
self._bitfield_1.set(9usize, 4u8, val as u64)
}
}
#[inline]
pub fn yscale(&self) -> u16_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(13usize, 3u8) as u16) }
}
#[inline]
pub fn set_yscale(&mut self, val: u16_) {
unsafe {
let val: u16 = ::core::mem::transmute(val);
self._bitfield_1.set(13usize, 3u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(
style: u16_,
color: u16_,
scale: u16_,
yscale: u16_,
) -> __BindgenBitfieldUnit<[u8; 2usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 6u8, {
let style: u16 = unsafe { ::core::mem::transmute(style) };
style as u64
});
__bindgen_bitfield_unit.set(6usize, 3u8, {
let color: u16 = unsafe { ::core::mem::transmute(color) };
color as u64
});
__bindgen_bitfield_unit.set(9usize, 4u8, {
let scale: u16 = unsafe { ::core::mem::transmute(scale) };
scale as u64
});
__bindgen_bitfield_unit.set(13usize, 3u8, {
let yscale: u16 = unsafe { ::core::mem::transmute(yscale) };
yscale as u64
});
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[repr(align(2))]
#[derive(Debug, Default, Copy, Clone)]
pub struct MiiData__bindgen_ty_12 {
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>,
}
impl MiiData__bindgen_ty_12 {
#[inline]
pub fn mouth_yposition(&self) -> u16_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 5u8) as u16) }
}
#[inline]
pub fn set_mouth_yposition(&mut self, val: u16_) {
unsafe {
let val: u16 = ::core::mem::transmute(val);
self._bitfield_1.set(0usize, 5u8, val as u64)
}
}
#[inline]
pub fn mustach_style(&self) -> u16_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(5usize, 3u8) as u16) }
}
#[inline]
pub fn set_mustach_style(&mut self, val: u16_) {
unsafe {
let val: u16 = ::core::mem::transmute(val);
self._bitfield_1.set(5usize, 3u8, val as u64)
}
}
#[inline]
pub fn pad(&self) -> u16_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(8usize, 2u8) as u16) }
}
#[inline]
pub fn set_pad(&mut self, val: u16_) {
unsafe {
let val: u16 = ::core::mem::transmute(val);
self._bitfield_1.set(8usize, 2u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(
mouth_yposition: u16_,
mustach_style: u16_,
pad: u16_,
) -> __BindgenBitfieldUnit<[u8; 2usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 5u8, {
let mouth_yposition: u16 = unsafe { ::core::mem::transmute(mouth_yposition) };
mouth_yposition as u64
});
__bindgen_bitfield_unit.set(5usize, 3u8, {
let mustach_style: u16 = unsafe { ::core::mem::transmute(mustach_style) };
mustach_style as u64
});
__bindgen_bitfield_unit.set(8usize, 2u8, {
let pad: u16 = unsafe { ::core::mem::transmute(pad) };
pad as u64
});
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[repr(align(2))]
#[derive(Debug, Default, Copy, Clone)]
pub struct MiiData__bindgen_ty_13 {
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>,
}
impl MiiData__bindgen_ty_13 {
#[inline]
pub fn style(&self) -> u16_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 3u8) as u16) }
}
#[inline]
pub fn set_style(&mut self, val: u16_) {
unsafe {
let val: u16 = ::core::mem::transmute(val);
self._bitfield_1.set(0usize, 3u8, val as u64)
}
}
#[inline]
pub fn color(&self) -> u16_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(3usize, 3u8) as u16) }
}
#[inline]
pub fn set_color(&mut self, val: u16_) {
unsafe {
let val: u16 = ::core::mem::transmute(val);
self._bitfield_1.set(3usize, 3u8, val as u64)
}
}
#[inline]
pub fn scale(&self) -> u16_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 4u8) as u16) }
}
#[inline]
pub fn set_scale(&mut self, val: u16_) {
unsafe {
let val: u16 = ::core::mem::transmute(val);
self._bitfield_1.set(6usize, 4u8, val as u64)
}
}
#[inline]
pub fn ypos(&self) -> u16_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(10usize, 5u8) as u16) }
}
#[inline]
pub fn set_ypos(&mut self, val: u16_) {
unsafe {
let val: u16 = ::core::mem::transmute(val);
self._bitfield_1.set(10usize, 5u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(
style: u16_,
color: u16_,
scale: u16_,
ypos: u16_,
) -> __BindgenBitfieldUnit<[u8; 2usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 3u8, {
let style: u16 = unsafe { ::core::mem::transmute(style) };
style as u64
});
__bindgen_bitfield_unit.set(3usize, 3u8, {
let color: u16 = unsafe { ::core::mem::transmute(color) };
color as u64
});
__bindgen_bitfield_unit.set(6usize, 4u8, {
let scale: u16 = unsafe { ::core::mem::transmute(scale) };
scale as u64
});
__bindgen_bitfield_unit.set(10usize, 5u8, {
let ypos: u16 = unsafe { ::core::mem::transmute(ypos) };
ypos as u64
});
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[repr(align(2))]
#[derive(Debug, Default, Copy, Clone)]
pub struct MiiData__bindgen_ty_14 {
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>,
}
impl MiiData__bindgen_ty_14 {
#[inline]
pub fn style(&self) -> u16_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 4u8) as u16) }
}
#[inline]
pub fn set_style(&mut self, val: u16_) {
unsafe {
let val: u16 = ::core::mem::transmute(val);
self._bitfield_1.set(0usize, 4u8, val as u64)
}
}
#[inline]
pub fn color(&self) -> u16_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(4usize, 3u8) as u16) }
}
#[inline]
pub fn set_color(&mut self, val: u16_) {
unsafe {
let val: u16 = ::core::mem::transmute(val);
self._bitfield_1.set(4usize, 3u8, val as u64)
}
}
#[inline]
pub fn scale(&self) -> u16_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(7usize, 4u8) as u16) }
}
#[inline]
pub fn set_scale(&mut self, val: u16_) {
unsafe {
let val: u16 = ::core::mem::transmute(val);
self._bitfield_1.set(7usize, 4u8, val as u64)
}
}
#[inline]
pub fn ypos(&self) -> u16_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 5u8) as u16) }
}
#[inline]
pub fn set_ypos(&mut self, val: u16_) {
unsafe {
let val: u16 = ::core::mem::transmute(val);
self._bitfield_1.set(11usize, 5u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(
style: u16_,
color: u16_,
scale: u16_,
ypos: u16_,
) -> __BindgenBitfieldUnit<[u8; 2usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 4u8, {
let style: u16 = unsafe { ::core::mem::transmute(style) };
style as u64
});
__bindgen_bitfield_unit.set(4usize, 3u8, {
let color: u16 = unsafe { ::core::mem::transmute(color) };
color as u64
});
__bindgen_bitfield_unit.set(7usize, 4u8, {
let scale: u16 = unsafe { ::core::mem::transmute(scale) };
scale as u64
});
__bindgen_bitfield_unit.set(11usize, 5u8, {
let ypos: u16 = unsafe { ::core::mem::transmute(ypos) };
ypos as u64
});
__bindgen_bitfield_unit
}
}
#[repr(C)]
#[repr(align(2))]
#[derive(Debug, Default, Copy, Clone)]
pub struct MiiData__bindgen_ty_15 {
pub _bitfield_align_1: [u8; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 2usize]>,
}
impl MiiData__bindgen_ty_15 {
#[inline]
pub fn enable(&self) -> bool {
unsafe { ::core::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u8) }
}
#[inline]
pub fn set_enable(&mut self, val: bool) {
unsafe {
let val: u8 = ::core::mem::transmute(val);
self._bitfield_1.set(0usize, 1u8, val as u64)
}
}
#[inline]
pub fn scale(&self) -> u16_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(1usize, 5u8) as u16) }
}
#[inline]
pub fn set_scale(&mut self, val: u16_) {
unsafe {
let val: u16 = ::core::mem::transmute(val);
self._bitfield_1.set(1usize, 5u8, val as u64)
}
}
#[inline]
pub fn xpos(&self) -> u16_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(6usize, 5u8) as u16) }
}
#[inline]
pub fn set_xpos(&mut self, val: u16_) {
unsafe {
let val: u16 = ::core::mem::transmute(val);
self._bitfield_1.set(6usize, 5u8, val as u64)
}
}
#[inline]
pub fn ypos(&self) -> u16_ {
unsafe { ::core::mem::transmute(self._bitfield_1.get(11usize, 5u8) as u16) }
}
#[inline]
pub fn set_ypos(&mut self, val: u16_) {
unsafe {
let val: u16 = ::core::mem::transmute(val);
self._bitfield_1.set(11usize, 5u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(
enable: bool,
scale: u16_,
xpos: u16_,
ypos: u16_,
) -> __BindgenBitfieldUnit<[u8; 2usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 2usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let enable: u8 = unsafe { ::core::mem::transmute(enable) };
enable as u64
});
__bindgen_bitfield_unit.set(1usize, 5u8, {
let scale: u16 = unsafe { ::core::mem::transmute(scale) };
scale as u64
});
__bindgen_bitfield_unit.set(6usize, 5u8, {
let xpos: u16 = unsafe { ::core::mem::transmute(xpos) };
xpos as u64
});
__bindgen_bitfield_unit.set(11usize, 5u8, {
let ypos: u16 = unsafe { ::core::mem::transmute(ypos) };
ypos as u64
});
__bindgen_bitfield_unit
}
}
impl Default for MiiData {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone)]
pub struct FriendKey {
pub principalId: u32_,
pub padding: u32_,
pub localFriendCode: u64_,
}
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone)]
pub struct TitleData {
pub tid: u64_,
pub version: u32_,
pub unk: u32_,
}
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone)]
pub struct FriendProfile {
pub region: u8_,
pub country: u8_,
pub area: u8_,
pub language: u8_,
pub platform: u8_,
pub padding: u32_,
}
#[repr(C, packed)]
#[derive(Copy, Clone)]
pub struct GameDescription {
pub data: TitleData,
pub desc: [u16_; 128usize],
}
impl Default for GameDescription {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C, packed)]
#[derive(Debug, Default, Copy, Clone)]
pub struct NotificationEvent {
pub type_: u8_,
pub padding3: [u8_; 3usize],
pub padding: u32_,
pub key: FriendKey,
}
pub const USER_WENT_ONLINE: NotificationTypes = 1;
pub const USER_WENT_OFFLINE: NotificationTypes = 2;
pub const FRIEND_WENT_ONLINE: NotificationTypes = 3;
pub const FRIEND_UPDATED_PRESENCE: NotificationTypes = 4;
pub const FRIEND_UPDATED_MII: NotificationTypes = 5;
pub const FRIEND_UPDATED_PROFILE: NotificationTypes = 6;
pub const FRIEND_WENT_OFFLINE: NotificationTypes = 7;
pub const FRIEND_REGISTERED_USER: NotificationTypes = 8;
pub const FRIEND_SENT_INVITATION: NotificationTypes = 9;
pub type NotificationTypes = ::libc::c_uint;
extern "C" {
pub fn frdInit() -> Result;
}
extern "C" {
pub fn frdExit();
}
extern "C" {
pub fn frdGetSessionHandle() -> *mut Handle;
}
extern "C" {
pub fn FRDU_HasLoggedIn(state: *mut bool) -> Result;
}
extern "C" {
pub fn FRDU_IsOnline(state: *mut bool) -> Result;
}
extern "C" {
pub fn FRD_Logout() -> Result;
}
extern "C" {
pub fn FRD_Login(event: Handle) -> Result;
}
extern "C" {
pub fn FRD_GetMyFriendKey(key: *mut FriendKey) -> Result;
}
extern "C" {
pub fn FRD_GetMyPreference(
isPublicMode: *mut bool,
isShowGameName: *mut bool,
isShowPlayedGame: *mut bool,
) -> Result;
}
extern "C" {
pub fn FRD_GetMyProfile(profile: *mut FriendProfile) -> Result;
}
extern "C" {
pub fn FRD_GetMyScreenName(name: *mut ::libc::c_char, max_size: size_t) -> Result;
}
extern "C" {
pub fn FRD_GetMyMii(mii: *mut MiiData) -> Result;
}
extern "C" {
pub fn FRD_GetMyPlayingGame(titleId: *mut u64_) -> Result;
}
extern "C" {
pub fn FRD_GetMyFavoriteGame(titleId: *mut u64_) -> Result;
}
extern "C" {
pub fn FRD_GetMyComment(comment: *mut ::libc::c_char, max_size: size_t) -> Result;
}
extern "C" {
pub fn FRD_GetFriendKeyList(
friendKeyList: *mut FriendKey,
num: *mut u32_,
offset: u32_,
size: u32_,
) -> Result;
}
extern "C" {
pub fn FRD_GetFriendMii(
miiDataList: *mut MiiData,
friendKeyList: *const FriendKey,
size: size_t,
) -> Result;
}
extern "C" {
pub fn FRD_GetFriendProfile(
profile: *mut FriendProfile,
friendKeyList: *const FriendKey,
size: size_t,
) -> Result;
}
extern "C" {
pub fn FRD_GetFriendPlayingGame(
desc: *mut GameDescription,
friendKeyList: *const FriendKey,
size: size_t,
) -> Result;
}
extern "C" {
pub fn FRD_GetFriendFavouriteGame(
desc: *mut GameDescription,
friendKeyList: *const FriendKey,
count: u32_,
) -> Result;
}
extern "C" {
pub fn FRD_IsInFriendList(friendKeyList: *mut FriendKey, isFromList: *mut bool) -> Result;
}
extern "C" {
pub fn FRD_UpdateGameModeDescription(desc: *const ::libc::c_char) -> Result;
}
extern "C" {
pub fn FRD_AttachToEventNotification(event: Handle) -> Result;
}
extern "C" {
pub fn FRD_GetEventNotification(
event: *mut NotificationEvent,
count: u32_,
recievedNotifCount: *mut u32_,
) -> Result;
}
extern "C" {
pub fn FRD_PrincipalIdToFriendCode(principalId: u32_, friendCode: *mut u64_) -> Result;
}
extern "C" {
pub fn FRD_FriendCodeToPrincipalId(friendCode: u64_, principalId: *mut u32_) -> Result;
}
extern "C" {
pub fn FRD_IsValidFriendCode(friendCode: u64_, isValid: *mut bool) -> Result;
}
extern "C" {
pub fn FRD_SetClientSdkVersion(sdkVer: u32_) -> Result;
}
extern "C" {
pub fn FRD_AddFriendOnline(event: Handle, principalId: u32_) -> Result;
}
extern "C" {
pub fn FRD_RemoveFriend(principalId: u32_, localFriendCode: u64_) -> Result;
}
pub const GSPLCD_SCREEN_TOP: ::libc::c_uint = 1;
pub const GSPLCD_SCREEN_BOTTOM: ::libc::c_uint = 2;
pub const GSPLCD_SCREEN_BOTH: ::libc::c_uint = 3;
pub type _bindgen_ty_21 = ::libc::c_uint;
extern "C" {
pub fn gspLcdInit() -> Result;
}
extern "C" {
pub fn gspLcdExit();
}
extern "C" {
pub fn GSPLCD_PowerOnAllBacklights() -> Result;
}
extern "C" {
pub fn GSPLCD_PowerOffAllBacklights() -> Result;
}
extern "C" {
pub fn GSPLCD_PowerOnBacklight(screen: u32_) -> Result;
}
extern "C" {
pub fn GSPLCD_PowerOffBacklight(screen: u32_) -> Result;
}
extern "C" {
pub fn GSPLCD_SetLedForceOff(disable: bool) -> Result;
}
extern "C" {
pub fn GSPLCD_GetVendors(vendors: *mut u8_) -> Result;
}
extern "C" {
pub fn GSPLCD_GetBrightness(screen: u32_, brightness: *mut u32_) -> Result;
}
extern "C" {
pub fn GSPLCD_SetBrightness(screen: u32_, brightness: u32_) -> Result;
}
extern "C" {
pub fn GSPLCD_SetBrightnessRaw(screen: u32_, brightness: u32_) -> Result;
}
pub const KEY_A: ::libc::c_uint = 1;
pub const KEY_B: ::libc::c_uint = 2;
pub const KEY_SELECT: ::libc::c_uint = 4;
pub const KEY_START: ::libc::c_uint = 8;
pub const KEY_DRIGHT: ::libc::c_uint = 16;
pub const KEY_DLEFT: ::libc::c_uint = 32;
pub const KEY_DUP: ::libc::c_uint = 64;
pub const KEY_DDOWN: ::libc::c_uint = 128;
pub const KEY_R: ::libc::c_uint = 256;
pub const KEY_L: ::libc::c_uint = 512;
pub const KEY_X: ::libc::c_uint = 1024;
pub const KEY_Y: ::libc::c_uint = 2048;
pub const KEY_ZL: ::libc::c_uint = 16384;
pub const KEY_ZR: ::libc::c_uint = 32768;
pub const KEY_TOUCH: ::libc::c_uint = 1048576;
pub const KEY_CSTICK_RIGHT: ::libc::c_uint = 16777216;
pub const KEY_CSTICK_LEFT: ::libc::c_uint = 33554432;
pub const KEY_CSTICK_UP: ::libc::c_uint = 67108864;
pub const KEY_CSTICK_DOWN: ::libc::c_uint = 134217728;
pub const KEY_CPAD_RIGHT: ::libc::c_uint = 268435456;
pub const KEY_CPAD_LEFT: ::libc::c_uint = 536870912;
pub const KEY_CPAD_UP: ::libc::c_uint = 1073741824;
pub const KEY_CPAD_DOWN: ::libc::c_uint = 2147483648;
pub const KEY_UP: ::libc::c_uint = 1073741888;
pub const KEY_DOWN: ::libc::c_uint = 2147483776;
pub const KEY_LEFT: ::libc::c_uint = 536870944;
pub const KEY_RIGHT: ::libc::c_uint = 268435472;
pub type _bindgen_ty_22 = ::libc::c_uint;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct touchPosition {
pub px: u16_,
pub py: u16_,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct circlePosition {
pub dx: s16,
pub dy: s16,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct accelVector {
pub x: s16,
pub y: s16,
pub z: s16,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct angularRate {
pub x: s16,
pub z: s16,
pub y: s16,
}
pub const HIDEVENT_PAD0: HID_Event = 0;
pub const HIDEVENT_PAD1: HID_Event = 1;
pub const HIDEVENT_Accel: HID_Event = 2;
pub const HIDEVENT_Gyro: HID_Event = 3;
pub const HIDEVENT_DebugPad: HID_Event = 4;
pub const HIDEVENT_MAX: HID_Event = 5;
pub type HID_Event = ::libc::c_uint;
extern "C" {
pub static mut hidMemHandle: Handle;
}
extern "C" {
pub static mut hidSharedMem: *mut vu32;
}
extern "C" {
pub fn hidInit() -> Result;
}
extern "C" {
pub fn hidExit();
}
extern "C" {
pub fn hidSetRepeatParameters(delay: u32_, interval: u32_);
}
extern "C" {
pub fn hidScanInput();
}
extern "C" {
pub fn hidKeysHeld() -> u32_;
}
extern "C" {
pub fn hidKeysDown() -> u32_;
}
extern "C" {
pub fn hidKeysDownRepeat() -> u32_;
}
extern "C" {
pub fn hidKeysUp() -> u32_;
}
extern "C" {
pub fn hidTouchRead(pos: *mut touchPosition);
}
extern "C" {
pub fn hidCircleRead(pos: *mut circlePosition);
}
extern "C" {
pub fn hidAccelRead(vector: *mut accelVector);
}
extern "C" {
pub fn hidGyroRead(rate: *mut angularRate);
}
extern "C" {
pub fn hidWaitForEvent(id: HID_Event, nextEvent: bool);
}
extern "C" {
pub fn hidWaitForAnyEvent(nextEvents: bool, cancelEvent: Handle, timeout: s64) -> Result;
}
extern "C" {
pub fn HIDUSER_GetHandles(
outMemHandle: *mut Handle,
eventpad0: *mut Handle,
eventpad1: *mut Handle,
eventaccel: *mut Handle,
eventgyro: *mut Handle,
eventdebugpad: *mut Handle,
) -> Result;
}
extern "C" {
pub fn HIDUSER_EnableAccelerometer() -> Result;
}
extern "C" {
pub fn HIDUSER_DisableAccelerometer() -> Result;
}
extern "C" {
pub fn HIDUSER_EnableGyroscope() -> Result;
}
extern "C" {
pub fn HIDUSER_DisableGyroscope() -> Result;
}
extern "C" {
pub fn HIDUSER_GetGyroscopeRawToDpsCoefficient(coeff: *mut f32) -> Result;
}
extern "C" {
pub fn HIDUSER_GetSoundVolume(volume: *mut u8_) -> Result;
}
extern "C" {
pub static mut irrstMemHandle: Handle;
}
extern "C" {
pub static mut irrstSharedMem: *mut vu32;
}
extern "C" {
pub static mut irrstEvent: Handle;
}
extern "C" {
pub fn irrstInit() -> Result;
}
extern "C" {
pub fn irrstExit();
}
extern "C" {
pub fn irrstScanInput();
}
extern "C" {
pub fn irrstKeysHeld() -> u32_;
}
extern "C" {
pub fn irrstCstickRead(pos: *mut circlePosition);
}
extern "C" {
pub fn irrstWaitForEvent(nextEvent: bool);
}
extern "C" {
pub fn IRRST_GetHandles(outMemHandle: *mut Handle, outEventHandle: *mut Handle) -> Result;
}
extern "C" {
pub fn IRRST_Initialize(unk1: u32_, unk2: u8_) -> Result;
}
extern "C" {
pub fn IRRST_Shutdown() -> Result;
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct sslcContext {
pub servhandle: Handle,
pub sslchandle: u32_,
pub sharedmem_handle: Handle,
}
pub const SSLC_DefaultRootCert_Nintendo_CA: SSLC_DefaultRootCert = 1;
pub const SSLC_DefaultRootCert_Nintendo_CA_G2: SSLC_DefaultRootCert = 2;
pub const SSLC_DefaultRootCert_Nintendo_CA_G3: SSLC_DefaultRootCert = 3;
pub const SSLC_DefaultRootCert_Nintendo_Class2_CA: SSLC_DefaultRootCert = 4;
pub const SSLC_DefaultRootCert_Nintendo_Class2_CA_G2: SSLC_DefaultRootCert = 5;
pub const SSLC_DefaultRootCert_Nintendo_Class2_CA_G3: SSLC_DefaultRootCert = 6;
pub const SSLC_DefaultRootCert_CyberTrust: SSLC_DefaultRootCert = 7;
pub const SSLC_DefaultRootCert_AddTrust_External_CA: SSLC_DefaultRootCert = 8;
pub const SSLC_DefaultRootCert_COMODO: SSLC_DefaultRootCert = 9;
pub const SSLC_DefaultRootCert_USERTrust: SSLC_DefaultRootCert = 10;
pub const SSLC_DefaultRootCert_DigiCert_EV: SSLC_DefaultRootCert = 11;
pub type SSLC_DefaultRootCert = ::libc::c_uint;
pub const SSLC_DefaultClientCert_ClCertA: SSLC_DefaultClientCert = 64;
pub type SSLC_DefaultClientCert = ::libc::c_uint;
pub const SSLCOPT_Default: ::libc::c_uint = 0;
pub const SSLCOPT_DisableVerify: ::libc::c_uint = 512;
pub const SSLCOPT_TLSv10: ::libc::c_uint = 2048;
pub type _bindgen_ty_23 = ::libc::c_uint;
extern "C" {
pub fn sslcInit(session_handle: Handle) -> Result;
}
extern "C" {
pub fn sslcExit();
}
extern "C" {
pub fn sslcCreateRootCertChain(RootCertChain_contexthandle: *mut u32_) -> Result;
}
extern "C" {
pub fn sslcDestroyRootCertChain(RootCertChain_contexthandle: u32_) -> Result;
}
extern "C" {
pub fn sslcAddTrustedRootCA(
RootCertChain_contexthandle: u32_,
cert: *const u8_,
certsize: u32_,
cert_contexthandle: *mut u32_,
) -> Result;
}
extern "C" {
pub fn sslcRootCertChainAddDefaultCert(
RootCertChain_contexthandle: u32_,
certID: SSLC_DefaultRootCert,
cert_contexthandle: *mut u32_,
) -> Result;
}
extern "C" {
pub fn sslcRootCertChainRemoveCert(
RootCertChain_contexthandle: u32_,
cert_contexthandle: u32_,
) -> Result;
}
extern "C" {
pub fn sslcCreate8CertChain(CertChain_contexthandle: *mut u32_) -> Result;
}
extern "C" {
pub fn sslcDestroy8CertChain(CertChain_contexthandle: u32_) -> Result;
}
extern "C" {
pub fn sslc8CertChainAddCert(
CertChain_contexthandle: u32_,
cert: *const u8_,
certsize: u32_,
cert_contexthandle: *mut u32_,
) -> Result;
}
extern "C" {
pub fn sslc8CertChainAddDefaultCert(
CertChain_contexthandle: u32_,
certID: u8_,
cert_contexthandle: *mut u32_,
) -> Result;
}
extern "C" {
pub fn sslc8CertChainRemoveCert(
CertChain_contexthandle: u32_,
cert_contexthandle: u32_,
) -> Result;
}
extern "C" {
pub fn sslcOpenClientCertContext(
cert: *const u8_,
certsize: u32_,
key: *const u8_,
keysize: u32_,
ClientCert_contexthandle: *mut u32_,
) -> Result;
}
extern "C" {
pub fn sslcOpenDefaultClientCertContext(
certID: SSLC_DefaultClientCert,
ClientCert_contexthandle: *mut u32_,
) -> Result;
}
extern "C" {
pub fn sslcCloseClientCertContext(ClientCert_contexthandle: u32_) -> Result;
}
extern "C" {
pub fn sslcSeedRNG() -> Result;
}
extern "C" {
pub fn sslcGenerateRandomData(buf: *mut u8_, size: u32_) -> Result;
}
extern "C" {
pub fn sslcCreateContext(
context: *mut sslcContext,
sockfd: ::libc::c_int,
input_opt: u32_,
hostname: *const ::libc::c_char,
) -> Result;
}
extern "C" {
pub fn sslcDestroyContext(context: *mut sslcContext) -> Result;
}
extern "C" {
pub fn sslcStartConnection(
context: *mut sslcContext,
internal_retval: *mut ::libc::c_int,
out: *mut u32_,
) -> Result;
}
extern "C" {
pub fn sslcRead(
context: *mut sslcContext,
buf: *mut ::libc::c_void,
len: size_t,
peek: bool,
) -> Result;
}
extern "C" {
pub fn sslcWrite(context: *mut sslcContext, buf: *const ::libc::c_void, len: size_t) -> Result;
}
extern "C" {
pub fn sslcContextSetRootCertChain(context: *mut sslcContext, handle: u32_) -> Result;
}
extern "C" {
pub fn sslcContextSetClientCert(context: *mut sslcContext, handle: u32_) -> Result;
}
extern "C" {
pub fn sslcContextSetHandle8(context: *mut sslcContext, handle: u32_) -> Result;
}
extern "C" {
pub fn sslcContextClearOpt(context: *mut sslcContext, bitmask: u32_) -> Result;
}
extern "C" {
pub fn sslcContextGetProtocolCipher(
context: *mut sslcContext,
outprotocols: *mut ::libc::c_char,
outprotocols_maxsize: u32_,
outcipher: *mut ::libc::c_char,
outcipher_maxsize: u32_,
) -> Result;
}
extern "C" {
pub fn sslcContextGetState(context: *mut sslcContext, out: *mut u32_) -> Result;
}
extern "C" {
pub fn sslcContextInitSharedmem(context: *mut sslcContext, buf: *mut u8_, size: u32_)
-> Result;
}
extern "C" {
pub fn sslcAddCert(context: *mut sslcContext, buf: *const u8_, size: u32_) -> Result;
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct httpcContext {
pub servhandle: Handle,
pub httphandle: u32_,
}
pub const HTTPC_METHOD_GET: HTTPC_RequestMethod = 1;
pub const HTTPC_METHOD_POST: HTTPC_RequestMethod = 2;
pub const HTTPC_METHOD_HEAD: HTTPC_RequestMethod = 3;
pub const HTTPC_METHOD_PUT: HTTPC_RequestMethod = 4;
pub const HTTPC_METHOD_DELETE: HTTPC_RequestMethod = 5;
pub type HTTPC_RequestMethod = ::libc::c_uint;
pub const HTTPC_STATUS_REQUEST_IN_PROGRESS: HTTPC_RequestStatus = 5;
pub const HTTPC_STATUS_DOWNLOAD_READY: HTTPC_RequestStatus = 7;
pub type HTTPC_RequestStatus = ::libc::c_uint;
pub const HTTPC_KEEPALIVE_DISABLED: HTTPC_KeepAlive = 0;
pub const HTTPC_KEEPALIVE_ENABLED: HTTPC_KeepAlive = 1;
pub type HTTPC_KeepAlive = ::libc::c_uint;
extern "C" {
pub fn httpcInit(sharedmem_size: u32_) -> Result;
}
extern "C" {
pub fn httpcExit();
}
extern "C" {
pub fn httpcOpenContext(
context: *mut httpcContext,
method: HTTPC_RequestMethod,
url: *const ::libc::c_char,
use_defaultproxy: u32_,
) -> Result;
}
extern "C" {
pub fn httpcCloseContext(context: *mut httpcContext) -> Result;
}
extern "C" {
pub fn httpcCancelConnection(context: *mut httpcContext) -> Result;
}
extern "C" {
pub fn httpcAddRequestHeaderField(
context: *mut httpcContext,
name: *const ::libc::c_char,
value: *const ::libc::c_char,
) -> Result;
}
extern "C" {
pub fn httpcAddPostDataAscii(
context: *mut httpcContext,
name: *const ::libc::c_char,
value: *const ::libc::c_char,
) -> Result;
}
extern "C" {
pub fn httpcAddPostDataBinary(
context: *mut httpcContext,
name: *const ::libc::c_char,
value: *const u8_,
len: u32_,
) -> Result;
}
extern "C" {
pub fn httpcAddPostDataRaw(context: *mut httpcContext, data: *const u32_, len: u32_) -> Result;
}
extern "C" {
pub fn httpcBeginRequest(context: *mut httpcContext) -> Result;
}
extern "C" {
pub fn httpcReceiveData(context: *mut httpcContext, buffer: *mut u8_, size: u32_) -> Result;
}
extern "C" {
pub fn httpcReceiveDataTimeout(
context: *mut httpcContext,
buffer: *mut u8_,
size: u32_,
timeout: u64_,
) -> Result;
}
extern "C" {
pub fn httpcGetRequestState(
context: *mut httpcContext,
out: *mut HTTPC_RequestStatus,
) -> Result;
}
extern "C" {
pub fn httpcGetDownloadSizeState(
context: *mut httpcContext,
downloadedsize: *mut u32_,
contentsize: *mut u32_,
) -> Result;
}
extern "C" {
pub fn httpcGetResponseStatusCode(context: *mut httpcContext, out: *mut u32_) -> Result;
}
extern "C" {
pub fn httpcGetResponseStatusCodeTimeout(
context: *mut httpcContext,
out: *mut u32_,
timeout: u64_,
) -> Result;
}
extern "C" {
pub fn httpcGetResponseHeader(
context: *mut httpcContext,
name: *const ::libc::c_char,
value: *mut ::libc::c_char,
valuebuf_maxsize: u32_,
) -> Result;
}
extern "C" {
pub fn httpcAddTrustedRootCA(
context: *mut httpcContext,
cert: *const u8_,
certsize: u32_,
) -> Result;
}
extern "C" {
pub fn httpcAddDefaultCert(context: *mut httpcContext, certID: SSLC_DefaultRootCert) -> Result;
}
extern "C" {
pub fn httpcSelectRootCertChain(
context: *mut httpcContext,
RootCertChain_contexthandle: u32_,
) -> Result;
}
extern "C" {
pub fn httpcSetClientCert(
context: *mut httpcContext,
cert: *const u8_,
certsize: u32_,
privk: *const u8_,
privk_size: u32_,
) -> Result;
}
extern "C" {
pub fn httpcSetClientCertDefault(
context: *mut httpcContext,
certID: SSLC_DefaultClientCert,
) -> Result;
}
extern "C" {
pub fn httpcSetClientCertContext(
context: *mut httpcContext,
ClientCert_contexthandle: u32_,
) -> Result;
}
extern "C" {
pub fn httpcSetSSLOpt(context: *mut httpcContext, options: u32_) -> Result;
}
extern "C" {
pub fn httpcSetSSLClearOpt(context: *mut httpcContext, options: u32_) -> Result;
}
extern "C" {
pub fn httpcCreateRootCertChain(RootCertChain_contexthandle: *mut u32_) -> Result;
}
extern "C" {
pub fn httpcDestroyRootCertChain(RootCertChain_contexthandle: u32_) -> Result;
}
extern "C" {
pub fn httpcRootCertChainAddCert(
RootCertChain_contexthandle: u32_,
cert: *const u8_,
certsize: u32_,
cert_contexthandle: *mut u32_,
) -> Result;
}
extern "C" {
pub fn httpcRootCertChainAddDefaultCert(
RootCertChain_contexthandle: u32_,
certID: SSLC_DefaultRootCert,
cert_contexthandle: *mut u32_,
) -> Result;
}
extern "C" {
pub fn httpcRootCertChainRemoveCert(
RootCertChain_contexthandle: u32_,
cert_contexthandle: u32_,
) -> Result;
}
extern "C" {
pub fn httpcOpenClientCertContext(
cert: *const u8_,
certsize: u32_,
privk: *const u8_,
privk_size: u32_,
ClientCert_contexthandle: *mut u32_,
) -> Result;
}
extern "C" {
pub fn httpcOpenDefaultClientCertContext(
certID: SSLC_DefaultClientCert,
ClientCert_contexthandle: *mut u32_,
) -> Result;
}
extern "C" {
pub fn httpcCloseClientCertContext(ClientCert_contexthandle: u32_) -> Result;
}
extern "C" {
pub fn httpcDownloadData(
context: *mut httpcContext,
buffer: *mut u8_,
size: u32_,
downloadedsize: *mut u32_,
) -> Result;
}
extern "C" {
pub fn httpcSetKeepAlive(context: *mut httpcContext, option: HTTPC_KeepAlive) -> Result;
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct udsNodeInfo {
pub uds_friendcodeseed: u64_,
pub __bindgen_anon_1: udsNodeInfo__bindgen_ty_1,
pub NetworkNodeID: u16_,
pub pad_x22: u16_,
pub word_x24: u32_,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union udsNodeInfo__bindgen_ty_1 {
pub usercfg: [u8_; 24usize],
pub __bindgen_anon_1: udsNodeInfo__bindgen_ty_1__bindgen_ty_1,
_bindgen_union_align: [u16; 12usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct udsNodeInfo__bindgen_ty_1__bindgen_ty_1 {
pub username: [u16_; 10usize],
pub unk_x1c: u16_,
pub flag: u8_,
pub pad_x1f: u8_,
}
impl Default for udsNodeInfo__bindgen_ty_1 {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
impl Default for udsNodeInfo {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct udsConnectionStatus {
pub status: u32_,
pub unk_x4: u32_,
pub cur_NetworkNodeID: u16_,
pub unk_xa: u16_,
pub unk_xc: [u32_; 8usize],
pub total_nodes: u8_,
pub max_nodes: u8_,
pub node_bitmask: u16_,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct udsNetworkStruct {
pub host_macaddress: [u8_; 6usize],
pub channel: u8_,
pub pad_x7: u8_,
pub initialized_flag: u8_,
pub unk_x9: [u8_; 3usize],
pub oui_value: [u8_; 3usize],
pub oui_type: u8_,
pub wlancommID: u32_,
pub id8: u8_,
pub unk_x15: u8_,
pub attributes: u16_,
pub networkID: u32_,
pub total_nodes: u8_,
pub max_nodes: u8_,
pub unk_x1e: u8_,
pub unk_x1f: u8_,
pub unk_x20: [u8_; 31usize],
pub appdata_size: u8_,
pub appdata: [u8_; 200usize],
}
impl Default for udsNetworkStruct {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct udsBindContext {
pub BindNodeID: u32_,
pub event: Handle,
pub spectator: bool,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct nwmScanInputStruct {
pub unk_x0: u16_,
pub unk_x2: u16_,
pub unk_x4: u16_,
pub unk_x6: u16_,
pub mac_address: [u8_; 6usize],
pub unk_xe: [u8_; 38usize],
}
impl Default for nwmScanInputStruct {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct nwmBeaconDataReplyHeader {
pub maxsize: u32_,
pub size: u32_,
pub total_entries: u32_,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct nwmBeaconDataReplyEntry {
pub size: u32_,
pub unk_x4: u8_,
pub channel: u8_,
pub unk_x6: u8_,
pub unk_x7: u8_,
pub mac_address: [u8_; 6usize],
pub unk_xe: [u8_; 6usize],
pub unk_x14: u32_,
pub val_x1c: u32_,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct udsNetworkScanInfo {
pub datareply_entry: nwmBeaconDataReplyEntry,
pub network: udsNetworkStruct,
pub nodes: [udsNodeInfo; 16usize],
}
impl Default for udsNetworkScanInfo {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
pub const UDSNETATTR_DisableConnectSpectators: ::libc::c_uint = 1;
pub const UDSNETATTR_DisableConnectClients: ::libc::c_uint = 2;
pub const UDSNETATTR_x4: ::libc::c_uint = 4;
pub const UDSNETATTR_Default: ::libc::c_uint = 32768;
pub type _bindgen_ty_24 = ::libc::c_uint;
pub const UDS_SENDFLAG_Default: ::libc::c_uint = 1;
pub const UDS_SENDFLAG_Broadcast: ::libc::c_uint = 2;
pub type _bindgen_ty_25 = ::libc::c_uint;
pub const UDSCONTYPE_Client: udsConnectionType = 1;
pub const UDSCONTYPE_Spectator: udsConnectionType = 2;
pub type udsConnectionType = ::libc::c_uint;
extern "C" {
pub fn udsInit(sharedmem_size: size_t, username: *const ::libc::c_char) -> Result;
}
extern "C" {
pub fn udsExit();
}
extern "C" {
pub fn udsGenerateNodeInfo(
nodeinfo: *mut udsNodeInfo,
username: *const ::libc::c_char,
) -> Result;
}
extern "C" {
pub fn udsGetNodeInfoUsername(
nodeinfo: *const udsNodeInfo,
username: *mut ::libc::c_char,
) -> Result;
}
extern "C" {
pub fn udsCheckNodeInfoInitialized(nodeinfo: *const udsNodeInfo) -> bool;
}
extern "C" {
pub fn udsGenerateDefaultNetworkStruct(
network: *mut udsNetworkStruct,
wlancommID: u32_,
id8: u8_,
max_nodes: u8_,
);
}
extern "C" {
pub fn udsScanBeacons(
outbuf: *mut ::libc::c_void,
maxsize: size_t,
networks: *mut *mut udsNetworkScanInfo,
total_networks: *mut size_t,
wlancommID: u32_,
id8: u8_,
host_macaddress: *const u8_,
connected: bool,
) -> Result;
}
extern "C" {
pub fn udsSetApplicationData(buf: *const ::libc::c_void, size: size_t) -> Result;
}
extern "C" {
pub fn udsGetApplicationData(
buf: *mut ::libc::c_void,
size: size_t,
actual_size: *mut size_t,
) -> Result;
}
extern "C" {
pub fn udsGetNetworkStructApplicationData(
network: *const udsNetworkStruct,
buf: *mut ::libc::c_void,
size: size_t,
actual_size: *mut size_t,
) -> Result;
}
extern "C" {
pub fn udsBind(
bindcontext: *mut udsBindContext,
NetworkNodeID: u16_,
spectator: bool,
data_channel: u8_,
recv_buffer_size: u32_,
) -> Result;
}
extern "C" {
pub fn udsUnbind(bindcontext: *mut udsBindContext) -> Result;
}
extern "C" {
pub fn udsWaitDataAvailable(
bindcontext: *const udsBindContext,
nextEvent: bool,
wait: bool,
) -> bool;
}
extern "C" {
pub fn udsPullPacket(
bindcontext: *const udsBindContext,
buf: *mut ::libc::c_void,
size: size_t,
actual_size: *mut size_t,
src_NetworkNodeID: *mut u16_,
) -> Result;
}
extern "C" {
pub fn udsSendTo(
dst_NetworkNodeID: u16_,
data_channel: u8_,
flags: u8_,
buf: *const ::libc::c_void,
size: size_t,
) -> Result;
}
extern "C" {
pub fn udsGetChannel(channel: *mut u8_) -> Result;
}
extern "C" {
pub fn udsCreateNetwork(
network: *const udsNetworkStruct,
passphrase: *const ::libc::c_void,
passphrase_size: size_t,
context: *mut udsBindContext,
data_channel: u8_,
recv_buffer_size: u32_,
) -> Result;
}
extern "C" {
pub fn udsConnectNetwork(
network: *const udsNetworkStruct,
passphrase: *const ::libc::c_void,
passphrase_size: size_t,
context: *mut udsBindContext,
recv_NetworkNodeID: u16_,
connection_type: udsConnectionType,
data_channel: u8_,
recv_buffer_size: u32_,
) -> Result;
}
extern "C" {
pub fn udsDestroyNetwork() -> Result;
}
extern "C" {
pub fn udsDisconnectNetwork() -> Result;
}
extern "C" {
pub fn udsEjectClient(NetworkNodeID: u16_) -> Result;
}
extern "C" {
pub fn udsEjectSpectator() -> Result;
}
extern "C" {
pub fn udsUpdateNetworkAttribute(bitmask: u16_, flag: bool) -> Result;
}
extern "C" {
pub fn udsSetNewConnectionsBlocked(block: bool, clients: bool, flag: bool) -> Result;
}
extern "C" {
pub fn udsAllowSpectators() -> Result;
}
extern "C" {
pub fn udsGetConnectionStatus(output: *mut udsConnectionStatus) -> Result;
}
extern "C" {
pub fn udsWaitConnectionStatusEvent(nextEvent: bool, wait: bool) -> bool;
}
extern "C" {
pub fn udsGetNodeInformation(NetworkNodeID: u16_, output: *mut udsNodeInfo) -> Result;
}
pub const NDM_EXCLUSIVE_STATE_NONE: ndmExclusiveState = 0;
pub const NDM_EXCLUSIVE_STATE_INFRASTRUCTURE: ndmExclusiveState = 1;
pub const NDM_EXCLUSIVE_STATE_LOCAL_COMMUNICATIONS: ndmExclusiveState = 2;
pub const NDM_EXCLUSIVE_STATE_STREETPASS: ndmExclusiveState = 3;
pub const NDM_EXCLUSIVE_STATE_STREETPASS_DATA: ndmExclusiveState = 4;
pub type ndmExclusiveState = ::libc::c_uint;
pub const NDM_STATE_INITIAL: ndmState = 0;
pub const NDM_STATE_SUSPENDED: ndmState = 1;
pub const NDM_STATE_INFRASTRUCTURE_CONNECTING: ndmState = 2;
pub const NDM_STATE_INFRASTRUCTURE_CONNECTED: ndmState = 3;
pub const NDM_STATE_INFRASTRUCTURE_WORKING: ndmState = 4;
pub const NDM_STATE_INFRASTRUCTURE_SUSPENDING: ndmState = 5;
pub const NDM_STATE_INFRASTRUCTURE_FORCE_SUSPENDING: ndmState = 6;
pub const NDM_STATE_INFRASTRUCTURE_DISCONNECTING: ndmState = 7;
pub const NDM_STATE_INFRASTRUCTURE_FORCE_DISCONNECTING: ndmState = 8;
pub const NDM_STATE_CEC_WORKING: ndmState = 9;
pub const NDM_STATE_CEC_FORCE_SUSPENDING: ndmState = 10;
pub const NDM_STATE_CEC_SUSPENDING: ndmState = 11;
pub type ndmState = ::libc::c_uint;
pub const NDM_DAEMON_CEC: ndmDaemon = 0;
pub const NDM_DAEMON_BOSS: ndmDaemon = 1;
pub const NDM_DAEMON_NIM: ndmDaemon = 2;
pub const NDM_DAEMON_FRIENDS: ndmDaemon = 3;
pub type ndmDaemon = ::libc::c_uint;
pub const NDM_DAEMON_MASK_CEC: ndmDaemonMask = 1;
pub const NDM_DAEMON_MASK_BOSS: ndmDaemonMask = 2;
pub const NDM_DAEMON_MASK_NIM: ndmDaemonMask = 4;
pub const NDM_DAEMON_MASK_FRIENDS: ndmDaemonMask = 8;
pub const NDM_DAEMON_MASK_BACKGROUOND: ndmDaemonMask = 7;
pub const NDM_DAEMON_MASK_ALL: ndmDaemonMask = 15;
pub const NDM_DAEMON_MASK_DEFAULT: ndmDaemonMask = 9;
pub type ndmDaemonMask = ::libc::c_uint;
pub const NDM_DAEMON_STATUS_BUSY: ndmDaemonStatus = 0;
pub const NDM_DAEMON_STATUS_IDLE: ndmDaemonStatus = 1;
pub const NDM_DAEMON_STATUS_SUSPENDING: ndmDaemonStatus = 2;
pub const NDM_DAEMON_STATUS_SUSPENDED: ndmDaemonStatus = 3;
pub type ndmDaemonStatus = ::libc::c_uint;
extern "C" {
pub fn ndmuInit() -> Result;
}
extern "C" {
pub fn ndmuExit();
}
extern "C" {
pub fn NDMU_EnterExclusiveState(state: ndmExclusiveState) -> Result;
}
extern "C" {
pub fn NDMU_LeaveExclusiveState() -> Result;
}
extern "C" {
pub fn NDMU_GetExclusiveState(state: *mut ndmExclusiveState) -> Result;
}
extern "C" {
pub fn NDMU_LockState() -> Result;
}
extern "C" {
pub fn NDMU_UnlockState() -> Result;
}
extern "C" {
pub fn NDMU_SuspendDaemons(mask: ndmDaemonMask) -> Result;
}
extern "C" {
pub fn NDMU_ResumeDaemons(mask: ndmDaemonMask) -> Result;
}
extern "C" {
pub fn NDMU_SuspendScheduler(flag: u32_) -> Result;
}
extern "C" {
pub fn NDMU_ResumeScheduler() -> Result;
}
extern "C" {
pub fn NDMU_GetCurrentState(state: *mut ndmState) -> Result;
}
extern "C" {
pub fn NDMU_QueryStatus(status: *mut ndmDaemonStatus) -> Result;
}
extern "C" {
pub fn NDMU_SetScanInterval(interval: u32_) -> Result;
}
extern "C" {
pub fn NDMU_GetScanInterval(interval: *mut u32_) -> Result;
}
extern "C" {
pub fn NDMU_GetRetryInterval(interval: *mut u32_) -> Result;
}
extern "C" {
pub fn NDMU_ResetDaemons() -> Result;
}
extern "C" {
pub fn NDMU_GetDefaultDaemons(mask: *mut ndmDaemonMask) -> Result;
}
extern "C" {
pub fn NDMU_ClearMacFilter() -> Result;
}
pub const IM_DEFAULT: NIM_InstallationMode = 0;
pub const IM_UNKNOWN1: NIM_InstallationMode = 1;
pub const IM_UNKNOWN2: NIM_InstallationMode = 2;
pub const IM_REINSTALL: NIM_InstallationMode = 3;
pub type NIM_InstallationMode = ::libc::c_uint;
pub const DS_NOT_INITIALIZED: NIM_DownloadState = 0;
pub const DS_INITIALIZED: NIM_DownloadState = 1;
pub const DS_DOWNLOAD_TMD: NIM_DownloadState = 2;
pub const DS_PREPARE_SAVE_DATA: NIM_DownloadState = 3;
pub const DS_DOWNLOAD_CONTENTS: NIM_DownloadState = 4;
pub const DS_WAIT_COMMIT: NIM_DownloadState = 5;
pub const DS_COMMITTING: NIM_DownloadState = 6;
pub const DS_FINISHED: NIM_DownloadState = 7;
pub const DS_VERSION_ERROR: NIM_DownloadState = 8;
pub const DS_CREATE_CONTEXT: NIM_DownloadState = 9;
pub const DS_CANNOT_RECOVER: NIM_DownloadState = 10;
pub const DS_INVALID: NIM_DownloadState = 11;
pub type NIM_DownloadState = ::libc::c_uint;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct NIM_TitleConfig {
pub titleId: u64_,
pub version: u32_,
pub unknown_0: u32_,
pub ratingAge: u8_,
pub mediaType: u8_,
pub padding: [u8_; 2usize],
pub unknown_1: u32_,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct NIM_TitleProgress {
pub state: u32_,
pub lastResult: Result,
pub downloadedSize: u64_,
pub totalSize: u64_,
}
extern "C" {
pub fn nimsInit(buffer: *mut ::libc::c_void, buffer_len: size_t) -> Result;
}
extern "C" {
pub fn nimsInitWithTIN(
buffer: *mut ::libc::c_void,
buffer_len: size_t,
TIN: *const ::libc::c_char,
) -> Result;
}
extern "C" {
pub fn nimsExit();
}
extern "C" {
pub fn nimsGetSessionHandle() -> *mut Handle;
}
extern "C" {
pub fn NIMS_SetAttribute(attr: *const ::libc::c_char, val: *const ::libc::c_char) -> Result;
}
extern "C" {
pub fn NIMS_WantUpdate(want_update: *mut bool) -> Result;
}
extern "C" {
pub fn NIMS_MakeTitleConfig(
cfg: *mut NIM_TitleConfig,
titleId: u64_,
version: u32_,
ratingAge: u8_,
mediaType: FS_MediaType,
);
}
extern "C" {
pub fn NIMS_RegisterTask(
cfg: *const NIM_TitleConfig,
name: *const ::libc::c_char,
maker: *const ::libc::c_char,
) -> Result;
}
extern "C" {
pub fn NIMS_IsTaskRegistered(titleId: u64_, registered: *mut bool) -> Result;
}
extern "C" {
pub fn NIMS_UnregisterTask(titleId: u64_) -> Result;
}
extern "C" {
pub fn NIMS_StartDownload(cfg: *const NIM_TitleConfig, mode: NIM_InstallationMode) -> Result;
}
extern "C" {
pub fn NIMS_StartDownloadSimple(cfg: *const NIM_TitleConfig) -> Result;
}
extern "C" {
pub fn NIMS_GetProgress(tp: *mut NIM_TitleProgress) -> Result;
}
extern "C" {
pub fn NIMS_CancelDownload() -> Result;
}
extern "C" {
pub fn nwmExtInit() -> Result;
}
extern "C" {
pub fn nwmExtExit();
}
extern "C" {
pub fn NWMEXT_ControlWirelessEnabled(enableWifi: bool) -> Result;
}
extern "C" {
pub fn iruInit(sharedmem_addr: *mut u32_, sharedmem_size: u32_) -> Result;
}
extern "C" {
pub fn iruExit();
}
extern "C" {
pub fn iruGetServHandle() -> Handle;
}
extern "C" {
pub fn iruSendData(buf: *mut u8_, size: u32_, wait: bool) -> Result;
}
extern "C" {
pub fn iruRecvData(
buf: *mut u8_,
size: u32_,
flag: u8_,
transfercount: *mut u32_,
wait: bool,
) -> Result;
}
extern "C" {
pub fn IRU_Initialize() -> Result;
}
extern "C" {
pub fn IRU_Shutdown() -> Result;
}
extern "C" {
pub fn IRU_StartSendTransfer(buf: *mut u8_, size: u32_) -> Result;
}
extern "C" {
pub fn IRU_WaitSendTransfer() -> Result;
}
extern "C" {
pub fn IRU_StartRecvTransfer(size: u32_, flag: u8_) -> Result;
}
extern "C" {
pub fn IRU_WaitRecvTransfer(transfercount: *mut u32_) -> Result;
}
extern "C" {
pub fn IRU_SetBitRate(value: u8_) -> Result;
}
extern "C" {
pub fn IRU_GetBitRate(out: *mut u8_) -> Result;
}
extern "C" {
pub fn IRU_SetIRLEDState(value: u32_) -> Result;
}
extern "C" {
pub fn IRU_GetIRLEDRecvState(out: *mut u32_) -> Result;
}
extern "C" {
pub fn nsInit() -> Result;
}
extern "C" {
pub fn nsExit();
}
extern "C" {
pub fn NS_LaunchFIRM(titleid: u64_) -> Result;
}
extern "C" {
pub fn NS_LaunchTitle(titleid: u64_, launch_flags: u32_, procid: *mut u32_) -> Result;
}
extern "C" {
pub fn NS_TerminateTitle() -> Result;
}
extern "C" {
pub fn NS_LaunchApplicationFIRM(titleid: u64_, flags: u32_) -> Result;
}
extern "C" {
pub fn NS_RebootToTitle(mediatype: u8_, titleid: u64_) -> Result;
}
extern "C" {
pub fn NS_TerminateProcessTID(titleid: u64_, timeout: u64_) -> Result;
}
extern "C" {
pub fn NS_RebootSystem() -> Result;
}
pub const PMLAUNCHFLAG_NORMAL_APPLICATION: ::libc::c_uint = 1;
pub const PMLAUNCHFLAG_LOAD_DEPENDENCIES: ::libc::c_uint = 2;
pub const PMLAUNCHFLAG_NOTIFY_TERMINATION: ::libc::c_uint = 4;
pub const PMLAUNCHFLAG_QUEUE_DEBUG_APPLICATION: ::libc::c_uint = 8;
pub const PMLAUNCHFLAG_TERMINATION_NOTIFICATION_MASK: ::libc::c_uint = 240;
pub const PMLAUNCHFLAG_FORCE_USE_O3DS_APP_MEM: ::libc::c_uint = 256;
pub const PMLAUNCHFLAG_FORCE_USE_O3DS_MAX_APP_MEM: ::libc::c_uint = 512;
pub const PMLAUNCHFLAG_USE_UPDATE_TITLE: ::libc::c_uint = 65536;
pub type _bindgen_ty_26 = ::libc::c_uint;
extern "C" {
pub fn pmAppInit() -> Result;
}
extern "C" {
pub fn pmAppExit();
}
extern "C" {
pub fn pmAppGetSessionHandle() -> *mut Handle;
}
extern "C" {
pub fn PMAPP_LaunchTitle(programInfo: *const FS_ProgramInfo, launchFlags: u32_) -> Result;
}
extern "C" {
pub fn PMAPP_LaunchTitleUpdate(
programInfo: *const FS_ProgramInfo,
programInfoUpdate: *const FS_ProgramInfo,
launchFlags: u32_,
) -> Result;
}
extern "C" {
pub fn PMAPP_GetTitleExheaderFlags(
outCoreInfo: *mut ExHeader_Arm11CoreInfo,
outSiFlags: *mut ExHeader_SystemInfoFlags,
programInfo: *const FS_ProgramInfo,
) -> Result;
}
extern "C" {
pub fn PMAPP_SetFIRMLaunchParams(size: u32_, in_: *const ::libc::c_void) -> Result;
}
extern "C" {
pub fn PMAPP_GetFIRMLaunchParams(out: *mut ::libc::c_void, size: u32_) -> Result;
}
extern "C" {
pub fn PMAPP_LaunchFIRMSetParams(
firmTidLow: u32_,
size: u32_,
in_: *const ::libc::c_void,
) -> Result;
}
extern "C" {
pub fn PMAPP_PrepareForReboot(timeout: s64) -> Result;
}
extern "C" {
pub fn PMAPP_TerminateCurrentApplication(timeout: s64) -> Result;
}
extern "C" {
pub fn PMAPP_TerminateTitle(titleId: u64_, timeout: s64) -> Result;
}
extern "C" {
pub fn PMAPP_TerminateProcess(pid: u32_, timeout: s64) -> Result;
}
extern "C" {
pub fn PMAPP_UnregisterProcess(tid: u64_) -> Result;
}
extern "C" {
pub fn PMAPP_SetAppResourceLimit(cpuTime: s64) -> Result;
}
extern "C" {
pub fn PMAPP_GetAppResourceLimit(outCpuTime: *mut s64) -> Result;
}
extern "C" {
pub fn pmDbgInit() -> Result;
}
extern "C" {
pub fn pmDbgExit();
}
extern "C" {
pub fn pmDbgGetSessionHandle() -> *mut Handle;
}
extern "C" {
pub fn PMDBG_LaunchAppDebug(
outDebug: *mut Handle,
programInfo: *const FS_ProgramInfo,
launchFlags: u32_,
) -> Result;
}
extern "C" {
pub fn PMDBG_LaunchApp(programInfo: *const FS_ProgramInfo, launchFlags: u32_) -> Result;
}
extern "C" {
pub fn PMDBG_RunQueuedProcess(outDebug: *mut Handle) -> Result;
}
pub const PS_ALGORITHM_CBC_ENC: PS_AESAlgorithm = 0;
pub const PS_ALGORITHM_CBC_DEC: PS_AESAlgorithm = 1;
pub const PS_ALGORITHM_CTR_ENC: PS_AESAlgorithm = 2;
pub const PS_ALGORITHM_CTR_DEC: PS_AESAlgorithm = 3;
pub const PS_ALGORITHM_CCM_ENC: PS_AESAlgorithm = 4;
pub const PS_ALGORITHM_CCM_DEC: PS_AESAlgorithm = 5;
pub type PS_AESAlgorithm = ::libc::c_uint;
pub const PS_KEYSLOT_0D: PS_AESKeyType = 0;
pub const PS_KEYSLOT_2D: PS_AESKeyType = 1;
pub const PS_KEYSLOT_31: PS_AESKeyType = 2;
pub const PS_KEYSLOT_38: PS_AESKeyType = 3;
pub const PS_KEYSLOT_32: PS_AESKeyType = 4;
pub const PS_KEYSLOT_39_DLP: PS_AESKeyType = 5;
pub const PS_KEYSLOT_2E: PS_AESKeyType = 6;
pub const PS_KEYSLOT_INVALID: PS_AESKeyType = 7;
pub const PS_KEYSLOT_36: PS_AESKeyType = 8;
pub const PS_KEYSLOT_39_NFC: PS_AESKeyType = 9;
pub type PS_AESKeyType = ::libc::c_uint;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct psRSAContext {
pub modulo: [u8_; 256usize],
pub exponent: [u8_; 256usize],
pub rsa_bitsize: u32_,
pub unk: u32_,
}
impl Default for psRSAContext {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
extern "C" {
pub fn psInit() -> Result;
}
extern "C" {
pub fn psInitHandle(handle: Handle) -> Result;
}
extern "C" {
pub fn psExit();
}
extern "C" {
pub fn psGetSessionHandle() -> Handle;
}
extern "C" {
pub fn PS_SignRsaSha256(hash: *mut u8_, ctx: *mut psRSAContext, signature: *mut u8_) -> Result;
}
extern "C" {
pub fn PS_VerifyRsaSha256(
hash: *mut u8_,
ctx: *mut psRSAContext,
signature: *mut u8_,
) -> Result;
}
extern "C" {
pub fn PS_EncryptDecryptAes(
size: u32_,
in_: *mut u8_,
out: *mut u8_,
aes_algo: PS_AESAlgorithm,
key_type: PS_AESKeyType,
iv: *mut u8_,
) -> Result;
}
extern "C" {
pub fn PS_EncryptSignDecryptVerifyAesCcm(
in_: *mut u8_,
in_size: u32_,
out: *mut u8_,
out_size: u32_,
data_len: u32_,
mac_data_len: u32_,
mac_len: u32_,
aes_algo: PS_AESAlgorithm,
key_type: PS_AESKeyType,
nonce: *mut u8_,
) -> Result;
}
extern "C" {
pub fn PS_GetLocalFriendCodeSeed(seed: *mut u64_) -> Result;
}
extern "C" {
pub fn PS_GetDeviceId(device_id: *mut u32_) -> Result;
}
extern "C" {
pub fn PS_GenerateRandomBytes(out: *mut ::libc::c_void, len: size_t) -> Result;
}
extern "C" {
pub fn ptmuInit() -> Result;
}
extern "C" {
pub fn ptmuExit();
}
extern "C" {
pub fn PTMU_GetShellState(out: *mut u8_) -> Result;
}
extern "C" {
pub fn PTMU_GetBatteryLevel(out: *mut u8_) -> Result;
}
extern "C" {
pub fn PTMU_GetBatteryChargeState(out: *mut u8_) -> Result;
}
extern "C" {
pub fn PTMU_GetPedometerState(out: *mut u8_) -> Result;
}
extern "C" {
pub fn PTMU_GetTotalStepCount(steps: *mut u32_) -> Result;
}
extern "C" {
pub fn PTMU_GetAdapterState(out: *mut bool) -> Result;
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct PtmWakeEvents {
pub pdn_wake_events: u32_,
pub mcu_interupt_mask: u32_,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct PtmSleepConfig {
pub exit_sleep_events: PtmWakeEvents,
pub continue_sleep_events: PtmWakeEvents,
}
pub const PTMNOTIFID_SLEEP_REQUESTED: ::libc::c_uint = 257;
pub const PTMNOTIFID_SLEEP_DENIED: ::libc::c_uint = 258;
pub const PTMNOTIFID_SLEEP_ALLOWED: ::libc::c_uint = 259;
pub const PTMNOTIFID_GOING_TO_SLEEP: ::libc::c_uint = 260;
pub const PTMNOTIFID_FULLY_WAKING_UP: ::libc::c_uint = 261;
pub const PTMNOTIFID_FULLY_AWAKE: ::libc::c_uint = 262;
pub const PTMNOTIFID_HALF_AWAKE: ::libc::c_uint = 263;
pub const PTMNOTIFID_SHUTDOWN: ::libc::c_uint = 264;
pub const PTMNOTIFID_BATTERY_VERY_LOW: ::libc::c_uint = 529;
pub const PTMNOTIFID_BATTERY_LOW: ::libc::c_uint = 530;
pub type _bindgen_ty_27 = ::libc::c_uint;
extern "C" {
pub fn ptmSysmInit() -> Result;
}
extern "C" {
pub fn ptmSysmExit();
}
extern "C" {
pub fn PTMSYSM_RequestSleep() -> Result;
}
extern "C" {
pub fn PTMSYSM_ReplyToSleepQuery(deny: bool) -> Result;
}
extern "C" {
pub fn PTMSYSM_NotifySleepPreparationComplete(ackValue: s32) -> Result;
}
extern "C" {
pub fn PTMSYSM_SetWakeEvents(sleepConfig: *const PtmSleepConfig) -> Result;
}
extern "C" {
pub fn PTMSYSM_GetWakeReason(outSleepConfig: *mut PtmSleepConfig) -> Result;
}
extern "C" {
pub fn PTMSYSM_Awaken() -> Result;
}
extern "C" {
pub fn PTMSYSM_InvalidateSystemTime() -> Result;
}
extern "C" {
pub fn PTMSYSM_GetRtcTime(outMsY2k: *mut s64) -> Result;
}
extern "C" {
pub fn PTMSYSM_SetRtcTime(msY2k: s64) -> Result;
}
extern "C" {
pub fn PTMSYSM_CheckNew3DS() -> Result;
}
extern "C" {
pub fn PTMSYSM_ConfigureNew3DSCPU(value: u8_) -> Result;
}
extern "C" {
pub fn PTMSYSM_ShutdownAsync(timeout: u64_) -> Result;
}
extern "C" {
pub fn PTMSYSM_RebootAsync(timeout: u64_) -> Result;
}
pub const WAIT_NONE: PXIDEV_WaitType = 0;
pub const WAIT_SLEEP: PXIDEV_WaitType = 1;
pub const WAIT_IREQ_RETURN: PXIDEV_WaitType = 2;
pub const WAIT_IREQ_CONTINUE: PXIDEV_WaitType = 3;
pub type PXIDEV_WaitType = ::libc::c_uint;
pub const DEASSERT_NONE: PXIDEV_DeassertType = 0;
pub const DEASSERT_BEFORE_WAIT: PXIDEV_DeassertType = 1;
pub const DEASSERT_AFTER_WAIT: PXIDEV_DeassertType = 2;
pub type PXIDEV_DeassertType = ::libc::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct PXIDEV_SPIBuffer {
pub ptr: *mut ::libc::c_void,
pub size: u32_,
pub transferOption: u8_,
pub waitOperation: u64_,
}
impl Default for PXIDEV_SPIBuffer {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
extern "C" {
pub fn pxiDevInit() -> Result;
}
extern "C" {
pub fn pxiDevExit();
}
extern "C" {
pub fn PXIDEV_SPIMultiWriteRead(
header: *mut PXIDEV_SPIBuffer,
writeBuffer1: *mut PXIDEV_SPIBuffer,
readBuffer1: *mut PXIDEV_SPIBuffer,
writeBuffer2: *mut PXIDEV_SPIBuffer,
readBuffer2: *mut PXIDEV_SPIBuffer,
footer: *mut PXIDEV_SPIBuffer,
) -> Result;
}
extern "C" {
pub fn PXIDEV_SPIWriteRead(
bytesRead: *mut u32_,
initialWaitOperation: u64_,
writeBuffer: *mut PXIDEV_SPIBuffer,
readBuffer: *mut PXIDEV_SPIBuffer,
) -> Result;
}
extern "C" {
pub fn pxiPmInit() -> Result;
}
extern "C" {
pub fn pxiPmExit();
}
extern "C" {
pub fn pxiPmGetSessionHandle() -> *mut Handle;
}
extern "C" {
pub fn PXIPM_GetProgramInfo(exheaderInfo: *mut ExHeader_Info, programHandle: u64_) -> Result;
}
extern "C" {
pub fn PXIPM_RegisterProgram(
programHandle: *mut u64_,
programInfo: *const FS_ProgramInfo,
updateInfo: *const FS_ProgramInfo,
) -> Result;
}
extern "C" {
pub fn PXIPM_UnregisterProgram(programHandle: u64_) -> Result;
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct timezone {
pub tz_minuteswest: ::libc::c_int,
pub tz_dsttime: ::libc::c_int,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct bintime {
pub sec: time_t,
pub frac: u64,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct itimerval {
pub it_interval: timeval,
pub it_value: timeval,
}
pub type __ULong = ::libc::c_ulong;
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: ::libc::c_int,
pub _maxwds: ::libc::c_int,
pub _sign: ::libc::c_int,
pub _wds: ::libc::c_int,
pub _x: [__ULong; 1usize],
}
impl Default for _Bigint {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct __tm {
pub __tm_sec: ::libc::c_int,
pub __tm_min: ::libc::c_int,
pub __tm_hour: ::libc::c_int,
pub __tm_mday: ::libc::c_int,
pub __tm_mon: ::libc::c_int,
pub __tm_year: ::libc::c_int,
pub __tm_wday: ::libc::c_int,
pub __tm_yday: ::libc::c_int,
pub __tm_isdst: ::libc::c_int,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _on_exit_args {
pub _fnargs: [*mut ::libc::c_void; 32usize],
pub _dso_handle: [*mut ::libc::c_void; 32usize],
pub _fntypes: __ULong,
pub _is_cxa: __ULong,
}
impl Default for _on_exit_args {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _atexit {
pub _next: *mut _atexit,
pub _ind: ::libc::c_int,
pub _fns: [::core::option::Option<unsafe extern "C" fn()>; 32usize],
pub _on_exit_args: _on_exit_args,
}
impl Default for _atexit {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __sbuf {
pub _base: *mut ::libc::c_uchar,
pub _size: ::libc::c_int,
}
impl Default for __sbuf {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct __sFILE {
pub _p: *mut ::libc::c_uchar,
pub _r: ::libc::c_int,
pub _w: ::libc::c_int,
pub _flags: ::libc::c_short,
pub _file: ::libc::c_short,
pub _bf: __sbuf,
pub _lbfsize: ::libc::c_int,
pub _cookie: *mut ::libc::c_void,
pub _read: ::core::option::Option<
unsafe extern "C" fn(
arg1: *mut _reent,
arg2: *mut ::libc::c_void,
arg3: *mut ::libc::c_char,
arg4: ::libc::c_int,
) -> ::libc::c_int,
>,
pub _write: ::core::option::Option<
unsafe extern "C" fn(
arg1: *mut _reent,
arg2: *mut ::libc::c_void,
arg3: *const ::libc::c_char,
arg4: ::libc::c_int,
) -> ::libc::c_int,
>,
pub _seek: ::core::option::Option<
unsafe extern "C" fn(
arg1: *mut _reent,
arg2: *mut ::libc::c_void,
arg3: _fpos_t,
arg4: ::libc::c_int,
) -> _fpos_t,
>,
pub _close: ::core::option::Option<
unsafe extern "C" fn(arg1: *mut _reent, arg2: *mut ::libc::c_void) -> ::libc::c_int,
>,
pub _ub: __sbuf,
pub _up: *mut ::libc::c_uchar,
pub _ur: ::libc::c_int,
pub _ubuf: [::libc::c_uchar; 3usize],
pub _nbuf: [::libc::c_uchar; 1usize],
pub _lb: __sbuf,
pub _blksize: ::libc::c_int,
pub _offset: _off_t,
pub _data: *mut _reent,
pub _lock: _flock_t,
pub _mbstate: _mbstate_t,
pub _flags2: ::libc::c_int,
}
impl Default for __sFILE {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
pub type __FILE = __sFILE;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _glue {
pub _next: *mut _glue,
pub _niobs: ::libc::c_int,
pub _iobs: *mut __FILE,
}
impl Default for _glue {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct _rand48 {
pub _seed: [::libc::c_ushort; 3usize],
pub _mult: [::libc::c_ushort; 3usize],
pub _add: ::libc::c_ushort,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct _reent {
pub _errno: ::libc::c_int,
pub _stdin: *mut __FILE,
pub _stdout: *mut __FILE,
pub _stderr: *mut __FILE,
pub _inc: ::libc::c_int,
pub _emergency: [::libc::c_char; 25usize],
pub _unspecified_locale_info: ::libc::c_int,
pub _locale: *mut __locale_t,
pub __sdidinit: ::libc::c_int,
pub __cleanup: ::core::option::Option<unsafe extern "C" fn(arg1: *mut _reent)>,
pub _result: *mut _Bigint,
pub _result_k: ::libc::c_int,
pub _p5s: *mut _Bigint,
pub _freelist: *mut *mut _Bigint,
pub _cvtlen: ::libc::c_int,
pub _cvtbuf: *mut ::libc::c_char,
pub _new: _reent__bindgen_ty_1,
pub _atexit: *mut _atexit,
pub _atexit0: _atexit,
pub _sig_func: *mut ::core::option::Option<unsafe extern "C" fn(arg1: ::libc::c_int)>,
pub __sglue: _glue,
pub __sf: [__FILE; 3usize],
pub deviceData: *mut ::libc::c_void,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union _reent__bindgen_ty_1 {
pub _reent: _reent__bindgen_ty_1__bindgen_ty_1,
pub _unused: _reent__bindgen_ty_1__bindgen_ty_2,
_bindgen_union_align: [u64; 30usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct _reent__bindgen_ty_1__bindgen_ty_1 {
pub _unused_rand: ::libc::c_uint,
pub _strtok_last: *mut ::libc::c_char,
pub _asctime_buf: [::libc::c_char; 26usize],
pub _localtime_buf: __tm,
pub _gamma_signgam: ::libc::c_int,
pub _rand_next: ::libc::c_ulonglong,
pub _r48: _rand48,
pub _mblen_state: _mbstate_t,
pub _mbtowc_state: _mbstate_t,
pub _wctomb_state: _mbstate_t,
pub _l64a_buf: [::libc::c_char; 8usize],
pub _signal_buf: [::libc::c_char; 24usize],
pub _getdate_err: ::libc::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: ::libc::c_int,
}
impl Default for _reent__bindgen_ty_1__bindgen_ty_1 {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct _reent__bindgen_ty_1__bindgen_ty_2 {
pub _nextf: [*mut ::libc::c_uchar; 30usize],
pub _nmalloc: [::libc::c_uint; 30usize],
}
impl Default for _reent__bindgen_ty_1__bindgen_ty_2 {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
impl Default for _reent__bindgen_ty_1 {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
impl Default for _reent {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
extern "C" {
pub static mut _impure_ptr: *mut _reent;
}
extern "C" {
pub static _global_impure_ptr: *mut _reent;
}
extern "C" {
pub fn _reclaim_reent(arg1: *mut _reent);
}
extern "C" {
pub fn __getreent() -> *mut _reent;
}
pub type locale_t = *mut __locale_t;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct tm {
pub tm_sec: ::libc::c_int,
pub tm_min: ::libc::c_int,
pub tm_hour: ::libc::c_int,
pub tm_mday: ::libc::c_int,
pub tm_mon: ::libc::c_int,
pub tm_year: ::libc::c_int,
pub tm_wday: ::libc::c_int,
pub tm_yday: ::libc::c_int,
pub tm_isdst: ::libc::c_int,
}
extern "C" {
pub fn clock() -> clock_t;
}
extern "C" {
pub fn difftime(_time2: time_t, _time1: time_t) -> f64;
}
extern "C" {
pub fn mktime(_timeptr: *mut tm) -> time_t;
}
extern "C" {
pub fn time(_timer: *mut time_t) -> time_t;
}
extern "C" {
pub fn asctime(_tblock: *const tm) -> *mut ::libc::c_char;
}
extern "C" {
pub fn ctime(_time: *const time_t) -> *mut ::libc::c_char;
}
extern "C" {
pub fn gmtime(_timer: *const time_t) -> *mut tm;
}
extern "C" {
pub fn localtime(_timer: *const time_t) -> *mut tm;
}
extern "C" {
pub fn strftime(
_s: *mut ::libc::c_char,
_maxsize: size_t,
_fmt: *const ::libc::c_char,
_t: *const tm,
) -> size_t;
}
extern "C" {
pub fn strftime_l(
_s: *mut ::libc::c_char,
_maxsize: size_t,
_fmt: *const ::libc::c_char,
_t: *const tm,
_l: locale_t,
) -> size_t;
}
extern "C" {
pub fn asctime_r(arg1: *const tm, arg2: *mut ::libc::c_char) -> *mut ::libc::c_char;
}
extern "C" {
pub fn ctime_r(arg1: *const time_t, arg2: *mut ::libc::c_char) -> *mut ::libc::c_char;
}
extern "C" {
pub fn gmtime_r(arg1: *const time_t, arg2: *mut tm) -> *mut tm;
}
extern "C" {
pub fn localtime_r(arg1: *const time_t, arg2: *mut tm) -> *mut tm;
}
extern "C" {
pub fn tzset();
}
extern "C" {
pub fn _tzset_r(arg1: *mut _reent);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct __tzrule_struct {
pub ch: ::libc::c_char,
pub m: ::libc::c_int,
pub n: ::libc::c_int,
pub d: ::libc::c_int,
pub s: ::libc::c_int,
pub change: time_t,
pub offset: ::libc::c_long,
}
pub type __tzrule_type = __tzrule_struct;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct __tzinfo_struct {
pub __tznorth: ::libc::c_int,
pub __tzyear: ::libc::c_int,
pub __tzrule: [__tzrule_type; 2usize],
}
pub type __tzinfo_type = __tzinfo_struct;
extern "C" {
pub fn __gettzinfo() -> *mut __tzinfo_type;
}
extern "C" {
pub static mut _timezone: ::libc::c_long;
}
extern "C" {
pub static mut _daylight: ::libc::c_int;
}
extern "C" {
pub static mut _tzname: [*mut ::libc::c_char; 2usize];
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union sigval {
pub sival_int: ::libc::c_int,
pub sival_ptr: *mut ::libc::c_void,
_bindgen_union_align: u32,
}
impl Default for sigval {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct sigevent {
pub sigev_notify: ::libc::c_int,
pub sigev_signo: ::libc::c_int,
pub sigev_value: sigval,
}
impl Default for sigevent {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct siginfo_t {
pub si_signo: ::libc::c_int,
pub si_code: ::libc::c_int,
pub si_value: sigval,
}
impl Default for siginfo_t {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
pub type _sig_func_ptr = ::core::option::Option<unsafe extern "C" fn(arg1: ::libc::c_int)>;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct sigaction {
pub sa_handler: _sig_func_ptr,
pub sa_mask: sigset_t,
pub sa_flags: ::libc::c_int,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct sigaltstack {
pub ss_sp: *mut ::libc::c_void,
pub ss_flags: ::libc::c_int,
pub ss_size: size_t,
}
impl Default for sigaltstack {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
pub type stack_t = sigaltstack;
extern "C" {
pub fn sigprocmask(
arg1: ::libc::c_int,
arg2: *const sigset_t,
arg3: *mut sigset_t,
) -> ::libc::c_int;
}
extern "C" {
pub fn pthread_sigmask(
arg1: ::libc::c_int,
arg2: *const sigset_t,
arg3: *mut sigset_t,
) -> ::libc::c_int;
}
extern "C" {
pub fn kill(arg1: pid_t, arg2: ::libc::c_int) -> ::libc::c_int;
}
extern "C" {
pub fn killpg(arg1: pid_t, arg2: ::libc::c_int) -> ::libc::c_int;
}
extern "C" {
pub fn sigaction(
arg1: ::libc::c_int,
arg2: *const sigaction,
arg3: *mut sigaction,
) -> ::libc::c_int;
}
extern "C" {
pub fn sigaddset(arg1: *mut sigset_t, arg2: ::libc::c_int) -> ::libc::c_int;
}
extern "C" {
pub fn sigdelset(arg1: *mut sigset_t, arg2: ::libc::c_int) -> ::libc::c_int;
}
extern "C" {
pub fn sigismember(arg1: *const sigset_t, arg2: ::libc::c_int) -> ::libc::c_int;
}
extern "C" {
pub fn sigfillset(arg1: *mut sigset_t) -> ::libc::c_int;
}
extern "C" {
pub fn sigemptyset(arg1: *mut sigset_t) -> ::libc::c_int;
}
extern "C" {
pub fn sigpending(arg1: *mut sigset_t) -> ::libc::c_int;
}
extern "C" {
pub fn sigsuspend(arg1: *const sigset_t) -> ::libc::c_int;
}
extern "C" {
pub fn sigwait(arg1: *const sigset_t, arg2: *mut ::libc::c_int) -> ::libc::c_int;
}
extern "C" {
pub fn sigpause(arg1: ::libc::c_int) -> ::libc::c_int;
}
extern "C" {
pub fn sigaltstack(arg1: *const stack_t, arg2: *mut stack_t) -> ::libc::c_int;
}
extern "C" {
pub fn pthread_kill(arg1: pthread_t, arg2: ::libc::c_int) -> ::libc::c_int;
}
extern "C" {
pub fn sigwaitinfo(arg1: *const sigset_t, arg2: *mut siginfo_t) -> ::libc::c_int;
}
extern "C" {
pub fn sigtimedwait(
arg1: *const sigset_t,
arg2: *mut siginfo_t,
arg3: *const timespec,
) -> ::libc::c_int;
}
extern "C" {
pub fn sigqueue(arg1: pid_t, arg2: ::libc::c_int, arg3: sigval) -> ::libc::c_int;
}
pub type sig_atomic_t = ::libc::c_int;
pub type sig_t = _sig_func_ptr;
extern "C" {
pub fn _signal_r(arg1: *mut _reent, arg2: ::libc::c_int, arg3: _sig_func_ptr) -> _sig_func_ptr;
}
extern "C" {
pub fn _raise_r(arg1: *mut _reent, arg2: ::libc::c_int) -> ::libc::c_int;
}
extern "C" {
pub fn signal(arg1: ::libc::c_int, arg2: _sig_func_ptr) -> _sig_func_ptr;
}
extern "C" {
pub fn raise(arg1: ::libc::c_int) -> ::libc::c_int;
}
extern "C" {
pub fn psignal(arg1: ::libc::c_int, arg2: *const ::libc::c_char);
}
extern "C" {
pub fn clock_settime(clock_id: clockid_t, tp: *const timespec) -> ::libc::c_int;
}
extern "C" {
pub fn clock_gettime(clock_id: clockid_t, tp: *mut timespec) -> ::libc::c_int;
}
extern "C" {
pub fn clock_getres(clock_id: clockid_t, res: *mut timespec) -> ::libc::c_int;
}
extern "C" {
pub fn timer_create(
clock_id: clockid_t,
evp: *mut sigevent,
timerid: *mut timer_t,
) -> ::libc::c_int;
}
extern "C" {
pub fn timer_delete(timerid: timer_t) -> ::libc::c_int;
}
extern "C" {
pub fn timer_settime(
timerid: timer_t,
flags: ::libc::c_int,
value: *const itimerspec,
ovalue: *mut itimerspec,
) -> ::libc::c_int;
}
extern "C" {
pub fn timer_gettime(timerid: timer_t, value: *mut itimerspec) -> ::libc::c_int;
}
extern "C" {
pub fn timer_getoverrun(timerid: timer_t) -> ::libc::c_int;
}
extern "C" {
pub fn nanosleep(rqtp: *const timespec, rmtp: *mut timespec) -> ::libc::c_int;
}
extern "C" {
pub fn utimes(__path: *const ::libc::c_char, __tvp: *const timeval) -> ::libc::c_int;
}
extern "C" {
pub fn adjtime(arg1: *const timeval, arg2: *mut timeval) -> ::libc::c_int;
}
extern "C" {
pub fn futimes(arg1: ::libc::c_int, arg2: *const timeval) -> ::libc::c_int;
}
extern "C" {
pub fn lutimes(arg1: *const ::libc::c_char, arg2: *const timeval) -> ::libc::c_int;
}
extern "C" {
pub fn settimeofday(arg1: *const timeval, arg2: *const timezone) -> ::libc::c_int;
}
extern "C" {
pub fn getitimer(__which: ::libc::c_int, __value: *mut itimerval) -> ::libc::c_int;
}
extern "C" {
pub fn setitimer(
__which: ::libc::c_int,
__value: *const itimerval,
__ovalue: *mut itimerval,
) -> ::libc::c_int;
}
extern "C" {
pub fn gettimeofday(__p: *mut timeval, __tz: *mut ::libc::c_void) -> ::libc::c_int;
}
pub type socklen_t = u32;
pub type sa_family_t = u16;
#[repr(C)]
#[derive(Debug, Default)]
pub struct sockaddr {
pub sa_family: sa_family_t,
pub sa_data: __IncompleteArrayField<::libc::c_char>,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct sockaddr_storage {
pub ss_family: sa_family_t,
pub __ss_padding: [::libc::c_char; 26usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct linger {
pub l_onoff: ::libc::c_int,
pub l_linger: ::libc::c_int,
}
extern "C" {
pub fn accept(
sockfd: ::libc::c_int,
addr: *mut sockaddr,
addrlen: *mut socklen_t,
) -> ::libc::c_int;
}
extern "C" {
pub fn bind(sockfd: ::libc::c_int, addr: *const sockaddr, addrlen: socklen_t) -> ::libc::c_int;
}
extern "C" {
pub fn closesocket(sockfd: ::libc::c_int) -> ::libc::c_int;
}
extern "C" {
pub fn connect(
sockfd: ::libc::c_int,
addr: *const sockaddr,
addrlen: socklen_t,
) -> ::libc::c_int;
}
extern "C" {
pub fn getpeername(
sockfd: ::libc::c_int,
addr: *mut sockaddr,
addrlen: *mut socklen_t,
) -> ::libc::c_int;
}
extern "C" {
pub fn getsockname(
sockfd: ::libc::c_int,
addr: *mut sockaddr,
addrlen: *mut socklen_t,
) -> ::libc::c_int;
}
extern "C" {
pub fn getsockopt(
sockfd: ::libc::c_int,
level: ::libc::c_int,
optname: ::libc::c_int,
optval: *mut ::libc::c_void,
optlen: *mut socklen_t,
) -> ::libc::c_int;
}
extern "C" {
pub fn listen(sockfd: ::libc::c_int, backlog: ::libc::c_int) -> ::libc::c_int;
}
extern "C" {
pub fn recv(
sockfd: ::libc::c_int,
buf: *mut ::libc::c_void,
len: size_t,
flags: ::libc::c_int,
) -> ssize_t;
}
extern "C" {
pub fn recvfrom(
sockfd: ::libc::c_int,
buf: *mut ::libc::c_void,
len: size_t,
flags: ::libc::c_int,
src_addr: *mut sockaddr,
addrlen: *mut socklen_t,
) -> ssize_t;
}
extern "C" {
pub fn send(
sockfd: ::libc::c_int,
buf: *const ::libc::c_void,
len: size_t,
flags: ::libc::c_int,
) -> ssize_t;
}
extern "C" {
pub fn sendto(
sockfd: ::libc::c_int,
buf: *const ::libc::c_void,
len: size_t,
flags: ::libc::c_int,
dest_addr: *const sockaddr,
addrlen: socklen_t,
) -> ssize_t;
}
extern "C" {
pub fn setsockopt(
sockfd: ::libc::c_int,
level: ::libc::c_int,
optname: ::libc::c_int,
optval: *const ::libc::c_void,
optlen: socklen_t,
) -> ::libc::c_int;
}
extern "C" {
pub fn shutdown(sockfd: ::libc::c_int, how: ::libc::c_int) -> ::libc::c_int;
}
extern "C" {
pub fn socket(
domain: ::libc::c_int,
type_: ::libc::c_int,
protocol: ::libc::c_int,
) -> ::libc::c_int;
}
extern "C" {
pub fn sockatmark(sockfd: ::libc::c_int) -> ::libc::c_int;
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct in_addr {
pub s_addr: in_addr_t,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct sockaddr_in {
pub sin_family: sa_family_t,
pub sin_port: in_port_t,
pub sin_addr: in_addr,
pub sin_zero: [::libc::c_uchar; 8usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct ip_mreq {
pub imr_multiaddr: in_addr,
pub imr_interface: in_addr,
}
pub const NETOPT_MAC_ADDRESS: NetworkOpt = 4100;
pub const NETOPT_ARP_TABLE: NetworkOpt = 12290;
pub const NETOPT_IP_INFO: NetworkOpt = 16387;
pub const NETOPT_IP_MTU: NetworkOpt = 16388;
pub const NETOPT_ROUTING_TABLE: NetworkOpt = 16390;
pub const NETOPT_UDP_NUMBER: NetworkOpt = 32770;
pub const NETOPT_UDP_TABLE: NetworkOpt = 32771;
pub const NETOPT_TCP_NUMBER: NetworkOpt = 36866;
pub const NETOPT_TCP_TABLE: NetworkOpt = 36867;
pub const NETOPT_DNS_TABLE: NetworkOpt = 45059;
pub const NETOPT_DHCP_LEASE_TIME: NetworkOpt = 49153;
pub type NetworkOpt = ::libc::c_uint;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct SOCU_ARPTableEntry {
pub unk0: u32_,
pub ip: in_addr,
pub mac: [u8_; 6usize],
pub padding: [u8_; 2usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct SOCU_IPInfo {
pub ip: in_addr,
pub netmask: in_addr,
pub broadcast: in_addr,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct SOCU_RoutingTableEntry {
pub dest_ip: in_addr,
pub netmask: in_addr,
pub gateway: in_addr,
pub flags: u32_,
pub time: u64_,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct SOCU_UDPTableEntry {
pub local: sockaddr_storage,
pub remote: sockaddr_storage,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct SOCU_TCPTableEntry {
pub state: u32_,
pub local: sockaddr_storage,
pub remote: sockaddr_storage,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct SOCU_DNSTableEntry {
pub family: u32_,
pub ip: in_addr,
pub padding: [u8_; 12usize],
}
extern "C" {
pub fn socInit(context_addr: *mut u32_, context_size: u32_) -> Result;
}
extern "C" {
pub fn socExit() -> Result;
}
extern "C" {
pub fn gethostid() -> ::libc::c_long;
}
extern "C" {
pub fn gethostname(name: *mut ::libc::c_char, namelen: size_t) -> ::libc::c_int;
}
extern "C" {
pub fn SOCU_ShutdownSockets() -> ::libc::c_int;
}
extern "C" {
pub fn SOCU_CloseSockets() -> ::libc::c_int;
}
extern "C" {
pub fn SOCU_GetNetworkOpt(
level: ::libc::c_int,
optname: NetworkOpt,
optval: *mut ::libc::c_void,
optlen: *mut socklen_t,
) -> ::libc::c_int;
}
extern "C" {
pub fn SOCU_GetIPInfo(
ip: *mut in_addr,
netmask: *mut in_addr,
broadcast: *mut in_addr,
) -> ::libc::c_int;
}
extern "C" {
pub fn SOCU_AddGlobalSocket(sockfd: ::libc::c_int) -> ::libc::c_int;
}
pub const MICU_ENCODING_PCM8: MICU_Encoding = 0;
pub const MICU_ENCODING_PCM16: MICU_Encoding = 1;
pub const MICU_ENCODING_PCM8_SIGNED: MICU_Encoding = 2;
pub const MICU_ENCODING_PCM16_SIGNED: MICU_Encoding = 3;
pub type MICU_Encoding = ::libc::c_uint;
pub const MICU_SAMPLE_RATE_32730: MICU_SampleRate = 0;
pub const MICU_SAMPLE_RATE_16360: MICU_SampleRate = 1;
pub const MICU_SAMPLE_RATE_10910: MICU_SampleRate = 2;
pub const MICU_SAMPLE_RATE_8180: MICU_SampleRate = 3;
pub type MICU_SampleRate = ::libc::c_uint;
extern "C" {
pub fn micInit(buffer: *mut u8_, bufferSize: u32_) -> Result;
}
extern "C" {
pub fn micExit();
}
extern "C" {
pub fn micGetSampleDataSize() -> u32_;
}
extern "C" {
pub fn micGetLastSampleOffset() -> u32_;
}
extern "C" {
pub fn MICU_MapSharedMem(size: u32_, handle: Handle) -> Result;
}
extern "C" {
pub fn MICU_UnmapSharedMem() -> Result;
}
extern "C" {
pub fn MICU_StartSampling(
encoding: MICU_Encoding,
sampleRate: MICU_SampleRate,
offset: u32_,
size: u32_,
loop_: bool,
) -> Result;
}
extern "C" {
pub fn MICU_AdjustSampling(sampleRate: MICU_SampleRate) -> Result;
}
extern "C" {
pub fn MICU_StopSampling() -> Result;
}
extern "C" {
pub fn MICU_IsSampling(sampling: *mut bool) -> Result;
}
extern "C" {
pub fn MICU_GetEventHandle(handle: *mut Handle) -> Result;
}
extern "C" {
pub fn MICU_SetGain(gain: u8_) -> Result;
}
extern "C" {
pub fn MICU_GetGain(gain: *mut u8_) -> Result;
}
extern "C" {
pub fn MICU_SetPower(power: bool) -> Result;
}
extern "C" {
pub fn MICU_GetPower(power: *mut bool) -> Result;
}
extern "C" {
pub fn MICU_SetClamp(clamp: bool) -> Result;
}
extern "C" {
pub fn MICU_GetClamp(clamp: *mut bool) -> Result;
}
extern "C" {
pub fn MICU_SetAllowShellClosed(allowShellClosed: bool) -> Result;
}
pub const MVDMODE_COLORFORMATCONV: MVDSTD_Mode = 0;
pub const MVDMODE_VIDEOPROCESSING: MVDSTD_Mode = 1;
pub type MVDSTD_Mode = ::libc::c_uint;
pub const MVD_INPUT_YUYV422: MVDSTD_InputFormat = 65537;
pub const MVD_INPUT_H264: MVDSTD_InputFormat = 131073;
pub type MVDSTD_InputFormat = ::libc::c_uint;
pub const MVD_OUTPUT_YUYV422: MVDSTD_OutputFormat = 65537;
pub const MVD_OUTPUT_BGR565: MVDSTD_OutputFormat = 262146;
pub const MVD_OUTPUT_RGB565: MVDSTD_OutputFormat = 262148;
pub type MVDSTD_OutputFormat = ::libc::c_uint;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct MVDSTD_Config {
pub input_type: MVDSTD_InputFormat,
pub unk_x04: u32_,
pub unk_x08: u32_,
pub inwidth: u32_,
pub inheight: u32_,
pub physaddr_colorconv_indata: u32_,
pub physaddr_colorconv_unk0: u32_,
pub physaddr_colorconv_unk1: u32_,
pub physaddr_colorconv_unk2: u32_,
pub physaddr_colorconv_unk3: u32_,
pub unk_x28: [u32_; 6usize],
pub enable_cropping: u32_,
pub input_crop_x_pos: u32_,
pub input_crop_y_pos: u32_,
pub input_crop_height: u32_,
pub input_crop_width: u32_,
pub unk_x54: u32_,
pub output_type: MVDSTD_OutputFormat,
pub outwidth: u32_,
pub outheight: u32_,
pub physaddr_outdata0: u32_,
pub physaddr_outdata1: u32_,
pub unk_x6c: [u32_; 38usize],
pub flag_x104: u32_,
pub output_x_pos: u32_,
pub output_y_pos: u32_,
pub output_width_override: u32_,
pub output_height_override: u32_,
pub unk_x118: u32_,
}
impl Default for MVDSTD_Config {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct MVDSTD_ProcessNALUnitOut {
pub end_vaddr: u32_,
pub end_physaddr: u32_,
pub remaining_size: u32_,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MVDSTD_OutputBuffersEntry {
pub outdata0: *mut ::libc::c_void,
pub outdata1: *mut ::libc::c_void,
}
impl Default for MVDSTD_OutputBuffersEntry {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct MVDSTD_OutputBuffersEntryList {
pub total_entries: u32_,
pub entries: [MVDSTD_OutputBuffersEntry; 17usize],
}
impl Default for MVDSTD_OutputBuffersEntryList {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct MVDSTD_InitStruct {
pub cmd5_inval0: s8,
pub cmd5_inval1: s8,
pub cmd5_inval2: s8,
pub cmd5_inval3: u32_,
pub cmd1b_inval: u8_,
}
extern "C" {
pub fn mvdstdInit(
mode: MVDSTD_Mode,
input_type: MVDSTD_InputFormat,
output_type: MVDSTD_OutputFormat,
size: u32_,
initstruct: *mut MVDSTD_InitStruct,
) -> Result;
}
extern "C" {
pub fn mvdstdExit();
}
extern "C" {
pub fn mvdstdGenerateDefaultConfig(
config: *mut MVDSTD_Config,
input_width: u32_,
input_height: u32_,
output_width: u32_,
output_height: u32_,
vaddr_colorconv_indata: *mut u32_,
vaddr_outdata0: *mut u32_,
vaddr_outdata1: *mut u32_,
);
}
extern "C" {
pub fn mvdstdConvertImage(config: *mut MVDSTD_Config) -> Result;
}
extern "C" {
pub fn mvdstdProcessVideoFrame(
inbuf_vaddr: *mut ::libc::c_void,
size: size_t,
flag: u32_,
out: *mut MVDSTD_ProcessNALUnitOut,
) -> Result;
}
extern "C" {
pub fn mvdstdRenderVideoFrame(config: *mut MVDSTD_Config, wait: bool) -> Result;
}
extern "C" {
pub fn MVDSTD_SetConfig(config: *mut MVDSTD_Config) -> Result;
}
extern "C" {
pub fn mvdstdSetupOutputBuffers(
entrylist: *mut MVDSTD_OutputBuffersEntryList,
bufsize: u32_,
) -> Result;
}
extern "C" {
pub fn mvdstdOverrideOutputBuffers(
cur_outdata0: *mut ::libc::c_void,
cur_outdata1: *mut ::libc::c_void,
new_outdata0: *mut ::libc::c_void,
new_outdata1: *mut ::libc::c_void,
) -> Result;
}
pub const NFC_OpType_1: NFC_OpType = 1;
pub const NFC_OpType_NFCTag: NFC_OpType = 2;
pub const NFC_OpType_RawNFC: NFC_OpType = 3;
pub type NFC_OpType = ::libc::c_uint;
pub const NFC_TagState_Uninitialized: NFC_TagState = 0;
pub const NFC_TagState_ScanningStopped: NFC_TagState = 1;
pub const NFC_TagState_Scanning: NFC_TagState = 2;
pub const NFC_TagState_InRange: NFC_TagState = 3;
pub const NFC_TagState_OutOfRange: NFC_TagState = 4;
pub const NFC_TagState_DataReady: NFC_TagState = 5;
pub type NFC_TagState = ::libc::c_uint;
pub const NFC_amiiboFlag_Setup: ::libc::c_uint = 16;
pub const NFC_amiiboFlag_AppDataSetup: ::libc::c_uint = 32;
pub type _bindgen_ty_28 = ::libc::c_uint;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct NFC_TagInfo {
pub id_offset_size: u16_,
pub unk_x2: u8_,
pub unk_x3: u8_,
pub id: [u8_; 40usize],
}
impl Default for NFC_TagInfo {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct NFC_AmiiboSettings {
pub mii: [u8_; 96usize],
pub nickname: [u16_; 11usize],
pub flags: u8_,
pub countrycodeid: u8_,
pub setupdate_year: u16_,
pub setupdate_month: u8_,
pub setupdate_day: u8_,
pub unk_x7c: [u8_; 44usize],
}
impl Default for NFC_AmiiboSettings {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct NFC_AmiiboConfig {
pub lastwritedate_year: u16_,
pub lastwritedate_month: u8_,
pub lastwritedate_day: u8_,
pub write_counter: u16_,
pub characterID: [u8_; 3usize],
pub series: u8_,
pub amiiboID: u16_,
pub type_: u8_,
pub pagex4_byte3: u8_,
pub appdata_size: u16_,
pub zeros: [u8_; 48usize],
}
impl Default for NFC_AmiiboConfig {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct NFC_AppDataInitStruct {
pub data_x0: [u8_; 12usize],
pub data_xc: [u8_; 48usize],
}
impl Default for NFC_AppDataInitStruct {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct NFC_AppDataWriteStruct {
pub id: [u8_; 10usize],
pub id_size: u8_,
pub unused_xb: [u8_; 21usize],
}
extern "C" {
pub fn nfcInit(type_: NFC_OpType) -> Result;
}
extern "C" {
pub fn nfcExit();
}
extern "C" {
pub fn nfcGetSessionHandle() -> Handle;
}
extern "C" {
pub fn nfcStartScanning(inval: u16_) -> Result;
}
extern "C" {
pub fn nfcStopScanning();
}
extern "C" {
pub fn nfcLoadAmiiboData() -> Result;
}
extern "C" {
pub fn nfcResetTagScanState() -> Result;
}
extern "C" {
pub fn nfcUpdateStoredAmiiboData() -> Result;
}
extern "C" {
pub fn nfcGetTagState(state: *mut NFC_TagState) -> Result;
}
extern "C" {
pub fn nfcGetTagInfo(out: *mut NFC_TagInfo) -> Result;
}
extern "C" {
pub fn nfcOpenAppData(amiibo_appid: u32_) -> Result;
}
extern "C" {
pub fn nfcInitializeWriteAppData(
amiibo_appid: u32_,
buf: *const ::libc::c_void,
size: size_t,
) -> Result;
}
extern "C" {
pub fn nfcReadAppData(buf: *mut ::libc::c_void, size: size_t) -> Result;
}
extern "C" {
pub fn nfcWriteAppData(
buf: *const ::libc::c_void,
size: size_t,
taginfo: *mut NFC_TagInfo,
) -> Result;
}
extern "C" {
pub fn nfcGetAmiiboSettings(out: *mut NFC_AmiiboSettings) -> Result;
}
extern "C" {
pub fn nfcGetAmiiboConfig(out: *mut NFC_AmiiboConfig) -> Result;
}
extern "C" {
pub fn nfcStartOtherTagScanning(unk0: u16_, unk1: u32_) -> Result;
}
extern "C" {
pub fn nfcSendTagCommand(
inbuf: *const ::libc::c_void,
insize: size_t,
outbuf: *mut ::libc::c_void,
outsize: size_t,
actual_transfer_size: *mut size_t,
microseconds: u64_,
) -> Result;
}
extern "C" {
pub fn nfcCmd21() -> Result;
}
extern "C" {
pub fn nfcCmd22() -> Result;
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct NotificationHeader {
pub dataSet: bool,
pub unread: bool,
pub enableJPEG: bool,
pub isSpotPass: bool,
pub isOptedOut: bool,
pub unkData: [u8_; 3usize],
pub processID: u64_,
pub unkData2: [u8_; 8usize],
pub jumpParam: u64_,
pub unkData3: [u8_; 8usize],
pub time: u64_,
pub title: [u16_; 32usize],
}
extern "C" {
pub fn newsInit() -> Result;
}
extern "C" {
pub fn newsExit();
}
extern "C" {
pub fn NEWS_AddNotification(
title: *const u16_,
titleLength: u32_,
message: *const u16_,
messageLength: u32_,
imageData: *const ::libc::c_void,
imageSize: u32_,
jpeg: bool,
) -> Result;
}
extern "C" {
pub fn NEWS_GetTotalNotifications(num: *mut u32_) -> Result;
}
extern "C" {
pub fn NEWS_SetNotificationHeader(news_id: u32_, header: *const NotificationHeader) -> Result;
}
extern "C" {
pub fn NEWS_GetNotificationHeader(news_id: u32_, header: *mut NotificationHeader) -> Result;
}
extern "C" {
pub fn NEWS_SetNotificationMessage(news_id: u32_, message: *const u16_, size: u32_) -> Result;
}
extern "C" {
pub fn NEWS_GetNotificationMessage(
news_id: u32_,
message: *mut u16_,
size: *mut u32_,
) -> Result;
}
extern "C" {
pub fn NEWS_SetNotificationImage(
news_id: u32_,
buffer: *const ::libc::c_void,
size: u32_,
) -> Result;
}
extern "C" {
pub fn NEWS_GetNotificationImage(
news_id: u32_,
buffer: *mut ::libc::c_void,
size: *mut u32_,
) -> Result;
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct QTM_HeadTrackingInfoCoord {
pub x: f32,
pub y: f32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct QTM_HeadTrackingInfo {
pub flags: [u8_; 5usize],
pub padding: [u8_; 3usize],
pub floatdata_x08: f32,
pub coords0: [QTM_HeadTrackingInfoCoord; 4usize],
pub unk_x2c: [u32_; 5usize],
}
extern "C" {
pub fn qtmInit() -> Result;
}
extern "C" {
pub fn qtmExit();
}
extern "C" {
pub fn qtmCheckInitialized() -> bool;
}
extern "C" {
pub fn qtmCheckHeadFullyDetected(info: *mut QTM_HeadTrackingInfo) -> bool;
}
extern "C" {
pub fn qtmConvertCoordToScreen(
coord: *mut QTM_HeadTrackingInfoCoord,
screen_width: *mut f32,
screen_height: *mut f32,
x: *mut u32_,
y: *mut u32_,
) -> Result;
}
extern "C" {
pub fn QTM_GetHeadTrackingInfo(val: u64_, out: *mut QTM_HeadTrackingInfo) -> Result;
}
extern "C" {
pub fn srvPmInit() -> Result;
}
extern "C" {
pub fn srvPmExit();
}
extern "C" {
pub fn srvPmGetSessionHandle() -> *mut Handle;
}
extern "C" {
pub fn SRVPM_PublishToProcess(notificationId: u32_, process: Handle) -> Result;
}
extern "C" {
pub fn SRVPM_PublishToAll(notificationId: u32_) -> Result;
}
extern "C" {
pub fn SRVPM_RegisterProcess(
pid: u32_,
count: u32_,
serviceAccessControlList: *const [::libc::c_char; 8usize],
) -> Result;
}
extern "C" {
pub fn SRVPM_UnregisterProcess(pid: u32_) -> Result;
}
extern "C" {
pub fn loaderInit() -> Result;
}
extern "C" {
pub fn loaderExit();
}
extern "C" {
pub fn LOADER_LoadProcess(process: *mut Handle, programHandle: u64_) -> Result;
}
extern "C" {
pub fn LOADER_RegisterProgram(
programHandle: *mut u64_,
programInfo: *const FS_ProgramInfo,
programInfoUpdate: *const FS_ProgramInfo,
) -> Result;
}
extern "C" {
pub fn LOADER_UnregisterProgram(programHandle: u64_) -> Result;
}
extern "C" {
pub fn LOADER_GetProgramInfo(exheaderInfo: *mut ExHeader_Info, programHandle: u64_) -> Result;
}
pub const LED_NORMAL: powerLedState = 1;
pub const LED_SLEEP_MODE: powerLedState = 2;
pub const LED_OFF: powerLedState = 3;
pub const LED_RED: powerLedState = 4;
pub const LED_BLUE: powerLedState = 5;
pub const LED_BLINK_RED: powerLedState = 6;
pub type powerLedState = ::libc::c_uint;
extern "C" {
pub fn mcuHwcInit() -> Result;
}
extern "C" {
pub fn mcuHwcExit();
}
extern "C" {
pub fn MCUHWC_ReadRegister(reg: u8_, data: *mut ::libc::c_void, size: u32_) -> Result;
}
extern "C" {
pub fn MCUHWC_WriteRegister(reg: u8_, data: *const ::libc::c_void, size: u32_) -> Result;
}
extern "C" {
pub fn MCUHWC_GetBatteryVoltage(voltage: *mut u8_) -> Result;
}
extern "C" {
pub fn MCUHWC_GetBatteryLevel(level: *mut u8_) -> Result;
}
extern "C" {
pub fn MCUHWC_GetSoundSliderLevel(level: *mut u8_) -> Result;
}
extern "C" {
pub fn MCUHWC_SetWifiLedState(state: bool) -> Result;
}
extern "C" {
pub fn MCUHWC_SetPowerLedState(state: powerLedState) -> Result;
}
extern "C" {
pub fn MCUHWC_Get3dSliderLevel(level: *mut u8_) -> Result;
}
extern "C" {
pub fn MCUHWC_GetFwVerHigh(out: *mut u8_) -> Result;
}
extern "C" {
pub fn MCUHWC_GetFwVerLow(out: *mut u8_) -> Result;
}
pub const GX_TRANSFER_FMT_RGBA8: GX_TRANSFER_FORMAT = 0;
pub const GX_TRANSFER_FMT_RGB8: GX_TRANSFER_FORMAT = 1;
pub const GX_TRANSFER_FMT_RGB565: GX_TRANSFER_FORMAT = 2;
pub const GX_TRANSFER_FMT_RGB5A1: GX_TRANSFER_FORMAT = 3;
pub const GX_TRANSFER_FMT_RGBA4: GX_TRANSFER_FORMAT = 4;
pub type GX_TRANSFER_FORMAT = ::libc::c_uint;
pub const GX_TRANSFER_SCALE_NO: GX_TRANSFER_SCALE = 0;
pub const GX_TRANSFER_SCALE_X: GX_TRANSFER_SCALE = 1;
pub const GX_TRANSFER_SCALE_XY: GX_TRANSFER_SCALE = 2;
pub type GX_TRANSFER_SCALE = ::libc::c_uint;
pub const GX_FILL_TRIGGER: GX_FILL_CONTROL = 1;
pub const GX_FILL_FINISHED: GX_FILL_CONTROL = 2;
pub const GX_FILL_16BIT_DEPTH: GX_FILL_CONTROL = 0;
pub const GX_FILL_24BIT_DEPTH: GX_FILL_CONTROL = 256;
pub const GX_FILL_32BIT_DEPTH: GX_FILL_CONTROL = 512;
pub type GX_FILL_CONTROL = ::libc::c_uint;
#[repr(C)]
#[derive(Copy, Clone)]
pub union gxCmdEntry_s {
pub data: [u32_; 8usize],
pub __bindgen_anon_1: gxCmdEntry_s__bindgen_ty_1,
_bindgen_union_align: [u32; 8usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct gxCmdEntry_s__bindgen_ty_1 {
pub type_: u8_,
pub unk1: u8_,
pub unk2: u8_,
pub unk3: u8_,
pub args: [u32_; 7usize],
}
impl Default for gxCmdEntry_s {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct tag_gxCmdQueue_s {
pub entries: *mut gxCmdEntry_s,
pub maxEntries: u16_,
pub numEntries: u16_,
pub curEntry: u16_,
pub lastEntry: u16_,
pub callback: ::core::option::Option<unsafe extern "C" fn(arg1: *mut tag_gxCmdQueue_s)>,
pub user: *mut ::libc::c_void,
}
impl Default for tag_gxCmdQueue_s {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
pub type gxCmdQueue_s = tag_gxCmdQueue_s;
extern "C" {
pub fn gxCmdQueueClear(queue: *mut gxCmdQueue_s);
}
extern "C" {
pub fn gxCmdQueueAdd(queue: *mut gxCmdQueue_s, entry: *const gxCmdEntry_s);
}
extern "C" {
pub fn gxCmdQueueRun(queue: *mut gxCmdQueue_s);
}
extern "C" {
pub fn gxCmdQueueStop(queue: *mut gxCmdQueue_s);
}
extern "C" {
pub fn gxCmdQueueWait(queue: *mut gxCmdQueue_s, timeout: s64) -> bool;
}
extern "C" {
pub fn GX_BindQueue(queue: *mut gxCmdQueue_s);
}
extern "C" {
pub fn GX_RequestDma(src: *mut u32_, dst: *mut u32_, length: u32_) -> Result;
}
extern "C" {
pub fn GX_ProcessCommandList(buf0a: *mut u32_, buf0s: u32_, flags: u8_) -> Result;
}
extern "C" {
pub fn GX_MemoryFill(
buf0a: *mut u32_,
buf0v: u32_,
buf0e: *mut u32_,
control0: u16_,
buf1a: *mut u32_,
buf1v: u32_,
buf1e: *mut u32_,
control1: u16_,
) -> Result;
}
extern "C" {
pub fn GX_DisplayTransfer(
inadr: *mut u32_,
indim: u32_,
outadr: *mut u32_,
outdim: u32_,
flags: u32_,
) -> Result;
}
extern "C" {
pub fn GX_TextureCopy(
inadr: *mut u32_,
indim: u32_,
outadr: *mut u32_,
outdim: u32_,
size: u32_,
flags: u32_,
) -> Result;
}
extern "C" {
pub fn GX_FlushCacheRegions(
buf0a: *mut u32_,
buf0s: u32_,
buf1a: *mut u32_,
buf1s: u32_,
buf2a: *mut u32_,
buf2s: u32_,
) -> Result;
}
pub const GPU_NEAREST: GPU_TEXTURE_FILTER_PARAM = 0;
pub const GPU_LINEAR: GPU_TEXTURE_FILTER_PARAM = 1;
pub type GPU_TEXTURE_FILTER_PARAM = ::libc::c_uint;
pub const GPU_CLAMP_TO_EDGE: GPU_TEXTURE_WRAP_PARAM = 0;
pub const GPU_CLAMP_TO_BORDER: GPU_TEXTURE_WRAP_PARAM = 1;
pub const GPU_REPEAT: GPU_TEXTURE_WRAP_PARAM = 2;
pub const GPU_MIRRORED_REPEAT: GPU_TEXTURE_WRAP_PARAM = 3;
pub type GPU_TEXTURE_WRAP_PARAM = ::libc::c_uint;
pub const GPU_TEX_2D: GPU_TEXTURE_MODE_PARAM = 0;
pub const GPU_TEX_CUBE_MAP: GPU_TEXTURE_MODE_PARAM = 1;
pub const GPU_TEX_SHADOW_2D: GPU_TEXTURE_MODE_PARAM = 2;
pub const GPU_TEX_PROJECTION: GPU_TEXTURE_MODE_PARAM = 3;
pub const GPU_TEX_SHADOW_CUBE: GPU_TEXTURE_MODE_PARAM = 4;
pub const GPU_TEX_DISABLED: GPU_TEXTURE_MODE_PARAM = 5;
pub type GPU_TEXTURE_MODE_PARAM = ::libc::c_uint;
pub const GPU_TEXUNIT0: GPU_TEXUNIT = 1;
pub const GPU_TEXUNIT1: GPU_TEXUNIT = 2;
pub const GPU_TEXUNIT2: GPU_TEXUNIT = 4;
pub type GPU_TEXUNIT = ::libc::c_uint;
pub const GPU_RGBA8: GPU_TEXCOLOR = 0;
pub const GPU_RGB8: GPU_TEXCOLOR = 1;
pub const GPU_RGBA5551: GPU_TEXCOLOR = 2;
pub const GPU_RGB565: GPU_TEXCOLOR = 3;
pub const GPU_RGBA4: GPU_TEXCOLOR = 4;
pub const GPU_LA8: GPU_TEXCOLOR = 5;
pub const GPU_HILO8: GPU_TEXCOLOR = 6;
pub const GPU_L8: GPU_TEXCOLOR = 7;
pub const GPU_A8: GPU_TEXCOLOR = 8;
pub const GPU_LA4: GPU_TEXCOLOR = 9;
pub const GPU_L4: GPU_TEXCOLOR = 10;
pub const GPU_A4: GPU_TEXCOLOR = 11;
pub const GPU_ETC1: GPU_TEXCOLOR = 12;
pub const GPU_ETC1A4: GPU_TEXCOLOR = 13;
pub type GPU_TEXCOLOR = ::libc::c_uint;
pub const GPU_TEXFACE_2D: GPU_TEXFACE = 0;
pub const GPU_POSITIVE_X: GPU_TEXFACE = 0;
pub const GPU_NEGATIVE_X: GPU_TEXFACE = 1;
pub const GPU_POSITIVE_Y: GPU_TEXFACE = 2;
pub const GPU_NEGATIVE_Y: GPU_TEXFACE = 3;
pub const GPU_POSITIVE_Z: GPU_TEXFACE = 4;
pub const GPU_NEGATIVE_Z: GPU_TEXFACE = 5;
pub type GPU_TEXFACE = ::libc::c_uint;
pub const GPU_PT_CLAMP_TO_ZERO: GPU_PROCTEX_CLAMP = 0;
pub const GPU_PT_CLAMP_TO_EDGE: GPU_PROCTEX_CLAMP = 1;
pub const GPU_PT_REPEAT: GPU_PROCTEX_CLAMP = 2;
pub const GPU_PT_MIRRORED_REPEAT: GPU_PROCTEX_CLAMP = 3;
pub const GPU_PT_PULSE: GPU_PROCTEX_CLAMP = 4;
pub type GPU_PROCTEX_CLAMP = ::libc::c_uint;
pub const GPU_PT_U: GPU_PROCTEX_MAPFUNC = 0;
pub const GPU_PT_U2: GPU_PROCTEX_MAPFUNC = 1;
pub const GPU_PT_V: GPU_PROCTEX_MAPFUNC = 2;
pub const GPU_PT_V2: GPU_PROCTEX_MAPFUNC = 3;
pub const GPU_PT_ADD: GPU_PROCTEX_MAPFUNC = 4;
pub const GPU_PT_ADD2: GPU_PROCTEX_MAPFUNC = 5;
pub const GPU_PT_SQRT2: GPU_PROCTEX_MAPFUNC = 6;
pub const GPU_PT_MIN: GPU_PROCTEX_MAPFUNC = 7;
pub const GPU_PT_MAX: GPU_PROCTEX_MAPFUNC = 8;
pub const GPU_PT_RMAX: GPU_PROCTEX_MAPFUNC = 9;
pub type GPU_PROCTEX_MAPFUNC = ::libc::c_uint;
pub const GPU_PT_NONE: GPU_PROCTEX_SHIFT = 0;
pub const GPU_PT_ODD: GPU_PROCTEX_SHIFT = 1;
pub const GPU_PT_EVEN: GPU_PROCTEX_SHIFT = 2;
pub type GPU_PROCTEX_SHIFT = ::libc::c_uint;
pub const GPU_PT_NEAREST: GPU_PROCTEX_FILTER = 0;
pub const GPU_PT_LINEAR: GPU_PROCTEX_FILTER = 1;
pub const GPU_PT_NEAREST_MIP_NEAREST: GPU_PROCTEX_FILTER = 2;
pub const GPU_PT_LINEAR_MIP_NEAREST: GPU_PROCTEX_FILTER = 3;
pub const GPU_PT_NEAREST_MIP_LINEAR: GPU_PROCTEX_FILTER = 4;
pub const GPU_PT_LINEAR_MIP_LINEAR: GPU_PROCTEX_FILTER = 5;
pub type GPU_PROCTEX_FILTER = ::libc::c_uint;
pub const GPU_LUT_NOISE: GPU_PROCTEX_LUTID = 0;
pub const GPU_LUT_RGBMAP: GPU_PROCTEX_LUTID = 2;
pub const GPU_LUT_ALPHAMAP: GPU_PROCTEX_LUTID = 3;
pub const GPU_LUT_COLOR: GPU_PROCTEX_LUTID = 4;
pub const GPU_LUT_COLORDIF: GPU_PROCTEX_LUTID = 5;
pub type GPU_PROCTEX_LUTID = ::libc::c_uint;
pub const GPU_RB_RGBA8: GPU_COLORBUF = 0;
pub const GPU_RB_RGB8: GPU_COLORBUF = 1;
pub const GPU_RB_RGBA5551: GPU_COLORBUF = 2;
pub const GPU_RB_RGB565: GPU_COLORBUF = 3;
pub const GPU_RB_RGBA4: GPU_COLORBUF = 4;
pub type GPU_COLORBUF = ::libc::c_uint;
pub const GPU_RB_DEPTH16: GPU_DEPTHBUF = 0;
pub const GPU_RB_DEPTH24: GPU_DEPTHBUF = 2;
pub const GPU_RB_DEPTH24_STENCIL8: GPU_DEPTHBUF = 3;
pub type GPU_DEPTHBUF = ::libc::c_uint;
pub const GPU_NEVER: GPU_TESTFUNC = 0;
pub const GPU_ALWAYS: GPU_TESTFUNC = 1;
pub const GPU_EQUAL: GPU_TESTFUNC = 2;
pub const GPU_NOTEQUAL: GPU_TESTFUNC = 3;
pub const GPU_LESS: GPU_TESTFUNC = 4;
pub const GPU_LEQUAL: GPU_TESTFUNC = 5;
pub const GPU_GREATER: GPU_TESTFUNC = 6;
pub const GPU_GEQUAL: GPU_TESTFUNC = 7;
pub type GPU_TESTFUNC = ::libc::c_uint;
pub const GPU_EARLYDEPTH_GEQUAL: GPU_EARLYDEPTHFUNC = 0;
pub const GPU_EARLYDEPTH_GREATER: GPU_EARLYDEPTHFUNC = 1;
pub const GPU_EARLYDEPTH_LEQUAL: GPU_EARLYDEPTHFUNC = 2;
pub const GPU_EARLYDEPTH_LESS: GPU_EARLYDEPTHFUNC = 3;
pub type GPU_EARLYDEPTHFUNC = ::libc::c_uint;
pub const GPU_GAS_NEVER: GPU_GASDEPTHFUNC = 0;
pub const GPU_GAS_ALWAYS: GPU_GASDEPTHFUNC = 1;
pub const GPU_GAS_GREATER: GPU_GASDEPTHFUNC = 2;
pub const GPU_GAS_LESS: GPU_GASDEPTHFUNC = 3;
pub type GPU_GASDEPTHFUNC = ::libc::c_uint;
pub const GPU_SCISSOR_DISABLE: GPU_SCISSORMODE = 0;
pub const GPU_SCISSOR_INVERT: GPU_SCISSORMODE = 1;
pub const GPU_SCISSOR_NORMAL: GPU_SCISSORMODE = 3;
pub type GPU_SCISSORMODE = ::libc::c_uint;
pub const GPU_STENCIL_KEEP: GPU_STENCILOP = 0;
pub const GPU_STENCIL_ZERO: GPU_STENCILOP = 1;
pub const GPU_STENCIL_REPLACE: GPU_STENCILOP = 2;
pub const GPU_STENCIL_INCR: GPU_STENCILOP = 3;
pub const GPU_STENCIL_DECR: GPU_STENCILOP = 4;
pub const GPU_STENCIL_INVERT: GPU_STENCILOP = 5;
pub const GPU_STENCIL_INCR_WRAP: GPU_STENCILOP = 6;
pub const GPU_STENCIL_DECR_WRAP: GPU_STENCILOP = 7;
pub type GPU_STENCILOP = ::libc::c_uint;
pub const GPU_WRITE_RED: GPU_WRITEMASK = 1;
pub const GPU_WRITE_GREEN: GPU_WRITEMASK = 2;
pub const GPU_WRITE_BLUE: GPU_WRITEMASK = 4;
pub const GPU_WRITE_ALPHA: GPU_WRITEMASK = 8;
pub const GPU_WRITE_DEPTH: GPU_WRITEMASK = 16;
pub const GPU_WRITE_COLOR: GPU_WRITEMASK = 15;
pub const GPU_WRITE_ALL: GPU_WRITEMASK = 31;
pub type GPU_WRITEMASK = ::libc::c_uint;
pub const GPU_BLEND_ADD: GPU_BLENDEQUATION = 0;
pub const GPU_BLEND_SUBTRACT: GPU_BLENDEQUATION = 1;
pub const GPU_BLEND_REVERSE_SUBTRACT: GPU_BLENDEQUATION = 2;
pub const GPU_BLEND_MIN: GPU_BLENDEQUATION = 3;
pub const GPU_BLEND_MAX: GPU_BLENDEQUATION = 4;
pub type GPU_BLENDEQUATION = ::libc::c_uint;
pub const GPU_ZERO: GPU_BLENDFACTOR = 0;
pub const GPU_ONE: GPU_BLENDFACTOR = 1;
pub const GPU_SRC_COLOR: GPU_BLENDFACTOR = 2;
pub const GPU_ONE_MINUS_SRC_COLOR: GPU_BLENDFACTOR = 3;
pub const GPU_DST_COLOR: GPU_BLENDFACTOR = 4;
pub const GPU_ONE_MINUS_DST_COLOR: GPU_BLENDFACTOR = 5;
pub const GPU_SRC_ALPHA: GPU_BLENDFACTOR = 6;
pub const GPU_ONE_MINUS_SRC_ALPHA: GPU_BLENDFACTOR = 7;
pub const GPU_DST_ALPHA: GPU_BLENDFACTOR = 8;
pub const GPU_ONE_MINUS_DST_ALPHA: GPU_BLENDFACTOR = 9;
pub const GPU_CONSTANT_COLOR: GPU_BLENDFACTOR = 10;
pub const GPU_ONE_MINUS_CONSTANT_COLOR: GPU_BLENDFACTOR = 11;
pub const GPU_CONSTANT_ALPHA: GPU_BLENDFACTOR = 12;
pub const GPU_ONE_MINUS_CONSTANT_ALPHA: GPU_BLENDFACTOR = 13;
pub const GPU_SRC_ALPHA_SATURATE: GPU_BLENDFACTOR = 14;
pub type GPU_BLENDFACTOR = ::libc::c_uint;
pub const GPU_LOGICOP_CLEAR: GPU_LOGICOP = 0;
pub const GPU_LOGICOP_AND: GPU_LOGICOP = 1;
pub const GPU_LOGICOP_AND_REVERSE: GPU_LOGICOP = 2;
pub const GPU_LOGICOP_COPY: GPU_LOGICOP = 3;
pub const GPU_LOGICOP_SET: GPU_LOGICOP = 4;
pub const GPU_LOGICOP_COPY_INVERTED: GPU_LOGICOP = 5;
pub const GPU_LOGICOP_NOOP: GPU_LOGICOP = 6;
pub const GPU_LOGICOP_INVERT: GPU_LOGICOP = 7;
pub const GPU_LOGICOP_NAND: GPU_LOGICOP = 8;
pub const GPU_LOGICOP_OR: GPU_LOGICOP = 9;
pub const GPU_LOGICOP_NOR: GPU_LOGICOP = 10;
pub const GPU_LOGICOP_XOR: GPU_LOGICOP = 11;
pub const GPU_LOGICOP_EQUIV: GPU_LOGICOP = 12;
pub const GPU_LOGICOP_AND_INVERTED: GPU_LOGICOP = 13;
pub const GPU_LOGICOP_OR_REVERSE: GPU_LOGICOP = 14;
pub const GPU_LOGICOP_OR_INVERTED: GPU_LOGICOP = 15;
pub type GPU_LOGICOP = ::libc::c_uint;
pub const GPU_FRAGOPMODE_GL: GPU_FRAGOPMODE = 0;
pub const GPU_FRAGOPMODE_GAS_ACC: GPU_FRAGOPMODE = 1;
pub const GPU_FRAGOPMODE_SHADOW: GPU_FRAGOPMODE = 3;
pub type GPU_FRAGOPMODE = ::libc::c_uint;
pub const GPU_BYTE: GPU_FORMATS = 0;
pub const GPU_UNSIGNED_BYTE: GPU_FORMATS = 1;
pub const GPU_SHORT: GPU_FORMATS = 2;
pub const GPU_FLOAT: GPU_FORMATS = 3;
pub type GPU_FORMATS = ::libc::c_uint;
pub const GPU_CULL_NONE: GPU_CULLMODE = 0;
pub const GPU_CULL_FRONT_CCW: GPU_CULLMODE = 1;
pub const GPU_CULL_BACK_CCW: GPU_CULLMODE = 2;
pub type GPU_CULLMODE = ::libc::c_uint;
pub const GPU_PRIMARY_COLOR: GPU_TEVSRC = 0;
pub const GPU_FRAGMENT_PRIMARY_COLOR: GPU_TEVSRC = 1;
pub const GPU_FRAGMENT_SECONDARY_COLOR: GPU_TEVSRC = 2;
pub const GPU_TEXTURE0: GPU_TEVSRC = 3;
pub const GPU_TEXTURE1: GPU_TEVSRC = 4;
pub const GPU_TEXTURE2: GPU_TEVSRC = 5;
pub const GPU_TEXTURE3: GPU_TEVSRC = 6;
pub const GPU_PREVIOUS_BUFFER: GPU_TEVSRC = 13;
pub const GPU_CONSTANT: GPU_TEVSRC = 14;
pub const GPU_PREVIOUS: GPU_TEVSRC = 15;
pub type GPU_TEVSRC = ::libc::c_uint;
pub const GPU_TEVOP_RGB_SRC_COLOR: GPU_TEVOP_RGB = 0;
pub const GPU_TEVOP_RGB_ONE_MINUS_SRC_COLOR: GPU_TEVOP_RGB = 1;
pub const GPU_TEVOP_RGB_SRC_ALPHA: GPU_TEVOP_RGB = 2;
pub const GPU_TEVOP_RGB_ONE_MINUS_SRC_ALPHA: GPU_TEVOP_RGB = 3;
pub const GPU_TEVOP_RGB_SRC_R: GPU_TEVOP_RGB = 4;
pub const GPU_TEVOP_RGB_ONE_MINUS_SRC_R: GPU_TEVOP_RGB = 5;
pub const GPU_TEVOP_RGB_0x06: GPU_TEVOP_RGB = 6;
pub const GPU_TEVOP_RGB_0x07: GPU_TEVOP_RGB = 7;
pub const GPU_TEVOP_RGB_SRC_G: GPU_TEVOP_RGB = 8;
pub const GPU_TEVOP_RGB_ONE_MINUS_SRC_G: GPU_TEVOP_RGB = 9;
pub const GPU_TEVOP_RGB_0x0A: GPU_TEVOP_RGB = 10;
pub const GPU_TEVOP_RGB_0x0B: GPU_TEVOP_RGB = 11;
pub const GPU_TEVOP_RGB_SRC_B: GPU_TEVOP_RGB = 12;
pub const GPU_TEVOP_RGB_ONE_MINUS_SRC_B: GPU_TEVOP_RGB = 13;
pub const GPU_TEVOP_RGB_0x0E: GPU_TEVOP_RGB = 14;
pub const GPU_TEVOP_RGB_0x0F: GPU_TEVOP_RGB = 15;
pub type GPU_TEVOP_RGB = ::libc::c_uint;
pub const GPU_TEVOP_A_SRC_ALPHA: GPU_TEVOP_A = 0;
pub const GPU_TEVOP_A_ONE_MINUS_SRC_ALPHA: GPU_TEVOP_A = 1;
pub const GPU_TEVOP_A_SRC_R: GPU_TEVOP_A = 2;
pub const GPU_TEVOP_A_ONE_MINUS_SRC_R: GPU_TEVOP_A = 3;
pub const GPU_TEVOP_A_SRC_G: GPU_TEVOP_A = 4;
pub const GPU_TEVOP_A_ONE_MINUS_SRC_G: GPU_TEVOP_A = 5;
pub const GPU_TEVOP_A_SRC_B: GPU_TEVOP_A = 6;
pub const GPU_TEVOP_A_ONE_MINUS_SRC_B: GPU_TEVOP_A = 7;
pub type GPU_TEVOP_A = ::libc::c_uint;
pub const GPU_REPLACE: GPU_COMBINEFUNC = 0;
pub const GPU_MODULATE: GPU_COMBINEFUNC = 1;
pub const GPU_ADD: GPU_COMBINEFUNC = 2;
pub const GPU_ADD_SIGNED: GPU_COMBINEFUNC = 3;
pub const GPU_INTERPOLATE: GPU_COMBINEFUNC = 4;
pub const GPU_SUBTRACT: GPU_COMBINEFUNC = 5;
pub const GPU_DOT3_RGB: GPU_COMBINEFUNC = 6;
pub const GPU_MULTIPLY_ADD: GPU_COMBINEFUNC = 8;
pub const GPU_ADD_MULTIPLY: GPU_COMBINEFUNC = 9;
pub type GPU_COMBINEFUNC = ::libc::c_uint;
pub const GPU_TEVSCALE_1: GPU_TEVSCALE = 0;
pub const GPU_TEVSCALE_2: GPU_TEVSCALE = 1;
pub const GPU_TEVSCALE_4: GPU_TEVSCALE = 2;
pub type GPU_TEVSCALE = ::libc::c_uint;
pub const GPU_NO_FRESNEL: GPU_FRESNELSEL = 0;
pub const GPU_PRI_ALPHA_FRESNEL: GPU_FRESNELSEL = 1;
pub const GPU_SEC_ALPHA_FRESNEL: GPU_FRESNELSEL = 2;
pub const GPU_PRI_SEC_ALPHA_FRESNEL: GPU_FRESNELSEL = 3;
pub type GPU_FRESNELSEL = ::libc::c_uint;
pub const GPU_BUMP_NOT_USED: GPU_BUMPMODE = 0;
pub const GPU_BUMP_AS_BUMP: GPU_BUMPMODE = 1;
pub const GPU_BUMP_AS_TANG: GPU_BUMPMODE = 2;
pub type GPU_BUMPMODE = ::libc::c_uint;
pub const GPU_LUT_D0: GPU_LIGHTLUTID = 0;
pub const GPU_LUT_D1: GPU_LIGHTLUTID = 1;
pub const GPU_LUT_SP: GPU_LIGHTLUTID = 2;
pub const GPU_LUT_FR: GPU_LIGHTLUTID = 3;
pub const GPU_LUT_RB: GPU_LIGHTLUTID = 4;
pub const GPU_LUT_RG: GPU_LIGHTLUTID = 5;
pub const GPU_LUT_RR: GPU_LIGHTLUTID = 6;
pub const GPU_LUT_DA: GPU_LIGHTLUTID = 7;
pub type GPU_LIGHTLUTID = ::libc::c_uint;
pub const GPU_LUTINPUT_NH: GPU_LIGHTLUTINPUT = 0;
pub const GPU_LUTINPUT_VH: GPU_LIGHTLUTINPUT = 1;
pub const GPU_LUTINPUT_NV: GPU_LIGHTLUTINPUT = 2;
pub const GPU_LUTINPUT_LN: GPU_LIGHTLUTINPUT = 3;
pub const GPU_LUTINPUT_SP: GPU_LIGHTLUTINPUT = 4;
pub const GPU_LUTINPUT_CP: GPU_LIGHTLUTINPUT = 5;
pub type GPU_LIGHTLUTINPUT = ::libc::c_uint;
pub const GPU_LUTSCALER_1x: GPU_LIGHTLUTSCALER = 0;
pub const GPU_LUTSCALER_2x: GPU_LIGHTLUTSCALER = 1;
pub const GPU_LUTSCALER_4x: GPU_LIGHTLUTSCALER = 2;
pub const GPU_LUTSCALER_8x: GPU_LIGHTLUTSCALER = 3;
pub const GPU_LUTSCALER_0_25x: GPU_LIGHTLUTSCALER = 6;
pub const GPU_LUTSCALER_0_5x: GPU_LIGHTLUTSCALER = 7;
pub type GPU_LIGHTLUTSCALER = ::libc::c_uint;
pub const GPU_LUTSELECT_COMMON: GPU_LIGHTLUTSELECT = 0;
pub const GPU_LUTSELECT_SP: GPU_LIGHTLUTSELECT = 1;
pub const GPU_LUTSELECT_DA: GPU_LIGHTLUTSELECT = 2;
pub type GPU_LIGHTLUTSELECT = ::libc::c_uint;
pub const GPU_NO_FOG: GPU_FOGMODE = 0;
pub const GPU_FOG: GPU_FOGMODE = 5;
pub const GPU_GAS: GPU_FOGMODE = 7;
pub type GPU_FOGMODE = ::libc::c_uint;
pub const GPU_PLAIN_DENSITY: GPU_GASMODE = 0;
pub const GPU_DEPTH_DENSITY: GPU_GASMODE = 1;
pub type GPU_GASMODE = ::libc::c_uint;
pub const GPU_GAS_DENSITY: GPU_GASLUTINPUT = 0;
pub const GPU_GAS_LIGHT_FACTOR: GPU_GASLUTINPUT = 1;
pub type GPU_GASLUTINPUT = ::libc::c_uint;
pub const GPU_TRIANGLES: GPU_Primitive_t = 0;
pub const GPU_TRIANGLE_STRIP: GPU_Primitive_t = 256;
pub const GPU_TRIANGLE_FAN: GPU_Primitive_t = 512;
pub const GPU_GEOMETRY_PRIM: GPU_Primitive_t = 768;
pub type GPU_Primitive_t = ::libc::c_uint;
pub const GPU_VERTEX_SHADER: GPU_SHADER_TYPE = 0;
pub const GPU_GEOMETRY_SHADER: GPU_SHADER_TYPE = 1;
pub type GPU_SHADER_TYPE = ::libc::c_uint;
extern "C" {
pub static mut gpuCmdBuf: *mut u32_;
}
extern "C" {
pub static mut gpuCmdBufSize: u32_;
}
extern "C" {
pub static mut gpuCmdBufOffset: u32_;
}
extern "C" {
pub fn GPUCMD_AddRawCommands(cmd: *const u32_, size: u32_);
}
extern "C" {
pub fn GPUCMD_Add(header: u32_, param: *const u32_, paramlength: u32_);
}
extern "C" {
pub fn GPUCMD_Split(addr: *mut *mut u32_, size: *mut u32_);
}
extern "C" {
pub fn f32tof16(f: f32) -> u32_;
}
extern "C" {
pub fn f32tof20(f: f32) -> u32_;
}
extern "C" {
pub fn f32tof24(f: f32) -> u32_;
}
extern "C" {
pub fn f32tof31(f: f32) -> u32_;
}
pub const VERTEX_SHDR: DVLE_type = 0;
pub const GEOMETRY_SHDR: DVLE_type = 1;
pub type DVLE_type = ::libc::c_uint;
pub const DVLE_CONST_BOOL: DVLE_constantType = 0;
pub const DVLE_CONST_u8: DVLE_constantType = 1;
pub const DVLE_CONST_FLOAT24: DVLE_constantType = 2;
pub type DVLE_constantType = ::libc::c_uint;
pub const RESULT_POSITION: DVLE_outputAttribute_t = 0;
pub const RESULT_NORMALQUAT: DVLE_outputAttribute_t = 1;
pub const RESULT_COLOR: DVLE_outputAttribute_t = 2;
pub const RESULT_TEXCOORD0: DVLE_outputAttribute_t = 3;
pub const RESULT_TEXCOORD0W: DVLE_outputAttribute_t = 4;
pub const RESULT_TEXCOORD1: DVLE_outputAttribute_t = 5;
pub const RESULT_TEXCOORD2: DVLE_outputAttribute_t = 6;
pub const RESULT_VIEW: DVLE_outputAttribute_t = 8;
pub const RESULT_DUMMY: DVLE_outputAttribute_t = 9;
pub type DVLE_outputAttribute_t = ::libc::c_uint;
pub const GSH_POINT: DVLE_geoShaderMode = 0;
pub const GSH_VARIABLE_PRIM: DVLE_geoShaderMode = 1;
pub const GSH_FIXED_PRIM: DVLE_geoShaderMode = 2;
pub type DVLE_geoShaderMode = ::libc::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DVLP_s {
pub codeSize: u32_,
pub codeData: *mut u32_,
pub opdescSize: u32_,
pub opcdescData: *mut u32_,
}
impl Default for DVLP_s {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct DVLE_constEntry_s {
pub type_: u16_,
pub id: u16_,
pub data: [u32_; 4usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct DVLE_outEntry_s {
pub type_: u16_,
pub regID: u16_,
pub mask: u8_,
pub unk: [u8_; 3usize],
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct DVLE_uniformEntry_s {
pub symbolOffset: u32_,
pub startReg: u16_,
pub endReg: u16_,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DVLE_s {
pub type_: DVLE_type,
pub mergeOutmaps: bool,
pub gshMode: DVLE_geoShaderMode,
pub gshFixedVtxStart: u8_,
pub gshVariableVtxNum: u8_,
pub gshFixedVtxNum: u8_,
pub dvlp: *mut DVLP_s,
pub mainOffset: u32_,
pub endmainOffset: u32_,
pub constTableSize: u32_,
pub constTableData: *mut DVLE_constEntry_s,
pub outTableSize: u32_,
pub outTableData: *mut DVLE_outEntry_s,
pub uniformTableSize: u32_,
pub uniformTableData: *mut DVLE_uniformEntry_s,
pub symbolTableData: *mut ::libc::c_char,
pub outmapMask: u8_,
pub outmapData: [u32_; 8usize],
pub outmapMode: u32_,
pub outmapClock: u32_,
}
impl Default for DVLE_s {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct DVLB_s {
pub numDVLE: u32_,
pub DVLP: DVLP_s,
pub DVLE: *mut DVLE_s,
}
impl Default for DVLB_s {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
extern "C" {
pub fn DVLB_ParseFile(shbinData: *mut u32_, shbinSize: u32_) -> *mut DVLB_s;
}
extern "C" {
pub fn DVLB_Free(dvlb: *mut DVLB_s);
}
extern "C" {
pub fn DVLE_GetUniformRegister(dvle: *mut DVLE_s, name: *const ::libc::c_char) -> s8;
}
extern "C" {
pub fn DVLE_GenerateOutmap(dvle: *mut DVLE_s);
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct float24Uniform_s {
pub id: u32_,
pub data: [u32_; 3usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct shaderInstance_s {
pub dvle: *mut DVLE_s,
pub boolUniforms: u16_,
pub boolUniformMask: u16_,
pub intUniforms: [u32_; 4usize],
pub float24Uniforms: *mut float24Uniform_s,
pub intUniformMask: u8_,
pub numFloat24Uniforms: u8_,
}
impl Default for shaderInstance_s {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct shaderProgram_s {
pub vertexShader: *mut shaderInstance_s,
pub geometryShader: *mut shaderInstance_s,
pub geoShaderInputPermutation: [u32_; 2usize],
pub geoShaderInputStride: u8_,
}
impl Default for shaderProgram_s {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
extern "C" {
pub fn shaderInstanceInit(si: *mut shaderInstance_s, dvle: *mut DVLE_s) -> Result;
}
extern "C" {
pub fn shaderInstanceFree(si: *mut shaderInstance_s) -> Result;
}
extern "C" {
pub fn shaderInstanceSetBool(
si: *mut shaderInstance_s,
id: ::libc::c_int,
value: bool,
) -> Result;
}
extern "C" {
pub fn shaderInstanceGetBool(
si: *mut shaderInstance_s,
id: ::libc::c_int,
value: *mut bool,
) -> Result;
}
extern "C" {
pub fn shaderInstanceGetUniformLocation(
si: *mut shaderInstance_s,
name: *const ::libc::c_char,
) -> s8;
}
extern "C" {
pub fn shaderProgramInit(sp: *mut shaderProgram_s) -> Result;
}
extern "C" {
pub fn shaderProgramFree(sp: *mut shaderProgram_s) -> Result;
}
extern "C" {
pub fn shaderProgramSetVsh(sp: *mut shaderProgram_s, dvle: *mut DVLE_s) -> Result;
}
extern "C" {
pub fn shaderProgramSetGsh(sp: *mut shaderProgram_s, dvle: *mut DVLE_s, stride: u8_) -> Result;
}
extern "C" {
pub fn shaderProgramSetGshInputPermutation(
sp: *mut shaderProgram_s,
permutation: u64_,
) -> Result;
}
extern "C" {
pub fn shaderProgramConfigure(
sp: *mut shaderProgram_s,
sendVshCode: bool,
sendGshCode: bool,
) -> Result;
}
extern "C" {
pub fn shaderProgramUse(sp: *mut shaderProgram_s) -> Result;
}
pub const NDSP_OUTPUT_MONO: ndspOutputMode = 0;
pub const NDSP_OUTPUT_STEREO: ndspOutputMode = 1;
pub const NDSP_OUTPUT_SURROUND: ndspOutputMode = 2;
pub type ndspOutputMode = ::libc::c_uint;
pub const NDSP_CLIP_NORMAL: ndspClippingMode = 0;
pub const NDSP_CLIP_SOFT: ndspClippingMode = 1;
pub type ndspClippingMode = ::libc::c_uint;
pub const NDSP_SPKPOS_SQUARE: ndspSpeakerPos = 0;
pub const NDSP_SPKPOS_WIDE: ndspSpeakerPos = 1;
pub const NDSP_SPKPOS_NUM: ndspSpeakerPos = 2;
pub type ndspSpeakerPos = ::libc::c_uint;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct ndspAdpcmData {
pub index: u16_,
pub history0: s16,
pub history1: s16,
}
pub type ndspWaveBuf = tag_ndspWaveBuf;
pub const NDSP_WBUF_FREE: ::libc::c_uint = 0;
pub const NDSP_WBUF_QUEUED: ::libc::c_uint = 1;
pub const NDSP_WBUF_PLAYING: ::libc::c_uint = 2;
pub const NDSP_WBUF_DONE: ::libc::c_uint = 3;
pub type _bindgen_ty_29 = ::libc::c_uint;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct tag_ndspWaveBuf {
pub __bindgen_anon_1: tag_ndspWaveBuf__bindgen_ty_1,
pub nsamples: u32_,
pub adpcm_data: *mut ndspAdpcmData,
pub offset: u32_,
pub looping: bool,
pub status: u8_,
pub sequence_id: u16_,
pub next: *mut ndspWaveBuf,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union tag_ndspWaveBuf__bindgen_ty_1 {
pub data_pcm8: *mut s8,
pub data_pcm16: *mut s16,
pub data_adpcm: *mut u8_,
pub data_vaddr: *const ::libc::c_void,
_bindgen_union_align: u32,
}
impl Default for tag_ndspWaveBuf__bindgen_ty_1 {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
impl Default for tag_ndspWaveBuf {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
pub type ndspCallback = ::core::option::Option<unsafe extern "C" fn(data: *mut ::libc::c_void)>;
pub type ndspAuxCallback = ::core::option::Option<
unsafe extern "C" fn(
data: *mut ::libc::c_void,
nsamples: ::libc::c_int,
samples: *mut *mut ::libc::c_void,
),
>;
extern "C" {
pub fn ndspUseComponent(
binary: *const ::libc::c_void,
size: u32_,
progMask: u16_,
dataMask: u16_,
);
}
extern "C" {
pub fn ndspInit() -> Result;
}
extern "C" {
pub fn ndspExit();
}
extern "C" {
pub fn ndspGetDroppedFrames() -> u32_;
}
extern "C" {
pub fn ndspGetFrameCount() -> u32_;
}
extern "C" {
pub fn ndspSetMasterVol(volume: f32);
}
extern "C" {
pub fn ndspSetOutputMode(mode: ndspOutputMode);
}
extern "C" {
pub fn ndspSetClippingMode(mode: ndspClippingMode);
}
extern "C" {
pub fn ndspSetOutputCount(count: ::libc::c_int);
}
extern "C" {
pub fn ndspSetCapture(capture: *mut ndspWaveBuf);
}
extern "C" {
pub fn ndspSetCallback(callback: ndspCallback, data: *mut ::libc::c_void);
}
extern "C" {
pub fn ndspSurroundSetDepth(depth: u16_);
}
extern "C" {
pub fn ndspSurroundSetPos(pos: ndspSpeakerPos);
}
extern "C" {
pub fn ndspSurroundSetRearRatio(ratio: u16_);
}
extern "C" {
pub fn ndspAuxSetEnable(id: ::libc::c_int, enable: bool);
}
extern "C" {
pub fn ndspAuxSetFrontBypass(id: ::libc::c_int, bypass: bool);
}
extern "C" {
pub fn ndspAuxSetVolume(id: ::libc::c_int, volume: f32);
}
extern "C" {
pub fn ndspAuxSetCallback(
id: ::libc::c_int,
callback: ndspAuxCallback,
data: *mut ::libc::c_void,
);
}
pub const NDSP_ENCODING_PCM8: ::libc::c_uint = 0;
pub const NDSP_ENCODING_PCM16: ::libc::c_uint = 1;
pub const NDSP_ENCODING_ADPCM: ::libc::c_uint = 2;
pub type _bindgen_ty_30 = ::libc::c_uint;
pub const NDSP_FORMAT_MONO_PCM8: ::libc::c_uint = 1;
pub const NDSP_FORMAT_MONO_PCM16: ::libc::c_uint = 5;
pub const NDSP_FORMAT_MONO_ADPCM: ::libc::c_uint = 9;
pub const NDSP_FORMAT_STEREO_PCM8: ::libc::c_uint = 2;
pub const NDSP_FORMAT_STEREO_PCM16: ::libc::c_uint = 6;
pub const NDSP_FORMAT_PCM8: ::libc::c_uint = 1;
pub const NDSP_FORMAT_PCM16: ::libc::c_uint = 5;
pub const NDSP_FORMAT_ADPCM: ::libc::c_uint = 9;
pub const NDSP_FRONT_BYPASS: ::libc::c_uint = 16;
pub const NDSP_3D_SURROUND_PREPROCESSED: ::libc::c_uint = 64;
pub type _bindgen_ty_31 = ::libc::c_uint;
pub const NDSP_INTERP_POLYPHASE: ndspInterpType = 0;
pub const NDSP_INTERP_LINEAR: ndspInterpType = 1;
pub const NDSP_INTERP_NONE: ndspInterpType = 2;
pub type ndspInterpType = ::libc::c_uint;
extern "C" {
pub fn ndspChnReset(id: ::libc::c_int);
}
extern "C" {
pub fn ndspChnInitParams(id: ::libc::c_int);
}
extern "C" {
pub fn ndspChnIsPlaying(id: ::libc::c_int) -> bool;
}
extern "C" {
pub fn ndspChnGetSamplePos(id: ::libc::c_int) -> u32_;
}
extern "C" {
pub fn ndspChnGetWaveBufSeq(id: ::libc::c_int) -> u16_;
}
extern "C" {
pub fn ndspChnIsPaused(id: ::libc::c_int) -> bool;
}
extern "C" {
pub fn ndspChnSetPaused(id: ::libc::c_int, paused: bool);
}
extern "C" {
pub fn ndspChnSetFormat(id: ::libc::c_int, format: u16_);
}
extern "C" {
pub fn ndspChnSetInterp(id: ::libc::c_int, type_: ndspInterpType);
}
extern "C" {
pub fn ndspChnSetRate(id: ::libc::c_int, rate: f32);
}
extern "C" {
pub fn ndspChnSetMix(id: ::libc::c_int, mix: *mut f32);
}
extern "C" {
pub fn ndspChnSetAdpcmCoefs(id: ::libc::c_int, coefs: *mut u16_);
}
extern "C" {
pub fn ndspChnWaveBufClear(id: ::libc::c_int);
}
extern "C" {
pub fn ndspChnWaveBufAdd(id: ::libc::c_int, buf: *mut ndspWaveBuf);
}
extern "C" {
pub fn ndspChnIirMonoSetEnable(id: ::libc::c_int, enable: bool);
}
extern "C" {
pub fn ndspChnIirMonoSetParamsCustomFilter(
id: ::libc::c_int,
a0: f32,
a1: f32,
b0: f32,
) -> bool;
}
extern "C" {
pub fn ndspChnIirMonoSetParamsLowPassFilter(id: ::libc::c_int, f0: f32) -> bool;
}
extern "C" {
pub fn ndspChnIirMonoSetParamsHighPassFilter(id: ::libc::c_int, f0: f32) -> bool;
}
extern "C" {
pub fn ndspChnIirBiquadSetEnable(id: ::libc::c_int, enable: bool);
}
extern "C" {
pub fn ndspChnIirBiquadSetParamsCustomFilter(
id: ::libc::c_int,
a0: f32,
a1: f32,
a2: f32,
b0: f32,
b1: f32,
b2: f32,
) -> bool;
}
extern "C" {
pub fn ndspChnIirBiquadSetParamsLowPassFilter(id: ::libc::c_int, f0: f32, Q: f32) -> bool;
}
extern "C" {
pub fn ndspChnIirBiquadSetParamsHighPassFilter(id: ::libc::c_int, f0: f32, Q: f32) -> bool;
}
extern "C" {
pub fn ndspChnIirBiquadSetParamsBandPassFilter(id: ::libc::c_int, f0: f32, Q: f32) -> bool;
}
extern "C" {
pub fn ndspChnIirBiquadSetParamsNotchFilter(id: ::libc::c_int, f0: f32, Q: f32) -> bool;
}
extern "C" {
pub fn ndspChnIirBiquadSetParamsPeakingEqualizer(
id: ::libc::c_int,
f0: f32,
Q: f32,
gain: f32,
) -> bool;
}
pub const SWKBD_TYPE_NORMAL: SwkbdType = 0;
pub const SWKBD_TYPE_QWERTY: SwkbdType = 1;
pub const SWKBD_TYPE_NUMPAD: SwkbdType = 2;
pub const SWKBD_TYPE_WESTERN: SwkbdType = 3;
pub type SwkbdType = ::libc::c_uint;
pub const SWKBD_ANYTHING: SwkbdValidInput = 0;
pub const SWKBD_NOTEMPTY: SwkbdValidInput = 1;
pub const SWKBD_NOTEMPTY_NOTBLANK: SwkbdValidInput = 2;
pub const SWKBD_NOTBLANK_NOTEMPTY: SwkbdValidInput = 2;
pub const SWKBD_NOTBLANK: SwkbdValidInput = 3;
pub const SWKBD_FIXEDLEN: SwkbdValidInput = 4;
pub type SwkbdValidInput = ::libc::c_uint;
pub const SWKBD_BUTTON_LEFT: SwkbdButton = 0;
pub const SWKBD_BUTTON_MIDDLE: SwkbdButton = 1;
pub const SWKBD_BUTTON_RIGHT: SwkbdButton = 2;
pub const SWKBD_BUTTON_CONFIRM: SwkbdButton = 2;
pub const SWKBD_BUTTON_NONE: SwkbdButton = 3;
pub type SwkbdButton = ::libc::c_uint;
pub const SWKBD_PASSWORD_NONE: SwkbdPasswordMode = 0;
pub const SWKBD_PASSWORD_HIDE: SwkbdPasswordMode = 1;
pub const SWKBD_PASSWORD_HIDE_DELAY: SwkbdPasswordMode = 2;
pub type SwkbdPasswordMode = ::libc::c_uint;
pub const SWKBD_FILTER_DIGITS: ::libc::c_uint = 1;
pub const SWKBD_FILTER_AT: ::libc::c_uint = 2;
pub const SWKBD_FILTER_PERCENT: ::libc::c_uint = 4;
pub const SWKBD_FILTER_BACKSLASH: ::libc::c_uint = 8;
pub const SWKBD_FILTER_PROFANITY: ::libc::c_uint = 16;
pub const SWKBD_FILTER_CALLBACK: ::libc::c_uint = 32;
pub type _bindgen_ty_32 = ::libc::c_uint;
pub const SWKBD_PARENTAL: ::libc::c_uint = 1;
pub const SWKBD_DARKEN_TOP_SCREEN: ::libc::c_uint = 2;
pub const SWKBD_PREDICTIVE_INPUT: ::libc::c_uint = 4;
pub const SWKBD_MULTILINE: ::libc::c_uint = 8;
pub const SWKBD_FIXED_WIDTH: ::libc::c_uint = 16;
pub const SWKBD_ALLOW_HOME: ::libc::c_uint = 32;
pub const SWKBD_ALLOW_RESET: ::libc::c_uint = 64;
pub const SWKBD_ALLOW_POWER: ::libc::c_uint = 128;
pub const SWKBD_DEFAULT_QWERTY: ::libc::c_uint = 512;
pub type _bindgen_ty_33 = ::libc::c_uint;
pub const SWKBD_CALLBACK_OK: SwkbdCallbackResult = 0;
pub const SWKBD_CALLBACK_CLOSE: SwkbdCallbackResult = 1;
pub const SWKBD_CALLBACK_CONTINUE: SwkbdCallbackResult = 2;
pub type SwkbdCallbackResult = ::libc::c_uint;
pub const SWKBD_NONE: SwkbdResult = -1;
pub const SWKBD_INVALID_INPUT: SwkbdResult = -2;
pub const SWKBD_OUTOFMEM: SwkbdResult = -3;
pub const SWKBD_D0_CLICK: SwkbdResult = 0;
pub const SWKBD_D1_CLICK0: SwkbdResult = 1;
pub const SWKBD_D1_CLICK1: SwkbdResult = 2;
pub const SWKBD_D2_CLICK0: SwkbdResult = 3;
pub const SWKBD_D2_CLICK1: SwkbdResult = 4;
pub const SWKBD_D2_CLICK2: SwkbdResult = 5;
pub const SWKBD_HOMEPRESSED: SwkbdResult = 10;
pub const SWKBD_RESETPRESSED: SwkbdResult = 11;
pub const SWKBD_POWERPRESSED: SwkbdResult = 12;
pub const SWKBD_PARENTAL_OK: SwkbdResult = 20;
pub const SWKBD_PARENTAL_FAIL: SwkbdResult = 21;
pub const SWKBD_BANNED_INPUT: SwkbdResult = 30;
pub type SwkbdResult = ::libc::c_int;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct SwkbdDictWord {
pub reading: [u16_; 41usize],
pub word: [u16_; 41usize],
pub language: u8_,
pub all_languages: bool,
}
impl Default for SwkbdDictWord {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
pub type SwkbdCallbackFn = ::core::option::Option<
unsafe extern "C" fn(
user: *mut ::libc::c_void,
ppMessage: *mut *const ::libc::c_char,
text: *const ::libc::c_char,
textlen: size_t,
) -> SwkbdCallbackResult,
>;
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct SwkbdStatusData {
pub data: [u32_; 17usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct SwkbdLearningData {
pub data: [u32_; 10523usize],
}
impl Default for SwkbdLearningData {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct SwkbdExtra {
pub initial_text: *const ::libc::c_char,
pub dict: *const SwkbdDictWord,
pub status_data: *mut SwkbdStatusData,
pub learning_data: *mut SwkbdLearningData,
pub callback: SwkbdCallbackFn,
pub callback_user: *mut ::libc::c_void,
}
impl Default for SwkbdExtra {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct SwkbdState {
pub type_: ::libc::c_int,
pub num_buttons_m1: ::libc::c_int,
pub valid_input: ::libc::c_int,
pub password_mode: ::libc::c_int,
pub is_parental_screen: ::libc::c_int,
pub darken_top_screen: ::libc::c_int,
pub filter_flags: u32_,
pub save_state_flags: u32_,
pub max_text_len: u16_,
pub dict_word_count: u16_,
pub max_digits: u16_,
pub button_text: [[u16_; 17usize]; 3usize],
pub numpad_keys: [u16_; 2usize],
pub hint_text: [u16_; 65usize],
pub predictive_input: bool,
pub multiline: bool,
pub fixed_width: bool,
pub allow_home: bool,
pub allow_reset: bool,
pub allow_power: bool,
pub unknown: bool,
pub default_qwerty: bool,
pub button_submits_text: [bool; 4usize],
pub language: u16_,
pub initial_text_offset: ::libc::c_int,
pub dict_offset: ::libc::c_int,
pub initial_status_offset: ::libc::c_int,
pub initial_learning_offset: ::libc::c_int,
pub shared_memory_size: size_t,
pub version: u32_,
pub result: SwkbdResult,
pub status_offset: ::libc::c_int,
pub learning_offset: ::libc::c_int,
pub text_offset: ::libc::c_int,
pub text_length: u16_,
pub callback_result: ::libc::c_int,
pub callback_msg: [u16_; 257usize],
pub skip_at_check: bool,
pub __bindgen_anon_1: SwkbdState__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union SwkbdState__bindgen_ty_1 {
pub reserved: [u8_; 171usize],
pub extra: SwkbdExtra,
_bindgen_union_align: [u32; 43usize],
}
impl Default for SwkbdState__bindgen_ty_1 {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
impl Default for SwkbdState {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
extern "C" {
pub fn swkbdInit(
swkbd: *mut SwkbdState,
type_: SwkbdType,
numButtons: ::libc::c_int,
maxTextLength: ::libc::c_int,
);
}
extern "C" {
pub fn swkbdSetFeatures(swkbd: *mut SwkbdState, features: u32_);
}
extern "C" {
pub fn swkbdSetHintText(swkbd: *mut SwkbdState, text: *const ::libc::c_char);
}
extern "C" {
pub fn swkbdSetButton(
swkbd: *mut SwkbdState,
button: SwkbdButton,
text: *const ::libc::c_char,
submit: bool,
);
}
extern "C" {
pub fn swkbdSetInitialText(swkbd: *mut SwkbdState, text: *const ::libc::c_char);
}
extern "C" {
pub fn swkbdSetDictWord(
word: *mut SwkbdDictWord,
reading: *const ::libc::c_char,
text: *const ::libc::c_char,
);
}
extern "C" {
pub fn swkbdSetDictionary(
swkbd: *mut SwkbdState,
dict: *const SwkbdDictWord,
wordCount: ::libc::c_int,
);
}
extern "C" {
pub fn swkbdSetStatusData(
swkbd: *mut SwkbdState,
data: *mut SwkbdStatusData,
in_: bool,
out: bool,
);
}
extern "C" {
pub fn swkbdSetLearningData(
swkbd: *mut SwkbdState,
data: *mut SwkbdLearningData,
in_: bool,
out: bool,
);
}
extern "C" {
pub fn swkbdSetFilterCallback(
swkbd: *mut SwkbdState,
callback: SwkbdCallbackFn,
user: *mut ::libc::c_void,
);
}
extern "C" {
pub fn swkbdInputText(
swkbd: *mut SwkbdState,
buf: *mut ::libc::c_char,
bufsize: size_t,
) -> SwkbdButton;
}
pub const ERROR_LANGUAGE_FLAG: ::libc::c_uint = 256;
pub const ERROR_WORD_WRAP_FLAG: ::libc::c_uint = 512;
pub type _bindgen_ty_34 = ::libc::c_uint;
pub const ERROR_CODE: errorType = 0;
pub const ERROR_TEXT: errorType = 1;
pub const ERROR_EULA: errorType = 2;
pub const ERROR_TYPE_EULA_FIRST_BOOT: errorType = 3;
pub const ERROR_TYPE_EULA_DRAW_ONLY: errorType = 4;
pub const ERROR_TYPE_AGREE: errorType = 5;
pub const ERROR_CODE_LANGUAGE: errorType = 256;
pub const ERROR_TEXT_LANGUAGE: errorType = 257;
pub const ERROR_EULA_LANGUAGE: errorType = 258;
pub const ERROR_TEXT_WORD_WRAP: errorType = 513;
pub const ERROR_TEXT_LANGUAGE_WORD_WRAP: errorType = 769;
pub type errorType = ::libc::c_uint;
pub const ERROR_NORMAL: errorScreenFlag = 0;
pub const ERROR_STEREO: errorScreenFlag = 1;
pub type errorScreenFlag = ::libc::c_uint;
pub const ERROR_UNKNOWN: errorReturnCode = -1;
pub const ERROR_NONE: errorReturnCode = 0;
pub const ERROR_SUCCESS: errorReturnCode = 1;
pub const ERROR_NOT_SUPPORTED: errorReturnCode = 2;
pub const ERROR_HOME_BUTTON: errorReturnCode = 10;
pub const ERROR_SOFTWARE_RESET: errorReturnCode = 11;
pub const ERROR_POWER_BUTTON: errorReturnCode = 12;
pub type errorReturnCode = ::libc::c_int;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct errorConf {
pub type_: errorType,
pub errorCode: ::libc::c_int,
pub upperScreenFlag: errorScreenFlag,
pub useLanguage: u16_,
pub Text: [u16_; 1900usize],
pub homeButton: bool,
pub softwareReset: bool,
pub appJump: bool,
pub returnCode: errorReturnCode,
pub eulaVersion: u16_,
}
impl Default for errorConf {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
extern "C" {
pub fn errorInit(err: *mut errorConf, type_: errorType, lang: CFG_Language);
}
extern "C" {
pub fn errorCode(err: *mut errorConf, error: ::libc::c_int);
}
extern "C" {
pub fn errorText(err: *mut errorConf, text: *const ::libc::c_char);
}
extern "C" {
pub fn errorDisp(err: *mut errorConf);
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct MiiSelectorConf {
pub enable_cancel_button: u8_,
pub enable_selecting_guests: u8_,
pub show_on_top_screen: u8_,
pub _unk0x3: [u8_; 5usize],
pub title: [u16_; 64usize],
pub _unk0x88: [u8_; 4usize],
pub show_guest_page: u8_,
pub _unk0x8D: [u8_; 3usize],
pub initial_index: u32_,
pub mii_guest_whitelist: [u8_; 6usize],
pub mii_whitelist: [u8_; 100usize],
pub _unk0xFE: u16_,
pub magic: u32_,
}
impl Default for MiiSelectorConf {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
pub struct MiiSelectorReturn {
pub no_mii_selected: u32_,
pub guest_mii_was_selected: u32_,
pub guest_mii_index: u32_,
pub mii: MiiData,
pub _pad0x68: u16_,
pub checksum: u16_,
pub guest_mii_name: [u16_; 12usize],
}
impl Default for MiiSelectorReturn {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
pub const MIISELECTOR_CANCEL: ::libc::c_uint = 1;
pub const MIISELECTOR_GUESTS: ::libc::c_uint = 2;
pub const MIISELECTOR_TOP: ::libc::c_uint = 4;
pub const MIISELECTOR_GUESTSTART: ::libc::c_uint = 8;
pub type _bindgen_ty_35 = ::libc::c_uint;
extern "C" {
pub fn miiSelectorInit(conf: *mut MiiSelectorConf);
}
extern "C" {
pub fn miiSelectorLaunch(conf: *const MiiSelectorConf, returnbuf: *mut MiiSelectorReturn);
}
extern "C" {
pub fn miiSelectorSetTitle(conf: *mut MiiSelectorConf, text: *const ::libc::c_char);
}
extern "C" {
pub fn miiSelectorSetOptions(conf: *mut MiiSelectorConf, options: u32_);
}
extern "C" {
pub fn miiSelectorWhitelistGuestMii(conf: *mut MiiSelectorConf, index: u32_);
}
extern "C" {
pub fn miiSelectorBlacklistGuestMii(conf: *mut MiiSelectorConf, index: u32_);
}
extern "C" {
pub fn miiSelectorWhitelistUserMii(conf: *mut MiiSelectorConf, index: u32_);
}
extern "C" {
pub fn miiSelectorBlacklistUserMii(conf: *mut MiiSelectorConf, index: u32_);
}
extern "C" {
pub fn miiSelectorReturnGetName(
returnbuf: *const MiiSelectorReturn,
out: *mut ::libc::c_char,
max_size: size_t,
);
}
extern "C" {
pub fn miiSelectorReturnGetAuthor(
returnbuf: *const MiiSelectorReturn,
out: *mut ::libc::c_char,
max_size: size_t,
);
}
extern "C" {
pub fn miiSelectorChecksumIsValid(returnbuf: *const MiiSelectorReturn) -> bool;
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct archive_dir_t {
pub magic: u32_,
pub fd: Handle,
pub index: ssize_t,
pub size: size_t,
pub entry_data: [FS_DirectoryEntry; 32usize],
}
impl Default for archive_dir_t {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
extern "C" {
pub fn archiveMountSdmc() -> Result;
}
extern "C" {
pub fn archiveMount(
archiveID: FS_ArchiveID,
archivePath: FS_Path,
deviceName: *const ::libc::c_char,
) -> Result;
}
extern "C" {
pub fn archiveCommitSaveData(deviceName: *const ::libc::c_char) -> Result;
}
extern "C" {
pub fn archiveUnmount(deviceName: *const ::libc::c_char) -> Result;
}
extern "C" {
pub fn archiveUnmountAll() -> Result;
}
extern "C" {
pub fn archive_getmtime(name: *const ::libc::c_char, mtime: *mut u64_) -> Result;
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct romfs_header {
pub headerSize: u32_,
pub dirHashTableOff: u32_,
pub dirHashTableSize: u32_,
pub dirTableOff: u32_,
pub dirTableSize: u32_,
pub fileHashTableOff: u32_,
pub fileHashTableSize: u32_,
pub fileTableOff: u32_,
pub fileTableSize: u32_,
pub fileDataOff: u32_,
}
#[repr(C)]
#[derive(Debug, Default)]
pub struct romfs_dir {
pub parent: u32_,
pub sibling: u32_,
pub childDir: u32_,
pub childFile: u32_,
pub nextHash: u32_,
pub nameLen: u32_,
pub name: __IncompleteArrayField<u16_>,
}
#[repr(C)]
#[derive(Debug, Default)]
pub struct romfs_file {
pub parent: u32_,
pub sibling: u32_,
pub dataOff: u64_,
pub dataSize: u64_,
pub nextHash: u32_,
pub nameLen: u32_,
pub name: __IncompleteArrayField<u16_>,
}
extern "C" {
pub fn romfsMountSelf(name: *const ::libc::c_char) -> Result;
}
extern "C" {
pub fn romfsMountFromFile(fd: Handle, offset: u32_, name: *const ::libc::c_char) -> Result;
}
extern "C" {
pub fn romfsMountFromCurrentProcess(name: *const ::libc::c_char) -> Result;
}
extern "C" {
pub fn romfsMountFromTitle(
tid: u64_,
mediatype: FS_MediaType,
name: *const ::libc::c_char,
) -> Result;
}
extern "C" {
pub fn romfsUnmount(name: *const ::libc::c_char) -> Result;
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct charWidthInfo_s {
pub left: s8,
pub glyphWidth: u8_,
pub charWidth: u8_,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct TGLP_s {
pub cellWidth: u8_,
pub cellHeight: u8_,
pub baselinePos: u8_,
pub maxCharWidth: u8_,
pub sheetSize: u32_,
pub nSheets: u16_,
pub sheetFmt: u16_,
pub nRows: u16_,
pub nLines: u16_,
pub sheetWidth: u16_,
pub sheetHeight: u16_,
pub sheetData: *mut u8_,
}
impl Default for TGLP_s {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
pub type CWDH_s = tag_CWDH_s;
#[repr(C)]
#[derive(Debug)]
pub struct tag_CWDH_s {
pub startIndex: u16_,
pub endIndex: u16_,
pub next: *mut CWDH_s,
pub widths: __IncompleteArrayField<charWidthInfo_s>,
}
impl Default for tag_CWDH_s {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
pub const CMAP_TYPE_DIRECT: ::libc::c_uint = 0;
pub const CMAP_TYPE_TABLE: ::libc::c_uint = 1;
pub const CMAP_TYPE_SCAN: ::libc::c_uint = 2;
pub type _bindgen_ty_36 = ::libc::c_uint;
pub type CMAP_s = tag_CMAP_s;
#[repr(C)]
pub struct tag_CMAP_s {
pub codeBegin: u16_,
pub codeEnd: u16_,
pub mappingMethod: u16_,
pub reserved: u16_,
pub next: *mut CMAP_s,
pub __bindgen_anon_1: tag_CMAP_s__bindgen_ty_1,
}
#[repr(C)]
pub struct tag_CMAP_s__bindgen_ty_1 {
pub indexOffset: __BindgenUnionField<u16_>,
pub indexTable: __BindgenUnionField<[u16_; 0usize]>,
pub __bindgen_anon_1: __BindgenUnionField<tag_CMAP_s__bindgen_ty_1__bindgen_ty_1>,
pub bindgen_union_field: u16,
}
#[repr(C)]
#[derive(Debug, Default)]
pub struct tag_CMAP_s__bindgen_ty_1__bindgen_ty_1 {
pub nScanEntries: u16_,
pub scanEntries: __IncompleteArrayField<tag_CMAP_s__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1>,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct tag_CMAP_s__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 {
pub code: u16_,
pub glyphIndex: u16_,
}
impl Default for tag_CMAP_s__bindgen_ty_1 {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
impl Default for tag_CMAP_s {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct FINF_s {
pub signature: u32_,
pub sectionSize: u32_,
pub fontType: u8_,
pub lineFeed: u8_,
pub alterCharIndex: u16_,
pub defaultWidth: charWidthInfo_s,
pub encoding: u8_,
pub tglp: *mut TGLP_s,
pub cwdh: *mut CWDH_s,
pub cmap: *mut CMAP_s,
pub height: u8_,
pub width: u8_,
pub ascent: u8_,
pub padding: u8_,
}
impl Default for FINF_s {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct CFNT_s {
pub signature: u32_,
pub endianness: u16_,
pub headerSize: u16_,
pub version: u32_,
pub fileSize: u32_,
pub nBlocks: u32_,
pub finf: FINF_s,
}
impl Default for CFNT_s {
fn default() -> Self {
unsafe { ::core::mem::zeroed() }
}
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct fontGlyphPos_s {
pub sheetIndex: ::libc::c_int,
pub xOffset: f32,
pub xAdvance: f32,
pub width: f32,
pub texcoord: fontGlyphPos_s__bindgen_ty_1,
pub vtxcoord: fontGlyphPos_s__bindgen_ty_2,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct fontGlyphPos_s__bindgen_ty_1 {
pub left: f32,
pub top: f32,
pub right: f32,
pub bottom: f32,
}
#[repr(C)]
#[derive(Debug, Default, Copy, Clone)]
pub struct fontGlyphPos_s__bindgen_ty_2 {
pub left: f32,
pub top: f32,
pub right: f32,
pub bottom: f32,
}
pub const GLYPH_POS_CALC_VTXCOORD: ::libc::c_uint = 1;
pub const GLYPH_POS_AT_BASELINE: ::libc::c_uint = 2;
pub const GLYPH_POS_Y_POINTS_UP: ::libc::c_uint = 4;
pub type _bindgen_ty_37 = ::libc::c_uint;
extern "C" {
pub fn fontEnsureMapped() -> Result;
}
extern "C" {
pub fn fontFixPointers(font: *mut CFNT_s);
}
extern "C" {
pub fn fontGlyphIndexFromCodePoint(font: *mut CFNT_s, codePoint: u32_) -> ::libc::c_int;
}
extern "C" {
pub fn fontGetCharWidthInfo(
font: *mut CFNT_s,
glyphIndex: ::libc::c_int,
) -> *mut charWidthInfo_s;
}
extern "C" {
pub fn fontCalcGlyphPos(
out: *mut fontGlyphPos_s,
font: *mut CFNT_s,
glyphIndex: ::libc::c_int,
flags: u32_,
scaleX: f32,
scaleY: f32,
);
}
extern "C" {
pub fn gdbHioDevInit() -> ::libc::c_int;
}
extern "C" {
pub fn gdbHioDevExit();
}
extern "C" {
pub fn gdbHioDevGetStdin() -> ::libc::c_int;
}
extern "C" {
pub fn gdbHioDevGetStdout() -> ::libc::c_int;
}
extern "C" {
pub fn gdbHioDevGetStderr() -> ::libc::c_int;
}
extern "C" {
pub fn gdbHioDevRedirectStdStreams(in_: bool, out: bool, err: bool) -> ::libc::c_int;
}
extern "C" {
pub fn gdbHioDevGettimeofday(tv: *mut timeval, tz: *mut ::libc::c_void) -> ::libc::c_int;
}
extern "C" {
pub fn gdbHioDevIsatty(fd: ::libc::c_int) -> ::libc::c_int;
}
extern "C" {
pub fn gdbHioDevSystem(command: *const ::libc::c_char) -> ::libc::c_int;
}
|