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

#line 1 "Generate.xs"
/* -*- mode:C tab-width:4 -*- */
#define PERL_NO_GET_CONTEXT
#include "EXTERN.h"
#include "perl.h"
#include "perlapi.h"
#include "XSUB.h"


#ifdef PERL_OBJECT
# undef PL_op_name
# undef PL_opargs
# undef PL_op_desc
# define PL_op_name (get_op_names())
# define PL_opargs (get_opargs())
# define PL_op_desc (get_op_descs())
#endif

/* CPAN #28912: MSWin32 and AIX as only platforms do not export PERL_CORE functions,
   such as Perl_pad_alloc, Perl_cv_clone, fold_constants,
   so disable this feature. cygwin gcc-3 --export-all-symbols was non-strict, gcc-4 is.
   POSIX with export PERL_DL_NONLAZY=1 also fails. This is checked in Makefile.PL
   but cannot be solved for clients adding it.
   TODO: Add the patchlevel here when it is fixed in CORE.
*/
#if !defined (DISABLE_PERL_CORE_EXPORTED) &&					\
  (defined(WIN32) ||											\
   defined(_MSC_VER) || defined(__MINGW32_VERSION) ||			\
   (defined(__CYGWIN__) && (__GNUC__ > 3)) || defined(AIX))
# define DISABLE_PERL_CORE_EXPORTED
#endif

#ifdef DISABLE_PERL_CORE_EXPORTED
# undef HAVE_PAD_ALLOC
# undef HAVE_CV_CLONE
# undef HAVE_FOLD_CONSTANTS
#endif

#ifdef PERL_CUSTOM_OPS
# define CHECK_CUSTOM_OPS \
    if (typenum == OP_CUSTOM) \
        o->op_ppaddr = custom_op_ppaddr(SvPV_nolen(type));
#else
# define CHECK_CUSTOM_OPS
#endif

#ifndef PadARRAY
#undef HAVE_PADNAMELIST
# if PERL_VERSION < 8 || (PERL_VERSION == 8 && !PERL_SUBVERSION)
typedef AV PADLIST;
typedef AV PAD;
# endif
# define PadlistARRAY(pl)	((PAD **)AvARRAY(pl))
# define PadlistNAMES(pl)	(*PadlistARRAY(pl))
# define PadARRAY			AvARRAY
# define PadnamelistMAX		AvFILLp
# define PadnamelistARRAY	AvARRAY
#else
#define HAVE_PADNAMELIST
#endif

#ifndef SvIS_FREED
#  define SvIS_FREED(sv) ((sv)->sv_flags == SVTYPEMASK)
#endif
#ifndef OpSIBLING
# ifdef PERL_OP_PARENT
#  define OpSIBLING(o)		  (0 + (o)->op_moresib ? (o)->op_sibparent : NULL)
#  define OpSIBLING_set(o, v) ((o)->op_moresib ? (o)->op_sibparent = (v) : NULL)
# else
#  define OpSIBLING(o)        (o)->op_sibling
#  define OpSIBLING_set(o, v) (o)->op_sibling = (v)
# endif
#else
#  ifndef OpSIBLING_set
#    define OpSIBLING_set(o, v) OpMORESIB_set((o), (v))
#  endif
#endif

#ifndef CvISXSUB
# ifdef CvXSUB
#   define CvISXSUB(cv) CvXSUB(cv)
# else
#   error no CvISXSUB nor CvXSUB
# endif
#endif

static const char* const svclassnames[] = {
    "B::NULL",
#if PERL_VERSION >= 9 && PERL_VERSION < 19
    "B::BIND",
#endif
    "B::IV",
    "B::NV",
#if PERL_VERSION <= 10
    "B::RV",
#endif
    "B::PV",
#if PERL_VERSION >= 19
    "B::INVLIST",
#endif
    "B::PVIV",
    "B::PVNV",
    "B::PVMG",
#if PERL_VERSION <= 8
    "B::BM",
#endif
#if PERL_VERSION >= 11
    "B::REGEXP",
#endif
#if PERL_VERSION >= 9
    "B::GV",
#endif
    "B::PVLV",
    "B::AV",
    "B::HV",
    "B::CV",
#if PERL_VERSION <= 8
    "B::GV",
#endif
    "B::FM",
    "B::IO",
};

typedef enum {
    OPc_NULL,   /* 0 */
    OPc_BASEOP, /* 1 */
    OPc_UNOP,   /* 2 */
    OPc_BINOP,  /* 3 */
    OPc_LOGOP,  /* 4 */
    OPc_LISTOP, /* 5 */
    OPc_PMOP,   /* 6 */
    OPc_SVOP,   /* 7 */
    OPc_PADOP,  /* 8 */
    OPc_PVOP,   /* 9 */
    OPc_CVOP,   /* 10 */
    OPc_LOOP,   /* 11 */
    OPc_COP,     /* 12 */
    OPc_METHOP, /* 13 */
    OPc_UNOP_AUX /* 14 */
} opclass;

static char *opclassnames[] = {
    "B::NULL",
    "B::OP",
    "B::UNOP",
    "B::BINOP",
    "B::LOGOP",
    "B::LISTOP",
    "B::PMOP",
    "B::SVOP",
    "B::PADOP",
    "B::PVOP",
    "B::CVOP",
    "B::LOOP",
    "B::COP",
    "B::METHOP",
    "B::UNOP_AUX"
};

static int walkoptree_debug = 0; /* Flag for walkoptree debug hook */

static SV *specialsv_list[7];    /* 0-6 */

AV * tmp_comppad;
#ifdef HAVE_PADNAMELIST
PADNAMELIST * tmp_comppad_name;
#else
AV * tmp_comppad_name;
#endif
I32 tmp_padix, tmp_reset_pending;
OP * tmp_op;

CV * my_curr_cv = NULL;

SV** my_current_pad;
SV** tmp_pad;

HV* root_cache;

#define GEN_PAD  { set_active_sub(find_cv_by_root((OP*)o));tmp_pad = PL_curpad;PL_curpad = my_current_pad;}
#define GEN_PAD_CV(cv) { set_active_sub(cv);tmp_pad = PL_curpad;PL_curpad = my_current_pad;}
#define OLD_PAD      (PL_curpad = tmp_pad)

#define SAVE_VARS \
{ \
	tmp_comppad       = PL_comppad; \
	tmp_comppad_name  = PL_comppad_name; \
	tmp_padix         = PL_padix; \
	tmp_reset_pending = PL_pad_reset_pending; \
	tmp_pad           = PL_curpad; \
	tmp_op            = PL_op; \
	if ( my_curr_cv) { \
		PL_comppad       = PadlistARRAY(CvPADLIST(my_curr_cv))[1]; \
		PL_comppad_name  = PadlistNAMES(CvPADLIST(my_curr_cv)); \
		PL_padix         = PadnamelistMAX(PL_comppad_name); \
		PL_pad_reset_pending = 0; \
	} \
	PL_curpad = AvARRAY(PL_comppad); \
}

#define RESTORE_VARS \
{ \
	PL_op                = tmp_op; \
	PL_comppad           = tmp_comppad; \
	PL_curpad            = tmp_pad; \
	PL_padix             = tmp_padix; \
	PL_comppad_name      = tmp_comppad_name; \
	PL_pad_reset_pending = tmp_reset_pending; \
}

void
set_active_sub(SV *sv)
{
    dTHX;
    PADLIST* padlist;
    PAD** svp;
    /* sv_dump(SvRV(sv)); */
    padlist = CvPADLIST(SvRV(sv));
    if (!padlist) {
        dTHX;				/* XXX coverage 0 */
        sv_dump(sv);
        sv_dump((SV*)SvRV(sv));
        croak("set_active_sub: !CvPADLIST(SvRV(sv))");
    }
    svp = PadlistARRAY(padlist);
    my_current_pad = PadARRAY(svp[1]); /* => GEN_PAD */
}

static SV *
find_cv_by_root(OP* o) {
  dTHX;
  OP* root = o;
  SV* key;
  HE* cached;

  if (PL_compcv && SvTYPE(PL_compcv) == SVt_PVCV && !PL_eval_root) {
	/* XXX coverage 0 */
	if (SvROK(PL_compcv)) {
	  sv_dump(SvRV(PL_compcv));
	  croak("find_cv_by_root: SvROK(PL_compcv)");
	}
	return newRV((SV*)PL_compcv);
  }

  if (!root_cache)
    root_cache = newHV();

  while(root->op_next)
    root = root->op_next;

  key = newSViv(PTR2IV(root));

  cached = hv_fetch_ent(root_cache, key, 0, 0);
  if (cached) {
    SvREFCNT_dec(key);
    return HeVAL(cached);
  }

  if (PL_main_root == root) {
    /* Special case, this is the main root */
    cached = hv_store_ent(root_cache, key, newRV((SV*)PL_main_cv), 0);
  } else if (PL_eval_root == root && PL_compcv) {
    SV* tmpcv = (SV*)NEWSV(1104,0);			/* XXX coverage 0 */
    sv_upgrade((SV *)tmpcv, SVt_PVCV);
    CvPADLIST(tmpcv) = CvPADLIST(PL_compcv);
    SvREFCNT_inc(CvPADLIST(tmpcv));
    CvROOT(tmpcv) = root;
    OP_REFCNT_LOCK;
    OpREFCNT_inc(root);
    OP_REFCNT_UNLOCK;
    cached = hv_store_ent(root_cache, key, newRV((SV*)tmpcv), 0);
  } else {
    /* Need to walk the symbol table, yay */
    CV* cv = 0;
    SV* sva;
    SV* sv;
    register SV* svend;

    for (sva = PL_sv_arenaroot; sva; sva = (SV*)SvANY(sva)) {
      svend = &sva[SvREFCNT(sva)];
      for (sv = sva + 1; sv < svend; ++sv) {
        if (!SvIS_FREED(sv) && SvREFCNT(sv)) {
          if (SvTYPE(sv) == SVt_PVCV &&
             CvROOT(sv) == root
             ) {
            cv = (CV*) sv;
			goto out;
          } else if ( SvTYPE(sv) == SVt_PVGV &&
#if PERL_VERSION >= 10
                     isGV_with_GP(sv) &&
#endif
                     GvGP(sv) &&
                     GvCV(sv) && !SvVALID(sv) && !CvXSUB(GvCV(sv)) &&
                     CvROOT(GvCV(sv)) == root)
          {
              cv = (CV*) GvCV(sv);			/* XXX coverage 0 */
			  goto out;
          }
        }
      }
    }

    if (!cv) {
        croak("find_cv_by_root: couldn't find the root cv\n");	/* XXX coverage 0 */
    }
  out:
    cached = hv_store_ent(root_cache, key, newRV((SV*)cv), 0);
  }

  SvREFCNT_dec(key);
  return (SV*) HeVAL(cached);
}


