flint-sys 0.9.0

Bindings to the FLINT C library
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
/* automatically generated by rust-bindgen 0.70.1 */

use crate::deps::*;
use crate::flint::*;
use crate::limb_types::*;


#[repr(C)]
pub struct __BindgenUnionField<T>(::std::marker::PhantomData<T>);
impl<T> __BindgenUnionField<T> {
    #[inline]
    pub const fn new() -> Self {
        __BindgenUnionField(::std::marker::PhantomData)
    }
    #[inline]
    pub unsafe fn as_ref(&self) -> &T {
        ::std::mem::transmute(self)
    }
    #[inline]
    pub unsafe fn as_mut(&mut self) -> &mut T {
        ::std::mem::transmute(self)
    }
}
impl<T> ::std::default::Default for __BindgenUnionField<T> {
    #[inline]
    fn default() -> Self {
        Self::new()
    }
}
impl<T> ::std::clone::Clone for __BindgenUnionField<T> {
    #[inline]
    fn clone(&self) -> Self {
        *self
    }
}
impl<T> ::std::marker::Copy for __BindgenUnionField<T> {}
impl<T> ::std::fmt::Debug for __BindgenUnionField<T> {
    fn fmt(&self, fmt: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        fmt.write_str("__BindgenUnionField")
    }
}
impl<T> ::std::hash::Hash for __BindgenUnionField<T> {
    fn hash<H: ::std::hash::Hasher>(&self, _state: &mut H) {}
}
impl<T> ::std::cmp::PartialEq for __BindgenUnionField<T> {
    fn eq(&self, _other: &__BindgenUnionField<T>) -> bool {
        true
    }
}
impl<T> ::std::cmp::Eq for __BindgenUnionField<T> {}
pub const DLOG_SMALL_LIM: u32 = 50;
pub const DLOG_TABLE_LIM: u32 = 50;
pub const DLOG_TABLE_P_LIM: u32 = 50;
pub const DLOG_TABLE_MODPE_LIM: u32 = 50;
pub const DLOG_TABLE_PE_LIM: u32 = 50;
pub const DLOG_TABLE_N_LIM: u32 = 50;
pub const DLOG_BSGS_LIM: u32 = 500;
pub const DLOG_LOOP_MAX_FACTOR: u32 = 6;
pub const DLOG_G_SMALL: u32 = 0;
pub const DLOG_G_BIG: u32 = 1;
pub const DLOG_MODPE: _bindgen_ty_2 = 0;
pub const DLOG_CRT: _bindgen_ty_2 = 1;
pub const DLOG_POWER: _bindgen_ty_2 = 2;
pub const DLOG_BSGS: _bindgen_ty_2 = 3;
pub const DLOG_TABLE: _bindgen_ty_2 = 4;
pub const DLOG_23: _bindgen_ty_2 = 5;
pub type _bindgen_ty_2 = libc::c_uint;
pub type dlog_preconn_ptr = *mut dlog_precomp_struct;
#[repr(C)]
pub struct dlog_1modpe_struct {
    pub inv1p: ulong,
    pub invloga1: ulong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of dlog_1modpe_struct"][::std::mem::size_of::<dlog_1modpe_struct>() - 16usize];
    ["Alignment of dlog_1modpe_struct"][::std::mem::align_of::<dlog_1modpe_struct>() - 8usize];
    ["Offset of field: dlog_1modpe_struct::inv1p"]
        [::std::mem::offset_of!(dlog_1modpe_struct, inv1p) - 0usize];
    ["Offset of field: dlog_1modpe_struct::invloga1"]
        [::std::mem::offset_of!(dlog_1modpe_struct, invloga1) - 8usize];
};
impl Default for dlog_1modpe_struct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type dlog_1modpe_t = [dlog_1modpe_struct; 1usize];
#[repr(C)]
pub struct dlog_modpe_struct {
    pub p: ulong,
    pub e: ulong,
    pub pe1: ulong,
    pub inva: ulong,
    pub pe: nmod_t,
    pub modp: *mut dlog_precomp_struct,
    pub modpe: dlog_1modpe_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of dlog_modpe_struct"][::std::mem::size_of::<dlog_modpe_struct>() - 80usize];
    ["Alignment of dlog_modpe_struct"][::std::mem::align_of::<dlog_modpe_struct>() - 8usize];
    ["Offset of field: dlog_modpe_struct::p"]
        [::std::mem::offset_of!(dlog_modpe_struct, p) - 0usize];
    ["Offset of field: dlog_modpe_struct::e"]
        [::std::mem::offset_of!(dlog_modpe_struct, e) - 8usize];
    ["Offset of field: dlog_modpe_struct::pe1"]
        [::std::mem::offset_of!(dlog_modpe_struct, pe1) - 16usize];
    ["Offset of field: dlog_modpe_struct::inva"]
        [::std::mem::offset_of!(dlog_modpe_struct, inva) - 24usize];
    ["Offset of field: dlog_modpe_struct::pe"]
        [::std::mem::offset_of!(dlog_modpe_struct, pe) - 32usize];
    ["Offset of field: dlog_modpe_struct::modp"]
        [::std::mem::offset_of!(dlog_modpe_struct, modp) - 56usize];
    ["Offset of field: dlog_modpe_struct::modpe"]
        [::std::mem::offset_of!(dlog_modpe_struct, modpe) - 64usize];
};
impl Default for dlog_modpe_struct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type dlog_modpe_t = [dlog_modpe_struct; 1usize];
#[repr(C)]
pub struct dlog_table_struct {
    pub mod_: ulong,
    pub table: *mut ulong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of dlog_table_struct"][::std::mem::size_of::<dlog_table_struct>() - 16usize];
    ["Alignment of dlog_table_struct"][::std::mem::align_of::<dlog_table_struct>() - 8usize];
    ["Offset of field: dlog_table_struct::mod_"]
        [::std::mem::offset_of!(dlog_table_struct, mod_) - 0usize];
    ["Offset of field: dlog_table_struct::table"]
        [::std::mem::offset_of!(dlog_table_struct, table) - 8usize];
};
impl Default for dlog_table_struct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type dlog_table_t = [dlog_table_struct; 1usize];
#[repr(C)]
pub struct apow {
    pub k: ulong,
    pub ak: ulong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of apow"][::std::mem::size_of::<apow>() - 16usize];
    ["Alignment of apow"][::std::mem::align_of::<apow>() - 8usize];
    ["Offset of field: apow::k"][::std::mem::offset_of!(apow, k) - 0usize];
    ["Offset of field: apow::ak"][::std::mem::offset_of!(apow, ak) - 8usize];
};
impl Default for apow {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type apow_t = apow;
#[repr(C)]
pub struct dlog_bsgs_struct {
    pub mod_: nmod_t,
    pub m: ulong,
    pub am: ulong,
    pub g: ulong,
    pub table: *mut apow_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of dlog_bsgs_struct"][::std::mem::size_of::<dlog_bsgs_struct>() - 56usize];
    ["Alignment of dlog_bsgs_struct"][::std::mem::align_of::<dlog_bsgs_struct>() - 8usize];
    ["Offset of field: dlog_bsgs_struct::mod_"]
        [::std::mem::offset_of!(dlog_bsgs_struct, mod_) - 0usize];
    ["Offset of field: dlog_bsgs_struct::m"][::std::mem::offset_of!(dlog_bsgs_struct, m) - 24usize];
    ["Offset of field: dlog_bsgs_struct::am"]
        [::std::mem::offset_of!(dlog_bsgs_struct, am) - 32usize];
    ["Offset of field: dlog_bsgs_struct::g"][::std::mem::offset_of!(dlog_bsgs_struct, g) - 40usize];
    ["Offset of field: dlog_bsgs_struct::table"]
        [::std::mem::offset_of!(dlog_bsgs_struct, table) - 48usize];
};
impl Default for dlog_bsgs_struct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type dlog_bsgs_t = [dlog_bsgs_struct; 1usize];
#[repr(C)]
pub struct dlog_rho_struct {
    pub a: ulong,
    pub n: nmod_t,
    pub mod_: nmod_t,
    pub nisprime: libc::c_int,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of dlog_rho_struct"][::std::mem::size_of::<dlog_rho_struct>() - 64usize];
    ["Alignment of dlog_rho_struct"][::std::mem::align_of::<dlog_rho_struct>() - 8usize];
    ["Offset of field: dlog_rho_struct::a"][::std::mem::offset_of!(dlog_rho_struct, a) - 0usize];
    ["Offset of field: dlog_rho_struct::n"][::std::mem::offset_of!(dlog_rho_struct, n) - 8usize];
    ["Offset of field: dlog_rho_struct::mod_"]
        [::std::mem::offset_of!(dlog_rho_struct, mod_) - 32usize];
    ["Offset of field: dlog_rho_struct::nisprime"]
        [::std::mem::offset_of!(dlog_rho_struct, nisprime) - 56usize];
};
impl Default for dlog_rho_struct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type dlog_rho_t = [dlog_rho_struct; 1usize];
#[repr(C)]
pub struct dlog_crt_struct {
    pub mod_: nmod_t,
    pub n: nmod_t,
    pub num: ulong,
    pub expo: *mut ulong,
    pub crt_coeffs: *mut ulong,
    pub pre: dlog_preconn_ptr,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of dlog_crt_struct"][::std::mem::size_of::<dlog_crt_struct>() - 80usize];
    ["Alignment of dlog_crt_struct"][::std::mem::align_of::<dlog_crt_struct>() - 8usize];
    ["Offset of field: dlog_crt_struct::mod_"]
        [::std::mem::offset_of!(dlog_crt_struct, mod_) - 0usize];
    ["Offset of field: dlog_crt_struct::n"][::std::mem::offset_of!(dlog_crt_struct, n) - 24usize];
    ["Offset of field: dlog_crt_struct::num"]
        [::std::mem::offset_of!(dlog_crt_struct, num) - 48usize];
    ["Offset of field: dlog_crt_struct::expo"]
        [::std::mem::offset_of!(dlog_crt_struct, expo) - 56usize];
    ["Offset of field: dlog_crt_struct::crt_coeffs"]
        [::std::mem::offset_of!(dlog_crt_struct, crt_coeffs) - 64usize];
    ["Offset of field: dlog_crt_struct::pre"]
        [::std::mem::offset_of!(dlog_crt_struct, pre) - 72usize];
};
impl Default for dlog_crt_struct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type dlog_crt_t = [dlog_crt_struct; 1usize];
#[repr(C)]
pub struct dlog_power_struct {
    pub mod_: nmod_t,
    pub p: ulong,
    pub e: ulong,
    pub apk: *mut ulong,
    pub pre: *mut dlog_precomp_struct,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of dlog_power_struct"][::std::mem::size_of::<dlog_power_struct>() - 56usize];
    ["Alignment of dlog_power_struct"][::std::mem::align_of::<dlog_power_struct>() - 8usize];
    ["Offset of field: dlog_power_struct::mod_"]
        [::std::mem::offset_of!(dlog_power_struct, mod_) - 0usize];
    ["Offset of field: dlog_power_struct::p"]
        [::std::mem::offset_of!(dlog_power_struct, p) - 24usize];
    ["Offset of field: dlog_power_struct::e"]
        [::std::mem::offset_of!(dlog_power_struct, e) - 32usize];
    ["Offset of field: dlog_power_struct::apk"]
        [::std::mem::offset_of!(dlog_power_struct, apk) - 40usize];
    ["Offset of field: dlog_power_struct::pre"]
        [::std::mem::offset_of!(dlog_power_struct, pre) - 48usize];
};
impl Default for dlog_power_struct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type dlog_power_t = [dlog_power_struct; 1usize];
pub type dlog_order23_t = [ulong; 1usize];
#[repr(C)]
pub struct dlog_precomp_struct {
    pub type_: libc::c_int,
    pub cost: ulong,
    pub t: dlog_precomp_struct__bindgen_ty_1,
}
#[repr(C)]
pub struct dlog_precomp_struct__bindgen_ty_1 {
    pub table: __BindgenUnionField<dlog_table_t>,
    pub bsgs: __BindgenUnionField<dlog_bsgs_t>,
    pub crt: __BindgenUnionField<dlog_crt_t>,
    pub power: __BindgenUnionField<dlog_power_t>,
    pub modpe: __BindgenUnionField<dlog_modpe_t>,
    pub order23: __BindgenUnionField<dlog_order23_t>,
    pub bindgen_union_field: [u64; 10usize],
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of dlog_precomp_struct__bindgen_ty_1"]
        [::std::mem::size_of::<dlog_precomp_struct__bindgen_ty_1>() - 80usize];
    ["Alignment of dlog_precomp_struct__bindgen_ty_1"]
        [::std::mem::align_of::<dlog_precomp_struct__bindgen_ty_1>() - 8usize];
    ["Offset of field: dlog_precomp_struct__bindgen_ty_1::table"]
        [::std::mem::offset_of!(dlog_precomp_struct__bindgen_ty_1, table) - 0usize];
    ["Offset of field: dlog_precomp_struct__bindgen_ty_1::bsgs"]
        [::std::mem::offset_of!(dlog_precomp_struct__bindgen_ty_1, bsgs) - 0usize];
    ["Offset of field: dlog_precomp_struct__bindgen_ty_1::crt"]
        [::std::mem::offset_of!(dlog_precomp_struct__bindgen_ty_1, crt) - 0usize];
    ["Offset of field: dlog_precomp_struct__bindgen_ty_1::power"]
        [::std::mem::offset_of!(dlog_precomp_struct__bindgen_ty_1, power) - 0usize];
    ["Offset of field: dlog_precomp_struct__bindgen_ty_1::modpe"]
        [::std::mem::offset_of!(dlog_precomp_struct__bindgen_ty_1, modpe) - 0usize];
    ["Offset of field: dlog_precomp_struct__bindgen_ty_1::order23"]
        [::std::mem::offset_of!(dlog_precomp_struct__bindgen_ty_1, order23) - 0usize];
};
impl Default for dlog_precomp_struct__bindgen_ty_1 {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of dlog_precomp_struct"][::std::mem::size_of::<dlog_precomp_struct>() - 96usize];
    ["Alignment of dlog_precomp_struct"][::std::mem::align_of::<dlog_precomp_struct>() - 8usize];
    ["Offset of field: dlog_precomp_struct::type_"]
        [::std::mem::offset_of!(dlog_precomp_struct, type_) - 0usize];
    ["Offset of field: dlog_precomp_struct::cost"]
        [::std::mem::offset_of!(dlog_precomp_struct, cost) - 8usize];
    ["Offset of field: dlog_precomp_struct::t"]
        [::std::mem::offset_of!(dlog_precomp_struct, t) - 16usize];
};
impl Default for dlog_precomp_struct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type dlog_precomp_t = [dlog_precomp_struct; 1usize];
extern "C" {
    pub fn apow_cmp(x: *const apow_t, y: *const apow_t) -> libc::c_int;
    pub fn dlog_precomp_modpe_init(
        pre: *mut dlog_precomp_struct,
        a: ulong,
        p: ulong,
        e: ulong,
        pe: ulong,
        num: ulong,
    );
    pub fn dlog_precomp_small_init(
        pre: *mut dlog_precomp_struct,
        a: ulong,
        mod_: ulong,
        n: ulong,
        num: ulong,
    );
    pub fn dlog_precomp_n_init(
        pre: *mut dlog_precomp_struct,
        a: ulong,
        mod_: ulong,
        n: ulong,
        num: ulong,
    );
    pub fn dlog_precomp_p_init(
        pre: *mut dlog_precomp_struct,
        a: ulong,
        mod_: ulong,
        p: ulong,
        num: ulong,
    );
    pub fn dlog_precomp_pe_init(
        pre: *mut dlog_precomp_struct,
        a: ulong,
        mod_: ulong,
        p: ulong,
        e: ulong,
        pe: ulong,
        num: ulong,
    );
    pub fn dlog_precomp_clear(pre: *mut dlog_precomp_struct);
    pub fn dlog_precomp(pre: *const dlog_precomp_struct, b: ulong) -> ulong;
    pub fn dlog_order23_init(t: *mut ulong, a: ulong) -> ulong;
    pub fn dlog_table_init(t: *mut dlog_table_struct, a: ulong, mod_: ulong) -> ulong;
    pub fn dlog_crt_init(
        t: *mut dlog_crt_struct,
        a: ulong,
        mod_: ulong,
        n: ulong,
        num: ulong,
    ) -> ulong;
    pub fn dlog_power_init(
        t: *mut dlog_power_struct,
        a: ulong,
        mod_: ulong,
        p: ulong,
        e: ulong,
        num: ulong,
    ) -> ulong;
    pub fn dlog_modpe_init(
        t: *mut dlog_modpe_struct,
        a: ulong,
        p: ulong,
        e: ulong,
        pe: ulong,
        num: ulong,
    ) -> ulong;
    pub fn dlog_bsgs_init(
        t: *mut dlog_bsgs_struct,
        a: ulong,
        mod_: ulong,
        n: ulong,
        m: ulong,
    ) -> ulong;
    pub fn dlog_1modpe_init(t: *mut dlog_1modpe_struct, a1: ulong, p: ulong, e: ulong, pe: nmod_t);
    pub fn dlog_rho_init(t: *mut dlog_rho_struct, a: ulong, mod_: ulong, n: ulong);
    pub fn dlog_once(b: ulong, a: ulong, mod_: nmod_t, n: ulong) -> ulong;
    #[link_name = "dlog_order23_clear__extern"]
    pub fn dlog_order23_clear(t: *mut ulong);
    #[link_name = "dlog_table_clear__extern"]
    pub fn dlog_table_clear(t: *mut dlog_table_struct);
    pub fn dlog_crt_clear(t: *mut dlog_crt_struct);
    #[link_name = "dlog_power_clear__extern"]
    pub fn dlog_power_clear(t: *mut dlog_power_struct);
    #[link_name = "dlog_modpe_clear__extern"]
    pub fn dlog_modpe_clear(t: *mut dlog_modpe_struct);
    #[link_name = "dlog_bsgs_clear__extern"]
    pub fn dlog_bsgs_clear(t: *mut dlog_bsgs_struct);
    #[link_name = "dlog_rho_clear__extern"]
    pub fn dlog_rho_clear(t: *mut dlog_rho_struct);
    #[link_name = "dlog_bsgs_size__extern"]
    pub fn dlog_bsgs_size(n: ulong, num: ulong) -> ulong;
    pub fn dlog_order23(t: *const ulong, b: ulong) -> ulong;
    pub fn dlog_table(t: *const dlog_table_struct, b: ulong) -> ulong;
    pub fn dlog_crt(t: *const dlog_crt_struct, b: ulong) -> ulong;
    pub fn dlog_power(t: *const dlog_power_struct, b: ulong) -> ulong;
    pub fn dlog_modpe(t: *const dlog_modpe_struct, b: ulong) -> ulong;
    pub fn dlog_bsgs(t: *const dlog_bsgs_struct, b: ulong) -> ulong;
    pub fn dlog_rho(t: *const dlog_rho_struct, b: ulong) -> ulong;
    pub fn dlog_1modpe_1modp(b1: ulong, p: ulong, e: ulong, inv1p: ulong, pe: nmod_t) -> ulong;
    pub fn dlog_1modpe(
        t: *const dlog_1modpe_struct,
        b1: ulong,
        p: ulong,
        e: ulong,
        pe: nmod_t,
    ) -> ulong;
    pub fn dlog_mod2e_1mod4(b1: ulong, e: ulong, inva: ulong, pe: nmod_t) -> ulong;
    pub fn dlog_mod2e(t: *const dlog_modpe_struct, b: ulong) -> ulong;
    pub fn dlog_n_factor_group(fac: *mut n_factor_t, bound: ulong);
    pub fn dlog_vec_pindex_factorgcd(
        v: *mut ulong,
        nv: ulong,
        p: ulong,
        mod_: nmod_t,
        a: ulong,
        na: ulong,
        loga: ulong,
        logm1: ulong,
        order: nmod_t,
        maxtry: libc::c_int,
    ) -> ulong;
    pub fn dlog_vec_fill(v: *mut ulong, nv: ulong, x: ulong);
    pub fn dlog_vec_set_not_found(v: *mut ulong, nv: ulong, mod_: nmod_t);
    pub fn dlog_vec_loop(
        v: *mut ulong,
        nv: ulong,
        a: ulong,
        va: ulong,
        mod_: nmod_t,
        na: ulong,
        order: nmod_t,
    );
    pub fn dlog_vec_loop_add(
        v: *mut ulong,
        nv: ulong,
        a: ulong,
        va: ulong,
        mod_: nmod_t,
        na: ulong,
        order: nmod_t,
    );
    pub fn dlog_vec_eratos_add(
        v: *mut ulong,
        nv: ulong,
        a: ulong,
        va: ulong,
        mod_: nmod_t,
        na: ulong,
        order: nmod_t,
    );
    pub fn dlog_vec_eratos(
        v: *mut ulong,
        nv: ulong,
        a: ulong,
        va: ulong,
        mod_: nmod_t,
        na: ulong,
        order: nmod_t,
    );
    pub fn dlog_vec_sieve_add(
        v: *mut ulong,
        nv: ulong,
        a: ulong,
        va: ulong,
        mod_: nmod_t,
        na: ulong,
        order: nmod_t,
    );
    pub fn dlog_vec_sieve(
        v: *mut ulong,
        nv: ulong,
        a: ulong,
        va: ulong,
        mod_: nmod_t,
        na: ulong,
        order: nmod_t,
    );
    pub fn dlog_vec_add(
        v: *mut ulong,
        nv: ulong,
        a: ulong,
        va: ulong,
        mod_: nmod_t,
        na: ulong,
        order: nmod_t,
    );
    pub fn dlog_vec(
        v: *mut ulong,
        nv: ulong,
        a: ulong,
        va: ulong,
        mod_: nmod_t,
        na: ulong,
        order: nmod_t,
    );
    pub fn dlog_vec_sieve_precomp(
        v: *mut ulong,
        nv: ulong,
        pre: *mut dlog_precomp_struct,
        a: ulong,
        va: ulong,
        mod_: nmod_t,
        na: ulong,
        order: nmod_t,
    );
    pub fn dlog_vec_sieve_add_precomp(
        v: *mut ulong,
        nv: ulong,
        pre: *mut dlog_precomp_struct,
        a: ulong,
        va: ulong,
        mod_: nmod_t,
        na: ulong,
        order: nmod_t,
    );
    pub fn dlog_vec_add_precomp(
        v: *mut ulong,
        nv: ulong,
        pre: *mut dlog_precomp_struct,
        a: ulong,
        va: ulong,
        mod_: nmod_t,
        na: ulong,
        order: nmod_t,
    );
}