/*
 * This file was generated automatically by ExtUtils::ParseXS version 3.30 from the
 * contents of EC.xs. Do not edit this file, edit EC.xs instead.
 *
 *    ANY CHANGES MADE HERE WILL BE LOST!
 *
 */

#line 1 "EC.xs"
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"

#include "ppport.h"

#include <openssl/ec.h>
#include <openssl/evp.h>
#include <openssl/err.h>

#include "const-c.inc"

#line 23 "EC.c"
#ifndef PERL_UNUSED_VAR
#  define PERL_UNUSED_VAR(var) if (0) var = var
#endif

#ifndef dVAR
#  define dVAR		dNOOP
#endif


/* This stuff is not part of the API! You have been warned. */
#ifndef PERL_VERSION_DECIMAL
#  define PERL_VERSION_DECIMAL(r,v,s) (r*1000000 + v*1000 + s)
#endif
#ifndef PERL_DECIMAL_VERSION
#  define PERL_DECIMAL_VERSION \
	  PERL_VERSION_DECIMAL(PERL_REVISION,PERL_VERSION,PERL_SUBVERSION)
#endif
#ifndef PERL_VERSION_GE
#  define PERL_VERSION_GE(r,v,s) \
	  (PERL_DECIMAL_VERSION >= PERL_VERSION_DECIMAL(r,v,s))
#endif
#ifndef PERL_VERSION_LE
#  define PERL_VERSION_LE(r,v,s) \
	  (PERL_DECIMAL_VERSION <= PERL_VERSION_DECIMAL(r,v,s))
#endif

/* XS_INTERNAL is the explicit static-linkage variant of the default
 * XS macro.
 *
 * XS_EXTERNAL is the same as XS_INTERNAL except it does not include
 * "STATIC", ie. it exports XSUB symbols. You probably don't want that
 * for anything but the BOOT XSUB.
 *
 * See XSUB.h in core!
 */


/* TODO: This might be compatible further back than 5.10.0. */
#if PERL_VERSION_GE(5, 10, 0) && PERL_VERSION_LE(5, 15, 1)
#  undef XS_EXTERNAL
#  undef XS_INTERNAL
#  if defined(__CYGWIN__) && defined(USE_DYNAMIC_LOADING)
#    define XS_EXTERNAL(name) __declspec(dllexport) XSPROTO(name)
#    define XS_INTERNAL(name) STATIC XSPROTO(name)
#  endif
#  if defined(__SYMBIAN32__)
#    define XS_EXTERNAL(name) EXPORT_C XSPROTO(name)
#    define XS_INTERNAL(name) EXPORT_C STATIC XSPROTO(name)
#  endif
#  ifndef XS_EXTERNAL
#    if defined(HASATTRIBUTE_UNUSED) && !defined(__cplusplus)
#      define XS_EXTERNAL(name) void name(pTHX_ CV* cv __attribute__unused__)
#      define XS_INTERNAL(name) STATIC void name(pTHX_ CV* cv __attribute__unused__)
#    else
#      ifdef __cplusplus
#        define XS_EXTERNAL(name) extern "C" XSPROTO(name)
#        define XS_INTERNAL(name) static XSPROTO(name)
#      else
#        define XS_EXTERNAL(name) XSPROTO(name)
#        define XS_INTERNAL(name) STATIC XSPROTO(name)
#      endif
#    endif
#  endif
#endif

/* perl >= 5.10.0 && perl <= 5.15.1 */


/* The XS_EXTERNAL macro is used for functions that must not be static
 * like the boot XSUB of a module. If perl didn't have an XS_EXTERNAL
 * macro defined, the best we can do is assume XS is the same.
 * Dito for XS_INTERNAL.
 */
#ifndef XS_EXTERNAL
#  define XS_EXTERNAL(name) XS(name)
#endif
#ifndef XS_INTERNAL
#  define XS_INTERNAL(name) XS(name)
#endif

/* Now, finally, after all this mess, we want an ExtUtils::ParseXS
 * internal macro that we're free to redefine for varying linkage due
 * to the EXPORT_XSUB_SYMBOLS XS keyword. This is internal, use
 * XS_EXTERNAL(name) or XS_INTERNAL(name) in your code if you need to!
 */

#undef XS_EUPXS
#if defined(PERL_EUPXS_ALWAYS_EXPORT)
#  define XS_EUPXS(name) XS_EXTERNAL(name)
#else
   /* default to internal */
#  define XS_EUPXS(name) XS_INTERNAL(name)
#endif

#ifndef PERL_ARGS_ASSERT_CROAK_XS_USAGE
#define PERL_ARGS_ASSERT_CROAK_XS_USAGE assert(cv); assert(params)

/* prototype to pass -Wmissing-prototypes */
STATIC void
S_croak_xs_usage(const CV *const cv, const char *const params);

STATIC void
S_croak_xs_usage(const CV *const cv, const char *const params)
{
    const GV *const gv = CvGV(cv);

    PERL_ARGS_ASSERT_CROAK_XS_USAGE;

    if (gv) {
        const char *const gvname = GvNAME(gv);
        const HV *const stash = GvSTASH(gv);
        const char *const hvname = stash ? HvNAME(stash) : NULL;

        if (hvname)
	    Perl_croak_nocontext("Usage: %s::%s(%s)", hvname, gvname, params);
        else
	    Perl_croak_nocontext("Usage: %s(%s)", gvname, params);
    } else {
        /* Pants. I don't think that it should be possible to get here. */
	Perl_croak_nocontext("Usage: CODE(0x%"UVxf")(%s)", PTR2UV(cv), params);
    }
}
#undef  PERL_ARGS_ASSERT_CROAK_XS_USAGE

#define croak_xs_usage        S_croak_xs_usage

#endif

/* NOTE: the prototype of newXSproto() is different in versions of perls,
 * so we define a portable version of newXSproto()
 */
#ifdef newXS_flags
#define newXSproto_portable(name, c_impl, file, proto) newXS_flags(name, c_impl, file, proto, 0)
#else
#define newXSproto_portable(name, c_impl, file, proto) (PL_Sv=(SV*)newXS(name, c_impl, file), sv_setpv(PL_Sv, proto), (CV*)PL_Sv)
#endif /* !defined(newXS_flags) */

#if PERL_VERSION_LE(5, 21, 5)
#  define newXS_deffile(a,b) Perl_newXS(aTHX_ a,b,file)
#else
#  define newXS_deffile(a,b) Perl_newXS_deffile(aTHX_ a,b)
#endif

#line 167 "EC.c"

/* INCLUDE:  Including 'const-xs.inc' from 'EC.xs' */


XS_EUPXS(XS_Crypt__OpenSSL__EC_constant); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC_constant)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "sv");
    PERL_UNUSED_VAR(ax); /* -Wall */
    SP -= items;
    {
#line 4 "./const-xs.inc"
#ifdef dXSTARG
	dXSTARG; /* Faster if we have it.  */
#else
	dTARGET;
#endif
	STRLEN		len;
        int		type;
	IV		iv;
	/* NV		nv;	Uncomment this if you need to return NVs */
	/* const char	*pv;	Uncomment this if you need to return PVs */
#line 192 "EC.c"
	SV *	sv = ST(0)
;
	const char *	s = SvPV(sv, len);
#line 18 "./const-xs.inc"
        /* Change this to constant(aTHX_ s, len, &iv, &nv);
           if you need to return both NVs and IVs */
	type = constant(aTHX_ s, len, &iv);
      /* Return 1 or 2 items. First is error message, or undef if no error.
           Second, if present, is found value */
        switch (type) {
        case PERL_constant_NOTFOUND:
          sv =
	    sv_2mortal(newSVpvf("%s is not a valid Crypt::OpenSSL::EC macro", s));
          PUSHs(sv);
          break;
        case PERL_constant_NOTDEF:
          sv = sv_2mortal(newSVpvf(
	    "Your vendor has not defined Crypt::OpenSSL::EC macro %s, used",
				   s));
          PUSHs(sv);
          break;
        case PERL_constant_ISIV:
          EXTEND(SP, 1);
          PUSHs(&PL_sv_undef);
          PUSHi(iv);
          break;
	/* Uncomment this if you need to return NOs
        case PERL_constant_ISNO:
          EXTEND(SP, 1);
          PUSHs(&PL_sv_undef);
          PUSHs(&PL_sv_no);
          break; */
	/* Uncomment this if you need to return NVs
        case PERL_constant_ISNV:
          EXTEND(SP, 1);
          PUSHs(&PL_sv_undef);
          PUSHn(nv);
          break; */
	/* Uncomment this if you need to return PVs
        case PERL_constant_ISPV:
          EXTEND(SP, 1);
          PUSHs(&PL_sv_undef);
          PUSHp(pv, strlen(pv));
          break; */
	/* Uncomment this if you need to return PVNs
        case PERL_constant_ISPVN:
          EXTEND(SP, 1);
          PUSHs(&PL_sv_undef);
          PUSHp(pv, iv);
          break; */
	/* Uncomment this if you need to return SVs
        case PERL_constant_ISSV:
          EXTEND(SP, 1);
          PUSHs(&PL_sv_undef);
          PUSHs(sv);
          break; */
	/* Uncomment this if you need to return UNDEFs
        case PERL_constant_ISUNDEF:
          break; */
	/* Uncomment this if you need to return UVs
        case PERL_constant_ISUV:
          EXTEND(SP, 1);
          PUSHs(&PL_sv_undef);
          PUSHu((UV)iv);
          break; */
	/* Uncomment this if you need to return YESs
        case PERL_constant_ISYES:
          EXTEND(SP, 1);
          PUSHs(&PL_sv_undef);
          PUSHs(&PL_sv_yes);
          break; */
        default:
          sv = sv_2mortal(newSVpvf(
	    "Unexpected return type %d while processing Crypt::OpenSSL::EC macro %s, used",
               type, s));
          PUSHs(sv);
        }
#line 270 "EC.c"
	PUTBACK;
	return;
    }
}


/* INCLUDE: Returning to 'EC.xs' from 'const-xs.inc' */


