ton-assembly
Version:
TON assembler and disassembler
689 lines • 120 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BLS_AGGREGATE_ELEMENT_GAS_PRICE = exports.BLS_AGGREGATE_BASE_GAS_PRICE = exports.DynamicGas = exports.BlsG2InGroup = exports.BlsMapToG2 = exports.BlsG2Mul = exports.BlsG2Neg = exports.BlsG2AddSub = exports.BlsVerify = exports.BlsG1InGroup = exports.BlsMapToG1 = exports.BlsG1Mul = exports.BlsG1Neg = exports.BlsG1AddSub = exports.Rist255Mulbase = exports.Rist255Mul = exports.Rist255Add = exports.Rist255Validate = exports.Rist255Fromhash = exports.P256Chksign = exports.Chksign = exports.Secp256k1XonlyPubkeyTweakAdd = exports.Ecrecover = exports.ImplicitJumpRef = exports.Tuple = exports.AlwaysThrow = exports.CanThrow = exports.CellCreate = exports.CellLoad = exports.debugstr = exports.exoticCell = exports.dict = exports.slice = exports.refCodeSlice = exports.inlineCodeSlice = exports.codeSlice = exports.seq = exports.setcpArg = exports.minusOne = exports.s1 = exports.largeInt = exports.tinyInt = exports.plduzArg = exports.control = exports.stack2 = exports.stack = exports.delta = exports.int = exports.uint = exports.range = void 0;
exports.calculateGasConsumptionWithDescription = exports.calculateGasConsumption = exports.COST_PRELOAD_INSTR = exports.MAX_TUPLE_ITEMS = exports.COST_PER_TUPLE_ITEM = exports.COST_PER_BIT = exports.infoOf = exports.fiftInstructionList = exports.instructionList = exports.pseudoInstructions = exports.instructions = exports.MAX_OPCODE_BITS = exports.BLS_PAIRING_ELEMENT_GAS_PRICE = exports.BLS_PAIRING_BASE_GAS_PRICE = exports.BLS_G2_MULTIEXP_COEF2_GAS_PRICE = exports.BLS_G2_MULTIEXP_COEF1_GAS_PRICE = exports.BLS_G2_MULTIEXP_BASE_GAS_PRICE = exports.BLS_G1_MULTIEXP_COEF2_GAS_PRICE = exports.BLS_G1_MULTIEXP_COEF1_GAS_PRICE = exports.BLS_G1_MULTIEXP_BASE_GAS_PRICE = exports.BLS_AGGREGATE_VERIFY_ELEMENT_GAS_PRICE = exports.BLS_AGGREGATE_VERIFY_BASE_GAS_PRICE = exports.BLS_FAST_AGGREGATE_VERIFY_ELEMENT_GAS_PRICE = exports.BLS_FAST_AGGREGATE_VERIFY_BASE_GAS_PRICE = void 0;
const range = (min, max) => ({ min, max });
exports.range = range;
const uint = (len, range) => ({ $: "uint", len, range });
exports.uint = uint;
const int = (len, range) => ({ $: "int", len, range });
exports.int = int;
const delta = (delta, arg) => ({ $: "delta", delta, arg });
exports.delta = delta;
const stack = (len) => ({ $: "stack", len, range: (0, exports.range)(0n, BigInt(Math.pow(2, len) - 1)) });
exports.stack = stack;
const stack2 = (len, start) => ({
$: "stack",
len,
range: (0, exports.range)(start, BigInt(Math.pow(2, len) - 1)),
});
exports.stack2 = stack2;
exports.control = { $: "control", range: (0, exports.range)(0n, 15n) };
exports.plduzArg = { $: "plduzArg", range: (0, exports.range)(0n, 7n) };
exports.tinyInt = { $: "tinyInt", range: (0, exports.range)(-5n, 10n) };
const largeIntRange = (0, exports.range)(-(2n ** 267n), 2n ** 267n - 1n);
exports.largeInt = { $: "largeInt", range: largeIntRange };
exports.s1 = { $: "s1" };
exports.minusOne = { $: "minusOne" };
exports.setcpArg = { $: "setcpArg", range: (0, exports.range)(-15n, 239n) };
const seq = (...args) => args;
exports.seq = seq;
const codeSlice = (refs, bits) => ({ $: "codeSlice", refs, bits });
exports.codeSlice = codeSlice;
const inlineCodeSlice = (bits) => ({ $: "inlineCodeSlice", bits });
exports.inlineCodeSlice = inlineCodeSlice;
exports.refCodeSlice = { $: "refCodeSlice" };
const slice = (refs, bits, pad) => ({ $: "slice", refs, bits, pad });
exports.slice = slice;
exports.dict = { $: "dict" };
exports.exoticCell = { $: "exoticCell" };
exports.debugstr = { $: "debugstr" };
const CellLoad = () => ({
$: "CellLoad",
costs: [
{ value: 100, description: "If cell is loaded for the first time" },
{ value: 25, description: "If cell is already loaded" },
],
});
exports.CellLoad = CellLoad;
const CellCreate = () => ({
$: "CellCreate",
costs: [{ value: 500, description: "For Cell creation" }],
});
exports.CellCreate = CellCreate;
const CanThrow = () => ({
$: "CanThrow", costs: [
{ value: 0, description: "If no exception was thrown" },
{ value: 50, description: "If exception is thrown" },
],
});
exports.CanThrow = CanThrow;
const AlwaysThrow = () => ({
$: "AlwaysThrow", costs: [
{ value: 50, description: "For exception throw" },
],
});
exports.AlwaysThrow = AlwaysThrow;
const Tuple = () => ({
$: "Tuple", costs: [
{ value: 0, description: "For 0 elements tuple" },
{ value: 1, description: "For 1 element tuple" },
{ value: 2, description: "For 2 elements tuple" },
{ value: 3, description: "For 3 elements tuple" },
{ value: 4, description: "For 4 elements tuple" },
{ value: 5, description: "For 5 elements tuple" },
{ value: 6, description: "For 6 elements tuple" },
{ value: 7, description: "For 7 elements tuple" },
{ value: 8, description: "For 8 elements tuple" },
{ value: 9, description: "For 9 elements tuple" },
{ value: 10, description: "For 10 elements tuple" },
{ value: 11, description: "For 11 elements tuple" },
{ value: 12, description: "For 12 elements tuple" },
{ value: 13, description: "For 13 elements tuple" },
{ value: 14, description: "For 14 elements tuple" },
{ value: 15, description: "For 15 elements tuple" },
],
});
exports.Tuple = Tuple;
const ImplicitJumpRef = () => ({
$: "ImplicitJumpRef", costs: [
{ value: 0, description: "If reference Cell is already loaded" },
{ value: 10, description: "If reference Cell is loaded for the first time" },
],
});
exports.ImplicitJumpRef = ImplicitJumpRef;
const Ecrecover = () => ({
$: "Ecrecover", costs: [{ value: 1500, description: "For ECRECOVER operation" }],
});
exports.Ecrecover = Ecrecover;
const Secp256k1XonlyPubkeyTweakAdd = () => ({
$: "Secp256k1XonlyPubkeyTweakAdd", costs: [{ value: 1250, description: "For SECP256K1_XONLY_PUBKEY_TWEAK_ADD operation" }],
});
exports.Secp256k1XonlyPubkeyTweakAdd = Secp256k1XonlyPubkeyTweakAdd;
const Chksign = () => ({
$: "Chksign", costs: [{ value: 4000, description: "For CHKSIGN operation" }],
});
exports.Chksign = Chksign;
const P256Chksign = () => ({
$: "P256Chksign", costs: [{ value: 3500, description: "For P256_CHKSIGN operation" }],
});
exports.P256Chksign = P256Chksign;
const Rist255Fromhash = () => ({
$: "Rist255Fromhash", costs: [{ value: 600, description: "For RIST255_FROMHASH operation" }],
});
exports.Rist255Fromhash = Rist255Fromhash;
const Rist255Validate = () => ({
$: "Rist255Validate", costs: [{ value: 200, description: "For RIST255_VALIDATE operation" }],
});
exports.Rist255Validate = Rist255Validate;
const Rist255Add = () => ({
$: "Rist255Add", costs: [{ value: 600, description: "For RIST255_ADD operation" }],
});
exports.Rist255Add = Rist255Add;
const Rist255Mul = () => ({
$: "Rist255Mul", costs: [{ value: 2000, description: "For RIST255_MUL operation" }],
});
exports.Rist255Mul = Rist255Mul;
const Rist255Mulbase = () => ({
$: "Rist255Mulbase", costs: [{ value: 750, description: "For RIST255_MULBASE operation" }],
});
exports.Rist255Mulbase = Rist255Mulbase;
const BlsG1AddSub = () => ({
$: "BlsG1AddSub", costs: [{ value: 3900, description: "For BLS_G1_ADD/BLS_G1_SUB operation" }],
});
exports.BlsG1AddSub = BlsG1AddSub;
const BlsG1Neg = () => ({
$: "BlsG1Neg", costs: [{ value: 750, description: "For BLS_G1_NEG operation" }],
});
exports.BlsG1Neg = BlsG1Neg;
const BlsG1Mul = () => ({
$: "BlsG1Mul", costs: [{ value: 5200, description: "For BLS_G1_MUL operation" }],
});
exports.BlsG1Mul = BlsG1Mul;
const BlsMapToG1 = () => ({
$: "BlsMapToG1", costs: [{ value: 2350, description: "For BLS_MAP_TO_G1 operation" }],
});
exports.BlsMapToG1 = BlsMapToG1;
const BlsG1InGroup = () => ({
$: "BlsG1InGroup", costs: [{ value: 2950, description: "For BLS_G1_INGROUP operation" }],
});
exports.BlsG1InGroup = BlsG1InGroup;
const BlsVerify = () => ({
$: "BlsVerify", costs: [{ value: 61000, description: "For BLS_VERIFY operation" }],
});
exports.BlsVerify = BlsVerify;
const BlsG2AddSub = () => ({
$: "BlsG2AddSub", costs: [{ value: 6100, description: "For BLS_G2_ADD/BLS_G2_SUB operation" }],
});
exports.BlsG2AddSub = BlsG2AddSub;
const BlsG2Neg = () => ({
$: "BlsG2Neg", costs: [{ value: 1550, description: "For BLS_G2_NEG operation" }],
});
exports.BlsG2Neg = BlsG2Neg;
const BlsG2Mul = () => ({
$: "BlsG2Mul", costs: [{ value: 10550, description: "For BLS_G2_MUL operation" }],
});
exports.BlsG2Mul = BlsG2Mul;
const BlsMapToG2 = () => ({
$: "BlsMapToG2", costs: [{ value: 7950, description: "For BLS_MAP_TO_G2 operation" }],
});
exports.BlsMapToG2 = BlsMapToG2;
const BlsG2InGroup = () => ({
$: "BlsG2InGroup", costs: [{ value: 4250, description: "For BLS_G2_INGROUP operation" }],
});
exports.BlsG2InGroup = BlsG2InGroup;
const DynamicGas = (formula, description) => ({
$: "DynamicGas", formula, description,
});
exports.DynamicGas = DynamicGas;
/// end section
// BLS gas price constants
exports.BLS_AGGREGATE_BASE_GAS_PRICE = -2650;
exports.BLS_AGGREGATE_ELEMENT_GAS_PRICE = 4350;
exports.BLS_FAST_AGGREGATE_VERIFY_BASE_GAS_PRICE = 58000;
exports.BLS_FAST_AGGREGATE_VERIFY_ELEMENT_GAS_PRICE = 3000;
exports.BLS_AGGREGATE_VERIFY_BASE_GAS_PRICE = 38500;
exports.BLS_AGGREGATE_VERIFY_ELEMENT_GAS_PRICE = 22500;
exports.BLS_G1_MULTIEXP_BASE_GAS_PRICE = 11375;
exports.BLS_G1_MULTIEXP_COEF1_GAS_PRICE = 630;
exports.BLS_G1_MULTIEXP_COEF2_GAS_PRICE = 8820;
exports.BLS_G2_MULTIEXP_BASE_GAS_PRICE = 30388;
exports.BLS_G2_MULTIEXP_COEF1_GAS_PRICE = 1280;
exports.BLS_G2_MULTIEXP_COEF2_GAS_PRICE = 22840;
exports.BLS_PAIRING_BASE_GAS_PRICE = 20000;
exports.BLS_PAIRING_ELEMENT_GAS_PRICE = 11800;
const superCat = (cat) => {
switch (cat) {
case "add_mul":
case "div":
case "int_cmp":
case "int_const":
case "shift_logic":
case "other_arith":
return "arithmetic";
case "cell_cmp":
case "cell_const":
case "cell_deserialize":
case "cell_serialize":
return "cell";
case "continuation_change":
case "continuation_cond":
case "continuation_cond_loop":
case "continuation_dict_jump":
case "continuation_jump":
return "continuation";
case "crypto_bls":
case "crypto_rist255":
case "crypto_common":
return "crypto";
default:
return cat;
}
};
const cat = (cat, o) => {
const superCategory = superCat(cat);
if (superCategory === cat) {
return { ...o, category: superCategory, subCategory: "" };
}
return { ...o, category: superCategory, subCategory: cat };
};
const effects = (o, ...effects) => {
return { ...o, effects: effects };
};
const version = (version, o) => {
return { ...o, version };
};
exports.MAX_OPCODE_BITS = 24;
const mksimple = (opcode, pfxLen, exec) => {
return {
min: opcode << (exports.MAX_OPCODE_BITS - pfxLen),
max: (opcode + 1) << (exports.MAX_OPCODE_BITS - pfxLen),
checkLen: pfxLen,
skipLen: pfxLen,
args: (0, exports.seq)(),
exec,
category: "",
subCategory: "",
version: undefined,
kind: "simple",
prefix: opcode,
};
};
const mkfixedn = (opcode, pfxLen, argLen, args, exec) => {
return {
min: opcode << (exports.MAX_OPCODE_BITS - pfxLen),
max: (opcode + 1) << (exports.MAX_OPCODE_BITS - pfxLen),
checkLen: pfxLen,
skipLen: pfxLen + argLen,
args,
exec,
category: "",
subCategory: "",
version: undefined,
kind: "fixed",
prefix: opcode,
};
};
const mkfixedpseudo = (opcode, args) => {
return {
min: 0,
max: 0,
checkLen: 0,
skipLen: 0,
args,
exec: "",
category: "",
subCategory: "",
version: undefined,
kind: "fixed",
prefix: opcode,
};
};
const mkfixedrangen = (opcode_min, opcode_max, totLen, argLen, args, exec) => {
return {
min: opcode_min << (exports.MAX_OPCODE_BITS - totLen),
max: opcode_max << (exports.MAX_OPCODE_BITS - totLen),
checkLen: totLen - argLen,
skipLen: totLen,
args,
exec,
category: "",
subCategory: "",
version: undefined,
kind: "fixed-range",
prefix: opcode_min,
};
};
const mkext = (opcode, pfxLen, argLen, args, exec) => {
return {
min: opcode << (exports.MAX_OPCODE_BITS - pfxLen),
max: (opcode + 1) << (exports.MAX_OPCODE_BITS - pfxLen),
checkLen: pfxLen,
skipLen: pfxLen + argLen,
args,
exec,
category: "",
subCategory: "",
version: undefined,
kind: "ext",
prefix: opcode,
};
};
const mkextrange = (opcode_min, opcode_max, totLen, argLen, args, exec) => {
return {
min: opcode_min << (exports.MAX_OPCODE_BITS - totLen),
max: opcode_max << (exports.MAX_OPCODE_BITS - totLen),
checkLen: totLen - argLen,
skipLen: totLen,
args,
exec,
category: "",
subCategory: "",
version: undefined,
kind: "ext-range",
prefix: opcode_min,
};
};
const int8range = (0, exports.range)(-128n, 127n);
const int16range = (0, exports.range)(BigInt(-Math.pow(2, 15)), BigInt(Math.pow(2, 15) - 1));
const uint8range = (0, exports.range)(0n, 255n);
const uint4range = (0, exports.range)(0n, 15n);
const uint2range = (0, exports.range)(0n, BigInt(Math.pow(2, 2) - 1));
const uint3range = (0, exports.range)(0n, BigInt(Math.pow(2, 3) - 1));
const uint5range = (0, exports.range)(0n, BigInt(Math.pow(2, 5) - 1));
const uint6range = (0, exports.range)(0n, BigInt(Math.pow(2, 6) - 1));
const uint7range = (0, exports.range)(0n, BigInt(Math.pow(2, 7) - 1));
const uint10range = (0, exports.range)(0n, BigInt(Math.pow(2, 10) - 1));
const uint11range = (0, exports.range)(0n, BigInt(Math.pow(2, 11) - 1));
const uint14range = (0, exports.range)(0n, BigInt(Math.pow(2, 14) - 1));
const int8 = (0, exports.int)(8, int8range);
const int16 = (0, exports.int)(16, int16range);
const uint0 = (0, exports.uint)(0, { min: 0n, max: 0n });
const uint2 = (0, exports.uint)(2, uint2range);
const uint3 = (0, exports.uint)(3, uint3range);
const uint4 = (0, exports.uint)(4, uint4range);
const uint5 = (0, exports.uint)(5, uint5range);
const uint6 = (0, exports.uint)(6, uint6range);
const uint7 = (0, exports.uint)(7, uint7range);
const uint8 = (0, exports.uint)(8, uint8range);
const uint10 = (0, exports.uint)(10, uint10range);
const uint11 = (0, exports.uint)(11, uint11range);
const uint14 = (0, exports.uint)(14, uint14range);
const hash = (0, exports.uint)(8, { min: 0n, max: 4n });
exports.instructions = {
PUSHNAN: cat("int_const", mksimple(0x83ff, 16, `exec_push_nan`)),
ADD: cat("add_mul", mksimple(0xa0, 8, `(_1) => exec_add(_1, false)`)),
SUB: cat("add_mul", mksimple(0xa1, 8, `(_1) => exec_sub(_1, false)`)),
SUBR: cat("add_mul", mksimple(0xa2, 8, `(_1) => exec_subr(_1, false)`)),
NEGATE: cat("add_mul", mksimple(0xa3, 8, `(_1) => exec_negate(_1, false)`)),
INC: cat("add_mul", mksimple(0xa4, 8, `(_1) => exec_inc(_1, false)`)),
DEC: cat("add_mul", mksimple(0xa5, 8, `(_1) => exec_dec(_1, false)`)),
MUL: cat("add_mul", mksimple(0xa8, 8, `(_1) => exec_mul(_1, false)`)),
POW2: cat("shift_logic", mksimple(0xae, 8, `(_1) => exec_pow2(_1, false)`)),
AND: cat("shift_logic", mksimple(0xb0, 8, `(_1) => exec_and(_1, false)`)),
OR: cat("shift_logic", mksimple(0xb1, 8, `(_1) => exec_or(_1, false)`)),
XOR: cat("shift_logic", mksimple(0xb2, 8, `(_1) => exec_xor(_1, false)`)),
NOT: cat("shift_logic", mksimple(0xb3, 8, `(_1) => exec_not(_1, false)`)),
FITSX: effects(cat("shift_logic", mksimple(0xb600, 16, `(_1) => exec_fits(_1, false)`)), (0, exports.CanThrow)()),
UFITSX: effects(cat("shift_logic", mksimple(0xb601, 16, `(_1) => exec_ufits(_1, false)`)), (0, exports.CanThrow)()),
BITSIZE: cat("shift_logic", mksimple(0xb602, 16, `(_1) => exec_bitsize(_1, true, false)`)),
UBITSIZE: cat("shift_logic", mksimple(0xb603, 16, `(_1) => exec_bitsize(_1, false, false)`)),
MIN: cat("other_arith", mksimple(0xb608, 16, `(_1) => exec_minmax(_1, 2)`)),
MAX: cat("other_arith", mksimple(0xb609, 16, `(_1) => exec_minmax(_1, 4)`)),
MINMAX: cat("other_arith", mksimple(0xb60a, 16, `(_1) => exec_minmax(_1, 6)`)),
ABS: cat("other_arith", mksimple(0xb60b, 16, `(_1) => exec_abs(_1, false)`)),
QADD: cat("add_mul", mksimple(0xb7a0, 16, `(_1) => exec_add(_1, true)`)),
QSUB: cat("add_mul", mksimple(0xb7a1, 16, `(_1) => exec_sub(_1, true)`)),
QSUBR: cat("add_mul", mksimple(0xb7a2, 16, `(_1) => exec_subr(_1, true)`)),
QNEGATE: cat("add_mul", mksimple(0xb7a3, 16, `(_1) => exec_negate(_1, true)`)),
QINC: cat("add_mul", mksimple(0xb7a4, 16, `(_1) => exec_inc(_1, true)`)),
QDEC: cat("add_mul", mksimple(0xb7a5, 16, `(_1) => exec_dec(_1, true)`)),
QMUL: cat("add_mul", mksimple(0xb7a8, 16, `(_1) => exec_mul(_1, true)`)),
QPOW2: cat("shift_logic", mksimple(0xb7ae, 16, `(_1) => exec_pow2(_1, true)`)),
QAND: cat("shift_logic", mksimple(0xb7b0, 16, `(_1) => exec_and(_1, true)`)),
QOR: cat("shift_logic", mksimple(0xb7b1, 16, `(_1) => exec_or(_1, true)`)),
QXOR: cat("shift_logic", mksimple(0xb7b2, 16, `(_1) => exec_xor(_1, true)`)),
QNOT: cat("shift_logic", mksimple(0xb7b3, 16, `(_1) => exec_not(_1, true)`)),
QFITSX: cat("shift_logic", mksimple(0xb7b600, 24, `(_1) => exec_fits(_1, true)`)),
QUFITSX: cat("shift_logic", mksimple(0xb7b601, 24, `(_1) => exec_ufits(_1, true)`)),
QBITSIZE: cat("shift_logic", mksimple(0xb7b602, 24, `(_1) => exec_bitsize(_1, true, true)`)),
QUBITSIZE: cat("shift_logic", mksimple(0xb7b603, 24, `(_1) => exec_bitsize(_1, false, true)`)),
QMIN: cat("other_arith", mksimple(0xb7b608, 24, `(_1) => exec_minmax(_1, 3)`)),
QMAX: cat("other_arith", mksimple(0xb7b609, 24, `(_1) => exec_minmax(_1, 5)`)),
QMINMAX: cat("other_arith", mksimple(0xb7b60a, 24, `(_1) => exec_minmax(_1, 7)`)),
QABS: cat("other_arith", mksimple(0xb7b60b, 24, `(_1) => exec_abs(_1, true)`)),
SGN: cat("int_cmp", mksimple(0xb8, 8, `(_1) => exec_sgn(_1, 0x987, false, 'SGN')`)),
LESS: cat("int_cmp", mksimple(0xb9, 8, `(_1) => exec_cmp(_1, 0x887, false, 'LESS')`)),
EQUAL: cat("int_cmp", mksimple(0xba, 8, `(_1) => exec_cmp(_1, 0x878, false, 'EQUAL')`)),
LEQ: cat("int_cmp", mksimple(0xbb, 8, `(_1) => exec_cmp(_1, 0x877, false, 'LEQ')`)),
GREATER: cat("int_cmp", mksimple(0xbc, 8, `(_1) => exec_cmp(_1, 0x788, false, 'GREATER')`)),
NEQ: cat("int_cmp", mksimple(0xbd, 8, `(_1) => exec_cmp(_1, 0x787, false, 'NEQ')`)),
GEQ: cat("int_cmp", mksimple(0xbe, 8, `(_1) => exec_cmp(_1, 0x778, false, 'GEQ')`)),
CMP: cat("int_cmp", mksimple(0xbf, 8, `(_1) => exec_cmp(_1, 0x987, false, 'CMP')`)),
ISNAN: cat("int_cmp", mksimple(0xc4, 8, `exec_is_nan`)),
CHKNAN: effects(cat("int_cmp", mksimple(0xc5, 8, `exec_chk_nan`)), (0, exports.CanThrow)()),
QSGN: cat("int_cmp", mksimple(0xb7b8, 16, `(_1) => exec_sgn(_1, 0x987, true, 'QSGN')`)),
QLESS: cat("int_cmp", mksimple(0xb7b9, 16, `(_1) => exec_cmp(_1, 0x887, true, 'QLESS')`)),
QEQUAL: cat("int_cmp", mksimple(0xb7ba, 16, `(_1) => exec_cmp(_1, 0x878, true, 'QEQUAL')`)),
QLEQ: cat("int_cmp", mksimple(0xb7bb, 16, `(_1) => exec_cmp(_1, 0x877, true, 'QLEQ')`)),
QGREATER: cat("int_cmp", mksimple(0xb7bc, 16, `(_1) => exec_cmp(_1, 0x788, true, 'QGREATER')`)),
QNEQ: cat("int_cmp", mksimple(0xb7bd, 16, `(_1) => exec_cmp(_1, 0x787, true, 'QNEQ')`)),
QGEQ: cat("int_cmp", mksimple(0xb7be, 16, `(_1) => exec_cmp(_1, 0x778, true, 'QGEQ')`)),
QCMP: cat("int_cmp", mksimple(0xb7bf, 16, `(_1) => exec_cmp(_1, 0x987, true, 'QCMP')`)),
SEMPTY: cat("cell_cmp", mksimple(0xc700, 16, `(_1) => exec_un_cs_cmp(_1, 'SEMPTY', (cs) => cs.empty() && !cs.size_refs())`)),
SDEMPTY: cat("cell_cmp", mksimple(0xc701, 16, `(_1) => exec_un_cs_cmp(_1, 'SDEMPTY', (cs) => cs.empty())`)),
SREMPTY: cat("cell_cmp", mksimple(0xc702, 16, `(_1) => exec_un_cs_cmp(_1, 'SREMPTY', (cs) => !cs.size_refs())`)),
SDFIRST: cat("cell_cmp", mksimple(0xc703, 16, `(_1) => exec_un_cs_cmp(_1, 'SDFIRST', (cs) => cs.prefetch_long(1) == -1)`)),
SDLEXCMP: cat("cell_cmp", mksimple(0xc704, 16, `(_1) => exec_ibin_cs_cmp(_1, 'SDLEXCMP', (cs1, cs2) => cs1.lex_cmp(cs2))`)),
SDEQ: cat("cell_cmp", mksimple(0xc705, 16, `(_1) => exec_bin_cs_cmp(_1, 'SDEQ', (cs1, cs2) => !cs1.lex_cmp(cs2))`)),
SDPFX: cat("cell_cmp", mksimple(0xc708, 16, `(_1) => exec_bin_cs_cmp(_1, 'SDPFX', (cs1, cs2) => cs1.is_prefix_of(cs2))`)),
SDPFXREV: cat("cell_cmp", mksimple(0xc709, 16, `(_1) => exec_bin_cs_cmp(_1, 'SDPFXREV', (cs1, cs2) => cs2.is_prefix_of(cs1))`)),
SDPPFX: cat("cell_cmp", mksimple(0xc70a, 16, `(_1) => exec_bin_cs_cmp(_1, 'SDPPFX', (cs1, cs2) => cs1.is_proper_prefix_of(cs2))`)),
SDPPFXREV: cat("cell_cmp", mksimple(0xc70b, 16, `(_1) => exec_bin_cs_cmp(_1, 'SDPPFXREV', (cs1, cs2) => cs2.is_proper_prefix_of(cs1))`)),
SDSFX: cat("cell_cmp", mksimple(0xc70c, 16, `(_1) => exec_bin_cs_cmp(_1, 'SDSFX', (cs1, cs2) => cs1.is_suffix_of(cs2))`)),
SDSFXREV: cat("cell_cmp", mksimple(0xc70d, 16, `(_1) => exec_bin_cs_cmp(_1, 'SDSFXREV', (cs1, cs2) => cs2.is_suffix_of(cs1))`)),
SDPSFX: cat("cell_cmp", mksimple(0xc70e, 16, `(_1) => exec_bin_cs_cmp(_1, 'SDPSFX', (cs1, cs2) => cs1.is_proper_suffix_of(cs2))`)),
SDPSFXREV: cat("cell_cmp", mksimple(0xc70f, 16, `(_1) => exec_bin_cs_cmp(_1, 'SDPSFXREV', (cs1, cs2) => cs2.is_proper_suffix_of(cs1))`)),
SDCNTLEAD0: cat("cell_cmp", mksimple(0xc710, 16, `(_1) => exec_iun_cs_cmp(_1, 'SDCNTLEAD0', (cs) => cs.count_leading(0))`)),
SDCNTLEAD1: cat("cell_cmp", mksimple(0xc711, 16, `(_1) => exec_iun_cs_cmp(_1, 'SDCNTLEAD1', (cs) => cs.count_leading(1))`)),
SDCNTTRAIL0: cat("cell_cmp", mksimple(0xc712, 16, `(_1) => exec_iun_cs_cmp(_1, 'SDCNTTRAIL0', (cs) => cs.count_trailing(0))`)),
SDCNTTRAIL1: cat("cell_cmp", mksimple(0xc713, 16, `(_1) => exec_iun_cs_cmp(_1, 'SDCNTTRAIL1', (cs) => cs.count_trailing(1))`)),
NEWC: cat("cell_serialize", mksimple(0xc8, 8, `exec_new_builder`)),
ENDC: effects(cat("cell_serialize", mksimple(0xc9, 8, `exec_builder_to_cell`)), (0, exports.CellCreate)()),
// same as STBREFR
ENDCST: effects(cat("cell_serialize", mksimple(0xcd, 8, `(_1) => exec_store_builder_as_ref_rev(_1, false)`)), (0, exports.CellCreate)()),
STBREF: effects(cat("cell_serialize", mksimple(0xcf11, 16, `(_1) => exec_store_builder_as_ref(_1, false)`)), (0, exports.CellCreate)()),
STB: cat("cell_serialize", mksimple(0xcf13, 16, `(_1) => exec_store_builder(_1, false)`)),
STREFR: cat("cell_serialize", mksimple(0xcf14, 16, `(_1) => exec_store_ref_rev(_1, false)`)),
STBREFR: cat("cell_serialize", mksimple(0xcf15, 16, `(_1) => exec_store_builder_as_ref_rev(_1, false)`)),
STSLICER: cat("cell_serialize", mksimple(0xcf16, 16, `(_1) => exec_store_slice_rev(_1, false)`)),
STBR: cat("cell_serialize", mksimple(0xcf17, 16, `(_1) => exec_store_builder_rev(_1, false)`)),
STREFQ: cat("cell_serialize", mksimple(0xcf18, 16, `(_1) => exec_store_ref(_1, true)`)),
STBREFQ: cat("cell_serialize", mksimple(0xcf19, 16, `(_1) => exec_store_builder_as_ref(_1, true)`)),
STSLICEQ: cat("cell_serialize", mksimple(0xcf1a, 16, `(_1) => exec_store_slice(_1, true)`)),
STBQ: cat("cell_serialize", mksimple(0xcf1b, 16, `(_1) => exec_store_builder(_1, true)`)),
STREFRQ: cat("cell_serialize", mksimple(0xcf1c, 16, `(_1) => exec_store_ref_rev(_1, true)`)),
STBREFRQ: cat("cell_serialize", mksimple(0xcf1d, 16, `(_1) => exec_store_builder_as_ref_rev(_1, true)`)),
STSLICERQ: cat("cell_serialize", mksimple(0xcf1e, 16, `(_1) => exec_store_slice_rev(_1, true)`)),
STBRQ: cat("cell_serialize", mksimple(0xcf1f, 16, `(_1) => exec_store_builder_rev(_1, true)`)),
ENDXC: effects(cat("cell_serialize", mksimple(0xcf23, 16, `exec_builder_to_special_cell`)), (0, exports.CellCreate)()),
BDEPTH: cat("cell_serialize", mksimple(0xcf30, 16, `x => exec_int_builder_func(x, 'BDEPTH', b => b.get_depth())`)),
BBITS: cat("cell_serialize", mksimple(0xcf31, 16, `x => exec_int_builder_func(x, 'BBITS', b => b.size())`)),
BREFS: cat("cell_serialize", mksimple(0xcf32, 16, `x => exec_int_builder_func(x, 'BREFS', b => b.size_refs())`)),
BBITREFS: cat("cell_serialize", mksimple(0xcf33, 16, `x => exec_2int_builder_func(x, 'BBITSREFS', b => [b.size(), b.size_refs()])`)),
BREMBITS: cat("cell_serialize", mksimple(0xcf35, 16, `x => exec_int_builder_func(x, 'BREMBITS', b => b.remaining_bits())`)),
BREMREFS: cat("cell_serialize", mksimple(0xcf36, 16, `x => exec_int_builder_func(x, 'BREMREFS', b => b.remaining_refs())`)),
BREMBITREFS: cat("cell_serialize", mksimple(0xcf37, 16, `x => exec_2int_builder_func(x, 'BREMBITSREFS', b => [b.remaining_bits(), b.remaining_refs()])`)),
BCHKREFS: effects(cat("cell_serialize", mksimple(0xcf3a, 16, `(_1) => exec_builder_chk_bits_refs(_1, 2)`)), (0, exports.CanThrow)()),
BCHKBITREFS: effects(cat("cell_serialize", mksimple(0xcf3b, 16, `(_1) => exec_builder_chk_bits_refs(_1, 3)`)), (0, exports.CanThrow)()),
BCHKREFSQ: cat("cell_serialize", mksimple(0xcf3e, 16, `(_1) => exec_builder_chk_bits_refs(_1, 6)`)),
BCHKBITREFSQ: cat("cell_serialize", mksimple(0xcf3f, 16, `(_1) => exec_builder_chk_bits_refs(_1, 7)`)),
STZEROES: cat("cell_serialize", mksimple(0xcf40, 16, `(_1) => exec_store_same(_1, 'STZEROES', 0)`)),
STONES: cat("cell_serialize", mksimple(0xcf41, 16, `(_1) => exec_store_same(_1, 'STONES', 1)`)),
STSAME: cat("cell_serialize", mksimple(0xcf42, 16, `(_1) => exec_store_same(_1, 'STSAME', -1)`)),
CTOS: effects(cat("cell_deserialize", mksimple(0xd0, 8, `exec_cell_to_slice`)), (0, exports.CellLoad)()),
ENDS: cat("cell_deserialize", mksimple(0xd1, 8, `exec_slice_chk_empty`)),
LDREF: cat("cell_deserialize", mksimple(0xd4, 8, `(_1) => exec_load_ref(_1, 0)`)),
LDREFRTOS: effects(cat("cell_deserialize", mksimple(0xd5, 8, `(_1) => exec_load_ref_rev_to_slice(_1, 0)`)), (0, exports.CellLoad)()),
SDCUTFIRST: cat("cell_deserialize", mksimple(0xd720, 16, `x => exec_slice_op_args(x, 'SDCUTFIRST', 1023, (cs, bits) => cs.only_first(bits))`)),
SDSKIPFIRST: cat("cell_deserialize", mksimple(0xd721, 16, `x => exec_slice_op_args(x, 'SDSKIPFIRST', 1023, (cs, bits) => cs.skip_first(bits))`)),
SDCUTLAST: cat("cell_deserialize", mksimple(0xd722, 16, `x => exec_slice_op_args(x, 'SDCUTLAST', 1023, (cs, bits) => cs.only_last(bits))`)),
SDSKIPLAST: cat("cell_deserialize", mksimple(0xd723, 16, `x => exec_slice_op_args(x, 'SDSKIPLAST', 1023, (cs, bits) => cs.skip_last(bits))`)),
SDSUBSTR: cat("cell_deserialize", mksimple(0xd724, 16, `x => exec_slice_op_args2(x, 'SDSUBSTR', 1023, 1023, (cs, offs, bits) => cs.skip_first(offs) && cs.only_first(bits))`)),
SCUTFIRST: cat("cell_deserialize", mksimple(0xd730, 16, `x => exec_slice_op_args2(x, 'SCUTFIRST', 1023, 4, (cs, bits, refs) => cs.only_first(bits, refs))`)),
SSKIPFIRST: cat("cell_deserialize", mksimple(0xd731, 16, `x => exec_slice_op_args2(x, 'SSKIPFIRST', 1023, 4, (cs, bits, refs) => cs.skip_first(bits, refs))`)),
SCUTLAST: cat("cell_deserialize", mksimple(0xd732, 16, `x => exec_slice_op_args2(x, 'SCUTLAST', 1023, 4, (cs, bits, refs) => cs.only_last(bits, refs))`)),
SSKIPLAST: cat("cell_deserialize", mksimple(0xd733, 16, `x => exec_slice_op_args2(x, 'SSKIPLAST', 1023, 4, (cs, bits, refs) => cs.skip_last(bits, refs))`)),
SUBSLICE: cat("cell_deserialize", mksimple(0xd734, 16, `exec_subslice`)),
SPLIT: cat("cell_deserialize", mksimple(0xd736, 16, `(_1) => exec_split(_1, false)`)),
SPLITQ: cat("cell_deserialize", mksimple(0xd737, 16, `(_1) => exec_split(_1, true)`)),
XCTOS: cat("cell_deserialize", mksimple(0xd739, 16, `exec_cell_to_slice_maybe_special`)),
XLOAD: cat("cell_deserialize", mksimple(0xd73a, 16, `(_1) => exec_load_special_cell(_1, false)`)),
XLOADQ: cat("cell_deserialize", mksimple(0xd73b, 16, `(_1) => exec_load_special_cell(_1, true)`)),
SCHKBITS: effects(cat("cell_deserialize", mksimple(0xd741, 16, `x => exec_slice_chk_op_args(x, 'SCHKBITS', 1023, false, (cs, bits) => cs.have(bits))`)), (0, exports.CanThrow)()),
SCHKREFS: effects(cat("cell_deserialize", mksimple(0xd742, 16, `x => exec_slice_chk_op_args(x, 'SCHKREFS', 1023, false, (cs, refs) => cs.have_refs(refs))`)), (0, exports.CanThrow)()),
SCHKBITREFS: effects(cat("cell_deserialize", mksimple(0xd743, 16, `x => exec_slice_chk_op_args2(x, 'SCHKBITREFS', 1023, 4, false, (cs, bits, refs) => cs.have(bits) && cs.have_refs(refs))`)), (0, exports.CanThrow)()),
SCHKBITSQ: cat("cell_deserialize", mksimple(0xd745, 16, `x => exec_slice_chk_op_args(x, 'SCHKBITSQ', 1023, true, (cs, bits) => cs.have(bits))`)),
SCHKREFSQ: cat("cell_deserialize", mksimple(0xd746, 16, `x => exec_slice_chk_op_args(x, 'SCHKREFSQ', 1023, true, (cs, refs) => cs.have_refs(refs))`)),
SCHKBITREFSQ: cat("cell_deserialize", mksimple(0xd747, 16, `x => exec_slice_chk_op_args2(x, 'SCHKBITREFSQ', 1023, 4, true, (cs, bits, refs) => cs.have(bits) && cs.have_refs(refs))`)),
PLDREFVAR: cat("cell_deserialize", mksimple(0xd748, 16, `exec_preload_ref`)),
SBITS: cat("cell_deserialize", mksimple(0xd749, 16, `(_1) => exec_slice_bits_refs(_1, 1)`)),
SREFS: cat("cell_deserialize", mksimple(0xd74a, 16, `(_1) => exec_slice_bits_refs(_compute_len_slice_begins_with_const1, 2)`)),
SBITREFS: cat("cell_deserialize", mksimple(0xd74b, 16, `(_1) => exec_slice_bits_refs(_1, 3)`)),
LDZEROES: cat("cell_deserialize", mksimple(0xd760, 16, `(_1) => exec_load_same(_1, 'LDZEROES', 0)`)),
LDONES: cat("cell_deserialize", mksimple(0xd761, 16, `(_1) => exec_load_same(_1, 'LDONES', 1)`)),
LDSAME: cat("cell_deserialize", mksimple(0xd762, 16, `(_1) => exec_load_same(_1, 'LDSAME', -1)`)),
SDEPTH: cat("cell_deserialize", mksimple(0xd764, 16, `exec_slice_depth`)),
CDEPTH: cat("cell_deserialize", mksimple(0xd765, 16, `exec_cell_depth`)),
CLEVEL: version(6, cat("cell_deserialize", mksimple(0xd766, 16, `exec_cell_level`))),
CLEVELMASK: version(6, cat("cell_deserialize", mksimple(0xd767, 16, `exec_cell_level_mask`))),
CHASHIX: version(6, cat("cell_deserialize", mksimple(0xd770, 16, ` (_1) => exec_cell_hash_i(_1, 0, true)`))),
CDEPTHIX: version(6, cat("cell_deserialize", mksimple(0xd771, 16, ` (_1) => exec_cell_depth_i(_1, 0, true)`))),
EXECUTE: cat("continuation_jump", mksimple(0xd8, 8, `exec_execute`)),
JMPX: cat("continuation_jump", mksimple(0xd9, 8, `exec_jmpx`)),
RET: cat("continuation_jump", mksimple(0xdb30, 16, `exec_ret`)),
RETALT: cat("continuation_jump", mksimple(0xdb31, 16, `exec_ret_alt`)),
RETBOOL: cat("continuation_jump", mksimple(0xdb32, 16, `exec_ret_bool`)),
CALLCC: cat("continuation_jump", mksimple(0xdb34, 16, `exec_callcc`)),
JMPXDATA: cat("continuation_jump", mksimple(0xdb35, 16, `exec_jmpx_data`)),
CALLXVARARGS: cat("continuation_jump", mksimple(0xdb38, 16, `exec_callx_varargs`)),
RETVARARGS: cat("continuation_jump", mksimple(0xdb39, 16, `exec_ret_varargs`)),
JMPXVARARGS: cat("continuation_jump", mksimple(0xdb3a, 16, `exec_jmpx_varargs`)),
CALLCCVARARGS: cat("continuation_jump", mksimple(0xdb3b, 16, `exec_callcc_varargs`)),
RETDATA: cat("continuation_jump", mksimple(0xdb3f, 16, `exec_ret_data`)),
RUNVMX: version(4, cat("continuation_jump", mksimple(0xdb50, 16, `exec_runvmx`))),
IFRET: cat("continuation_cond", mksimple(0xdc, 8, `exec_ifret`)),
IFNOTRET: cat("continuation_cond", mksimple(0xdd, 8, `exec_ifnotret`)),
IF: cat("continuation_cond", mksimple(0xde, 8, `exec_if`)),
IFNOT: cat("continuation_cond", mksimple(0xdf, 8, `exec_ifnot`)),
IFJMP: cat("continuation_cond", mksimple(0xe0, 8, `exec_if_jmp`)),
IFNOTJMP: cat("continuation_cond", mksimple(0xe1, 8, `exec_ifnot_jmp`)),
IFELSE: cat("continuation_cond", mksimple(0xe2, 8, `exec_if_else`)),
CONDSEL: cat("continuation_cond", mksimple(0xe304, 16, `exec_condsel`)),
CONDSELCHK: cat("continuation_cond", mksimple(0xe305, 16, `exec_condsel_chk`)),
IFRETALT: cat("continuation_cond", mksimple(0xe308, 16, `exec_ifretalt`)),
IFNOTRETALT: cat("continuation_cond", mksimple(0xe309, 16, `exec_ifnotretalt`)),
REPEAT: cat("continuation_cond_loop", mksimple(0xe4, 8, `(_1) => exec_repeat(_1, false)`)),
REPEATEND: cat("continuation_cond_loop", mksimple(0xe5, 8, `(_1) => exec_repeat_end(_1, false)`)),
UNTIL: cat("continuation_cond_loop", mksimple(0xe6, 8, `(_1) => exec_until(_1, false)`)),
UNTILEND: cat("continuation_cond_loop", mksimple(0xe7, 8, `(_1) => exec_until_end(_1, false)`)),
WHILE: cat("continuation_cond_loop", mksimple(0xe8, 8, `(_1) => exec_while(_1, false)`)),
WHILEEND: cat("continuation_cond_loop", mksimple(0xe9, 8, `(_1) => exec_while_end(_1, false)`)),
AGAIN: cat("continuation_cond_loop", mksimple(0xea, 8, `(_1) => exec_again(_1, false)`)),
AGAINEND: cat("continuation_cond_loop", mksimple(0xeb, 8, `(_1) => exec_again_end(_1, false)`)),
REPEATBRK: cat("continuation_cond_loop", mksimple(0xe314, 16, `(_1) => exec_repeat(_1, true)`)),
REPEATENDBRK: cat("continuation_cond_loop", mksimple(0xe315, 16, `(_1) => exec_repeat_end(_1, true)`)),
UNTILBRK: cat("continuation_cond_loop", mksimple(0xe316, 16, `(_1) => exec_until(_1, true)`)),
UNTILENDBRK: cat("continuation_cond_loop", mksimple(0xe317, 16, `(_1) => exec_until_end(_1, true)`)),
WHILEBRK: cat("continuation_cond_loop", mksimple(0xe318, 16, `(_1) => exec_while(_1, true)`)),
WHILEENDBRK: cat("continuation_cond_loop", mksimple(0xe319, 16, `(_1) => exec_while_end(_1, true)`)),
AGAINBRK: cat("continuation_cond_loop", mksimple(0xe31a, 16, `(_1) => exec_again(_1, true)`)),
AGAINENDBRK: cat("continuation_cond_loop", mksimple(0xe31b, 16, `(_1) => exec_again_end(_1, true)`)),
RETURNVARARGS: cat("continuation_change", mksimple(0xed10, 16, `exec_return_varargs`)),
SETCONTVARARGS: cat("continuation_change", mksimple(0xed11, 16, `exec_setcont_varargs`)),
SETNUMVARARGS: cat("continuation_change", mksimple(0xed12, 16, `exec_setnum_varargs`)),
BLESS: cat("continuation_change", mksimple(0xed1e, 16, `exec_bless`)),
BLESSVARARGS: cat("continuation_change", mksimple(0xed1f, 16, `exec_bless_varargs`)),
PUSHCTRX: cat("continuation_change", mksimple(0xede0, 16, `exec_push_ctr_var`)),
POPCTRX: cat("continuation_change", mksimple(0xede1, 16, `exec_pop_ctr_var`)),
SETCONTCTRX: cat("continuation_change", mksimple(0xede2, 16, `exec_setcont_ctr_var`)),
SETCONTCTRMANYX: version(9, cat("continuation_change", mksimple(0xede4, 16, `exec_setcont_ctr_many_var`))),
BOOLAND: cat("continuation_change", mksimple(0xedf0, 16, `(_1) => exec_compos(_1, 1, 'BOOLAND')`)),
BOOLOR: cat("continuation_change", mksimple(0xedf1, 16, `(_1) => exec_compos(_1, 2, 'BOOLOR')`)),
COMPOSBOTH: cat("continuation_change", mksimple(0xedf2, 16, `(_1) => exec_compos(_1, 3, 'COMPOSBOTH')`)),
ATEXIT: cat("continuation_change", mksimple(0xedf3, 16, `exec_atexit`)),
ATEXITALT: cat("continuation_change", mksimple(0xedf4, 16, `exec_atexit_alt`)),
SETEXITALT: cat("continuation_change", mksimple(0xedf5, 16, `exec_setexit_alt`)),
THENRET: cat("continuation_change", mksimple(0xedf6, 16, `exec_thenret`)),
THENRETALT: cat("continuation_change", mksimple(0xedf7, 16, `exec_thenret_alt`)),
INVERT: cat("continuation_change", mksimple(0xedf8, 16, `exec_invert`)),
BOOLEVAL: cat("continuation_change", mksimple(0xedf9, 16, `exec_booleval`)),
SAMEALT: cat("continuation_change", mksimple(0xedfa, 16, `(_1) => exec_samealt(_1, false)`)),
SAMEALTSAVE: cat("continuation_change", mksimple(0xedfb, 16, `(_1) => exec_samealt(_1, true)`)),
TRY: cat("exception", mksimple(0xf2ff, 16, `(_1) => exec_try(_1, -1)`)),
STDICT: cat("dictionary", mksimple(0xf400, 16, `exec_store_dict`)),
SKIPDICT: cat("dictionary", mksimple(0xf401, 16, `exec_skip_dict`)),
LDDICTS: cat("dictionary", mksimple(0xf402, 16, `(_1) => exec_load_dict_slice(_1, 0)`)),
PLDDICTS: cat("dictionary", mksimple(0xf403, 16, `(_1) => exec_load_dict_slice(_1, 1)`)),
LDDICT: cat("dictionary", mksimple(0xf404, 16, `(_1) => exec_load_dict(_1, 0)`)),
PLDDICT: cat("dictionary", mksimple(0xf405, 16, `(_1) => exec_load_dict(_1, 1)`)),
LDDICTQ: cat("dictionary", mksimple(0xf406, 16, `(_1) => exec_load_dict(_1, 2)`)),
PLDDICTQ: cat("dictionary", mksimple(0xf407, 16, `(_1) => exec_load_dict(_1, 3)`)),
PFXDICTSET: cat("dictionary", mksimple(0xf470, 16, `(_1) => exec_pfx_dict_set(_1, Set, 'SET')`)),
PFXDICTREPLACE: cat("dictionary", mksimple(0xf471, 16, `(_1) => exec_pfx_dict_set(_1, Replace, 'REPLACE')`)),
PFXDICTADD: cat("dictionary", mksimple(0xf472, 16, `(_1) => exec_pfx_dict_set(_1, Add, 'ADD')`)),
PFXDICTDEL: cat("dictionary", mksimple(0xf473, 16, `exec_pfx_dict_delete`)),
PFXDICTGETQ: cat("dictionary", mksimple(0xf4a8, 16, `(_1) => exec_pfx_dict_get(_1, 0, 'Q')`)),
PFXDICTGET: cat("dictionary", mksimple(0xf4a9, 16, `(_1) => exec_pfx_dict_get(_1, 1, '')`)),
PFXDICTGETJMP: cat("dictionary", mksimple(0xf4aa, 16, `(_1) => exec_pfx_dict_get(_1, 2, 'JMP')`)),
PFXDICTGETEXEC: cat("dictionary", mksimple(0xf4ab, 16, `(_1) => exec_pfx_dict_get(_1, 3, 'EXEC')`)),
NOP: cat("stack", mksimple(0x00, 8, `exec_nop`)),
SWAP: cat("stack", mksimple(0x01, 8, `exec_swap`)),
DUP: cat("stack", mksimple(0x20, 8, `exec_dup`)),
OVER: cat("stack", mksimple(0x21, 8, `exec_over`)),
DROP: cat("stack", mksimple(0x30, 8, `exec_drop`)),
NIP: cat("stack", mksimple(0x31, 8, `exec_nip`)),
ROT: cat("stack", mksimple(0x58, 8, `exec_rot`)),
ROTREV: cat("stack", mksimple(0x59, 8, `exec_rotrev`)),
PICK: cat("stack", mksimple(0x60, 8, `exec_pick`)),
ROLL: cat("stack", mksimple(0x61, 8, `exec_roll`)),
ROLLREV: cat("stack", mksimple(0x62, 8, `exec_rollrev`)),
BLKSWX: cat("stack", mksimple(0x63, 8, `exec_blkswap_x`)),
REVX: cat("stack", mksimple(0x64, 8, `exec_reverse_x`)),
DROPX: cat("stack", mksimple(0x65, 8, `exec_drop_x`)),
TUCK: cat("stack", mksimple(0x66, 8, `exec_tuck`)),
XCHGX: cat("stack", mksimple(0x67, 8, `exec_xchg_x`)),
DEPTH: cat("stack", mksimple(0x68, 8, `exec_depth`)),
CHKDEPTH: effects(cat("stack", mksimple(0x69, 8, `exec_chkdepth`)), (0, exports.CanThrow)()),
ONLYTOPX: cat("stack", mksimple(0x6a, 8, `exec_onlytop_x`)),
ONLYX: cat("stack", mksimple(0x6b, 8, `exec_only_x`)),
ACCEPT: cat("basic_gas", mksimple(0xf800, 16, `exec_accept`)),
SETGASLIMIT: cat("basic_gas", mksimple(0xf801, 16, `exec_set_gas_limit`)),
GASCONSUMED: version(4, cat("basic_gas", mksimple(0xf807, 16, `exec_gas_consumed`))),
COMMIT: cat("basic_gas", mksimple(0xf80f, 16, `exec_commit`)),
NOW: cat("config", mksimple(0xf823, 16, `(_1) => exec_get_param(_1, 3, 'NOW')`)),
BLOCKLT: cat("config", mksimple(0xf824, 16, `(_1) => exec_get_param(_1, 4, 'BLOCKLT')`)),
LTIME: cat("config", mksimple(0xf825, 16, `(_1) => exec_get_param(_1, 5, 'LTIME')`)),
RANDSEED: cat("config", mksimple(0xf826, 16, `(_1) => exec_get_param(_1, 6, 'RANDSEED')`)),
BALANCE: cat("config", mksimple(0xf827, 16, `(_1) => exec_get_param(_1, 7, 'BALANCE')`)),
MYADDR: cat("config", mksimple(0xf828, 16, `(_1) => exec_get_param(_1, 8, 'MYADDR')`)),
CONFIGROOT: cat("config", mksimple(0xf829, 16, `(_1) => exec_get_param(_1, 9, 'CONFIGROOT')`)),
MYCODE: cat("config", mksimple(0xf82a, 16, `(_1) => exec_get_param(_1, 10, 'MYCODE')`)),
INCOMINGVALUE: cat("config", mksimple(0xf82b, 16, `(_1) => exec_get_param(_1, 11, 'INCOMINGVALUE')`)),
STORAGEFEES: cat("config", mksimple(0xf82c, 16, `(_1) => exec_get_param(_1, 12, 'STORAGEFEES')`)),
PREVBLOCKSINFOTUPLE: cat("config", mksimple(0xf82d, 16, `(_1) => exec_get_param(_1, 13, 'PREVBLOCKSINFOTUPLE')`)),
UNPACKEDCONFIGTUPLE: cat("config", mksimple(0xf82e, 16, `(_1) => exec_get_param(_1, 14, 'UNPACKEDCONFIGTUPLE')`)),
DUEPAYMENT: cat("config", mksimple(0xf82f, 16, `(_1) => exec_get_param(_1, 15, 'DUEPAYMENT')`)),
CONFIGDICT: cat("config", mksimple(0xf830, 16, `exec_get_config_dict`)),
CONFIGPARAM: cat("config", mksimple(0xf832, 16, `(_1) => exec_get_config_param(_1, false)`)),
CONFIGOPTPARAM: cat("config", mksimple(0xf833, 16, `(_1) => exec_get_config_param(_1, true)`)),
PREVMCBLOCKS: version(4, cat("config", mksimple(0xf83400, 24, `(_1) => exec_get_prev_blocks_info(_1, 0, 'PREVMCBLOCKS')`))),
PREVKEYBLOCK: version(4, cat("config", mksimple(0xf83401, 24, `(_1) => exec_get_prev_blocks_info(_1, 1, 'PREVKEYBLOCK')`))),
PREVMCBLOCKS_100: version(9, cat("config", mksimple(0xf83402, 24, `(_1) => exec_get_prev_blocks_info(_1, 2, 'PREVMCBLOCKS_100')`))),
GLOBALID: version(4, cat("config", mksimple(0xf835, 16, `exec_get_global_id`))),
GETGASFEE: version(6, cat("config", mksimple(0xf836, 16, `exec_get_gas_fee`))),
GETSTORAGEFEE: version(6, cat("config", mksimple(0xf837, 16, `exec_get_storage_fee`))),
GETFORWARDFEE: version(6, cat("config", mksimple(0xf838, 16, `exec_get_forward_fee`))),
GETPRECOMPILEDGAS: version(6, cat("config", mksimple(0xf839, 16, `exec_get_precompiled_gas`))),
GETORIGINALFWDFEE: version(6, cat("config", mksimple(0xf83a, 16, `exec_get_original_fwd_fee`))),
GETGASFEESIMPLE: version(6, cat("config", mksimple(0xf83b, 16, `exec_get_gas_fee_simple`))),
GETFORWARDFEESIMPLE: version(6, cat("config", mksimple(0xf83c, 16, `exec_get_forward_fee_simple`))),
GETGLOBVAR: cat("globals", mksimple(0xf840, 16, `exec_get_global_var`)),
SETGLOBVAR: cat("globals", mksimple(0xf860, 16, `exec_set_global_var`)),
RANDU256: cat("prng", mksimple(0xf810, 16, `exec_randu256`)),
RAND: cat("prng", mksimple(0xf811, 16, `exec_rand_int`)),
SETRAND: cat("prng", mksimple(0xf814, 16, `(_1) => exec_set_rand(_1, false)`)),
ADDRAND: cat("prng", mksimple(0xf815, 16, `(_1) => exec_set_rand(_1, true)`)),
HASHCU: cat("crypto_common", mksimple(0xf900, 16, `(_1) => exec_compute_hash(_1, 0)`)),
HASHSU: effects(cat("crypto_common", mksimple(0xf901, 16, `(_1) => exec_compute_hash(_1, 1)`)), (0, exports.CellCreate)()),
SHA256U: cat("crypto_common", mksimple(0xf902, 16, `exec_compute_sha256`)),
CHKSIGNU: effects(cat("crypto_common", mksimple(0xf910, 16, `(_1) => exec_ed25519_check_signature(_1, false)`)), (0, exports.Chksign)()),
CHKSIGNS: effects(cat("crypto_common", mksimple(0xf911, 16, `(_1) => exec_ed25519_check_signature(_1, true)`)), (0, exports.Chksign)()),
ECRECOVER: version(4, effects(cat("crypto_common", mksimple(0xf912, 16, `exec_ecrecover`)), (0, exports.Ecrecover)())),
SECP256K1_XONLY_PUBKEY_TWEAK_ADD: version(9, effects(cat("crypto_common", mksimple(0xf913, 16, `exec_secp256k1_xonly_pubkey_tweak_add`)), (0, exports.Secp256k1XonlyPubkeyTweakAdd)())),
P256_CHKSIGNU: version(4, effects(cat("crypto_common", mksimple(0xf914, 16, `(_1) => exec_p256_chksign(_1, false)`)), (0, exports.P256Chksign)())),
P256_CHKSIGNS: version(4, effects(cat("crypto_common", mksimple(0xf915, 16, `(_1) => exec_p256_chksign(_1, true)`)), (0, exports.P256Chksign)())),
RIST255_FROMHASH: version(4, effects(cat("crypto_rist255", mksimple(0xf920, 16, `exec_ristretto255_from_hash`)), (0, exports.Rist255Fromhash)())),
RIST255_VALIDATE: version(4, effects(cat("crypto_rist255", mksimple(0xf921, 16, `(_1) => exec_ristretto255_validate(_1, false)`)), (0, exports.Rist255Validate)())),
RIST255_ADD: version(4, effects(cat("crypto_rist255", mksimple(0xf922, 16, `(_1) => exec_ristretto255_add(_1, false)`)), (0, exports.Rist255Add)())),
RIST255_SUB: version(4, effects(cat("crypto_rist255", mksimple(0xf923, 16, `(_1) => exec_ristretto255_sub(_1, false)`)), (0, exports.Rist255Add)())),
RIST255_MUL: version(4, effects(cat("crypto_rist255", mksimple(0xf924, 16, `(_1) => exec_ristretto255_mul(_1, false)`)), (0, exports.Rist255Mul)())),
RIST255_MULBASE: version(4, effects(cat("crypto_rist255", mksimple(0xf925, 16, `(_1) => exec_ristretto255_mul_base(_1, false)`)), (0, exports.Rist255Mulbase)())),
RIST255_PUSHL: version(4, cat("crypto_rist255", mksimple(0xf926, 16, `exec_ristretto255_push_l`))),
RIST255_QVALIDATE: version(4, effects(cat("crypto_rist255", mksimple(0xb7f921, 24, `(_1) => exec_ristretto255_validate(_1, true)`)), (0, exports.Rist255Validate)())),
RIST255_QADD: version(4, effects(cat("crypto_rist255", mksimple(0xb7f922, 24, `(_1) => exec_ristretto255_add(_1, true)`)), (0, exports.Rist255Add)())),
RIST255_QSUB: version(4, effects(cat("crypto_rist255", mksimple(0xb7f923, 24, `(_1) => exec_ristretto255_sub(_1, true)`)), (0, exports.Rist255Add)())),
RIST255_QMUL: version(4, effects(cat("crypto_rist255", mksimple(0xb7f924, 24, `(_1) => exec_ristretto255_mul(_1, true)`)), (0, exports.Rist255Mul)())),
RIST255_QMULBASE: version(4, effects(cat("crypto_rist255", mksimple(0xb7f925, 24, `(_1) => exec_ristretto255_mul_base(_1, true)`)), (0, exports.Rist255Mulbase)())),
BLS_VERIFY: version(4, effects(cat("crypto_bls", mksimple(0xf93000, 24, `exec_bls_verify`)), (0, exports.BlsVerify)())),
BLS_AGGREGATE: version(4, effects(cat("crypto_bls", mksimple(0xf93001, 24, `exec_bls_aggregate`)), (0, exports.DynamicGas)(`${exports.BLS_AGGREGATE_BASE_GAS_PRICE} + n * ${exports.BLS_AGGREGATE_ELEMENT_GAS_PRICE}`, "For BLS_AGGREGATE operation"))),
BLS_FASTAGGREGATEVERIFY: version(4, effects(cat("crypto_bls", mksimple(0xf93002, 24, `exec_bls_fast_aggregate_verify`)), (0, exports.DynamicGas)(`${exports.BLS_FAST_AGGREGATE_VERIFY_BASE_GAS_PRICE} + n * ${exports.BLS_FAST_AGGREGATE_VERIFY_ELEMENT_GAS_PRICE}`, "For BLS_FASTAGGREGATEVERIFY operation"))),
BLS_AGGREGATEVERIFY: version(4, effects(cat("crypto_bls", mksimple(0xf93003, 24, `exec_bls_aggregate_verify`)), (0, exports.DynamicGas)(`${exports.BLS_AGGREGATE_VERIFY_BASE_GAS_PRICE} + n * ${exports.BLS_AGGREGATE_VERIFY_ELEMENT_GAS_PRICE}`, "For BLS_AGGREGATEVERIFY operation"))),
BLS_G1_ADD: version(4, effects(cat("crypto_bls", mksimple(0xf93010, 24, `exec_bls_g1_add`)), (0, exports.BlsG1AddSub)())),
BLS_G1_SUB: version(4, effects(cat("crypto_bls", mksimple(0xf93011, 24, `exec_bls_g1_sub`)), (0, exports.BlsG1AddSub)())),
BLS_G1_NEG: version(4, effects(cat("crypto_bls", mksimple(0xf93012, 24, `exec_bls_g1_neg`)), (0, exports.BlsG1Neg)())),
BLS_G1_MUL: version(4, effects(cat("crypto_bls", mksimple(0xf93013, 24, `exec_bls_g1_mul`)), (0, exports.BlsG1Mul)())),
BLS_G1_MULTIEXP: version(4, effects(cat("crypto_bls", mksimple(0xf93014, 24, `exec_bls_g1_multiexp`)), (0, exports.DynamicGas)(`${exports.BLS_G1_MULTIEXP_BASE_GAS_PRICE} + ${exports.BLS_G1_MULTIEXP_COEF1_GAS_PRICE} * n + ${exports.BLS_G1_MULTIEXP_COEF2_GAS_PRICE} * n * n`, "For BLS_G1_MULTIEXP operation"))),
BLS_G1_ZERO: version(4, cat("crypto_bls", mksimple(0xf93015, 24, `exec_bls_g1_zero`))),
BLS_MAP_TO_G1: version(4, effects(cat("crypto_bls", mksimple(0xf93016, 24, `exec_bls_map_to_g1`)), (0, exports.BlsMapToG1)())),
BLS_G1_INGROUP: version(4, effects(cat("crypto_bls", mksimple(0xf93017, 24, `exec_bls_g1_in_group`)), (0, exports.BlsG1InGroup)())),
BLS_G1_ISZERO: version(4, cat("crypto_bls", mksimple(0xf93018, 24, `exec_bls_g1_is_zero`))),
BLS_G2_ADD: version(4, effects(cat("crypto_bls", mksimple(0xf93020, 24, `exec_bls_g2_add`)), (0, exports.BlsG2AddSub)())),
BLS_G2_SUB: version(4, effects(cat("crypto_bls", mksimple(0xf93021, 24, `exec_bls_g2_sub`)), (0, exports.BlsG2AddSub)())),
BLS_G2_NEG: version(4, effects(cat("crypto_bls", mksimple(0xf93022, 24, `exec_bls_g2_neg`)), (0, exports.BlsG2Neg)())),
BLS_G2_MUL: version(4, effects(cat("crypto_bls", mksimple(0xf93023, 24, `exec_bls_g2_mul`)), (0, exports.BlsG2Mul)())),
BLS_G2_MULTIEXP: version(4, effects(cat("crypto_bls", mksimple(0xf93024, 24, `exec_bls_g2_multiexp`)), (0, exports.DynamicGas)(`${exports.BLS_G2_MULTIEXP_BASE_GAS_PRICE} + ${exports.BLS_G2_MULTIEXP_COEF1_GAS_PRICE} * n + ${exports.BLS_G2_MULTIEXP_COEF2_GAS_PRICE} * n * n`, "For BLS_G2_MULTIEXP operation"))),
BLS_G2_ZERO: version(4, cat("crypto_bls", mksimple(0xf93025, 24, `exec_bls_g2_zero`))),
BLS_MAP_TO_G2: version(4, effects(cat("crypto_bls", mksimple(0xf93026, 24, `exec_bls_map_to_g2`)), (0, exports.BlsMapToG2)())),
BLS_G2_INGROUP: version(4, effects(cat("crypto_bls", mksimple(0xf93027, 24, `exec_bls_g2_in_group`)), (0, exports.BlsG2InGroup)())),
BLS_G2_ISZERO: version(4, cat("crypto_bls", mksimple(0xf93028, 24, `exec_bls_g2_is_zero`))),
BLS_PAIRING: version(4, effects(cat("crypto_bls", mksimple(0xf93030, 24, `exec_bls_pairing`)), (0, exports.DynamicGas)(`${exports.BLS_PAIRING_BASE_GAS_PRICE} + n * ${exports.BLS_PAIRING_ELEMENT_GAS_PRICE}`, "For BLS_PAIRING operation"))),
BLS_PUSHR: version(4, cat("crypto_bls", mksimple(0xf93031, 24, `exec_bls_push_r`))),
CDATASIZEQ: cat("misc", mksimple(0xf940, 16, `(_1) => exec_compute_data_size(_1, 1)`)),
CDATASIZE: cat("misc", mksimple(0xf941, 16, `(_1) => exec_compute_data_size(_1, 0)`)),
SDATASIZEQ: cat("misc", mksimple(0xf942, 16, `(_1) => exec_compute_data_size(_1, 3)`)),
SDATASIZE: cat("misc", mksimple(0xf943, 16, `(_1) => exec_compute_data_size(_1, 2)`)),
LDGRAMS: cat("cell_deserialize", mksimple(0xfa00, 16, `(_1) => exec_load_var_integer(_1, 4, false, false)`)),
LDVARINT16: cat("cell_deserialize", mksimple(0xfa01, 16, `(_1) => exec_load_var_integer(_1, 4, true, false)`)),
STGRAMS: cat("cell_serialize", mksimple(0xfa02, 16, `(_1) => exec_store_var_integer(_1, 4, false, false)`)),
STVARINT16: cat("cell_serialize