use num_enum::TryFromPrimitive;
#[derive(Copy, Clone, Debug, TryFromPrimitive)]
#[repr(u8)]
pub(crate) enum OpCode {
StackRef0 = 0,
StackRef1 = 1,
StackRef2 = 2,
StackRef3 = 3,
StackRef4 = 4,
StackRef5 = 5,
StackRefN = 6,
StackRefN2 = 7,
VarRef0 = 8,
VarRef1 = 9,
VarRef2 = 10,
VarRef3 = 11,
VarRef4 = 12,
VarRef5 = 13,
VarRefN = 14,
VarRefN2 = 15,
VarSet0 = 16,
VarSet1 = 17,
VarSet2 = 18,
VarSet3 = 19,
VarSet4 = 20,
VarSet5 = 21,
VarSetN = 22,
VarSetN2 = 23,
VarBind0 = 24,
VarBind1 = 25,
VarBind2 = 26,
VarBind3 = 27,
VarBind4 = 28,
VarBind5 = 29,
VarBindN = 30,
VarBindN2 = 31,
Call0 = 32,
Call1 = 33,
Call2 = 34,
Call3 = 35,
Call4 = 36,
Call5 = 37,
CallN = 38,
CallN2 = 39,
Unbind0 = 40,
Unbind1 = 41,
Unbind2 = 42,
Unbind3 = 43,
Unbind4 = 44,
Unbind5 = 45,
UnbindN = 46,
UnbindN2 = 47,
PopHandler = 48,
PushCondtionCase = 49,
PushCatch = 50,
Nth = 56,
Symbolp = 57,
Consp = 58,
Stringp = 59,
Listp = 60,
Eq = 61,
Memq = 62,
Not = 63,
Car = 64,
Cdr = 65,
Cons = 66,
List1 = 67,
List2 = 68,
List3 = 69,
List4 = 70,
Length = 71,
Aref = 72,
Aset = 73,
SymbolValue = 74,
SymbolFunction = 75,
Set = 76,
Fset = 77,
Get = 78,
Substring = 79,
Concat2 = 80,
Concat3 = 81,
Concat4 = 82,
Sub1 = 83,
Add1 = 84,
EqlSign = 85,
GreaterThan = 86,
LessThan = 87,
LessThanOrEqual = 88,
GreaterThanOrEqual = 89,
Diff = 90,
Negate = 91,
Plus = 92,
Max = 93,
Min = 94,
Multiply = 95,
Point = 96,
GotoChar = 98,
Insert = 99,
PointMax = 100,
PointMin = 101,
CharAfter = 102,
FollowingChar = 103,
PrecedingChar = 104,
CurrentColumn = 105,
IndentTo = 106,
EndOfLineP = 108,
EndOfBufferP = 109,
BeginningOfLineP = 110,
BeginningOfBufferP = 111,
CurrentBuffer = 112,
SetBuffer = 113,
SaveCurrentBuffer1 = 114,
ForwardChar = 117,
ForwardWord = 118,
SkipCharsForward = 119,
SkipCharsBackward = 120,
ForwardLine = 121,
CharSyntax = 122,
BufferSubstring = 123,
DeleteRegion = 124,
NarrowToRegion = 125,
Widen = 126,
EndOfLine = 127,
ConstantN2 = 129,
Goto = 130,
GotoIfNil = 131,
GotoIfNonNil = 132,
GotoIfNilElsePop = 133,
GotoIfNonNilElsePop = 134,
Return = 135,
Discard = 136,
Duplicate = 137,
SaveExcursion = 138,
SaveRestriction = 140,
UnwindProtect = 142,
SetMarker = 147,
MatchBeginning = 148,
MatchEnd = 149,
Upcase = 150,
Downcase = 151,
StringEqlSign = 152,
StringLessThan = 153,
Equal = 154,
Nthcdr = 155,
Elt = 156,
Member = 157,
Assq = 158,
Nreverse = 159,
Setcar = 160,
Setcdr = 161,
CarSafe = 162,
CdrSafe = 163,
Nconc = 164,
Quo = 165,
Rem = 166,
Numberp = 167,
Integerp = 168,
ListN = 175,
ConcatN = 176,
InsertN = 177,
StackSetN = 178,
StackSetN2 = 179,
DiscardN = 182,
Switch = 183,
Constant0 = 192,
Constant1 = 193,
Constant2 = 194,
Constant3 = 195,
Constant4 = 196,
Constant5 = 197,
Constant6 = 198,
Constant7 = 199,
Constant8 = 200,
Constant9 = 201,
Constant10 = 202,
Constant11 = 203,
Constant12 = 204,
Constant13 = 205,
Constant14 = 206,
Constant15 = 207,
Constant16 = 208,
Constant17 = 209,
Constant18 = 210,
Constant19 = 211,
Constant20 = 212,
Constant21 = 213,
Constant22 = 214,
Constant23 = 215,
Constant24 = 216,
Constant25 = 217,
Constant26 = 218,
Constant27 = 219,
Constant28 = 220,
Constant29 = 221,
Constant30 = 222,
Constant31 = 223,
Constant32 = 224,
Constant33 = 225,
Constant34 = 226,
Constant35 = 227,
Constant36 = 228,
Constant37 = 229,
Constant38 = 230,
Constant39 = 231,
Constant40 = 232,
Constant41 = 233,
Constant42 = 234,
Constant43 = 235,
Constant44 = 236,
Constant45 = 237,
Constant46 = 238,
Constant47 = 239,
Constant48 = 240,
Constant49 = 241,
Constant50 = 242,
Constant51 = 243,
Constant52 = 244,
Constant53 = 245,
Constant54 = 246,
Constant55 = 247,
Constant56 = 248,
Constant57 = 249,
Constant58 = 250,
Constant59 = 251,
Constant60 = 252,
Constant61 = 253,
Constant62 = 254,
Constant63 = 255,
}