XS_EUPXS(XS_Crypt__OpenSSL__EC_EC_GFp_simple_method); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC_EC_GFp_simple_method)
{
    dVAR; dXSARGS;
    if (items != 0)
       croak_xs_usage(cv,  "");
    {
	const EC_METHOD *	RETVAL;

	RETVAL = EC_GFp_simple_method();
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    sv_setsv(RETVALSV, sv_2mortal(sv_bless(newRV_noinc( newSViv( (IV)RETVAL ) ), gv_stashpv("Crypt::OpenSSL::EC::EC_METHOD",1))));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC_EC_GFp_mont_method); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC_EC_GFp_mont_method)
{
    dVAR; dXSARGS;
    if (items != 0)
       croak_xs_usage(cv,  "");
    {
	const EC_METHOD *	RETVAL;

	RETVAL = EC_GFp_mont_method();
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    sv_setsv(RETVALSV, sv_2mortal(sv_bless(newRV_noinc( newSViv( (IV)RETVAL ) ), gv_stashpv("Crypt::OpenSSL::EC::EC_METHOD",1))));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC_EC_GFp_nist_method); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC_EC_GFp_nist_method)
{
    dVAR; dXSARGS;
    if (items != 0)
       croak_xs_usage(cv,  "");
    {
	const EC_METHOD *	RETVAL;

	RETVAL = EC_GFp_nist_method();
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    sv_setsv(RETVALSV, sv_2mortal(sv_bless(newRV_noinc( newSViv( (IV)RETVAL ) ), gv_stashpv("Crypt::OpenSSL::EC::EC_METHOD",1))));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}

#ifndef OPENSSL_NO_EC2M
#define XSubPPtmpAAAA 1


XS_EUPXS(XS_Crypt__OpenSSL__EC_EC_GF2m_simple_method); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC_EC_GF2m_simple_method)
{
    dVAR; dXSARGS;
    if (items != 0)
       croak_xs_usage(cv,  "");
    {
	const EC_METHOD *	RETVAL;

	RETVAL = EC_GF2m_simple_method();
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    sv_setsv(RETVALSV, sv_2mortal(sv_bless(newRV_noinc( newSViv( (IV)RETVAL ) ), gv_stashpv("Crypt::OpenSSL::EC::EC_METHOD",1))));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}

#endif
#ifndef OPENSSL_NO_BIO
#define XSubPPtmpAAAB 1


XS_EUPXS(XS_Crypt__OpenSSL__EC_ECParameters_print); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC_ECParameters_print)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "bp, key");
    {
	int	RETVAL;
	dXSTARG;
	BIO *	bp;
	const EC_KEY *	key;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    bp = INT2PTR(BIO *,tmp);
	}
	else
	    Perl_croak_nocontext("%s: %s is not a reference",
			"Crypt::OpenSSL::EC::ECParameters_print",
			"bp")
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    key = (const EC_KEY *) SvIV( SvRV( ST(1) ) )
;

	RETVAL = ECParameters_print(bp, key);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC_EC_KEY_print); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC_EC_KEY_print)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "bp, key, off");
    {
	int	RETVAL;
	dXSTARG;
	BIO *	bp;
	const EC_KEY *	key;
	int	off = (int)SvIV(ST(2))
;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    bp = INT2PTR(BIO *,tmp);
	}
	else
	    Perl_croak_nocontext("%s: %s is not a reference",
			"Crypt::OpenSSL::EC::EC_KEY_print",
			"bp")
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    key = (const EC_KEY *) SvIV( SvRV( ST(1) ) )
;

	RETVAL = EC_KEY_print(bp, key, off);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}

#endif
#ifndef OPENSSL_NO_FP_API
#define XSubPPtmpAAAC 1


XS_EUPXS(XS_Crypt__OpenSSL__EC_ECParameters_print_fp); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC_ECParameters_print_fp)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "fp, key");
    {
	int	RETVAL;
	dXSTARG;
	FILE *	fp = PerlIO_findFILE(IoIFP(sv_2io(ST(0))))
;
	const EC_KEY *	key;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    key = (const EC_KEY *) SvIV( SvRV( ST(1) ) )
;

	RETVAL = ECParameters_print_fp(fp, key);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC_EC_KEY_print_fp); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC_EC_KEY_print_fp)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "fp, key, off");
    {
	int	RETVAL;
	dXSTARG;
	FILE *	fp = PerlIO_findFILE(IoIFP(sv_2io(ST(0))))
;
	const EC_KEY *	key;
	int	off = (int)SvIV(ST(2))
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    key = (const EC_KEY *) SvIV( SvRV( ST(1) ) )
;

	RETVAL = EC_KEY_print_fp(fp, key, off);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}

#endif

