UNPKG

ton-assembly

Version:

TON assembler and disassembler

674 lines (673 loc) 111 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 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.ImplicitJumpRef = exports.Tuple = exports.AlwaysThrow = exports.CanThrow = exports.CellCreate = exports.CellLoad = exports.debugstr = exports.dictpush = exports.exoticCell = exports.slice = exports.refCodeSlice = exports.inlineCodeSlice = exports.codeSlice = exports.xchgArgs = exports.seq = exports.setcpArg = exports.hash = exports.runvmArg = exports.minusOne = exports.s1 = exports.largeInt = exports.tinyInt = exports.plduzArg = exports.control = exports.stack2 = exports.stack = exports.delta = exports.refs = exports.int = exports.uint = exports.range = 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 refs = (count) => ({ $: "refs", count }); exports.refs = refs; 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.runvmArg = { $: "runvmArg" }; exports.hash = { $: "hash" }; exports.setcpArg = { $: "setcpArg", range: (0, exports.range)(-15n, 239n) }; const seq = (...args) => ({ $: "simpleArgs", children: args }); exports.seq = seq; exports.xchgArgs = { $: "xchgArgs", range: (0, exports.range)(1n, 16n) }; 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.exoticCell = { $: "exoticCell" }; exports.dictpush = { $: "dictpush" }; 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 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 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 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 uint11 = (0, exports.uint)(11, uint11range); const uint14 = (0, exports.uint)(14, uint14range); 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: cat("crypto_common", mksimple(0xf910, 16, `(_1) => exec_ed25519_check_signature(_1, false)`)), CHKSIGNS: cat("crypto_common", mksimple(0xf911, 16, `(_1) => exec_ed25519_check_signature(_1, true)`)), ECRECOVER: version(4, cat("crypto_common", mksimple(0xf912, 16, `exec_ecrecover`))), SECP256K1_XONLY_PUBKEY_TWEAK_ADD: version(9, cat("crypto_common", mksimple(0xf913, 16, `exec_secp256k1_xonly_pubkey_tweak_add`))), P256_CHKSIGNU: version(4, cat("crypto_common", mksimple(0xf914, 16, `(_1) => exec_p256_chksign(_1, false)`))), P256_CHKSIGNS: version(4, cat("crypto_common", mksimple(0xf915, 16, `(_1) => exec_p256_chksign(_1, true)`))), RIST255_FROMHASH: version(4, cat("crypto_rist255", mksimple(0xf920, 16, `exec_ristretto255_from_hash`))), RIST255_VALIDATE: version(4, cat("crypto_rist255", mksimple(0xf921, 16, `(_1) => exec_ristretto255_validate(_1, false)`))), RIST255_ADD: version(4, cat("crypto_rist255", mksimple(0xf922, 16, `(_1) => exec_ristretto255_add(_1, false)`))), RIST255_SUB: version(4, cat("crypto_rist255", mksimple(0xf923, 16, `(_1) => exec_ristretto255_sub(_1, false)`))), RIST255_MUL: version(4, cat("crypto_rist255", mksimple(0xf924, 16, `(_1) => exec_ristretto255_mul(_1, false)`))), RIST255_MULBASE: version(4, cat("crypto_rist255", mksimple(0xf925, 16, `(_1) => exec_ristretto255_mul_base(_1, false)`))), RIST255_PUSHL: version(4, cat("crypto_rist255", mksimple(0xf926, 16, `exec_ristretto255_push_l`))), RIST255_QVALIDATE: version(4, cat("crypto_rist255", mksimple(0xb7f921, 24, `(_1) => exec_ristretto255_validate(_1, true)`))), RIST255_QADD: version(4, cat("crypto_rist255", mksimple(0xb7f922, 24, `(_1) => exec_ristretto255_add(_1, true)`))), RIST255_QSUB: version(4, cat("crypto_rist255", mksimple(0xb7f923, 24, `(_1) => exec_ristretto255_sub(_1, true)`))), RIST255_QMUL: version(4, cat("crypto_rist255", mksimple(0xb7f924, 24, `(_1) => exec_ristretto255_mul(_1, true)`))), RIST255_QMULBASE: version(4, cat("crypto_rist255", mksimple(0xb7f925, 24, `(_1) => exec_ristretto255_mul_base(_1, true)`))), BLS_VERIFY: version(4, cat("crypto_bls", mksimple(0xf93000, 24, `exec_bls_verify`))), BLS_AGGREGATE: version(4, cat("crypto_bls", mksimple(0xf93001, 24, `exec_bls_aggregate`))), BLS_FASTAGGREGATEVERIFY: version(4, cat("crypto_bls", mksimple(0xf93002, 24, `exec_bls_fast_aggregate_verify`))), BLS_AGGREGATEVERIFY: version(4, cat("crypto_bls", mksimple(0xf93003, 24, `exec_bls_aggregate_verify`))), BLS_G1_ADD: version(4, cat("crypto_bls", mksimple(0xf93010, 24, `exec_bls_g1_add`))), BLS_G1_SUB: version(4, cat("crypto_bls", mksimple(0xf93011, 24, `exec_bls_g1_sub`))), BLS_G1_NEG: version(4, cat("crypto_bls", mksimple(0xf93012, 24, `exec_bls_g1_neg`))), BLS_G1_MUL: version(4, cat("crypto_bls", mksimple(0xf93013, 24, `exec_bls_g1_mul`))), BLS_G1_MULTIEXP: version(4, cat("crypto_bls", mksimple(0xf93014, 24, `exec_bls_g1_multiexp`))), BLS_G1_ZERO: version(4, cat("crypto_bls", mksimple(0xf93015, 24, `exec_bls_g1_zero`))), BLS_MAP_TO_G1: version(4, cat("crypto_bls", mksimple(0xf93016, 24, `exec_bls_map_to_g1`))), BLS_G1_INGROUP: version(4, cat("crypto_bls", mksimple(0xf93017, 24, `exec_bls_g1_in_group`))), BLS_G1_ISZERO: version(4, cat("crypto_bls", mksimple(0xf93018, 24, `exec_bls_g1_is_zero`))), BLS_G2_ADD: version(4, cat("crypto_bls", mksimple(0xf93020, 24, `exec_bls_g2_add`))), BLS_G2_SUB: version(4, cat("crypto_bls", mksimple(0xf93021, 24, `exec_bls_g2_sub`))), BLS_G2_NEG: version(4, cat("crypto_bls", mksimple(0xf93022, 24, `exec_bls_g2_neg`))), BLS_G2_MUL: version(4, cat("crypto_bls", mksimple(0xf93023, 24, `exec_bls_g2_mul`))), BLS_G2_MULTIEXP: version(4, cat("crypto_bls", mksimple(0xf93024, 24, `exec_bls_g2_multiexp`))), BLS_G2_ZERO: version(4, cat("crypto_bls", mksimple(0xf93025, 24, `exec_bls_g2_zero`))), BLS_MAP_TO_G2: version(4, cat("crypto_bls", mksimple(0xf93026, 24, `exec_bls_map_to_g2`))), BLS_G2_INGROUP: version(4, cat("crypto_bls", mksimple(0xf93027, 24, `exec_bls_g2_in_group`))), BLS_G2_ISZERO: version(4, cat("crypto_bls", mksimple(0xf93028, 24, `exec_bls_g2_is_zero`))), BLS_PAIRING: version(4, cat("crypto_bls", mksimple(0xf93030, 24, `exec_bls_pairing`))), 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", mksimple(0xfa03, 16, `(_1) => exec_store_var_integer(_1, 4, true, false)`)), LDVARUINT32: cat("cell_deserialize", mksimple(0xfa04, 16, `(_1) => exec_load_var_integer(_1, 5, false, false)`)), LDVARINT32: cat("cell_deserialize", mksimple(0xfa05, 16, `(_1) => exec_load_var_integer(_1, 5, true, false)`)), STVARUINT32: cat("cell_serialize", mksimple(0xfa06, 16, `(_1) => exec_store_var_integer(_1, 5, false, false)`)), STVARINT32: cat("cell_serialize", mksimple(0xfa07, 16, `(_1) => exec_store_var_integer(_1, 5, true, false)`)), LDMSGADDR: cat("cell_deserialize", mksimple(0xfa40, 16, `(_1) => exec_load_message_addr(_1, false)`)), LDMSGADDRQ: cat("cell_deserialize", mksimple(0xfa41, 16, `(_1) => exec_load_message_addr(_1, true)`)), PARSEMSGADDR: cat("address", mksimple(0xfa42, 16, `(_1) => exec_parse_message_addr(_1, false)`)), PARSEMSGADDRQ: cat("address", mksimple(0xfa43, 16, `(_1) => exec_parse_message_addr(_1, true)`)), REWRITESTDADDR: cat("address", mksimple(0xfa44, 16, `(_1) => exec_rewrite_message_addr(_1, false, false)`)), REWRITESTDADDRQ: cat("address", mksimple(0xfa45, 16, `(_1) => exec_rewrite_message_addr(_1, false, true)`)), REWRITEVARADDR: cat("address", mksimple(0xfa46, 16, `(_1) => exec_rewrite_message_addr(_1, true, false)`)), REWRITEVARADDRQ: cat("address", mksimple(0xfa47, 16, `(_1) => exec_rewrite_message_addr(_1, true, true)`)), SENDRAWMSG: cat("message", mksimple(0xfb00, 16, `exec_send_raw_message`)), RAWRESERVE: cat("message", mksimple(0xfb02, 16, `(_1) => exec_reserve_raw(_1, 0)`)), RAWRESERVEX: cat("message", mksimple(0xfb03, 16, `(_1) => exec_reserve_raw(_1, 1)`)), SETCODE: cat("message", mksimple(0xfb04, 16, `exec_set_code`)), SETLIBCODE: cat("message", mksimple(0xfb06, 16, `exec_set_lib_code`)), CHANGELIB: cat("message", mksimple(0xfb07, 16, `exec_change_lib`)), SENDMSG: version(4, cat("message", mksimple(0xfb08, 16, `exec_send_message`))), PUSHNULL: cat("tuple", mksimple(0x6d, 8, `exec_push_null`)), ISNULL: cat("tuple", mksimple(0x6e, 8, `exec_is_null`)), TUPLEVAR: cat("tuple", mksimple(0x6f80, 16, `exec_mktuple_var`)), INDEXVAR: cat("tuple", mksimple(0x6f81, 16, `exec_tuple_index_var`)), UNTUPLEVAR: cat("tuple", mksimple(0x6f82, 16, `exec_untuple_var`)), UNPACKFIRSTVAR: cat("tuple", mksimple(0x6f83, 16, `exec_untuple_first_var`)), EXPLODEVAR: cat("tuple", mksimple(0x6f84, 16, `exec_explode_tuple_var`)), SETINDEXVAR: cat("tuple", mksimple(0x6f85, 16, `exec_tuple_set_index_var`)), INDEXVARQ: cat("tuple", mksimple(0x6f86, 16, `exec_tuple_quiet_index_var`)), SETINDEXVARQ: cat("tuple", mksimple(0x6f87, 16, `exec_tuple_quiet_set_index_var`)), TLEN: cat("tuple", mksimple(0x6f88, 16, `exec_tuple_length`)), QTLEN: cat("tuple", mksimple(0x6f89, 16, `exec_tuple_length_quiet`)), ISTUPLE: cat("tuple", mksimple(0x6f8a, 16, `exec_is_tuple`)), LAST: cat("tuple", mksimple(0x6f8b, 16, `exec_tuple_last`)), TPUSH: effects(cat("tuple", mksimple(0x6f8c, 16, `exec_tuple_push`)), (0, exports.Tuple)()), TPOP: effects(cat("tuple", mksimple(0x6f8d, 16, `exec_tuple_pop`)), (0, exports.Tuple)()), NULLSWAPIF: cat("tuple", mksimple(0x6fa0, 16, `(_1) => exec_null_swap_if(_1, true, 0)`)), NULLSWAPIFNOT: cat("tuple", mksimple(0x6fa1, 16, `(_1) => exec_null_swap_if(_1, false, 0)`)), NULLROTRIF: cat("tuple", mksimple(0x6fa2, 16, `(_1) => exec_null_swap_if(_1, true, 1)`)), NULLROTRIFNOT: cat("tuple", mksimple(0x6fa3, 16, `(_1) => exec_null_swap_if(_1, false, 1)`)), NULLSWAPIF2: cat("tuple", mksimple(0x6fa4, 16, `(_1) => exec_null_swap_if_many(_1, true, 0, 2)`)), NULLSWAPIFNOT2: cat("tuple", mksimple(0x6fa5, 16, `(_1) => exec_null_swap_if_many(_1, false, 0, 2)`)), NULLROTRIF2: cat("tuple", mksimple(0x6fa6, 16, `(_1) => exec_null_swap_if_many(_1, true, 1, 2)`)), NULLROTRIFNOT2: cat("tuple", mksimple(0x6fa7, 16, `(_1) => exec_null_swap_if_many(_1, false, 1, 2)`)), ADDDIVMOD: version(4, cat("div", mksimple(0xa900, 16, `exec_divmod(_1, _2, false)`))), ADDDIVMODR: version(4, cat("div", mksimple(0xa901, 16, `exec_divmod(_1, _2, false)`))), ADDDIVMODC: version(4, cat("div", mksimple(0xa902, 16, `exec_divmod(_1, _2, false)`))), DIV: cat("div", mksimple(0xa904, 16, `exec_divmod(_1, _2, false)`)), DIVR: cat("div", mksimple(0xa905, 16, `exec_divmod(_1, _2, false)`)), DIVC: cat("div", mksimple(0xa906, 16, `exec_divmod(_1, _2, false)`)), MOD: cat("div", mksimple(0xa908, 16, `exec_divmod(_1, _2, false)`)), MODR: cat("div", mksimple(0xa909, 16, `exec_divmod(_1, _2, false)`)), MODC: cat("div", mksimple(0xa90a, 16, `exec_divmod(_1, _2, false)`)), DIVMOD: cat("div", mksimple(0xa90c, 16, `exec_divmod(_1, _2, false)`)), DIVMODR: cat("div", mksimple(0xa90d, 16, `exec_divmod(_1, _2, false)`)), DIVMODC: cat("div", mksimple(0xa90e, 16, `exec_divmod(_1, _2, false)`)), QADDDIVMOD: version(4, cat("div", mksimple(0xb7a900, 24, `exec_divmod(_1, _2, true)`))), QADDDIVMODR: version(4, cat("div", mksimple(0xb7a901, 24, `exec_divmod(_1, _2, true)`))), QADDDIVMODC: version(4, cat("div", mksimple(0xb7a902, 24, `exec_divmod(_1, _2, true)`))), QDIV: cat("div", mksimple(0xb7a904, 24, `exec_divmod(_1, _2, true)`)), QDIVR: cat("div", mksimple(0xb7a905, 24, `exec_divmod(_1, _2, true)`)), QDIVC: cat("div", mksimple(0xb7a906, 24, `exec_divmod(_1, _2, true)`)), QMOD: cat("div", mksimple(0xb7a908, 24, `exec_divmod(_1, _2, true)`)), QMODR: cat("div", mksimple(0xb7a909, 24, `exec_divmod(_1, _2, true)`)), QMODC: cat("div", mksimple(0xb7a90a, 24, `exec_divmod(_1, _2, true)`)), QDIVMOD: cat("div", mksimple(0xb7a90c, 24, `exec_divmod(_1, _2, true)`)), QDIVMODR: cat("div", mksimple(0xb7a90d, 24, `exec_divmod(_1, _2, true)`)), QDIVMODC: cat("div", mksimple(0xb7a90e, 24, `exec_divmod(_1, _2, true)`)), ADDRSHIFTMOD: version(4, cat("div", cat("div", mksimple(0xa920, 16, `exec_shrmod(_1, _2, 0)`)))), ADDRSHIFTMODR: version(4, cat("div", cat("div", mksimple(0xa921, 16, `exec_shrmod(_1, _2, 0)`)))), ADDRSHIFTMODC: version(4, cat("div", cat("div", mksimple(0xa922, 16, `exec_shrmod(_1, _2, 0)`)))), RSHIFTR: cat("div", mksimple(0xa925, 16, `exec_shrmod(_1, _2, 0)`)), RSHIFTC: cat("div", mksimple(0xa926, 16, `exec_shrmod(_1, _2, 0)`)), MODPOW2: cat("div", mksimple(0xa928, 16, `exec_shrmod(_1, _2, 0)`)), MODPOW2R: cat("div", mksimple(0xa929, 16, `exec_shrmod(_1, _2, 0)`)), MODPOW2C: cat("div", mksimple(0xa92a, 16, `exec_shrmod(_1, _2, 0)`)), RSHIFTMOD: cat("div", mksimple(0xa92c, 16, `exec_shrmod(_1, _2, 0)`)), RSHIFTMODR: cat("div", mksimple(0xa92d, 16, `exec_shrmod(_1, _2, 0)`)), RSHIFTMODC: cat("div", mksimple(0xa92e, 16, `exec_shrmod(_1, _2, 0)`)), QADDRSHIFTMOD: version(4, cat("div", mksimple(0xb7a920, 24, `exec_shrmod(_1, _2, 1)`))), QADDRSHIFTMODR: version(4, cat("div", mksimple(0xb7a921, 24, `exec_shrmod(_1, _2, 1)`))), QADDRSHIFTMODC: version(4, cat("div", mksimple(0xb7a922, 24, `exec_shrmod(_1, _2, 1)`))), QRSHIFTR: cat("div", mksimple(0xb7a925, 24, `exec_shrmod(_1, _2, 1)`)), QRSHIFTC: cat("div", mksimple(0xb7a926, 24, `exec_shrmod(_1, _2, 1)`)), QMODPOW2: cat("div", mksimple(0xb7a928, 24, `exec_shrmod(_1, _2, 1)`)),