-#define END 0 /* 0 End of program. */
-#define SUCCEED 1 /* 0x1 Return from a subroutine, basically. */
-#define BOL 2 /* 0x2 Match "" at beginning of line. */
-#define MBOL 3 /* 0x3 Same, assuming multiline. */
-#define SBOL 4 /* 0x4 Same, assuming singleline. */
-#define EOS 5 /* 0x5 Match "" at end of string. */
-#define EOL 6 /* 0x6 Match "" at end of line. */
-#define MEOL 7 /* 0x7 Same, assuming multiline. */
-#define SEOL 8 /* 0x8 Same, assuming singleline. */
-#define BOUND 9 /* 0x9 Match "" at any word boundary */
-#define BOUNDUTF8 10 /* 0xa Match "" at any word boundary */
-#define BOUNDL 11 /* 0xb Match "" at any word boundary */
-#define BOUNDLUTF8 12 /* 0xc Match "" at any word boundary */
-#define NBOUND 13 /* 0xd Match "" at any word non-boundary */
-#define NBOUNDUTF8 14 /* 0xe Match "" at any word non-boundary */
-#define NBOUNDL 15 /* 0xf Match "" at any word non-boundary */
-#define NBOUNDLUTF8 16 /* 0x10 Match "" at any word non-boundary */
-#define GPOS 17 /* 0x11 Matches where last m//g left off. */
-#define REG_ANY 18 /* 0x12 Match any one character (except newline). */
-#define ANYUTF8 19 /* 0x13 Match any one Unicode character (except newline). */
-#define SANY 20 /* 0x14 Match any one character. */
-#define SANYUTF8 21 /* 0x15 Match any one Unicode character. */
-#define ANYOF 22 /* 0x16 Match character in (or not in) this class. */
-#define ANYOFUTF8 23 /* 0x17 Match character in (or not in) this class. */
-#define ALNUM 24 /* 0x18 Match any alphanumeric character */
-#define ALNUMUTF8 25 /* 0x19 Match any alphanumeric character */
-#define ALNUML 26 /* 0x1a Match any alphanumeric char in locale */
-#define ALNUMLUTF8 27 /* 0x1b Match any alphanumeric char in locale */
-#define NALNUM 28 /* 0x1c Match any non-alphanumeric character */
-#define NALNUMUTF8 29 /* 0x1d Match any non-alphanumeric character */
-#define NALNUML 30 /* 0x1e Match any non-alphanumeric char in locale */
-#define NALNUMLUTF8 31 /* 0x1f Match any non-alphanumeric char in locale */
-#define SPACE 32 /* 0x20 Match any whitespace character */
-#define SPACEUTF8 33 /* 0x21 Match any whitespace character */
-#define SPACEL 34 /* 0x22 Match any whitespace char in locale */
-#define SPACELUTF8 35 /* 0x23 Match any whitespace char in locale */
-#define NSPACE 36 /* 0x24 Match any non-whitespace character */
-#define NSPACEUTF8 37 /* 0x25 Match any non-whitespace character */
-#define NSPACEL 38 /* 0x26 Match any non-whitespace char in locale */
-#define NSPACELUTF8 39 /* 0x27 Match any non-whitespace char in locale */
-#define DIGIT 40 /* 0x28 Match any numeric character */
-#define DIGITUTF8 41 /* 0x29 Match any numeric character */
-#define DIGITL 42 /* 0x2a Match any numeric character in locale */
-#define DIGITLUTF8 43 /* 0x2b Match any numeric character in locale */
-#define NDIGIT 44 /* 0x2c Match any non-numeric character */
-#define NDIGITUTF8 45 /* 0x2d Match any non-numeric character */
-#define NDIGITL 46 /* 0x2e Match any non-numeric character in locale */
-#define NDIGITLUTF8 47 /* 0x2f Match any non-numeric character in locale */
-#define ALNUMC 48 /* 0x30 Match any alphanumeric character */
-#define ALNUMCUTF8 49 /* 0x31 Match any alphanumeric character */
-#define ALNUMCL 50 /* 0x32 Match any alphanumeric character in locale */
-#define ALNUMCLUTF8 51 /* 0x33 Match any alphanumeric character in locale */
-#define NALNUMC 52 /* 0x34 Match any non-alphanumeric character */
-#define NALNUMCUTF8 53 /* 0x35 Match any non-alphanumeric character */
-#define NALNUMCL 54 /* 0x36 Match any non-alphanumeric character in locale */
-#define NALNUMCLUTF8 55 /* 0x37 Match any non-alphanumeric character in locale */
-#define ALPHA 56 /* 0x38 Match any alphabetic character */
-#define ALPHAUTF8 57 /* 0x39 Match any alphabetic character */
-#define ALPHAL 58 /* 0x3a Match any alphabetic character in locale */
-#define ALPHALUTF8 59 /* 0x3b Match any alphabetic character in locale */
-#define NALPHA 60 /* 0x3c Match any non-alphabetic character */
-#define NALPHAUTF8 61 /* 0x3d Match any non-alphabetic character */
-#define NALPHAL 62 /* 0x3e Match any non-alphabetic character in locale */
-#define NALPHALUTF8 63 /* 0x3f Match any non-alphabetic character in locale */
-#define ASCII 64 /* 0x40 Match any ASCII character */
-#define NASCII 65 /* 0x41 Match any non-ASCII character */
-#define CNTRL 66 /* 0x42 Match any control character */
-#define CNTRLUTF8 67 /* 0x43 Match any control character */
-#define CNTRLL 68 /* 0x44 Match any control character in locale */
-#define CNTRLLUTF8 69 /* 0x45 Match any control character in locale */
-#define NCNTRL 70 /* 0x46 Match any non-control character */
-#define NCNTRLUTF8 71 /* 0x47 Match any non-control character */
-#define NCNTRLL 72 /* 0x48 Match any non-control character in locale */
-#define NCNTRLLUTF8 73 /* 0x49 Match any non-control character in locale */
-#define GRAPH 74 /* 0x4a Match any graphical character */
-#define GRAPHUTF8 75 /* 0x4b Match any graphical character */
-#define GRAPHL 76 /* 0x4c Match any graphical character in locale */
-#define GRAPHLUTF8 77 /* 0x4d Match any graphical character in locale */
-#define NGRAPH 78 /* 0x4e Match any non-graphical character */
-#define NGRAPHUTF8 79 /* 0x4f Match any non-graphical character */
-#define NGRAPHL 80 /* 0x50 Match any non-graphical character in locale */
-#define NGRAPHLUTF8 81 /* 0x51 Match any non-graphical character in locale */
-#define LOWER 82 /* 0x52 Match any lowercase character */
-#define LOWERUTF8 83 /* 0x53 Match any lowercase character */
-#define LOWERL 84 /* 0x54 Match any lowercase character in locale */
-#define LOWERLUTF8 85 /* 0x55 Match any lowercase character in locale */
-#define NLOWER 86 /* 0x56 Match any non-lowercase character */
-#define NLOWERUTF8 87 /* 0x57 Match any non-lowercase character */
-#define NLOWERL 88 /* 0x58 Match any non-lowercase character in locale */
-#define NLOWERLUTF8 89 /* 0x59 Match any non-lowercase character in locale */
-#define PRINT 90 /* 0x5a Match any printable character */
-#define PRINTUTF8 91 /* 0x5b Match any printable character */
-#define PRINTL 92 /* 0x5c Match any printable character in locale */
-#define PRINTLUTF8 93 /* 0x5d Match any printable character in locale */
-#define NPRINT 94 /* 0x5e Match any non-printable character */
-#define NPRINTUTF8 95 /* 0x5f Match any non-printable character */
-#define NPRINTL 96 /* 0x60 Match any non-printable character in locale */
-#define NPRINTLUTF8 97 /* 0x61 Match any non-printable character in locale */
-#define PUNCT 98 /* 0x62 Match any punctuation character */
-#define PUNCTUTF8 99 /* 0x63 Match any punctuation character */
-#define PUNCTL 100 /* 0x64 Match any punctuation character in locale */
-#define PUNCTLUTF8 101 /* 0x65 Match any punctuation character in locale */
-#define NPUNCT 102 /* 0x66 Match any non-punctuation character */
-#define NPUNCTUTF8 103 /* 0x67 Match any non-punctuation character */
-#define NPUNCTL 104 /* 0x68 Match any non-punctuation character in locale */
-#define NPUNCTLUTF8 105 /* 0x69 Match any non-punctuation character in locale */
-#define UPPER 106 /* 0x6a Match any uppercase character */
-#define UPPERUTF8 107 /* 0x6b Match any uppercase character */
-#define UPPERL 108 /* 0x6c Match any uppercase character in locale */
-#define UPPERLUTF8 109 /* 0x6d Match any uppercase character in locale */
-#define NUPPER 110 /* 0x6e Match any non-uppercase character */
-#define NUPPERUTF8 111 /* 0x6f Match any non-uppercase character */
-#define NUPPERL 112 /* 0x70 Match any non-uppercase character in locale */
-#define NUPPERLUTF8 113 /* 0x71 Match any non-uppercase character in locale */
-#define XDIGIT 114 /* 0x72 Match any hexdigit character */
-#define NXDIGIT 115 /* 0x73 Match any non-hexdigit character */
-#define CLUMP 116 /* 0x74 Match any combining character sequence */
-#define BRANCH 117 /* 0x75 Match this alternative, or the next... */
-#define BACK 118 /* 0x76 Match "", "next" ptr points backward. */
-#define EXACT 119 /* 0x77 Match this string (preceded by length). */
-#define EXACTF 120 /* 0x78 Match this string, folded (prec. by length). */
-#define EXACTFL 121 /* 0x79 Match this string, folded in locale (w/len). */
-#define NOTHING 122 /* 0x7a Match empty string. */
-#define TAIL 123 /* 0x7b Match empty string. Can jump here from outside. */
-#define STAR 124 /* 0x7c Match this (simple) thing 0 or more times. */
-#define PLUS 125 /* 0x7d Match this (simple) thing 1 or more times. */
-#define CURLY 126 /* 0x7e Match this simple thing {n,m} times. */
-#define CURLYN 127 /* 0x7f Match next-after-this simple thing */
-#define CURLYM 128 /* 0x80 Match this medium-complex thing {n,m} times. */
-#define CURLYX 129 /* 0x81 Match this complex thing {n,m} times. */
-#define WHILEM 130 /* 0x82 Do curly processing and see if rest matches. */
-#define OPEN 131 /* 0x83 Mark this point in input as start of #n. */
-#define CLOSE 132 /* 0x84 Analogous to OPEN. */
-#define REF 133 /* 0x85 Match some already matched string */
-#define REFF 134 /* 0x86 Match already matched string, folded */
-#define REFFL 135 /* 0x87 Match already matched string, folded in loc. */
-#define IFMATCH 136 /* 0x88 Succeeds if the following matches. */
-#define UNLESSM 137 /* 0x89 Fails if the following matches. */
-#define SUSPEND 138 /* 0x8a "Independent" sub-RE. */
-#define IFTHEN 139 /* 0x8b Switch, should be preceeded by switcher . */
-#define GROUPP 140 /* 0x8c Whether the group matched. */
-#define LONGJMP 141 /* 0x8d Jump far away. */
-#define BRANCHJ 142 /* 0x8e BRANCH with long offset. */
-#define EVAL 143 /* 0x8f Execute some Perl code. */
-#define MINMOD 144 /* 0x90 Next operator is not greedy. */
-#define LOGICAL 145 /* 0x91 Next opcode should set the flag only. */
-#define RENUM 146 /* 0x92 Group with independently numbered parens. */
-#define OPTIMIZED 147 /* 0x93 Placeholder for dump. */
+/* Regops and State definitions */
+
+#define REGNODE_MAX 93
+#define REGMATCH_STATE_MAX 133
+
+#define END 0 /* 0000 End of program. */
+#define SUCCEED 1 /* 0x01 Return from a subroutine, basically. */
+#define BOL 2 /* 0x02 Match "" at beginning of line. */
+#define MBOL 3 /* 0x03 Same, assuming multiline. */
+#define SBOL 4 /* 0x04 Same, assuming singleline. */
+#define EOS 5 /* 0x05 Match "" at end of string. */
+#define EOL 6 /* 0x06 Match "" at end of line. */
+#define MEOL 7 /* 0x07 Same, assuming multiline. */
+#define SEOL 8 /* 0x08 Same, assuming singleline. */
+#define BOUND 9 /* 0x09 Match "" at any word boundary using native charset semantics for non-utf8 */
+#define BOUNDL 10 /* 0x0a Match "" at any locale word boundary */
+#define BOUNDU 11 /* 0x0b Match "" at any word boundary using Unicode semantics */
+#define BOUNDA 12 /* 0x0c Match "" at any word boundary using ASCII semantics */
+#define NBOUND 13 /* 0x0d Match "" at any word non-boundary using native charset semantics for non-utf8 */
+#define NBOUNDL 14 /* 0x0e Match "" at any locale word non-boundary */
+#define NBOUNDU 15 /* 0x0f Match "" at any word non-boundary using Unicode semantics */
+#define NBOUNDA 16 /* 0x10 Match "" at any word non-boundary using ASCII semantics */
+#define GPOS 17 /* 0x11 Matches where last m//g left off. */
+#define REG_ANY 18 /* 0x12 Match any one character (except newline). */
+#define SANY 19 /* 0x13 Match any one character. */
+#define CANY 20 /* 0x14 Match any one byte. */
+#define ANYOF 21 /* 0x15 Match character in (or not in) this class, single char match only */
+#define POSIXD 22 /* 0x16 Some [[:class:]] under /d; the FLAGS field gives which one */
+#define POSIXL 23 /* 0x17 Some [[:class:]] under /l; the FLAGS field gives which one */
+#define POSIXU 24 /* 0x18 Some [[:class:]] under /u; the FLAGS field gives which one */
+#define POSIXA 25 /* 0x19 Some [[:class:]] under /a; the FLAGS field gives which one */
+#define NPOSIXD 26 /* 0x1a complement of POSIXD, [[:^class:]] */
+#define NPOSIXL 27 /* 0x1b complement of POSIXL, [[:^class:]] */
+#define NPOSIXU 28 /* 0x1c complement of POSIXU, [[:^class:]] */
+#define NPOSIXA 29 /* 0x1d complement of POSIXA, [[:^class:]] */
+#define CLUMP 30 /* 0x1e Match any extended grapheme cluster sequence */
+#define BRANCH 31 /* 0x1f Match this alternative, or the next... */
+#define BACK 32 /* 0x20 Match "", "next" ptr points backward. */
+#define EXACT 33 /* 0x21 Match this string (preceded by length). */
+#define EXACTF 34 /* 0x22 Match this non-UTF-8 string (not guaranteed to be folded) using /id rules (w/len). */
+#define EXACTFL 35 /* 0x23 Match this string (not guaranteed to be folded) using /il rules (w/len). */
+#define EXACTFU 36 /* 0x24 Match this string (folded iff in UTF-8, length in folding doesn't change if not in UTF-8) using /iu rules (w/len). */
+#define EXACTFA 37 /* 0x25 Match this string (not guaranteed to be folded) using /iaa rules (w/len). */
+#define EXACTFU_SS 38 /* 0x26 Match this string (folded iff in UTF-8, length in folding may change even if not in UTF-8) using /iu rules (w/len). */
+#define EXACTFA_NO_TRIE 39 /* 0x27 Match this string (which is not trie-able; not guaranteed to be folded) using /iaa rules (w/len). */
+#define NOTHING 40 /* 0x28 Match empty string. */
+#define TAIL 41 /* 0x29 Match empty string. Can jump here from outside. */
+#define STAR 42 /* 0x2a Match this (simple) thing 0 or more times. */
+#define PLUS 43 /* 0x2b Match this (simple) thing 1 or more times. */
+#define CURLY 44 /* 0x2c Match this simple thing {n,m} times. */
+#define CURLYN 45 /* 0x2d Capture next-after-this simple thing */
+#define CURLYM 46 /* 0x2e Capture this medium-complex thing {n,m} times. */
+#define CURLYX 47 /* 0x2f Match this complex thing {n,m} times. */
+#define WHILEM 48 /* 0x30 Do curly processing and see if rest matches. */
+#define OPEN 49 /* 0x31 Mark this point in input as start of #n. */
+#define CLOSE 50 /* 0x32 Analogous to OPEN. */
+#define REF 51 /* 0x33 Match some already matched string */
+#define REFF 52 /* 0x34 Match already matched string, folded using native charset semantics for non-utf8 */
+#define REFFL 53 /* 0x35 Match already matched string, folded in loc. */
+#define REFFU 54 /* 0x36 Match already matched string, folded using unicode semantics for non-utf8 */
+#define REFFA 55 /* 0x37 Match already matched string, folded using unicode semantics for non-utf8, no mixing ASCII, non-ASCII */
+#define NREF 56 /* 0x38 Match some already matched string */
+#define NREFF 57 /* 0x39 Match already matched string, folded using native charset semantics for non-utf8 */
+#define NREFFL 58 /* 0x3a Match already matched string, folded in loc. */
+#define NREFFU 59 /* 0x3b Match already matched string, folded using unicode semantics for non-utf8 */
+#define NREFFA 60 /* 0x3c Match already matched string, folded using unicode semantics for non-utf8, no mixing ASCII, non-ASCII */
+#define IFMATCH 61 /* 0x3d Succeeds if the following matches. */
+#define UNLESSM 62 /* 0x3e Fails if the following matches. */
+#define SUSPEND 63 /* 0x3f "Independent" sub-RE. */
+#define IFTHEN 64 /* 0x40 Switch, should be preceded by switcher. */
+#define GROUPP 65 /* 0x41 Whether the group matched. */
+#define LONGJMP 66 /* 0x42 Jump far away. */
+#define BRANCHJ 67 /* 0x43 BRANCH with long offset. */
+#define EVAL 68 /* 0x44 Execute some Perl code. */
+#define MINMOD 69 /* 0x45 Next operator is not greedy. */
+#define LOGICAL 70 /* 0x46 Next opcode should set the flag only. */
+#define RENUM 71 /* 0x47 Group with independently numbered parens. */
+#define TRIE 72 /* 0x48 Match many EXACT(F[ALU]?)? at once. flags==type */
+#define TRIEC 73 /* 0x49 Same as TRIE, but with embedded charclass data */
+#define AHOCORASICK 74 /* 0x4a Aho Corasick stclass. flags==type */
+#define AHOCORASICKC 75 /* 0x4b Same as AHOCORASICK, but with embedded charclass data */
+#define GOSUB 76 /* 0x4c recurse to paren arg1 at (signed) ofs arg2 */
+#define GOSTART 77 /* 0x4d recurse to start of pattern */
+#define NGROUPP 78 /* 0x4e Whether the group matched. */
+#define INSUBP 79 /* 0x4f Whether we are in a specific recurse. */
+#define DEFINEP 80 /* 0x50 Never execute directly. */
+#define ENDLIKE 81 /* 0x51 Used only for the type field of verbs */
+#define OPFAIL 82 /* 0x52 Same as (?!) */
+#define ACCEPT 83 /* 0x53 Accepts the current matched string. */
+#define VERB 84 /* 0x54 Used only for the type field of verbs */
+#define PRUNE 85 /* 0x55 Pattern fails at this startpoint if no-backtracking through this */
+#define MARKPOINT 86 /* 0x56 Push the current location for rollback by cut. */
+#define SKIP 87 /* 0x57 On failure skip forward (to the mark) before retrying */
+#define COMMIT 88 /* 0x58 Pattern fails outright if backtracking through this */
+#define CUTGROUP 89 /* 0x59 On failure go to the next alternation in the group */
+#define KEEPS 90 /* 0x5a $& begins here. */
+#define LNBREAK 91 /* 0x5b generic newline pattern */
+#define OPTIMIZED 92 /* 0x5c Placeholder for dump. */
+#define PSEUDO 93 /* 0x5d Pseudo opcode for internal use. */
+ /* ------------ States ------------- */
+#define TRIE_next (REGNODE_MAX + 1) /* state for TRIE */
+#define TRIE_next_fail (REGNODE_MAX + 2) /* state for TRIE */
+#define EVAL_AB (REGNODE_MAX + 3) /* state for EVAL */
+#define EVAL_AB_fail (REGNODE_MAX + 4) /* state for EVAL */
+#define CURLYX_end (REGNODE_MAX + 5) /* state for CURLYX */
+#define CURLYX_end_fail (REGNODE_MAX + 6) /* state for CURLYX */
+#define WHILEM_A_pre (REGNODE_MAX + 7) /* state for WHILEM */
+#define WHILEM_A_pre_fail (REGNODE_MAX + 8) /* state for WHILEM */
+#define WHILEM_A_min (REGNODE_MAX + 9) /* state for WHILEM */
+#define WHILEM_A_min_fail (REGNODE_MAX + 10) /* state for WHILEM */
+#define WHILEM_A_max (REGNODE_MAX + 11) /* state for WHILEM */
+#define WHILEM_A_max_fail (REGNODE_MAX + 12) /* state for WHILEM */
+#define WHILEM_B_min (REGNODE_MAX + 13) /* state for WHILEM */
+#define WHILEM_B_min_fail (REGNODE_MAX + 14) /* state for WHILEM */
+#define WHILEM_B_max (REGNODE_MAX + 15) /* state for WHILEM */
+#define WHILEM_B_max_fail (REGNODE_MAX + 16) /* state for WHILEM */
+#define BRANCH_next (REGNODE_MAX + 17) /* state for BRANCH */
+#define BRANCH_next_fail (REGNODE_MAX + 18) /* state for BRANCH */
+#define CURLYM_A (REGNODE_MAX + 19) /* state for CURLYM */
+#define CURLYM_A_fail (REGNODE_MAX + 20) /* state for CURLYM */
+#define CURLYM_B (REGNODE_MAX + 21) /* state for CURLYM */
+#define CURLYM_B_fail (REGNODE_MAX + 22) /* state for CURLYM */
+#define IFMATCH_A (REGNODE_MAX + 23) /* state for IFMATCH */
+#define IFMATCH_A_fail (REGNODE_MAX + 24) /* state for IFMATCH */
+#define CURLY_B_min_known (REGNODE_MAX + 25) /* state for CURLY */
+#define CURLY_B_min_known_fail (REGNODE_MAX + 26) /* state for CURLY */
+#define CURLY_B_min (REGNODE_MAX + 27) /* state for CURLY */
+#define CURLY_B_min_fail (REGNODE_MAX + 28) /* state for CURLY */
+#define CURLY_B_max (REGNODE_MAX + 29) /* state for CURLY */
+#define CURLY_B_max_fail (REGNODE_MAX + 30) /* state for CURLY */
+#define COMMIT_next (REGNODE_MAX + 31) /* state for COMMIT */
+#define COMMIT_next_fail (REGNODE_MAX + 32) /* state for COMMIT */
+#define MARKPOINT_next (REGNODE_MAX + 33) /* state for MARKPOINT */
+#define MARKPOINT_next_fail (REGNODE_MAX + 34) /* state for MARKPOINT */
+#define SKIP_next (REGNODE_MAX + 35) /* state for SKIP */
+#define SKIP_next_fail (REGNODE_MAX + 36) /* state for SKIP */
+#define CUTGROUP_next (REGNODE_MAX + 37) /* state for CUTGROUP */
+#define CUTGROUP_next_fail (REGNODE_MAX + 38) /* state for CUTGROUP */
+#define KEEPS_next (REGNODE_MAX + 39) /* state for KEEPS */
+#define KEEPS_next_fail (REGNODE_MAX + 40) /* state for KEEPS */
+
+/* PL_regkind[] What type of regop or state is this. */