XS_EUPXS(XS_Crypt__OpenSSL__EC_ERR_get_error); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC_ERR_get_error)
{
    dVAR; dXSARGS;
    if (items != 0)
       croak_xs_usage(cv,  "");
    {
	unsigned long	RETVAL;
	dXSTARG;

	RETVAL = ERR_get_error();
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC_ERR_error_string); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC_ERR_error_string)
{
    dVAR; dXSARGS;
    if (items < 1 || items > 2)
       croak_xs_usage(cv,  "error, buf=NULL");
    {
	unsigned long	error = (unsigned long)SvUV(ST(0))
;
	char *	buf;
	char *	RETVAL;
	dXSTARG;

	if (items < 2)
	    buf = NULL;
	else {
	    buf = (char *)SvPV_nolen(ST(1))
;
	}
#line 64 "EC.xs"
     RETVAL = ERR_error_string(error,buf);
#line 532 "EC.c"
	sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_new); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_new)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "meth");
    {
	EC_GROUP *	RETVAL;
	const EC_METHOD *	meth;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    meth = (const EC_METHOD *) SvIV( SvRV( ST(0) ) )
;
#line 75 "EC.xs"
	RETVAL = EC_GROUP_new(meth);
#line 554 "EC.c"
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    sv_setsv(RETVALSV, sv_2mortal(sv_bless(newRV_noinc( newSViv( (IV)RETVAL ) ), gv_stashpv("Crypt::OpenSSL::EC::EC_GROUP",1))));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_DESTROY); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_DESTROY)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "group");
    {
	EC_GROUP *	group;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (EC_GROUP *) SvIV( SvRV( ST(0) ) )
;
#line 82 "EC.xs"
	EC_GROUP_free(group);
#line 580 "EC.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_free); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_free)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "group");
    {
	EC_GROUP *	group;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

	EC_GROUP_free(group);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_copy); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_copy)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "dst, src");
    {
	int	RETVAL;
	dXSTARG;
	EC_GROUP *	dst;
	const EC_GROUP *	src;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    dst = (EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    src = (const EC_GROUP *) SvIV( SvRV( ST(1) ) )
;

	RETVAL = EC_GROUP_copy(dst, src);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_dup); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_dup)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "src");
    {
	EC_GROUP *	RETVAL;
	const EC_GROUP *	src;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    src = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

	RETVAL = EC_GROUP_dup(src);
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    sv_setsv(RETVALSV, sv_2mortal(sv_bless(newRV_noinc( newSViv( (IV)RETVAL ) ), gv_stashpv("Crypt::OpenSSL::EC::EC_GROUP",1))));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_method_of); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_method_of)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "group");
    {
	const EC_METHOD *	RETVAL;
	const EC_GROUP *	group;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

	RETVAL = EC_GROUP_method_of(group);
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    sv_setsv(RETVALSV, sv_2mortal(sv_bless(newRV_noinc( newSViv( (IV)RETVAL ) ), gv_stashpv("Crypt::OpenSSL::EC::EC_METHOD",1))));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_EC_METHOD_get_field_type); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_EC_METHOD_get_field_type)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "meth");
    {
	int	RETVAL;
	dXSTARG;
	const EC_METHOD *	meth;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    meth = (const EC_METHOD *) SvIV( SvRV( ST(0) ) )
;

	RETVAL = EC_METHOD_get_field_type(meth);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_set_generator); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_set_generator)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "group, generator, order, cofactor");
    {
	int	RETVAL;
	dXSTARG;
	EC_GROUP *	group;
	const EC_POINT *	generator;
	const BIGNUM *	order;
	const BIGNUM *	cofactor;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    generator = (const EC_POINT *) SvIV( SvRV( ST(1) ) )
;

    if( ! SvROK( ST(2) ) ) { croak( "argument is not an object" ); }
    order = (const BIGNUM *) SvIV( SvRV( ST(2) ) )
;

    if( ! SvROK( ST(3) ) ) { croak( "argument is not an object" ); }
    cofactor = (const BIGNUM *) SvIV( SvRV( ST(3) ) )
;

	RETVAL = EC_GROUP_set_generator(group, generator, order, cofactor);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_get0_generator); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_get0_generator)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "group");
    {
	const EC_POINT *	RETVAL;
	const EC_GROUP *	group;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;
#line 105 "EC.xs"
        RETVAL = EC_POINT_dup(EC_GROUP_get0_generator(group), group);
#line 758 "EC.c"
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    sv_setsv(RETVALSV, sv_2mortal(sv_bless(newRV_noinc( newSViv( (IV)RETVAL ) ), gv_stashpv("Crypt::OpenSSL::EC::EC_POINT",1))));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_get_order); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_get_order)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "group, order, ctx");
    {
	int	RETVAL;
	dXSTARG;
	const EC_GROUP *	group;
	BIGNUM *	order;
	BN_CTX *	ctx;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    order = (BIGNUM *) SvIV( SvRV( ST(1) ) )
;

	if (SvROK(ST(2))) {
	    IV tmp = SvIV((SV*)SvRV(ST(2)));
	    ctx = INT2PTR(BN_CTX *,tmp);
	}
	else
	    Perl_croak_nocontext("%s: %s is not a reference",
			"Crypt::OpenSSL::EC::EC_GROUP::get_order",
			"ctx")
;

	RETVAL = EC_GROUP_get_order(group, order, ctx);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_get_cofactor); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_get_cofactor)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "group, cofactor, ctx");
    {
	int	RETVAL;
	dXSTARG;
	const EC_GROUP *	group;
	BIGNUM *	cofactor;
	BN_CTX *	ctx;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    cofactor = (BIGNUM *) SvIV( SvRV( ST(1) ) )
;

	if (SvROK(ST(2))) {
	    IV tmp = SvIV((SV*)SvRV(ST(2)));
	    ctx = INT2PTR(BN_CTX *,tmp);
	}
	else
	    Perl_croak_nocontext("%s: %s is not a reference",
			"Crypt::OpenSSL::EC::EC_GROUP::get_cofactor",
			"ctx")
;

	RETVAL = EC_GROUP_get_cofactor(group, cofactor, ctx);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_set_curve_name); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_set_curve_name)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "group, nid");
    {
	EC_GROUP *	group;
	int	nid = (int)SvIV(ST(1))
;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

	EC_GROUP_set_curve_name(group, nid);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_get_curve_name); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_get_curve_name)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "group");
    {
	int	RETVAL;
	dXSTARG;
	const EC_GROUP *	group;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

	RETVAL = EC_GROUP_get_curve_name(group);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_set_asn1_flag); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_set_asn1_flag)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "group, flag");
    {
	EC_GROUP *	group;
	int	flag = (int)SvIV(ST(1))
;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

	EC_GROUP_set_asn1_flag(group, flag);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_get_asn1_flag); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_get_asn1_flag)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "group");
    {
	int	RETVAL;
	dXSTARG;
	const EC_GROUP *	group;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

	RETVAL = EC_GROUP_get_asn1_flag(group);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_set_point_conversion_form); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_set_point_conversion_form)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "group, theform");
    {
	EC_GROUP *	group;
	point_conversion_form_t	theform = (point_conversion_form_t)SvIV(ST(1))
;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

	EC_GROUP_set_point_conversion_form(group, theform);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_get_point_conversion_form); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_get_point_conversion_form)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "group");
    {
	point_conversion_form_t	RETVAL;
	dXSTARG;
	const EC_GROUP *	group;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

	RETVAL = EC_GROUP_get_point_conversion_form(group);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_get0_seed); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_get0_seed)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "group");
    {
	char *	RETVAL;
	dXSTARG;
	const EC_GROUP *	group;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;
#line 136 "EC.xs"
		RETVAL = (char*)EC_GROUP_get0_seed(group); /* signedness issues */
#line 991 "EC.c"
	sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_get_seed_len); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_get_seed_len)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "group");
    {
	size_t	RETVAL;
	dXSTARG;
	const EC_GROUP *	group;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

	RETVAL = EC_GROUP_get_seed_len(group);
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_set_seed); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_set_seed)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "group, theseed");
    {
	size_t	RETVAL;
	dXSTARG;
	STRLEN	STRLEN_length_of_theseed;
	size_t	XSauto_length_of_theseed;
	EC_GROUP *	group;
	const unsigned char *	theseed = (const unsigned char *)SvPV(ST(1), STRLEN_length_of_theseed);

	XSauto_length_of_theseed = STRLEN_length_of_theseed;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

	RETVAL = EC_GROUP_set_seed(group, theseed, XSauto_length_of_theseed);
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_set_curve_GFp); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_set_curve_GFp)
{
    dVAR; dXSARGS;
    if (items != 5)
       croak_xs_usage(cv,  "group, p, a, b, ctx");
    {
	int	RETVAL;
	dXSTARG;
	EC_GROUP *	group;
	const BIGNUM *	p;
	const BIGNUM *	a;
	const BIGNUM *	b;
	BN_CTX *	ctx;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    p = (const BIGNUM *) SvIV( SvRV( ST(1) ) )
;

    if( ! SvROK( ST(2) ) ) { croak( "argument is not an object" ); }
    a = (const BIGNUM *) SvIV( SvRV( ST(2) ) )
;

    if( ! SvROK( ST(3) ) ) { croak( "argument is not an object" ); }
    b = (const BIGNUM *) SvIV( SvRV( ST(3) ) )
;

	if (SvROK(ST(4))) {
	    IV tmp = SvIV((SV*)SvRV(ST(4)));
	    ctx = INT2PTR(BN_CTX *,tmp);
	}
	else
	    Perl_croak_nocontext("%s: %s is not a reference",
			"Crypt::OpenSSL::EC::EC_GROUP::set_curve_GFp",
			"ctx")
;

	RETVAL = EC_GROUP_set_curve_GFp(group, p, a, b, ctx);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_get_curve_GFp); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_get_curve_GFp)
{
    dVAR; dXSARGS;
    if (items != 5)
       croak_xs_usage(cv,  "group, p, a, b, ctx");
    {
	int	RETVAL;
	dXSTARG;
	const EC_GROUP *	group;
	BIGNUM *	p;
	BIGNUM *	a;
	BIGNUM *	b;
	BN_CTX *	ctx;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    p = (BIGNUM *) SvIV( SvRV( ST(1) ) )
;

    if( ! SvROK( ST(2) ) ) { croak( "argument is not an object" ); }
    a = (BIGNUM *) SvIV( SvRV( ST(2) ) )
;

    if( ! SvROK( ST(3) ) ) { croak( "argument is not an object" ); }
    b = (BIGNUM *) SvIV( SvRV( ST(3) ) )
;

	if (SvROK(ST(4))) {
	    IV tmp = SvIV((SV*)SvRV(ST(4)));
	    ctx = INT2PTR(BN_CTX *,tmp);
	}
	else
	    Perl_croak_nocontext("%s: %s is not a reference",
			"Crypt::OpenSSL::EC::EC_GROUP::get_curve_GFp",
			"ctx")
;

	RETVAL = EC_GROUP_get_curve_GFp(group, p, a, b, ctx);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}

#ifndef OPENSSL_NO_EC2M
#define XSubPPtmpAAAD 1


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_set_curve_GF2m); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_set_curve_GF2m)
{
    dVAR; dXSARGS;
    if (items != 5)
       croak_xs_usage(cv,  "group, p, a, b, ctx");
    {
	int	RETVAL;
	dXSTARG;
	EC_GROUP *	group;
	const BIGNUM *	p;
	const BIGNUM *	a;
	const BIGNUM *	b;
	BN_CTX *	ctx;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    p = (const BIGNUM *) SvIV( SvRV( ST(1) ) )
;

    if( ! SvROK( ST(2) ) ) { croak( "argument is not an object" ); }
    a = (const BIGNUM *) SvIV( SvRV( ST(2) ) )
;

    if( ! SvROK( ST(3) ) ) { croak( "argument is not an object" ); }
    b = (const BIGNUM *) SvIV( SvRV( ST(3) ) )
;

	if (SvROK(ST(4))) {
	    IV tmp = SvIV((SV*)SvRV(ST(4)));
	    ctx = INT2PTR(BN_CTX *,tmp);
	}
	else
	    Perl_croak_nocontext("%s: %s is not a reference",
			"Crypt::OpenSSL::EC::EC_GROUP::set_curve_GF2m",
			"ctx")
;

	RETVAL = EC_GROUP_set_curve_GF2m(group, p, a, b, ctx);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_get_curve_GF2m); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_get_curve_GF2m)
{
    dVAR; dXSARGS;
    if (items != 5)
       croak_xs_usage(cv,  "group, p, a, b, ctx");
    {
	int	RETVAL;
	dXSTARG;
	const EC_GROUP *	group;
	BIGNUM *	p;
	BIGNUM *	a;
	BIGNUM *	b;
	BN_CTX *	ctx;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    p = (BIGNUM *) SvIV( SvRV( ST(1) ) )
;

    if( ! SvROK( ST(2) ) ) { croak( "argument is not an object" ); }
    a = (BIGNUM *) SvIV( SvRV( ST(2) ) )
;

    if( ! SvROK( ST(3) ) ) { croak( "argument is not an object" ); }
    b = (BIGNUM *) SvIV( SvRV( ST(3) ) )
;

	if (SvROK(ST(4))) {
	    IV tmp = SvIV((SV*)SvRV(ST(4)));
	    ctx = INT2PTR(BN_CTX *,tmp);
	}
	else
	    Perl_croak_nocontext("%s: %s is not a reference",
			"Crypt::OpenSSL::EC::EC_GROUP::get_curve_GF2m",
			"ctx")
;

	RETVAL = EC_GROUP_get_curve_GF2m(group, p, a, b, ctx);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}

#endif

XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_get_degree); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_get_degree)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "group");
    {
	int	RETVAL;
	dXSTARG;
	const EC_GROUP *	group;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

	RETVAL = EC_GROUP_get_degree(group);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_check); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_check)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "group, ctx");
    {
	int	RETVAL;
	dXSTARG;
	const EC_GROUP *	group;
	BN_CTX *	ctx;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

	if (SvROK(ST(1))) {
	    IV tmp = SvIV((SV*)SvRV(ST(1)));
	    ctx = INT2PTR(BN_CTX *,tmp);
	}
	else
	    Perl_croak_nocontext("%s: %s is not a reference",
			"Crypt::OpenSSL::EC::EC_GROUP::check",
			"ctx")
;

	RETVAL = EC_GROUP_check(group, ctx);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_check_discriminant); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_check_discriminant)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "group, ctx");
    {
	int	RETVAL;
	dXSTARG;
	const EC_GROUP *	group;
	BN_CTX *	ctx;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

	if (SvROK(ST(1))) {
	    IV tmp = SvIV((SV*)SvRV(ST(1)));
	    ctx = INT2PTR(BN_CTX *,tmp);
	}
	else
	    Perl_croak_nocontext("%s: %s is not a reference",
			"Crypt::OpenSSL::EC::EC_GROUP::check_discriminant",
			"ctx")
;

	RETVAL = EC_GROUP_check_discriminant(group, ctx);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_cmp); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_cmp)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "a, b, ctx");
    {
	int	RETVAL;
	dXSTARG;
	const EC_GROUP *	a;
	const EC_GROUP *	b;
	BN_CTX *	ctx;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    a = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    b = (const EC_GROUP *) SvIV( SvRV( ST(1) ) )
;

	if (SvROK(ST(2))) {
	    IV tmp = SvIV((SV*)SvRV(ST(2)));
	    ctx = INT2PTR(BN_CTX *,tmp);
	}
	else
	    Perl_croak_nocontext("%s: %s is not a reference",
			"Crypt::OpenSSL::EC::EC_GROUP::cmp",
			"ctx")
;

	RETVAL = EC_GROUP_cmp(a, b, ctx);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_new_curve_GFp); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_new_curve_GFp)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "p, a, b, ctx");
    {
	EC_GROUP *	RETVAL;
	const BIGNUM *	p;
	const BIGNUM *	a;
	const BIGNUM *	b;
	BN_CTX *	ctx;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    p = (const BIGNUM *) SvIV( SvRV( ST(0) ) )
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    a = (const BIGNUM *) SvIV( SvRV( ST(1) ) )
;

    if( ! SvROK( ST(2) ) ) { croak( "argument is not an object" ); }
    b = (const BIGNUM *) SvIV( SvRV( ST(2) ) )
;

	if (SvROK(ST(3))) {
	    IV tmp = SvIV((SV*)SvRV(ST(3)));
	    ctx = INT2PTR(BN_CTX *,tmp);
	}
	else
	    Perl_croak_nocontext("%s: %s is not a reference",
			"Crypt::OpenSSL::EC::EC_GROUP::new_curve_GFp",
			"ctx")
;

	RETVAL = EC_GROUP_new_curve_GFp(p, a, b, ctx);
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    sv_setsv(RETVALSV, sv_2mortal(sv_bless(newRV_noinc( newSViv( (IV)RETVAL ) ), gv_stashpv("Crypt::OpenSSL::EC::EC_GROUP",1))));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}

#ifndef OPENSSL_NO_EC2M
#define XSubPPtmpAAAE 1


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_new_curve_GF2m); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_new_curve_GF2m)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "p, a, b, ctx");
    {
	EC_GROUP *	RETVAL;
	const BIGNUM *	p;
	const BIGNUM *	a;
	const BIGNUM *	b;
	BN_CTX *	ctx;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    p = (const BIGNUM *) SvIV( SvRV( ST(0) ) )
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    a = (const BIGNUM *) SvIV( SvRV( ST(1) ) )
;

    if( ! SvROK( ST(2) ) ) { croak( "argument is not an object" ); }
    b = (const BIGNUM *) SvIV( SvRV( ST(2) ) )
;

	if (SvROK(ST(3))) {
	    IV tmp = SvIV((SV*)SvRV(ST(3)));
	    ctx = INT2PTR(BN_CTX *,tmp);
	}
	else
	    Perl_croak_nocontext("%s: %s is not a reference",
			"Crypt::OpenSSL::EC::EC_GROUP::new_curve_GF2m",
			"ctx")
;

	RETVAL = EC_GROUP_new_curve_GF2m(p, a, b, ctx);
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    sv_setsv(RETVALSV, sv_2mortal(sv_bless(newRV_noinc( newSViv( (IV)RETVAL ) ), gv_stashpv("Crypt::OpenSSL::EC::EC_GROUP",1))));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}

#endif

XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_new_by_curve_name); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_new_by_curve_name)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "nid");
    {
	EC_GROUP *	RETVAL;
	int	nid = (int)SvIV(ST(0))
;

	RETVAL = EC_GROUP_new_by_curve_name(nid);
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    sv_setsv(RETVALSV, sv_2mortal(sv_bless(newRV_noinc( newSViv( (IV)RETVAL ) ), gv_stashpv("Crypt::OpenSSL::EC::EC_GROUP",1))));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_precompute_mult); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_precompute_mult)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "group, ctx");
    {
	int	RETVAL;
	dXSTARG;
	EC_GROUP *	group;
	BN_CTX *	ctx;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

	if (SvROK(ST(1))) {
	    IV tmp = SvIV((SV*)SvRV(ST(1)));
	    ctx = INT2PTR(BN_CTX *,tmp);
	}
	else
	    Perl_croak_nocontext("%s: %s is not a reference",
			"Crypt::OpenSSL::EC::EC_GROUP::precompute_mult",
			"ctx")
;

	RETVAL = EC_GROUP_precompute_mult(group, ctx);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_have_precompute_mult); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_have_precompute_mult)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "group");
    {
	int	RETVAL;
	dXSTARG;
	const EC_GROUP *	group;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

	RETVAL = EC_GROUP_have_precompute_mult(group);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_get_basis_type); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_get_basis_type)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "group");
    {
	int	RETVAL;
	dXSTARG;
	const EC_GROUP *	group;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

	RETVAL = EC_GROUP_get_basis_type(group);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}

