# distutils: libraries = flint
# distutils: depends = flint/fmpzi.h

################################################################################
# This file is auto-generated by the script
#   SAGE_ROOT/tools/flint-autogen/flint_autogen.py.
# From the commit 3e2c3a3e091106a25ca9c6fba28e02f2cbcd654a
# Do not modify by hand! Fix and rerun the script instead.
################################################################################

from libc.stdio cimport FILE
from sage.libs.gmp.types cimport *
from sage.libs.mpfr.types cimport *
from sage.libs.flint.types cimport *

cdef extern from "flint_wrap.h":
    void fmpzi_init(fmpzi_t x) noexcept
    void fmpzi_clear(fmpzi_t x) noexcept
    void fmpzi_swap(fmpzi_t x, fmpzi_t y) noexcept
    void fmpzi_zero(fmpzi_t x) noexcept
    void fmpzi_one(fmpzi_t x) noexcept
    void fmpzi_set(fmpzi_t res, const fmpzi_t x) noexcept
    void fmpzi_set_si_si(fmpzi_t res, slong a, slong b) noexcept
    void fmpzi_print(const fmpzi_t x) noexcept
    void fmpzi_randtest(fmpzi_t res, flint_rand_t state, mp_bitcnt_t bits) noexcept
    bint fmpzi_equal(const fmpzi_t x, const fmpzi_t y) noexcept
    bint fmpzi_is_zero(const fmpzi_t x) noexcept
    bint fmpzi_is_one(const fmpzi_t x) noexcept
    bint fmpzi_is_unit(const fmpzi_t x) noexcept
    slong fmpzi_canonical_unit_i_pow(const fmpzi_t x) noexcept
    void fmpzi_canonicalise_unit(fmpzi_t res, const fmpzi_t x) noexcept
    slong fmpzi_bits(const fmpzi_t x) noexcept
    void fmpzi_norm(fmpz_t res, const fmpzi_t x) noexcept
    void fmpzi_conj(fmpzi_t res, const fmpzi_t x) noexcept
    void fmpzi_neg(fmpzi_t res, const fmpzi_t x) noexcept
    void fmpzi_add(fmpzi_t res, const fmpzi_t x, const fmpzi_t y) noexcept
    void fmpzi_sub(fmpzi_t res, const fmpzi_t x, const fmpzi_t y) noexcept
    void fmpzi_sqr(fmpzi_t res, const fmpzi_t x) noexcept
    void fmpzi_mul(fmpzi_t res, const fmpzi_t x, const fmpzi_t y) noexcept
    void fmpzi_pow_ui(fmpzi_t res, const fmpzi_t x, ulong exp) noexcept
    void fmpzi_divexact(fmpzi_t q, const fmpzi_t x, const fmpzi_t y) noexcept
    void fmpzi_divrem(fmpzi_t q, fmpzi_t r, const fmpzi_t x, const fmpzi_t y) noexcept
    void fmpzi_divrem_approx(fmpzi_t q, fmpzi_t r, const fmpzi_t x, const fmpzi_t y) noexcept
    slong fmpzi_remove_one_plus_i(fmpzi_t res, const fmpzi_t x) noexcept
    void fmpzi_gcd_euclidean(fmpzi_t res, const fmpzi_t x, const fmpzi_t y) noexcept
    void fmpzi_gcd_euclidean_improved(fmpzi_t res, const fmpzi_t x, const fmpzi_t y) noexcept
    void fmpzi_gcd_binary(fmpzi_t res, const fmpzi_t x, const fmpzi_t y) noexcept
    void fmpzi_gcd_shortest(fmpzi_t res, const fmpzi_t x, const fmpzi_t y) noexcept
    void fmpzi_gcd(fmpzi_t res, const fmpzi_t x, const fmpzi_t y) noexcept
    bint fmpzi_is_prime(const fmpzi_t n) noexcept
    bint fmpzi_is_probabprime(const fmpzi_t n) noexcept
