use libc::*;
use crate::deps::*;
use crate::flint::*;
use crate::fmpz_mod_types::*;
use crate::fmpz_types::*;
use crate::nmod_types::*;
use crate::padic_types::*;
pub type qadic_t = padic_poly_t;
pub type qadic_struct = padic_poly_struct;
#[repr(C)]
pub struct qadic_ctx_struct {
pub pctx: padic_ctx_struct,
pub a: *mut fmpz,
pub j: *mut slong,
pub len: slong,
pub var: *mut libc::c_char,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
["Size of qadic_ctx_struct"][::std::mem::size_of::<qadic_ctx_struct>() - 80usize];
["Alignment of qadic_ctx_struct"][::std::mem::align_of::<qadic_ctx_struct>() - 8usize];
["Offset of field: qadic_ctx_struct::pctx"]
[::std::mem::offset_of!(qadic_ctx_struct, pctx) - 0usize];
["Offset of field: qadic_ctx_struct::a"][::std::mem::offset_of!(qadic_ctx_struct, a) - 48usize];
["Offset of field: qadic_ctx_struct::j"][::std::mem::offset_of!(qadic_ctx_struct, j) - 56usize];
["Offset of field: qadic_ctx_struct::len"]
[::std::mem::offset_of!(qadic_ctx_struct, len) - 64usize];
["Offset of field: qadic_ctx_struct::var"]
[::std::mem::offset_of!(qadic_ctx_struct, var) - 72usize];
};
impl Default for qadic_ctx_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 qadic_ctx_t = [qadic_ctx_struct; 1usize];
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct qadic2_sqrt_precomp {
_unused: [u8; 0],
}
extern "C" {
#[link_name = "qadic_val__extern"]
pub fn qadic_val(op: *const padic_poly_struct) -> slong;
#[link_name = "qadic_prec__extern"]
pub fn qadic_prec(op: *const padic_poly_struct) -> slong;
pub fn _qadic_ctx_init_conway_ui(
ctx: *mut qadic_ctx_struct,
p: ulong,
d: slong,
min: slong,
max: slong,
var: *const libc::c_char,
mode: padic_print_mode,
) -> libc::c_int;
pub fn qadic_ctx_init_conway(
ctx: *mut qadic_ctx_struct,
p: *const fmpz,
d: slong,
min: slong,
max: slong,
var: *const libc::c_char,
mode: padic_print_mode,
);
pub fn qadic_ctx_init_modulus(
ctx: *mut qadic_ctx_struct,
p: *const fmpz,
modulus: *const fmpz_mod_poly_struct,
min: slong,
max: slong,
var: *const libc::c_char,
mode: padic_print_mode,
);
pub fn qadic_ctx_init_modulus_nmod(
ctx: *mut qadic_ctx_struct,
p: ulong,
modulus: *const nmod_poly_struct,
min: slong,
max: slong,
var: *const libc::c_char,
mode: padic_print_mode,
);
pub fn qadic_ctx_init(
ctx: *mut qadic_ctx_struct,
p: *const fmpz,
d: slong,
min: slong,
max: slong,
var: *const libc::c_char,
mode: padic_print_mode,
);
pub fn qadic_ctx_clear(ctx: *mut qadic_ctx_struct);
#[link_name = "qadic_ctx_degree__extern"]
pub fn qadic_ctx_degree(ctx: *const qadic_ctx_struct) -> slong;
#[link_name = "qadic_ctx_print__extern"]
pub fn qadic_ctx_print(ctx: *const qadic_ctx_struct);
#[link_name = "qadic_init__extern"]
pub fn qadic_init(x: *mut padic_poly_struct);
#[link_name = "qadic_init2__extern"]
pub fn qadic_init2(rop: *mut padic_poly_struct, prec: slong);
#[link_name = "qadic_clear__extern"]
pub fn qadic_clear(x: *mut padic_poly_struct);
#[link_name = "_fmpz_poly_reduce__extern"]
pub fn _fmpz_poly_reduce(
R: *mut fmpz,
lenR: slong,
a: *const fmpz,
j: *const slong,
len: slong,
);
#[link_name = "_fmpz_mod_poly_reduce__extern"]
pub fn _fmpz_mod_poly_reduce(
R: *mut fmpz,
lenR: slong,
a: *const fmpz,
j: *const slong,
len: slong,
p: *const fmpz,
);
#[link_name = "qadic_reduce__extern"]
pub fn qadic_reduce(x: *mut padic_poly_struct, ctx: *const qadic_ctx_struct);
#[link_name = "qadic_randtest__extern"]
pub fn qadic_randtest(
x: *mut padic_poly_struct,
state: *mut flint_rand_struct,
ctx: *const qadic_ctx_struct,
);
#[link_name = "qadic_randtest_not_zero__extern"]
pub fn qadic_randtest_not_zero(
x: *mut padic_poly_struct,
state: *mut flint_rand_struct,
ctx: *const qadic_ctx_struct,
);
#[link_name = "qadic_randtest_val__extern"]
pub fn qadic_randtest_val(
x: *mut padic_poly_struct,
state: *mut flint_rand_struct,
val: slong,
ctx: *const qadic_ctx_struct,
);
#[link_name = "qadic_randtest_int__extern"]
pub fn qadic_randtest_int(
x: *mut padic_poly_struct,
state: *mut flint_rand_struct,
ctx: *const qadic_ctx_struct,
);
#[link_name = "qadic_zero__extern"]
pub fn qadic_zero(op: *mut padic_poly_struct);
#[link_name = "qadic_one__extern"]
pub fn qadic_one(op: *mut padic_poly_struct);
#[link_name = "qadic_gen__extern"]
pub fn qadic_gen(x: *mut padic_poly_struct, ctx: *const qadic_ctx_struct);
#[link_name = "qadic_set_ui__extern"]
pub fn qadic_set_ui(rop: *mut padic_poly_struct, op: ulong, ctx: *const qadic_ctx_struct);
#[link_name = "qadic_get_padic__extern"]
pub fn qadic_get_padic(
rop: *mut padic_struct,
op: *const padic_poly_struct,
ctx: *const qadic_ctx_struct,
) -> libc::c_int;
#[link_name = "qadic_set__extern"]
pub fn qadic_set(
rop: *mut padic_poly_struct,
op: *const padic_poly_struct,
ctx: *const qadic_ctx_struct,
);
pub fn qadic_set_fmpz_poly(
rop: *mut padic_poly_struct,
op: *const fmpz_poly_struct,
ctx: *const qadic_ctx_struct,
);
#[link_name = "qadic_is_zero__extern"]
pub fn qadic_is_zero(op: *const padic_poly_struct) -> libc::c_int;
#[link_name = "qadic_is_one__extern"]
pub fn qadic_is_one(op: *const padic_poly_struct) -> libc::c_int;
#[link_name = "qadic_equal__extern"]
pub fn qadic_equal(op1: *const padic_poly_struct, op2: *const padic_poly_struct)
-> libc::c_int;
#[link_name = "qadic_add__extern"]
pub fn qadic_add(
x: *mut padic_poly_struct,
y: *const padic_poly_struct,
z: *const padic_poly_struct,
ctx: *const qadic_ctx_struct,
);
#[link_name = "qadic_sub__extern"]
pub fn qadic_sub(
x: *mut padic_poly_struct,
y: *const padic_poly_struct,
z: *const padic_poly_struct,
ctx: *const qadic_ctx_struct,
);
#[link_name = "qadic_neg__extern"]
pub fn qadic_neg(
x: *mut padic_poly_struct,
y: *const padic_poly_struct,
ctx: *const qadic_ctx_struct,
);
pub fn qadic_mul(
x: *mut padic_poly_struct,
y: *const padic_poly_struct,
z: *const padic_poly_struct,
ctx: *const qadic_ctx_struct,
);
pub fn _qadic_inv(
rop: *mut fmpz,
op: *const fmpz,
len: slong,
a: *const fmpz,
j: *const slong,
lena: slong,
p: *const fmpz,
N: slong,
);
pub fn qadic_inv(
x: *mut padic_poly_struct,
y: *const padic_poly_struct,
ctx: *const qadic_ctx_struct,
);
pub fn _qadic_pow(
rop: *mut fmpz,
op: *const fmpz,
len: slong,
e: *const fmpz,
a: *const fmpz,
j: *const slong,
lena: slong,
p: *const fmpz,
);
pub fn qadic_pow(
x: *mut padic_poly_struct,
y: *const padic_poly_struct,
e: *const fmpz,
ctx: *const qadic_ctx_struct,
);
pub fn _qadic_exp_rectangular(
rop: *mut fmpz,
op: *const fmpz,
v: slong,
len: slong,
a: *const fmpz,
j: *const slong,
lena: slong,
p: *const fmpz,
N: slong,
pN: *const fmpz,
);
pub fn qadic_exp_rectangular(
rop: *mut padic_poly_struct,
op: *const padic_poly_struct,
ctx: *const qadic_ctx_struct,
) -> libc::c_int;
pub fn _qadic_exp_balanced(
rop: *mut fmpz,
op: *const fmpz,
v: slong,
len: slong,
a: *const fmpz,
j: *const slong,
lena: slong,
p: *const fmpz,
N: slong,
pN: *const fmpz,
);
pub fn qadic_exp_balanced(
rop: *mut padic_poly_struct,
op: *const padic_poly_struct,
ctx: *const qadic_ctx_struct,
) -> libc::c_int;
pub fn _qadic_exp(
rop: *mut fmpz,
op: *const fmpz,
v: slong,
len: slong,
a: *const fmpz,
j: *const slong,
lena: slong,
p: *const fmpz,
N: slong,
pN: *const fmpz,
);
pub fn qadic_exp(
rop: *mut padic_poly_struct,
op: *const padic_poly_struct,
ctx: *const qadic_ctx_struct,
) -> libc::c_int;
pub fn _qadic_log_rectangular(
z: *mut fmpz,
y: *const fmpz,
v: slong,
len: slong,
a: *const fmpz,
j: *const slong,
lena: slong,
p: *const fmpz,
N: slong,
pN: *const fmpz,
);
pub fn qadic_log_rectangular(
rop: *mut padic_poly_struct,
op: *const padic_poly_struct,
ctx: *const qadic_ctx_struct,
) -> libc::c_int;
pub fn _qadic_log_balanced(
z: *mut fmpz,
y: *const fmpz,
len: slong,
a: *const fmpz,
j: *const slong,
lena: slong,
p: *const fmpz,
N: slong,
pN: *const fmpz,
);
pub fn qadic_log_balanced(
rop: *mut padic_poly_struct,
op: *const padic_poly_struct,
ctx: *const qadic_ctx_struct,
) -> libc::c_int;
pub fn _qadic_log(
z: *mut fmpz,
y: *const fmpz,
v: slong,
len: slong,
a: *const fmpz,
j: *const slong,
lena: slong,
p: *const fmpz,
N: slong,
pN: *const fmpz,
);
pub fn qadic_log(
rop: *mut padic_poly_struct,
op: *const padic_poly_struct,
ctx: *const qadic_ctx_struct,
) -> libc::c_int;
pub fn _qadic_frobenius_a(
rop: *mut fmpz,
exp: slong,
a: *const fmpz,
j: *const slong,
lena: slong,
p: *const fmpz,
N: slong,
);
pub fn _qadic_frobenius(
rop: *mut fmpz,
op: *const fmpz,
len: slong,
e: slong,
a: *const fmpz,
j: *const slong,
lena: slong,
p: *const fmpz,
N: slong,
);
pub fn qadic_frobenius(
rop: *mut padic_poly_struct,
op: *const padic_poly_struct,
e: slong,
ctx: *const qadic_ctx_struct,
);
pub fn _qadic_teichmuller(
rop: *mut fmpz,
op: *const fmpz,
len: slong,
a: *const fmpz,
j: *const slong,
lena: slong,
p: *const fmpz,
N: slong,
);
pub fn qadic_teichmuller(
rop: *mut padic_poly_struct,
op: *const padic_poly_struct,
ctx: *const qadic_ctx_struct,
);
pub fn _qadic_trace(
rop: *mut fmpz,
op: *const fmpz,
len: slong,
a: *const fmpz,
j: *const slong,
lena: slong,
pN: *const fmpz,
);
pub fn qadic_trace(
rop: *mut padic_struct,
op: *const padic_poly_struct,
ctx: *const qadic_ctx_struct,
);
pub fn _qadic_norm_resultant(
rop: *mut fmpz,
op: *const fmpz,
len: slong,
a: *const fmpz,
j: *const slong,
lena: slong,
p: *const fmpz,
N: slong,
);
pub fn _qadic_norm_analytic(
rop: *mut fmpz,
y: *const fmpz,
v: slong,
len: slong,
a: *const fmpz,
j: *const slong,
lena: slong,
p: *const fmpz,
N: slong,
);
pub fn _qadic_norm(
rop: *mut fmpz,
op: *const fmpz,
len: slong,
a: *const fmpz,
j: *const slong,
lena: slong,
p: *const fmpz,
N: slong,
);
pub fn qadic_norm(
rop: *mut padic_struct,
op: *const padic_poly_struct,
ctx: *const qadic_ctx_struct,
);
pub fn qadic_norm_analytic(
rop: *mut padic_struct,
op: *const padic_poly_struct,
ctx: *const qadic_ctx_struct,
);
pub fn qadic_norm_resultant(
rop: *mut padic_struct,
op: *const padic_poly_struct,
ctx: *const qadic_ctx_struct,
);
pub fn qadic_sqrt(
rop: *mut padic_poly_struct,
op: *const padic_poly_struct,
ctx: *const qadic_ctx_struct,
) -> libc::c_int;
pub fn _qadic_char2_sqrt_precomp_init(ctx: *const qadic_ctx_struct)
-> *mut qadic2_sqrt_precomp;
pub fn _qadic_char2_sqrt_with_precomp(
rop: *mut padic_poly_struct,
op: *const padic_poly_struct,
ctx: *const qadic_ctx_struct,
data: *const qadic2_sqrt_precomp,
) -> libc::c_int;
pub fn _qadic_char2_sqrt_precomp_clear(data: *mut qadic2_sqrt_precomp);
pub fn qadic_fprint_pretty(
file: *mut FILE,
op: *const padic_poly_struct,
ctx: *const qadic_ctx_struct,
) -> libc::c_int;
pub fn qadic_print_pretty(
op: *const padic_poly_struct,
ctx: *const qadic_ctx_struct,
) -> libc::c_int;
pub fn qadic_debug(op: *const padic_poly_struct) -> libc::c_int;
}