#ifndef OPENSSL_NO_EC2M
#define XSubPPtmpAAAF 1


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_get_trinomial_basis); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_get_trinomial_basis)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "group, k");
    {
	int	RETVAL;
	dXSTARG;
	const EC_GROUP *	group;
	unsigned int	k = (unsigned int)SvUV(ST(1))
;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;
#line 202 "EC.xs"
		RETVAL = EC_GROUP_get_trinomial_basis(group, &k);
#line 1588 "EC.c"
	sv_setiv(ST(1), k);
	SvSETMAGIC(ST(1));
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_get_pentanomial_basis); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_GROUP_get_pentanomial_basis)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "group, k1, k2, k3");
    {
	int	RETVAL;
	dXSTARG;
	const EC_GROUP *	group;
	unsigned int	k1 = (unsigned int)SvUV(ST(1))
;
	unsigned int	k2 = (unsigned int)SvUV(ST(2))
;
	unsigned int	k3 = (unsigned int)SvUV(ST(3))
;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;
#line 210 "EC.xs"
		RETVAL = EC_GROUP_get_pentanomial_basis(group, &k1, &k2, &k3);
#line 1619 "EC.c"
	sv_setiv(ST(1), k1);
	SvSETMAGIC(ST(1));
	sv_setiv(ST(2), k2);
	SvSETMAGIC(ST(2));
	sv_setiv(ST(3), k3);
	SvSETMAGIC(ST(3));
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}

#endif

XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_new); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_new)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "group");
    {
	EC_POINT *	RETVAL;
	const EC_GROUP *	group;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;
#line 230 "EC.xs"
	RETVAL = EC_POINT_new(group);
#line 1648 "EC.c"
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    sv_setsv(RETVALSV, sv_2mortal(sv_bless(newRV_noinc( newSViv( (IV)RETVAL ) ), gv_stashpv("Crypt::OpenSSL::EC::EC_POINT",1))));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_DESTROY); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_DESTROY)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "point");
    {
	EC_POINT *	point;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    point = (EC_POINT *) SvIV( SvRV( ST(0) ) )
;
#line 237 "EC.xs"
	EC_POINT_free(point);
#line 1674 "EC.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_free); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_free)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "point");
    {
	EC_POINT *	point;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    point = (EC_POINT *) SvIV( SvRV( ST(0) ) )
;

	EC_POINT_free(point);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_clear_free); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_clear_free)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "point");
    {
	EC_POINT *	point;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    point = (EC_POINT *) SvIV( SvRV( ST(0) ) )
;

	EC_POINT_clear_free(point);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_copy); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_copy)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "dst, src");
    {
	int	RETVAL;
	dXSTARG;
	EC_POINT *	dst;
	const EC_POINT *	src;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    dst = (EC_POINT *) SvIV( SvRV( ST(0) ) )
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    src = (const EC_POINT *) SvIV( SvRV( ST(1) ) )
;

	RETVAL = EC_POINT_copy(dst, src);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_dup); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_dup)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "src, group");
    {
	EC_POINT *	RETVAL;
	const EC_POINT *	src;
	const EC_GROUP *	group;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    src = (const EC_POINT *) SvIV( SvRV( ST(0) ) )
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(1) ) )
;

	RETVAL = EC_POINT_dup(src, group);
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    sv_setsv(RETVALSV, sv_2mortal(sv_bless(newRV_noinc( newSViv( (IV)RETVAL ) ), gv_stashpv("Crypt::OpenSSL::EC::EC_POINT",1))));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_method_of); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_method_of)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "point");
    {
	const EC_METHOD *	RETVAL;
	const EC_POINT *	point;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    point = (const EC_POINT *) SvIV( SvRV( ST(0) ) )
;

	RETVAL = EC_POINT_method_of(point);
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    sv_setsv(RETVALSV, sv_2mortal(sv_bless(newRV_noinc( newSViv( (IV)RETVAL ) ), gv_stashpv("Crypt::OpenSSL::EC::EC_METHOD",1))));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_set_to_infinity); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_set_to_infinity)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "group, point");
    {
	int	RETVAL;
	dXSTARG;
	const EC_GROUP *	group;
	EC_POINT *	point;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    point = (EC_POINT *) SvIV( SvRV( ST(1) ) )
;

	RETVAL = EC_POINT_set_to_infinity(group, point);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_set_Jprojective_coordinates_GFp); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_set_Jprojective_coordinates_GFp)
{
    dVAR; dXSARGS;
    if (items != 6)
       croak_xs_usage(cv,  "group, p, x, y, z, ctx");
    {
	int	RETVAL;
	dXSTARG;
	const EC_GROUP *	group;
	EC_POINT *	p;
	const BIGNUM *	x;
	const BIGNUM *	y;
	const BIGNUM *	z;
	BN_CTX *	ctx;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    p = (EC_POINT *) SvIV( SvRV( ST(1) ) )
;

    if( ! SvROK( ST(2) ) ) { croak( "argument is not an object" ); }
    x = (const BIGNUM *) SvIV( SvRV( ST(2) ) )
;

    if( ! SvROK( ST(3) ) ) { croak( "argument is not an object" ); }
    y = (const BIGNUM *) SvIV( SvRV( ST(3) ) )
;

    if( ! SvROK( ST(4) ) ) { croak( "argument is not an object" ); }
    z = (const BIGNUM *) SvIV( SvRV( ST(4) ) )
;

	if (SvROK(ST(5))) {
	    IV tmp = SvIV((SV*)SvRV(ST(5)));
	    ctx = INT2PTR(BN_CTX *,tmp);
	}
	else
	    Perl_croak_nocontext("%s: %s is not a reference",
			"Crypt::OpenSSL::EC::EC_POINT::set_Jprojective_coordinates_GFp",
			"ctx")
;

	RETVAL = EC_POINT_set_Jprojective_coordinates_GFp(group, p, x, y, z, ctx);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_get_Jprojective_coordinates_GFp); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_get_Jprojective_coordinates_GFp)
{
    dVAR; dXSARGS;
    if (items != 6)
       croak_xs_usage(cv,  "group, p, x, y, z, ctx");
    {
	int	RETVAL;
	dXSTARG;
	const EC_GROUP *	group;
	const EC_POINT *	p;
	BIGNUM *	x;
	BIGNUM *	y;
	BIGNUM *	z;
	BN_CTX *	ctx;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    p = (const EC_POINT *) SvIV( SvRV( ST(1) ) )
;

    if( ! SvROK( ST(2) ) ) { croak( "argument is not an object" ); }
    x = (BIGNUM *) SvIV( SvRV( ST(2) ) )
;

    if( ! SvROK( ST(3) ) ) { croak( "argument is not an object" ); }
    y = (BIGNUM *) SvIV( SvRV( ST(3) ) )
;

    if( ! SvROK( ST(4) ) ) { croak( "argument is not an object" ); }
    z = (BIGNUM *) SvIV( SvRV( ST(4) ) )
;

	if (SvROK(ST(5))) {
	    IV tmp = SvIV((SV*)SvRV(ST(5)));
	    ctx = INT2PTR(BN_CTX *,tmp);
	}
	else
	    Perl_croak_nocontext("%s: %s is not a reference",
			"Crypt::OpenSSL::EC::EC_POINT::get_Jprojective_coordinates_GFp",
			"ctx")
;

	RETVAL = EC_POINT_get_Jprojective_coordinates_GFp(group, p, x, y, z, ctx);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_set_affine_coordinates_GFp); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_set_affine_coordinates_GFp)
{
    dVAR; dXSARGS;
    if (items != 5)
       croak_xs_usage(cv,  "group, p, x, y, ctx");
    {
	int	RETVAL;
	dXSTARG;
	const EC_GROUP *	group;
	EC_POINT *	p;
	const BIGNUM *	x;
	const BIGNUM *	y;
	BN_CTX *	ctx;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    p = (EC_POINT *) SvIV( SvRV( ST(1) ) )
;

    if( ! SvROK( ST(2) ) ) { croak( "argument is not an object" ); }
    x = (const BIGNUM *) SvIV( SvRV( ST(2) ) )
;

    if( ! SvROK( ST(3) ) ) { croak( "argument is not an object" ); }
    y = (const BIGNUM *) SvIV( SvRV( ST(3) ) )
;

	if (SvROK(ST(4))) {
	    IV tmp = SvIV((SV*)SvRV(ST(4)));
	    ctx = INT2PTR(BN_CTX *,tmp);
	}
	else
	    Perl_croak_nocontext("%s: %s is not a reference",
			"Crypt::OpenSSL::EC::EC_POINT::set_affine_coordinates_GFp",
			"ctx")
;

	RETVAL = EC_POINT_set_affine_coordinates_GFp(group, p, x, y, ctx);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_get_affine_coordinates_GFp); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_get_affine_coordinates_GFp)
{
    dVAR; dXSARGS;
    if (items != 5)
       croak_xs_usage(cv,  "group, p, x, y, ctx");
    {
	int	RETVAL;
	dXSTARG;
	const EC_GROUP *	group;
	const EC_POINT *	p;
	BIGNUM *	x;
	BIGNUM *	y;
	BN_CTX *	ctx;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    p = (const EC_POINT *) SvIV( SvRV( ST(1) ) )
;

    if( ! SvROK( ST(2) ) ) { croak( "argument is not an object" ); }
    x = (BIGNUM *) SvIV( SvRV( ST(2) ) )
;

    if( ! SvROK( ST(3) ) ) { croak( "argument is not an object" ); }
    y = (BIGNUM *) SvIV( SvRV( ST(3) ) )
;

	if (SvROK(ST(4))) {
	    IV tmp = SvIV((SV*)SvRV(ST(4)));
	    ctx = INT2PTR(BN_CTX *,tmp);
	}
	else
	    Perl_croak_nocontext("%s: %s is not a reference",
			"Crypt::OpenSSL::EC::EC_POINT::get_affine_coordinates_GFp",
			"ctx")
;

	RETVAL = EC_POINT_get_affine_coordinates_GFp(group, p, x, y, ctx);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_set_compressed_coordinates_GFp); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_set_compressed_coordinates_GFp)
{
    dVAR; dXSARGS;
    if (items != 5)
       croak_xs_usage(cv,  "group, p, x, y_bit, ctx");
    {
	int	RETVAL;
	dXSTARG;
	const EC_GROUP *	group;
	EC_POINT *	p;
	const BIGNUM *	x;
	int	y_bit = (int)SvIV(ST(3))
;
	BN_CTX *	ctx;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    p = (EC_POINT *) SvIV( SvRV( ST(1) ) )
;

    if( ! SvROK( ST(2) ) ) { croak( "argument is not an object" ); }
    x = (const BIGNUM *) SvIV( SvRV( ST(2) ) )
;

	if (SvROK(ST(4))) {
	    IV tmp = SvIV((SV*)SvRV(ST(4)));
	    ctx = INT2PTR(BN_CTX *,tmp);
	}
	else
	    Perl_croak_nocontext("%s: %s is not a reference",
			"Crypt::OpenSSL::EC::EC_POINT::set_compressed_coordinates_GFp",
			"ctx")
;

	RETVAL = EC_POINT_set_compressed_coordinates_GFp(group, p, x, y_bit, ctx);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}

#ifndef OPENSSL_NO_EC2M
#define XSubPPtmpAAAG 1


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_set_affine_coordinates_GF2m); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_set_affine_coordinates_GF2m)
{
    dVAR; dXSARGS;
    if (items != 5)
       croak_xs_usage(cv,  "group, p, x, y, ctx");
    {
	int	RETVAL;
	dXSTARG;
	const EC_GROUP *	group;
	EC_POINT *	p;
	const BIGNUM *	x;
	const BIGNUM *	y;
	BN_CTX *	ctx;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    p = (EC_POINT *) SvIV( SvRV( ST(1) ) )
;

    if( ! SvROK( ST(2) ) ) { croak( "argument is not an object" ); }
    x = (const BIGNUM *) SvIV( SvRV( ST(2) ) )
;

    if( ! SvROK( ST(3) ) ) { croak( "argument is not an object" ); }
    y = (const BIGNUM *) SvIV( SvRV( ST(3) ) )
;

	if (SvROK(ST(4))) {
	    IV tmp = SvIV((SV*)SvRV(ST(4)));
	    ctx = INT2PTR(BN_CTX *,tmp);
	}
	else
	    Perl_croak_nocontext("%s: %s is not a reference",
			"Crypt::OpenSSL::EC::EC_POINT::set_affine_coordinates_GF2m",
			"ctx")
;

	RETVAL = EC_POINT_set_affine_coordinates_GF2m(group, p, x, y, ctx);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_get_affine_coordinates_GF2m); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_get_affine_coordinates_GF2m)
{
    dVAR; dXSARGS;
    if (items != 5)
       croak_xs_usage(cv,  "group, p, x, y, ctx");
    {
	int	RETVAL;
	dXSTARG;
	const EC_GROUP *	group;
	const EC_POINT *	p;
	BIGNUM *	x;
	BIGNUM *	y;
	BN_CTX *	ctx;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    p = (const EC_POINT *) SvIV( SvRV( ST(1) ) )
;

    if( ! SvROK( ST(2) ) ) { croak( "argument is not an object" ); }
    x = (BIGNUM *) SvIV( SvRV( ST(2) ) )
;

    if( ! SvROK( ST(3) ) ) { croak( "argument is not an object" ); }
    y = (BIGNUM *) SvIV( SvRV( ST(3) ) )
;

	if (SvROK(ST(4))) {
	    IV tmp = SvIV((SV*)SvRV(ST(4)));
	    ctx = INT2PTR(BN_CTX *,tmp);
	}
	else
	    Perl_croak_nocontext("%s: %s is not a reference",
			"Crypt::OpenSSL::EC::EC_POINT::get_affine_coordinates_GF2m",
			"ctx")
;

	RETVAL = EC_POINT_get_affine_coordinates_GF2m(group, p, x, y, ctx);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_set_compressed_coordinates_GF2m); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_set_compressed_coordinates_GF2m)
{
    dVAR; dXSARGS;
    if (items != 5)
       croak_xs_usage(cv,  "group, p, x, y_bit, ctx");
    {
	int	RETVAL;
	dXSTARG;
	const EC_GROUP *	group;
	EC_POINT *	p;
	const BIGNUM *	x;
	int	y_bit = (int)SvIV(ST(3))
;
	BN_CTX *	ctx;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    p = (EC_POINT *) SvIV( SvRV( ST(1) ) )
;

    if( ! SvROK( ST(2) ) ) { croak( "argument is not an object" ); }
    x = (const BIGNUM *) SvIV( SvRV( ST(2) ) )
;

	if (SvROK(ST(4))) {
	    IV tmp = SvIV((SV*)SvRV(ST(4)));
	    ctx = INT2PTR(BN_CTX *,tmp);
	}
	else
	    Perl_croak_nocontext("%s: %s is not a reference",
			"Crypt::OpenSSL::EC::EC_POINT::set_compressed_coordinates_GF2m",
			"ctx")
;

	RETVAL = EC_POINT_set_compressed_coordinates_GF2m(group, p, x, y_bit, ctx);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}

#endif

XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_point2oct); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_point2oct)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "group, p, theform, ctx");
    {
#line 288 "EC.xs"
		STRLEN len;
		char* buf;
#line 2231 "EC.c"
	SV *	RETVAL;
	const EC_GROUP *	group;
	const EC_POINT *	p;
	point_conversion_form_t	theform = (point_conversion_form_t)SvIV(ST(2))
;
	BN_CTX *	ctx;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    p = (const EC_POINT *) SvIV( SvRV( ST(1) ) )
;

	if (SvROK(ST(3))) {
	    IV tmp = SvIV((SV*)SvRV(ST(3)));
	    ctx = INT2PTR(BN_CTX *,tmp);
	}
	else
	    Perl_croak_nocontext("%s: %s is not a reference",
			"Crypt::OpenSSL::EC::EC_POINT::point2oct",
			"ctx")
;
#line 291 "EC.xs"
		len = EC_POINT_point2oct(group, p, theform, NULL, 0, ctx);
		Newx(buf, len, char);
		len = EC_POINT_point2oct(group, p, theform, (unsigned char*)buf, len, ctx);
		RETVAL = newSVpv(buf, len);
		Safefree(buf);
#line 2262 "EC.c"
	RETVAL = sv_2mortal(RETVAL);
	ST(0) = RETVAL;
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_oct2point); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_oct2point)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "group, p, buf, ctx");
    {
#line 302 "EC.xs"
		STRLEN len;
#line 2279 "EC.c"
	int	RETVAL;
	dXSTARG;
	const EC_GROUP *	group;
	EC_POINT *	p;
	const unsigned char *	buf = (const unsigned char *)SvPV_nolen(ST(2))
;
	BN_CTX *	ctx;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    p = (EC_POINT *) SvIV( SvRV( ST(1) ) )
;

	if (SvROK(ST(3))) {
	    IV tmp = SvIV((SV*)SvRV(ST(3)));
	    ctx = INT2PTR(BN_CTX *,tmp);
	}
	else
	    Perl_croak_nocontext("%s: %s is not a reference",
			"Crypt::OpenSSL::EC::EC_POINT::oct2point",
			"ctx")
;
#line 304 "EC.xs"
		SvPV(ST(2), len);
		RETVAL = EC_POINT_oct2point(group, p, buf, len, ctx);
#line 2308 "EC.c"
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_point2bn); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_point2bn)
{
    dVAR; dXSARGS;
    if (items != 5)
       croak_xs_usage(cv,  "group, point, theform, bn, ctx");
    {
	BIGNUM *	RETVAL;
	const EC_GROUP *	group;
	const EC_POINT *	point;
	point_conversion_form_t	theform = (point_conversion_form_t)SvIV(ST(2))
;
	BIGNUM *	bn;
	BN_CTX *	ctx;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    point = (const EC_POINT *) SvIV( SvRV( ST(1) ) )
;

    if( ! SvROK( ST(3) ) ) { croak( "argument is not an object" ); }
    bn = (BIGNUM *) SvIV( SvRV( ST(3) ) )
;

	if (SvROK(ST(4))) {
	    IV tmp = SvIV((SV*)SvRV(ST(4)));
	    ctx = INT2PTR(BN_CTX *,tmp);
	}
	else
	    Perl_croak_nocontext("%s: %s is not a reference",
			"Crypt::OpenSSL::EC::EC_POINT::point2bn",
			"ctx")
;

	RETVAL = EC_POINT_point2bn(group, point, theform, bn, ctx);
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    sv_setsv(RETVALSV, sv_2mortal(sv_bless(newRV_noinc( newSViv( (IV)RETVAL ) ), gv_stashpv("Crypt::OpenSSL::Bignum",1))));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_bn2point); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_bn2point)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "group, bn, point, ctx");
    {
	EC_POINT *	RETVAL;
	const EC_GROUP *	group;
	const BIGNUM *	bn;
	EC_POINT *	point;
	BN_CTX *	ctx;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    bn = (const BIGNUM *) SvIV( SvRV( ST(1) ) )
;

    if( ! SvROK( ST(2) ) ) { croak( "argument is not an object" ); }
    point = (EC_POINT *) SvIV( SvRV( ST(2) ) )
;

	if (SvROK(ST(3))) {
	    IV tmp = SvIV((SV*)SvRV(ST(3)));
	    ctx = INT2PTR(BN_CTX *,tmp);
	}
	else
	    Perl_croak_nocontext("%s: %s is not a reference",
			"Crypt::OpenSSL::EC::EC_POINT::bn2point",
			"ctx")
;

	RETVAL = EC_POINT_bn2point(group, bn, point, ctx);
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    sv_setsv(RETVALSV, sv_2mortal(sv_bless(newRV_noinc( newSViv( (IV)RETVAL ) ), gv_stashpv("Crypt::OpenSSL::EC::EC_POINT",1))));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_point2hex); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_point2hex)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "group, point, theform, ctx");
    {
#line 319 "EC.xs"
                char* hex;
#line 2420 "EC.c"
	char *	RETVAL;
	dXSTARG;
	const EC_GROUP *	group;
	const EC_POINT *	point;
	point_conversion_form_t	theform = (point_conversion_form_t)SvIV(ST(2))
;
	BN_CTX *	ctx;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    point = (const EC_POINT *) SvIV( SvRV( ST(1) ) )
;

	if (SvROK(ST(3))) {
	    IV tmp = SvIV((SV*)SvRV(ST(3)));
	    ctx = INT2PTR(BN_CTX *,tmp);
	}
	else
	    Perl_croak_nocontext("%s: %s is not a reference",
			"Crypt::OpenSSL::EC::EC_POINT::point2hex",
			"ctx")
;
#line 321 "EC.xs"
	        hex =  EC_POINT_point2hex(group, point, theform, ctx);
                sv_setpv(TARG, hex);
	        Safefree(hex);
                ST(0) = TARG;
#line 2451 "EC.c"
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_hex2point); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_hex2point)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "group, buf, point, ctx");
    {
	EC_POINT *	RETVAL;
	const EC_GROUP *	group;
	const char *	buf = (const char *)SvPV_nolen(ST(1))
;
	EC_POINT *	point;
	BN_CTX *	ctx;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

    if( ! SvROK( ST(2) ) ) { croak( "argument is not an object" ); }
    point = (EC_POINT *) SvIV( SvRV( ST(2) ) )
;

	if (SvROK(ST(3))) {
	    IV tmp = SvIV((SV*)SvRV(ST(3)));
	    ctx = INT2PTR(BN_CTX *,tmp);
	}
	else
	    Perl_croak_nocontext("%s: %s is not a reference",
			"Crypt::OpenSSL::EC::EC_POINT::hex2point",
			"ctx")
;

	RETVAL = EC_POINT_hex2point(group, buf, point, ctx);
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    sv_setsv(RETVALSV, sv_2mortal(sv_bless(newRV_noinc( newSViv( (IV)RETVAL ) ), gv_stashpv("Crypt::OpenSSL::EC::EC_POINT",1))));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_add); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_add)
{
    dVAR; dXSARGS;
    if (items != 5)
       croak_xs_usage(cv,  "group, r, a, b, ctx");
    {
	int	RETVAL;
	dXSTARG;
	const EC_GROUP *	group;
	EC_POINT *	r;
	const EC_POINT *	a;
	const EC_POINT *	b;
	BN_CTX *	ctx;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    r = (EC_POINT *) SvIV( SvRV( ST(1) ) )
;

    if( ! SvROK( ST(2) ) ) { croak( "argument is not an object" ); }
    a = (const EC_POINT *) SvIV( SvRV( ST(2) ) )
;

    if( ! SvROK( ST(3) ) ) { croak( "argument is not an object" ); }
    b = (const EC_POINT *) SvIV( SvRV( ST(3) ) )
;

	if (SvROK(ST(4))) {
	    IV tmp = SvIV((SV*)SvRV(ST(4)));
	    ctx = INT2PTR(BN_CTX *,tmp);
	}
	else
	    Perl_croak_nocontext("%s: %s is not a reference",
			"Crypt::OpenSSL::EC::EC_POINT::add",
			"ctx")
;

	RETVAL = EC_POINT_add(group, r, a, b, ctx);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_dbl); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_dbl)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "group, r, a, ctx");
    {
	int	RETVAL;
	dXSTARG;
	const EC_GROUP *	group;
	EC_POINT *	r;
	const EC_POINT *	a;
	BN_CTX *	ctx;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    r = (EC_POINT *) SvIV( SvRV( ST(1) ) )
;

    if( ! SvROK( ST(2) ) ) { croak( "argument is not an object" ); }
    a = (const EC_POINT *) SvIV( SvRV( ST(2) ) )
;

	if (SvROK(ST(3))) {
	    IV tmp = SvIV((SV*)SvRV(ST(3)));
	    ctx = INT2PTR(BN_CTX *,tmp);
	}
	else
	    Perl_croak_nocontext("%s: %s is not a reference",
			"Crypt::OpenSSL::EC::EC_POINT::dbl",
			"ctx")
;

	RETVAL = EC_POINT_dbl(group, r, a, ctx);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_invert); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_invert)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "group, a, ctx");
    {
	int	RETVAL;
	dXSTARG;
	const EC_GROUP *	group;
	EC_POINT *	a;
	BN_CTX *	ctx;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    a = (EC_POINT *) SvIV( SvRV( ST(1) ) )
;

	if (SvROK(ST(2))) {
	    IV tmp = SvIV((SV*)SvRV(ST(2)));
	    ctx = INT2PTR(BN_CTX *,tmp);
	}
	else
	    Perl_croak_nocontext("%s: %s is not a reference",
			"Crypt::OpenSSL::EC::EC_POINT::invert",
			"ctx")
;

	RETVAL = EC_POINT_invert(group, a, ctx);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_is_at_infinity); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_is_at_infinity)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "group, p");
    {
	int	RETVAL;
	dXSTARG;
	const EC_GROUP *	group;
	const EC_POINT *	p;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    p = (const EC_POINT *) SvIV( SvRV( ST(1) ) )
;

	RETVAL = EC_POINT_is_at_infinity(group, p);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_is_on_curve); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_is_on_curve)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "group, point, ctx");
    {
	int	RETVAL;
	dXSTARG;
	const EC_GROUP *	group;
	const EC_POINT *	point;
	BN_CTX *	ctx;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    point = (const EC_POINT *) SvIV( SvRV( ST(1) ) )
;

	if (SvROK(ST(2))) {
	    IV tmp = SvIV((SV*)SvRV(ST(2)));
	    ctx = INT2PTR(BN_CTX *,tmp);
	}
	else
	    Perl_croak_nocontext("%s: %s is not a reference",
			"Crypt::OpenSSL::EC::EC_POINT::is_on_curve",
			"ctx")
;

	RETVAL = EC_POINT_is_on_curve(group, point, ctx);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_cmp); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_cmp)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "group, a, b, ctx");
    {
	int	RETVAL;
	dXSTARG;
	const EC_GROUP *	group;
	const EC_POINT *	a;
	const EC_POINT *	b;
	BN_CTX *	ctx;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    a = (const EC_POINT *) SvIV( SvRV( ST(1) ) )
;

    if( ! SvROK( ST(2) ) ) { croak( "argument is not an object" ); }
    b = (const EC_POINT *) SvIV( SvRV( ST(2) ) )
;

	if (SvROK(ST(3))) {
	    IV tmp = SvIV((SV*)SvRV(ST(3)));
	    ctx = INT2PTR(BN_CTX *,tmp);
	}
	else
	    Perl_croak_nocontext("%s: %s is not a reference",
			"Crypt::OpenSSL::EC::EC_POINT::cmp",
			"ctx")
;

	RETVAL = EC_POINT_cmp(group, a, b, ctx);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_make_affine); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_make_affine)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "group, point, ctx");
    {
	int	RETVAL;
	dXSTARG;
	const EC_GROUP *	group;
	EC_POINT *	point;
	BN_CTX *	ctx;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    point = (EC_POINT *) SvIV( SvRV( ST(1) ) )
;

	if (SvROK(ST(2))) {
	    IV tmp = SvIV((SV*)SvRV(ST(2)));
	    ctx = INT2PTR(BN_CTX *,tmp);
	}
	else
	    Perl_croak_nocontext("%s: %s is not a reference",
			"Crypt::OpenSSL::EC::EC_POINT::make_affine",
			"ctx")
;

	RETVAL = EC_POINT_make_affine(group, point, ctx);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}