static SV *
make_sv_object(pTHX_ SV *arg, SV *sv)
{
    char *type = 0;
    IV iv;

    for (iv = 0; iv < sizeof(specialsv_list)/sizeof(SV*); iv++) {
        if (sv == specialsv_list[iv]) {
            type = "B::SPECIAL";			/* XXX coverage 0 */
            break;
        }
    }
    if (!type) {
        type = (char*)svclassnames[SvTYPE(sv)];
        iv = PTR2IV(sv);
    }
    sv_setiv(newSVrv(arg, type), iv);
    return arg;
}


/*
   #define PERL_CUSTOM_OPS
   now defined by Makefile.PL, if building for 5.8.x
 */
static I32
op_name_to_num(SV * name)
{
    dTHX;
    char const *s;
    char *wanted = SvPV_nolen(name);
    int i =0;
    int topop = OP_max;

#ifdef PERL_CUSTOM_OPS
    topop--;
#endif

    if (SvIOK(name) && SvIV(name) >= 0 && SvIV(name) < topop)
        return SvIV(name);			/* XXX coverage 0 */

    for (s = PL_op_name[i]; s; s = PL_op_name[++i]) {
        if (strEQ(s, wanted))
            return i;
    }
#ifdef PERL_CUSTOM_OPS
    if (PL_custom_op_names) {
        HE* ent;
        SV* value;

        /* This is sort of a hv_exists, backwards - since custom-ops
	   are stored using their pp-addr as key, we must scan the
	   values */
        (void)hv_iterinit(PL_custom_op_names);
        while ((ent = hv_iternext(PL_custom_op_names))) {
            if (strEQ(SvPV_nolen(hv_iterval(PL_custom_op_names,ent)),wanted))
                return OP_CUSTOM;
        }
    }
#endif

    croak("No such op \"%s\"", SvPV_nolen(name));	/* XXX coverage 0 */

    return -1;
}

#ifdef PERL_CUSTOM_OPS
static void*
custom_op_ppaddr(char *name)
{
    dTHX;
    HE *ent;
    SV *value;
    if (!PL_custom_op_names)
        return 0;

    /* This is sort of a hv_fetch, backwards */
    (void)hv_iterinit(PL_custom_op_names);
    while ((ent = hv_iternext(PL_custom_op_names))) {
        if (strEQ(SvPV_nolen(hv_iterval(PL_custom_op_names,ent)),name))
            return INT2PTR(void*,SvIV(hv_iterkeysv(ent)));
    }

    return 0;
}
#endif

static opclass
cc_opclass(pTHX_ const OP *o)
{
    bool custom = 0;

    if (!o)
	return OPc_NULL;

    if (o->op_type == 0)
	return (o->op_flags & OPf_KIDS) ? OPc_UNOP : OPc_BASEOP;

    if (o->op_type == OP_SASSIGN)
	return ((o->op_private & OPpASSIGN_BACKWARDS) ? OPc_UNOP : OPc_BINOP);

    if (o->op_type == OP_AELEMFAST) {
	if (o->op_flags & OPf_SPECIAL)
	    return OPc_BASEOP;
	else
#ifdef USE_ITHREADS
	    return OPc_PADOP;
#else
	    return OPc_SVOP;
#endif
    }
    
#ifdef USE_ITHREADS
    if (o->op_type == OP_GV || o->op_type == OP_GVSV 
        || o->op_type == OP_RCATLINE)
	return OPc_PADOP;
#endif

#ifdef PERL_CUSTOM_OPS
    if (o->op_type == OP_CUSTOM)
        custom = 1;
#endif

    switch (PL_opargs[o->op_type] & OA_CLASS_MASK) {
    case OA_BASEOP:
	return OPc_BASEOP;

    case OA_UNOP:
	return OPc_UNOP;

    case OA_BINOP:
	return OPc_BINOP;

    case OA_LOGOP:
	return OPc_LOGOP;

    case OA_LISTOP:
	return OPc_LISTOP;

    case OA_PMOP:
	return OPc_PMOP;

    case OA_SVOP:
	return OPc_SVOP;

    case OA_PVOP_OR_SVOP:
        /*
         * Character translations (tr///) are usually a PVOP, keeping a 
         * pointer to a table of shorts used to look up translations.
         * Under utf8, however, a simple table isn't practical; instead,
         * the OP is an SVOP (or, under threads, a PADOP),
         * and the SV is a reference to a swash
         * (i.e., an RV pointing to an HV).
         */
	return (!custom &&
		   (o->op_private & (OPpTRANS_TO_UTF|OPpTRANS_FROM_UTF))
	       )
#if  defined(USE_ITHREADS) \
  && (PERL_VERSION > 8 || (PERL_VERSION == 8 && PERL_SUBVERSION >= 9))
		? OPc_PADOP : OPc_PVOP;
#else
		? OPc_SVOP : OPc_PVOP;
#endif

    case OA_LOOP:
	return OPc_LOOP;

    case OA_COP:
	return OPc_COP;

#if PERL_VERSION >= 22
    case OA_METHOP:
	return OPc_METHOP;

    case OA_UNOP_AUX:
	return OPc_UNOP_AUX;
#endif

    case OA_BASEOP_OR_UNOP:
	/*
	 * UNI(OP_foo) in toke.c returns token UNI or FUNC1 depending on
	 * whether parens were seen. perly.y uses OPf_SPECIAL to
	 * signal whether a BASEOP had empty parens or none.
	 * Some other UNOPs are created later, though, so the best
	 * test is OPf_KIDS, which is set in newUNOP.
	 */
	return (o->op_flags & OPf_KIDS) ? OPc_UNOP : OPc_BASEOP;

    case OA_FILESTATOP:
	/*
	 * The file stat OPs are created via UNI(OP_foo) in toke.c but use
	 * the OPf_REF flag to distinguish between OP types instead of the
	 * usual OPf_SPECIAL flag. As usual, if OPf_KIDS is set, then we
	 * return OPc_UNOP so that walkoptree can find our children. If
	 * OPf_KIDS is not set then we check OPf_REF. Without OPf_REF set
	 * (no argument to the operator) it's an OP; with OPf_REF set it's
	 * an SVOP (and op_sv is the GV for the filehandle argument).
	 */
	return ((o->op_flags & OPf_KIDS) ? OPc_UNOP :
#ifdef USE_ITHREADS
		(o->op_flags & OPf_REF) ? OPc_PADOP : OPc_BASEOP);
#else
		(o->op_flags & OPf_REF) ? OPc_SVOP : OPc_BASEOP);
#endif
    case OA_LOOPEXOP:
	/*
	 * next, last, redo, dump and goto use OPf_SPECIAL to indicate that a
	 * label was omitted (in which case it's a BASEOP) or else a term was
	 * seen. In this last case, all except goto are definitely PVOP but
	 * goto is either a PVOP (with an ordinary constant label), an UNOP
	 * with OPf_STACKED (with a non-constant non-sub) or an UNOP for
	 * OP_REFGEN (with goto &sub) in which case OPf_STACKED also seems to
	 * get set.
	 */
	if (o->op_flags & OPf_STACKED)
	    return OPc_UNOP;
	else if (o->op_flags & OPf_SPECIAL)
	    return OPc_BASEOP;
	else
	    return OPc_PVOP;
    }
    warn("can't determine class of operator %s, assuming BASEOP\n",
         OP_NAME(o));
    return OPc_BASEOP;
}

static char *
cc_opclassname(pTHX_ OP *o)
{
    return opclassnames[cc_opclass(aTHX_ o)];
}

static OP *
SVtoO(SV* sv)
{
    dTHX;
    if (SvROK(sv)) {
        IV tmp = SvIV((SV*)SvRV(sv));
        return INT2PTR(OP*,tmp);
    }
    else {
        return 0;
    }
    croak("Argument is not a reference");
    return 0; /* Not reached */
}

/* svop_new */

SV *__svop_new(pTHX_ SV *class, SV *type, I32 flags, SV *sv)
{
    OP *o;
    SV *result;
    SV **sparepad;
    OP *saveop;
    I32 typenum;

    SAVE_VARS;
    sparepad = PL_curpad;
    PL_curpad = AvARRAY(PL_comppad);
    saveop = PL_op;
    typenum = op_name_to_num(type); /* XXX More classes here! */
    if (typenum == OP_GVSV) {
        if (*(SvPV_nolen(sv)) == '$')
            sv = (SV*)gv_fetchpv(SvPVX(sv)+1, TRUE, SVt_PV);
        else
            croak("First character to GVSV was not dollar");
    } else {
        if (SvTYPE(sv) != SVt_PVCV) {
            sv = newSVsv(sv); /* copy it unless it's cv */
        }
    }
    o = newSVOP(typenum, flags, SvREFCNT_inc(sv));
    CHECK_CUSTOM_OPS
    RESTORE_VARS;
    result = sv_newmortal();
    sv_setiv(newSVrv(result, "B::SVOP"), PTR2IV(o));
    return result;
}

/* Pre-5.7 compatibility */
#ifndef op_clear
void op_clear(OP* o) {
    /* Fake it, I'm bored */
    croak("This operation requires a newer version of Perl");
}
#endif
#ifndef op_null
# define op_null    croak("This operation requires a newer version of Perl");
#endif

#ifndef PM_GETRE
# define PM_GETRE(o)     ((o)->op_pmregexp)
#endif

typedef OP      *B__OP;
typedef UNOP    *B__UNOP;
typedef BINOP   *B__BINOP;
typedef LOGOP   *B__LOGOP;
typedef LISTOP  *B__LISTOP;
typedef PMOP    *B__PMOP;
typedef SVOP    *B__SVOP;
typedef PADOP   *B__PADOP;
typedef PVOP    *B__PVOP;
typedef LOOP    *B__LOOP;
typedef COP     *B__COP;
#if PERL_VERSION >= 22
typedef METHOP   *B__METHOP;
typedef UNOP_AUX *B__UNOP_AUX;
typedef UNOP_AUX_item *B__UNOP_AUX_item;
#endif

typedef SV      *B__SV;
typedef SV      *B__IV;
typedef SV      *B__PV;
typedef SV      *B__NV;
typedef SV      *B__PVMG;
typedef SV      *B__PVLV;
typedef SV      *B__BM;
typedef SV      *B__RV;
typedef AV      *B__AV;
typedef HV      *B__HV;
typedef CV      *B__CV;
typedef GV      *B__GV;
typedef IO      *B__IO;

typedef MAGIC   *B__MAGIC;

#line 652 "Generate.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 796 "Generate.c"

