rattler_libsolv_c 1.3.3

Bindings for libsolv
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
//! Generated file, do not edit by hand, see `crate/tools/src`

#![allow(
    non_upper_case_globals,
    non_camel_case_types,
    non_snake_case,
    dead_code,
    clippy::upper_case_acronyms
)]

pub use libc::FILE;

pub const SOLV_VERSION_0: u32 = 0;
pub const SOLV_VERSION_1: u32 = 1;
pub const SOLV_VERSION_2: u32 = 2;
pub const SOLV_VERSION_3: u32 = 3;
pub const SOLV_VERSION_4: u32 = 4;
pub const SOLV_VERSION_5: u32 = 5;
pub const SOLV_VERSION_6: u32 = 6;
pub const SOLV_VERSION_7: u32 = 7;
pub const SOLV_VERSION_8: u32 = 8;
pub const SOLV_VERSION_9: u32 = 9;
pub const SOLV_FLAG_PREFIX_POOL: u32 = 4;
pub const SOLV_FLAG_SIZE_BYTES: u32 = 8;
pub const SOLV_FLAG_USERDATA: u32 = 16;
pub const SOLV_FLAG_IDARRAYBLOCK: u32 = 32;
pub const DISTTYPE_RPM: u32 = 0;
pub const DISTTYPE_DEB: u32 = 1;
pub const DISTTYPE_ARCH: u32 = 2;
pub const DISTTYPE_HAIKU: u32 = 3;
pub const DISTTYPE_CONDA: u32 = 4;
pub const DISTTYPE_APK: u32 = 5;
pub const SOLV_FATAL: u32 = 1;
pub const SOLV_ERROR: u32 = 2;
pub const SOLV_WARN: u32 = 4;
pub const SOLV_DEBUG_STATS: u32 = 8;
pub const SOLV_DEBUG_RULE_CREATION: u32 = 16;
pub const SOLV_DEBUG_PROPAGATE: u32 = 32;
pub const SOLV_DEBUG_ANALYZE: u32 = 64;
pub const SOLV_DEBUG_UNSOLVABLE: u32 = 128;
pub const SOLV_DEBUG_SOLUTIONS: u32 = 256;
pub const SOLV_DEBUG_POLICY: u32 = 512;
pub const SOLV_DEBUG_RESULT: u32 = 1024;
pub const SOLV_DEBUG_JOB: u32 = 2048;
pub const SOLV_DEBUG_SOLVER: u32 = 4096;
pub const SOLV_DEBUG_TRANSACTION: u32 = 8192;
pub const SOLV_DEBUG_WATCHES: u32 = 16384;
pub const SOLV_DEBUG_TO_STDERR: u32 = 1073741824;
pub const POOL_FLAG_PROMOTEEPOCH: u32 = 1;
pub const POOL_FLAG_FORBIDSELFCONFLICTS: u32 = 2;
pub const POOL_FLAG_OBSOLETEUSESPROVIDES: u32 = 3;
pub const POOL_FLAG_IMPLICITOBSOLETEUSESPROVIDES: u32 = 4;
pub const POOL_FLAG_OBSOLETEUSESCOLORS: u32 = 5;
pub const POOL_FLAG_NOINSTALLEDOBSOLETES: u32 = 6;
pub const POOL_FLAG_HAVEDISTEPOCH: u32 = 7;
pub const POOL_FLAG_NOOBSOLETESMULTIVERSION: u32 = 8;
pub const POOL_FLAG_ADDFILEPROVIDESFILTERED: u32 = 9;
pub const POOL_FLAG_IMPLICITOBSOLETEUSESCOLORS: u32 = 10;
pub const POOL_FLAG_NOWHATPROVIDESAUX: u32 = 11;
pub const POOL_FLAG_WHATPROVIDESWITHDISABLED: u32 = 12;
pub const REL_GT: u32 = 1;
pub const REL_EQ: u32 = 2;
pub const REL_LT: u32 = 4;
pub const REL_AND: u32 = 16;
pub const REL_OR: u32 = 17;
pub const REL_WITH: u32 = 18;
pub const REL_NAMESPACE: u32 = 19;
pub const REL_ARCH: u32 = 20;
pub const REL_FILECONFLICT: u32 = 21;
pub const REL_COND: u32 = 22;
pub const REL_COMPAT: u32 = 23;
pub const REL_KIND: u32 = 24;
pub const REL_MULTIARCH: u32 = 25;
pub const REL_ELSE: u32 = 26;
pub const REL_ERROR: u32 = 27;
pub const REL_WITHOUT: u32 = 28;
pub const REL_UNLESS: u32 = 29;
pub const REL_CONDA: u32 = 30;
pub const SEARCH_STRINGMASK: u32 = 15;
pub const SEARCH_STRING: u32 = 1;
pub const SEARCH_STRINGSTART: u32 = 2;
pub const SEARCH_STRINGEND: u32 = 3;
pub const SEARCH_SUBSTRING: u32 = 4;
pub const SEARCH_GLOB: u32 = 5;
pub const SEARCH_REGEX: u32 = 6;
pub const SEARCH_ERROR: u32 = 15;
pub const SEARCH_NOCASE: u32 = 128;
pub const SEARCH_NO_STORAGE_SOLVABLE: u32 = 256;
pub const SEARCH_SUB: u32 = 512;
pub const SEARCH_ARRAYSENTINEL: u32 = 1024;
pub const SEARCH_DISABLED_REPOS: u32 = 2048;
pub const SEARCH_KEEP_TYPE_DELETED: u32 = 4096;
pub const SEARCH_SKIP_KIND: u32 = 65536;
pub const SEARCH_FILES: u32 = 131072;
pub const SEARCH_CHECKSUMS: u32 = 262144;
pub const SEARCH_THISSOLVID: u32 = 2147483648;
pub const SEARCH_COMPLETE_FILELIST: u32 = 0;
pub const SEARCH_NEXT_KEY: u32 = 1;
pub const SEARCH_NEXT_SOLVABLE: u32 = 2;
pub const SEARCH_STOP: u32 = 3;
pub const SEARCH_ENTERSUB: i32 = -1;
pub const SOLVER_TRANSACTION_IGNORE: u32 = 0;
pub const SOLVER_TRANSACTION_ERASE: u32 = 16;
pub const SOLVER_TRANSACTION_REINSTALLED: u32 = 17;
pub const SOLVER_TRANSACTION_DOWNGRADED: u32 = 18;
pub const SOLVER_TRANSACTION_CHANGED: u32 = 19;
pub const SOLVER_TRANSACTION_UPGRADED: u32 = 20;
pub const SOLVER_TRANSACTION_OBSOLETED: u32 = 21;
pub const SOLVER_TRANSACTION_INSTALL: u32 = 32;
pub const SOLVER_TRANSACTION_REINSTALL: u32 = 33;
pub const SOLVER_TRANSACTION_DOWNGRADE: u32 = 34;
pub const SOLVER_TRANSACTION_CHANGE: u32 = 35;
pub const SOLVER_TRANSACTION_UPGRADE: u32 = 36;
pub const SOLVER_TRANSACTION_OBSOLETES: u32 = 37;
pub const SOLVER_TRANSACTION_MULTIINSTALL: u32 = 48;
pub const SOLVER_TRANSACTION_MULTIREINSTALL: u32 = 49;
pub const SOLVER_TRANSACTION_MAXTYPE: u32 = 63;
pub const SOLVER_TRANSACTION_SHOW_ACTIVE: u32 = 1;
pub const SOLVER_TRANSACTION_SHOW_ALL: u32 = 2;
pub const SOLVER_TRANSACTION_SHOW_OBSOLETES: u32 = 4;
pub const SOLVER_TRANSACTION_SHOW_MULTIINSTALL: u32 = 8;
pub const SOLVER_TRANSACTION_CHANGE_IS_REINSTALL: u32 = 16;
pub const SOLVER_TRANSACTION_MERGE_VENDORCHANGES: u32 = 32;
pub const SOLVER_TRANSACTION_MERGE_ARCHCHANGES: u32 = 64;
pub const SOLVER_TRANSACTION_RPM_ONLY: u32 = 128;
pub const SOLVER_TRANSACTION_KEEP_PSEUDO: u32 = 256;
pub const SOLVER_TRANSACTION_OBSOLETE_IS_UPGRADE: u32 = 512;
pub const SOLVER_TRANSACTION_ARCHCHANGE: u32 = 256;
pub const SOLVER_TRANSACTION_VENDORCHANGE: u32 = 257;
pub const SOLVER_TRANSACTION_KEEP_ORDERDATA: u32 = 1;
pub const SOLVER_TRANSACTION_KEEP_ORDERCYCLES: u32 = 2;
pub const SOLVER_TRANSACTION_KEEP_ORDEREDGES: u32 = 4;
pub const SOLVER_ORDERCYCLE_HARMLESS: u32 = 0;
pub const SOLVER_ORDERCYCLE_NORMAL: u32 = 1;
pub const SOLVER_ORDERCYCLE_CRITICAL: u32 = 2;
pub const SOLVER_RULE_TYPEMASK: u32 = 65280;
pub const SOLVER_SOLUTION_JOB: u32 = 0;
pub const SOLVER_SOLUTION_DISTUPGRADE: i32 = -1;
pub const SOLVER_SOLUTION_INFARCH: i32 = -2;
pub const SOLVER_SOLUTION_BEST: i32 = -3;
pub const SOLVER_SOLUTION_POOLJOB: i32 = -4;
pub const SOLVER_SOLUTION_BLACK: i32 = -5;
pub const SOLVER_SOLUTION_STRICTREPOPRIORITY: i32 = -6;
pub const SOLVER_SOLUTION_ERASE: i32 = -100;
pub const SOLVER_SOLUTION_REPLACE: i32 = -101;
pub const SOLVER_SOLUTION_REPLACE_DOWNGRADE: i32 = -102;
pub const SOLVER_SOLUTION_REPLACE_ARCHCHANGE: i32 = -103;
pub const SOLVER_SOLUTION_REPLACE_VENDORCHANGE: i32 = -104;
pub const SOLVER_SOLUTION_REPLACE_NAMECHANGE: i32 = -105;
pub const SOLVER_SOLVABLE: u32 = 1;
pub const SOLVER_SOLVABLE_NAME: u32 = 2;
pub const SOLVER_SOLVABLE_PROVIDES: u32 = 3;
pub const SOLVER_SOLVABLE_ONE_OF: u32 = 4;
pub const SOLVER_SOLVABLE_REPO: u32 = 5;
pub const SOLVER_SOLVABLE_ALL: u32 = 6;
pub const SOLVER_SELECTMASK: u32 = 255;
pub const SOLVER_NOOP: u32 = 0;
pub const SOLVER_INSTALL: u32 = 256;
pub const SOLVER_ERASE: u32 = 512;
pub const SOLVER_UPDATE: u32 = 768;
pub const SOLVER_WEAKENDEPS: u32 = 1024;
pub const SOLVER_MULTIVERSION: u32 = 1280;
pub const SOLVER_LOCK: u32 = 1536;
pub const SOLVER_DISTUPGRADE: u32 = 1792;
pub const SOLVER_VERIFY: u32 = 2048;
pub const SOLVER_DROP_ORPHANED: u32 = 2304;
pub const SOLVER_USERINSTALLED: u32 = 2560;
pub const SOLVER_ALLOWUNINSTALL: u32 = 2816;
pub const SOLVER_FAVOR: u32 = 3072;
pub const SOLVER_DISFAVOR: u32 = 3328;
pub const SOLVER_BLACKLIST: u32 = 3584;
pub const SOLVER_EXCLUDEFROMWEAK: u32 = 4096;
pub const SOLVER_JOBMASK: u32 = 65280;
pub const SOLVER_WEAK: u32 = 65536;
pub const SOLVER_ESSENTIAL: u32 = 131072;
pub const SOLVER_CLEANDEPS: u32 = 262144;
pub const SOLVER_ORUPDATE: u32 = 524288;
pub const SOLVER_FORCEBEST: u32 = 1048576;
pub const SOLVER_TARGETED: u32 = 2097152;
pub const SOLVER_NOTBYUSER: u32 = 4194304;
pub const SOLVER_SETEV: u32 = 16777216;
pub const SOLVER_SETEVR: u32 = 33554432;
pub const SOLVER_SETARCH: u32 = 67108864;
pub const SOLVER_SETVENDOR: u32 = 134217728;
pub const SOLVER_SETREPO: u32 = 268435456;
pub const SOLVER_NOAUTOSET: u32 = 536870912;
pub const SOLVER_SETNAME: u32 = 1073741824;
pub const SOLVER_SETMASK: u32 = 2130706432;
pub const SOLVER_NOOBSOLETES: u32 = 1280;
pub const SOLVER_REASON_UNRELATED: u32 = 0;
pub const SOLVER_REASON_UNIT_RULE: u32 = 1;
pub const SOLVER_REASON_KEEP_INSTALLED: u32 = 2;
pub const SOLVER_REASON_RESOLVE_JOB: u32 = 3;
pub const SOLVER_REASON_UPDATE_INSTALLED: u32 = 4;
pub const SOLVER_REASON_CLEANDEPS_ERASE: u32 = 5;
pub const SOLVER_REASON_RESOLVE: u32 = 6;
pub const SOLVER_REASON_WEAKDEP: u32 = 7;
pub const SOLVER_REASON_RESOLVE_ORPHAN: u32 = 8;
pub const SOLVER_REASON_RECOMMENDED: u32 = 16;
pub const SOLVER_REASON_SUPPLEMENTED: u32 = 17;
pub const SOLVER_REASON_UNSOLVABLE: u32 = 18;
pub const SOLVER_REASON_PREMISE: u32 = 19;
pub const SOLVER_FLAG_ALLOW_DOWNGRADE: u32 = 1;
pub const SOLVER_FLAG_ALLOW_ARCHCHANGE: u32 = 2;
pub const SOLVER_FLAG_ALLOW_VENDORCHANGE: u32 = 3;
pub const SOLVER_FLAG_ALLOW_UNINSTALL: u32 = 4;
pub const SOLVER_FLAG_NO_UPDATEPROVIDE: u32 = 5;
pub const SOLVER_FLAG_SPLITPROVIDES: u32 = 6;
pub const SOLVER_FLAG_IGNORE_RECOMMENDED: u32 = 7;
pub const SOLVER_FLAG_ADD_ALREADY_RECOMMENDED: u32 = 8;
pub const SOLVER_FLAG_NO_INFARCHCHECK: u32 = 9;
pub const SOLVER_FLAG_ALLOW_NAMECHANGE: u32 = 10;
pub const SOLVER_FLAG_KEEP_EXPLICIT_OBSOLETES: u32 = 11;
pub const SOLVER_FLAG_BEST_OBEY_POLICY: u32 = 12;
pub const SOLVER_FLAG_NO_AUTOTARGET: u32 = 13;
pub const SOLVER_FLAG_DUP_ALLOW_DOWNGRADE: u32 = 14;
pub const SOLVER_FLAG_DUP_ALLOW_ARCHCHANGE: u32 = 15;
pub const SOLVER_FLAG_DUP_ALLOW_VENDORCHANGE: u32 = 16;
pub const SOLVER_FLAG_DUP_ALLOW_NAMECHANGE: u32 = 17;
pub const SOLVER_FLAG_KEEP_ORPHANS: u32 = 18;
pub const SOLVER_FLAG_BREAK_ORPHANS: u32 = 19;
pub const SOLVER_FLAG_FOCUS_INSTALLED: u32 = 20;
pub const SOLVER_FLAG_YUM_OBSOLETES: u32 = 21;
pub const SOLVER_FLAG_NEED_UPDATEPROVIDE: u32 = 22;
pub const SOLVER_FLAG_URPM_REORDER: u32 = 23;
pub const SOLVER_FLAG_FOCUS_BEST: u32 = 24;
pub const SOLVER_FLAG_STRONG_RECOMMENDS: u32 = 25;
pub const SOLVER_FLAG_INSTALL_ALSO_UPDATES: u32 = 26;
pub const SOLVER_FLAG_ONLY_NAMESPACE_RECOMMENDED: u32 = 27;
pub const SOLVER_FLAG_STRICT_REPO_PRIORITY: u32 = 28;
pub const SOLVER_FLAG_FOCUS_NEW: u32 = 29;
pub const SOLVER_ALTERNATIVE_TYPE_RULE: u32 = 1;
pub const SOLVER_ALTERNATIVE_TYPE_RECOMMENDS: u32 = 2;
pub const SOLVER_ALTERNATIVE_TYPE_SUGGESTS: u32 = 3;
pub const SOLVER_DECISIONLIST_SOLVABLE: u32 = 2;
pub const SOLVER_DECISIONLIST_PROBLEM: u32 = 4;
pub const SOLVER_DECISIONLIST_LEARNTRULE: u32 = 8;
pub const SOLVER_DECISIONLIST_WITHINFO: u32 = 256;
pub const SOLVER_DECISIONLIST_SORTED: u32 = 512;
pub const SOLVER_DECISIONLIST_MERGEDINFO: u32 = 1024;
pub const SOLVER_DECISIONLIST_TYPEMASK: u32 = 255;
pub const SELECTION_NAME: u32 = 1;
pub const SELECTION_PROVIDES: u32 = 2;
pub const SELECTION_FILELIST: u32 = 4;
pub const SELECTION_CANON: u32 = 8;
pub const SELECTION_DOTARCH: u32 = 16;
pub const SELECTION_REL: u32 = 32;
pub const SELECTION_GLOB: u32 = 512;
pub const SELECTION_NOCASE: u32 = 2048;
pub const SELECTION_FLAT: u32 = 1024;
pub const SELECTION_SKIP_KIND: u32 = 16384;
pub const SELECTION_MATCH_DEPSTR: u32 = 32768;
pub const SELECTION_INSTALLED_ONLY: u32 = 256;
pub const SELECTION_SOURCE_ONLY: u32 = 4096;
pub const SELECTION_WITH_SOURCE: u32 = 8192;
pub const SELECTION_WITH_DISABLED: u32 = 65536;
pub const SELECTION_WITH_BADARCH: u32 = 131072;
pub const SELECTION_WITH_ALL: u32 = 204800;
pub const SELECTION_REPLACE: u32 = 0;
pub const SELECTION_ADD: u32 = 268435456;
pub const SELECTION_SUBTRACT: u32 = 536870912;
pub const SELECTION_FILTER: u32 = 805306368;
pub const SELECTION_FILTER_KEEP_IFEMPTY: u32 = 1073741824;
pub const SELECTION_FILTER_SWAPPED: u32 = 2147483648;
pub const SELECTION_MODEBITS: u32 = 805306368;
pub const SOLV_ADD_NO_STUBS: u32 = 256;
pub const CONDA_ADD_USE_ONLY_TAR_BZ2: u32 = 256;
pub const CONDA_ADD_WITH_SIGNATUREDATA: u32 = 512;
pub type Stringpool = s_Stringpool;
pub type Pool = s_Pool;
pub type Repo = s_Repo;
pub type Repodata = s_Repodata;
pub type Solvable = s_Solvable;
pub type Id = libc::c_int;
pub type Offset = libc::c_uint;
pub type Hashval = libc::c_uint;
pub type Hashtable = *mut Id;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct s_Reldep {
    pub name: Id,
    pub evr: Id,
    pub flags: libc::c_int,
}
pub type Reldep = s_Reldep;
unsafe extern "C" {
    pub fn pool_str2id(pool: *mut Pool, arg1: *const libc::c_char, arg2: libc::c_int) -> Id;
}
unsafe extern "C" {
    pub fn pool_strn2id(
        pool: *mut Pool,
        arg1: *const libc::c_char,
        arg2: libc::c_uint,
        arg3: libc::c_int,
    ) -> Id;
}
unsafe extern "C" {
    pub fn pool_rel2id(
        pool: *mut Pool,
        arg1: Id,
        arg2: Id,
        arg3: libc::c_int,
        arg4: libc::c_int,
    ) -> Id;
}
unsafe extern "C" {
    pub fn pool_id2str(pool: *const Pool, arg1: Id) -> *const libc::c_char;
}
unsafe extern "C" {
    pub fn pool_id2rel(pool: *const Pool, arg1: Id) -> *const libc::c_char;
}
unsafe extern "C" {
    pub fn pool_id2evr(pool: *const Pool, arg1: Id) -> *const libc::c_char;
}
unsafe extern "C" {
    pub fn pool_dep2str(pool: *mut Pool, arg1: Id) -> *const libc::c_char;
}
unsafe extern "C" {
    pub fn pool_shrink_strings(pool: *mut Pool);
}
unsafe extern "C" {
    pub fn pool_shrink_rels(pool: *mut Pool);
}
unsafe extern "C" {
    pub fn pool_freeidhashes(pool: *mut Pool);
}
unsafe extern "C" {
    pub fn pool_resize_rels_hash(pool: *mut Pool, numnew: libc::c_int);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct s_Queue {
    pub elements: *mut Id,
    pub count: libc::c_int,
    pub alloc: *mut Id,
    pub left: libc::c_int,
}
pub type Queue = s_Queue;
unsafe extern "C" {
    pub fn queue_alloc_one(q: *mut Queue);
}
unsafe extern "C" {
    pub fn queue_alloc_one_head(q: *mut Queue);
}
unsafe extern "C" {
    pub fn queue_init(q: *mut Queue);
}
unsafe extern "C" {
    pub fn queue_init_buffer(q: *mut Queue, buf: *mut Id, size: libc::c_int);
}
unsafe extern "C" {
    pub fn queue_init_clone(target: *mut Queue, source: *const Queue);
}
unsafe extern "C" {
    pub fn queue_free(q: *mut Queue);
}
unsafe extern "C" {
    pub fn queue_insert(q: *mut Queue, pos: libc::c_int, id: Id);
}
unsafe extern "C" {
    pub fn queue_insert2(q: *mut Queue, pos: libc::c_int, id1: Id, id2: Id);
}
unsafe extern "C" {
    pub fn queue_insertn(q: *mut Queue, pos: libc::c_int, n: libc::c_int, elements: *const Id);
}
unsafe extern "C" {
    pub fn queue_delete(q: *mut Queue, pos: libc::c_int);
}
unsafe extern "C" {
    pub fn queue_delete2(q: *mut Queue, pos: libc::c_int);
}
unsafe extern "C" {
    pub fn queue_deleten(q: *mut Queue, pos: libc::c_int, n: libc::c_int);
}
unsafe extern "C" {
    pub fn queue_prealloc(q: *mut Queue, n: libc::c_int);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct s_Map {
    pub map: *mut libc::c_uchar,
    pub size: libc::c_int,
}
pub type Map = s_Map;
unsafe extern "C" {
    pub fn map_init(m: *mut Map, n: libc::c_int);
}
unsafe extern "C" {
    pub fn map_init_clone(target: *mut Map, source: *const Map);
}
unsafe extern "C" {
    pub fn map_grow(m: *mut Map, n: libc::c_int);
}
unsafe extern "C" {
    pub fn map_free(m: *mut Map);
}
unsafe extern "C" {
    pub fn map_and(t: *mut Map, s: *const Map);
}
unsafe extern "C" {
    pub fn map_or(t: *mut Map, s: *const Map);
}
unsafe extern "C" {
    pub fn map_subtract(t: *mut Map, s: *const Map);
}
unsafe extern "C" {
    pub fn map_invertall(m: *mut Map);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct s_Solvable {
    pub name: Id,
    pub arch: Id,
    pub evr: Id,
    pub vendor: Id,
    pub repo: *mut s_Repo,
    pub provides: Offset,
    pub obsoletes: Offset,
    pub conflicts: Offset,
    pub requires: Offset,
    pub recommends: Offset,
    pub suggests: Offset,
    pub supplements: Offset,
    pub enhances: Offset,
}
unsafe extern "C" {
    pub fn solvable_lookup_type(s: *mut Solvable, keyname: Id) -> Id;
}
unsafe extern "C" {
    pub fn solvable_lookup_id(s: *mut Solvable, keyname: Id) -> Id;
}
unsafe extern "C" {
    pub fn solvable_lookup_num(
        s: *mut Solvable,
        keyname: Id,
        notfound: libc::c_ulonglong,
    ) -> libc::c_ulonglong;
}
unsafe extern "C" {
    pub fn solvable_lookup_sizek(
        s: *mut Solvable,
        keyname: Id,
        notfound: libc::c_ulonglong,
    ) -> libc::c_ulonglong;
}
unsafe extern "C" {
    pub fn solvable_lookup_str(s: *mut Solvable, keyname: Id) -> *const libc::c_char;
}
unsafe extern "C" {
    pub fn solvable_lookup_str_poollang(s: *mut Solvable, keyname: Id) -> *const libc::c_char;
}
unsafe extern "C" {
    pub fn solvable_lookup_str_lang(
        s: *mut Solvable,
        keyname: Id,
        lang: *const libc::c_char,
        usebase: libc::c_int,
    ) -> *const libc::c_char;
}
unsafe extern "C" {
    pub fn solvable_lookup_bool(s: *mut Solvable, keyname: Id) -> libc::c_int;
}
unsafe extern "C" {
    pub fn solvable_lookup_void(s: *mut Solvable, keyname: Id) -> libc::c_int;
}
unsafe extern "C" {
    pub fn solvable_get_location(
        s: *mut Solvable,
        medianrp: *mut libc::c_uint,
    ) -> *const libc::c_char;
}
unsafe extern "C" {
    pub fn solvable_lookup_location(
        s: *mut Solvable,
        medianrp: *mut libc::c_uint,
    ) -> *const libc::c_char;
}
unsafe extern "C" {
    pub fn solvable_lookup_sourcepkg(s: *mut Solvable) -> *const libc::c_char;
}
unsafe extern "C" {
    pub fn solvable_lookup_bin_checksum(
        s: *mut Solvable,
        keyname: Id,
        typep: *mut Id,
    ) -> *const libc::c_uchar;
}
unsafe extern "C" {
    pub fn solvable_lookup_checksum(
        s: *mut Solvable,
        keyname: Id,
        typep: *mut Id,
    ) -> *const libc::c_char;
}
unsafe extern "C" {
    pub fn solvable_lookup_idarray(s: *mut Solvable, keyname: Id, q: *mut Queue) -> libc::c_int;
}
unsafe extern "C" {
    pub fn solvable_lookup_deparray(
        s: *mut Solvable,
        keyname: Id,
        q: *mut Queue,
        marker: Id,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn solvable_lookup_count(s: *mut Solvable, keyname: Id) -> libc::c_uint;
}
unsafe extern "C" {
    pub fn solvable_set_id(s: *mut Solvable, keyname: Id, id: Id);
}
unsafe extern "C" {
    pub fn solvable_set_num(s: *mut Solvable, keyname: Id, num: libc::c_ulonglong);
}
unsafe extern "C" {
    pub fn solvable_set_str(s: *mut Solvable, keyname: Id, str_: *const libc::c_char);
}
unsafe extern "C" {
    pub fn solvable_set_poolstr(s: *mut Solvable, keyname: Id, str_: *const libc::c_char);
}
unsafe extern "C" {
    pub fn solvable_add_poolstr_array(s: *mut Solvable, keyname: Id, str_: *const libc::c_char);
}
unsafe extern "C" {
    pub fn solvable_add_idarray(s: *mut Solvable, keyname: Id, id: Id);
}
unsafe extern "C" {
    pub fn solvable_add_deparray(s: *mut Solvable, keyname: Id, dep: Id, marker: Id);
}
unsafe extern "C" {
    pub fn solvable_set_idarray(s: *mut Solvable, keyname: Id, q: *mut Queue);
}
unsafe extern "C" {
    pub fn solvable_set_deparray(s: *mut Solvable, keyname: Id, q: *mut Queue, marker: Id);
}
unsafe extern "C" {
    pub fn solvable_unset(s: *mut Solvable, keyname: Id);
}
unsafe extern "C" {
    pub fn solvable_identical(s1: *mut Solvable, s2: *mut Solvable) -> libc::c_int;
}
unsafe extern "C" {
    pub fn solvable_selfprovidedep(s: *mut Solvable) -> Id;
}
unsafe extern "C" {
    pub fn solvable_matchesdep(
        s: *mut Solvable,
        keyname: Id,
        dep: Id,
        marker: libc::c_int,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn solvable_matchessolvable(
        s: *mut Solvable,
        keyname: Id,
        solvid: Id,
        depq: *mut Queue,
        marker: libc::c_int,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn solvable_matchessolvable_int(
        s: *mut Solvable,
        keyname: Id,
        marker: libc::c_int,
        solvid: Id,
        solvidmap: *mut Map,
        depq: *mut Queue,
        missc: *mut Map,
        reloff: libc::c_int,
        outdepq: *mut Queue,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn solvable_is_irrelevant_patch(s: *mut Solvable, installedmap: *mut Map) -> libc::c_int;
}
unsafe extern "C" {
    pub fn solvable_trivial_installable_map(
        s: *mut Solvable,
        installedmap: *mut Map,
        conflictsmap: *mut Map,
        multiversionmap: *mut Map,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn solvable_trivial_installable_queue(
        s: *mut Solvable,
        installed: *mut Queue,
        multiversionmap: *mut Map,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn solvable_trivial_installable_repo(
        s: *mut Solvable,
        installed: *mut s_Repo,
        multiversionmap: *mut Map,
    ) -> libc::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct s_Stringpool {
    pub strings: *mut Offset,
    pub nstrings: libc::c_int,
    pub stringspace: *mut libc::c_char,
    pub sstrings: Offset,
    pub stringhashtbl: Hashtable,
    pub stringhashmask: Hashval,
}
unsafe extern "C" {
    pub fn stringpool_init(ss: *mut Stringpool, strs: *mut *const libc::c_char);
}
unsafe extern "C" {
    pub fn stringpool_init_empty(ss: *mut Stringpool);
}
unsafe extern "C" {
    pub fn stringpool_clone(ss: *mut Stringpool, from: *mut Stringpool);
}
unsafe extern "C" {
    pub fn stringpool_free(ss: *mut Stringpool);
}
unsafe extern "C" {
    pub fn stringpool_freehash(ss: *mut Stringpool);
}
unsafe extern "C" {
    pub fn stringpool_str2id(
        ss: *mut Stringpool,
        str_: *const libc::c_char,
        create: libc::c_int,
    ) -> Id;
}
unsafe extern "C" {
    pub fn stringpool_strn2id(
        ss: *mut Stringpool,
        str_: *const libc::c_char,
        len: libc::c_uint,
        create: libc::c_int,
    ) -> Id;
}
unsafe extern "C" {
    pub fn stringpool_shrink(ss: *mut Stringpool);
}
unsafe extern "C" {
    pub fn stringpool_reserve(ss: *mut Stringpool, numid: libc::c_int, sizeid: Offset);
}
unsafe extern "C" {
    pub fn stringpool_integrate(
        ss: *mut Stringpool,
        numid: libc::c_int,
        sizeid: Offset,
        idmap: *mut Id,
    ) -> libc::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct s_Datapos {
    pub repo: *mut Repo,
    pub solvid: Id,
    pub repodataid: Id,
    pub schema: Id,
    pub dp: Id,
}
pub type Datapos = s_Datapos;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct s_Pool {
    pub appdata: *mut libc::c_void,
    pub ss: Stringpool,
    pub rels: *mut Reldep,
    pub nrels: libc::c_int,
    pub repos: *mut *mut Repo,
    pub nrepos: libc::c_int,
    pub urepos: libc::c_int,
    pub installed: *mut Repo,
    pub solvables: *mut Solvable,
    pub nsolvables: libc::c_int,
    pub languages: *mut *const libc::c_char,
    pub nlanguages: libc::c_int,
    pub disttype: libc::c_int,
    pub id2arch: *mut Id,
    pub id2color: *mut libc::c_uchar,
    pub lastarch: Id,
    pub vendormap: Queue,
    pub vendorclasses: *mut *const libc::c_char,
    pub whatprovides: *mut Offset,
    pub whatprovides_rel: *mut Offset,
    pub whatprovidesdata: *mut Id,
    pub whatprovidesdataoff: Offset,
    pub whatprovidesdataleft: libc::c_int,
    pub considered: *mut Map,
    pub nscallback: ::std::option::Option<
        unsafe extern "C" fn(arg1: *mut Pool, data: *mut libc::c_void, name: Id, evr: Id) -> Id,
    >,
    pub nscallbackdata: *mut libc::c_void,
    pub debugmask: libc::c_int,
    pub debugcallback: ::std::option::Option<
        unsafe extern "C" fn(
            arg1: *mut Pool,
            data: *mut libc::c_void,
            type_: libc::c_int,
            str_: *const libc::c_char,
        ),
    >,
    pub debugcallbackdata: *mut libc::c_void,
    pub loadcallback: ::std::option::Option<
        unsafe extern "C" fn(
            arg1: *mut Pool,
            arg2: *mut Repodata,
            arg3: *mut libc::c_void,
        ) -> libc::c_int,
    >,
    pub loadcallbackdata: *mut libc::c_void,
    pub pos: Datapos,
    pub pooljobs: Queue,
}
unsafe extern "C" {
    pub fn pool_create() -> *mut Pool;
}
unsafe extern "C" {
    pub fn pool_free(pool: *mut Pool);
}
unsafe extern "C" {
    pub fn pool_freeallrepos(pool: *mut Pool, reuseids: libc::c_int);
}
unsafe extern "C" {
    pub fn pool_setdebuglevel(pool: *mut Pool, level: libc::c_int);
}
unsafe extern "C" {
    pub fn pool_setdisttype(pool: *mut Pool, disttype: libc::c_int) -> libc::c_int;
}
unsafe extern "C" {
    pub fn pool_set_flag(pool: *mut Pool, flag: libc::c_int, value: libc::c_int) -> libc::c_int;
}
unsafe extern "C" {
    pub fn pool_get_flag(pool: *mut Pool, flag: libc::c_int) -> libc::c_int;
}
unsafe extern "C" {
    pub fn pool_debug(pool: *mut Pool, type_: libc::c_int, format: *const libc::c_char, ...);
}
unsafe extern "C" {
    pub fn pool_setdebugcallback(
        pool: *mut Pool,
        debugcallback: ::std::option::Option<
            unsafe extern "C" fn(
                pool: *mut Pool,
                data: *mut libc::c_void,
                type_: libc::c_int,
                str_: *const libc::c_char,
            ),
        >,
        debugcallbackdata: *mut libc::c_void,
    );
}
unsafe extern "C" {
    pub fn pool_setdebugmask(pool: *mut Pool, mask: libc::c_int);
}
unsafe extern "C" {
    pub fn pool_setloadcallback(
        pool: *mut Pool,
        cb: ::std::option::Option<
            unsafe extern "C" fn(
                arg1: *mut Pool,
                arg2: *mut Repodata,
                arg3: *mut libc::c_void,
            ) -> libc::c_int,
        >,
        loadcbdata: *mut libc::c_void,
    );
}
unsafe extern "C" {
    pub fn pool_setnamespacecallback(
        pool: *mut Pool,
        cb: ::std::option::Option<
            unsafe extern "C" fn(
                arg1: *mut Pool,
                arg2: *mut libc::c_void,
                arg3: Id,
                arg4: Id,
            ) -> Id,
        >,
        nscbdata: *mut libc::c_void,
    );
}
unsafe extern "C" {
    pub fn pool_flush_namespaceproviders(pool: *mut Pool, ns: Id, evr: Id);
}
unsafe extern "C" {
    pub fn pool_set_custom_vendorcheck(
        pool: *mut Pool,
        vendorcheck: ::std::option::Option<
            unsafe extern "C" fn(
                arg1: *mut Pool,
                arg2: *mut Solvable,
                arg3: *mut Solvable,
            ) -> libc::c_int,
        >,
    );
}
unsafe extern "C" {
    pub fn pool_get_custom_vendorcheck(
        pool: *mut Pool,
    ) -> ::std::option::Option<
        unsafe extern "C" fn(
            pool: *mut Pool,
            arg1: *mut Solvable,
            arg2: *mut Solvable,
        ) -> libc::c_int,
    >;
}
unsafe extern "C" {
    pub fn pool_alloctmpspace(pool: *mut Pool, len: libc::c_int) -> *mut libc::c_char;
}
unsafe extern "C" {
    pub fn pool_freetmpspace(pool: *mut Pool, space: *const libc::c_char);
}
unsafe extern "C" {
    pub fn pool_tmpjoin(
        pool: *mut Pool,
        str1: *const libc::c_char,
        str2: *const libc::c_char,
        str3: *const libc::c_char,
    ) -> *mut libc::c_char;
}
unsafe extern "C" {
    pub fn pool_tmpappend(
        pool: *mut Pool,
        str1: *const libc::c_char,
        str2: *const libc::c_char,
        str3: *const libc::c_char,
    ) -> *mut libc::c_char;
}
unsafe extern "C" {
    pub fn pool_bin2hex(
        pool: *mut Pool,
        buf: *const libc::c_uchar,
        len: libc::c_int,
    ) -> *const libc::c_char;
}
unsafe extern "C" {
    pub fn pool_set_installed(pool: *mut Pool, repo: *mut Repo);
}
unsafe extern "C" {
    pub fn pool_error(
        pool: *mut Pool,
        ret: libc::c_int,
        format: *const libc::c_char,
        ...
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn pool_errstr(pool: *mut Pool) -> *mut libc::c_char;
}
unsafe extern "C" {
    pub fn pool_set_rootdir(pool: *mut Pool, rootdir: *const libc::c_char);
}
unsafe extern "C" {
    pub fn pool_get_rootdir(pool: *mut Pool) -> *const libc::c_char;
}
unsafe extern "C" {
    pub fn pool_prepend_rootdir(pool: *mut Pool, dir: *const libc::c_char) -> *mut libc::c_char;
}
unsafe extern "C" {
    pub fn pool_prepend_rootdir_tmp(
        pool: *mut Pool,
        dir: *const libc::c_char,
    ) -> *const libc::c_char;
}
unsafe extern "C" {
    #[doc = " Solvable management"]
    pub fn pool_add_solvable(pool: *mut Pool) -> Id;
}
unsafe extern "C" {
    pub fn pool_add_solvable_block(pool: *mut Pool, count: libc::c_int) -> Id;
}
unsafe extern "C" {
    pub fn pool_free_solvable_block(
        pool: *mut Pool,
        start: Id,
        count: libc::c_int,
        reuseids: libc::c_int,
    );
}
unsafe extern "C" {
    pub fn pool_solvable2str(pool: *mut Pool, s: *mut Solvable) -> *const libc::c_char;
}
unsafe extern "C" {
    pub fn pool_solvidset2str(pool: *mut Pool, q: *mut Queue) -> *const libc::c_char;
}
unsafe extern "C" {
    pub fn pool_set_languages(
        pool: *mut Pool,
        languages: *mut *const libc::c_char,
        nlanguages: libc::c_int,
    );
}
unsafe extern "C" {
    pub fn pool_id2langid(
        pool: *mut Pool,
        id: Id,
        lang: *const libc::c_char,
        create: libc::c_int,
    ) -> Id;
}
unsafe extern "C" {
    pub fn pool_intersect_evrs(
        pool: *mut Pool,
        pflags: libc::c_int,
        pevr: Id,
        flags: libc::c_int,
        evr: Id,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn pool_match_dep(pool: *mut Pool, d1: Id, d2: Id) -> libc::c_int;
}
unsafe extern "C" {
    pub fn pool_match_nevr_rel(pool: *mut Pool, s: *mut Solvable, d: Id) -> libc::c_int;
}
unsafe extern "C" {
    #[doc = " Prepares a pool for solving"]
    pub fn pool_createwhatprovides(pool: *mut Pool);
}
unsafe extern "C" {
    pub fn pool_addfileprovides(pool: *mut Pool);
}
unsafe extern "C" {
    pub fn pool_addfileprovides_queue(pool: *mut Pool, idq: *mut Queue, idqinst: *mut Queue);
}
unsafe extern "C" {
    pub fn pool_freewhatprovides(pool: *mut Pool);
}
unsafe extern "C" {
    pub fn pool_queuetowhatprovides(pool: *mut Pool, q: *mut Queue) -> Id;
}
unsafe extern "C" {
    pub fn pool_ids2whatprovides(pool: *mut Pool, ids: *mut Id, count: libc::c_int) -> Id;
}
unsafe extern "C" {
    pub fn pool_searchlazywhatprovidesq(pool: *mut Pool, d: Id) -> Id;
}
unsafe extern "C" {
    pub fn pool_addrelproviders(pool: *mut Pool, d: Id) -> Id;
}
unsafe extern "C" {
    pub fn pool_whatmatchesdep(
        pool: *mut Pool,
        keyname: Id,
        dep: Id,
        q: *mut Queue,
        marker: libc::c_int,
    );
}
unsafe extern "C" {
    pub fn pool_whatcontainsdep(
        pool: *mut Pool,
        keyname: Id,
        dep: Id,
        q: *mut Queue,
        marker: libc::c_int,
    );
}
unsafe extern "C" {
    pub fn pool_whatmatchessolvable(
        pool: *mut Pool,
        keyname: Id,
        solvid: Id,
        q: *mut Queue,
        marker: libc::c_int,
    );
}
unsafe extern "C" {
    pub fn pool_set_whatprovides(pool: *mut Pool, id: Id, providers: Id);
}
unsafe extern "C" {
    pub fn pool_search(
        pool: *mut Pool,
        p: Id,
        key: Id,
        match_: *const libc::c_char,
        flags: libc::c_int,
        callback: ::std::option::Option<
            unsafe extern "C" fn(
                cbdata: *mut libc::c_void,
                s: *mut Solvable,
                data: *mut Repodata,
                key: *mut s_Repokey,
                kv: *mut s_KeyValue,
            ) -> libc::c_int,
        >,
        cbdata: *mut libc::c_void,
    );
}
unsafe extern "C" {
    pub fn pool_clear_pos(pool: *mut Pool);
}
unsafe extern "C" {
    pub fn pool_lookup_str(pool: *mut Pool, entry: Id, keyname: Id) -> *const libc::c_char;
}
unsafe extern "C" {
    pub fn pool_lookup_id(pool: *mut Pool, entry: Id, keyname: Id) -> Id;
}
unsafe extern "C" {
    pub fn pool_lookup_num(
        pool: *mut Pool,
        entry: Id,
        keyname: Id,
        notfound: libc::c_ulonglong,
    ) -> libc::c_ulonglong;
}
unsafe extern "C" {
    pub fn pool_lookup_void(pool: *mut Pool, entry: Id, keyname: Id) -> libc::c_int;
}
unsafe extern "C" {
    pub fn pool_lookup_bin_checksum(
        pool: *mut Pool,
        entry: Id,
        keyname: Id,
        typep: *mut Id,
    ) -> *const libc::c_uchar;
}
unsafe extern "C" {
    pub fn pool_lookup_idarray(
        pool: *mut Pool,
        entry: Id,
        keyname: Id,
        q: *mut Queue,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn pool_lookup_checksum(
        pool: *mut Pool,
        entry: Id,
        keyname: Id,
        typep: *mut Id,
    ) -> *const libc::c_char;
}
unsafe extern "C" {
    pub fn pool_lookup_deltalocation(
        pool: *mut Pool,
        entry: Id,
        medianrp: *mut libc::c_uint,
    ) -> *const libc::c_char;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct s_DUChanges {
    pub path: *const libc::c_char,
    pub kbytes: libc::c_longlong,
    pub files: libc::c_longlong,
    pub flags: libc::c_int,
}
pub type DUChanges = s_DUChanges;
unsafe extern "C" {
    pub fn pool_create_state_maps(
        pool: *mut Pool,
        installed: *mut Queue,
        installedmap: *mut Map,
        conflictsmap: *mut Map,
    );
}
unsafe extern "C" {
    pub fn pool_calc_duchanges(
        pool: *mut Pool,
        installedmap: *mut Map,
        mps: *mut DUChanges,
        nmps: libc::c_int,
    );
}
unsafe extern "C" {
    pub fn pool_calc_installsizechange(pool: *mut Pool, installedmap: *mut Map)
    -> libc::c_longlong;
}
unsafe extern "C" {
    pub fn pool_add_fileconflicts_deps(pool: *mut Pool, conflicts: *mut Queue);
}
unsafe extern "C" {
    pub fn pool_trivial_installable_multiversionmap(
        pool: *mut Pool,
        installedmap: *mut Map,
        pkgs: *mut Queue,
        res: *mut Queue,
        multiversionmap: *mut Map,
    );
}
unsafe extern "C" {
    pub fn pool_trivial_installable(
        pool: *mut Pool,
        installedmap: *mut Map,
        pkgs: *mut Queue,
        res: *mut Queue,
    );
}
unsafe extern "C" {
    pub fn pool_setarch(arg1: *mut Pool, arg2: *const libc::c_char);
}
unsafe extern "C" {
    pub fn pool_setarchpolicy(arg1: *mut Pool, arg2: *const libc::c_char);
}
unsafe extern "C" {
    pub fn pool_arch2color_slow(pool: *mut Pool, arch: Id) -> libc::c_uchar;
}
unsafe extern "C" {
    #[doc = " malloc\n exits with error message on error"]
    pub fn solv_malloc(arg1: usize) -> *mut libc::c_void;
}
unsafe extern "C" {
    pub fn solv_malloc2(arg1: usize, arg2: usize) -> *mut libc::c_void;
}
unsafe extern "C" {
    pub fn solv_calloc(arg1: usize, arg2: usize) -> *mut libc::c_void;
}
unsafe extern "C" {
    pub fn solv_realloc(arg1: *mut libc::c_void, arg2: usize) -> *mut libc::c_void;
}
unsafe extern "C" {
    pub fn solv_realloc2(arg1: *mut libc::c_void, arg2: usize, arg3: usize) -> *mut libc::c_void;
}
unsafe extern "C" {
    pub fn solv_extend_realloc(
        arg1: *mut libc::c_void,
        arg2: usize,
        arg3: usize,
        arg4: usize,
    ) -> *mut libc::c_void;
}
unsafe extern "C" {
    pub fn solv_free(arg1: *mut libc::c_void) -> *mut libc::c_void;
}
unsafe extern "C" {
    pub fn solv_strdup(arg1: *const libc::c_char) -> *mut libc::c_char;
}
unsafe extern "C" {
    pub fn solv_oom(arg1: usize, arg2: usize);
}
unsafe extern "C" {
    pub fn solv_timems(subtract: libc::c_uint) -> libc::c_uint;
}
unsafe extern "C" {
    pub fn solv_setcloexec(fd: libc::c_int, state: libc::c_int) -> libc::c_int;
}
unsafe extern "C" {
    pub fn solv_sort(
        base: *mut libc::c_void,
        nmemb: usize,
        size: usize,
        compar: ::std::option::Option<
            unsafe extern "C" fn(
                arg1: *const libc::c_void,
                arg2: *const libc::c_void,
                arg3: *mut libc::c_void,
            ) -> libc::c_int,
        >,
        compard: *mut libc::c_void,
    );
}
unsafe extern "C" {
    pub fn solv_dupjoin(
        str1: *const libc::c_char,
        str2: *const libc::c_char,
        str3: *const libc::c_char,
    ) -> *mut libc::c_char;
}
unsafe extern "C" {
    pub fn solv_dupappend(
        str1: *const libc::c_char,
        str2: *const libc::c_char,
        str3: *const libc::c_char,
    ) -> *mut libc::c_char;
}
unsafe extern "C" {
    pub fn solv_hex2bin(
        strp: *mut *const libc::c_char,
        buf: *mut libc::c_uchar,
        bufl: libc::c_int,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn solv_bin2hex(
        buf: *const libc::c_uchar,
        l: libc::c_int,
        str_: *mut libc::c_char,
    ) -> *mut libc::c_char;
}
unsafe extern "C" {
    pub fn solv_validutf8(buf: *const libc::c_char) -> usize;
}
unsafe extern "C" {
    pub fn solv_latin1toutf8(buf: *const libc::c_char) -> *mut libc::c_char;
}
unsafe extern "C" {
    pub fn solv_replacebadutf8(
        buf: *const libc::c_char,
        replchar: libc::c_int,
    ) -> *mut libc::c_char;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct s_Dirpool {
    pub dirs: *mut Id,
    pub ndirs: libc::c_int,
    pub dirtraverse: *mut Id,
}
pub type Dirpool = s_Dirpool;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct s_Repokey {
    pub name: Id,
    pub type_: Id,
    pub size: libc::c_uint,
    pub storage: libc::c_uint,
}
pub type Repokey = s_Repokey;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct s_Repodata {
    pub repodataid: Id,
    pub repo: *mut Repo,
    pub state: libc::c_int,
    pub loadcallback: ::std::option::Option<unsafe extern "C" fn(arg1: *mut Repodata)>,
    pub start: libc::c_int,
    pub end: libc::c_int,
    pub keys: *mut Repokey,
    pub nkeys: libc::c_int,
    pub keybits: [libc::c_uchar; 32usize],
    pub schemata: *mut Id,
    pub nschemata: libc::c_int,
    pub schemadata: *mut Id,
    pub spool: Stringpool,
    pub localpool: libc::c_int,
    pub dirpool: Dirpool,
}
unsafe extern "C" {
    pub fn repodata_initdata(data: *mut Repodata, repo: *mut Repo, localpool: libc::c_int);
}
unsafe extern "C" {
    pub fn repodata_freedata(data: *mut Repodata);
}
unsafe extern "C" {
    pub fn repodata_free(data: *mut Repodata);
}
unsafe extern "C" {
    pub fn repodata_empty(data: *mut Repodata, localpool: libc::c_int);
}
unsafe extern "C" {
    pub fn repodata_load(data: *mut Repodata);
}
unsafe extern "C" {
    pub fn repodata_key2id(data: *mut Repodata, key: *mut Repokey, create: libc::c_int) -> Id;
}
unsafe extern "C" {
    pub fn repodata_schema2id(data: *mut Repodata, schema: *mut Id, create: libc::c_int) -> Id;
}
unsafe extern "C" {
    pub fn repodata_free_schemahash(data: *mut Repodata);
}
unsafe extern "C" {
    pub fn repodata_search(
        data: *mut Repodata,
        solvid: Id,
        keyname: Id,
        flags: libc::c_int,
        callback: ::std::option::Option<
            unsafe extern "C" fn(
                cbdata: *mut libc::c_void,
                s: *mut Solvable,
                data: *mut Repodata,
                key: *mut Repokey,
                kv: *mut s_KeyValue,
            ) -> libc::c_int,
        >,
        cbdata: *mut libc::c_void,
    );
}
unsafe extern "C" {
    pub fn repodata_search_keyskip(
        data: *mut Repodata,
        solvid: Id,
        keyname: Id,
        flags: libc::c_int,
        keyskip: *mut Id,
        callback: ::std::option::Option<
            unsafe extern "C" fn(
                cbdata: *mut libc::c_void,
                s: *mut Solvable,
                data: *mut Repodata,
                key: *mut Repokey,
                kv: *mut s_KeyValue,
            ) -> libc::c_int,
        >,
        cbdata: *mut libc::c_void,
    );
}
unsafe extern "C" {
    pub fn repodata_search_arrayelement(
        data: *mut Repodata,
        solvid: Id,
        keyname: Id,
        flags: libc::c_int,
        kv: *mut s_KeyValue,
        callback: ::std::option::Option<
            unsafe extern "C" fn(
                cbdata: *mut libc::c_void,
                s: *mut Solvable,
                data: *mut Repodata,
                key: *mut Repokey,
                kv: *mut s_KeyValue,
            ) -> libc::c_int,
        >,
        cbdata: *mut libc::c_void,
    );
}
unsafe extern "C" {
    pub fn repodata_stringify(
        pool: *mut Pool,
        data: *mut Repodata,
        key: *mut Repokey,
        kv: *mut s_KeyValue,
        flags: libc::c_int,
    ) -> *const libc::c_char;
}
unsafe extern "C" {
    pub fn repodata_set_filelisttype(data: *mut Repodata, filelisttype: libc::c_int);
}
unsafe extern "C" {
    pub fn repodata_filelistfilter_matches(
        data: *mut Repodata,
        str_: *const libc::c_char,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn repodata_free_filelistfilter(data: *mut Repodata);
}
unsafe extern "C" {
    pub fn repodata_lookup_type(data: *mut Repodata, solvid: Id, keyname: Id) -> Id;
}
unsafe extern "C" {
    pub fn repodata_lookup_id(data: *mut Repodata, solvid: Id, keyname: Id) -> Id;
}
unsafe extern "C" {
    pub fn repodata_lookup_str(data: *mut Repodata, solvid: Id, keyname: Id)
    -> *const libc::c_char;
}
unsafe extern "C" {
    pub fn repodata_lookup_num(
        data: *mut Repodata,
        solvid: Id,
        keyname: Id,
        notfound: libc::c_ulonglong,
    ) -> libc::c_ulonglong;
}
unsafe extern "C" {
    pub fn repodata_lookup_void(data: *mut Repodata, solvid: Id, keyname: Id) -> libc::c_int;
}
unsafe extern "C" {
    pub fn repodata_lookup_bin_checksum(
        data: *mut Repodata,
        solvid: Id,
        keyname: Id,
        typep: *mut Id,
    ) -> *const libc::c_uchar;
}
unsafe extern "C" {
    pub fn repodata_lookup_idarray(
        data: *mut Repodata,
        solvid: Id,
        keyname: Id,
        q: *mut Queue,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn repodata_lookup_binary(
        data: *mut Repodata,
        solvid: Id,
        keyname: Id,
        lenp: *mut libc::c_int,
    ) -> *const libc::c_void;
}
unsafe extern "C" {
    pub fn repodata_lookup_count(data: *mut Repodata, solvid: Id, keyname: Id) -> libc::c_uint;
}
unsafe extern "C" {
    pub fn repodata_lookup_packed_dirstrarray(
        data: *mut Repodata,
        solvid: Id,
        keyname: Id,
    ) -> *const libc::c_uchar;
}
unsafe extern "C" {
    pub fn repodata_fill_keyskip(data: *mut Repodata, solvid: Id, keyskip: *mut Id) -> *mut Id;
}
unsafe extern "C" {
    pub fn repodata_extend(data: *mut Repodata, p: Id);
}
unsafe extern "C" {
    pub fn repodata_extend_block(data: *mut Repodata, p: Id, num: libc::c_int);
}
unsafe extern "C" {
    pub fn repodata_shrink(data: *mut Repodata, end: libc::c_int);
}
unsafe extern "C" {
    pub fn repodata_internalize(data: *mut Repodata);
}
unsafe extern "C" {
    pub fn repodata_new_handle(data: *mut Repodata) -> Id;
}
unsafe extern "C" {
    pub fn repodata_set_void(data: *mut Repodata, solvid: Id, keyname: Id);
}
unsafe extern "C" {
    pub fn repodata_set_num(data: *mut Repodata, solvid: Id, keyname: Id, num: libc::c_ulonglong);
}
unsafe extern "C" {
    pub fn repodata_set_id(data: *mut Repodata, solvid: Id, keyname: Id, id: Id);
}
unsafe extern "C" {
    pub fn repodata_set_str(
        data: *mut Repodata,
        solvid: Id,
        keyname: Id,
        str_: *const libc::c_char,
    );
}
unsafe extern "C" {
    pub fn repodata_set_binary(
        data: *mut Repodata,
        solvid: Id,
        keyname: Id,
        buf: *mut libc::c_void,
        len: libc::c_int,
    );
}
unsafe extern "C" {
    pub fn repodata_set_poolstr(
        data: *mut Repodata,
        solvid: Id,
        keyname: Id,
        str_: *const libc::c_char,
    );
}
unsafe extern "C" {
    pub fn repodata_set_constant(
        data: *mut Repodata,
        solvid: Id,
        keyname: Id,
        constant: libc::c_uint,
    );
}
unsafe extern "C" {
    pub fn repodata_set_constantid(data: *mut Repodata, solvid: Id, keyname: Id, id: Id);
}
unsafe extern "C" {
    pub fn repodata_set_bin_checksum(
        data: *mut Repodata,
        solvid: Id,
        keyname: Id,
        type_: Id,
        buf: *const libc::c_uchar,
    );
}
unsafe extern "C" {
    pub fn repodata_set_checksum(
        data: *mut Repodata,
        solvid: Id,
        keyname: Id,
        type_: Id,
        str_: *const libc::c_char,
    );
}
unsafe extern "C" {
    pub fn repodata_set_idarray(data: *mut Repodata, solvid: Id, keyname: Id, q: *mut Queue);
}
unsafe extern "C" {
    pub fn repodata_add_dirnumnum(
        data: *mut Repodata,
        solvid: Id,
        keyname: Id,
        dir: Id,
        num: Id,
        num2: Id,
    );
}
unsafe extern "C" {
    pub fn repodata_add_dirstr(
        data: *mut Repodata,
        solvid: Id,
        keyname: Id,
        dir: Id,
        str_: *const libc::c_char,
    );
}
unsafe extern "C" {
    pub fn repodata_free_dircache(data: *mut Repodata);
}
unsafe extern "C" {
    pub fn repodata_add_idarray(data: *mut Repodata, solvid: Id, keyname: Id, id: Id);
}
unsafe extern "C" {
    pub fn repodata_add_poolstr_array(
        data: *mut Repodata,
        solvid: Id,
        keyname: Id,
        str_: *const libc::c_char,
    );
}
unsafe extern "C" {
    pub fn repodata_add_fixarray(data: *mut Repodata, solvid: Id, keyname: Id, ghandle: Id);
}
unsafe extern "C" {
    pub fn repodata_add_flexarray(data: *mut Repodata, solvid: Id, keyname: Id, ghandle: Id);
}
unsafe extern "C" {
    pub fn repodata_set_kv(
        data: *mut Repodata,
        solvid: Id,
        keyname: Id,
        keytype: Id,
        kv: *mut s_KeyValue,
    );
}
unsafe extern "C" {
    pub fn repodata_unset(data: *mut Repodata, solvid: Id, keyname: Id);
}
unsafe extern "C" {
    pub fn repodata_unset_uninternalized(data: *mut Repodata, solvid: Id, keyname: Id);
}
unsafe extern "C" {
    pub fn repodata_merge_attrs(data: *mut Repodata, dest: Id, src: Id);
}
unsafe extern "C" {
    pub fn repodata_merge_some_attrs(
        data: *mut Repodata,
        dest: Id,
        src: Id,
        keyidmap: *mut Map,
        overwrite: libc::c_int,
    );
}
unsafe extern "C" {
    pub fn repodata_swap_attrs(data: *mut Repodata, dest: Id, src: Id);
}
unsafe extern "C" {
    pub fn repodata_create_stubs(data: *mut Repodata) -> *mut Repodata;
}
unsafe extern "C" {
    pub fn repodata_disable_paging(data: *mut Repodata);
}
unsafe extern "C" {
    pub fn repodata_globalize_id(data: *mut Repodata, id: Id, create: libc::c_int) -> Id;
}
unsafe extern "C" {
    pub fn repodata_localize_id(data: *mut Repodata, id: Id, create: libc::c_int) -> Id;
}
unsafe extern "C" {
    pub fn repodata_translate_id(
        data: *mut Repodata,
        fromdata: *mut Repodata,
        id: Id,
        create: libc::c_int,
    ) -> Id;
}
unsafe extern "C" {
    pub fn repodata_translate_dir_slow(
        data: *mut Repodata,
        fromdata: *mut Repodata,
        dir: Id,
        create: libc::c_int,
        cache: *mut Id,
    ) -> Id;
}
unsafe extern "C" {
    pub fn repodata_str2dir(
        data: *mut Repodata,
        dir: *const libc::c_char,
        create: libc::c_int,
    ) -> Id;
}
unsafe extern "C" {
    pub fn repodata_dir2str(
        data: *mut Repodata,
        did: Id,
        suf: *const libc::c_char,
    ) -> *const libc::c_char;
}
unsafe extern "C" {
    pub fn repodata_chk2str(
        data: *mut Repodata,
        type_: Id,
        buf: *const libc::c_uchar,
    ) -> *const libc::c_char;
}
unsafe extern "C" {
    pub fn repodata_set_location(
        data: *mut Repodata,
        solvid: Id,
        medianr: libc::c_int,
        dir: *const libc::c_char,
        file: *const libc::c_char,
    );
}
unsafe extern "C" {
    pub fn repodata_set_deltalocation(
        data: *mut Repodata,
        handle: Id,
        medianr: libc::c_int,
        dir: *const libc::c_char,
        file: *const libc::c_char,
    );
}
unsafe extern "C" {
    pub fn repodata_set_sourcepkg(data: *mut Repodata, solvid: Id, sourcepkg: *const libc::c_char);
}
unsafe extern "C" {
    pub fn repodata_lookup_kv_uninternalized(
        data: *mut Repodata,
        solvid: Id,
        keyname: Id,
        kv: *mut s_KeyValue,
    ) -> *mut Repokey;
}
unsafe extern "C" {
    pub fn repodata_search_uninternalized(
        data: *mut Repodata,
        solvid: Id,
        keyname: Id,
        flags: libc::c_int,
        callback: ::std::option::Option<
            unsafe extern "C" fn(
                cbdata: *mut libc::c_void,
                s: *mut Solvable,
                data: *mut Repodata,
                key: *mut Repokey,
                kv: *mut s_KeyValue,
            ) -> libc::c_int,
        >,
        cbdata: *mut libc::c_void,
    );
}
unsafe extern "C" {
    pub fn repodata_memused(data: *mut Repodata) -> libc::c_uint;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct s_KeyValue {
    pub id: Id,
    pub str_: *const libc::c_char,
    pub num: libc::c_uint,
    pub num2: libc::c_uint,
    pub entry: libc::c_int,
    pub eof: libc::c_int,
    pub parent: *mut s_KeyValue,
}
pub type KeyValue = s_KeyValue;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct s_Datamatcher {
    pub flags: libc::c_int,
    pub match_: *const libc::c_char,
    pub matchdata: *mut libc::c_void,
    pub error: libc::c_int,
}
pub type Datamatcher = s_Datamatcher;
unsafe extern "C" {
    pub fn datamatcher_init(
        ma: *mut Datamatcher,
        match_: *const libc::c_char,
        flags: libc::c_int,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn datamatcher_free(ma: *mut Datamatcher);
}
unsafe extern "C" {
    pub fn datamatcher_match(ma: *mut Datamatcher, str_: *const libc::c_char) -> libc::c_int;
}
unsafe extern "C" {
    pub fn datamatcher_checkbasename(
        ma: *mut Datamatcher,
        str_: *const libc::c_char,
    ) -> libc::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct s_Dataiterator {
    pub state: libc::c_int,
    pub flags: libc::c_int,
    pub pool: *mut Pool,
    pub repo: *mut Repo,
    pub data: *mut Repodata,
    pub dp: *mut libc::c_uchar,
    pub ddp: *mut libc::c_uchar,
    pub idp: *mut Id,
    pub keyp: *mut Id,
    pub key: *mut s_Repokey,
    pub kv: KeyValue,
    pub matcher: Datamatcher,
    pub keyname: Id,
    pub repodataid: Id,
    pub solvid: Id,
    pub repoid: Id,
    pub keynames: [Id; 4usize],
    pub nkeynames: libc::c_int,
    pub rootlevel: libc::c_int,
    pub parents: [s_Dataiterator_di_parent; 3usize],
    pub nparents: libc::c_int,
    pub vert_ddp: *mut libc::c_uchar,
    pub vert_off: Id,
    pub vert_len: Id,
    pub vert_storestate: Id,
    pub dupstr: *mut libc::c_char,
    pub dupstrn: libc::c_int,
    pub keyskip: *mut Id,
    pub oldkeyskip: *mut Id,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct s_Dataiterator_di_parent {
    pub kv: KeyValue,
    pub dp: *mut libc::c_uchar,
    pub keyp: *mut Id,
}
pub type Dataiterator = s_Dataiterator;
unsafe extern "C" {
    pub fn dataiterator_init(
        di: *mut Dataiterator,
        pool: *mut Pool,
        repo: *mut Repo,
        p: Id,
        keyname: Id,
        match_: *const libc::c_char,
        flags: libc::c_int,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn dataiterator_init_clone(di: *mut Dataiterator, from: *mut Dataiterator);
}
unsafe extern "C" {
    pub fn dataiterator_set_search(di: *mut Dataiterator, repo: *mut Repo, p: Id);
}
unsafe extern "C" {
    pub fn dataiterator_set_keyname(di: *mut Dataiterator, keyname: Id);
}
unsafe extern "C" {
    pub fn dataiterator_set_match(
        di: *mut Dataiterator,
        match_: *const libc::c_char,
        flags: libc::c_int,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn dataiterator_prepend_keyname(di: *mut Dataiterator, keyname: Id);
}
unsafe extern "C" {
    pub fn dataiterator_free(di: *mut Dataiterator);
}
unsafe extern "C" {
    pub fn dataiterator_step(di: *mut Dataiterator) -> libc::c_int;
}
unsafe extern "C" {
    pub fn dataiterator_setpos(di: *mut Dataiterator);
}
unsafe extern "C" {
    pub fn dataiterator_setpos_parent(di: *mut Dataiterator);
}
unsafe extern "C" {
    pub fn dataiterator_match(di: *mut Dataiterator, ma: *mut Datamatcher) -> libc::c_int;
}
unsafe extern "C" {
    pub fn dataiterator_skip_attribute(di: *mut Dataiterator);
}
unsafe extern "C" {
    pub fn dataiterator_skip_solvable(di: *mut Dataiterator);
}
unsafe extern "C" {
    pub fn dataiterator_skip_repo(di: *mut Dataiterator);
}
unsafe extern "C" {
    pub fn dataiterator_jump_to_solvid(di: *mut Dataiterator, solvid: Id);
}
unsafe extern "C" {
    pub fn dataiterator_jump_to_repo(di: *mut Dataiterator, repo: *mut Repo);
}
unsafe extern "C" {
    pub fn dataiterator_entersub(di: *mut Dataiterator);
}
unsafe extern "C" {
    pub fn dataiterator_clonepos(di: *mut Dataiterator, from: *mut Dataiterator);
}
unsafe extern "C" {
    pub fn dataiterator_seek(di: *mut Dataiterator, whence: libc::c_int);
}
unsafe extern "C" {
    pub fn dataiterator_strdup(di: *mut Dataiterator);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct s_Repo {
    pub name: *const libc::c_char,
    pub repoid: Id,
    pub appdata: *mut libc::c_void,
    pub pool: *mut Pool,
    pub start: libc::c_int,
    pub end: libc::c_int,
    pub nsolvables: libc::c_int,
    pub disabled: libc::c_int,
    pub priority: libc::c_int,
    pub subpriority: libc::c_int,
    pub idarraydata: *mut Id,
    pub idarraysize: libc::c_int,
    pub nrepodata: libc::c_int,
    pub rpmdbid: *mut Id,
}
unsafe extern "C" {
    pub fn repo_create(pool: *mut Pool, name: *const libc::c_char) -> *mut Repo;
}
unsafe extern "C" {
    pub fn repo_free(repo: *mut Repo, reuseids: libc::c_int);
}
unsafe extern "C" {
    pub fn repo_empty(repo: *mut Repo, reuseids: libc::c_int);
}
unsafe extern "C" {
    pub fn repo_freedata(repo: *mut Repo);
}
unsafe extern "C" {
    pub fn repo_add_solvable(repo: *mut Repo) -> Id;
}
unsafe extern "C" {
    pub fn repo_add_solvable_block(repo: *mut Repo, count: libc::c_int) -> Id;
}
unsafe extern "C" {
    pub fn repo_free_solvable(repo: *mut Repo, p: Id, reuseids: libc::c_int);
}
unsafe extern "C" {
    pub fn repo_free_solvable_block(
        repo: *mut Repo,
        start: Id,
        count: libc::c_int,
        reuseids: libc::c_int,
    );
}
unsafe extern "C" {
    pub fn repo_sidedata_create(repo: *mut Repo, size: usize) -> *mut libc::c_void;
}
unsafe extern "C" {
    pub fn repo_sidedata_extend(
        repo: *mut Repo,
        b: *mut libc::c_void,
        size: usize,
        p: Id,
        count: libc::c_int,
    ) -> *mut libc::c_void;
}
unsafe extern "C" {
    pub fn repo_add_solvable_block_before(
        repo: *mut Repo,
        count: libc::c_int,
        beforerepo: *mut Repo,
    ) -> Id;
}
unsafe extern "C" {
    pub fn repo_addid(repo: *mut Repo, olddeps: Offset, id: Id) -> Offset;
}
unsafe extern "C" {
    pub fn repo_addid_dep(repo: *mut Repo, olddeps: Offset, id: Id, marker: Id) -> Offset;
}
unsafe extern "C" {
    pub fn repo_reserve_ids(repo: *mut Repo, olddeps: Offset, num: libc::c_int) -> Offset;
}
unsafe extern "C" {
    pub fn repo_add_repodata(repo: *mut Repo, flags: libc::c_int) -> *mut Repodata;
}
unsafe extern "C" {
    pub fn repo_id2repodata(repo: *mut Repo, id: Id) -> *mut Repodata;
}
unsafe extern "C" {
    pub fn repo_last_repodata(repo: *mut Repo) -> *mut Repodata;
}
unsafe extern "C" {
    pub fn repo_search(
        repo: *mut Repo,
        p: Id,
        key: Id,
        match_: *const libc::c_char,
        flags: libc::c_int,
        callback: ::std::option::Option<
            unsafe extern "C" fn(
                cbdata: *mut libc::c_void,
                s: *mut Solvable,
                data: *mut Repodata,
                key: *mut Repokey,
                kv: *mut KeyValue,
            ) -> libc::c_int,
        >,
        cbdata: *mut libc::c_void,
    );
}
unsafe extern "C" {
    pub fn repo_lookup_repodata(repo: *mut Repo, entry: Id, keyname: Id) -> *mut Repodata;
}
unsafe extern "C" {
    pub fn repo_lookup_repodata_opt(repo: *mut Repo, entry: Id, keyname: Id) -> *mut Repodata;
}
unsafe extern "C" {
    pub fn repo_lookup_filelist_repodata(
        repo: *mut Repo,
        entry: Id,
        matcher: *mut Datamatcher,
    ) -> *mut Repodata;
}
unsafe extern "C" {
    pub fn repo_lookup_type(repo: *mut Repo, entry: Id, keyname: Id) -> Id;
}
unsafe extern "C" {
    pub fn repo_lookup_str(repo: *mut Repo, entry: Id, keyname: Id) -> *const libc::c_char;
}
unsafe extern "C" {
    pub fn repo_lookup_num(
        repo: *mut Repo,
        entry: Id,
        keyname: Id,
        notfound: libc::c_ulonglong,
    ) -> libc::c_ulonglong;
}
unsafe extern "C" {
    pub fn repo_lookup_id(repo: *mut Repo, entry: Id, keyname: Id) -> Id;
}
unsafe extern "C" {
    pub fn repo_lookup_idarray(
        repo: *mut Repo,
        entry: Id,
        keyname: Id,
        q: *mut Queue,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn repo_lookup_deparray(
        repo: *mut Repo,
        entry: Id,
        keyname: Id,
        q: *mut Queue,
        marker: Id,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn repo_lookup_void(repo: *mut Repo, entry: Id, keyname: Id) -> libc::c_int;
}
unsafe extern "C" {
    pub fn repo_lookup_checksum(
        repo: *mut Repo,
        entry: Id,
        keyname: Id,
        typep: *mut Id,
    ) -> *const libc::c_char;
}
unsafe extern "C" {
    pub fn repo_lookup_bin_checksum(
        repo: *mut Repo,
        entry: Id,
        keyname: Id,
        typep: *mut Id,
    ) -> *const libc::c_uchar;
}
unsafe extern "C" {
    pub fn repo_lookup_binary(
        repo: *mut Repo,
        entry: Id,
        keyname: Id,
        lenp: *mut libc::c_int,
    ) -> *const libc::c_void;
}
unsafe extern "C" {
    pub fn repo_lookup_count(repo: *mut Repo, entry: Id, keyname: Id) -> libc::c_uint;
}
unsafe extern "C" {
    pub fn solv_depmarker(keyname: Id, marker: Id) -> Id;
}
unsafe extern "C" {
    pub fn repo_set_id(repo: *mut Repo, p: Id, keyname: Id, id: Id);
}
unsafe extern "C" {
    pub fn repo_set_num(repo: *mut Repo, p: Id, keyname: Id, num: libc::c_ulonglong);
}
unsafe extern "C" {
    pub fn repo_set_str(repo: *mut Repo, p: Id, keyname: Id, str_: *const libc::c_char);
}
unsafe extern "C" {
    pub fn repo_set_poolstr(repo: *mut Repo, p: Id, keyname: Id, str_: *const libc::c_char);
}
unsafe extern "C" {
    pub fn repo_add_poolstr_array(repo: *mut Repo, p: Id, keyname: Id, str_: *const libc::c_char);
}
unsafe extern "C" {
    pub fn repo_add_idarray(repo: *mut Repo, p: Id, keyname: Id, id: Id);
}
unsafe extern "C" {
    pub fn repo_add_deparray(repo: *mut Repo, p: Id, keyname: Id, dep: Id, marker: Id);
}
unsafe extern "C" {
    pub fn repo_set_idarray(repo: *mut Repo, p: Id, keyname: Id, q: *mut Queue);
}
unsafe extern "C" {
    pub fn repo_set_deparray(repo: *mut Repo, p: Id, keyname: Id, q: *mut Queue, marker: Id);
}
unsafe extern "C" {
    pub fn repo_unset(repo: *mut Repo, p: Id, keyname: Id);
}
unsafe extern "C" {
    pub fn repo_internalize(repo: *mut Repo);
}
unsafe extern "C" {
    pub fn repo_disable_paging(repo: *mut Repo);
}
unsafe extern "C" {
    pub fn repo_create_keyskip(repo: *mut Repo, entry: Id, oldkeyskip: *mut *mut Id) -> *mut Id;
}
unsafe extern "C" {
    pub fn repo_fix_supplements(
        repo: *mut Repo,
        provides: Offset,
        supplements: Offset,
        freshens: Offset,
    ) -> Offset;
}
unsafe extern "C" {
    pub fn repo_fix_conflicts(repo: *mut Repo, conflicts: Offset) -> Offset;
}
unsafe extern "C" {
    pub fn repo_rewrite_suse_deps(s: *mut Solvable, freshens: Offset);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct s_Transaction {
    pub pool: *mut Pool,
    pub steps: Queue,
}
pub type Transaction = s_Transaction;
unsafe extern "C" {
    pub fn transaction_create(pool: *mut Pool) -> *mut Transaction;
}
unsafe extern "C" {
    pub fn transaction_create_decisionq(
        pool: *mut Pool,
        decisionq: *mut Queue,
        multiversionmap: *mut Map,
    ) -> *mut Transaction;
}
unsafe extern "C" {
    pub fn transaction_create_clone(srctrans: *mut Transaction) -> *mut Transaction;
}
unsafe extern "C" {
    pub fn transaction_free(trans: *mut Transaction);
}
unsafe extern "C" {
    pub fn transaction_obs_pkg(trans: *mut Transaction, p: Id) -> Id;
}
unsafe extern "C" {
    pub fn transaction_all_obs_pkgs(trans: *mut Transaction, p: Id, pkgs: *mut Queue);
}
unsafe extern "C" {
    pub fn transaction_type(trans: *mut Transaction, p: Id, mode: libc::c_int) -> Id;
}
unsafe extern "C" {
    pub fn transaction_classify(trans: *mut Transaction, mode: libc::c_int, classes: *mut Queue);
}
unsafe extern "C" {
    pub fn transaction_classify_pkgs(
        trans: *mut Transaction,
        mode: libc::c_int,
        type_: Id,
        from: Id,
        to: Id,
        pkgs: *mut Queue,
    );
}
unsafe extern "C" {
    pub fn transaction_installedresult(
        trans: *mut Transaction,
        installedq: *mut Queue,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn transaction_calc_installsizechange(trans: *mut Transaction) -> libc::c_longlong;
}
unsafe extern "C" {
    pub fn transaction_calc_duchanges(
        trans: *mut Transaction,
        mps: *mut s_DUChanges,
        nmps: libc::c_int,
    );
}
unsafe extern "C" {
    pub fn transaction_order(trans: *mut Transaction, flags: libc::c_int);
}
unsafe extern "C" {
    pub fn transaction_order_add_choices(
        trans: *mut Transaction,
        chosen: Id,
        choices: *mut Queue,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn transaction_add_obsoleted(trans: *mut Transaction);
}
unsafe extern "C" {
    pub fn transaction_check_order(trans: *mut Transaction);
}
unsafe extern "C" {
    pub fn transaction_order_get_cycleids(
        trans: *mut Transaction,
        q: *mut Queue,
        minseverity: libc::c_int,
    );
}
unsafe extern "C" {
    pub fn transaction_order_get_cycle(
        trans: *mut Transaction,
        cid: Id,
        q: *mut Queue,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn transaction_order_get_edges(
        trans: *mut Transaction,
        p: Id,
        q: *mut Queue,
        unbroken: libc::c_int,
    );
}
unsafe extern "C" {
    pub fn transaction_free_orderdata(trans: *mut Transaction);
}
unsafe extern "C" {
    pub fn transaction_clone_orderdata(trans: *mut Transaction, srctrans: *mut Transaction);
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct s_Rule {
    pub p: Id,
    pub d: Id,
    pub w1: Id,
    pub w2: Id,
    pub n1: Id,
    pub n2: Id,
}
pub type Rule = s_Rule;
pub const SolverRuleinfo_SOLVER_RULE_UNKNOWN: SolverRuleinfo = 0;
pub const SolverRuleinfo_SOLVER_RULE_PKG: SolverRuleinfo = 256;
pub const SolverRuleinfo_SOLVER_RULE_PKG_NOT_INSTALLABLE: SolverRuleinfo = 257;
pub const SolverRuleinfo_SOLVER_RULE_PKG_NOTHING_PROVIDES_DEP: SolverRuleinfo = 258;
pub const SolverRuleinfo_SOLVER_RULE_PKG_REQUIRES: SolverRuleinfo = 259;
pub const SolverRuleinfo_SOLVER_RULE_PKG_SELF_CONFLICT: SolverRuleinfo = 260;
pub const SolverRuleinfo_SOLVER_RULE_PKG_CONFLICTS: SolverRuleinfo = 261;
pub const SolverRuleinfo_SOLVER_RULE_PKG_SAME_NAME: SolverRuleinfo = 262;
pub const SolverRuleinfo_SOLVER_RULE_PKG_OBSOLETES: SolverRuleinfo = 263;
pub const SolverRuleinfo_SOLVER_RULE_PKG_IMPLICIT_OBSOLETES: SolverRuleinfo = 264;
pub const SolverRuleinfo_SOLVER_RULE_PKG_INSTALLED_OBSOLETES: SolverRuleinfo = 265;
pub const SolverRuleinfo_SOLVER_RULE_PKG_RECOMMENDS: SolverRuleinfo = 266;
pub const SolverRuleinfo_SOLVER_RULE_PKG_CONSTRAINS: SolverRuleinfo = 267;
pub const SolverRuleinfo_SOLVER_RULE_PKG_SUPPLEMENTS: SolverRuleinfo = 268;
pub const SolverRuleinfo_SOLVER_RULE_UPDATE: SolverRuleinfo = 512;
pub const SolverRuleinfo_SOLVER_RULE_FEATURE: SolverRuleinfo = 768;
pub const SolverRuleinfo_SOLVER_RULE_JOB: SolverRuleinfo = 1024;
pub const SolverRuleinfo_SOLVER_RULE_JOB_NOTHING_PROVIDES_DEP: SolverRuleinfo = 1025;
pub const SolverRuleinfo_SOLVER_RULE_JOB_PROVIDED_BY_SYSTEM: SolverRuleinfo = 1026;
pub const SolverRuleinfo_SOLVER_RULE_JOB_UNKNOWN_PACKAGE: SolverRuleinfo = 1027;
pub const SolverRuleinfo_SOLVER_RULE_JOB_UNSUPPORTED: SolverRuleinfo = 1028;
pub const SolverRuleinfo_SOLVER_RULE_DISTUPGRADE: SolverRuleinfo = 1280;
pub const SolverRuleinfo_SOLVER_RULE_INFARCH: SolverRuleinfo = 1536;
pub const SolverRuleinfo_SOLVER_RULE_CHOICE: SolverRuleinfo = 1792;
pub const SolverRuleinfo_SOLVER_RULE_LEARNT: SolverRuleinfo = 2048;
pub const SolverRuleinfo_SOLVER_RULE_BEST: SolverRuleinfo = 2304;
pub const SolverRuleinfo_SOLVER_RULE_YUMOBS: SolverRuleinfo = 2560;
pub const SolverRuleinfo_SOLVER_RULE_RECOMMENDS: SolverRuleinfo = 2816;
pub const SolverRuleinfo_SOLVER_RULE_BLACK: SolverRuleinfo = 3072;
pub const SolverRuleinfo_SOLVER_RULE_STRICT_REPO_PRIORITY: SolverRuleinfo = 3328;
cfg_if::cfg_if! {
    if #[cfg(all(target_os = "windows", target_env = "msvc"))] {
        pub type SolverRuleinfo = libc::c_int;
    } else {
        pub type SolverRuleinfo = libc::c_uint;
    }
}
unsafe extern "C" {
    pub fn solver_addrule(solv: *mut s_Solver, p: Id, p2: Id, d: Id) -> *mut Rule;
}
unsafe extern "C" {
    pub fn solver_unifyrules(solv: *mut s_Solver);
}
unsafe extern "C" {
    pub fn solver_rulecmp(solv: *mut s_Solver, r1: *mut Rule, r2: *mut Rule) -> libc::c_int;
}
unsafe extern "C" {
    pub fn solver_shrinkrules(solv: *mut s_Solver, nrules: libc::c_int);
}
unsafe extern "C" {
    pub fn solver_addpkgrulesforsolvable(solv: *mut s_Solver, s: *mut Solvable, m: *mut Map);
}
unsafe extern "C" {
    pub fn solver_addpkgrulesforweak(solv: *mut s_Solver, m: *mut Map);
}
unsafe extern "C" {
    pub fn solver_addpkgrulesforlinked(solv: *mut s_Solver, m: *mut Map);
}
unsafe extern "C" {
    pub fn solver_addpkgrulesforupdaters(
        solv: *mut s_Solver,
        s: *mut Solvable,
        m: *mut Map,
        allow_all: libc::c_int,
    );
}
unsafe extern "C" {
    pub fn solver_addfeaturerule(solv: *mut s_Solver, s: *mut Solvable);
}
unsafe extern "C" {
    pub fn solver_addupdaterule(solv: *mut s_Solver, s: *mut Solvable);
}
unsafe extern "C" {
    pub fn solver_addinfarchrules(solv: *mut s_Solver, addedmap: *mut Map);
}
unsafe extern "C" {
    pub fn solver_createdupmaps(solv: *mut s_Solver);
}
unsafe extern "C" {
    pub fn solver_freedupmaps(solv: *mut s_Solver);
}
unsafe extern "C" {
    pub fn solver_addduprules(solv: *mut s_Solver, addedmap: *mut Map);
}
unsafe extern "C" {
    pub fn solver_addchoicerules(solv: *mut s_Solver);
}
unsafe extern "C" {
    pub fn solver_disablechoicerules(solv: *mut s_Solver, r: *mut Rule);
}
unsafe extern "C" {
    pub fn solver_addbestrules(
        solv: *mut s_Solver,
        havebestinstalljobs: libc::c_int,
        haslockjob: libc::c_int,
    );
}
unsafe extern "C" {
    pub fn solver_addyumobsrules(solv: *mut s_Solver);
}
unsafe extern "C" {
    pub fn solver_addblackrules(solv: *mut s_Solver);
}
unsafe extern "C" {
    pub fn solver_addrecommendsrules(solv: *mut s_Solver);
}
unsafe extern "C" {
    pub fn solver_addstrictrepopriorules(solv: *mut s_Solver, addedmap: *mut Map);
}
unsafe extern "C" {
    pub fn solver_disablepolicyrules(solv: *mut s_Solver);
}
unsafe extern "C" {
    pub fn solver_reenablepolicyrules(solv: *mut s_Solver, jobidx: libc::c_int);
}
unsafe extern "C" {
    pub fn solver_reenablepolicyrules_cleandeps(solv: *mut s_Solver, pkg: Id);
}
unsafe extern "C" {
    pub fn solver_allruleinfos(solv: *mut s_Solver, rid: Id, rq: *mut Queue) -> libc::c_int;
}
unsafe extern "C" {
    pub fn solver_ruleinfo(
        solv: *mut s_Solver,
        rid: Id,
        fromp: *mut Id,
        top: *mut Id,
        depp: *mut Id,
    ) -> SolverRuleinfo;
}
unsafe extern "C" {
    pub fn solver_ruleclass(solv: *mut s_Solver, rid: Id) -> SolverRuleinfo;
}
unsafe extern "C" {
    pub fn solver_ruleliterals(solv: *mut s_Solver, rid: Id, q: *mut Queue);
}
unsafe extern "C" {
    pub fn solver_rule2jobidx(solv: *mut s_Solver, rid: Id) -> libc::c_int;
}
unsafe extern "C" {
    pub fn solver_rule2job(solv: *mut s_Solver, rid: Id, whatp: *mut Id) -> Id;
}
unsafe extern "C" {
    pub fn solver_rule2solvable(solv: *mut s_Solver, rid: Id) -> Id;
}
unsafe extern "C" {
    pub fn solver_rule2rules(solv: *mut s_Solver, rid: Id, q: *mut Queue, recursive: libc::c_int);
}
unsafe extern "C" {
    pub fn solver_rule2pkgrule(solv: *mut s_Solver, rid: Id) -> Id;
}
unsafe extern "C" {
    pub fn solver_ruleinfo2str(
        solv: *mut s_Solver,
        type_: SolverRuleinfo,
        source: Id,
        target: Id,
        dep: Id,
    ) -> *const libc::c_char;
}
unsafe extern "C" {
    pub fn solver_allweakdepinfos(solv: *mut s_Solver, p: Id, rq: *mut Queue) -> libc::c_int;
}
unsafe extern "C" {
    pub fn solver_weakdepinfo(
        solv: *mut s_Solver,
        p: Id,
        fromp: *mut Id,
        top: *mut Id,
        depp: *mut Id,
    ) -> SolverRuleinfo;
}
unsafe extern "C" {
    pub fn solver_breakorphans(solv: *mut s_Solver);
}
unsafe extern "C" {
    pub fn solver_check_brokenorphanrules(solv: *mut s_Solver, dq: *mut Queue);
}
unsafe extern "C" {
    pub fn solver_recordproblem(solv: *mut s_Solver, rid: Id);
}
unsafe extern "C" {
    pub fn solver_fixproblem(solv: *mut s_Solver, rid: Id);
}
unsafe extern "C" {
    pub fn solver_autouninstall(solv: *mut s_Solver, start: libc::c_int) -> Id;
}
unsafe extern "C" {
    pub fn solver_disableproblemset(solv: *mut s_Solver, start: libc::c_int);
}
unsafe extern "C" {
    pub fn solver_prepare_solutions(solv: *mut s_Solver) -> libc::c_int;
}
unsafe extern "C" {
    pub fn solver_problem_count(solv: *mut s_Solver) -> libc::c_uint;
}
unsafe extern "C" {
    pub fn solver_next_problem(solv: *mut s_Solver, problem: Id) -> Id;
}
unsafe extern "C" {
    pub fn solver_solution_count(solv: *mut s_Solver, problem: Id) -> libc::c_uint;
}
unsafe extern "C" {
    pub fn solver_next_solution(solv: *mut s_Solver, problem: Id, solution: Id) -> Id;
}
unsafe extern "C" {
    pub fn solver_solutionelement_count(
        solv: *mut s_Solver,
        problem: Id,
        solution: Id,
    ) -> libc::c_uint;
}
unsafe extern "C" {
    pub fn solver_solutionelement_internalid(solv: *mut s_Solver, problem: Id, solution: Id) -> Id;
}
unsafe extern "C" {
    pub fn solver_solutionelement_extrajobflags(
        solv: *mut s_Solver,
        problem: Id,
        solution: Id,
    ) -> Id;
}
unsafe extern "C" {
    pub fn solver_next_solutionelement(
        solv: *mut s_Solver,
        problem: Id,
        solution: Id,
        element: Id,
        p: *mut Id,
        rp: *mut Id,
    ) -> Id;
}
unsafe extern "C" {
    pub fn solver_all_solutionelements(
        solv: *mut s_Solver,
        problem: Id,
        solution: Id,
        expandreplaces: libc::c_int,
        q: *mut Queue,
    );
}
unsafe extern "C" {
    pub fn solver_take_solutionelement(
        solv: *mut s_Solver,
        p: Id,
        rp: Id,
        extrajobflags: Id,
        job: *mut Queue,
    );
}
unsafe extern "C" {
    pub fn solver_take_solution(solv: *mut s_Solver, problem: Id, solution: Id, job: *mut Queue);
}
unsafe extern "C" {
    pub fn solver_findproblemrule(solv: *mut s_Solver, problem: Id) -> Id;
}
unsafe extern "C" {
    pub fn solver_findallproblemrules(solv: *mut s_Solver, problem: Id, rules: *mut Queue);
}
unsafe extern "C" {
    pub fn solver_problemruleinfo2str(
        solv: *mut s_Solver,
        type_: SolverRuleinfo,
        source: Id,
        target: Id,
        dep: Id,
    ) -> *const libc::c_char;
}
unsafe extern "C" {
    pub fn solver_problem2str(solv: *mut s_Solver, problem: Id) -> *const libc::c_char;
}
unsafe extern "C" {
    pub fn solver_solutionelement2str(solv: *mut s_Solver, p: Id, rp: Id) -> *const libc::c_char;
}
unsafe extern "C" {
    pub fn solver_solutionelementtype2str(
        solv: *mut s_Solver,
        type_: libc::c_int,
        p: Id,
        rp: Id,
    ) -> *const libc::c_char;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct s_Solver {
    pub pool: *mut Pool,
    pub job: Queue,
    pub solution_callback: ::std::option::Option<
        unsafe extern "C" fn(solv: *mut s_Solver, data: *mut libc::c_void) -> libc::c_int,
    >,
    pub solution_callback_data: *mut libc::c_void,
    pub pooljobcnt: libc::c_int,
}
pub type Solver = s_Solver;
unsafe extern "C" {
    pub fn solver_create(pool: *mut Pool) -> *mut Solver;
}
unsafe extern "C" {
    pub fn solver_free(solv: *mut Solver);
}
unsafe extern "C" {
    pub fn solver_solve(solv: *mut Solver, job: *mut Queue) -> libc::c_int;
}
unsafe extern "C" {
    pub fn solver_create_transaction(solv: *mut Solver) -> *mut Transaction;
}
unsafe extern "C" {
    pub fn solver_set_flag(solv: *mut Solver, flag: libc::c_int, value: libc::c_int)
    -> libc::c_int;
}
unsafe extern "C" {
    pub fn solver_get_flag(solv: *mut Solver, flag: libc::c_int) -> libc::c_int;
}
unsafe extern "C" {
    pub fn solver_get_decisionlevel(solv: *mut Solver, p: Id) -> libc::c_int;
}
unsafe extern "C" {
    pub fn solver_get_decisionqueue(solv: *mut Solver, decisionq: *mut Queue);
}
unsafe extern "C" {
    pub fn solver_get_lastdecisionblocklevel(solv: *mut Solver) -> libc::c_int;
}
unsafe extern "C" {
    pub fn solver_get_decisionblock(solv: *mut Solver, level: libc::c_int, decisionq: *mut Queue);
}
unsafe extern "C" {
    pub fn solver_get_orphaned(solv: *mut Solver, orphanedq: *mut Queue);
}
unsafe extern "C" {
    pub fn solver_get_recommendations(
        solv: *mut Solver,
        recommendationsq: *mut Queue,
        suggestionsq: *mut Queue,
        noselected: libc::c_int,
    );
}
unsafe extern "C" {
    pub fn solver_get_unneeded(solv: *mut Solver, unneededq: *mut Queue, filtered: libc::c_int);
}
unsafe extern "C" {
    pub fn solver_get_userinstalled(solv: *mut Solver, q: *mut Queue, flags: libc::c_int);
}
unsafe extern "C" {
    pub fn pool_add_userinstalled_jobs(
        pool: *mut Pool,
        q: *mut Queue,
        job: *mut Queue,
        flags: libc::c_int,
    );
}
unsafe extern "C" {
    pub fn solver_get_cleandeps(solv: *mut Solver, cleandepsq: *mut Queue);
}
unsafe extern "C" {
    pub fn solver_describe_decision(solv: *mut Solver, p: Id, infop: *mut Id) -> libc::c_int;
}
unsafe extern "C" {
    pub fn solver_get_decisionlist(
        solv: *mut Solver,
        p: Id,
        flags: libc::c_int,
        decisionlistq: *mut Queue,
    );
}
unsafe extern "C" {
    pub fn solver_get_decisionlist_multiple(
        solv: *mut Solver,
        pq: *mut Queue,
        flags: libc::c_int,
        decisionlistq: *mut Queue,
    );
}
unsafe extern "C" {
    pub fn solver_get_learnt(solv: *mut Solver, id: Id, flags: libc::c_int, q: *mut Queue);
}
unsafe extern "C" {
    pub fn solver_decisionlist_solvables(
        solv: *mut Solver,
        decisionlistq: *mut Queue,
        pos: libc::c_int,
        q: *mut Queue,
    );
}
unsafe extern "C" {
    pub fn solver_decisionlist_merged(
        solv: *mut Solver,
        decisionlistq: *mut Queue,
        pos: libc::c_int,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn solver_alternatives_count(solv: *mut Solver) -> libc::c_int;
}
unsafe extern "C" {
    pub fn solver_get_alternative(
        solv: *mut Solver,
        alternative: Id,
        idp: *mut Id,
        fromp: *mut Id,
        chosenp: *mut Id,
        choices: *mut Queue,
        levelp: *mut libc::c_int,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn solver_alternativeinfo(
        solv: *mut Solver,
        type_: libc::c_int,
        id: Id,
        from: Id,
        fromp: *mut Id,
        top: *mut Id,
        depp: *mut Id,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn solver_calculate_multiversionmap(
        pool: *mut Pool,
        job: *mut Queue,
        multiversionmap: *mut Map,
    );
}
unsafe extern "C" {
    pub fn solver_calculate_noobsmap(pool: *mut Pool, job: *mut Queue, multiversionmap: *mut Map);
}
unsafe extern "C" {
    pub fn solver_create_state_maps(
        solv: *mut Solver,
        installedmap: *mut Map,
        conflictsmap: *mut Map,
    );
}
unsafe extern "C" {
    pub fn solver_calc_duchanges(solv: *mut Solver, mps: *mut DUChanges, nmps: libc::c_int);
}
unsafe extern "C" {
    pub fn solver_calc_installsizechange(solv: *mut Solver) -> libc::c_int;
}
unsafe extern "C" {
    pub fn pool_job2solvables(pool: *mut Pool, pkgs: *mut Queue, how: Id, what: Id);
}
unsafe extern "C" {
    pub fn pool_isemptyupdatejob(pool: *mut Pool, how: Id, what: Id) -> libc::c_int;
}
unsafe extern "C" {
    pub fn solver_calc_decisioninfo_bits(
        solv: *mut Solver,
        decision: Id,
        type_: libc::c_int,
        from: Id,
        to: Id,
        dep: Id,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn solver_merge_decisioninfo_bits(
        solv: *mut Solver,
        state1: libc::c_int,
        type1: libc::c_int,
        from1: Id,
        to1: Id,
        dep1: Id,
        state2: libc::c_int,
        type2: libc::c_int,
        from2: Id,
        to2: Id,
        dep2: Id,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn solver_select2str(pool: *mut Pool, select: Id, what: Id) -> *const libc::c_char;
}
unsafe extern "C" {
    pub fn pool_job2str(pool: *mut Pool, how: Id, what: Id, flagmask: Id) -> *const libc::c_char;
}
unsafe extern "C" {
    pub fn solver_alternative2str(
        solv: *mut Solver,
        type_: libc::c_int,
        id: Id,
        from: Id,
    ) -> *const libc::c_char;
}
unsafe extern "C" {
    pub fn solver_reason2str(solv: *mut Solver, reason: libc::c_int) -> *const libc::c_char;
}
unsafe extern "C" {
    pub fn solver_decisionreason2str(
        solv: *mut Solver,
        decision: Id,
        reason: libc::c_int,
        info: Id,
    ) -> *const libc::c_char;
}
unsafe extern "C" {
    pub fn solver_decisioninfo2str(
        solv: *mut Solver,
        bits: libc::c_int,
        type_: libc::c_int,
        from: Id,
        to: Id,
        dep: Id,
    ) -> *const libc::c_char;
}
unsafe extern "C" {
    pub fn solver_describe_weakdep_decision(solv: *mut Solver, p: Id, whyq: *mut Queue);
}
unsafe extern "C" {
    pub fn solver_trivial_installable(solv: *mut Solver, pkgs: *mut Queue, res: *mut Queue);
}
unsafe extern "C" {
    pub fn solver_printruleelement(solv: *mut Solver, type_: libc::c_int, r: *mut Rule, v: Id);
}
unsafe extern "C" {
    pub fn solver_printrule(solv: *mut Solver, type_: libc::c_int, r: *mut Rule);
}
unsafe extern "C" {
    pub fn solver_printruleclass(solv: *mut Solver, type_: libc::c_int, r: *mut Rule);
}
unsafe extern "C" {
    pub fn solver_printproblem(solv: *mut Solver, v: Id);
}
unsafe extern "C" {
    pub fn solver_printwatches(solv: *mut Solver, type_: libc::c_int);
}
unsafe extern "C" {
    pub fn solver_printdecisionq(solv: *mut Solver, type_: libc::c_int);
}
unsafe extern "C" {
    pub fn solver_printdecisions(solv: *mut Solver);
}
unsafe extern "C" {
    pub fn solver_printproblemruleinfo(solv: *mut Solver, rule: Id);
}
unsafe extern "C" {
    pub fn solver_printprobleminfo(solv: *mut Solver, problem: Id);
}
unsafe extern "C" {
    pub fn solver_printcompleteprobleminfo(solv: *mut Solver, problem: Id);
}
unsafe extern "C" {
    pub fn solver_printsolution(solv: *mut Solver, problem: Id, solution: Id);
}
unsafe extern "C" {
    pub fn solver_printallsolutions(solv: *mut Solver);
}
unsafe extern "C" {
    pub fn transaction_print(trans: *mut Transaction);
}
unsafe extern "C" {
    pub fn solver_printtrivial(solv: *mut Solver);
}
unsafe extern "C" {
    pub fn selection_make(
        pool: *mut Pool,
        selection: *mut Queue,
        name: *const libc::c_char,
        flags: libc::c_int,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn selection_make_matchdeps(
        pool: *mut Pool,
        selection: *mut Queue,
        name: *const libc::c_char,
        flags: libc::c_int,
        keyname: libc::c_int,
        marker: libc::c_int,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn selection_make_matchdepid(
        pool: *mut Pool,
        selection: *mut Queue,
        dep: Id,
        flags: libc::c_int,
        keyname: libc::c_int,
        marker: libc::c_int,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn selection_make_matchsolvable(
        pool: *mut Pool,
        selection: *mut Queue,
        solvid: Id,
        flags: libc::c_int,
        keyname: libc::c_int,
        marker: libc::c_int,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn selection_make_matchsolvablelist(
        pool: *mut Pool,
        selection: *mut Queue,
        solvidq: *mut Queue,
        flags: libc::c_int,
        keyname: libc::c_int,
        marker: libc::c_int,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn selection_filter(pool: *mut Pool, sel1: *mut Queue, sel2: *mut Queue);
}
unsafe extern "C" {
    pub fn selection_add(pool: *mut Pool, sel1: *mut Queue, sel2: *mut Queue);
}
unsafe extern "C" {
    pub fn selection_subtract(pool: *mut Pool, sel1: *mut Queue, sel2: *mut Queue);
}
unsafe extern "C" {
    pub fn selection_solvables(pool: *mut Pool, selection: *mut Queue, pkgs: *mut Queue);
}
unsafe extern "C" {
    pub fn pool_selection2str(
        pool: *mut Pool,
        selection: *mut Queue,
        flagmask: Id,
    ) -> *const libc::c_char;
}
unsafe extern "C" {
    pub fn pool_evrcmp_conda(
        pool: *const Pool,
        evr1: *const libc::c_char,
        evr2: *const libc::c_char,
        mode: libc::c_int,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn solvable_conda_matchversion(
        s: *mut Solvable,
        version: *const libc::c_char,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn pool_addrelproviders_conda(pool: *mut Pool, name: Id, evr: Id, plist: *mut Queue) -> Id;
}
unsafe extern "C" {
    pub fn pool_conda_matchspec(pool: *mut Pool, name: *const libc::c_char) -> Id;
}
unsafe extern "C" {
    pub fn repo_add_solv(repo: *mut Repo, fp: *mut FILE, flags: libc::c_int) -> libc::c_int;
}
unsafe extern "C" {
    pub fn solv_read_userdata(
        fp: *mut FILE,
        datap: *mut *mut libc::c_uchar,
        lenp: *mut libc::c_int,
    ) -> libc::c_int;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct s_Repowriter {
    pub repo: *mut Repo,
    pub flags: libc::c_int,
    pub repodatastart: libc::c_int,
    pub repodataend: libc::c_int,
    pub solvablestart: libc::c_int,
    pub solvableend: libc::c_int,
    pub keyfilter: ::std::option::Option<
        unsafe extern "C" fn(
            repo: *mut Repo,
            key: *mut Repokey,
            kfdata: *mut libc::c_void,
        ) -> libc::c_int,
    >,
    pub kfdata: *mut libc::c_void,
    pub keyq: *mut Queue,
    pub userdata: *mut libc::c_void,
    pub userdatalen: libc::c_int,
}
pub type Repowriter = s_Repowriter;
unsafe extern "C" {
    pub fn repowriter_create(repo: *mut Repo) -> *mut Repowriter;
}
unsafe extern "C" {
    pub fn repowriter_free(writer: *mut Repowriter) -> *mut Repowriter;
}
unsafe extern "C" {
    pub fn repowriter_set_flags(writer: *mut Repowriter, flags: libc::c_int);
}
unsafe extern "C" {
    pub fn repowriter_set_keyfilter(
        writer: *mut Repowriter,
        keyfilter: ::std::option::Option<
            unsafe extern "C" fn(
                repo: *mut Repo,
                key: *mut Repokey,
                kfdata: *mut libc::c_void,
            ) -> libc::c_int,
        >,
        kfdata: *mut libc::c_void,
    );
}
unsafe extern "C" {
    pub fn repowriter_set_keyqueue(writer: *mut Repowriter, keyq: *mut Queue);
}
unsafe extern "C" {
    pub fn repowriter_set_repodatarange(
        writer: *mut Repowriter,
        repodatastart: libc::c_int,
        repodataend: libc::c_int,
    );
}
unsafe extern "C" {
    pub fn repowriter_set_solvablerange(
        writer: *mut Repowriter,
        solvablestart: libc::c_int,
        solvableend: libc::c_int,
    );
}
unsafe extern "C" {
    pub fn repowriter_set_userdata(
        writer: *mut Repowriter,
        data: *const libc::c_void,
        len: libc::c_int,
    );
}
unsafe extern "C" {
    pub fn repowriter_write(writer: *mut Repowriter, fp: *mut FILE) -> libc::c_int;
}
unsafe extern "C" {
    pub fn repo_write(repo: *mut Repo, fp: *mut FILE) -> libc::c_int;
}
unsafe extern "C" {
    pub fn repodata_write(data: *mut Repodata, fp: *mut FILE) -> libc::c_int;
}
unsafe extern "C" {
    pub fn repo_write_stdkeyfilter(
        repo: *mut Repo,
        key: *mut Repokey,
        kfdata: *mut libc::c_void,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn repo_write_filtered(
        repo: *mut Repo,
        fp: *mut FILE,
        keyfilter: ::std::option::Option<
            unsafe extern "C" fn(
                repo: *mut Repo,
                key: *mut Repokey,
                kfdata: *mut libc::c_void,
            ) -> libc::c_int,
        >,
        kfdata: *mut libc::c_void,
        keyq: *mut Queue,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn repodata_write_filtered(
        data: *mut Repodata,
        fp: *mut FILE,
        keyfilter: ::std::option::Option<
            unsafe extern "C" fn(
                repo: *mut Repo,
                key: *mut Repokey,
                kfdata: *mut libc::c_void,
            ) -> libc::c_int,
        >,
        kfdata: *mut libc::c_void,
        keyq: *mut Queue,
    ) -> libc::c_int;
}
unsafe extern "C" {
    pub fn repo_add_conda(repo: *mut Repo, fp: *mut FILE, flags: libc::c_int) -> libc::c_int;
}