#if 0
#define XSubPPtmpAAAH 1


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_EC_POINTs_make_affine); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_EC_POINTs_make_affine)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "group, num, EC_POINT *p[], ctx");
    {
	int	RETVAL;
	dXSTARG;
	const EC_GROUP *	group;
	size_t	num = (size_t)SvUV(ST(1))
;
	BN_CTX *	ctx;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

	if (SvROK(ST(3))) {
	    IV tmp = SvIV((SV*)SvRV(ST(3)));
	    ctx = INT2PTR(BN_CTX *,tmp);
	}
	else
	    Perl_croak_nocontext("%s: %s is not a reference",
			"Crypt::OpenSSL::EC::EC_POINT::EC_POINTs_make_affine",
			"ctx")
;

	RETVAL = EC_POINTs_make_affine(group, num, EC_POINT *p[], ctx);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_EC_POINTs_mul); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_EC_POINTs_mul)
{
    dVAR; dXSARGS;
    if (items != 7)
       croak_xs_usage(cv,  "group, r, n, num, const EC_POINT *p[], const BIGNUM *m[], ctx");
    {
	int	RETVAL;
	dXSTARG;
	const EC_GROUP *	group;
	EC_POINT *	r;
	const BIGNUM *	n;
	size_t	num = (size_t)SvUV(ST(3))
;
	BN_CTX *	ctx;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    r = (EC_POINT *) SvIV( SvRV( ST(1) ) )
;

    if( ! SvROK( ST(2) ) ) { croak( "argument is not an object" ); }
    n = (const BIGNUM *) SvIV( SvRV( ST(2) ) )
;

	if (SvROK(ST(6))) {
	    IV tmp = SvIV((SV*)SvRV(ST(6)));
	    ctx = INT2PTR(BN_CTX *,tmp);
	}
	else
	    Perl_croak_nocontext("%s: %s is not a reference",
			"Crypt::OpenSSL::EC::EC_POINT::EC_POINTs_mul",
			"ctx")
;

	RETVAL = EC_POINTs_mul(group, r, n, num, const EC_POINT *p[], const BIGNUM *m[], ctx);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}

#endif

XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_mul); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_mul)
{
    dVAR; dXSARGS;
    if (items != 6)
       croak_xs_usage(cv,  "group, r, n, q, m, ctx");
    {
	int	RETVAL;
	dXSTARG;
	const EC_GROUP *	group;
	EC_POINT *	r;
	const BIGNUM *	n;
	const EC_POINT *	q;
	const BIGNUM *	m;
	BN_CTX *	ctx;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(0) ) )
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    r = (EC_POINT *) SvIV( SvRV( ST(1) ) )
;

    if( ! SvROK( ST(2) ) ) { croak( "argument is not an object" ); }
    n = (const BIGNUM *) SvIV( SvRV( ST(2) ) )
;

    if( ! SvROK( ST(3) ) ) { croak( "argument is not an object" ); }
    q = (const EC_POINT *) SvIV( SvRV( ST(3) ) )
;

    if( ! SvROK( ST(4) ) ) { croak( "argument is not an object" ); }
    m = (const BIGNUM *) SvIV( SvRV( ST(4) ) )
;

	if (SvROK(ST(5))) {
	    IV tmp = SvIV((SV*)SvRV(ST(5)));
	    ctx = INT2PTR(BN_CTX *,tmp);
	}
	else
	    Perl_croak_nocontext("%s: %s is not a reference",
			"Crypt::OpenSSL::EC::EC_POINT::mul",
			"ctx")
;

	RETVAL = EC_POINT_mul(group, r, n, q, m, ctx);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}

#ifndef OPENSSL_NO_BIO
#define XSubPPtmpAAAI 1


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_ECPKParameters_print); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_ECPKParameters_print)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "bp, x, off");
    {
	int	RETVAL;
	dXSTARG;
	BIO *	bp;
	const EC_GROUP *	x;
	int	off = (int)SvIV(ST(2))
;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    bp = INT2PTR(BIO *,tmp);
	}
	else
	    Perl_croak_nocontext("%s: %s is not a reference",
			"Crypt::OpenSSL::EC::EC_POINT::ECPKParameters_print",
			"bp")
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    x = (const EC_GROUP *) SvIV( SvRV( ST(1) ) )
;

	RETVAL = ECPKParameters_print(bp, x, off);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}

#endif
#ifndef OPENSSL_NO_FP_API
#define XSubPPtmpAAAJ 1


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_ECPKParameters_print_fp); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_POINT_ECPKParameters_print_fp)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "fp, x, off");
    {
	int	RETVAL;
	dXSTARG;
	FILE *	fp = PerlIO_findFILE(IoIFP(sv_2io(ST(0))))
;
	const EC_GROUP *	x;
	int	off = (int)SvIV(ST(2))
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    x = (const EC_GROUP *) SvIV( SvRV( ST(1) ) )
;

	RETVAL = ECPKParameters_print_fp(fp, x, off);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}

#endif

XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_new); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_new)
{
    dVAR; dXSARGS;
    if (items != 0)
       croak_xs_usage(cv,  "");
    {
	EC_KEY *	RETVAL;
#line 385 "EC.xs"
	RETVAL = EC_KEY_new();
#line 2992 "EC.c"
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    sv_setsv(RETVALSV, sv_2mortal(sv_bless(newRV_noinc( newSViv( (IV)RETVAL ) ), gv_stashpv("Crypt::OpenSSL::EC::EC_KEY",1))));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_new_by_curve_name); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_new_by_curve_name)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "nid");
    {
	EC_KEY *	RETVAL;
	int	nid = (int)SvIV(ST(0))
;
#line 392 "EC.xs"
	RETVAL = EC_KEY_new_by_curve_name(nid);
#line 3016 "EC.c"
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    sv_setsv(RETVALSV, sv_2mortal(sv_bless(newRV_noinc( newSViv( (IV)RETVAL ) ), gv_stashpv("Crypt::OpenSSL::EC::EC_KEY",1))));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_DESTROY); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_DESTROY)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "key");
    {
	EC_KEY *	key;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    key = (EC_KEY *) SvIV( SvRV( ST(0) ) )
;
#line 399 "EC.xs"
	EC_KEY_free(key);
#line 3042 "EC.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_free); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_free)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "key");
    {
	EC_KEY *	key;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    key = (EC_KEY *) SvIV( SvRV( ST(0) ) )
;

	EC_KEY_free(key);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_copy); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_copy)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "dst, src");
    {
	EC_KEY *	RETVAL;
	EC_KEY *	dst;
	const EC_KEY *	src;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    dst = (EC_KEY *) SvIV( SvRV( ST(0) ) )
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    src = (const EC_KEY *) SvIV( SvRV( ST(1) ) )
;

	RETVAL = EC_KEY_copy(dst, src);
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    sv_setsv(RETVALSV, sv_2mortal(sv_bless(newRV_noinc( newSViv( (IV)RETVAL ) ), gv_stashpv("Crypt::OpenSSL::EC::EC_KEY",1))));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_dup); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_dup)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "src");
    {
	EC_KEY *	RETVAL;
	const EC_KEY *	src;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    src = (const EC_KEY *) SvIV( SvRV( ST(0) ) )
;

	RETVAL = EC_KEY_dup(src);
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    sv_setsv(RETVALSV, sv_2mortal(sv_bless(newRV_noinc( newSViv( (IV)RETVAL ) ), gv_stashpv("Crypt::OpenSSL::EC::EC_KEY",1))));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_up_ref); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_up_ref)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "key");
    {
	int	RETVAL;
	dXSTARG;
	EC_KEY *	key;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    key = (EC_KEY *) SvIV( SvRV( ST(0) ) )
;

	RETVAL = EC_KEY_up_ref(key);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_get0_group); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_get0_group)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "key");
    {
	const EC_GROUP *	RETVAL;
	const EC_KEY *	key;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    key = (const EC_KEY *) SvIV( SvRV( ST(0) ) )
;

	RETVAL = EC_KEY_get0_group(key);
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    sv_setsv(RETVALSV, sv_2mortal(sv_bless(newRV_noinc( newSViv( (IV)RETVAL ) ), gv_stashpv("Crypt::OpenSSL::EC::EC_GROUP",1))));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_set_group); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_set_group)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "key, group");
    {
	int	RETVAL;
	dXSTARG;
	EC_KEY *	key;
	const EC_GROUP *	group;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    key = (EC_KEY *) SvIV( SvRV( ST(0) ) )
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    group = (const EC_GROUP *) SvIV( SvRV( ST(1) ) )
;

	RETVAL = EC_KEY_set_group(key, group);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_get0_private_key); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_get0_private_key)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "key");
    {
	const BIGNUM *	RETVAL;
	const EC_KEY *	key;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    key = (const EC_KEY *) SvIV( SvRV( ST(0) ) )
;
#line 422 "EC.xs"
        RETVAL = BN_dup(EC_KEY_get0_private_key(key));
#line 3214 "EC.c"
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    sv_setsv(RETVALSV, sv_2mortal(sv_bless(newRV_noinc( newSViv( (IV)RETVAL ) ), gv_stashpv("Crypt::OpenSSL::Bignum",1))));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_set_private_key); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_set_private_key)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "key, prv");
    {
	int	RETVAL;
	dXSTARG;
	EC_KEY *	key;
	const BIGNUM *	prv;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    key = (EC_KEY *) SvIV( SvRV( ST(0) ) )
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    prv = (const BIGNUM *) SvIV( SvRV( ST(1) ) )
;

	RETVAL = EC_KEY_set_private_key(key, prv);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_get0_public_key); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_get0_public_key)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "key");
    {
	const EC_POINT *	RETVAL;
	const EC_KEY *	key;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    key = (const EC_KEY *) SvIV( SvRV( ST(0) ) )
;
#line 432 "EC.xs"
        RETVAL = EC_POINT_dup(EC_KEY_get0_public_key(key), EC_KEY_get0_group(key));
#line 3268 "EC.c"
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    sv_setsv(RETVALSV, sv_2mortal(sv_bless(newRV_noinc( newSViv( (IV)RETVAL ) ), gv_stashpv("Crypt::OpenSSL::EC::EC_POINT",1))));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_set_public_key); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_set_public_key)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "key, pub");
    {
	int	RETVAL;
	dXSTARG;
	EC_KEY *	key;
	const EC_POINT *	pub;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    key = (EC_KEY *) SvIV( SvRV( ST(0) ) )
;

    if( ! SvROK( ST(1) ) ) { croak( "argument is not an object" ); }
    pub = (const EC_POINT *) SvIV( SvRV( ST(1) ) )
;

	RETVAL = EC_KEY_set_public_key(key, pub);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_get_enc_flags); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_get_enc_flags)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "key");
    {
	unsigned	RETVAL;
	dXSTARG;
	const EC_KEY *	key;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    key = (const EC_KEY *) SvIV( SvRV( ST(0) ) )
;

	RETVAL = EC_KEY_get_enc_flags(key);
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_set_enc_flags); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_set_enc_flags)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "key, flags");
    {
	EC_KEY *	key;
	unsigned int	flags = (unsigned int)SvUV(ST(1))
;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    key = (EC_KEY *) SvIV( SvRV( ST(0) ) )
;

	EC_KEY_set_enc_flags(key, flags);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_get_conv_form); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_get_conv_form)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "key");
    {
	point_conversion_form_t	RETVAL;
	dXSTARG;
	const EC_KEY *	key;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    key = (const EC_KEY *) SvIV( SvRV( ST(0) ) )
;

	RETVAL = EC_KEY_get_conv_form(key);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_set_conv_form); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_set_conv_form)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "key, theform");
    {
	EC_KEY *	key;
	point_conversion_form_t	theform = (point_conversion_form_t)SvIV(ST(1))
;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    key = (EC_KEY *) SvIV( SvRV( ST(0) ) )
;

	EC_KEY_set_conv_form(key, theform);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_set_asn1_flag); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_set_asn1_flag)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "key, flag");
    {
	EC_KEY *	key;
	int	flag = (int)SvIV(ST(1))
;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    key = (EC_KEY *) SvIV( SvRV( ST(0) ) )
;

	EC_KEY_set_asn1_flag(key, flag);
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_precompute_mult); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_precompute_mult)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "key, ctx");
    {
	int	RETVAL;
	dXSTARG;
	EC_KEY *	key;
	BN_CTX *	ctx;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    key = (EC_KEY *) SvIV( SvRV( ST(0) ) )
;

	if (SvROK(ST(1))) {
	    IV tmp = SvIV((SV*)SvRV(ST(1)));
	    ctx = INT2PTR(BN_CTX *,tmp);
	}
	else
	    Perl_croak_nocontext("%s: %s is not a reference",
			"Crypt::OpenSSL::EC::EC_KEY::precompute_mult",
			"ctx")
;

	RETVAL = EC_KEY_precompute_mult(key, ctx);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_generate_key); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_generate_key)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "key");
    {
	int	RETVAL;
	dXSTARG;
	EC_KEY *	key;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    key = (EC_KEY *) SvIV( SvRV( ST(0) ) )
;

	RETVAL = EC_KEY_generate_key(key);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_check_key); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_Crypt__OpenSSL__EC__EC_KEY_check_key)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "key");
    {
	int	RETVAL;
	dXSTARG;
	const EC_KEY *	key;

    if( ! SvROK( ST(0) ) ) { croak( "argument is not an object" ); }
    key = (const EC_KEY *) SvIV( SvRV( ST(0) ) )
;

	RETVAL = EC_KEY_check_key(key);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}

#ifdef __cplusplus
extern "C"
#endif
XS_EXTERNAL(boot_Crypt__OpenSSL__EC); /* prototype to pass -Wmissing-prototypes */
XS_EXTERNAL(boot_Crypt__OpenSSL__EC)
{
#if PERL_VERSION_LE(5, 21, 5)
    dVAR; dXSARGS;
#else
    dVAR; dXSBOOTARGSXSAPIVERCHK;
#endif
#if (PERL_REVISION == 5 && PERL_VERSION < 9)
    char* file = __FILE__;
#else
    const char* file = __FILE__;
#endif

    PERL_UNUSED_VAR(file);

    PERL_UNUSED_VAR(cv); /* -W */
    PERL_UNUSED_VAR(items); /* -W */
#if PERL_VERSION_LE(5, 21, 5)
    XS_VERSION_BOOTCHECK;
#  ifdef XS_APIVERSION_BOOTCHECK
    XS_APIVERSION_BOOTCHECK;
#  endif
#endif

        (void)newXSproto_portable("Crypt::OpenSSL::EC::constant", XS_Crypt__OpenSSL__EC_constant, file, "$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_GFp_simple_method", XS_Crypt__OpenSSL__EC_EC_GFp_simple_method, file, "");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_GFp_mont_method", XS_Crypt__OpenSSL__EC_EC_GFp_mont_method, file, "");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_GFp_nist_method", XS_Crypt__OpenSSL__EC_EC_GFp_nist_method, file, "");
#if XSubPPtmpAAAA
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_GF2m_simple_method", XS_Crypt__OpenSSL__EC_EC_GF2m_simple_method, file, "");
#endif
#if XSubPPtmpAAAB
        (void)newXSproto_portable("Crypt::OpenSSL::EC::ECParameters_print", XS_Crypt__OpenSSL__EC_ECParameters_print, file, "$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_KEY_print", XS_Crypt__OpenSSL__EC_EC_KEY_print, file, "$$$");
#endif
#if XSubPPtmpAAAC
        (void)newXSproto_portable("Crypt::OpenSSL::EC::ECParameters_print_fp", XS_Crypt__OpenSSL__EC_ECParameters_print_fp, file, "$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_KEY_print_fp", XS_Crypt__OpenSSL__EC_EC_KEY_print_fp, file, "$$$");
#endif
        (void)newXSproto_portable("Crypt::OpenSSL::EC::ERR_get_error", XS_Crypt__OpenSSL__EC_ERR_get_error, file, "");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::ERR_error_string", XS_Crypt__OpenSSL__EC_ERR_error_string, file, "$;$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_GROUP::new", XS_Crypt__OpenSSL__EC__EC_GROUP_new, file, "$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_GROUP::DESTROY", XS_Crypt__OpenSSL__EC__EC_GROUP_DESTROY, file, "$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_GROUP::free", XS_Crypt__OpenSSL__EC__EC_GROUP_free, file, "$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_GROUP::copy", XS_Crypt__OpenSSL__EC__EC_GROUP_copy, file, "$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_GROUP::dup", XS_Crypt__OpenSSL__EC__EC_GROUP_dup, file, "$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_GROUP::method_of", XS_Crypt__OpenSSL__EC__EC_GROUP_method_of, file, "$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_GROUP::EC_METHOD_get_field_type", XS_Crypt__OpenSSL__EC__EC_GROUP_EC_METHOD_get_field_type, file, "$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_GROUP::set_generator", XS_Crypt__OpenSSL__EC__EC_GROUP_set_generator, file, "$$$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_GROUP::get0_generator", XS_Crypt__OpenSSL__EC__EC_GROUP_get0_generator, file, "$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_GROUP::get_order", XS_Crypt__OpenSSL__EC__EC_GROUP_get_order, file, "$$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_GROUP::get_cofactor", XS_Crypt__OpenSSL__EC__EC_GROUP_get_cofactor, file, "$$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_GROUP::set_curve_name", XS_Crypt__OpenSSL__EC__EC_GROUP_set_curve_name, file, "$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_GROUP::get_curve_name", XS_Crypt__OpenSSL__EC__EC_GROUP_get_curve_name, file, "$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_GROUP::set_asn1_flag", XS_Crypt__OpenSSL__EC__EC_GROUP_set_asn1_flag, file, "$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_GROUP::get_asn1_flag", XS_Crypt__OpenSSL__EC__EC_GROUP_get_asn1_flag, file, "$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_GROUP::set_point_conversion_form", XS_Crypt__OpenSSL__EC__EC_GROUP_set_point_conversion_form, file, "$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_GROUP::get_point_conversion_form", XS_Crypt__OpenSSL__EC__EC_GROUP_get_point_conversion_form, file, "$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_GROUP::get0_seed", XS_Crypt__OpenSSL__EC__EC_GROUP_get0_seed, file, "$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_GROUP::get_seed_len", XS_Crypt__OpenSSL__EC__EC_GROUP_get_seed_len, file, "$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_GROUP::set_seed", XS_Crypt__OpenSSL__EC__EC_GROUP_set_seed, file, "$$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_GROUP::set_curve_GFp", XS_Crypt__OpenSSL__EC__EC_GROUP_set_curve_GFp, file, "$$$$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_GROUP::get_curve_GFp", XS_Crypt__OpenSSL__EC__EC_GROUP_get_curve_GFp, file, "$$$$$");
