This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Promote v5.36 usage and feature bundles doc
[perl5.git] / proto.h
diff --git a/proto.h b/proto.h
index a0abbdd..4ba7334 100644 (file)
--- a/proto.h
+++ b/proto.h
  */
 
 START_EXTERN_C
-#ifndef NO_MATHOMS
-PERL_CALLCONV UV       ASCII_TO_NEED(const UV enc, const UV ch)
-                       __attribute__deprecated__
-                       __attribute__warn_unused_result__
-                       __attribute__pure__;
-#define PERL_ARGS_ASSERT_ASCII_TO_NEED
-#endif
-
 #ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE I32 *       Perl_CvDEPTH(const CV * const sv);
 #define PERL_ARGS_ASSERT_CVDEPTH       \
@@ -38,38 +30,37 @@ PERL_STATIC_INLINE GV *     Perl_CvGV(pTHX_ CV *sv);
 PERL_CALLCONV int      Perl_Gv_AMupdate(pTHX_ HV* stash, bool destructing);
 #define PERL_ARGS_ASSERT_GV_AMUPDATE   \
        assert(stash)
-#ifndef NO_MATHOMS
-PERL_CALLCONV UV       NATIVE_TO_NEED(const UV enc, const UV ch)
-                       __attribute__deprecated__
-                       __attribute__warn_unused_result__
-                       __attribute__pure__;
-#define PERL_ARGS_ASSERT_NATIVE_TO_NEED
-#endif
-
 #ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE I32 Perl_POPMARK(pTHX);
 #define PERL_ARGS_ASSERT_POPMARK
 #endif
 PERL_CALLCONV const char *     Perl_PerlIO_context_layers(pTHX_ const char *mode);
 #define PERL_ARGS_ASSERT_PERLIO_CONTEXT_LAYERS
-PERL_CALLCONV int      Perl_PerlLIO_dup2_cloexec(pTHX_ int oldfd, int newfd);
+PERL_CALLCONV int      Perl_PerlLIO_dup2_cloexec(pTHX_ int oldfd, int newfd)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_PERLLIO_DUP2_CLOEXEC
+
 PERL_CALLCONV int      Perl_PerlLIO_dup_cloexec(pTHX_ int oldfd)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_PERLLIO_DUP_CLOEXEC
 
 PERL_CALLCONV int      Perl_PerlLIO_open3_cloexec(pTHX_ const char *file, int flag, int perm)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_PERLLIO_OPEN3_CLOEXEC \
        assert(file)
 
 PERL_CALLCONV int      Perl_PerlLIO_open_cloexec(pTHX_ const char *file, int flag)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_PERLLIO_OPEN_CLOEXEC  \
        assert(file)
 
 /* PERL_CALLCONV const XOP *   Perl_custom_op_xop(pTHX_ const OP *o); */
 #define PERL_ARGS_ASSERT_PERL_CUSTOM_OP_XOP
+PERL_CALLCONV HV *     Perl_localeconv(pTHX);
+#define PERL_ARGS_ASSERT_PERL_LOCALECONV
 PERL_CALLCONV const char*      Perl_setlocale(const int category, const char* locale);
 #define PERL_ARGS_ASSERT_PERL_SETLOCALE
 #ifndef PERL_NO_INLINE_FUNCTIONS
@@ -95,6 +86,38 @@ PERL_STATIC_INLINE void      Perl_SvAMAGIC_on(SV *sv);
        assert(sv)
 #endif
 #ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE void        Perl_SvGETMAGIC(pTHX_ SV *sv);
+#define PERL_ARGS_ASSERT_SVGETMAGIC    \
+       assert(sv)
+#endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE IV  Perl_SvIV(pTHX_ SV *sv);
+#define PERL_ARGS_ASSERT_SVIV  \
+       assert(sv)
+#endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE IV  Perl_SvIV_nomg(pTHX_ SV *sv);
+#define PERL_ARGS_ASSERT_SVIV_NOMG     \
+       assert(sv)
+#endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE NV  Perl_SvNV(pTHX_ SV *sv);
+#define PERL_ARGS_ASSERT_SVNV  \
+       assert(sv)
+#endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE NV  Perl_SvNV_nomg(pTHX_ SV *sv);
+#define PERL_ARGS_ASSERT_SVNV_NOMG     \
+       assert(sv)
+#endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_FORCE_INLINE bool  Perl_SvPVXtrue(pTHX_ SV *sv)
+                       __attribute__always_inline__;
+#define PERL_ARGS_ASSERT_SVPVXTRUE     \
+       assert(sv)
+#endif
+
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE void        Perl_SvREFCNT_dec(pTHX_ SV *sv);
 #define PERL_ARGS_ASSERT_SVREFCNT_DEC
 #endif
@@ -117,6 +140,34 @@ PERL_STATIC_INLINE void    Perl_SvREFCNT_inc_void(SV *sv);
 #define PERL_ARGS_ASSERT_SVREFCNT_INC_VOID
 #endif
 #ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE bool        Perl_SvTRUE(pTHX_ SV *sv);
+#define PERL_ARGS_ASSERT_SVTRUE
+#endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE bool        Perl_SvTRUE_NN(pTHX_ SV *sv);
+#define PERL_ARGS_ASSERT_SVTRUE_NN     \
+       assert(sv)
+#endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE bool        Perl_SvTRUE_common(pTHX_ SV *sv, const bool sv_2bool_is_fallback);
+#define PERL_ARGS_ASSERT_SVTRUE_COMMON \
+       assert(sv)
+#endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE bool        Perl_SvTRUE_nomg(pTHX_ SV *sv);
+#define PERL_ARGS_ASSERT_SVTRUE_NOMG
+#endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE UV  Perl_SvUV(pTHX_ SV *sv);
+#define PERL_ARGS_ASSERT_SVUV  \
+       assert(sv)
+#endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE UV  Perl_SvUV_nomg(pTHX_ SV *sv);
+#define PERL_ARGS_ASSERT_SVUV_NOMG     \
+       assert(sv)
+#endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE I32 Perl_TOPMARK(pTHX);
 #define PERL_ARGS_ASSERT_TOPMARK
 #endif