XS_EUPXS(XS_B_fudge); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B_fudge)
{
    dVAR; dXSARGS;
    if (items != 0)
       croak_xs_usage(cv,  "");
    {
#line 648 "Generate.xs"
        SSCHECK(2);
        SSPUSHPTR((SV*)PL_comppad);
        SSPUSHINT(SAVEt_COMPPAD);
#line 809 "Generate.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_B_main_root); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B_main_root)
{
    dVAR; dXSARGS;
    PERL_UNUSED_VAR(cv); /* -W */
    {
	B__OP	RETVAL;
#line 657 "Generate.xs"
        if (items > 0)
            PL_main_root = SVtoO(ST(0));
        RETVAL = PL_main_root;
#line 826 "Generate.c"
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    sv_setiv(newSVrv(RETVALSV, cc_opclassname(aTHX_ (OP*)RETVAL)), PTR2IV(RETVAL));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_B_main_start); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B_main_start)
{
    dVAR; dXSARGS;
    PERL_UNUSED_VAR(cv); /* -W */
    {
	B__OP	RETVAL;
#line 668 "Generate.xs"
        if (items > 0)
            PL_main_start = SVtoO(ST(0));
        RETVAL = PL_main_start;
#line 849 "Generate.c"
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    sv_setiv(newSVrv(RETVALSV, cc_opclassname(aTHX_ (OP*)RETVAL)), PTR2IV(RETVAL));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_B_cv_pad); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B_cv_pad)
{
    dVAR; dXSARGS;
    PERL_UNUSED_VAR(cv); /* -W */
    {
	CV *	old_cv;
	SV *	RETVAL;
#line 680 "Generate.xs"
	old_cv = my_curr_cv;
    if (items > 0) {
        if (SvROK(ST(0))) {
            IV tmp;
            if (!sv_derived_from(ST(0), "B::CV"))
                croak("Reference is not a B::CV object");
        	tmp = SvIV((SV*)SvRV(ST(0)));
            my_curr_cv = INT2PTR(CV*,tmp);
        } else {
            my_curr_cv = NULL;
        }
    }

    if ( old_cv ) {
        ST(0) = sv_newmortal();
        sv_setiv(newSVrv(ST(0), "B::CV"), PTR2IV(old_cv));
	} else {
        ST(0) = &PL_sv_undef;
	}
#line 889 "Generate.c"
    }
    XSRETURN(1);
}

#define OP_desc(o)      (char* const)PL_op_desc[o->op_type]

XS_EUPXS(XS_B__OP_find_cv); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__OP_find_cv)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "o");
    {
	B__OP	o;
	B__CV	RETVAL;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__OP,tmp);
	}
	else
	    croak("o is not a reference")
;
#line 709 "Generate.xs"
        RETVAL = (CV*)SvRV(find_cv_by_root((OP*)o));
#line 915 "Generate.c"
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    make_sv_object(aTHX_ (RETVALSV), (SV*)(RETVAL));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_B__OP_next); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__OP_next)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "o, ...");
    {
	B__OP	o;
	B__OP	RETVAL;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__OP,tmp);
	}
	else
	    croak("o is not a reference")
;
#line 718 "Generate.xs"
        if (items > 1)
            o->op_next = SVtoO(ST(1));
        RETVAL = o->op_next;
#line 948 "Generate.c"
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    sv_setiv(newSVrv(RETVALSV, cc_opclassname(aTHX_ (OP*)RETVAL)), PTR2IV(RETVAL));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_B__OP_sibling); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__OP_sibling)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "o, ...");
    {
	B__OP	o;
	B__OP	RETVAL;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__OP,tmp);
	}
	else
	    croak("o is not a reference")
;
#line 729 "Generate.xs"
        if (items > 1)
          OpSIBLING_set(o, SVtoO(ST(1)));
        RETVAL = OpSIBLING(o);
#line 981 "Generate.c"
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    sv_setiv(newSVrv(RETVALSV, cc_opclassname(aTHX_ (OP*)RETVAL)), PTR2IV(RETVAL));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}

#ifdef PERL_OP_PARENT
#define XSubPPtmpAAAA 1


XS_EUPXS(XS_B__OP_sibparent); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__OP_sibparent)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "o, ...");
    {
	B__OP	o;
	B__OP	RETVAL;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__OP,tmp);
	}
	else
	    croak("o is not a reference")
;
#line 742 "Generate.xs"
        if (items > 1)
            OpLASTSIB_set(o, SVtoO(ST(1)));
        RETVAL = o->op_sibparent;
#line 1017 "Generate.c"
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    sv_setiv(newSVrv(RETVALSV, cc_opclassname(aTHX_ (OP*)RETVAL)), PTR2IV(RETVAL));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}

#endif

XS_EUPXS(XS_B__OP_ppaddr); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__OP_ppaddr)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "o, ...");
    {
	B__OP	o;
	IV	RETVAL;
	dXSTARG;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__OP,tmp);
	}
	else
	    croak("o is not a reference")
;
#line 755 "Generate.xs"
        if (items > 1)
            o->op_ppaddr = INT2PTR(void*,SvIV(ST(1)));
        RETVAL = PTR2IV((void*)(o->op_ppaddr));
#line 1052 "Generate.c"
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_B__OP_desc); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__OP_desc)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "o");
    {
	B__OP	o;
	char *	RETVAL;
	dXSTARG;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__OP,tmp);
	}
	else
	    croak("o is not a reference")
;

	RETVAL = OP_desc(o);
	sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
    }
    XSRETURN(1);
}


XS_EUPXS(XS_B__OP_targ); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__OP_targ)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "o, ...");
    {
	B__OP	o;
	PADOFFSET	RETVAL;
	dXSTARG;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__OP,tmp);
	}
	else
	    croak("o is not a reference")
;
#line 771 "Generate.xs"
        if (items > 1)
            o->op_targ = (PADOFFSET)SvIV(ST(1));

        /* begin highly experimental */	/* XXX coverage 0 */
        if (items > 1 && (SvIV(ST(1)) > 1000 || SvIV(ST(1)) & 0x80000000)) {
            PADLIST *padlist = INT2PTR(PADLIST*,SvIV(ST(1)));

            I32 old_padix             = PL_padix;
            I32 old_comppad_name_fill = PL_comppad_name_fill;
            I32 old_min_intro_pending = PL_min_intro_pending;
            I32 old_max_intro_pending = PL_max_intro_pending;
            /* int old_cv_has_eval       = PL_cv_has_eval; */
            I32 old_pad_reset_pending = PL_pad_reset_pending;
            SV **old_curpad            = PL_curpad;
            AV *old_comppad           = PL_comppad;
#ifdef HAVE_PADNAMELIST
            PADNAMELIST *old_comppad_name = PL_comppad_name;
#else
            AV *old_comppad_name      = PL_comppad_name;
#endif
            /* PTR2UV */

            PL_comppad_name      = PadlistNAMES(padlist);
            PL_comppad           = PadlistARRAY(padlist)[1];
            PL_curpad            = AvARRAY(PL_comppad);

            PL_padix             = PadnamelistMAX(PL_comppad_name);
            PL_pad_reset_pending = 0;
            /* <medwards> PL_comppad_name_fill appears irrelevant as long as you
	       stick to pad_alloc, pad_swipe, pad_free.
	     * PL_comppad_name_fill = 0;
	     * PL_min_intro_pending = 0;
	     * PL_cv_has_eval       = 0;
	     */
#ifdef HAVE_PAD_ALLOC
            o->op_targ = Perl_pad_alloc(aTHX_ 0, SVs_PADTMP);
#else
            /* CPAN #28912: MSWin32 does not export Perl_pad_alloc.
               Rewrite from Perl_pad_alloc for PADTMP:
               Scan the pad from PL_padix upwards for a slot which
               has no name and no active value. */
            {
                SV *sv;
#  if PERL_VERSION > 18
                PADNAME * const * const names = PadnamelistARRAY(PL_comppad_name);
                const SSize_t      names_fill = PadnamelistMAX(PL_comppad_name);
                for (;;) {
                    PADNAME *pn;
                    if (++PL_padix <= names_fill &&
                        (pn = names[PL_padix]) && PadnamePV(pn))
                        continue;
                    sv = *av_fetch(PL_comppad, PL_padix, TRUE);
                    if (!(SvFLAGS(sv) & SVs_PADTMP))
                        break;
                }
#  else
                SV * const * const names = PadnamelistARRAY(PL_comppad_name);
                const SSize_t names_fill = PadnamelistMAX(PL_comppad_name);
                for (;;) {
                    if (++PL_padix <= names_fill &&
                        (sv = names[PL_padix]) && sv != &PL_sv_undef)
                        continue;
                    sv = *av_fetch(PL_comppad, PL_padix, TRUE);
                    if (!(SvFLAGS(sv) & (SVs_PADTMP | SVs_PADMY)) &&
                        !IS_PADGV(sv) && !IS_PADCONST(sv))
                        break;
                }
#  endif
                o->op_targ = PL_padix;
                SvFLAGS(sv) |= SVs_PADTMP;
            }
#endif
            PL_padix             = old_padix;
            PL_comppad_name_fill = old_comppad_name_fill;
            PL_min_intro_pending = old_min_intro_pending;
            PL_max_intro_pending = old_max_intro_pending;
            /* PL_cv_has_eval       = old_cv_has_eval; */
            PL_pad_reset_pending = old_pad_reset_pending;
            PL_curpad            = old_curpad;
            PL_comppad           = old_comppad;
            PL_comppad_name      = old_comppad_name;
        }
        /* end highly experimental */

        RETVAL = o->op_targ;
#line 1189 "Generate.c"
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_B__OP_type); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__OP_type)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "o, ...");
    {
	B__OP	o;
	U16	RETVAL;
	dXSTARG;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__OP,tmp);
	}
	else
	    croak("o is not a reference")
;
#line 864 "Generate.xs"
        if (items > 1) {
            o->op_type = (U16)SvIV(ST(1));		/* XXX coverage 0 */
            o->op_ppaddr = PL_ppaddr[o->op_type];
        }
        RETVAL = o->op_type;
#line 1220 "Generate.c"
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

#if PERL_VERSION < 10
#define XSubPPtmpAAAB 1


XS_EUPXS(XS_B__OP_seq); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__OP_seq)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "o, ...");
    {
	B__OP	o;
	U16	RETVAL;
	dXSTARG;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__OP,tmp);
	}
	else
	    croak("o is not a reference")
;
#line 878 "Generate.xs"
        if (items > 1)
            o->op_seq = (U16)SvIV(ST(1));
        RETVAL = o->op_seq;
#line 1252 "Generate.c"
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

#endif