#if XSubPPtmpAAAD
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_GROUP::set_curve_GF2m", XS_Crypt__OpenSSL__EC__EC_GROUP_set_curve_GF2m, file, "$$$$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_GROUP::get_curve_GF2m", XS_Crypt__OpenSSL__EC__EC_GROUP_get_curve_GF2m, file, "$$$$$");
#endif
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_GROUP::get_degree", XS_Crypt__OpenSSL__EC__EC_GROUP_get_degree, file, "$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_GROUP::check", XS_Crypt__OpenSSL__EC__EC_GROUP_check, file, "$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_GROUP::check_discriminant", XS_Crypt__OpenSSL__EC__EC_GROUP_check_discriminant, file, "$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_GROUP::cmp", XS_Crypt__OpenSSL__EC__EC_GROUP_cmp, file, "$$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_GROUP::new_curve_GFp", XS_Crypt__OpenSSL__EC__EC_GROUP_new_curve_GFp, file, "$$$$");
#if XSubPPtmpAAAE
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_GROUP::new_curve_GF2m", XS_Crypt__OpenSSL__EC__EC_GROUP_new_curve_GF2m, file, "$$$$");
#endif
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_GROUP::new_by_curve_name", XS_Crypt__OpenSSL__EC__EC_GROUP_new_by_curve_name, file, "$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_GROUP::precompute_mult", XS_Crypt__OpenSSL__EC__EC_GROUP_precompute_mult, file, "$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_GROUP::have_precompute_mult", XS_Crypt__OpenSSL__EC__EC_GROUP_have_precompute_mult, file, "$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_GROUP::get_basis_type", XS_Crypt__OpenSSL__EC__EC_GROUP_get_basis_type, file, "$");
#if XSubPPtmpAAAF
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_GROUP::get_trinomial_basis", XS_Crypt__OpenSSL__EC__EC_GROUP_get_trinomial_basis, file, "$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_GROUP::get_pentanomial_basis", XS_Crypt__OpenSSL__EC__EC_GROUP_get_pentanomial_basis, file, "$$$$");
#endif
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_POINT::new", XS_Crypt__OpenSSL__EC__EC_POINT_new, file, "$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_POINT::DESTROY", XS_Crypt__OpenSSL__EC__EC_POINT_DESTROY, file, "$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_POINT::free", XS_Crypt__OpenSSL__EC__EC_POINT_free, file, "$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_POINT::clear_free", XS_Crypt__OpenSSL__EC__EC_POINT_clear_free, file, "$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_POINT::copy", XS_Crypt__OpenSSL__EC__EC_POINT_copy, file, "$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_POINT::dup", XS_Crypt__OpenSSL__EC__EC_POINT_dup, file, "$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_POINT::method_of", XS_Crypt__OpenSSL__EC__EC_POINT_method_of, file, "$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_POINT::set_to_infinity", XS_Crypt__OpenSSL__EC__EC_POINT_set_to_infinity, file, "$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_POINT::set_Jprojective_coordinates_GFp", XS_Crypt__OpenSSL__EC__EC_POINT_set_Jprojective_coordinates_GFp, file, "$$$$$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_POINT::get_Jprojective_coordinates_GFp", XS_Crypt__OpenSSL__EC__EC_POINT_get_Jprojective_coordinates_GFp, file, "$$$$$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_POINT::set_affine_coordinates_GFp", XS_Crypt__OpenSSL__EC__EC_POINT_set_affine_coordinates_GFp, file, "$$$$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_POINT::get_affine_coordinates_GFp", XS_Crypt__OpenSSL__EC__EC_POINT_get_affine_coordinates_GFp, file, "$$$$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_POINT::set_compressed_coordinates_GFp", XS_Crypt__OpenSSL__EC__EC_POINT_set_compressed_coordinates_GFp, file, "$$$$$");
#if XSubPPtmpAAAG
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_POINT::set_affine_coordinates_GF2m", XS_Crypt__OpenSSL__EC__EC_POINT_set_affine_coordinates_GF2m, file, "$$$$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_POINT::get_affine_coordinates_GF2m", XS_Crypt__OpenSSL__EC__EC_POINT_get_affine_coordinates_GF2m, file, "$$$$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_POINT::set_compressed_coordinates_GF2m", XS_Crypt__OpenSSL__EC__EC_POINT_set_compressed_coordinates_GF2m, file, "$$$$$");
#endif
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_POINT::point2oct", XS_Crypt__OpenSSL__EC__EC_POINT_point2oct, file, "$$$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_POINT::oct2point", XS_Crypt__OpenSSL__EC__EC_POINT_oct2point, file, "$$$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_POINT::point2bn", XS_Crypt__OpenSSL__EC__EC_POINT_point2bn, file, "$$$$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_POINT::bn2point", XS_Crypt__OpenSSL__EC__EC_POINT_bn2point, file, "$$$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_POINT::point2hex", XS_Crypt__OpenSSL__EC__EC_POINT_point2hex, file, "$$$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_POINT::hex2point", XS_Crypt__OpenSSL__EC__EC_POINT_hex2point, file, "$$$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_POINT::add", XS_Crypt__OpenSSL__EC__EC_POINT_add, file, "$$$$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_POINT::dbl", XS_Crypt__OpenSSL__EC__EC_POINT_dbl, file, "$$$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_POINT::invert", XS_Crypt__OpenSSL__EC__EC_POINT_invert, file, "$$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_POINT::is_at_infinity", XS_Crypt__OpenSSL__EC__EC_POINT_is_at_infinity, file, "$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_POINT::is_on_curve", XS_Crypt__OpenSSL__EC__EC_POINT_is_on_curve, file, "$$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_POINT::cmp", XS_Crypt__OpenSSL__EC__EC_POINT_cmp, file, "$$$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_POINT::make_affine", XS_Crypt__OpenSSL__EC__EC_POINT_make_affine, file, "$$$");
#if XSubPPtmpAAAH
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_POINT::EC_POINTs_make_affine", XS_Crypt__OpenSSL__EC__EC_POINT_EC_POINTs_make_affine, file, "$$$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_POINT::EC_POINTs_mul", XS_Crypt__OpenSSL__EC__EC_POINT_EC_POINTs_mul, file, "$$$$$$$");
#endif
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_POINT::mul", XS_Crypt__OpenSSL__EC__EC_POINT_mul, file, "$$$$$$");
#if XSubPPtmpAAAI
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_POINT::ECPKParameters_print", XS_Crypt__OpenSSL__EC__EC_POINT_ECPKParameters_print, file, "$$$");
#endif
#if XSubPPtmpAAAJ
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_POINT::ECPKParameters_print_fp", XS_Crypt__OpenSSL__EC__EC_POINT_ECPKParameters_print_fp, file, "$$$");
#endif
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_KEY::new", XS_Crypt__OpenSSL__EC__EC_KEY_new, file, "");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_KEY::new_by_curve_name", XS_Crypt__OpenSSL__EC__EC_KEY_new_by_curve_name, file, "$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_KEY::DESTROY", XS_Crypt__OpenSSL__EC__EC_KEY_DESTROY, file, "$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_KEY::free", XS_Crypt__OpenSSL__EC__EC_KEY_free, file, "$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_KEY::copy", XS_Crypt__OpenSSL__EC__EC_KEY_copy, file, "$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_KEY::dup", XS_Crypt__OpenSSL__EC__EC_KEY_dup, file, "$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_KEY::up_ref", XS_Crypt__OpenSSL__EC__EC_KEY_up_ref, file, "$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_KEY::get0_group", XS_Crypt__OpenSSL__EC__EC_KEY_get0_group, file, "$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_KEY::set_group", XS_Crypt__OpenSSL__EC__EC_KEY_set_group, file, "$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_KEY::get0_private_key", XS_Crypt__OpenSSL__EC__EC_KEY_get0_private_key, file, "$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_KEY::set_private_key", XS_Crypt__OpenSSL__EC__EC_KEY_set_private_key, file, "$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_KEY::get0_public_key", XS_Crypt__OpenSSL__EC__EC_KEY_get0_public_key, file, "$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_KEY::set_public_key", XS_Crypt__OpenSSL__EC__EC_KEY_set_public_key, file, "$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_KEY::get_enc_flags", XS_Crypt__OpenSSL__EC__EC_KEY_get_enc_flags, file, "$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_KEY::set_enc_flags", XS_Crypt__OpenSSL__EC__EC_KEY_set_enc_flags, file, "$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_KEY::get_conv_form", XS_Crypt__OpenSSL__EC__EC_KEY_get_conv_form, file, "$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_KEY::set_conv_form", XS_Crypt__OpenSSL__EC__EC_KEY_set_conv_form, file, "$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_KEY::set_asn1_flag", XS_Crypt__OpenSSL__EC__EC_KEY_set_asn1_flag, file, "$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_KEY::precompute_mult", XS_Crypt__OpenSSL__EC__EC_KEY_precompute_mult, file, "$$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_KEY::generate_key", XS_Crypt__OpenSSL__EC__EC_KEY_generate_key, file, "$");
        (void)newXSproto_portable("Crypt::OpenSSL::EC::EC_KEY::check_key", XS_Crypt__OpenSSL__EC__EC_KEY_check_key, file, "$");

    /* Initialisation Section */

#line 19 "EC.xs"
    ERR_load_crypto_strings();
    ERR_load_EC_strings();

#if XSubPPtmpAAAA
#endif
#if XSubPPtmpAAAB
#endif
#if XSubPPtmpAAAC
#endif
#if XSubPPtmpAAAD
#endif
#if XSubPPtmpAAAE
#endif
#if XSubPPtmpAAAF
#endif
#if XSubPPtmpAAAG
#endif
#if XSubPPtmpAAAH
#endif
#if XSubPPtmpAAAI
#endif
#if XSubPPtmpAAAJ
#endif
#line 3667 "EC.c"

    /* End of Initialisation Section */

#if PERL_VERSION_LE(5, 21, 5)
#  if PERL_VERSION_GE(5, 9, 0)
    if (PL_unitcheckav)
        call_list(PL_scopestack_ix, PL_unitcheckav);
#  endif
    XSRETURN_YES;
#else
    Perl_xs_boot_epilog(aTHX_ ax);
#endif
}