@@ -181,31 +232,40 @@ PERL_CALLCONV UV  Perl__utf8n_to_uvchr_msgs_helper(const U8 *s, STRLEN curlen, ST
 PERL_CALLCONV void     Perl__warn_problematic_locale(void);
 #define PERL_ARGS_ASSERT__WARN_PROBLEMATIC_LOCALE
 PERL_CALLCONV_NO_RET void      Perl_abort_execution(pTHX_ const char * const msg, const char * const name)
-                       __attribute__noreturn__;
+                       __attribute__noreturn__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_ABORT_EXECUTION       \
        assert(msg); assert(name)
 
-PERL_CALLCONV LOGOP*   Perl_alloc_LOGOP(pTHX_ I32 type, OP *first, OP *other);
+PERL_CALLCONV LOGOP*   Perl_alloc_LOGOP(pTHX_ I32 type, OP *first, OP *other)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_ALLOC_LOGOP
-PERL_CALLCONV PADOFFSET        Perl_allocmy(pTHX_ const char *const name, const STRLEN len, const U32 flags);
+
+PERL_CALLCONV PADOFFSET        Perl_allocmy(pTHX_ const char *const name, const STRLEN len, const U32 flags)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_ALLOCMY       \
        assert(name)
+
 PERL_CALLCONV SV*      Perl_amagic_call(pTHX_ SV* left, SV* right, int method, int dir);
 #define PERL_ARGS_ASSERT_AMAGIC_CALL   \
        assert(left); assert(right)
 PERL_CALLCONV SV *     Perl_amagic_deref_call(pTHX_ SV *ref, int method);
 #define PERL_ARGS_ASSERT_AMAGIC_DEREF_CALL     \
        assert(ref)
-PERL_CALLCONV bool     Perl_amagic_is_enabled(pTHX_ int method);
+PERL_CALLCONV bool     Perl_amagic_is_enabled(pTHX_ int method)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_AMAGIC_IS_ENABLED
+
 #ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE void        Perl_append_utf8_from_native_byte(const U8 byte, U8** dest);
 #define PERL_ARGS_ASSERT_APPEND_UTF8_FROM_NATIVE_BYTE  \
        assert(dest)
 #endif
-PERL_CALLCONV I32      Perl_apply(pTHX_ I32 type, SV** mark, SV** sp);
+PERL_CALLCONV I32      Perl_apply(pTHX_ I32 type, SV** mark, SV** sp)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_APPLY \
        assert(mark); assert(sp)
+
 PERL_CALLCONV void     Perl_apply_attrs_string(pTHX_ const char *stashpv, CV *cv, const char *attrstr, STRLEN len);
 #define PERL_ARGS_ASSERT_APPLY_ATTRS_STRING    \
        assert(stashpv); assert(cv); assert(attrstr)
@@ -219,6 +279,13 @@ PERL_CALLCONV SV** Perl_av_arylen_p(pTHX_ AV *av);
 PERL_CALLCONV void     Perl_av_clear(pTHX_ AV *av);
 #define PERL_ARGS_ASSERT_AV_CLEAR      \
        assert(av)
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE Size_t      Perl_av_count(pTHX_ AV *av)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_AV_COUNT      \
+       assert(av)
+#endif
+
 PERL_CALLCONV void     Perl_av_create_and_push(pTHX_ AV **const avp, SV *const val);
 #define PERL_ARGS_ASSERT_AV_CREATE_AND_PUSH    \
        assert(avp); assert(val)
@@ -236,14 +303,23 @@ PERL_CALLCONV bool        Perl_av_exists(pTHX_ AV *av, SSize_t key)
 PERL_CALLCONV void     Perl_av_extend(pTHX_ AV *av, SSize_t key);
 #define PERL_ARGS_ASSERT_AV_EXTEND     \
        assert(av)
-PERL_CALLCONV void     Perl_av_extend_guts(pTHX_ AV *av, SSize_t key, SSize_t *maxp, SV ***allocp, SV ***arrayp);
+PERL_CALLCONV void     Perl_av_extend_guts(pTHX_ AV *av, SSize_t key, SSize_t *maxp, SV ***allocp, SV ***arrayp)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_AV_EXTEND_GUTS        \
        assert(maxp); assert(allocp); assert(arrayp)
+
 PERL_CALLCONV SV**     Perl_av_fetch(pTHX_ AV *av, SSize_t key, I32 lval)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_AV_FETCH      \
        assert(av)
 
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE SV**        Perl_av_fetch_simple(pTHX_ AV *av, SSize_t key, I32 lval)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_AV_FETCH_SIMPLE       \
+       assert(av)
+#endif
+
 PERL_CALLCONV void     Perl_av_fill(pTHX_ AV *av, SSize_t fill);
 #define PERL_ARGS_ASSERT_AV_FILL       \
        assert(av)
@@ -260,15 +336,28 @@ PERL_CALLCONV AV* Perl_av_make(pTHX_ SSize_t size, SV **strp)
 #define PERL_ARGS_ASSERT_AV_MAKE       \
        assert(strp)
 
-PERL_CALLCONV SV*      Perl_av_nonelem(pTHX_ AV *av, SSize_t ix);
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE AV* Perl_av_new_alloc(pTHX_ SSize_t size, bool zeroflag)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_AV_NEW_ALLOC
+#endif
+
+PERL_CALLCONV SV*      Perl_av_nonelem(pTHX_ AV *av, SSize_t ix)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_AV_NONELEM    \
        assert(av)
+
 PERL_CALLCONV SV*      Perl_av_pop(pTHX_ AV *av);
 #define PERL_ARGS_ASSERT_AV_POP        \
        assert(av)
 PERL_CALLCONV void     Perl_av_push(pTHX_ AV *av, SV *val);
 #define PERL_ARGS_ASSERT_AV_PUSH       \
        assert(av); assert(val)
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE void        Perl_av_push_simple(pTHX_ AV *av, SV *val);
+#define PERL_ARGS_ASSERT_AV_PUSH_SIMPLE        \
+       assert(av); assert(val)
+#endif
 PERL_CALLCONV void     Perl_av_reify(pTHX_ AV *av);
 #define PERL_ARGS_ASSERT_AV_REIFY      \
        assert(av)
@@ -280,16 +369,18 @@ PERL_CALLCONV SV* Perl_av_shift(pTHX_ AV *av)
 PERL_CALLCONV SV**     Perl_av_store(pTHX_ AV *av, SSize_t key, SV *val);
 #define PERL_ARGS_ASSERT_AV_STORE      \
        assert(av)
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE SV**        Perl_av_store_simple(pTHX_ AV *av, SSize_t key, SV *val);
+#define PERL_ARGS_ASSERT_AV_STORE_SIMPLE       \
+       assert(av)
+#endif
 /* PERL_CALLCONV SSize_t       av_tindex(pTHX_ AV *av)
                        __attribute__warn_unused_result__; */
 #define PERL_ARGS_ASSERT_AV_TINDEX
 
-#ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE SSize_t     Perl_av_top_index(pTHX_ AV *av)
-                       __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT_AV_TOP_INDEX  \
-       assert(av)
-#endif
+/* PERL_CALLCONV SSize_t       av_top_index(pTHX_ AV *av)
+                       __attribute__warn_unused_result__; */
+#define PERL_ARGS_ASSERT_AV_TOP_INDEX
 
 PERL_CALLCONV void     Perl_av_undef(pTHX_ AV *av);
 #define PERL_ARGS_ASSERT_AV_UNDEF      \
@@ -298,7 +389,8 @@ PERL_CALLCONV void  Perl_av_unshift(pTHX_ AV *av, SSize_t num);
 #define PERL_ARGS_ASSERT_AV_UNSHIFT    \
        assert(av)
 PERL_CALLCONV OP*      Perl_bind_match(pTHX_ I32 type, OP *left, OP *right)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_BIND_MATCH    \
        assert(left); assert(right)
 
@@ -317,12 +409,22 @@ PERL_CALLCONV int Perl_block_start(pTHX_ int full)
 PERL_CALLCONV void     Perl_blockhook_register(pTHX_ BHK *hk);
 #define PERL_ARGS_ASSERT_BLOCKHOOK_REGISTER    \
        assert(hk)
-PERL_CALLCONV void     Perl_boot_core_PerlIO(pTHX);
+PERL_CALLCONV void     Perl_boot_core_PerlIO(pTHX)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_BOOT_CORE_PERLIO
-PERL_CALLCONV void     Perl_boot_core_UNIVERSAL(pTHX);
+
+PERL_CALLCONV void     Perl_boot_core_UNIVERSAL(pTHX)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_BOOT_CORE_UNIVERSAL
-PERL_CALLCONV void     Perl_boot_core_mro(pTHX);
+
+PERL_CALLCONV void     Perl_boot_core_builtin(pTHX)
+                       __attribute__visibility__("hidden");
+#define PERL_ARGS_ASSERT_BOOT_CORE_BUILTIN
+
+PERL_CALLCONV void     Perl_boot_core_mro(pTHX)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_BOOT_CORE_MRO
+
 PERL_CALLCONV int      Perl_bytes_cmp_utf8(pTHX_ const U8 *b, STRLEN blen, const U8 *u, STRLEN ulen);
 #define PERL_ARGS_ASSERT_BYTES_CMP_UTF8        \
        assert(b); assert(u)
@@ -360,7 +462,8 @@ PERL_CALLCONV Malloc_t      Perl_calloc(MEM_SIZE elements, MEM_SIZE size)
 #define PERL_ARGS_ASSERT_CALLOC
 
 PERL_CALLCONV bool     Perl_cando(pTHX_ Mode_t mode, bool effective, const Stat_t* statbufp)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CANDO \
        assert(statbufp)
 
@@ -380,52 +483,64 @@ PERL_CALLCONV UV  Perl_cast_uv(NV f)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_CAST_UV
 
-PERL_CALLCONV bool     Perl_check_utf8_print(pTHX_ const U8 *s, const STRLEN len);
+PERL_CALLCONV bool     Perl_check_utf8_print(pTHX_ const U8 *s, const STRLEN len)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CHECK_UTF8_PRINT      \
        assert(s)
+
 PERL_CALLCONV OP *     Perl_ck_anoncode(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_ANONCODE   \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_backtick(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_BACKTICK   \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_bitop(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_BITOP      \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_cmp(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_CMP        \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_concat(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_CONCAT     \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_defined(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_DEFINED    \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_delete(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_DELETE     \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_each(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_EACH       \
        assert(o)
 
-PERL_CALLCONV OP*      Perl_ck_entersub_args_core(pTHX_ OP *entersubop, GV *namegv, SV *protosv);
+PERL_CALLCONV OP*      Perl_ck_entersub_args_core(pTHX_ OP *entersubop, GV *namegv, SV *protosv)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_ENTERSUB_ARGS_CORE \
        assert(entersubop); assert(namegv); assert(protosv)
+
 PERL_CALLCONV OP*      Perl_ck_entersub_args_list(pTHX_ OP *entersubop);
 #define PERL_ARGS_ASSERT_CK_ENTERSUB_ARGS_LIST \
        assert(entersubop)
@@ -436,200 +551,245 @@ PERL_CALLCONV OP*       Perl_ck_entersub_args_proto_or_list(pTHX_ OP *entersubop, GV *
 #define PERL_ARGS_ASSERT_CK_ENTERSUB_ARGS_PROTO_OR_LIST        \
        assert(entersubop); assert(namegv); assert(protosv)
 PERL_CALLCONV OP *     Perl_ck_eof(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_EOF        \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_eval(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_EVAL       \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_exec(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_EXEC       \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_exists(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_EXISTS     \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_ftst(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_FTST       \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_fun(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_FUN        \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_glob(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_GLOB       \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_grep(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_GREP       \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_index(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_INDEX      \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_isa(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_ISA        \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_join(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_JOIN       \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_length(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_LENGTH     \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_lfun(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_LFUN       \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_listiob(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_LISTIOB    \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_match(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_MATCH      \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_method(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_METHOD     \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_null(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_NULL       \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_open(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_OPEN       \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_prototype(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_PROTOTYPE  \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_readline(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_READLINE   \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_refassign(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_REFASSIGN  \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_repeat(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_REPEAT     \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_require(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_REQUIRE    \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_return(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_RETURN     \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_rfun(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_RFUN       \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_rvconst(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_RVCONST    \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_sassign(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_SASSIGN    \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_select(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_SELECT     \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_shift(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_SHIFT      \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_smartmatch(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_SMARTMATCH \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_sort(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_SORT       \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_spair(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_SPAIR      \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_split(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_SPLIT      \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_stringify(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_STRINGIFY  \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_subr(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_SUBR       \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_substr(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_SUBSTR     \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_svconst(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_SVCONST    \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_tell(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_TELL       \
        assert(o)
 
 PERL_CALLCONV OP *     Perl_ck_trunc(pTHX_ OP *o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CK_TRUNC      \
        assert(o)
 
+PERL_CALLCONV OP *     Perl_ck_trycatch(pTHX_ OP *o)
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
+#define PERL_ARGS_ASSERT_CK_TRYCATCH   \
+       assert(o)
+
 PERL_CALLCONV void     Perl_ck_warner(pTHX_ U32 err, const char* pat, ...)
                        __attribute__format__(__printf__,pTHX_2,pTHX_3);
 #define PERL_ARGS_ASSERT_CK_WARNER     \
@@ -653,23 +813,52 @@ PERL_CALLCONV bool        Perl_ckwarn_d(pTHX_ U32 w)
 PERL_CALLCONV void     Perl_clear_defarray(pTHX_ AV* av, bool abandon);
 #define PERL_ARGS_ASSERT_CLEAR_DEFARRAY        \
        assert(av)
-PERL_CALLCONV const COP*       Perl_closest_cop(pTHX_ const COP *cop, const OP *o, const OP *curop, bool opnext);
+PERL_CALLCONV const COP*       Perl_closest_cop(pTHX_ const COP *cop, const OP *o, const OP *curop, bool opnext)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CLOSEST_COP   \
        assert(cop)
+
+PERL_CALLCONV OP*      Perl_cmpchain_extend(pTHX_ I32 type, OP* ch, OP* right)
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
+#define PERL_ARGS_ASSERT_CMPCHAIN_EXTEND       \
+       assert(ch)
+
+PERL_CALLCONV OP*      Perl_cmpchain_finish(pTHX_ OP* ch)
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
+#define PERL_ARGS_ASSERT_CMPCHAIN_FINISH       \
+       assert(ch)
+
+PERL_CALLCONV OP*      Perl_cmpchain_start(pTHX_ I32 type, OP* left, OP* right)
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
+#define PERL_ARGS_ASSERT_CMPCHAIN_START
+
+PERL_CALLCONV const char *     Perl_cntrl_to_mnemonic(const U8 c)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_CNTRL_TO_MNEMONIC
+
 PERL_CALLCONV const char *     Perl_cop_fetch_label(pTHX_ COP *const cop, STRLEN *len, U32 *flags);
 #define PERL_ARGS_ASSERT_COP_FETCH_LABEL       \
        assert(cop)
 PERL_CALLCONV void     Perl_cop_store_label(pTHX_ COP *const cop, const char *label, STRLEN len, U32 flags);
 #define PERL_ARGS_ASSERT_COP_STORE_LABEL       \
        assert(cop); assert(label)
-PERL_CALLCONV SV *     Perl_core_prototype(pTHX_ SV *sv, const char *name, const int code, int * const opnum);
+PERL_CALLCONV SV *     Perl_core_prototype(pTHX_ SV *sv, const char *name, const int code, int * const opnum)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CORE_PROTOTYPE        \
        assert(name)
-PERL_CALLCONV OP *     Perl_coresub_op(pTHX_ SV *const coreargssv, const int code, const int opnum);
+
+PERL_CALLCONV OP *     Perl_coresub_op(pTHX_ SV *const coreargssv, const int code, const int opnum)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CORESUB_OP    \
        assert(coreargssv)
-PERL_CALLCONV void     Perl_create_eval_scope(pTHX_ OP *retop, U32 flags);
+
+PERL_CALLCONV void     Perl_create_eval_scope(pTHX_ OP *retop, U32 flags)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CREATE_EVAL_SCOPE
+
 PERL_CALLCONV_NO_RET void      Perl_croak(pTHX_ const char* pat, ...)
                        __attribute__noreturn__
                        __attribute__format__null_ok__(__printf__,pTHX_1,pTHX_2);
@@ -677,15 +866,17 @@ PERL_CALLCONV_NO_RET void Perl_croak(pTHX_ const char* pat, ...)
 
 PERL_CALLCONV_NO_RET void      Perl_croak_caller(const char* pat, ...)
                        __attribute__noreturn__
+                       __attribute__visibility__("hidden")
                        __attribute__format__null_ok__(__printf__,1,2);
 #define PERL_ARGS_ASSERT_CROAK_CALLER
 
-PERL_STATIC_INLINE_NO_RET void Perl_croak_memory_wrap(void)
+PERL_STATIC_NO_RET void        Perl_croak_memory_wrap(void)
                        __attribute__noreturn__;
 #define PERL_ARGS_ASSERT_CROAK_MEMORY_WRAP
 
 PERL_CALLCONV_NO_RET void      Perl_croak_no_mem(void)
-                       __attribute__noreturn__;
+                       __attribute__noreturn__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CROAK_NO_MEM
 
 PERL_CALLCONV_NO_RET void      Perl_croak_no_modify(void)
@@ -712,27 +903,11 @@ PERL_CALLCONV Signal_t    Perl_csighandler3(int sig, Siginfo_t *info, void *uap);
 #define PERL_ARGS_ASSERT_CSIGHANDLER3
 PERL_CALLCONV regexp_engine const *    Perl_current_re_engine(pTHX);
 #define PERL_ARGS_ASSERT_CURRENT_RE_ENGINE
-#ifndef NO_MATHOMS
-PERL_CALLCONV const char *     Perl_custom_op_desc(pTHX_ const OP *o)
-                       __attribute__deprecated__
-                       __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT_CUSTOM_OP_DESC        \
-       assert(o)
-#endif
-
 PERL_CALLCONV XOPRETANY        Perl_custom_op_get_field(pTHX_ const OP *o, const xop_flags_enum field)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_CUSTOM_OP_GET_FIELD   \
        assert(o)
 
-#ifndef NO_MATHOMS
-PERL_CALLCONV const char *     Perl_custom_op_name(pTHX_ const OP *o)
-                       __attribute__deprecated__
-                       __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT_CUSTOM_OP_NAME        \
-       assert(o)
-#endif
-
 PERL_CALLCONV void     Perl_custom_op_register(pTHX_ Perl_ppaddr_t ppaddr, const XOP *xop);
 #define PERL_ARGS_ASSERT_CUSTOM_OP_REGISTER    \
        assert(ppaddr); assert(xop)
@@ -742,19 +917,24 @@ PERL_CALLCONV void        Perl_cv_ckproto_len_flags(pTHX_ const CV* cv, const GV* gv, c
 PERL_CALLCONV CV*      Perl_cv_clone(pTHX_ CV* proto);
 #define PERL_ARGS_ASSERT_CV_CLONE      \
        assert(proto)
-PERL_CALLCONV CV*      Perl_cv_clone_into(pTHX_ CV* proto, CV *target);
+PERL_CALLCONV CV*      Perl_cv_clone_into(pTHX_ CV* proto, CV *target)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CV_CLONE_INTO \
        assert(proto); assert(target)
+
 PERL_CALLCONV SV*      Perl_cv_const_sv(const CV *const cv)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_CV_CONST_SV
 
 PERL_CALLCONV SV*      Perl_cv_const_sv_or_av(const CV *const cv)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CV_CONST_SV_OR_AV
 
-PERL_CALLCONV void     Perl_cv_forget_slab(pTHX_ CV *cv);
+PERL_CALLCONV void     Perl_cv_forget_slab(pTHX_ CV *cv)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CV_FORGET_SLAB
+
 PERL_CALLCONV void     Perl_cv_get_call_checker(pTHX_ CV *cv, Perl_call_checker *ckfun_p, SV **ckobj_p);
 #define PERL_ARGS_ASSERT_CV_GET_CALL_CHECKER   \
        assert(cv); assert(ckfun_p); assert(ckobj_p)
@@ -773,9 +953,11 @@ PERL_CALLCONV void Perl_cv_set_call_checker_flags(pTHX_ CV *cv, Perl_call_checke
 PERL_CALLCONV void     Perl_cv_undef(pTHX_ CV* cv);
 #define PERL_ARGS_ASSERT_CV_UNDEF      \
        assert(cv)
-PERL_CALLCONV void     Perl_cv_undef_flags(pTHX_ CV* cv, U32 flags);
+PERL_CALLCONV void     Perl_cv_undef_flags(pTHX_ CV* cv, U32 flags)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_CV_UNDEF_FLAGS        \
        assert(cv)
+
 PERL_CALLCONV GV *     Perl_cvgv_from_hek(pTHX_ CV* cv);
 #define PERL_ARGS_ASSERT_CVGV_FROM_HEK \
        assert(cv)
@@ -797,8 +979,10 @@ PERL_CALLCONV void Perl_deb(pTHX_ const char* pat, ...)
 #define PERL_ARGS_ASSERT_DEB   \
        assert(pat)
 
-PERL_CALLCONV void     Perl_deb_stack_all(pTHX);
+PERL_CALLCONV void     Perl_deb_stack_all(pTHX)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_DEB_STACK_ALL
+
 PERL_CALLCONV I32      Perl_debop(pTHX_ const OP* o);
 #define PERL_ARGS_ASSERT_DEBOP \
        assert(o)
@@ -808,19 +992,26 @@ PERL_CALLCONV I32 Perl_debstack(pTHX);
 #define PERL_ARGS_ASSERT_DEBSTACK
 PERL_CALLCONV I32      Perl_debstackptrs(pTHX);
 #define PERL_ARGS_ASSERT_DEBSTACKPTRS
+PERL_CALLCONV void     Perl_debug_hash_seed(pTHX_ bool via_debug_h)
+                       __attribute__visibility__("hidden");
+#define PERL_ARGS_ASSERT_DEBUG_HASH_SEED
+
 PERL_CALLCONV SV *     Perl_defelem_target(pTHX_ SV *sv, MAGIC *mg)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_DEFELEM_TARGET        \
        assert(sv)
 
-PERL_CALLCONV void     Perl_delete_eval_scope(pTHX);
+PERL_CALLCONV void     Perl_delete_eval_scope(pTHX)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_DELETE_EVAL_SCOPE
-PERL_CALLCONV char*    Perl_delimcpy(char* to, const char* toend, const char* from, const char* fromend, int delim, I32* retlen);
+
+PERL_CALLCONV char*    Perl_delimcpy(char* to, const char* to_end, const char* from, const char* from_end, const int delim, I32* retlen);
 #define PERL_ARGS_ASSERT_DELIMCPY      \
-       assert(to); assert(toend); assert(from); assert(fromend); assert(retlen)
-PERL_CALLCONV char*    Perl_delimcpy_no_escape(char* to, const char* toend, const char* from, const char* fromend, int delim, I32* retlen);
+       assert(to); assert(to_end); assert(from); assert(from_end); assert(retlen)
+PERL_CALLCONV char*    Perl_delimcpy_no_escape(char* to, const char* to_end, const char* from, const char* from_end, const int delim, I32* retlen);
 #define PERL_ARGS_ASSERT_DELIMCPY_NO_ESCAPE    \
-       assert(to); assert(toend); assert(from); assert(fromend); assert(retlen)
+       assert(to); assert(to_end); assert(from); assert(from_end); assert(retlen)
 PERL_CALLCONV void     Perl_despatch_signals(pTHX);
 #define PERL_ARGS_ASSERT_DESPATCH_SIGNALS
 PERL_CALLCONV_NO_RET OP*       Perl_die(pTHX_ const char* pat, ...)
@@ -834,33 +1025,35 @@ PERL_CALLCONV_NO_RET OP* Perl_die_sv(pTHX_ SV *baseex)
        assert(baseex)
 
 PERL_CALLCONV_NO_RET void      Perl_die_unwind(pTHX_ SV* msv)
-                       __attribute__noreturn__;
+                       __attribute__noreturn__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_DIE_UNWIND    \
        assert(msv)
 
 #ifndef NO_MATHOMS
-PERL_CALLCONV bool     Perl_do_aexec(pTHX_ SV* really, SV** mark, SV** sp);
+PERL_CALLCONV bool     Perl_do_aexec(pTHX_ SV* really, SV** mark, SV** sp)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_DO_AEXEC      \
        assert(mark); assert(sp)
 #endif
-PERL_CALLCONV bool     Perl_do_aexec5(pTHX_ SV* really, SV** mark, SV** sp, int fd, int do_report);
+
+PERL_CALLCONV bool     Perl_do_aexec5(pTHX_ SV* really, SV** mark, SV** sp, int fd, int do_report)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_DO_AEXEC5     \
        assert(mark); assert(sp)
-#ifndef NO_MATHOMS
-PERL_CALLCONV int      Perl_do_binmode(pTHX_ PerlIO *fp, int iotype, int mode)
-                       __attribute__deprecated__;
-#define PERL_ARGS_ASSERT_DO_BINMODE    \
-       assert(fp)
-#endif
 
-PERL_CALLCONV bool     Perl_do_close(pTHX_ GV* gv, bool not_implicit);
+PERL_CALLCONV bool     Perl_do_close(pTHX_ GV* gv, bool is_explicit);
 #define PERL_ARGS_ASSERT_DO_CLOSE
-PERL_CALLCONV void     Perl_do_dump_pad(pTHX_ I32 level, PerlIO *file, PADLIST *padlist, int full);
+PERL_CALLCONV void     Perl_do_dump_pad(pTHX_ I32 level, PerlIO *file, PADLIST *padlist, int full)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_DO_DUMP_PAD   \
        assert(file)
-PERL_CALLCONV bool     Perl_do_eof(pTHX_ GV* gv);
+
+PERL_CALLCONV bool     Perl_do_eof(pTHX_ GV* gv)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_DO_EOF        \
        assert(gv)
+
 PERL_CALLCONV void     Perl_do_gv_dump(pTHX_ I32 level, PerlIO *file, const char *name, GV *sv);
 #define PERL_ARGS_ASSERT_DO_GV_DUMP    \
        assert(file); assert(name)
@@ -877,7 +1070,8 @@ PERL_CALLCONV void Perl_do_magic_dump(pTHX_ I32 level, PerlIO *file, const MAGIC
 #define PERL_ARGS_ASSERT_DO_MAGIC_DUMP \
        assert(file)
 PERL_CALLCONV I32      Perl_do_ncmp(pTHX_ SV *const left, SV *const right)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_DO_NCMP       \
        assert(left); assert(right)
 
@@ -889,63 +1083,83 @@ PERL_CALLCONV bool       Perl_do_open(pTHX_ GV* gv, const char* name, I32 len, int as_
 #define PERL_ARGS_ASSERT_DO_OPEN       \
        assert(gv); assert(name)
 #endif
-PERL_CALLCONV bool     Perl_do_open6(pTHX_ GV *gv, const char *oname, STRLEN len, PerlIO *supplied_fp, SV **svp, U32 num);
+PERL_CALLCONV bool     Perl_do_open6(pTHX_ GV *gv, const char *oname, STRLEN len, PerlIO *supplied_fp, SV **svp, U32 num)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_DO_OPEN6      \
        assert(gv); assert(oname)
-#ifndef NO_MATHOMS
-PERL_CALLCONV bool     Perl_do_open9(pTHX_ GV *gv, const char *name, I32 len, int as_raw, int rawmode, int rawperm, PerlIO *supplied_fp, SV *svs, I32 num)
-                       __attribute__deprecated__;
-#define PERL_ARGS_ASSERT_DO_OPEN9      \
-       assert(gv); assert(name); assert(svs)
-#endif
 
-PERL_CALLCONV bool     Perl_do_open_raw(pTHX_ GV *gv, const char *oname, STRLEN len, int rawmode, int rawperm, Stat_t *statbufp);
+PERL_CALLCONV bool     Perl_do_open_raw(pTHX_ GV *gv, const char *oname, STRLEN len, int rawmode, int rawperm, Stat_t *statbufp)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_DO_OPEN_RAW   \
        assert(gv); assert(oname)
+
 PERL_CALLCONV bool     Perl_do_openn(pTHX_ GV *gv, const char *oname, I32 len, int as_raw, int rawmode, int rawperm, PerlIO *supplied_fp, SV **svp, I32 num);
 #define PERL_ARGS_ASSERT_DO_OPENN      \
        assert(gv); assert(oname)
 PERL_CALLCONV void     Perl_do_pmop_dump(pTHX_ I32 level, PerlIO *file, const PMOP *pm);
 #define PERL_ARGS_ASSERT_DO_PMOP_DUMP  \
        assert(file)
-PERL_CALLCONV bool     Perl_do_print(pTHX_ SV* sv, PerlIO* fp);
+PERL_CALLCONV bool     Perl_do_print(pTHX_ SV* sv, PerlIO* fp)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_DO_PRINT      \
        assert(fp)
+
 PERL_CALLCONV OP*      Perl_do_readline(pTHX)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_DO_READLINE
 
-PERL_CALLCONV bool     Perl_do_seek(pTHX_ GV* gv, Off_t pos, int whence);
+PERL_CALLCONV bool     Perl_do_seek(pTHX_ GV* gv, Off_t pos, int whence)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_DO_SEEK
+
 PERL_CALLCONV void     Perl_do_sprintf(pTHX_ SV* sv, SSize_t len, SV** sarg);
 #define PERL_ARGS_ASSERT_DO_SPRINTF    \
        assert(sv); assert(sarg)
 PERL_CALLCONV void     Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bool dumpops, STRLEN pvlim);
 #define PERL_ARGS_ASSERT_DO_SV_DUMP    \
        assert(file)
-PERL_CALLCONV Off_t    Perl_do_sysseek(pTHX_ GV* gv, Off_t pos, int whence);
+PERL_CALLCONV Off_t    Perl_do_sysseek(pTHX_ GV* gv, Off_t pos, int whence)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_DO_SYSSEEK    \
        assert(gv)
+
 PERL_CALLCONV Off_t    Perl_do_tell(pTHX_ GV* gv)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_DO_TELL       \
        assert(gv)
 
-PERL_CALLCONV Size_t   Perl_do_trans(pTHX_ SV* sv);
+PERL_CALLCONV Size_t   Perl_do_trans(pTHX_ SV* sv)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_DO_TRANS      \
        assert(sv)
-PERL_CALLCONV UV       Perl_do_vecget(pTHX_ SV* sv, STRLEN offset, int size);
-#define PERL_ARGS_ASSERT_DO_VECGET     \
-       assert(sv)
-PERL_CALLCONV void     Perl_do_vecset(pTHX_ SV* sv);
-#define PERL_ARGS_ASSERT_DO_VECSET     \
+
+PERL_CALLCONV I16      Perl_do_uniprop_match(const char * const key, const U16 key_len)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_DO_UNIPROP_MATCH      \
+       assert(key)
+
+PERL_CALLCONV UV       Perl_do_vecget(pTHX_ SV* sv, STRLEN offset, int size)
+                       __attribute__visibility__("hidden");
+#define PERL_ARGS_ASSERT_DO_VECGET     \
+       assert(sv)
+
+PERL_CALLCONV void     Perl_do_vecset(pTHX_ SV* sv)
+                       __attribute__visibility__("hidden");
+#define PERL_ARGS_ASSERT_DO_VECSET     \
        assert(sv)
-PERL_CALLCONV void     Perl_do_vop(pTHX_ I32 optype, SV* sv, SV* left, SV* right);
+
+PERL_CALLCONV void     Perl_do_vop(pTHX_ I32 optype, SV* sv, SV* left, SV* right)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_DO_VOP        \
        assert(sv); assert(left); assert(right)
-PERL_CALLCONV OP*      Perl_dofile(pTHX_ OP* term, I32 force_builtin);
+
+PERL_CALLCONV OP*      Perl_dofile(pTHX_ OP* term, I32 force_builtin)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_DOFILE        \
        assert(term)
+
 PERL_CALLCONV bool     Perl_doing_taint(int argc, char** argv, char** env)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_DOING_TAINT
@@ -967,8 +1181,10 @@ PERL_CALLCONV double      Perl_drand48_r(perl_drand48_t *random_state);
        assert(random_state)
 PERL_CALLCONV void     Perl_dump_all(pTHX);
 #define PERL_ARGS_ASSERT_DUMP_ALL
-PERL_CALLCONV void     Perl_dump_all_perl(pTHX_ bool justperl);
+PERL_CALLCONV void     Perl_dump_all_perl(pTHX_ bool justperl)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_DUMP_ALL_PERL
+
 PERL_CALLCONV void     Perl_dump_eval(pTHX);
 #define PERL_ARGS_ASSERT_DUMP_EVAL
 PERL_CALLCONV void     Perl_dump_form(pTHX_ const GV* gv);
@@ -982,15 +1198,19 @@ PERL_CALLCONV void       Perl_dump_indent(pTHX_ I32 level, PerlIO *file, const char* p
 PERL_CALLCONV void     Perl_dump_packsubs(pTHX_ const HV* stash);
 #define PERL_ARGS_ASSERT_DUMP_PACKSUBS \
        assert(stash)
-PERL_CALLCONV void     Perl_dump_packsubs_perl(pTHX_ const HV* stash, bool justperl);
+PERL_CALLCONV void     Perl_dump_packsubs_perl(pTHX_ const HV* stash, bool justperl)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_DUMP_PACKSUBS_PERL    \
        assert(stash)
+
 PERL_CALLCONV void     Perl_dump_sub(pTHX_ const GV* gv);
 #define PERL_ARGS_ASSERT_DUMP_SUB      \
        assert(gv)
-PERL_CALLCONV void     Perl_dump_sub_perl(pTHX_ const GV* gv, bool justperl);
+PERL_CALLCONV void     Perl_dump_sub_perl(pTHX_ const GV* gv, bool justperl)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_DUMP_SUB_PERL \
        assert(gv)
+
 PERL_CALLCONV void     Perl_dump_vindent(pTHX_ I32 level, PerlIO *file, const char* pat, va_list *args);
 #define PERL_ARGS_ASSERT_DUMP_VINDENT  \
        assert(file); assert(pat)
@@ -1023,40 +1243,43 @@ PERL_CALLCONV I32       Perl_filter_read(pTHX_ int idx, SV *buf_sv, int maxlen)
 #define PERL_ARGS_ASSERT_FILTER_READ   \
        assert(buf_sv)
 
-PERL_CALLCONV void     Perl_finalize_optree(pTHX_ OP* o);
+PERL_CALLCONV void     Perl_finalize_optree(pTHX_ OP* o)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_FINALIZE_OPTREE       \
        assert(o)
-PERL_CALLCONV CV *     Perl_find_lexical_cv(pTHX_ PADOFFSET off);
+
+PERL_CALLCONV CV *     Perl_find_lexical_cv(pTHX_ PADOFFSET off)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_FIND_LEXICAL_CV
+
 PERL_CALLCONV CV*      Perl_find_runcv(pTHX_ U32 *db_seqp)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_FIND_RUNCV
 
 PERL_CALLCONV CV*      Perl_find_runcv_where(pTHX_ U8 cond, IV arg, U32 *db_seqp)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_FIND_RUNCV_WHERE
 
 PERL_CALLCONV SV*      Perl_find_rundefsv(pTHX);
 #define PERL_ARGS_ASSERT_FIND_RUNDEFSV
-PERL_CALLCONV PADOFFSET        Perl_find_rundefsvoffset(pTHX)
-                       __attribute__deprecated__;
-#define PERL_ARGS_ASSERT_FIND_RUNDEFSVOFFSET
-
-PERL_CALLCONV char*    Perl_find_script(pTHX_ const char *scriptname, bool dosearch, const char *const *const search_ext, I32 flags);
+PERL_CALLCONV char*    Perl_find_script(pTHX_ const char *scriptname, bool dosearch, const char *const *const search_ext, I32 flags)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_FIND_SCRIPT   \
        assert(scriptname)
+
 #ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE I32 Perl_foldEQ(const char* a, const char* b, I32 len);
+PERL_STATIC_INLINE I32 Perl_foldEQ(pTHX_ const char* a, const char* b, I32 len);
 #define PERL_ARGS_ASSERT_FOLDEQ        \
        assert(a); assert(b)
 #endif
 #ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE I32 Perl_foldEQ_latin1(const char* a, const char* b, I32 len);
+PERL_STATIC_INLINE I32 Perl_foldEQ_latin1(pTHX_ const char* a, const char* b, I32 len);
 #define PERL_ARGS_ASSERT_FOLDEQ_LATIN1 \
        assert(a); assert(b)
 #endif
 #ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE I32 Perl_foldEQ_locale(const char* a, const char* b, I32 len);
+PERL_STATIC_INLINE I32 Perl_foldEQ_locale(pTHX_ const char* a, const char* b, I32 len);
 #define PERL_ARGS_ASSERT_FOLDEQ_LOCALE \
        assert(a); assert(b)
 #endif
@@ -1065,16 +1288,22 @@ PERL_STATIC_INLINE I32  Perl_foldEQ_locale(const char* a, const char* b, I32 len)
 PERL_CALLCONV I32      Perl_foldEQ_utf8_flags(pTHX_ const char *s1, char **pe1, UV l1, bool u1, const char *s2, char **pe2, UV l2, bool u2, U32 flags);
 #define PERL_ARGS_ASSERT_FOLDEQ_UTF8_FLAGS     \
        assert(s1); assert(s2)
+PERL_CALLCONV void     Perl_force_locale_unlock(void)
+                       __attribute__visibility__("hidden");
+#define PERL_ARGS_ASSERT_FORCE_LOCALE_UNLOCK
+
 PERL_CALLCONV char*    Perl_form(pTHX_ const char* pat, ...)
                        __attribute__format__(__printf__,pTHX_1,pTHX_2);
 #define PERL_ARGS_ASSERT_FORM  \
        assert(pat)
 
-PERL_CALLCONV void     Perl_free_tied_hv_pool(pTHX);
+PERL_CALLCONV void     Perl_free_tied_hv_pool(pTHX)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_FREE_TIED_HV_POOL
+
 PERL_CALLCONV void     Perl_free_tmps(pTHX);
 #define PERL_ARGS_ASSERT_FREE_TMPS
-PERL_CALLCONV SV*      Perl_get_and_check_backslash_N_name(pTHX_ const char* s, const char* const e, const bool is_utf8, const char** error_msg)
+PERL_CALLCONV SV*      Perl_get_and_check_backslash_N_name(pTHX_ const char* s, const char* e, const bool is_utf8, const char** error_msg)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_GET_AND_CHECK_BACKSLASH_N_NAME        \
        assert(s); assert(e); assert(error_msg)
@@ -1095,37 +1324,58 @@ PERL_CALLCONV CV*       Perl_get_cvn_flags(pTHX_ const char* name, STRLEN len, I32 fla
 PERL_CALLCONV void     Perl_get_db_sub(pTHX_ SV **svp, CV *cv);
 #define PERL_ARGS_ASSERT_GET_DB_SUB    \
        assert(cv)
-PERL_CALLCONV void     Perl_get_hash_seed(pTHX_ unsigned char * const seed_buffer);
+PERL_CALLCONV const char *     Perl_get_deprecated_property_msg(const Size_t warning_offset)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_GET_DEPRECATED_PROPERTY_MSG
+
+PERL_CALLCONV void     Perl_get_hash_seed(pTHX_ unsigned char * const seed_buffer)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_GET_HASH_SEED \
        assert(seed_buffer)
+
 PERL_CALLCONV HV*      Perl_get_hv(pTHX_ const char *name, I32 flags);
 #define PERL_ARGS_ASSERT_GET_HV        \
        assert(name)
 PERL_CALLCONV const char*      Perl_get_no_modify(pTHX)
+                       __attribute__deprecated__
                        __attribute__warn_unused_result__
-                       __attribute__pure__;
+                       __attribute__pure__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_GET_NO_MODIFY
 
 PERL_CALLCONV char**   Perl_get_op_descs(pTHX)
+                       __attribute__deprecated__
                        __attribute__warn_unused_result__
                        __attribute__pure__;
 #define PERL_ARGS_ASSERT_GET_OP_DESCS
 
 PERL_CALLCONV char**   Perl_get_op_names(pTHX)
+                       __attribute__deprecated__
                        __attribute__warn_unused_result__
                        __attribute__pure__;
 #define PERL_ARGS_ASSERT_GET_OP_NAMES
 
 PERL_CALLCONV U32*     Perl_get_opargs(pTHX)
+                       __attribute__deprecated__
                        __attribute__warn_unused_result__
-                       __attribute__pure__;
+                       __attribute__pure__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_GET_OPARGS
 
 PERL_CALLCONV PPADDR_t*        Perl_get_ppaddr(pTHX)
+                       __attribute__deprecated__
                        __attribute__warn_unused_result__
                        __attribute__pure__;
 #define PERL_ARGS_ASSERT_GET_PPADDR
 
+PERL_CALLCONV SV *     Perl_get_prop_definition(pTHX_ const int table_index)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_GET_PROP_DEFINITION
+
+PERL_CALLCONV const char * const *     Perl_get_prop_values(const int table_index)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_GET_PROP_VALUES
+
 PERL_CALLCONV REGEXP * Perl_get_re_arg(pTHX_ SV *sv);
 #define PERL_ARGS_ASSERT_GET_RE_ARG
 PERL_CALLCONV SV*      Perl_get_sv(pTHX_ const char *name, I32 flags);
@@ -1148,6 +1398,9 @@ PERL_CALLCONV bool        Perl_grok_atoUV(const char* pv, UV* valptr, const char** endp
 PERL_CALLCONV UV       Perl_grok_bin(pTHX_ const char* start, STRLEN* len_p, I32* flags, NV *result);
 #define PERL_ARGS_ASSERT_GROK_BIN      \
        assert(start); assert(len_p); assert(flags)
+PERL_CALLCONV UV       Perl_grok_bin_oct_hex(pTHX_ const char* start, STRLEN* len_p, I32* flags, NV *result, const unsigned shift, const U8 lookup_bit, const char prefix);
+#define PERL_ARGS_ASSERT_GROK_BIN_OCT_HEX      \
+       assert(start); assert(len_p); assert(flags)
 PERL_CALLCONV UV       Perl_grok_hex(pTHX_ const char* start, STRLEN* len_p, I32* flags, NV *result);
 #define PERL_ARGS_ASSERT_GROK_HEX      \
        assert(start); assert(len_p); assert(flags)
@@ -1212,13 +1465,6 @@ PERL_CALLCONV SV*        Perl_gv_const_sv(pTHX_ GV* gv)
 PERL_CALLCONV void     Perl_gv_dump(pTHX_ GV* gv);
 #define PERL_ARGS_ASSERT_GV_DUMP
 #ifndef NO_MATHOMS
-PERL_CALLCONV void     Perl_gv_efullname(pTHX_ SV* sv, const GV* gv)
-                       __attribute__deprecated__;
-#define PERL_ARGS_ASSERT_GV_EFULLNAME  \
-       assert(sv); assert(gv)
-#endif
-
-#ifndef NO_MATHOMS
 PERL_CALLCONV void     Perl_gv_efullname3(pTHX_ SV* sv, const GV* gv, const char* prefix);
 #define PERL_ARGS_ASSERT_GV_EFULLNAME3 \
        assert(sv); assert(gv)
@@ -1271,7 +1517,7 @@ PERL_CALLCONV GV* Perl_gv_fetchmethod_pvn_flags(pTHX_ HV* stash, const char* nam
 PERL_CALLCONV GV*      Perl_gv_fetchmethod_sv_flags(pTHX_ HV* stash, SV* namesv, U32 flags);
 #define PERL_ARGS_ASSERT_GV_FETCHMETHOD_SV_FLAGS       \
        assert(stash); assert(namesv)
-PERL_CALLCONV GV*      Perl_gv_fetchpv(pTHX_ const char *nambeg, I32 add, const svtype sv_type);
+PERL_CALLCONV GV*      Perl_gv_fetchpv(pTHX_ const char *nambeg, I32 flags, const svtype sv_type);
 #define PERL_ARGS_ASSERT_GV_FETCHPV    \
        assert(nambeg)
 PERL_CALLCONV GV*      Perl_gv_fetchpvn_flags(pTHX_ const char* name, STRLEN len, I32 flags, const svtype sv_type);
@@ -1281,13 +1527,6 @@ PERL_CALLCONV GV*        Perl_gv_fetchsv(pTHX_ SV *name, I32 flags, const svtype sv_typ
 #define PERL_ARGS_ASSERT_GV_FETCHSV    \
        assert(name)
 #ifndef NO_MATHOMS
-PERL_CALLCONV void     Perl_gv_fullname(pTHX_ SV* sv, const GV* gv)
-                       __attribute__deprecated__;
-#define PERL_ARGS_ASSERT_GV_FULLNAME   \
-       assert(sv); assert(gv)
-#endif
-
-#ifndef NO_MATHOMS
 PERL_CALLCONV void     Perl_gv_fullname3(pTHX_ SV* sv, const GV* gv, const char* prefix);
 #define PERL_ARGS_ASSERT_GV_FULLNAME3  \
        assert(sv); assert(gv)
@@ -1316,9 +1555,11 @@ PERL_CALLCONV void       Perl_gv_name_set(pTHX_ GV* gv, const char *name, U32 len, U32
 PERL_CALLCONV GV *     Perl_gv_override(pTHX_ const char * const name, const STRLEN len);
 #define PERL_ARGS_ASSERT_GV_OVERRIDE   \
        assert(name)
-PERL_CALLCONV void     Perl_gv_setref(pTHX_ SV *const dstr, SV *const sstr);
+PERL_CALLCONV void     Perl_gv_setref(pTHX_ SV *const dsv, SV *const ssv)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_GV_SETREF     \
-       assert(dstr); assert(sstr)
+       assert(dsv); assert(ssv)
+
 PERL_CALLCONV HV*      Perl_gv_stashpv(pTHX_ const char* name, I32 flags);
 #define PERL_ARGS_ASSERT_GV_STASHPV    \
        assert(name)
@@ -1331,9 +1572,16 @@ PERL_CALLCONV HV*        Perl_gv_stashsv(pTHX_ SV* sv, I32 flags);
 PERL_CALLCONV void     Perl_gv_try_downgrade(pTHX_ GV* gv);
 #define PERL_ARGS_ASSERT_GV_TRY_DOWNGRADE      \
        assert(gv)
-PERL_CALLCONV AV**     Perl_hv_backreferences_p(pTHX_ HV *hv);
+PERL_CALLCONV struct xpvhv_aux*        Perl_hv_auxalloc(pTHX_ HV *hv)
+                       __attribute__visibility__("hidden");
+#define PERL_ARGS_ASSERT_HV_AUXALLOC   \
+       assert(hv)
+
+PERL_CALLCONV AV**     Perl_hv_backreferences_p(pTHX_ HV *hv)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_HV_BACKREFERENCES_P   \
        assert(hv)
+
 PERL_CALLCONV SV*      Perl_hv_bucket_ratio(pTHX_ HV *hv)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_HV_BUCKET_RATIO       \
@@ -1353,9 +1601,8 @@ PERL_CALLCONV HV *        Perl_hv_copy_hints_hv(pTHX_ HV *const ohv)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_HV_COPY_HINTS_HV
 
-PERL_CALLCONV void     Perl_hv_delayfree_ent(pTHX_ HV *hv, HE *entry);
-#define PERL_ARGS_ASSERT_HV_DELAYFREE_ENT      \
-       assert(hv)
+PERL_CALLCONV void     Perl_hv_delayfree_ent(pTHX_ HV *notused, HE *entry);
+#define PERL_ARGS_ASSERT_HV_DELAYFREE_ENT
 #ifndef NO_MATHOMS
 PERL_CALLCONV SV*      Perl_hv_delete(pTHX_ HV *hv, const char *key, I32 klen, I32 flags);
 #define PERL_ARGS_ASSERT_HV_DELETE     \
@@ -1374,12 +1621,16 @@ PERL_CALLCONV HE**      Perl_hv_eiter_p(pTHX_ HV *hv)
 PERL_CALLCONV void     Perl_hv_eiter_set(pTHX_ HV *hv, HE *eiter);
 #define PERL_ARGS_ASSERT_HV_EITER_SET  \
        assert(hv)
-PERL_CALLCONV void     Perl_hv_ename_add(pTHX_ HV *hv, const char *name, U32 len, U32 flags);
+PERL_CALLCONV void     Perl_hv_ename_add(pTHX_ HV *hv, const char *name, U32 len, U32 flags)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_HV_ENAME_ADD  \
        assert(hv); assert(name)
-PERL_CALLCONV void     Perl_hv_ename_delete(pTHX_ HV *hv, const char *name, U32 len, U32 flags);
+
+PERL_CALLCONV void     Perl_hv_ename_delete(pTHX_ HV *hv, const char *name, U32 len, U32 flags)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_HV_ENAME_DELETE       \
        assert(hv); assert(name)
+
 #ifndef NO_MATHOMS
 PERL_CALLCONV bool     Perl_hv_exists(pTHX_ HV *hv, const char *key, I32 klen)
                        __attribute__warn_unused_result__;
@@ -1407,9 +1658,8 @@ PERL_CALLCONV HE* Perl_hv_fetch_ent(pTHX_ HV *hv, SV *keysv, I32 lval, U32 hash)
 PERL_CALLCONV STRLEN   Perl_hv_fill(pTHX_ HV *const hv);
 #define PERL_ARGS_ASSERT_HV_FILL       \
        assert(hv)
-PERL_CALLCONV void     Perl_hv_free_ent(pTHX_ HV *hv, HE *entry);
-#define PERL_ARGS_ASSERT_HV_FREE_ENT   \
-       assert(hv)
+PERL_CALLCONV void     Perl_hv_free_ent(pTHX_ HV *notused, HE *entry);
+#define PERL_ARGS_ASSERT_HV_FREE_ENT
 PERL_CALLCONV I32      Perl_hv_iterinit(pTHX_ HV *hv);
 #define PERL_ARGS_ASSERT_HV_ITERINIT   \
        assert(hv)
@@ -1469,9 +1719,11 @@ PERL_CALLCONV SSize_t*   Perl_hv_placeholders_p(pTHX_ HV *hv)
 PERL_CALLCONV void     Perl_hv_placeholders_set(pTHX_ HV *hv, I32 ph);
 #define PERL_ARGS_ASSERT_HV_PLACEHOLDERS_SET   \
        assert(hv)
-PERL_CALLCONV void     Perl_hv_pushkv(pTHX_ HV *hv, U32 flags);
+PERL_CALLCONV void     Perl_hv_pushkv(pTHX_ HV *hv, U32 flags)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_HV_PUSHKV     \
        assert(hv)
+
 PERL_CALLCONV void     Perl_hv_rand_set(pTHX_ HV *hv, U32 new_xhv_rand);
 #define PERL_ARGS_ASSERT_HV_RAND_SET   \
        assert(hv)
@@ -1500,6 +1752,8 @@ PERL_CALLCONV HE* Perl_hv_store_ent(pTHX_ HV *hv, SV *key, SV *val, U32 hash);
 PERL_CALLCONV SV**     Perl_hv_store_flags(pTHX_ HV *hv, const char *key, I32 klen, SV *val, U32 hash, int flags);
 #define PERL_ARGS_ASSERT_HV_STORE_FLAGS
 #endif
+/* PERL_CALLCONV SV**  hv_stores(pTHX_ HV* hv, const char * const key, SV* val); */
+#define PERL_ARGS_ASSERT_HV_STORES
 /* PERL_CALLCONV void  hv_undef(pTHX_ HV *hv); */
 #define PERL_ARGS_ASSERT_HV_UNDEF
 PERL_CALLCONV void     Perl_hv_undef_flags(pTHX_ HV *hv, U32 flags);
@@ -1516,23 +1770,25 @@ PERL_CALLCONV void      Perl_hv_undef_flags(pTHX_ HV *hv, U32 flags);
 
 /* PERL_CALLCONV I32   ibcmp_utf8(pTHX_ const char *s1, char **pe1, UV l1, bool u1, const char *s2, char **pe2, UV l2, bool u2); */
 #define PERL_ARGS_ASSERT_IBCMP_UTF8
-PERL_CALLCONV void     Perl_init_argv_symbols(pTHX_ int argc, char **argv);
+PERL_CALLCONV void     Perl_init_argv_symbols(pTHX_ int argc, char **argv)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_INIT_ARGV_SYMBOLS     \
        assert(argv)
-PERL_CALLCONV void     Perl_init_constants(pTHX);
+
+PERL_CALLCONV void     Perl_init_constants(pTHX)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_INIT_CONSTANTS
-PERL_CALLCONV void     Perl_init_dbargs(pTHX);
+
+PERL_CALLCONV void     Perl_init_dbargs(pTHX)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_INIT_DBARGS
-PERL_CALLCONV void     Perl_init_debugger(pTHX);
+
+PERL_CALLCONV void     Perl_init_debugger(pTHX)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_INIT_DEBUGGER
+
 PERL_CALLCONV int      Perl_init_i18nl10n(pTHX_ int printwarn);
 #define PERL_ARGS_ASSERT_INIT_I18NL10N
-#ifndef NO_MATHOMS
-PERL_CALLCONV int      Perl_init_i18nl14n(pTHX_ int printwarn)
-                       __attribute__deprecated__;
-#define PERL_ARGS_ASSERT_INIT_I18NL14N
-#endif
-
 PERL_CALLCONV void     Perl_init_named_cv(pTHX_ CV *cv, OP *nameop);
 #define PERL_ARGS_ASSERT_INIT_NAMED_CV \
        assert(cv); assert(nameop)
@@ -1541,8 +1797,10 @@ PERL_CALLCONV void       Perl_init_stacks(pTHX);
 PERL_CALLCONV void     Perl_init_tm(pTHX_ struct tm *ptm);
 #define PERL_ARGS_ASSERT_INIT_TM       \
        assert(ptm)
-PERL_CALLCONV void     Perl_init_uniprops(pTHX);
+PERL_CALLCONV void     Perl_init_uniprops(pTHX)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_INIT_UNIPROPS
+
 #ifndef NO_MATHOMS
 PERL_CALLCONV char*    Perl_instr(const char* big, const char* little)
                        __attribute__warn_unused_result__
@@ -1554,15 +1812,20 @@ PERL_CALLCONV char*     Perl_instr(const char* big, const char* little)
 PERL_CALLCONV U32      Perl_intro_my(pTHX);
 #define PERL_ARGS_ASSERT_INTRO_MY
 PERL_CALLCONV OP*      Perl_invert(pTHX_ OP* cmd)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_INVERT
 
-PERL_CALLCONV void     Perl_invmap_dump(pTHX_ SV* invlist, UV * map);
+PERL_CALLCONV void     Perl_invmap_dump(pTHX_ SV* invlist, UV * map)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_INVMAP_DUMP   \
        assert(invlist); assert(map)
-PERL_CALLCONV bool     Perl_io_close(pTHX_ IO* io, GV *gv, bool not_implicit, bool warn_on_fail);
+
+PERL_CALLCONV bool     Perl_io_close(pTHX_ IO* io, GV *gv, bool is_explicit, bool warn_on_fail)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_IO_CLOSE      \
        assert(io)
+
 #ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE Size_t      Perl_isC9_STRICT_UTF8_CHAR(const U8 * const s0, const U8 * const e)
                        __attribute__warn_unused_result__;
@@ -1584,6 +1847,13 @@ PERL_STATIC_INLINE Size_t        Perl_isUTF8_CHAR(const U8 * const s0, const U8 * const
        assert(s0); assert(e)
 #endif
 
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE Size_t      Perl_isUTF8_CHAR_flags(const U8 * const s0, const U8 * const e, const U32 flags)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_ISUTF8_CHAR_FLAGS     \
+       assert(s0); assert(e)
+#endif
+
 /* PERL_CALLCONV bool  is_ascii_string(const U8* const s, STRLEN len)
                        __attribute__warn_unused_result__
                        __attribute__pure__; */
@@ -1627,22 +1897,21 @@ PERL_STATIC_INLINE bool Perl_is_strict_utf8_string_loclen(const U8 *s, STRLEN le
 #define PERL_ARGS_ASSERT_IS_STRICT_UTF8_STRING_LOCLEN  \
        assert(s)
 #endif
-#ifndef NO_MATHOMS
-PERL_CALLCONV STRLEN   Perl_is_utf8_char(const U8 *s)
-                       __attribute__deprecated__;
-#define PERL_ARGS_ASSERT_IS_UTF8_CHAR  \
-       assert(s)
-#endif
+PERL_CALLCONV Size_t   Perl_is_utf8_FF_helper_(const U8 * const s0, const U8 * const e, const bool require_partial)
+                       __attribute__warn_unused_result__
+                       __attribute__pure__;
+#define PERL_ARGS_ASSERT_IS_UTF8_FF_HELPER_    \
+       assert(s0); assert(e)
 
 #ifndef NO_MATHOMS
 PERL_CALLCONV STRLEN   Perl_is_utf8_char_buf(const U8 *buf, const U8 *buf_end);
 #define PERL_ARGS_ASSERT_IS_UTF8_CHAR_BUF      \
        assert(buf); assert(buf_end)
 #endif
-PERL_CALLCONV STRLEN   Perl_is_utf8_char_helper(const U8 * const s, const U8 * e, const U32 flags)
+PERL_CALLCONV STRLEN   Perl_is_utf8_char_helper_(const U8 * const s, const U8 * e, const U32 flags)
                        __attribute__warn_unused_result__
                        __attribute__pure__;
-#define PERL_ARGS_ASSERT_IS_UTF8_CHAR_HELPER   \
+#define PERL_ARGS_ASSERT_IS_UTF8_CHAR_HELPER_  \
        assert(s); assert(e)
 
 /* PERL_CALLCONV bool  is_utf8_fixed_width_buf_flags(const U8 * const s, STRLEN len, const U32 flags); */
@@ -1693,16 +1962,16 @@ PERL_STATIC_INLINE bool Perl_is_utf8_string_loclen_flags(const U8 *s, STRLEN len
 #define PERL_ARGS_ASSERT_IS_UTF8_STRING_LOCLEN_FLAGS   \
        assert(s)
 #endif
-/* PERL_CALLCONV bool  is_utf8_valid_partial_char(const U8 * const s, const U8 * const e)
+/* PERL_CALLCONV bool  is_utf8_valid_partial_char(const U8 * const s0, const U8 * const e)
                        __attribute__warn_unused_result__
                        __attribute__pure__; */
 #define PERL_ARGS_ASSERT_IS_UTF8_VALID_PARTIAL_CHAR
 
 #ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE bool        Perl_is_utf8_valid_partial_char_flags(const U8 * const s, const U8 * const e, const U32 flags)
+PERL_STATIC_INLINE bool        Perl_is_utf8_valid_partial_char_flags(const U8 * const s0, const U8 * const e, const U32 flags)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_IS_UTF8_VALID_PARTIAL_CHAR_FLAGS      \
-       assert(s); assert(e)
+       assert(s0); assert(e)
 #endif
 
 PERL_CALLCONV bool     Perl_isinfnan(NV nv)
@@ -1710,15 +1979,20 @@ PERL_CALLCONV bool      Perl_isinfnan(NV nv)
                        __attribute__pure__;
 #define PERL_ARGS_ASSERT_ISINFNAN
 
-PERL_CALLCONV bool     Perl_isinfnansv(pTHX_ SV *sv);
+PERL_CALLCONV bool     Perl_isinfnansv(pTHX_ SV *sv)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_ISINFNANSV    \
        assert(sv)
-PERL_CALLCONV OP*      Perl_jmaybe(pTHX_ OP *o);
+
+PERL_CALLCONV OP*      Perl_jmaybe(pTHX_ OP *o)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_JMAYBE        \
        assert(o)
+
 PERL_CALLCONV I32      Perl_keyword(pTHX_ const char *name, I32 len, bool all_keywords)
                        __attribute__warn_unused_result__
-                       __attribute__pure__;
+                       __attribute__pure__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_KEYWORD       \
        assert(name)
 
@@ -1762,183 +2036,326 @@ PERL_CALLCONV void    Perl_lex_stuff_sv(pTHX_ SV* sv, U32 flags);
 PERL_CALLCONV void     Perl_lex_unstuff(pTHX_ char* ptr);
 #define PERL_ARGS_ASSERT_LEX_UNSTUFF   \
        assert(ptr)
-PERL_CALLCONV OP*      Perl_list(pTHX_ OP* o);
+PERL_CALLCONV OP*      Perl_list(pTHX_ OP* o)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_LIST
+
+PERL_CALLCONV HV*      Perl_load_charnames(pTHX_ SV * char_name, const char * context, const STRLEN context_len, const char ** error_msg)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_LOAD_CHARNAMES        \
+       assert(char_name); assert(context); assert(error_msg)
+
 PERL_CALLCONV void     Perl_load_module(pTHX_ U32 flags, SV* name, SV* ver, ...);
 #define PERL_ARGS_ASSERT_LOAD_MODULE   \
        assert(name)
-PERL_CALLCONV OP*      Perl_localize(pTHX_ OP *o, I32 lex);
+PERL_CALLCONV_NO_RET void      Perl_locale_panic(const char * msg, const char * file_name, const line_t line, const int errnum)
+                       __attribute__noreturn__;
+#define PERL_ARGS_ASSERT_LOCALE_PANIC  \
+       assert(msg); assert(file_name)
+
+PERL_CALLCONV OP*      Perl_localize(pTHX_ OP *o, I32 lex)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_LOCALIZE      \
        assert(o)
+
 PERL_CALLCONV I32      Perl_looks_like_number(pTHX_ SV *const sv)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_LOOKS_LIKE_NUMBER     \
        assert(sv)
 
-PERL_CALLCONV int      Perl_magic_clear_all_env(pTHX_ SV* sv, MAGIC* mg);
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE unsigned    Perl_lsbit_pos32(U32 word)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_LSBIT_POS32
+#endif
+
+PERL_CALLCONV int      Perl_magic_clear_all_env(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_CLEAR_ALL_ENV   \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_cleararylen_p(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_cleararylen_p(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_CLEARARYLEN_P   \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_clearenv(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_clearenv(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_CLEARENV        \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_clearhint(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_clearhint(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_CLEARHINT       \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_clearhints(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_clearhints(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_CLEARHINTS      \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_clearisa(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_clearisa(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_CLEARISA        \
        assert(mg)
-PERL_CALLCONV int      Perl_magic_clearpack(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_clearpack(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_CLEARPACK       \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_clearsig(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_clearsig(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_CLEARSIG        \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_copycallchecker(pTHX_ SV* sv, MAGIC *mg, SV *nsv, const char *name, I32 namlen);
+
+PERL_CALLCONV int      Perl_magic_copycallchecker(pTHX_ SV* sv, MAGIC *mg, SV *nsv, const char *name, I32 namlen)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_COPYCALLCHECKER \
        assert(sv); assert(mg); assert(nsv)
+
 PERL_CALLCONV void     Perl_magic_dump(pTHX_ const MAGIC *mg);
 #define PERL_ARGS_ASSERT_MAGIC_DUMP
-PERL_CALLCONV int      Perl_magic_existspack(pTHX_ SV* sv, const MAGIC* mg);
+PERL_CALLCONV int      Perl_magic_existspack(pTHX_ SV* sv, const MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_EXISTSPACK      \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_freearylen_p(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_freearylen_p(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_FREEARYLEN_P    \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_freeovrld(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_freemglob(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
+#define PERL_ARGS_ASSERT_MAGIC_FREEMGLOB       \
+       assert(sv); assert(mg)
+
+PERL_CALLCONV int      Perl_magic_freeovrld(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_FREEOVRLD       \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_get(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_freeutf8(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
+#define PERL_ARGS_ASSERT_MAGIC_FREEUTF8        \
+       assert(sv); assert(mg)
+
+PERL_CALLCONV int      Perl_magic_get(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_GET     \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_getarylen(pTHX_ SV* sv, const MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_getarylen(pTHX_ SV* sv, const MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_GETARYLEN       \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_getdebugvar(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_getdebugvar(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_GETDEBUGVAR     \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_getdefelem(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_getdefelem(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_GETDEFELEM      \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_getnkeys(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_getnkeys(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_GETNKEYS        \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_getpack(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_getpack(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_GETPACK \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_getpos(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_getpos(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_GETPOS  \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_getsig(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_getsig(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_GETSIG  \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_getsubstr(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_getsubstr(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_GETSUBSTR       \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_gettaint(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_gettaint(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_GETTAINT        \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_getuvar(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_getuvar(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_GETUVAR \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_getvec(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_getvec(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_GETVEC  \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_killbackrefs(pTHX_ SV *sv, MAGIC *mg);
+
+PERL_CALLCONV int      Perl_magic_killbackrefs(pTHX_ SV *sv, MAGIC *mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_KILLBACKREFS    \
        assert(sv); assert(mg)
-PERL_CALLCONV SV*      Perl_magic_methcall(pTHX_ SV *sv, const MAGIC *mg, SV *meth, U32 flags, U32 argc, ...);
+
+PERL_CALLCONV SV*      Perl_magic_methcall(pTHX_ SV *sv, const MAGIC *mg, SV *meth, U32 flags, U32 argc, ...)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_METHCALL        \
        assert(sv); assert(mg); assert(meth)
-PERL_CALLCONV int      Perl_magic_nextpack(pTHX_ SV *sv, MAGIC *mg, SV *key);
+
+PERL_CALLCONV int      Perl_magic_nextpack(pTHX_ SV *sv, MAGIC *mg, SV *key)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_NEXTPACK        \
        assert(sv); assert(mg); assert(key)
-PERL_CALLCONV U32      Perl_magic_regdata_cnt(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV U32      Perl_magic_regdata_cnt(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_REGDATA_CNT     \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_regdatum_get(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_regdatum_get(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_REGDATUM_GET    \
        assert(sv); assert(mg)
-PERL_CALLCONV SV*      Perl_magic_scalarpack(pTHX_ HV *hv, MAGIC *mg);
+
+PERL_CALLCONV SV*      Perl_magic_scalarpack(pTHX_ HV *hv, MAGIC *mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_SCALARPACK      \
        assert(hv); assert(mg)
-PERL_CALLCONV int      Perl_magic_set(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_set(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_SET     \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_set_all_env(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_set_all_env(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_SET_ALL_ENV     \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_setarylen(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_setarylen(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_SETARYLEN       \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_setdbline(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_setdbline(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_SETDBLINE       \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_setdebugvar(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_setdebugvar(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_SETDEBUGVAR     \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_setdefelem(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_setdefelem(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_SETDEFELEM      \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_setenv(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_setenv(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_SETENV  \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_sethint(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_sethint(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_SETHINT \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_setisa(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_setisa(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_SETISA  \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_setlvref(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_setlvref(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_SETLVREF        \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_setmglob(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_setmglob(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_SETMGLOB        \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_setnkeys(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_setnkeys(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_SETNKEYS        \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_setnonelem(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_setnonelem(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_SETNONELEM      \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_setpack(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_setpack(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_SETPACK \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_setpos(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_setpos(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_SETPOS  \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_setregexp(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_setregexp(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_SETREGEXP       \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_setsig(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_setsig(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_SETSIG  \
        assert(mg)
-PERL_CALLCONV int      Perl_magic_setsubstr(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_setsigall(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
+#define PERL_ARGS_ASSERT_MAGIC_SETSIGALL       \
+       assert(sv); assert(mg)
+
+PERL_CALLCONV int      Perl_magic_setsubstr(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_SETSUBSTR       \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_settaint(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_settaint(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_SETTAINT        \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_setutf8(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_setutf8(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_SETUTF8 \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_setuvar(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_setuvar(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_SETUVAR \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_setvec(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_setvec(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_SETVEC  \
        assert(sv); assert(mg)
-PERL_CALLCONV U32      Perl_magic_sizepack(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV U32      Perl_magic_sizepack(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_SIZEPACK        \
        assert(sv); assert(mg)
-PERL_CALLCONV int      Perl_magic_wipepack(pTHX_ SV* sv, MAGIC* mg);
+
+PERL_CALLCONV int      Perl_magic_wipepack(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_WIPEPACK        \
        assert(sv); assert(mg)
+
 PERL_CALLCONV Malloc_t Perl_malloc(MEM_SIZE nbytes)
                        __attribute__malloc__
                        __attribute__warn_unused_result__;
@@ -1946,6 +2363,8 @@ PERL_CALLCONV Malloc_t    Perl_malloc(MEM_SIZE nbytes)
 
 PERL_CALLCONV I32 *    Perl_markstack_grow(pTHX);
 #define PERL_ARGS_ASSERT_MARKSTACK_GROW
+PERL_CALLCONV int      Perl_mbtowc_(pTHX_ const wchar_t * pwc, const char * s, const Size_t len);
+#define PERL_ARGS_ASSERT_MBTOWC_
 PERL_CALLCONV SV*      Perl_mess(pTHX_ const char* pat, ...)
                        __attribute__format__(__printf__,pTHX_1,pTHX_2);
 #define PERL_ARGS_ASSERT_MESS  \
@@ -1987,14 +2406,11 @@ PERL_CALLCONV void      Perl_mg_freeext(pTHX_ SV* sv, int how, const MGVTBL *vtbl);
 PERL_CALLCONV int      Perl_mg_get(pTHX_ SV* sv);
 #define PERL_ARGS_ASSERT_MG_GET        \
        assert(sv)
-PERL_CALLCONV U32      Perl_mg_length(pTHX_ SV* sv)
-                       __attribute__deprecated__;
-#define PERL_ARGS_ASSERT_MG_LENGTH     \
-       assert(sv)
-
-PERL_CALLCONV void     Perl_mg_localize(pTHX_ SV* sv, SV* nsv, bool setmagic);
+PERL_CALLCONV void     Perl_mg_localize(pTHX_ SV* sv, SV* nsv, bool setmagic)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MG_LOCALIZE   \
        assert(sv); assert(nsv)
+
 PERL_CALLCONV void     Perl_mg_magical(SV* sv);
 #define PERL_ARGS_ASSERT_MG_MAGICAL    \
        assert(sv)
@@ -2007,13 +2423,22 @@ PERL_CALLCONV I32       Perl_mg_size(pTHX_ SV* sv);
 PERL_CALLCONV void     Perl_mini_mktime(struct tm *ptm);
 #define PERL_ARGS_ASSERT_MINI_MKTIME   \
        assert(ptm)
-PERL_CALLCONV int      Perl_mode_from_discipline(pTHX_ const char* s, STRLEN len);
+PERL_CALLCONV int      Perl_mode_from_discipline(pTHX_ const char* s, STRLEN len)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MODE_FROM_DISCIPLINE
+
 PERL_CALLCONV void *   Perl_more_bodies(pTHX_ const svtype sv_type, const size_t body_size, const size_t arena_size);
 #define PERL_ARGS_ASSERT_MORE_BODIES
 PERL_CALLCONV const char*      Perl_moreswitches(pTHX_ const char* s);
 #define PERL_ARGS_ASSERT_MORESWITCHES  \
        assert(s)
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE char *      Perl_mortal_getenv(const char * str)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_MORTAL_GETENV \
+       assert(str)
+#endif
+
 PERL_CALLCONV const struct mro_alg *   Perl_mro_get_from_name(pTHX_ SV *name);
 #define PERL_ARGS_ASSERT_MRO_GET_FROM_NAME     \
        assert(name)
@@ -2023,9 +2448,11 @@ PERL_CALLCONV AV*        Perl_mro_get_linear_isa(pTHX_ HV* stash);
 PERL_CALLCONV SV*      Perl_mro_get_private_data(pTHX_ struct mro_meta *const smeta, const struct mro_alg *const which);
 #define PERL_ARGS_ASSERT_MRO_GET_PRIVATE_DATA  \
        assert(smeta); assert(which)
-PERL_CALLCONV void     Perl_mro_isa_changed_in(pTHX_ HV* stash);
+PERL_CALLCONV void     Perl_mro_isa_changed_in(pTHX_ HV* stash)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MRO_ISA_CHANGED_IN    \
        assert(stash)
+
 PERL_CALLCONV struct mro_meta* Perl_mro_meta_init(pTHX_ HV* stash);
 #define PERL_ARGS_ASSERT_MRO_META_INIT \
        assert(stash)
@@ -2044,6 +2471,12 @@ PERL_CALLCONV void       Perl_mro_set_mro(pTHX_ struct mro_meta *const meta, SV *const
 PERL_CALLCONV SV*      Perl_mro_set_private_data(pTHX_ struct mro_meta *const smeta, const struct mro_alg *const which, SV *const data);
 #define PERL_ARGS_ASSERT_MRO_SET_PRIVATE_DATA  \
        assert(smeta); assert(which); assert(data)
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE unsigned    Perl_msbit_pos32(U32 word)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_MSBIT_POS32
+#endif
+
 PERL_CALLCONV SV*      Perl_multiconcat_stringify(pTHX_ const OP* o);
 #define PERL_ARGS_ASSERT_MULTICONCAT_STRINGIFY \
        assert(o)
@@ -2059,9 +2492,11 @@ PERL_CALLCONV char*      Perl_my_atof2(pTHX_ const char *orig, NV* value);
 PERL_CALLCONV char*    Perl_my_atof3(pTHX_ const char *orig, NV* value, const STRLEN len);
 #define PERL_ARGS_ASSERT_MY_ATOF3      \
        assert(orig); assert(value)
-PERL_CALLCONV OP *     Perl_my_attrs(pTHX_ OP *o, OP *attrs);
+PERL_CALLCONV OP *     Perl_my_attrs(pTHX_ OP *o, OP *attrs)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MY_ATTRS      \
        assert(o)
+
 PERL_CALLCONV void     Perl_my_clearenv(pTHX);
 #define PERL_ARGS_ASSERT_MY_CLEARENV
 PERL_CALLCONV int      Perl_my_dirfd(DIR* dir);
@@ -2078,19 +2513,19 @@ PERL_CALLCONV I32       Perl_my_fflush_all(pTHX);
 #define PERL_ARGS_ASSERT_MY_FFLUSH_ALL
 PERL_CALLCONV Pid_t    Perl_my_fork(void);
 #define PERL_ARGS_ASSERT_MY_FORK
-#ifndef NO_MATHOMS
-PERL_CALLCONV I32      Perl_my_lstat(pTHX);
+/* PERL_CALLCONV I32   my_lstat(pTHX); */
 #define PERL_ARGS_ASSERT_MY_LSTAT
-#endif
 PERL_CALLCONV I32      Perl_my_lstat_flags(pTHX_ const U32 flags);
 #define PERL_ARGS_ASSERT_MY_LSTAT_FLAGS
 PERL_CALLCONV int      Perl_my_mkostemp_cloexec(char *templte, int flags)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MY_MKOSTEMP_CLOEXEC   \
        assert(templte)
 
 PERL_CALLCONV int      Perl_my_mkstemp_cloexec(char *templte)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MY_MKSTEMP_CLOEXEC    \
        assert(templte)
 
@@ -2106,26 +2541,33 @@ PERL_CALLCONV int       Perl_my_snprintf(char *buffer, const Size_t len, const char *f
 
 PERL_CALLCONV int      Perl_my_socketpair(int family, int type, int protocol, int fd[2]);
 #define PERL_ARGS_ASSERT_MY_SOCKETPAIR
-#ifndef NO_MATHOMS
-PERL_CALLCONV I32      Perl_my_stat(pTHX);
+/* PERL_CALLCONV I32   my_stat(pTHX); */
 #define PERL_ARGS_ASSERT_MY_STAT
-#endif
 PERL_CALLCONV I32      Perl_my_stat_flags(pTHX_ const U32 flags);
 #define PERL_ARGS_ASSERT_MY_STAT_FLAGS
-PERL_CALLCONV char*    Perl_my_strerror(pTHX_ const int errnum);
+PERL_CALLCONV char*    Perl_my_strerror(pTHX_ const int errnum)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MY_STRERROR
+
 PERL_CALLCONV char *   Perl_my_strftime(pTHX_ const char *fmt, int sec, int min, int hour, int mday, int mon, int year, int wday, int yday, int isdst)
                        __attribute__format__(__strftime__,pTHX_1,0);
 #define PERL_ARGS_ASSERT_MY_STRFTIME   \
        assert(fmt)
 
+PERL_CALLCONV char *   Perl_my_strftime8(pTHX_ const char *fmt, int sec, int min, int hour, int mday, int mon, int year, int wday, int yday, int isdst, utf8ness_t * utf8ness)
+                       __attribute__format__(__strftime__,pTHX_1,0);
+#define PERL_ARGS_ASSERT_MY_STRFTIME8  \
+       assert(fmt)
+
 PERL_CALLCONV NV       Perl_my_strtod(const char * const s, char ** e)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_MY_STRTOD     \
        assert(s)
 
-PERL_CALLCONV void     Perl_my_unexec(pTHX);
+PERL_CALLCONV void     Perl_my_unexec(pTHX)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MY_UNEXEC
+
 PERL_CALLCONV int      Perl_my_vsnprintf(char *buffer, const Size_t len, const char *format, va_list ap);
 #define PERL_ARGS_ASSERT_MY_VSNPRINTF  \
        assert(buffer); assert(format)
@@ -2160,6 +2602,22 @@ PERL_CALLCONV OP*        Perl_newAVREF(pTHX_ OP* o)
 #define PERL_ARGS_ASSERT_NEWAVREF      \
        assert(o)
 
+/* PERL_CALLCONV AV*   newAV_alloc_x(pTHX_ SSize_t size)
+                       __attribute__warn_unused_result__; */
+#define PERL_ARGS_ASSERT_NEWAV_ALLOC_X
+
+/* PERL_CALLCONV AV*   newAV_alloc_xz(pTHX_ SSize_t size)
+                       __attribute__warn_unused_result__; */
+#define PERL_ARGS_ASSERT_NEWAV_ALLOC_XZ
+
+PERL_CALLCONV AV*      Perl_newAVav(pTHX_ AV *oav)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_NEWAVAV
+
+PERL_CALLCONV AV*      Perl_newAVhv(pTHX_ HV *ohv)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_NEWAVHV
+
 PERL_CALLCONV OP*      Perl_newBINOP(pTHX_ I32 type, I32 flags, OP* first, OP* last)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_NEWBINOP
@@ -2177,6 +2635,11 @@ PERL_CALLCONV OP*        Perl_newCVREF(pTHX_ I32 flags, OP* o)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_NEWCVREF
 
+PERL_CALLCONV OP*      Perl_newDEFEROP(pTHX_ I32 flags, OP *block)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_NEWDEFEROP    \
+       assert(block)
+
 PERL_CALLCONV OP*      Perl_newDEFSVOP(pTHX)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_NEWDEFSVOP
@@ -2307,10 +2770,12 @@ PERL_CALLCONV SV*       Perl_newRV(pTHX_ SV *const sv)
 #define PERL_ARGS_ASSERT_NEWRV \
        assert(sv)
 
-PERL_CALLCONV SV*      Perl_newRV_noinc(pTHX_ SV *const tmpRef)
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE SV* Perl_newRV_noinc(pTHX_ SV *const tmpRef)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_NEWRV_NOINC   \
        assert(tmpRef)
+#endif
 
 PERL_CALLCONV OP*      Perl_newSLICEOP(pTHX_ I32 flags, OP* subscript, OP* listop)
                        __attribute__warn_unused_result__;
@@ -2320,9 +2785,11 @@ PERL_CALLCONV OP*        Perl_newSTATEOP(pTHX_ I32 flags, char* label, OP* o)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_NEWSTATEOP
 
-PERL_CALLCONV CV*      Perl_newSTUB(pTHX_ GV *gv, bool fake);
+PERL_CALLCONV CV*      Perl_newSTUB(pTHX_ GV *gv, bool fake)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_NEWSTUB       \
        assert(gv)
+
 #ifndef NO_MATHOMS
 PERL_CALLCONV CV*      Perl_newSUB(pTHX_ I32 floor, OP* o, OP* proto, OP* block);
 #define PERL_ARGS_ASSERT_NEWSUB
@@ -2341,19 +2808,45 @@ PERL_CALLCONV OP*       Perl_newSVREF(pTHX_ OP* o)
 #define PERL_ARGS_ASSERT_NEWSVREF      \
        assert(o)
 
-PERL_CALLCONV SV*      Perl_newSV_type(pTHX_ const svtype type)
+PERL_CALLCONV SV*      Perl_newSV_false(pTHX)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_NEWSV_FALSE
+
+PERL_CALLCONV SV*      Perl_newSV_true(pTHX)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_NEWSV_TRUE
+
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE SV* Perl_newSV_type(pTHX_ const svtype type)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_NEWSV_TYPE
+#endif
+
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_FORCE_INLINE SV*   Perl_newSV_type_mortal(pTHX_ const svtype type)
+                       __attribute__warn_unused_result__
+                       __attribute__always_inline__;
+#define PERL_ARGS_ASSERT_NEWSV_TYPE_MORTAL
+#endif
 
 PERL_CALLCONV SV*      Perl_newSVavdefelem(pTHX_ AV *av, SSize_t ix, bool extendible)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_NEWSVAVDEFELEM        \
        assert(av)
 
+PERL_CALLCONV SV*      Perl_newSVbool(pTHX_ const bool bool_val)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_NEWSVBOOL
+
 PERL_CALLCONV SV*      Perl_newSVhek(pTHX_ const HEK *const hek)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_NEWSVHEK
 
+PERL_CALLCONV SV*      Perl_newSVhek_mortal(pTHX_ const HEK *const hek)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_NEWSVHEK_MORTAL
+
 PERL_CALLCONV SV*      Perl_newSViv(pTHX_ const IV i)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_NEWSVIV
@@ -2409,6 +2902,11 @@ PERL_CALLCONV SV*        Perl_newSVuv(pTHX_ const UV u)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_NEWSVUV
 
+PERL_CALLCONV OP*      Perl_newTRYCATCHOP(pTHX_ I32 flags, OP* tryblock, OP *catchvar, OP* catchblock)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_NEWTRYCATCHOP \
+       assert(tryblock); assert(catchvar); assert(catchblock)
+
 PERL_CALLCONV OP*      Perl_newUNOP(pTHX_ I32 type, I32 flags, OP* first)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_NEWUNOP
@@ -2435,9 +2933,11 @@ PERL_CALLCONV CV *       Perl_newXS_deffile(pTHX_ const char *name, XSUBADDR_t subaddr
 PERL_CALLCONV CV *     Perl_newXS_flags(pTHX_ const char *name, XSUBADDR_t subaddr, const char *const filename, const char *const proto, U32 flags);
 #define PERL_ARGS_ASSERT_NEWXS_FLAGS   \
        assert(subaddr); assert(filename)
-PERL_CALLCONV CV *     Perl_newXS_len_flags(pTHX_ const char *name, STRLEN len, XSUBADDR_t subaddr, const char *const filename, const char *const proto, SV **const_svp, U32 flags);
+PERL_CALLCONV CV *     Perl_newXS_len_flags(pTHX_ const char *name, STRLEN len, XSUBADDR_t subaddr, const char *const filename, const char *const proto, SV **const_svp, U32 flags)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_NEWXS_LEN_FLAGS       \
        assert(subaddr)
+
 PERL_CALLCONV PERL_SI* Perl_new_stackinfo(pTHX_ I32 stitems, I32 cxitems)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_NEW_STACKINFO
@@ -2450,15 +2950,22 @@ PERL_CALLCONV STRLEN *  Perl_new_warnings_bitfield(pTHX_ STRLEN *buffer, const ch
 #define PERL_ARGS_ASSERT_NEW_WARNINGS_BITFIELD \
        assert(bits)
 
-PERL_CALLCONV PerlIO*  Perl_nextargv(pTHX_ GV* gv, bool nomagicopen);
+PERL_CALLCONV PerlIO*  Perl_nextargv(pTHX_ GV* gv, bool nomagicopen)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_NEXTARGV      \
        assert(gv)
+
 PERL_CALLCONV char*    Perl_ninstr(const char* big, const char* bigend, const char* little, const char* lend)
                        __attribute__warn_unused_result__
                        __attribute__pure__;
 #define PERL_ARGS_ASSERT_NINSTR        \
        assert(big); assert(bigend); assert(little); assert(lend)
 
+PERL_CALLCONV void     Perl_no_bareword_filehandle(pTHX_ const char *fhname)
+                       __attribute__visibility__("hidden");
+#define PERL_ARGS_ASSERT_NO_BAREWORD_FILEHANDLE        \
+       assert(fhname)
+
 PERL_CALLCONV_NO_RET void      Perl_noperl_die(const char* pat, ...)
                        __attribute__noreturn__
                        __attribute__format__(__printf__,1,2);
@@ -2467,15 +2974,19 @@ PERL_CALLCONV_NO_RET void       Perl_noperl_die(const char* pat, ...)
 
 PERL_CALLCONV int      Perl_nothreadhook(pTHX);
 #define PERL_ARGS_ASSERT_NOTHREADHOOK
-PERL_CALLCONV void     Perl_notify_parser_that_changed_to_utf8(pTHX);
+PERL_CALLCONV void     Perl_notify_parser_that_changed_to_utf8(pTHX)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_NOTIFY_PARSER_THAT_CHANGED_TO_UTF8
+
 PERL_CALLCONV OP*      Perl_oopsAV(pTHX_ OP* o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_OOPSAV        \
        assert(o)
 
 PERL_CALLCONV OP*      Perl_oopsHV(pTHX_ OP* o)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_OOPSHV        \
        assert(o)
 
@@ -2523,22 +3034,25 @@ PERL_CALLCONV OP*       Perl_op_scope(pTHX_ OP* o);
 #define PERL_ARGS_ASSERT_OP_SCOPE
 PERL_CALLCONV OP*      Perl_op_sibling_splice(OP *parent, OP *start, int del_count, OP* insert);
 #define PERL_ARGS_ASSERT_OP_SIBLING_SPLICE
-PERL_CALLCONV OP*      Perl_op_unscope(pTHX_ OP* o);
+PERL_CALLCONV OP*      Perl_op_unscope(pTHX_ OP* o)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_OP_UNSCOPE
-PERL_CALLCONV void     Perl_optimize_optree(pTHX_ OP* o);
-#define PERL_ARGS_ASSERT_OPTIMIZE_OPTREE       \
-       assert(o)
-#ifndef NO_MATHOMS
-PERL_CALLCONV void     Perl_pack_cat(pTHX_ SV *cat, const char *pat, const char *patend, SV **beglist, SV **endlist, SV ***next_in_list, U32 flags);
-#define PERL_ARGS_ASSERT_PACK_CAT      \
-       assert(cat); assert(pat); assert(patend); assert(beglist); assert(endlist); assert(next_in_list)
-#endif
-PERL_CALLCONV void     Perl_package(pTHX_ OP* o);
+
+PERL_CALLCONV OP*      Perl_op_wrap_finally(pTHX_ OP *block, OP *finally)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_OP_WRAP_FINALLY       \
+       assert(block); assert(finally)
+
+PERL_CALLCONV void     Perl_package(pTHX_ OP* o)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_PACKAGE       \
        assert(o)
-PERL_CALLCONV void     Perl_package_version(pTHX_ OP* v);
+
+PERL_CALLCONV void     Perl_package_version(pTHX_ OP* v)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_PACKAGE_VERSION       \
        assert(v)
+
 PERL_CALLCONV void     Perl_packlist(pTHX_ SV *cat, const char *pat, const char *patend, SV **beglist, SV **endlist);
 #define PERL_ARGS_ASSERT_PACKLIST      \
        assert(cat); assert(pat); assert(patend); assert(beglist); assert(endlist)
@@ -2554,18 +3068,16 @@ PERL_CALLCONV PADOFFSET Perl_pad_add_name_pvn(pTHX_ const char *namepv, STRLEN n
 PERL_CALLCONV PADOFFSET        Perl_pad_add_name_sv(pTHX_ SV *name, U32 flags, HV *typestash, HV *ourstash);
 #define PERL_ARGS_ASSERT_PAD_ADD_NAME_SV       \
        assert(name)
-PERL_CALLCONV void     Perl_pad_add_weakref(pTHX_ CV* func);
+PERL_CALLCONV void     Perl_pad_add_weakref(pTHX_ CV* func)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_PAD_ADD_WEAKREF       \
        assert(func)
+
 PERL_CALLCONV PADOFFSET        Perl_pad_alloc(pTHX_ I32 optype, U32 tmptype);
 #define PERL_ARGS_ASSERT_PAD_ALLOC
-PERL_CALLCONV void     Perl_pad_block_start(pTHX_ int full);
+PERL_CALLCONV void     Perl_pad_block_start(pTHX_ int full)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_PAD_BLOCK_START
-#ifndef NO_MATHOMS
-PERL_CALLCONV HV*      Perl_pad_compname_type(pTHX_ const PADOFFSET po)
-                       __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT_PAD_COMPNAME_TYPE
-#endif
 
 PERL_CALLCONV PADOFFSET        Perl_pad_findmy_pv(pTHX_ const char* name, U32 flags);
 #define PERL_ARGS_ASSERT_PAD_FINDMY_PV \
@@ -2576,13 +3088,19 @@ PERL_CALLCONV PADOFFSET Perl_pad_findmy_pvn(pTHX_ const char* namepv, STRLEN nam
 PERL_CALLCONV PADOFFSET        Perl_pad_findmy_sv(pTHX_ SV* name, U32 flags);
 #define PERL_ARGS_ASSERT_PAD_FINDMY_SV \
        assert(name)
-PERL_CALLCONV void     Perl_pad_fixup_inner_anons(pTHX_ PADLIST *padlist, CV *old_cv, CV *new_cv);
+PERL_CALLCONV void     Perl_pad_fixup_inner_anons(pTHX_ PADLIST *padlist, CV *old_cv, CV *new_cv)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_PAD_FIXUP_INNER_ANONS \
        assert(padlist); assert(old_cv); assert(new_cv)
-PERL_CALLCONV void     Perl_pad_free(pTHX_ PADOFFSET po);
+
+PERL_CALLCONV void     Perl_pad_free(pTHX_ PADOFFSET po)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_PAD_FREE
-PERL_CALLCONV OP *     Perl_pad_leavemy(pTHX);
+
+PERL_CALLCONV OP *     Perl_pad_leavemy(pTHX)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_PAD_LEAVEMY
+
 PERL_CALLCONV PADLIST* Perl_pad_new(pTHX_ int flags)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_PAD_NEW
@@ -2590,13 +3108,17 @@ PERL_CALLCONV PADLIST*  Perl_pad_new(pTHX_ int flags)
 PERL_CALLCONV void     Perl_pad_push(pTHX_ PADLIST *padlist, int depth);
 #define PERL_ARGS_ASSERT_PAD_PUSH      \
        assert(padlist)
-PERL_CALLCONV void     Perl_pad_swipe(pTHX_ PADOFFSET po, bool refadjust);
+PERL_CALLCONV void     Perl_pad_swipe(pTHX_ PADOFFSET po, bool refadjust)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_PAD_SWIPE
+
 PERL_CALLCONV void     Perl_pad_tidy(pTHX_ padtidy_type type);
 #define PERL_ARGS_ASSERT_PAD_TIDY
-PERL_CALLCONV PAD **   Perl_padlist_store(pTHX_ PADLIST *padlist, I32 key, PAD *val);
+PERL_CALLCONV PAD **   Perl_padlist_store(pTHX_ PADLIST *padlist, I32 key, PAD *val)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_PADLIST_STORE \
        assert(padlist)
+
 PERL_CALLCONV void     Perl_padname_free(pTHX_ PADNAME *pn);
 #define PERL_ARGS_ASSERT_PADNAME_FREE  \
        assert(pn)
@@ -2631,14 +3153,20 @@ PERL_CALLCONV OP*       Perl_parse_subsignature(pTHX_ U32 flags);
 #define PERL_ARGS_ASSERT_PARSE_SUBSIGNATURE
 PERL_CALLCONV OP*      Perl_parse_termexpr(pTHX_ U32 flags);
 #define PERL_ARGS_ASSERT_PARSE_TERMEXPR
-PERL_CALLCONV U32      Perl_parse_unicode_opts(pTHX_ const char **popt);
+PERL_CALLCONV U32      Perl_parse_unicode_opts(pTHX_ const char **popt)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_PARSE_UNICODE_OPTS    \
        assert(popt)
-PERL_CALLCONV void     Perl_parser_free(pTHX_ const yy_parser *parser);
+
+PERL_CALLCONV void     Perl_parser_free(pTHX_ const yy_parser *parser)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_PARSER_FREE   \
        assert(parser)
-PERL_CALLCONV void     Perl_peep(pTHX_ OP* o);
+
+PERL_CALLCONV void     Perl_peep(pTHX_ OP* o)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_PEEP
+
 PERL_CALLCONV PerlInterpreter* perl_alloc(void);
 #define PERL_ARGS_ASSERT_PERL_ALLOC
 PERL_CALLCONV void     perl_construct(PerlInterpreter *my_perl);
@@ -2658,16 +3186,22 @@ PERL_CALLCONV int       perl_run(PerlInterpreter *my_perl);
        assert(my_perl)
 PERL_CALLCONV Signal_t Perl_perly_sighandler(int sig, Siginfo_t *info, void *uap, bool safe);
 #define PERL_ARGS_ASSERT_PERLY_SIGHANDLER
+/* PERL_CALLCONV const char *const     phase_name(pTHX_ enum perl_phase); */
+#define PERL_ARGS_ASSERT_PHASE_NAME
 PERL_CALLCONV void     Perl_pmop_dump(pTHX_ PMOP* pm);
 #define PERL_ARGS_ASSERT_PMOP_DUMP
-PERL_CALLCONV OP*      Perl_pmruntime(pTHX_ OP *o, OP *expr, OP *repl, UV flags, I32 floor);
+PERL_CALLCONV OP*      Perl_pmruntime(pTHX_ OP *o, OP *expr, OP *repl, UV flags, I32 floor)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_PMRUNTIME     \
        assert(o); assert(expr)
+
 PERL_CALLCONV void     Perl_pop_scope(pTHX);
 #define PERL_ARGS_ASSERT_POP_SCOPE
-PERL_CALLCONV void     Perl_populate_isa(pTHX_ const char *name, STRLEN len, ...);
+PERL_CALLCONV void     Perl_populate_isa(pTHX_ const char *name, STRLEN len, ...)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_POPULATE_ISA  \
        assert(name)
+
 PERL_CALLCONV REGEXP*  Perl_pregcomp(pTHX_ SV * const pattern, const U32 flags);
 #define PERL_ARGS_ASSERT_PREGCOMP      \
        assert(pattern)
@@ -2682,10 +3216,6 @@ PERL_CALLCONV void       Perl_pregfree2(pTHX_ REGEXP *rx);
 PERL_CALLCONV const char*      Perl_prescan_version(pTHX_ const char *s, bool strict, const char** errstr, bool *sqv, int *ssaw_decimal, int *swidth, bool *salpha);
 #define PERL_ARGS_ASSERT_PRESCAN_VERSION       \
        assert(s)
-PERL_CALLCONV void     Perl_ptr_table_clear(pTHX_ PTR_TBL_t *const tbl)
-                       __attribute__deprecated__;
-#define PERL_ARGS_ASSERT_PTR_TABLE_CLEAR
-
 PERL_CALLCONV void*    Perl_ptr_table_fetch(pTHX_ PTR_TBL_t *const tbl, const void *const sv)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_PTR_TABLE_FETCH       \
@@ -2729,9 +3259,11 @@ PERL_CALLCONV char*      Perl_re_intuit_start(pTHX_ REGEXP * const rx, SV* sv, const
 PERL_CALLCONV SV*      Perl_re_intuit_string(pTHX_ REGEXP  *const r);
 #define PERL_ARGS_ASSERT_RE_INTUIT_STRING      \
        assert(r)
-PERL_CALLCONV REGEXP*  Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count, OP *expr, const regexp_engine* eng, REGEXP *old_re, bool *is_bare_re, const U32 rx_flags, const U32 pm_flags);
+PERL_CALLCONV REGEXP*  Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count, OP *expr, const regexp_engine* eng, REGEXP *old_re, bool *is_bare_re, const U32 rx_flags, const U32 pm_flags)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_RE_OP_COMPILE \
        assert(eng)
+
 PERL_CALLCONV Malloc_t Perl_realloc(Malloc_t where, MEM_SIZE nbytes)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_REALLOC
@@ -2819,19 +3351,19 @@ PERL_CALLCONV void      Perl_regfree_internal(pTHX_ REGEXP *const rx);
        assert(rx)
 PERL_CALLCONV void     Perl_reginitcolors(pTHX);
 #define PERL_ARGS_ASSERT_REGINITCOLORS
-PERL_CALLCONV regnode* Perl_regnext(pTHX_ regnode* p)
-                       __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT_REGNEXT
-
 PERL_CALLCONV void     Perl_repeatcpy(char* to, const char* from, I32 len, IV count);
 #define PERL_ARGS_ASSERT_REPEATCPY     \
        assert(to); assert(from)
-PERL_CALLCONV void     Perl_report_evil_fh(pTHX_ const GV *gv);
+PERL_CALLCONV void     Perl_report_evil_fh(pTHX_ const GV *gv)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_REPORT_EVIL_FH
+
 PERL_CALLCONV void     Perl_report_uninit(pTHX_ const SV *uninit_sv);
 #define PERL_ARGS_ASSERT_REPORT_UNINIT
-PERL_CALLCONV void     Perl_report_wrongway_fh(pTHX_ const GV *gv, const char have);
+PERL_CALLCONV void     Perl_report_wrongway_fh(pTHX_ const GV *gv, const char have)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_REPORT_WRONGWAY_FH
+
 PERL_CALLCONV void     Perl_require_pv(pTHX_ const char* pv);
 #define PERL_ARGS_ASSERT_REQUIRE_PV    \
        assert(pv)
@@ -2841,15 +3373,21 @@ PERL_CALLCONV char*     Perl_rninstr(const char* big, const char* bigend, const char
 #define PERL_ARGS_ASSERT_RNINSTR       \
        assert(big); assert(bigend); assert(little); assert(lend)
 
-PERL_CALLCONV void     Perl_rpeep(pTHX_ OP* o);
+PERL_CALLCONV void     Perl_rpeep(pTHX_ OP* o)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_RPEEP
+
 PERL_CALLCONV Sighandler_t     Perl_rsignal(pTHX_ int i, Sighandler_t t);
 #define PERL_ARGS_ASSERT_RSIGNAL
-PERL_CALLCONV int      Perl_rsignal_restore(pTHX_ int i, Sigsave_t* t);
+PERL_CALLCONV int      Perl_rsignal_restore(pTHX_ int i, Sigsave_t* t)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_RSIGNAL_RESTORE
-PERL_CALLCONV int      Perl_rsignal_save(pTHX_ int i, Sighandler_t t1, Sigsave_t* save);
+
+PERL_CALLCONV int      Perl_rsignal_save(pTHX_ int i, Sighandler_t t1, Sigsave_t* save)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_RSIGNAL_SAVE  \
        assert(save)
+
 PERL_CALLCONV Sighandler_t     Perl_rsignal_state(pTHX_ int i);
 #define PERL_ARGS_ASSERT_RSIGNAL_STATE
 PERL_CALLCONV int      Perl_runops_debug(pTHX);
@@ -2859,9 +3397,11 @@ PERL_CALLCONV int        Perl_runops_standard(pTHX);
 PERL_CALLCONV CV*      Perl_rv2cv_op_cv(pTHX_ OP *cvop, U32 flags);
 #define PERL_ARGS_ASSERT_RV2CV_OP_CV   \
        assert(cvop)
-PERL_CALLCONV void     Perl_rxres_save(pTHX_ void **rsp, REGEXP *rx);
+PERL_CALLCONV void     Perl_rxres_save(pTHX_ void **rsp, REGEXP *rx)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_RXRES_SAVE    \
        assert(rsp); assert(rx)
+
 PERL_CALLCONV Malloc_t Perl_safesyscalloc(MEM_SIZE elements, MEM_SIZE size)
                        __attribute__malloc__
                        __attribute__warn_unused_result__;
@@ -2964,32 +3504,11 @@ PERL_CALLCONV void      Perl_save_iv(pTHX_ IV *ivp);
 #define PERL_ARGS_ASSERT_SAVE_IV       \
        assert(ivp)
 #ifndef NO_MATHOMS
-PERL_CALLCONV void     Perl_save_list(pTHX_ SV** sarg, I32 maxsarg)
-                       __attribute__deprecated__;
-#define PERL_ARGS_ASSERT_SAVE_LIST     \
-       assert(sarg)
-#endif
-
-#ifndef NO_MATHOMS
-PERL_CALLCONV void     Perl_save_long(pTHX_ long* longp)
-                       __attribute__deprecated__;
-#define PERL_ARGS_ASSERT_SAVE_LONG     \
-       assert(longp)
-#endif
-
-#ifndef NO_MATHOMS
 PERL_CALLCONV void     Perl_save_mortalizesv(pTHX_ SV* sv);
 #define PERL_ARGS_ASSERT_SAVE_MORTALIZESV      \
        assert(sv)
 #endif
 #ifndef NO_MATHOMS
-PERL_CALLCONV void     Perl_save_nogv(pTHX_ GV* gv)
-                       __attribute__deprecated__;
-#define PERL_ARGS_ASSERT_SAVE_NOGV     \
-       assert(gv)
-#endif
-
-#ifndef NO_MATHOMS
 PERL_CALLCONV void     Perl_save_op(pTHX);
 #define PERL_ARGS_ASSERT_SAVE_OP
 #endif
@@ -3065,13 +3584,19 @@ PERL_CALLCONV char*     Perl_savesvpv(pTHX_ SV* sv)
 
 PERL_CALLCONV void     Perl_savetmps(pTHX);
 #define PERL_ARGS_ASSERT_SAVETMPS
-PERL_CALLCONV OP*      Perl_sawparens(pTHX_ OP* o);
+PERL_CALLCONV OP*      Perl_sawparens(pTHX_ OP* o)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_SAWPARENS
-PERL_CALLCONV OP*      Perl_scalar(pTHX_ OP* o);
+
+PERL_CALLCONV OP*      Perl_scalar(pTHX_ OP* o)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_SCALAR
-PERL_CALLCONV OP*      Perl_scalarvoid(pTHX_ OP* o);
+
+PERL_CALLCONV OP*      Perl_scalarvoid(pTHX_ OP* o)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_SCALARVOID    \
        assert(o)
+
 PERL_CALLCONV NV       Perl_scan_bin(pTHX_ const char* start, STRLEN len, STRLEN* retlen);
 #define PERL_ARGS_ASSERT_SCAN_BIN      \
        assert(start); assert(retlen)
@@ -3112,23 +3637,43 @@ PERL_CALLCONV void      Perl_set_numeric_underlying(pTHX);
 PERL_CALLCONV void     Perl_setdefout(pTHX_ GV* gv);
 #define PERL_ARGS_ASSERT_SETDEFOUT     \
        assert(gv)
-PERL_CALLCONV void     Perl_setfd_cloexec(int fd);
+PERL_CALLCONV void     Perl_setfd_cloexec(int fd)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_SETFD_CLOEXEC
-PERL_CALLCONV void     Perl_setfd_cloexec_for_nonsysfd(pTHX_ int fd);
+
+PERL_CALLCONV void     Perl_setfd_cloexec_for_nonsysfd(pTHX_ int fd)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_SETFD_CLOEXEC_FOR_NONSYSFD
-PERL_CALLCONV void     Perl_setfd_cloexec_or_inhexec_by_sysfdness(pTHX_ int fd);
+
+PERL_CALLCONV void     Perl_setfd_cloexec_or_inhexec_by_sysfdness(pTHX_ int fd)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_SETFD_CLOEXEC_OR_INHEXEC_BY_SYSFDNESS
-PERL_CALLCONV void     Perl_setfd_inhexec(int fd);
+
+PERL_CALLCONV void     Perl_setfd_inhexec(int fd)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_SETFD_INHEXEC
-PERL_CALLCONV void     Perl_setfd_inhexec_for_sysfd(pTHX_ int fd);
+
+PERL_CALLCONV void     Perl_setfd_inhexec_for_sysfd(pTHX_ int fd)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_SETFD_INHEXEC_FOR_SYSFD
+
 PERL_CALLCONV HEK*     Perl_share_hek(pTHX_ const char* str, SSize_t len, U32 hash);
 #define PERL_ARGS_ASSERT_SHARE_HEK     \
        assert(str)
-PERL_CALLCONV Signal_t Perl_sighandler1(int sig);
+PERL_CALLCONV Signal_t Perl_sighandler1(int sig)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_SIGHANDLER1
-PERL_CALLCONV Signal_t Perl_sighandler3(int sig, Siginfo_t *info, void *uap);
+
+PERL_CALLCONV Signal_t Perl_sighandler3(int sig, Siginfo_t *info, void *uap)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_SIGHANDLER3
+
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE unsigned    Perl_single_1bit_pos32(U32 word)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_SINGLE_1BIT_POS32
+#endif
+
 PERL_CALLCONV char*    Perl_skipspace_flags(pTHX_ char *s, U32 flags)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_SKIPSPACE_FLAGS       \
@@ -3143,9 +3688,11 @@ PERL_CALLCONV void       Perl_sortsv_flags(pTHX_ SV** array, size_t num_elts, SVCOMPAR
 PERL_CALLCONV SV**     Perl_stack_grow(pTHX_ SV** sp, SV** p, SSize_t n);
 #define PERL_ARGS_ASSERT_STACK_GROW    \
        assert(sp); assert(p)
-PERL_CALLCONV PerlIO*  Perl_start_glob(pTHX_ SV *tmpglob, IO *io);
+PERL_CALLCONV PerlIO*  Perl_start_glob(pTHX_ SV *tmpglob, IO *io)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_START_GLOB    \
        assert(tmpglob); assert(io)
+
 PERL_CALLCONV I32      Perl_start_subparse(pTHX_ I32 is_format, U32 flags);
 #define PERL_ARGS_ASSERT_START_SUBPARSE
 PERL_CALLCONV NV       Perl_str_to_version(pTHX_ SV *sv)
@@ -3153,9 +3700,11 @@ PERL_CALLCONV NV Perl_str_to_version(pTHX_ SV *sv)
 #define PERL_ARGS_ASSERT_STR_TO_VERSION        \
        assert(sv)
 
-PERL_CALLCONV void     Perl_sub_crush_depth(pTHX_ CV* cv);
+PERL_CALLCONV void     Perl_sub_crush_depth(pTHX_ CV* cv)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_SUB_CRUSH_DEPTH       \
        assert(cv)
+
 #ifndef NO_MATHOMS
 PERL_CALLCONV bool     Perl_sv_2bool(pTHX_ SV *const sv);
 #define PERL_ARGS_ASSERT_SV_2BOOL      \
@@ -3180,9 +3729,11 @@ PERL_CALLCONV IV Perl_sv_2iv_flags(pTHX_ SV *const sv, const I32 flags);
        assert(sv)
 PERL_CALLCONV SV*      Perl_sv_2mortal(pTHX_ SV *const sv);
 #define PERL_ARGS_ASSERT_SV_2MORTAL
-PERL_CALLCONV SV*      Perl_sv_2num(pTHX_ SV *const sv);
+PERL_CALLCONV SV*      Perl_sv_2num(pTHX_ SV *const sv)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_SV_2NUM       \
        assert(sv)
+
 PERL_CALLCONV NV       Perl_sv_2nv_flags(pTHX_ SV *const sv, const I32 flags);
 #define PERL_ARGS_ASSERT_SV_2NV_FLAGS  \
        assert(sv)
@@ -3191,7 +3742,7 @@ PERL_CALLCONV char*       Perl_sv_2pv(pTHX_ SV *sv, STRLEN *lp);
 #define PERL_ARGS_ASSERT_SV_2PV        \
        assert(sv)
 #endif
-PERL_CALLCONV char*    Perl_sv_2pv_flags(pTHX_ SV *const sv, STRLEN *const lp, const I32 flags);
+PERL_CALLCONV char*    Perl_sv_2pv_flags(pTHX_ SV *const sv, STRLEN *const lp, const U32 flags);
 #define PERL_ARGS_ASSERT_SV_2PV_FLAGS  \
        assert(sv)
 #ifndef NO_MATHOMS
@@ -3248,15 +3799,15 @@ PERL_CALLCONV SV*       Perl_sv_bless(pTHX_ SV *const sv, HV *const stash);
 PERL_CALLCONV bool     Perl_sv_cat_decode(pTHX_ SV* dsv, SV *encoding, SV *ssv, int *offset, char* tstr, int tlen);
 #define PERL_ARGS_ASSERT_SV_CAT_DECODE \
        assert(dsv); assert(encoding); assert(ssv); assert(offset); assert(tstr)
-PERL_CALLCONV void     Perl_sv_catpv(pTHX_ SV *const sv, const char* ptr);
+PERL_CALLCONV void     Perl_sv_catpv(pTHX_ SV *const dsv, const char* sstr);
 #define PERL_ARGS_ASSERT_SV_CATPV      \
-       assert(sv)
-PERL_CALLCONV void     Perl_sv_catpv_flags(pTHX_ SV *dstr, const char *sstr, const I32 flags);
+       assert(dsv)
+PERL_CALLCONV void     Perl_sv_catpv_flags(pTHX_ SV *dsv, const char *sstr, const I32 flags);
 #define PERL_ARGS_ASSERT_SV_CATPV_FLAGS        \
-       assert(dstr); assert(sstr)
-PERL_CALLCONV void     Perl_sv_catpv_mg(pTHX_ SV *const sv, const char *const ptr);
+       assert(dsv); assert(sstr)
+PERL_CALLCONV void     Perl_sv_catpv_mg(pTHX_ SV *const dsv, const char *const sstr);
 #define PERL_ARGS_ASSERT_SV_CATPV_MG   \
-       assert(sv)
+       assert(dsv)
 PERL_CALLCONV void     Perl_sv_catpvf(pTHX_ SV *const sv, const char *const pat, ...)
                        __attribute__format__(__printf__,pTHX_2,pTHX_3);
 #define PERL_ARGS_ASSERT_SV_CATPVF     \
@@ -3272,34 +3823,38 @@ PERL_CALLCONV void      Perl_sv_catpvn(pTHX_ SV *dsv, const char *sstr, STRLEN len);
 #define PERL_ARGS_ASSERT_SV_CATPVN     \
        assert(dsv); assert(sstr)
 #endif
-PERL_CALLCONV void     Perl_sv_catpvn_flags(pTHX_ SV *const dstr, const char *sstr, const STRLEN len, const I32 flags);
+PERL_CALLCONV void     Perl_sv_catpvn_flags(pTHX_ SV *const dsv, const char *sstr, const STRLEN len, const I32 flags);
 #define PERL_ARGS_ASSERT_SV_CATPVN_FLAGS       \
-       assert(dstr); assert(sstr)
+       assert(dsv); assert(sstr)
 #ifndef NO_MATHOMS
-PERL_CALLCONV void     Perl_sv_catpvn_mg(pTHX_ SV *sv, const char *ptr, STRLEN len);
+PERL_CALLCONV void     Perl_sv_catpvn_mg(pTHX_ SV *dsv, const char *sstr, STRLEN len);
 #define PERL_ARGS_ASSERT_SV_CATPVN_MG  \
-       assert(sv); assert(ptr)
+       assert(dsv); assert(sstr)
 #endif
 #ifndef NO_MATHOMS
-PERL_CALLCONV void     Perl_sv_catsv(pTHX_ SV *dstr, SV *sstr);
+PERL_CALLCONV void     Perl_sv_catsv(pTHX_ SV *dsv, SV *sstr);
 #define PERL_ARGS_ASSERT_SV_CATSV      \
-       assert(dstr)
+       assert(dsv)
 #endif
-PERL_CALLCONV void     Perl_sv_catsv_flags(pTHX_ SV *const dsv, SV *const ssv, const I32 flags);
+PERL_CALLCONV void     Perl_sv_catsv_flags(pTHX_ SV *const dsv, SV *const sstr, const I32 flags);
 #define PERL_ARGS_ASSERT_SV_CATSV_FLAGS        \
        assert(dsv)
 #ifndef NO_MATHOMS
-PERL_CALLCONV void     Perl_sv_catsv_mg(pTHX_ SV *dsv, SV *ssv);
+PERL_CALLCONV void     Perl_sv_catsv_mg(pTHX_ SV *dsv, SV *sstr);
 #define PERL_ARGS_ASSERT_SV_CATSV_MG   \
        assert(dsv)
 #endif
 PERL_CALLCONV void     Perl_sv_chop(pTHX_ SV *const sv, const char *const ptr);
 #define PERL_ARGS_ASSERT_SV_CHOP       \
        assert(sv)
-PERL_CALLCONV I32      Perl_sv_clean_all(pTHX);
+PERL_CALLCONV I32      Perl_sv_clean_all(pTHX)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_SV_CLEAN_ALL
-PERL_CALLCONV void     Perl_sv_clean_objs(pTHX);
+
+PERL_CALLCONV void     Perl_sv_clean_objs(pTHX)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_SV_CLEAN_OBJS
+
 PERL_CALLCONV void     Perl_sv_clear(pTHX_ SV *const orig_sv);
 #define PERL_ARGS_ASSERT_SV_CLEAR      \
        assert(orig_sv)
@@ -3391,8 +3946,10 @@ PERL_CALLCONV void       Perl_sv_free(pTHX_ SV *const sv);
 PERL_CALLCONV void     Perl_sv_free2(pTHX_ SV *const sv, const U32 refcnt);
 #define PERL_ARGS_ASSERT_SV_FREE2      \
        assert(sv)
-PERL_CALLCONV void     Perl_sv_free_arenas(pTHX);
+PERL_CALLCONV void     Perl_sv_free_arenas(pTHX)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_SV_FREE_ARENAS
+
 PERL_CALLCONV SV*      Perl_sv_get_backrefs(SV *const sv);
 #define PERL_ARGS_ASSERT_SV_GET_BACKREFS       \
        assert(sv)
@@ -3402,6 +3959,9 @@ PERL_CALLCONV char*       Perl_sv_gets(pTHX_ SV *const sv, PerlIO *const fp, I32 appen
 PERL_CALLCONV char*    Perl_sv_grow(pTHX_ SV *const sv, STRLEN newlen);
 #define PERL_ARGS_ASSERT_SV_GROW       \
        assert(sv)
+PERL_CALLCONV char*    Perl_sv_grow_fresh(pTHX_ SV *const sv, STRLEN newlen);
+#define PERL_ARGS_ASSERT_SV_GROW_FRESH \
+       assert(sv)
 PERL_CALLCONV void     Perl_sv_inc(pTHX_ SV *const sv);
 #define PERL_ARGS_ASSERT_SV_INC
 PERL_CALLCONV void     Perl_sv_inc_nomg(pTHX_ SV *const sv);
@@ -3424,13 +3984,6 @@ PERL_CALLCONV bool       Perl_sv_isa_sv(pTHX_ SV* sv, SV* namesv)
 
 PERL_CALLCONV int      Perl_sv_isobject(pTHX_ SV* sv);
 #define PERL_ARGS_ASSERT_SV_ISOBJECT
-#ifndef NO_MATHOMS
-PERL_CALLCONV IV       Perl_sv_iv(pTHX_ SV* sv)
-                       __attribute__deprecated__;
-#define PERL_ARGS_ASSERT_SV_IV \
-       assert(sv)
-#endif
-
 PERL_CALLCONV STRLEN   Perl_sv_len(pTHX_ SV *const sv);
 #define PERL_ARGS_ASSERT_SV_LEN
 PERL_CALLCONV STRLEN   Perl_sv_len_utf8(pTHX_ SV *const sv);
@@ -3477,13 +4030,10 @@ PERL_CALLCONV void      Perl_sv_nounlocking(pTHX_ SV *sv)
 #define PERL_ARGS_ASSERT_SV_NOUNLOCKING
 #endif
 
-#ifndef NO_MATHOMS
-PERL_CALLCONV NV       Perl_sv_nv(pTHX_ SV* sv)
-                       __attribute__deprecated__;
-#define PERL_ARGS_ASSERT_SV_NV \
-       assert(sv)
-#endif
-
+/* PERL_CALLCONV bool  sv_numeq(pTHX_ SV* sv1, SV* sv2); */
+#define PERL_ARGS_ASSERT_SV_NUMEQ
+PERL_CALLCONV bool     Perl_sv_numeq_flags(pTHX_ SV* sv1, SV* sv2, const U32 flags);
+#define PERL_ARGS_ASSERT_SV_NUMEQ_FLAGS
 #ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE bool        Perl_sv_only_taint_gmagic(SV *sv);
 #define PERL_ARGS_ASSERT_SV_ONLY_TAINT_GMAGIC  \
@@ -3517,55 +4067,37 @@ PERL_CALLCONV char*     Perl_sv_pvbyte(pTHX_ SV *sv)
        assert(sv)
 #endif
 
-#ifndef NO_MATHOMS
-PERL_CALLCONV char*    Perl_sv_pvbyten(pTHX_ SV *sv, STRLEN *lp)
-                       __attribute__deprecated__;
-#define PERL_ARGS_ASSERT_SV_PVBYTEN    \
-       assert(sv); assert(lp)
-#endif
-
 PERL_CALLCONV char*    Perl_sv_pvbyten_force(pTHX_ SV *const sv, STRLEN *const lp);
 #define PERL_ARGS_ASSERT_SV_PVBYTEN_FORCE      \
        assert(sv)
-#ifndef NO_MATHOMS
-PERL_CALLCONV char*    Perl_sv_pvn(pTHX_ SV *sv, STRLEN *lp)
-                       __attribute__deprecated__;
-#define PERL_ARGS_ASSERT_SV_PVN        \
-       assert(sv); assert(lp)
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE char*       Perl_sv_pvbyten_force_wrapper(pTHX_ SV *const sv, STRLEN *const lp, const U32 dummy);
+#define PERL_ARGS_ASSERT_SV_PVBYTEN_FORCE_WRAPPER      \
+       assert(sv)
 #endif
-
 #ifndef NO_MATHOMS
 PERL_CALLCONV char*    Perl_sv_pvn_force(pTHX_ SV* sv, STRLEN* lp);
 #define PERL_ARGS_ASSERT_SV_PVN_FORCE  \
        assert(sv)
 #endif
-PERL_CALLCONV char*    Perl_sv_pvn_force_flags(pTHX_ SV *const sv, STRLEN *const lp, const I32 flags);
+PERL_CALLCONV char*    Perl_sv_pvn_force_flags(pTHX_ SV *const sv, STRLEN *const lp, const U32 flags);
 #define PERL_ARGS_ASSERT_SV_PVN_FORCE_FLAGS    \
        assert(sv)
 #ifndef NO_MATHOMS
-PERL_CALLCONV char*    Perl_sv_pvn_nomg(pTHX_ SV* sv, STRLEN* lp)
-                       __attribute__deprecated__;
-#define PERL_ARGS_ASSERT_SV_PVN_NOMG   \
-       assert(sv)
-#endif
-
-#ifndef NO_MATHOMS
 PERL_CALLCONV char*    Perl_sv_pvutf8(pTHX_ SV *sv)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_SV_PVUTF8     \
        assert(sv)
 #endif
 
-#ifndef NO_MATHOMS
-PERL_CALLCONV char*    Perl_sv_pvutf8n(pTHX_ SV *sv, STRLEN *lp)
-                       __attribute__deprecated__;
-#define PERL_ARGS_ASSERT_SV_PVUTF8N    \
-       assert(sv); assert(lp)
-#endif
-
 PERL_CALLCONV char*    Perl_sv_pvutf8n_force(pTHX_ SV *const sv, STRLEN *const lp);
 #define PERL_ARGS_ASSERT_SV_PVUTF8N_FORCE      \
        assert(sv)
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE char*       Perl_sv_pvutf8n_force_wrapper(pTHX_ SV *const sv, STRLEN *const lp, const U32 dummy);
+#define PERL_ARGS_ASSERT_SV_PVUTF8N_FORCE_WRAPPER      \
+       assert(sv)
+#endif
 PERL_CALLCONV char*    Perl_sv_recode_to_utf8(pTHX_ SV* sv, SV *encoding);
 #define PERL_ARGS_ASSERT_SV_RECODE_TO_UTF8     \
        assert(sv); assert(encoding)
@@ -3585,14 +4117,25 @@ PERL_CALLCONV void      Perl_sv_report_used(pTHX);
 PERL_CALLCONV void     Perl_sv_reset(pTHX_ const char* s, HV *const stash);
 #define PERL_ARGS_ASSERT_SV_RESET      \
        assert(s)
-PERL_CALLCONV void     Perl_sv_resetpvn(pTHX_ const char* s, STRLEN len, HV *const stash);
+PERL_CALLCONV void     Perl_sv_resetpvn(pTHX_ const char* s, STRLEN len, HV *const stash)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_SV_RESETPVN
+
 PERL_CALLCONV SV*      Perl_sv_rvunweaken(pTHX_ SV *const sv);
 #define PERL_ARGS_ASSERT_SV_RVUNWEAKEN \
        assert(sv)
 PERL_CALLCONV SV*      Perl_sv_rvweaken(pTHX_ SV *const sv);
 #define PERL_ARGS_ASSERT_SV_RVWEAKEN   \
        assert(sv)
+PERL_CALLCONV void     Perl_sv_set_bool(pTHX_ SV *sv, const bool bool_val);
+#define PERL_ARGS_ASSERT_SV_SET_BOOL   \
+       assert(sv)
+PERL_CALLCONV void     Perl_sv_set_false(pTHX_ SV *sv);
+#define PERL_ARGS_ASSERT_SV_SET_FALSE  \
+       assert(sv)
+PERL_CALLCONV void     Perl_sv_set_true(pTHX_ SV *sv);
+#define PERL_ARGS_ASSERT_SV_SET_TRUE   \
+       assert(sv)
 PERL_CALLCONV void     Perl_sv_set_undef(pTHX_ SV *sv);
 #define PERL_ARGS_ASSERT_SV_SET_UNDEF  \
        assert(sv)
@@ -3630,23 +4173,12 @@ PERL_CALLCONV void      Perl_sv_setpvf_mg(pTHX_ SV *const sv, const char *const pat,
 #define PERL_ARGS_ASSERT_SV_SETPVF_MG  \
        assert(sv); assert(pat)
 
-#ifndef NO_MATHOMS
-PERL_CALLCONV void     Perl_sv_setpviv(pTHX_ SV *const sv, const IV num)
-                       __attribute__deprecated__;
-#define PERL_ARGS_ASSERT_SV_SETPVIV    \
-       assert(sv)
-#endif
-
-#ifndef NO_MATHOMS
-PERL_CALLCONV void     Perl_sv_setpviv_mg(pTHX_ SV *const sv, const IV iv)
-                       __attribute__deprecated__;
-#define PERL_ARGS_ASSERT_SV_SETPVIV_MG \
-       assert(sv)
-#endif
-
 PERL_CALLCONV void     Perl_sv_setpvn(pTHX_ SV *const sv, const char *const ptr, const STRLEN len);
 #define PERL_ARGS_ASSERT_SV_SETPVN     \
        assert(sv)
+PERL_CALLCONV void     Perl_sv_setpvn_fresh(pTHX_ SV *const sv, const char *const ptr, const STRLEN len);
+#define PERL_ARGS_ASSERT_SV_SETPVN_FRESH       \
+       assert(sv)
 PERL_CALLCONV void     Perl_sv_setpvn_mg(pTHX_ SV *const sv, const char *const ptr, const STRLEN len);
 #define PERL_ARGS_ASSERT_SV_SETPVN_MG  \
        assert(sv); assert(ptr)
@@ -3665,23 +4197,39 @@ PERL_CALLCONV SV*       Perl_sv_setref_pvn(pTHX_ SV *const rv, const char *const class
 PERL_CALLCONV SV*      Perl_sv_setref_uv(pTHX_ SV *const rv, const char *const classname, const UV uv);
 #define PERL_ARGS_ASSERT_SV_SETREF_UV  \
        assert(rv)
+PERL_CALLCONV void     Perl_sv_setrv_inc(pTHX_ SV *const sv, SV *const ref);
+#define PERL_ARGS_ASSERT_SV_SETRV_INC  \
+       assert(sv); assert(ref)
+PERL_CALLCONV void     Perl_sv_setrv_inc_mg(pTHX_ SV *const sv, SV *const ref);
+#define PERL_ARGS_ASSERT_SV_SETRV_INC_MG       \
+       assert(sv); assert(ref)
+PERL_CALLCONV void     Perl_sv_setrv_noinc(pTHX_ SV *const sv, SV *const ref);
+#define PERL_ARGS_ASSERT_SV_SETRV_NOINC        \
+       assert(sv); assert(ref)
+PERL_CALLCONV void     Perl_sv_setrv_noinc_mg(pTHX_ SV *const sv, SV *const ref);
+#define PERL_ARGS_ASSERT_SV_SETRV_NOINC_MG     \
+       assert(sv); assert(ref)
 #ifndef NO_MATHOMS
-PERL_CALLCONV void     Perl_sv_setsv(pTHX_ SV *dstr, SV *sstr);
+PERL_CALLCONV void     Perl_sv_setsv(pTHX_ SV *dsv, SV *ssv);
 #define PERL_ARGS_ASSERT_SV_SETSV      \
-       assert(dstr)
+       assert(dsv)
 #endif
-PERL_CALLCONV void     Perl_sv_setsv_flags(pTHX_ SV *dstr, SV *sstr, const I32 flags);
+PERL_CALLCONV void     Perl_sv_setsv_flags(pTHX_ SV *dsv, SV *ssv, const I32 flags);
 #define PERL_ARGS_ASSERT_SV_SETSV_FLAGS        \
-       assert(dstr)
-PERL_CALLCONV void     Perl_sv_setsv_mg(pTHX_ SV *const dstr, SV *const sstr);
+       assert(dsv)
+PERL_CALLCONV void     Perl_sv_setsv_mg(pTHX_ SV *const dsv, SV *const ssv);
 #define PERL_ARGS_ASSERT_SV_SETSV_MG   \
-       assert(dstr)
+       assert(dsv)
 PERL_CALLCONV void     Perl_sv_setuv(pTHX_ SV *const sv, const UV num);
 #define PERL_ARGS_ASSERT_SV_SETUV      \
        assert(sv)
 PERL_CALLCONV void     Perl_sv_setuv_mg(pTHX_ SV *const sv, const UV u);
 #define PERL_ARGS_ASSERT_SV_SETUV_MG   \
        assert(sv)
+/* PERL_CALLCONV bool  sv_streq(pTHX_ SV* sv1, SV* sv2); */
+#define PERL_ARGS_ASSERT_SV_STREQ
+PERL_CALLCONV bool     Perl_sv_streq_flags(pTHX_ SV* sv1, SV* sv2, const U32 flags);
+#define PERL_ARGS_ASSERT_SV_STREQ_FLAGS
 PERL_CALLCONV SV*      Perl_sv_string_from_errnum(pTHX_ int errnum, SV* tgtsv);
 #define PERL_ARGS_ASSERT_SV_STRING_FROM_ERRNUM
 #ifndef NO_MATHOMS
@@ -3762,13 +4310,6 @@ PERL_CALLCONV STRLEN     Perl_sv_utf8_upgrade_flags_grow(pTHX_ SV *const sv, const I
        assert(sv)
 /* PERL_CALLCONV STRLEN        sv_utf8_upgrade_nomg(pTHX_ SV *sv); */
 #define PERL_ARGS_ASSERT_SV_UTF8_UPGRADE_NOMG
-#ifndef NO_MATHOMS
-PERL_CALLCONV UV       Perl_sv_uv(pTHX_ SV* sv)
-                       __attribute__deprecated__;
-#define PERL_ARGS_ASSERT_SV_UV \
-       assert(sv)
-#endif
-
 PERL_CALLCONV void     Perl_sv_vcatpvf(pTHX_ SV *const sv, const char *const pat, va_list *const args);
 #define PERL_ARGS_ASSERT_SV_VCATPVF    \
        assert(sv); assert(pat)
@@ -3811,9 +4352,11 @@ PERL_CALLCONV void       Perl_thread_locale_init(void);
 #define PERL_ARGS_ASSERT_THREAD_LOCALE_INIT
 PERL_CALLCONV void     Perl_thread_locale_term(void);
 #define PERL_ARGS_ASSERT_THREAD_LOCALE_TERM
-PERL_CALLCONV OP *     Perl_tied_method(pTHX_ SV *methname, SV **sp, SV *const sv, const MAGIC *const mg, const U32 flags, U32 argc, ...);
+PERL_CALLCONV OP *     Perl_tied_method(pTHX_ SV *methname, SV **sp, SV *const sv, const MAGIC *const mg, const U32 flags, U32 argc, ...)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_TIED_METHOD   \
        assert(methname); assert(sp); assert(sv); assert(mg)
+
 PERL_CALLCONV SSize_t  Perl_tmps_grow_p(pTHX_ SSize_t ix);
 #define PERL_ARGS_ASSERT_TMPS_GROW_P
 /* PERL_CALLCONV UV    to_uni_fold(pTHX_ UV c, U8 *p, STRLEN *lenp); */
@@ -3831,13 +4374,6 @@ PERL_CALLCONV bool       Perl_try_amagic_bin(pTHX_ int method, int flags);
 #define PERL_ARGS_ASSERT_TRY_AMAGIC_BIN
 PERL_CALLCONV bool     Perl_try_amagic_un(pTHX_ int method, int flags);
 #define PERL_ARGS_ASSERT_TRY_AMAGIC_UN
-#ifndef NO_MATHOMS
-PERL_CALLCONV SSize_t  Perl_unpack_str(pTHX_ const char *pat, const char *patend, const char *s, const char *strbeg, const char *strend, char **new_s, I32 ocnt, U32 flags)
-                       __attribute__deprecated__;
-#define PERL_ARGS_ASSERT_UNPACK_STR    \
-       assert(pat); assert(patend); assert(s); assert(strend)
-#endif
-
 PERL_CALLCONV SSize_t  Perl_unpackstring(pTHX_ const char *pat, const char *patend, const char *s, const char *strend, U32 flags);
 #define PERL_ARGS_ASSERT_UNPACKSTRING  \
        assert(pat); assert(patend); assert(s); assert(strend)
@@ -3851,6 +4387,9 @@ PERL_CALLCONV SV* Perl_upg_version(pTHX_ SV *ver, bool qv);
 PERL_CALLCONV U8*      Perl_utf16_to_utf8(pTHX_ U8* p, U8 *d, Size_t bytelen, Size_t *newlen);
 #define PERL_ARGS_ASSERT_UTF16_TO_UTF8 \
        assert(p); assert(d); assert(newlen)
+PERL_CALLCONV U8*      Perl_utf16_to_utf8_base(pTHX_ U8* p, U8 *d, Size_t bytelen, Size_t *newlen, const bool high, const bool low);
+#define PERL_ARGS_ASSERT_UTF16_TO_UTF8_BASE    \
+       assert(p); assert(d); assert(newlen)
 PERL_CALLCONV U8*      Perl_utf16_to_utf8_reversed(pTHX_ U8* p, U8 *d, Size_t bytelen, Size_t *newlen);
 #define PERL_ARGS_ASSERT_UTF16_TO_UTF8_REVERSED        \
        assert(p); assert(d); assert(newlen)
@@ -3897,10 +4436,15 @@ PERL_CALLCONV STRLEN    Perl_utf8_length(pTHX_ const U8* s, const U8 *e)
 PERL_CALLCONV U8*      Perl_utf8_to_bytes(pTHX_ U8 *s, STRLEN *lenp);
 #define PERL_ARGS_ASSERT_UTF8_TO_BYTES \
        assert(s); assert(lenp)
+PERL_CALLCONV U8*      Perl_utf8_to_utf16_base(pTHX_ U8* s, U8 *d, Size_t bytelen, Size_t *newlen, const bool high, const bool low);
+#define PERL_ARGS_ASSERT_UTF8_TO_UTF16_BASE    \
+       assert(s); assert(d); assert(newlen)
+#ifndef NO_MATHOMS
 PERL_CALLCONV UV       Perl_utf8_to_uvchr(pTHX_ const U8 *s, STRLEN *retlen)
                        __attribute__deprecated__;
 #define PERL_ARGS_ASSERT_UTF8_TO_UVCHR \
        assert(s)
+#endif
 
 PERL_CALLCONV UV       Perl_utf8_to_uvchr_buf(pTHX_ const U8 *s, const U8 *send, STRLEN *retlen);
 #define PERL_ARGS_ASSERT_UTF8_TO_UVCHR_BUF     \
@@ -3917,11 +4461,6 @@ PERL_CALLCONV UV Perl_utf8_to_uvuni(pTHX_ const U8 *s, STRLEN *retlen)
        assert(s)
 #endif
 
-PERL_CALLCONV UV       Perl_utf8_to_uvuni_buf(pTHX_ const U8 *s, const U8 *send, STRLEN *retlen)
-                       __attribute__deprecated__;
-#define PERL_ARGS_ASSERT_UTF8_TO_UVUNI_BUF     \
-       assert(s); assert(send)
-
 PERL_CALLCONV UV       Perl_utf8n_to_uvchr(const U8 *s, STRLEN curlen, STRLEN *retlen, const U32 flags);
 #define PERL_ARGS_ASSERT_UTF8N_TO_UVCHR        \
        assert(s)
@@ -3933,30 +4472,33 @@ PERL_STATIC_INLINE UV   Perl_utf8n_to_uvchr_msgs(const U8 *s, STRLEN curlen, STRLE
 #define PERL_ARGS_ASSERT_UTF8N_TO_UVCHR_MSGS   \
        assert(s)
 #endif
-PERL_CALLCONV UV       Perl_utf8n_to_uvuni(pTHX_ const U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags);
+#ifndef NO_MATHOMS
+PERL_CALLCONV UV       Perl_utf8n_to_uvuni(pTHX_ const U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags)
+                       __attribute__deprecated__;
 #define PERL_ARGS_ASSERT_UTF8N_TO_UVUNI        \
        assert(s)
-PERL_CALLCONV void     Perl_utilize(pTHX_ int aver, I32 floor, OP* version, OP* idop, OP* arg);
+#endif
+
+PERL_CALLCONV void     Perl_utilize(pTHX_ int aver, I32 floor, OP* version, OP* idop, OP* arg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_UTILIZE       \
        assert(idop)
+
 /* PERL_CALLCONV U8*   uvchr_to_utf8(pTHX_ U8 *d, UV uv); */
 #define PERL_ARGS_ASSERT_UVCHR_TO_UTF8
 /* PERL_CALLCONV U8*   uvchr_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags); */
 #define PERL_ARGS_ASSERT_UVCHR_TO_UTF8_FLAGS
 /* PERL_CALLCONV U8*   uvchr_to_utf8_flags_msgs(pTHX_ U8 *d, UV uv, UV flags, HV ** msgs); */
 #define PERL_ARGS_ASSERT_UVCHR_TO_UTF8_FLAGS_MSGS
-PERL_CALLCONV U8*      Perl_uvoffuni_to_utf8_flags(pTHX_ U8 *d, UV uv, const UV flags);
+PERL_CALLCONV U8*      Perl_uvoffuni_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags);
 #define PERL_ARGS_ASSERT_UVOFFUNI_TO_UTF8_FLAGS        \
        assert(d)
-PERL_CALLCONV U8*      Perl_uvoffuni_to_utf8_flags_msgs(pTHX_ U8 *d, UV uv, const UV flags, HV** msgs);
+PERL_CALLCONV U8*      Perl_uvoffuni_to_utf8_flags_msgs(pTHX_ U8 *d, UV input_uv, const UV flags, HV** msgs);
 #define PERL_ARGS_ASSERT_UVOFFUNI_TO_UTF8_FLAGS_MSGS   \
        assert(d)
 PERL_CALLCONV U8*      Perl_uvuni_to_utf8(pTHX_ U8 *d, UV uv);
 #define PERL_ARGS_ASSERT_UVUNI_TO_UTF8 \
        assert(d)
-PERL_CALLCONV U8*      Perl_uvuni_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags);
-#define PERL_ARGS_ASSERT_UVUNI_TO_UTF8_FLAGS   \
-       assert(d)
 #ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE UV  Perl_valid_utf8_to_uvchr(const U8 *s, STRLEN *retlen)
                        __attribute__warn_unused_result__;
@@ -3964,13 +4506,6 @@ PERL_STATIC_INLINE UV    Perl_valid_utf8_to_uvchr(const U8 *s, STRLEN *retlen)
        assert(s)
 #endif
 
-#ifndef NO_MATHOMS
-PERL_CALLCONV UV       Perl_valid_utf8_to_uvuni(pTHX_ const U8 *s, STRLEN *retlen)
-                       __attribute__deprecated__;
-#define PERL_ARGS_ASSERT_VALID_UTF8_TO_UVUNI   \
-       assert(s)
-#endif
-
 PERL_CALLCONV bool     Perl_validate_proto(pTHX_ SV *name, SV *proto, bool warn, bool curstash);
 #define PERL_ARGS_ASSERT_VALIDATE_PROTO        \
        assert(name)
@@ -3991,7 +4526,8 @@ PERL_CALLCONV void        Perl_vivify_defelem(pTHX_ SV* sv);
 #define PERL_ARGS_ASSERT_VIVIFY_DEFELEM        \
        assert(sv)
 PERL_CALLCONV SV*      Perl_vivify_ref(pTHX_ SV* sv, U32 to_what)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_VIVIFY_REF    \
        assert(sv)
 
@@ -4024,9 +4560,11 @@ PERL_CALLCONV void       Perl_vwarn(pTHX_ const char* pat, va_list* args);
 PERL_CALLCONV void     Perl_vwarner(pTHX_ U32 err, const char* pat, va_list* args);
 #define PERL_ARGS_ASSERT_VWARNER       \
        assert(pat)
-PERL_CALLCONV I32      Perl_wait4pid(pTHX_ Pid_t pid, int* statusp, int flags);
+PERL_CALLCONV I32      Perl_wait4pid(pTHX_ Pid_t pid, int* statusp, int flags)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_WAIT4PID      \
        assert(statusp)
+
 PERL_CALLCONV void     Perl_warn(pTHX_ const char* pat, ...)
                        __attribute__format__(__printf__,pTHX_1,pTHX_2);
 #define PERL_ARGS_ASSERT_WARN  \
@@ -4044,9 +4582,11 @@ PERL_CALLCONV I32        Perl_was_lvalue_sub(pTHX)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_WAS_LVALUE_SUB
 
-PERL_CALLCONV void     Perl_watch(pTHX_ char** addr);
+PERL_CALLCONV void     Perl_watch(pTHX_ char** addr)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_WATCH \
        assert(addr)
+
 /* PERL_CALLCONV I32   whichsig(pTHX_ const char* sig); */
 #define PERL_ARGS_ASSERT_WHICHSIG
 PERL_CALLCONV I32      Perl_whichsig_pv(pTHX_ const char* sig);
@@ -4064,30 +4604,44 @@ PERL_CALLCONV void      Perl_wrap_keyword_plugin(pTHX_ Perl_keyword_plugin_t new_plug
 PERL_CALLCONV void     Perl_wrap_op_checker(pTHX_ Optype opcode, Perl_check_t new_checker, Perl_check_t *old_checker_p);
 #define PERL_ARGS_ASSERT_WRAP_OP_CHECKER       \
        assert(new_checker); assert(old_checker_p)
-PERL_CALLCONV void     Perl_write_to_stderr(pTHX_ SV* msv);
+PERL_CALLCONV void     Perl_write_to_stderr(pTHX_ SV* msv)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_WRITE_TO_STDERR       \
        assert(msv)
+
 PERL_CALLCONV void     Perl_xs_boot_epilog(pTHX_ const I32 ax);
 #define PERL_ARGS_ASSERT_XS_BOOT_EPILOG
 PERL_CALLCONV I32      Perl_xs_handshake(const U32 key, void * v_my_perl, const char * file, ...);
 #define PERL_ARGS_ASSERT_XS_HANDSHAKE  \
        assert(v_my_perl); assert(file)
-PERL_CALLCONV int      Perl_yyerror(pTHX_ const char *const s);
+PERL_CALLCONV int      Perl_yyerror(pTHX_ const char *const s)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_YYERROR       \
        assert(s)
-PERL_CALLCONV int      Perl_yyerror_pv(pTHX_ const char *const s, U32 flags);
+
+PERL_CALLCONV int      Perl_yyerror_pv(pTHX_ const char *const s, U32 flags)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_YYERROR_PV    \
        assert(s)
-PERL_CALLCONV int      Perl_yyerror_pvn(pTHX_ const char *const s, STRLEN len, U32 flags);
+
+PERL_CALLCONV int      Perl_yyerror_pvn(pTHX_ const char *const s, STRLEN len, U32 flags)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_YYERROR_PVN
+
 PERL_CALLCONV int      Perl_yylex(pTHX);
 #define PERL_ARGS_ASSERT_YYLEX
-PERL_CALLCONV int      Perl_yyparse(pTHX_ int gramtype);
+PERL_CALLCONV int      Perl_yyparse(pTHX_ int gramtype)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_YYPARSE
-PERL_CALLCONV void     Perl_yyquit(pTHX);
+
+PERL_CALLCONV void     Perl_yyquit(pTHX)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_YYQUIT
-PERL_CALLCONV void     Perl_yyunlex(pTHX);
+
+PERL_CALLCONV void     Perl_yyunlex(pTHX)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_YYUNLEX
+
 #if ! defined(HAS_MEMRCHR) && (defined(PERL_CORE) || defined(PERL_EXT))
 #ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE void *      S_my_memrchr(const char * s, const char c, const STRLEN len);
@@ -4095,6 +4649,26 @@ PERL_STATIC_INLINE void *        S_my_memrchr(const char * s, const char c, const STRLE
        assert(s)
 #endif
 #endif
+#if ! defined(HAS_NL_LANGINFO_L) && ! defined(HAS_NL_LANGINFO)
+#  if (defined(HAS_LOCALECONV) || defined(HAS_LOCALECONV_L))                && (defined(USE_LOCALE_MONETARY) || defined(USE_LOCALE_NUMERIC))
+#    if defined(PERL_IN_LOCALE_C)
+#      if defined(USE_LOCALE)
+STATIC HV *    S_get_nl_item_from_localeconv(pTHX_ const struct lconv *lcbuf, const int item, const locale_utf8ness_t unused1, const locale_utf8ness_t unused2);
+#define PERL_ARGS_ASSERT_GET_NL_ITEM_FROM_LOCALECONV   \
+       assert(lcbuf)
+#      endif
+#    endif
+#  endif
+#endif
+#if !(!defined(PERL_EXT_RE_BUILD))
+#  if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C)
+PERL_CALLCONV SV*      Perl_get_re_gclass_aux_data(pTHX_ const regexp *prog, const struct regnode *node, bool doinit, SV **listsvp, SV **lonly_utf8_locale, SV **output_invlist)
+                       __attribute__visibility__("hidden");
+#define PERL_ARGS_ASSERT_GET_RE_GCLASS_AUX_DATA        \
+       assert(node)
+
+#  endif
+#endif
 #if !(defined(DEBUGGING))
 #  if !defined(NV_PRESERVES_UV)
 #    if defined(PERL_IN_SV_C)
@@ -4107,34 +4681,53 @@ STATIC int      S_sv_2iuv_non_preserve(pTHX_ SV *const sv);
 #if !(defined(HAS_NL_LANGINFO) && defined(PERL_LANGINFO_H))
 PERL_CALLCONV const char*      Perl_langinfo(const int item);
 #define PERL_ARGS_ASSERT_PERL_LANGINFO
+PERL_CALLCONV const char*      Perl_langinfo8(const int item, utf8ness_t * utf8ness);
+#define PERL_ARGS_ASSERT_PERL_LANGINFO8
 #endif
-#if !(defined(HAS_NL_LANGINFO))
+#if !(defined(HAS_NL_LANGINFO) || defined(HAS_NL_LANGINFO_L))
 #  if defined(PERL_IN_LOCALE_C)
-STATIC const char*     S_my_nl_langinfo(const int item, bool toggle);
-#define PERL_ARGS_ASSERT_MY_NL_LANGINFO
+#    if defined(USE_LOCALE)
+STATIC const char*     S_my_langinfo_i(pTHX_ const int item, const unsigned int cat_index, const char * locale, const char ** retbufp, Size_t * retbuf_sizep, utf8ness_t * utf8ness);
+#define PERL_ARGS_ASSERT_MY_LANGINFO_I \
+       assert(locale); assert(retbufp)
+#    endif
 #  endif
 #endif
 #if !(defined(PERL_DEFAULT_DO_EXEC3_IMPLEMENTATION))
-PERL_CALLCONV bool     Perl_do_exec(pTHX_ const char* cmd);
+PERL_CALLCONV bool     Perl_do_exec(pTHX_ const char* cmd)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_DO_EXEC       \
        assert(cmd)
-#endif
-#if !(defined(PERL_GLOBAL_STRUCT_PRIVATE))
-#  if defined(PERL_IMPLICIT_CONTEXT)
-PERL_CALLCONV void*    Perl_my_cxt_init(pTHX_ int *indexp, size_t size);
-#define PERL_ARGS_ASSERT_MY_CXT_INIT   \
-       assert(indexp)
-#  endif
+
 #endif
 #if !(defined(PERL_USE_3ARG_SIGHANDLER))
 PERL_CALLCONV Signal_t Perl_csighandler(int sig);
 #define PERL_ARGS_ASSERT_CSIGHANDLER
-PERL_CALLCONV Signal_t Perl_sighandler(int sig);
+PERL_CALLCONV Signal_t Perl_sighandler(int sig)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_SIGHANDLER
+
+#endif
+#if !(defined(USE_QUERYLOCALE))
+#  if defined(PERL_IN_LOCALE_C)
+#    if defined(USE_LOCALE)
+#      if defined(USE_POSIX_2008_LOCALE)
+STATIC const char *    S_calculate_LC_ALL(pTHX_ const char ** individ_locales);
+#define PERL_ARGS_ASSERT_CALCULATE_LC_ALL      \
+       assert(individ_locales)
+STATIC const char *    S_find_locale_from_environment(pTHX_ const unsigned int index);
+#define PERL_ARGS_ASSERT_FIND_LOCALE_FROM_ENVIRONMENT
+STATIC const char*     S_update_PL_curlocales_i(pTHX_ const unsigned int index, const char * new_locale, recalc_lc_all_t recalc_LC_ALL);
+#define PERL_ARGS_ASSERT_UPDATE_PL_CURLOCALES_I        \
+       assert(new_locale)
+#      endif
+#    endif
+#  endif
 #endif
 #if !(defined(_MSC_VER))
 PERL_CALLCONV_NO_RET int       Perl_magic_regdatum_set(pTHX_ SV* sv, MAGIC* mg)
-                       __attribute__noreturn__;
+                       __attribute__noreturn__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_REGDATUM_SET    \
        assert(sv); assert(mg)
 
@@ -4148,9 +4741,11 @@ PERL_STATIC_INLINE unsigned int  Perl_variant_byte_number(PERL_UINTMAX_T word)
 
 #endif
 #if !defined(HAS_GETENV_LEN)
-PERL_CALLCONV char*    Perl_getenv_len(pTHX_ const char *env_elem, unsigned long *len);
+PERL_CALLCONV char*    Perl_getenv_len(pTHX_ const char *env_elem, unsigned long *len)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_GETENV_LEN    \
        assert(env_elem); assert(len)
+
 #endif
 #if !defined(HAS_MKDIR) || !defined(HAS_RMDIR)
 #  if defined(PERL_IN_PP_SYS_C)
@@ -4162,19 +4757,25 @@ STATIC int      S_dooneliner(pTHX_ const char *cmd, const char *filename)
 #  endif
 #endif
 #if !defined(HAS_MKOSTEMP)
-PERL_CALLCONV int      Perl_my_mkostemp(char *templte, int flags);
+PERL_CALLCONV int      Perl_my_mkostemp(char *templte, int flags)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MY_MKOSTEMP   \
        assert(templte)
+
 #endif
 #if !defined(HAS_MKSTEMP)
-PERL_CALLCONV int      Perl_my_mkstemp(char *templte);
+PERL_CALLCONV int      Perl_my_mkstemp(char *templte)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MY_MKSTEMP    \
        assert(templte)
+
 #endif
 #if !defined(HAS_RENAME)
-PERL_CALLCONV I32      Perl_same_dirent(pTHX_ const char* a, const char* b);
+PERL_CALLCONV I32      Perl_same_dirent(pTHX_ const char* a, const char* b)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_SAME_DIRENT   \
        assert(a); assert(b)
+
 #endif
 #if !defined(HAS_SIGNBIT)
 PERL_CALLCONV int      Perl_signbit(NV f)
@@ -4250,7 +4851,7 @@ PERL_STATIC_INLINE void   S_invlist_clear(pTHX_ SV* invlist);
        assert(invlist)
 #endif
 #ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE UV  S_invlist_max(SV* const invlist)
+PERL_STATIC_INLINE UV  S_invlist_max(const SV* const invlist)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_INVLIST_MAX   \
        assert(invlist)
@@ -4277,6 +4878,13 @@ PERL_STATIC_INLINE void  S_invlist_trim(SV* invlist);
        assert(invlist)
 #endif
 #  endif
+#  if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C)
+PERL_CALLCONV SV*      Perl_get_regclass_aux_data(pTHX_ const regexp *prog, const struct regnode *node, bool doinit, SV **listsvp, SV **lonly_utf8_locale, SV **output_invlist)
+                       __attribute__visibility__("hidden");
+#define PERL_ARGS_ASSERT_GET_REGCLASS_AUX_DATA \
+       assert(node)
+
+#  endif
 #endif
 #if !defined(PERL_IMPLICIT_SYS)
 PERL_CALLCONV I32      Perl_my_pclose(pTHX_ PerlIO* ptr);
@@ -4374,6 +4982,11 @@ PERL_STATIC_INLINE void  Perl_cx_pushsub(pTHX_ PERL_CONTEXT *cx, CV *cv, OP *reto
        assert(cx); assert(cv)
 #endif
 #ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE void        Perl_cx_pushtry(pTHX_ PERL_CONTEXT *cx, OP *retop);
+#define PERL_ARGS_ASSERT_CX_PUSHTRY    \
+       assert(cx)
+#endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE void        Perl_cx_pushwhen(pTHX_ PERL_CONTEXT *cx);
 #define PERL_ARGS_ASSERT_CX_PUSHWHEN   \
        assert(cx)
@@ -4398,6 +5011,14 @@ STATIC I32       S_utf16_textfilter(pTHX_ int idx, SV *sv, int maxlen);
        assert(sv)
 #  endif
 #endif
+#if !defined(PURIFY)
+#  if defined(PERL_IN_HV_C)
+STATIC HE*     S_new_he(pTHX)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_NEW_HE
+
+#  endif
+#endif
 #if !defined(SETUID_SCRIPTS_ARE_SECURE_NOW)
 #  if defined(PERL_IN_PERL_C)
 STATIC void    S_validate_suid(pTHX_ PerlIO *rsfp);
@@ -4405,19 +5026,27 @@ STATIC void     S_validate_suid(pTHX_ PerlIO *rsfp);
        assert(rsfp)
 #  endif
 #endif
-#if !defined(UV_IS_QUAD)
-#  if defined(PERL_IN_UTF8_C)
-STATIC int     S_is_utf8_cp_above_31_bits(const U8 * const s, const U8 * const e, const bool consider_overlongs)
-                       __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT_IS_UTF8_CP_ABOVE_31_BITS      \
-       assert(s); assert(e)
-
-#  endif
+#if !defined(USE_ITHREADS)
+/* PERL_CALLCONV void  CopFILEGV_set(pTHX_ COP * c, GV * gv); */
+#define PERL_ARGS_ASSERT_COPFILEGV_SET
 #endif
 #if !defined(WIN32)
-PERL_CALLCONV bool     Perl_do_exec3(pTHX_ const char *incmd, int fd, int do_report);
+PERL_CALLCONV bool     Perl_do_exec3(pTHX_ const char *incmd, int fd, int do_report)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_DO_EXEC3      \
        assert(incmd)
+
+#endif
+#if (defined(HAS_LOCALECONV) || defined(HAS_LOCALECONV_L))                  && (defined(USE_LOCALE_MONETARY) || defined(USE_LOCALE_NUMERIC))
+#  if defined(PERL_IN_LOCALE_C)
+#    if defined(USE_LOCALE)
+STATIC HV *    S_my_localeconv(pTHX_ const int item, const locale_utf8ness_t locale_is_utf8);
+#define PERL_ARGS_ASSERT_MY_LOCALECONV
+STATIC HV *    S_populate_localeconv(pTHX_ const struct lconv *lcbuf, const int unused, const locale_utf8ness_t numeric_locale_is_utf8, const locale_utf8ness_t monetary_locale_is_utf8);
+#define PERL_ARGS_ASSERT_POPULATE_LOCALECONV   \
+       assert(lcbuf)
+#    endif
+#  endif
 #endif
 #if 0  /* Not currently used, but may be needed in the future */
 #  if defined(PERL_IN_UTF8_C)
@@ -4428,14 +5057,16 @@ STATIC void     S_warn_on_first_deprecated_use(pTHX_ const char * const name, const
 #endif
 #if defined (HAS_SOCKETPAIR) ||     (defined (HAS_SOCKET) && defined(SOCK_DGRAM) &&    defined(AF_INET) && defined(PF_INET))
 PERL_CALLCONV int      Perl_PerlSock_socketpair_cloexec(pTHX_ int domain, int type, int protocol, int *pairfd)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_PERLSOCK_SOCKETPAIR_CLOEXEC   \
        assert(pairfd)
 
 #endif
 #if defined(DEBUGGING)
 PERL_CALLCONV int      Perl_get_debug_opts(pTHX_ const char **s, bool givehelp)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_GET_DEBUG_OPTS        \
        assert(s)
 
@@ -4458,9 +5089,9 @@ STATIC void       S_print_bytes_for_locale(pTHX_ const char * const s, const char * co
 STATIC void    S_print_collxfrm_input_and_return(pTHX_ const char * const s, const char * const e, const STRLEN * const xlen, const bool is_utf8);
 #define PERL_ARGS_ASSERT_PRINT_COLLXFRM_INPUT_AND_RETURN       \
        assert(s); assert(e)
-STATIC char *  S_setlocale_debug_string(const int category, const char* const locale, const char* const retval)
+STATIC char *  S_setlocale_debug_string_i(const unsigned cat_index, const char* const locale, const char* const retval)
                        __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT_SETLOCALE_DEBUG_STRING
+#define PERL_ARGS_ASSERT_SETLOCALE_DEBUG_STRING_I
 
 #    endif
 #  endif
@@ -4482,7 +5113,7 @@ STATIC void       S_dump_trie_interim_table(pTHX_ const struct _reg_trie_data *trie, H
 STATIC const regnode*  S_dumpuntil(pTHX_ const regexp *r, const regnode *start, const regnode *node, const regnode *last, const regnode *plast, SV* sv, I32 indent, U32 depth);
 #define PERL_ARGS_ASSERT_DUMPUNTIL     \
        assert(r); assert(start); assert(node); assert(sv)
-STATIC bool    S_put_charclass_bitmap_innards(pTHX_ SV* sv, char* bitmap, SV* nonbitmap_invlist, SV* only_utf8_locale_invlist, const regnode * const node, const U8 flags, const bool force_as_is_display);
+STATIC U8      S_put_charclass_bitmap_innards(pTHX_ SV* sv, char* bitmap, SV* nonbitmap_invlist, SV* only_utf8_locale_invlist, const regnode * const node, const U8 flags, const bool force_as_is_display);
 #define PERL_ARGS_ASSERT_PUT_CHARCLASS_BITMAP_INNARDS  \
        assert(sv)
 STATIC SV*     S_put_charclass_bitmap_innards_common(pTHX_ SV* invlist, SV* posixes, SV* only_utf8, SV* not_utf8, SV* only_utf8_locale, const bool invert);
@@ -4497,13 +5128,18 @@ STATIC void     S_put_code_point(pTHX_ SV* sv, UV c);
 STATIC void    S_put_range(pTHX_ SV* sv, UV start, const UV end, const bool allow_literals);
 #define PERL_ARGS_ASSERT_PUT_RANGE     \
        assert(sv)
-PERL_CALLCONV int      Perl_re_indentf(pTHX_ const char *fmt, U32 depth, ...);
+PERL_CALLCONV int      Perl_re_indentf(pTHX_ const char *fmt, U32 depth, ...)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_RE_INDENTF    \
        assert(fmt)
+
 STATIC void    S_regdump_extflags(pTHX_ const char *lead, const U32 flags);
 #define PERL_ARGS_ASSERT_REGDUMP_EXTFLAGS
 STATIC void    S_regdump_intflags(pTHX_ const char *lead, const U32 flags);
 #define PERL_ARGS_ASSERT_REGDUMP_INTFLAGS
+STATIC regnode_offset  S_regnode_guts_debug(pTHX_ RExC_state_t *pRExC_state, const U8 op, const STRLEN extra_len);
+#define PERL_ARGS_ASSERT_REGNODE_GUTS_DEBUG    \
+       assert(pRExC_state)
 STATIC bool    S_regtail_study(pTHX_ RExC_state_t *pRExC_state, regnode_offset p, const regnode_offset val, U32 depth)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_REGTAIL_STUDY \
@@ -4517,9 +5153,11 @@ STATIC void      S_debug_start_match(pTHX_ const REGEXP *prog, const bool do_utf8, co
 STATIC void    S_dump_exec_pos(pTHX_ const char *locinput, const regnode *scan, const char *loc_regeol, const char *loc_bostr, const char *loc_reg_starttry, const bool do_utf8, const U32 depth);
 #define PERL_ARGS_ASSERT_DUMP_EXEC_POS \
        assert(locinput); assert(scan); assert(loc_regeol); assert(loc_bostr); assert(loc_reg_starttry)
-PERL_CALLCONV int      Perl_re_exec_indentf(pTHX_ const char *fmt, U32 depth, ...);
+PERL_CALLCONV int      Perl_re_exec_indentf(pTHX_ const char *fmt, U32 depth, ...)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_RE_EXEC_INDENTF       \
        assert(fmt)
+
 #  endif
 #  if defined(PERL_IN_SV_C)
 STATIC void    S_del_sv(pTHX_ SV *p);
@@ -4545,54 +5183,76 @@ STATIC void     S_dump_regex_sets_structures(pTHX_ RExC_state_t *pRExC_state, AV * s
 #  endif
 #endif
 #if defined(DEBUG_LEAKING_SCALARS_FORK_DUMP)
-PERL_CALLCONV void     Perl_dump_sv_child(pTHX_ SV *sv);
+PERL_CALLCONV void     Perl_dump_sv_child(pTHX_ SV *sv)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_DUMP_SV_CHILD \
        assert(sv)
+
 #endif
 #if defined(HAS_MSG) || defined(HAS_SEM) || defined(HAS_SHM)
-PERL_CALLCONV I32      Perl_do_ipcctl(pTHX_ I32 optype, SV** mark, SV** sp);
+PERL_CALLCONV I32      Perl_do_ipcctl(pTHX_ I32 optype, SV** mark, SV** sp)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_DO_IPCCTL     \
        assert(mark); assert(sp)
-PERL_CALLCONV I32      Perl_do_ipcget(pTHX_ I32 optype, SV** mark, SV** sp);
+
+PERL_CALLCONV I32      Perl_do_ipcget(pTHX_ I32 optype, SV** mark, SV** sp)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_DO_IPCGET     \
        assert(mark); assert(sp)
-PERL_CALLCONV I32      Perl_do_msgrcv(pTHX_ SV** mark, SV** sp);
+
+PERL_CALLCONV I32      Perl_do_msgrcv(pTHX_ SV** mark, SV** sp)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_DO_MSGRCV     \
        assert(mark); assert(sp)
-PERL_CALLCONV I32      Perl_do_msgsnd(pTHX_ SV** mark, SV** sp);
+
+PERL_CALLCONV I32      Perl_do_msgsnd(pTHX_ SV** mark, SV** sp)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_DO_MSGSND     \
        assert(mark); assert(sp)
-PERL_CALLCONV I32      Perl_do_semop(pTHX_ SV** mark, SV** sp);
+
+PERL_CALLCONV I32      Perl_do_semop(pTHX_ SV** mark, SV** sp)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_DO_SEMOP      \
        assert(mark); assert(sp)
-PERL_CALLCONV I32      Perl_do_shmio(pTHX_ I32 optype, SV** mark, SV** sp);
+
+PERL_CALLCONV I32      Perl_do_shmio(pTHX_ I32 optype, SV** mark, SV** sp)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_DO_SHMIO      \
        assert(mark); assert(sp)
-#endif
-#if defined(HAS_NL_LANGINFO)
-#  if defined(PERL_IN_LOCALE_C)
-STATIC const char*     S_my_nl_langinfo(const nl_item item, bool toggle);
-#define PERL_ARGS_ASSERT_MY_NL_LANGINFO
-#  endif
+
 #endif
 #if defined(HAS_NL_LANGINFO) && defined(PERL_LANGINFO_H)
 PERL_CALLCONV const char*      Perl_langinfo(const nl_item item);
 #define PERL_ARGS_ASSERT_PERL_LANGINFO
+PERL_CALLCONV const char*      Perl_langinfo8(const nl_item item, utf8ness_t * utf8ness);
+#define PERL_ARGS_ASSERT_PERL_LANGINFO8
+#endif
+#if defined(HAS_NL_LANGINFO) || defined(HAS_NL_LANGINFO_L)
+#  if defined(PERL_IN_LOCALE_C)
+#    if defined(USE_LOCALE)
+STATIC const char*     S_my_langinfo_i(pTHX_ const nl_item item, const unsigned int cat_index, const char * locale, const char ** retbufp, Size_t * retbuf_sizep, utf8ness_t * utf8ness);
+#define PERL_ARGS_ASSERT_MY_LANGINFO_I \
+       assert(locale); assert(retbufp)
+#    endif
+#  endif
 #endif
 #if defined(HAS_PIPE)
 PERL_CALLCONV int      Perl_PerlProc_pipe_cloexec(pTHX_ int *pipefd)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_PERLPROC_PIPE_CLOEXEC \
        assert(pipefd)
 
 #endif
 #if defined(HAS_SOCKET)
 PERL_CALLCONV int      Perl_PerlSock_accept_cloexec(pTHX_ int listenfd, struct sockaddr *addr, Sock_size_t *addrlen)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_PERLSOCK_ACCEPT_CLOEXEC
 
 PERL_CALLCONV int      Perl_PerlSock_socket_cloexec(pTHX_ int domain, int type, int protocol)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_PERLSOCK_SOCKET_CLOEXEC
 
 #endif
@@ -4607,6 +5267,74 @@ PERL_CALLCONV void       Perl_sys_intern_dup(pTHX_ struct interp_intern* src, struct i
        assert(src); assert(dst)
 #  endif
 #endif
+#if defined(MULTIPLICITY)
+PERL_CALLCONV_NO_RET void      Perl_croak_nocontext(const char* pat, ...)
+                       __attribute__noreturn__
+                       __attribute__format__null_ok__(__printf__,1,2);
+#define PERL_ARGS_ASSERT_CROAK_NOCONTEXT
+
+PERL_CALLCONV void     Perl_deb_nocontext(const char* pat, ...)
+                       __attribute__format__(__printf__,1,2);
+#define PERL_ARGS_ASSERT_DEB_NOCONTEXT \
+       assert(pat)
+
+PERL_CALLCONV_NO_RET OP*       Perl_die_nocontext(const char* pat, ...)
+                       __attribute__noreturn__
+                       __attribute__format__null_ok__(__printf__,1,2);
+#define PERL_ARGS_ASSERT_DIE_NOCONTEXT
+
+PERL_CALLCONV char*    Perl_form_nocontext(const char* pat, ...)
+                       __attribute__format__(__printf__,1,2);
+#define PERL_ARGS_ASSERT_FORM_NOCONTEXT        \
+       assert(pat)
+
+PERL_CALLCONV void     Perl_load_module_nocontext(U32 flags, SV* name, SV* ver, ...);
+#define PERL_ARGS_ASSERT_LOAD_MODULE_NOCONTEXT \
+       assert(name)
+PERL_CALLCONV SV*      Perl_mess_nocontext(const char* pat, ...)
+                       __attribute__format__(__printf__,1,2);
+#define PERL_ARGS_ASSERT_MESS_NOCONTEXT        \
+       assert(pat)
+
+PERL_CALLCONV void*    Perl_my_cxt_init(pTHX_ int *indexp, size_t size);
+#define PERL_ARGS_ASSERT_MY_CXT_INIT   \
+       assert(indexp)
+PERL_CALLCONV SV*      Perl_newSVpvf_nocontext(const char *const pat, ...)
+                       __attribute__format__(__printf__,1,2);
+#define PERL_ARGS_ASSERT_NEWSVPVF_NOCONTEXT    \
+       assert(pat)
+
+PERL_CALLCONV void     Perl_sv_catpvf_mg_nocontext(SV *const sv, const char *const pat, ...)
+                       __attribute__format__(__printf__,2,3);
+#define PERL_ARGS_ASSERT_SV_CATPVF_MG_NOCONTEXT        \
+       assert(sv); assert(pat)
+
+PERL_CALLCONV void     Perl_sv_catpvf_nocontext(SV *const sv, const char *const pat, ...)
+                       __attribute__format__(__printf__,2,3);
+#define PERL_ARGS_ASSERT_SV_CATPVF_NOCONTEXT   \
+       assert(sv); assert(pat)
+
+PERL_CALLCONV void     Perl_sv_setpvf_mg_nocontext(SV *const sv, const char *const pat, ...)
+                       __attribute__format__(__printf__,2,3);
+#define PERL_ARGS_ASSERT_SV_SETPVF_MG_NOCONTEXT        \
+       assert(sv); assert(pat)
+
+PERL_CALLCONV void     Perl_sv_setpvf_nocontext(SV *const sv, const char *const pat, ...)
+                       __attribute__format__(__printf__,2,3);
+#define PERL_ARGS_ASSERT_SV_SETPVF_NOCONTEXT   \
+       assert(sv); assert(pat)
+
+PERL_CALLCONV void     Perl_warn_nocontext(const char* pat, ...)
+                       __attribute__format__(__printf__,1,2);
+#define PERL_ARGS_ASSERT_WARN_NOCONTEXT        \
+       assert(pat)
+
+PERL_CALLCONV void     Perl_warner_nocontext(U32 err, const char* pat, ...)
+                       __attribute__format__(__printf__,2,3);
+#define PERL_ARGS_ASSERT_WARNER_NOCONTEXT      \
+       assert(pat)
+
+#endif
 #if defined(MYMALLOC)
 PERL_CALLCONV void     Perl_dump_mstats(pTHX_ const char* s);
 #define PERL_ARGS_ASSERT_DUMP_MSTATS   \
@@ -4615,33 +5343,43 @@ PERL_CALLCONV int       Perl_get_mstats(pTHX_ perl_mstats_t *buf, int buflen, int leve
 #define PERL_ARGS_ASSERT_GET_MSTATS    \
        assert(buf)
 PERL_CALLCONV MEM_SIZE Perl_malloc_good_size(size_t nbytes)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MALLOC_GOOD_SIZE
 
 PERL_CALLCONV MEM_SIZE Perl_malloced_size(void *p)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MALLOCED_SIZE \
        assert(p)
 
 #endif
 #if defined(PERL_ANY_COW)
-PERL_CALLCONV SV*      Perl_sv_setsv_cow(pTHX_ SV* dstr, SV* sstr);
+PERL_CALLCONV SV*      Perl_sv_setsv_cow(pTHX_ SV* dsv, SV* ssv);
 #define PERL_ARGS_ASSERT_SV_SETSV_COW  \
-       assert(sstr)
+       assert(ssv)
 #endif
 #if defined(PERL_CORE)
-PERL_CALLCONV void     Perl_opslab_force_free(pTHX_ OPSLAB *slab);
+PERL_CALLCONV void     Perl_opslab_force_free(pTHX_ OPSLAB *slab)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_OPSLAB_FORCE_FREE     \
        assert(slab)
-PERL_CALLCONV void     Perl_opslab_free(pTHX_ OPSLAB *slab);
+
+PERL_CALLCONV void     Perl_opslab_free(pTHX_ OPSLAB *slab)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_OPSLAB_FREE   \
        assert(slab)
-PERL_CALLCONV void     Perl_opslab_free_nopad(pTHX_ OPSLAB *slab);
+
+PERL_CALLCONV void     Perl_opslab_free_nopad(pTHX_ OPSLAB *slab)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_OPSLAB_FREE_NOPAD     \
        assert(slab)
-PERL_CALLCONV void     Perl_parser_free_nexttoke_ops(pTHX_ yy_parser *parser, OPSLAB *slab);
+
+PERL_CALLCONV void     Perl_parser_free_nexttoke_ops(pTHX_ yy_parser *parser, OPSLAB *slab)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_PARSER_FREE_NEXTTOKE_OPS      \
        assert(parser); assert(slab)
+
 #ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE bool        S_should_warn_nl(const char *pv)
                        __attribute__warn_unused_result__;
@@ -4696,9 +5434,11 @@ STATIC void      S_strip_return(pTHX_ SV *sv);
 #  endif
 #endif
 #if defined(PERL_DEBUG_READONLY_COW)
-PERL_CALLCONV void     Perl_sv_buf_to_ro(pTHX_ SV *sv);
+PERL_CALLCONV void     Perl_sv_buf_to_ro(pTHX_ SV *sv)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_SV_BUF_TO_RO  \
        assert(sv)
+
 #  if defined(PERL_IN_SV_C)
 STATIC void    S_sv_buf_to_rw(pTHX_ SV *sv);
 #define PERL_ARGS_ASSERT_SV_BUF_TO_RW  \
@@ -4713,9 +5453,11 @@ PERL_CALLCONV OP *       Perl_op_refcnt_inc(pTHX_ OP *o);
 #define PERL_ARGS_ASSERT_OP_REFCNT_INC
 #endif
 #if defined(PERL_DEFAULT_DO_EXEC3_IMPLEMENTATION)
-PERL_CALLCONV bool     Perl_do_exec(pTHX_ const char* cmd);
+PERL_CALLCONV bool     Perl_do_exec(pTHX_ const char* cmd)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_DO_EXEC       \
        assert(cmd)
+
 #endif
 #if defined(PERL_DONT_CREATE_GVSV)
 #ifndef NO_MATHOMS
@@ -4723,106 +5465,6 @@ PERL_CALLCONV GV*       Perl_gv_SVadd(pTHX_ GV *gv);
 #define PERL_ARGS_ASSERT_GV_SVADD
 #endif
 #endif
-#if defined(PERL_GLOBAL_STRUCT)
-PERL_CALLCONV struct perl_vars *       Perl_GetVars(pTHX);
-#define PERL_ARGS_ASSERT_GETVARS
-PERL_CALLCONV void     Perl_free_global_struct(pTHX_ struct perl_vars *plvarsp);
-#define PERL_ARGS_ASSERT_FREE_GLOBAL_STRUCT    \
-       assert(plvarsp)
-PERL_CALLCONV struct perl_vars*        Perl_init_global_struct(pTHX);
-#define PERL_ARGS_ASSERT_INIT_GLOBAL_STRUCT
-#endif
-#if defined(PERL_GLOBAL_STRUCT_PRIVATE)
-#  if defined(PERL_IMPLICIT_CONTEXT)
-PERL_CALLCONV int      Perl_my_cxt_index(pTHX_ const char *my_cxt_key);
-#define PERL_ARGS_ASSERT_MY_CXT_INDEX  \
-       assert(my_cxt_key)
-PERL_CALLCONV void*    Perl_my_cxt_init(pTHX_ const char *my_cxt_key, size_t size);
-#define PERL_ARGS_ASSERT_MY_CXT_INIT   \
-       assert(my_cxt_key)
-#  endif
-#endif
-#if defined(PERL_IMPLICIT_CONTEXT)
-PERL_CALLCONV_NO_RET void      Perl_croak_nocontext(const char* pat, ...)
-                       __attribute__noreturn__
-                       __attribute__format__null_ok__(__printf__,1,2);
-#define PERL_ARGS_ASSERT_CROAK_NOCONTEXT
-
-PERL_CALLCONV void     Perl_deb_nocontext(const char* pat, ...)
-                       __attribute__format__(__printf__,1,2);
-#define PERL_ARGS_ASSERT_DEB_NOCONTEXT \
-       assert(pat)
-
-PERL_CALLCONV_NO_RET OP*       Perl_die_nocontext(const char* pat, ...)
-                       __attribute__noreturn__
-                       __attribute__format__null_ok__(__printf__,1,2);
-#define PERL_ARGS_ASSERT_DIE_NOCONTEXT
-
-PERL_CALLCONV char*    Perl_form_nocontext(const char* pat, ...)
-                       __attribute__format__(__printf__,1,2);
-#define PERL_ARGS_ASSERT_FORM_NOCONTEXT        \
-       assert(pat)
-
-#ifndef NO_MATHOMS
-PERL_CALLCONV int      Perl_fprintf_nocontext(PerlIO *stream, const char *format, ...)
-                       __attribute__deprecated__
-                       __attribute__format__(__printf__,2,3);
-#define PERL_ARGS_ASSERT_FPRINTF_NOCONTEXT     \
-       assert(stream); assert(format)
-#endif
-
-PERL_CALLCONV void     Perl_load_module_nocontext(U32 flags, SV* name, SV* ver, ...);
-#define PERL_ARGS_ASSERT_LOAD_MODULE_NOCONTEXT \
-       assert(name)
-PERL_CALLCONV SV*      Perl_mess_nocontext(const char* pat, ...)
-                       __attribute__format__(__printf__,1,2);
-#define PERL_ARGS_ASSERT_MESS_NOCONTEXT        \
-       assert(pat)
-
-PERL_CALLCONV SV*      Perl_newSVpvf_nocontext(const char *const pat, ...)
-                       __attribute__format__(__printf__,1,2);
-#define PERL_ARGS_ASSERT_NEWSVPVF_NOCONTEXT    \
-       assert(pat)
-
-#ifndef NO_MATHOMS
-PERL_CALLCONV int      Perl_printf_nocontext(const char *format, ...)
-                       __attribute__deprecated__
-                       __attribute__format__(__printf__,1,2);
-#define PERL_ARGS_ASSERT_PRINTF_NOCONTEXT      \
-       assert(format)
-#endif
-
-PERL_CALLCONV void     Perl_sv_catpvf_mg_nocontext(SV *const sv, const char *const pat, ...)
-                       __attribute__format__(__printf__,2,3);
-#define PERL_ARGS_ASSERT_SV_CATPVF_MG_NOCONTEXT        \
-       assert(sv); assert(pat)
-
-PERL_CALLCONV void     Perl_sv_catpvf_nocontext(SV *const sv, const char *const pat, ...)
-                       __attribute__format__(__printf__,2,3);
-#define PERL_ARGS_ASSERT_SV_CATPVF_NOCONTEXT   \
-       assert(sv); assert(pat)
-
-PERL_CALLCONV void     Perl_sv_setpvf_mg_nocontext(SV *const sv, const char *const pat, ...)
-                       __attribute__format__(__printf__,2,3);
-#define PERL_ARGS_ASSERT_SV_SETPVF_MG_NOCONTEXT        \
-       assert(sv); assert(pat)
-
-PERL_CALLCONV void     Perl_sv_setpvf_nocontext(SV *const sv, const char *const pat, ...)
-                       __attribute__format__(__printf__,2,3);
-#define PERL_ARGS_ASSERT_SV_SETPVF_NOCONTEXT   \
-       assert(sv); assert(pat)
-
-PERL_CALLCONV void     Perl_warn_nocontext(const char* pat, ...)
-                       __attribute__format__(__printf__,1,2);
-#define PERL_ARGS_ASSERT_WARN_NOCONTEXT        \
-       assert(pat)
-
-PERL_CALLCONV void     Perl_warner_nocontext(U32 err, const char* pat, ...)
-                       __attribute__format__(__printf__,2,3);
-#define PERL_ARGS_ASSERT_WARNER_NOCONTEXT      \
-       assert(pat)
-
-#endif
 #if defined(PERL_IMPLICIT_SYS)
 PERL_CALLCONV PerlInterpreter* perl_alloc_using(struct IPerlMem *ipM, struct IPerlMem *ipMS, struct IPerlMem *ipMP, struct IPerlEnv *ipE, struct IPerlStdIO *ipStd, struct IPerlLIO *ipLIO, struct IPerlDir *ipD, struct IPerlSock *ipS, struct IPerlProc *ipP);
 #define PERL_ARGS_ASSERT_PERL_ALLOC_USING      \
@@ -4844,7 +5486,7 @@ STATIC void       S_deb_stack_n(pTHX_ SV** stack_base, I32 stack_min, I32 stack_max, I
        assert(stack_base)
 #endif
 #if defined(PERL_IN_DOIO_C)
-STATIC bool    S_argvout_final(pTHX_ MAGIC *mg, IO *io, bool not_implicit);
+STATIC bool    S_argvout_final(pTHX_ MAGIC *mg, IO *io, bool is_explicit);
 #define PERL_ARGS_ASSERT_ARGVOUT_FINAL \
        assert(mg); assert(io)
 STATIC void    S_exec_failed(pTHX_ const char *cmd, int fd, int do_report);
@@ -4901,9 +5543,11 @@ STATIC UV        S_sequence_num(pTHX_ const OP *o);
 #define PERL_ARGS_ASSERT_SEQUENCE_NUM
 #endif
 #if defined(PERL_IN_DUMP_C) || defined(PERL_IN_HV_C) || defined(PERL_IN_SV_C) || defined(PERL_IN_SCOPE_C)
-PERL_CALLCONV void     Perl_hv_kill_backrefs(pTHX_ HV *hv);
+PERL_CALLCONV void     Perl_hv_kill_backrefs(pTHX_ HV *hv)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_HV_KILL_BACKREFS      \
        assert(hv)
+
 #endif
 #if defined(PERL_IN_GV_C)
 STATIC bool    S_find_default_stash(pTHX_ HV **stash, const char *name, STRLEN len, const U32 is_utf8, const I32 add, const svtype sv_type);
@@ -4941,12 +5585,16 @@ STATIC void     S_require_tie_mod(pTHX_ GV *gv, const char varname, const char * nam
        assert(gv); assert(varname); assert(name)
 #endif
 #if defined(PERL_IN_GV_C) || defined(PERL_IN_SV_C) || defined(PERL_IN_PAD_C) || defined(PERL_IN_OP_C)
-PERL_CALLCONV void     Perl_sv_add_backref(pTHX_ SV *const tsv, SV *const sv);
+PERL_CALLCONV void     Perl_sv_add_backref(pTHX_ SV *const tsv, SV *const sv)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_SV_ADD_BACKREF        \
        assert(tsv); assert(sv)
+
 #endif
 #if defined(PERL_IN_GV_C) || defined(PERL_IN_UNIVERSAL_C)
-PERL_CALLCONV HV*      Perl_gv_stashsvpvn_cached(pTHX_ SV *namesv, const char* name, U32 namelen, I32 flags);
+PERL_CALLCONV HV*      Perl_gv_stashsvpvn_cached(pTHX_ SV *namesv, const char* name, U32 namelen, I32 flags)
+                       __attribute__visibility__("hidden");
+
 #endif
 #if defined(PERL_IN_HV_C)
 STATIC void    S_clear_placeholders(pTHX_ HV *hv, U32 items);
@@ -4958,14 +5606,11 @@ STATIC void     S_hsplit(pTHX_ HV *hv, STRLEN const oldsize, STRLEN newsize);
 STATIC struct xpvhv_aux*       S_hv_auxinit(pTHX_ HV *hv);
 #define PERL_ARGS_ASSERT_HV_AUXINIT    \
        assert(hv)
-STATIC struct xpvhv_aux*       S_hv_auxinit_internal(struct xpvhv_aux *iter);
-#define PERL_ARGS_ASSERT_HV_AUXINIT_INTERNAL   \
-       assert(iter)
 STATIC SV*     S_hv_delete_common(pTHX_ HV *hv, SV *keysv, const char *key, STRLEN klen, int k_flags, I32 d_flags, U32 hash);
 #define PERL_ARGS_ASSERT_HV_DELETE_COMMON
-STATIC SV*     S_hv_free_ent_ret(pTHX_ HV *hv, HE *entry);
+STATIC SV*     S_hv_free_ent_ret(pTHX_ HE *entry);
 #define PERL_ARGS_ASSERT_HV_FREE_ENT_RET       \
-       assert(hv); assert(entry)
+       assert(entry)
 STATIC void    S_hv_free_entries(pTHX_ HV *hv);
 #define PERL_ARGS_ASSERT_HV_FREE_ENTRIES       \
        assert(hv)
@@ -4977,14 +5622,6 @@ PERL_STATIC_NO_RET void  S_hv_notallowed(pTHX_ int flags, const char *key, I32 kl
 #define PERL_ARGS_ASSERT_HV_NOTALLOWED \
        assert(key); assert(msg)
 
-STATIC HE*     S_new_he(pTHX)
-                       __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT_NEW_HE
-
-#ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE U32 S_ptr_hash(PTRV u);
-#define PERL_ARGS_ASSERT_PTR_HASH
-#endif
 STATIC SV *    S_refcounted_he_value(pTHX_ const struct refcounted_he *he);
 #define PERL_ARGS_ASSERT_REFCOUNTED_HE_VALUE   \
        assert(he)
@@ -5003,26 +5640,41 @@ STATIC void     S_unshare_hek_or_pvn(pTHX_ const HEK* hek, const char* str, I32 len,
 #define PERL_ARGS_ASSERT_UNSHARE_HEK_OR_PVN
 #endif
 #if defined(PERL_IN_HV_C) || defined(PERL_IN_MG_C) || defined(PERL_IN_SV_C)
-PERL_CALLCONV void     Perl_sv_kill_backrefs(pTHX_ SV *const sv, AV *const av);
+PERL_CALLCONV void     Perl_sv_kill_backrefs(pTHX_ SV *const sv, AV *const av)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_SV_KILL_BACKREFS      \
        assert(sv)
+
 #endif
 #if defined(PERL_IN_HV_C) || defined(PERL_IN_SV_C)
-PERL_CALLCONV SV*      Perl_hfree_next_entry(pTHX_ HV *hv, STRLEN *indexp);
+PERL_CALLCONV SV*      Perl_hfree_next_entry(pTHX_ HV *hv, STRLEN *indexp)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_HFREE_NEXT_ENTRY      \
        assert(hv); assert(indexp)
+
 #endif
 #if defined(PERL_IN_LOCALE_C)
 #ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE const char *        S_save_to_buffer(const char * string, char **buf, Size_t *buf_size, const Size_t offset)
+PERL_STATIC_INLINE const char *        S_mortalized_pv_copy(pTHX_ const char * const pv)
                        __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT_SAVE_TO_BUFFER        \
-       assert(buf_size)
+#define PERL_ARGS_ASSERT_MORTALIZED_PV_COPY
 #endif
 
 #  if defined(USE_LOCALE)
 STATIC const char*     S_category_name(const int category);
 #define PERL_ARGS_ASSERT_CATEGORY_NAME
+STATIC unsigned int    S_get_category_index(const int category, const char * locale);
+#define PERL_ARGS_ASSERT_GET_CATEGORY_INDEX
+STATIC utf8ness_t      S_get_locale_string_utf8ness_i(pTHX_ const char * locale, const unsigned cat_index, const char * string, const locale_utf8ness_t known_utf8);
+#define PERL_ARGS_ASSERT_GET_LOCALE_STRING_UTF8NESS_I
+STATIC bool    S_is_codeset_name_UTF8(const char * name);
+#define PERL_ARGS_ASSERT_IS_CODESET_NAME_UTF8  \
+       assert(name)
+STATIC bool    S_is_locale_utf8(pTHX_ const char * locale);
+#define PERL_ARGS_ASSERT_IS_LOCALE_UTF8        \
+       assert(locale)
+STATIC void    S_new_LC_ALL(pTHX_ const char* unused);
+#define PERL_ARGS_ASSERT_NEW_LC_ALL
 STATIC void    S_new_collate(pTHX_ const char* newcoll);
 #define PERL_ARGS_ASSERT_NEW_COLLATE
 STATIC void    S_new_ctype(pTHX_ const char* newctype);
@@ -5032,18 +5684,44 @@ STATIC void     S_new_numeric(pTHX_ const char* newnum);
 #define PERL_ARGS_ASSERT_NEW_NUMERIC
 STATIC void    S_restore_switched_locale(pTHX_ const int category, const char * const original_locale);
 #define PERL_ARGS_ASSERT_RESTORE_SWITCHED_LOCALE
+STATIC void    S_restore_toggled_locale_i(pTHX_ const unsigned cat_index, const char * original_locale, const line_t caller_line);
+#define PERL_ARGS_ASSERT_RESTORE_TOGGLED_LOCALE_I
+STATIC const char *    S_save_to_buffer(const char * string, const char **buf, Size_t *buf_size);
+#define PERL_ARGS_ASSERT_SAVE_TO_BUFFER
 STATIC void    S_set_numeric_radix(pTHX_ const bool use_locale);
 #define PERL_ARGS_ASSERT_SET_NUMERIC_RADIX
-STATIC char*   S_stdize_locale(pTHX_ char* locs);
-#define PERL_ARGS_ASSERT_STDIZE_LOCALE \
-       assert(locs)
+PERL_STATIC_NO_RET void        S_setlocale_failure_panic_i(pTHX_ const unsigned int cat_index, const char * current, const char * failed, const line_t caller_0_line, const line_t caller_1_line)
+                       __attribute__noreturn__;
+#define PERL_ARGS_ASSERT_SETLOCALE_FAILURE_PANIC_I     \
+       assert(failed)
+
+STATIC const char*     S_stdize_locale(pTHX_ const int category, const char* input_locale, const char **buf, Size_t *buf_size, line_t caller_line);
+#define PERL_ARGS_ASSERT_STDIZE_LOCALE
 STATIC const char*     S_switch_category_locale_to_template(pTHX_ const int switch_category, const int template_category, const char * template_locale);
 #define PERL_ARGS_ASSERT_SWITCH_CATEGORY_LOCALE_TO_TEMPLATE
+STATIC const char *    S_toggle_locale_i(pTHX_ const unsigned switch_cat_index, const char * new_locale, const line_t caller_line);
+#define PERL_ARGS_ASSERT_TOGGLE_LOCALE_I       \
+       assert(new_locale)
 #    if defined(USE_POSIX_2008_LOCALE)
-STATIC const char*     S_emulate_setlocale(const int category, const char* locale, unsigned int index, const bool is_index_valid);
-#define PERL_ARGS_ASSERT_EMULATE_SETLOCALE
+STATIC const char*     S_emulate_setlocale_i(pTHX_ const unsigned int index, const char* new_locale, const recalc_lc_all_t recalc_LC_ALL, const line_t line);
+#define PERL_ARGS_ASSERT_EMULATE_SETLOCALE_I
+STATIC const char*     S_my_querylocale_i(pTHX_ const unsigned int index);
+#define PERL_ARGS_ASSERT_MY_QUERYLOCALE_I
+STATIC const char *    S_setlocale_from_aggregate_LC_ALL(pTHX_ const char * locale, const line_t line);
+#define PERL_ARGS_ASSERT_SETLOCALE_FROM_AGGREGATE_LC_ALL       \
+       assert(locale)
+STATIC locale_t        S_use_curlocale_scratch(pTHX);
+#define PERL_ARGS_ASSERT_USE_CURLOCALE_SCRATCH
+#      if defined(USE_QUERYLOCALE)
+STATIC const char *    S_calculate_LC_ALL(pTHX_ const locale_t cur_obj);
+#define PERL_ARGS_ASSERT_CALCULATE_LC_ALL
+#      endif
 #    endif
 #    if defined(WIN32)
+PERL_CALLCONV wchar_t *        Perl_Win_utf8_string_to_wstring(const char * utf8_string);
+#define PERL_ARGS_ASSERT_WIN_UTF8_STRING_TO_WSTRING
+PERL_CALLCONV char *   Perl_Win_wstring_to_utf8_string(const wchar_t * wstring);
+#define PERL_ARGS_ASSERT_WIN_WSTRING_TO_UTF8_STRING
 STATIC char*   S_win32_setlocale(pTHX_ int category, const char* locale);
 #define PERL_ARGS_ASSERT_WIN32_SETLOCALE
 #    endif
@@ -5051,9 +5729,11 @@ STATIC char*     S_win32_setlocale(pTHX_ int category, const char* locale);
 #endif
 #if defined(PERL_IN_LOCALE_C) || defined(PERL_IN_SV_C) || defined(PERL_IN_MATHOMS_C)
 #  if defined(USE_LOCALE_COLLATE)
-PERL_CALLCONV char*    Perl__mem_collxfrm(pTHX_ const char* input_string, STRLEN len, STRLEN* xlen, bool utf8);
+PERL_CALLCONV char*    Perl__mem_collxfrm(pTHX_ const char* input_string, STRLEN len, STRLEN* xlen, bool utf8)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT__MEM_COLLXFRM \
        assert(input_string); assert(xlen)
+
 #  endif
 #endif
 #if defined(PERL_IN_MALLOC_C)
@@ -5080,9 +5760,11 @@ STATIC void      S_unwind_handler_stack(pTHX_ const void *p);
 #define PERL_ARGS_ASSERT_UNWIND_HANDLER_STACK
 #endif
 #if defined(PERL_IN_MG_C) || defined(PERL_IN_PP_C)
-PERL_CALLCONV bool     Perl_translate_substr_offsets(STRLEN curlen, IV pos1_iv, bool pos1_is_uv, IV len_iv, bool len_is_uv, STRLEN *posp, STRLEN *lenp);
+PERL_CALLCONV bool     Perl_translate_substr_offsets(STRLEN curlen, IV pos1_iv, bool pos1_is_uv, IV len_iv, bool len_is_uv, STRLEN *posp, STRLEN *lenp)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_TRANSLATE_SUBSTR_OFFSETS      \
        assert(posp); assert(lenp)
+
 #endif
 #if defined(PERL_IN_MRO_C)
 STATIC void    S_mro_clean_isarev(pTHX_ HV * const isa, const char * const name, const STRLEN len, HV * const exceptions, U32 hash, U32 flags);
@@ -5095,6 +5777,10 @@ STATIC AV*       S_mro_get_linear_isa_dfs(pTHX_ HV* stash, U32 level);
 #define PERL_ARGS_ASSERT_MRO_GET_LINEAR_ISA_DFS        \
        assert(stash)
 #endif
+#if defined(PERL_IN_NUMERIC_C)
+STATIC void    S_output_non_portable(pTHX_ const U8 shift);
+#define PERL_ARGS_ASSERT_OUTPUT_NON_PORTABLE
+#endif
 #if defined(PERL_IN_OP_C)
 STATIC void    S_apply_attrs(pTHX_ HV *stash, SV *target, OP *attrs);
 #define PERL_ARGS_ASSERT_APPLY_ATTRS   \
@@ -5121,9 +5807,6 @@ STATIC void       S_cop_free(pTHX_ COP *cop);
 STATIC OP *    S_dup_attrlist(pTHX_ OP *o);
 #define PERL_ARGS_ASSERT_DUP_ATTRLIST  \
        assert(o)
-STATIC void    S_finalize_op(pTHX_ OP* o);
-#define PERL_ARGS_ASSERT_FINALIZE_OP   \
-       assert(o)
 STATIC void    S_find_and_forget_pmops(pTHX_ OP *o);
 #define PERL_ARGS_ASSERT_FIND_AND_FORGET_PMOPS \
        assert(o)
@@ -5170,9 +5853,6 @@ STATIC OP*        S_new_logop(pTHX_ I32 type, I32 flags, OP **firstp, OP **otherp)
 #define PERL_ARGS_ASSERT_NEW_LOGOP     \
        assert(firstp); assert(otherp)
 
-STATIC void    S_no_bareword_allowed(pTHX_ OP *o);
-#define PERL_ARGS_ASSERT_NO_BAREWORD_ALLOWED   \
-       assert(o)
 STATIC OP*     S_no_fh_allowed(pTHX_ OP *o)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_NO_FH_ALLOWED \
@@ -5188,9 +5868,6 @@ PERL_STATIC_INLINE OP*    S_op_std_init(pTHX_ OP *o);
 #define PERL_ARGS_ASSERT_OP_STD_INIT   \
        assert(o)
 #endif
-STATIC void    S_optimize_op(pTHX_ OP* o);
-#define PERL_ARGS_ASSERT_OPTIMIZE_OP   \
-       assert(o)
 STATIC OP*     S_pmtrans(pTHX_ OP* o, OP* expr, OP* repl);
 #define PERL_ARGS_ASSERT_PMTRANS       \
        assert(o); assert(expr); assert(repl)
@@ -5210,8 +5887,6 @@ STATIC OP*        S_scalarboolean(pTHX_ OP *o);
        assert(o)
 STATIC OP*     S_scalarkids(pTHX_ OP* o);
 #define PERL_ARGS_ASSERT_SCALARKIDS
-STATIC OP*     S_scalarseq(pTHX_ OP* o);
-#define PERL_ARGS_ASSERT_SCALARSEQ
 STATIC OP*     S_search_const(pTHX_ OP *o)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_SEARCH_CONST  \
@@ -5228,21 +5903,53 @@ STATIC OP*      S_too_few_arguments_pv(pTHX_ OP *o, const char* name, U32 flags)
 STATIC OP*     S_too_many_arguments_pv(pTHX_ OP *o, const char* name, U32 flags);
 #define PERL_ARGS_ASSERT_TOO_MANY_ARGUMENTS_PV \
        assert(o); assert(name)
-STATIC OP*     S_traverse_op_tree(pTHX_ OP* top, OP* o);
-#define PERL_ARGS_ASSERT_TRAVERSE_OP_TREE      \
-       assert(top); assert(o)
+STATIC OP*     S_voidnonfinal(pTHX_ OP* o);
+#define PERL_ARGS_ASSERT_VOIDNONFINAL
+#endif
+#if defined(PERL_IN_OP_C) || defined(PERL_IN_PEEP_C)
+PERL_CALLCONV void     Perl_check_hash_fields_and_hekify(pTHX_ UNOP *rop, SVOP *key_op, int real)
+                       __attribute__visibility__("hidden");
+#define PERL_ARGS_ASSERT_CHECK_HASH_FIELDS_AND_HEKIFY
+
+PERL_CALLCONV void     Perl_no_bareword_allowed(pTHX_ OP *o)
+                       __attribute__visibility__("hidden");
+#define PERL_ARGS_ASSERT_NO_BAREWORD_ALLOWED   \
+       assert(o)
+
+PERL_CALLCONV void     Perl_op_prune_chain_head(OP **op_p)
+                       __attribute__visibility__("hidden");
+#define PERL_ARGS_ASSERT_OP_PRUNE_CHAIN_HEAD   \
+       assert(op_p)
+
+PERL_CALLCONV SV *     Perl_op_varname(pTHX_ const OP *o)
+                       __attribute__visibility__("hidden");
+#define PERL_ARGS_ASSERT_OP_VARNAME    \
+       assert(o)
+
+PERL_CALLCONV void     Perl_optimize_optree(pTHX_ OP* o)
+                       __attribute__visibility__("hidden");
+#define PERL_ARGS_ASSERT_OPTIMIZE_OPTREE       \
+       assert(o)
+
+PERL_CALLCONV void     Perl_warn_elem_scalar_context(pTHX_ const OP *o, SV *name, bool is_hash, bool is_slice)
+                       __attribute__visibility__("hidden");
+#define PERL_ARGS_ASSERT_WARN_ELEM_SCALAR_CONTEXT      \
+       assert(o); assert(name)
+
 #  if defined(USE_ITHREADS)
-#ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE void        S_op_relocate_sv(pTHX_ SV** svp, PADOFFSET* targp);
+PERL_CALLCONV void     Perl_op_relocate_sv(pTHX_ SV** svp, PADOFFSET* targp)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_OP_RELOCATE_SV        \
        assert(svp); assert(targp)
-#endif
+
 #  endif
 #endif
 #if defined(PERL_IN_OP_C) || defined(PERL_IN_SV_C)
-PERL_CALLCONV void     Perl_report_redefined_cv(pTHX_ const SV *name, const CV *old_cv, SV * const *new_const_svp);
+PERL_CALLCONV void     Perl_report_redefined_cv(pTHX_ const SV *name, const CV *old_cv, SV * const *new_const_svp)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_REPORT_REDEFINED_CV   \
        assert(name); assert(old_cv)
+
 #endif
 #if defined(PERL_IN_PAD_C)
 STATIC PADOFFSET       S_pad_alloc_name(pTHX_ PADNAME *name, U32 flags, HV *typestash, HV *ourstash);
@@ -5264,11 +5971,24 @@ PERL_STATIC_INLINE bool S_PadnameIN_SCOPE(const PADNAME * const pn, const U32 se
        assert(pn)
 #endif
 #endif
+#if defined(PERL_IN_PEEP_C)
+STATIC void    S_finalize_op(pTHX_ OP* o);
+#define PERL_ARGS_ASSERT_FINALIZE_OP   \
+       assert(o)
+STATIC void    S_optimize_op(pTHX_ OP* o);
+#define PERL_ARGS_ASSERT_OPTIMIZE_OP   \
+       assert(o)
+STATIC OP*     S_traverse_op_tree(pTHX_ OP* top, OP* o);
+#define PERL_ARGS_ASSERT_TRAVERSE_OP_TREE      \
+       assert(top); assert(o)
+#endif
 #if defined(PERL_IN_PERLY_C) || defined(PERL_IN_OP_C) || defined(PERL_IN_TOKE_C)
 #ifndef NO_MATHOMS
-PERL_CALLCONV OP*      Perl_ref(pTHX_ OP* o, I32 type);
+PERL_CALLCONV OP*      Perl_ref(pTHX_ OP* o, I32 type)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_REF
 #endif
+
 #endif
 #if defined(PERL_IN_PERL_C)
 STATIC void    S_find_beginning(pTHX_ SV* linestr_sv, PerlIO *rsfp);
@@ -5348,13 +6068,6 @@ PERL_CALLCONV GV*        Perl_softref2xv(pTHX_ SV *const sv, const char *const what, co
        assert(sv); assert(what); assert(spp)
 
 #endif
-#if defined(PERL_IN_PP_C) || defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_TOKE_C) || defined(PERL_IN_UNIVERSAL_C)
-#ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE const char *        S_get_regex_charset_name(const U32 flags, STRLEN* const lenp);
-#define PERL_ARGS_ASSERT_GET_REGEX_CHARSET_NAME        \
-       assert(lenp)
-#endif
-#endif
 #if defined(PERL_IN_PP_CTL_C)
 STATIC PerlIO *        S_check_type_and_open(pTHX_ SV *name)
                        __attribute__warn_unused_result__;
@@ -5451,6 +6164,14 @@ PERL_STATIC_INLINE HV*   S_opmethod_stash(pTHX_ SV* meth);
 #define PERL_ARGS_ASSERT_OPMETHOD_STASH        \
        assert(meth)
 #endif
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_FORCE_INLINE bool  S_should_we_output_Debug_r(pTHX_ regexp * prog)
+                       __attribute__warn_unused_result__
+                       __attribute__always_inline__;
+#define PERL_ARGS_ASSERT_SHOULD_WE_OUTPUT_DEBUG_R      \
+       assert(prog)
+#endif
+
 #endif
 #if defined(PERL_IN_PP_PACK_C)
 STATIC int     S_div128(pTHX_ SV *pnum, bool *done);
@@ -5502,15 +6223,55 @@ STATIC SSize_t  S_unpack_rec(pTHX_ struct tempsym* symptr, const char *s, const c
        assert(symptr); assert(s); assert(strbeg); assert(strend)
 #endif
 #if defined(PERL_IN_PP_SORT_C)
-STATIC I32     S_amagic_cmp(pTHX_ SV *const str1, SV *const str2);
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_FORCE_INLINE I32   S_amagic_cmp(pTHX_ SV *const str1, SV *const str2)
+                       __attribute__always_inline__;
 #define PERL_ARGS_ASSERT_AMAGIC_CMP    \
        assert(str1); assert(str2)
-STATIC I32     S_amagic_i_ncmp(pTHX_ SV *const a, SV *const b);
+#endif
+
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_FORCE_INLINE I32   S_amagic_cmp_desc(pTHX_ SV *const str1, SV *const str2)
+                       __attribute__always_inline__;
+#define PERL_ARGS_ASSERT_AMAGIC_CMP_DESC       \
+       assert(str1); assert(str2)
+#endif
+
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_FORCE_INLINE I32   S_amagic_i_ncmp(pTHX_ SV *const a, SV *const b)
+                       __attribute__always_inline__;
 #define PERL_ARGS_ASSERT_AMAGIC_I_NCMP \
        assert(a); assert(b)
-STATIC I32     S_amagic_ncmp(pTHX_ SV *const a, SV *const b);
+#endif
+
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_FORCE_INLINE I32   S_amagic_i_ncmp_desc(pTHX_ SV *const a, SV *const b)
+                       __attribute__always_inline__;
+#define PERL_ARGS_ASSERT_AMAGIC_I_NCMP_DESC    \
+       assert(a); assert(b)
+#endif
+
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_FORCE_INLINE I32   S_amagic_ncmp(pTHX_ SV *const a, SV *const b)
+                       __attribute__always_inline__;
 #define PERL_ARGS_ASSERT_AMAGIC_NCMP   \
        assert(a); assert(b)
+#endif
+
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_FORCE_INLINE I32   S_amagic_ncmp_desc(pTHX_ SV *const a, SV *const b)
+                       __attribute__always_inline__;
+#define PERL_ARGS_ASSERT_AMAGIC_NCMP_DESC      \
+       assert(a); assert(b)
+#endif
+
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_FORCE_INLINE I32   S_cmp_desc(pTHX_ SV *const str1, SV *const str2)
+                       __attribute__always_inline__;
+#define PERL_ARGS_ASSERT_CMP_DESC      \
+       assert(str1); assert(str2)
+#endif
+
 STATIC I32     S_sortcv(pTHX_ SV *const a, SV *const b);
 #define PERL_ARGS_ASSERT_SORTCV        \
        assert(a); assert(b)
@@ -5520,16 +6281,63 @@ STATIC I32      S_sortcv_stacked(pTHX_ SV *const a, SV *const b);
 STATIC I32     S_sortcv_xsub(pTHX_ SV *const a, SV *const b);
 #define PERL_ARGS_ASSERT_SORTCV_XSUB   \
        assert(a); assert(b)
-STATIC I32     S_sv_i_ncmp(pTHX_ SV *const a, SV *const b);
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_FORCE_INLINE void  S_sortsv_flags_impl(pTHX_ SV** array, size_t num_elts, SVCOMPARE_t cmp, U32 flags)
+                       __attribute__always_inline__;
+#define PERL_ARGS_ASSERT_SORTSV_FLAGS_IMPL     \
+       assert(cmp)
+#endif
+
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_FORCE_INLINE I32   S_sv_i_ncmp(pTHX_ SV *const a, SV *const b)
+                       __attribute__always_inline__;
 #define PERL_ARGS_ASSERT_SV_I_NCMP     \
        assert(a); assert(b)
-STATIC I32     S_sv_ncmp(pTHX_ SV *const a, SV *const b);
+#endif
+
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_FORCE_INLINE I32   S_sv_i_ncmp_desc(pTHX_ SV *const a, SV *const b)
+                       __attribute__always_inline__;
+#define PERL_ARGS_ASSERT_SV_I_NCMP_DESC        \
+       assert(a); assert(b)
+#endif
+
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_FORCE_INLINE I32   S_sv_ncmp(pTHX_ SV *const a, SV *const b)
+                       __attribute__always_inline__;
 #define PERL_ARGS_ASSERT_SV_NCMP       \
        assert(a); assert(b)
+#endif
+
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_FORCE_INLINE I32   S_sv_ncmp_desc(pTHX_ SV *const a, SV *const b)
+                       __attribute__always_inline__;
+#define PERL_ARGS_ASSERT_SV_NCMP_DESC  \
+       assert(a); assert(b)
+#endif
+
 #  if defined(USE_LOCALE_COLLATE)
-STATIC I32     S_amagic_cmp_locale(pTHX_ SV *const str1, SV *const str2);
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_FORCE_INLINE I32   S_amagic_cmp_locale(pTHX_ SV *const str1, SV *const str2)
+                       __attribute__always_inline__;
 #define PERL_ARGS_ASSERT_AMAGIC_CMP_LOCALE     \
        assert(str1); assert(str2)
+#endif
+
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_FORCE_INLINE I32   S_amagic_cmp_locale_desc(pTHX_ SV *const str1, SV *const str2)
+                       __attribute__always_inline__;
+#define PERL_ARGS_ASSERT_AMAGIC_CMP_LOCALE_DESC        \
+       assert(str1); assert(str2)
+#endif
+
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_FORCE_INLINE I32   S_cmp_locale_desc(pTHX_ SV *const str1, SV *const str2)
+                       __attribute__always_inline__;
+#define PERL_ARGS_ASSERT_CMP_LOCALE_DESC       \
+       assert(str1); assert(str2)
+#endif
+
 #  endif
 #endif
 #if defined(PERL_IN_PP_SYS_C)
@@ -5554,15 +6362,14 @@ STATIC AV*      S_add_multi_match(pTHX_ AV* multi_char_matches, SV* multi_string, con
 STATIC void    S_change_engine_size(pTHX_ RExC_state_t *pRExC_state, const Ptrdiff_t size);
 #define PERL_ARGS_ASSERT_CHANGE_ENGINE_SIZE    \
        assert(pRExC_state)
-STATIC const char *    S_cntrl_to_mnemonic(const U8 c)
+STATIC REGEXP* S_compile_wildcard(pTHX_ const char * subpattern, const STRLEN len, const bool ignore_case)
                        __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT_CNTRL_TO_MNEMONIC
+#define PERL_ARGS_ASSERT_COMPILE_WILDCARD      \
+       assert(subpattern)
 
-#ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE U8  S_compute_EXACTish(RExC_state_t *pRExC_state);
+STATIC U8      S_compute_EXACTish(RExC_state_t *pRExC_state);
 #define PERL_ARGS_ASSERT_COMPUTE_EXACTISH      \
        assert(pRExC_state)
-#endif
 STATIC regnode *       S_construct_ahocorasick_from_trie(pTHX_ RExC_state_t *pRExC_state, regnode *source, U32 depth);
 #define PERL_ARGS_ASSERT_CONSTRUCT_AHOCORASICK_FROM_TRIE       \
        assert(pRExC_state); assert(source)
@@ -5571,11 +6378,19 @@ STATIC int      S_edit_distance(const UV *src, const UV *tgt, const STRLEN x, const S
 #define PERL_ARGS_ASSERT_EDIT_DISTANCE \
        assert(src); assert(tgt)
 
+STATIC I32     S_execute_wildcard(pTHX_ REGEXP * const prog, char* stringarg, char* strend, char* strbeg, SSize_t minend, SV* screamer, U32 nosave);
+#define PERL_ARGS_ASSERT_EXECUTE_WILDCARD      \
+       assert(prog); assert(stringarg); assert(strend); assert(strbeg); assert(screamer)
 #ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE Size_t      S_find_first_differing_byte_pos(const U8 * s1, const U8 * s2, const Size_t max);
 #define PERL_ARGS_ASSERT_FIND_FIRST_DIFFERING_BYTE_POS \
        assert(s1); assert(s2)
 #endif
+STATIC SV *    S_get_ANYOFHbbm_contents(pTHX_ const regnode * n)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_GET_ANYOFHBBM_CONTENTS        \
+       assert(n)
+
 STATIC SV *    S_get_ANYOFM_contents(pTHX_ const regnode * n)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_GET_ANYOFM_CONTENTS   \
@@ -5584,21 +6399,25 @@ STATIC SV *     S_get_ANYOFM_contents(pTHX_ const regnode * n)
 STATIC SV*     S_get_ANYOF_cp_list_for_ssc(pTHX_ const RExC_state_t *pRExC_state, const regnode_charclass* const node);
 #define PERL_ARGS_ASSERT_GET_ANYOF_CP_LIST_FOR_SSC     \
        assert(pRExC_state); assert(node)
+STATIC U32     S_get_quantifier_value(pTHX_ RExC_state_t *pRExC_state, const char * start, const char * end);
+#define PERL_ARGS_ASSERT_GET_QUANTIFIER_VALUE  \
+       assert(pRExC_state); assert(start); assert(end)
 STATIC bool    S_grok_bslash_N(pTHX_ RExC_state_t *pRExC_state, regnode_offset* nodep, UV *code_point_p, int* cp_count, I32 *flagp, const bool strict, const U32 depth);
 #define PERL_ARGS_ASSERT_GROK_BSLASH_N \
        assert(pRExC_state); assert(flagp)
-#ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE regnode_offset      S_handle_named_backref(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, char * parse_start, char ch);
+STATIC regnode_offset  S_handle_named_backref(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, char * backref_parse_start, char ch);
 #define PERL_ARGS_ASSERT_HANDLE_NAMED_BACKREF  \
-       assert(pRExC_state); assert(flagp); assert(parse_start)
-#endif
+       assert(pRExC_state); assert(flagp); assert(backref_parse_start)
+STATIC bool    S_handle_names_wildcard(pTHX_ const char * wname, const STRLEN wname_len, SV ** prop_definition, AV ** strings);
+#define PERL_ARGS_ASSERT_HANDLE_NAMES_WILDCARD \
+       assert(wname); assert(prop_definition); assert(strings)
 STATIC int     S_handle_possible_posix(pTHX_ RExC_state_t *pRExC_state, const char* const s, char ** updated_parse_ptr, AV** posix_warnings, const bool check_only);
 #define PERL_ARGS_ASSERT_HANDLE_POSSIBLE_POSIX \
        assert(pRExC_state); assert(s)
-STATIC regnode_offset  S_handle_regex_sets(pTHX_ RExC_state_t *pRExC_state, SV ** return_invlist, I32 *flagp, U32 depth, char * const oregcomp_parse);
+STATIC regnode_offset  S_handle_regex_sets(pTHX_ RExC_state_t *pRExC_state, SV ** return_invlist, I32 *flagp, U32 depth);
 #define PERL_ARGS_ASSERT_HANDLE_REGEX_SETS     \
-       assert(pRExC_state); assert(flagp); assert(oregcomp_parse)
-PERL_CALLCONV SV *     Perl_handle_user_defined_property(pTHX_ const char * name, const STRLEN name_len, const bool is_utf8, const bool to_fold, const bool runtime, const bool deferrable, SV* contents, bool *user_defined_ptr, SV * msg, const STRLEN level);
+       assert(pRExC_state); assert(flagp)
+STATIC SV *    S_handle_user_defined_property(pTHX_ const char * name, const STRLEN name_len, const bool is_utf8, const bool to_fold, const bool runtime, const bool deferrable, SV* contents, bool *user_defined_ptr, SV * msg, const STRLEN level);
 #define PERL_ARGS_ASSERT_HANDLE_USER_DEFINED_PROPERTY  \
        assert(name); assert(contents); assert(user_defined_ptr); assert(msg)
 #ifndef PERL_NO_INLINE_FUNCTIONS
@@ -5609,7 +6428,14 @@ PERL_STATIC_INLINE SV*   S_invlist_contents(pTHX_ SV* const invlist, const bool tr
 #endif
 
 #ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE bool        S_invlist_is_iterating(SV* const invlist)
+PERL_STATIC_INLINE UV  S_invlist_highest_range_start(SV* const invlist)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_INVLIST_HIGHEST_RANGE_START   \
+       assert(invlist)
+#endif
+
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE bool        S_invlist_is_iterating(const SV* const invlist)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_INVLIST_IS_ITERATING  \
        assert(invlist)
@@ -5636,30 +6462,38 @@ STATIC SV*      S_make_exactf_invlist(pTHX_ RExC_state_t *pRExC_state, regnode *node)
 STATIC I32     S_make_trie(pTHX_ RExC_state_t *pRExC_state, regnode *startbranch, regnode *first, regnode *last, regnode *tail, U32 word_count, U32 flags, U32 depth);
 #define PERL_ARGS_ASSERT_MAKE_TRIE     \
        assert(pRExC_state); assert(startbranch); assert(first); assert(last); assert(tail)
-STATIC bool    S_new_regcurly(const char *s, const char *e)
-                       __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT_NEW_REGCURLY  \
-       assert(s); assert(e)
-
 STATIC void    S_nextchar(pTHX_ RExC_state_t *pRExC_state);
 #define PERL_ARGS_ASSERT_NEXTCHAR      \
        assert(pRExC_state)
+STATIC U8      S_optimize_regclass(pTHX_ RExC_state_t *pRExC_state, SV* cp_list, SV* only_utf8_locale_list, SV* upper_latin1_only_utf8_matches, const U32 has_runtime_dependency, const U32 posixl, U8 * anyof_flags, bool * invert, regnode_offset * ret, I32 *flagp);
+#define PERL_ARGS_ASSERT_OPTIMIZE_REGCLASS     \
+       assert(pRExC_state); assert(anyof_flags); assert(invert); assert(ret); assert(flagp)
 STATIC void    S_output_posix_warnings(pTHX_ RExC_state_t *pRExC_state, AV* posix_warnings);
 #define PERL_ARGS_ASSERT_OUTPUT_POSIX_WARNINGS \
        assert(pRExC_state); assert(posix_warnings)
 STATIC void    S_parse_lparen_question_flags(pTHX_ RExC_state_t *pRExC_state);
 #define PERL_ARGS_ASSERT_PARSE_LPAREN_QUESTION_FLAGS   \
        assert(pRExC_state)
-PERL_CALLCONV SV *     Perl_parse_uniprop_string(pTHX_ const char * const name, Size_t name_len, const bool is_utf8, const bool to_fold, const bool runtime, const bool deferrable, bool * user_defined_ptr, SV * msg, const STRLEN level);
+STATIC SV *    S_parse_uniprop_string(pTHX_ const char * const name, Size_t name_len, const bool is_utf8, const bool to_fold, const bool runtime, const bool deferrable, AV ** strings, bool * user_defined_ptr, SV * msg, const STRLEN level);
 #define PERL_ARGS_ASSERT_PARSE_UNIPROP_STRING  \
        assert(name); assert(user_defined_ptr); assert(msg)
-STATIC void    S_populate_ANYOF_from_invlist(pTHX_ regnode *node, SV** invlist_ptr);
-#define PERL_ARGS_ASSERT_POPULATE_ANYOF_FROM_INVLIST   \
+STATIC void    S_populate_anyof_bitmap_from_invlist(pTHX_ regnode *node, SV** invlist_ptr);
+#define PERL_ARGS_ASSERT_POPULATE_ANYOF_BITMAP_FROM_INVLIST    \
        assert(node); assert(invlist_ptr)
-PERL_STATIC_NO_RET void        S_re_croak2(pTHX_ bool utf8, const char* pat1, const char* pat2, ...)
-                       __attribute__noreturn__;
-#define PERL_ARGS_ASSERT_RE_CROAK2     \
-       assert(pat1); assert(pat2)
+STATIC void    S_populate_bitmap_from_invlist(pTHX_ SV * invlist, const UV offset, const U8 * bitmap, const Size_t len);
+#define PERL_ARGS_ASSERT_POPULATE_BITMAP_FROM_INVLIST  \
+       assert(invlist); assert(bitmap)
+STATIC void    S_populate_invlist_from_bitmap(pTHX_ const U8 * bitmap, const Size_t bitmap_len, SV ** invlist, const UV offset);
+#define PERL_ARGS_ASSERT_POPULATE_INVLIST_FROM_BITMAP  \
+       assert(bitmap); assert(invlist)
+STATIC void    S_rck_elide_nothing(pTHX_ regnode *node);
+#define PERL_ARGS_ASSERT_RCK_ELIDE_NOTHING     \
+       assert(node)
+PERL_STATIC_NO_RET void        S_re_croak(pTHX_ bool utf8, const char* pat, ...)
+                       __attribute__noreturn__
+                       __attribute__format__(__printf__,pTHX_2,pTHX_3);
+#define PERL_ARGS_ASSERT_RE_CROAK      \
+       assert(pat)
 
 STATIC regnode_offset  S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth);
 #define PERL_ARGS_ASSERT_REG   \
@@ -5667,6 +6501,12 @@ STATIC regnode_offset    S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *fla
 STATIC regnode_offset  S_reg2Lanode(pTHX_ RExC_state_t *pRExC_state, const U8 op, const U32 arg1, const I32 arg2);
 #define PERL_ARGS_ASSERT_REG2LANODE    \
        assert(pRExC_state)
+STATIC regnode_offset  S_reg_la_NOTHING(pTHX_ RExC_state_t *pRExC_state, U32 flags, const char *type);
+#define PERL_ARGS_ASSERT_REG_LA_NOTHING        \
+       assert(pRExC_state); assert(type)
+STATIC regnode_offset  S_reg_la_OPFAIL(pTHX_ RExC_state_t *pRExC_state, U32 flags, const char *type);
+#define PERL_ARGS_ASSERT_REG_LA_OPFAIL \
+       assert(pRExC_state); assert(type)
 STATIC regnode_offset  S_reg_node(pTHX_ RExC_state_t *pRExC_state, U8 op);
 #define PERL_ARGS_ASSERT_REG_NODE      \
        assert(pRExC_state)
@@ -5697,12 +6537,15 @@ STATIC unsigned int     S_regex_set_precedence(const U8 my_operator)
 STATIC void    S_reginsert(pTHX_ RExC_state_t *pRExC_state, const U8 op, const regnode_offset operand, const U32 depth);
 #define PERL_ARGS_ASSERT_REGINSERT     \
        assert(pRExC_state)
-STATIC regnode_offset  S_regnode_guts(pTHX_ RExC_state_t *pRExC_state, const U8 op, const STRLEN extra_len, const char* const name);
+STATIC regnode_offset  S_regnode_guts(pTHX_ RExC_state_t *pRExC_state, const STRLEN extra_len);
 #define PERL_ARGS_ASSERT_REGNODE_GUTS  \
-       assert(pRExC_state); assert(name)
+       assert(pRExC_state)
 STATIC regnode_offset  S_regpiece(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth);
 #define PERL_ARGS_ASSERT_REGPIECE      \
        assert(pRExC_state); assert(flagp)
+STATIC regnode_offset  S_regpnode(pTHX_ RExC_state_t *pRExC_state, U8 op, SV * arg);
+#define PERL_ARGS_ASSERT_REGPNODE      \
+       assert(pRExC_state); assert(arg)
 STATIC bool    S_regtail(pTHX_ RExC_state_t * pRExC_state, const regnode_offset p, const regnode_offset val, const U32 depth)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_REGTAIL       \
@@ -5720,38 +6563,30 @@ STATIC void     S_set_regex_pv(pTHX_ RExC_state_t *pRExC_state, REGEXP *Rx);
 STATIC void    S_skip_to_be_ignored_text(pTHX_ RExC_state_t *pRExC_state, char ** p, const bool force_to_xmod);
 #define PERL_ARGS_ASSERT_SKIP_TO_BE_IGNORED_TEXT       \
        assert(pRExC_state); assert(p)
-#ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE void        S_ssc_add_range(pTHX_ regnode_ssc *ssc, UV const start, UV const end);
+STATIC void    S_ssc_add_range(pTHX_ regnode_ssc *ssc, UV const start, UV const end);
 #define PERL_ARGS_ASSERT_SSC_ADD_RANGE \
        assert(ssc)
-#endif
 STATIC void    S_ssc_and(pTHX_ const RExC_state_t *pRExC_state, regnode_ssc *ssc, const regnode_charclass *and_with);
 #define PERL_ARGS_ASSERT_SSC_AND       \
        assert(pRExC_state); assert(ssc); assert(and_with)
 STATIC void    S_ssc_anything(pTHX_ regnode_ssc *ssc);
 #define PERL_ARGS_ASSERT_SSC_ANYTHING  \
        assert(ssc)
-#ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE void        S_ssc_clear_locale(regnode_ssc *ssc);
+STATIC void    S_ssc_clear_locale(regnode_ssc *ssc);
 #define PERL_ARGS_ASSERT_SSC_CLEAR_LOCALE      \
        assert(ssc)
-#endif
-#ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE void        S_ssc_cp_and(pTHX_ regnode_ssc *ssc, UV const cp);
+STATIC void    S_ssc_cp_and(pTHX_ regnode_ssc *ssc, UV const cp);
 #define PERL_ARGS_ASSERT_SSC_CP_AND    \
        assert(ssc)
-#endif
 STATIC void    S_ssc_finalize(pTHX_ RExC_state_t *pRExC_state, regnode_ssc *ssc);
 #define PERL_ARGS_ASSERT_SSC_FINALIZE  \
        assert(pRExC_state); assert(ssc)
 STATIC void    S_ssc_init(pTHX_ const RExC_state_t *pRExC_state, regnode_ssc *ssc);
 #define PERL_ARGS_ASSERT_SSC_INIT      \
        assert(pRExC_state); assert(ssc)
-#ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE void        S_ssc_intersection(pTHX_ regnode_ssc *ssc, SV* const invlist, const bool invert_2nd);
+STATIC void    S_ssc_intersection(pTHX_ regnode_ssc *ssc, SV* const invlist, const bool invert_2nd);
 #define PERL_ARGS_ASSERT_SSC_INTERSECTION      \
        assert(ssc); assert(invlist)
-#endif
 STATIC int     S_ssc_is_anything(const regnode_ssc *ssc)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_SSC_IS_ANYTHING       \
@@ -5765,12 +6600,10 @@ STATIC int      S_ssc_is_cp_posixl_init(const RExC_state_t *pRExC_state, const regnod
 STATIC void    S_ssc_or(pTHX_ const RExC_state_t *pRExC_state, regnode_ssc *ssc, const regnode_charclass *or_with);
 #define PERL_ARGS_ASSERT_SSC_OR        \
        assert(pRExC_state); assert(ssc); assert(or_with)
-#ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE void        S_ssc_union(pTHX_ regnode_ssc *ssc, SV* const invlist, const bool invert_2nd);
+STATIC void    S_ssc_union(pTHX_ regnode_ssc *ssc, SV* const invlist, const bool invert_2nd);
 #define PERL_ARGS_ASSERT_SSC_UNION     \
        assert(ssc); assert(invlist)
-#endif
-STATIC SSize_t S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, SSize_t *minlenp, SSize_t *deltap, regnode *last, struct scan_data_t *data, I32 stopparen, U32 recursed_depth, regnode_ssc *and_withp, U32 flags, U32 depth);
+STATIC SSize_t S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, SSize_t *minlenp, SSize_t *deltap, regnode *last, struct scan_data_t *data, I32 stopparen, U32 recursed_depth, regnode_ssc *and_withp, U32 flags, U32 depth, bool was_mutate_ok);
 #define PERL_ARGS_ASSERT_STUDY_CHUNK   \
        assert(pRExC_state); assert(scanp); assert(minlenp); assert(deltap); assert(last)
 #endif
@@ -5779,56 +6612,114 @@ PERL_CALLCONV void     Perl__invlist_dump(pTHX_ PerlIO *file, I32 level, const char*
 #define PERL_ARGS_ASSERT__INVLIST_DUMP \
        assert(file); assert(indent); assert(invlist)
 #endif
-#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_OP_C)
+#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_DOOP_C) || defined(PERL_IN_OP_C)
 #ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE STRLEN*     S_get_invlist_iter_addr(SV* invlist)
+PERL_STATIC_INLINE SV* S_add_cp_to_invlist(pTHX_ SV* invlist, const UV cp)
                        __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT_GET_INVLIST_ITER_ADDR \
-       assert(invlist)
+#define PERL_ARGS_ASSERT_ADD_CP_TO_INVLIST
 #endif
 
 #ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE void        S_invlist_iterfinish(SV* invlist);
-#define PERL_ARGS_ASSERT_INVLIST_ITERFINISH    \
+PERL_STATIC_INLINE void        S_invlist_extend(pTHX_ SV* const invlist, const UV len);
+#define PERL_ARGS_ASSERT_INVLIST_EXTEND        \
        assert(invlist)
 #endif
 #ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE void        S_invlist_iterinit(SV* invlist);
-#define PERL_ARGS_ASSERT_INVLIST_ITERINIT      \
+PERL_STATIC_INLINE UV  S_invlist_highest(SV* const invlist)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_INVLIST_HIGHEST       \
        assert(invlist)
 #endif
+
 #ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE bool        S_invlist_iternext(SV* invlist, UV* start, UV* end)
+PERL_STATIC_INLINE void        S_invlist_set_len(pTHX_ SV* const invlist, const UV len, const bool offset);
+#define PERL_ARGS_ASSERT_INVLIST_SET_LEN       \
+       assert(invlist)
+#endif
+#endif
+#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_DOOP_C) || defined(PERL_IN_OP_C) || defined(PERL_IN_UTF8_C)
+PERL_CALLCONV SV*      Perl__add_range_to_invlist(pTHX_ SV* invlist, UV start, UV end)
                        __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT_INVLIST_ITERNEXT      \
-       assert(invlist); assert(start); assert(end)
+#define PERL_ARGS_ASSERT__ADD_RANGE_TO_INVLIST
+
+/* PERL_CALLCONV void  _invlist_intersection(pTHX_ SV* const a, SV* const b, SV** i); */
+#define PERL_ARGS_ASSERT__INVLIST_INTERSECTION
+PERL_CALLCONV void     Perl__invlist_intersection_maybe_complement_2nd(pTHX_ SV* const a, SV* const b, const bool complement_b, SV** i);
+#define PERL_ARGS_ASSERT__INVLIST_INTERSECTION_MAYBE_COMPLEMENT_2ND    \
+       assert(b); assert(i)
+PERL_CALLCONV void     Perl__invlist_invert(pTHX_ SV* const invlist);
+#define PERL_ARGS_ASSERT__INVLIST_INVERT       \
+       assert(invlist)
+/* PERL_CALLCONV void  _invlist_subtract(pTHX_ SV* const a, SV* const b, SV** result); */
+#define PERL_ARGS_ASSERT__INVLIST_SUBTRACT
+/* PERL_CALLCONV void  _invlist_union(pTHX_ SV* const a, SV* const b, SV** output); */
+#define PERL_ARGS_ASSERT__INVLIST_UNION
+PERL_CALLCONV void     Perl__invlist_union_maybe_complement_2nd(pTHX_ SV* const a, SV* const b, const bool complement_b, SV** output);
+#define PERL_ARGS_ASSERT__INVLIST_UNION_MAYBE_COMPLEMENT_2ND   \
+       assert(b); assert(output)
+PERL_CALLCONV SV*      Perl__new_invlist(pTHX_ IV initial_size)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT__NEW_INVLIST
+
+PERL_CALLCONV SV*      Perl__setup_canned_invlist(pTHX_ const STRLEN size, const UV element0, UV** other_elements_ptr)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT__SETUP_CANNED_INVLIST \
+       assert(other_elements_ptr)
+
+#endif
+#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_DQUOTE_C) || defined(PERL_IN_TOKE_C)
+PERL_CALLCONV const char *     Perl_form_alien_digit_msg(pTHX_ const U8 which, const STRLEN valids_len, const char * const first_bad, const char * const send, const bool UTF, const bool braced)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_FORM_ALIEN_DIGIT_MSG  \
+       assert(first_bad); assert(send)
+
+PERL_CALLCONV bool     Perl_grok_bslash_c(pTHX_ const char source, U8 * result, const char** message, U32 * packed_warn)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_GROK_BSLASH_C \
+       assert(result); assert(message)
+
+PERL_CALLCONV bool     Perl_grok_bslash_o(pTHX_ char** s, const char* const send, UV* uv, const char** message, U32 * packed_warn, const bool strict, const bool allow_UV_MAX, const bool utf8)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_GROK_BSLASH_O \
+       assert(s); assert(send); assert(uv); assert(message)
+
+PERL_CALLCONV bool     Perl_grok_bslash_x(pTHX_ char** s, const char* const send, UV* uv, const char** message, U32 * packed_warn, const bool strict, const bool allow_UV_MAX, const bool utf8)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_GROK_BSLASH_X \
+       assert(s); assert(send); assert(uv); assert(message)
+
 #endif
+#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_DQUOTE_C) || defined(PERL_IN_TOKE_C) || defined(PERL_IN_UTF8_C)
+PERL_CALLCONV const char *     Perl_form_cp_too_large_msg(pTHX_ const U8 which, const char * string, const Size_t len, const UV cp)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_FORM_CP_TOO_LARGE_MSG
 
 #endif
-#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_OP_C) || defined(PERL_IN_DOOP_C)
+#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_OP_C)
 #ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE SV* S_add_cp_to_invlist(pTHX_ SV* invlist, const UV cp)
+PERL_STATIC_INLINE STRLEN*     S_get_invlist_iter_addr(SV* invlist)
                        __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT_ADD_CP_TO_INVLIST
+#define PERL_ARGS_ASSERT_GET_INVLIST_ITER_ADDR \
+       assert(invlist)
 #endif
 
 #ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE void        S_invlist_extend(pTHX_ SV* const invlist, const UV len);
-#define PERL_ARGS_ASSERT_INVLIST_EXTEND        \
+PERL_STATIC_INLINE void        S_invlist_iterfinish(SV* invlist);
+#define PERL_ARGS_ASSERT_INVLIST_ITERFINISH    \
        assert(invlist)
 #endif
 #ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE UV  S_invlist_highest(SV* const invlist)
-                       __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT_INVLIST_HIGHEST       \
+PERL_STATIC_INLINE void        S_invlist_iterinit(SV* invlist);
+#define PERL_ARGS_ASSERT_INVLIST_ITERINIT      \
        assert(invlist)
 #endif
-
 #ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE void        S_invlist_set_len(pTHX_ SV* const invlist, const UV len, const bool offset);
-#define PERL_ARGS_ASSERT_INVLIST_SET_LEN       \
-       assert(invlist)
+PERL_STATIC_INLINE bool        S_invlist_iternext(SV* invlist, UV* start, UV* end)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_INVLIST_ITERNEXT      \
+       assert(invlist); assert(start); assert(end)
 #endif
+
 #endif
 #if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_PERL_C) || defined(PERL_IN_UTF8_C)
 PERL_CALLCONV bool     Perl__invlistEQ(pTHX_ SV* const a, SV* const b, const bool complement_b);
@@ -5840,18 +6731,45 @@ PERL_CALLCONV SV*       Perl__new_invlist_C_array(pTHX_ const UV* const list)
        assert(list)
 
 #endif
+#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_PP_C) || defined(PERL_IN_TOKE_C) || defined(PERL_IN_UNIVERSAL_C)
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE const char *        S_get_regex_charset_name(const U32 flags, STRLEN* const lenp);
+#define PERL_ARGS_ASSERT_GET_REGEX_CHARSET_NAME        \
+       assert(lenp)
+#endif
+#endif
 #if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C)
-PERL_CALLCONV SV*      Perl__get_regclass_nonbitmap_data(pTHX_ const regexp *prog, const struct regnode *node, bool doinit, SV **listsvp, SV **lonly_utf8_locale, SV **output_invlist);
-#define PERL_ARGS_ASSERT__GET_REGCLASS_NONBITMAP_DATA  \
-       assert(node)
-PERL_CALLCONV int      Perl_re_printf(pTHX_ const char *fmt, ...);
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE bool        Perl_check_regnode_after(pTHX_ const regnode* p, const STRLEN extra)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_CHECK_REGNODE_AFTER
+#endif
+
+PERL_CALLCONV int      Perl_re_printf(pTHX_ const char *fmt, ...)
+                       __attribute__visibility__("hidden")
+                       __attribute__format__(__printf__,pTHX_1,pTHX_2);
 #define PERL_ARGS_ASSERT_RE_PRINTF     \
        assert(fmt)
-PERL_CALLCONV void     Perl_regprop(pTHX_ const regexp *prog, SV* sv, const regnode* o, const regmatch_info *reginfo, const RExC_state_t *pRExC_state);
+
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE regnode*    Perl_regnext(pTHX_ const regnode* p)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_REGNEXT
+#endif
+
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE regnode*    Perl_regnode_after(pTHX_ const regnode* p, bool varies)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_REGNODE_AFTER
+#endif
+
+PERL_CALLCONV void     Perl_regprop(pTHX_ const regexp *prog, SV* sv, const regnode* o, const regmatch_info *reginfo, const RExC_state_t *pRExC_state)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_REGPROP       \
        assert(sv); assert(o)
+
 #endif
-#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C)    || defined(PERL_IN_TOKE_C) || defined(PERL_IN_UTF8_C)           || defined(PERL_IN_PP_C) || defined(PERL_IN_OP_C)               || defined(PERL_IN_DOOP_C)
+#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C)    || defined(PERL_IN_PP_C) || defined(PERL_IN_OP_C)               || defined(PERL_IN_TOKE_C) || defined(PERL_IN_UTF8_C)           || defined(PERL_IN_DOOP_C)
 #ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE bool        S__invlist_contains_cp(SV* const invlist, const UV cp)
                        __attribute__warn_unused_result__;
@@ -5886,75 +6804,35 @@ PERL_STATIC_INLINE UV*  S_invlist_array(SV* const invlist)
 #endif
 
 #ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE bool        S_is_invlist(SV* const invlist)
+PERL_STATIC_INLINE bool        S_is_invlist(const SV* const invlist)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_IS_INVLIST
 #endif
 
 #endif
+#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_TOKE_C)
+PERL_CALLCONV bool     Perl_is_grapheme(pTHX_ const U8 * strbeg, const U8 * s, const U8 *strend, const UV cp)
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
+#define PERL_ARGS_ASSERT_IS_GRAPHEME   \
+       assert(strbeg); assert(s); assert(strend)
+
+#endif
+#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_UTF8_C)
+PERL_CALLCONV UV       Perl__to_fold_latin1(const U8 c, U8 *p, STRLEN *lenp, const unsigned int flags);
+#define PERL_ARGS_ASSERT__TO_FOLD_LATIN1       \
+       assert(p); assert(lenp)
+#endif
 #if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_SV_C)
 PERL_CALLCONV SV*      Perl_invlist_clone(pTHX_ SV* const invlist, SV* newlist);
 #define PERL_ARGS_ASSERT_INVLIST_CLONE \
        assert(invlist)
 #endif
-#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_TOKE_C) || defined(PERL_IN_DQUOTE_C)
-#ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE char*       S_form_short_octal_warning(pTHX_ const char * const s, const STRLEN len)
-                       __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT_FORM_SHORT_OCTAL_WARNING      \
-       assert(s)
-#endif
-
-PERL_CALLCONV char     Perl_grok_bslash_c(pTHX_ const char source, const bool output_warning)
-                       __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT_GROK_BSLASH_C
-
-PERL_CALLCONV bool     Perl_grok_bslash_o(pTHX_ char** s, const char* const send, UV* uv, const char** error_msg, const bool output_warning, const bool strict, const bool silence_non_portable, const bool utf8)
-                       __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT_GROK_BSLASH_O \
-       assert(s); assert(send); assert(uv); assert(error_msg)
-
-PERL_CALLCONV bool     Perl_grok_bslash_x(pTHX_ char** s, const char* const send, UV* uv, const char** error_msg, const bool output_warning, const bool strict, const bool silence_non_portable, const bool utf8)
-                       __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT_GROK_BSLASH_X \
-       assert(s); assert(send); assert(uv); assert(error_msg)
-
-#ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE I32 S_regcurly(const char *s)
+#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_TOKE_C)
+PERL_CALLCONV bool     Perl_regcurly(const char *s, const char *e, const char * result[5])
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_REGCURLY      \
-       assert(s)
-#endif
-
-#endif
-#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_UTF8_C) || defined(PERL_IN_OP_C) || defined(PERL_IN_DOOP_C)
-PERL_CALLCONV SV*      Perl__add_range_to_invlist(pTHX_ SV* invlist, UV start, UV end)
-                       __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT__ADD_RANGE_TO_INVLIST
-
-/* PERL_CALLCONV void  _invlist_intersection(pTHX_ SV* const a, SV* const b, SV** i); */
-#define PERL_ARGS_ASSERT__INVLIST_INTERSECTION
-PERL_CALLCONV void     Perl__invlist_intersection_maybe_complement_2nd(pTHX_ SV* const a, SV* const b, const bool complement_b, SV** i);
-#define PERL_ARGS_ASSERT__INVLIST_INTERSECTION_MAYBE_COMPLEMENT_2ND    \
-       assert(b); assert(i)
-PERL_CALLCONV void     Perl__invlist_invert(pTHX_ SV* const invlist);
-#define PERL_ARGS_ASSERT__INVLIST_INVERT       \
-       assert(invlist)
-/* PERL_CALLCONV void  _invlist_subtract(pTHX_ SV* const a, SV* const b, SV** result); */
-#define PERL_ARGS_ASSERT__INVLIST_SUBTRACT
-/* PERL_CALLCONV void  _invlist_union(pTHX_ SV* const a, SV* const b, SV** output); */
-#define PERL_ARGS_ASSERT__INVLIST_UNION
-PERL_CALLCONV void     Perl__invlist_union_maybe_complement_2nd(pTHX_ SV* const a, SV* const b, const bool complement_b, SV** output);
-#define PERL_ARGS_ASSERT__INVLIST_UNION_MAYBE_COMPLEMENT_2ND   \
-       assert(b); assert(output)
-PERL_CALLCONV SV*      Perl__new_invlist(pTHX_ IV initial_size)
-                       __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT__NEW_INVLIST
-
-PERL_CALLCONV SV*      Perl__setup_canned_invlist(pTHX_ const STRLEN size, const UV element0, UV** other_elements_ptr)
-                       __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT__SETUP_CANNED_INVLIST \
-       assert(other_elements_ptr)
+       assert(s); assert(e)
 
 #endif
 #if defined(PERL_IN_REGEXEC_C)
@@ -6014,10 +6892,14 @@ STATIC U8 *     S_find_span_end_mask(U8 * s, const U8 * send, const U8 span_byte, co
        assert(s); assert(send)
 
 #ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE I32 S_foldEQ_latin1_s2_folded(const char* a, const char* b, I32 len);
+PERL_STATIC_INLINE I32 S_foldEQ_latin1_s2_folded(pTHX_ const char* a, const char* b, I32 len);
 #define PERL_ARGS_ASSERT_FOLDEQ_LATIN1_S2_FOLDED       \
        assert(a); assert(b)
 #endif
+STATIC bool    S_isFOO_lc(pTHX_ const U8 classnum, const U8 character)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_ISFOO_LC
+
 STATIC bool    S_isFOO_utf8_lc(pTHX_ const U8 classnum, const U8* character, const U8* e)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_ISFOO_UTF8_LC \
@@ -6099,19 +6981,6 @@ STATIC void      S_to_utf8_substr(pTHX_ regexp * prog);
 #define PERL_ARGS_ASSERT_TO_UTF8_SUBSTR        \
        assert(prog)
 #endif
-#if defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_TOKE_C)
-PERL_CALLCONV bool     Perl_is_grapheme(pTHX_ const U8 * strbeg, const U8 * s, const U8 *strend, const UV cp)
-                       __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT_IS_GRAPHEME   \
-       assert(strbeg); assert(s); assert(strend)
-
-#endif
-#if defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_UTF8_C)
-PERL_CALLCONV bool     Perl_isFOO_lc(pTHX_ const U8 classnum, const U8 character)
-                       __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT_ISFOO_LC
-
-#endif
 #if defined(PERL_IN_SCOPE_C)
 STATIC void    S_save_pushptri32ptr(pTHX_ void *const ptr1, const I32 i, void *const ptr2, const int type);
 #define PERL_ARGS_ASSERT_SAVE_PUSHPTRI32PTR
@@ -6149,10 +7018,10 @@ STATIC SV*      S_find_uninit_var(pTHX_ const OP *const obase, const SV *const uninit
 STATIC bool    S_glob_2number(pTHX_ GV* const gv);
 #define PERL_ARGS_ASSERT_GLOB_2NUMBER  \
        assert(gv)
-STATIC void    S_glob_assign_glob(pTHX_ SV *const dstr, SV *const sstr, const int dtype);
+STATIC void    S_glob_assign_glob(pTHX_ SV *const dsv, SV *const ssv, const int dtype);
 #define PERL_ARGS_ASSERT_GLOB_ASSIGN_GLOB      \
-       assert(dstr); assert(sstr)
-STATIC SV *    S_more_sv(pTHX);
+       assert(dsv); assert(ssv)
+PERL_CALLCONV SV *     Perl_more_sv(pTHX);
 #define PERL_ARGS_ASSERT_MORE_SV
 STATIC void    S_not_a_number(pTHX_ SV *const sv);
 #define PERL_ARGS_ASSERT_NOT_A_NUMBER  \
@@ -6180,9 +7049,9 @@ STATIC STRLEN     S_sv_pos_b2u_midway(pTHX_ const U8 *const s, const U8 *const targe
 STATIC STRLEN  S_sv_pos_u2b_cached(pTHX_ SV *const sv, MAGIC **const mgp, const U8 *const start, const U8 *const send, STRLEN uoffset, STRLEN uoffset0, STRLEN boffset0);
 #define PERL_ARGS_ASSERT_SV_POS_U2B_CACHED     \
        assert(sv); assert(mgp); assert(start); assert(send)
-STATIC STRLEN  S_sv_pos_u2b_forwards(const U8 *const start, const U8 *const send, STRLEN *const uoffset, bool *const at_end);
+STATIC STRLEN  S_sv_pos_u2b_forwards(const U8 *const start, const U8 *const send, STRLEN *const uoffset, bool *const at_end, bool *canonical_position);
 #define PERL_ARGS_ASSERT_SV_POS_U2B_FORWARDS   \
-       assert(start); assert(send); assert(uoffset); assert(at_end)
+       assert(start); assert(send); assert(uoffset); assert(at_end); assert(canonical_position)
 STATIC STRLEN  S_sv_pos_u2b_midway(const U8 *const start, const U8 *send, STRLEN uoffset, const STRLEN uend);
 #define PERL_ARGS_ASSERT_SV_POS_U2B_MIDWAY     \
        assert(start); assert(send)
@@ -6208,10 +7077,10 @@ STATIC I32      S_visit(pTHX_ SVFUNC_t f, const U32 flags, const U32 mask);
 #define PERL_ARGS_ASSERT_VISIT \
        assert(f)
 #  if defined(USE_ITHREADS)
-STATIC SV*     S_sv_dup_common(pTHX_ const SV *const sstr, CLONE_PARAMS *const param)
+STATIC SV*     S_sv_dup_common(pTHX_ const SV *const ssv, CLONE_PARAMS *const param)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_SV_DUP_COMMON \
-       assert(sstr); assert(param)
+       assert(ssv); assert(param)
 
 STATIC SV **   S_sv_dup_inc_multiple(pTHX_ SV *const *source, SV **dest, SSize_t items, CLONE_PARAMS *const param);
 #define PERL_ARGS_ASSERT_SV_DUP_INC_MULTIPLE   \
@@ -6223,7 +7092,8 @@ STATIC void       S_unreferenced_to_tmp_stack(pTHX_ AV *const unreferenced);
 #endif
 #if defined(PERL_IN_SV_C) || defined (PERL_IN_OP_C)
 PERL_CALLCONV SV *     Perl_varname(pTHX_ const GV *const gv, const char gvtype, PADOFFSET targ, const SV *const keyname, SSize_t aindex, int subscript_type)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_VARNAME
 
 #endif
@@ -6367,7 +7237,7 @@ STATIC bool       S_isa_lookup(pTHX_ HV *stash, SV *namesv, const char * name, STRLEN
 STATIC bool    S_sv_derived_from_svpvn(pTHX_ SV *sv, SV *namesv, const char * name, const STRLEN len, U32 flags);
 #endif
 #if defined(PERL_IN_UTF8_C)
-STATIC UV      S__to_utf8_case(pTHX_ const UV uv1, const U8 *p, U8* ustrp, STRLEN *lenp, SV *invlist, const I32 * const invmap, const U32 * const * const aux_tables, const U8 * const aux_table_lengths, const char * const normal);
+STATIC UV      S__to_utf8_case(pTHX_ const UV original, const U8 *p, U8* ustrp, STRLEN *lenp, SV *invlist, const I32 * const invmap, const U32 * const * const aux_tables, const U8 * const aux_table_lengths, const char * const normal);
 #define PERL_ARGS_ASSERT__TO_UTF8_CASE \
        assert(ustrp); assert(lenp); assert(invlist); assert(invmap); assert(normal)
 STATIC UV      S_check_locale_boundary_crossing(pTHX_ const U8* const p, const UV result, U8* const ustrp, STRLEN *lenp)
@@ -6383,7 +7253,7 @@ PERL_STATIC_INLINE int    S_does_utf8_overflow(const U8 * const s, const U8 * e, co
 #endif
 
 #ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE int S_isFF_OVERLONG(const U8 * const s, const STRLEN len)
+PERL_STATIC_INLINE int S_isFF_overlong(const U8 * const s, const STRLEN len)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_ISFF_OVERLONG \
        assert(s)
@@ -6397,9 +7267,9 @@ PERL_STATIC_INLINE bool   S_is_utf8_common(pTHX_ const U8 *const p, const U8 *cons
 #endif
 
 #ifndef PERL_NO_INLINE_FUNCTIONS
-PERL_STATIC_INLINE int S_is_utf8_overlong_given_start_byte_ok(const U8 * const s, const STRLEN len)
+PERL_STATIC_INLINE int S_is_utf8_overlong(const U8 * const s, const STRLEN len)
                        __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT_IS_UTF8_OVERLONG_GIVEN_START_BYTE_OK  \
+#define PERL_ARGS_ASSERT_IS_UTF8_OVERLONG      \
        assert(s)
 #endif
 
@@ -6408,6 +7278,9 @@ STATIC HV *       S_new_msg_hv(pTHX_ const char * const message, U32 categories, U32 f
 #define PERL_ARGS_ASSERT_NEW_MSG_HV    \
        assert(message)
 
+STATIC UV      S_to_case_cp_list(pTHX_ const UV original, const U32 ** const remaining_list, Size_t * remaining_count, SV *invlist, const I32 * const invmap, const U32 * const * const aux_tables, const U8 * const aux_table_lengths, const char * const normal);
+#define PERL_ARGS_ASSERT_TO_CASE_CP_LIST       \
+       assert(invlist); assert(invmap); assert(normal)
 STATIC U8      S_to_lower_latin1(const U8 c, U8 *p, STRLEN *lenp, const char dummy)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_TO_LOWER_LATIN1
@@ -6428,14 +7301,11 @@ STATIC char *   S_unexpected_non_continuation_text(pTHX_ const U8 * const s, STRLE
 
 #endif
 #if defined(PERL_IN_UTF8_C) || defined(PERL_IN_PP_C)
-PERL_CALLCONV UV       Perl__to_upper_title_latin1(pTHX_ const U8 c, U8 *p, STRLEN *lenp, const char S_or_s);
+PERL_CALLCONV UV       Perl__to_upper_title_latin1(pTHX_ const U8 c, U8 *p, STRLEN *lenp, const char S_or_s)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT__TO_UPPER_TITLE_LATIN1        \
        assert(p); assert(lenp)
-#endif
-#if defined(PERL_IN_UTF8_C) || defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C)
-PERL_CALLCONV UV       Perl__to_fold_latin1(const U8 c, U8 *p, STRLEN *lenp, const unsigned int flags);
-#define PERL_ARGS_ASSERT__TO_FOLD_LATIN1       \
-       assert(p); assert(lenp)
+
 #endif
 #if defined(PERL_IN_UTIL_C)
 STATIC bool    S_ckwarn_common(pTHX_ U32 w);
@@ -6460,9 +7330,15 @@ STATIC void      S_mem_log_common(enum mem_log_type mlt, const UV n, const UV typesiz
 PERL_CALLCONV Malloc_t Perl_mem_log_alloc(const UV nconst, UV typesize, const char *type_name, Malloc_t newalloc, const char *filename, const int linenumber, const char *funcname);
 #define PERL_ARGS_ASSERT_MEM_LOG_ALLOC \
        assert(type_name); assert(filename); assert(funcname)
+PERL_CALLCONV void     Perl_mem_log_del_sv(const SV *sv, const char *filename, int linenumber, const char *funcname);
+#define PERL_ARGS_ASSERT_MEM_LOG_DEL_SV        \
+       assert(sv); assert(filename); assert(funcname)
 PERL_CALLCONV Malloc_t Perl_mem_log_free(Malloc_t oldalloc, const char *filename, const int linenumber, const char *funcname);
 #define PERL_ARGS_ASSERT_MEM_LOG_FREE  \
        assert(filename); assert(funcname)
+PERL_CALLCONV void     Perl_mem_log_new_sv(const SV *sv, const char *filename, int linenumber, const char *funcname);
+#define PERL_ARGS_ASSERT_MEM_LOG_NEW_SV        \
+       assert(sv); assert(filename); assert(funcname)
 PERL_CALLCONV Malloc_t Perl_mem_log_realloc(const UV n, const UV typesize, const char *type_name, Malloc_t oldalloc, Malloc_t newalloc, const char *filename, const int linenumber, const char *funcname);
 #define PERL_ARGS_ASSERT_MEM_LOG_REALLOC       \
        assert(type_name); assert(filename); assert(funcname)
@@ -6474,8 +7350,30 @@ STATIC void      S_pidgone(pTHX_ Pid_t pid, int status);
 #if defined(PERL_USE_3ARG_SIGHANDLER)
 PERL_CALLCONV Signal_t Perl_csighandler(int sig, Siginfo_t *info, void *uap);
 #define PERL_ARGS_ASSERT_CSIGHANDLER
-PERL_CALLCONV Signal_t Perl_sighandler(int sig, Siginfo_t *info, void *uap);
+PERL_CALLCONV Signal_t Perl_sighandler(int sig, Siginfo_t *info, void *uap)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_SIGHANDLER
+
+#endif
+#if defined(U64TYPE)   /* HAS_QUAD undefined outside of core */
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE unsigned    Perl_lsbit_pos64(U64 word)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_LSBIT_POS64
+#endif
+
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE unsigned    Perl_msbit_pos64(U64 word)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_MSBIT_POS64
+#endif
+
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE unsigned    Perl_single_1bit_pos64(U64 word)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_SINGLE_1BIT_POS64
+#endif
+
 #endif
 #if defined(UNLINK_ALL_VERSIONS)
 PERL_CALLCONV I32      Perl_unlnk(pTHX_ const char* f);
@@ -6488,8 +7386,10 @@ PERL_CALLCONV bool       Perl_dump_c_backtrace(pTHX_ PerlIO* fp, int max_depth, int sk
        assert(fp)
 /* PERL_CALLCONV void  free_c_backtrace(pTHX_ Perl_c_backtrace* bt); */
 #define PERL_ARGS_ASSERT_FREE_C_BACKTRACE
-PERL_CALLCONV Perl_c_backtrace*        Perl_get_c_backtrace(pTHX_ int max_depth, int skip);
+PERL_CALLCONV Perl_c_backtrace*        Perl_get_c_backtrace(pTHX_ int max_depth, int skip)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_GET_C_BACKTRACE
+
 PERL_CALLCONV SV*      Perl_get_c_backtrace_dump(pTHX_ int max_depth, int skip);
 #define PERL_ARGS_ASSERT_GET_C_BACKTRACE_DUMP
 #endif
@@ -6523,6 +7423,11 @@ PERL_CALLCONV CLONE_PARAMS *     Perl_clone_params_new(PerlInterpreter *const from,
 #define PERL_ARGS_ASSERT_CLONE_PARAMS_NEW      \
        assert(from); assert(to)
 
+#ifndef PERL_NO_INLINE_FUNCTIONS
+PERL_STATIC_INLINE AV* Perl_cop_file_avn(pTHX_ const COP *cop);
+#define PERL_ARGS_ASSERT_COP_FILE_AVN  \
+       assert(cop)
+#endif
 PERL_CALLCONV PERL_CONTEXT*    Perl_cx_dup(pTHX_ PERL_CONTEXT* cx, I32 ix, I32 max, CLONE_PARAMS* param)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_CX_DUP        \
@@ -6556,26 +7461,31 @@ PERL_CALLCONV MAGIC*    Perl_mg_dup(pTHX_ MAGIC *mg, CLONE_PARAMS *const param)
 #define PERL_ARGS_ASSERT_MG_DUP        \
        assert(param)
 
-PERL_CALLCONV struct mro_meta* Perl_mro_meta_dup(pTHX_ struct mro_meta* smeta, CLONE_PARAMS* param);
+PERL_CALLCONV struct mro_meta* Perl_mro_meta_dup(pTHX_ struct mro_meta* smeta, CLONE_PARAMS* param)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MRO_META_DUP  \
        assert(smeta); assert(param)
+
 PERL_CALLCONV OP*      Perl_newPADOP(pTHX_ I32 type, I32 flags, SV* sv)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_NEWPADOP      \
        assert(sv)
 
 PERL_CALLCONV PADLIST *        Perl_padlist_dup(pTHX_ PADLIST *srcpad, CLONE_PARAMS *param)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_PADLIST_DUP   \
        assert(srcpad); assert(param)
 
 PERL_CALLCONV PADNAME *        Perl_padname_dup(pTHX_ PADNAME *src, CLONE_PARAMS *param)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_PADNAME_DUP   \
        assert(src); assert(param)
 
 PERL_CALLCONV PADNAMELIST *    Perl_padnamelist_dup(pTHX_ PADNAMELIST *srcpad, CLONE_PARAMS *param)
-                       __attribute__warn_unused_result__;
+                       __attribute__warn_unused_result__
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_PADNAMELIST_DUP       \
        assert(srcpad); assert(param)
 
@@ -6591,9 +7501,9 @@ PERL_CALLCONV void        Perl_re_dup_guts(pTHX_ const REGEXP *sstr, REGEXP *dstr, CLON
 PERL_CALLCONV void*    Perl_regdupe_internal(pTHX_ REGEXP * const r, CLONE_PARAMS* param);
 #define PERL_ARGS_ASSERT_REGDUPE_INTERNAL      \
        assert(r); assert(param)
-PERL_CALLCONV void     Perl_rvpv_dup(pTHX_ SV *const dstr, const SV *const sstr, CLONE_PARAMS *const param);
+PERL_CALLCONV void     Perl_rvpv_dup(pTHX_ SV *const dsv, const SV *const ssv, CLONE_PARAMS *const param);
 #define PERL_ARGS_ASSERT_RVPV_DUP      \
-       assert(dstr); assert(sstr); assert(param)
+       assert(dsv); assert(ssv); assert(param)
 PERL_CALLCONV PERL_SI* Perl_si_dup(pTHX_ PERL_SI* si, CLONE_PARAMS* param)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_SI_DUP        \
@@ -6604,12 +7514,12 @@ PERL_CALLCONV ANY*      Perl_ss_dup(pTHX_ PerlInterpreter* proto_perl, CLONE_PARAMS*
 #define PERL_ARGS_ASSERT_SS_DUP        \
        assert(proto_perl); assert(param)
 
-PERL_CALLCONV SV*      Perl_sv_dup(pTHX_ const SV *const sstr, CLONE_PARAMS *const param)
+PERL_CALLCONV SV*      Perl_sv_dup(pTHX_ const SV *const ssv, CLONE_PARAMS *const param)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_SV_DUP        \
        assert(param)
 
-PERL_CALLCONV SV*      Perl_sv_dup_inc(pTHX_ const SV *const sstr, CLONE_PARAMS *const param)
+PERL_CALLCONV SV*      Perl_sv_dup_inc(pTHX_ const SV *const ssv, CLONE_PARAMS *const param)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_SV_DUP_INC    \
        assert(param)
@@ -6620,15 +7530,15 @@ PERL_CALLCONV bool      Perl__is_cur_LC_category_utf8(pTHX_ int category);
 #define PERL_ARGS_ASSERT__IS_CUR_LC_CATEGORY_UTF8
 #endif
 #if defined(USE_LOCALE_COLLATE)
-PERL_CALLCONV int      Perl_magic_setcollxfrm(pTHX_ SV* sv, MAGIC* mg);
+PERL_CALLCONV int      Perl_magic_freecollxfrm(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
+#define PERL_ARGS_ASSERT_MAGIC_FREECOLLXFRM    \
+       assert(sv); assert(mg)
+
+PERL_CALLCONV int      Perl_magic_setcollxfrm(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_SETCOLLXFRM     \
        assert(sv); assert(mg)
-#ifndef NO_MATHOMS
-PERL_CALLCONV char*    Perl_mem_collxfrm(pTHX_ const char* input_string, STRLEN len, STRLEN* xlen)
-                       __attribute__deprecated__;
-#define PERL_ARGS_ASSERT_MEM_COLLXFRM  \
-       assert(input_string); assert(xlen)
-#endif
 
 #ifndef NO_MATHOMS
 PERL_CALLCONV char*    Perl_sv_collxfrm(pTHX_ SV *const sv, STRLEN *const nxp);
@@ -6703,12 +7613,16 @@ PERL_CALLCONV SSize_t   Perl_PerlIO_write(pTHX_ PerlIO *f, const void *vbuf, Size_
        assert(vbuf)
 #endif
 #if defined(USE_QUADMATH)
-PERL_CALLCONV bool     Perl_quadmath_format_needed(const char* format);
+PERL_CALLCONV bool     Perl_quadmath_format_needed(const char* format)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_QUADMATH_FORMAT_NEEDED        \
        assert(format)
-PERL_CALLCONV bool     Perl_quadmath_format_valid(const char* format);
+
+PERL_CALLCONV bool     Perl_quadmath_format_valid(const char* format)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_QUADMATH_FORMAT_VALID \
        assert(format)
+
 #endif
 #if defined(WIN32)
 PERL_CALLCONV_NO_RET void      win32_croak_not_implemented(const char * fname)
@@ -6717,7 +7631,7 @@ PERL_CALLCONV_NO_RET void win32_croak_not_implemented(const char * fname)
        assert(fname)
 
 #endif
-#if defined(WIN32) || defined(__SYMBIAN32__) || defined(VMS)
+#if defined(WIN32) || defined(VMS)
 PERL_CALLCONV int      Perl_do_aspawn(pTHX_ SV* really, SV** mark, SV** sp);
 #define PERL_ARGS_ASSERT_DO_ASPAWN     \
        assert(mark); assert(sp)
@@ -6729,9 +7643,11 @@ PERL_CALLCONV int        Perl_do_spawn_nowait(pTHX_ char* cmd);
        assert(cmd)
 #endif
 #if defined(_MSC_VER)
-PERL_CALLCONV int      Perl_magic_regdatum_set(pTHX_ SV* sv, MAGIC* mg);
+PERL_CALLCONV int      Perl_magic_regdatum_set(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__visibility__("hidden");
 #define PERL_ARGS_ASSERT_MAGIC_REGDATUM_SET    \
        assert(sv); assert(mg)
+
 #endif
 #ifdef PERL_CORE
 #  include "pp_proto.h"