XS_EUPXS(XS_B__OP_flags); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__OP_flags)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "o, ...");
    {
	B__OP	o;
	U8	RETVAL;
	dXSTARG;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__OP,tmp);
	}
	else
	    croak("o is not a reference")
;
#line 891 "Generate.xs"
        if (items > 1)
            o->op_flags = (U8)SvIV(ST(1));
        RETVAL = o->op_flags;
#line 1282 "Generate.c"
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_B__OP_private); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__OP_private)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "o, ...");
    {
	B__OP	o;
	U8	RETVAL;
	dXSTARG;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__OP,tmp);
	}
	else
	    croak("o is not a reference")
;
#line 902 "Generate.xs"
        if (items > 1)
            o->op_private = (U8)SvIV(ST(1));
        RETVAL = o->op_private;
#line 1311 "Generate.c"
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}


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

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__OP,tmp);
	}
	else
	    croak("o is not a reference")
;
#line 913 "Generate.xs"
        op_dump(o);
#line 1336 "Generate.c"
    }
    XSRETURN_EMPTY;
}


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

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__OP,tmp);
	}
	else
	    croak("o is not a reference")
;
#line 920 "Generate.xs"
        if (o == PL_main_root)
            o->op_next = Nullop;
#line 1361 "Generate.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_B__OP_new); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__OP_new)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "class, type, flags");
    {
	SV *	class = ST(0)
;
	SV *	type = ST(1)
;
	I32	flags = (I32)SvIV(ST(2))
;
	OP *	o;
	I32	typenum;
#line 932 "Generate.xs"
	SAVE_VARS;
	typenum = op_name_to_num(type);
	o = newOP(typenum, flags);
	CHECK_CUSTOM_OPS
	RESTORE_VARS;
	ST(0) = sv_newmortal();
	sv_setiv(newSVrv(ST(0), "B::OP"), PTR2IV(o));
#line 1390 "Generate.c"
    }
    XSRETURN(1);
}


XS_EUPXS(XS_B__OP_newstate); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__OP_newstate)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "class, flags, label, oldo");
    {
	SV *	class = ST(0)
;
	I32	flags = (I32)SvIV(ST(1))
;
	char *	label = (char *)SvPV_nolen(ST(2))
;
	B__OP	oldo;
	OP *	o;

	if (SvROK(ST(3))) {
	    IV tmp = SvIV((SV*)SvRV(ST(3)));
	    oldo = INT2PTR(B__OP,tmp);
	}
	else
	    croak("oldo is not a reference")
;
#line 949 "Generate.xs"
	SAVE_VARS;
	o = newSTATEOP(flags, label, oldo);
	RESTORE_VARS;
	ST(0) = sv_newmortal();
	sv_setiv(newSVrv(ST(0), "B::LISTOP"), PTR2IV(o));
#line 1425 "Generate.c"
    }
    XSRETURN(1);
}


XS_EUPXS(XS_B__OP_mutate); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__OP_mutate)
{
    dVAR; dXSARGS;
    if (items != 2)
       croak_xs_usage(cv,  "o, type");
    {
	B__OP	o;
	SV*	type = ST(1)
;
	I32	rtype;
	B__OP	RETVAL;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__OP,tmp);
	}
	else
	    croak("o is not a reference")
;
#line 962 "Generate.xs"
    rtype = op_name_to_num(type);
	o->op_ppaddr = PL_ppaddr[rtype];
	o->op_type = rtype;
#line 1455 "Generate.c"
	sv_setiv(newSVrv(ST(0), cc_opclassname(aTHX_ (OP*)o)), PTR2IV(o));
	SvSETMAGIC(ST(0));
    }
    XSRETURN(1);
}

#if defined(HAVE_FOLD_CONSTANTS) && (PERL_VERSION >= 11)
#  define Perl_fold_constants S_fold_constants
#endif

XS_EUPXS(XS_B__OP_convert); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__OP_convert)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "o, type, flags");
    {
	B__OP	o;
	I32	flags = (I32)SvIV(ST(2))
;
	I32	type = (I32)SvIV(ST(1))
;
	B__OP	RETVAL;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__OP,tmp);
	}
	else
	    croak("o is not a reference")
;
#line 984 "Generate.xs"
	if (!o || o->op_type != OP_LIST)
	  o = newLISTOP(OP_LIST, 0, o, Nullop);
	else
	  o->op_flags &= ~OPf_WANT;

	if (!(PL_opargs[type] & OA_MARK) && o->op_type != OP_NULL) {
	  op_clear(o);
	  o->op_targ = o->op_type;
	}

    o->op_type = type;
    o->op_ppaddr = PL_ppaddr[type];
    o->op_flags |= flags;

    o = PL_check[type](aTHX_ (OP*)o);
#ifdef HAVE_FOLD_CONSTANTS
    if (o->op_type == type) {
	  COP *cop = PL_curcop;
	  PL_curcop = &PL_compiling;
	  o = Perl_fold_constants(aTHX_ o);
	  PL_curcop = cop;
	}
#endif

#line 1512 "Generate.c"
	sv_setiv(newSVrv(ST(0), cc_opclassname(aTHX_ (OP*)o)), PTR2IV(o));
	SvSETMAGIC(ST(0));
    }
    XSRETURN(1);
}


XS_EUPXS(XS_B__UNOP_first); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__UNOP_first)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "o, ...");
    {
	B__UNOP	o;
	B__OP	RETVAL;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__UNOP,tmp);
	}
	else
	    croak("o is not a reference")
;
#line 1018 "Generate.xs"
	if (items > 1)
	  o->op_first = SVtoO(ST(1));		/* XXX coverage 0 */
    RETVAL = o->op_first;
#line 1541 "Generate.c"
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    sv_setiv(newSVrv(RETVALSV, cc_opclassname(aTHX_ (OP*)RETVAL)), PTR2IV(RETVAL));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_B__UNOP_new); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__UNOP_new)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "class, type, flags, sv_first");
    {
	SV *	class = ST(0)
;
	SV *	type = ST(1)
;
	I32	flags = (I32)SvIV(ST(2))
;
	SV *	sv_first = ST(3)
;
	OP *	first;
	OP *	o;
	I32	typenum;
#line 1035 "Generate.xs"
	I32 padflag = 0;
	if (SvROK(sv_first)) {
	  if (!sv_derived_from(sv_first, "B::OP"))
		croak("Reference 'first' was not a B::OP object");
	  else {
		IV tmp = SvIV((SV*)SvRV(sv_first));
		first = INT2PTR(OP*, tmp);
	  }
	} else if (SvTRUE(sv_first))
	  croak("'first' argument to B::UNOP->new should be a B::OP object or a false value");
	else
	  first = Nullop;
	{

	  SAVE_VARS;
	  typenum = op_name_to_num(type);
	  {
		COP *cop = PL_curcop;
		PL_curcop = &PL_compiling;
		o = newUNOP(typenum, flags, first);
		PL_curcop = cop;
	  }
	  CHECK_CUSTOM_OPS
	  RESTORE_VARS;
	}
    ST(0) = sv_newmortal();
    sv_setiv(newSVrv(ST(0), "B::UNOP"), PTR2IV(o));
#line 1599 "Generate.c"
    }
    XSRETURN(1);
}


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

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__BINOP,tmp);
	}
	else
	    croak("o is not a reference")
;
#line 1070 "Generate.xs"
    op_null((OP*)o);
#line 1623 "Generate.c"
    }
    XSRETURN_EMPTY;
}


XS_EUPXS(XS_B__BINOP_last); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__BINOP_last)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "o, ...");
    {
	B__BINOP	o;
	B__OP	RETVAL;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__BINOP,tmp);
	}
	else
	    croak("o is not a reference")
;
#line 1077 "Generate.xs"
	if (items > 1)
	  o->op_last = SVtoO(ST(1));	/* XXX coverage 0 */
	RETVAL = o->op_last;
#line 1650 "Generate.c"
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    sv_setiv(newSVrv(RETVALSV, cc_opclassname(aTHX_ (OP*)RETVAL)), PTR2IV(RETVAL));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_B__BINOP_new); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__BINOP_new)
{
    dVAR; dXSARGS;
    if (items != 5)
       croak_xs_usage(cv,  "class, type, flags, sv_first, sv_last");
    {
	SV *	class = ST(0)
;
	SV *	type = ST(1)
;
	I32	flags = (I32)SvIV(ST(2))
;
	SV *	sv_first = ST(3)
;
	SV *	sv_last = ST(4)
;
	OP *	first;
	OP *	last;
	OP *	o;
#line 1095 "Generate.xs"
        if (SvROK(sv_first)) {
            if (!sv_derived_from(sv_first, "B::OP"))
                croak("Reference 'first' was not a B::OP object");
            else {
                IV tmp = SvIV((SV*)SvRV(sv_first));
                first = INT2PTR(OP*, tmp);
            }
        } else if (SvTRUE(sv_first))
            croak("'first' argument to B::UNOP->new should be a B::OP object or a false value");
        else
            first = Nullop;

        if (SvROK(sv_last)) {
            if (!sv_derived_from(sv_last, "B::OP"))
                croak("Reference 'last' was not a B::OP object");
            else {
                IV tmp = SvIV((SV*)SvRV(sv_last));
                last = INT2PTR(OP*, tmp);
            }
        } else if (SvTRUE(sv_last))
            croak("'last' argument to B::BINOP->new should be a B::OP object or a false value");
        else
            last = Nullop;

        {
        I32 typenum = op_name_to_num(type);

        SAVE_VARS;

        if (typenum == OP_SASSIGN || typenum == OP_AASSIGN)
            o = newASSIGNOP(flags, first, 0, last);
        else {
		    COP *cop = PL_curcop;
		    PL_curcop = &PL_compiling;
            o = newBINOP(typenum, flags, first, last);
		    PL_curcop = cop;
            CHECK_CUSTOM_OPS
        }

        RESTORE_VARS;
        }
        ST(0) = sv_newmortal();
        sv_setiv(newSVrv(ST(0), "B::BINOP"), PTR2IV(o));
#line 1726 "Generate.c"
    }
    XSRETURN(1);
}


