-#ifndef I_MULTIPLICITY
-# if defined(MULTIPLICITY) || defined(PERL_IMPLICIT_CONTEXT)
-# define I_MULTIPLICITY 1
-# else
-# define I_MULTIPLICITY 0
-# endif
-#endif
-#if I_MULTIPLICITY && !defined(tTHX)
-# define tTHX PerlInterpreter*
-#endif
-
-#if I_MULTIPLICITY && defined(USE_ITHREADS) && defined(dMY_CXT) && defined(MY_CXT) && defined(START_MY_CXT) && defined(MY_CXT_INIT) && (defined(MY_CXT_CLONE) || defined(dMY_CXT_SV))
-# define I_THREADSAFE 1
-# ifndef MY_CXT_CLONE
-# define MY_CXT_CLONE \
- dMY_CXT_SV; \
- my_cxt_t *my_cxtp = (my_cxt_t*)SvPVX(newSV(sizeof(my_cxt_t)-1)); \
- Copy(INT2PTR(my_cxt_t*, SvUV(my_cxt_sv)), my_cxtp, 1, my_cxt_t); \
- sv_setuv(my_cxt_sv, PTR2UV(my_cxtp))
-# endif
-#else
-# define I_THREADSAFE 0
-# undef dMY_CXT
-# define dMY_CXT dNOOP
-# undef MY_CXT
-# define MY_CXT indirect_globaldata
-# undef START_MY_CXT
-# define START_MY_CXT STATIC my_cxt_t MY_CXT;
-# undef MY_CXT_INIT
-# define MY_CXT_INIT NOOP
-# undef MY_CXT_CLONE
-# define MY_CXT_CLONE NOOP
-#endif
-
-#if defined(OP_CHECK_MUTEX_LOCK) && defined(OP_CHECK_MUTEX_UNLOCK)
-# define I_CHECK_MUTEX_LOCK OP_CHECK_MUTEX_LOCK
-# define I_CHECK_MUTEX_UNLOCK OP_CHECK_MUTEX_UNLOCK
-#else
-# define I_CHECK_MUTEX_LOCK OP_REFCNT_LOCK
-# define I_CHECK_MUTEX_UNLOCK OP_REFCNT_UNLOCK
-#endif
-
-typedef OP *(*indirect_ck_t)(pTHX_ OP *);
-
-#ifdef wrap_op_checker
-
-# define indirect_ck_replace(T, NC, OCP) wrap_op_checker((T), (NC), (OCP))
-
-#else
-
-STATIC void indirect_ck_replace(pTHX_ OPCODE type, indirect_ck_t new_ck, indirect_ck_t *old_ck_p) {
-#define indirect_ck_replace(T, NC, OCP) indirect_ck_replace(aTHX_ (T), (NC), (OCP))
- I_CHECK_MUTEX_LOCK;
- if (!*old_ck_p) {
- *old_ck_p = PL_check[type];
- PL_check[type] = new_ck;