Skip to main content

flint_sys/
fmpz.rs

1/* automatically generated by rust-bindgen 0.70.1 */
2
3use libc::*;
4use crate::deps::*;
5use crate::flint::*;
6use crate::fmpz_types::*;
7
8
9#[repr(C)]
10pub struct _fmpz_multi_CRT_instr {
11    pub a_idx: slong,
12    pub b_idx: slong,
13    pub c_idx: slong,
14    pub b_modulus: fmpz_t,
15    pub c_modulus: fmpz_t,
16}
17#[allow(clippy::unnecessary_operation, clippy::identity_op)]
18const _: () = {
19    ["Size of _fmpz_multi_CRT_instr"][::std::mem::size_of::<_fmpz_multi_CRT_instr>() - 40usize];
20    ["Alignment of _fmpz_multi_CRT_instr"]
21        [::std::mem::align_of::<_fmpz_multi_CRT_instr>() - 8usize];
22    ["Offset of field: _fmpz_multi_CRT_instr::a_idx"]
23        [::std::mem::offset_of!(_fmpz_multi_CRT_instr, a_idx) - 0usize];
24    ["Offset of field: _fmpz_multi_CRT_instr::b_idx"]
25        [::std::mem::offset_of!(_fmpz_multi_CRT_instr, b_idx) - 8usize];
26    ["Offset of field: _fmpz_multi_CRT_instr::c_idx"]
27        [::std::mem::offset_of!(_fmpz_multi_CRT_instr, c_idx) - 16usize];
28    ["Offset of field: _fmpz_multi_CRT_instr::b_modulus"]
29        [::std::mem::offset_of!(_fmpz_multi_CRT_instr, b_modulus) - 24usize];
30    ["Offset of field: _fmpz_multi_CRT_instr::c_modulus"]
31        [::std::mem::offset_of!(_fmpz_multi_CRT_instr, c_modulus) - 32usize];
32};
33impl Default for _fmpz_multi_CRT_instr {
34    fn default() -> Self {
35        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
36        unsafe {
37            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
38            s.assume_init()
39        }
40    }
41}
42#[repr(C)]
43pub struct fmpz_multi_CRT_struct {
44    pub prog: *mut _fmpz_multi_CRT_instr,
45    pub moduli: *mut fmpz,
46    pub fracmoduli: *mut fmpz,
47    pub final_modulus: fmpz_t,
48    pub moduli_count: slong,
49    pub min_modulus_bits: flint_bitcnt_t,
50    pub length: slong,
51    pub alloc: slong,
52    pub localsize: slong,
53    pub temp1loc: slong,
54    pub temp2loc: slong,
55    pub temp3loc: slong,
56    pub temp4loc: slong,
57    pub good: libc::c_int,
58}
59#[allow(clippy::unnecessary_operation, clippy::identity_op)]
60const _: () = {
61    ["Size of fmpz_multi_CRT_struct"][::std::mem::size_of::<fmpz_multi_CRT_struct>() - 112usize];
62    ["Alignment of fmpz_multi_CRT_struct"]
63        [::std::mem::align_of::<fmpz_multi_CRT_struct>() - 8usize];
64    ["Offset of field: fmpz_multi_CRT_struct::prog"]
65        [::std::mem::offset_of!(fmpz_multi_CRT_struct, prog) - 0usize];
66    ["Offset of field: fmpz_multi_CRT_struct::moduli"]
67        [::std::mem::offset_of!(fmpz_multi_CRT_struct, moduli) - 8usize];
68    ["Offset of field: fmpz_multi_CRT_struct::fracmoduli"]
69        [::std::mem::offset_of!(fmpz_multi_CRT_struct, fracmoduli) - 16usize];
70    ["Offset of field: fmpz_multi_CRT_struct::final_modulus"]
71        [::std::mem::offset_of!(fmpz_multi_CRT_struct, final_modulus) - 24usize];
72    ["Offset of field: fmpz_multi_CRT_struct::moduli_count"]
73        [::std::mem::offset_of!(fmpz_multi_CRT_struct, moduli_count) - 32usize];
74    ["Offset of field: fmpz_multi_CRT_struct::min_modulus_bits"]
75        [::std::mem::offset_of!(fmpz_multi_CRT_struct, min_modulus_bits) - 40usize];
76    ["Offset of field: fmpz_multi_CRT_struct::length"]
77        [::std::mem::offset_of!(fmpz_multi_CRT_struct, length) - 48usize];
78    ["Offset of field: fmpz_multi_CRT_struct::alloc"]
79        [::std::mem::offset_of!(fmpz_multi_CRT_struct, alloc) - 56usize];
80    ["Offset of field: fmpz_multi_CRT_struct::localsize"]
81        [::std::mem::offset_of!(fmpz_multi_CRT_struct, localsize) - 64usize];
82    ["Offset of field: fmpz_multi_CRT_struct::temp1loc"]
83        [::std::mem::offset_of!(fmpz_multi_CRT_struct, temp1loc) - 72usize];
84    ["Offset of field: fmpz_multi_CRT_struct::temp2loc"]
85        [::std::mem::offset_of!(fmpz_multi_CRT_struct, temp2loc) - 80usize];
86    ["Offset of field: fmpz_multi_CRT_struct::temp3loc"]
87        [::std::mem::offset_of!(fmpz_multi_CRT_struct, temp3loc) - 88usize];
88    ["Offset of field: fmpz_multi_CRT_struct::temp4loc"]
89        [::std::mem::offset_of!(fmpz_multi_CRT_struct, temp4loc) - 96usize];
90    ["Offset of field: fmpz_multi_CRT_struct::good"]
91        [::std::mem::offset_of!(fmpz_multi_CRT_struct, good) - 104usize];
92};
93impl Default for fmpz_multi_CRT_struct {
94    fn default() -> Self {
95        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
96        unsafe {
97            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
98            s.assume_init()
99        }
100    }
101}
102pub type fmpz_multi_CRT_t = [fmpz_multi_CRT_struct; 1usize];
103#[repr(C)]
104pub struct _fmpz_multi_mod_instr {
105    pub in_idx: slong,
106    pub out_idx: slong,
107    pub modulus: fmpz_t,
108}
109#[allow(clippy::unnecessary_operation, clippy::identity_op)]
110const _: () = {
111    ["Size of _fmpz_multi_mod_instr"][::std::mem::size_of::<_fmpz_multi_mod_instr>() - 24usize];
112    ["Alignment of _fmpz_multi_mod_instr"]
113        [::std::mem::align_of::<_fmpz_multi_mod_instr>() - 8usize];
114    ["Offset of field: _fmpz_multi_mod_instr::in_idx"]
115        [::std::mem::offset_of!(_fmpz_multi_mod_instr, in_idx) - 0usize];
116    ["Offset of field: _fmpz_multi_mod_instr::out_idx"]
117        [::std::mem::offset_of!(_fmpz_multi_mod_instr, out_idx) - 8usize];
118    ["Offset of field: _fmpz_multi_mod_instr::modulus"]
119        [::std::mem::offset_of!(_fmpz_multi_mod_instr, modulus) - 16usize];
120};
121impl Default for _fmpz_multi_mod_instr {
122    fn default() -> Self {
123        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
124        unsafe {
125            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
126            s.assume_init()
127        }
128    }
129}
130#[repr(C)]
131pub struct fmpz_multi_mod_struct {
132    pub prog: *mut _fmpz_multi_mod_instr,
133    pub moduli: *mut fmpz,
134    pub moduli_count: slong,
135    pub min_modulus_bits: flint_bitcnt_t,
136    pub length: slong,
137    pub alloc: slong,
138    pub localsize: slong,
139    pub temp1loc: slong,
140    pub good: libc::c_int,
141}
142#[allow(clippy::unnecessary_operation, clippy::identity_op)]
143const _: () = {
144    ["Size of fmpz_multi_mod_struct"][::std::mem::size_of::<fmpz_multi_mod_struct>() - 72usize];
145    ["Alignment of fmpz_multi_mod_struct"]
146        [::std::mem::align_of::<fmpz_multi_mod_struct>() - 8usize];
147    ["Offset of field: fmpz_multi_mod_struct::prog"]
148        [::std::mem::offset_of!(fmpz_multi_mod_struct, prog) - 0usize];
149    ["Offset of field: fmpz_multi_mod_struct::moduli"]
150        [::std::mem::offset_of!(fmpz_multi_mod_struct, moduli) - 8usize];
151    ["Offset of field: fmpz_multi_mod_struct::moduli_count"]
152        [::std::mem::offset_of!(fmpz_multi_mod_struct, moduli_count) - 16usize];
153    ["Offset of field: fmpz_multi_mod_struct::min_modulus_bits"]
154        [::std::mem::offset_of!(fmpz_multi_mod_struct, min_modulus_bits) - 24usize];
155    ["Offset of field: fmpz_multi_mod_struct::length"]
156        [::std::mem::offset_of!(fmpz_multi_mod_struct, length) - 32usize];
157    ["Offset of field: fmpz_multi_mod_struct::alloc"]
158        [::std::mem::offset_of!(fmpz_multi_mod_struct, alloc) - 40usize];
159    ["Offset of field: fmpz_multi_mod_struct::localsize"]
160        [::std::mem::offset_of!(fmpz_multi_mod_struct, localsize) - 48usize];
161    ["Offset of field: fmpz_multi_mod_struct::temp1loc"]
162        [::std::mem::offset_of!(fmpz_multi_mod_struct, temp1loc) - 56usize];
163    ["Offset of field: fmpz_multi_mod_struct::good"]
164        [::std::mem::offset_of!(fmpz_multi_mod_struct, good) - 64usize];
165};
166impl Default for fmpz_multi_mod_struct {
167    fn default() -> Self {
168        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
169        unsafe {
170            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
171            s.assume_init()
172        }
173    }
174}
175pub type fmpz_multi_mod_t = [fmpz_multi_mod_struct; 1usize];
176#[repr(C)]
177pub struct crt_lut_entry {
178    pub mod_: nmod_t,
179    pub i0: ulong,
180    pub i1: ulong,
181    pub i2: ulong,
182}
183#[allow(clippy::unnecessary_operation, clippy::identity_op)]
184const _: () = {
185    ["Size of crt_lut_entry"][::std::mem::size_of::<crt_lut_entry>() - 48usize];
186    ["Alignment of crt_lut_entry"][::std::mem::align_of::<crt_lut_entry>() - 8usize];
187    ["Offset of field: crt_lut_entry::mod_"][::std::mem::offset_of!(crt_lut_entry, mod_) - 0usize];
188    ["Offset of field: crt_lut_entry::i0"][::std::mem::offset_of!(crt_lut_entry, i0) - 24usize];
189    ["Offset of field: crt_lut_entry::i1"][::std::mem::offset_of!(crt_lut_entry, i1) - 32usize];
190    ["Offset of field: crt_lut_entry::i2"][::std::mem::offset_of!(crt_lut_entry, i2) - 40usize];
191};
192impl Default for crt_lut_entry {
193    fn default() -> Self {
194        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
195        unsafe {
196            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
197            s.assume_init()
198        }
199    }
200}
201#[repr(C)]
202pub struct mod_lut_entry {
203    pub mod_: nmod_t,
204    pub mod0: nmod_t,
205    pub mod1: nmod_t,
206    pub mod2: nmod_t,
207}
208#[allow(clippy::unnecessary_operation, clippy::identity_op)]
209const _: () = {
210    ["Size of mod_lut_entry"][::std::mem::size_of::<mod_lut_entry>() - 96usize];
211    ["Alignment of mod_lut_entry"][::std::mem::align_of::<mod_lut_entry>() - 8usize];
212    ["Offset of field: mod_lut_entry::mod_"][::std::mem::offset_of!(mod_lut_entry, mod_) - 0usize];
213    ["Offset of field: mod_lut_entry::mod0"][::std::mem::offset_of!(mod_lut_entry, mod0) - 24usize];
214    ["Offset of field: mod_lut_entry::mod1"][::std::mem::offset_of!(mod_lut_entry, mod1) - 48usize];
215    ["Offset of field: mod_lut_entry::mod2"][::std::mem::offset_of!(mod_lut_entry, mod2) - 72usize];
216};
217impl Default for mod_lut_entry {
218    fn default() -> Self {
219        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
220        unsafe {
221            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
222            s.assume_init()
223        }
224    }
225}
226#[repr(C)]
227pub struct fmpz_comb_struct {
228    pub crt_P: fmpz_multi_CRT_t,
229    pub mod_P: fmpz_multi_mod_t,
230    pub packed_multipliers: *mut ulong,
231    pub step: *mut slong,
232    pub crt_offsets: *mut slong,
233    pub crt_offsets_alloc: slong,
234    pub mod_offsets: *mut slong,
235    pub mod_offsets_alloc: slong,
236    pub crt_lu: *mut crt_lut_entry,
237    pub crt_lu_alloc: slong,
238    pub crt_klen: slong,
239    pub mod_lu: *mut mod_lut_entry,
240    pub mod_lu_alloc: slong,
241    pub mod_klen: slong,
242    pub num_primes: slong,
243}
244#[allow(clippy::unnecessary_operation, clippy::identity_op)]
245const _: () = {
246    ["Size of fmpz_comb_struct"][::std::mem::size_of::<fmpz_comb_struct>() - 288usize];
247    ["Alignment of fmpz_comb_struct"][::std::mem::align_of::<fmpz_comb_struct>() - 8usize];
248    ["Offset of field: fmpz_comb_struct::crt_P"]
249        [::std::mem::offset_of!(fmpz_comb_struct, crt_P) - 0usize];
250    ["Offset of field: fmpz_comb_struct::mod_P"]
251        [::std::mem::offset_of!(fmpz_comb_struct, mod_P) - 112usize];
252    ["Offset of field: fmpz_comb_struct::packed_multipliers"]
253        [::std::mem::offset_of!(fmpz_comb_struct, packed_multipliers) - 184usize];
254    ["Offset of field: fmpz_comb_struct::step"]
255        [::std::mem::offset_of!(fmpz_comb_struct, step) - 192usize];
256    ["Offset of field: fmpz_comb_struct::crt_offsets"]
257        [::std::mem::offset_of!(fmpz_comb_struct, crt_offsets) - 200usize];
258    ["Offset of field: fmpz_comb_struct::crt_offsets_alloc"]
259        [::std::mem::offset_of!(fmpz_comb_struct, crt_offsets_alloc) - 208usize];
260    ["Offset of field: fmpz_comb_struct::mod_offsets"]
261        [::std::mem::offset_of!(fmpz_comb_struct, mod_offsets) - 216usize];
262    ["Offset of field: fmpz_comb_struct::mod_offsets_alloc"]
263        [::std::mem::offset_of!(fmpz_comb_struct, mod_offsets_alloc) - 224usize];
264    ["Offset of field: fmpz_comb_struct::crt_lu"]
265        [::std::mem::offset_of!(fmpz_comb_struct, crt_lu) - 232usize];
266    ["Offset of field: fmpz_comb_struct::crt_lu_alloc"]
267        [::std::mem::offset_of!(fmpz_comb_struct, crt_lu_alloc) - 240usize];
268    ["Offset of field: fmpz_comb_struct::crt_klen"]
269        [::std::mem::offset_of!(fmpz_comb_struct, crt_klen) - 248usize];
270    ["Offset of field: fmpz_comb_struct::mod_lu"]
271        [::std::mem::offset_of!(fmpz_comb_struct, mod_lu) - 256usize];
272    ["Offset of field: fmpz_comb_struct::mod_lu_alloc"]
273        [::std::mem::offset_of!(fmpz_comb_struct, mod_lu_alloc) - 264usize];
274    ["Offset of field: fmpz_comb_struct::mod_klen"]
275        [::std::mem::offset_of!(fmpz_comb_struct, mod_klen) - 272usize];
276    ["Offset of field: fmpz_comb_struct::num_primes"]
277        [::std::mem::offset_of!(fmpz_comb_struct, num_primes) - 280usize];
278};
279impl Default for fmpz_comb_struct {
280    fn default() -> Self {
281        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
282        unsafe {
283            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
284            s.assume_init()
285        }
286    }
287}
288pub type fmpz_comb_t = [fmpz_comb_struct; 1usize];
289#[repr(C)]
290pub struct fmpz_comb_temp_struct {
291    pub Alen: slong,
292    pub Tlen: slong,
293    pub A: *mut fmpz,
294    pub T: *mut fmpz,
295}
296#[allow(clippy::unnecessary_operation, clippy::identity_op)]
297const _: () = {
298    ["Size of fmpz_comb_temp_struct"][::std::mem::size_of::<fmpz_comb_temp_struct>() - 32usize];
299    ["Alignment of fmpz_comb_temp_struct"]
300        [::std::mem::align_of::<fmpz_comb_temp_struct>() - 8usize];
301    ["Offset of field: fmpz_comb_temp_struct::Alen"]
302        [::std::mem::offset_of!(fmpz_comb_temp_struct, Alen) - 0usize];
303    ["Offset of field: fmpz_comb_temp_struct::Tlen"]
304        [::std::mem::offset_of!(fmpz_comb_temp_struct, Tlen) - 8usize];
305    ["Offset of field: fmpz_comb_temp_struct::A"]
306        [::std::mem::offset_of!(fmpz_comb_temp_struct, A) - 16usize];
307    ["Offset of field: fmpz_comb_temp_struct::T"]
308        [::std::mem::offset_of!(fmpz_comb_temp_struct, T) - 24usize];
309};
310impl Default for fmpz_comb_temp_struct {
311    fn default() -> Self {
312        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
313        unsafe {
314            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
315            s.assume_init()
316        }
317    }
318}
319pub type fmpz_comb_temp_t = [fmpz_comb_temp_struct; 1usize];
320extern "C" {
321    pub fn _fmpz_new_mpz() -> mpz_ptr;
322    pub fn _fmpz_promote(f: *mut fmpz) -> mpz_ptr;
323    pub fn _fmpz_promote_val(f: *mut fmpz) -> mpz_ptr;
324    pub fn _fmpz_init_readonly_mpz(f: *mut fmpz, z: *const __mpz_struct);
325    pub fn flint_mpz_init_set_readonly(z: *mut __mpz_struct, f: *const fmpz);
326    pub fn fmpz_init_set_readonly(f: *mut fmpz, z: *const __mpz_struct);
327    pub fn flint_mpz_clear_readonly(z: *mut __mpz_struct);
328    pub fn _fmpz_clear_readonly_mpz(z: *mut __mpz_struct);
329    pub fn _fmpz_clear_mpz(f: fmpz);
330    pub fn _fmpz_cleanup_mpz_content();
331    pub fn _fmpz_cleanup();
332    #[link_name = "_fmpz_demote__extern"]
333    pub fn _fmpz_demote(f: *mut fmpz);
334    pub fn _fmpz_demote_val(f: *mut fmpz);
335    #[link_name = "fmpz_init__extern"]
336    pub fn fmpz_init(f: *mut fmpz);
337    #[link_name = "fmpz_clear__extern"]
338    pub fn fmpz_clear(f: *mut fmpz);
339    pub fn fmpz_init2(f: *mut fmpz, limbs: ulong);
340    pub fn _fmpz_promote_set_ui(f: *mut fmpz, v: ulong);
341    pub fn _fmpz_promote_set_si(f: *mut fmpz, v: slong);
342    pub fn _fmpz_promote_neg_ui(f: *mut fmpz, v: ulong);
343    pub fn _fmpz_promote_set_uiui(f: *mut fmpz, hi: ulong, lo: ulong);
344    pub fn _fmpz_promote_neg_uiui(f: *mut fmpz, hi: ulong, lo: ulong);
345    pub fn _fmpz_init_promote_set_ui(f: *mut fmpz, v: ulong);
346    pub fn _fmpz_init_promote_set_si(f: *mut fmpz, v: slong);
347    pub fn fmpz_set(f: *mut fmpz, g: *const fmpz);
348    #[link_name = "fmpz_init_set__extern"]
349    pub fn fmpz_init_set(f: *mut fmpz, g: *const fmpz);
350    #[link_name = "fmpz_init_set_ui__extern"]
351    pub fn fmpz_init_set_ui(f: *mut fmpz, g: ulong);
352    #[link_name = "fmpz_init_set_si__extern"]
353    pub fn fmpz_init_set_si(f: *mut fmpz, g: slong);
354    pub fn fmpz_clear_readonly(f: *mut fmpz);
355    pub fn _fmpz_is_canonical(x: *const fmpz) -> libc::c_int;
356    pub fn fmpz_randbits_unsigned(
357        f: *mut fmpz,
358        state: *mut flint_rand_struct,
359        bits: flint_bitcnt_t,
360    );
361    pub fn fmpz_randbits(f: *mut fmpz, state: *mut flint_rand_struct, bits: flint_bitcnt_t);
362    pub fn fmpz_randm(f: *mut fmpz, state: *mut flint_rand_struct, m: *const fmpz);
363    pub fn fmpz_randtest(f: *mut fmpz, state: *mut flint_rand_struct, bits: flint_bitcnt_t);
364    pub fn fmpz_randtest_unsigned(
365        f: *mut fmpz,
366        state: *mut flint_rand_struct,
367        bits: flint_bitcnt_t,
368    );
369    pub fn fmpz_randtest_not_zero(
370        f: *mut fmpz,
371        state: *mut flint_rand_struct,
372        bits: flint_bitcnt_t,
373    );
374    pub fn fmpz_randtest_mod(f: *mut fmpz, state: *mut flint_rand_struct, m: *const fmpz);
375    pub fn fmpz_randtest_mod_signed(f: *mut fmpz, state: *mut flint_rand_struct, m: *const fmpz);
376    pub fn fmpz_randprime(
377        f: *mut fmpz,
378        state: *mut flint_rand_struct,
379        bits: flint_bitcnt_t,
380        proved: libc::c_int,
381    );
382    #[link_name = "fmpz_zero__extern"]
383    pub fn fmpz_zero(f: *mut fmpz);
384    #[link_name = "fmpz_one__extern"]
385    pub fn fmpz_one(f: *mut fmpz);
386    #[link_name = "fmpz_swap__extern"]
387    pub fn fmpz_swap(f: *mut fmpz, g: *mut fmpz);
388    pub fn fmpz_get_si(f: *const fmpz) -> slong;
389    pub fn fmpz_get_ui(f: *const fmpz) -> ulong;
390    #[link_name = "fmpz_set_si__extern"]
391    pub fn fmpz_set_si(f: *mut fmpz, val: slong);
392    #[link_name = "fmpz_set_ui__extern"]
393    pub fn fmpz_set_ui(f: *mut fmpz, val: ulong);
394    #[link_name = "fmpz_neg_ui__extern"]
395    pub fn fmpz_neg_ui(f: *mut fmpz, val: ulong);
396    #[link_name = "fmpz_get_uiui__extern"]
397    pub fn fmpz_get_uiui(hi: *mut ulong, low: *mut ulong, f: *const fmpz);
398    #[link_name = "fmpz_set_uiui__extern"]
399    pub fn fmpz_set_uiui(f: *mut fmpz, hi: ulong, lo: ulong);
400    #[link_name = "fmpz_neg_uiui__extern"]
401    pub fn fmpz_neg_uiui(f: *mut fmpz, hi: ulong, lo: ulong);
402    pub fn fmpz_get_signed_uiui(hi: *mut ulong, lo: *mut ulong, x: *const fmpz);
403    #[link_name = "fmpz_set_signed_uiui__extern"]
404    pub fn fmpz_set_signed_uiui(r: *mut fmpz, hi: ulong, lo: ulong);
405    pub fn fmpz_set_signed_uiuiui(r: *mut fmpz, hi: ulong, mid: ulong, lo: ulong);
406    pub fn fmpz_get_ui_array(out: *mut ulong, n: slong, in_: *const fmpz);
407    pub fn fmpz_set_ui_array(out: *mut fmpz, in_: *const ulong, n: slong);
408    pub fn fmpz_get_signed_ui_array(out: *mut ulong, n: slong, in_: *const fmpz);
409    pub fn fmpz_set_signed_ui_array(out: *mut fmpz, in_: *const ulong, n: slong);
410    pub fn fmpz_set_mpn_large(z: *mut fmpz, src: nn_srcptr, n: slong, negative: libc::c_int);
411    pub fn fmpz_get_nmod(f: *const fmpz, mod_: nmod_t) -> ulong;
412    pub fn fmpz_get_d(f: *const fmpz) -> f64;
413    pub fn fmpz_set_d(f: *mut fmpz, c: f64);
414    pub fn fmpz_get_mpz(x: *mut __mpz_struct, f: *const fmpz);
415    pub fn fmpz_set_mpz(f: *mut fmpz, x: *const __mpz_struct);
416    pub fn fmpz_get_mpf(x: *mut __mpf_struct, f: *const fmpz);
417    pub fn fmpz_set_mpf(f: *mut fmpz, x: *const __mpf_struct);
418    pub fn fmpz_get_mpfr(x: *mut __mpfr_struct, f: *const fmpz, rnd: mpfr_rnd_t);
419    pub fn fmpz_get_mpn(n: *mut nn_ptr, n_in: *mut fmpz) -> libc::c_int;
420    #[link_name = "fmpz_is_zero__extern"]
421    pub fn fmpz_is_zero(f: *const fmpz) -> libc::c_int;
422    #[link_name = "fmpz_is_one__extern"]
423    pub fn fmpz_is_one(f: *const fmpz) -> libc::c_int;
424    #[link_name = "fmpz_is_pm1__extern"]
425    pub fn fmpz_is_pm1(f: *const fmpz) -> libc::c_int;
426    pub fn fmpz_equal(f: *const fmpz, g: *const fmpz) -> libc::c_int;
427    pub fn fmpz_equal_si(f: *const fmpz, g: slong) -> libc::c_int;
428    pub fn fmpz_equal_ui(f: *const fmpz, g: ulong) -> libc::c_int;
429    pub fn fmpz_cmp(f: *const fmpz, g: *const fmpz) -> libc::c_int;
430    pub fn fmpz_cmp_ui(f: *const fmpz, g: ulong) -> libc::c_int;
431    pub fn fmpz_cmp_si(f: *const fmpz, g: slong) -> libc::c_int;
432    pub fn fmpz_cmpabs(f: *const fmpz, g: *const fmpz) -> libc::c_int;
433    pub fn fmpz_cmp2abs(f: *const fmpz, g: *const fmpz) -> libc::c_int;
434    #[link_name = "fmpz_is_even__extern"]
435    pub fn fmpz_is_even(f: *const fmpz) -> libc::c_int;
436    #[link_name = "fmpz_is_odd__extern"]
437    pub fn fmpz_is_odd(f: *const fmpz) -> libc::c_int;
438    pub fn fmpz_sgn(f: *const fmpz) -> libc::c_int;
439    pub fn fmpz_abs_fits_ui(f: *const fmpz) -> libc::c_int;
440    pub fn fmpz_fits_si(f: *const fmpz) -> libc::c_int;
441    pub fn fmpz_sizeinbase(f: *const fmpz, b: libc::c_int) -> usize;
442    pub fn fmpz_size(f: *const fmpz) -> slong;
443    pub fn fmpz_bits(f: *const fmpz) -> flint_bitcnt_t;
444    pub fn fmpz_val2(x: *const fmpz) -> flint_bitcnt_t;
445    pub fn fmpz_is_square(f: *const fmpz) -> libc::c_int;
446    pub fn fmpz_is_perfect_power(root: *mut fmpz, f: *const fmpz) -> libc::c_int;
447    pub fn fmpz_abs_ubound_ui_2exp(exp: *mut slong, x: *const fmpz, bits: libc::c_int) -> ulong;
448    pub fn fmpz_abs_lbound_ui_2exp(exp: *mut slong, x: *const fmpz, bits: libc::c_int) -> ulong;
449    pub fn fmpz_read(f: *mut fmpz) -> libc::c_int;
450    pub fn fmpz_print(x: *const fmpz) -> libc::c_int;
451    pub fn fmpz_set_str(f: *mut fmpz, str_: *const libc::c_char, b: libc::c_int) -> libc::c_int;
452    pub fn fmpz_get_str(
453        str_: *mut libc::c_char,
454        b: libc::c_int,
455        f: *const fmpz,
456    ) -> *mut libc::c_char;
457    pub fn fmpz_fread(file: *mut FILE, f: *mut fmpz) -> libc::c_int;
458    pub fn fmpz_fprint(file: *mut FILE, x: *const fmpz) -> libc::c_int;
459    pub fn fmpz_inp_raw(x: *mut fmpz, fin: *mut FILE) -> usize;
460    pub fn fmpz_out_raw(fout: *mut FILE, x: *const fmpz) -> usize;
461    pub fn fmpz_add(f: *mut fmpz, g: *const fmpz, h: *const fmpz);
462    pub fn fmpz_add_ui(f: *mut fmpz, g: *const fmpz, x: ulong);
463    pub fn fmpz_sub(f: *mut fmpz, g: *const fmpz, h: *const fmpz);
464    pub fn fmpz_sub_ui(f: *mut fmpz, g: *const fmpz, x: ulong);
465    #[link_name = "fmpz_add_si__extern"]
466    pub fn fmpz_add_si(f: *mut fmpz, g: *const fmpz, x: slong);
467    #[link_name = "fmpz_sub_si__extern"]
468    pub fn fmpz_sub_si(f: *mut fmpz, g: *const fmpz, x: slong);
469    pub fn fmpz_abs(f1: *mut fmpz, f2: *const fmpz);
470    pub fn fmpz_neg(f1: *mut fmpz, f2: *const fmpz);
471    pub fn fmpz_mul_ui(f: *mut fmpz, g: *const fmpz, x: ulong);
472    pub fn fmpz_mul_si(f: *mut fmpz, g: *const fmpz, x: slong);
473    pub fn fmpz_mul(f: *mut fmpz, g: *const fmpz, h: *const fmpz);
474    pub fn fmpz_mul2_uiui(f: *mut fmpz, g: *const fmpz, h1: ulong, h2: ulong);
475    pub fn fmpz_mul_2exp(f: *mut fmpz, g: *const fmpz, exp: ulong);
476    pub fn fmpz_one_2exp(f: *mut fmpz, exp: ulong);
477    pub fn fmpz_addmul(f: *mut fmpz, g: *const fmpz, h: *const fmpz);
478    pub fn fmpz_addmul_si(f: *mut fmpz, g: *const fmpz, x: slong);
479    pub fn fmpz_addmul_ui(f: *mut fmpz, g: *const fmpz, x: ulong);
480    pub fn fmpz_submul(f: *mut fmpz, g: *const fmpz, h: *const fmpz);
481    pub fn fmpz_submul_si(f: *mut fmpz, g: *const fmpz, x: slong);
482    pub fn fmpz_submul_ui(f: *mut fmpz, g: *const fmpz, x: ulong);
483    pub fn fmpz_fmma(f: *mut fmpz, a: *const fmpz, b: *const fmpz, c: *const fmpz, d: *const fmpz);
484    pub fn fmpz_fmms(f: *mut fmpz, a: *const fmpz, b: *const fmpz, c: *const fmpz, d: *const fmpz);
485    pub fn fmpz_pow_ui(f: *mut fmpz, g: *const fmpz, exp: ulong);
486    pub fn fmpz_ui_pow_ui(x: *mut fmpz, b: ulong, e: ulong);
487    pub fn fmpz_pow_fmpz(a: *mut fmpz, b: *const fmpz, e: *const fmpz) -> libc::c_int;
488    pub fn fmpz_sqrt(f: *mut fmpz, g: *const fmpz);
489    pub fn fmpz_sqrtrem(f: *mut fmpz, r: *mut fmpz, g: *const fmpz);
490    pub fn fmpz_root(r: *mut fmpz, f: *const fmpz, n: slong) -> libc::c_int;
491    pub fn fmpz_divisible(f: *const fmpz, g: *const fmpz) -> libc::c_int;
492    pub fn fmpz_divisible_ui(f: *const fmpz, g: ulong) -> libc::c_int;
493    #[link_name = "fmpz_divisible_si__extern"]
494    pub fn fmpz_divisible_si(f: *const fmpz, g: slong) -> libc::c_int;
495    pub fn fmpz_divides(q: *mut fmpz, g: *const fmpz, h: *const fmpz) -> libc::c_int;
496    pub fn fmpz_divexact(f: *mut fmpz, g: *const fmpz, h: *const fmpz);
497    pub fn fmpz_divexact_ui(f: *mut fmpz, g: *const fmpz, h: ulong);
498    pub fn fmpz_divexact_si(f: *mut fmpz, g: *const fmpz, h: slong);
499    pub fn fmpz_divexact2_uiui(f: *mut fmpz, g: *const fmpz, h1: ulong, h2: ulong);
500    pub fn fmpz_cdiv_qr(f: *mut fmpz, s: *mut fmpz, g: *const fmpz, h: *const fmpz);
501    pub fn fmpz_fdiv_qr(f: *mut fmpz, s: *mut fmpz, g: *const fmpz, h: *const fmpz);
502    pub fn fmpz_tdiv_qr(f: *mut fmpz, s: *mut fmpz, g: *const fmpz, h: *const fmpz);
503    pub fn fmpz_ndiv_qr(q: *mut fmpz, r: *mut fmpz, a: *const fmpz, b: *const fmpz);
504    pub fn fmpz_cdiv_r_2exp(f: *mut fmpz, g: *const fmpz, exp: ulong);
505    pub fn fmpz_fdiv_r_2exp(f: *mut fmpz, g: *const fmpz, exp: ulong);
506    pub fn fmpz_tdiv_r_2exp(f: *mut fmpz, g: *const fmpz, exp: ulong);
507    pub fn fmpz_cdiv_q_2exp(f: *mut fmpz, g: *const fmpz, exp: ulong);
508    pub fn fmpz_fdiv_q_2exp(f: *mut fmpz, g: *const fmpz, exp: ulong);
509    pub fn fmpz_tdiv_q_2exp(f: *mut fmpz, g: *const fmpz, exp: ulong);
510    pub fn fmpz_cdiv_ui(g: *const fmpz, h: ulong) -> ulong;
511    pub fn fmpz_fdiv_ui(g: *const fmpz, h: ulong) -> ulong;
512    pub fn fmpz_tdiv_ui(g: *const fmpz, h: ulong) -> ulong;
513    pub fn fmpz_cdiv_q(f: *mut fmpz, g: *const fmpz, h: *const fmpz);
514    pub fn fmpz_fdiv_q(f: *mut fmpz, g: *const fmpz, h: *const fmpz);
515    pub fn fmpz_tdiv_q(f: *mut fmpz, g: *const fmpz, h: *const fmpz);
516    pub fn fmpz_fdiv_r(f: *mut fmpz, g: *const fmpz, h: *const fmpz);
517    pub fn fmpz_cdiv_q_ui(f: *mut fmpz, g: *const fmpz, h: ulong);
518    pub fn fmpz_fdiv_q_ui(f: *mut fmpz, g: *const fmpz, h: ulong);
519    pub fn fmpz_tdiv_q_ui(f: *mut fmpz, g: *const fmpz, h: ulong);
520    pub fn fmpz_cdiv_q_si(f: *mut fmpz, g: *const fmpz, h: slong);
521    pub fn fmpz_fdiv_q_si(f: *mut fmpz, g: *const fmpz, h: slong);
522    pub fn fmpz_tdiv_q_si(f: *mut fmpz, g: *const fmpz, h: slong);
523    pub fn fmpz_mul_tdiv_q_2exp(f: *mut fmpz, g: *const fmpz, h: *const fmpz, exp: ulong);
524    pub fn fmpz_mul_si_tdiv_q_2exp(f: *mut fmpz, g: *const fmpz, x: slong, exp: ulong);
525    pub fn fmpz_dlog(x: *const fmpz) -> f64;
526    pub fn fmpz_clog(x: *const fmpz, b: *const fmpz) -> slong;
527    pub fn fmpz_flog(x: *const fmpz, b: *const fmpz) -> slong;
528    pub fn fmpz_clog_ui(x: *const fmpz, b: ulong) -> slong;
529    pub fn fmpz_flog_ui(x: *const fmpz, b: ulong) -> slong;
530    pub fn fmpz_get_d_2exp(exp: *mut slong, f: *const fmpz) -> f64;
531    pub fn fmpz_set_d_2exp(f: *mut fmpz, m: f64, exp: slong);
532    pub fn _fmpz_tdiv_q_newton(q: *mut fmpz, a: *const fmpz, b: *const fmpz);
533    pub fn _fmpz_fdiv_q_newton(q: *mut fmpz, a: *const fmpz, b: *const fmpz);
534    pub fn _fmpz_cdiv_q_newton(q: *mut fmpz, a: *const fmpz, b: *const fmpz);
535    pub fn _fmpz_tdiv_qr_newton(q: *mut fmpz, r: *mut fmpz, a: *const fmpz, b: *const fmpz);
536    pub fn _fmpz_fdiv_qr_newton(q: *mut fmpz, r: *mut fmpz, a: *const fmpz, b: *const fmpz);
537    pub fn _fmpz_cdiv_qr_newton(q: *mut fmpz, r: *mut fmpz, a: *const fmpz, b: *const fmpz);
538    pub fn _fmpz_tdiv_r_newton(r: *mut fmpz, a: *const fmpz, b: *const fmpz);
539    pub fn _fmpz_fdiv_r_newton(r: *mut fmpz, a: *const fmpz, b: *const fmpz);
540    pub fn _fmpz_cdiv_r_newton(r: *mut fmpz, a: *const fmpz, b: *const fmpz);
541    pub fn _fmpz_mod_newton(r: *mut fmpz, a: *const fmpz, b: *const fmpz);
542    pub fn _fmpz_divexact_newton(q: *mut fmpz, a: *const fmpz, b: *const fmpz);
543    pub fn fmpz_setbit(f: *mut fmpz, i: ulong);
544    pub fn fmpz_clrbit(f: *mut fmpz, i: ulong);
545    pub fn fmpz_tstbit(f: *const fmpz, i: ulong) -> libc::c_int;
546    pub fn fmpz_complement(r: *mut fmpz, f: *const fmpz);
547    pub fn fmpz_combit(f: *mut fmpz, i: ulong);
548    pub fn fmpz_and(r: *mut fmpz, a: *const fmpz, b: *const fmpz);
549    pub fn fmpz_or(r: *mut fmpz, a: *const fmpz, b: *const fmpz);
550    pub fn fmpz_xor(r: *mut fmpz, a: *const fmpz, b: *const fmpz);
551    pub fn fmpz_popcnt(c: *const fmpz) -> flint_bitcnt_t;
552    pub fn fmpz_bit_pack(
553        arr: nn_ptr,
554        shift: flint_bitcnt_t,
555        bits: flint_bitcnt_t,
556        coeff: *const fmpz,
557        negate: libc::c_int,
558        borrow: libc::c_int,
559    ) -> libc::c_int;
560    pub fn fmpz_bit_unpack(
561        coeff: *mut fmpz,
562        arr: nn_srcptr,
563        shift: flint_bitcnt_t,
564        bits: flint_bitcnt_t,
565        negate: libc::c_int,
566        borrow: libc::c_int,
567    ) -> libc::c_int;
568    pub fn fmpz_bit_unpack_unsigned(
569        coeff: *mut fmpz,
570        arr: nn_srcptr,
571        shift: flint_bitcnt_t,
572        bits: flint_bitcnt_t,
573    );
574    #[link_name = "fmpz_mod_ui__extern"]
575    pub fn fmpz_mod_ui(f: *mut fmpz, g: *const fmpz, h: ulong) -> ulong;
576    #[link_name = "fmpz_set_ui_smod__extern"]
577    pub fn fmpz_set_ui_smod(f: *mut fmpz, x: ulong, m: ulong);
578    pub fn fmpz_mod(f: *mut fmpz, g: *const fmpz, h: *const fmpz);
579    pub fn fmpz_smod(f: *mut fmpz, g: *const fmpz, h: *const fmpz);
580    pub fn _fmpz_smod(
581        r: *mut fmpz,
582        a: *const fmpz,
583        m: *const fmpz,
584        sign: libc::c_int,
585        t: *mut fmpz,
586    );
587    #[link_name = "fmpz_negmod__extern"]
588    pub fn fmpz_negmod(r: *mut fmpz, a: *const fmpz, mod_: *const fmpz);
589    pub fn fmpz_invmod(f: *mut fmpz, g: *const fmpz, h: *const fmpz) -> libc::c_int;
590    pub fn fmpz_sqrtmod(b: *mut fmpz, a: *const fmpz, p: *const fmpz) -> libc::c_int;
591    pub fn fmpz_powm_ui(f: *mut fmpz, g: *const fmpz, exp: ulong, m: *const fmpz);
592    pub fn fmpz_powm(f: *mut fmpz, g: *const fmpz, e: *const fmpz, m: *const fmpz);
593    pub fn fmpz_divides_mod_list(
594        xstart: *mut fmpz,
595        xstride: *mut fmpz,
596        xlength: *mut fmpz,
597        a: *const fmpz,
598        b: *const fmpz,
599        n: *const fmpz,
600    );
601    pub fn _fmpz_remove(x: *mut fmpz, f: *const fmpz, finv: f64) -> slong;
602    pub fn fmpz_remove(rop: *mut fmpz, op: *const fmpz, f: *const fmpz) -> slong;
603    pub fn fmpz_gcd(f: *mut fmpz, g: *const fmpz, h: *const fmpz);
604    pub fn fmpz_gcd_ui(res: *mut fmpz, a: *const fmpz, b: ulong);
605    pub fn fmpz_gcd3(f: *mut fmpz, a: *const fmpz, b: *const fmpz, c: *const fmpz);
606    pub fn fmpz_gcdinv(d: *mut fmpz, a: *mut fmpz, f: *const fmpz, g: *const fmpz);
607    pub fn fmpz_xgcd(d: *mut fmpz, a: *mut fmpz, b: *mut fmpz, f: *const fmpz, g: *const fmpz);
608    pub fn fmpz_xgcd_canonical_bezout(
609        d: *mut fmpz,
610        a: *mut fmpz,
611        b: *mut fmpz,
612        f: *const fmpz,
613        g: *const fmpz,
614    );
615    pub fn fmpz_xgcd_partial(
616        co2: *mut fmpz,
617        co1: *mut fmpz,
618        r2: *mut fmpz,
619        r1: *mut fmpz,
620        L: *const fmpz,
621    );
622    pub fn fmpz_lcm(f: *mut fmpz, g: *const fmpz, h: *const fmpz);
623    pub fn fmpz_fdiv_qr_preinvn(
624        f: *mut fmpz,
625        s: *mut fmpz,
626        g: *const fmpz,
627        h: *const fmpz,
628        inv: *const fmpz_preinvn_struct,
629    );
630    pub fn fmpz_fdiv_r_preinvn(
631        f: *mut fmpz,
632        g: *const fmpz,
633        h: *const fmpz,
634        inv: *const fmpz_preinvn_struct,
635    );
636    pub fn fmpz_preinvn_init(inv: *mut fmpz_preinvn_struct, f: *const fmpz);
637    pub fn fmpz_preinvn_clear(inv: *mut fmpz_preinvn_struct);
638    pub fn fmpz_fac_ui(f: *mut fmpz, n: ulong);
639    pub fn fmpz_bin_uiui(res: *mut fmpz, n: ulong, k: ulong);
640    pub fn _fmpz_rfac_ui(r: *mut fmpz, x: *const fmpz, a: ulong, b: ulong);
641    pub fn fmpz_rfac_ui(r: *mut fmpz, x: *const fmpz, n: ulong);
642    pub fn fmpz_rfac_uiui(r: *mut fmpz, x: ulong, n: ulong);
643    pub fn fmpz_jacobi(a: *const fmpz, p: *const fmpz) -> libc::c_int;
644    pub fn fmpz_kronecker(a: *const fmpz, n: *const fmpz) -> libc::c_int;
645    pub fn fmpz_fib_ui(f: *mut fmpz, n: ulong);
646    pub fn _fmpz_CRT_ui_precomp(
647        out: *mut fmpz,
648        r1: *const fmpz,
649        m1: *const fmpz,
650        r2: ulong,
651        m2: ulong,
652        m2inv: ulong,
653        m1m2: *const fmpz,
654        c: ulong,
655        sign: libc::c_int,
656    );
657    pub fn fmpz_CRT_ui(
658        out: *mut fmpz,
659        r1: *const fmpz,
660        m1: *const fmpz,
661        r2: ulong,
662        m2: ulong,
663        sign: libc::c_int,
664    );
665    pub fn fmpz_CRT(
666        out: *mut fmpz,
667        r1: *const fmpz,
668        m1: *const fmpz,
669        r2: *const fmpz,
670        m2: *const fmpz,
671        sign: libc::c_int,
672    );
673    pub fn fmpz_multi_CRT_init(CRT: *mut fmpz_multi_CRT_struct);
674    pub fn fmpz_multi_CRT_clear(P: *mut fmpz_multi_CRT_struct);
675    pub fn _fmpz_multi_CRT_precomp(
676        outputs: *mut fmpz,
677        P: *const fmpz_multi_CRT_struct,
678        inputs: *const fmpz,
679        sign: libc::c_int,
680    );
681    pub fn fmpz_multi_CRT_precomp(
682        output: *mut fmpz,
683        P: *const fmpz_multi_CRT_struct,
684        inputs: *const fmpz,
685        sign: libc::c_int,
686    );
687    pub fn fmpz_multi_CRT_precompute(
688        CRT: *mut fmpz_multi_CRT_struct,
689        moduli: *const fmpz,
690        len: slong,
691    ) -> libc::c_int;
692    pub fn fmpz_multi_CRT(
693        output: *mut fmpz,
694        moduli: *const fmpz,
695        values: *const fmpz,
696        len: slong,
697        sign: libc::c_int,
698    ) -> libc::c_int;
699    pub fn fmpz_multi_mod_init(P: *mut fmpz_multi_mod_struct);
700    pub fn fmpz_multi_mod_clear(P: *mut fmpz_multi_mod_struct);
701    pub fn fmpz_multi_mod_precompute(
702        P: *mut fmpz_multi_mod_struct,
703        f: *const fmpz,
704        r: slong,
705    ) -> libc::c_int;
706    pub fn _fmpz_multi_mod_precomp(
707        outputs: *mut fmpz,
708        P: *const fmpz_multi_mod_struct,
709        input: *const fmpz,
710        sign: libc::c_int,
711        tmp: *mut fmpz,
712    );
713    pub fn fmpz_multi_mod_precomp(
714        outputs: *mut fmpz,
715        P: *const fmpz_multi_mod_struct,
716        input: *const fmpz,
717        sign: libc::c_int,
718    );
719    pub fn fmpz_comb_temp_init(CT: *mut fmpz_comb_temp_struct, C: *const fmpz_comb_struct);
720    pub fn fmpz_comb_temp_clear(CT: *mut fmpz_comb_temp_struct);
721    pub fn fmpz_comb_init(C: *mut fmpz_comb_struct, primes: nn_srcptr, num_primes: slong);
722    pub fn fmpz_comb_clear(C: *mut fmpz_comb_struct);
723    pub fn fmpz_multi_mod_ui(
724        out: *mut ulong,
725        in_: *const fmpz,
726        C: *const fmpz_comb_struct,
727        CT: *mut fmpz_comb_temp_struct,
728    );
729    pub fn fmpz_multi_CRT_ui(
730        output: *mut fmpz,
731        residues: nn_srcptr,
732        comb: *const fmpz_comb_struct,
733        temp: *mut fmpz_comb_temp_struct,
734        sign: libc::c_int,
735    );
736    pub fn fmpz_lucas_chain(
737        Vm: *mut fmpz,
738        Vm1: *mut fmpz,
739        A: *const fmpz,
740        m: *const fmpz,
741        n: *const fmpz,
742    );
743    pub fn fmpz_lucas_chain_full(
744        Vm: *mut fmpz,
745        Vm1: *mut fmpz,
746        A: *const fmpz,
747        B: *const fmpz,
748        m: *const fmpz,
749        n: *const fmpz,
750    );
751    pub fn fmpz_lucas_chain_double(
752        U2m: *mut fmpz,
753        U2m1: *mut fmpz,
754        Um: *const fmpz,
755        Um1: *const fmpz,
756        A: *const fmpz,
757        B: *const fmpz,
758        n: *const fmpz,
759    );
760    pub fn fmpz_lucas_chain_add(
761        Umn: *mut fmpz,
762        Umn1: *mut fmpz,
763        Um: *const fmpz,
764        Um1: *const fmpz,
765        Un: *const fmpz,
766        Un1: *const fmpz,
767        A: *const fmpz,
768        B: *const fmpz,
769        n: *const fmpz,
770    );
771    pub fn fmpz_lucas_chain_mul(
772        Ukm: *mut fmpz,
773        Ukm1: *mut fmpz,
774        Um: *const fmpz,
775        Um1: *const fmpz,
776        A: *const fmpz,
777        B: *const fmpz,
778        k: *const fmpz,
779        n: *const fmpz,
780    );
781    pub fn fmpz_lucas_chain_VtoU(
782        Um: *mut fmpz,
783        Um1: *mut fmpz,
784        Vm: *const fmpz,
785        Vm1: *const fmpz,
786        A: *const fmpz,
787        UNUSED_B: *const fmpz,
788        Dinv: *const fmpz,
789        n: *const fmpz,
790    );
791    pub fn fmpz_is_probabprime_lucas(n: *const fmpz) -> libc::c_int;
792    pub fn fmpz_is_probabprime_BPSW(n: *const fmpz) -> libc::c_int;
793    pub fn fmpz_is_probabprime(p: *const fmpz) -> libc::c_int;
794    pub fn fmpz_is_strong_probabprime(n: *const fmpz, a: *const fmpz) -> libc::c_int;
795    pub fn fmpz_is_prime_pseudosquare(n: *const fmpz) -> libc::c_int;
796    pub fn fmpz_is_prime_pocklington(
797        F: *mut fmpz,
798        R: *mut fmpz,
799        n: *const fmpz,
800        pm1: nn_ptr,
801        num_pm1: slong,
802    ) -> libc::c_int;
803    pub fn fmpz_is_prime_morrison(
804        F: *mut fmpz,
805        R: *mut fmpz,
806        n: *const fmpz,
807        pm1: nn_ptr,
808        num_pm1: slong,
809    ) -> libc::c_int;
810    pub fn fmpz_is_prime(p: *const fmpz) -> libc::c_int;
811    pub fn fmpz_nextprime(res: *mut fmpz, n: *const fmpz, proved: libc::c_int);
812    pub fn _fmpz_nm1_trial_factors(n: *const fmpz, pm1: nn_ptr, num_pm1: *mut slong, limit: ulong);
813    pub fn _fmpz_np1_trial_factors(n: *const fmpz, pp1: nn_ptr, num_pp1: *mut slong, limit: ulong);
814    pub fn fmpz_divisor_in_residue_class_lenstra(
815        fac: *mut fmpz,
816        n: *const fmpz,
817        r: *const fmpz,
818        s: *const fmpz,
819    ) -> libc::c_int;
820    pub fn fmpz_primorial(res: *mut fmpz, n: ulong);
821    pub fn fmpz_euler_phi(res: *mut fmpz, n: *const fmpz);
822    pub fn fmpz_moebius_mu(n: *const fmpz) -> libc::c_int;
823    pub fn fmpz_divisor_sigma(res: *mut fmpz, k: ulong, n: *const fmpz);
824}