XS_EUPXS(XS_B__LISTOP_new); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__LISTOP_new)
{
    dVAR; dXSARGS;
    if (items != 5)
       croak_xs_usage(cv,  "class, type, flags, sv_first, sv_last");
    {
	SV *	class = ST(0)
;
	SV *	type = ST(1)
;
	I32	flags = (I32)SvIV(ST(2))
;
	SV *	sv_first = ST(3)
;
	SV *	sv_last = ST(4)
;
	OP *	first;
	OP *	last;
	OP *	o;
#line 1153 "Generate.xs"
        if (SvROK(sv_first)) {
            if (!sv_derived_from(sv_first, "B::OP"))
                croak("Reference 'first' was not a B::OP object");
            else {
                IV tmp = SvIV((SV*)SvRV(sv_first));
                first = INT2PTR(OP*, tmp);
            }
        } else if (SvTRUE(sv_first))
            croak("'first' argument to B::UNOP->new should be a B::OP object or a false value");
        else
            first = Nullop;

        if (SvROK(sv_last)) {
            if (!sv_derived_from(sv_last, "B::OP"))
                croak("Reference 'last' was not a B::OP object");
            else {
                IV tmp = SvIV((SV*)SvRV(sv_last));
                last = INT2PTR(OP*, tmp);
            }
        } else if (SvTRUE(sv_last))
            croak("'last' argument to B::BINOP->new should be a B::OP object or a false value");
        else
            last = Nullop;

        {
        I32 typenum = op_name_to_num(type);

	SAVE_VARS;
        o = newLISTOP(typenum, flags, first, last);
        CHECK_CUSTOM_OPS
	RESTORE_VARS;
        }
        ST(0) = sv_newmortal();
        sv_setiv(newSVrv(ST(0), "B::LISTOP"), PTR2IV(o));
#line 1787 "Generate.c"
    }
    XSRETURN(1);
}


XS_EUPXS(XS_B__LOGOP_new); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__LOGOP_new)
{
    dVAR; dXSARGS;
    if (items != 5)
       croak_xs_usage(cv,  "class, type, flags, sv_first, sv_last");
    {
	SV *	class = ST(0)
;
	SV *	type = ST(1)
;
	I32	flags = (I32)SvIV(ST(2))
;
	SV *	sv_first = ST(3)
;
	SV *	sv_last = ST(4)
;
	OP *	first;
	OP *	last;
	OP *	o;
#line 1202 "Generate.xs"
        if (SvROK(sv_first)) {
            if (!sv_derived_from(sv_first, "B::OP"))
                croak("Reference 'first' was not a B::OP object");
            else {
                IV tmp = SvIV((SV*)SvRV(sv_first));
                first = INT2PTR(OP*, tmp);
            }
        } else if (SvTRUE(sv_first))
            croak("'first' argument to B::UNOP->new should be a B::OP object or a false value");
        else
            first = Nullop;

        if (SvROK(sv_last)) {
            if (!sv_derived_from(sv_last, "B::OP"))
                croak("Reference 'last' was not a B::OP object");
            else {
                IV tmp = SvIV((SV*)SvRV(sv_last));
                last = INT2PTR(OP*, tmp);
            }
        } else if (SvTRUE(sv_last))
            croak("'last' argument to B::BINOP->new should be a B::OP object or a false value");
        else
            last = Nullop;

        {
        I32 typenum  = op_name_to_num(type);
	SAVE_VARS;
        o = newLOGOP(typenum, flags, first, last);
        CHECK_CUSTOM_OPS
        RESTORE_VARS;
        }
        ST(0) = sv_newmortal();
        sv_setiv(newSVrv(ST(0), "B::LOGOP"), PTR2IV(o));
#line 1847 "Generate.c"
    }
    XSRETURN(1);
}


XS_EUPXS(XS_B__LOGOP_newcond); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__LOGOP_newcond)
{
    dVAR; dXSARGS;
    if (items != 5)
       croak_xs_usage(cv,  "class, flags, sv_first, sv_last, sv_else");
    {
	SV *	class = ST(0)
;
	I32	flags = (I32)SvIV(ST(1))
;
	SV *	sv_first = ST(2)
;
	SV *	sv_last = ST(3)
;
	SV *	sv_else = ST(4)
;
	OP *	first;
	OP *	last;
	OP *	elseo;
	OP *	o;
#line 1249 "Generate.xs"
        if (SvROK(sv_first)) {
            if (!sv_derived_from(sv_first, "B::OP"))
                croak("Reference 'first' was not a B::OP object");
            else {
                IV tmp = SvIV((SV*)SvRV(sv_first));
                first = INT2PTR(OP*, tmp);
            }
        } else if (SvTRUE(sv_first))
            croak("'first' argument to B::UNOP->new should be a B::OP object or a false value");
        else
            first = Nullop;

        if (SvROK(sv_last)) {
            if (!sv_derived_from(sv_last, "B::OP"))
                croak("Reference 'last' was not a B::OP object");
            else {
                IV tmp = SvIV((SV*)SvRV(sv_last));
                last = INT2PTR(OP*, tmp);
            }
        } else if (SvTRUE(sv_last))
            croak("'last' argument to B::BINOP->new should be a B::OP object or a false value");
        else
            last = Nullop;

        if (SvROK(sv_else)) {
            if (!sv_derived_from(sv_else, "B::OP"))
                croak("Reference 'else' was not a B::OP object");
            else {
                IV tmp = SvIV((SV*)SvRV(sv_else));
                elseo = INT2PTR(OP*, tmp);
            }
        } else if (SvTRUE(sv_else))
            croak("'last' argument to B::BINOP->new should be a B::OP object or a false value");
        else
            elseo = Nullop;

        {
        SAVE_VARS;
        o = newCONDOP(flags, first, last, elseo);
        RESTORE_VARS;
        }
        ST(0) = sv_newmortal();
        sv_setiv(newSVrv(ST(0), "B::LOGOP"), PTR2IV(o));
#line 1918 "Generate.c"
    }
    XSRETURN(1);
}


XS_EUPXS(XS_B__LOGOP_other); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__LOGOP_other)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "o, ...");
    {
	B__LOGOP	o;
	B__OP	RETVAL;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__LOGOP,tmp);
	}
	else
	    croak("o is not a reference")
;
#line 1298 "Generate.xs"
        if (items > 1)
            o->op_other = SVtoO(ST(1));
        RETVAL = o->op_other;
#line 1945 "Generate.c"
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    sv_setiv(newSVrv(RETVALSV, cc_opclassname(aTHX_ (OP*)RETVAL)), PTR2IV(RETVAL));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}

#if PERL_VERSION < 10
#define PMOP_pmreplroot(o)      o->op_pmreplroot
#define PMOP_pmnext(o)          o->op_pmnext
#define PMOP_pmpermflags(o)     o->op_pmpermflags
#endif
#define PMOP_pmregexp(o)        o->op_pmregexp
#define PMOP_pmflags(o)         o->op_pmflags
#if PERL_VERSION < 10
#define XSubPPtmpAAAC 1


XS_EUPXS(XS_B__PMOP_pmreplroot); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__PMOP_pmreplroot)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "o");
    {
	B__PMOP	o;
	OP *	root;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__PMOP,tmp);
	}
	else
	    croak("o is not a reference")
;
#line 1324 "Generate.xs"
        ST(0) = sv_newmortal();
        root = o->op_pmreplroot;
        /* OP_PUSHRE stores an SV* instead of an OP* in op_pmreplroot */
        if (o->op_type == OP_PUSHRE) {
            sv_setiv(newSVrv(ST(0), root ?
                             svclassnames[SvTYPE((SV*)root)] : "B::SV"),
                     PTR2IV(root));
        }
        else {
            sv_setiv(newSVrv(ST(0), cc_opclassname(aTHX_ root)), PTR2IV(root));
        }
#line 1996 "Generate.c"
    }
    XSRETURN(1);
}


XS_EUPXS(XS_B__PMOP_pmreplstart); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__PMOP_pmreplstart)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "o, ...");
    {
	B__PMOP	o;
	B__OP	RETVAL;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__PMOP,tmp);
	}
	else
	    croak("o is not a reference")
;
#line 1340 "Generate.xs"
        if (items > 1)
            o->op_pmreplstart = SVtoO(ST(1));
        RETVAL = o->op_pmreplstart;
#line 2023 "Generate.c"
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    sv_setiv(newSVrv(RETVALSV, cc_opclassname(aTHX_ (OP*)RETVAL)), PTR2IV(RETVAL));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_B__PMOP_pmnext); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__PMOP_pmnext)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "o, ...");
    {
	B__PMOP	o;
	B__PMOP	RETVAL;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__PMOP,tmp);
	}
	else
	    croak("o is not a reference")
;
#line 1350 "Generate.xs"
        if (items > 1)
            o->op_pmnext = (PMOP*)SVtoO(ST(1));
        RETVAL = o->op_pmnext;
#line 2056 "Generate.c"
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    sv_setiv(newSVrv(RETVALSV, cc_opclassname(aTHX_ (OP*)RETVAL)), PTR2IV(RETVAL));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_B__PMOP_pmpermflags); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__PMOP_pmpermflags)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "o");
    {
	B__PMOP	o;
	U16	RETVAL;
	dXSTARG;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__PMOP,tmp);
	}
	else
	    croak("o is not a reference")
;

	RETVAL = PMOP_pmpermflags(o);
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

#endif

XS_EUPXS(XS_B__PMOP_pmflags); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__PMOP_pmflags)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "o");
    {
	B__PMOP	o;
	U16	RETVAL;
	dXSTARG;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__PMOP,tmp);
	}
	else
	    croak("o is not a reference")
;

	RETVAL = PMOP_pmflags(o);
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

#if PERL_VERSION < 11
#define XSubPPtmpAAAD 1


XS_EUPXS(XS_B__PMOP_precomp); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__PMOP_precomp)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "o");
    {
	B__PMOP	o;
	REGEXP *	rx;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__PMOP,tmp);
	}
	else
	    croak("o is not a reference")
;
#line 1373 "Generate.xs"
        ST(0) = sv_newmortal();
        rx = PM_GETRE(o);
        if (rx)
            sv_setpvn(ST(0), rx->precomp, rx->prelen);
#line 2146 "Generate.c"
    }
    XSRETURN(1);
}

#endif
#define SVOP_sv(o)     (cSVOPo_sv)
#define SVOP_gv(o)     ((GV*)cSVOPo_sv)

XS_EUPXS(XS_B__SVOP_sv); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__SVOP_sv)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "o, ...");
    {
	B__SVOP	o;
#line 1395 "Generate.xs"
        SV *sv;
#line 2165 "Generate.c"
	B__SV	RETVAL;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__SVOP,tmp);
	}
	else
	    croak("o is not a reference")
;
#line 1397 "Generate.xs"
        if (items > 1) {
#ifdef USE_ITHREADS
		    if (items > 2) {
                if (!(SvROK(ST(2)) && SvTYPE(SvRV(ST(2))) == SVt_PVCV))
                    croak("2nd arg is not a cvref");
			    GEN_PAD_CV(ST(2));
		    } else {
                GEN_PAD;
		    }
#endif
            sv = newSVsv(ST(1));
#ifdef USE_ITHREADS
            if ( cSVOPx(o)->op_sv ) {
                cSVOPx(o)->op_sv = sv;		/* XXX coverage 0 */
            }
            else {
			    /* assert(SvTYPE(sv) & SVs_PADMY); */
                PAD_SVl(o->op_targ) = sv;
            }
#else
            cSVOPx(o)->op_sv = sv;
#endif
#ifdef USE_ITHREADS
            OLD_PAD;
#endif
        }
        /* [CPAN #70398] cSVOPo_sv => cSVOPx(o)->op_sv */
        RETVAL = cSVOPx(o)->op_sv;
