# distutils: libraries = flint
# distutils: depends = flint/nmod.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 nmod_init(nmod_t * mod, mp_limb_t n) noexcept
    mp_limb_t _nmod_add(mp_limb_t a, mp_limb_t b, nmod_t mod) noexcept
    mp_limb_t nmod_add(mp_limb_t a, mp_limb_t b, nmod_t mod) noexcept
    mp_limb_t _nmod_sub(mp_limb_t a, mp_limb_t b, nmod_t mod) noexcept
    mp_limb_t nmod_sub(mp_limb_t a, mp_limb_t b, nmod_t mod) noexcept
    mp_limb_t nmod_neg(mp_limb_t a, nmod_t mod) noexcept
    mp_limb_t nmod_mul(mp_limb_t a, mp_limb_t b, nmod_t mod) noexcept
    mp_limb_t _nmod_mul_fullword(mp_limb_t a, mp_limb_t b, nmod_t mod) noexcept
    mp_limb_t nmod_inv(mp_limb_t a, nmod_t mod) noexcept
    mp_limb_t nmod_div(mp_limb_t a, mp_limb_t b, nmod_t mod) noexcept
    int nmod_divides(mp_limb_t * a, mp_limb_t b, mp_limb_t c, nmod_t mod) noexcept
    mp_limb_t nmod_pow_ui(mp_limb_t a, ulong e, nmod_t mod) noexcept
    mp_limb_t nmod_pow_fmpz(mp_limb_t a, const fmpz_t e, nmod_t mod) noexcept
    void nmod_discrete_log_pohlig_hellman_init(nmod_discrete_log_pohlig_hellman_t L) noexcept
    void nmod_discrete_log_pohlig_hellman_clear(nmod_discrete_log_pohlig_hellman_t L) noexcept
    double nmod_discrete_log_pohlig_hellman_precompute_prime(nmod_discrete_log_pohlig_hellman_t L, mp_limb_t p) noexcept
    mp_limb_t nmod_discrete_log_pohlig_hellman_primitive_root(const nmod_discrete_log_pohlig_hellman_t L) noexcept
    ulong nmod_discrete_log_pohlig_hellman_run(const nmod_discrete_log_pohlig_hellman_t L, mp_limb_t y) noexcept