#line 2204 "Generate.c"
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    make_sv_object(aTHX_ (RETVALSV), (SV*)(RETVAL));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_B__SVOP_gv); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__SVOP_gv)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "o");
    {
	B__SVOP	o;
	B__GV	RETVAL;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__SVOP,tmp);
	}
	else
	    croak("o is not a reference")
;

	RETVAL = SVOP_gv(o);
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    make_sv_object(aTHX_ (RETVALSV), (SV*)(RETVAL));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}

#define NEW_SVOP(_newOPgen, B_class)                                         \
{                                                                           \
    OP *o;                                                                  \
    SV* param;                                                              \
    I32 typenum;                                                            \
    SAVE_VARS;                                                              \
    typenum = op_name_to_num(type); /* XXX More classes here! */            \
    if (typenum == OP_GVSV) {                                               \
        if (*(SvPV_nolen(sv)) == '$')                                       \
            param = (SV*)gv_fetchpv(SvPVX(sv)+1, TRUE, SVt_PV);             \
        else                                                                \
            croak("First character to GVSV was not dollar");                \
    } else                                                                  \
        param = newSVsv(sv);                                                \
    o = _newOPgen(typenum, flags, param);                                   \
    CHECK_CUSTOM_OPS                                                           \
    RESTORE_VARS;                                                           \
    ST(0) = sv_newmortal();                                                 \
    sv_setiv(newSVrv(ST(0), B_class), PTR2IV(o));                           \
}

XS_EUPXS(XS_B__SVOP_new_svrv); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__SVOP_new_svrv)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "class, type, flags, sv");
    {
	SV *	class = ST(0)
;
	SV *	type = ST(1)
;
	I32	flags = (I32)SvIV(ST(2))
;
	SV *	sv = ST(3)
;
	SV *	RETVAL;
#line 1465 "Generate.xs"
        ST(0) = __svop_new(aTHX_ class, type, flags, SvRV(sv));
#line 2284 "Generate.c"
    }
    XSRETURN(1);
}


XS_EUPXS(XS_B__SVOP_new); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__SVOP_new)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "class, type, flags, sv");
    {
	SV *	class = ST(0)
;
	SV *	type = ST(1)
;
	I32	flags = (I32)SvIV(ST(2))
;
	SV *	sv = ST(3)
;
	OP *	RETVAL;
#line 1478 "Generate.xs"
    OP *o;
    SV* param;
    I32 typenum;
    SAVE_VARS;
    typenum = op_name_to_num(type); /* XXX More classes here! */
    if (typenum == OP_GVSV) {
        if (*(SvPV_nolen(sv)) == '$')
            param = (SV*)gv_fetchpv(SvPVX(sv)+1, TRUE, SVt_PV);
        else
            croak("First character to GVSV was not dollar");
    } else
        param = newSVsv(sv);
    o = newSVOP(typenum, flags, param);
    CHECK_CUSTOM_OPS
    RESTORE_VARS;
    ST(0) = sv_newmortal();
    sv_setiv(newSVrv(ST(0), "B::SVOP"), PTR2IV(o));
#line 2324 "Generate.c"
    }
    XSRETURN(1);
}

#define PADOP_padix(o)  o->op_padix
#define PADOP_sv(o)     (o->op_padix ? PL_curpad[o->op_padix] : Nullsv)
#define PADOP_gv(o)     ((o->op_padix \
                          && SvTYPE(PL_curpad[o->op_padix]) == SVt_PVGV) \
                         ? (GV*)PL_curpad[o->op_padix] : Nullgv)

XS_EUPXS(XS_B__GVOP_new); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__GVOP_new)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "class, type, flags, sv");
    {
	SV *	class = ST(0)
;
	SV *	type = ST(1)
;
	I32	flags = (I32)SvIV(ST(2))
;
	SV *	sv = ST(3)
;
	SV *	RETVAL;
#line 1513 "Generate.xs"
#ifdef USE_ITHREADS
         NEW_SVOP(newPADOP, "B::PADOP");
#else
         NEW_SVOP(newSVOP, "B::SVOP");
#endif
#line 2357 "Generate.c"
    }
    XSRETURN(1);
}


XS_EUPXS(XS_B__PADOP_padix); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__PADOP_padix)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "o, ...");
    {
	B__PADOP	o;
	PADOFFSET	RETVAL;
	dXSTARG;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__PADOP,tmp);
	}
	else
	    croak("o is not a reference")
;
#line 1525 "Generate.xs"
        if (items > 1)
            o->op_padix = (PADOFFSET)SvIV(ST(1));
        RETVAL = o->op_padix;
#line 2385 "Generate.c"
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_B__PADOP_sv); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__PADOP_sv)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "o, ...");
    {
	B__PADOP	o;
	B__SV	RETVAL;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__PADOP,tmp);
	}
	else
	    croak("o is not a reference")
;

	RETVAL = PADOP_sv(o);
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    make_sv_object(aTHX_ (RETVALSV), (SV*)(RETVAL));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_B__PADOP_gv); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__PADOP_gv)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "o");
    {
	B__PADOP	o;
	B__GV	RETVAL;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__PADOP,tmp);
	}
	else
	    croak("o is not a reference")
;

	RETVAL = PADOP_gv(o);
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    make_sv_object(aTHX_ (RETVALSV), (SV*)(RETVAL));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


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

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__PVOP,tmp);
	}
	else
	    croak("o is not a reference")
;
#line 1545 "Generate.xs"
        /*
         * OP_TRANS uses op_pv to point to a table of 256 shorts
         * whereas other PVOPs point to a null terminated string.
         */
        ST(0) = sv_2mortal(newSVpv(o->op_pv, (o->op_type == OP_TRANS) ?
                                   256 * sizeof(short) : 0));
#line 2475 "Generate.c"
    }
    XSRETURN(1);
}


XS_EUPXS(XS_B__LOOP_redoop); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__LOOP_redoop)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "o, ...");
    {
	B__LOOP	o;
	B__OP	RETVAL;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__LOOP,tmp);
	}
	else
	    croak("o is not a reference")
;
#line 1558 "Generate.xs"
        if (items > 1)
            o->op_redoop = SVtoO(ST(1));
        RETVAL = o->op_redoop;
#line 2502 "Generate.c"
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    sv_setiv(newSVrv(RETVALSV, cc_opclassname(aTHX_ (OP*)RETVAL)), PTR2IV(RETVAL));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_B__LOOP_nextop); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__LOOP_nextop)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "o, ...");
    {
	B__LOOP	o;
	B__OP	RETVAL;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__LOOP,tmp);
	}
	else
	    croak("o is not a reference")
;
#line 1568 "Generate.xs"
        if (items > 1)
            o->op_nextop = SVtoO(ST(1));
        RETVAL = o->op_nextop;
#line 2535 "Generate.c"
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    sv_setiv(newSVrv(RETVALSV, cc_opclassname(aTHX_ (OP*)RETVAL)), PTR2IV(RETVAL));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_B__LOOP_lastop); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__LOOP_lastop)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "o, ...");
    {
	B__LOOP	o;
	B__OP	RETVAL;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__LOOP,tmp);
	}
	else
	    croak("o is not a reference")
;
#line 1578 "Generate.xs"
        if (items > 1)
            o->op_lastop = SVtoO(ST(1));
        RETVAL = o->op_lastop;
#line 2568 "Generate.c"
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    sv_setiv(newSVrv(RETVALSV, cc_opclassname(aTHX_ (OP*)RETVAL)), PTR2IV(RETVAL));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}

#if PERL_VERSION < 11
#define COP_label(o)    o->cop_label
#endif
#define COP_stashpv(o)  CopSTASHPV(o)
#define COP_stash(o)    CopSTASH(o)
#define COP_file(o)     CopFILE(o)
#define COP_cop_seq(o)  o->cop_seq
#if PERL_VERSION < 10
#define COP_arybase(o)  o->cop_arybase
#endif
#define COP_line(o)     CopLINE(o)
#define COP_warnings(o) (SV*)o->cop_warnings
#if PERL_VERSION < 11
#define XSubPPtmpAAAE 1


XS_EUPXS(XS_B__COP_label); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__COP_label)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "o");
    {
	B__COP	o;
	char *	RETVAL;
	dXSTARG;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__COP,tmp);
	}
	else
	    croak("o is not a reference")
;

	RETVAL = COP_label(o);
	sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
    }
    XSRETURN(1);
}

#endif

XS_EUPXS(XS_B__COP_stashpv); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__COP_stashpv)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "o");
    {
	B__COP	o;
	char *	RETVAL;
	dXSTARG;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__COP,tmp);
	}
	else
	    croak("o is not a reference")
;

	RETVAL = COP_stashpv(o);
	sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
    }
    XSRETURN(1);
}


XS_EUPXS(XS_B__COP_stash); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__COP_stash)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "o");
    {
	B__COP	o;
	B__HV	RETVAL;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__COP,tmp);
	}
	else
	    croak("o is not a reference")
;

	RETVAL = COP_stash(o);
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    make_sv_object(aTHX_ (RETVALSV), (SV*)(RETVAL));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_B__COP_file); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__COP_file)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "o");
    {
	B__COP	o;
	char *	RETVAL;
	dXSTARG;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__COP,tmp);
	}
	else
	    croak("o is not a reference")
;

	RETVAL = COP_file(o);
	sv_setpv(TARG, RETVAL); XSprePUSH; PUSHTARG;
    }
    XSRETURN(1);
}


XS_EUPXS(XS_B__COP_cop_seq); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__COP_cop_seq)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "o");
    {
	B__COP	o;
	U32	RETVAL;
	dXSTARG;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__COP,tmp);
	}
	else
	    croak("o is not a reference")
;

	RETVAL = COP_cop_seq(o);
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

#if PERL_VERSION < 10
#define XSubPPtmpAAAF 1


XS_EUPXS(XS_B__COP_arybase); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__COP_arybase)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "o");
    {
	B__COP	o;
	I32	RETVAL;
	dXSTARG;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__COP,tmp);
	}
	else
	    croak("o is not a reference")
;

	RETVAL = COP_arybase(o);
	XSprePUSH; PUSHi((IV)RETVAL);
    }
    XSRETURN(1);
}

#endif

XS_EUPXS(XS_B__COP_line); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__COP_line)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "o");
    {
	B__COP	o;
	U16	RETVAL;
	dXSTARG;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__COP,tmp);
	}
	else
	    croak("o is not a reference")
;

	RETVAL = COP_line(o);
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}

#ifndef CopLABEL_alloc
#define CopLABEL_alloc(str) ((str)?savepv(str):NULL)
#endif

XS_EUPXS(XS_B__COP_new); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__COP_new)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "class, flags, name, sv_first");
    {
	SV *	class = ST(0)
;
	char *	name = (char *)SvPV_nolen(ST(2))
;
	I32	flags = (I32)SvIV(ST(1))
;
	SV *	sv_first = ST(3)
;
	OP *	first;
	OP *	o;
	B__COP	RETVAL;
#line 1703 "Generate.xs"
        if (SvROK(sv_first)) {	/* # XXX coverage o */
            if (!sv_derived_from(sv_first, "B::OP"))
                croak("Reference 'first' was not a B::OP object");
            else {
                IV tmp = SvIV((SV*)SvRV(sv_first));
                first = INT2PTR(OP*, tmp);
            }
        } else if (SvTRUE(sv_first))
            croak("'first' argument to B::COP->new should be a B::OP object or a false value");
        else
            first = Nullop;

        {
#if PERL_VERSION >= 10
        yy_parser* saveparser = PL_parser, dummyparser;
        if ( PL_parser == NULL) {
            PL_parser = &dummyparser;
            PL_parser-> copline = NOLINE;
        }
#endif
        SAVE_VARS;
        o = newSTATEOP(flags, CopLABEL_alloc(name), first);
        RESTORE_VARS;
#if PERL_VERSION >= 10
        PL_parser = saveparser;
#endif
        }
        ST(0) = sv_newmortal();
        sv_setiv(newSVrv(ST(0), "B::COP"), PTR2IV(o));
#line 2837 "Generate.c"
    }
    XSRETURN(1);
}

#if PERL_VERSION >= 22
#define XSubPPtmpAAAG 1


XS_EUPXS(XS_B__UNOP_AUX_aux); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__UNOP_AUX_aux)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "o, ...");
    {
	B__UNOP_AUX	o;
	B__UNOP_AUX_item	RETVAL;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__UNOP_AUX,tmp);
	}
	else
	    croak("o is not a reference")
;
#line 1743 "Generate.xs"
	if (items > 1)
	  o->op_aux = (UNOP_AUX_item*)SVtoO(ST(1));
    RETVAL = o->op_aux;
#line 2867 "Generate.c"
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    make_sv_object(aTHX_ (RETVALSV), (SV*)(RETVAL));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_B__UNOP_AUX_new); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__UNOP_AUX_new)
{
    dVAR; dXSARGS;
    if (items != 5)
       croak_xs_usage(cv,  "class, type, flags, sv_first, sv_aux");
    {
	SV *	class = ST(0)
;
	SV *	type = ST(1)
;
	I32	flags = (I32)SvIV(ST(2))
;
	SV *	sv_first = ST(3)
;
	SV *	sv_aux = ST(4)
;
	OP *	first;
	UNOP_AUX_item *	aux;
	OP *	o;
	I32	typenum;
#line 1762 "Generate.xs"
	I32 padflag = 0;
	if (SvROK(sv_first)) {
	  if (!sv_derived_from(sv_first, "B::OP"))
		croak("Reference 'first' was not a B::OP object");
	  else {
		IV tmp = SvIV((SV*)SvRV(sv_first));
		first = INT2PTR(OP*, tmp);
	  }
	} else if (SvTRUE(sv_first))
	  croak("'first' argument to B::UNOP_AUX->new should be a B::OP object or a false value");
	else
	  first = Nullop;

	if (SvROK(sv_aux)) {
	  if (!sv_derived_from(sv_first, "B::PV"))
		croak("Reference 'first' was not a B::PV object");
	  else {
		IV tmp = SvIV((SV*)SvRV(sv_aux));
		aux = INT2PTR(UNOP_AUX_item*, tmp);
	  }
	} else if (SvTRUE(sv_aux))
	  croak("'aux' argument to B::UNOP_AUX->new should be a B::PV object or a false value");
	else
	  aux = NULL;
	{

	  SAVE_VARS;
	  typenum = op_name_to_num(type);
	  {
		COP *cop = PL_curcop;
		PL_curcop = &PL_compiling;
		o = newUNOP_AUX(typenum, flags, first, aux);
		PL_curcop = cop;
	  }
	  CHECK_CUSTOM_OPS
	  RESTORE_VARS;
	}
    ST(0) = sv_newmortal();
    sv_setiv(newSVrv(ST(0), "B::UNOP_AUX"), PTR2IV(o));
#line 2940 "Generate.c"
    }
    XSRETURN(1);
}


XS_EUPXS(XS_B__METHOP_rclass); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__METHOP_rclass)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "o, ...");
    {
	B__METHOP	o;
	SV *	sv;
	B__HV	RETVAL;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__METHOP,tmp);
	}
	else
	    croak("o is not a reference")
;
#line 1810 "Generate.xs"
    if (items > 1) {
#ifdef USE_ITHREADS
      int i;
#endif
	  sv = (SV*)SVtoO(ST(1));
      if (sv &&
          (SvTYPE(sv) != SVt_PVHV
           || !HvNAME(sv)))
        croak("rclass argument is not a stash");
#ifdef USE_ITHREADS
      for (i=0;i<PL_generation;i++) {
        if (PL_curpad[i] == sv) {
          o->op_rclass_targ = i;
          break;
        }
      }
#else
      o->op_rclass_sv = sv;
#endif
    }
#ifdef USE_ITHREADS
    RETVAL = (HV*)PL_curpad[o->op_rclass_targ];
#else
    RETVAL = (HV*)o->op_rclass_sv;
#endif
#line 2990 "Generate.c"
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    make_sv_object(aTHX_ (RETVALSV), (SV*)(RETVAL));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_B__METHOP_meth_sv); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__METHOP_meth_sv)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "o, ...");
    {
	B__METHOP	o;
	B__SV	RETVAL;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    o = INT2PTR(B__METHOP,tmp);
	}
	else
	    croak("o is not a reference")
;
#line 1842 "Generate.xs"
	if (items > 1)
	  o->op_u.op_meth_sv = (SV*)SVtoO(ST(1));
    RETVAL = o->op_u.op_meth_sv;
#line 3023 "Generate.c"
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    make_sv_object(aTHX_ (RETVALSV), (SV*)(RETVAL));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_B__METHOP_new); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__METHOP_new)
{
    dVAR; dXSARGS;
    if (items != 4)
       croak_xs_usage(cv,  "class, type, flags, op_first");
    {
	SV *	class = ST(0)
;
	SV *	type = ST(1)
;
	I32	flags = (I32)SvIV(ST(2))
;
	SV *	op_first = ST(3)
;
	OP *	first;
	OP *	o;
	I32	typenum;
#line 1859 "Generate.xs"
	I32 padflag = 0;
	if (SvROK(op_first)) {
	  if (!sv_derived_from(op_first, "B::OP")) {
        if (sv_derived_from(op_first, "B::PV")) {
          IV tmp = SvIV(SvRV(op_first));
          first = INT2PTR(OP*, tmp);
        }
        else croak("Reference 'first' was not a B::OP or B::PV object");
      }
	  else {
		IV tmp = SvIV(SvRV(op_first));
		first = INT2PTR(OP*, tmp);
	  }
	} else if (SvTRUE(op_first))
	  croak("'first' argument to B::METHOP->new should be a B::OP or B::PV object or a false value");
	else
	  first = Nullop;
	{

	  SAVE_VARS;
	  typenum = op_name_to_num(type);
	  {
		COP *cop = PL_curcop;
		PL_curcop = &PL_compiling;
		o = newMETHOP(typenum, flags, first);
		PL_curcop = cop;
	  }
	  CHECK_CUSTOM_OPS
	  RESTORE_VARS;
	}
    ST(0) = sv_newmortal();
    sv_setiv(newSVrv(ST(0), "B::METHOP"), PTR2IV(o));
#line 3086 "Generate.c"
    }
    XSRETURN(1);
}

#endif

XS_EUPXS(XS_B__SV_sv); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__SV_sv)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "sv");
    {
	B__SV	sv;
	SV *	RETVAL;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    sv = INT2PTR(B__SV,tmp);
	}
	else
	    croak("sv is not a reference")
;
#line 1901 "Generate.xs"
        RETVAL = newSVsv(sv);
#line 3112 "Generate.c"
	RETVAL = sv_2mortal(RETVAL);
	ST(0) = RETVAL;
    }
    XSRETURN(1);
}


XS_EUPXS(XS_B__SV_dump); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__SV_dump)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "sv");
    {
	B__SV	sv;
	void *	RETVAL;
	dXSTARG;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    sv = INT2PTR(B__SV,tmp);
	}
	else
	    croak("sv is not a reference")
;
#line 1910 "Generate.xs"
        sv_dump(sv);
#line 3140 "Generate.c"
    }
    XSRETURN(1);
}


XS_EUPXS(XS_B__SV_FLAGS); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__SV_FLAGS)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "sv, ...");
    {
	B__SV	sv;
	U32	RETVAL;
	dXSTARG;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    sv = INT2PTR(B__SV,tmp);
	}
	else
	    croak("sv is not a reference")
;
#line 1917 "Generate.xs"
        if (items > 1)
            sv->sv_flags = SvIV(ST(1));
        RETVAL = SvFLAGS(sv);
#line 3168 "Generate.c"
	XSprePUSH; PUSHu((UV)RETVAL);
    }
    XSRETURN(1);
}


XS_EUPXS(XS_B__CV_ROOT); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__CV_ROOT)
{
    dVAR; dXSARGS;
    if (items != 1)
       croak_xs_usage(cv,  "cv");
    {
	B__CV	cv;
	B__OP	RETVAL;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    cv = INT2PTR(B__CV,tmp);
	}
	else
	    croak("cv is not a reference")
;
#line 1930 "Generate.xs"
        if (cv == PL_main_cv) {
            RETVAL = PL_main_root;
        } else {
            RETVAL = CvISXSUB(cv) ? NULL : CvROOT(cv);
        }
#line 3198 "Generate.c"
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    sv_setiv(newSVrv(RETVALSV, cc_opclassname(aTHX_ (OP*)RETVAL)), PTR2IV(RETVAL));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}


XS_EUPXS(XS_B__CV_newsub_simple); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__CV_newsub_simple)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "class, name, block");
    {
	SV*	class = ST(0)
;
	SV*	name = ST(1)
;
	B__OP	block;
	CV*	mycv;
	OP*	o;
	B__CV	RETVAL;

	if (SvROK(ST(2))) {
	    IV tmp = SvIV((SV*)SvRV(ST(2)));
	    block = INT2PTR(B__OP,tmp);
	}
	else
	    croak("block is not a reference")
;
#line 1948 "Generate.xs"
        o = newSVOP(OP_CONST, 0, SvREFCNT_inc(name));
        mycv = newSUB(start_subparse(FALSE, 0), o, Nullop, block);
        /*op_free(o); */
        RETVAL = mycv;
#line 3238 "Generate.c"
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    make_sv_object(aTHX_ (RETVALSV), (SV*)(RETVAL));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}

#ifdef HAVE_CV_CLONE
# define PERL_CORE
# include "embed.h"
#define XSubPPtmpAAAH 1


XS_EUPXS(XS_B__CV_NEW_with_start); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__CV_NEW_with_start)
{
    dVAR; dXSARGS;
    if (items != 3)
       croak_xs_usage(cv,  "cv, root, start");
    {
	B__CV	cv;
	B__OP	root;
	B__OP	start;
#line 1966 "Generate.xs"
       CV *new;
#line 3267 "Generate.c"
	B__CV	RETVAL;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    cv = INT2PTR(B__CV,tmp);
	}
	else
	    croak("cv is not a reference")
;

	if (SvROK(ST(1))) {
	    IV tmp = SvIV((SV*)SvRV(ST(1)));
	    root = INT2PTR(B__OP,tmp);
	}
	else
	    croak("root is not a reference")
;

	if (SvROK(ST(2))) {
	    IV tmp = SvIV((SV*)SvRV(ST(2)));
	    start = INT2PTR(B__OP,tmp);
	}
	else
	    croak("start is not a reference")
;
#line 1968 "Generate.xs"
       new = Perl_cv_clone(aTHX_ cv);
       CvROOT(new) = root;
       CvSTART(new) = start;
       CvDEPTH(new) = 0;
#if PERL_VERSION > 9
       CvPADLIST(new) = CvPADLIST(cv);
#endif
       SvREFCNT_inc(new);
       RETVAL = new;
#line 3303 "Generate.c"
	{
	    SV * RETVALSV;
	    RETVALSV = sv_newmortal();
	    make_sv_object(aTHX_ (RETVALSV), (SV*)(RETVAL));
	    ST(0) = RETVALSV;
	}
    }
    XSRETURN(1);
}

#undef PERL_CORE
#endif

XS_EUPXS(XS_B__PV_PV); /* prototype to pass -Wmissing-prototypes */
XS_EUPXS(XS_B__PV_PV)
{
    dVAR; dXSARGS;
    if (items < 1)
       croak_xs_usage(cv,  "sv, ...");
    {
	B__PV	sv;

	if (SvROK(ST(0))) {
	    IV tmp = SvIV((SV*)SvRV(ST(0)));
	    sv = INT2PTR(B__PV,tmp);
	}
	else
	    croak("sv is not a reference")
;
#line 1990 "Generate.xs"
  {
	if (items > 1) {
	  sv_setpv(sv, SvPV_nolen(ST(1)));
	}
	ST(0) = sv_newmortal();
	if ( SvPOK(sv) ) {
	  sv_setpvn(ST(0), SvPVX(sv), SvCUR(sv));
	  SvFLAGS(ST(0)) |= SvUTF8(sv);
	}
	else {
	  /* XXX for backward compatibility, but should fail */
	  /* croak( "argument is not SvPOK" ); */
	  sv_setpvn(ST(0), NULL, 0);
	}
  }
#line 3349 "Generate.c"
    }
    XSRETURN(1);
}

#ifdef __cplusplus
extern "C"
#endif
XS_EXTERNAL(boot_B__Generate); /* prototype to pass -Wmissing-prototypes */
XS_EXTERNAL(boot_B__Generate)
{
#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

        newXS_deffile("B::fudge", XS_B_fudge);
        (void)newXSproto_portable("B::main_root", XS_B_main_root, file, ";$");
        (void)newXSproto_portable("B::main_start", XS_B_main_start, file, ";$");
        (void)newXSproto_portable("B::cv_pad", XS_B_cv_pad, file, ";$");
        newXS_deffile("B::OP::find_cv", XS_B__OP_find_cv);
        newXS_deffile("B::OP::next", XS_B__OP_next);
        newXS_deffile("B::OP::sibling", XS_B__OP_sibling);
#if XSubPPtmpAAAA
        newXS_deffile("B::OP::sibparent", XS_B__OP_sibparent);
#endif
        newXS_deffile("B::OP::ppaddr", XS_B__OP_ppaddr);
        newXS_deffile("B::OP::desc", XS_B__OP_desc);
        newXS_deffile("B::OP::targ", XS_B__OP_targ);
        newXS_deffile("B::OP::type", XS_B__OP_type);
#if XSubPPtmpAAAB
        newXS_deffile("B::OP::seq", XS_B__OP_seq);
#endif
        newXS_deffile("B::OP::flags", XS_B__OP_flags);
        newXS_deffile("B::OP::private", XS_B__OP_private);
        newXS_deffile("B::OP::dump", XS_B__OP_dump);
        newXS_deffile("B::OP::clean", XS_B__OP_clean);
        newXS_deffile("B::OP::new", XS_B__OP_new);
        newXS_deffile("B::OP::newstate", XS_B__OP_newstate);
        newXS_deffile("B::OP::mutate", XS_B__OP_mutate);
        newXS_deffile("B::OP::convert", XS_B__OP_convert);
        newXS_deffile("B::UNOP::first", XS_B__UNOP_first);
        newXS_deffile("B::UNOP::new", XS_B__UNOP_new);
        newXS_deffile("B::BINOP::null", XS_B__BINOP_null);
        newXS_deffile("B::BINOP::last", XS_B__BINOP_last);
        newXS_deffile("B::BINOP::new", XS_B__BINOP_new);
        newXS_deffile("B::LISTOP::new", XS_B__LISTOP_new);
        newXS_deffile("B::LOGOP::new", XS_B__LOGOP_new);
        newXS_deffile("B::LOGOP::newcond", XS_B__LOGOP_newcond);
        newXS_deffile("B::LOGOP::other", XS_B__LOGOP_other);
#if XSubPPtmpAAAC
        newXS_deffile("B::PMOP::pmreplroot", XS_B__PMOP_pmreplroot);
        newXS_deffile("B::PMOP::pmreplstart", XS_B__PMOP_pmreplstart);
        newXS_deffile("B::PMOP::pmnext", XS_B__PMOP_pmnext);
        newXS_deffile("B::PMOP::pmpermflags", XS_B__PMOP_pmpermflags);
#endif
        newXS_deffile("B::PMOP::pmflags", XS_B__PMOP_pmflags);
#if XSubPPtmpAAAD
        newXS_deffile("B::PMOP::precomp", XS_B__PMOP_precomp);
#endif
        newXS_deffile("B::SVOP::sv", XS_B__SVOP_sv);
        newXS_deffile("B::SVOP::gv", XS_B__SVOP_gv);
        newXS_deffile("B::SVOP::new_svrv", XS_B__SVOP_new_svrv);
        newXS_deffile("B::SVOP::new", XS_B__SVOP_new);
        newXS_deffile("B::GVOP::new", XS_B__GVOP_new);
        newXS_deffile("B::PADOP::padix", XS_B__PADOP_padix);
        newXS_deffile("B::PADOP::sv", XS_B__PADOP_sv);
        newXS_deffile("B::PADOP::gv", XS_B__PADOP_gv);
        newXS_deffile("B::PVOP::pv", XS_B__PVOP_pv);
        newXS_deffile("B::LOOP::redoop", XS_B__LOOP_redoop);
        newXS_deffile("B::LOOP::nextop", XS_B__LOOP_nextop);
        newXS_deffile("B::LOOP::lastop", XS_B__LOOP_lastop);
#if XSubPPtmpAAAE
        newXS_deffile("B::COP::label", XS_B__COP_label);
#endif
        newXS_deffile("B::COP::stashpv", XS_B__COP_stashpv);
        newXS_deffile("B::COP::stash", XS_B__COP_stash);
        newXS_deffile("B::COP::file", XS_B__COP_file);
        newXS_deffile("B::COP::cop_seq", XS_B__COP_cop_seq);
#if XSubPPtmpAAAF
        newXS_deffile("B::COP::arybase", XS_B__COP_arybase);
#endif
        newXS_deffile("B::COP::line", XS_B__COP_line);
        newXS_deffile("B::COP::new", XS_B__COP_new);
#if XSubPPtmpAAAG
        newXS_deffile("B::UNOP_AUX::aux", XS_B__UNOP_AUX_aux);
        newXS_deffile("B::UNOP_AUX::new", XS_B__UNOP_AUX_new);
        newXS_deffile("B::METHOP::rclass", XS_B__METHOP_rclass);
        newXS_deffile("B::METHOP::meth_sv", XS_B__METHOP_meth_sv);
        newXS_deffile("B::METHOP::new", XS_B__METHOP_new);
#endif
        newXS_deffile("B::SV::sv", XS_B__SV_sv);
        newXS_deffile("B::SV::dump", XS_B__SV_dump);
        newXS_deffile("B::SV::FLAGS", XS_B__SV_FLAGS);
        newXS_deffile("B::CV::ROOT", XS_B__CV_ROOT);
        newXS_deffile("B::CV::newsub_simple", XS_B__CV_newsub_simple);
#if XSubPPtmpAAAH
        newXS_deffile("B::CV::NEW_with_start", XS_B__CV_NEW_with_start);
#endif
        newXS_deffile("B::PV::PV", XS_B__PV_PV);

    /* Initialisation Section */

#if XSubPPtmpAAAA
#endif
#if XSubPPtmpAAAB
#endif
#if XSubPPtmpAAAC
#endif
#if XSubPPtmpAAAD
#endif
#if XSubPPtmpAAAE
#endif
#if XSubPPtmpAAAF
#endif
#if XSubPPtmpAAAG
#endif
#if XSubPPtmpAAAH
#endif
#line 2007 "Generate.xs"
    specialsv_list[0] = Nullsv;
    specialsv_list[1] = &PL_sv_undef;
    specialsv_list[2] = &PL_sv_yes;
    specialsv_list[3] = &PL_sv_no;
    /* These are supposed to be (STRLEN*) so I cheat. */
    specialsv_list[4] = (SV*)pWARN_ALL;
    specialsv_list[5] = (SV*)pWARN_NONE;
    specialsv_list[6] = (SV*)pWARN_STD;

#line 3495 "Generate.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
}

