From 95ac1d186bb0c665006f9c3cdad68114cd482966 Mon Sep 17 00:00:00 2001 From: illuzen Date: Mon, 3 Aug 2026 15:57:44 +0800 Subject: [PATCH 01/15] chore: clear easy cargo-audit findings Bump rustls-webpki to 0.103.13 and drop the unused substrate-test-utils dev-dep (and its ancient tokio 0.2) from pallet-scheduler. Co-authored-by: Cursor --- Cargo.lock | 345 ++++++++++++++--------------------- Cargo.toml | 1 - pallets/scheduler/Cargo.toml | 1 - 3 files changed, 136 insertions(+), 211 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 78a9aaa6..be295f61 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -629,7 +629,7 @@ dependencies = [ "concurrent-queue", "event-listener-strategy", "futures-core", - "pin-project-lite 0.2.16", + "pin-project-lite", ] [[package]] @@ -642,7 +642,7 @@ dependencies = [ "concurrent-queue", "fastrand", "futures-lite", - "pin-project-lite 0.2.16", + "pin-project-lite", "slab", ] @@ -683,7 +683,7 @@ checksum = "5fd03604047cee9b6ce9de9f70c6cd540a0520c813cbd49bae61f33ab80ed1dc" dependencies = [ "event-listener 5.4.1", "event-listener-strategy", - "pin-project-lite 0.2.16", + "pin-project-lite", ] [[package]] @@ -756,11 +756,11 @@ version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4057f2c32adbb2fc158e22fb38433c8e9bbf76b75a4732c7c0cbaf695fb65568" dependencies = [ - "bytes 1.11.1", + "bytes", "futures-sink", "futures-util", "memchr", - "pin-project-lite 0.2.16", + "pin-project-lite", ] [[package]] @@ -769,11 +769,11 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a860072022177f903e59730004fb5dc13db9275b79bb2aef7ba8ce831956c233" dependencies = [ - "bytes 1.11.1", + "bytes", "futures-sink", "futures-util", "memchr", - "pin-project-lite 0.2.16", + "pin-project-lite", ] [[package]] @@ -1114,12 +1114,6 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" -[[package]] -name = "bytes" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" - [[package]] name = "bytes" version = "1.11.1" @@ -1476,7 +1470,7 @@ version = "4.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" dependencies = [ - "bytes 1.11.1", + "bytes", "memchr", ] @@ -1831,7 +1825,7 @@ dependencies = [ "ciborium", "clap", "criterion-plot", - "futures 0.3.31", + "futures", "is-terminal", "itertools 0.10.5", "num-traits", @@ -1844,7 +1838,7 @@ dependencies = [ "serde_derive", "serde_json", "tinytemplate", - "tokio 1.47.1", + "tokio", "walkdir", ] @@ -2055,7 +2049,7 @@ checksum = "96a6862f80bc980dbbb1225a6f66165683c9647ab723208978012639c5294b2b" dependencies = [ "async-trait", "cumulus-primitives-core", - "futures 0.3.31", + "futures", "jsonrpsee-core", "parity-scale-codec", "polkadot-overseer", @@ -2794,7 +2788,7 @@ checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" dependencies = [ "concurrent-queue", "parking", - "pin-project-lite 0.2.16", + "pin-project-lite", ] [[package]] @@ -2804,7 +2798,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" dependencies = [ "event-listener 5.4.1", - "pin-project-lite 0.2.16", + "pin-project-lite", ] [[package]] @@ -2813,7 +2807,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e43f2f1833d64e33f15592464d6fdd70f349dda7b1a53088eb83cd94014008c5" dependencies = [ - "futures 0.3.31", + "futures", ] [[package]] @@ -2934,7 +2928,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4f8f43dc520133541781ec03a8cab158ae8b7f7169cdf22e9050aa6cf0fbdfc" dependencies = [ "either", - "futures 0.3.31", + "futures", "futures-timer", "log", "num-traits", @@ -3374,12 +3368,6 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" -[[package]] -name = "futures" -version = "0.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" - [[package]] name = "futures" version = "0.3.31" @@ -3439,7 +3427,7 @@ dependencies = [ "futures-core", "futures-io", "parking", - "pin-project-lite 0.2.16", + "pin-project-lite", ] [[package]] @@ -3477,7 +3465,6 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ - "futures 0.1.31", "futures-channel", "futures-core", "futures-io", @@ -3485,7 +3472,7 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project-lite 0.2.16", + "pin-project-lite", "pin-utils", "slab", ] @@ -3496,7 +3483,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6628abb6eb1fc74beaeb20cd0670c43d158b0150f7689b38c3eaf663f99bdec7" dependencies = [ - "futures 0.3.31", + "futures", "log", "ringbuf", "rustc_version", @@ -3654,7 +3641,7 @@ checksum = "68a7f542ee6b35af73b06abc0dad1c1bae89964e4e253bc4b587b91c9637867b" dependencies = [ "cfg-if", "dashmap", - "futures 0.3.31", + "futures", "futures-timer", "no-std-compat", "nonzero_ext", @@ -3684,14 +3671,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3c0b69cfcb4e1b9f1bf2f53f95f766e4661169728ec61cd3fe5a0166f2d1386" dependencies = [ "atomic-waker", - "bytes 1.11.1", + "bytes", "fnv", "futures-core", "futures-sink", "http", "indexmap", "slab", - "tokio 1.47.1", + "tokio", "tokio-util", "tracing", ] @@ -3850,7 +3837,7 @@ dependencies = [ "rand 0.10.1", "thiserror 2.0.18", "tinyvec", - "tokio 1.47.1", + "tokio", "tracing", "url", ] @@ -3897,7 +3884,7 @@ dependencies = [ "smallvec", "system-configuration", "thiserror 2.0.18", - "tokio 1.47.1", + "tokio", "tracing", ] @@ -3946,7 +3933,7 @@ version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" dependencies = [ - "bytes 1.11.1", + "bytes", "fnv", "itoa", ] @@ -3957,7 +3944,7 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ - "bytes 1.11.1", + "bytes", "http", ] @@ -3967,11 +3954,11 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" dependencies = [ - "bytes 1.11.1", + "bytes", "futures-core", "http", "http-body", - "pin-project-lite 0.2.16", + "pin-project-lite", ] [[package]] @@ -4002,7 +3989,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb3aa54a13a0dfe7fbe3a59e0c76093041720fdc77b110cc0fc260fafb4dc51e" dependencies = [ "atomic-waker", - "bytes 1.11.1", + "bytes", "futures-channel", "futures-core", "h2", @@ -4011,10 +3998,10 @@ dependencies = [ "httparse", "httpdate", "itoa", - "pin-project-lite 0.2.16", + "pin-project-lite", "pin-utils", "smallvec", - "tokio 1.47.1", + "tokio", "want", ] @@ -4031,7 +4018,7 @@ dependencies = [ "rustls", "rustls-native-certs", "rustls-pki-types", - "tokio 1.47.1", + "tokio", "tokio-rustls", "tower-service", ] @@ -4042,7 +4029,7 @@ version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c6995591a8f1380fcb4ba966a252a4b29188d51d2b89e3a252f5305be65aea8" dependencies = [ - "bytes 1.11.1", + "bytes", "futures-channel", "futures-core", "futures-util", @@ -4050,9 +4037,9 @@ dependencies = [ "http-body", "hyper", "libc", - "pin-project-lite 0.2.16", + "pin-project-lite", "socket2 0.6.0", - "tokio 1.47.1", + "tokio", "tower-service", "tracing", ] @@ -4579,7 +4566,7 @@ dependencies = [ "jsonrpsee-server", "jsonrpsee-types", "jsonrpsee-ws-client", - "tokio 1.47.1", + "tokio", "tracing", ] @@ -4599,7 +4586,7 @@ dependencies = [ "rustls-platform-verifier", "soketto", "thiserror 1.0.69", - "tokio 1.47.1", + "tokio", "tokio-rustls", "tokio-util", "tracing", @@ -4613,7 +4600,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "348ee569eaed52926b5e740aae20863762b16596476e943c9e415a6479021622" dependencies = [ "async-trait", - "bytes 1.11.1", + "bytes", "futures-timer", "futures-util", "http", @@ -4627,7 +4614,7 @@ dependencies = [ "serde", "serde_json", "thiserror 1.0.69", - "tokio 1.47.1", + "tokio", "tokio-stream", "tracing", ] @@ -4665,7 +4652,7 @@ dependencies = [ "serde_json", "soketto", "thiserror 1.0.69", - "tokio 1.47.1", + "tokio", "tokio-stream", "tokio-util", "tower", @@ -4962,11 +4949,11 @@ version = "0.13.3" dependencies = [ "async-trait", "bs58", - "bytes 1.11.1", + "bytes", "cid", "clatter", "enum-display", - "futures 0.3.31", + "futures", "futures-timer", "futures_ringbuf", "hex-literal 1.1.0", @@ -4993,7 +4980,7 @@ dependencies = [ "smallvec", "socket2 0.5.10", "thiserror 2.0.18", - "tokio 1.47.1", + "tokio", "tokio-stream", "tokio-tungstenite", "tokio-util", @@ -5422,8 +5409,8 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea0df8e5eec2298a62b326ee4f0d7fe1a6b90a09dfcf9df37b38f947a8c42f19" dependencies = [ - "bytes 1.11.1", - "futures 0.3.31", + "bytes", + "futures", "log", "pin-project", "smallvec", @@ -5720,7 +5707,7 @@ checksum = "19051f0b0512402f5d52d6776999f55996f01887396278aeeccbbdfbc83eef2d" dependencies = [ "async-trait", "dyn-clonable", - "futures 0.3.31", + "futures", "futures-timer", "orchestra-proc-macro", "pin-project", @@ -6120,7 +6107,6 @@ dependencies = [ "sp-core", "sp-io", "sp-runtime", - "substrate-test-utils", ] [[package]] @@ -6300,7 +6286,7 @@ dependencies = [ "arrayvec 0.7.6", "bitvec", "byte-slice-cast", - "bytes 1.11.1", + "bytes", "const_format", "impl-trait-for-tuples", "parity-scale-codec-derive", @@ -6530,12 +6516,6 @@ dependencies = [ "syn 2.0.119", ] -[[package]] -name = "pin-project-lite" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" - [[package]] name = "pin-project-lite" version = "0.2.16" @@ -6637,7 +6617,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90b7cf0fa2e16b85ec9ba09ccb274a8ef1bc165459f983d431e7c892b08e8c7d" dependencies = [ "bs58", - "futures 0.3.31", + "futures", "futures-timer", "parity-scale-codec", "polkadot-primitives", @@ -6659,7 +6639,7 @@ dependencies = [ "bitvec", "derive_more 0.99.20", "fatality", - "futures 0.3.31", + "futures", "hex", "parity-scale-codec", "polkadot-node-primitives", @@ -6682,7 +6662,7 @@ checksum = "81ddf1688f2d131781db97091db847d48a58c06342cb867fcb77e5bc03c41ef5" dependencies = [ "bitvec", "bounded-vec", - "futures 0.3.31", + "futures", "futures-timer", "parity-scale-codec", "polkadot-parachain-primitives", @@ -6708,7 +6688,7 @@ dependencies = [ "async-trait", "derive_more 0.99.20", "fatality", - "futures 0.3.31", + "futures", "orchestra", "polkadot-node-network-protocol", "polkadot-node-primitives", @@ -6735,7 +6715,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7e3ab06b80d48596206e6b0200cfe74738a0dd55026ccb2e3057863bcf0cf25" dependencies = [ "async-trait", - "futures 0.3.31", + "futures", "futures-timer", "orchestra", "polkadot-node-metrics", @@ -6947,7 +6927,7 @@ dependencies = [ "cfg-if", "concurrent-queue", "hermit-abi", - "pin-project-lite 0.2.16", + "pin-project-lite", "rustix", "windows-sys 0.61.0", ] @@ -7147,22 +7127,13 @@ dependencies = [ "coarsetime", "crossbeam-queue", "derive_more 0.99.20", - "futures 0.3.31", + "futures", "futures-timer", "nanorand", "thiserror 1.0.69", "tracing", ] -[[package]] -name = "proc-macro-crate" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" -dependencies = [ - "toml 0.5.11", -] - [[package]] name = "proc-macro-crate" version = "1.1.3" @@ -7288,7 +7259,7 @@ version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" dependencies = [ - "bytes 1.11.1", + "bytes", "prost-derive 0.12.6", ] @@ -7298,7 +7269,7 @@ version = "0.13.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5" dependencies = [ - "bytes 1.11.1", + "bytes", "prost-derive 0.13.5", ] @@ -7308,7 +7279,7 @@ version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2ea70524a2f82d518bce41317d0fae74151505651af45faf1ffbd6fd33f0568" dependencies = [ - "bytes 1.11.1", + "bytes", "prost-derive 0.14.3", ] @@ -7754,7 +7725,7 @@ version = "0.2.0" dependencies = [ "serde", "serde_json", - "tokio 1.47.1", + "tokio", ] [[package]] @@ -7765,7 +7736,7 @@ dependencies = [ "frame-benchmarking-cli", "frame-metadata-hash-extension", "frame-system", - "futures 0.3.31", + "futures", "hex", "jsonrpsee", "log", @@ -7906,16 +7877,16 @@ version = "0.11.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c1a41e437b6bbd489372cd4971de128e85c855f56c57f283d20ff016cf7c0a8" dependencies = [ - "bytes 1.11.1", + "bytes", "cfg_aliases 0.2.1", - "pin-project-lite 0.2.16", + "pin-project-lite", "quinn-proto", "quinn-udp", "rustc-hash 2.1.1", "rustls", "socket2 0.6.0", "thiserror 2.0.18", - "tokio 1.47.1", + "tokio", "tracing", "web-time", ] @@ -7926,7 +7897,7 @@ version = "0.11.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fcb935c5bec503c2f0e306bdd3e58bb9029dcb14fa8d9ac76e3a5256ac0763e" dependencies = [ - "bytes 1.11.1", + "bytes", "fastbloom", "getrandom 0.3.3", "lru-slab", @@ -8327,7 +8298,7 @@ version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97eeab2f3c0a199bc4be135c36c924b6590b88c377d416494288c14f2db30199" dependencies = [ - "futures 0.3.31", + "futures", "futures-timer", "rstest_macros", "rustc_version", @@ -8481,9 +8452,9 @@ checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" [[package]] name = "rustls-webpki" -version = "0.103.6" +version = "0.103.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8572f3c2cb9934231157b45499fc41e1f58c589fdfb81a844ba873265e80f8eb" +checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e" dependencies = [ "ring", "rustls-pki-types", @@ -8560,7 +8531,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6ed36b4bff592cf3ad3b8d3c67b6cb72f190df9518d5e1fcfd6dfcd869a7db4" dependencies = [ "async-trait", - "futures 0.3.31", + "futures", "futures-timer", "ip_network", "linked_hash_set", @@ -8583,7 +8554,7 @@ dependencies = [ "sp-runtime", "substrate-prometheus-endpoint", "thiserror 1.0.69", - "tokio 1.47.1", + "tokio", ] [[package]] @@ -8592,7 +8563,7 @@ version = "0.53.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d82f8b0c44c7f00108a8babea46397c3f15f1a90273098ab8b3ebbc7be10585a" dependencies = [ - "futures 0.3.31", + "futures", "log", "parity-scale-codec", "sc-block-builder", @@ -8673,7 +8644,7 @@ dependencies = [ "chrono", "clap", "fdlimit", - "futures 0.3.31", + "futures", "futures-timer", "hex", "itertools 0.11.0", @@ -8707,7 +8678,7 @@ dependencies = [ "sp-version", "tempfile", "thiserror 2.0.18", - "tokio 1.47.1", + "tokio", ] [[package]] @@ -8717,7 +8688,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37040b88b3084ceaabe7e497dcb6fd26b1d8c73b7c236b12dfc4da5fe438eb18" dependencies = [ "fnv", - "futures 0.3.31", + "futures", "log", "parity-scale-codec", "parking_lot 0.12.4", @@ -8773,7 +8744,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a474f1f6d5ef6feff9d8f106eae0fe1258048f8d3bd395b8a14d0d6499aacfd9" dependencies = [ "async-trait", - "futures 0.3.31", + "futures", "log", "mockall", "parking_lot 0.12.4", @@ -8798,7 +8769,7 @@ checksum = "d7d7361a7d56673fe7d383e084ea7586cc2cf792e3c8b333e962993771fff374" dependencies = [ "async-trait", "fork-tree", - "futures 0.3.31", + "futures", "log", "num-bigint", "num-rational", @@ -8847,7 +8818,7 @@ name = "sc-consensus-qpow" version = "0.1.0" dependencies = [ "async-trait", - "futures 0.3.31", + "futures", "futures-timer", "hex", "log", @@ -8876,7 +8847,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfdf4149d192eee16dd02df187cf0a4451c6e66e87b260b872a115a627d17804" dependencies = [ "async-trait", - "futures 0.3.31", + "futures", "futures-timer", "log", "parity-scale-codec", @@ -8964,7 +8935,7 @@ dependencies = [ name = "sc-informant" version = "0.54.0" dependencies = [ - "futures 0.3.31", + "futures", "futures-timer", "log", "sc-client-api", @@ -8998,8 +8969,8 @@ dependencies = [ "array-bytes 6.2.3", "arrayvec 0.7.6", "blake2 0.10.6", - "bytes 1.11.1", - "futures 0.3.31", + "bytes", + "futures", "futures-timer", "log", "mixnet", @@ -9027,12 +8998,12 @@ dependencies = [ "async-channel 1.9.0", "async-trait", "asynchronous-codec 0.6.2", - "bytes 1.11.1", + "bytes", "cid", "criterion", "either", "fnv", - "futures 0.3.31", + "futures", "futures-timer", "ip_network", "linked_hash_set", @@ -9063,7 +9034,7 @@ dependencies = [ "substrate-prometheus-endpoint", "tempfile", "thiserror 2.0.18", - "tokio 1.47.1", + "tokio", "tokio-stream", "tokio-util", "unsigned-varint 0.8.0", @@ -9091,7 +9062,7 @@ checksum = "b3771d715d6f23c3fb88d9420449c8090c91241e2eabe3476268fd828b4eef43" dependencies = [ "array-bytes 6.2.3", "async-channel 1.9.0", - "futures 0.3.31", + "futures", "log", "parity-scale-codec", "prost 0.12.6", @@ -9113,7 +9084,7 @@ dependencies = [ "async-channel 1.9.0", "async-trait", "fork-tree", - "futures 0.3.31", + "futures", "log", "mockall", "parity-scale-codec", @@ -9136,7 +9107,7 @@ dependencies = [ "sp-runtime", "substrate-prometheus-endpoint", "thiserror 1.0.69", - "tokio 1.47.1", + "tokio", "tokio-stream", ] @@ -9147,7 +9118,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da15f83aa0678042729b328d5e06dbf7d4bbc51ea247a8f639810e8a11d20372" dependencies = [ "array-bytes 6.2.3", - "futures 0.3.31", + "futures", "log", "parity-scale-codec", "sc-network", @@ -9165,7 +9136,7 @@ name = "sc-network-types" version = "0.20.3" dependencies = [ "bs58", - "bytes 1.11.1", + "bytes", "litep2p", "log", "multiaddr", @@ -9182,9 +9153,9 @@ version = "50.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4f774f1db7581702b12e65f55eb6cd95159c5aaaced0fa7bf9c57491d179fc55" dependencies = [ - "bytes 1.11.1", + "bytes", "fnv", - "futures 0.3.31", + "futures", "futures-timer", "http-body-util", "hyper", @@ -9227,7 +9198,7 @@ version = "50.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a3015e40aee953ed4b265412a26969e56448332d40fe872b2c0fc25f7f60fa87" dependencies = [ - "futures 0.3.31", + "futures", "jsonrpsee", "log", "parity-scale-codec", @@ -9251,7 +9222,7 @@ dependencies = [ "sp-session", "sp-statement-store", "sp-version", - "tokio 1.47.1", + "tokio", ] [[package]] @@ -9283,7 +9254,7 @@ checksum = "838a6e7ed25a5c9803c27cc2acdcb4e35f069a6f67d5c9d80c4594dc72a84c9c" dependencies = [ "dyn-clone", "forwarded-header-value", - "futures 0.3.31", + "futures", "governor", "http", "http-body-util", @@ -9295,7 +9266,7 @@ dependencies = [ "serde", "serde_json", "substrate-prometheus-endpoint", - "tokio 1.47.1", + "tokio", "tower", "tower-http", ] @@ -9307,7 +9278,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0965b02068229313d53380e584f320a9fa07d6860a0f2d480ffa8088e941e3d0" dependencies = [ "array-bytes 6.2.3", - "futures 0.3.31", + "futures", "futures-util", "hex", "itertools 0.11.0", @@ -9330,7 +9301,7 @@ dependencies = [ "sp-version", "substrate-prometheus-endpoint", "thiserror 1.0.69", - "tokio 1.47.1", + "tokio", "tokio-stream", ] @@ -9357,7 +9328,7 @@ dependencies = [ "async-trait", "directories", "exit-future", - "futures 0.3.31", + "futures", "futures-timer", "jsonrpsee", "log", @@ -9408,7 +9379,7 @@ dependencies = [ "substrate-prometheus-endpoint", "tempfile", "thiserror 2.0.18", - "tokio 1.47.1", + "tokio", "tracing", "tracing-futures", ] @@ -9432,7 +9403,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "deda53c447e6ed91491e0fce601c963263e79dbf363d86f06c04e291658b75b5" dependencies = [ "derive_more 0.99.20", - "futures 0.3.31", + "futures", "libc", "log", "rand 0.8.6", @@ -9451,7 +9422,7 @@ name = "sc-telemetry" version = "30.0.0" dependencies = [ "chrono", - "futures 0.3.31", + "futures", "log", "parking_lot 0.12.4", "pin-project", @@ -9460,7 +9431,7 @@ dependencies = [ "serde", "serde_json", "thiserror 2.0.18", - "tokio 1.47.1", + "tokio", "tokio-tungstenite", "url", ] @@ -9513,7 +9484,7 @@ dependencies = [ "assert_matches", "async-trait", "criterion", - "futures 0.3.31", + "futures", "futures-timer", "indexmap", "itertools 0.11.0", @@ -9535,7 +9506,7 @@ dependencies = [ "strum 0.26.3", "substrate-prometheus-endpoint", "thiserror 2.0.18", - "tokio 1.47.1", + "tokio", "tokio-stream", "tracing", ] @@ -9547,7 +9518,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34aa1bf9a23dfc74491f95787ff1d57bf031ca94f2f656f79a8d47eeea0e2e1b" dependencies = [ "async-trait", - "futures 0.3.31", + "futures", "indexmap", "log", "parity-scale-codec", @@ -9566,7 +9537,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d58dbfbc4408b0d210a6b7099c07caf02001e6975f62e316ea5b5c1f5c2108f4" dependencies = [ "async-channel 1.9.0", - "futures 0.3.31", + "futures", "futures-timer", "log", "parking_lot 0.12.4", @@ -10320,8 +10291,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2e859df029d160cb88608f5d7df7fb4753fd20fdfb4de5644f3d8b8440841721" dependencies = [ "base64", - "bytes 1.11.1", - "futures 0.3.31", + "bytes", + "futures", "http", "httparse", "log", @@ -10425,7 +10396,7 @@ version = "43.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25fe12508b0274ab1f250621feed7c99ead5d4928788b5b7e15cc372862e0832" dependencies = [ - "futures 0.3.31", + "futures", "parity-scale-codec", "parking_lot 0.12.4", "schnellru", @@ -10446,7 +10417,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c3515d414dc7dc7186b87cb2ad9b3070edbfa85754373e56c33b408fbaa3f4e" dependencies = [ "async-trait", - "futures 0.3.31", + "futures", "log", "sp-inherents", "sp-runtime", @@ -10544,7 +10515,7 @@ dependencies = [ "bs58", "dyn-clone", "ed25519-zebra", - "futures 0.3.31", + "futures", "hash-db", "hash256-std-hasher", "impl-serde", @@ -10668,7 +10639,7 @@ version = "44.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84c3b7db2a4f180e3362e374754983e3ddc844b7a1cd2c2e5b71ab0bd3673dfe" dependencies = [ - "bytes 1.11.1", + "bytes", "docify", "ed25519-dalek", "libsecp256k1", @@ -10784,7 +10755,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f799c308ab442aa1c80b193db8c76f36dcc5a911408bf8861511987f4e4f2ee" dependencies = [ "binary-merkle-tree", - "bytes 1.11.1", + "bytes", "docify", "either", "hash256-std-hasher", @@ -10815,7 +10786,7 @@ version = "33.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22644a2fabb5c246911ecde30fdb7f0801c90f5e611b1147140055ad7b6dabab" dependencies = [ - "bytes 1.11.1", + "bytes", "impl-trait-for-tuples", "parity-scale-codec", "polkavm-derive", @@ -11254,7 +11225,7 @@ checksum = "505d94026847bf523d3d4383412102d9f7d49b9008a56568967d93b12fcccfa1" dependencies = [ "docify", "frame-system-rpc-runtime-api", - "futures 0.3.31", + "futures", "jsonrpsee", "log", "parity-scale-codec", @@ -11279,29 +11250,7 @@ dependencies = [ "log", "prometheus", "thiserror 1.0.69", - "tokio 1.47.1", -] - -[[package]] -name = "substrate-test-utils" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f46809281d923956cdfdb2f95e07fa2437884f2a18096c4371a3fa48f8d082a" -dependencies = [ - "futures 0.3.31", - "substrate-test-utils-derive", - "tokio 0.2.25", -] - -[[package]] -name = "substrate-test-utils-derive" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "988016ca49cfc763fecf97dfa9dee7dbbff1a2145b003d07681278dddefd1a0e" -dependencies = [ - "proc-macro-crate 0.1.5", - "quote", - "syn 1.0.109", + "tokio", ] [[package]] @@ -11357,7 +11306,7 @@ dependencies = [ "derive-where", "either", "frame-metadata", - "futures 0.3.31", + "futures", "hex", "parity-scale-codec", "primitive-types 0.13.1", @@ -11375,7 +11324,7 @@ dependencies = [ "subxt-metadata", "subxt-rpcs", "thiserror 2.0.18", - "tokio 1.47.1", + "tokio", "tokio-util", "tracing", "url", @@ -11435,13 +11384,13 @@ version = "0.43.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9097ef356e534ce0b6a50b95233512afc394347b971a4f929c4830adc52bbc6f" dependencies = [ - "futures 0.3.31", + "futures", "futures-util", "serde", "serde_json", "smoldot-light", "thiserror 2.0.18", - "tokio 1.47.1", + "tokio", "tokio-stream", "tracing", ] @@ -11486,7 +11435,7 @@ checksum = "25de7727144780d780a6a7d78bbfd28414b8adbab68b05e87329c367d7705be4" dependencies = [ "derive-where", "frame-metadata", - "futures 0.3.31", + "futures", "hex", "impl-serde", "jsonrpsee", @@ -11859,17 +11808,6 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" -[[package]] -name = "tokio" -version = "0.2.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6703a273949a90131b290be1fe7b039d0fc884aa1935860dfcbe056f28cd8092" -dependencies = [ - "bytes 0.5.6", - "pin-project-lite 0.1.12", - "tokio-macros 0.2.6", -] - [[package]] name = "tokio" version = "1.47.1" @@ -11877,30 +11815,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" dependencies = [ "backtrace", - "bytes 1.11.1", + "bytes", "io-uring", "libc", "mio", "parking_lot 0.12.4", - "pin-project-lite 0.2.16", + "pin-project-lite", "signal-hook-registry", "slab", "socket2 0.6.0", - "tokio-macros 2.5.0", + "tokio-macros", "windows-sys 0.59.0", ] -[[package]] -name = "tokio-macros" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e44da00bfc73a25f814cd8d7e57a68a5c31b74b3152a0a1d1f590c97ed06265a" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "tokio-macros" version = "2.5.0" @@ -11919,7 +11846,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05f63835928ca123f1bef57abbcd23bb2ba0ac9ae1235f1e65bda0d06e7786bd" dependencies = [ "rustls", - "tokio 1.47.1", + "tokio", ] [[package]] @@ -11929,8 +11856,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" dependencies = [ "futures-core", - "pin-project-lite 0.2.16", - "tokio 1.47.1", + "pin-project-lite", + "tokio", "tokio-util", ] @@ -11945,7 +11872,7 @@ dependencies = [ "rustls", "rustls-native-certs", "rustls-pki-types", - "tokio 1.47.1", + "tokio", "tokio-rustls", "tungstenite", ] @@ -11956,12 +11883,12 @@ version = "0.7.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5" dependencies = [ - "bytes 1.11.1", + "bytes", "futures-core", "futures-io", "futures-sink", - "pin-project-lite 0.2.16", - "tokio 1.47.1", + "pin-project-lite", + "tokio", ] [[package]] @@ -12053,7 +11980,7 @@ dependencies = [ "futures-core", "futures-util", "pin-project", - "pin-project-lite 0.2.16", + "pin-project-lite", "tower-layer", "tower-service", "tracing", @@ -12066,11 +11993,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e9cd434a998747dd2c4276bc96ee2e0c7a2eadf3cae88e52be55a05fa9053f5" dependencies = [ "bitflags 2.9.4", - "bytes 1.11.1", + "bytes", "http", "http-body", "http-body-util", - "pin-project-lite 0.2.16", + "pin-project-lite", "tower-layer", "tower-service", ] @@ -12094,7 +12021,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100" dependencies = [ "log", - "pin-project-lite 0.2.16", + "pin-project-lite", "tracing-attributes", "tracing-core", ] @@ -12237,7 +12164,7 @@ version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eadc29d668c91fcc564941132e17b28a7ceb2f3ebf0b9dae3e03fd7a6748eb0d" dependencies = [ - "bytes 1.11.1", + "bytes", "data-encoding", "http", "httparse", @@ -12383,7 +12310,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eb066959b24b5196ae73cb057f45598450d2c5f71460e98c49b738086eff9c06" dependencies = [ "asynchronous-codec 0.7.0", - "bytes 1.11.1", + "bytes", "futures-io", "futures-util", "tokio-util", @@ -12757,7 +12684,7 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be0ecb0db480561e9a7642b5d3e4187c128914e58aa84330b9493e3eb68c5e7f" dependencies = [ - "futures 0.3.31", + "futures", "js-sys", "parking_lot 0.11.2", "pin-utils", @@ -13821,7 +13748,7 @@ version = "0.13.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1991f6690292030e31b0144d73f5e8368936c58e45e7068254f7138b23b00672" dependencies = [ - "futures 0.3.31", + "futures", "log", "nohash-hasher", "parking_lot 0.12.4", diff --git a/Cargo.toml b/Cargo.toml index 69154a1a..2145aac0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -329,7 +329,6 @@ static_init = { version = "1.0.4" } strum = { version = "0.26.3", default-features = false, features = ["derive"] } substrate-build-script-utils = { version = "11.0.0", default-features = false } substrate-frame-rpc-system = { version = "49.0.0", default-features = false } -substrate-test-utils = { version = "3.0.0", default-features = false } substrate-wasm-builder = { version = "31.1.0", default-features = false } [patch.crates-io] diff --git a/pallets/scheduler/Cargo.toml b/pallets/scheduler/Cargo.toml index 48ef4e93..ea6e91c7 100644 --- a/pallets/scheduler/Cargo.toml +++ b/pallets/scheduler/Cargo.toml @@ -24,7 +24,6 @@ sp-runtime.workspace = true [dev-dependencies] pallet-preimage.workspace = true sp-core.workspace = true -substrate-test-utils.workspace = true [features] default = ["std"] From 5c95b6ef0a1a94a69f9793d790fe782529a180c8 Mon Sep 17 00:00:00 2001 From: illuzen Date: Mon, 3 Aug 2026 16:08:37 +0800 Subject: [PATCH 02/15] vendor: add sc-executor-wasmtime and sp-wasm-interface unchanged Vendored from crates.io (sc-executor-wasmtime 0.43.0, sp-wasm-interface 24.0.0) for subsequent wasmtime 35 -> 36.0.13 bump. This commit contains the original sources to make the patch auditable via git diff. Co-authored-by: Cursor --- client/executor-wasmtime/.cargo-checksum.json | 1 + client/executor-wasmtime/.cargo_vcs_info.json | 6 + client/executor-wasmtime/Cargo.toml | 220 ++ client/executor-wasmtime/Cargo.toml.orig | 60 + client/executor-wasmtime/README.md | 1 + client/executor-wasmtime/build.rs | 25 + client/executor-wasmtime/src/host.rs | 128 + client/executor-wasmtime/src/imports.rs | 123 + .../executor-wasmtime/src/instance_wrapper.rs | 208 ++ client/executor-wasmtime/src/lib.rs | 48 + client/executor-wasmtime/src/runtime.rs | 726 ++++++ .../src/test-guard-page-skip.wat | 2293 +++++++++++++++++ client/executor-wasmtime/src/tests.rs | 522 ++++ client/executor-wasmtime/src/util.rs | 149 ++ client/wasm-interface/.cargo_vcs_info.json | 6 + client/wasm-interface/Cargo.toml | 183 ++ client/wasm-interface/Cargo.toml.orig | 33 + client/wasm-interface/README.md | 3 + client/wasm-interface/src/lib.rs | 630 +++++ 19 files changed, 5365 insertions(+) create mode 100644 client/executor-wasmtime/.cargo-checksum.json create mode 100644 client/executor-wasmtime/.cargo_vcs_info.json create mode 100644 client/executor-wasmtime/Cargo.toml create mode 100644 client/executor-wasmtime/Cargo.toml.orig create mode 100644 client/executor-wasmtime/README.md create mode 100644 client/executor-wasmtime/build.rs create mode 100644 client/executor-wasmtime/src/host.rs create mode 100644 client/executor-wasmtime/src/imports.rs create mode 100644 client/executor-wasmtime/src/instance_wrapper.rs create mode 100644 client/executor-wasmtime/src/lib.rs create mode 100644 client/executor-wasmtime/src/runtime.rs create mode 100644 client/executor-wasmtime/src/test-guard-page-skip.wat create mode 100644 client/executor-wasmtime/src/tests.rs create mode 100644 client/executor-wasmtime/src/util.rs create mode 100644 client/wasm-interface/.cargo_vcs_info.json create mode 100644 client/wasm-interface/Cargo.toml create mode 100644 client/wasm-interface/Cargo.toml.orig create mode 100644 client/wasm-interface/README.md create mode 100644 client/wasm-interface/src/lib.rs diff --git a/client/executor-wasmtime/.cargo-checksum.json b/client/executor-wasmtime/.cargo-checksum.json new file mode 100644 index 00000000..c5f004ca --- /dev/null +++ b/client/executor-wasmtime/.cargo-checksum.json @@ -0,0 +1 @@ +{"files":{".cargo_vcs_info.json":"68878989e3f1a80eb85a5eb56ca8ad4e3d0cbf6bad5d3d58863b35664222b02a","Cargo.lock":"3960122c38dcc2943fc267516ae4e38af6523f2d21a1edbabd8b434fc6000b17","Cargo.toml":"933549c1e4908b36f42931fc02cfb74b08a38579ff7e0674133577c38b1e0372","Cargo.toml.orig":"381ce87bdd7c9a04178dc4fd9700c3429ae257be0809928f62de9226dc51f864","README.md":"1c21401289577c635dc67e97d58ed6e466ccdf56825b1fbe9845fffd544d880b","build.rs":"cd10e6907798cfde1188e624450430bce2d1826c90efd4edcf2f84805c37e9b1","src/host.rs":"5c8aa0c2080556769753a8dd32d3aed25cc235233dde139401ca7751afc3e98b","src/imports.rs":"542732c91ed3a16221e78155cc9eb32f26bcd0caa4ec2419e1affbc8d08ae7ab","src/instance_wrapper.rs":"8011f4634ca44ba478de6c24535b432cd927a9156b9652224508a44cfcb47950","src/lib.rs":"e7db897e1aa896b3248a594a104437da053dc155a7c9e950f7fc01f24caa27ee","src/runtime.rs":"7305ab5086cfcd1172d193a3676c0c0057893ae72acd7106c2eabc558801376c","src/test-guard-page-skip.wat":"50a7adfe1022cfe4cf3b649726c6318a5c1a7014c151bf050d6f98ca062531f3","src/tests.rs":"6c73d3f116cd997c92db1d32139ce07fac4d8e7d4d502a115f5b6653144a757d","src/util.rs":"689b43ca7cf9b51b30eda6f808fdb032cc76f360a24c76e40ff48ecfe347aa12"},"package":"825b33fc35931913d1308797321d65b4ef5eedd6b412af920c92d67d352dd388"} \ No newline at end of file diff --git a/client/executor-wasmtime/.cargo_vcs_info.json b/client/executor-wasmtime/.cargo_vcs_info.json new file mode 100644 index 00000000..fa5c14e4 --- /dev/null +++ b/client/executor-wasmtime/.cargo_vcs_info.json @@ -0,0 +1,6 @@ +{ + "git": { + "sha1": "ac2b0e3fd86a23cc33b2f4d6f46ac9d0ecb05115" + }, + "path_in_vcs": "substrate/client/executor/wasmtime" +} \ No newline at end of file diff --git a/client/executor-wasmtime/Cargo.toml b/client/executor-wasmtime/Cargo.toml new file mode 100644 index 00000000..34e9a9d0 --- /dev/null +++ b/client/executor-wasmtime/Cargo.toml @@ -0,0 +1,220 @@ +# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO +# +# When uploading crates to the registry Cargo will automatically +# "normalize" Cargo.toml files for maximal compatibility +# with all versions of Cargo and also rewrite `path` dependencies +# to registry (e.g., crates.io) dependencies. +# +# If you are reading this file be aware that the original Cargo.toml +# will likely look very different (and much more reasonable). +# See Cargo.toml.orig for the original contents. + +[package] +authors = ["Parity Technologies "] +autobenches = false +autobins = false +autoexamples = false +autolib = false +autotests = false +build = "build.rs" +description = "Defines a `WasmRuntime` that uses the Wasmtime JIT to execute." +edition = "2021" +homepage = "https://paritytech.github.io/polkadot-sdk/" +license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +name = "sc-executor-wasmtime" +readme = "README.md" +repository = "https://github.com/paritytech/polkadot-sdk.git" +version = "0.43.0" + +[package.metadata.docs.rs] +targets = ["x86_64-unknown-linux-gnu"] + +[lib] +name = "sc_executor_wasmtime" +path = "src/lib.rs" + +[dependencies.anyhow] +default-features = false +version = "1.0.81" + +[dependencies.log] +default-features = true +version = "0.4.22" + +[dependencies.parking_lot] +default-features = true +version = "0.12.1" + +[dependencies.rustix] +default-features = false +features = [ + "fs", + "mm", + "param", + "std", + "use-libc", +] +version = "1.0.3" + +[dependencies.sc-allocator] +default-features = true +version = "35.0.0" + +[dependencies.sc-executor-common] +default-features = true +version = "0.43.0" + +[dependencies.sp-runtime-interface] +default-features = true +version = "33.0.0" + +[dependencies.sp-wasm-interface] +default-features = true +features = ["wasmtime"] +version = "24.0.0" + +[dependencies.wasmtime] +default-features = false +features = [ + "addr2line", + "cache", + "cranelift", + "demangle", + "gc", + "gc-null", + "parallel-compilation", + "pooling-allocator", + "profiling", + "threads", +] +version = "35.0.0" + +[dev-dependencies.cargo_metadata] +version = "0.15.4" + +[dev-dependencies.codec] +default-features = true +package = "parity-scale-codec" +version = "3.7.5" + +[dev-dependencies.paste] +default-features = true +version = "1.0.15" + +[dev-dependencies.tempfile] +version = "3.8.1" + +[dev-dependencies.wat] +version = "1.0.0" + +[lints.clippy.all] +level = "allow" +priority = 0 + +[lints.clippy.bind_instead_of_map] +level = "allow" +priority = 2 + +[lints.clippy.borrowed-box] +level = "allow" +priority = 2 + +[lints.clippy.complexity] +level = "warn" +priority = 1 + +[lints.clippy.correctness] +level = "warn" +priority = 1 + +[lints.clippy.default_constructed_unit_structs] +level = "allow" +priority = 2 + +[lints.clippy.derivable_impls] +level = "allow" +priority = 2 + +[lints.clippy.eq_op] +level = "allow" +priority = 2 + +[lints.clippy.erasing_op] +level = "allow" +priority = 2 + +[lints.clippy.extra-unused-type-parameters] +level = "allow" +priority = 2 + +[lints.clippy.identity-op] +level = "allow" +priority = 2 + +[lints.clippy.if-same-then-else] +level = "allow" +priority = 2 + +[lints.clippy.needless-lifetimes] +level = "allow" +priority = 2 + +[lints.clippy.needless_option_as_deref] +level = "allow" +priority = 2 + +[lints.clippy.nonminimal-bool] +level = "allow" +priority = 2 + +[lints.clippy.option-map-unit-fn] +level = "allow" +priority = 2 + +[lints.clippy.stable_sort_primitive] +level = "allow" +priority = 2 + +[lints.clippy.too-many-arguments] +level = "allow" +priority = 2 + +[lints.clippy.type_complexity] +level = "allow" +priority = 2 + +[lints.clippy.unit_arg] +level = "allow" +priority = 2 + +[lints.clippy.unnecessary_cast] +level = "allow" +priority = 2 + +[lints.clippy.useless_conversion] +level = "allow" +priority = 2 + +[lints.clippy.while_immutable_condition] +level = "allow" +priority = 2 + +[lints.clippy.zero-prefixed-literal] +level = "allow" +priority = 2 + +[lints.rust.suspicious_double_ref_op] +level = "allow" +priority = 2 + +[lints.rust.unexpected_cfgs] +check-cfg = [ + "cfg(enable_alloc_error_handler)", + "cfg(fuzzing)", + "cfg(ignore_flaky_test)", + "cfg(substrate_runtime)", + 'cfg(build_opt_level, values("3"))', + 'cfg(build_profile, values("debug", "release"))', +] +level = "warn" +priority = 0 diff --git a/client/executor-wasmtime/Cargo.toml.orig b/client/executor-wasmtime/Cargo.toml.orig new file mode 100644 index 00000000..bf14e84f --- /dev/null +++ b/client/executor-wasmtime/Cargo.toml.orig @@ -0,0 +1,60 @@ +[package] +name = "sc-executor-wasmtime" +version = "0.43.0" +authors.workspace = true +edition.workspace = true +license = "GPL-3.0-or-later WITH Classpath-exception-2.0" +homepage.workspace = true +repository.workspace = true +description = "Defines a `WasmRuntime` that uses the Wasmtime JIT to execute." +readme = "README.md" + +[lints] +workspace = true + +[package.metadata.docs.rs] +targets = ["x86_64-unknown-linux-gnu"] + +[dependencies] +log = { workspace = true, default-features = true } +parking_lot = { workspace = true, default-features = true } + +# When bumping wasmtime do not forget to also bump rustix +# to exactly the same version as used by wasmtime! +anyhow = { workspace = true } +sc-allocator.workspace = true +sc-allocator.default-features = true +sc-executor-common.workspace = true +sc-executor-common.default-features = true +sp-runtime-interface.workspace = true +sp-runtime-interface.default-features = true +sp-wasm-interface = { features = ["wasmtime"], workspace = true, default-features = true } +wasmtime = { features = [ + "addr2line", + "cache", + "cranelift", + "demangle", + "gc", + "gc-null", + "parallel-compilation", + "pooling-allocator", + "profiling", + "threads", +], workspace = true } + +# Here we include the rustix crate in the exactly same semver-compatible version as used by +# wasmtime and enable its 'use-libc' flag. +# +# By default rustix directly calls the appropriate syscalls completely bypassing libc; +# this doesn't have any actual benefits for us besides making it harder to debug memory +# problems (since then `mmap` etc. cannot be easily hooked into). +rustix = { features = ["fs", "mm", "param", "std", "use-libc"], workspace = true } + +[dev-dependencies] +cargo_metadata = { workspace = true } +codec = { workspace = true, default-features = true } +paste = { workspace = true, default-features = true } +sc-runtime-test = { path = "../runtime-test" } +sp-io = { default-features = true, path = "../../../primitives/io" } +tempfile = { workspace = true } +wat = { workspace = true } diff --git a/client/executor-wasmtime/README.md b/client/executor-wasmtime/README.md new file mode 100644 index 00000000..64fc2fa0 --- /dev/null +++ b/client/executor-wasmtime/README.md @@ -0,0 +1 @@ +License: GPL-3.0-or-later WITH Classpath-exception-2.0 diff --git a/client/executor-wasmtime/build.rs b/client/executor-wasmtime/build.rs new file mode 100644 index 00000000..c63f0b8b --- /dev/null +++ b/client/executor-wasmtime/build.rs @@ -0,0 +1,25 @@ +// This file is part of Substrate. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +use std::env; + +fn main() { + if let Ok(profile) = env::var("PROFILE") { + println!("cargo:rustc-cfg=build_profile=\"{}\"", profile); + } +} diff --git a/client/executor-wasmtime/src/host.rs b/client/executor-wasmtime/src/host.rs new file mode 100644 index 00000000..f8c78cbb --- /dev/null +++ b/client/executor-wasmtime/src/host.rs @@ -0,0 +1,128 @@ +// This file is part of Substrate. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +//! This module defines `HostState` and `HostContext` structs which provide logic and state +//! required for execution of host. + +use wasmtime::Caller; + +use sc_allocator::{AllocationStats, FreeingBumpHeapAllocator}; +use sp_wasm_interface::{Pointer, WordSize}; + +use crate::{instance_wrapper::MemoryWrapper, runtime::StoreData, util}; + +/// The state required to construct a HostContext context. The context only lasts for one host +/// call, whereas the state is maintained for the duration of a Wasm runtime call, which may make +/// many different host calls that must share state. +pub struct HostState { + /// The allocator instance to keep track of allocated memory. + /// + /// This is stored as an `Option` as we need to temporarily set this to `None` when we are + /// allocating/deallocating memory. The problem being that we can only mutable access `caller` + /// once. + allocator: Option, + panic_message: Option, +} + +impl HostState { + /// Constructs a new `HostState`. + pub fn new(allocator: FreeingBumpHeapAllocator) -> Self { + HostState { allocator: Some(allocator), panic_message: None } + } + + /// Takes the error message out of the host state, leaving a `None` in its place. + pub fn take_panic_message(&mut self) -> Option { + self.panic_message.take() + } + + pub(crate) fn allocation_stats(&self) -> AllocationStats { + self.allocator.as_ref() + .expect("Allocator is always set and only unavailable when doing an allocation/deallocation; qed") + .stats() + } +} + +/// A `HostContext` implements `FunctionContext` for making host calls from a Wasmtime +/// runtime. The `HostContext` exists only for the lifetime of the call and borrows state from +/// a longer-living `HostState`. +pub(crate) struct HostContext<'a> { + pub(crate) caller: Caller<'a, StoreData>, +} + +impl<'a> HostContext<'a> { + fn host_state_mut(&mut self) -> &mut HostState { + self.caller + .data_mut() + .host_state_mut() + .expect("host state is not empty when calling a function in wasm; qed") + } +} + +impl<'a> sp_wasm_interface::FunctionContext for HostContext<'a> { + fn read_memory_into( + &self, + address: Pointer, + dest: &mut [u8], + ) -> sp_wasm_interface::Result<()> { + util::read_memory_into(&self.caller, address, dest).map_err(|e| e.to_string()) + } + + fn write_memory(&mut self, address: Pointer, data: &[u8]) -> sp_wasm_interface::Result<()> { + util::write_memory_from(&mut self.caller, address, data).map_err(|e| e.to_string()) + } + + fn allocate_memory(&mut self, size: WordSize) -> sp_wasm_interface::Result> { + let memory = self.caller.data().memory(); + let mut allocator = self + .host_state_mut() + .allocator + .take() + .expect("allocator is not empty when calling a function in wasm; qed"); + + // We can not return on error early, as we need to store back allocator. + let res = allocator + .allocate(&mut MemoryWrapper(&memory, &mut self.caller), size) + .map_err(|e| e.to_string()); + + self.host_state_mut().allocator = Some(allocator); + + res + } + + fn deallocate_memory(&mut self, ptr: Pointer) -> sp_wasm_interface::Result<()> { + let memory = self.caller.data().memory(); + let mut allocator = self + .host_state_mut() + .allocator + .take() + .expect("allocator is not empty when calling a function in wasm; qed"); + + // We can not return on error early, as we need to store back allocator. + let res = allocator + .deallocate(&mut MemoryWrapper(&memory, &mut self.caller), ptr) + .map_err(|e| e.to_string()); + + self.host_state_mut().allocator = Some(allocator); + + res + } + + fn register_panic_error_message(&mut self, message: &str) { + self.host_state_mut().panic_message = Some(message.to_owned()); + } +} diff --git a/client/executor-wasmtime/src/imports.rs b/client/executor-wasmtime/src/imports.rs new file mode 100644 index 00000000..fccc121f --- /dev/null +++ b/client/executor-wasmtime/src/imports.rs @@ -0,0 +1,123 @@ +// This file is part of Substrate. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +use crate::{host::HostContext, runtime::StoreData}; +use sc_executor_common::error::WasmError; +use sp_wasm_interface::{FunctionContext, HostFunctions}; +use std::collections::HashMap; +use wasmtime::{ExternType, FuncType, ImportType, Linker, Module}; + +/// Goes over all imports of a module and prepares the given linker for instantiation of the module. +/// Returns an error if there are imports that cannot be satisfied. +pub(crate) fn prepare_imports( + linker: &mut Linker, + module: &Module, + allow_missing_func_imports: bool, +) -> Result<(), WasmError> +where + H: HostFunctions, +{ + let mut pending_func_imports = HashMap::new(); + for import_ty in module.imports() { + let name = import_ty.name(); + + if import_ty.module() != "env" { + return Err(WasmError::Other(format!( + "host doesn't provide any imports from non-env module: {}:{}", + import_ty.module(), + name, + ))) + } + + match import_ty.ty() { + ExternType::Func(func_ty) => { + pending_func_imports.insert(name.to_owned(), (import_ty, func_ty)); + }, + _ => + return Err(WasmError::Other(format!( + "host doesn't provide any non function imports: {}:{}", + import_ty.module(), + name, + ))), + }; + } + + let mut registry = Registry { linker, pending_func_imports }; + H::register_static(&mut registry)?; + + if !registry.pending_func_imports.is_empty() { + if allow_missing_func_imports { + for (name, (import_ty, func_ty)) in registry.pending_func_imports { + let error = format!("call to a missing function {}:{}", import_ty.module(), name); + log::debug!("Missing import: '{}' {:?}", name, func_ty); + linker + .func_new("env", &name, func_ty.clone(), move |_, _, _| { + Err(anyhow::Error::msg(error.clone())) + }) + .expect("adding a missing import stub can only fail when the item already exists, and it is missing here; qed"); + } + } else { + let mut names = Vec::new(); + for (name, (import_ty, _)) in registry.pending_func_imports { + names.push(format!("'{}:{}'", import_ty.module(), name)); + } + let names = names.join(", "); + return Err(WasmError::Other(format!( + "runtime requires function imports which are not present on the host: {}", + names + ))) + } + } + + Ok(()) +} + +struct Registry<'a, 'b> { + linker: &'a mut Linker, + pending_func_imports: HashMap, FuncType)>, +} + +impl<'a, 'b> sp_wasm_interface::HostFunctionRegistry for Registry<'a, 'b> { + type State = StoreData; + type Error = WasmError; + type FunctionContext = HostContext<'a>; + + fn with_function_context( + caller: wasmtime::Caller, + callback: impl FnOnce(&mut dyn FunctionContext) -> R, + ) -> R { + callback(&mut HostContext { caller }) + } + + fn register_static( + &mut self, + fn_name: &str, + func: impl wasmtime::IntoFunc, + ) -> Result<(), Self::Error> { + if self.pending_func_imports.remove(fn_name).is_some() { + self.linker.func_wrap("env", fn_name, func).map_err(|error| { + WasmError::Other(format!( + "failed to register host function '{}' with the WASM linker: {:#}", + fn_name, error + )) + })?; + } + + Ok(()) + } +} diff --git a/client/executor-wasmtime/src/instance_wrapper.rs b/client/executor-wasmtime/src/instance_wrapper.rs new file mode 100644 index 00000000..4f67d1df --- /dev/null +++ b/client/executor-wasmtime/src/instance_wrapper.rs @@ -0,0 +1,208 @@ +// This file is part of Substrate. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +//! Defines data and logic needed for interaction with an WebAssembly instance of a substrate +//! runtime module. + +use std::sync::Arc; + +use crate::runtime::{InstanceCounter, ReleaseInstanceHandle, Store, StoreData}; +use sc_executor_common::error::{Backtrace, Error, MessageWithBacktrace, Result, WasmError}; +use sp_wasm_interface::{Pointer, WordSize}; +use wasmtime::{AsContext, AsContextMut, Engine, Instance, InstancePre, Memory}; + +/// Wasm blob entry point. +pub struct EntryPoint(wasmtime::TypedFunc<(u32, u32), u64>); + +impl EntryPoint { + /// Call this entry point. + pub(crate) fn call( + &self, + store: &mut Store, + data_ptr: Pointer, + data_len: WordSize, + ) -> Result { + let data_ptr = u32::from(data_ptr); + let data_len = u32::from(data_len); + + self.0.call(&mut *store, (data_ptr, data_len)).map_err(|trap| { + let host_state = store + .data_mut() + .host_state + .as_mut() + .expect("host state cannot be empty while a function is being called; qed"); + + let backtrace = trap.downcast_ref::().map(|backtrace| { + // The logic to print out a backtrace is somewhat complicated, + // so let's get wasmtime to print it out for us. + Backtrace { backtrace_string: backtrace.to_string() } + }); + + if let Some(message) = host_state.take_panic_message() { + Error::AbortedDueToPanic(MessageWithBacktrace { message, backtrace }) + } else { + let message = trap.root_cause().to_string(); + Error::AbortedDueToTrap(MessageWithBacktrace { message, backtrace }) + } + }) + } + + pub fn direct( + func: wasmtime::Func, + ctx: impl AsContext, + ) -> std::result::Result { + let entrypoint = func + .typed::<(u32, u32), u64>(ctx) + .map_err(|_| "Invalid signature for direct entry point")?; + Ok(Self(entrypoint)) + } +} + +/// Wrapper around [`Memory`] that implements [`sc_allocator::Memory`]. +pub(crate) struct MemoryWrapper<'a, C>(pub &'a wasmtime::Memory, pub &'a mut C); + +impl sc_allocator::Memory for MemoryWrapper<'_, C> { + fn with_access_mut(&mut self, run: impl FnOnce(&mut [u8]) -> R) -> R { + run(self.0.data_mut(&mut self.1)) + } + + fn with_access(&self, run: impl FnOnce(&[u8]) -> R) -> R { + run(self.0.data(&self.1)) + } + + fn grow(&mut self, additional: u32) -> std::result::Result<(), ()> { + self.0 + .grow(&mut self.1, additional as u64) + .map_err(|e| { + log::error!( + target: "wasm-executor", + "Failed to grow memory by {} pages: {}", + additional, + e, + ) + }) + .map(drop) + } + + fn pages(&self) -> u32 { + self.0.size(&self.1) as u32 + } + + fn max_pages(&self) -> Option { + self.0.ty(&self.1).maximum().map(|p| p as _) + } +} + +/// Wrap the given WebAssembly Instance of a wasm module with Substrate-runtime. +/// +/// This struct is a handy wrapper around a wasmtime `Instance` that provides substrate specific +/// routines. +pub struct InstanceWrapper { + instance: Instance, + store: Store, + // NOTE: We want to decrement the instance counter *after* the store has been dropped + // to avoid a potential race condition, so this field must always be kept + // as the last field in the struct! + _release_instance_handle: ReleaseInstanceHandle, +} + +impl InstanceWrapper { + pub(crate) fn new( + engine: &Engine, + instance_pre: &InstancePre, + instance_counter: Arc, + ) -> Result { + let _release_instance_handle = instance_counter.acquire_instance(); + let mut store = Store::new(engine, Default::default()); + let instance = instance_pre.instantiate(&mut store).map_err(|error| { + WasmError::Other(format!( + "failed to instantiate a new WASM module instance: {:#}", + error, + )) + })?; + + let memory = get_linear_memory(&instance, &mut store)?; + + store.data_mut().memory = Some(memory); + + Ok(InstanceWrapper { instance, store, _release_instance_handle }) + } + + /// Resolves a substrate entrypoint by the given name. + /// + /// An entrypoint must have a signature `(i32, i32) -> i64`, otherwise this function will return + /// an error. + pub fn resolve_entrypoint(&mut self, method: &str) -> Result { + // Resolve the requested method and verify that it has a proper signature. + let export = self + .instance + .get_export(&mut self.store, method) + .ok_or_else(|| Error::from(format!("Exported method {} is not found", method)))?; + let func = export + .into_func() + .ok_or_else(|| Error::from(format!("Export {} is not a function", method)))?; + EntryPoint::direct(func, &self.store).map_err(|_| { + Error::from(format!("Exported function '{}' has invalid signature.", method)) + }) + } + + /// Reads `__heap_base: i32` global variable and returns it. + /// + /// If it doesn't exist, not a global or of not i32 type returns an error. + pub fn extract_heap_base(&mut self) -> Result { + let heap_base_export = self + .instance + .get_export(&mut self.store, "__heap_base") + .ok_or_else(|| Error::from("__heap_base is not found"))?; + + let heap_base_global = heap_base_export + .into_global() + .ok_or_else(|| Error::from("__heap_base is not a global"))?; + + let heap_base = heap_base_global + .get(&mut self.store) + .i32() + .ok_or_else(|| Error::from("__heap_base is not a i32"))?; + + Ok(heap_base as u32) + } +} + +/// Extract linear memory instance from the given instance. +fn get_linear_memory(instance: &Instance, ctx: impl AsContextMut) -> Result { + let memory_export = instance + .get_export(ctx, "memory") + .ok_or_else(|| Error::from("memory is not exported under `memory` name"))?; + + let memory = memory_export + .into_memory() + .ok_or_else(|| Error::from("the `memory` export should have memory type"))?; + + Ok(memory) +} + +/// Functions related to memory. +impl InstanceWrapper { + pub(crate) fn store(&self) -> &Store { + &self.store + } + + pub(crate) fn store_mut(&mut self) -> &mut Store { + &mut self.store + } +} diff --git a/client/executor-wasmtime/src/lib.rs b/client/executor-wasmtime/src/lib.rs new file mode 100644 index 00000000..54e97899 --- /dev/null +++ b/client/executor-wasmtime/src/lib.rs @@ -0,0 +1,48 @@ +// This file is part of Substrate. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +//! Defines a `WasmRuntime` that uses the Wasmtime JIT to execute. +//! +//! You can choose a profiling strategy at runtime with +//! environment variable `WASMTIME_PROFILING_STRATEGY`: +//! +//! | `WASMTIME_PROFILING_STRATEGY` | Effect | +//! |-------------|-------------------------| +//! | undefined | No profiling | +//! | `"jitdump"` | jitdump profiling | +//! | `"perfmap"` | perfmap profiling | +//! | other value | No profiling (warning) | + +mod host; +mod imports; +mod instance_wrapper; +mod runtime; +mod util; + +#[cfg(test)] +mod tests; + +pub use runtime::{ + create_runtime, create_runtime_from_artifact, create_runtime_from_artifact_bytes, + prepare_runtime_artifact, Config, DeterministicStackLimit, InstantiationStrategy, Semantics, + WasmtimeRuntime, +}; +pub use sc_executor_common::{ + runtime_blob::RuntimeBlob, + wasm_runtime::{HeapAllocStrategy, WasmModule}, +}; diff --git a/client/executor-wasmtime/src/runtime.rs b/client/executor-wasmtime/src/runtime.rs new file mode 100644 index 00000000..2e47f146 --- /dev/null +++ b/client/executor-wasmtime/src/runtime.rs @@ -0,0 +1,726 @@ +// This file is part of Substrate. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +//! Defines the compiled Wasm runtime that uses Wasmtime internally. + +use crate::{ + host::HostState, + instance_wrapper::{EntryPoint, InstanceWrapper, MemoryWrapper}, + util::{self, replace_strategy_if_broken}, +}; + +use parking_lot::Mutex; +use sc_allocator::{AllocationStats, FreeingBumpHeapAllocator}; +use sc_executor_common::{ + error::{Error, Result, WasmError}, + runtime_blob::RuntimeBlob, + util::checked_range, + wasm_runtime::{HeapAllocStrategy, WasmInstance, WasmModule}, +}; +use sp_runtime_interface::unpack_ptr_and_len; +use sp_wasm_interface::{HostFunctions, Pointer, WordSize}; +use std::{ + path::{Path, PathBuf}, + sync::{ + atomic::{AtomicBool, Ordering}, + Arc, + }, +}; +use wasmtime::{AsContext, Cache, CacheConfig, Engine, Memory}; + +const MAX_INSTANCE_COUNT: u32 = 64; + +#[derive(Default)] +pub(crate) struct StoreData { + /// This will only be set when we call into the runtime. + pub(crate) host_state: Option, + /// This will be always set once the store is initialized. + pub(crate) memory: Option, +} + +impl StoreData { + /// Returns a mutable reference to the host state. + pub fn host_state_mut(&mut self) -> Option<&mut HostState> { + self.host_state.as_mut() + } + + /// Returns the host memory. + pub fn memory(&self) -> Memory { + self.memory.expect("memory is always set; qed") + } +} + +pub(crate) type Store = wasmtime::Store; + +enum Strategy { + RecreateInstance(InstanceCreator), +} + +struct InstanceCreator { + engine: Engine, + instance_pre: Arc>, + instance_counter: Arc, +} + +impl InstanceCreator { + fn instantiate(&mut self) -> Result { + InstanceWrapper::new(&self.engine, &self.instance_pre, self.instance_counter.clone()) + } +} + +/// A handle for releasing an instance acquired by [`InstanceCounter::acquire_instance`]. +pub(crate) struct ReleaseInstanceHandle { + counter: Arc, +} + +impl Drop for ReleaseInstanceHandle { + fn drop(&mut self) { + { + let mut counter = self.counter.counter.lock(); + *counter = counter.saturating_sub(1); + } + + self.counter.wait_for_instance.notify_one(); + } +} + +/// Keeps track on the number of parallel instances. +/// +/// The runtime cache keeps track on the number of parallel instances. The maximum number in the +/// cache is less than what we have configured as [`MAX_INSTANCE_COUNT`] for wasmtime. However, the +/// cache will create on demand instances if required. This instance counter will ensure that we are +/// blocking when we are trying to create too many instances. +#[derive(Default)] +pub(crate) struct InstanceCounter { + counter: Mutex, + wait_for_instance: parking_lot::Condvar, +} + +impl InstanceCounter { + /// Acquire an instance. + /// + /// Blocks if there is no free instance available. + /// + /// The returned [`ReleaseInstanceHandle`] should be dropped when the instance isn't used + /// anymore. + pub fn acquire_instance(self: Arc) -> ReleaseInstanceHandle { + let mut counter = self.counter.lock(); + + while *counter >= MAX_INSTANCE_COUNT { + self.wait_for_instance.wait(&mut counter); + } + *counter += 1; + + ReleaseInstanceHandle { counter: self.clone() } + } +} + +/// A `WasmModule` implementation using wasmtime to compile the runtime module to machine code +/// and execute the compiled code. +pub struct WasmtimeRuntime { + engine: Engine, + instance_pre: Arc>, + instantiation_strategy: InternalInstantiationStrategy, + instance_counter: Arc, +} + +impl WasmModule for WasmtimeRuntime { + fn new_instance(&self) -> Result> { + let strategy = match self.instantiation_strategy { + InternalInstantiationStrategy::Builtin => Strategy::RecreateInstance(InstanceCreator { + engine: self.engine.clone(), + instance_pre: self.instance_pre.clone(), + instance_counter: self.instance_counter.clone(), + }), + }; + + Ok(Box::new(WasmtimeInstance { strategy })) + } +} + +/// A `WasmInstance` implementation that reuses compiled module and spawns instances +/// to execute the compiled code. +pub struct WasmtimeInstance { + strategy: Strategy, +} + +impl WasmtimeInstance { + fn call_impl( + &mut self, + method: &str, + data: &[u8], + allocation_stats: &mut Option, + ) -> Result> { + match &mut self.strategy { + Strategy::RecreateInstance(ref mut instance_creator) => { + let mut instance_wrapper = instance_creator.instantiate()?; + let heap_base = instance_wrapper.extract_heap_base()?; + let entrypoint = instance_wrapper.resolve_entrypoint(method)?; + let allocator = FreeingBumpHeapAllocator::new(heap_base); + + perform_call(data, &mut instance_wrapper, entrypoint, allocator, allocation_stats) + }, + } + } +} + +impl WasmInstance for WasmtimeInstance { + fn call_with_allocation_stats( + &mut self, + method: &str, + data: &[u8], + ) -> (Result>, Option) { + let mut allocation_stats = None; + let result = self.call_impl(method, data, &mut allocation_stats); + (result, allocation_stats) + } +} + +/// Prepare a directory structure and a config file to enable wasmtime caching. +/// +/// In case of an error the caching will not be enabled. +fn setup_wasmtime_caching( + cache_path: &Path, + config: &mut wasmtime::Config, +) -> std::result::Result<(), String> { + use std::fs; + + let wasmtime_cache_root = cache_path.join("wasmtime"); + fs::create_dir_all(&wasmtime_cache_root) + .map_err(|err| format!("cannot create the dirs to cache: {}", err))?; + + let mut cache_config = CacheConfig::new(); + cache_config.with_directory(cache_path); + + let cache = + Cache::new(cache_config).map_err(|err| format!("failed to initiate Cache: {err:?}"))?; + + config.cache(Some(cache)); + + Ok(()) +} + +fn common_config(semantics: &Semantics) -> std::result::Result { + let mut config = wasmtime::Config::new(); + config.cranelift_opt_level(wasmtime::OptLevel::SpeedAndSize); + config.cranelift_nan_canonicalization(semantics.canonicalize_nans); + + let profiler = match std::env::var_os("WASMTIME_PROFILING_STRATEGY") { + Some(os_string) if os_string == "jitdump" => wasmtime::ProfilingStrategy::JitDump, + Some(os_string) if os_string == "perfmap" => wasmtime::ProfilingStrategy::PerfMap, + None => wasmtime::ProfilingStrategy::None, + Some(_) => { + // Remember if we have already logged a warning due to an unknown profiling strategy. + static UNKNOWN_PROFILING_STRATEGY: AtomicBool = AtomicBool::new(false); + // Make sure that the warning will not be relogged regularly. + if !UNKNOWN_PROFILING_STRATEGY.swap(true, Ordering::Relaxed) { + log::warn!("WASMTIME_PROFILING_STRATEGY is set to unknown value, ignored."); + } + wasmtime::ProfilingStrategy::None + }, + }; + config.profiler(profiler); + + let native_stack_max = match semantics.deterministic_stack_limit { + Some(DeterministicStackLimit { native_stack_max, .. }) => native_stack_max, + + // In `wasmtime` 0.35 the default stack size limit was changed from 1MB to 512KB. + // + // This broke at least one parachain which depended on the original 1MB limit, + // so here we restore it to what it was originally. + None => 1024 * 1024, + }; + + config.max_wasm_stack(native_stack_max as usize); + + config.parallel_compilation(semantics.parallel_compilation); + + // Be clear and specific about the extensions we support. If an update brings new features + // they should be introduced here as well. + config.wasm_reference_types(semantics.wasm_reference_types); + config.wasm_simd(semantics.wasm_simd); + config.wasm_relaxed_simd(semantics.wasm_simd); + config.wasm_bulk_memory(semantics.wasm_bulk_memory); + config.wasm_multi_value(semantics.wasm_multi_value); + config.wasm_multi_memory(false); + config.wasm_threads(false); + config.wasm_memory64(false); + config.wasm_tail_call(false); + config.wasm_extended_const(false); + + let (use_pooling, use_cow) = match semantics.instantiation_strategy { + InstantiationStrategy::PoolingCopyOnWrite => (true, true), + InstantiationStrategy::Pooling => (true, false), + InstantiationStrategy::RecreateInstanceCopyOnWrite => (false, true), + InstantiationStrategy::RecreateInstance => (false, false), + }; + + const WASM_PAGE_SIZE: u64 = 65536; + + config.memory_init_cow(use_cow); + config.memory_guaranteed_dense_image_size(match semantics.heap_alloc_strategy { + HeapAllocStrategy::Dynamic { maximum_pages } => + maximum_pages.map(|p| p as u64 * WASM_PAGE_SIZE).unwrap_or(u64::MAX), + HeapAllocStrategy::Static { .. } => u64::MAX, + }); + + if use_pooling { + const MAX_WASM_PAGES: u64 = 0x10000; + + let memory_pages = match semantics.heap_alloc_strategy { + HeapAllocStrategy::Dynamic { maximum_pages } => + maximum_pages.map(|p| p as u64).unwrap_or(MAX_WASM_PAGES), + HeapAllocStrategy::Static { .. } => MAX_WASM_PAGES, + }; + + let mut pooling_config = wasmtime::PoolingAllocationConfig::default(); + pooling_config + .max_unused_warm_slots(4) + // Pooling needs a bunch of hard limits to be set; if we go over + // any of these then the instantiation will fail. + // + // Current minimum values for kusama (as of 2022-04-14): + // size: 32384 + // table_elements: 1249 + // memory_pages: 2070 + .max_core_instance_size(512 * 1024) + .table_elements(8192) + .max_memory_size(memory_pages as usize * WASM_PAGE_SIZE as usize) + .total_tables(MAX_INSTANCE_COUNT) + .total_memories(MAX_INSTANCE_COUNT) + // This determines how many instances of the module can be + // instantiated in parallel from the same `Module`. + .total_core_instances(MAX_INSTANCE_COUNT); + + config.allocation_strategy(wasmtime::InstanceAllocationStrategy::Pooling(pooling_config)); + } + + Ok(config) +} + +/// Knobs for deterministic stack height limiting. +/// +/// The WebAssembly standard defines a call/value stack but it doesn't say anything about its +/// size except that it has to be finite. The implementations are free to choose their own notion +/// of limit: some may count the number of calls or values, others would rely on the host machine +/// stack and trap on reaching a guard page. +/// +/// This obviously is a source of non-determinism during execution. This feature can be used +/// to instrument the code so that it will count the depth of execution in some deterministic +/// way (the machine stack limit should be so high that the deterministic limit always triggers +/// first). +/// +/// The deterministic stack height limiting feature allows to instrument the code so that it will +/// count the number of items that may be on the stack. This counting will only act as an rough +/// estimate of the actual stack limit in wasmtime. This is because wasmtime measures it's stack +/// usage in bytes. +/// +/// The actual number of bytes consumed by a function is not trivial to compute without going +/// through full compilation. Therefore, it's expected that `native_stack_max` is greatly +/// overestimated and thus never reached in practice. The stack overflow check introduced by the +/// instrumentation and that relies on the logical item count should be reached first. +/// +/// See [here][stack_height] for more details of the instrumentation +/// +/// [stack_height]: https://github.com/paritytech/wasm-instrument/blob/master/src/stack_limiter/mod.rs +#[derive(Clone)] +pub struct DeterministicStackLimit { + /// A number of logical "values" that can be pushed on the wasm stack. A trap will be triggered + /// if exceeded. + /// + /// A logical value is a local, an argument or a value pushed on operand stack. + pub logical_max: u32, + /// The maximum number of bytes for stack used by wasmtime JITed code. + /// + /// It's not specified how much bytes will be consumed by a stack frame for a given wasm + /// function after translation into machine code. It is also not quite trivial. + /// + /// Therefore, this number should be chosen conservatively. It must be so large so that it can + /// fit the [`logical_max`](Self::logical_max) logical values on the stack, according to the + /// current instrumentation algorithm. + /// + /// This value cannot be 0. + pub native_stack_max: u32, +} + +/// The instantiation strategy to use for the WASM executor. +/// +/// All of the CoW strategies (with `CopyOnWrite` suffix) are only supported when either: +/// a) we're running on Linux, +/// b) we're running on an Unix-like system and we're precompiling +/// our module beforehand and instantiating from a file. +/// +/// If the CoW variant of a strategy is unsupported the executor will +/// fall back to the non-CoW equivalent. +#[non_exhaustive] +#[derive(Copy, Clone, PartialEq, Eq, Hash, Debug)] +pub enum InstantiationStrategy { + /// Pool the instances to avoid initializing everything from scratch + /// on each instantiation. Use copy-on-write memory when possible. + /// + /// This is the fastest instantiation strategy. + PoolingCopyOnWrite, + + /// Recreate the instance from scratch on every instantiation. + /// Use copy-on-write memory when possible. + RecreateInstanceCopyOnWrite, + + /// Pool the instances to avoid initializing everything from scratch + /// on each instantiation. + Pooling, + + /// Recreate the instance from scratch on every instantiation. Very slow. + RecreateInstance, +} + +enum InternalInstantiationStrategy { + Builtin, +} + +#[derive(Clone)] +pub struct Semantics { + /// The instantiation strategy to use. + pub instantiation_strategy: InstantiationStrategy, + + /// Specifying `Some` will enable deterministic stack height. That is, all executor + /// invocations will reach stack overflow at the exactly same point across different wasmtime + /// versions and architectures. + /// + /// This is achieved by a combination of running an instrumentation pass on input code and + /// configuring wasmtime accordingly. + /// + /// Since this feature depends on instrumentation, it can be set only if runtime is + /// instantiated using the runtime blob, e.g. using [`create_runtime`]. + // I.e. if [`CodeSupplyMode::Verbatim`] is used. + pub deterministic_stack_limit: Option, + + /// Controls whether wasmtime should compile floating point in a way that doesn't allow for + /// non-determinism. + /// + /// By default, the wasm spec allows some local non-determinism wrt. certain floating point + /// operations. Specifically, those operations that are not defined to operate on bits (e.g. + /// fneg) can produce NaN values. The exact bit pattern for those is not specified and may + /// depend on the particular machine that executes wasmtime generated JITed machine code. That + /// is a source of non-deterministic values. + /// + /// The classical runtime environment for Substrate allowed it and punted this on the runtime + /// developers. For PVFs, we want to ensure that execution is deterministic though. Therefore, + /// for PVF execution this flag is meant to be turned on. + pub canonicalize_nans: bool, + + /// Configures wasmtime to use multiple threads for compiling. + pub parallel_compilation: bool, + + /// The heap allocation strategy to use. + pub heap_alloc_strategy: HeapAllocStrategy, + + /// Enables WASM Multi-Value proposal + pub wasm_multi_value: bool, + + /// Enables WASM Bulk Memory Operations proposal + pub wasm_bulk_memory: bool, + + /// Enables WASM Reference Types proposal + pub wasm_reference_types: bool, + + /// Enables WASM Fixed-Width SIMD proposal + pub wasm_simd: bool, +} + +#[derive(Clone)] +pub struct Config { + /// The WebAssembly standard requires all imports of an instantiated module to be resolved, + /// otherwise, the instantiation fails. If this option is set to `true`, then this behavior is + /// overridden and imports that are requested by the module and not provided by the host + /// functions will be resolved using stubs. These stubs will trap upon a call. + pub allow_missing_func_imports: bool, + + /// A directory in which wasmtime can store its compiled artifacts cache. + pub cache_path: Option, + + /// Tuning of various semantics of the wasmtime executor. + pub semantics: Semantics, +} + +enum CodeSupplyMode<'a> { + /// The runtime is instantiated using the given runtime blob. + Fresh(RuntimeBlob), + + /// The runtime is instantiated using a precompiled module at the given path. + /// + /// This assumes that the code is already prepared for execution and the same `Config` was + /// used. + /// + /// We use a `Path` here instead of simply passing a byte slice to allow `wasmtime` to + /// map the runtime's linear memory on supported platforms in a copy-on-write fashion. + Precompiled(&'a Path), + + /// The runtime is instantiated using a precompiled module with the given bytes. + /// + /// This assumes that the code is already prepared for execution and the same `Config` was + /// used. + PrecompiledBytes(&'a [u8]), +} + +/// Create a new `WasmtimeRuntime` given the code. This function performs translation from Wasm to +/// machine code, which can be computationally heavy. +/// +/// The `H` generic parameter is used to statically pass a set of host functions which are exposed +/// to the runtime. +pub fn create_runtime( + blob: RuntimeBlob, + config: Config, +) -> std::result::Result +where + H: HostFunctions, +{ + // SAFETY: this is safe because it doesn't use `CodeSupplyMode::Precompiled`. + unsafe { do_create_runtime::(CodeSupplyMode::Fresh(blob), config) } +} + +/// The same as [`create_runtime`] but takes a path to a precompiled artifact, +/// which makes this function considerably faster than [`create_runtime`]. +/// +/// # Safety +/// +/// The caller must ensure that the compiled artifact passed here was: +/// 1) produced by [`prepare_runtime_artifact`], +/// 2) written to the disk as a file, +/// 3) was not modified, +/// 4) will not be modified while any runtime using this artifact is alive, or is being +/// instantiated. +/// +/// Failure to adhere to these requirements might lead to crashes and arbitrary code execution. +/// +/// It is ok though if the compiled artifact was created by code of another version or with +/// different configuration flags. In such case the caller will receive an `Err` deterministically. +pub unsafe fn create_runtime_from_artifact( + compiled_artifact_path: &Path, + config: Config, +) -> std::result::Result +where + H: HostFunctions, +{ + do_create_runtime::(CodeSupplyMode::Precompiled(compiled_artifact_path), config) +} + +/// The same as [`create_runtime`] but takes the bytes of a precompiled artifact, +/// which makes this function considerably faster than [`create_runtime`], +/// but slower than the more optimized [`create_runtime_from_artifact`]. +/// This is especially slow on non-Linux Unix systems. Useful in very niche cases. +/// +/// # Safety +/// +/// The caller must ensure that the compiled artifact passed here was: +/// 1) produced by [`prepare_runtime_artifact`], +/// 2) was not modified, +/// +/// Failure to adhere to these requirements might lead to crashes and arbitrary code execution. +/// +/// It is ok though if the compiled artifact was created by code of another version or with +/// different configuration flags. In such case the caller will receive an `Err` deterministically. +pub unsafe fn create_runtime_from_artifact_bytes( + compiled_artifact_bytes: &[u8], + config: Config, +) -> std::result::Result +where + H: HostFunctions, +{ + do_create_runtime::(CodeSupplyMode::PrecompiledBytes(compiled_artifact_bytes), config) +} + +/// # Safety +/// +/// This is only unsafe if called with [`CodeSupplyMode::Artifact`]. See +/// [`create_runtime_from_artifact`] to get more details. +unsafe fn do_create_runtime( + code_supply_mode: CodeSupplyMode<'_>, + mut config: Config, +) -> std::result::Result +where + H: HostFunctions, +{ + replace_strategy_if_broken(&mut config.semantics.instantiation_strategy); + + let mut wasmtime_config = common_config(&config.semantics)?; + if let Some(ref cache_path) = config.cache_path { + if let Err(reason) = setup_wasmtime_caching(cache_path, &mut wasmtime_config) { + log::warn!( + "failed to setup wasmtime cache. Performance may degrade significantly: {}.", + reason, + ); + } + } + + let engine = Engine::new(&wasmtime_config) + .map_err(|e| WasmError::Other(format!("cannot create the wasmtime engine: {:#}", e)))?; + + let (module, instantiation_strategy) = match code_supply_mode { + CodeSupplyMode::Fresh(blob) => { + let blob = prepare_blob_for_compilation(blob, &config.semantics)?; + let serialized_blob = blob.clone().serialize(); + + let module = wasmtime::Module::new(&engine, &serialized_blob) + .map_err(|e| WasmError::Other(format!("cannot create module: {:#}", e)))?; + + match config.semantics.instantiation_strategy { + InstantiationStrategy::Pooling | + InstantiationStrategy::PoolingCopyOnWrite | + InstantiationStrategy::RecreateInstance | + InstantiationStrategy::RecreateInstanceCopyOnWrite => + (module, InternalInstantiationStrategy::Builtin), + } + }, + CodeSupplyMode::Precompiled(compiled_artifact_path) => { + // SAFETY: The unsafety of `deserialize_file` is covered by this function. The + // responsibilities to maintain the invariants are passed to the caller. + // + // See [`create_runtime_from_artifact`] for more details. + let module = wasmtime::Module::deserialize_file(&engine, compiled_artifact_path) + .map_err(|e| WasmError::Other(format!("cannot deserialize module: {:#}", e)))?; + + (module, InternalInstantiationStrategy::Builtin) + }, + CodeSupplyMode::PrecompiledBytes(compiled_artifact_bytes) => { + // SAFETY: The unsafety of `deserialize` is covered by this function. The + // responsibilities to maintain the invariants are passed to the caller. + // + // See [`create_runtime_from_artifact_bytes`] for more details. + let module = wasmtime::Module::deserialize(&engine, compiled_artifact_bytes) + .map_err(|e| WasmError::Other(format!("cannot deserialize module: {:#}", e)))?; + + (module, InternalInstantiationStrategy::Builtin) + }, + }; + + let mut linker = wasmtime::Linker::new(&engine); + crate::imports::prepare_imports::(&mut linker, &module, config.allow_missing_func_imports)?; + + let instance_pre = linker + .instantiate_pre(&module) + .map_err(|e| WasmError::Other(format!("cannot preinstantiate module: {:#}", e)))?; + + Ok(WasmtimeRuntime { + engine, + instance_pre: Arc::new(instance_pre), + instantiation_strategy, + instance_counter: Default::default(), + }) +} + +fn prepare_blob_for_compilation( + mut blob: RuntimeBlob, + semantics: &Semantics, +) -> std::result::Result { + if let Some(DeterministicStackLimit { logical_max, .. }) = semantics.deterministic_stack_limit { + blob = blob.inject_stack_depth_metering(logical_max)?; + } + + // We don't actually need the memory to be imported so we can just convert any memory + // import into an export with impunity. This simplifies our code since `wasmtime` will + // now automatically take care of creating the memory for us, and it is also necessary + // to enable `wasmtime`'s instance pooling. (Imported memories are ineligible for pooling.) + blob.convert_memory_import_into_export()?; + blob.setup_memory_according_to_heap_alloc_strategy(semantics.heap_alloc_strategy)?; + + Ok(blob) +} + +/// Takes a [`RuntimeBlob`] and precompiles it returning the serialized result of compilation. It +/// can then be used for calling [`create_runtime`] avoiding long compilation times. +pub fn prepare_runtime_artifact( + blob: RuntimeBlob, + semantics: &Semantics, +) -> std::result::Result, WasmError> { + let mut semantics = semantics.clone(); + replace_strategy_if_broken(&mut semantics.instantiation_strategy); + + let blob = prepare_blob_for_compilation(blob, &semantics)?; + + let engine = Engine::new(&common_config(&semantics)?) + .map_err(|e| WasmError::Other(format!("cannot create the engine: {:#}", e)))?; + + engine + .precompile_module(&blob.serialize()) + .map_err(|e| WasmError::Other(format!("cannot precompile module: {:#}", e))) +} + +fn perform_call( + data: &[u8], + instance_wrapper: &mut InstanceWrapper, + entrypoint: EntryPoint, + mut allocator: FreeingBumpHeapAllocator, + allocation_stats: &mut Option, +) -> Result> { + let (data_ptr, data_len) = inject_input_data(instance_wrapper, &mut allocator, data)?; + + let host_state = HostState::new(allocator); + + // Set the host state before calling into wasm. + instance_wrapper.store_mut().data_mut().host_state = Some(host_state); + + let ret = entrypoint + .call(instance_wrapper.store_mut(), data_ptr, data_len) + .map(unpack_ptr_and_len); + + // Reset the host state + let host_state = instance_wrapper.store_mut().data_mut().host_state.take().expect( + "the host state is always set before calling into WASM so it can't be None here; qed", + ); + *allocation_stats = Some(host_state.allocation_stats()); + + let (output_ptr, output_len) = ret?; + let output = extract_output_data(instance_wrapper, output_ptr, output_len)?; + + Ok(output) +} + +fn inject_input_data( + instance: &mut InstanceWrapper, + allocator: &mut FreeingBumpHeapAllocator, + data: &[u8], +) -> Result<(Pointer, WordSize)> { + let mut ctx = instance.store_mut(); + let memory = ctx.data().memory(); + let data_len = data.len() as WordSize; + let data_ptr = allocator.allocate(&mut MemoryWrapper(&memory, &mut ctx), data_len)?; + util::write_memory_from(instance.store_mut(), data_ptr, data)?; + Ok((data_ptr, data_len)) +} + +fn extract_output_data( + instance: &InstanceWrapper, + output_ptr: u32, + output_len: u32, +) -> Result> { + let ctx = instance.store(); + + // Do a length check before allocating. The returned output should not be bigger than the + // available WASM memory. Otherwise, a malicious parachain can trigger a large allocation, + // potentially causing memory exhaustion. + // + // Get the size of the WASM memory in bytes. + let memory_size = ctx.as_context().data().memory().data_size(ctx); + if checked_range(output_ptr as usize, output_len as usize, memory_size).is_none() { + Err(Error::OutputExceedsBounds)? + } + let mut output = vec![0; output_len as usize]; + + util::read_memory_into(ctx, Pointer::new(output_ptr), &mut output)?; + Ok(output) +} diff --git a/client/executor-wasmtime/src/test-guard-page-skip.wat b/client/executor-wasmtime/src/test-guard-page-skip.wat new file mode 100644 index 00000000..2f7339d4 --- /dev/null +++ b/client/executor-wasmtime/src/test-guard-page-skip.wat @@ -0,0 +1,2293 @@ +;; This file is a modified version of +;; https://github.com/WebAssembly/testsuite/blob/01efde81028c5b0d099eb836645a2dc5e7755449/skip-stack-guard-page.wast +;; Licensed Apache 2.0 https://github.com/WebAssembly/testsuite/blob/01efde81028c5b0d099eb836645a2dc5e7755449/LICENSE + +;; This wasm module implements a Substrate Runtime with one entrypoint: `test-many-locals`. This +;; entrypoint does not take any parameters nor returns a result. Each execution should end up with +;; a stack overflow trap. +;; +;; What it does is essentially a recursive call. The function that recurses into itself declares +;; lots of local variables. It reads into each local at the corresponding offset, recurses into itself +;; and then writes the contents of the locals back into the memory at the same offset. +;; +;; The original purpose of this file in the test suite is to test skipping the guard page (hence the +;; size 256 + 4096 + 4096). However, what's important here is to just an infinite recursion with +;; many locals. +;; +;; NOTE That memory accesses are put there in an attempt to prevent eliminating the dead locals. +;; At the moment of writing, wasmtime should be dumb enough to be tricked into thinking that the code +;; does something. + +(module + (import "env" "memory" (memory 1)) + (export "test-many-locals" (func $test-many-locals)) + + ;; The heap base is chosen so that the heap doesn't overlap with the data below. + (global (export "__heap_base") i32 (i32.const 8448)) + + (func $test-many-locals + (param i32 i32) (result i64) + (call $function-with-many-locals) + (i64.const 0) + ) + + (func $function-with-many-locals + + ;; 1056 i64 = 8448 bytes of locals + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x000-0x007 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x008-0x00f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x010-0x017 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x018-0x01f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x020-0x027 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x028-0x02f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x030-0x037 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x038-0x03f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x040-0x047 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x048-0x04f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x050-0x057 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x058-0x05f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x060-0x067 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x068-0x06f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x070-0x077 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x078-0x07f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x080-0x087 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x088-0x08f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x090-0x097 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x098-0x09f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0a0-0x0a7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0a8-0x0af + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0b0-0x0b7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0b8-0x0bf + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0c0-0x0c7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0c8-0x0cf + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0d0-0x0d7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0d8-0x0df + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0e0-0x0e7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0e8-0x0ef + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0f0-0x0f7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0f8-0x0ff + + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x100-0x107 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x108-0x10f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x110-0x117 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x118-0x11f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x120-0x127 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x128-0x12f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x130-0x137 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x138-0x13f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x140-0x147 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x148-0x14f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x150-0x157 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x158-0x15f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x160-0x167 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x168-0x16f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x170-0x177 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x178-0x17f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x180-0x187 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x188-0x18f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x190-0x197 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x198-0x19f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1a0-0x1a7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1a8-0x1af + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1b0-0x1b7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1b8-0x1bf + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1c0-0x1c7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1c8-0x1cf + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1d0-0x1d7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1d8-0x1df + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1e0-0x1e7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1e8-0x1ef + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1f0-0x1f7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1f8-0x1ff + + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x200-0x207 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x208-0x20f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x210-0x217 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x218-0x21f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x220-0x227 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x228-0x22f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x230-0x237 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x238-0x23f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x240-0x247 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x248-0x24f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x250-0x257 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x258-0x25f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x260-0x267 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x268-0x26f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x270-0x277 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x278-0x27f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x280-0x287 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x288-0x28f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x290-0x297 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x298-0x29f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2a0-0x2a7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2a8-0x2af + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2b0-0x2b7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2b8-0x2bf + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2c0-0x2c7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2c8-0x2cf + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2d0-0x2d7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2d8-0x2df + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2e0-0x2e7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2e8-0x2ef + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2f0-0x2f7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2f8-0x2ff + + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x300-0x307 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x308-0x30f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x310-0x317 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x318-0x31f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x320-0x327 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x328-0x32f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x330-0x337 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x338-0x33f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x340-0x347 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x348-0x34f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x350-0x357 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x358-0x35f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x360-0x367 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x368-0x36f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x370-0x377 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x378-0x37f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x380-0x387 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x388-0x38f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x390-0x397 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x398-0x39f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3a0-0x3a7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3a8-0x3af + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3b0-0x3b7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3b8-0x3bf + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3c0-0x3c7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3c8-0x3cf + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3d0-0x3d7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3d8-0x3df + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3e0-0x3e7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3e8-0x3ef + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3f0-0x3f7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3f8-0x3ff + + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x400-0x407 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x408-0x40f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x410-0x417 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x418-0x41f + + ;; recurse first to try to make the callee access the stack below the space allocated for the locals before the locals themselves have been initialized. + (call $function-with-many-locals) + + ;; load from memory into the locals. + (local.set 0x000 (i64.load offset=0x000 align=1 (i32.const 0))) + (local.set 0x001 (i64.load offset=0x001 align=1 (i32.const 0))) + (local.set 0x002 (i64.load offset=0x002 align=1 (i32.const 0))) + (local.set 0x003 (i64.load offset=0x003 align=1 (i32.const 0))) + (local.set 0x004 (i64.load offset=0x004 align=1 (i32.const 0))) + (local.set 0x005 (i64.load offset=0x005 align=1 (i32.const 0))) + (local.set 0x006 (i64.load offset=0x006 align=1 (i32.const 0))) + (local.set 0x007 (i64.load offset=0x007 align=1 (i32.const 0))) + (local.set 0x008 (i64.load offset=0x008 align=1 (i32.const 0))) + (local.set 0x009 (i64.load offset=0x009 align=1 (i32.const 0))) + (local.set 0x00a (i64.load offset=0x00a align=1 (i32.const 0))) + (local.set 0x00b (i64.load offset=0x00b align=1 (i32.const 0))) + (local.set 0x00c (i64.load offset=0x00c align=1 (i32.const 0))) + (local.set 0x00d (i64.load offset=0x00d align=1 (i32.const 0))) + (local.set 0x00e (i64.load offset=0x00e align=1 (i32.const 0))) + (local.set 0x00f (i64.load offset=0x00f align=1 (i32.const 0))) + (local.set 0x010 (i64.load offset=0x010 align=1 (i32.const 0))) + (local.set 0x011 (i64.load offset=0x011 align=1 (i32.const 0))) + (local.set 0x012 (i64.load offset=0x012 align=1 (i32.const 0))) + (local.set 0x013 (i64.load offset=0x013 align=1 (i32.const 0))) + (local.set 0x014 (i64.load offset=0x014 align=1 (i32.const 0))) + (local.set 0x015 (i64.load offset=0x015 align=1 (i32.const 0))) + (local.set 0x016 (i64.load offset=0x016 align=1 (i32.const 0))) + (local.set 0x017 (i64.load offset=0x017 align=1 (i32.const 0))) + (local.set 0x018 (i64.load offset=0x018 align=1 (i32.const 0))) + (local.set 0x019 (i64.load offset=0x019 align=1 (i32.const 0))) + (local.set 0x01a (i64.load offset=0x01a align=1 (i32.const 0))) + (local.set 0x01b (i64.load offset=0x01b align=1 (i32.const 0))) + (local.set 0x01c (i64.load offset=0x01c align=1 (i32.const 0))) + (local.set 0x01d (i64.load offset=0x01d align=1 (i32.const 0))) + (local.set 0x01e (i64.load offset=0x01e align=1 (i32.const 0))) + (local.set 0x01f (i64.load offset=0x01f align=1 (i32.const 0))) + (local.set 0x020 (i64.load offset=0x020 align=1 (i32.const 0))) + (local.set 0x021 (i64.load offset=0x021 align=1 (i32.const 0))) + (local.set 0x022 (i64.load offset=0x022 align=1 (i32.const 0))) + (local.set 0x023 (i64.load offset=0x023 align=1 (i32.const 0))) + (local.set 0x024 (i64.load offset=0x024 align=1 (i32.const 0))) + (local.set 0x025 (i64.load offset=0x025 align=1 (i32.const 0))) + (local.set 0x026 (i64.load offset=0x026 align=1 (i32.const 0))) + (local.set 0x027 (i64.load offset=0x027 align=1 (i32.const 0))) + (local.set 0x028 (i64.load offset=0x028 align=1 (i32.const 0))) + (local.set 0x029 (i64.load offset=0x029 align=1 (i32.const 0))) + (local.set 0x02a (i64.load offset=0x02a align=1 (i32.const 0))) + (local.set 0x02b (i64.load offset=0x02b align=1 (i32.const 0))) + (local.set 0x02c (i64.load offset=0x02c align=1 (i32.const 0))) + (local.set 0x02d (i64.load offset=0x02d align=1 (i32.const 0))) + (local.set 0x02e (i64.load offset=0x02e align=1 (i32.const 0))) + (local.set 0x02f (i64.load offset=0x02f align=1 (i32.const 0))) + (local.set 0x030 (i64.load offset=0x030 align=1 (i32.const 0))) + (local.set 0x031 (i64.load offset=0x031 align=1 (i32.const 0))) + (local.set 0x032 (i64.load offset=0x032 align=1 (i32.const 0))) + (local.set 0x033 (i64.load offset=0x033 align=1 (i32.const 0))) + (local.set 0x034 (i64.load offset=0x034 align=1 (i32.const 0))) + (local.set 0x035 (i64.load offset=0x035 align=1 (i32.const 0))) + (local.set 0x036 (i64.load offset=0x036 align=1 (i32.const 0))) + (local.set 0x037 (i64.load offset=0x037 align=1 (i32.const 0))) + (local.set 0x038 (i64.load offset=0x038 align=1 (i32.const 0))) + (local.set 0x039 (i64.load offset=0x039 align=1 (i32.const 0))) + (local.set 0x03a (i64.load offset=0x03a align=1 (i32.const 0))) + (local.set 0x03b (i64.load offset=0x03b align=1 (i32.const 0))) + (local.set 0x03c (i64.load offset=0x03c align=1 (i32.const 0))) + (local.set 0x03d (i64.load offset=0x03d align=1 (i32.const 0))) + (local.set 0x03e (i64.load offset=0x03e align=1 (i32.const 0))) + (local.set 0x03f (i64.load offset=0x03f align=1 (i32.const 0))) + (local.set 0x040 (i64.load offset=0x040 align=1 (i32.const 0))) + (local.set 0x041 (i64.load offset=0x041 align=1 (i32.const 0))) + (local.set 0x042 (i64.load offset=0x042 align=1 (i32.const 0))) + (local.set 0x043 (i64.load offset=0x043 align=1 (i32.const 0))) + (local.set 0x044 (i64.load offset=0x044 align=1 (i32.const 0))) + (local.set 0x045 (i64.load offset=0x045 align=1 (i32.const 0))) + (local.set 0x046 (i64.load offset=0x046 align=1 (i32.const 0))) + (local.set 0x047 (i64.load offset=0x047 align=1 (i32.const 0))) + (local.set 0x048 (i64.load offset=0x048 align=1 (i32.const 0))) + (local.set 0x049 (i64.load offset=0x049 align=1 (i32.const 0))) + (local.set 0x04a (i64.load offset=0x04a align=1 (i32.const 0))) + (local.set 0x04b (i64.load offset=0x04b align=1 (i32.const 0))) + (local.set 0x04c (i64.load offset=0x04c align=1 (i32.const 0))) + (local.set 0x04d (i64.load offset=0x04d align=1 (i32.const 0))) + (local.set 0x04e (i64.load offset=0x04e align=1 (i32.const 0))) + (local.set 0x04f (i64.load offset=0x04f align=1 (i32.const 0))) + (local.set 0x050 (i64.load offset=0x050 align=1 (i32.const 0))) + (local.set 0x051 (i64.load offset=0x051 align=1 (i32.const 0))) + (local.set 0x052 (i64.load offset=0x052 align=1 (i32.const 0))) + (local.set 0x053 (i64.load offset=0x053 align=1 (i32.const 0))) + (local.set 0x054 (i64.load offset=0x054 align=1 (i32.const 0))) + (local.set 0x055 (i64.load offset=0x055 align=1 (i32.const 0))) + (local.set 0x056 (i64.load offset=0x056 align=1 (i32.const 0))) + (local.set 0x057 (i64.load offset=0x057 align=1 (i32.const 0))) + (local.set 0x058 (i64.load offset=0x058 align=1 (i32.const 0))) + (local.set 0x059 (i64.load offset=0x059 align=1 (i32.const 0))) + (local.set 0x05a (i64.load offset=0x05a align=1 (i32.const 0))) + (local.set 0x05b (i64.load offset=0x05b align=1 (i32.const 0))) + (local.set 0x05c (i64.load offset=0x05c align=1 (i32.const 0))) + (local.set 0x05d (i64.load offset=0x05d align=1 (i32.const 0))) + (local.set 0x05e (i64.load offset=0x05e align=1 (i32.const 0))) + (local.set 0x05f (i64.load offset=0x05f align=1 (i32.const 0))) + (local.set 0x060 (i64.load offset=0x060 align=1 (i32.const 0))) + (local.set 0x061 (i64.load offset=0x061 align=1 (i32.const 0))) + (local.set 0x062 (i64.load offset=0x062 align=1 (i32.const 0))) + (local.set 0x063 (i64.load offset=0x063 align=1 (i32.const 0))) + (local.set 0x064 (i64.load offset=0x064 align=1 (i32.const 0))) + (local.set 0x065 (i64.load offset=0x065 align=1 (i32.const 0))) + (local.set 0x066 (i64.load offset=0x066 align=1 (i32.const 0))) + (local.set 0x067 (i64.load offset=0x067 align=1 (i32.const 0))) + (local.set 0x068 (i64.load offset=0x068 align=1 (i32.const 0))) + (local.set 0x069 (i64.load offset=0x069 align=1 (i32.const 0))) + (local.set 0x06a (i64.load offset=0x06a align=1 (i32.const 0))) + (local.set 0x06b (i64.load offset=0x06b align=1 (i32.const 0))) + (local.set 0x06c (i64.load offset=0x06c align=1 (i32.const 0))) + (local.set 0x06d (i64.load offset=0x06d align=1 (i32.const 0))) + (local.set 0x06e (i64.load offset=0x06e align=1 (i32.const 0))) + (local.set 0x06f (i64.load offset=0x06f align=1 (i32.const 0))) + (local.set 0x070 (i64.load offset=0x070 align=1 (i32.const 0))) + (local.set 0x071 (i64.load offset=0x071 align=1 (i32.const 0))) + (local.set 0x072 (i64.load offset=0x072 align=1 (i32.const 0))) + (local.set 0x073 (i64.load offset=0x073 align=1 (i32.const 0))) + (local.set 0x074 (i64.load offset=0x074 align=1 (i32.const 0))) + (local.set 0x075 (i64.load offset=0x075 align=1 (i32.const 0))) + (local.set 0x076 (i64.load offset=0x076 align=1 (i32.const 0))) + (local.set 0x077 (i64.load offset=0x077 align=1 (i32.const 0))) + (local.set 0x078 (i64.load offset=0x078 align=1 (i32.const 0))) + (local.set 0x079 (i64.load offset=0x079 align=1 (i32.const 0))) + (local.set 0x07a (i64.load offset=0x07a align=1 (i32.const 0))) + (local.set 0x07b (i64.load offset=0x07b align=1 (i32.const 0))) + (local.set 0x07c (i64.load offset=0x07c align=1 (i32.const 0))) + (local.set 0x07d (i64.load offset=0x07d align=1 (i32.const 0))) + (local.set 0x07e (i64.load offset=0x07e align=1 (i32.const 0))) + (local.set 0x07f (i64.load offset=0x07f align=1 (i32.const 0))) + (local.set 0x080 (i64.load offset=0x080 align=1 (i32.const 0))) + (local.set 0x081 (i64.load offset=0x081 align=1 (i32.const 0))) + (local.set 0x082 (i64.load offset=0x082 align=1 (i32.const 0))) + (local.set 0x083 (i64.load offset=0x083 align=1 (i32.const 0))) + (local.set 0x084 (i64.load offset=0x084 align=1 (i32.const 0))) + (local.set 0x085 (i64.load offset=0x085 align=1 (i32.const 0))) + (local.set 0x086 (i64.load offset=0x086 align=1 (i32.const 0))) + (local.set 0x087 (i64.load offset=0x087 align=1 (i32.const 0))) + (local.set 0x088 (i64.load offset=0x088 align=1 (i32.const 0))) + (local.set 0x089 (i64.load offset=0x089 align=1 (i32.const 0))) + (local.set 0x08a (i64.load offset=0x08a align=1 (i32.const 0))) + (local.set 0x08b (i64.load offset=0x08b align=1 (i32.const 0))) + (local.set 0x08c (i64.load offset=0x08c align=1 (i32.const 0))) + (local.set 0x08d (i64.load offset=0x08d align=1 (i32.const 0))) + (local.set 0x08e (i64.load offset=0x08e align=1 (i32.const 0))) + (local.set 0x08f (i64.load offset=0x08f align=1 (i32.const 0))) + (local.set 0x090 (i64.load offset=0x090 align=1 (i32.const 0))) + (local.set 0x091 (i64.load offset=0x091 align=1 (i32.const 0))) + (local.set 0x092 (i64.load offset=0x092 align=1 (i32.const 0))) + (local.set 0x093 (i64.load offset=0x093 align=1 (i32.const 0))) + (local.set 0x094 (i64.load offset=0x094 align=1 (i32.const 0))) + (local.set 0x095 (i64.load offset=0x095 align=1 (i32.const 0))) + (local.set 0x096 (i64.load offset=0x096 align=1 (i32.const 0))) + (local.set 0x097 (i64.load offset=0x097 align=1 (i32.const 0))) + (local.set 0x098 (i64.load offset=0x098 align=1 (i32.const 0))) + (local.set 0x099 (i64.load offset=0x099 align=1 (i32.const 0))) + (local.set 0x09a (i64.load offset=0x09a align=1 (i32.const 0))) + (local.set 0x09b (i64.load offset=0x09b align=1 (i32.const 0))) + (local.set 0x09c (i64.load offset=0x09c align=1 (i32.const 0))) + (local.set 0x09d (i64.load offset=0x09d align=1 (i32.const 0))) + (local.set 0x09e (i64.load offset=0x09e align=1 (i32.const 0))) + (local.set 0x09f (i64.load offset=0x09f align=1 (i32.const 0))) + (local.set 0x0a0 (i64.load offset=0x0a0 align=1 (i32.const 0))) + (local.set 0x0a1 (i64.load offset=0x0a1 align=1 (i32.const 0))) + (local.set 0x0a2 (i64.load offset=0x0a2 align=1 (i32.const 0))) + (local.set 0x0a3 (i64.load offset=0x0a3 align=1 (i32.const 0))) + (local.set 0x0a4 (i64.load offset=0x0a4 align=1 (i32.const 0))) + (local.set 0x0a5 (i64.load offset=0x0a5 align=1 (i32.const 0))) + (local.set 0x0a6 (i64.load offset=0x0a6 align=1 (i32.const 0))) + (local.set 0x0a7 (i64.load offset=0x0a7 align=1 (i32.const 0))) + (local.set 0x0a8 (i64.load offset=0x0a8 align=1 (i32.const 0))) + (local.set 0x0a9 (i64.load offset=0x0a9 align=1 (i32.const 0))) + (local.set 0x0aa (i64.load offset=0x0aa align=1 (i32.const 0))) + (local.set 0x0ab (i64.load offset=0x0ab align=1 (i32.const 0))) + (local.set 0x0ac (i64.load offset=0x0ac align=1 (i32.const 0))) + (local.set 0x0ad (i64.load offset=0x0ad align=1 (i32.const 0))) + (local.set 0x0ae (i64.load offset=0x0ae align=1 (i32.const 0))) + (local.set 0x0af (i64.load offset=0x0af align=1 (i32.const 0))) + (local.set 0x0b0 (i64.load offset=0x0b0 align=1 (i32.const 0))) + (local.set 0x0b1 (i64.load offset=0x0b1 align=1 (i32.const 0))) + (local.set 0x0b2 (i64.load offset=0x0b2 align=1 (i32.const 0))) + (local.set 0x0b3 (i64.load offset=0x0b3 align=1 (i32.const 0))) + (local.set 0x0b4 (i64.load offset=0x0b4 align=1 (i32.const 0))) + (local.set 0x0b5 (i64.load offset=0x0b5 align=1 (i32.const 0))) + (local.set 0x0b6 (i64.load offset=0x0b6 align=1 (i32.const 0))) + (local.set 0x0b7 (i64.load offset=0x0b7 align=1 (i32.const 0))) + (local.set 0x0b8 (i64.load offset=0x0b8 align=1 (i32.const 0))) + (local.set 0x0b9 (i64.load offset=0x0b9 align=1 (i32.const 0))) + (local.set 0x0ba (i64.load offset=0x0ba align=1 (i32.const 0))) + (local.set 0x0bb (i64.load offset=0x0bb align=1 (i32.const 0))) + (local.set 0x0bc (i64.load offset=0x0bc align=1 (i32.const 0))) + (local.set 0x0bd (i64.load offset=0x0bd align=1 (i32.const 0))) + (local.set 0x0be (i64.load offset=0x0be align=1 (i32.const 0))) + (local.set 0x0bf (i64.load offset=0x0bf align=1 (i32.const 0))) + (local.set 0x0c0 (i64.load offset=0x0c0 align=1 (i32.const 0))) + (local.set 0x0c1 (i64.load offset=0x0c1 align=1 (i32.const 0))) + (local.set 0x0c2 (i64.load offset=0x0c2 align=1 (i32.const 0))) + (local.set 0x0c3 (i64.load offset=0x0c3 align=1 (i32.const 0))) + (local.set 0x0c4 (i64.load offset=0x0c4 align=1 (i32.const 0))) + (local.set 0x0c5 (i64.load offset=0x0c5 align=1 (i32.const 0))) + (local.set 0x0c6 (i64.load offset=0x0c6 align=1 (i32.const 0))) + (local.set 0x0c7 (i64.load offset=0x0c7 align=1 (i32.const 0))) + (local.set 0x0c8 (i64.load offset=0x0c8 align=1 (i32.const 0))) + (local.set 0x0c9 (i64.load offset=0x0c9 align=1 (i32.const 0))) + (local.set 0x0ca (i64.load offset=0x0ca align=1 (i32.const 0))) + (local.set 0x0cb (i64.load offset=0x0cb align=1 (i32.const 0))) + (local.set 0x0cc (i64.load offset=0x0cc align=1 (i32.const 0))) + (local.set 0x0cd (i64.load offset=0x0cd align=1 (i32.const 0))) + (local.set 0x0ce (i64.load offset=0x0ce align=1 (i32.const 0))) + (local.set 0x0cf (i64.load offset=0x0cf align=1 (i32.const 0))) + (local.set 0x0d0 (i64.load offset=0x0d0 align=1 (i32.const 0))) + (local.set 0x0d1 (i64.load offset=0x0d1 align=1 (i32.const 0))) + (local.set 0x0d2 (i64.load offset=0x0d2 align=1 (i32.const 0))) + (local.set 0x0d3 (i64.load offset=0x0d3 align=1 (i32.const 0))) + (local.set 0x0d4 (i64.load offset=0x0d4 align=1 (i32.const 0))) + (local.set 0x0d5 (i64.load offset=0x0d5 align=1 (i32.const 0))) + (local.set 0x0d6 (i64.load offset=0x0d6 align=1 (i32.const 0))) + (local.set 0x0d7 (i64.load offset=0x0d7 align=1 (i32.const 0))) + (local.set 0x0d8 (i64.load offset=0x0d8 align=1 (i32.const 0))) + (local.set 0x0d9 (i64.load offset=0x0d9 align=1 (i32.const 0))) + (local.set 0x0da (i64.load offset=0x0da align=1 (i32.const 0))) + (local.set 0x0db (i64.load offset=0x0db align=1 (i32.const 0))) + (local.set 0x0dc (i64.load offset=0x0dc align=1 (i32.const 0))) + (local.set 0x0dd (i64.load offset=0x0dd align=1 (i32.const 0))) + (local.set 0x0de (i64.load offset=0x0de align=1 (i32.const 0))) + (local.set 0x0df (i64.load offset=0x0df align=1 (i32.const 0))) + (local.set 0x0e0 (i64.load offset=0x0e0 align=1 (i32.const 0))) + (local.set 0x0e1 (i64.load offset=0x0e1 align=1 (i32.const 0))) + (local.set 0x0e2 (i64.load offset=0x0e2 align=1 (i32.const 0))) + (local.set 0x0e3 (i64.load offset=0x0e3 align=1 (i32.const 0))) + (local.set 0x0e4 (i64.load offset=0x0e4 align=1 (i32.const 0))) + (local.set 0x0e5 (i64.load offset=0x0e5 align=1 (i32.const 0))) + (local.set 0x0e6 (i64.load offset=0x0e6 align=1 (i32.const 0))) + (local.set 0x0e7 (i64.load offset=0x0e7 align=1 (i32.const 0))) + (local.set 0x0e8 (i64.load offset=0x0e8 align=1 (i32.const 0))) + (local.set 0x0e9 (i64.load offset=0x0e9 align=1 (i32.const 0))) + (local.set 0x0ea (i64.load offset=0x0ea align=1 (i32.const 0))) + (local.set 0x0eb (i64.load offset=0x0eb align=1 (i32.const 0))) + (local.set 0x0ec (i64.load offset=0x0ec align=1 (i32.const 0))) + (local.set 0x0ed (i64.load offset=0x0ed align=1 (i32.const 0))) + (local.set 0x0ee (i64.load offset=0x0ee align=1 (i32.const 0))) + (local.set 0x0ef (i64.load offset=0x0ef align=1 (i32.const 0))) + (local.set 0x0f0 (i64.load offset=0x0f0 align=1 (i32.const 0))) + (local.set 0x0f1 (i64.load offset=0x0f1 align=1 (i32.const 0))) + (local.set 0x0f2 (i64.load offset=0x0f2 align=1 (i32.const 0))) + (local.set 0x0f3 (i64.load offset=0x0f3 align=1 (i32.const 0))) + (local.set 0x0f4 (i64.load offset=0x0f4 align=1 (i32.const 0))) + (local.set 0x0f5 (i64.load offset=0x0f5 align=1 (i32.const 0))) + (local.set 0x0f6 (i64.load offset=0x0f6 align=1 (i32.const 0))) + (local.set 0x0f7 (i64.load offset=0x0f7 align=1 (i32.const 0))) + (local.set 0x0f8 (i64.load offset=0x0f8 align=1 (i32.const 0))) + (local.set 0x0f9 (i64.load offset=0x0f9 align=1 (i32.const 0))) + (local.set 0x0fa (i64.load offset=0x0fa align=1 (i32.const 0))) + (local.set 0x0fb (i64.load offset=0x0fb align=1 (i32.const 0))) + (local.set 0x0fc (i64.load offset=0x0fc align=1 (i32.const 0))) + (local.set 0x0fd (i64.load offset=0x0fd align=1 (i32.const 0))) + (local.set 0x0fe (i64.load offset=0x0fe align=1 (i32.const 0))) + (local.set 0x0ff (i64.load offset=0x0ff align=1 (i32.const 0))) + (local.set 0x100 (i64.load offset=0x100 align=1 (i32.const 0))) + (local.set 0x101 (i64.load offset=0x101 align=1 (i32.const 0))) + (local.set 0x102 (i64.load offset=0x102 align=1 (i32.const 0))) + (local.set 0x103 (i64.load offset=0x103 align=1 (i32.const 0))) + (local.set 0x104 (i64.load offset=0x104 align=1 (i32.const 0))) + (local.set 0x105 (i64.load offset=0x105 align=1 (i32.const 0))) + (local.set 0x106 (i64.load offset=0x106 align=1 (i32.const 0))) + (local.set 0x107 (i64.load offset=0x107 align=1 (i32.const 0))) + (local.set 0x108 (i64.load offset=0x108 align=1 (i32.const 0))) + (local.set 0x109 (i64.load offset=0x109 align=1 (i32.const 0))) + (local.set 0x10a (i64.load offset=0x10a align=1 (i32.const 0))) + (local.set 0x10b (i64.load offset=0x10b align=1 (i32.const 0))) + (local.set 0x10c (i64.load offset=0x10c align=1 (i32.const 0))) + (local.set 0x10d (i64.load offset=0x10d align=1 (i32.const 0))) + (local.set 0x10e (i64.load offset=0x10e align=1 (i32.const 0))) + (local.set 0x10f (i64.load offset=0x10f align=1 (i32.const 0))) + (local.set 0x110 (i64.load offset=0x110 align=1 (i32.const 0))) + (local.set 0x111 (i64.load offset=0x111 align=1 (i32.const 0))) + (local.set 0x112 (i64.load offset=0x112 align=1 (i32.const 0))) + (local.set 0x113 (i64.load offset=0x113 align=1 (i32.const 0))) + (local.set 0x114 (i64.load offset=0x114 align=1 (i32.const 0))) + (local.set 0x115 (i64.load offset=0x115 align=1 (i32.const 0))) + (local.set 0x116 (i64.load offset=0x116 align=1 (i32.const 0))) + (local.set 0x117 (i64.load offset=0x117 align=1 (i32.const 0))) + (local.set 0x118 (i64.load offset=0x118 align=1 (i32.const 0))) + (local.set 0x119 (i64.load offset=0x119 align=1 (i32.const 0))) + (local.set 0x11a (i64.load offset=0x11a align=1 (i32.const 0))) + (local.set 0x11b (i64.load offset=0x11b align=1 (i32.const 0))) + (local.set 0x11c (i64.load offset=0x11c align=1 (i32.const 0))) + (local.set 0x11d (i64.load offset=0x11d align=1 (i32.const 0))) + (local.set 0x11e (i64.load offset=0x11e align=1 (i32.const 0))) + (local.set 0x11f (i64.load offset=0x11f align=1 (i32.const 0))) + (local.set 0x120 (i64.load offset=0x120 align=1 (i32.const 0))) + (local.set 0x121 (i64.load offset=0x121 align=1 (i32.const 0))) + (local.set 0x122 (i64.load offset=0x122 align=1 (i32.const 0))) + (local.set 0x123 (i64.load offset=0x123 align=1 (i32.const 0))) + (local.set 0x124 (i64.load offset=0x124 align=1 (i32.const 0))) + (local.set 0x125 (i64.load offset=0x125 align=1 (i32.const 0))) + (local.set 0x126 (i64.load offset=0x126 align=1 (i32.const 0))) + (local.set 0x127 (i64.load offset=0x127 align=1 (i32.const 0))) + (local.set 0x128 (i64.load offset=0x128 align=1 (i32.const 0))) + (local.set 0x129 (i64.load offset=0x129 align=1 (i32.const 0))) + (local.set 0x12a (i64.load offset=0x12a align=1 (i32.const 0))) + (local.set 0x12b (i64.load offset=0x12b align=1 (i32.const 0))) + (local.set 0x12c (i64.load offset=0x12c align=1 (i32.const 0))) + (local.set 0x12d (i64.load offset=0x12d align=1 (i32.const 0))) + (local.set 0x12e (i64.load offset=0x12e align=1 (i32.const 0))) + (local.set 0x12f (i64.load offset=0x12f align=1 (i32.const 0))) + (local.set 0x130 (i64.load offset=0x130 align=1 (i32.const 0))) + (local.set 0x131 (i64.load offset=0x131 align=1 (i32.const 0))) + (local.set 0x132 (i64.load offset=0x132 align=1 (i32.const 0))) + (local.set 0x133 (i64.load offset=0x133 align=1 (i32.const 0))) + (local.set 0x134 (i64.load offset=0x134 align=1 (i32.const 0))) + (local.set 0x135 (i64.load offset=0x135 align=1 (i32.const 0))) + (local.set 0x136 (i64.load offset=0x136 align=1 (i32.const 0))) + (local.set 0x137 (i64.load offset=0x137 align=1 (i32.const 0))) + (local.set 0x138 (i64.load offset=0x138 align=1 (i32.const 0))) + (local.set 0x139 (i64.load offset=0x139 align=1 (i32.const 0))) + (local.set 0x13a (i64.load offset=0x13a align=1 (i32.const 0))) + (local.set 0x13b (i64.load offset=0x13b align=1 (i32.const 0))) + (local.set 0x13c (i64.load offset=0x13c align=1 (i32.const 0))) + (local.set 0x13d (i64.load offset=0x13d align=1 (i32.const 0))) + (local.set 0x13e (i64.load offset=0x13e align=1 (i32.const 0))) + (local.set 0x13f (i64.load offset=0x13f align=1 (i32.const 0))) + (local.set 0x140 (i64.load offset=0x140 align=1 (i32.const 0))) + (local.set 0x141 (i64.load offset=0x141 align=1 (i32.const 0))) + (local.set 0x142 (i64.load offset=0x142 align=1 (i32.const 0))) + (local.set 0x143 (i64.load offset=0x143 align=1 (i32.const 0))) + (local.set 0x144 (i64.load offset=0x144 align=1 (i32.const 0))) + (local.set 0x145 (i64.load offset=0x145 align=1 (i32.const 0))) + (local.set 0x146 (i64.load offset=0x146 align=1 (i32.const 0))) + (local.set 0x147 (i64.load offset=0x147 align=1 (i32.const 0))) + (local.set 0x148 (i64.load offset=0x148 align=1 (i32.const 0))) + (local.set 0x149 (i64.load offset=0x149 align=1 (i32.const 0))) + (local.set 0x14a (i64.load offset=0x14a align=1 (i32.const 0))) + (local.set 0x14b (i64.load offset=0x14b align=1 (i32.const 0))) + (local.set 0x14c (i64.load offset=0x14c align=1 (i32.const 0))) + (local.set 0x14d (i64.load offset=0x14d align=1 (i32.const 0))) + (local.set 0x14e (i64.load offset=0x14e align=1 (i32.const 0))) + (local.set 0x14f (i64.load offset=0x14f align=1 (i32.const 0))) + (local.set 0x150 (i64.load offset=0x150 align=1 (i32.const 0))) + (local.set 0x151 (i64.load offset=0x151 align=1 (i32.const 0))) + (local.set 0x152 (i64.load offset=0x152 align=1 (i32.const 0))) + (local.set 0x153 (i64.load offset=0x153 align=1 (i32.const 0))) + (local.set 0x154 (i64.load offset=0x154 align=1 (i32.const 0))) + (local.set 0x155 (i64.load offset=0x155 align=1 (i32.const 0))) + (local.set 0x156 (i64.load offset=0x156 align=1 (i32.const 0))) + (local.set 0x157 (i64.load offset=0x157 align=1 (i32.const 0))) + (local.set 0x158 (i64.load offset=0x158 align=1 (i32.const 0))) + (local.set 0x159 (i64.load offset=0x159 align=1 (i32.const 0))) + (local.set 0x15a (i64.load offset=0x15a align=1 (i32.const 0))) + (local.set 0x15b (i64.load offset=0x15b align=1 (i32.const 0))) + (local.set 0x15c (i64.load offset=0x15c align=1 (i32.const 0))) + (local.set 0x15d (i64.load offset=0x15d align=1 (i32.const 0))) + (local.set 0x15e (i64.load offset=0x15e align=1 (i32.const 0))) + (local.set 0x15f (i64.load offset=0x15f align=1 (i32.const 0))) + (local.set 0x160 (i64.load offset=0x160 align=1 (i32.const 0))) + (local.set 0x161 (i64.load offset=0x161 align=1 (i32.const 0))) + (local.set 0x162 (i64.load offset=0x162 align=1 (i32.const 0))) + (local.set 0x163 (i64.load offset=0x163 align=1 (i32.const 0))) + (local.set 0x164 (i64.load offset=0x164 align=1 (i32.const 0))) + (local.set 0x165 (i64.load offset=0x165 align=1 (i32.const 0))) + (local.set 0x166 (i64.load offset=0x166 align=1 (i32.const 0))) + (local.set 0x167 (i64.load offset=0x167 align=1 (i32.const 0))) + (local.set 0x168 (i64.load offset=0x168 align=1 (i32.const 0))) + (local.set 0x169 (i64.load offset=0x169 align=1 (i32.const 0))) + (local.set 0x16a (i64.load offset=0x16a align=1 (i32.const 0))) + (local.set 0x16b (i64.load offset=0x16b align=1 (i32.const 0))) + (local.set 0x16c (i64.load offset=0x16c align=1 (i32.const 0))) + (local.set 0x16d (i64.load offset=0x16d align=1 (i32.const 0))) + (local.set 0x16e (i64.load offset=0x16e align=1 (i32.const 0))) + (local.set 0x16f (i64.load offset=0x16f align=1 (i32.const 0))) + (local.set 0x170 (i64.load offset=0x170 align=1 (i32.const 0))) + (local.set 0x171 (i64.load offset=0x171 align=1 (i32.const 0))) + (local.set 0x172 (i64.load offset=0x172 align=1 (i32.const 0))) + (local.set 0x173 (i64.load offset=0x173 align=1 (i32.const 0))) + (local.set 0x174 (i64.load offset=0x174 align=1 (i32.const 0))) + (local.set 0x175 (i64.load offset=0x175 align=1 (i32.const 0))) + (local.set 0x176 (i64.load offset=0x176 align=1 (i32.const 0))) + (local.set 0x177 (i64.load offset=0x177 align=1 (i32.const 0))) + (local.set 0x178 (i64.load offset=0x178 align=1 (i32.const 0))) + (local.set 0x179 (i64.load offset=0x179 align=1 (i32.const 0))) + (local.set 0x17a (i64.load offset=0x17a align=1 (i32.const 0))) + (local.set 0x17b (i64.load offset=0x17b align=1 (i32.const 0))) + (local.set 0x17c (i64.load offset=0x17c align=1 (i32.const 0))) + (local.set 0x17d (i64.load offset=0x17d align=1 (i32.const 0))) + (local.set 0x17e (i64.load offset=0x17e align=1 (i32.const 0))) + (local.set 0x17f (i64.load offset=0x17f align=1 (i32.const 0))) + (local.set 0x180 (i64.load offset=0x180 align=1 (i32.const 0))) + (local.set 0x181 (i64.load offset=0x181 align=1 (i32.const 0))) + (local.set 0x182 (i64.load offset=0x182 align=1 (i32.const 0))) + (local.set 0x183 (i64.load offset=0x183 align=1 (i32.const 0))) + (local.set 0x184 (i64.load offset=0x184 align=1 (i32.const 0))) + (local.set 0x185 (i64.load offset=0x185 align=1 (i32.const 0))) + (local.set 0x186 (i64.load offset=0x186 align=1 (i32.const 0))) + (local.set 0x187 (i64.load offset=0x187 align=1 (i32.const 0))) + (local.set 0x188 (i64.load offset=0x188 align=1 (i32.const 0))) + (local.set 0x189 (i64.load offset=0x189 align=1 (i32.const 0))) + (local.set 0x18a (i64.load offset=0x18a align=1 (i32.const 0))) + (local.set 0x18b (i64.load offset=0x18b align=1 (i32.const 0))) + (local.set 0x18c (i64.load offset=0x18c align=1 (i32.const 0))) + (local.set 0x18d (i64.load offset=0x18d align=1 (i32.const 0))) + (local.set 0x18e (i64.load offset=0x18e align=1 (i32.const 0))) + (local.set 0x18f (i64.load offset=0x18f align=1 (i32.const 0))) + (local.set 0x190 (i64.load offset=0x190 align=1 (i32.const 0))) + (local.set 0x191 (i64.load offset=0x191 align=1 (i32.const 0))) + (local.set 0x192 (i64.load offset=0x192 align=1 (i32.const 0))) + (local.set 0x193 (i64.load offset=0x193 align=1 (i32.const 0))) + (local.set 0x194 (i64.load offset=0x194 align=1 (i32.const 0))) + (local.set 0x195 (i64.load offset=0x195 align=1 (i32.const 0))) + (local.set 0x196 (i64.load offset=0x196 align=1 (i32.const 0))) + (local.set 0x197 (i64.load offset=0x197 align=1 (i32.const 0))) + (local.set 0x198 (i64.load offset=0x198 align=1 (i32.const 0))) + (local.set 0x199 (i64.load offset=0x199 align=1 (i32.const 0))) + (local.set 0x19a (i64.load offset=0x19a align=1 (i32.const 0))) + (local.set 0x19b (i64.load offset=0x19b align=1 (i32.const 0))) + (local.set 0x19c (i64.load offset=0x19c align=1 (i32.const 0))) + (local.set 0x19d (i64.load offset=0x19d align=1 (i32.const 0))) + (local.set 0x19e (i64.load offset=0x19e align=1 (i32.const 0))) + (local.set 0x19f (i64.load offset=0x19f align=1 (i32.const 0))) + (local.set 0x1a0 (i64.load offset=0x1a0 align=1 (i32.const 0))) + (local.set 0x1a1 (i64.load offset=0x1a1 align=1 (i32.const 0))) + (local.set 0x1a2 (i64.load offset=0x1a2 align=1 (i32.const 0))) + (local.set 0x1a3 (i64.load offset=0x1a3 align=1 (i32.const 0))) + (local.set 0x1a4 (i64.load offset=0x1a4 align=1 (i32.const 0))) + (local.set 0x1a5 (i64.load offset=0x1a5 align=1 (i32.const 0))) + (local.set 0x1a6 (i64.load offset=0x1a6 align=1 (i32.const 0))) + (local.set 0x1a7 (i64.load offset=0x1a7 align=1 (i32.const 0))) + (local.set 0x1a8 (i64.load offset=0x1a8 align=1 (i32.const 0))) + (local.set 0x1a9 (i64.load offset=0x1a9 align=1 (i32.const 0))) + (local.set 0x1aa (i64.load offset=0x1aa align=1 (i32.const 0))) + (local.set 0x1ab (i64.load offset=0x1ab align=1 (i32.const 0))) + (local.set 0x1ac (i64.load offset=0x1ac align=1 (i32.const 0))) + (local.set 0x1ad (i64.load offset=0x1ad align=1 (i32.const 0))) + (local.set 0x1ae (i64.load offset=0x1ae align=1 (i32.const 0))) + (local.set 0x1af (i64.load offset=0x1af align=1 (i32.const 0))) + (local.set 0x1b0 (i64.load offset=0x1b0 align=1 (i32.const 0))) + (local.set 0x1b1 (i64.load offset=0x1b1 align=1 (i32.const 0))) + (local.set 0x1b2 (i64.load offset=0x1b2 align=1 (i32.const 0))) + (local.set 0x1b3 (i64.load offset=0x1b3 align=1 (i32.const 0))) + (local.set 0x1b4 (i64.load offset=0x1b4 align=1 (i32.const 0))) + (local.set 0x1b5 (i64.load offset=0x1b5 align=1 (i32.const 0))) + (local.set 0x1b6 (i64.load offset=0x1b6 align=1 (i32.const 0))) + (local.set 0x1b7 (i64.load offset=0x1b7 align=1 (i32.const 0))) + (local.set 0x1b8 (i64.load offset=0x1b8 align=1 (i32.const 0))) + (local.set 0x1b9 (i64.load offset=0x1b9 align=1 (i32.const 0))) + (local.set 0x1ba (i64.load offset=0x1ba align=1 (i32.const 0))) + (local.set 0x1bb (i64.load offset=0x1bb align=1 (i32.const 0))) + (local.set 0x1bc (i64.load offset=0x1bc align=1 (i32.const 0))) + (local.set 0x1bd (i64.load offset=0x1bd align=1 (i32.const 0))) + (local.set 0x1be (i64.load offset=0x1be align=1 (i32.const 0))) + (local.set 0x1bf (i64.load offset=0x1bf align=1 (i32.const 0))) + (local.set 0x1c0 (i64.load offset=0x1c0 align=1 (i32.const 0))) + (local.set 0x1c1 (i64.load offset=0x1c1 align=1 (i32.const 0))) + (local.set 0x1c2 (i64.load offset=0x1c2 align=1 (i32.const 0))) + (local.set 0x1c3 (i64.load offset=0x1c3 align=1 (i32.const 0))) + (local.set 0x1c4 (i64.load offset=0x1c4 align=1 (i32.const 0))) + (local.set 0x1c5 (i64.load offset=0x1c5 align=1 (i32.const 0))) + (local.set 0x1c6 (i64.load offset=0x1c6 align=1 (i32.const 0))) + (local.set 0x1c7 (i64.load offset=0x1c7 align=1 (i32.const 0))) + (local.set 0x1c8 (i64.load offset=0x1c8 align=1 (i32.const 0))) + (local.set 0x1c9 (i64.load offset=0x1c9 align=1 (i32.const 0))) + (local.set 0x1ca (i64.load offset=0x1ca align=1 (i32.const 0))) + (local.set 0x1cb (i64.load offset=0x1cb align=1 (i32.const 0))) + (local.set 0x1cc (i64.load offset=0x1cc align=1 (i32.const 0))) + (local.set 0x1cd (i64.load offset=0x1cd align=1 (i32.const 0))) + (local.set 0x1ce (i64.load offset=0x1ce align=1 (i32.const 0))) + (local.set 0x1cf (i64.load offset=0x1cf align=1 (i32.const 0))) + (local.set 0x1d0 (i64.load offset=0x1d0 align=1 (i32.const 0))) + (local.set 0x1d1 (i64.load offset=0x1d1 align=1 (i32.const 0))) + (local.set 0x1d2 (i64.load offset=0x1d2 align=1 (i32.const 0))) + (local.set 0x1d3 (i64.load offset=0x1d3 align=1 (i32.const 0))) + (local.set 0x1d4 (i64.load offset=0x1d4 align=1 (i32.const 0))) + (local.set 0x1d5 (i64.load offset=0x1d5 align=1 (i32.const 0))) + (local.set 0x1d6 (i64.load offset=0x1d6 align=1 (i32.const 0))) + (local.set 0x1d7 (i64.load offset=0x1d7 align=1 (i32.const 0))) + (local.set 0x1d8 (i64.load offset=0x1d8 align=1 (i32.const 0))) + (local.set 0x1d9 (i64.load offset=0x1d9 align=1 (i32.const 0))) + (local.set 0x1da (i64.load offset=0x1da align=1 (i32.const 0))) + (local.set 0x1db (i64.load offset=0x1db align=1 (i32.const 0))) + (local.set 0x1dc (i64.load offset=0x1dc align=1 (i32.const 0))) + (local.set 0x1dd (i64.load offset=0x1dd align=1 (i32.const 0))) + (local.set 0x1de (i64.load offset=0x1de align=1 (i32.const 0))) + (local.set 0x1df (i64.load offset=0x1df align=1 (i32.const 0))) + (local.set 0x1e0 (i64.load offset=0x1e0 align=1 (i32.const 0))) + (local.set 0x1e1 (i64.load offset=0x1e1 align=1 (i32.const 0))) + (local.set 0x1e2 (i64.load offset=0x1e2 align=1 (i32.const 0))) + (local.set 0x1e3 (i64.load offset=0x1e3 align=1 (i32.const 0))) + (local.set 0x1e4 (i64.load offset=0x1e4 align=1 (i32.const 0))) + (local.set 0x1e5 (i64.load offset=0x1e5 align=1 (i32.const 0))) + (local.set 0x1e6 (i64.load offset=0x1e6 align=1 (i32.const 0))) + (local.set 0x1e7 (i64.load offset=0x1e7 align=1 (i32.const 0))) + (local.set 0x1e8 (i64.load offset=0x1e8 align=1 (i32.const 0))) + (local.set 0x1e9 (i64.load offset=0x1e9 align=1 (i32.const 0))) + (local.set 0x1ea (i64.load offset=0x1ea align=1 (i32.const 0))) + (local.set 0x1eb (i64.load offset=0x1eb align=1 (i32.const 0))) + (local.set 0x1ec (i64.load offset=0x1ec align=1 (i32.const 0))) + (local.set 0x1ed (i64.load offset=0x1ed align=1 (i32.const 0))) + (local.set 0x1ee (i64.load offset=0x1ee align=1 (i32.const 0))) + (local.set 0x1ef (i64.load offset=0x1ef align=1 (i32.const 0))) + (local.set 0x1f0 (i64.load offset=0x1f0 align=1 (i32.const 0))) + (local.set 0x1f1 (i64.load offset=0x1f1 align=1 (i32.const 0))) + (local.set 0x1f2 (i64.load offset=0x1f2 align=1 (i32.const 0))) + (local.set 0x1f3 (i64.load offset=0x1f3 align=1 (i32.const 0))) + (local.set 0x1f4 (i64.load offset=0x1f4 align=1 (i32.const 0))) + (local.set 0x1f5 (i64.load offset=0x1f5 align=1 (i32.const 0))) + (local.set 0x1f6 (i64.load offset=0x1f6 align=1 (i32.const 0))) + (local.set 0x1f7 (i64.load offset=0x1f7 align=1 (i32.const 0))) + (local.set 0x1f8 (i64.load offset=0x1f8 align=1 (i32.const 0))) + (local.set 0x1f9 (i64.load offset=0x1f9 align=1 (i32.const 0))) + (local.set 0x1fa (i64.load offset=0x1fa align=1 (i32.const 0))) + (local.set 0x1fb (i64.load offset=0x1fb align=1 (i32.const 0))) + (local.set 0x1fc (i64.load offset=0x1fc align=1 (i32.const 0))) + (local.set 0x1fd (i64.load offset=0x1fd align=1 (i32.const 0))) + (local.set 0x1fe (i64.load offset=0x1fe align=1 (i32.const 0))) + (local.set 0x1ff (i64.load offset=0x1ff align=1 (i32.const 0))) + (local.set 0x200 (i64.load offset=0x200 align=1 (i32.const 0))) + (local.set 0x201 (i64.load offset=0x201 align=1 (i32.const 0))) + (local.set 0x202 (i64.load offset=0x202 align=1 (i32.const 0))) + (local.set 0x203 (i64.load offset=0x203 align=1 (i32.const 0))) + (local.set 0x204 (i64.load offset=0x204 align=1 (i32.const 0))) + (local.set 0x205 (i64.load offset=0x205 align=1 (i32.const 0))) + (local.set 0x206 (i64.load offset=0x206 align=1 (i32.const 0))) + (local.set 0x207 (i64.load offset=0x207 align=1 (i32.const 0))) + (local.set 0x208 (i64.load offset=0x208 align=1 (i32.const 0))) + (local.set 0x209 (i64.load offset=0x209 align=1 (i32.const 0))) + (local.set 0x20a (i64.load offset=0x20a align=1 (i32.const 0))) + (local.set 0x20b (i64.load offset=0x20b align=1 (i32.const 0))) + (local.set 0x20c (i64.load offset=0x20c align=1 (i32.const 0))) + (local.set 0x20d (i64.load offset=0x20d align=1 (i32.const 0))) + (local.set 0x20e (i64.load offset=0x20e align=1 (i32.const 0))) + (local.set 0x20f (i64.load offset=0x20f align=1 (i32.const 0))) + (local.set 0x210 (i64.load offset=0x210 align=1 (i32.const 0))) + (local.set 0x211 (i64.load offset=0x211 align=1 (i32.const 0))) + (local.set 0x212 (i64.load offset=0x212 align=1 (i32.const 0))) + (local.set 0x213 (i64.load offset=0x213 align=1 (i32.const 0))) + (local.set 0x214 (i64.load offset=0x214 align=1 (i32.const 0))) + (local.set 0x215 (i64.load offset=0x215 align=1 (i32.const 0))) + (local.set 0x216 (i64.load offset=0x216 align=1 (i32.const 0))) + (local.set 0x217 (i64.load offset=0x217 align=1 (i32.const 0))) + (local.set 0x218 (i64.load offset=0x218 align=1 (i32.const 0))) + (local.set 0x219 (i64.load offset=0x219 align=1 (i32.const 0))) + (local.set 0x21a (i64.load offset=0x21a align=1 (i32.const 0))) + (local.set 0x21b (i64.load offset=0x21b align=1 (i32.const 0))) + (local.set 0x21c (i64.load offset=0x21c align=1 (i32.const 0))) + (local.set 0x21d (i64.load offset=0x21d align=1 (i32.const 0))) + (local.set 0x21e (i64.load offset=0x21e align=1 (i32.const 0))) + (local.set 0x21f (i64.load offset=0x21f align=1 (i32.const 0))) + (local.set 0x220 (i64.load offset=0x220 align=1 (i32.const 0))) + (local.set 0x221 (i64.load offset=0x221 align=1 (i32.const 0))) + (local.set 0x222 (i64.load offset=0x222 align=1 (i32.const 0))) + (local.set 0x223 (i64.load offset=0x223 align=1 (i32.const 0))) + (local.set 0x224 (i64.load offset=0x224 align=1 (i32.const 0))) + (local.set 0x225 (i64.load offset=0x225 align=1 (i32.const 0))) + (local.set 0x226 (i64.load offset=0x226 align=1 (i32.const 0))) + (local.set 0x227 (i64.load offset=0x227 align=1 (i32.const 0))) + (local.set 0x228 (i64.load offset=0x228 align=1 (i32.const 0))) + (local.set 0x229 (i64.load offset=0x229 align=1 (i32.const 0))) + (local.set 0x22a (i64.load offset=0x22a align=1 (i32.const 0))) + (local.set 0x22b (i64.load offset=0x22b align=1 (i32.const 0))) + (local.set 0x22c (i64.load offset=0x22c align=1 (i32.const 0))) + (local.set 0x22d (i64.load offset=0x22d align=1 (i32.const 0))) + (local.set 0x22e (i64.load offset=0x22e align=1 (i32.const 0))) + (local.set 0x22f (i64.load offset=0x22f align=1 (i32.const 0))) + (local.set 0x230 (i64.load offset=0x230 align=1 (i32.const 0))) + (local.set 0x231 (i64.load offset=0x231 align=1 (i32.const 0))) + (local.set 0x232 (i64.load offset=0x232 align=1 (i32.const 0))) + (local.set 0x233 (i64.load offset=0x233 align=1 (i32.const 0))) + (local.set 0x234 (i64.load offset=0x234 align=1 (i32.const 0))) + (local.set 0x235 (i64.load offset=0x235 align=1 (i32.const 0))) + (local.set 0x236 (i64.load offset=0x236 align=1 (i32.const 0))) + (local.set 0x237 (i64.load offset=0x237 align=1 (i32.const 0))) + (local.set 0x238 (i64.load offset=0x238 align=1 (i32.const 0))) + (local.set 0x239 (i64.load offset=0x239 align=1 (i32.const 0))) + (local.set 0x23a (i64.load offset=0x23a align=1 (i32.const 0))) + (local.set 0x23b (i64.load offset=0x23b align=1 (i32.const 0))) + (local.set 0x23c (i64.load offset=0x23c align=1 (i32.const 0))) + (local.set 0x23d (i64.load offset=0x23d align=1 (i32.const 0))) + (local.set 0x23e (i64.load offset=0x23e align=1 (i32.const 0))) + (local.set 0x23f (i64.load offset=0x23f align=1 (i32.const 0))) + (local.set 0x240 (i64.load offset=0x240 align=1 (i32.const 0))) + (local.set 0x241 (i64.load offset=0x241 align=1 (i32.const 0))) + (local.set 0x242 (i64.load offset=0x242 align=1 (i32.const 0))) + (local.set 0x243 (i64.load offset=0x243 align=1 (i32.const 0))) + (local.set 0x244 (i64.load offset=0x244 align=1 (i32.const 0))) + (local.set 0x245 (i64.load offset=0x245 align=1 (i32.const 0))) + (local.set 0x246 (i64.load offset=0x246 align=1 (i32.const 0))) + (local.set 0x247 (i64.load offset=0x247 align=1 (i32.const 0))) + (local.set 0x248 (i64.load offset=0x248 align=1 (i32.const 0))) + (local.set 0x249 (i64.load offset=0x249 align=1 (i32.const 0))) + (local.set 0x24a (i64.load offset=0x24a align=1 (i32.const 0))) + (local.set 0x24b (i64.load offset=0x24b align=1 (i32.const 0))) + (local.set 0x24c (i64.load offset=0x24c align=1 (i32.const 0))) + (local.set 0x24d (i64.load offset=0x24d align=1 (i32.const 0))) + (local.set 0x24e (i64.load offset=0x24e align=1 (i32.const 0))) + (local.set 0x24f (i64.load offset=0x24f align=1 (i32.const 0))) + (local.set 0x250 (i64.load offset=0x250 align=1 (i32.const 0))) + (local.set 0x251 (i64.load offset=0x251 align=1 (i32.const 0))) + (local.set 0x252 (i64.load offset=0x252 align=1 (i32.const 0))) + (local.set 0x253 (i64.load offset=0x253 align=1 (i32.const 0))) + (local.set 0x254 (i64.load offset=0x254 align=1 (i32.const 0))) + (local.set 0x255 (i64.load offset=0x255 align=1 (i32.const 0))) + (local.set 0x256 (i64.load offset=0x256 align=1 (i32.const 0))) + (local.set 0x257 (i64.load offset=0x257 align=1 (i32.const 0))) + (local.set 0x258 (i64.load offset=0x258 align=1 (i32.const 0))) + (local.set 0x259 (i64.load offset=0x259 align=1 (i32.const 0))) + (local.set 0x25a (i64.load offset=0x25a align=1 (i32.const 0))) + (local.set 0x25b (i64.load offset=0x25b align=1 (i32.const 0))) + (local.set 0x25c (i64.load offset=0x25c align=1 (i32.const 0))) + (local.set 0x25d (i64.load offset=0x25d align=1 (i32.const 0))) + (local.set 0x25e (i64.load offset=0x25e align=1 (i32.const 0))) + (local.set 0x25f (i64.load offset=0x25f align=1 (i32.const 0))) + (local.set 0x260 (i64.load offset=0x260 align=1 (i32.const 0))) + (local.set 0x261 (i64.load offset=0x261 align=1 (i32.const 0))) + (local.set 0x262 (i64.load offset=0x262 align=1 (i32.const 0))) + (local.set 0x263 (i64.load offset=0x263 align=1 (i32.const 0))) + (local.set 0x264 (i64.load offset=0x264 align=1 (i32.const 0))) + (local.set 0x265 (i64.load offset=0x265 align=1 (i32.const 0))) + (local.set 0x266 (i64.load offset=0x266 align=1 (i32.const 0))) + (local.set 0x267 (i64.load offset=0x267 align=1 (i32.const 0))) + (local.set 0x268 (i64.load offset=0x268 align=1 (i32.const 0))) + (local.set 0x269 (i64.load offset=0x269 align=1 (i32.const 0))) + (local.set 0x26a (i64.load offset=0x26a align=1 (i32.const 0))) + (local.set 0x26b (i64.load offset=0x26b align=1 (i32.const 0))) + (local.set 0x26c (i64.load offset=0x26c align=1 (i32.const 0))) + (local.set 0x26d (i64.load offset=0x26d align=1 (i32.const 0))) + (local.set 0x26e (i64.load offset=0x26e align=1 (i32.const 0))) + (local.set 0x26f (i64.load offset=0x26f align=1 (i32.const 0))) + (local.set 0x270 (i64.load offset=0x270 align=1 (i32.const 0))) + (local.set 0x271 (i64.load offset=0x271 align=1 (i32.const 0))) + (local.set 0x272 (i64.load offset=0x272 align=1 (i32.const 0))) + (local.set 0x273 (i64.load offset=0x273 align=1 (i32.const 0))) + (local.set 0x274 (i64.load offset=0x274 align=1 (i32.const 0))) + (local.set 0x275 (i64.load offset=0x275 align=1 (i32.const 0))) + (local.set 0x276 (i64.load offset=0x276 align=1 (i32.const 0))) + (local.set 0x277 (i64.load offset=0x277 align=1 (i32.const 0))) + (local.set 0x278 (i64.load offset=0x278 align=1 (i32.const 0))) + (local.set 0x279 (i64.load offset=0x279 align=1 (i32.const 0))) + (local.set 0x27a (i64.load offset=0x27a align=1 (i32.const 0))) + (local.set 0x27b (i64.load offset=0x27b align=1 (i32.const 0))) + (local.set 0x27c (i64.load offset=0x27c align=1 (i32.const 0))) + (local.set 0x27d (i64.load offset=0x27d align=1 (i32.const 0))) + (local.set 0x27e (i64.load offset=0x27e align=1 (i32.const 0))) + (local.set 0x27f (i64.load offset=0x27f align=1 (i32.const 0))) + (local.set 0x280 (i64.load offset=0x280 align=1 (i32.const 0))) + (local.set 0x281 (i64.load offset=0x281 align=1 (i32.const 0))) + (local.set 0x282 (i64.load offset=0x282 align=1 (i32.const 0))) + (local.set 0x283 (i64.load offset=0x283 align=1 (i32.const 0))) + (local.set 0x284 (i64.load offset=0x284 align=1 (i32.const 0))) + (local.set 0x285 (i64.load offset=0x285 align=1 (i32.const 0))) + (local.set 0x286 (i64.load offset=0x286 align=1 (i32.const 0))) + (local.set 0x287 (i64.load offset=0x287 align=1 (i32.const 0))) + (local.set 0x288 (i64.load offset=0x288 align=1 (i32.const 0))) + (local.set 0x289 (i64.load offset=0x289 align=1 (i32.const 0))) + (local.set 0x28a (i64.load offset=0x28a align=1 (i32.const 0))) + (local.set 0x28b (i64.load offset=0x28b align=1 (i32.const 0))) + (local.set 0x28c (i64.load offset=0x28c align=1 (i32.const 0))) + (local.set 0x28d (i64.load offset=0x28d align=1 (i32.const 0))) + (local.set 0x28e (i64.load offset=0x28e align=1 (i32.const 0))) + (local.set 0x28f (i64.load offset=0x28f align=1 (i32.const 0))) + (local.set 0x290 (i64.load offset=0x290 align=1 (i32.const 0))) + (local.set 0x291 (i64.load offset=0x291 align=1 (i32.const 0))) + (local.set 0x292 (i64.load offset=0x292 align=1 (i32.const 0))) + (local.set 0x293 (i64.load offset=0x293 align=1 (i32.const 0))) + (local.set 0x294 (i64.load offset=0x294 align=1 (i32.const 0))) + (local.set 0x295 (i64.load offset=0x295 align=1 (i32.const 0))) + (local.set 0x296 (i64.load offset=0x296 align=1 (i32.const 0))) + (local.set 0x297 (i64.load offset=0x297 align=1 (i32.const 0))) + (local.set 0x298 (i64.load offset=0x298 align=1 (i32.const 0))) + (local.set 0x299 (i64.load offset=0x299 align=1 (i32.const 0))) + (local.set 0x29a (i64.load offset=0x29a align=1 (i32.const 0))) + (local.set 0x29b (i64.load offset=0x29b align=1 (i32.const 0))) + (local.set 0x29c (i64.load offset=0x29c align=1 (i32.const 0))) + (local.set 0x29d (i64.load offset=0x29d align=1 (i32.const 0))) + (local.set 0x29e (i64.load offset=0x29e align=1 (i32.const 0))) + (local.set 0x29f (i64.load offset=0x29f align=1 (i32.const 0))) + (local.set 0x2a0 (i64.load offset=0x2a0 align=1 (i32.const 0))) + (local.set 0x2a1 (i64.load offset=0x2a1 align=1 (i32.const 0))) + (local.set 0x2a2 (i64.load offset=0x2a2 align=1 (i32.const 0))) + (local.set 0x2a3 (i64.load offset=0x2a3 align=1 (i32.const 0))) + (local.set 0x2a4 (i64.load offset=0x2a4 align=1 (i32.const 0))) + (local.set 0x2a5 (i64.load offset=0x2a5 align=1 (i32.const 0))) + (local.set 0x2a6 (i64.load offset=0x2a6 align=1 (i32.const 0))) + (local.set 0x2a7 (i64.load offset=0x2a7 align=1 (i32.const 0))) + (local.set 0x2a8 (i64.load offset=0x2a8 align=1 (i32.const 0))) + (local.set 0x2a9 (i64.load offset=0x2a9 align=1 (i32.const 0))) + (local.set 0x2aa (i64.load offset=0x2aa align=1 (i32.const 0))) + (local.set 0x2ab (i64.load offset=0x2ab align=1 (i32.const 0))) + (local.set 0x2ac (i64.load offset=0x2ac align=1 (i32.const 0))) + (local.set 0x2ad (i64.load offset=0x2ad align=1 (i32.const 0))) + (local.set 0x2ae (i64.load offset=0x2ae align=1 (i32.const 0))) + (local.set 0x2af (i64.load offset=0x2af align=1 (i32.const 0))) + (local.set 0x2b0 (i64.load offset=0x2b0 align=1 (i32.const 0))) + (local.set 0x2b1 (i64.load offset=0x2b1 align=1 (i32.const 0))) + (local.set 0x2b2 (i64.load offset=0x2b2 align=1 (i32.const 0))) + (local.set 0x2b3 (i64.load offset=0x2b3 align=1 (i32.const 0))) + (local.set 0x2b4 (i64.load offset=0x2b4 align=1 (i32.const 0))) + (local.set 0x2b5 (i64.load offset=0x2b5 align=1 (i32.const 0))) + (local.set 0x2b6 (i64.load offset=0x2b6 align=1 (i32.const 0))) + (local.set 0x2b7 (i64.load offset=0x2b7 align=1 (i32.const 0))) + (local.set 0x2b8 (i64.load offset=0x2b8 align=1 (i32.const 0))) + (local.set 0x2b9 (i64.load offset=0x2b9 align=1 (i32.const 0))) + (local.set 0x2ba (i64.load offset=0x2ba align=1 (i32.const 0))) + (local.set 0x2bb (i64.load offset=0x2bb align=1 (i32.const 0))) + (local.set 0x2bc (i64.load offset=0x2bc align=1 (i32.const 0))) + (local.set 0x2bd (i64.load offset=0x2bd align=1 (i32.const 0))) + (local.set 0x2be (i64.load offset=0x2be align=1 (i32.const 0))) + (local.set 0x2bf (i64.load offset=0x2bf align=1 (i32.const 0))) + (local.set 0x2c0 (i64.load offset=0x2c0 align=1 (i32.const 0))) + (local.set 0x2c1 (i64.load offset=0x2c1 align=1 (i32.const 0))) + (local.set 0x2c2 (i64.load offset=0x2c2 align=1 (i32.const 0))) + (local.set 0x2c3 (i64.load offset=0x2c3 align=1 (i32.const 0))) + (local.set 0x2c4 (i64.load offset=0x2c4 align=1 (i32.const 0))) + (local.set 0x2c5 (i64.load offset=0x2c5 align=1 (i32.const 0))) + (local.set 0x2c6 (i64.load offset=0x2c6 align=1 (i32.const 0))) + (local.set 0x2c7 (i64.load offset=0x2c7 align=1 (i32.const 0))) + (local.set 0x2c8 (i64.load offset=0x2c8 align=1 (i32.const 0))) + (local.set 0x2c9 (i64.load offset=0x2c9 align=1 (i32.const 0))) + (local.set 0x2ca (i64.load offset=0x2ca align=1 (i32.const 0))) + (local.set 0x2cb (i64.load offset=0x2cb align=1 (i32.const 0))) + (local.set 0x2cc (i64.load offset=0x2cc align=1 (i32.const 0))) + (local.set 0x2cd (i64.load offset=0x2cd align=1 (i32.const 0))) + (local.set 0x2ce (i64.load offset=0x2ce align=1 (i32.const 0))) + (local.set 0x2cf (i64.load offset=0x2cf align=1 (i32.const 0))) + (local.set 0x2d0 (i64.load offset=0x2d0 align=1 (i32.const 0))) + (local.set 0x2d1 (i64.load offset=0x2d1 align=1 (i32.const 0))) + (local.set 0x2d2 (i64.load offset=0x2d2 align=1 (i32.const 0))) + (local.set 0x2d3 (i64.load offset=0x2d3 align=1 (i32.const 0))) + (local.set 0x2d4 (i64.load offset=0x2d4 align=1 (i32.const 0))) + (local.set 0x2d5 (i64.load offset=0x2d5 align=1 (i32.const 0))) + (local.set 0x2d6 (i64.load offset=0x2d6 align=1 (i32.const 0))) + (local.set 0x2d7 (i64.load offset=0x2d7 align=1 (i32.const 0))) + (local.set 0x2d8 (i64.load offset=0x2d8 align=1 (i32.const 0))) + (local.set 0x2d9 (i64.load offset=0x2d9 align=1 (i32.const 0))) + (local.set 0x2da (i64.load offset=0x2da align=1 (i32.const 0))) + (local.set 0x2db (i64.load offset=0x2db align=1 (i32.const 0))) + (local.set 0x2dc (i64.load offset=0x2dc align=1 (i32.const 0))) + (local.set 0x2dd (i64.load offset=0x2dd align=1 (i32.const 0))) + (local.set 0x2de (i64.load offset=0x2de align=1 (i32.const 0))) + (local.set 0x2df (i64.load offset=0x2df align=1 (i32.const 0))) + (local.set 0x2e0 (i64.load offset=0x2e0 align=1 (i32.const 0))) + (local.set 0x2e1 (i64.load offset=0x2e1 align=1 (i32.const 0))) + (local.set 0x2e2 (i64.load offset=0x2e2 align=1 (i32.const 0))) + (local.set 0x2e3 (i64.load offset=0x2e3 align=1 (i32.const 0))) + (local.set 0x2e4 (i64.load offset=0x2e4 align=1 (i32.const 0))) + (local.set 0x2e5 (i64.load offset=0x2e5 align=1 (i32.const 0))) + (local.set 0x2e6 (i64.load offset=0x2e6 align=1 (i32.const 0))) + (local.set 0x2e7 (i64.load offset=0x2e7 align=1 (i32.const 0))) + (local.set 0x2e8 (i64.load offset=0x2e8 align=1 (i32.const 0))) + (local.set 0x2e9 (i64.load offset=0x2e9 align=1 (i32.const 0))) + (local.set 0x2ea (i64.load offset=0x2ea align=1 (i32.const 0))) + (local.set 0x2eb (i64.load offset=0x2eb align=1 (i32.const 0))) + (local.set 0x2ec (i64.load offset=0x2ec align=1 (i32.const 0))) + (local.set 0x2ed (i64.load offset=0x2ed align=1 (i32.const 0))) + (local.set 0x2ee (i64.load offset=0x2ee align=1 (i32.const 0))) + (local.set 0x2ef (i64.load offset=0x2ef align=1 (i32.const 0))) + (local.set 0x2f0 (i64.load offset=0x2f0 align=1 (i32.const 0))) + (local.set 0x2f1 (i64.load offset=0x2f1 align=1 (i32.const 0))) + (local.set 0x2f2 (i64.load offset=0x2f2 align=1 (i32.const 0))) + (local.set 0x2f3 (i64.load offset=0x2f3 align=1 (i32.const 0))) + (local.set 0x2f4 (i64.load offset=0x2f4 align=1 (i32.const 0))) + (local.set 0x2f5 (i64.load offset=0x2f5 align=1 (i32.const 0))) + (local.set 0x2f6 (i64.load offset=0x2f6 align=1 (i32.const 0))) + (local.set 0x2f7 (i64.load offset=0x2f7 align=1 (i32.const 0))) + (local.set 0x2f8 (i64.load offset=0x2f8 align=1 (i32.const 0))) + (local.set 0x2f9 (i64.load offset=0x2f9 align=1 (i32.const 0))) + (local.set 0x2fa (i64.load offset=0x2fa align=1 (i32.const 0))) + (local.set 0x2fb (i64.load offset=0x2fb align=1 (i32.const 0))) + (local.set 0x2fc (i64.load offset=0x2fc align=1 (i32.const 0))) + (local.set 0x2fd (i64.load offset=0x2fd align=1 (i32.const 0))) + (local.set 0x2fe (i64.load offset=0x2fe align=1 (i32.const 0))) + (local.set 0x2ff (i64.load offset=0x2ff align=1 (i32.const 0))) + (local.set 0x300 (i64.load offset=0x300 align=1 (i32.const 0))) + (local.set 0x301 (i64.load offset=0x301 align=1 (i32.const 0))) + (local.set 0x302 (i64.load offset=0x302 align=1 (i32.const 0))) + (local.set 0x303 (i64.load offset=0x303 align=1 (i32.const 0))) + (local.set 0x304 (i64.load offset=0x304 align=1 (i32.const 0))) + (local.set 0x305 (i64.load offset=0x305 align=1 (i32.const 0))) + (local.set 0x306 (i64.load offset=0x306 align=1 (i32.const 0))) + (local.set 0x307 (i64.load offset=0x307 align=1 (i32.const 0))) + (local.set 0x308 (i64.load offset=0x308 align=1 (i32.const 0))) + (local.set 0x309 (i64.load offset=0x309 align=1 (i32.const 0))) + (local.set 0x30a (i64.load offset=0x30a align=1 (i32.const 0))) + (local.set 0x30b (i64.load offset=0x30b align=1 (i32.const 0))) + (local.set 0x30c (i64.load offset=0x30c align=1 (i32.const 0))) + (local.set 0x30d (i64.load offset=0x30d align=1 (i32.const 0))) + (local.set 0x30e (i64.load offset=0x30e align=1 (i32.const 0))) + (local.set 0x30f (i64.load offset=0x30f align=1 (i32.const 0))) + (local.set 0x310 (i64.load offset=0x310 align=1 (i32.const 0))) + (local.set 0x311 (i64.load offset=0x311 align=1 (i32.const 0))) + (local.set 0x312 (i64.load offset=0x312 align=1 (i32.const 0))) + (local.set 0x313 (i64.load offset=0x313 align=1 (i32.const 0))) + (local.set 0x314 (i64.load offset=0x314 align=1 (i32.const 0))) + (local.set 0x315 (i64.load offset=0x315 align=1 (i32.const 0))) + (local.set 0x316 (i64.load offset=0x316 align=1 (i32.const 0))) + (local.set 0x317 (i64.load offset=0x317 align=1 (i32.const 0))) + (local.set 0x318 (i64.load offset=0x318 align=1 (i32.const 0))) + (local.set 0x319 (i64.load offset=0x319 align=1 (i32.const 0))) + (local.set 0x31a (i64.load offset=0x31a align=1 (i32.const 0))) + (local.set 0x31b (i64.load offset=0x31b align=1 (i32.const 0))) + (local.set 0x31c (i64.load offset=0x31c align=1 (i32.const 0))) + (local.set 0x31d (i64.load offset=0x31d align=1 (i32.const 0))) + (local.set 0x31e (i64.load offset=0x31e align=1 (i32.const 0))) + (local.set 0x31f (i64.load offset=0x31f align=1 (i32.const 0))) + (local.set 0x320 (i64.load offset=0x320 align=1 (i32.const 0))) + (local.set 0x321 (i64.load offset=0x321 align=1 (i32.const 0))) + (local.set 0x322 (i64.load offset=0x322 align=1 (i32.const 0))) + (local.set 0x323 (i64.load offset=0x323 align=1 (i32.const 0))) + (local.set 0x324 (i64.load offset=0x324 align=1 (i32.const 0))) + (local.set 0x325 (i64.load offset=0x325 align=1 (i32.const 0))) + (local.set 0x326 (i64.load offset=0x326 align=1 (i32.const 0))) + (local.set 0x327 (i64.load offset=0x327 align=1 (i32.const 0))) + (local.set 0x328 (i64.load offset=0x328 align=1 (i32.const 0))) + (local.set 0x329 (i64.load offset=0x329 align=1 (i32.const 0))) + (local.set 0x32a (i64.load offset=0x32a align=1 (i32.const 0))) + (local.set 0x32b (i64.load offset=0x32b align=1 (i32.const 0))) + (local.set 0x32c (i64.load offset=0x32c align=1 (i32.const 0))) + (local.set 0x32d (i64.load offset=0x32d align=1 (i32.const 0))) + (local.set 0x32e (i64.load offset=0x32e align=1 (i32.const 0))) + (local.set 0x32f (i64.load offset=0x32f align=1 (i32.const 0))) + (local.set 0x330 (i64.load offset=0x330 align=1 (i32.const 0))) + (local.set 0x331 (i64.load offset=0x331 align=1 (i32.const 0))) + (local.set 0x332 (i64.load offset=0x332 align=1 (i32.const 0))) + (local.set 0x333 (i64.load offset=0x333 align=1 (i32.const 0))) + (local.set 0x334 (i64.load offset=0x334 align=1 (i32.const 0))) + (local.set 0x335 (i64.load offset=0x335 align=1 (i32.const 0))) + (local.set 0x336 (i64.load offset=0x336 align=1 (i32.const 0))) + (local.set 0x337 (i64.load offset=0x337 align=1 (i32.const 0))) + (local.set 0x338 (i64.load offset=0x338 align=1 (i32.const 0))) + (local.set 0x339 (i64.load offset=0x339 align=1 (i32.const 0))) + (local.set 0x33a (i64.load offset=0x33a align=1 (i32.const 0))) + (local.set 0x33b (i64.load offset=0x33b align=1 (i32.const 0))) + (local.set 0x33c (i64.load offset=0x33c align=1 (i32.const 0))) + (local.set 0x33d (i64.load offset=0x33d align=1 (i32.const 0))) + (local.set 0x33e (i64.load offset=0x33e align=1 (i32.const 0))) + (local.set 0x33f (i64.load offset=0x33f align=1 (i32.const 0))) + (local.set 0x340 (i64.load offset=0x340 align=1 (i32.const 0))) + (local.set 0x341 (i64.load offset=0x341 align=1 (i32.const 0))) + (local.set 0x342 (i64.load offset=0x342 align=1 (i32.const 0))) + (local.set 0x343 (i64.load offset=0x343 align=1 (i32.const 0))) + (local.set 0x344 (i64.load offset=0x344 align=1 (i32.const 0))) + (local.set 0x345 (i64.load offset=0x345 align=1 (i32.const 0))) + (local.set 0x346 (i64.load offset=0x346 align=1 (i32.const 0))) + (local.set 0x347 (i64.load offset=0x347 align=1 (i32.const 0))) + (local.set 0x348 (i64.load offset=0x348 align=1 (i32.const 0))) + (local.set 0x349 (i64.load offset=0x349 align=1 (i32.const 0))) + (local.set 0x34a (i64.load offset=0x34a align=1 (i32.const 0))) + (local.set 0x34b (i64.load offset=0x34b align=1 (i32.const 0))) + (local.set 0x34c (i64.load offset=0x34c align=1 (i32.const 0))) + (local.set 0x34d (i64.load offset=0x34d align=1 (i32.const 0))) + (local.set 0x34e (i64.load offset=0x34e align=1 (i32.const 0))) + (local.set 0x34f (i64.load offset=0x34f align=1 (i32.const 0))) + (local.set 0x350 (i64.load offset=0x350 align=1 (i32.const 0))) + (local.set 0x351 (i64.load offset=0x351 align=1 (i32.const 0))) + (local.set 0x352 (i64.load offset=0x352 align=1 (i32.const 0))) + (local.set 0x353 (i64.load offset=0x353 align=1 (i32.const 0))) + (local.set 0x354 (i64.load offset=0x354 align=1 (i32.const 0))) + (local.set 0x355 (i64.load offset=0x355 align=1 (i32.const 0))) + (local.set 0x356 (i64.load offset=0x356 align=1 (i32.const 0))) + (local.set 0x357 (i64.load offset=0x357 align=1 (i32.const 0))) + (local.set 0x358 (i64.load offset=0x358 align=1 (i32.const 0))) + (local.set 0x359 (i64.load offset=0x359 align=1 (i32.const 0))) + (local.set 0x35a (i64.load offset=0x35a align=1 (i32.const 0))) + (local.set 0x35b (i64.load offset=0x35b align=1 (i32.const 0))) + (local.set 0x35c (i64.load offset=0x35c align=1 (i32.const 0))) + (local.set 0x35d (i64.load offset=0x35d align=1 (i32.const 0))) + (local.set 0x35e (i64.load offset=0x35e align=1 (i32.const 0))) + (local.set 0x35f (i64.load offset=0x35f align=1 (i32.const 0))) + (local.set 0x360 (i64.load offset=0x360 align=1 (i32.const 0))) + (local.set 0x361 (i64.load offset=0x361 align=1 (i32.const 0))) + (local.set 0x362 (i64.load offset=0x362 align=1 (i32.const 0))) + (local.set 0x363 (i64.load offset=0x363 align=1 (i32.const 0))) + (local.set 0x364 (i64.load offset=0x364 align=1 (i32.const 0))) + (local.set 0x365 (i64.load offset=0x365 align=1 (i32.const 0))) + (local.set 0x366 (i64.load offset=0x366 align=1 (i32.const 0))) + (local.set 0x367 (i64.load offset=0x367 align=1 (i32.const 0))) + (local.set 0x368 (i64.load offset=0x368 align=1 (i32.const 0))) + (local.set 0x369 (i64.load offset=0x369 align=1 (i32.const 0))) + (local.set 0x36a (i64.load offset=0x36a align=1 (i32.const 0))) + (local.set 0x36b (i64.load offset=0x36b align=1 (i32.const 0))) + (local.set 0x36c (i64.load offset=0x36c align=1 (i32.const 0))) + (local.set 0x36d (i64.load offset=0x36d align=1 (i32.const 0))) + (local.set 0x36e (i64.load offset=0x36e align=1 (i32.const 0))) + (local.set 0x36f (i64.load offset=0x36f align=1 (i32.const 0))) + (local.set 0x370 (i64.load offset=0x370 align=1 (i32.const 0))) + (local.set 0x371 (i64.load offset=0x371 align=1 (i32.const 0))) + (local.set 0x372 (i64.load offset=0x372 align=1 (i32.const 0))) + (local.set 0x373 (i64.load offset=0x373 align=1 (i32.const 0))) + (local.set 0x374 (i64.load offset=0x374 align=1 (i32.const 0))) + (local.set 0x375 (i64.load offset=0x375 align=1 (i32.const 0))) + (local.set 0x376 (i64.load offset=0x376 align=1 (i32.const 0))) + (local.set 0x377 (i64.load offset=0x377 align=1 (i32.const 0))) + (local.set 0x378 (i64.load offset=0x378 align=1 (i32.const 0))) + (local.set 0x379 (i64.load offset=0x379 align=1 (i32.const 0))) + (local.set 0x37a (i64.load offset=0x37a align=1 (i32.const 0))) + (local.set 0x37b (i64.load offset=0x37b align=1 (i32.const 0))) + (local.set 0x37c (i64.load offset=0x37c align=1 (i32.const 0))) + (local.set 0x37d (i64.load offset=0x37d align=1 (i32.const 0))) + (local.set 0x37e (i64.load offset=0x37e align=1 (i32.const 0))) + (local.set 0x37f (i64.load offset=0x37f align=1 (i32.const 0))) + (local.set 0x380 (i64.load offset=0x380 align=1 (i32.const 0))) + (local.set 0x381 (i64.load offset=0x381 align=1 (i32.const 0))) + (local.set 0x382 (i64.load offset=0x382 align=1 (i32.const 0))) + (local.set 0x383 (i64.load offset=0x383 align=1 (i32.const 0))) + (local.set 0x384 (i64.load offset=0x384 align=1 (i32.const 0))) + (local.set 0x385 (i64.load offset=0x385 align=1 (i32.const 0))) + (local.set 0x386 (i64.load offset=0x386 align=1 (i32.const 0))) + (local.set 0x387 (i64.load offset=0x387 align=1 (i32.const 0))) + (local.set 0x388 (i64.load offset=0x388 align=1 (i32.const 0))) + (local.set 0x389 (i64.load offset=0x389 align=1 (i32.const 0))) + (local.set 0x38a (i64.load offset=0x38a align=1 (i32.const 0))) + (local.set 0x38b (i64.load offset=0x38b align=1 (i32.const 0))) + (local.set 0x38c (i64.load offset=0x38c align=1 (i32.const 0))) + (local.set 0x38d (i64.load offset=0x38d align=1 (i32.const 0))) + (local.set 0x38e (i64.load offset=0x38e align=1 (i32.const 0))) + (local.set 0x38f (i64.load offset=0x38f align=1 (i32.const 0))) + (local.set 0x390 (i64.load offset=0x390 align=1 (i32.const 0))) + (local.set 0x391 (i64.load offset=0x391 align=1 (i32.const 0))) + (local.set 0x392 (i64.load offset=0x392 align=1 (i32.const 0))) + (local.set 0x393 (i64.load offset=0x393 align=1 (i32.const 0))) + (local.set 0x394 (i64.load offset=0x394 align=1 (i32.const 0))) + (local.set 0x395 (i64.load offset=0x395 align=1 (i32.const 0))) + (local.set 0x396 (i64.load offset=0x396 align=1 (i32.const 0))) + (local.set 0x397 (i64.load offset=0x397 align=1 (i32.const 0))) + (local.set 0x398 (i64.load offset=0x398 align=1 (i32.const 0))) + (local.set 0x399 (i64.load offset=0x399 align=1 (i32.const 0))) + (local.set 0x39a (i64.load offset=0x39a align=1 (i32.const 0))) + (local.set 0x39b (i64.load offset=0x39b align=1 (i32.const 0))) + (local.set 0x39c (i64.load offset=0x39c align=1 (i32.const 0))) + (local.set 0x39d (i64.load offset=0x39d align=1 (i32.const 0))) + (local.set 0x39e (i64.load offset=0x39e align=1 (i32.const 0))) + (local.set 0x39f (i64.load offset=0x39f align=1 (i32.const 0))) + (local.set 0x3a0 (i64.load offset=0x3a0 align=1 (i32.const 0))) + (local.set 0x3a1 (i64.load offset=0x3a1 align=1 (i32.const 0))) + (local.set 0x3a2 (i64.load offset=0x3a2 align=1 (i32.const 0))) + (local.set 0x3a3 (i64.load offset=0x3a3 align=1 (i32.const 0))) + (local.set 0x3a4 (i64.load offset=0x3a4 align=1 (i32.const 0))) + (local.set 0x3a5 (i64.load offset=0x3a5 align=1 (i32.const 0))) + (local.set 0x3a6 (i64.load offset=0x3a6 align=1 (i32.const 0))) + (local.set 0x3a7 (i64.load offset=0x3a7 align=1 (i32.const 0))) + (local.set 0x3a8 (i64.load offset=0x3a8 align=1 (i32.const 0))) + (local.set 0x3a9 (i64.load offset=0x3a9 align=1 (i32.const 0))) + (local.set 0x3aa (i64.load offset=0x3aa align=1 (i32.const 0))) + (local.set 0x3ab (i64.load offset=0x3ab align=1 (i32.const 0))) + (local.set 0x3ac (i64.load offset=0x3ac align=1 (i32.const 0))) + (local.set 0x3ad (i64.load offset=0x3ad align=1 (i32.const 0))) + (local.set 0x3ae (i64.load offset=0x3ae align=1 (i32.const 0))) + (local.set 0x3af (i64.load offset=0x3af align=1 (i32.const 0))) + (local.set 0x3b0 (i64.load offset=0x3b0 align=1 (i32.const 0))) + (local.set 0x3b1 (i64.load offset=0x3b1 align=1 (i32.const 0))) + (local.set 0x3b2 (i64.load offset=0x3b2 align=1 (i32.const 0))) + (local.set 0x3b3 (i64.load offset=0x3b3 align=1 (i32.const 0))) + (local.set 0x3b4 (i64.load offset=0x3b4 align=1 (i32.const 0))) + (local.set 0x3b5 (i64.load offset=0x3b5 align=1 (i32.const 0))) + (local.set 0x3b6 (i64.load offset=0x3b6 align=1 (i32.const 0))) + (local.set 0x3b7 (i64.load offset=0x3b7 align=1 (i32.const 0))) + (local.set 0x3b8 (i64.load offset=0x3b8 align=1 (i32.const 0))) + (local.set 0x3b9 (i64.load offset=0x3b9 align=1 (i32.const 0))) + (local.set 0x3ba (i64.load offset=0x3ba align=1 (i32.const 0))) + (local.set 0x3bb (i64.load offset=0x3bb align=1 (i32.const 0))) + (local.set 0x3bc (i64.load offset=0x3bc align=1 (i32.const 0))) + (local.set 0x3bd (i64.load offset=0x3bd align=1 (i32.const 0))) + (local.set 0x3be (i64.load offset=0x3be align=1 (i32.const 0))) + (local.set 0x3bf (i64.load offset=0x3bf align=1 (i32.const 0))) + (local.set 0x3c0 (i64.load offset=0x3c0 align=1 (i32.const 0))) + (local.set 0x3c1 (i64.load offset=0x3c1 align=1 (i32.const 0))) + (local.set 0x3c2 (i64.load offset=0x3c2 align=1 (i32.const 0))) + (local.set 0x3c3 (i64.load offset=0x3c3 align=1 (i32.const 0))) + (local.set 0x3c4 (i64.load offset=0x3c4 align=1 (i32.const 0))) + (local.set 0x3c5 (i64.load offset=0x3c5 align=1 (i32.const 0))) + (local.set 0x3c6 (i64.load offset=0x3c6 align=1 (i32.const 0))) + (local.set 0x3c7 (i64.load offset=0x3c7 align=1 (i32.const 0))) + (local.set 0x3c8 (i64.load offset=0x3c8 align=1 (i32.const 0))) + (local.set 0x3c9 (i64.load offset=0x3c9 align=1 (i32.const 0))) + (local.set 0x3ca (i64.load offset=0x3ca align=1 (i32.const 0))) + (local.set 0x3cb (i64.load offset=0x3cb align=1 (i32.const 0))) + (local.set 0x3cc (i64.load offset=0x3cc align=1 (i32.const 0))) + (local.set 0x3cd (i64.load offset=0x3cd align=1 (i32.const 0))) + (local.set 0x3ce (i64.load offset=0x3ce align=1 (i32.const 0))) + (local.set 0x3cf (i64.load offset=0x3cf align=1 (i32.const 0))) + (local.set 0x3d0 (i64.load offset=0x3d0 align=1 (i32.const 0))) + (local.set 0x3d1 (i64.load offset=0x3d1 align=1 (i32.const 0))) + (local.set 0x3d2 (i64.load offset=0x3d2 align=1 (i32.const 0))) + (local.set 0x3d3 (i64.load offset=0x3d3 align=1 (i32.const 0))) + (local.set 0x3d4 (i64.load offset=0x3d4 align=1 (i32.const 0))) + (local.set 0x3d5 (i64.load offset=0x3d5 align=1 (i32.const 0))) + (local.set 0x3d6 (i64.load offset=0x3d6 align=1 (i32.const 0))) + (local.set 0x3d7 (i64.load offset=0x3d7 align=1 (i32.const 0))) + (local.set 0x3d8 (i64.load offset=0x3d8 align=1 (i32.const 0))) + (local.set 0x3d9 (i64.load offset=0x3d9 align=1 (i32.const 0))) + (local.set 0x3da (i64.load offset=0x3da align=1 (i32.const 0))) + (local.set 0x3db (i64.load offset=0x3db align=1 (i32.const 0))) + (local.set 0x3dc (i64.load offset=0x3dc align=1 (i32.const 0))) + (local.set 0x3dd (i64.load offset=0x3dd align=1 (i32.const 0))) + (local.set 0x3de (i64.load offset=0x3de align=1 (i32.const 0))) + (local.set 0x3df (i64.load offset=0x3df align=1 (i32.const 0))) + (local.set 0x3e0 (i64.load offset=0x3e0 align=1 (i32.const 0))) + (local.set 0x3e1 (i64.load offset=0x3e1 align=1 (i32.const 0))) + (local.set 0x3e2 (i64.load offset=0x3e2 align=1 (i32.const 0))) + (local.set 0x3e3 (i64.load offset=0x3e3 align=1 (i32.const 0))) + (local.set 0x3e4 (i64.load offset=0x3e4 align=1 (i32.const 0))) + (local.set 0x3e5 (i64.load offset=0x3e5 align=1 (i32.const 0))) + (local.set 0x3e6 (i64.load offset=0x3e6 align=1 (i32.const 0))) + (local.set 0x3e7 (i64.load offset=0x3e7 align=1 (i32.const 0))) + (local.set 0x3e8 (i64.load offset=0x3e8 align=1 (i32.const 0))) + (local.set 0x3e9 (i64.load offset=0x3e9 align=1 (i32.const 0))) + (local.set 0x3ea (i64.load offset=0x3ea align=1 (i32.const 0))) + (local.set 0x3eb (i64.load offset=0x3eb align=1 (i32.const 0))) + (local.set 0x3ec (i64.load offset=0x3ec align=1 (i32.const 0))) + (local.set 0x3ed (i64.load offset=0x3ed align=1 (i32.const 0))) + (local.set 0x3ee (i64.load offset=0x3ee align=1 (i32.const 0))) + (local.set 0x3ef (i64.load offset=0x3ef align=1 (i32.const 0))) + (local.set 0x3f0 (i64.load offset=0x3f0 align=1 (i32.const 0))) + (local.set 0x3f1 (i64.load offset=0x3f1 align=1 (i32.const 0))) + (local.set 0x3f2 (i64.load offset=0x3f2 align=1 (i32.const 0))) + (local.set 0x3f3 (i64.load offset=0x3f3 align=1 (i32.const 0))) + (local.set 0x3f4 (i64.load offset=0x3f4 align=1 (i32.const 0))) + (local.set 0x3f5 (i64.load offset=0x3f5 align=1 (i32.const 0))) + (local.set 0x3f6 (i64.load offset=0x3f6 align=1 (i32.const 0))) + (local.set 0x3f7 (i64.load offset=0x3f7 align=1 (i32.const 0))) + (local.set 0x3f8 (i64.load offset=0x3f8 align=1 (i32.const 0))) + (local.set 0x3f9 (i64.load offset=0x3f9 align=1 (i32.const 0))) + (local.set 0x3fa (i64.load offset=0x3fa align=1 (i32.const 0))) + (local.set 0x3fb (i64.load offset=0x3fb align=1 (i32.const 0))) + (local.set 0x3fc (i64.load offset=0x3fc align=1 (i32.const 0))) + (local.set 0x3fd (i64.load offset=0x3fd align=1 (i32.const 0))) + (local.set 0x3fe (i64.load offset=0x3fe align=1 (i32.const 0))) + (local.set 0x3ff (i64.load offset=0x3ff align=1 (i32.const 0))) + (local.set 0x400 (i64.load offset=0x400 align=1 (i32.const 0))) + (local.set 0x401 (i64.load offset=0x401 align=1 (i32.const 0))) + (local.set 0x402 (i64.load offset=0x402 align=1 (i32.const 0))) + (local.set 0x403 (i64.load offset=0x403 align=1 (i32.const 0))) + (local.set 0x404 (i64.load offset=0x404 align=1 (i32.const 0))) + (local.set 0x405 (i64.load offset=0x405 align=1 (i32.const 0))) + (local.set 0x406 (i64.load offset=0x406 align=1 (i32.const 0))) + (local.set 0x407 (i64.load offset=0x407 align=1 (i32.const 0))) + (local.set 0x408 (i64.load offset=0x408 align=1 (i32.const 0))) + (local.set 0x409 (i64.load offset=0x409 align=1 (i32.const 0))) + (local.set 0x40a (i64.load offset=0x40a align=1 (i32.const 0))) + (local.set 0x40b (i64.load offset=0x40b align=1 (i32.const 0))) + (local.set 0x40c (i64.load offset=0x40c align=1 (i32.const 0))) + (local.set 0x40d (i64.load offset=0x40d align=1 (i32.const 0))) + (local.set 0x40e (i64.load offset=0x40e align=1 (i32.const 0))) + (local.set 0x40f (i64.load offset=0x40f align=1 (i32.const 0))) + (local.set 0x410 (i64.load offset=0x410 align=1 (i32.const 0))) + (local.set 0x411 (i64.load offset=0x411 align=1 (i32.const 0))) + (local.set 0x412 (i64.load offset=0x412 align=1 (i32.const 0))) + (local.set 0x413 (i64.load offset=0x413 align=1 (i32.const 0))) + (local.set 0x414 (i64.load offset=0x414 align=1 (i32.const 0))) + (local.set 0x415 (i64.load offset=0x415 align=1 (i32.const 0))) + (local.set 0x416 (i64.load offset=0x416 align=1 (i32.const 0))) + (local.set 0x417 (i64.load offset=0x417 align=1 (i32.const 0))) + (local.set 0x418 (i64.load offset=0x418 align=1 (i32.const 0))) + (local.set 0x419 (i64.load offset=0x419 align=1 (i32.const 0))) + (local.set 0x41a (i64.load offset=0x41a align=1 (i32.const 0))) + (local.set 0x41b (i64.load offset=0x41b align=1 (i32.const 0))) + (local.set 0x41c (i64.load offset=0x41c align=1 (i32.const 0))) + (local.set 0x41d (i64.load offset=0x41d align=1 (i32.const 0))) + (local.set 0x41e (i64.load offset=0x41e align=1 (i32.const 0))) + (local.set 0x41f (i64.load offset=0x41f align=1 (i32.const 0))) + + ;; store the locals back to memory + (i64.store offset=0x000 align=1 (i32.const 0) (local.get 0x000)) + (i64.store offset=0x001 align=1 (i32.const 0) (local.get 0x001)) + (i64.store offset=0x002 align=1 (i32.const 0) (local.get 0x002)) + (i64.store offset=0x003 align=1 (i32.const 0) (local.get 0x003)) + (i64.store offset=0x004 align=1 (i32.const 0) (local.get 0x004)) + (i64.store offset=0x005 align=1 (i32.const 0) (local.get 0x005)) + (i64.store offset=0x006 align=1 (i32.const 0) (local.get 0x006)) + (i64.store offset=0x007 align=1 (i32.const 0) (local.get 0x007)) + (i64.store offset=0x008 align=1 (i32.const 0) (local.get 0x008)) + (i64.store offset=0x009 align=1 (i32.const 0) (local.get 0x009)) + (i64.store offset=0x00a align=1 (i32.const 0) (local.get 0x00a)) + (i64.store offset=0x00b align=1 (i32.const 0) (local.get 0x00b)) + (i64.store offset=0x00c align=1 (i32.const 0) (local.get 0x00c)) + (i64.store offset=0x00d align=1 (i32.const 0) (local.get 0x00d)) + (i64.store offset=0x00e align=1 (i32.const 0) (local.get 0x00e)) + (i64.store offset=0x00f align=1 (i32.const 0) (local.get 0x00f)) + (i64.store offset=0x010 align=1 (i32.const 0) (local.get 0x010)) + (i64.store offset=0x011 align=1 (i32.const 0) (local.get 0x011)) + (i64.store offset=0x012 align=1 (i32.const 0) (local.get 0x012)) + (i64.store offset=0x013 align=1 (i32.const 0) (local.get 0x013)) + (i64.store offset=0x014 align=1 (i32.const 0) (local.get 0x014)) + (i64.store offset=0x015 align=1 (i32.const 0) (local.get 0x015)) + (i64.store offset=0x016 align=1 (i32.const 0) (local.get 0x016)) + (i64.store offset=0x017 align=1 (i32.const 0) (local.get 0x017)) + (i64.store offset=0x018 align=1 (i32.const 0) (local.get 0x018)) + (i64.store offset=0x019 align=1 (i32.const 0) (local.get 0x019)) + (i64.store offset=0x01a align=1 (i32.const 0) (local.get 0x01a)) + (i64.store offset=0x01b align=1 (i32.const 0) (local.get 0x01b)) + (i64.store offset=0x01c align=1 (i32.const 0) (local.get 0x01c)) + (i64.store offset=0x01d align=1 (i32.const 0) (local.get 0x01d)) + (i64.store offset=0x01e align=1 (i32.const 0) (local.get 0x01e)) + (i64.store offset=0x01f align=1 (i32.const 0) (local.get 0x01f)) + (i64.store offset=0x020 align=1 (i32.const 0) (local.get 0x020)) + (i64.store offset=0x021 align=1 (i32.const 0) (local.get 0x021)) + (i64.store offset=0x022 align=1 (i32.const 0) (local.get 0x022)) + (i64.store offset=0x023 align=1 (i32.const 0) (local.get 0x023)) + (i64.store offset=0x024 align=1 (i32.const 0) (local.get 0x024)) + (i64.store offset=0x025 align=1 (i32.const 0) (local.get 0x025)) + (i64.store offset=0x026 align=1 (i32.const 0) (local.get 0x026)) + (i64.store offset=0x027 align=1 (i32.const 0) (local.get 0x027)) + (i64.store offset=0x028 align=1 (i32.const 0) (local.get 0x028)) + (i64.store offset=0x029 align=1 (i32.const 0) (local.get 0x029)) + (i64.store offset=0x02a align=1 (i32.const 0) (local.get 0x02a)) + (i64.store offset=0x02b align=1 (i32.const 0) (local.get 0x02b)) + (i64.store offset=0x02c align=1 (i32.const 0) (local.get 0x02c)) + (i64.store offset=0x02d align=1 (i32.const 0) (local.get 0x02d)) + (i64.store offset=0x02e align=1 (i32.const 0) (local.get 0x02e)) + (i64.store offset=0x02f align=1 (i32.const 0) (local.get 0x02f)) + (i64.store offset=0x030 align=1 (i32.const 0) (local.get 0x030)) + (i64.store offset=0x031 align=1 (i32.const 0) (local.get 0x031)) + (i64.store offset=0x032 align=1 (i32.const 0) (local.get 0x032)) + (i64.store offset=0x033 align=1 (i32.const 0) (local.get 0x033)) + (i64.store offset=0x034 align=1 (i32.const 0) (local.get 0x034)) + (i64.store offset=0x035 align=1 (i32.const 0) (local.get 0x035)) + (i64.store offset=0x036 align=1 (i32.const 0) (local.get 0x036)) + (i64.store offset=0x037 align=1 (i32.const 0) (local.get 0x037)) + (i64.store offset=0x038 align=1 (i32.const 0) (local.get 0x038)) + (i64.store offset=0x039 align=1 (i32.const 0) (local.get 0x039)) + (i64.store offset=0x03a align=1 (i32.const 0) (local.get 0x03a)) + (i64.store offset=0x03b align=1 (i32.const 0) (local.get 0x03b)) + (i64.store offset=0x03c align=1 (i32.const 0) (local.get 0x03c)) + (i64.store offset=0x03d align=1 (i32.const 0) (local.get 0x03d)) + (i64.store offset=0x03e align=1 (i32.const 0) (local.get 0x03e)) + (i64.store offset=0x03f align=1 (i32.const 0) (local.get 0x03f)) + (i64.store offset=0x040 align=1 (i32.const 0) (local.get 0x040)) + (i64.store offset=0x041 align=1 (i32.const 0) (local.get 0x041)) + (i64.store offset=0x042 align=1 (i32.const 0) (local.get 0x042)) + (i64.store offset=0x043 align=1 (i32.const 0) (local.get 0x043)) + (i64.store offset=0x044 align=1 (i32.const 0) (local.get 0x044)) + (i64.store offset=0x045 align=1 (i32.const 0) (local.get 0x045)) + (i64.store offset=0x046 align=1 (i32.const 0) (local.get 0x046)) + (i64.store offset=0x047 align=1 (i32.const 0) (local.get 0x047)) + (i64.store offset=0x048 align=1 (i32.const 0) (local.get 0x048)) + (i64.store offset=0x049 align=1 (i32.const 0) (local.get 0x049)) + (i64.store offset=0x04a align=1 (i32.const 0) (local.get 0x04a)) + (i64.store offset=0x04b align=1 (i32.const 0) (local.get 0x04b)) + (i64.store offset=0x04c align=1 (i32.const 0) (local.get 0x04c)) + (i64.store offset=0x04d align=1 (i32.const 0) (local.get 0x04d)) + (i64.store offset=0x04e align=1 (i32.const 0) (local.get 0x04e)) + (i64.store offset=0x04f align=1 (i32.const 0) (local.get 0x04f)) + (i64.store offset=0x050 align=1 (i32.const 0) (local.get 0x050)) + (i64.store offset=0x051 align=1 (i32.const 0) (local.get 0x051)) + (i64.store offset=0x052 align=1 (i32.const 0) (local.get 0x052)) + (i64.store offset=0x053 align=1 (i32.const 0) (local.get 0x053)) + (i64.store offset=0x054 align=1 (i32.const 0) (local.get 0x054)) + (i64.store offset=0x055 align=1 (i32.const 0) (local.get 0x055)) + (i64.store offset=0x056 align=1 (i32.const 0) (local.get 0x056)) + (i64.store offset=0x057 align=1 (i32.const 0) (local.get 0x057)) + (i64.store offset=0x058 align=1 (i32.const 0) (local.get 0x058)) + (i64.store offset=0x059 align=1 (i32.const 0) (local.get 0x059)) + (i64.store offset=0x05a align=1 (i32.const 0) (local.get 0x05a)) + (i64.store offset=0x05b align=1 (i32.const 0) (local.get 0x05b)) + (i64.store offset=0x05c align=1 (i32.const 0) (local.get 0x05c)) + (i64.store offset=0x05d align=1 (i32.const 0) (local.get 0x05d)) + (i64.store offset=0x05e align=1 (i32.const 0) (local.get 0x05e)) + (i64.store offset=0x05f align=1 (i32.const 0) (local.get 0x05f)) + (i64.store offset=0x060 align=1 (i32.const 0) (local.get 0x060)) + (i64.store offset=0x061 align=1 (i32.const 0) (local.get 0x061)) + (i64.store offset=0x062 align=1 (i32.const 0) (local.get 0x062)) + (i64.store offset=0x063 align=1 (i32.const 0) (local.get 0x063)) + (i64.store offset=0x064 align=1 (i32.const 0) (local.get 0x064)) + (i64.store offset=0x065 align=1 (i32.const 0) (local.get 0x065)) + (i64.store offset=0x066 align=1 (i32.const 0) (local.get 0x066)) + (i64.store offset=0x067 align=1 (i32.const 0) (local.get 0x067)) + (i64.store offset=0x068 align=1 (i32.const 0) (local.get 0x068)) + (i64.store offset=0x069 align=1 (i32.const 0) (local.get 0x069)) + (i64.store offset=0x06a align=1 (i32.const 0) (local.get 0x06a)) + (i64.store offset=0x06b align=1 (i32.const 0) (local.get 0x06b)) + (i64.store offset=0x06c align=1 (i32.const 0) (local.get 0x06c)) + (i64.store offset=0x06d align=1 (i32.const 0) (local.get 0x06d)) + (i64.store offset=0x06e align=1 (i32.const 0) (local.get 0x06e)) + (i64.store offset=0x06f align=1 (i32.const 0) (local.get 0x06f)) + (i64.store offset=0x070 align=1 (i32.const 0) (local.get 0x070)) + (i64.store offset=0x071 align=1 (i32.const 0) (local.get 0x071)) + (i64.store offset=0x072 align=1 (i32.const 0) (local.get 0x072)) + (i64.store offset=0x073 align=1 (i32.const 0) (local.get 0x073)) + (i64.store offset=0x074 align=1 (i32.const 0) (local.get 0x074)) + (i64.store offset=0x075 align=1 (i32.const 0) (local.get 0x075)) + (i64.store offset=0x076 align=1 (i32.const 0) (local.get 0x076)) + (i64.store offset=0x077 align=1 (i32.const 0) (local.get 0x077)) + (i64.store offset=0x078 align=1 (i32.const 0) (local.get 0x078)) + (i64.store offset=0x079 align=1 (i32.const 0) (local.get 0x079)) + (i64.store offset=0x07a align=1 (i32.const 0) (local.get 0x07a)) + (i64.store offset=0x07b align=1 (i32.const 0) (local.get 0x07b)) + (i64.store offset=0x07c align=1 (i32.const 0) (local.get 0x07c)) + (i64.store offset=0x07d align=1 (i32.const 0) (local.get 0x07d)) + (i64.store offset=0x07e align=1 (i32.const 0) (local.get 0x07e)) + (i64.store offset=0x07f align=1 (i32.const 0) (local.get 0x07f)) + (i64.store offset=0x080 align=1 (i32.const 0) (local.get 0x080)) + (i64.store offset=0x081 align=1 (i32.const 0) (local.get 0x081)) + (i64.store offset=0x082 align=1 (i32.const 0) (local.get 0x082)) + (i64.store offset=0x083 align=1 (i32.const 0) (local.get 0x083)) + (i64.store offset=0x084 align=1 (i32.const 0) (local.get 0x084)) + (i64.store offset=0x085 align=1 (i32.const 0) (local.get 0x085)) + (i64.store offset=0x086 align=1 (i32.const 0) (local.get 0x086)) + (i64.store offset=0x087 align=1 (i32.const 0) (local.get 0x087)) + (i64.store offset=0x088 align=1 (i32.const 0) (local.get 0x088)) + (i64.store offset=0x089 align=1 (i32.const 0) (local.get 0x089)) + (i64.store offset=0x08a align=1 (i32.const 0) (local.get 0x08a)) + (i64.store offset=0x08b align=1 (i32.const 0) (local.get 0x08b)) + (i64.store offset=0x08c align=1 (i32.const 0) (local.get 0x08c)) + (i64.store offset=0x08d align=1 (i32.const 0) (local.get 0x08d)) + (i64.store offset=0x08e align=1 (i32.const 0) (local.get 0x08e)) + (i64.store offset=0x08f align=1 (i32.const 0) (local.get 0x08f)) + (i64.store offset=0x090 align=1 (i32.const 0) (local.get 0x090)) + (i64.store offset=0x091 align=1 (i32.const 0) (local.get 0x091)) + (i64.store offset=0x092 align=1 (i32.const 0) (local.get 0x092)) + (i64.store offset=0x093 align=1 (i32.const 0) (local.get 0x093)) + (i64.store offset=0x094 align=1 (i32.const 0) (local.get 0x094)) + (i64.store offset=0x095 align=1 (i32.const 0) (local.get 0x095)) + (i64.store offset=0x096 align=1 (i32.const 0) (local.get 0x096)) + (i64.store offset=0x097 align=1 (i32.const 0) (local.get 0x097)) + (i64.store offset=0x098 align=1 (i32.const 0) (local.get 0x098)) + (i64.store offset=0x099 align=1 (i32.const 0) (local.get 0x099)) + (i64.store offset=0x09a align=1 (i32.const 0) (local.get 0x09a)) + (i64.store offset=0x09b align=1 (i32.const 0) (local.get 0x09b)) + (i64.store offset=0x09c align=1 (i32.const 0) (local.get 0x09c)) + (i64.store offset=0x09d align=1 (i32.const 0) (local.get 0x09d)) + (i64.store offset=0x09e align=1 (i32.const 0) (local.get 0x09e)) + (i64.store offset=0x09f align=1 (i32.const 0) (local.get 0x09f)) + (i64.store offset=0x0a0 align=1 (i32.const 0) (local.get 0x0a0)) + (i64.store offset=0x0a1 align=1 (i32.const 0) (local.get 0x0a1)) + (i64.store offset=0x0a2 align=1 (i32.const 0) (local.get 0x0a2)) + (i64.store offset=0x0a3 align=1 (i32.const 0) (local.get 0x0a3)) + (i64.store offset=0x0a4 align=1 (i32.const 0) (local.get 0x0a4)) + (i64.store offset=0x0a5 align=1 (i32.const 0) (local.get 0x0a5)) + (i64.store offset=0x0a6 align=1 (i32.const 0) (local.get 0x0a6)) + (i64.store offset=0x0a7 align=1 (i32.const 0) (local.get 0x0a7)) + (i64.store offset=0x0a8 align=1 (i32.const 0) (local.get 0x0a8)) + (i64.store offset=0x0a9 align=1 (i32.const 0) (local.get 0x0a9)) + (i64.store offset=0x0aa align=1 (i32.const 0) (local.get 0x0aa)) + (i64.store offset=0x0ab align=1 (i32.const 0) (local.get 0x0ab)) + (i64.store offset=0x0ac align=1 (i32.const 0) (local.get 0x0ac)) + (i64.store offset=0x0ad align=1 (i32.const 0) (local.get 0x0ad)) + (i64.store offset=0x0ae align=1 (i32.const 0) (local.get 0x0ae)) + (i64.store offset=0x0af align=1 (i32.const 0) (local.get 0x0af)) + (i64.store offset=0x0b0 align=1 (i32.const 0) (local.get 0x0b0)) + (i64.store offset=0x0b1 align=1 (i32.const 0) (local.get 0x0b1)) + (i64.store offset=0x0b2 align=1 (i32.const 0) (local.get 0x0b2)) + (i64.store offset=0x0b3 align=1 (i32.const 0) (local.get 0x0b3)) + (i64.store offset=0x0b4 align=1 (i32.const 0) (local.get 0x0b4)) + (i64.store offset=0x0b5 align=1 (i32.const 0) (local.get 0x0b5)) + (i64.store offset=0x0b6 align=1 (i32.const 0) (local.get 0x0b6)) + (i64.store offset=0x0b7 align=1 (i32.const 0) (local.get 0x0b7)) + (i64.store offset=0x0b8 align=1 (i32.const 0) (local.get 0x0b8)) + (i64.store offset=0x0b9 align=1 (i32.const 0) (local.get 0x0b9)) + (i64.store offset=0x0ba align=1 (i32.const 0) (local.get 0x0ba)) + (i64.store offset=0x0bb align=1 (i32.const 0) (local.get 0x0bb)) + (i64.store offset=0x0bc align=1 (i32.const 0) (local.get 0x0bc)) + (i64.store offset=0x0bd align=1 (i32.const 0) (local.get 0x0bd)) + (i64.store offset=0x0be align=1 (i32.const 0) (local.get 0x0be)) + (i64.store offset=0x0bf align=1 (i32.const 0) (local.get 0x0bf)) + (i64.store offset=0x0c0 align=1 (i32.const 0) (local.get 0x0c0)) + (i64.store offset=0x0c1 align=1 (i32.const 0) (local.get 0x0c1)) + (i64.store offset=0x0c2 align=1 (i32.const 0) (local.get 0x0c2)) + (i64.store offset=0x0c3 align=1 (i32.const 0) (local.get 0x0c3)) + (i64.store offset=0x0c4 align=1 (i32.const 0) (local.get 0x0c4)) + (i64.store offset=0x0c5 align=1 (i32.const 0) (local.get 0x0c5)) + (i64.store offset=0x0c6 align=1 (i32.const 0) (local.get 0x0c6)) + (i64.store offset=0x0c7 align=1 (i32.const 0) (local.get 0x0c7)) + (i64.store offset=0x0c8 align=1 (i32.const 0) (local.get 0x0c8)) + (i64.store offset=0x0c9 align=1 (i32.const 0) (local.get 0x0c9)) + (i64.store offset=0x0ca align=1 (i32.const 0) (local.get 0x0ca)) + (i64.store offset=0x0cb align=1 (i32.const 0) (local.get 0x0cb)) + (i64.store offset=0x0cc align=1 (i32.const 0) (local.get 0x0cc)) + (i64.store offset=0x0cd align=1 (i32.const 0) (local.get 0x0cd)) + (i64.store offset=0x0ce align=1 (i32.const 0) (local.get 0x0ce)) + (i64.store offset=0x0cf align=1 (i32.const 0) (local.get 0x0cf)) + (i64.store offset=0x0d0 align=1 (i32.const 0) (local.get 0x0d0)) + (i64.store offset=0x0d1 align=1 (i32.const 0) (local.get 0x0d1)) + (i64.store offset=0x0d2 align=1 (i32.const 0) (local.get 0x0d2)) + (i64.store offset=0x0d3 align=1 (i32.const 0) (local.get 0x0d3)) + (i64.store offset=0x0d4 align=1 (i32.const 0) (local.get 0x0d4)) + (i64.store offset=0x0d5 align=1 (i32.const 0) (local.get 0x0d5)) + (i64.store offset=0x0d6 align=1 (i32.const 0) (local.get 0x0d6)) + (i64.store offset=0x0d7 align=1 (i32.const 0) (local.get 0x0d7)) + (i64.store offset=0x0d8 align=1 (i32.const 0) (local.get 0x0d8)) + (i64.store offset=0x0d9 align=1 (i32.const 0) (local.get 0x0d9)) + (i64.store offset=0x0da align=1 (i32.const 0) (local.get 0x0da)) + (i64.store offset=0x0db align=1 (i32.const 0) (local.get 0x0db)) + (i64.store offset=0x0dc align=1 (i32.const 0) (local.get 0x0dc)) + (i64.store offset=0x0dd align=1 (i32.const 0) (local.get 0x0dd)) + (i64.store offset=0x0de align=1 (i32.const 0) (local.get 0x0de)) + (i64.store offset=0x0df align=1 (i32.const 0) (local.get 0x0df)) + (i64.store offset=0x0e0 align=1 (i32.const 0) (local.get 0x0e0)) + (i64.store offset=0x0e1 align=1 (i32.const 0) (local.get 0x0e1)) + (i64.store offset=0x0e2 align=1 (i32.const 0) (local.get 0x0e2)) + (i64.store offset=0x0e3 align=1 (i32.const 0) (local.get 0x0e3)) + (i64.store offset=0x0e4 align=1 (i32.const 0) (local.get 0x0e4)) + (i64.store offset=0x0e5 align=1 (i32.const 0) (local.get 0x0e5)) + (i64.store offset=0x0e6 align=1 (i32.const 0) (local.get 0x0e6)) + (i64.store offset=0x0e7 align=1 (i32.const 0) (local.get 0x0e7)) + (i64.store offset=0x0e8 align=1 (i32.const 0) (local.get 0x0e8)) + (i64.store offset=0x0e9 align=1 (i32.const 0) (local.get 0x0e9)) + (i64.store offset=0x0ea align=1 (i32.const 0) (local.get 0x0ea)) + (i64.store offset=0x0eb align=1 (i32.const 0) (local.get 0x0eb)) + (i64.store offset=0x0ec align=1 (i32.const 0) (local.get 0x0ec)) + (i64.store offset=0x0ed align=1 (i32.const 0) (local.get 0x0ed)) + (i64.store offset=0x0ee align=1 (i32.const 0) (local.get 0x0ee)) + (i64.store offset=0x0ef align=1 (i32.const 0) (local.get 0x0ef)) + (i64.store offset=0x0f0 align=1 (i32.const 0) (local.get 0x0f0)) + (i64.store offset=0x0f1 align=1 (i32.const 0) (local.get 0x0f1)) + (i64.store offset=0x0f2 align=1 (i32.const 0) (local.get 0x0f2)) + (i64.store offset=0x0f3 align=1 (i32.const 0) (local.get 0x0f3)) + (i64.store offset=0x0f4 align=1 (i32.const 0) (local.get 0x0f4)) + (i64.store offset=0x0f5 align=1 (i32.const 0) (local.get 0x0f5)) + (i64.store offset=0x0f6 align=1 (i32.const 0) (local.get 0x0f6)) + (i64.store offset=0x0f7 align=1 (i32.const 0) (local.get 0x0f7)) + (i64.store offset=0x0f8 align=1 (i32.const 0) (local.get 0x0f8)) + (i64.store offset=0x0f9 align=1 (i32.const 0) (local.get 0x0f9)) + (i64.store offset=0x0fa align=1 (i32.const 0) (local.get 0x0fa)) + (i64.store offset=0x0fb align=1 (i32.const 0) (local.get 0x0fb)) + (i64.store offset=0x0fc align=1 (i32.const 0) (local.get 0x0fc)) + (i64.store offset=0x0fd align=1 (i32.const 0) (local.get 0x0fd)) + (i64.store offset=0x0fe align=1 (i32.const 0) (local.get 0x0fe)) + (i64.store offset=0x0ff align=1 (i32.const 0) (local.get 0x0ff)) + (i64.store offset=0x100 align=1 (i32.const 0) (local.get 0x100)) + (i64.store offset=0x101 align=1 (i32.const 0) (local.get 0x101)) + (i64.store offset=0x102 align=1 (i32.const 0) (local.get 0x102)) + (i64.store offset=0x103 align=1 (i32.const 0) (local.get 0x103)) + (i64.store offset=0x104 align=1 (i32.const 0) (local.get 0x104)) + (i64.store offset=0x105 align=1 (i32.const 0) (local.get 0x105)) + (i64.store offset=0x106 align=1 (i32.const 0) (local.get 0x106)) + (i64.store offset=0x107 align=1 (i32.const 0) (local.get 0x107)) + (i64.store offset=0x108 align=1 (i32.const 0) (local.get 0x108)) + (i64.store offset=0x109 align=1 (i32.const 0) (local.get 0x109)) + (i64.store offset=0x10a align=1 (i32.const 0) (local.get 0x10a)) + (i64.store offset=0x10b align=1 (i32.const 0) (local.get 0x10b)) + (i64.store offset=0x10c align=1 (i32.const 0) (local.get 0x10c)) + (i64.store offset=0x10d align=1 (i32.const 0) (local.get 0x10d)) + (i64.store offset=0x10e align=1 (i32.const 0) (local.get 0x10e)) + (i64.store offset=0x10f align=1 (i32.const 0) (local.get 0x10f)) + (i64.store offset=0x110 align=1 (i32.const 0) (local.get 0x110)) + (i64.store offset=0x111 align=1 (i32.const 0) (local.get 0x111)) + (i64.store offset=0x112 align=1 (i32.const 0) (local.get 0x112)) + (i64.store offset=0x113 align=1 (i32.const 0) (local.get 0x113)) + (i64.store offset=0x114 align=1 (i32.const 0) (local.get 0x114)) + (i64.store offset=0x115 align=1 (i32.const 0) (local.get 0x115)) + (i64.store offset=0x116 align=1 (i32.const 0) (local.get 0x116)) + (i64.store offset=0x117 align=1 (i32.const 0) (local.get 0x117)) + (i64.store offset=0x118 align=1 (i32.const 0) (local.get 0x118)) + (i64.store offset=0x119 align=1 (i32.const 0) (local.get 0x119)) + (i64.store offset=0x11a align=1 (i32.const 0) (local.get 0x11a)) + (i64.store offset=0x11b align=1 (i32.const 0) (local.get 0x11b)) + (i64.store offset=0x11c align=1 (i32.const 0) (local.get 0x11c)) + (i64.store offset=0x11d align=1 (i32.const 0) (local.get 0x11d)) + (i64.store offset=0x11e align=1 (i32.const 0) (local.get 0x11e)) + (i64.store offset=0x11f align=1 (i32.const 0) (local.get 0x11f)) + (i64.store offset=0x120 align=1 (i32.const 0) (local.get 0x120)) + (i64.store offset=0x121 align=1 (i32.const 0) (local.get 0x121)) + (i64.store offset=0x122 align=1 (i32.const 0) (local.get 0x122)) + (i64.store offset=0x123 align=1 (i32.const 0) (local.get 0x123)) + (i64.store offset=0x124 align=1 (i32.const 0) (local.get 0x124)) + (i64.store offset=0x125 align=1 (i32.const 0) (local.get 0x125)) + (i64.store offset=0x126 align=1 (i32.const 0) (local.get 0x126)) + (i64.store offset=0x127 align=1 (i32.const 0) (local.get 0x127)) + (i64.store offset=0x128 align=1 (i32.const 0) (local.get 0x128)) + (i64.store offset=0x129 align=1 (i32.const 0) (local.get 0x129)) + (i64.store offset=0x12a align=1 (i32.const 0) (local.get 0x12a)) + (i64.store offset=0x12b align=1 (i32.const 0) (local.get 0x12b)) + (i64.store offset=0x12c align=1 (i32.const 0) (local.get 0x12c)) + (i64.store offset=0x12d align=1 (i32.const 0) (local.get 0x12d)) + (i64.store offset=0x12e align=1 (i32.const 0) (local.get 0x12e)) + (i64.store offset=0x12f align=1 (i32.const 0) (local.get 0x12f)) + (i64.store offset=0x130 align=1 (i32.const 0) (local.get 0x130)) + (i64.store offset=0x131 align=1 (i32.const 0) (local.get 0x131)) + (i64.store offset=0x132 align=1 (i32.const 0) (local.get 0x132)) + (i64.store offset=0x133 align=1 (i32.const 0) (local.get 0x133)) + (i64.store offset=0x134 align=1 (i32.const 0) (local.get 0x134)) + (i64.store offset=0x135 align=1 (i32.const 0) (local.get 0x135)) + (i64.store offset=0x136 align=1 (i32.const 0) (local.get 0x136)) + (i64.store offset=0x137 align=1 (i32.const 0) (local.get 0x137)) + (i64.store offset=0x138 align=1 (i32.const 0) (local.get 0x138)) + (i64.store offset=0x139 align=1 (i32.const 0) (local.get 0x139)) + (i64.store offset=0x13a align=1 (i32.const 0) (local.get 0x13a)) + (i64.store offset=0x13b align=1 (i32.const 0) (local.get 0x13b)) + (i64.store offset=0x13c align=1 (i32.const 0) (local.get 0x13c)) + (i64.store offset=0x13d align=1 (i32.const 0) (local.get 0x13d)) + (i64.store offset=0x13e align=1 (i32.const 0) (local.get 0x13e)) + (i64.store offset=0x13f align=1 (i32.const 0) (local.get 0x13f)) + (i64.store offset=0x140 align=1 (i32.const 0) (local.get 0x140)) + (i64.store offset=0x141 align=1 (i32.const 0) (local.get 0x141)) + (i64.store offset=0x142 align=1 (i32.const 0) (local.get 0x142)) + (i64.store offset=0x143 align=1 (i32.const 0) (local.get 0x143)) + (i64.store offset=0x144 align=1 (i32.const 0) (local.get 0x144)) + (i64.store offset=0x145 align=1 (i32.const 0) (local.get 0x145)) + (i64.store offset=0x146 align=1 (i32.const 0) (local.get 0x146)) + (i64.store offset=0x147 align=1 (i32.const 0) (local.get 0x147)) + (i64.store offset=0x148 align=1 (i32.const 0) (local.get 0x148)) + (i64.store offset=0x149 align=1 (i32.const 0) (local.get 0x149)) + (i64.store offset=0x14a align=1 (i32.const 0) (local.get 0x14a)) + (i64.store offset=0x14b align=1 (i32.const 0) (local.get 0x14b)) + (i64.store offset=0x14c align=1 (i32.const 0) (local.get 0x14c)) + (i64.store offset=0x14d align=1 (i32.const 0) (local.get 0x14d)) + (i64.store offset=0x14e align=1 (i32.const 0) (local.get 0x14e)) + (i64.store offset=0x14f align=1 (i32.const 0) (local.get 0x14f)) + (i64.store offset=0x150 align=1 (i32.const 0) (local.get 0x150)) + (i64.store offset=0x151 align=1 (i32.const 0) (local.get 0x151)) + (i64.store offset=0x152 align=1 (i32.const 0) (local.get 0x152)) + (i64.store offset=0x153 align=1 (i32.const 0) (local.get 0x153)) + (i64.store offset=0x154 align=1 (i32.const 0) (local.get 0x154)) + (i64.store offset=0x155 align=1 (i32.const 0) (local.get 0x155)) + (i64.store offset=0x156 align=1 (i32.const 0) (local.get 0x156)) + (i64.store offset=0x157 align=1 (i32.const 0) (local.get 0x157)) + (i64.store offset=0x158 align=1 (i32.const 0) (local.get 0x158)) + (i64.store offset=0x159 align=1 (i32.const 0) (local.get 0x159)) + (i64.store offset=0x15a align=1 (i32.const 0) (local.get 0x15a)) + (i64.store offset=0x15b align=1 (i32.const 0) (local.get 0x15b)) + (i64.store offset=0x15c align=1 (i32.const 0) (local.get 0x15c)) + (i64.store offset=0x15d align=1 (i32.const 0) (local.get 0x15d)) + (i64.store offset=0x15e align=1 (i32.const 0) (local.get 0x15e)) + (i64.store offset=0x15f align=1 (i32.const 0) (local.get 0x15f)) + (i64.store offset=0x160 align=1 (i32.const 0) (local.get 0x160)) + (i64.store offset=0x161 align=1 (i32.const 0) (local.get 0x161)) + (i64.store offset=0x162 align=1 (i32.const 0) (local.get 0x162)) + (i64.store offset=0x163 align=1 (i32.const 0) (local.get 0x163)) + (i64.store offset=0x164 align=1 (i32.const 0) (local.get 0x164)) + (i64.store offset=0x165 align=1 (i32.const 0) (local.get 0x165)) + (i64.store offset=0x166 align=1 (i32.const 0) (local.get 0x166)) + (i64.store offset=0x167 align=1 (i32.const 0) (local.get 0x167)) + (i64.store offset=0x168 align=1 (i32.const 0) (local.get 0x168)) + (i64.store offset=0x169 align=1 (i32.const 0) (local.get 0x169)) + (i64.store offset=0x16a align=1 (i32.const 0) (local.get 0x16a)) + (i64.store offset=0x16b align=1 (i32.const 0) (local.get 0x16b)) + (i64.store offset=0x16c align=1 (i32.const 0) (local.get 0x16c)) + (i64.store offset=0x16d align=1 (i32.const 0) (local.get 0x16d)) + (i64.store offset=0x16e align=1 (i32.const 0) (local.get 0x16e)) + (i64.store offset=0x16f align=1 (i32.const 0) (local.get 0x16f)) + (i64.store offset=0x170 align=1 (i32.const 0) (local.get 0x170)) + (i64.store offset=0x171 align=1 (i32.const 0) (local.get 0x171)) + (i64.store offset=0x172 align=1 (i32.const 0) (local.get 0x172)) + (i64.store offset=0x173 align=1 (i32.const 0) (local.get 0x173)) + (i64.store offset=0x174 align=1 (i32.const 0) (local.get 0x174)) + (i64.store offset=0x175 align=1 (i32.const 0) (local.get 0x175)) + (i64.store offset=0x176 align=1 (i32.const 0) (local.get 0x176)) + (i64.store offset=0x177 align=1 (i32.const 0) (local.get 0x177)) + (i64.store offset=0x178 align=1 (i32.const 0) (local.get 0x178)) + (i64.store offset=0x179 align=1 (i32.const 0) (local.get 0x179)) + (i64.store offset=0x17a align=1 (i32.const 0) (local.get 0x17a)) + (i64.store offset=0x17b align=1 (i32.const 0) (local.get 0x17b)) + (i64.store offset=0x17c align=1 (i32.const 0) (local.get 0x17c)) + (i64.store offset=0x17d align=1 (i32.const 0) (local.get 0x17d)) + (i64.store offset=0x17e align=1 (i32.const 0) (local.get 0x17e)) + (i64.store offset=0x17f align=1 (i32.const 0) (local.get 0x17f)) + (i64.store offset=0x180 align=1 (i32.const 0) (local.get 0x180)) + (i64.store offset=0x181 align=1 (i32.const 0) (local.get 0x181)) + (i64.store offset=0x182 align=1 (i32.const 0) (local.get 0x182)) + (i64.store offset=0x183 align=1 (i32.const 0) (local.get 0x183)) + (i64.store offset=0x184 align=1 (i32.const 0) (local.get 0x184)) + (i64.store offset=0x185 align=1 (i32.const 0) (local.get 0x185)) + (i64.store offset=0x186 align=1 (i32.const 0) (local.get 0x186)) + (i64.store offset=0x187 align=1 (i32.const 0) (local.get 0x187)) + (i64.store offset=0x188 align=1 (i32.const 0) (local.get 0x188)) + (i64.store offset=0x189 align=1 (i32.const 0) (local.get 0x189)) + (i64.store offset=0x18a align=1 (i32.const 0) (local.get 0x18a)) + (i64.store offset=0x18b align=1 (i32.const 0) (local.get 0x18b)) + (i64.store offset=0x18c align=1 (i32.const 0) (local.get 0x18c)) + (i64.store offset=0x18d align=1 (i32.const 0) (local.get 0x18d)) + (i64.store offset=0x18e align=1 (i32.const 0) (local.get 0x18e)) + (i64.store offset=0x18f align=1 (i32.const 0) (local.get 0x18f)) + (i64.store offset=0x190 align=1 (i32.const 0) (local.get 0x190)) + (i64.store offset=0x191 align=1 (i32.const 0) (local.get 0x191)) + (i64.store offset=0x192 align=1 (i32.const 0) (local.get 0x192)) + (i64.store offset=0x193 align=1 (i32.const 0) (local.get 0x193)) + (i64.store offset=0x194 align=1 (i32.const 0) (local.get 0x194)) + (i64.store offset=0x195 align=1 (i32.const 0) (local.get 0x195)) + (i64.store offset=0x196 align=1 (i32.const 0) (local.get 0x196)) + (i64.store offset=0x197 align=1 (i32.const 0) (local.get 0x197)) + (i64.store offset=0x198 align=1 (i32.const 0) (local.get 0x198)) + (i64.store offset=0x199 align=1 (i32.const 0) (local.get 0x199)) + (i64.store offset=0x19a align=1 (i32.const 0) (local.get 0x19a)) + (i64.store offset=0x19b align=1 (i32.const 0) (local.get 0x19b)) + (i64.store offset=0x19c align=1 (i32.const 0) (local.get 0x19c)) + (i64.store offset=0x19d align=1 (i32.const 0) (local.get 0x19d)) + (i64.store offset=0x19e align=1 (i32.const 0) (local.get 0x19e)) + (i64.store offset=0x19f align=1 (i32.const 0) (local.get 0x19f)) + (i64.store offset=0x1a0 align=1 (i32.const 0) (local.get 0x1a0)) + (i64.store offset=0x1a1 align=1 (i32.const 0) (local.get 0x1a1)) + (i64.store offset=0x1a2 align=1 (i32.const 0) (local.get 0x1a2)) + (i64.store offset=0x1a3 align=1 (i32.const 0) (local.get 0x1a3)) + (i64.store offset=0x1a4 align=1 (i32.const 0) (local.get 0x1a4)) + (i64.store offset=0x1a5 align=1 (i32.const 0) (local.get 0x1a5)) + (i64.store offset=0x1a6 align=1 (i32.const 0) (local.get 0x1a6)) + (i64.store offset=0x1a7 align=1 (i32.const 0) (local.get 0x1a7)) + (i64.store offset=0x1a8 align=1 (i32.const 0) (local.get 0x1a8)) + (i64.store offset=0x1a9 align=1 (i32.const 0) (local.get 0x1a9)) + (i64.store offset=0x1aa align=1 (i32.const 0) (local.get 0x1aa)) + (i64.store offset=0x1ab align=1 (i32.const 0) (local.get 0x1ab)) + (i64.store offset=0x1ac align=1 (i32.const 0) (local.get 0x1ac)) + (i64.store offset=0x1ad align=1 (i32.const 0) (local.get 0x1ad)) + (i64.store offset=0x1ae align=1 (i32.const 0) (local.get 0x1ae)) + (i64.store offset=0x1af align=1 (i32.const 0) (local.get 0x1af)) + (i64.store offset=0x1b0 align=1 (i32.const 0) (local.get 0x1b0)) + (i64.store offset=0x1b1 align=1 (i32.const 0) (local.get 0x1b1)) + (i64.store offset=0x1b2 align=1 (i32.const 0) (local.get 0x1b2)) + (i64.store offset=0x1b3 align=1 (i32.const 0) (local.get 0x1b3)) + (i64.store offset=0x1b4 align=1 (i32.const 0) (local.get 0x1b4)) + (i64.store offset=0x1b5 align=1 (i32.const 0) (local.get 0x1b5)) + (i64.store offset=0x1b6 align=1 (i32.const 0) (local.get 0x1b6)) + (i64.store offset=0x1b7 align=1 (i32.const 0) (local.get 0x1b7)) + (i64.store offset=0x1b8 align=1 (i32.const 0) (local.get 0x1b8)) + (i64.store offset=0x1b9 align=1 (i32.const 0) (local.get 0x1b9)) + (i64.store offset=0x1ba align=1 (i32.const 0) (local.get 0x1ba)) + (i64.store offset=0x1bb align=1 (i32.const 0) (local.get 0x1bb)) + (i64.store offset=0x1bc align=1 (i32.const 0) (local.get 0x1bc)) + (i64.store offset=0x1bd align=1 (i32.const 0) (local.get 0x1bd)) + (i64.store offset=0x1be align=1 (i32.const 0) (local.get 0x1be)) + (i64.store offset=0x1bf align=1 (i32.const 0) (local.get 0x1bf)) + (i64.store offset=0x1c0 align=1 (i32.const 0) (local.get 0x1c0)) + (i64.store offset=0x1c1 align=1 (i32.const 0) (local.get 0x1c1)) + (i64.store offset=0x1c2 align=1 (i32.const 0) (local.get 0x1c2)) + (i64.store offset=0x1c3 align=1 (i32.const 0) (local.get 0x1c3)) + (i64.store offset=0x1c4 align=1 (i32.const 0) (local.get 0x1c4)) + (i64.store offset=0x1c5 align=1 (i32.const 0) (local.get 0x1c5)) + (i64.store offset=0x1c6 align=1 (i32.const 0) (local.get 0x1c6)) + (i64.store offset=0x1c7 align=1 (i32.const 0) (local.get 0x1c7)) + (i64.store offset=0x1c8 align=1 (i32.const 0) (local.get 0x1c8)) + (i64.store offset=0x1c9 align=1 (i32.const 0) (local.get 0x1c9)) + (i64.store offset=0x1ca align=1 (i32.const 0) (local.get 0x1ca)) + (i64.store offset=0x1cb align=1 (i32.const 0) (local.get 0x1cb)) + (i64.store offset=0x1cc align=1 (i32.const 0) (local.get 0x1cc)) + (i64.store offset=0x1cd align=1 (i32.const 0) (local.get 0x1cd)) + (i64.store offset=0x1ce align=1 (i32.const 0) (local.get 0x1ce)) + (i64.store offset=0x1cf align=1 (i32.const 0) (local.get 0x1cf)) + (i64.store offset=0x1d0 align=1 (i32.const 0) (local.get 0x1d0)) + (i64.store offset=0x1d1 align=1 (i32.const 0) (local.get 0x1d1)) + (i64.store offset=0x1d2 align=1 (i32.const 0) (local.get 0x1d2)) + (i64.store offset=0x1d3 align=1 (i32.const 0) (local.get 0x1d3)) + (i64.store offset=0x1d4 align=1 (i32.const 0) (local.get 0x1d4)) + (i64.store offset=0x1d5 align=1 (i32.const 0) (local.get 0x1d5)) + (i64.store offset=0x1d6 align=1 (i32.const 0) (local.get 0x1d6)) + (i64.store offset=0x1d7 align=1 (i32.const 0) (local.get 0x1d7)) + (i64.store offset=0x1d8 align=1 (i32.const 0) (local.get 0x1d8)) + (i64.store offset=0x1d9 align=1 (i32.const 0) (local.get 0x1d9)) + (i64.store offset=0x1da align=1 (i32.const 0) (local.get 0x1da)) + (i64.store offset=0x1db align=1 (i32.const 0) (local.get 0x1db)) + (i64.store offset=0x1dc align=1 (i32.const 0) (local.get 0x1dc)) + (i64.store offset=0x1dd align=1 (i32.const 0) (local.get 0x1dd)) + (i64.store offset=0x1de align=1 (i32.const 0) (local.get 0x1de)) + (i64.store offset=0x1df align=1 (i32.const 0) (local.get 0x1df)) + (i64.store offset=0x1e0 align=1 (i32.const 0) (local.get 0x1e0)) + (i64.store offset=0x1e1 align=1 (i32.const 0) (local.get 0x1e1)) + (i64.store offset=0x1e2 align=1 (i32.const 0) (local.get 0x1e2)) + (i64.store offset=0x1e3 align=1 (i32.const 0) (local.get 0x1e3)) + (i64.store offset=0x1e4 align=1 (i32.const 0) (local.get 0x1e4)) + (i64.store offset=0x1e5 align=1 (i32.const 0) (local.get 0x1e5)) + (i64.store offset=0x1e6 align=1 (i32.const 0) (local.get 0x1e6)) + (i64.store offset=0x1e7 align=1 (i32.const 0) (local.get 0x1e7)) + (i64.store offset=0x1e8 align=1 (i32.const 0) (local.get 0x1e8)) + (i64.store offset=0x1e9 align=1 (i32.const 0) (local.get 0x1e9)) + (i64.store offset=0x1ea align=1 (i32.const 0) (local.get 0x1ea)) + (i64.store offset=0x1eb align=1 (i32.const 0) (local.get 0x1eb)) + (i64.store offset=0x1ec align=1 (i32.const 0) (local.get 0x1ec)) + (i64.store offset=0x1ed align=1 (i32.const 0) (local.get 0x1ed)) + (i64.store offset=0x1ee align=1 (i32.const 0) (local.get 0x1ee)) + (i64.store offset=0x1ef align=1 (i32.const 0) (local.get 0x1ef)) + (i64.store offset=0x1f0 align=1 (i32.const 0) (local.get 0x1f0)) + (i64.store offset=0x1f1 align=1 (i32.const 0) (local.get 0x1f1)) + (i64.store offset=0x1f2 align=1 (i32.const 0) (local.get 0x1f2)) + (i64.store offset=0x1f3 align=1 (i32.const 0) (local.get 0x1f3)) + (i64.store offset=0x1f4 align=1 (i32.const 0) (local.get 0x1f4)) + (i64.store offset=0x1f5 align=1 (i32.const 0) (local.get 0x1f5)) + (i64.store offset=0x1f6 align=1 (i32.const 0) (local.get 0x1f6)) + (i64.store offset=0x1f7 align=1 (i32.const 0) (local.get 0x1f7)) + (i64.store offset=0x1f8 align=1 (i32.const 0) (local.get 0x1f8)) + (i64.store offset=0x1f9 align=1 (i32.const 0) (local.get 0x1f9)) + (i64.store offset=0x1fa align=1 (i32.const 0) (local.get 0x1fa)) + (i64.store offset=0x1fb align=1 (i32.const 0) (local.get 0x1fb)) + (i64.store offset=0x1fc align=1 (i32.const 0) (local.get 0x1fc)) + (i64.store offset=0x1fd align=1 (i32.const 0) (local.get 0x1fd)) + (i64.store offset=0x1fe align=1 (i32.const 0) (local.get 0x1fe)) + (i64.store offset=0x1ff align=1 (i32.const 0) (local.get 0x1ff)) + (i64.store offset=0x200 align=1 (i32.const 0) (local.get 0x200)) + (i64.store offset=0x201 align=1 (i32.const 0) (local.get 0x201)) + (i64.store offset=0x202 align=1 (i32.const 0) (local.get 0x202)) + (i64.store offset=0x203 align=1 (i32.const 0) (local.get 0x203)) + (i64.store offset=0x204 align=1 (i32.const 0) (local.get 0x204)) + (i64.store offset=0x205 align=1 (i32.const 0) (local.get 0x205)) + (i64.store offset=0x206 align=1 (i32.const 0) (local.get 0x206)) + (i64.store offset=0x207 align=1 (i32.const 0) (local.get 0x207)) + (i64.store offset=0x208 align=1 (i32.const 0) (local.get 0x208)) + (i64.store offset=0x209 align=1 (i32.const 0) (local.get 0x209)) + (i64.store offset=0x20a align=1 (i32.const 0) (local.get 0x20a)) + (i64.store offset=0x20b align=1 (i32.const 0) (local.get 0x20b)) + (i64.store offset=0x20c align=1 (i32.const 0) (local.get 0x20c)) + (i64.store offset=0x20d align=1 (i32.const 0) (local.get 0x20d)) + (i64.store offset=0x20e align=1 (i32.const 0) (local.get 0x20e)) + (i64.store offset=0x20f align=1 (i32.const 0) (local.get 0x20f)) + (i64.store offset=0x210 align=1 (i32.const 0) (local.get 0x210)) + (i64.store offset=0x211 align=1 (i32.const 0) (local.get 0x211)) + (i64.store offset=0x212 align=1 (i32.const 0) (local.get 0x212)) + (i64.store offset=0x213 align=1 (i32.const 0) (local.get 0x213)) + (i64.store offset=0x214 align=1 (i32.const 0) (local.get 0x214)) + (i64.store offset=0x215 align=1 (i32.const 0) (local.get 0x215)) + (i64.store offset=0x216 align=1 (i32.const 0) (local.get 0x216)) + (i64.store offset=0x217 align=1 (i32.const 0) (local.get 0x217)) + (i64.store offset=0x218 align=1 (i32.const 0) (local.get 0x218)) + (i64.store offset=0x219 align=1 (i32.const 0) (local.get 0x219)) + (i64.store offset=0x21a align=1 (i32.const 0) (local.get 0x21a)) + (i64.store offset=0x21b align=1 (i32.const 0) (local.get 0x21b)) + (i64.store offset=0x21c align=1 (i32.const 0) (local.get 0x21c)) + (i64.store offset=0x21d align=1 (i32.const 0) (local.get 0x21d)) + (i64.store offset=0x21e align=1 (i32.const 0) (local.get 0x21e)) + (i64.store offset=0x21f align=1 (i32.const 0) (local.get 0x21f)) + (i64.store offset=0x220 align=1 (i32.const 0) (local.get 0x220)) + (i64.store offset=0x221 align=1 (i32.const 0) (local.get 0x221)) + (i64.store offset=0x222 align=1 (i32.const 0) (local.get 0x222)) + (i64.store offset=0x223 align=1 (i32.const 0) (local.get 0x223)) + (i64.store offset=0x224 align=1 (i32.const 0) (local.get 0x224)) + (i64.store offset=0x225 align=1 (i32.const 0) (local.get 0x225)) + (i64.store offset=0x226 align=1 (i32.const 0) (local.get 0x226)) + (i64.store offset=0x227 align=1 (i32.const 0) (local.get 0x227)) + (i64.store offset=0x228 align=1 (i32.const 0) (local.get 0x228)) + (i64.store offset=0x229 align=1 (i32.const 0) (local.get 0x229)) + (i64.store offset=0x22a align=1 (i32.const 0) (local.get 0x22a)) + (i64.store offset=0x22b align=1 (i32.const 0) (local.get 0x22b)) + (i64.store offset=0x22c align=1 (i32.const 0) (local.get 0x22c)) + (i64.store offset=0x22d align=1 (i32.const 0) (local.get 0x22d)) + (i64.store offset=0x22e align=1 (i32.const 0) (local.get 0x22e)) + (i64.store offset=0x22f align=1 (i32.const 0) (local.get 0x22f)) + (i64.store offset=0x230 align=1 (i32.const 0) (local.get 0x230)) + (i64.store offset=0x231 align=1 (i32.const 0) (local.get 0x231)) + (i64.store offset=0x232 align=1 (i32.const 0) (local.get 0x232)) + (i64.store offset=0x233 align=1 (i32.const 0) (local.get 0x233)) + (i64.store offset=0x234 align=1 (i32.const 0) (local.get 0x234)) + (i64.store offset=0x235 align=1 (i32.const 0) (local.get 0x235)) + (i64.store offset=0x236 align=1 (i32.const 0) (local.get 0x236)) + (i64.store offset=0x237 align=1 (i32.const 0) (local.get 0x237)) + (i64.store offset=0x238 align=1 (i32.const 0) (local.get 0x238)) + (i64.store offset=0x239 align=1 (i32.const 0) (local.get 0x239)) + (i64.store offset=0x23a align=1 (i32.const 0) (local.get 0x23a)) + (i64.store offset=0x23b align=1 (i32.const 0) (local.get 0x23b)) + (i64.store offset=0x23c align=1 (i32.const 0) (local.get 0x23c)) + (i64.store offset=0x23d align=1 (i32.const 0) (local.get 0x23d)) + (i64.store offset=0x23e align=1 (i32.const 0) (local.get 0x23e)) + (i64.store offset=0x23f align=1 (i32.const 0) (local.get 0x23f)) + (i64.store offset=0x240 align=1 (i32.const 0) (local.get 0x240)) + (i64.store offset=0x241 align=1 (i32.const 0) (local.get 0x241)) + (i64.store offset=0x242 align=1 (i32.const 0) (local.get 0x242)) + (i64.store offset=0x243 align=1 (i32.const 0) (local.get 0x243)) + (i64.store offset=0x244 align=1 (i32.const 0) (local.get 0x244)) + (i64.store offset=0x245 align=1 (i32.const 0) (local.get 0x245)) + (i64.store offset=0x246 align=1 (i32.const 0) (local.get 0x246)) + (i64.store offset=0x247 align=1 (i32.const 0) (local.get 0x247)) + (i64.store offset=0x248 align=1 (i32.const 0) (local.get 0x248)) + (i64.store offset=0x249 align=1 (i32.const 0) (local.get 0x249)) + (i64.store offset=0x24a align=1 (i32.const 0) (local.get 0x24a)) + (i64.store offset=0x24b align=1 (i32.const 0) (local.get 0x24b)) + (i64.store offset=0x24c align=1 (i32.const 0) (local.get 0x24c)) + (i64.store offset=0x24d align=1 (i32.const 0) (local.get 0x24d)) + (i64.store offset=0x24e align=1 (i32.const 0) (local.get 0x24e)) + (i64.store offset=0x24f align=1 (i32.const 0) (local.get 0x24f)) + (i64.store offset=0x250 align=1 (i32.const 0) (local.get 0x250)) + (i64.store offset=0x251 align=1 (i32.const 0) (local.get 0x251)) + (i64.store offset=0x252 align=1 (i32.const 0) (local.get 0x252)) + (i64.store offset=0x253 align=1 (i32.const 0) (local.get 0x253)) + (i64.store offset=0x254 align=1 (i32.const 0) (local.get 0x254)) + (i64.store offset=0x255 align=1 (i32.const 0) (local.get 0x255)) + (i64.store offset=0x256 align=1 (i32.const 0) (local.get 0x256)) + (i64.store offset=0x257 align=1 (i32.const 0) (local.get 0x257)) + (i64.store offset=0x258 align=1 (i32.const 0) (local.get 0x258)) + (i64.store offset=0x259 align=1 (i32.const 0) (local.get 0x259)) + (i64.store offset=0x25a align=1 (i32.const 0) (local.get 0x25a)) + (i64.store offset=0x25b align=1 (i32.const 0) (local.get 0x25b)) + (i64.store offset=0x25c align=1 (i32.const 0) (local.get 0x25c)) + (i64.store offset=0x25d align=1 (i32.const 0) (local.get 0x25d)) + (i64.store offset=0x25e align=1 (i32.const 0) (local.get 0x25e)) + (i64.store offset=0x25f align=1 (i32.const 0) (local.get 0x25f)) + (i64.store offset=0x260 align=1 (i32.const 0) (local.get 0x260)) + (i64.store offset=0x261 align=1 (i32.const 0) (local.get 0x261)) + (i64.store offset=0x262 align=1 (i32.const 0) (local.get 0x262)) + (i64.store offset=0x263 align=1 (i32.const 0) (local.get 0x263)) + (i64.store offset=0x264 align=1 (i32.const 0) (local.get 0x264)) + (i64.store offset=0x265 align=1 (i32.const 0) (local.get 0x265)) + (i64.store offset=0x266 align=1 (i32.const 0) (local.get 0x266)) + (i64.store offset=0x267 align=1 (i32.const 0) (local.get 0x267)) + (i64.store offset=0x268 align=1 (i32.const 0) (local.get 0x268)) + (i64.store offset=0x269 align=1 (i32.const 0) (local.get 0x269)) + (i64.store offset=0x26a align=1 (i32.const 0) (local.get 0x26a)) + (i64.store offset=0x26b align=1 (i32.const 0) (local.get 0x26b)) + (i64.store offset=0x26c align=1 (i32.const 0) (local.get 0x26c)) + (i64.store offset=0x26d align=1 (i32.const 0) (local.get 0x26d)) + (i64.store offset=0x26e align=1 (i32.const 0) (local.get 0x26e)) + (i64.store offset=0x26f align=1 (i32.const 0) (local.get 0x26f)) + (i64.store offset=0x270 align=1 (i32.const 0) (local.get 0x270)) + (i64.store offset=0x271 align=1 (i32.const 0) (local.get 0x271)) + (i64.store offset=0x272 align=1 (i32.const 0) (local.get 0x272)) + (i64.store offset=0x273 align=1 (i32.const 0) (local.get 0x273)) + (i64.store offset=0x274 align=1 (i32.const 0) (local.get 0x274)) + (i64.store offset=0x275 align=1 (i32.const 0) (local.get 0x275)) + (i64.store offset=0x276 align=1 (i32.const 0) (local.get 0x276)) + (i64.store offset=0x277 align=1 (i32.const 0) (local.get 0x277)) + (i64.store offset=0x278 align=1 (i32.const 0) (local.get 0x278)) + (i64.store offset=0x279 align=1 (i32.const 0) (local.get 0x279)) + (i64.store offset=0x27a align=1 (i32.const 0) (local.get 0x27a)) + (i64.store offset=0x27b align=1 (i32.const 0) (local.get 0x27b)) + (i64.store offset=0x27c align=1 (i32.const 0) (local.get 0x27c)) + (i64.store offset=0x27d align=1 (i32.const 0) (local.get 0x27d)) + (i64.store offset=0x27e align=1 (i32.const 0) (local.get 0x27e)) + (i64.store offset=0x27f align=1 (i32.const 0) (local.get 0x27f)) + (i64.store offset=0x280 align=1 (i32.const 0) (local.get 0x280)) + (i64.store offset=0x281 align=1 (i32.const 0) (local.get 0x281)) + (i64.store offset=0x282 align=1 (i32.const 0) (local.get 0x282)) + (i64.store offset=0x283 align=1 (i32.const 0) (local.get 0x283)) + (i64.store offset=0x284 align=1 (i32.const 0) (local.get 0x284)) + (i64.store offset=0x285 align=1 (i32.const 0) (local.get 0x285)) + (i64.store offset=0x286 align=1 (i32.const 0) (local.get 0x286)) + (i64.store offset=0x287 align=1 (i32.const 0) (local.get 0x287)) + (i64.store offset=0x288 align=1 (i32.const 0) (local.get 0x288)) + (i64.store offset=0x289 align=1 (i32.const 0) (local.get 0x289)) + (i64.store offset=0x28a align=1 (i32.const 0) (local.get 0x28a)) + (i64.store offset=0x28b align=1 (i32.const 0) (local.get 0x28b)) + (i64.store offset=0x28c align=1 (i32.const 0) (local.get 0x28c)) + (i64.store offset=0x28d align=1 (i32.const 0) (local.get 0x28d)) + (i64.store offset=0x28e align=1 (i32.const 0) (local.get 0x28e)) + (i64.store offset=0x28f align=1 (i32.const 0) (local.get 0x28f)) + (i64.store offset=0x290 align=1 (i32.const 0) (local.get 0x290)) + (i64.store offset=0x291 align=1 (i32.const 0) (local.get 0x291)) + (i64.store offset=0x292 align=1 (i32.const 0) (local.get 0x292)) + (i64.store offset=0x293 align=1 (i32.const 0) (local.get 0x293)) + (i64.store offset=0x294 align=1 (i32.const 0) (local.get 0x294)) + (i64.store offset=0x295 align=1 (i32.const 0) (local.get 0x295)) + (i64.store offset=0x296 align=1 (i32.const 0) (local.get 0x296)) + (i64.store offset=0x297 align=1 (i32.const 0) (local.get 0x297)) + (i64.store offset=0x298 align=1 (i32.const 0) (local.get 0x298)) + (i64.store offset=0x299 align=1 (i32.const 0) (local.get 0x299)) + (i64.store offset=0x29a align=1 (i32.const 0) (local.get 0x29a)) + (i64.store offset=0x29b align=1 (i32.const 0) (local.get 0x29b)) + (i64.store offset=0x29c align=1 (i32.const 0) (local.get 0x29c)) + (i64.store offset=0x29d align=1 (i32.const 0) (local.get 0x29d)) + (i64.store offset=0x29e align=1 (i32.const 0) (local.get 0x29e)) + (i64.store offset=0x29f align=1 (i32.const 0) (local.get 0x29f)) + (i64.store offset=0x2a0 align=1 (i32.const 0) (local.get 0x2a0)) + (i64.store offset=0x2a1 align=1 (i32.const 0) (local.get 0x2a1)) + (i64.store offset=0x2a2 align=1 (i32.const 0) (local.get 0x2a2)) + (i64.store offset=0x2a3 align=1 (i32.const 0) (local.get 0x2a3)) + (i64.store offset=0x2a4 align=1 (i32.const 0) (local.get 0x2a4)) + (i64.store offset=0x2a5 align=1 (i32.const 0) (local.get 0x2a5)) + (i64.store offset=0x2a6 align=1 (i32.const 0) (local.get 0x2a6)) + (i64.store offset=0x2a7 align=1 (i32.const 0) (local.get 0x2a7)) + (i64.store offset=0x2a8 align=1 (i32.const 0) (local.get 0x2a8)) + (i64.store offset=0x2a9 align=1 (i32.const 0) (local.get 0x2a9)) + (i64.store offset=0x2aa align=1 (i32.const 0) (local.get 0x2aa)) + (i64.store offset=0x2ab align=1 (i32.const 0) (local.get 0x2ab)) + (i64.store offset=0x2ac align=1 (i32.const 0) (local.get 0x2ac)) + (i64.store offset=0x2ad align=1 (i32.const 0) (local.get 0x2ad)) + (i64.store offset=0x2ae align=1 (i32.const 0) (local.get 0x2ae)) + (i64.store offset=0x2af align=1 (i32.const 0) (local.get 0x2af)) + (i64.store offset=0x2b0 align=1 (i32.const 0) (local.get 0x2b0)) + (i64.store offset=0x2b1 align=1 (i32.const 0) (local.get 0x2b1)) + (i64.store offset=0x2b2 align=1 (i32.const 0) (local.get 0x2b2)) + (i64.store offset=0x2b3 align=1 (i32.const 0) (local.get 0x2b3)) + (i64.store offset=0x2b4 align=1 (i32.const 0) (local.get 0x2b4)) + (i64.store offset=0x2b5 align=1 (i32.const 0) (local.get 0x2b5)) + (i64.store offset=0x2b6 align=1 (i32.const 0) (local.get 0x2b6)) + (i64.store offset=0x2b7 align=1 (i32.const 0) (local.get 0x2b7)) + (i64.store offset=0x2b8 align=1 (i32.const 0) (local.get 0x2b8)) + (i64.store offset=0x2b9 align=1 (i32.const 0) (local.get 0x2b9)) + (i64.store offset=0x2ba align=1 (i32.const 0) (local.get 0x2ba)) + (i64.store offset=0x2bb align=1 (i32.const 0) (local.get 0x2bb)) + (i64.store offset=0x2bc align=1 (i32.const 0) (local.get 0x2bc)) + (i64.store offset=0x2bd align=1 (i32.const 0) (local.get 0x2bd)) + (i64.store offset=0x2be align=1 (i32.const 0) (local.get 0x2be)) + (i64.store offset=0x2bf align=1 (i32.const 0) (local.get 0x2bf)) + (i64.store offset=0x2c0 align=1 (i32.const 0) (local.get 0x2c0)) + (i64.store offset=0x2c1 align=1 (i32.const 0) (local.get 0x2c1)) + (i64.store offset=0x2c2 align=1 (i32.const 0) (local.get 0x2c2)) + (i64.store offset=0x2c3 align=1 (i32.const 0) (local.get 0x2c3)) + (i64.store offset=0x2c4 align=1 (i32.const 0) (local.get 0x2c4)) + (i64.store offset=0x2c5 align=1 (i32.const 0) (local.get 0x2c5)) + (i64.store offset=0x2c6 align=1 (i32.const 0) (local.get 0x2c6)) + (i64.store offset=0x2c7 align=1 (i32.const 0) (local.get 0x2c7)) + (i64.store offset=0x2c8 align=1 (i32.const 0) (local.get 0x2c8)) + (i64.store offset=0x2c9 align=1 (i32.const 0) (local.get 0x2c9)) + (i64.store offset=0x2ca align=1 (i32.const 0) (local.get 0x2ca)) + (i64.store offset=0x2cb align=1 (i32.const 0) (local.get 0x2cb)) + (i64.store offset=0x2cc align=1 (i32.const 0) (local.get 0x2cc)) + (i64.store offset=0x2cd align=1 (i32.const 0) (local.get 0x2cd)) + (i64.store offset=0x2ce align=1 (i32.const 0) (local.get 0x2ce)) + (i64.store offset=0x2cf align=1 (i32.const 0) (local.get 0x2cf)) + (i64.store offset=0x2d0 align=1 (i32.const 0) (local.get 0x2d0)) + (i64.store offset=0x2d1 align=1 (i32.const 0) (local.get 0x2d1)) + (i64.store offset=0x2d2 align=1 (i32.const 0) (local.get 0x2d2)) + (i64.store offset=0x2d3 align=1 (i32.const 0) (local.get 0x2d3)) + (i64.store offset=0x2d4 align=1 (i32.const 0) (local.get 0x2d4)) + (i64.store offset=0x2d5 align=1 (i32.const 0) (local.get 0x2d5)) + (i64.store offset=0x2d6 align=1 (i32.const 0) (local.get 0x2d6)) + (i64.store offset=0x2d7 align=1 (i32.const 0) (local.get 0x2d7)) + (i64.store offset=0x2d8 align=1 (i32.const 0) (local.get 0x2d8)) + (i64.store offset=0x2d9 align=1 (i32.const 0) (local.get 0x2d9)) + (i64.store offset=0x2da align=1 (i32.const 0) (local.get 0x2da)) + (i64.store offset=0x2db align=1 (i32.const 0) (local.get 0x2db)) + (i64.store offset=0x2dc align=1 (i32.const 0) (local.get 0x2dc)) + (i64.store offset=0x2dd align=1 (i32.const 0) (local.get 0x2dd)) + (i64.store offset=0x2de align=1 (i32.const 0) (local.get 0x2de)) + (i64.store offset=0x2df align=1 (i32.const 0) (local.get 0x2df)) + (i64.store offset=0x2e0 align=1 (i32.const 0) (local.get 0x2e0)) + (i64.store offset=0x2e1 align=1 (i32.const 0) (local.get 0x2e1)) + (i64.store offset=0x2e2 align=1 (i32.const 0) (local.get 0x2e2)) + (i64.store offset=0x2e3 align=1 (i32.const 0) (local.get 0x2e3)) + (i64.store offset=0x2e4 align=1 (i32.const 0) (local.get 0x2e4)) + (i64.store offset=0x2e5 align=1 (i32.const 0) (local.get 0x2e5)) + (i64.store offset=0x2e6 align=1 (i32.const 0) (local.get 0x2e6)) + (i64.store offset=0x2e7 align=1 (i32.const 0) (local.get 0x2e7)) + (i64.store offset=0x2e8 align=1 (i32.const 0) (local.get 0x2e8)) + (i64.store offset=0x2e9 align=1 (i32.const 0) (local.get 0x2e9)) + (i64.store offset=0x2ea align=1 (i32.const 0) (local.get 0x2ea)) + (i64.store offset=0x2eb align=1 (i32.const 0) (local.get 0x2eb)) + (i64.store offset=0x2ec align=1 (i32.const 0) (local.get 0x2ec)) + (i64.store offset=0x2ed align=1 (i32.const 0) (local.get 0x2ed)) + (i64.store offset=0x2ee align=1 (i32.const 0) (local.get 0x2ee)) + (i64.store offset=0x2ef align=1 (i32.const 0) (local.get 0x2ef)) + (i64.store offset=0x2f0 align=1 (i32.const 0) (local.get 0x2f0)) + (i64.store offset=0x2f1 align=1 (i32.const 0) (local.get 0x2f1)) + (i64.store offset=0x2f2 align=1 (i32.const 0) (local.get 0x2f2)) + (i64.store offset=0x2f3 align=1 (i32.const 0) (local.get 0x2f3)) + (i64.store offset=0x2f4 align=1 (i32.const 0) (local.get 0x2f4)) + (i64.store offset=0x2f5 align=1 (i32.const 0) (local.get 0x2f5)) + (i64.store offset=0x2f6 align=1 (i32.const 0) (local.get 0x2f6)) + (i64.store offset=0x2f7 align=1 (i32.const 0) (local.get 0x2f7)) + (i64.store offset=0x2f8 align=1 (i32.const 0) (local.get 0x2f8)) + (i64.store offset=0x2f9 align=1 (i32.const 0) (local.get 0x2f9)) + (i64.store offset=0x2fa align=1 (i32.const 0) (local.get 0x2fa)) + (i64.store offset=0x2fb align=1 (i32.const 0) (local.get 0x2fb)) + (i64.store offset=0x2fc align=1 (i32.const 0) (local.get 0x2fc)) + (i64.store offset=0x2fd align=1 (i32.const 0) (local.get 0x2fd)) + (i64.store offset=0x2fe align=1 (i32.const 0) (local.get 0x2fe)) + (i64.store offset=0x2ff align=1 (i32.const 0) (local.get 0x2ff)) + (i64.store offset=0x300 align=1 (i32.const 0) (local.get 0x300)) + (i64.store offset=0x301 align=1 (i32.const 0) (local.get 0x301)) + (i64.store offset=0x302 align=1 (i32.const 0) (local.get 0x302)) + (i64.store offset=0x303 align=1 (i32.const 0) (local.get 0x303)) + (i64.store offset=0x304 align=1 (i32.const 0) (local.get 0x304)) + (i64.store offset=0x305 align=1 (i32.const 0) (local.get 0x305)) + (i64.store offset=0x306 align=1 (i32.const 0) (local.get 0x306)) + (i64.store offset=0x307 align=1 (i32.const 0) (local.get 0x307)) + (i64.store offset=0x308 align=1 (i32.const 0) (local.get 0x308)) + (i64.store offset=0x309 align=1 (i32.const 0) (local.get 0x309)) + (i64.store offset=0x30a align=1 (i32.const 0) (local.get 0x30a)) + (i64.store offset=0x30b align=1 (i32.const 0) (local.get 0x30b)) + (i64.store offset=0x30c align=1 (i32.const 0) (local.get 0x30c)) + (i64.store offset=0x30d align=1 (i32.const 0) (local.get 0x30d)) + (i64.store offset=0x30e align=1 (i32.const 0) (local.get 0x30e)) + (i64.store offset=0x30f align=1 (i32.const 0) (local.get 0x30f)) + (i64.store offset=0x310 align=1 (i32.const 0) (local.get 0x310)) + (i64.store offset=0x311 align=1 (i32.const 0) (local.get 0x311)) + (i64.store offset=0x312 align=1 (i32.const 0) (local.get 0x312)) + (i64.store offset=0x313 align=1 (i32.const 0) (local.get 0x313)) + (i64.store offset=0x314 align=1 (i32.const 0) (local.get 0x314)) + (i64.store offset=0x315 align=1 (i32.const 0) (local.get 0x315)) + (i64.store offset=0x316 align=1 (i32.const 0) (local.get 0x316)) + (i64.store offset=0x317 align=1 (i32.const 0) (local.get 0x317)) + (i64.store offset=0x318 align=1 (i32.const 0) (local.get 0x318)) + (i64.store offset=0x319 align=1 (i32.const 0) (local.get 0x319)) + (i64.store offset=0x31a align=1 (i32.const 0) (local.get 0x31a)) + (i64.store offset=0x31b align=1 (i32.const 0) (local.get 0x31b)) + (i64.store offset=0x31c align=1 (i32.const 0) (local.get 0x31c)) + (i64.store offset=0x31d align=1 (i32.const 0) (local.get 0x31d)) + (i64.store offset=0x31e align=1 (i32.const 0) (local.get 0x31e)) + (i64.store offset=0x31f align=1 (i32.const 0) (local.get 0x31f)) + (i64.store offset=0x320 align=1 (i32.const 0) (local.get 0x320)) + (i64.store offset=0x321 align=1 (i32.const 0) (local.get 0x321)) + (i64.store offset=0x322 align=1 (i32.const 0) (local.get 0x322)) + (i64.store offset=0x323 align=1 (i32.const 0) (local.get 0x323)) + (i64.store offset=0x324 align=1 (i32.const 0) (local.get 0x324)) + (i64.store offset=0x325 align=1 (i32.const 0) (local.get 0x325)) + (i64.store offset=0x326 align=1 (i32.const 0) (local.get 0x326)) + (i64.store offset=0x327 align=1 (i32.const 0) (local.get 0x327)) + (i64.store offset=0x328 align=1 (i32.const 0) (local.get 0x328)) + (i64.store offset=0x329 align=1 (i32.const 0) (local.get 0x329)) + (i64.store offset=0x32a align=1 (i32.const 0) (local.get 0x32a)) + (i64.store offset=0x32b align=1 (i32.const 0) (local.get 0x32b)) + (i64.store offset=0x32c align=1 (i32.const 0) (local.get 0x32c)) + (i64.store offset=0x32d align=1 (i32.const 0) (local.get 0x32d)) + (i64.store offset=0x32e align=1 (i32.const 0) (local.get 0x32e)) + (i64.store offset=0x32f align=1 (i32.const 0) (local.get 0x32f)) + (i64.store offset=0x330 align=1 (i32.const 0) (local.get 0x330)) + (i64.store offset=0x331 align=1 (i32.const 0) (local.get 0x331)) + (i64.store offset=0x332 align=1 (i32.const 0) (local.get 0x332)) + (i64.store offset=0x333 align=1 (i32.const 0) (local.get 0x333)) + (i64.store offset=0x334 align=1 (i32.const 0) (local.get 0x334)) + (i64.store offset=0x335 align=1 (i32.const 0) (local.get 0x335)) + (i64.store offset=0x336 align=1 (i32.const 0) (local.get 0x336)) + (i64.store offset=0x337 align=1 (i32.const 0) (local.get 0x337)) + (i64.store offset=0x338 align=1 (i32.const 0) (local.get 0x338)) + (i64.store offset=0x339 align=1 (i32.const 0) (local.get 0x339)) + (i64.store offset=0x33a align=1 (i32.const 0) (local.get 0x33a)) + (i64.store offset=0x33b align=1 (i32.const 0) (local.get 0x33b)) + (i64.store offset=0x33c align=1 (i32.const 0) (local.get 0x33c)) + (i64.store offset=0x33d align=1 (i32.const 0) (local.get 0x33d)) + (i64.store offset=0x33e align=1 (i32.const 0) (local.get 0x33e)) + (i64.store offset=0x33f align=1 (i32.const 0) (local.get 0x33f)) + (i64.store offset=0x340 align=1 (i32.const 0) (local.get 0x340)) + (i64.store offset=0x341 align=1 (i32.const 0) (local.get 0x341)) + (i64.store offset=0x342 align=1 (i32.const 0) (local.get 0x342)) + (i64.store offset=0x343 align=1 (i32.const 0) (local.get 0x343)) + (i64.store offset=0x344 align=1 (i32.const 0) (local.get 0x344)) + (i64.store offset=0x345 align=1 (i32.const 0) (local.get 0x345)) + (i64.store offset=0x346 align=1 (i32.const 0) (local.get 0x346)) + (i64.store offset=0x347 align=1 (i32.const 0) (local.get 0x347)) + (i64.store offset=0x348 align=1 (i32.const 0) (local.get 0x348)) + (i64.store offset=0x349 align=1 (i32.const 0) (local.get 0x349)) + (i64.store offset=0x34a align=1 (i32.const 0) (local.get 0x34a)) + (i64.store offset=0x34b align=1 (i32.const 0) (local.get 0x34b)) + (i64.store offset=0x34c align=1 (i32.const 0) (local.get 0x34c)) + (i64.store offset=0x34d align=1 (i32.const 0) (local.get 0x34d)) + (i64.store offset=0x34e align=1 (i32.const 0) (local.get 0x34e)) + (i64.store offset=0x34f align=1 (i32.const 0) (local.get 0x34f)) + (i64.store offset=0x350 align=1 (i32.const 0) (local.get 0x350)) + (i64.store offset=0x351 align=1 (i32.const 0) (local.get 0x351)) + (i64.store offset=0x352 align=1 (i32.const 0) (local.get 0x352)) + (i64.store offset=0x353 align=1 (i32.const 0) (local.get 0x353)) + (i64.store offset=0x354 align=1 (i32.const 0) (local.get 0x354)) + (i64.store offset=0x355 align=1 (i32.const 0) (local.get 0x355)) + (i64.store offset=0x356 align=1 (i32.const 0) (local.get 0x356)) + (i64.store offset=0x357 align=1 (i32.const 0) (local.get 0x357)) + (i64.store offset=0x358 align=1 (i32.const 0) (local.get 0x358)) + (i64.store offset=0x359 align=1 (i32.const 0) (local.get 0x359)) + (i64.store offset=0x35a align=1 (i32.const 0) (local.get 0x35a)) + (i64.store offset=0x35b align=1 (i32.const 0) (local.get 0x35b)) + (i64.store offset=0x35c align=1 (i32.const 0) (local.get 0x35c)) + (i64.store offset=0x35d align=1 (i32.const 0) (local.get 0x35d)) + (i64.store offset=0x35e align=1 (i32.const 0) (local.get 0x35e)) + (i64.store offset=0x35f align=1 (i32.const 0) (local.get 0x35f)) + (i64.store offset=0x360 align=1 (i32.const 0) (local.get 0x360)) + (i64.store offset=0x361 align=1 (i32.const 0) (local.get 0x361)) + (i64.store offset=0x362 align=1 (i32.const 0) (local.get 0x362)) + (i64.store offset=0x363 align=1 (i32.const 0) (local.get 0x363)) + (i64.store offset=0x364 align=1 (i32.const 0) (local.get 0x364)) + (i64.store offset=0x365 align=1 (i32.const 0) (local.get 0x365)) + (i64.store offset=0x366 align=1 (i32.const 0) (local.get 0x366)) + (i64.store offset=0x367 align=1 (i32.const 0) (local.get 0x367)) + (i64.store offset=0x368 align=1 (i32.const 0) (local.get 0x368)) + (i64.store offset=0x369 align=1 (i32.const 0) (local.get 0x369)) + (i64.store offset=0x36a align=1 (i32.const 0) (local.get 0x36a)) + (i64.store offset=0x36b align=1 (i32.const 0) (local.get 0x36b)) + (i64.store offset=0x36c align=1 (i32.const 0) (local.get 0x36c)) + (i64.store offset=0x36d align=1 (i32.const 0) (local.get 0x36d)) + (i64.store offset=0x36e align=1 (i32.const 0) (local.get 0x36e)) + (i64.store offset=0x36f align=1 (i32.const 0) (local.get 0x36f)) + (i64.store offset=0x370 align=1 (i32.const 0) (local.get 0x370)) + (i64.store offset=0x371 align=1 (i32.const 0) (local.get 0x371)) + (i64.store offset=0x372 align=1 (i32.const 0) (local.get 0x372)) + (i64.store offset=0x373 align=1 (i32.const 0) (local.get 0x373)) + (i64.store offset=0x374 align=1 (i32.const 0) (local.get 0x374)) + (i64.store offset=0x375 align=1 (i32.const 0) (local.get 0x375)) + (i64.store offset=0x376 align=1 (i32.const 0) (local.get 0x376)) + (i64.store offset=0x377 align=1 (i32.const 0) (local.get 0x377)) + (i64.store offset=0x378 align=1 (i32.const 0) (local.get 0x378)) + (i64.store offset=0x379 align=1 (i32.const 0) (local.get 0x379)) + (i64.store offset=0x37a align=1 (i32.const 0) (local.get 0x37a)) + (i64.store offset=0x37b align=1 (i32.const 0) (local.get 0x37b)) + (i64.store offset=0x37c align=1 (i32.const 0) (local.get 0x37c)) + (i64.store offset=0x37d align=1 (i32.const 0) (local.get 0x37d)) + (i64.store offset=0x37e align=1 (i32.const 0) (local.get 0x37e)) + (i64.store offset=0x37f align=1 (i32.const 0) (local.get 0x37f)) + (i64.store offset=0x380 align=1 (i32.const 0) (local.get 0x380)) + (i64.store offset=0x381 align=1 (i32.const 0) (local.get 0x381)) + (i64.store offset=0x382 align=1 (i32.const 0) (local.get 0x382)) + (i64.store offset=0x383 align=1 (i32.const 0) (local.get 0x383)) + (i64.store offset=0x384 align=1 (i32.const 0) (local.get 0x384)) + (i64.store offset=0x385 align=1 (i32.const 0) (local.get 0x385)) + (i64.store offset=0x386 align=1 (i32.const 0) (local.get 0x386)) + (i64.store offset=0x387 align=1 (i32.const 0) (local.get 0x387)) + (i64.store offset=0x388 align=1 (i32.const 0) (local.get 0x388)) + (i64.store offset=0x389 align=1 (i32.const 0) (local.get 0x389)) + (i64.store offset=0x38a align=1 (i32.const 0) (local.get 0x38a)) + (i64.store offset=0x38b align=1 (i32.const 0) (local.get 0x38b)) + (i64.store offset=0x38c align=1 (i32.const 0) (local.get 0x38c)) + (i64.store offset=0x38d align=1 (i32.const 0) (local.get 0x38d)) + (i64.store offset=0x38e align=1 (i32.const 0) (local.get 0x38e)) + (i64.store offset=0x38f align=1 (i32.const 0) (local.get 0x38f)) + (i64.store offset=0x390 align=1 (i32.const 0) (local.get 0x390)) + (i64.store offset=0x391 align=1 (i32.const 0) (local.get 0x391)) + (i64.store offset=0x392 align=1 (i32.const 0) (local.get 0x392)) + (i64.store offset=0x393 align=1 (i32.const 0) (local.get 0x393)) + (i64.store offset=0x394 align=1 (i32.const 0) (local.get 0x394)) + (i64.store offset=0x395 align=1 (i32.const 0) (local.get 0x395)) + (i64.store offset=0x396 align=1 (i32.const 0) (local.get 0x396)) + (i64.store offset=0x397 align=1 (i32.const 0) (local.get 0x397)) + (i64.store offset=0x398 align=1 (i32.const 0) (local.get 0x398)) + (i64.store offset=0x399 align=1 (i32.const 0) (local.get 0x399)) + (i64.store offset=0x39a align=1 (i32.const 0) (local.get 0x39a)) + (i64.store offset=0x39b align=1 (i32.const 0) (local.get 0x39b)) + (i64.store offset=0x39c align=1 (i32.const 0) (local.get 0x39c)) + (i64.store offset=0x39d align=1 (i32.const 0) (local.get 0x39d)) + (i64.store offset=0x39e align=1 (i32.const 0) (local.get 0x39e)) + (i64.store offset=0x39f align=1 (i32.const 0) (local.get 0x39f)) + (i64.store offset=0x3a0 align=1 (i32.const 0) (local.get 0x3a0)) + (i64.store offset=0x3a1 align=1 (i32.const 0) (local.get 0x3a1)) + (i64.store offset=0x3a2 align=1 (i32.const 0) (local.get 0x3a2)) + (i64.store offset=0x3a3 align=1 (i32.const 0) (local.get 0x3a3)) + (i64.store offset=0x3a4 align=1 (i32.const 0) (local.get 0x3a4)) + (i64.store offset=0x3a5 align=1 (i32.const 0) (local.get 0x3a5)) + (i64.store offset=0x3a6 align=1 (i32.const 0) (local.get 0x3a6)) + (i64.store offset=0x3a7 align=1 (i32.const 0) (local.get 0x3a7)) + (i64.store offset=0x3a8 align=1 (i32.const 0) (local.get 0x3a8)) + (i64.store offset=0x3a9 align=1 (i32.const 0) (local.get 0x3a9)) + (i64.store offset=0x3aa align=1 (i32.const 0) (local.get 0x3aa)) + (i64.store offset=0x3ab align=1 (i32.const 0) (local.get 0x3ab)) + (i64.store offset=0x3ac align=1 (i32.const 0) (local.get 0x3ac)) + (i64.store offset=0x3ad align=1 (i32.const 0) (local.get 0x3ad)) + (i64.store offset=0x3ae align=1 (i32.const 0) (local.get 0x3ae)) + (i64.store offset=0x3af align=1 (i32.const 0) (local.get 0x3af)) + (i64.store offset=0x3b0 align=1 (i32.const 0) (local.get 0x3b0)) + (i64.store offset=0x3b1 align=1 (i32.const 0) (local.get 0x3b1)) + (i64.store offset=0x3b2 align=1 (i32.const 0) (local.get 0x3b2)) + (i64.store offset=0x3b3 align=1 (i32.const 0) (local.get 0x3b3)) + (i64.store offset=0x3b4 align=1 (i32.const 0) (local.get 0x3b4)) + (i64.store offset=0x3b5 align=1 (i32.const 0) (local.get 0x3b5)) + (i64.store offset=0x3b6 align=1 (i32.const 0) (local.get 0x3b6)) + (i64.store offset=0x3b7 align=1 (i32.const 0) (local.get 0x3b7)) + (i64.store offset=0x3b8 align=1 (i32.const 0) (local.get 0x3b8)) + (i64.store offset=0x3b9 align=1 (i32.const 0) (local.get 0x3b9)) + (i64.store offset=0x3ba align=1 (i32.const 0) (local.get 0x3ba)) + (i64.store offset=0x3bb align=1 (i32.const 0) (local.get 0x3bb)) + (i64.store offset=0x3bc align=1 (i32.const 0) (local.get 0x3bc)) + (i64.store offset=0x3bd align=1 (i32.const 0) (local.get 0x3bd)) + (i64.store offset=0x3be align=1 (i32.const 0) (local.get 0x3be)) + (i64.store offset=0x3bf align=1 (i32.const 0) (local.get 0x3bf)) + (i64.store offset=0x3c0 align=1 (i32.const 0) (local.get 0x3c0)) + (i64.store offset=0x3c1 align=1 (i32.const 0) (local.get 0x3c1)) + (i64.store offset=0x3c2 align=1 (i32.const 0) (local.get 0x3c2)) + (i64.store offset=0x3c3 align=1 (i32.const 0) (local.get 0x3c3)) + (i64.store offset=0x3c4 align=1 (i32.const 0) (local.get 0x3c4)) + (i64.store offset=0x3c5 align=1 (i32.const 0) (local.get 0x3c5)) + (i64.store offset=0x3c6 align=1 (i32.const 0) (local.get 0x3c6)) + (i64.store offset=0x3c7 align=1 (i32.const 0) (local.get 0x3c7)) + (i64.store offset=0x3c8 align=1 (i32.const 0) (local.get 0x3c8)) + (i64.store offset=0x3c9 align=1 (i32.const 0) (local.get 0x3c9)) + (i64.store offset=0x3ca align=1 (i32.const 0) (local.get 0x3ca)) + (i64.store offset=0x3cb align=1 (i32.const 0) (local.get 0x3cb)) + (i64.store offset=0x3cc align=1 (i32.const 0) (local.get 0x3cc)) + (i64.store offset=0x3cd align=1 (i32.const 0) (local.get 0x3cd)) + (i64.store offset=0x3ce align=1 (i32.const 0) (local.get 0x3ce)) + (i64.store offset=0x3cf align=1 (i32.const 0) (local.get 0x3cf)) + (i64.store offset=0x3d0 align=1 (i32.const 0) (local.get 0x3d0)) + (i64.store offset=0x3d1 align=1 (i32.const 0) (local.get 0x3d1)) + (i64.store offset=0x3d2 align=1 (i32.const 0) (local.get 0x3d2)) + (i64.store offset=0x3d3 align=1 (i32.const 0) (local.get 0x3d3)) + (i64.store offset=0x3d4 align=1 (i32.const 0) (local.get 0x3d4)) + (i64.store offset=0x3d5 align=1 (i32.const 0) (local.get 0x3d5)) + (i64.store offset=0x3d6 align=1 (i32.const 0) (local.get 0x3d6)) + (i64.store offset=0x3d7 align=1 (i32.const 0) (local.get 0x3d7)) + (i64.store offset=0x3d8 align=1 (i32.const 0) (local.get 0x3d8)) + (i64.store offset=0x3d9 align=1 (i32.const 0) (local.get 0x3d9)) + (i64.store offset=0x3da align=1 (i32.const 0) (local.get 0x3da)) + (i64.store offset=0x3db align=1 (i32.const 0) (local.get 0x3db)) + (i64.store offset=0x3dc align=1 (i32.const 0) (local.get 0x3dc)) + (i64.store offset=0x3dd align=1 (i32.const 0) (local.get 0x3dd)) + (i64.store offset=0x3de align=1 (i32.const 0) (local.get 0x3de)) + (i64.store offset=0x3df align=1 (i32.const 0) (local.get 0x3df)) + (i64.store offset=0x3e0 align=1 (i32.const 0) (local.get 0x3e0)) + (i64.store offset=0x3e1 align=1 (i32.const 0) (local.get 0x3e1)) + (i64.store offset=0x3e2 align=1 (i32.const 0) (local.get 0x3e2)) + (i64.store offset=0x3e3 align=1 (i32.const 0) (local.get 0x3e3)) + (i64.store offset=0x3e4 align=1 (i32.const 0) (local.get 0x3e4)) + (i64.store offset=0x3e5 align=1 (i32.const 0) (local.get 0x3e5)) + (i64.store offset=0x3e6 align=1 (i32.const 0) (local.get 0x3e6)) + (i64.store offset=0x3e7 align=1 (i32.const 0) (local.get 0x3e7)) + (i64.store offset=0x3e8 align=1 (i32.const 0) (local.get 0x3e8)) + (i64.store offset=0x3e9 align=1 (i32.const 0) (local.get 0x3e9)) + (i64.store offset=0x3ea align=1 (i32.const 0) (local.get 0x3ea)) + (i64.store offset=0x3eb align=1 (i32.const 0) (local.get 0x3eb)) + (i64.store offset=0x3ec align=1 (i32.const 0) (local.get 0x3ec)) + (i64.store offset=0x3ed align=1 (i32.const 0) (local.get 0x3ed)) + (i64.store offset=0x3ee align=1 (i32.const 0) (local.get 0x3ee)) + (i64.store offset=0x3ef align=1 (i32.const 0) (local.get 0x3ef)) + (i64.store offset=0x3f0 align=1 (i32.const 0) (local.get 0x3f0)) + (i64.store offset=0x3f1 align=1 (i32.const 0) (local.get 0x3f1)) + (i64.store offset=0x3f2 align=1 (i32.const 0) (local.get 0x3f2)) + (i64.store offset=0x3f3 align=1 (i32.const 0) (local.get 0x3f3)) + (i64.store offset=0x3f4 align=1 (i32.const 0) (local.get 0x3f4)) + (i64.store offset=0x3f5 align=1 (i32.const 0) (local.get 0x3f5)) + (i64.store offset=0x3f6 align=1 (i32.const 0) (local.get 0x3f6)) + (i64.store offset=0x3f7 align=1 (i32.const 0) (local.get 0x3f7)) + (i64.store offset=0x3f8 align=1 (i32.const 0) (local.get 0x3f8)) + (i64.store offset=0x3f9 align=1 (i32.const 0) (local.get 0x3f9)) + (i64.store offset=0x3fa align=1 (i32.const 0) (local.get 0x3fa)) + (i64.store offset=0x3fb align=1 (i32.const 0) (local.get 0x3fb)) + (i64.store offset=0x3fc align=1 (i32.const 0) (local.get 0x3fc)) + (i64.store offset=0x3fd align=1 (i32.const 0) (local.get 0x3fd)) + (i64.store offset=0x3fe align=1 (i32.const 0) (local.get 0x3fe)) + (i64.store offset=0x3ff align=1 (i32.const 0) (local.get 0x3ff)) + (i64.store offset=0x400 align=1 (i32.const 0) (local.get 0x400)) + (i64.store offset=0x401 align=1 (i32.const 0) (local.get 0x401)) + (i64.store offset=0x402 align=1 (i32.const 0) (local.get 0x402)) + (i64.store offset=0x403 align=1 (i32.const 0) (local.get 0x403)) + (i64.store offset=0x404 align=1 (i32.const 0) (local.get 0x404)) + (i64.store offset=0x405 align=1 (i32.const 0) (local.get 0x405)) + (i64.store offset=0x406 align=1 (i32.const 0) (local.get 0x406)) + (i64.store offset=0x407 align=1 (i32.const 0) (local.get 0x407)) + (i64.store offset=0x408 align=1 (i32.const 0) (local.get 0x408)) + (i64.store offset=0x409 align=1 (i32.const 0) (local.get 0x409)) + (i64.store offset=0x40a align=1 (i32.const 0) (local.get 0x40a)) + (i64.store offset=0x40b align=1 (i32.const 0) (local.get 0x40b)) + (i64.store offset=0x40c align=1 (i32.const 0) (local.get 0x40c)) + (i64.store offset=0x40d align=1 (i32.const 0) (local.get 0x40d)) + (i64.store offset=0x40e align=1 (i32.const 0) (local.get 0x40e)) + (i64.store offset=0x40f align=1 (i32.const 0) (local.get 0x40f)) + (i64.store offset=0x410 align=1 (i32.const 0) (local.get 0x410)) + (i64.store offset=0x411 align=1 (i32.const 0) (local.get 0x411)) + (i64.store offset=0x412 align=1 (i32.const 0) (local.get 0x412)) + (i64.store offset=0x413 align=1 (i32.const 0) (local.get 0x413)) + (i64.store offset=0x414 align=1 (i32.const 0) (local.get 0x414)) + (i64.store offset=0x415 align=1 (i32.const 0) (local.get 0x415)) + (i64.store offset=0x416 align=1 (i32.const 0) (local.get 0x416)) + (i64.store offset=0x417 align=1 (i32.const 0) (local.get 0x417)) + (i64.store offset=0x418 align=1 (i32.const 0) (local.get 0x418)) + (i64.store offset=0x419 align=1 (i32.const 0) (local.get 0x419)) + (i64.store offset=0x41a align=1 (i32.const 0) (local.get 0x41a)) + (i64.store offset=0x41b align=1 (i32.const 0) (local.get 0x41b)) + (i64.store offset=0x41c align=1 (i32.const 0) (local.get 0x41c)) + (i64.store offset=0x41d align=1 (i32.const 0) (local.get 0x41d)) + (i64.store offset=0x41e align=1 (i32.const 0) (local.get 0x41e)) + (i64.store offset=0x41f align=1 (i32.const 0) (local.get 0x41f)) + ) +) diff --git a/client/executor-wasmtime/src/tests.rs b/client/executor-wasmtime/src/tests.rs new file mode 100644 index 00000000..dbbf6490 --- /dev/null +++ b/client/executor-wasmtime/src/tests.rs @@ -0,0 +1,522 @@ +// This file is part of Substrate. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +use codec::{Decode as _, Encode as _}; +use sc_executor_common::{ + error::Error, + runtime_blob::RuntimeBlob, + wasm_runtime::{HeapAllocStrategy, WasmModule, DEFAULT_HEAP_ALLOC_STRATEGY}, +}; +use sc_runtime_test::wasm_binary_unwrap; + +use crate::InstantiationStrategy; + +type HostFunctions = sp_io::SubstrateHostFunctions; + +#[macro_export] +macro_rules! test_wasm_execution { + ($method_name:ident) => { + paste::item! { + #[test] + fn [<$method_name _recreate_instance_cow>]() { + $method_name( + InstantiationStrategy::RecreateInstanceCopyOnWrite + ); + } + + #[test] + fn [<$method_name _recreate_instance_vanilla>]() { + $method_name( + InstantiationStrategy::RecreateInstance + ); + } + + #[test] + fn [<$method_name _pooling_cow>]() { + $method_name( + InstantiationStrategy::PoolingCopyOnWrite + ); + } + + #[test] + fn [<$method_name _pooling_vanilla>]() { + $method_name( + InstantiationStrategy::Pooling + ); + } + } + }; +} + +struct RuntimeBuilder { + code: Option, + instantiation_strategy: InstantiationStrategy, + canonicalize_nans: bool, + deterministic_stack: bool, + heap_pages: HeapAllocStrategy, + precompile_runtime: bool, + tmpdir: Option, +} + +impl RuntimeBuilder { + fn new(instantiation_strategy: InstantiationStrategy) -> Self { + Self { + code: None, + instantiation_strategy, + canonicalize_nans: false, + deterministic_stack: false, + heap_pages: DEFAULT_HEAP_ALLOC_STRATEGY, + precompile_runtime: false, + tmpdir: None, + } + } + + fn use_wat(mut self, code: String) -> Self { + self.code = Some(code); + self + } + + fn canonicalize_nans(mut self, canonicalize_nans: bool) -> Self { + self.canonicalize_nans = canonicalize_nans; + self + } + + fn deterministic_stack(mut self, deterministic_stack: bool) -> Self { + self.deterministic_stack = deterministic_stack; + self + } + + fn precompile_runtime(mut self, precompile_runtime: bool) -> Self { + self.precompile_runtime = precompile_runtime; + self + } + + fn heap_alloc_strategy(mut self, heap_pages: HeapAllocStrategy) -> Self { + self.heap_pages = heap_pages; + self + } + + fn build(&mut self) -> impl WasmModule + '_ { + let blob = { + let wasm: Vec; + + let wasm = match self.code { + None => wasm_binary_unwrap(), + Some(ref wat) => { + wasm = wat::parse_str(wat).expect("wat parsing failed"); + &wasm + }, + }; + + RuntimeBlob::uncompress_if_needed(&wasm) + .expect("failed to create a runtime blob out of test runtime") + }; + + let config = crate::Config { + allow_missing_func_imports: true, + cache_path: None, + semantics: crate::Semantics { + instantiation_strategy: self.instantiation_strategy, + deterministic_stack_limit: match self.deterministic_stack { + true => Some(crate::DeterministicStackLimit { + logical_max: 65536, + native_stack_max: 256 * 1024 * 1024, + }), + false => None, + }, + canonicalize_nans: self.canonicalize_nans, + parallel_compilation: true, + heap_alloc_strategy: self.heap_pages, + wasm_multi_value: false, + wasm_bulk_memory: false, + wasm_reference_types: false, + wasm_simd: false, + }, + }; + + if self.precompile_runtime { + let dir = tempfile::tempdir().unwrap(); + let path = dir.path().join("runtime.bin"); + + // Delay the removal of the temporary directory until we're dropped. + self.tmpdir = Some(dir); + + let artifact = crate::prepare_runtime_artifact(blob, &config.semantics).unwrap(); + std::fs::write(&path, artifact).unwrap(); + unsafe { crate::create_runtime_from_artifact::(&path, config) } + } else { + crate::create_runtime::(blob, config) + } + .expect("cannot create runtime") + } +} + +fn deep_call_stack_wat(depth: usize) -> String { + format!( + r#" + (module + (memory $0 32) + (export "memory" (memory $0)) + (global (export "__heap_base") i32 (i32.const 0)) + (func (export "overflow") call 0) + + (func $overflow (param $0 i32) + (block $label$1 + (br_if $label$1 + (i32.ge_u + (local.get $0) + (i32.const {depth}) + ) + ) + (call $overflow + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + ) + ) + + (func (export "main") + (param i32 i32) (result i64) + (call $overflow (i32.const 0)) + (i64.const 0) + ) + ) + "# + ) +} + +// These two tests ensure that the `wasmtime`'s stack size limit and the amount of +// stack space used by a single stack frame doesn't suddenly change without us noticing. +// +// If they do (e.g. because we've pulled in a new version of `wasmtime`) we want to know +// that it did, regardless of how small the change was. +// +// If these tests starting failing it doesn't necessarily mean that something is broken; +// what it means is that one (or multiple) of the following has to be done: +// a) the tests may need to be updated for the new call depth, +// b) the stack limit may need to be changed to maintain backwards compatibility, +// c) the root cause of the new call depth limit determined, and potentially fixed, +// d) the new call depth limit may need to be validated to ensure it doesn't prevent any +// existing chain from syncing (if it was effectively decreased) + +// We need two limits here since depending on whether the code is compiled in debug +// or in release mode the maximum call depth is slightly different. +const CALL_DEPTH_LOWER_LIMIT: usize = 65451; +const CALL_DEPTH_UPPER_LIMIT: usize = 65506; + +test_wasm_execution!(test_consume_under_1mb_of_stack_does_not_trap); +fn test_consume_under_1mb_of_stack_does_not_trap(instantiation_strategy: InstantiationStrategy) { + let wat = deep_call_stack_wat(CALL_DEPTH_LOWER_LIMIT); + let mut builder = RuntimeBuilder::new(instantiation_strategy).use_wat(wat); + let runtime = builder.build(); + let mut instance = runtime.new_instance().expect("failed to instantiate a runtime"); + instance.call_export("main", &[]).unwrap(); +} + +test_wasm_execution!(test_consume_over_1mb_of_stack_does_trap); +fn test_consume_over_1mb_of_stack_does_trap(instantiation_strategy: InstantiationStrategy) { + let wat = deep_call_stack_wat(CALL_DEPTH_UPPER_LIMIT + 1); + let mut builder = RuntimeBuilder::new(instantiation_strategy).use_wat(wat); + let runtime = builder.build(); + let mut instance = runtime.new_instance().expect("failed to instantiate a runtime"); + match instance.call_export("main", &[]).unwrap_err() { + Error::AbortedDueToTrap(error) => { + let expected = "wasm trap: call stack exhausted"; + assert_eq!(error.message, expected); + }, + error => panic!("unexpected error: {:?}", error), + } +} + +test_wasm_execution!(test_nan_canonicalization); +fn test_nan_canonicalization(instantiation_strategy: InstantiationStrategy) { + let mut builder = RuntimeBuilder::new(instantiation_strategy).canonicalize_nans(true); + let runtime = builder.build(); + + let mut instance = runtime.new_instance().expect("failed to instantiate a runtime"); + + /// A NaN with canonical payload bits. + const CANONICAL_NAN_BITS: u32 = 0x7fc00000; + /// A NaN value with an arbitrary payload. + const ARBITRARY_NAN_BITS: u32 = 0x7f812345; + + // This test works like this: we essentially do + // + // a + b + // + // where + // + // * a is a nan with arbitrary bits in its payload + // * b is 1. + // + // according to the wasm spec, if one of the inputs to the operation is a non-canonical NaN + // then the value be a NaN with non-deterministic payload bits. + // + // However, with the `canonicalize_nans` option turned on above, we expect that the output will + // be a canonical NaN. + // + // We extrapolate the results of this tests so that we assume that all intermediate computations + // that involve floats are sanitized and cannot produce a non-deterministic NaN. + + let params = (u32::to_le_bytes(ARBITRARY_NAN_BITS), u32::to_le_bytes(1)).encode(); + let res = { + let raw_result = instance.call_export("test_fp_f32add", ¶ms).unwrap(); + u32::from_le_bytes(<[u8; 4]>::decode(&mut &raw_result[..]).unwrap()) + }; + assert_eq!(res, CANONICAL_NAN_BITS); +} + +test_wasm_execution!(test_stack_depth_reaching); +fn test_stack_depth_reaching(instantiation_strategy: InstantiationStrategy) { + const TEST_GUARD_PAGE_SKIP: &str = include_str!("test-guard-page-skip.wat"); + + let mut builder = RuntimeBuilder::new(instantiation_strategy) + .use_wat(TEST_GUARD_PAGE_SKIP.to_string()) + .deterministic_stack(true); + + let runtime = builder.build(); + let mut instance = runtime.new_instance().expect("failed to instantiate a runtime"); + + match instance.call_export("test-many-locals", &[]).unwrap_err() { + Error::AbortedDueToTrap(error) => { + let expected = "wasm trap: wasm `unreachable` instruction executed"; + assert_eq!(error.message, expected); + }, + error => panic!("unexpected error: {:?}", error), + } +} + +test_wasm_execution!(test_max_memory_pages_imported_memory_without_precompilation); +fn test_max_memory_pages_imported_memory_without_precompilation( + instantiation_strategy: InstantiationStrategy, +) { + test_max_memory_pages(instantiation_strategy, true, false); +} + +test_wasm_execution!(test_max_memory_pages_exported_memory_without_precompilation); +fn test_max_memory_pages_exported_memory_without_precompilation( + instantiation_strategy: InstantiationStrategy, +) { + test_max_memory_pages(instantiation_strategy, false, false); +} + +test_wasm_execution!(test_max_memory_pages_imported_memory_with_precompilation); +fn test_max_memory_pages_imported_memory_with_precompilation( + instantiation_strategy: InstantiationStrategy, +) { + test_max_memory_pages(instantiation_strategy, true, true); +} + +test_wasm_execution!(test_max_memory_pages_exported_memory_with_precompilation); +fn test_max_memory_pages_exported_memory_with_precompilation( + instantiation_strategy: InstantiationStrategy, +) { + test_max_memory_pages(instantiation_strategy, false, true); +} + +fn test_max_memory_pages( + instantiation_strategy: InstantiationStrategy, + import_memory: bool, + precompile_runtime: bool, +) { + fn call( + heap_alloc_strategy: HeapAllocStrategy, + wat: String, + instantiation_strategy: InstantiationStrategy, + precompile_runtime: bool, + ) -> Result<(), Box> { + let mut builder = RuntimeBuilder::new(instantiation_strategy) + .use_wat(wat) + .heap_alloc_strategy(heap_alloc_strategy) + .precompile_runtime(precompile_runtime); + + let runtime = builder.build(); + let mut instance = runtime.new_instance().unwrap(); + instance.call_export("main", &[])?; + Ok(()) + } + + fn memory(initial: u32, maximum: u32, import: bool) -> String { + let memory = format!("(memory $0 {} {})", initial, maximum); + + if import { + format!("(import \"env\" \"memory\" {})", memory) + } else { + format!("{}\n(export \"memory\" (memory $0))", memory) + } + } + + let assert_grow_ok = |alloc_strategy: HeapAllocStrategy, initial_pages: u32, max_pages: u32| { + eprintln!("assert_grow_ok({alloc_strategy:?}, {initial_pages}, {max_pages})"); + + call( + alloc_strategy, + format!( + r#" + (module + {} + (global (export "__heap_base") i32 (i32.const 0)) + (func (export "main") + (param i32 i32) (result i64) + + ;; assert(memory.grow returns != -1) + (if + (i32.eq + (memory.grow + (i32.const 1) + ) + (i32.const -1) + ) + (then + (unreachable) + ) + ) + + (i64.const 0) + ) + ) + "#, + memory(initial_pages, max_pages, import_memory) + ), + instantiation_strategy, + precompile_runtime, + ) + .unwrap() + }; + + let assert_grow_fail = + |alloc_strategy: HeapAllocStrategy, initial_pages: u32, max_pages: u32| { + eprintln!("assert_grow_fail({alloc_strategy:?}, {initial_pages}, {max_pages})"); + + call( + alloc_strategy, + format!( + r#" + (module + {} + (global (export "__heap_base") i32 (i32.const 0)) + (func (export "main") + (param i32 i32) (result i64) + + ;; assert(memory.grow returns == -1) + (if + (i32.ne + (memory.grow + (i32.const 1) + ) + (i32.const -1) + ) + (then + (unreachable) + ) + ) + + (i64.const 0) + ) + ) + "#, + memory(initial_pages, max_pages, import_memory) + ), + instantiation_strategy, + precompile_runtime, + ) + .unwrap() + }; + + assert_grow_ok(HeapAllocStrategy::Dynamic { maximum_pages: Some(10) }, 1, 10); + assert_grow_ok(HeapAllocStrategy::Dynamic { maximum_pages: Some(10) }, 9, 10); + assert_grow_fail(HeapAllocStrategy::Dynamic { maximum_pages: Some(10) }, 10, 10); + + assert_grow_ok(HeapAllocStrategy::Dynamic { maximum_pages: None }, 1, 10); + assert_grow_ok(HeapAllocStrategy::Dynamic { maximum_pages: None }, 9, 10); + assert_grow_ok(HeapAllocStrategy::Dynamic { maximum_pages: None }, 10, 10); + + assert_grow_fail(HeapAllocStrategy::Static { extra_pages: 10 }, 1, 10); + assert_grow_fail(HeapAllocStrategy::Static { extra_pages: 10 }, 9, 10); + assert_grow_fail(HeapAllocStrategy::Static { extra_pages: 10 }, 10, 10); +} + +// This test takes quite a while to execute in a debug build (over 6 minutes on a TR 3970x) +// so it's ignored by default unless it was compiled with `--release`. +#[cfg_attr(build_profile = "debug", ignore)] +#[test] +fn test_instances_without_reuse_are_not_leaked() { + let runtime = crate::create_runtime::( + RuntimeBlob::uncompress_if_needed(wasm_binary_unwrap()).unwrap(), + crate::Config { + allow_missing_func_imports: true, + cache_path: None, + semantics: crate::Semantics { + instantiation_strategy: InstantiationStrategy::RecreateInstance, + deterministic_stack_limit: None, + canonicalize_nans: false, + parallel_compilation: true, + heap_alloc_strategy: DEFAULT_HEAP_ALLOC_STRATEGY, + wasm_multi_value: false, + wasm_bulk_memory: false, + wasm_reference_types: false, + wasm_simd: false, + }, + }, + ) + .unwrap(); + + // As long as the `wasmtime`'s `Store` lives the instances spawned through it + // will live indefinitely. Currently it has a maximum limit of 10k instances, + // so let's spawn 10k + 1 of them to make sure our code doesn't keep the `Store` + // alive longer than it is necessary. (And since we disabled instance reuse + // a new instance will be spawned on each call.) + let mut instance = runtime.new_instance().unwrap(); + for _ in 0..10001 { + instance.call_export("test_empty_return", &[0]).unwrap(); + } +} + +#[test] +fn test_rustix_version_matches_with_wasmtime() { + let metadata = cargo_metadata::MetadataCommand::new().exec().unwrap(); + + let wasmtime_rustix = metadata + .packages + .iter() + .find(|pkg| pkg.name == "wasmtime") + .unwrap() + .dependencies + .iter() + .find(|dep| dep.name == "rustix") + .unwrap(); + let our_rustix = metadata + .packages + .iter() + .find(|pkg| pkg.name == "sc-executor-wasmtime") + .unwrap() + .dependencies + .iter() + .find(|dep| dep.name == "rustix") + .unwrap(); + + if wasmtime_rustix.req != our_rustix.req { + panic!( + "our version of rustix ({0}) doesn't match wasmtime's ({1}); \ + bump the version in `sc-executor-wasmtime`'s `Cargo.toml' to '{1}' and try again", + our_rustix.req, wasmtime_rustix.req, + ); + } +} diff --git a/client/executor-wasmtime/src/util.rs b/client/executor-wasmtime/src/util.rs new file mode 100644 index 00000000..7af554c3 --- /dev/null +++ b/client/executor-wasmtime/src/util.rs @@ -0,0 +1,149 @@ +// This file is part of Substrate. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +use crate::{runtime::StoreData, InstantiationStrategy}; +use sc_executor_common::{ + error::{Error, Result}, + util::checked_range, +}; +use sp_wasm_interface::Pointer; +use wasmtime::{AsContext, AsContextMut}; + +/// Read data from the instance memory into a slice. +/// +/// Returns an error if the read would go out of the memory bounds. +pub(crate) fn read_memory_into( + ctx: impl AsContext, + address: Pointer, + dest: &mut [u8], +) -> Result<()> { + let memory = ctx.as_context().data().memory().data(&ctx); + + let range = checked_range(address.into(), dest.len(), memory.len()) + .ok_or_else(|| Error::Other("memory read is out of bounds".into()))?; + dest.copy_from_slice(&memory[range]); + Ok(()) +} + +/// Write data to the instance memory from a slice. +/// +/// Returns an error if the write would go out of the memory bounds. +pub(crate) fn write_memory_from( + mut ctx: impl AsContextMut, + address: Pointer, + data: &[u8], +) -> Result<()> { + let memory = ctx.as_context().data().memory(); + let memory = memory.data_mut(&mut ctx); + + let range = checked_range(address.into(), data.len(), memory.len()) + .ok_or_else(|| Error::Other("memory write is out of bounds".into()))?; + memory[range].copy_from_slice(data); + Ok(()) +} + +/// Checks whether the `madvise(MADV_DONTNEED)` works as expected. +/// +/// In certain environments (e.g. when running under the QEMU user-mode emulator) +/// this syscall is broken. +#[cfg(target_os = "linux")] +fn is_madvise_working() -> std::result::Result { + let page_size = rustix::param::page_size(); + + unsafe { + // Allocate two memory pages. + let pointer = rustix::mm::mmap_anonymous( + std::ptr::null_mut(), + 2 * page_size, + rustix::mm::ProtFlags::READ | rustix::mm::ProtFlags::WRITE, + rustix::mm::MapFlags::PRIVATE, + ) + .map_err(|error| format!("mmap failed: {}", error))?; + + // Dirty them both. + std::ptr::write_volatile(pointer.cast::(), b'A'); + std::ptr::write_volatile(pointer.cast::().add(page_size), b'B'); + + // Clear the first page. + let result_madvise = + rustix::mm::madvise(pointer, page_size, rustix::mm::Advice::LinuxDontNeed) + .map_err(|error| format!("madvise failed: {}", error)); + + // Fetch the values. + let value_1 = std::ptr::read_volatile(pointer.cast::()); + let value_2 = std::ptr::read_volatile(pointer.cast::().add(page_size)); + + let result_munmap = rustix::mm::munmap(pointer, 2 * page_size) + .map_err(|error| format!("munmap failed: {}", error)); + + result_madvise?; + result_munmap?; + + // Verify that the first page was cleared, while the second one was not. + Ok(value_1 == 0 && value_2 == b'B') + } +} + +#[cfg(test)] +#[cfg(target_os = "linux")] +#[test] +fn test_is_madvise_working_check_does_not_fail() { + assert!(is_madvise_working().is_ok()); +} + +/// Checks whether a given instantiation strategy can be safely used, and replaces +/// it with a slower (but sound) alternative if it isn't. +#[cfg(target_os = "linux")] +pub(crate) fn replace_strategy_if_broken(strategy: &mut InstantiationStrategy) { + let replacement_strategy = match *strategy { + // These strategies don't need working `madvise`. + InstantiationStrategy::Pooling | InstantiationStrategy::RecreateInstance => return, + + // These strategies require a working `madvise` to be sound. + InstantiationStrategy::PoolingCopyOnWrite => InstantiationStrategy::Pooling, + InstantiationStrategy::RecreateInstanceCopyOnWrite => + InstantiationStrategy::RecreateInstance, + }; + + use std::sync::OnceLock; + static IS_OK: OnceLock = OnceLock::new(); + + let is_ok = IS_OK.get_or_init(|| { + let is_ok = match is_madvise_working() { + Ok(is_ok) => is_ok, + Err(error) => { + // This should never happen. + log::warn!("Failed to check whether `madvise(MADV_DONTNEED)` works: {}", error); + false + } + }; + + if !is_ok { + log::warn!("You're running on a system with a broken `madvise(MADV_DONTNEED)` implementation. This will result in lower performance."); + } + + is_ok + }); + + if !is_ok { + *strategy = replacement_strategy; + } +} + +#[cfg(not(target_os = "linux"))] +pub(crate) fn replace_strategy_if_broken(_: &mut InstantiationStrategy) {} diff --git a/client/wasm-interface/.cargo_vcs_info.json b/client/wasm-interface/.cargo_vcs_info.json new file mode 100644 index 00000000..428f8209 --- /dev/null +++ b/client/wasm-interface/.cargo_vcs_info.json @@ -0,0 +1,6 @@ +{ + "git": { + "sha1": "11223e8a2fd0a81bbbc962719f54cc2df1c57ffc" + }, + "path_in_vcs": "substrate/primitives/wasm-interface" +} \ No newline at end of file diff --git a/client/wasm-interface/Cargo.toml b/client/wasm-interface/Cargo.toml new file mode 100644 index 00000000..f4c06cdb --- /dev/null +++ b/client/wasm-interface/Cargo.toml @@ -0,0 +1,183 @@ +# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO +# +# When uploading crates to the registry Cargo will automatically +# "normalize" Cargo.toml files for maximal compatibility +# with all versions of Cargo and also rewrite `path` dependencies +# to registry (e.g., crates.io) dependencies. +# +# If you are reading this file be aware that the original Cargo.toml +# will likely look very different (and much more reasonable). +# See Cargo.toml.orig for the original contents. + +[package] +edition = "2021" +name = "sp-wasm-interface" +version = "24.0.0" +authors = ["Parity Technologies "] +build = false +autolib = false +autobins = false +autoexamples = false +autotests = false +autobenches = false +description = "Types and traits for interfacing between the host and the wasm runtime." +homepage = "https://paritytech.github.io/polkadot-sdk/" +documentation = "https://docs.rs/sp-wasm-interface" +readme = "README.md" +license = "Apache-2.0" +repository = "https://github.com/paritytech/polkadot-sdk.git" + +[package.metadata.docs.rs] +targets = ["x86_64-unknown-linux-gnu"] + +[features] +default = ["std"] +std = [ + "anyhow?/std", + "codec/std", + "log/std", +] +wasmtime = [ + "anyhow", + "dep:wasmtime", +] + +[lib] +name = "sp_wasm_interface" +path = "src/lib.rs" + +[dependencies.anyhow] +version = "1.0.81" +optional = true +default-features = false + +[dependencies.codec] +version = "3.7.5" +features = ["derive"] +default-features = false +package = "parity-scale-codec" + +[dependencies.impl-trait-for-tuples] +version = "0.2.2" + +[dependencies.log] +version = "0.4.22" +optional = true +default-features = true + +[dependencies.wasmtime] +version = "35.0.0" +optional = true +default-features = false + +[lints.clippy.all] +level = "allow" +priority = 0 + +[lints.clippy.bind_instead_of_map] +level = "allow" +priority = 2 + +[lints.clippy.borrowed-box] +level = "allow" +priority = 2 + +[lints.clippy.complexity] +level = "warn" +priority = 1 + +[lints.clippy.correctness] +level = "warn" +priority = 1 + +[lints.clippy.default_constructed_unit_structs] +level = "allow" +priority = 2 + +[lints.clippy.derivable_impls] +level = "allow" +priority = 2 + +[lints.clippy.eq_op] +level = "allow" +priority = 2 + +[lints.clippy.erasing_op] +level = "allow" +priority = 2 + +[lints.clippy.extra-unused-type-parameters] +level = "allow" +priority = 2 + +[lints.clippy.identity-op] +level = "allow" +priority = 2 + +[lints.clippy.if-same-then-else] +level = "allow" +priority = 2 + +[lints.clippy.needless-lifetimes] +level = "allow" +priority = 2 + +[lints.clippy.needless_option_as_deref] +level = "allow" +priority = 2 + +[lints.clippy.nonminimal-bool] +level = "allow" +priority = 2 + +[lints.clippy.option-map-unit-fn] +level = "allow" +priority = 2 + +[lints.clippy.stable_sort_primitive] +level = "allow" +priority = 2 + +[lints.clippy.too-many-arguments] +level = "allow" +priority = 2 + +[lints.clippy.type_complexity] +level = "allow" +priority = 2 + +[lints.clippy.unit_arg] +level = "allow" +priority = 2 + +[lints.clippy.unnecessary_cast] +level = "allow" +priority = 2 + +[lints.clippy.useless_conversion] +level = "allow" +priority = 2 + +[lints.clippy.while_immutable_condition] +level = "allow" +priority = 2 + +[lints.clippy.zero-prefixed-literal] +level = "allow" +priority = 2 + +[lints.rust.suspicious_double_ref_op] +level = "allow" +priority = 2 + +[lints.rust.unexpected_cfgs] +level = "warn" +priority = 0 +check-cfg = [ + 'cfg(build_opt_level, values("3"))', + 'cfg(build_profile, values("debug", "release"))', + "cfg(enable_alloc_error_handler)", + "cfg(fuzzing)", + "cfg(ignore_flaky_test)", + "cfg(substrate_runtime)", +] diff --git a/client/wasm-interface/Cargo.toml.orig b/client/wasm-interface/Cargo.toml.orig new file mode 100644 index 00000000..3ea0e9f3 --- /dev/null +++ b/client/wasm-interface/Cargo.toml.orig @@ -0,0 +1,33 @@ +[package] +name = "sp-wasm-interface" +version = "24.0.0" +authors.workspace = true +edition.workspace = true +license = "Apache-2.0" +homepage.workspace = true +repository.workspace = true +description = "Types and traits for interfacing between the host and the wasm runtime." +documentation = "https://docs.rs/sp-wasm-interface" +readme = "README.md" + +[lints] +workspace = true + +[package.metadata.docs.rs] +targets = ["x86_64-unknown-linux-gnu"] + +[dependencies] +anyhow = { optional = true, workspace = true } +codec = { features = ["derive"], workspace = true } +impl-trait-for-tuples = { workspace = true } +log = { optional = true, workspace = true, default-features = true } +wasmtime = { optional = true, workspace = true } + +[features] +default = ["std"] +std = [ + "anyhow?/std", + "codec/std", + "log/std", +] +wasmtime = ["anyhow", "dep:wasmtime"] diff --git a/client/wasm-interface/README.md b/client/wasm-interface/README.md new file mode 100644 index 00000000..2e584ade --- /dev/null +++ b/client/wasm-interface/README.md @@ -0,0 +1,3 @@ +Types and traits for interfacing between the host and the wasm runtime. + +License: Apache-2.0 diff --git a/client/wasm-interface/src/lib.rs b/client/wasm-interface/src/lib.rs new file mode 100644 index 00000000..5e2bd10c --- /dev/null +++ b/client/wasm-interface/src/lib.rs @@ -0,0 +1,630 @@ +// This file is part of Substrate. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Types and traits for interfacing between the host and the wasm runtime. + +#![cfg_attr(not(feature = "std"), no_std)] + +extern crate alloc; + +use alloc::{borrow::Cow, string::String, vec, vec::Vec}; +use core::{iter::Iterator, marker::PhantomData, mem}; + +#[cfg(not(all(feature = "std", feature = "wasmtime")))] +#[macro_export] +macro_rules! if_wasmtime_is_enabled { + ($($token:tt)*) => {}; +} + +#[cfg(all(feature = "std", feature = "wasmtime"))] +#[macro_export] +macro_rules! if_wasmtime_is_enabled { + ($($token:tt)*) => { + $($token)* + } +} + +if_wasmtime_is_enabled! { + // Reexport wasmtime so that its types are accessible from the procedural macro. + pub use wasmtime; + + // Wasmtime uses anyhow types but doesn't reexport them. + pub use anyhow; +} + +/// Result type used by traits in this crate. +pub type Result = core::result::Result; + +/// Value types supported by Substrate on the boundary between host/Wasm. +#[derive(Copy, Clone, PartialEq, Debug, Eq)] +pub enum ValueType { + /// An `i32` value type. + I32, + /// An `i64` value type. + I64, + /// An `f32` value type. + F32, + /// An `f64` value type. + F64, +} + +impl From for u8 { + fn from(val: ValueType) -> u8 { + match val { + ValueType::I32 => 0, + ValueType::I64 => 1, + ValueType::F32 => 2, + ValueType::F64 => 3, + } + } +} + +impl TryFrom for ValueType { + type Error = (); + + fn try_from(val: u8) -> core::result::Result { + match val { + 0 => Ok(Self::I32), + 1 => Ok(Self::I64), + 2 => Ok(Self::F32), + 3 => Ok(Self::F64), + _ => Err(()), + } + } +} + +/// Values supported by Substrate on the boundary between host/Wasm. +#[derive(PartialEq, Debug, Clone, Copy, codec::Encode, codec::Decode)] +pub enum Value { + /// A 32-bit integer. + I32(i32), + /// A 64-bit integer. + I64(i64), + /// A 32-bit floating-point number stored as raw bit pattern. + /// + /// You can materialize this value using `f32::from_bits`. + F32(u32), + /// A 64-bit floating-point number stored as raw bit pattern. + /// + /// You can materialize this value using `f64::from_bits`. + F64(u64), +} + +impl Value { + /// Returns the type of this value. + pub fn value_type(&self) -> ValueType { + match self { + Value::I32(_) => ValueType::I32, + Value::I64(_) => ValueType::I64, + Value::F32(_) => ValueType::F32, + Value::F64(_) => ValueType::F64, + } + } + + /// Return `Self` as `i32`. + pub fn as_i32(&self) -> Option { + match self { + Self::I32(val) => Some(*val), + _ => None, + } + } +} + +/// Provides `Sealed` trait to prevent implementing trait `PointerType` and `WasmTy` outside of this +/// crate. +mod private { + pub trait Sealed {} + + impl Sealed for u8 {} + impl Sealed for u16 {} + impl Sealed for u32 {} + impl Sealed for u64 {} + + impl Sealed for i32 {} + impl Sealed for i64 {} +} + +/// Something that can be wrapped in a wasm `Pointer`. +/// +/// This trait is sealed. +pub trait PointerType: Sized + private::Sealed { + /// The size of the type in wasm. + const SIZE: u32 = mem::size_of::() as u32; +} + +impl PointerType for u8 {} +impl PointerType for u16 {} +impl PointerType for u32 {} +impl PointerType for u64 {} + +/// Type to represent a pointer in wasm at the host. +#[derive(Debug, PartialEq, Eq)] +pub struct Pointer { + ptr: u32, + _marker: PhantomData, +} + +impl Copy for Pointer {} +impl Clone for Pointer { + fn clone(&self) -> Self { + Pointer { ptr: self.ptr, _marker: PhantomData } + } +} + +impl Pointer { + /// Create a new instance of `Self`. + pub fn new(ptr: u32) -> Self { + Self { ptr, _marker: Default::default() } + } + + /// Calculate the offset from this pointer. + /// + /// `offset` is in units of `T`. So, `3` means `3 * mem::size_of::()` as offset to the + /// pointer. + /// + /// Returns an `Option` to respect that the pointer could probably overflow. + pub fn offset(self, offset: u32) -> Option { + offset + .checked_mul(T::SIZE) + .and_then(|o| self.ptr.checked_add(o)) + .map(|ptr| Self { ptr, _marker: Default::default() }) + } + + /// Create a null pointer. + pub fn null() -> Self { + Self::new(0) + } + + /// Cast this pointer of type `T` to a pointer of type `R`. + pub fn cast(self) -> Pointer { + Pointer::new(self.ptr) + } +} + +impl From for Pointer { + fn from(ptr: u32) -> Self { + Pointer::new(ptr) + } +} + +impl From> for u32 { + fn from(ptr: Pointer) -> Self { + ptr.ptr + } +} + +impl From> for u64 { + fn from(ptr: Pointer) -> Self { + u64::from(ptr.ptr) + } +} + +impl From> for usize { + fn from(ptr: Pointer) -> Self { + ptr.ptr as _ + } +} + +impl IntoValue for Pointer { + const VALUE_TYPE: ValueType = ValueType::I32; + fn into_value(self) -> Value { + Value::I32(self.ptr as _) + } +} + +impl TryFromValue for Pointer { + fn try_from_value(val: Value) -> Option { + match val { + Value::I32(val) => Some(Self::new(val as _)), + _ => None, + } + } +} + +/// The word size used in wasm. Normally known as `usize` in Rust. +pub type WordSize = u32; + +/// The Signature of a function +#[derive(Eq, PartialEq, Debug, Clone)] +pub struct Signature { + /// The arguments of a function. + pub args: Cow<'static, [ValueType]>, + /// The optional return value of a function. + pub return_value: Option, +} + +impl Signature { + /// Create a new instance of `Signature`. + pub fn new>>( + args: T, + return_value: Option, + ) -> Self { + Self { args: args.into(), return_value } + } + + /// Create a new instance of `Signature` with the given `args` and without any return value. + pub fn new_with_args>>(args: T) -> Self { + Self { args: args.into(), return_value: None } + } +} + +/// A trait that requires `RefUnwindSafe` when `feature = std`. +#[cfg(feature = "std")] +pub trait MaybeRefUnwindSafe: std::panic::RefUnwindSafe {} +#[cfg(feature = "std")] +impl MaybeRefUnwindSafe for T {} + +/// A trait that requires `RefUnwindSafe` when `feature = std`. +#[cfg(not(feature = "std"))] +pub trait MaybeRefUnwindSafe {} +#[cfg(not(feature = "std"))] +impl MaybeRefUnwindSafe for T {} + +/// Something that provides a function implementation on the host for a wasm function. +pub trait Function: MaybeRefUnwindSafe + Send + Sync { + /// Returns the name of this function. + fn name(&self) -> &str; + /// Returns the signature of this function. + fn signature(&self) -> Signature; + /// Execute this function with the given arguments. + fn execute( + &self, + context: &mut dyn FunctionContext, + args: &mut dyn Iterator, + ) -> Result>; +} + +impl PartialEq for dyn Function { + fn eq(&self, other: &Self) -> bool { + other.name() == self.name() && other.signature() == self.signature() + } +} + +/// Context used by `Function` to interact with the allocator and the memory of the wasm instance. +pub trait FunctionContext { + /// Read memory from `address` into a vector. + fn read_memory(&self, address: Pointer, size: WordSize) -> Result> { + let mut vec = vec![0; size as usize]; + self.read_memory_into(address, &mut vec)?; + Ok(vec) + } + /// Read memory into the given `dest` buffer from `address`. + fn read_memory_into(&self, address: Pointer, dest: &mut [u8]) -> Result<()>; + /// Write the given data at `address` into the memory. + fn write_memory(&mut self, address: Pointer, data: &[u8]) -> Result<()>; + /// Allocate a memory instance of `size` bytes. + fn allocate_memory(&mut self, size: WordSize) -> Result>; + /// Deallocate a given memory instance. + fn deallocate_memory(&mut self, ptr: Pointer) -> Result<()>; + /// Registers a panic error message within the executor. + /// + /// This is meant to be used in situations where the runtime + /// encounters an unrecoverable error and intends to panic. + /// + /// Panicking in WASM is done through the [`unreachable`](https://webassembly.github.io/spec/core/syntax/instructions.html#syntax-instr-control) + /// instruction which causes an unconditional trap and immediately aborts + /// the execution. It does not however allow for any diagnostics to be + /// passed through to the host, so while we do know that *something* went + /// wrong we don't have any direct indication of what *exactly* went wrong. + /// + /// As a workaround we use this method right before the execution is + /// actually aborted to pass an error message to the host so that it + /// can associate it with the next trap, and return that to the caller. + /// + /// A WASM trap should be triggered immediately after calling this method; + /// otherwise the error message might be associated with a completely + /// unrelated trap. + /// + /// It should only be called once, however calling it more than once + /// is harmless and will overwrite the previously set error message. + fn register_panic_error_message(&mut self, message: &str); +} + +if_wasmtime_is_enabled! { + /// A trait used to statically register host callbacks with the WASM executor, + /// so that they call be called from within the runtime with minimal overhead. + /// + /// This is used internally to interface the wasmtime-based executor with the + /// host functions' definitions generated through the runtime interface macro, + /// and is not meant to be used directly. + pub trait HostFunctionRegistry { + type State: 'static; + type Error; + type FunctionContext: FunctionContext; + + /// Wraps the given `caller` in a type which implements `FunctionContext` + /// and calls the given `callback`. + fn with_function_context( + caller: wasmtime::Caller, + callback: impl FnOnce(&mut dyn FunctionContext) -> R, + ) -> R; + + /// Registers a given host function with the WASM executor. + /// + /// The function has to be statically callable, and all of its arguments + /// and its return value have to be compatible with WASM FFI. + fn register_static( + &mut self, + fn_name: &str, + func: impl wasmtime::IntoFunc + 'static, + ) -> core::result::Result<(), Self::Error>; + } +} + +/// Something that provides implementations for host functions. +pub trait HostFunctions: 'static + Send + Sync { + /// Returns the host functions `Self` provides. + fn host_functions() -> Vec<&'static dyn Function>; + + if_wasmtime_is_enabled! { + /// Statically registers the host functions. + fn register_static(registry: &mut T) -> core::result::Result<(), T::Error> + where + T: HostFunctionRegistry; + } +} + +#[impl_trait_for_tuples::impl_for_tuples(30)] +impl HostFunctions for Tuple { + fn host_functions() -> Vec<&'static dyn Function> { + let mut host_functions = Vec::new(); + + for_tuples!( #( host_functions.extend(Tuple::host_functions()); )* ); + + host_functions + } + + #[cfg(all(feature = "std", feature = "wasmtime"))] + fn register_static(registry: &mut T) -> core::result::Result<(), T::Error> + where + T: HostFunctionRegistry, + { + for_tuples!( + #( Tuple::register_static(registry)?; )* + ); + + Ok(()) + } +} + +/// A wrapper which merges two sets of host functions, and allows the second set to override +/// the host functions from the first set. +pub struct ExtendedHostFunctions { + phantom: PhantomData<(Base, Overlay)>, +} + +impl HostFunctions for ExtendedHostFunctions +where + Base: HostFunctions, + Overlay: HostFunctions, +{ + fn host_functions() -> Vec<&'static dyn Function> { + let mut base = Base::host_functions(); + let overlay = Overlay::host_functions(); + base.retain(|host_fn| { + !overlay.iter().any(|ext_host_fn| host_fn.name() == ext_host_fn.name()) + }); + base.extend(overlay); + base + } + + if_wasmtime_is_enabled! { + fn register_static(registry: &mut T) -> core::result::Result<(), T::Error> + where + T: HostFunctionRegistry, + { + struct Proxy<'a, T> { + registry: &'a mut T, + seen_overlay: std::collections::HashSet, + seen_base: std::collections::HashSet, + overlay_registered: bool, + } + + impl<'a, T> HostFunctionRegistry for Proxy<'a, T> + where + T: HostFunctionRegistry, + { + type State = T::State; + type Error = T::Error; + type FunctionContext = T::FunctionContext; + + fn with_function_context( + caller: wasmtime::Caller, + callback: impl FnOnce(&mut dyn FunctionContext) -> R, + ) -> R { + T::with_function_context(caller, callback) + } + + fn register_static( + &mut self, + fn_name: &str, + func: impl wasmtime::IntoFunc + 'static, + ) -> core::result::Result<(), Self::Error> { + if self.overlay_registered { + if !self.seen_base.insert(fn_name.to_owned()) { + log::warn!( + target: "extended_host_functions", + "Duplicate base host function: '{}'", + fn_name, + ); + + // TODO: Return an error here? + return Ok(()) + } + + if self.seen_overlay.contains(fn_name) { + // Was already registered when we went through the overlay, so just ignore it. + log::debug!( + target: "extended_host_functions", + "Overriding base host function: '{}'", + fn_name, + ); + + return Ok(()) + } + } else if !self.seen_overlay.insert(fn_name.to_owned()) { + log::warn!( + target: "extended_host_functions", + "Duplicate overlay host function: '{}'", + fn_name, + ); + + // TODO: Return an error here? + return Ok(()) + } + + self.registry.register_static(fn_name, func) + } + } + + let mut proxy = Proxy { + registry, + seen_overlay: Default::default(), + seen_base: Default::default(), + overlay_registered: false, + }; + + // The functions from the `Overlay` can override those from the `Base`, + // so `Overlay` is registered first, and then we skip those functions + // in `Base` if they were already registered from the `Overlay`. + Overlay::register_static(&mut proxy)?; + proxy.overlay_registered = true; + Base::register_static(&mut proxy)?; + + Ok(()) + } + } +} + +/// A trait for types directly usable at the WASM FFI boundary without any conversion at all. +/// +/// This trait is sealed and should not be implemented downstream. +#[cfg(all(feature = "std", feature = "wasmtime"))] +pub trait WasmTy: wasmtime::WasmTy + private::Sealed {} + +/// A trait for types directly usable at the WASM FFI boundary without any conversion at all. +/// +/// This trait is sealed and should not be implemented downstream. +#[cfg(not(all(feature = "std", feature = "wasmtime")))] +pub trait WasmTy: private::Sealed {} + +impl WasmTy for i32 {} +impl WasmTy for u32 {} +impl WasmTy for i64 {} +impl WasmTy for u64 {} + +/// Something that can be converted into a wasm compatible `Value`. +pub trait IntoValue { + /// The type of the value in wasm. + const VALUE_TYPE: ValueType; + + /// Convert `self` into a wasm `Value`. + fn into_value(self) -> Value; +} + +/// Something that can may be created from a wasm `Value`. +pub trait TryFromValue: Sized { + /// Try to convert the given `Value` into `Self`. + fn try_from_value(val: Value) -> Option; +} + +macro_rules! impl_into_and_from_value { + ( + $( + $type:ty, $( < $gen:ident >, )? $value_variant:ident, + )* + ) => { + $( + impl $( <$gen> )? IntoValue for $type { + const VALUE_TYPE: ValueType = ValueType::$value_variant; + fn into_value(self) -> Value { Value::$value_variant(self as _) } + } + + impl $( <$gen> )? TryFromValue for $type { + fn try_from_value(val: Value) -> Option { + match val { + Value::$value_variant(val) => Some(val as _), + _ => None, + } + } + } + )* + } +} + +impl_into_and_from_value! { + u8, I32, + u16, I32, + u32, I32, + u64, I64, + i8, I32, + i16, I32, + i32, I32, + i64, I64, +} + +/// Typed value that can be returned from a function. +/// +/// Basically a `TypedValue` plus `Unit`, for functions which return nothing. +#[derive(Clone, Copy, PartialEq, codec::Encode, codec::Decode, Debug)] +pub enum ReturnValue { + /// For returning nothing. + Unit, + /// For returning some concrete value. + Value(Value), +} + +impl From for ReturnValue { + fn from(v: Value) -> ReturnValue { + ReturnValue::Value(v) + } +} + +impl ReturnValue { + /// Maximum number of bytes `ReturnValue` might occupy when serialized with `SCALE`. + /// + /// Breakdown: + /// 1 byte for encoding unit/value variant + /// 1 byte for encoding value type + /// 8 bytes for encoding the biggest value types available in wasm: f64, i64. + pub const ENCODED_MAX_SIZE: usize = 10; +} + +#[cfg(test)] +mod tests { + use super::*; + use codec::Encode; + + #[test] + fn pointer_offset_works() { + let ptr = Pointer::::null(); + + assert_eq!(ptr.offset(10).unwrap(), Pointer::new(40)); + assert_eq!(ptr.offset(32).unwrap(), Pointer::new(128)); + + let ptr = Pointer::::null(); + + assert_eq!(ptr.offset(10).unwrap(), Pointer::new(80)); + assert_eq!(ptr.offset(32).unwrap(), Pointer::new(256)); + } + + #[test] + fn return_value_encoded_max_size() { + let encoded = ReturnValue::Value(Value::I64(-1)).encode(); + assert_eq!(encoded.len(), ReturnValue::ENCODED_MAX_SIZE); + } +} From 450615116c8aaa30a47f8e6134a1251421a518e0 Mon Sep 17 00:00:00 2001 From: illuzen Date: Mon, 3 Aug 2026 16:10:03 +0800 Subject: [PATCH 03/15] chore: bump vendored executor wasmtime to 36.0.13 Wire the vendored crates through [patch.crates-io], bump wasmtime 35.0.0 -> 36.0.13 (clearing Apr 2026 RustSec advisories), and drop upstream unit tests that need unpublished sc-runtime-test. Co-authored-by: Cursor --- Cargo.lock | 250 +- Cargo.toml | 4 + client/executor-wasmtime/Cargo.toml | 5 +- client/executor-wasmtime/README.md | 11 + client/executor-wasmtime/src/lib.rs | 4 +- .../src/test-guard-page-skip.wat | 2293 ----------------- client/executor-wasmtime/src/tests.rs | 522 ---- client/wasm-interface/Cargo.toml | 3 +- client/wasm-interface/README.md | 6 +- 9 files changed, 179 insertions(+), 2919 deletions(-) delete mode 100644 client/executor-wasmtime/src/test-guard-page-skip.wat delete mode 100644 client/executor-wasmtime/src/tests.rs diff --git a/Cargo.lock b/Cargo.lock index be295f61..48f6e31d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -18,7 +18,16 @@ version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" dependencies = [ - "gimli", + "gimli 0.31.1", +] + +[[package]] +name = "addr2line" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b" +dependencies = [ + "gimli 0.32.3", ] [[package]] @@ -800,11 +809,11 @@ version = "0.3.75" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" dependencies = [ - "addr2line", + "addr2line 0.24.2", "cfg-if", "libc", "miniz_oxide", - "object", + "object 0.36.7", "rustc-demangle", "windows-targets 0.52.6", ] @@ -1670,36 +1679,36 @@ dependencies = [ [[package]] name = "cranelift-assembler-x64" -version = "0.122.0" +version = "0.123.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ae7b60ec3fd7162427d3b3801520a1908bef7c035b52983cd3ca11b8e7deb51" +checksum = "5f8e1303ae2128891cb59691a74de4547dd208bc8511a2f287cca2b93bb3c728" dependencies = [ "cranelift-assembler-x64-meta", ] [[package]] name = "cranelift-assembler-x64-meta" -version = "0.122.0" +version = "0.123.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6511c200fed36452697b4b6b161eae57d917a2044e6333b1c1389ed63ccadeee" +checksum = "58b2740a5936332028d9a1e8f29a199de2fd386e426d44da5fea70cf8e3f8e75" dependencies = [ "cranelift-srcgen", ] [[package]] name = "cranelift-bforest" -version = "0.122.0" +version = "0.123.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f7086a645aa58bae979312f64e3029ac760ac1b577f5cd2417844842a2ca07f" +checksum = "37fd128d3629fb105e433bda09744c5a2959cd1da04617a455c4cc17dff1ebef" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-bitset" -version = "0.122.0" +version = "0.123.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5225b4dec45f3f3dbf383f12560fac5ce8d780f399893607e21406e12e77f491" +checksum = "24a88f6d5a6cf6fcbc6386415d48948094721dfa4585d6615938b11ca938f20a" dependencies = [ "serde", "serde_derive", @@ -1707,9 +1716,9 @@ dependencies = [ [[package]] name = "cranelift-codegen" -version = "0.122.0" +version = "0.123.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "858fb3331e53492a95979378d6df5208dd1d0d315f19c052be8115f4efc888e0" +checksum = "daa4a357d030bdd586d8fe3da56b394f7f6b6ded506e59f945e7b32b1e126b71" dependencies = [ "bumpalo", "cranelift-assembler-x64", @@ -1720,7 +1729,7 @@ dependencies = [ "cranelift-control", "cranelift-entity", "cranelift-isle", - "gimli", + "gimli 0.32.3", "hashbrown 0.15.5", "log", "pulley-interpreter", @@ -1734,36 +1743,37 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.122.0" +version = "0.123.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456715b9d5f12398f156d5081096e7b5d039f01b9ecc49790a011c8e43e65b5f" +checksum = "4121e36a8757dea6fb237435ee5095eba25bc13ecc2eaee57eb9bffd4b27784f" dependencies = [ "cranelift-assembler-x64-meta", "cranelift-codegen-shared", "cranelift-srcgen", + "heck 0.5.0", "pulley-interpreter", ] [[package]] name = "cranelift-codegen-shared" -version = "0.122.0" +version = "0.123.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0306041099499833f167a0ddb707e1e54100f1a84eab5631bc3dad249708f482" +checksum = "5173265fc30b9e42205cf06dfca9a272ee949667ce4115d975ed2c08d466e2f8" [[package]] name = "cranelift-control" -version = "0.122.0" +version = "0.123.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1672945e1f9afc2297f49c92623f5eabc64398e2cb0d824f8f72a2db2df5af23" +checksum = "9b6ca8a393e66dc13f915c6f456bdcf496d78fac4995792f7022b7806352d7a4" dependencies = [ "arbitrary", ] [[package]] name = "cranelift-entity" -version = "0.122.0" +version = "0.123.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa3cd55eb5f3825b9ae5de1530887907360a6334caccdc124c52f6d75246c98a" +checksum = "e609d9ba416bc26d774f343295a1d411515248a6a6d83d5f7492a0dd919569fa" dependencies = [ "cranelift-bitset", "serde", @@ -1772,9 +1782,9 @@ dependencies = [ [[package]] name = "cranelift-frontend" -version = "0.122.0" +version = "0.123.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "781f9905f8139b8de22987b66b522b416fe63eb76d823f0b3a8c02c8fd9500c7" +checksum = "90a3a277b1a0aff1123f6bae61c080a4bcb6df964829ed427f98e18dff14257f" dependencies = [ "cranelift-codegen", "log", @@ -1784,15 +1794,15 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.122.0" +version = "0.123.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a05337a2b02c3df00b4dd9a263a027a07b3dff49f61f7da3b5d195c21eaa633d" +checksum = "be53dd9b3a4cbeb9ced45c4a543ea8417ccfb334c3ba1cbb2233f4b25fb2531f" [[package]] name = "cranelift-native" -version = "0.122.0" +version = "0.123.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eee7a496dd66380082c9c5b6f2d5fa149cec0ec383feec5caf079ca2b3671c2" +checksum = "ca62ab1d9f48cad97da5843b913ccf96c3dfde935af5d750cb5a6d367ccfb262" dependencies = [ "cranelift-codegen", "libc", @@ -1801,9 +1811,9 @@ dependencies = [ [[package]] name = "cranelift-srcgen" -version = "0.122.0" +version = "0.123.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b530783809a55cb68d070e0de60cfbb3db0dc94c8850dd5725411422bedcf6bb" +checksum = "a13b72860f54a2a19d3756bd47575fd8bddeafd6e5bbbf16372cdfebc482628a" [[package]] name = "crc32fast" @@ -2274,7 +2284,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d162beedaa69905488a8da94f5ac3edb4dd4788b732fadb7bd120b2625c1976" dependencies = [ "data-encoding", - "syn 1.0.109", + "syn 2.0.119", ] [[package]] @@ -3621,6 +3631,16 @@ name = "gimli" version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" +dependencies = [ + "fallible-iterator", + "stable_deref_trait", +] + +[[package]] +name = "gimli" +version = "0.32.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7" dependencies = [ "fallible-iterator", "indexmap", @@ -5637,6 +5657,15 @@ name = "object" version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" +dependencies = [ + "memchr", +] + +[[package]] +name = "object" +version = "0.37.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe" dependencies = [ "crc32fast", "hashbrown 0.15.5", @@ -6903,10 +6932,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6739125c4f8f44b4282b6531d765d599f20514e9b608737c6c3544594d08f995" dependencies = [ "dirs", - "gimli", + "gimli 0.31.1", "hashbrown 0.14.5", "log", - "object", + "object 0.36.7", "polkavm-common 0.30.0", "regalloc2 0.9.3", "rustc-demangle", @@ -7381,9 +7410,9 @@ dependencies = [ [[package]] name = "pulley-interpreter" -version = "35.0.0" +version = "36.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b89c4319786b16c1a6a38ee04788d32c669b61ba4b69da2162c868c18be99c1b" +checksum = "2662666315cb90dfb4d99a652ee053d4d8598f71c474209e84da031ca56ae5a4" dependencies = [ "cranelift-bitset", "log", @@ -7393,9 +7422,9 @@ dependencies = [ [[package]] name = "pulley-macros" -version = "35.0.0" +version = "36.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "938543690519c20c3a480d20a8efcc8e69abeb44093ab1df4e7c1f81f26c677a" +checksum = "bb9a7d9ed2618f94b6d054aba3eb2768c9b489fe16b4ef8847fbc6ed41b707bb" dependencies = [ "proc-macro2", "quote", @@ -8917,18 +8946,21 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.43.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "825b33fc35931913d1308797321d65b4ef5eedd6b412af920c92d67d352dd388" dependencies = [ "anyhow", + "cargo_metadata", "log", + "parity-scale-codec", "parking_lot 0.12.4", + "paste", "rustix", "sc-allocator", "sc-executor-common", "sp-runtime-interface", "sp-wasm-interface", + "tempfile", "wasmtime", + "wat", ] [[package]] @@ -11018,8 +11050,6 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "24.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd177d0658f3df0492f28bd39d665133a7868db5aa66c8642c949b6265430719" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -12599,12 +12629,12 @@ dependencies = [ [[package]] name = "wasm-encoder" -version = "0.235.0" +version = "0.236.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3bc393c395cb621367ff02d854179882b9a351b4e0c93d1397e6090b53a5c2a" +checksum = "724fccfd4f3c24b7e589d333fc0429c68042897a7e8a5f8694f31792471841e7" dependencies = [ "leb128fmt", - "wasmparser 0.235.0", + "wasmparser 0.236.1", ] [[package]] @@ -12745,9 +12775,9 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.235.0" +version = "0.236.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "161296c618fa2d63f6ed5fffd1112937e803cb9ec71b32b01a76321555660917" +checksum = "a9b1e81f3eb254cf7404a82cee6926a4a3ccc5aad80cc3d43608a070c67aa1d7" dependencies = [ "bitflags 2.9.4", "hashbrown 0.15.5", @@ -12770,29 +12800,29 @@ dependencies = [ [[package]] name = "wasmprinter" -version = "0.235.0" +version = "0.236.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75aa8e9076de6b9544e6dab4badada518cca0bf4966d35b131bbd057aed8fa0a" +checksum = "2df225df06a6df15b46e3f73ca066ff92c2e023670969f7d50ce7d5e695abbb1" dependencies = [ "anyhow", "termcolor", - "wasmparser 0.235.0", + "wasmparser 0.236.1", ] [[package]] name = "wasmtime" -version = "35.0.0" +version = "36.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6fe976922a16af3b0d67172c473d1fd4f1aa5d0af9c8ba6538c741f3af686f4" +checksum = "93d881c5dcff5f230368d84fcf110ca25fe47badc694e7d559c3891492159916" dependencies = [ - "addr2line", + "addr2line 0.25.1", "anyhow", "bitflags 2.9.4", "bumpalo", "cc", "cfg-if", "fxprof-processed-profile", - "gimli", + "gimli 0.32.3", "hashbrown 0.15.5", "indexmap", "ittapi", @@ -12800,7 +12830,7 @@ dependencies = [ "log", "mach2", "memfd", - "object", + "object 0.37.3", "once_cell", "postcard", "pulley-interpreter", @@ -12811,7 +12841,7 @@ dependencies = [ "serde_json", "smallvec", "target-lexicon", - "wasmparser 0.235.0", + "wasmparser 0.236.1", "wasmtime-environ", "wasmtime-internal-asm-macros", "wasmtime-internal-cache", @@ -12824,48 +12854,48 @@ dependencies = [ "wasmtime-internal-unwinder", "wasmtime-internal-versioned-export-macros", "wasmtime-internal-winch", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] name = "wasmtime-environ" -version = "35.0.0" +version = "36.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44b6264a78d806924abbc76bbc75eac24976bc83bdfb938e5074ae551242436f" +checksum = "a4b25534a3ff9dd844701c2bc997f76cb1f97bf2af0546a7066ae96f49c2e068" dependencies = [ "anyhow", "cpp_demangle", "cranelift-bitset", "cranelift-entity", - "gimli", + "gimli 0.32.3", "indexmap", "log", - "object", + "object 0.37.3", "postcard", "rustc-demangle", "serde", "serde_derive", "smallvec", "target-lexicon", - "wasm-encoder 0.235.0", - "wasmparser 0.235.0", + "wasm-encoder 0.236.1", + "wasmparser 0.236.1", "wasmprinter", ] [[package]] name = "wasmtime-internal-asm-macros" -version = "35.0.0" +version = "36.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6775a9b516559716e5710e95a8014ca0adcc81e5bf4d3ad7899d89ae40094d1a" +checksum = "1d02832d760351fb3a1aa99eb8f7b95596c0f4e4e52df1547fcdb295ea5c780c" dependencies = [ "cfg-if", ] [[package]] name = "wasmtime-internal-cache" -version = "35.0.0" +version = "36.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e33ad4bd120f3b1c77d6d0dcdce0de8239555495befcda89393a40ba5e324" +checksum = "651f8a16b51cde3ee8bd5b775bcedc24b66040d7dca1f13ad855b10c660e1d01" dependencies = [ "anyhow", "base64", @@ -12877,15 +12907,15 @@ dependencies = [ "serde_derive", "sha2 0.10.9", "toml 0.8.23", - "windows-sys 0.59.0", + "windows-sys 0.60.2", "zstd 0.13.3", ] [[package]] name = "wasmtime-internal-cranelift" -version = "35.0.0" +version = "36.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ec9ad7565e6a8de7cb95484e230ff689db74a4a085219e0da0cbd637a29c01c" +checksum = "65821bab751956cddfc6ee957beb13a0e2a6cf682050d75dfb7a0228db2ed499" dependencies = [ "anyhow", "cfg-if", @@ -12894,15 +12924,15 @@ dependencies = [ "cranelift-entity", "cranelift-frontend", "cranelift-native", - "gimli", + "gimli 0.32.3", "itertools 0.14.0", "log", - "object", + "object 0.37.3", "pulley-interpreter", "smallvec", "target-lexicon", "thiserror 2.0.18", - "wasmparser 0.235.0", + "wasmparser 0.236.1", "wasmtime-environ", "wasmtime-internal-math", "wasmtime-internal-versioned-export-macros", @@ -12910,9 +12940,9 @@ dependencies = [ [[package]] name = "wasmtime-internal-fiber" -version = "35.0.0" +version = "36.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b636ff8b220ebaf29dfe3b23770e4b2bad317b9683e3bf7345e162387385b39" +checksum = "18cf73e5e8d28a2b30d86454430c7dea3b593598dcbbc0ebb927ca2716222d41" dependencies = [ "anyhow", "cc", @@ -12921,66 +12951,66 @@ dependencies = [ "rustix", "wasmtime-internal-asm-macros", "wasmtime-internal-versioned-export-macros", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] name = "wasmtime-internal-jit-debug" -version = "35.0.0" +version = "36.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61d8693995ab3df48e88777b6ee3b2f441f2c4f895ab938996cdac3db26f256c" +checksum = "4279dc3147ddaa21e5b3d2c0eaff117881c4f937747bdd2379eb361665843bd3" dependencies = [ "cc", - "object", + "object 0.37.3", "rustix", "wasmtime-internal-versioned-export-macros", ] [[package]] name = "wasmtime-internal-jit-icache-coherence" -version = "35.0.0" +version = "36.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4417e06b7f80baff87d9770852c757a39b8d7f11d78b2620ca992b8725f16f50" +checksum = "a8eb677944201839c0be19b39b0f19dcd663efbcbc05a09c73f26fec7bdf0331" dependencies = [ "anyhow", "cfg-if", "libc", - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] name = "wasmtime-internal-math" -version = "35.0.0" +version = "36.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7710d5c4ecdaa772927fd11e5dc30a9a62d1fc8fe933e11ad5576ad596ab6612" +checksum = "db9a153e184878df396a11f8912444531c2e4d0c7a1d9e9a52b30d9853d89cb9" dependencies = [ "libm", ] [[package]] name = "wasmtime-internal-slab" -version = "35.0.0" +version = "36.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6ab22fabe1eed27ab01fd47cd89deacf43ad222ed7fd169ba6f4dd1fbddc53b" +checksum = "b771494bead25e1f0c4c89a9476dd0b65eacca314ed82125f1e197fbc3f0396b" [[package]] name = "wasmtime-internal-unwinder" -version = "35.0.0" +version = "36.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "307708f302f5dcf19c1bbbfb3d9f2cbc837dd18088a7988747b043a46ba38ecc" +checksum = "90199caed6925420434a923861d8ad813689ca8533d2c679f805d12e35b40a4b" dependencies = [ "anyhow", "cfg-if", "cranelift-codegen", "log", - "object", + "object 0.37.3", ] [[package]] name = "wasmtime-internal-versioned-export-macros" -version = "35.0.0" +version = "36.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "342b0466f92b7217a4de9e114175fedee1907028567d2548bcd42f71a8b5b016" +checksum = "ae71687aa834f9cc9eb5b0f97c85184d7dc70b84d32fd8927af0887998a1ba35" dependencies = [ "proc-macro2", "quote", @@ -12989,21 +13019,43 @@ dependencies = [ [[package]] name = "wasmtime-internal-winch" -version = "35.0.0" +version = "36.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2012e7384c25b91aab2f1b6a1e1cbab9d0f199bbea06cc873597a3f047f05730" +checksum = "5d0ba45c0d766dd56257d97702d3284b6f69efdd4c53ca981a0754cc0a139df0" dependencies = [ "anyhow", "cranelift-codegen", - "gimli", - "object", + "gimli 0.32.3", + "object 0.37.3", "target-lexicon", - "wasmparser 0.235.0", + "wasmparser 0.236.1", "wasmtime-environ", "wasmtime-internal-cranelift", "winch-codegen", ] +[[package]] +name = "wast" +version = "244.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2e7b9f9e23311275920e3d6b56d64137c160cf8af4f84a7283b36cfecbf4acb" +dependencies = [ + "bumpalo", + "leb128fmt", + "memchr", + "unicode-width", + "wasm-encoder 0.244.0", +] + +[[package]] +name = "wat" +version = "1.244.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbf35b87ed352f9ab6cd0732abde5a67dd6153dfd02c493e61459218b19456fa" +dependencies = [ + "wast", +] + [[package]] name = "web-sys" version = "0.3.80" @@ -13091,19 +13143,19 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "winch-codegen" -version = "35.0.0" +version = "36.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "839a334ef7c62d8368dbd427e767a6fbb1ba08cc12ecce19cbb666c10613b585" +checksum = "82ea9625459ce35d6a4188cf0f07c9095cbb0e5afd86f711d63955bfc4216e64" dependencies = [ "anyhow", "cranelift-assembler-x64", "cranelift-codegen", - "gimli", + "gimli 0.32.3", "regalloc2 0.12.2", "smallvec", "target-lexicon", "thiserror 2.0.18", - "wasmparser 0.235.0", + "wasmparser 0.236.1", "wasmtime-environ", "wasmtime-internal-cranelift", "wasmtime-internal-math", diff --git a/Cargo.toml b/Cargo.toml index 2145aac0..84f1fee2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,6 +9,7 @@ repository = "https://github.com/quantus-network/chain#" members = [ "client/cli", "client/consensus/qpow", + "client/executor-wasmtime", "client/informant", "client/litep2p", "client/network", @@ -17,6 +18,7 @@ members = [ "client/service", "client/telemetry", "client/transaction-pool", + "client/wasm-interface", "frame/benchmarking", "frame/executive", "frame/metadata", @@ -350,6 +352,7 @@ pallet-transaction-payment = { path = "./pallets/transaction-payment" } pallet-transaction-payment-rpc = { path = "./pallets/transaction-payment-rpc" } pallet-transaction-payment-rpc-runtime-api = { path = "./pallets/transaction-payment-rpc-runtime-api" } sc-cli = { path = "./client/cli" } +sc-executor-wasmtime = { path = "./client/executor-wasmtime" } sc-informant = { path = "./client/informant" } sc-network = { path = "client/network" } sc-network-sync = { path = "client/network-sync" } @@ -357,6 +360,7 @@ sc-network-types = { path = "client/network-types" } sc-service = { path = "client/service" } sc-telemetry = { path = "client/telemetry" } sc-transaction-pool = { path = "client/transaction-pool" } +sp-wasm-interface = { path = "./client/wasm-interface" } [profile.release] opt-level = 3 diff --git a/client/executor-wasmtime/Cargo.toml b/client/executor-wasmtime/Cargo.toml index 34e9a9d0..0aab6bf2 100644 --- a/client/executor-wasmtime/Cargo.toml +++ b/client/executor-wasmtime/Cargo.toml @@ -85,9 +85,12 @@ features = [ "parallel-compilation", "pooling-allocator", "profiling", + "runtime", + "std", "threads", ] -version = "35.0.0" +# Quantus: bump 35.0.0 -> 36.0.13 for Apr 2026 RustSec advisories (no patched 35.x). +version = "36.0.13" [dev-dependencies.cargo_metadata] version = "0.15.4" diff --git a/client/executor-wasmtime/README.md b/client/executor-wasmtime/README.md index 64fc2fa0..fd652d59 100644 --- a/client/executor-wasmtime/README.md +++ b/client/executor-wasmtime/README.md @@ -1 +1,12 @@ +# sc-executor-wasmtime (vendored) + +Vendored from crates.io `sc-executor-wasmtime` **0.43.0**, then patched to use +`wasmtime` **36.0.13** (was 35.0.0) so Apr 2026 RustSec advisories clear without +a full Substrate client bump. + +Upstream bump reference: [paritytech/polkadot-sdk#11793](https://github.com/paritytech/polkadot-sdk/pull/11793). + +Upstream unit tests that require `sc-runtime-test` are omitted; the node +exercises this crate through `sc-executor`. + License: GPL-3.0-or-later WITH Classpath-exception-2.0 diff --git a/client/executor-wasmtime/src/lib.rs b/client/executor-wasmtime/src/lib.rs index 54e97899..02bde5e8 100644 --- a/client/executor-wasmtime/src/lib.rs +++ b/client/executor-wasmtime/src/lib.rs @@ -34,8 +34,8 @@ mod instance_wrapper; mod runtime; mod util; -#[cfg(test)] -mod tests; +// Quantus: upstream unit tests require unpublished sc-runtime-test; omit here. +// The node exercises this crate through sc-executor. pub use runtime::{ create_runtime, create_runtime_from_artifact, create_runtime_from_artifact_bytes, diff --git a/client/executor-wasmtime/src/test-guard-page-skip.wat b/client/executor-wasmtime/src/test-guard-page-skip.wat deleted file mode 100644 index 2f7339d4..00000000 --- a/client/executor-wasmtime/src/test-guard-page-skip.wat +++ /dev/null @@ -1,2293 +0,0 @@ -;; This file is a modified version of -;; https://github.com/WebAssembly/testsuite/blob/01efde81028c5b0d099eb836645a2dc5e7755449/skip-stack-guard-page.wast -;; Licensed Apache 2.0 https://github.com/WebAssembly/testsuite/blob/01efde81028c5b0d099eb836645a2dc5e7755449/LICENSE - -;; This wasm module implements a Substrate Runtime with one entrypoint: `test-many-locals`. This -;; entrypoint does not take any parameters nor returns a result. Each execution should end up with -;; a stack overflow trap. -;; -;; What it does is essentially a recursive call. The function that recurses into itself declares -;; lots of local variables. It reads into each local at the corresponding offset, recurses into itself -;; and then writes the contents of the locals back into the memory at the same offset. -;; -;; The original purpose of this file in the test suite is to test skipping the guard page (hence the -;; size 256 + 4096 + 4096). However, what's important here is to just an infinite recursion with -;; many locals. -;; -;; NOTE That memory accesses are put there in an attempt to prevent eliminating the dead locals. -;; At the moment of writing, wasmtime should be dumb enough to be tricked into thinking that the code -;; does something. - -(module - (import "env" "memory" (memory 1)) - (export "test-many-locals" (func $test-many-locals)) - - ;; The heap base is chosen so that the heap doesn't overlap with the data below. - (global (export "__heap_base") i32 (i32.const 8448)) - - (func $test-many-locals - (param i32 i32) (result i64) - (call $function-with-many-locals) - (i64.const 0) - ) - - (func $function-with-many-locals - - ;; 1056 i64 = 8448 bytes of locals - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x000-0x007 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x008-0x00f - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x010-0x017 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x018-0x01f - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x020-0x027 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x028-0x02f - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x030-0x037 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x038-0x03f - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x040-0x047 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x048-0x04f - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x050-0x057 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x058-0x05f - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x060-0x067 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x068-0x06f - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x070-0x077 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x078-0x07f - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x080-0x087 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x088-0x08f - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x090-0x097 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x098-0x09f - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0a0-0x0a7 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0a8-0x0af - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0b0-0x0b7 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0b8-0x0bf - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0c0-0x0c7 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0c8-0x0cf - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0d0-0x0d7 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0d8-0x0df - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0e0-0x0e7 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0e8-0x0ef - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0f0-0x0f7 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0f8-0x0ff - - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x100-0x107 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x108-0x10f - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x110-0x117 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x118-0x11f - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x120-0x127 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x128-0x12f - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x130-0x137 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x138-0x13f - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x140-0x147 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x148-0x14f - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x150-0x157 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x158-0x15f - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x160-0x167 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x168-0x16f - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x170-0x177 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x178-0x17f - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x180-0x187 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x188-0x18f - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x190-0x197 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x198-0x19f - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1a0-0x1a7 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1a8-0x1af - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1b0-0x1b7 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1b8-0x1bf - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1c0-0x1c7 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1c8-0x1cf - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1d0-0x1d7 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1d8-0x1df - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1e0-0x1e7 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1e8-0x1ef - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1f0-0x1f7 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1f8-0x1ff - - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x200-0x207 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x208-0x20f - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x210-0x217 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x218-0x21f - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x220-0x227 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x228-0x22f - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x230-0x237 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x238-0x23f - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x240-0x247 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x248-0x24f - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x250-0x257 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x258-0x25f - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x260-0x267 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x268-0x26f - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x270-0x277 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x278-0x27f - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x280-0x287 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x288-0x28f - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x290-0x297 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x298-0x29f - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2a0-0x2a7 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2a8-0x2af - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2b0-0x2b7 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2b8-0x2bf - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2c0-0x2c7 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2c8-0x2cf - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2d0-0x2d7 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2d8-0x2df - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2e0-0x2e7 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2e8-0x2ef - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2f0-0x2f7 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2f8-0x2ff - - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x300-0x307 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x308-0x30f - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x310-0x317 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x318-0x31f - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x320-0x327 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x328-0x32f - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x330-0x337 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x338-0x33f - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x340-0x347 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x348-0x34f - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x350-0x357 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x358-0x35f - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x360-0x367 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x368-0x36f - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x370-0x377 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x378-0x37f - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x380-0x387 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x388-0x38f - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x390-0x397 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x398-0x39f - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3a0-0x3a7 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3a8-0x3af - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3b0-0x3b7 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3b8-0x3bf - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3c0-0x3c7 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3c8-0x3cf - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3d0-0x3d7 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3d8-0x3df - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3e0-0x3e7 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3e8-0x3ef - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3f0-0x3f7 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3f8-0x3ff - - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x400-0x407 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x408-0x40f - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x410-0x417 - (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x418-0x41f - - ;; recurse first to try to make the callee access the stack below the space allocated for the locals before the locals themselves have been initialized. - (call $function-with-many-locals) - - ;; load from memory into the locals. - (local.set 0x000 (i64.load offset=0x000 align=1 (i32.const 0))) - (local.set 0x001 (i64.load offset=0x001 align=1 (i32.const 0))) - (local.set 0x002 (i64.load offset=0x002 align=1 (i32.const 0))) - (local.set 0x003 (i64.load offset=0x003 align=1 (i32.const 0))) - (local.set 0x004 (i64.load offset=0x004 align=1 (i32.const 0))) - (local.set 0x005 (i64.load offset=0x005 align=1 (i32.const 0))) - (local.set 0x006 (i64.load offset=0x006 align=1 (i32.const 0))) - (local.set 0x007 (i64.load offset=0x007 align=1 (i32.const 0))) - (local.set 0x008 (i64.load offset=0x008 align=1 (i32.const 0))) - (local.set 0x009 (i64.load offset=0x009 align=1 (i32.const 0))) - (local.set 0x00a (i64.load offset=0x00a align=1 (i32.const 0))) - (local.set 0x00b (i64.load offset=0x00b align=1 (i32.const 0))) - (local.set 0x00c (i64.load offset=0x00c align=1 (i32.const 0))) - (local.set 0x00d (i64.load offset=0x00d align=1 (i32.const 0))) - (local.set 0x00e (i64.load offset=0x00e align=1 (i32.const 0))) - (local.set 0x00f (i64.load offset=0x00f align=1 (i32.const 0))) - (local.set 0x010 (i64.load offset=0x010 align=1 (i32.const 0))) - (local.set 0x011 (i64.load offset=0x011 align=1 (i32.const 0))) - (local.set 0x012 (i64.load offset=0x012 align=1 (i32.const 0))) - (local.set 0x013 (i64.load offset=0x013 align=1 (i32.const 0))) - (local.set 0x014 (i64.load offset=0x014 align=1 (i32.const 0))) - (local.set 0x015 (i64.load offset=0x015 align=1 (i32.const 0))) - (local.set 0x016 (i64.load offset=0x016 align=1 (i32.const 0))) - (local.set 0x017 (i64.load offset=0x017 align=1 (i32.const 0))) - (local.set 0x018 (i64.load offset=0x018 align=1 (i32.const 0))) - (local.set 0x019 (i64.load offset=0x019 align=1 (i32.const 0))) - (local.set 0x01a (i64.load offset=0x01a align=1 (i32.const 0))) - (local.set 0x01b (i64.load offset=0x01b align=1 (i32.const 0))) - (local.set 0x01c (i64.load offset=0x01c align=1 (i32.const 0))) - (local.set 0x01d (i64.load offset=0x01d align=1 (i32.const 0))) - (local.set 0x01e (i64.load offset=0x01e align=1 (i32.const 0))) - (local.set 0x01f (i64.load offset=0x01f align=1 (i32.const 0))) - (local.set 0x020 (i64.load offset=0x020 align=1 (i32.const 0))) - (local.set 0x021 (i64.load offset=0x021 align=1 (i32.const 0))) - (local.set 0x022 (i64.load offset=0x022 align=1 (i32.const 0))) - (local.set 0x023 (i64.load offset=0x023 align=1 (i32.const 0))) - (local.set 0x024 (i64.load offset=0x024 align=1 (i32.const 0))) - (local.set 0x025 (i64.load offset=0x025 align=1 (i32.const 0))) - (local.set 0x026 (i64.load offset=0x026 align=1 (i32.const 0))) - (local.set 0x027 (i64.load offset=0x027 align=1 (i32.const 0))) - (local.set 0x028 (i64.load offset=0x028 align=1 (i32.const 0))) - (local.set 0x029 (i64.load offset=0x029 align=1 (i32.const 0))) - (local.set 0x02a (i64.load offset=0x02a align=1 (i32.const 0))) - (local.set 0x02b (i64.load offset=0x02b align=1 (i32.const 0))) - (local.set 0x02c (i64.load offset=0x02c align=1 (i32.const 0))) - (local.set 0x02d (i64.load offset=0x02d align=1 (i32.const 0))) - (local.set 0x02e (i64.load offset=0x02e align=1 (i32.const 0))) - (local.set 0x02f (i64.load offset=0x02f align=1 (i32.const 0))) - (local.set 0x030 (i64.load offset=0x030 align=1 (i32.const 0))) - (local.set 0x031 (i64.load offset=0x031 align=1 (i32.const 0))) - (local.set 0x032 (i64.load offset=0x032 align=1 (i32.const 0))) - (local.set 0x033 (i64.load offset=0x033 align=1 (i32.const 0))) - (local.set 0x034 (i64.load offset=0x034 align=1 (i32.const 0))) - (local.set 0x035 (i64.load offset=0x035 align=1 (i32.const 0))) - (local.set 0x036 (i64.load offset=0x036 align=1 (i32.const 0))) - (local.set 0x037 (i64.load offset=0x037 align=1 (i32.const 0))) - (local.set 0x038 (i64.load offset=0x038 align=1 (i32.const 0))) - (local.set 0x039 (i64.load offset=0x039 align=1 (i32.const 0))) - (local.set 0x03a (i64.load offset=0x03a align=1 (i32.const 0))) - (local.set 0x03b (i64.load offset=0x03b align=1 (i32.const 0))) - (local.set 0x03c (i64.load offset=0x03c align=1 (i32.const 0))) - (local.set 0x03d (i64.load offset=0x03d align=1 (i32.const 0))) - (local.set 0x03e (i64.load offset=0x03e align=1 (i32.const 0))) - (local.set 0x03f (i64.load offset=0x03f align=1 (i32.const 0))) - (local.set 0x040 (i64.load offset=0x040 align=1 (i32.const 0))) - (local.set 0x041 (i64.load offset=0x041 align=1 (i32.const 0))) - (local.set 0x042 (i64.load offset=0x042 align=1 (i32.const 0))) - (local.set 0x043 (i64.load offset=0x043 align=1 (i32.const 0))) - (local.set 0x044 (i64.load offset=0x044 align=1 (i32.const 0))) - (local.set 0x045 (i64.load offset=0x045 align=1 (i32.const 0))) - (local.set 0x046 (i64.load offset=0x046 align=1 (i32.const 0))) - (local.set 0x047 (i64.load offset=0x047 align=1 (i32.const 0))) - (local.set 0x048 (i64.load offset=0x048 align=1 (i32.const 0))) - (local.set 0x049 (i64.load offset=0x049 align=1 (i32.const 0))) - (local.set 0x04a (i64.load offset=0x04a align=1 (i32.const 0))) - (local.set 0x04b (i64.load offset=0x04b align=1 (i32.const 0))) - (local.set 0x04c (i64.load offset=0x04c align=1 (i32.const 0))) - (local.set 0x04d (i64.load offset=0x04d align=1 (i32.const 0))) - (local.set 0x04e (i64.load offset=0x04e align=1 (i32.const 0))) - (local.set 0x04f (i64.load offset=0x04f align=1 (i32.const 0))) - (local.set 0x050 (i64.load offset=0x050 align=1 (i32.const 0))) - (local.set 0x051 (i64.load offset=0x051 align=1 (i32.const 0))) - (local.set 0x052 (i64.load offset=0x052 align=1 (i32.const 0))) - (local.set 0x053 (i64.load offset=0x053 align=1 (i32.const 0))) - (local.set 0x054 (i64.load offset=0x054 align=1 (i32.const 0))) - (local.set 0x055 (i64.load offset=0x055 align=1 (i32.const 0))) - (local.set 0x056 (i64.load offset=0x056 align=1 (i32.const 0))) - (local.set 0x057 (i64.load offset=0x057 align=1 (i32.const 0))) - (local.set 0x058 (i64.load offset=0x058 align=1 (i32.const 0))) - (local.set 0x059 (i64.load offset=0x059 align=1 (i32.const 0))) - (local.set 0x05a (i64.load offset=0x05a align=1 (i32.const 0))) - (local.set 0x05b (i64.load offset=0x05b align=1 (i32.const 0))) - (local.set 0x05c (i64.load offset=0x05c align=1 (i32.const 0))) - (local.set 0x05d (i64.load offset=0x05d align=1 (i32.const 0))) - (local.set 0x05e (i64.load offset=0x05e align=1 (i32.const 0))) - (local.set 0x05f (i64.load offset=0x05f align=1 (i32.const 0))) - (local.set 0x060 (i64.load offset=0x060 align=1 (i32.const 0))) - (local.set 0x061 (i64.load offset=0x061 align=1 (i32.const 0))) - (local.set 0x062 (i64.load offset=0x062 align=1 (i32.const 0))) - (local.set 0x063 (i64.load offset=0x063 align=1 (i32.const 0))) - (local.set 0x064 (i64.load offset=0x064 align=1 (i32.const 0))) - (local.set 0x065 (i64.load offset=0x065 align=1 (i32.const 0))) - (local.set 0x066 (i64.load offset=0x066 align=1 (i32.const 0))) - (local.set 0x067 (i64.load offset=0x067 align=1 (i32.const 0))) - (local.set 0x068 (i64.load offset=0x068 align=1 (i32.const 0))) - (local.set 0x069 (i64.load offset=0x069 align=1 (i32.const 0))) - (local.set 0x06a (i64.load offset=0x06a align=1 (i32.const 0))) - (local.set 0x06b (i64.load offset=0x06b align=1 (i32.const 0))) - (local.set 0x06c (i64.load offset=0x06c align=1 (i32.const 0))) - (local.set 0x06d (i64.load offset=0x06d align=1 (i32.const 0))) - (local.set 0x06e (i64.load offset=0x06e align=1 (i32.const 0))) - (local.set 0x06f (i64.load offset=0x06f align=1 (i32.const 0))) - (local.set 0x070 (i64.load offset=0x070 align=1 (i32.const 0))) - (local.set 0x071 (i64.load offset=0x071 align=1 (i32.const 0))) - (local.set 0x072 (i64.load offset=0x072 align=1 (i32.const 0))) - (local.set 0x073 (i64.load offset=0x073 align=1 (i32.const 0))) - (local.set 0x074 (i64.load offset=0x074 align=1 (i32.const 0))) - (local.set 0x075 (i64.load offset=0x075 align=1 (i32.const 0))) - (local.set 0x076 (i64.load offset=0x076 align=1 (i32.const 0))) - (local.set 0x077 (i64.load offset=0x077 align=1 (i32.const 0))) - (local.set 0x078 (i64.load offset=0x078 align=1 (i32.const 0))) - (local.set 0x079 (i64.load offset=0x079 align=1 (i32.const 0))) - (local.set 0x07a (i64.load offset=0x07a align=1 (i32.const 0))) - (local.set 0x07b (i64.load offset=0x07b align=1 (i32.const 0))) - (local.set 0x07c (i64.load offset=0x07c align=1 (i32.const 0))) - (local.set 0x07d (i64.load offset=0x07d align=1 (i32.const 0))) - (local.set 0x07e (i64.load offset=0x07e align=1 (i32.const 0))) - (local.set 0x07f (i64.load offset=0x07f align=1 (i32.const 0))) - (local.set 0x080 (i64.load offset=0x080 align=1 (i32.const 0))) - (local.set 0x081 (i64.load offset=0x081 align=1 (i32.const 0))) - (local.set 0x082 (i64.load offset=0x082 align=1 (i32.const 0))) - (local.set 0x083 (i64.load offset=0x083 align=1 (i32.const 0))) - (local.set 0x084 (i64.load offset=0x084 align=1 (i32.const 0))) - (local.set 0x085 (i64.load offset=0x085 align=1 (i32.const 0))) - (local.set 0x086 (i64.load offset=0x086 align=1 (i32.const 0))) - (local.set 0x087 (i64.load offset=0x087 align=1 (i32.const 0))) - (local.set 0x088 (i64.load offset=0x088 align=1 (i32.const 0))) - (local.set 0x089 (i64.load offset=0x089 align=1 (i32.const 0))) - (local.set 0x08a (i64.load offset=0x08a align=1 (i32.const 0))) - (local.set 0x08b (i64.load offset=0x08b align=1 (i32.const 0))) - (local.set 0x08c (i64.load offset=0x08c align=1 (i32.const 0))) - (local.set 0x08d (i64.load offset=0x08d align=1 (i32.const 0))) - (local.set 0x08e (i64.load offset=0x08e align=1 (i32.const 0))) - (local.set 0x08f (i64.load offset=0x08f align=1 (i32.const 0))) - (local.set 0x090 (i64.load offset=0x090 align=1 (i32.const 0))) - (local.set 0x091 (i64.load offset=0x091 align=1 (i32.const 0))) - (local.set 0x092 (i64.load offset=0x092 align=1 (i32.const 0))) - (local.set 0x093 (i64.load offset=0x093 align=1 (i32.const 0))) - (local.set 0x094 (i64.load offset=0x094 align=1 (i32.const 0))) - (local.set 0x095 (i64.load offset=0x095 align=1 (i32.const 0))) - (local.set 0x096 (i64.load offset=0x096 align=1 (i32.const 0))) - (local.set 0x097 (i64.load offset=0x097 align=1 (i32.const 0))) - (local.set 0x098 (i64.load offset=0x098 align=1 (i32.const 0))) - (local.set 0x099 (i64.load offset=0x099 align=1 (i32.const 0))) - (local.set 0x09a (i64.load offset=0x09a align=1 (i32.const 0))) - (local.set 0x09b (i64.load offset=0x09b align=1 (i32.const 0))) - (local.set 0x09c (i64.load offset=0x09c align=1 (i32.const 0))) - (local.set 0x09d (i64.load offset=0x09d align=1 (i32.const 0))) - (local.set 0x09e (i64.load offset=0x09e align=1 (i32.const 0))) - (local.set 0x09f (i64.load offset=0x09f align=1 (i32.const 0))) - (local.set 0x0a0 (i64.load offset=0x0a0 align=1 (i32.const 0))) - (local.set 0x0a1 (i64.load offset=0x0a1 align=1 (i32.const 0))) - (local.set 0x0a2 (i64.load offset=0x0a2 align=1 (i32.const 0))) - (local.set 0x0a3 (i64.load offset=0x0a3 align=1 (i32.const 0))) - (local.set 0x0a4 (i64.load offset=0x0a4 align=1 (i32.const 0))) - (local.set 0x0a5 (i64.load offset=0x0a5 align=1 (i32.const 0))) - (local.set 0x0a6 (i64.load offset=0x0a6 align=1 (i32.const 0))) - (local.set 0x0a7 (i64.load offset=0x0a7 align=1 (i32.const 0))) - (local.set 0x0a8 (i64.load offset=0x0a8 align=1 (i32.const 0))) - (local.set 0x0a9 (i64.load offset=0x0a9 align=1 (i32.const 0))) - (local.set 0x0aa (i64.load offset=0x0aa align=1 (i32.const 0))) - (local.set 0x0ab (i64.load offset=0x0ab align=1 (i32.const 0))) - (local.set 0x0ac (i64.load offset=0x0ac align=1 (i32.const 0))) - (local.set 0x0ad (i64.load offset=0x0ad align=1 (i32.const 0))) - (local.set 0x0ae (i64.load offset=0x0ae align=1 (i32.const 0))) - (local.set 0x0af (i64.load offset=0x0af align=1 (i32.const 0))) - (local.set 0x0b0 (i64.load offset=0x0b0 align=1 (i32.const 0))) - (local.set 0x0b1 (i64.load offset=0x0b1 align=1 (i32.const 0))) - (local.set 0x0b2 (i64.load offset=0x0b2 align=1 (i32.const 0))) - (local.set 0x0b3 (i64.load offset=0x0b3 align=1 (i32.const 0))) - (local.set 0x0b4 (i64.load offset=0x0b4 align=1 (i32.const 0))) - (local.set 0x0b5 (i64.load offset=0x0b5 align=1 (i32.const 0))) - (local.set 0x0b6 (i64.load offset=0x0b6 align=1 (i32.const 0))) - (local.set 0x0b7 (i64.load offset=0x0b7 align=1 (i32.const 0))) - (local.set 0x0b8 (i64.load offset=0x0b8 align=1 (i32.const 0))) - (local.set 0x0b9 (i64.load offset=0x0b9 align=1 (i32.const 0))) - (local.set 0x0ba (i64.load offset=0x0ba align=1 (i32.const 0))) - (local.set 0x0bb (i64.load offset=0x0bb align=1 (i32.const 0))) - (local.set 0x0bc (i64.load offset=0x0bc align=1 (i32.const 0))) - (local.set 0x0bd (i64.load offset=0x0bd align=1 (i32.const 0))) - (local.set 0x0be (i64.load offset=0x0be align=1 (i32.const 0))) - (local.set 0x0bf (i64.load offset=0x0bf align=1 (i32.const 0))) - (local.set 0x0c0 (i64.load offset=0x0c0 align=1 (i32.const 0))) - (local.set 0x0c1 (i64.load offset=0x0c1 align=1 (i32.const 0))) - (local.set 0x0c2 (i64.load offset=0x0c2 align=1 (i32.const 0))) - (local.set 0x0c3 (i64.load offset=0x0c3 align=1 (i32.const 0))) - (local.set 0x0c4 (i64.load offset=0x0c4 align=1 (i32.const 0))) - (local.set 0x0c5 (i64.load offset=0x0c5 align=1 (i32.const 0))) - (local.set 0x0c6 (i64.load offset=0x0c6 align=1 (i32.const 0))) - (local.set 0x0c7 (i64.load offset=0x0c7 align=1 (i32.const 0))) - (local.set 0x0c8 (i64.load offset=0x0c8 align=1 (i32.const 0))) - (local.set 0x0c9 (i64.load offset=0x0c9 align=1 (i32.const 0))) - (local.set 0x0ca (i64.load offset=0x0ca align=1 (i32.const 0))) - (local.set 0x0cb (i64.load offset=0x0cb align=1 (i32.const 0))) - (local.set 0x0cc (i64.load offset=0x0cc align=1 (i32.const 0))) - (local.set 0x0cd (i64.load offset=0x0cd align=1 (i32.const 0))) - (local.set 0x0ce (i64.load offset=0x0ce align=1 (i32.const 0))) - (local.set 0x0cf (i64.load offset=0x0cf align=1 (i32.const 0))) - (local.set 0x0d0 (i64.load offset=0x0d0 align=1 (i32.const 0))) - (local.set 0x0d1 (i64.load offset=0x0d1 align=1 (i32.const 0))) - (local.set 0x0d2 (i64.load offset=0x0d2 align=1 (i32.const 0))) - (local.set 0x0d3 (i64.load offset=0x0d3 align=1 (i32.const 0))) - (local.set 0x0d4 (i64.load offset=0x0d4 align=1 (i32.const 0))) - (local.set 0x0d5 (i64.load offset=0x0d5 align=1 (i32.const 0))) - (local.set 0x0d6 (i64.load offset=0x0d6 align=1 (i32.const 0))) - (local.set 0x0d7 (i64.load offset=0x0d7 align=1 (i32.const 0))) - (local.set 0x0d8 (i64.load offset=0x0d8 align=1 (i32.const 0))) - (local.set 0x0d9 (i64.load offset=0x0d9 align=1 (i32.const 0))) - (local.set 0x0da (i64.load offset=0x0da align=1 (i32.const 0))) - (local.set 0x0db (i64.load offset=0x0db align=1 (i32.const 0))) - (local.set 0x0dc (i64.load offset=0x0dc align=1 (i32.const 0))) - (local.set 0x0dd (i64.load offset=0x0dd align=1 (i32.const 0))) - (local.set 0x0de (i64.load offset=0x0de align=1 (i32.const 0))) - (local.set 0x0df (i64.load offset=0x0df align=1 (i32.const 0))) - (local.set 0x0e0 (i64.load offset=0x0e0 align=1 (i32.const 0))) - (local.set 0x0e1 (i64.load offset=0x0e1 align=1 (i32.const 0))) - (local.set 0x0e2 (i64.load offset=0x0e2 align=1 (i32.const 0))) - (local.set 0x0e3 (i64.load offset=0x0e3 align=1 (i32.const 0))) - (local.set 0x0e4 (i64.load offset=0x0e4 align=1 (i32.const 0))) - (local.set 0x0e5 (i64.load offset=0x0e5 align=1 (i32.const 0))) - (local.set 0x0e6 (i64.load offset=0x0e6 align=1 (i32.const 0))) - (local.set 0x0e7 (i64.load offset=0x0e7 align=1 (i32.const 0))) - (local.set 0x0e8 (i64.load offset=0x0e8 align=1 (i32.const 0))) - (local.set 0x0e9 (i64.load offset=0x0e9 align=1 (i32.const 0))) - (local.set 0x0ea (i64.load offset=0x0ea align=1 (i32.const 0))) - (local.set 0x0eb (i64.load offset=0x0eb align=1 (i32.const 0))) - (local.set 0x0ec (i64.load offset=0x0ec align=1 (i32.const 0))) - (local.set 0x0ed (i64.load offset=0x0ed align=1 (i32.const 0))) - (local.set 0x0ee (i64.load offset=0x0ee align=1 (i32.const 0))) - (local.set 0x0ef (i64.load offset=0x0ef align=1 (i32.const 0))) - (local.set 0x0f0 (i64.load offset=0x0f0 align=1 (i32.const 0))) - (local.set 0x0f1 (i64.load offset=0x0f1 align=1 (i32.const 0))) - (local.set 0x0f2 (i64.load offset=0x0f2 align=1 (i32.const 0))) - (local.set 0x0f3 (i64.load offset=0x0f3 align=1 (i32.const 0))) - (local.set 0x0f4 (i64.load offset=0x0f4 align=1 (i32.const 0))) - (local.set 0x0f5 (i64.load offset=0x0f5 align=1 (i32.const 0))) - (local.set 0x0f6 (i64.load offset=0x0f6 align=1 (i32.const 0))) - (local.set 0x0f7 (i64.load offset=0x0f7 align=1 (i32.const 0))) - (local.set 0x0f8 (i64.load offset=0x0f8 align=1 (i32.const 0))) - (local.set 0x0f9 (i64.load offset=0x0f9 align=1 (i32.const 0))) - (local.set 0x0fa (i64.load offset=0x0fa align=1 (i32.const 0))) - (local.set 0x0fb (i64.load offset=0x0fb align=1 (i32.const 0))) - (local.set 0x0fc (i64.load offset=0x0fc align=1 (i32.const 0))) - (local.set 0x0fd (i64.load offset=0x0fd align=1 (i32.const 0))) - (local.set 0x0fe (i64.load offset=0x0fe align=1 (i32.const 0))) - (local.set 0x0ff (i64.load offset=0x0ff align=1 (i32.const 0))) - (local.set 0x100 (i64.load offset=0x100 align=1 (i32.const 0))) - (local.set 0x101 (i64.load offset=0x101 align=1 (i32.const 0))) - (local.set 0x102 (i64.load offset=0x102 align=1 (i32.const 0))) - (local.set 0x103 (i64.load offset=0x103 align=1 (i32.const 0))) - (local.set 0x104 (i64.load offset=0x104 align=1 (i32.const 0))) - (local.set 0x105 (i64.load offset=0x105 align=1 (i32.const 0))) - (local.set 0x106 (i64.load offset=0x106 align=1 (i32.const 0))) - (local.set 0x107 (i64.load offset=0x107 align=1 (i32.const 0))) - (local.set 0x108 (i64.load offset=0x108 align=1 (i32.const 0))) - (local.set 0x109 (i64.load offset=0x109 align=1 (i32.const 0))) - (local.set 0x10a (i64.load offset=0x10a align=1 (i32.const 0))) - (local.set 0x10b (i64.load offset=0x10b align=1 (i32.const 0))) - (local.set 0x10c (i64.load offset=0x10c align=1 (i32.const 0))) - (local.set 0x10d (i64.load offset=0x10d align=1 (i32.const 0))) - (local.set 0x10e (i64.load offset=0x10e align=1 (i32.const 0))) - (local.set 0x10f (i64.load offset=0x10f align=1 (i32.const 0))) - (local.set 0x110 (i64.load offset=0x110 align=1 (i32.const 0))) - (local.set 0x111 (i64.load offset=0x111 align=1 (i32.const 0))) - (local.set 0x112 (i64.load offset=0x112 align=1 (i32.const 0))) - (local.set 0x113 (i64.load offset=0x113 align=1 (i32.const 0))) - (local.set 0x114 (i64.load offset=0x114 align=1 (i32.const 0))) - (local.set 0x115 (i64.load offset=0x115 align=1 (i32.const 0))) - (local.set 0x116 (i64.load offset=0x116 align=1 (i32.const 0))) - (local.set 0x117 (i64.load offset=0x117 align=1 (i32.const 0))) - (local.set 0x118 (i64.load offset=0x118 align=1 (i32.const 0))) - (local.set 0x119 (i64.load offset=0x119 align=1 (i32.const 0))) - (local.set 0x11a (i64.load offset=0x11a align=1 (i32.const 0))) - (local.set 0x11b (i64.load offset=0x11b align=1 (i32.const 0))) - (local.set 0x11c (i64.load offset=0x11c align=1 (i32.const 0))) - (local.set 0x11d (i64.load offset=0x11d align=1 (i32.const 0))) - (local.set 0x11e (i64.load offset=0x11e align=1 (i32.const 0))) - (local.set 0x11f (i64.load offset=0x11f align=1 (i32.const 0))) - (local.set 0x120 (i64.load offset=0x120 align=1 (i32.const 0))) - (local.set 0x121 (i64.load offset=0x121 align=1 (i32.const 0))) - (local.set 0x122 (i64.load offset=0x122 align=1 (i32.const 0))) - (local.set 0x123 (i64.load offset=0x123 align=1 (i32.const 0))) - (local.set 0x124 (i64.load offset=0x124 align=1 (i32.const 0))) - (local.set 0x125 (i64.load offset=0x125 align=1 (i32.const 0))) - (local.set 0x126 (i64.load offset=0x126 align=1 (i32.const 0))) - (local.set 0x127 (i64.load offset=0x127 align=1 (i32.const 0))) - (local.set 0x128 (i64.load offset=0x128 align=1 (i32.const 0))) - (local.set 0x129 (i64.load offset=0x129 align=1 (i32.const 0))) - (local.set 0x12a (i64.load offset=0x12a align=1 (i32.const 0))) - (local.set 0x12b (i64.load offset=0x12b align=1 (i32.const 0))) - (local.set 0x12c (i64.load offset=0x12c align=1 (i32.const 0))) - (local.set 0x12d (i64.load offset=0x12d align=1 (i32.const 0))) - (local.set 0x12e (i64.load offset=0x12e align=1 (i32.const 0))) - (local.set 0x12f (i64.load offset=0x12f align=1 (i32.const 0))) - (local.set 0x130 (i64.load offset=0x130 align=1 (i32.const 0))) - (local.set 0x131 (i64.load offset=0x131 align=1 (i32.const 0))) - (local.set 0x132 (i64.load offset=0x132 align=1 (i32.const 0))) - (local.set 0x133 (i64.load offset=0x133 align=1 (i32.const 0))) - (local.set 0x134 (i64.load offset=0x134 align=1 (i32.const 0))) - (local.set 0x135 (i64.load offset=0x135 align=1 (i32.const 0))) - (local.set 0x136 (i64.load offset=0x136 align=1 (i32.const 0))) - (local.set 0x137 (i64.load offset=0x137 align=1 (i32.const 0))) - (local.set 0x138 (i64.load offset=0x138 align=1 (i32.const 0))) - (local.set 0x139 (i64.load offset=0x139 align=1 (i32.const 0))) - (local.set 0x13a (i64.load offset=0x13a align=1 (i32.const 0))) - (local.set 0x13b (i64.load offset=0x13b align=1 (i32.const 0))) - (local.set 0x13c (i64.load offset=0x13c align=1 (i32.const 0))) - (local.set 0x13d (i64.load offset=0x13d align=1 (i32.const 0))) - (local.set 0x13e (i64.load offset=0x13e align=1 (i32.const 0))) - (local.set 0x13f (i64.load offset=0x13f align=1 (i32.const 0))) - (local.set 0x140 (i64.load offset=0x140 align=1 (i32.const 0))) - (local.set 0x141 (i64.load offset=0x141 align=1 (i32.const 0))) - (local.set 0x142 (i64.load offset=0x142 align=1 (i32.const 0))) - (local.set 0x143 (i64.load offset=0x143 align=1 (i32.const 0))) - (local.set 0x144 (i64.load offset=0x144 align=1 (i32.const 0))) - (local.set 0x145 (i64.load offset=0x145 align=1 (i32.const 0))) - (local.set 0x146 (i64.load offset=0x146 align=1 (i32.const 0))) - (local.set 0x147 (i64.load offset=0x147 align=1 (i32.const 0))) - (local.set 0x148 (i64.load offset=0x148 align=1 (i32.const 0))) - (local.set 0x149 (i64.load offset=0x149 align=1 (i32.const 0))) - (local.set 0x14a (i64.load offset=0x14a align=1 (i32.const 0))) - (local.set 0x14b (i64.load offset=0x14b align=1 (i32.const 0))) - (local.set 0x14c (i64.load offset=0x14c align=1 (i32.const 0))) - (local.set 0x14d (i64.load offset=0x14d align=1 (i32.const 0))) - (local.set 0x14e (i64.load offset=0x14e align=1 (i32.const 0))) - (local.set 0x14f (i64.load offset=0x14f align=1 (i32.const 0))) - (local.set 0x150 (i64.load offset=0x150 align=1 (i32.const 0))) - (local.set 0x151 (i64.load offset=0x151 align=1 (i32.const 0))) - (local.set 0x152 (i64.load offset=0x152 align=1 (i32.const 0))) - (local.set 0x153 (i64.load offset=0x153 align=1 (i32.const 0))) - (local.set 0x154 (i64.load offset=0x154 align=1 (i32.const 0))) - (local.set 0x155 (i64.load offset=0x155 align=1 (i32.const 0))) - (local.set 0x156 (i64.load offset=0x156 align=1 (i32.const 0))) - (local.set 0x157 (i64.load offset=0x157 align=1 (i32.const 0))) - (local.set 0x158 (i64.load offset=0x158 align=1 (i32.const 0))) - (local.set 0x159 (i64.load offset=0x159 align=1 (i32.const 0))) - (local.set 0x15a (i64.load offset=0x15a align=1 (i32.const 0))) - (local.set 0x15b (i64.load offset=0x15b align=1 (i32.const 0))) - (local.set 0x15c (i64.load offset=0x15c align=1 (i32.const 0))) - (local.set 0x15d (i64.load offset=0x15d align=1 (i32.const 0))) - (local.set 0x15e (i64.load offset=0x15e align=1 (i32.const 0))) - (local.set 0x15f (i64.load offset=0x15f align=1 (i32.const 0))) - (local.set 0x160 (i64.load offset=0x160 align=1 (i32.const 0))) - (local.set 0x161 (i64.load offset=0x161 align=1 (i32.const 0))) - (local.set 0x162 (i64.load offset=0x162 align=1 (i32.const 0))) - (local.set 0x163 (i64.load offset=0x163 align=1 (i32.const 0))) - (local.set 0x164 (i64.load offset=0x164 align=1 (i32.const 0))) - (local.set 0x165 (i64.load offset=0x165 align=1 (i32.const 0))) - (local.set 0x166 (i64.load offset=0x166 align=1 (i32.const 0))) - (local.set 0x167 (i64.load offset=0x167 align=1 (i32.const 0))) - (local.set 0x168 (i64.load offset=0x168 align=1 (i32.const 0))) - (local.set 0x169 (i64.load offset=0x169 align=1 (i32.const 0))) - (local.set 0x16a (i64.load offset=0x16a align=1 (i32.const 0))) - (local.set 0x16b (i64.load offset=0x16b align=1 (i32.const 0))) - (local.set 0x16c (i64.load offset=0x16c align=1 (i32.const 0))) - (local.set 0x16d (i64.load offset=0x16d align=1 (i32.const 0))) - (local.set 0x16e (i64.load offset=0x16e align=1 (i32.const 0))) - (local.set 0x16f (i64.load offset=0x16f align=1 (i32.const 0))) - (local.set 0x170 (i64.load offset=0x170 align=1 (i32.const 0))) - (local.set 0x171 (i64.load offset=0x171 align=1 (i32.const 0))) - (local.set 0x172 (i64.load offset=0x172 align=1 (i32.const 0))) - (local.set 0x173 (i64.load offset=0x173 align=1 (i32.const 0))) - (local.set 0x174 (i64.load offset=0x174 align=1 (i32.const 0))) - (local.set 0x175 (i64.load offset=0x175 align=1 (i32.const 0))) - (local.set 0x176 (i64.load offset=0x176 align=1 (i32.const 0))) - (local.set 0x177 (i64.load offset=0x177 align=1 (i32.const 0))) - (local.set 0x178 (i64.load offset=0x178 align=1 (i32.const 0))) - (local.set 0x179 (i64.load offset=0x179 align=1 (i32.const 0))) - (local.set 0x17a (i64.load offset=0x17a align=1 (i32.const 0))) - (local.set 0x17b (i64.load offset=0x17b align=1 (i32.const 0))) - (local.set 0x17c (i64.load offset=0x17c align=1 (i32.const 0))) - (local.set 0x17d (i64.load offset=0x17d align=1 (i32.const 0))) - (local.set 0x17e (i64.load offset=0x17e align=1 (i32.const 0))) - (local.set 0x17f (i64.load offset=0x17f align=1 (i32.const 0))) - (local.set 0x180 (i64.load offset=0x180 align=1 (i32.const 0))) - (local.set 0x181 (i64.load offset=0x181 align=1 (i32.const 0))) - (local.set 0x182 (i64.load offset=0x182 align=1 (i32.const 0))) - (local.set 0x183 (i64.load offset=0x183 align=1 (i32.const 0))) - (local.set 0x184 (i64.load offset=0x184 align=1 (i32.const 0))) - (local.set 0x185 (i64.load offset=0x185 align=1 (i32.const 0))) - (local.set 0x186 (i64.load offset=0x186 align=1 (i32.const 0))) - (local.set 0x187 (i64.load offset=0x187 align=1 (i32.const 0))) - (local.set 0x188 (i64.load offset=0x188 align=1 (i32.const 0))) - (local.set 0x189 (i64.load offset=0x189 align=1 (i32.const 0))) - (local.set 0x18a (i64.load offset=0x18a align=1 (i32.const 0))) - (local.set 0x18b (i64.load offset=0x18b align=1 (i32.const 0))) - (local.set 0x18c (i64.load offset=0x18c align=1 (i32.const 0))) - (local.set 0x18d (i64.load offset=0x18d align=1 (i32.const 0))) - (local.set 0x18e (i64.load offset=0x18e align=1 (i32.const 0))) - (local.set 0x18f (i64.load offset=0x18f align=1 (i32.const 0))) - (local.set 0x190 (i64.load offset=0x190 align=1 (i32.const 0))) - (local.set 0x191 (i64.load offset=0x191 align=1 (i32.const 0))) - (local.set 0x192 (i64.load offset=0x192 align=1 (i32.const 0))) - (local.set 0x193 (i64.load offset=0x193 align=1 (i32.const 0))) - (local.set 0x194 (i64.load offset=0x194 align=1 (i32.const 0))) - (local.set 0x195 (i64.load offset=0x195 align=1 (i32.const 0))) - (local.set 0x196 (i64.load offset=0x196 align=1 (i32.const 0))) - (local.set 0x197 (i64.load offset=0x197 align=1 (i32.const 0))) - (local.set 0x198 (i64.load offset=0x198 align=1 (i32.const 0))) - (local.set 0x199 (i64.load offset=0x199 align=1 (i32.const 0))) - (local.set 0x19a (i64.load offset=0x19a align=1 (i32.const 0))) - (local.set 0x19b (i64.load offset=0x19b align=1 (i32.const 0))) - (local.set 0x19c (i64.load offset=0x19c align=1 (i32.const 0))) - (local.set 0x19d (i64.load offset=0x19d align=1 (i32.const 0))) - (local.set 0x19e (i64.load offset=0x19e align=1 (i32.const 0))) - (local.set 0x19f (i64.load offset=0x19f align=1 (i32.const 0))) - (local.set 0x1a0 (i64.load offset=0x1a0 align=1 (i32.const 0))) - (local.set 0x1a1 (i64.load offset=0x1a1 align=1 (i32.const 0))) - (local.set 0x1a2 (i64.load offset=0x1a2 align=1 (i32.const 0))) - (local.set 0x1a3 (i64.load offset=0x1a3 align=1 (i32.const 0))) - (local.set 0x1a4 (i64.load offset=0x1a4 align=1 (i32.const 0))) - (local.set 0x1a5 (i64.load offset=0x1a5 align=1 (i32.const 0))) - (local.set 0x1a6 (i64.load offset=0x1a6 align=1 (i32.const 0))) - (local.set 0x1a7 (i64.load offset=0x1a7 align=1 (i32.const 0))) - (local.set 0x1a8 (i64.load offset=0x1a8 align=1 (i32.const 0))) - (local.set 0x1a9 (i64.load offset=0x1a9 align=1 (i32.const 0))) - (local.set 0x1aa (i64.load offset=0x1aa align=1 (i32.const 0))) - (local.set 0x1ab (i64.load offset=0x1ab align=1 (i32.const 0))) - (local.set 0x1ac (i64.load offset=0x1ac align=1 (i32.const 0))) - (local.set 0x1ad (i64.load offset=0x1ad align=1 (i32.const 0))) - (local.set 0x1ae (i64.load offset=0x1ae align=1 (i32.const 0))) - (local.set 0x1af (i64.load offset=0x1af align=1 (i32.const 0))) - (local.set 0x1b0 (i64.load offset=0x1b0 align=1 (i32.const 0))) - (local.set 0x1b1 (i64.load offset=0x1b1 align=1 (i32.const 0))) - (local.set 0x1b2 (i64.load offset=0x1b2 align=1 (i32.const 0))) - (local.set 0x1b3 (i64.load offset=0x1b3 align=1 (i32.const 0))) - (local.set 0x1b4 (i64.load offset=0x1b4 align=1 (i32.const 0))) - (local.set 0x1b5 (i64.load offset=0x1b5 align=1 (i32.const 0))) - (local.set 0x1b6 (i64.load offset=0x1b6 align=1 (i32.const 0))) - (local.set 0x1b7 (i64.load offset=0x1b7 align=1 (i32.const 0))) - (local.set 0x1b8 (i64.load offset=0x1b8 align=1 (i32.const 0))) - (local.set 0x1b9 (i64.load offset=0x1b9 align=1 (i32.const 0))) - (local.set 0x1ba (i64.load offset=0x1ba align=1 (i32.const 0))) - (local.set 0x1bb (i64.load offset=0x1bb align=1 (i32.const 0))) - (local.set 0x1bc (i64.load offset=0x1bc align=1 (i32.const 0))) - (local.set 0x1bd (i64.load offset=0x1bd align=1 (i32.const 0))) - (local.set 0x1be (i64.load offset=0x1be align=1 (i32.const 0))) - (local.set 0x1bf (i64.load offset=0x1bf align=1 (i32.const 0))) - (local.set 0x1c0 (i64.load offset=0x1c0 align=1 (i32.const 0))) - (local.set 0x1c1 (i64.load offset=0x1c1 align=1 (i32.const 0))) - (local.set 0x1c2 (i64.load offset=0x1c2 align=1 (i32.const 0))) - (local.set 0x1c3 (i64.load offset=0x1c3 align=1 (i32.const 0))) - (local.set 0x1c4 (i64.load offset=0x1c4 align=1 (i32.const 0))) - (local.set 0x1c5 (i64.load offset=0x1c5 align=1 (i32.const 0))) - (local.set 0x1c6 (i64.load offset=0x1c6 align=1 (i32.const 0))) - (local.set 0x1c7 (i64.load offset=0x1c7 align=1 (i32.const 0))) - (local.set 0x1c8 (i64.load offset=0x1c8 align=1 (i32.const 0))) - (local.set 0x1c9 (i64.load offset=0x1c9 align=1 (i32.const 0))) - (local.set 0x1ca (i64.load offset=0x1ca align=1 (i32.const 0))) - (local.set 0x1cb (i64.load offset=0x1cb align=1 (i32.const 0))) - (local.set 0x1cc (i64.load offset=0x1cc align=1 (i32.const 0))) - (local.set 0x1cd (i64.load offset=0x1cd align=1 (i32.const 0))) - (local.set 0x1ce (i64.load offset=0x1ce align=1 (i32.const 0))) - (local.set 0x1cf (i64.load offset=0x1cf align=1 (i32.const 0))) - (local.set 0x1d0 (i64.load offset=0x1d0 align=1 (i32.const 0))) - (local.set 0x1d1 (i64.load offset=0x1d1 align=1 (i32.const 0))) - (local.set 0x1d2 (i64.load offset=0x1d2 align=1 (i32.const 0))) - (local.set 0x1d3 (i64.load offset=0x1d3 align=1 (i32.const 0))) - (local.set 0x1d4 (i64.load offset=0x1d4 align=1 (i32.const 0))) - (local.set 0x1d5 (i64.load offset=0x1d5 align=1 (i32.const 0))) - (local.set 0x1d6 (i64.load offset=0x1d6 align=1 (i32.const 0))) - (local.set 0x1d7 (i64.load offset=0x1d7 align=1 (i32.const 0))) - (local.set 0x1d8 (i64.load offset=0x1d8 align=1 (i32.const 0))) - (local.set 0x1d9 (i64.load offset=0x1d9 align=1 (i32.const 0))) - (local.set 0x1da (i64.load offset=0x1da align=1 (i32.const 0))) - (local.set 0x1db (i64.load offset=0x1db align=1 (i32.const 0))) - (local.set 0x1dc (i64.load offset=0x1dc align=1 (i32.const 0))) - (local.set 0x1dd (i64.load offset=0x1dd align=1 (i32.const 0))) - (local.set 0x1de (i64.load offset=0x1de align=1 (i32.const 0))) - (local.set 0x1df (i64.load offset=0x1df align=1 (i32.const 0))) - (local.set 0x1e0 (i64.load offset=0x1e0 align=1 (i32.const 0))) - (local.set 0x1e1 (i64.load offset=0x1e1 align=1 (i32.const 0))) - (local.set 0x1e2 (i64.load offset=0x1e2 align=1 (i32.const 0))) - (local.set 0x1e3 (i64.load offset=0x1e3 align=1 (i32.const 0))) - (local.set 0x1e4 (i64.load offset=0x1e4 align=1 (i32.const 0))) - (local.set 0x1e5 (i64.load offset=0x1e5 align=1 (i32.const 0))) - (local.set 0x1e6 (i64.load offset=0x1e6 align=1 (i32.const 0))) - (local.set 0x1e7 (i64.load offset=0x1e7 align=1 (i32.const 0))) - (local.set 0x1e8 (i64.load offset=0x1e8 align=1 (i32.const 0))) - (local.set 0x1e9 (i64.load offset=0x1e9 align=1 (i32.const 0))) - (local.set 0x1ea (i64.load offset=0x1ea align=1 (i32.const 0))) - (local.set 0x1eb (i64.load offset=0x1eb align=1 (i32.const 0))) - (local.set 0x1ec (i64.load offset=0x1ec align=1 (i32.const 0))) - (local.set 0x1ed (i64.load offset=0x1ed align=1 (i32.const 0))) - (local.set 0x1ee (i64.load offset=0x1ee align=1 (i32.const 0))) - (local.set 0x1ef (i64.load offset=0x1ef align=1 (i32.const 0))) - (local.set 0x1f0 (i64.load offset=0x1f0 align=1 (i32.const 0))) - (local.set 0x1f1 (i64.load offset=0x1f1 align=1 (i32.const 0))) - (local.set 0x1f2 (i64.load offset=0x1f2 align=1 (i32.const 0))) - (local.set 0x1f3 (i64.load offset=0x1f3 align=1 (i32.const 0))) - (local.set 0x1f4 (i64.load offset=0x1f4 align=1 (i32.const 0))) - (local.set 0x1f5 (i64.load offset=0x1f5 align=1 (i32.const 0))) - (local.set 0x1f6 (i64.load offset=0x1f6 align=1 (i32.const 0))) - (local.set 0x1f7 (i64.load offset=0x1f7 align=1 (i32.const 0))) - (local.set 0x1f8 (i64.load offset=0x1f8 align=1 (i32.const 0))) - (local.set 0x1f9 (i64.load offset=0x1f9 align=1 (i32.const 0))) - (local.set 0x1fa (i64.load offset=0x1fa align=1 (i32.const 0))) - (local.set 0x1fb (i64.load offset=0x1fb align=1 (i32.const 0))) - (local.set 0x1fc (i64.load offset=0x1fc align=1 (i32.const 0))) - (local.set 0x1fd (i64.load offset=0x1fd align=1 (i32.const 0))) - (local.set 0x1fe (i64.load offset=0x1fe align=1 (i32.const 0))) - (local.set 0x1ff (i64.load offset=0x1ff align=1 (i32.const 0))) - (local.set 0x200 (i64.load offset=0x200 align=1 (i32.const 0))) - (local.set 0x201 (i64.load offset=0x201 align=1 (i32.const 0))) - (local.set 0x202 (i64.load offset=0x202 align=1 (i32.const 0))) - (local.set 0x203 (i64.load offset=0x203 align=1 (i32.const 0))) - (local.set 0x204 (i64.load offset=0x204 align=1 (i32.const 0))) - (local.set 0x205 (i64.load offset=0x205 align=1 (i32.const 0))) - (local.set 0x206 (i64.load offset=0x206 align=1 (i32.const 0))) - (local.set 0x207 (i64.load offset=0x207 align=1 (i32.const 0))) - (local.set 0x208 (i64.load offset=0x208 align=1 (i32.const 0))) - (local.set 0x209 (i64.load offset=0x209 align=1 (i32.const 0))) - (local.set 0x20a (i64.load offset=0x20a align=1 (i32.const 0))) - (local.set 0x20b (i64.load offset=0x20b align=1 (i32.const 0))) - (local.set 0x20c (i64.load offset=0x20c align=1 (i32.const 0))) - (local.set 0x20d (i64.load offset=0x20d align=1 (i32.const 0))) - (local.set 0x20e (i64.load offset=0x20e align=1 (i32.const 0))) - (local.set 0x20f (i64.load offset=0x20f align=1 (i32.const 0))) - (local.set 0x210 (i64.load offset=0x210 align=1 (i32.const 0))) - (local.set 0x211 (i64.load offset=0x211 align=1 (i32.const 0))) - (local.set 0x212 (i64.load offset=0x212 align=1 (i32.const 0))) - (local.set 0x213 (i64.load offset=0x213 align=1 (i32.const 0))) - (local.set 0x214 (i64.load offset=0x214 align=1 (i32.const 0))) - (local.set 0x215 (i64.load offset=0x215 align=1 (i32.const 0))) - (local.set 0x216 (i64.load offset=0x216 align=1 (i32.const 0))) - (local.set 0x217 (i64.load offset=0x217 align=1 (i32.const 0))) - (local.set 0x218 (i64.load offset=0x218 align=1 (i32.const 0))) - (local.set 0x219 (i64.load offset=0x219 align=1 (i32.const 0))) - (local.set 0x21a (i64.load offset=0x21a align=1 (i32.const 0))) - (local.set 0x21b (i64.load offset=0x21b align=1 (i32.const 0))) - (local.set 0x21c (i64.load offset=0x21c align=1 (i32.const 0))) - (local.set 0x21d (i64.load offset=0x21d align=1 (i32.const 0))) - (local.set 0x21e (i64.load offset=0x21e align=1 (i32.const 0))) - (local.set 0x21f (i64.load offset=0x21f align=1 (i32.const 0))) - (local.set 0x220 (i64.load offset=0x220 align=1 (i32.const 0))) - (local.set 0x221 (i64.load offset=0x221 align=1 (i32.const 0))) - (local.set 0x222 (i64.load offset=0x222 align=1 (i32.const 0))) - (local.set 0x223 (i64.load offset=0x223 align=1 (i32.const 0))) - (local.set 0x224 (i64.load offset=0x224 align=1 (i32.const 0))) - (local.set 0x225 (i64.load offset=0x225 align=1 (i32.const 0))) - (local.set 0x226 (i64.load offset=0x226 align=1 (i32.const 0))) - (local.set 0x227 (i64.load offset=0x227 align=1 (i32.const 0))) - (local.set 0x228 (i64.load offset=0x228 align=1 (i32.const 0))) - (local.set 0x229 (i64.load offset=0x229 align=1 (i32.const 0))) - (local.set 0x22a (i64.load offset=0x22a align=1 (i32.const 0))) - (local.set 0x22b (i64.load offset=0x22b align=1 (i32.const 0))) - (local.set 0x22c (i64.load offset=0x22c align=1 (i32.const 0))) - (local.set 0x22d (i64.load offset=0x22d align=1 (i32.const 0))) - (local.set 0x22e (i64.load offset=0x22e align=1 (i32.const 0))) - (local.set 0x22f (i64.load offset=0x22f align=1 (i32.const 0))) - (local.set 0x230 (i64.load offset=0x230 align=1 (i32.const 0))) - (local.set 0x231 (i64.load offset=0x231 align=1 (i32.const 0))) - (local.set 0x232 (i64.load offset=0x232 align=1 (i32.const 0))) - (local.set 0x233 (i64.load offset=0x233 align=1 (i32.const 0))) - (local.set 0x234 (i64.load offset=0x234 align=1 (i32.const 0))) - (local.set 0x235 (i64.load offset=0x235 align=1 (i32.const 0))) - (local.set 0x236 (i64.load offset=0x236 align=1 (i32.const 0))) - (local.set 0x237 (i64.load offset=0x237 align=1 (i32.const 0))) - (local.set 0x238 (i64.load offset=0x238 align=1 (i32.const 0))) - (local.set 0x239 (i64.load offset=0x239 align=1 (i32.const 0))) - (local.set 0x23a (i64.load offset=0x23a align=1 (i32.const 0))) - (local.set 0x23b (i64.load offset=0x23b align=1 (i32.const 0))) - (local.set 0x23c (i64.load offset=0x23c align=1 (i32.const 0))) - (local.set 0x23d (i64.load offset=0x23d align=1 (i32.const 0))) - (local.set 0x23e (i64.load offset=0x23e align=1 (i32.const 0))) - (local.set 0x23f (i64.load offset=0x23f align=1 (i32.const 0))) - (local.set 0x240 (i64.load offset=0x240 align=1 (i32.const 0))) - (local.set 0x241 (i64.load offset=0x241 align=1 (i32.const 0))) - (local.set 0x242 (i64.load offset=0x242 align=1 (i32.const 0))) - (local.set 0x243 (i64.load offset=0x243 align=1 (i32.const 0))) - (local.set 0x244 (i64.load offset=0x244 align=1 (i32.const 0))) - (local.set 0x245 (i64.load offset=0x245 align=1 (i32.const 0))) - (local.set 0x246 (i64.load offset=0x246 align=1 (i32.const 0))) - (local.set 0x247 (i64.load offset=0x247 align=1 (i32.const 0))) - (local.set 0x248 (i64.load offset=0x248 align=1 (i32.const 0))) - (local.set 0x249 (i64.load offset=0x249 align=1 (i32.const 0))) - (local.set 0x24a (i64.load offset=0x24a align=1 (i32.const 0))) - (local.set 0x24b (i64.load offset=0x24b align=1 (i32.const 0))) - (local.set 0x24c (i64.load offset=0x24c align=1 (i32.const 0))) - (local.set 0x24d (i64.load offset=0x24d align=1 (i32.const 0))) - (local.set 0x24e (i64.load offset=0x24e align=1 (i32.const 0))) - (local.set 0x24f (i64.load offset=0x24f align=1 (i32.const 0))) - (local.set 0x250 (i64.load offset=0x250 align=1 (i32.const 0))) - (local.set 0x251 (i64.load offset=0x251 align=1 (i32.const 0))) - (local.set 0x252 (i64.load offset=0x252 align=1 (i32.const 0))) - (local.set 0x253 (i64.load offset=0x253 align=1 (i32.const 0))) - (local.set 0x254 (i64.load offset=0x254 align=1 (i32.const 0))) - (local.set 0x255 (i64.load offset=0x255 align=1 (i32.const 0))) - (local.set 0x256 (i64.load offset=0x256 align=1 (i32.const 0))) - (local.set 0x257 (i64.load offset=0x257 align=1 (i32.const 0))) - (local.set 0x258 (i64.load offset=0x258 align=1 (i32.const 0))) - (local.set 0x259 (i64.load offset=0x259 align=1 (i32.const 0))) - (local.set 0x25a (i64.load offset=0x25a align=1 (i32.const 0))) - (local.set 0x25b (i64.load offset=0x25b align=1 (i32.const 0))) - (local.set 0x25c (i64.load offset=0x25c align=1 (i32.const 0))) - (local.set 0x25d (i64.load offset=0x25d align=1 (i32.const 0))) - (local.set 0x25e (i64.load offset=0x25e align=1 (i32.const 0))) - (local.set 0x25f (i64.load offset=0x25f align=1 (i32.const 0))) - (local.set 0x260 (i64.load offset=0x260 align=1 (i32.const 0))) - (local.set 0x261 (i64.load offset=0x261 align=1 (i32.const 0))) - (local.set 0x262 (i64.load offset=0x262 align=1 (i32.const 0))) - (local.set 0x263 (i64.load offset=0x263 align=1 (i32.const 0))) - (local.set 0x264 (i64.load offset=0x264 align=1 (i32.const 0))) - (local.set 0x265 (i64.load offset=0x265 align=1 (i32.const 0))) - (local.set 0x266 (i64.load offset=0x266 align=1 (i32.const 0))) - (local.set 0x267 (i64.load offset=0x267 align=1 (i32.const 0))) - (local.set 0x268 (i64.load offset=0x268 align=1 (i32.const 0))) - (local.set 0x269 (i64.load offset=0x269 align=1 (i32.const 0))) - (local.set 0x26a (i64.load offset=0x26a align=1 (i32.const 0))) - (local.set 0x26b (i64.load offset=0x26b align=1 (i32.const 0))) - (local.set 0x26c (i64.load offset=0x26c align=1 (i32.const 0))) - (local.set 0x26d (i64.load offset=0x26d align=1 (i32.const 0))) - (local.set 0x26e (i64.load offset=0x26e align=1 (i32.const 0))) - (local.set 0x26f (i64.load offset=0x26f align=1 (i32.const 0))) - (local.set 0x270 (i64.load offset=0x270 align=1 (i32.const 0))) - (local.set 0x271 (i64.load offset=0x271 align=1 (i32.const 0))) - (local.set 0x272 (i64.load offset=0x272 align=1 (i32.const 0))) - (local.set 0x273 (i64.load offset=0x273 align=1 (i32.const 0))) - (local.set 0x274 (i64.load offset=0x274 align=1 (i32.const 0))) - (local.set 0x275 (i64.load offset=0x275 align=1 (i32.const 0))) - (local.set 0x276 (i64.load offset=0x276 align=1 (i32.const 0))) - (local.set 0x277 (i64.load offset=0x277 align=1 (i32.const 0))) - (local.set 0x278 (i64.load offset=0x278 align=1 (i32.const 0))) - (local.set 0x279 (i64.load offset=0x279 align=1 (i32.const 0))) - (local.set 0x27a (i64.load offset=0x27a align=1 (i32.const 0))) - (local.set 0x27b (i64.load offset=0x27b align=1 (i32.const 0))) - (local.set 0x27c (i64.load offset=0x27c align=1 (i32.const 0))) - (local.set 0x27d (i64.load offset=0x27d align=1 (i32.const 0))) - (local.set 0x27e (i64.load offset=0x27e align=1 (i32.const 0))) - (local.set 0x27f (i64.load offset=0x27f align=1 (i32.const 0))) - (local.set 0x280 (i64.load offset=0x280 align=1 (i32.const 0))) - (local.set 0x281 (i64.load offset=0x281 align=1 (i32.const 0))) - (local.set 0x282 (i64.load offset=0x282 align=1 (i32.const 0))) - (local.set 0x283 (i64.load offset=0x283 align=1 (i32.const 0))) - (local.set 0x284 (i64.load offset=0x284 align=1 (i32.const 0))) - (local.set 0x285 (i64.load offset=0x285 align=1 (i32.const 0))) - (local.set 0x286 (i64.load offset=0x286 align=1 (i32.const 0))) - (local.set 0x287 (i64.load offset=0x287 align=1 (i32.const 0))) - (local.set 0x288 (i64.load offset=0x288 align=1 (i32.const 0))) - (local.set 0x289 (i64.load offset=0x289 align=1 (i32.const 0))) - (local.set 0x28a (i64.load offset=0x28a align=1 (i32.const 0))) - (local.set 0x28b (i64.load offset=0x28b align=1 (i32.const 0))) - (local.set 0x28c (i64.load offset=0x28c align=1 (i32.const 0))) - (local.set 0x28d (i64.load offset=0x28d align=1 (i32.const 0))) - (local.set 0x28e (i64.load offset=0x28e align=1 (i32.const 0))) - (local.set 0x28f (i64.load offset=0x28f align=1 (i32.const 0))) - (local.set 0x290 (i64.load offset=0x290 align=1 (i32.const 0))) - (local.set 0x291 (i64.load offset=0x291 align=1 (i32.const 0))) - (local.set 0x292 (i64.load offset=0x292 align=1 (i32.const 0))) - (local.set 0x293 (i64.load offset=0x293 align=1 (i32.const 0))) - (local.set 0x294 (i64.load offset=0x294 align=1 (i32.const 0))) - (local.set 0x295 (i64.load offset=0x295 align=1 (i32.const 0))) - (local.set 0x296 (i64.load offset=0x296 align=1 (i32.const 0))) - (local.set 0x297 (i64.load offset=0x297 align=1 (i32.const 0))) - (local.set 0x298 (i64.load offset=0x298 align=1 (i32.const 0))) - (local.set 0x299 (i64.load offset=0x299 align=1 (i32.const 0))) - (local.set 0x29a (i64.load offset=0x29a align=1 (i32.const 0))) - (local.set 0x29b (i64.load offset=0x29b align=1 (i32.const 0))) - (local.set 0x29c (i64.load offset=0x29c align=1 (i32.const 0))) - (local.set 0x29d (i64.load offset=0x29d align=1 (i32.const 0))) - (local.set 0x29e (i64.load offset=0x29e align=1 (i32.const 0))) - (local.set 0x29f (i64.load offset=0x29f align=1 (i32.const 0))) - (local.set 0x2a0 (i64.load offset=0x2a0 align=1 (i32.const 0))) - (local.set 0x2a1 (i64.load offset=0x2a1 align=1 (i32.const 0))) - (local.set 0x2a2 (i64.load offset=0x2a2 align=1 (i32.const 0))) - (local.set 0x2a3 (i64.load offset=0x2a3 align=1 (i32.const 0))) - (local.set 0x2a4 (i64.load offset=0x2a4 align=1 (i32.const 0))) - (local.set 0x2a5 (i64.load offset=0x2a5 align=1 (i32.const 0))) - (local.set 0x2a6 (i64.load offset=0x2a6 align=1 (i32.const 0))) - (local.set 0x2a7 (i64.load offset=0x2a7 align=1 (i32.const 0))) - (local.set 0x2a8 (i64.load offset=0x2a8 align=1 (i32.const 0))) - (local.set 0x2a9 (i64.load offset=0x2a9 align=1 (i32.const 0))) - (local.set 0x2aa (i64.load offset=0x2aa align=1 (i32.const 0))) - (local.set 0x2ab (i64.load offset=0x2ab align=1 (i32.const 0))) - (local.set 0x2ac (i64.load offset=0x2ac align=1 (i32.const 0))) - (local.set 0x2ad (i64.load offset=0x2ad align=1 (i32.const 0))) - (local.set 0x2ae (i64.load offset=0x2ae align=1 (i32.const 0))) - (local.set 0x2af (i64.load offset=0x2af align=1 (i32.const 0))) - (local.set 0x2b0 (i64.load offset=0x2b0 align=1 (i32.const 0))) - (local.set 0x2b1 (i64.load offset=0x2b1 align=1 (i32.const 0))) - (local.set 0x2b2 (i64.load offset=0x2b2 align=1 (i32.const 0))) - (local.set 0x2b3 (i64.load offset=0x2b3 align=1 (i32.const 0))) - (local.set 0x2b4 (i64.load offset=0x2b4 align=1 (i32.const 0))) - (local.set 0x2b5 (i64.load offset=0x2b5 align=1 (i32.const 0))) - (local.set 0x2b6 (i64.load offset=0x2b6 align=1 (i32.const 0))) - (local.set 0x2b7 (i64.load offset=0x2b7 align=1 (i32.const 0))) - (local.set 0x2b8 (i64.load offset=0x2b8 align=1 (i32.const 0))) - (local.set 0x2b9 (i64.load offset=0x2b9 align=1 (i32.const 0))) - (local.set 0x2ba (i64.load offset=0x2ba align=1 (i32.const 0))) - (local.set 0x2bb (i64.load offset=0x2bb align=1 (i32.const 0))) - (local.set 0x2bc (i64.load offset=0x2bc align=1 (i32.const 0))) - (local.set 0x2bd (i64.load offset=0x2bd align=1 (i32.const 0))) - (local.set 0x2be (i64.load offset=0x2be align=1 (i32.const 0))) - (local.set 0x2bf (i64.load offset=0x2bf align=1 (i32.const 0))) - (local.set 0x2c0 (i64.load offset=0x2c0 align=1 (i32.const 0))) - (local.set 0x2c1 (i64.load offset=0x2c1 align=1 (i32.const 0))) - (local.set 0x2c2 (i64.load offset=0x2c2 align=1 (i32.const 0))) - (local.set 0x2c3 (i64.load offset=0x2c3 align=1 (i32.const 0))) - (local.set 0x2c4 (i64.load offset=0x2c4 align=1 (i32.const 0))) - (local.set 0x2c5 (i64.load offset=0x2c5 align=1 (i32.const 0))) - (local.set 0x2c6 (i64.load offset=0x2c6 align=1 (i32.const 0))) - (local.set 0x2c7 (i64.load offset=0x2c7 align=1 (i32.const 0))) - (local.set 0x2c8 (i64.load offset=0x2c8 align=1 (i32.const 0))) - (local.set 0x2c9 (i64.load offset=0x2c9 align=1 (i32.const 0))) - (local.set 0x2ca (i64.load offset=0x2ca align=1 (i32.const 0))) - (local.set 0x2cb (i64.load offset=0x2cb align=1 (i32.const 0))) - (local.set 0x2cc (i64.load offset=0x2cc align=1 (i32.const 0))) - (local.set 0x2cd (i64.load offset=0x2cd align=1 (i32.const 0))) - (local.set 0x2ce (i64.load offset=0x2ce align=1 (i32.const 0))) - (local.set 0x2cf (i64.load offset=0x2cf align=1 (i32.const 0))) - (local.set 0x2d0 (i64.load offset=0x2d0 align=1 (i32.const 0))) - (local.set 0x2d1 (i64.load offset=0x2d1 align=1 (i32.const 0))) - (local.set 0x2d2 (i64.load offset=0x2d2 align=1 (i32.const 0))) - (local.set 0x2d3 (i64.load offset=0x2d3 align=1 (i32.const 0))) - (local.set 0x2d4 (i64.load offset=0x2d4 align=1 (i32.const 0))) - (local.set 0x2d5 (i64.load offset=0x2d5 align=1 (i32.const 0))) - (local.set 0x2d6 (i64.load offset=0x2d6 align=1 (i32.const 0))) - (local.set 0x2d7 (i64.load offset=0x2d7 align=1 (i32.const 0))) - (local.set 0x2d8 (i64.load offset=0x2d8 align=1 (i32.const 0))) - (local.set 0x2d9 (i64.load offset=0x2d9 align=1 (i32.const 0))) - (local.set 0x2da (i64.load offset=0x2da align=1 (i32.const 0))) - (local.set 0x2db (i64.load offset=0x2db align=1 (i32.const 0))) - (local.set 0x2dc (i64.load offset=0x2dc align=1 (i32.const 0))) - (local.set 0x2dd (i64.load offset=0x2dd align=1 (i32.const 0))) - (local.set 0x2de (i64.load offset=0x2de align=1 (i32.const 0))) - (local.set 0x2df (i64.load offset=0x2df align=1 (i32.const 0))) - (local.set 0x2e0 (i64.load offset=0x2e0 align=1 (i32.const 0))) - (local.set 0x2e1 (i64.load offset=0x2e1 align=1 (i32.const 0))) - (local.set 0x2e2 (i64.load offset=0x2e2 align=1 (i32.const 0))) - (local.set 0x2e3 (i64.load offset=0x2e3 align=1 (i32.const 0))) - (local.set 0x2e4 (i64.load offset=0x2e4 align=1 (i32.const 0))) - (local.set 0x2e5 (i64.load offset=0x2e5 align=1 (i32.const 0))) - (local.set 0x2e6 (i64.load offset=0x2e6 align=1 (i32.const 0))) - (local.set 0x2e7 (i64.load offset=0x2e7 align=1 (i32.const 0))) - (local.set 0x2e8 (i64.load offset=0x2e8 align=1 (i32.const 0))) - (local.set 0x2e9 (i64.load offset=0x2e9 align=1 (i32.const 0))) - (local.set 0x2ea (i64.load offset=0x2ea align=1 (i32.const 0))) - (local.set 0x2eb (i64.load offset=0x2eb align=1 (i32.const 0))) - (local.set 0x2ec (i64.load offset=0x2ec align=1 (i32.const 0))) - (local.set 0x2ed (i64.load offset=0x2ed align=1 (i32.const 0))) - (local.set 0x2ee (i64.load offset=0x2ee align=1 (i32.const 0))) - (local.set 0x2ef (i64.load offset=0x2ef align=1 (i32.const 0))) - (local.set 0x2f0 (i64.load offset=0x2f0 align=1 (i32.const 0))) - (local.set 0x2f1 (i64.load offset=0x2f1 align=1 (i32.const 0))) - (local.set 0x2f2 (i64.load offset=0x2f2 align=1 (i32.const 0))) - (local.set 0x2f3 (i64.load offset=0x2f3 align=1 (i32.const 0))) - (local.set 0x2f4 (i64.load offset=0x2f4 align=1 (i32.const 0))) - (local.set 0x2f5 (i64.load offset=0x2f5 align=1 (i32.const 0))) - (local.set 0x2f6 (i64.load offset=0x2f6 align=1 (i32.const 0))) - (local.set 0x2f7 (i64.load offset=0x2f7 align=1 (i32.const 0))) - (local.set 0x2f8 (i64.load offset=0x2f8 align=1 (i32.const 0))) - (local.set 0x2f9 (i64.load offset=0x2f9 align=1 (i32.const 0))) - (local.set 0x2fa (i64.load offset=0x2fa align=1 (i32.const 0))) - (local.set 0x2fb (i64.load offset=0x2fb align=1 (i32.const 0))) - (local.set 0x2fc (i64.load offset=0x2fc align=1 (i32.const 0))) - (local.set 0x2fd (i64.load offset=0x2fd align=1 (i32.const 0))) - (local.set 0x2fe (i64.load offset=0x2fe align=1 (i32.const 0))) - (local.set 0x2ff (i64.load offset=0x2ff align=1 (i32.const 0))) - (local.set 0x300 (i64.load offset=0x300 align=1 (i32.const 0))) - (local.set 0x301 (i64.load offset=0x301 align=1 (i32.const 0))) - (local.set 0x302 (i64.load offset=0x302 align=1 (i32.const 0))) - (local.set 0x303 (i64.load offset=0x303 align=1 (i32.const 0))) - (local.set 0x304 (i64.load offset=0x304 align=1 (i32.const 0))) - (local.set 0x305 (i64.load offset=0x305 align=1 (i32.const 0))) - (local.set 0x306 (i64.load offset=0x306 align=1 (i32.const 0))) - (local.set 0x307 (i64.load offset=0x307 align=1 (i32.const 0))) - (local.set 0x308 (i64.load offset=0x308 align=1 (i32.const 0))) - (local.set 0x309 (i64.load offset=0x309 align=1 (i32.const 0))) - (local.set 0x30a (i64.load offset=0x30a align=1 (i32.const 0))) - (local.set 0x30b (i64.load offset=0x30b align=1 (i32.const 0))) - (local.set 0x30c (i64.load offset=0x30c align=1 (i32.const 0))) - (local.set 0x30d (i64.load offset=0x30d align=1 (i32.const 0))) - (local.set 0x30e (i64.load offset=0x30e align=1 (i32.const 0))) - (local.set 0x30f (i64.load offset=0x30f align=1 (i32.const 0))) - (local.set 0x310 (i64.load offset=0x310 align=1 (i32.const 0))) - (local.set 0x311 (i64.load offset=0x311 align=1 (i32.const 0))) - (local.set 0x312 (i64.load offset=0x312 align=1 (i32.const 0))) - (local.set 0x313 (i64.load offset=0x313 align=1 (i32.const 0))) - (local.set 0x314 (i64.load offset=0x314 align=1 (i32.const 0))) - (local.set 0x315 (i64.load offset=0x315 align=1 (i32.const 0))) - (local.set 0x316 (i64.load offset=0x316 align=1 (i32.const 0))) - (local.set 0x317 (i64.load offset=0x317 align=1 (i32.const 0))) - (local.set 0x318 (i64.load offset=0x318 align=1 (i32.const 0))) - (local.set 0x319 (i64.load offset=0x319 align=1 (i32.const 0))) - (local.set 0x31a (i64.load offset=0x31a align=1 (i32.const 0))) - (local.set 0x31b (i64.load offset=0x31b align=1 (i32.const 0))) - (local.set 0x31c (i64.load offset=0x31c align=1 (i32.const 0))) - (local.set 0x31d (i64.load offset=0x31d align=1 (i32.const 0))) - (local.set 0x31e (i64.load offset=0x31e align=1 (i32.const 0))) - (local.set 0x31f (i64.load offset=0x31f align=1 (i32.const 0))) - (local.set 0x320 (i64.load offset=0x320 align=1 (i32.const 0))) - (local.set 0x321 (i64.load offset=0x321 align=1 (i32.const 0))) - (local.set 0x322 (i64.load offset=0x322 align=1 (i32.const 0))) - (local.set 0x323 (i64.load offset=0x323 align=1 (i32.const 0))) - (local.set 0x324 (i64.load offset=0x324 align=1 (i32.const 0))) - (local.set 0x325 (i64.load offset=0x325 align=1 (i32.const 0))) - (local.set 0x326 (i64.load offset=0x326 align=1 (i32.const 0))) - (local.set 0x327 (i64.load offset=0x327 align=1 (i32.const 0))) - (local.set 0x328 (i64.load offset=0x328 align=1 (i32.const 0))) - (local.set 0x329 (i64.load offset=0x329 align=1 (i32.const 0))) - (local.set 0x32a (i64.load offset=0x32a align=1 (i32.const 0))) - (local.set 0x32b (i64.load offset=0x32b align=1 (i32.const 0))) - (local.set 0x32c (i64.load offset=0x32c align=1 (i32.const 0))) - (local.set 0x32d (i64.load offset=0x32d align=1 (i32.const 0))) - (local.set 0x32e (i64.load offset=0x32e align=1 (i32.const 0))) - (local.set 0x32f (i64.load offset=0x32f align=1 (i32.const 0))) - (local.set 0x330 (i64.load offset=0x330 align=1 (i32.const 0))) - (local.set 0x331 (i64.load offset=0x331 align=1 (i32.const 0))) - (local.set 0x332 (i64.load offset=0x332 align=1 (i32.const 0))) - (local.set 0x333 (i64.load offset=0x333 align=1 (i32.const 0))) - (local.set 0x334 (i64.load offset=0x334 align=1 (i32.const 0))) - (local.set 0x335 (i64.load offset=0x335 align=1 (i32.const 0))) - (local.set 0x336 (i64.load offset=0x336 align=1 (i32.const 0))) - (local.set 0x337 (i64.load offset=0x337 align=1 (i32.const 0))) - (local.set 0x338 (i64.load offset=0x338 align=1 (i32.const 0))) - (local.set 0x339 (i64.load offset=0x339 align=1 (i32.const 0))) - (local.set 0x33a (i64.load offset=0x33a align=1 (i32.const 0))) - (local.set 0x33b (i64.load offset=0x33b align=1 (i32.const 0))) - (local.set 0x33c (i64.load offset=0x33c align=1 (i32.const 0))) - (local.set 0x33d (i64.load offset=0x33d align=1 (i32.const 0))) - (local.set 0x33e (i64.load offset=0x33e align=1 (i32.const 0))) - (local.set 0x33f (i64.load offset=0x33f align=1 (i32.const 0))) - (local.set 0x340 (i64.load offset=0x340 align=1 (i32.const 0))) - (local.set 0x341 (i64.load offset=0x341 align=1 (i32.const 0))) - (local.set 0x342 (i64.load offset=0x342 align=1 (i32.const 0))) - (local.set 0x343 (i64.load offset=0x343 align=1 (i32.const 0))) - (local.set 0x344 (i64.load offset=0x344 align=1 (i32.const 0))) - (local.set 0x345 (i64.load offset=0x345 align=1 (i32.const 0))) - (local.set 0x346 (i64.load offset=0x346 align=1 (i32.const 0))) - (local.set 0x347 (i64.load offset=0x347 align=1 (i32.const 0))) - (local.set 0x348 (i64.load offset=0x348 align=1 (i32.const 0))) - (local.set 0x349 (i64.load offset=0x349 align=1 (i32.const 0))) - (local.set 0x34a (i64.load offset=0x34a align=1 (i32.const 0))) - (local.set 0x34b (i64.load offset=0x34b align=1 (i32.const 0))) - (local.set 0x34c (i64.load offset=0x34c align=1 (i32.const 0))) - (local.set 0x34d (i64.load offset=0x34d align=1 (i32.const 0))) - (local.set 0x34e (i64.load offset=0x34e align=1 (i32.const 0))) - (local.set 0x34f (i64.load offset=0x34f align=1 (i32.const 0))) - (local.set 0x350 (i64.load offset=0x350 align=1 (i32.const 0))) - (local.set 0x351 (i64.load offset=0x351 align=1 (i32.const 0))) - (local.set 0x352 (i64.load offset=0x352 align=1 (i32.const 0))) - (local.set 0x353 (i64.load offset=0x353 align=1 (i32.const 0))) - (local.set 0x354 (i64.load offset=0x354 align=1 (i32.const 0))) - (local.set 0x355 (i64.load offset=0x355 align=1 (i32.const 0))) - (local.set 0x356 (i64.load offset=0x356 align=1 (i32.const 0))) - (local.set 0x357 (i64.load offset=0x357 align=1 (i32.const 0))) - (local.set 0x358 (i64.load offset=0x358 align=1 (i32.const 0))) - (local.set 0x359 (i64.load offset=0x359 align=1 (i32.const 0))) - (local.set 0x35a (i64.load offset=0x35a align=1 (i32.const 0))) - (local.set 0x35b (i64.load offset=0x35b align=1 (i32.const 0))) - (local.set 0x35c (i64.load offset=0x35c align=1 (i32.const 0))) - (local.set 0x35d (i64.load offset=0x35d align=1 (i32.const 0))) - (local.set 0x35e (i64.load offset=0x35e align=1 (i32.const 0))) - (local.set 0x35f (i64.load offset=0x35f align=1 (i32.const 0))) - (local.set 0x360 (i64.load offset=0x360 align=1 (i32.const 0))) - (local.set 0x361 (i64.load offset=0x361 align=1 (i32.const 0))) - (local.set 0x362 (i64.load offset=0x362 align=1 (i32.const 0))) - (local.set 0x363 (i64.load offset=0x363 align=1 (i32.const 0))) - (local.set 0x364 (i64.load offset=0x364 align=1 (i32.const 0))) - (local.set 0x365 (i64.load offset=0x365 align=1 (i32.const 0))) - (local.set 0x366 (i64.load offset=0x366 align=1 (i32.const 0))) - (local.set 0x367 (i64.load offset=0x367 align=1 (i32.const 0))) - (local.set 0x368 (i64.load offset=0x368 align=1 (i32.const 0))) - (local.set 0x369 (i64.load offset=0x369 align=1 (i32.const 0))) - (local.set 0x36a (i64.load offset=0x36a align=1 (i32.const 0))) - (local.set 0x36b (i64.load offset=0x36b align=1 (i32.const 0))) - (local.set 0x36c (i64.load offset=0x36c align=1 (i32.const 0))) - (local.set 0x36d (i64.load offset=0x36d align=1 (i32.const 0))) - (local.set 0x36e (i64.load offset=0x36e align=1 (i32.const 0))) - (local.set 0x36f (i64.load offset=0x36f align=1 (i32.const 0))) - (local.set 0x370 (i64.load offset=0x370 align=1 (i32.const 0))) - (local.set 0x371 (i64.load offset=0x371 align=1 (i32.const 0))) - (local.set 0x372 (i64.load offset=0x372 align=1 (i32.const 0))) - (local.set 0x373 (i64.load offset=0x373 align=1 (i32.const 0))) - (local.set 0x374 (i64.load offset=0x374 align=1 (i32.const 0))) - (local.set 0x375 (i64.load offset=0x375 align=1 (i32.const 0))) - (local.set 0x376 (i64.load offset=0x376 align=1 (i32.const 0))) - (local.set 0x377 (i64.load offset=0x377 align=1 (i32.const 0))) - (local.set 0x378 (i64.load offset=0x378 align=1 (i32.const 0))) - (local.set 0x379 (i64.load offset=0x379 align=1 (i32.const 0))) - (local.set 0x37a (i64.load offset=0x37a align=1 (i32.const 0))) - (local.set 0x37b (i64.load offset=0x37b align=1 (i32.const 0))) - (local.set 0x37c (i64.load offset=0x37c align=1 (i32.const 0))) - (local.set 0x37d (i64.load offset=0x37d align=1 (i32.const 0))) - (local.set 0x37e (i64.load offset=0x37e align=1 (i32.const 0))) - (local.set 0x37f (i64.load offset=0x37f align=1 (i32.const 0))) - (local.set 0x380 (i64.load offset=0x380 align=1 (i32.const 0))) - (local.set 0x381 (i64.load offset=0x381 align=1 (i32.const 0))) - (local.set 0x382 (i64.load offset=0x382 align=1 (i32.const 0))) - (local.set 0x383 (i64.load offset=0x383 align=1 (i32.const 0))) - (local.set 0x384 (i64.load offset=0x384 align=1 (i32.const 0))) - (local.set 0x385 (i64.load offset=0x385 align=1 (i32.const 0))) - (local.set 0x386 (i64.load offset=0x386 align=1 (i32.const 0))) - (local.set 0x387 (i64.load offset=0x387 align=1 (i32.const 0))) - (local.set 0x388 (i64.load offset=0x388 align=1 (i32.const 0))) - (local.set 0x389 (i64.load offset=0x389 align=1 (i32.const 0))) - (local.set 0x38a (i64.load offset=0x38a align=1 (i32.const 0))) - (local.set 0x38b (i64.load offset=0x38b align=1 (i32.const 0))) - (local.set 0x38c (i64.load offset=0x38c align=1 (i32.const 0))) - (local.set 0x38d (i64.load offset=0x38d align=1 (i32.const 0))) - (local.set 0x38e (i64.load offset=0x38e align=1 (i32.const 0))) - (local.set 0x38f (i64.load offset=0x38f align=1 (i32.const 0))) - (local.set 0x390 (i64.load offset=0x390 align=1 (i32.const 0))) - (local.set 0x391 (i64.load offset=0x391 align=1 (i32.const 0))) - (local.set 0x392 (i64.load offset=0x392 align=1 (i32.const 0))) - (local.set 0x393 (i64.load offset=0x393 align=1 (i32.const 0))) - (local.set 0x394 (i64.load offset=0x394 align=1 (i32.const 0))) - (local.set 0x395 (i64.load offset=0x395 align=1 (i32.const 0))) - (local.set 0x396 (i64.load offset=0x396 align=1 (i32.const 0))) - (local.set 0x397 (i64.load offset=0x397 align=1 (i32.const 0))) - (local.set 0x398 (i64.load offset=0x398 align=1 (i32.const 0))) - (local.set 0x399 (i64.load offset=0x399 align=1 (i32.const 0))) - (local.set 0x39a (i64.load offset=0x39a align=1 (i32.const 0))) - (local.set 0x39b (i64.load offset=0x39b align=1 (i32.const 0))) - (local.set 0x39c (i64.load offset=0x39c align=1 (i32.const 0))) - (local.set 0x39d (i64.load offset=0x39d align=1 (i32.const 0))) - (local.set 0x39e (i64.load offset=0x39e align=1 (i32.const 0))) - (local.set 0x39f (i64.load offset=0x39f align=1 (i32.const 0))) - (local.set 0x3a0 (i64.load offset=0x3a0 align=1 (i32.const 0))) - (local.set 0x3a1 (i64.load offset=0x3a1 align=1 (i32.const 0))) - (local.set 0x3a2 (i64.load offset=0x3a2 align=1 (i32.const 0))) - (local.set 0x3a3 (i64.load offset=0x3a3 align=1 (i32.const 0))) - (local.set 0x3a4 (i64.load offset=0x3a4 align=1 (i32.const 0))) - (local.set 0x3a5 (i64.load offset=0x3a5 align=1 (i32.const 0))) - (local.set 0x3a6 (i64.load offset=0x3a6 align=1 (i32.const 0))) - (local.set 0x3a7 (i64.load offset=0x3a7 align=1 (i32.const 0))) - (local.set 0x3a8 (i64.load offset=0x3a8 align=1 (i32.const 0))) - (local.set 0x3a9 (i64.load offset=0x3a9 align=1 (i32.const 0))) - (local.set 0x3aa (i64.load offset=0x3aa align=1 (i32.const 0))) - (local.set 0x3ab (i64.load offset=0x3ab align=1 (i32.const 0))) - (local.set 0x3ac (i64.load offset=0x3ac align=1 (i32.const 0))) - (local.set 0x3ad (i64.load offset=0x3ad align=1 (i32.const 0))) - (local.set 0x3ae (i64.load offset=0x3ae align=1 (i32.const 0))) - (local.set 0x3af (i64.load offset=0x3af align=1 (i32.const 0))) - (local.set 0x3b0 (i64.load offset=0x3b0 align=1 (i32.const 0))) - (local.set 0x3b1 (i64.load offset=0x3b1 align=1 (i32.const 0))) - (local.set 0x3b2 (i64.load offset=0x3b2 align=1 (i32.const 0))) - (local.set 0x3b3 (i64.load offset=0x3b3 align=1 (i32.const 0))) - (local.set 0x3b4 (i64.load offset=0x3b4 align=1 (i32.const 0))) - (local.set 0x3b5 (i64.load offset=0x3b5 align=1 (i32.const 0))) - (local.set 0x3b6 (i64.load offset=0x3b6 align=1 (i32.const 0))) - (local.set 0x3b7 (i64.load offset=0x3b7 align=1 (i32.const 0))) - (local.set 0x3b8 (i64.load offset=0x3b8 align=1 (i32.const 0))) - (local.set 0x3b9 (i64.load offset=0x3b9 align=1 (i32.const 0))) - (local.set 0x3ba (i64.load offset=0x3ba align=1 (i32.const 0))) - (local.set 0x3bb (i64.load offset=0x3bb align=1 (i32.const 0))) - (local.set 0x3bc (i64.load offset=0x3bc align=1 (i32.const 0))) - (local.set 0x3bd (i64.load offset=0x3bd align=1 (i32.const 0))) - (local.set 0x3be (i64.load offset=0x3be align=1 (i32.const 0))) - (local.set 0x3bf (i64.load offset=0x3bf align=1 (i32.const 0))) - (local.set 0x3c0 (i64.load offset=0x3c0 align=1 (i32.const 0))) - (local.set 0x3c1 (i64.load offset=0x3c1 align=1 (i32.const 0))) - (local.set 0x3c2 (i64.load offset=0x3c2 align=1 (i32.const 0))) - (local.set 0x3c3 (i64.load offset=0x3c3 align=1 (i32.const 0))) - (local.set 0x3c4 (i64.load offset=0x3c4 align=1 (i32.const 0))) - (local.set 0x3c5 (i64.load offset=0x3c5 align=1 (i32.const 0))) - (local.set 0x3c6 (i64.load offset=0x3c6 align=1 (i32.const 0))) - (local.set 0x3c7 (i64.load offset=0x3c7 align=1 (i32.const 0))) - (local.set 0x3c8 (i64.load offset=0x3c8 align=1 (i32.const 0))) - (local.set 0x3c9 (i64.load offset=0x3c9 align=1 (i32.const 0))) - (local.set 0x3ca (i64.load offset=0x3ca align=1 (i32.const 0))) - (local.set 0x3cb (i64.load offset=0x3cb align=1 (i32.const 0))) - (local.set 0x3cc (i64.load offset=0x3cc align=1 (i32.const 0))) - (local.set 0x3cd (i64.load offset=0x3cd align=1 (i32.const 0))) - (local.set 0x3ce (i64.load offset=0x3ce align=1 (i32.const 0))) - (local.set 0x3cf (i64.load offset=0x3cf align=1 (i32.const 0))) - (local.set 0x3d0 (i64.load offset=0x3d0 align=1 (i32.const 0))) - (local.set 0x3d1 (i64.load offset=0x3d1 align=1 (i32.const 0))) - (local.set 0x3d2 (i64.load offset=0x3d2 align=1 (i32.const 0))) - (local.set 0x3d3 (i64.load offset=0x3d3 align=1 (i32.const 0))) - (local.set 0x3d4 (i64.load offset=0x3d4 align=1 (i32.const 0))) - (local.set 0x3d5 (i64.load offset=0x3d5 align=1 (i32.const 0))) - (local.set 0x3d6 (i64.load offset=0x3d6 align=1 (i32.const 0))) - (local.set 0x3d7 (i64.load offset=0x3d7 align=1 (i32.const 0))) - (local.set 0x3d8 (i64.load offset=0x3d8 align=1 (i32.const 0))) - (local.set 0x3d9 (i64.load offset=0x3d9 align=1 (i32.const 0))) - (local.set 0x3da (i64.load offset=0x3da align=1 (i32.const 0))) - (local.set 0x3db (i64.load offset=0x3db align=1 (i32.const 0))) - (local.set 0x3dc (i64.load offset=0x3dc align=1 (i32.const 0))) - (local.set 0x3dd (i64.load offset=0x3dd align=1 (i32.const 0))) - (local.set 0x3de (i64.load offset=0x3de align=1 (i32.const 0))) - (local.set 0x3df (i64.load offset=0x3df align=1 (i32.const 0))) - (local.set 0x3e0 (i64.load offset=0x3e0 align=1 (i32.const 0))) - (local.set 0x3e1 (i64.load offset=0x3e1 align=1 (i32.const 0))) - (local.set 0x3e2 (i64.load offset=0x3e2 align=1 (i32.const 0))) - (local.set 0x3e3 (i64.load offset=0x3e3 align=1 (i32.const 0))) - (local.set 0x3e4 (i64.load offset=0x3e4 align=1 (i32.const 0))) - (local.set 0x3e5 (i64.load offset=0x3e5 align=1 (i32.const 0))) - (local.set 0x3e6 (i64.load offset=0x3e6 align=1 (i32.const 0))) - (local.set 0x3e7 (i64.load offset=0x3e7 align=1 (i32.const 0))) - (local.set 0x3e8 (i64.load offset=0x3e8 align=1 (i32.const 0))) - (local.set 0x3e9 (i64.load offset=0x3e9 align=1 (i32.const 0))) - (local.set 0x3ea (i64.load offset=0x3ea align=1 (i32.const 0))) - (local.set 0x3eb (i64.load offset=0x3eb align=1 (i32.const 0))) - (local.set 0x3ec (i64.load offset=0x3ec align=1 (i32.const 0))) - (local.set 0x3ed (i64.load offset=0x3ed align=1 (i32.const 0))) - (local.set 0x3ee (i64.load offset=0x3ee align=1 (i32.const 0))) - (local.set 0x3ef (i64.load offset=0x3ef align=1 (i32.const 0))) - (local.set 0x3f0 (i64.load offset=0x3f0 align=1 (i32.const 0))) - (local.set 0x3f1 (i64.load offset=0x3f1 align=1 (i32.const 0))) - (local.set 0x3f2 (i64.load offset=0x3f2 align=1 (i32.const 0))) - (local.set 0x3f3 (i64.load offset=0x3f3 align=1 (i32.const 0))) - (local.set 0x3f4 (i64.load offset=0x3f4 align=1 (i32.const 0))) - (local.set 0x3f5 (i64.load offset=0x3f5 align=1 (i32.const 0))) - (local.set 0x3f6 (i64.load offset=0x3f6 align=1 (i32.const 0))) - (local.set 0x3f7 (i64.load offset=0x3f7 align=1 (i32.const 0))) - (local.set 0x3f8 (i64.load offset=0x3f8 align=1 (i32.const 0))) - (local.set 0x3f9 (i64.load offset=0x3f9 align=1 (i32.const 0))) - (local.set 0x3fa (i64.load offset=0x3fa align=1 (i32.const 0))) - (local.set 0x3fb (i64.load offset=0x3fb align=1 (i32.const 0))) - (local.set 0x3fc (i64.load offset=0x3fc align=1 (i32.const 0))) - (local.set 0x3fd (i64.load offset=0x3fd align=1 (i32.const 0))) - (local.set 0x3fe (i64.load offset=0x3fe align=1 (i32.const 0))) - (local.set 0x3ff (i64.load offset=0x3ff align=1 (i32.const 0))) - (local.set 0x400 (i64.load offset=0x400 align=1 (i32.const 0))) - (local.set 0x401 (i64.load offset=0x401 align=1 (i32.const 0))) - (local.set 0x402 (i64.load offset=0x402 align=1 (i32.const 0))) - (local.set 0x403 (i64.load offset=0x403 align=1 (i32.const 0))) - (local.set 0x404 (i64.load offset=0x404 align=1 (i32.const 0))) - (local.set 0x405 (i64.load offset=0x405 align=1 (i32.const 0))) - (local.set 0x406 (i64.load offset=0x406 align=1 (i32.const 0))) - (local.set 0x407 (i64.load offset=0x407 align=1 (i32.const 0))) - (local.set 0x408 (i64.load offset=0x408 align=1 (i32.const 0))) - (local.set 0x409 (i64.load offset=0x409 align=1 (i32.const 0))) - (local.set 0x40a (i64.load offset=0x40a align=1 (i32.const 0))) - (local.set 0x40b (i64.load offset=0x40b align=1 (i32.const 0))) - (local.set 0x40c (i64.load offset=0x40c align=1 (i32.const 0))) - (local.set 0x40d (i64.load offset=0x40d align=1 (i32.const 0))) - (local.set 0x40e (i64.load offset=0x40e align=1 (i32.const 0))) - (local.set 0x40f (i64.load offset=0x40f align=1 (i32.const 0))) - (local.set 0x410 (i64.load offset=0x410 align=1 (i32.const 0))) - (local.set 0x411 (i64.load offset=0x411 align=1 (i32.const 0))) - (local.set 0x412 (i64.load offset=0x412 align=1 (i32.const 0))) - (local.set 0x413 (i64.load offset=0x413 align=1 (i32.const 0))) - (local.set 0x414 (i64.load offset=0x414 align=1 (i32.const 0))) - (local.set 0x415 (i64.load offset=0x415 align=1 (i32.const 0))) - (local.set 0x416 (i64.load offset=0x416 align=1 (i32.const 0))) - (local.set 0x417 (i64.load offset=0x417 align=1 (i32.const 0))) - (local.set 0x418 (i64.load offset=0x418 align=1 (i32.const 0))) - (local.set 0x419 (i64.load offset=0x419 align=1 (i32.const 0))) - (local.set 0x41a (i64.load offset=0x41a align=1 (i32.const 0))) - (local.set 0x41b (i64.load offset=0x41b align=1 (i32.const 0))) - (local.set 0x41c (i64.load offset=0x41c align=1 (i32.const 0))) - (local.set 0x41d (i64.load offset=0x41d align=1 (i32.const 0))) - (local.set 0x41e (i64.load offset=0x41e align=1 (i32.const 0))) - (local.set 0x41f (i64.load offset=0x41f align=1 (i32.const 0))) - - ;; store the locals back to memory - (i64.store offset=0x000 align=1 (i32.const 0) (local.get 0x000)) - (i64.store offset=0x001 align=1 (i32.const 0) (local.get 0x001)) - (i64.store offset=0x002 align=1 (i32.const 0) (local.get 0x002)) - (i64.store offset=0x003 align=1 (i32.const 0) (local.get 0x003)) - (i64.store offset=0x004 align=1 (i32.const 0) (local.get 0x004)) - (i64.store offset=0x005 align=1 (i32.const 0) (local.get 0x005)) - (i64.store offset=0x006 align=1 (i32.const 0) (local.get 0x006)) - (i64.store offset=0x007 align=1 (i32.const 0) (local.get 0x007)) - (i64.store offset=0x008 align=1 (i32.const 0) (local.get 0x008)) - (i64.store offset=0x009 align=1 (i32.const 0) (local.get 0x009)) - (i64.store offset=0x00a align=1 (i32.const 0) (local.get 0x00a)) - (i64.store offset=0x00b align=1 (i32.const 0) (local.get 0x00b)) - (i64.store offset=0x00c align=1 (i32.const 0) (local.get 0x00c)) - (i64.store offset=0x00d align=1 (i32.const 0) (local.get 0x00d)) - (i64.store offset=0x00e align=1 (i32.const 0) (local.get 0x00e)) - (i64.store offset=0x00f align=1 (i32.const 0) (local.get 0x00f)) - (i64.store offset=0x010 align=1 (i32.const 0) (local.get 0x010)) - (i64.store offset=0x011 align=1 (i32.const 0) (local.get 0x011)) - (i64.store offset=0x012 align=1 (i32.const 0) (local.get 0x012)) - (i64.store offset=0x013 align=1 (i32.const 0) (local.get 0x013)) - (i64.store offset=0x014 align=1 (i32.const 0) (local.get 0x014)) - (i64.store offset=0x015 align=1 (i32.const 0) (local.get 0x015)) - (i64.store offset=0x016 align=1 (i32.const 0) (local.get 0x016)) - (i64.store offset=0x017 align=1 (i32.const 0) (local.get 0x017)) - (i64.store offset=0x018 align=1 (i32.const 0) (local.get 0x018)) - (i64.store offset=0x019 align=1 (i32.const 0) (local.get 0x019)) - (i64.store offset=0x01a align=1 (i32.const 0) (local.get 0x01a)) - (i64.store offset=0x01b align=1 (i32.const 0) (local.get 0x01b)) - (i64.store offset=0x01c align=1 (i32.const 0) (local.get 0x01c)) - (i64.store offset=0x01d align=1 (i32.const 0) (local.get 0x01d)) - (i64.store offset=0x01e align=1 (i32.const 0) (local.get 0x01e)) - (i64.store offset=0x01f align=1 (i32.const 0) (local.get 0x01f)) - (i64.store offset=0x020 align=1 (i32.const 0) (local.get 0x020)) - (i64.store offset=0x021 align=1 (i32.const 0) (local.get 0x021)) - (i64.store offset=0x022 align=1 (i32.const 0) (local.get 0x022)) - (i64.store offset=0x023 align=1 (i32.const 0) (local.get 0x023)) - (i64.store offset=0x024 align=1 (i32.const 0) (local.get 0x024)) - (i64.store offset=0x025 align=1 (i32.const 0) (local.get 0x025)) - (i64.store offset=0x026 align=1 (i32.const 0) (local.get 0x026)) - (i64.store offset=0x027 align=1 (i32.const 0) (local.get 0x027)) - (i64.store offset=0x028 align=1 (i32.const 0) (local.get 0x028)) - (i64.store offset=0x029 align=1 (i32.const 0) (local.get 0x029)) - (i64.store offset=0x02a align=1 (i32.const 0) (local.get 0x02a)) - (i64.store offset=0x02b align=1 (i32.const 0) (local.get 0x02b)) - (i64.store offset=0x02c align=1 (i32.const 0) (local.get 0x02c)) - (i64.store offset=0x02d align=1 (i32.const 0) (local.get 0x02d)) - (i64.store offset=0x02e align=1 (i32.const 0) (local.get 0x02e)) - (i64.store offset=0x02f align=1 (i32.const 0) (local.get 0x02f)) - (i64.store offset=0x030 align=1 (i32.const 0) (local.get 0x030)) - (i64.store offset=0x031 align=1 (i32.const 0) (local.get 0x031)) - (i64.store offset=0x032 align=1 (i32.const 0) (local.get 0x032)) - (i64.store offset=0x033 align=1 (i32.const 0) (local.get 0x033)) - (i64.store offset=0x034 align=1 (i32.const 0) (local.get 0x034)) - (i64.store offset=0x035 align=1 (i32.const 0) (local.get 0x035)) - (i64.store offset=0x036 align=1 (i32.const 0) (local.get 0x036)) - (i64.store offset=0x037 align=1 (i32.const 0) (local.get 0x037)) - (i64.store offset=0x038 align=1 (i32.const 0) (local.get 0x038)) - (i64.store offset=0x039 align=1 (i32.const 0) (local.get 0x039)) - (i64.store offset=0x03a align=1 (i32.const 0) (local.get 0x03a)) - (i64.store offset=0x03b align=1 (i32.const 0) (local.get 0x03b)) - (i64.store offset=0x03c align=1 (i32.const 0) (local.get 0x03c)) - (i64.store offset=0x03d align=1 (i32.const 0) (local.get 0x03d)) - (i64.store offset=0x03e align=1 (i32.const 0) (local.get 0x03e)) - (i64.store offset=0x03f align=1 (i32.const 0) (local.get 0x03f)) - (i64.store offset=0x040 align=1 (i32.const 0) (local.get 0x040)) - (i64.store offset=0x041 align=1 (i32.const 0) (local.get 0x041)) - (i64.store offset=0x042 align=1 (i32.const 0) (local.get 0x042)) - (i64.store offset=0x043 align=1 (i32.const 0) (local.get 0x043)) - (i64.store offset=0x044 align=1 (i32.const 0) (local.get 0x044)) - (i64.store offset=0x045 align=1 (i32.const 0) (local.get 0x045)) - (i64.store offset=0x046 align=1 (i32.const 0) (local.get 0x046)) - (i64.store offset=0x047 align=1 (i32.const 0) (local.get 0x047)) - (i64.store offset=0x048 align=1 (i32.const 0) (local.get 0x048)) - (i64.store offset=0x049 align=1 (i32.const 0) (local.get 0x049)) - (i64.store offset=0x04a align=1 (i32.const 0) (local.get 0x04a)) - (i64.store offset=0x04b align=1 (i32.const 0) (local.get 0x04b)) - (i64.store offset=0x04c align=1 (i32.const 0) (local.get 0x04c)) - (i64.store offset=0x04d align=1 (i32.const 0) (local.get 0x04d)) - (i64.store offset=0x04e align=1 (i32.const 0) (local.get 0x04e)) - (i64.store offset=0x04f align=1 (i32.const 0) (local.get 0x04f)) - (i64.store offset=0x050 align=1 (i32.const 0) (local.get 0x050)) - (i64.store offset=0x051 align=1 (i32.const 0) (local.get 0x051)) - (i64.store offset=0x052 align=1 (i32.const 0) (local.get 0x052)) - (i64.store offset=0x053 align=1 (i32.const 0) (local.get 0x053)) - (i64.store offset=0x054 align=1 (i32.const 0) (local.get 0x054)) - (i64.store offset=0x055 align=1 (i32.const 0) (local.get 0x055)) - (i64.store offset=0x056 align=1 (i32.const 0) (local.get 0x056)) - (i64.store offset=0x057 align=1 (i32.const 0) (local.get 0x057)) - (i64.store offset=0x058 align=1 (i32.const 0) (local.get 0x058)) - (i64.store offset=0x059 align=1 (i32.const 0) (local.get 0x059)) - (i64.store offset=0x05a align=1 (i32.const 0) (local.get 0x05a)) - (i64.store offset=0x05b align=1 (i32.const 0) (local.get 0x05b)) - (i64.store offset=0x05c align=1 (i32.const 0) (local.get 0x05c)) - (i64.store offset=0x05d align=1 (i32.const 0) (local.get 0x05d)) - (i64.store offset=0x05e align=1 (i32.const 0) (local.get 0x05e)) - (i64.store offset=0x05f align=1 (i32.const 0) (local.get 0x05f)) - (i64.store offset=0x060 align=1 (i32.const 0) (local.get 0x060)) - (i64.store offset=0x061 align=1 (i32.const 0) (local.get 0x061)) - (i64.store offset=0x062 align=1 (i32.const 0) (local.get 0x062)) - (i64.store offset=0x063 align=1 (i32.const 0) (local.get 0x063)) - (i64.store offset=0x064 align=1 (i32.const 0) (local.get 0x064)) - (i64.store offset=0x065 align=1 (i32.const 0) (local.get 0x065)) - (i64.store offset=0x066 align=1 (i32.const 0) (local.get 0x066)) - (i64.store offset=0x067 align=1 (i32.const 0) (local.get 0x067)) - (i64.store offset=0x068 align=1 (i32.const 0) (local.get 0x068)) - (i64.store offset=0x069 align=1 (i32.const 0) (local.get 0x069)) - (i64.store offset=0x06a align=1 (i32.const 0) (local.get 0x06a)) - (i64.store offset=0x06b align=1 (i32.const 0) (local.get 0x06b)) - (i64.store offset=0x06c align=1 (i32.const 0) (local.get 0x06c)) - (i64.store offset=0x06d align=1 (i32.const 0) (local.get 0x06d)) - (i64.store offset=0x06e align=1 (i32.const 0) (local.get 0x06e)) - (i64.store offset=0x06f align=1 (i32.const 0) (local.get 0x06f)) - (i64.store offset=0x070 align=1 (i32.const 0) (local.get 0x070)) - (i64.store offset=0x071 align=1 (i32.const 0) (local.get 0x071)) - (i64.store offset=0x072 align=1 (i32.const 0) (local.get 0x072)) - (i64.store offset=0x073 align=1 (i32.const 0) (local.get 0x073)) - (i64.store offset=0x074 align=1 (i32.const 0) (local.get 0x074)) - (i64.store offset=0x075 align=1 (i32.const 0) (local.get 0x075)) - (i64.store offset=0x076 align=1 (i32.const 0) (local.get 0x076)) - (i64.store offset=0x077 align=1 (i32.const 0) (local.get 0x077)) - (i64.store offset=0x078 align=1 (i32.const 0) (local.get 0x078)) - (i64.store offset=0x079 align=1 (i32.const 0) (local.get 0x079)) - (i64.store offset=0x07a align=1 (i32.const 0) (local.get 0x07a)) - (i64.store offset=0x07b align=1 (i32.const 0) (local.get 0x07b)) - (i64.store offset=0x07c align=1 (i32.const 0) (local.get 0x07c)) - (i64.store offset=0x07d align=1 (i32.const 0) (local.get 0x07d)) - (i64.store offset=0x07e align=1 (i32.const 0) (local.get 0x07e)) - (i64.store offset=0x07f align=1 (i32.const 0) (local.get 0x07f)) - (i64.store offset=0x080 align=1 (i32.const 0) (local.get 0x080)) - (i64.store offset=0x081 align=1 (i32.const 0) (local.get 0x081)) - (i64.store offset=0x082 align=1 (i32.const 0) (local.get 0x082)) - (i64.store offset=0x083 align=1 (i32.const 0) (local.get 0x083)) - (i64.store offset=0x084 align=1 (i32.const 0) (local.get 0x084)) - (i64.store offset=0x085 align=1 (i32.const 0) (local.get 0x085)) - (i64.store offset=0x086 align=1 (i32.const 0) (local.get 0x086)) - (i64.store offset=0x087 align=1 (i32.const 0) (local.get 0x087)) - (i64.store offset=0x088 align=1 (i32.const 0) (local.get 0x088)) - (i64.store offset=0x089 align=1 (i32.const 0) (local.get 0x089)) - (i64.store offset=0x08a align=1 (i32.const 0) (local.get 0x08a)) - (i64.store offset=0x08b align=1 (i32.const 0) (local.get 0x08b)) - (i64.store offset=0x08c align=1 (i32.const 0) (local.get 0x08c)) - (i64.store offset=0x08d align=1 (i32.const 0) (local.get 0x08d)) - (i64.store offset=0x08e align=1 (i32.const 0) (local.get 0x08e)) - (i64.store offset=0x08f align=1 (i32.const 0) (local.get 0x08f)) - (i64.store offset=0x090 align=1 (i32.const 0) (local.get 0x090)) - (i64.store offset=0x091 align=1 (i32.const 0) (local.get 0x091)) - (i64.store offset=0x092 align=1 (i32.const 0) (local.get 0x092)) - (i64.store offset=0x093 align=1 (i32.const 0) (local.get 0x093)) - (i64.store offset=0x094 align=1 (i32.const 0) (local.get 0x094)) - (i64.store offset=0x095 align=1 (i32.const 0) (local.get 0x095)) - (i64.store offset=0x096 align=1 (i32.const 0) (local.get 0x096)) - (i64.store offset=0x097 align=1 (i32.const 0) (local.get 0x097)) - (i64.store offset=0x098 align=1 (i32.const 0) (local.get 0x098)) - (i64.store offset=0x099 align=1 (i32.const 0) (local.get 0x099)) - (i64.store offset=0x09a align=1 (i32.const 0) (local.get 0x09a)) - (i64.store offset=0x09b align=1 (i32.const 0) (local.get 0x09b)) - (i64.store offset=0x09c align=1 (i32.const 0) (local.get 0x09c)) - (i64.store offset=0x09d align=1 (i32.const 0) (local.get 0x09d)) - (i64.store offset=0x09e align=1 (i32.const 0) (local.get 0x09e)) - (i64.store offset=0x09f align=1 (i32.const 0) (local.get 0x09f)) - (i64.store offset=0x0a0 align=1 (i32.const 0) (local.get 0x0a0)) - (i64.store offset=0x0a1 align=1 (i32.const 0) (local.get 0x0a1)) - (i64.store offset=0x0a2 align=1 (i32.const 0) (local.get 0x0a2)) - (i64.store offset=0x0a3 align=1 (i32.const 0) (local.get 0x0a3)) - (i64.store offset=0x0a4 align=1 (i32.const 0) (local.get 0x0a4)) - (i64.store offset=0x0a5 align=1 (i32.const 0) (local.get 0x0a5)) - (i64.store offset=0x0a6 align=1 (i32.const 0) (local.get 0x0a6)) - (i64.store offset=0x0a7 align=1 (i32.const 0) (local.get 0x0a7)) - (i64.store offset=0x0a8 align=1 (i32.const 0) (local.get 0x0a8)) - (i64.store offset=0x0a9 align=1 (i32.const 0) (local.get 0x0a9)) - (i64.store offset=0x0aa align=1 (i32.const 0) (local.get 0x0aa)) - (i64.store offset=0x0ab align=1 (i32.const 0) (local.get 0x0ab)) - (i64.store offset=0x0ac align=1 (i32.const 0) (local.get 0x0ac)) - (i64.store offset=0x0ad align=1 (i32.const 0) (local.get 0x0ad)) - (i64.store offset=0x0ae align=1 (i32.const 0) (local.get 0x0ae)) - (i64.store offset=0x0af align=1 (i32.const 0) (local.get 0x0af)) - (i64.store offset=0x0b0 align=1 (i32.const 0) (local.get 0x0b0)) - (i64.store offset=0x0b1 align=1 (i32.const 0) (local.get 0x0b1)) - (i64.store offset=0x0b2 align=1 (i32.const 0) (local.get 0x0b2)) - (i64.store offset=0x0b3 align=1 (i32.const 0) (local.get 0x0b3)) - (i64.store offset=0x0b4 align=1 (i32.const 0) (local.get 0x0b4)) - (i64.store offset=0x0b5 align=1 (i32.const 0) (local.get 0x0b5)) - (i64.store offset=0x0b6 align=1 (i32.const 0) (local.get 0x0b6)) - (i64.store offset=0x0b7 align=1 (i32.const 0) (local.get 0x0b7)) - (i64.store offset=0x0b8 align=1 (i32.const 0) (local.get 0x0b8)) - (i64.store offset=0x0b9 align=1 (i32.const 0) (local.get 0x0b9)) - (i64.store offset=0x0ba align=1 (i32.const 0) (local.get 0x0ba)) - (i64.store offset=0x0bb align=1 (i32.const 0) (local.get 0x0bb)) - (i64.store offset=0x0bc align=1 (i32.const 0) (local.get 0x0bc)) - (i64.store offset=0x0bd align=1 (i32.const 0) (local.get 0x0bd)) - (i64.store offset=0x0be align=1 (i32.const 0) (local.get 0x0be)) - (i64.store offset=0x0bf align=1 (i32.const 0) (local.get 0x0bf)) - (i64.store offset=0x0c0 align=1 (i32.const 0) (local.get 0x0c0)) - (i64.store offset=0x0c1 align=1 (i32.const 0) (local.get 0x0c1)) - (i64.store offset=0x0c2 align=1 (i32.const 0) (local.get 0x0c2)) - (i64.store offset=0x0c3 align=1 (i32.const 0) (local.get 0x0c3)) - (i64.store offset=0x0c4 align=1 (i32.const 0) (local.get 0x0c4)) - (i64.store offset=0x0c5 align=1 (i32.const 0) (local.get 0x0c5)) - (i64.store offset=0x0c6 align=1 (i32.const 0) (local.get 0x0c6)) - (i64.store offset=0x0c7 align=1 (i32.const 0) (local.get 0x0c7)) - (i64.store offset=0x0c8 align=1 (i32.const 0) (local.get 0x0c8)) - (i64.store offset=0x0c9 align=1 (i32.const 0) (local.get 0x0c9)) - (i64.store offset=0x0ca align=1 (i32.const 0) (local.get 0x0ca)) - (i64.store offset=0x0cb align=1 (i32.const 0) (local.get 0x0cb)) - (i64.store offset=0x0cc align=1 (i32.const 0) (local.get 0x0cc)) - (i64.store offset=0x0cd align=1 (i32.const 0) (local.get 0x0cd)) - (i64.store offset=0x0ce align=1 (i32.const 0) (local.get 0x0ce)) - (i64.store offset=0x0cf align=1 (i32.const 0) (local.get 0x0cf)) - (i64.store offset=0x0d0 align=1 (i32.const 0) (local.get 0x0d0)) - (i64.store offset=0x0d1 align=1 (i32.const 0) (local.get 0x0d1)) - (i64.store offset=0x0d2 align=1 (i32.const 0) (local.get 0x0d2)) - (i64.store offset=0x0d3 align=1 (i32.const 0) (local.get 0x0d3)) - (i64.store offset=0x0d4 align=1 (i32.const 0) (local.get 0x0d4)) - (i64.store offset=0x0d5 align=1 (i32.const 0) (local.get 0x0d5)) - (i64.store offset=0x0d6 align=1 (i32.const 0) (local.get 0x0d6)) - (i64.store offset=0x0d7 align=1 (i32.const 0) (local.get 0x0d7)) - (i64.store offset=0x0d8 align=1 (i32.const 0) (local.get 0x0d8)) - (i64.store offset=0x0d9 align=1 (i32.const 0) (local.get 0x0d9)) - (i64.store offset=0x0da align=1 (i32.const 0) (local.get 0x0da)) - (i64.store offset=0x0db align=1 (i32.const 0) (local.get 0x0db)) - (i64.store offset=0x0dc align=1 (i32.const 0) (local.get 0x0dc)) - (i64.store offset=0x0dd align=1 (i32.const 0) (local.get 0x0dd)) - (i64.store offset=0x0de align=1 (i32.const 0) (local.get 0x0de)) - (i64.store offset=0x0df align=1 (i32.const 0) (local.get 0x0df)) - (i64.store offset=0x0e0 align=1 (i32.const 0) (local.get 0x0e0)) - (i64.store offset=0x0e1 align=1 (i32.const 0) (local.get 0x0e1)) - (i64.store offset=0x0e2 align=1 (i32.const 0) (local.get 0x0e2)) - (i64.store offset=0x0e3 align=1 (i32.const 0) (local.get 0x0e3)) - (i64.store offset=0x0e4 align=1 (i32.const 0) (local.get 0x0e4)) - (i64.store offset=0x0e5 align=1 (i32.const 0) (local.get 0x0e5)) - (i64.store offset=0x0e6 align=1 (i32.const 0) (local.get 0x0e6)) - (i64.store offset=0x0e7 align=1 (i32.const 0) (local.get 0x0e7)) - (i64.store offset=0x0e8 align=1 (i32.const 0) (local.get 0x0e8)) - (i64.store offset=0x0e9 align=1 (i32.const 0) (local.get 0x0e9)) - (i64.store offset=0x0ea align=1 (i32.const 0) (local.get 0x0ea)) - (i64.store offset=0x0eb align=1 (i32.const 0) (local.get 0x0eb)) - (i64.store offset=0x0ec align=1 (i32.const 0) (local.get 0x0ec)) - (i64.store offset=0x0ed align=1 (i32.const 0) (local.get 0x0ed)) - (i64.store offset=0x0ee align=1 (i32.const 0) (local.get 0x0ee)) - (i64.store offset=0x0ef align=1 (i32.const 0) (local.get 0x0ef)) - (i64.store offset=0x0f0 align=1 (i32.const 0) (local.get 0x0f0)) - (i64.store offset=0x0f1 align=1 (i32.const 0) (local.get 0x0f1)) - (i64.store offset=0x0f2 align=1 (i32.const 0) (local.get 0x0f2)) - (i64.store offset=0x0f3 align=1 (i32.const 0) (local.get 0x0f3)) - (i64.store offset=0x0f4 align=1 (i32.const 0) (local.get 0x0f4)) - (i64.store offset=0x0f5 align=1 (i32.const 0) (local.get 0x0f5)) - (i64.store offset=0x0f6 align=1 (i32.const 0) (local.get 0x0f6)) - (i64.store offset=0x0f7 align=1 (i32.const 0) (local.get 0x0f7)) - (i64.store offset=0x0f8 align=1 (i32.const 0) (local.get 0x0f8)) - (i64.store offset=0x0f9 align=1 (i32.const 0) (local.get 0x0f9)) - (i64.store offset=0x0fa align=1 (i32.const 0) (local.get 0x0fa)) - (i64.store offset=0x0fb align=1 (i32.const 0) (local.get 0x0fb)) - (i64.store offset=0x0fc align=1 (i32.const 0) (local.get 0x0fc)) - (i64.store offset=0x0fd align=1 (i32.const 0) (local.get 0x0fd)) - (i64.store offset=0x0fe align=1 (i32.const 0) (local.get 0x0fe)) - (i64.store offset=0x0ff align=1 (i32.const 0) (local.get 0x0ff)) - (i64.store offset=0x100 align=1 (i32.const 0) (local.get 0x100)) - (i64.store offset=0x101 align=1 (i32.const 0) (local.get 0x101)) - (i64.store offset=0x102 align=1 (i32.const 0) (local.get 0x102)) - (i64.store offset=0x103 align=1 (i32.const 0) (local.get 0x103)) - (i64.store offset=0x104 align=1 (i32.const 0) (local.get 0x104)) - (i64.store offset=0x105 align=1 (i32.const 0) (local.get 0x105)) - (i64.store offset=0x106 align=1 (i32.const 0) (local.get 0x106)) - (i64.store offset=0x107 align=1 (i32.const 0) (local.get 0x107)) - (i64.store offset=0x108 align=1 (i32.const 0) (local.get 0x108)) - (i64.store offset=0x109 align=1 (i32.const 0) (local.get 0x109)) - (i64.store offset=0x10a align=1 (i32.const 0) (local.get 0x10a)) - (i64.store offset=0x10b align=1 (i32.const 0) (local.get 0x10b)) - (i64.store offset=0x10c align=1 (i32.const 0) (local.get 0x10c)) - (i64.store offset=0x10d align=1 (i32.const 0) (local.get 0x10d)) - (i64.store offset=0x10e align=1 (i32.const 0) (local.get 0x10e)) - (i64.store offset=0x10f align=1 (i32.const 0) (local.get 0x10f)) - (i64.store offset=0x110 align=1 (i32.const 0) (local.get 0x110)) - (i64.store offset=0x111 align=1 (i32.const 0) (local.get 0x111)) - (i64.store offset=0x112 align=1 (i32.const 0) (local.get 0x112)) - (i64.store offset=0x113 align=1 (i32.const 0) (local.get 0x113)) - (i64.store offset=0x114 align=1 (i32.const 0) (local.get 0x114)) - (i64.store offset=0x115 align=1 (i32.const 0) (local.get 0x115)) - (i64.store offset=0x116 align=1 (i32.const 0) (local.get 0x116)) - (i64.store offset=0x117 align=1 (i32.const 0) (local.get 0x117)) - (i64.store offset=0x118 align=1 (i32.const 0) (local.get 0x118)) - (i64.store offset=0x119 align=1 (i32.const 0) (local.get 0x119)) - (i64.store offset=0x11a align=1 (i32.const 0) (local.get 0x11a)) - (i64.store offset=0x11b align=1 (i32.const 0) (local.get 0x11b)) - (i64.store offset=0x11c align=1 (i32.const 0) (local.get 0x11c)) - (i64.store offset=0x11d align=1 (i32.const 0) (local.get 0x11d)) - (i64.store offset=0x11e align=1 (i32.const 0) (local.get 0x11e)) - (i64.store offset=0x11f align=1 (i32.const 0) (local.get 0x11f)) - (i64.store offset=0x120 align=1 (i32.const 0) (local.get 0x120)) - (i64.store offset=0x121 align=1 (i32.const 0) (local.get 0x121)) - (i64.store offset=0x122 align=1 (i32.const 0) (local.get 0x122)) - (i64.store offset=0x123 align=1 (i32.const 0) (local.get 0x123)) - (i64.store offset=0x124 align=1 (i32.const 0) (local.get 0x124)) - (i64.store offset=0x125 align=1 (i32.const 0) (local.get 0x125)) - (i64.store offset=0x126 align=1 (i32.const 0) (local.get 0x126)) - (i64.store offset=0x127 align=1 (i32.const 0) (local.get 0x127)) - (i64.store offset=0x128 align=1 (i32.const 0) (local.get 0x128)) - (i64.store offset=0x129 align=1 (i32.const 0) (local.get 0x129)) - (i64.store offset=0x12a align=1 (i32.const 0) (local.get 0x12a)) - (i64.store offset=0x12b align=1 (i32.const 0) (local.get 0x12b)) - (i64.store offset=0x12c align=1 (i32.const 0) (local.get 0x12c)) - (i64.store offset=0x12d align=1 (i32.const 0) (local.get 0x12d)) - (i64.store offset=0x12e align=1 (i32.const 0) (local.get 0x12e)) - (i64.store offset=0x12f align=1 (i32.const 0) (local.get 0x12f)) - (i64.store offset=0x130 align=1 (i32.const 0) (local.get 0x130)) - (i64.store offset=0x131 align=1 (i32.const 0) (local.get 0x131)) - (i64.store offset=0x132 align=1 (i32.const 0) (local.get 0x132)) - (i64.store offset=0x133 align=1 (i32.const 0) (local.get 0x133)) - (i64.store offset=0x134 align=1 (i32.const 0) (local.get 0x134)) - (i64.store offset=0x135 align=1 (i32.const 0) (local.get 0x135)) - (i64.store offset=0x136 align=1 (i32.const 0) (local.get 0x136)) - (i64.store offset=0x137 align=1 (i32.const 0) (local.get 0x137)) - (i64.store offset=0x138 align=1 (i32.const 0) (local.get 0x138)) - (i64.store offset=0x139 align=1 (i32.const 0) (local.get 0x139)) - (i64.store offset=0x13a align=1 (i32.const 0) (local.get 0x13a)) - (i64.store offset=0x13b align=1 (i32.const 0) (local.get 0x13b)) - (i64.store offset=0x13c align=1 (i32.const 0) (local.get 0x13c)) - (i64.store offset=0x13d align=1 (i32.const 0) (local.get 0x13d)) - (i64.store offset=0x13e align=1 (i32.const 0) (local.get 0x13e)) - (i64.store offset=0x13f align=1 (i32.const 0) (local.get 0x13f)) - (i64.store offset=0x140 align=1 (i32.const 0) (local.get 0x140)) - (i64.store offset=0x141 align=1 (i32.const 0) (local.get 0x141)) - (i64.store offset=0x142 align=1 (i32.const 0) (local.get 0x142)) - (i64.store offset=0x143 align=1 (i32.const 0) (local.get 0x143)) - (i64.store offset=0x144 align=1 (i32.const 0) (local.get 0x144)) - (i64.store offset=0x145 align=1 (i32.const 0) (local.get 0x145)) - (i64.store offset=0x146 align=1 (i32.const 0) (local.get 0x146)) - (i64.store offset=0x147 align=1 (i32.const 0) (local.get 0x147)) - (i64.store offset=0x148 align=1 (i32.const 0) (local.get 0x148)) - (i64.store offset=0x149 align=1 (i32.const 0) (local.get 0x149)) - (i64.store offset=0x14a align=1 (i32.const 0) (local.get 0x14a)) - (i64.store offset=0x14b align=1 (i32.const 0) (local.get 0x14b)) - (i64.store offset=0x14c align=1 (i32.const 0) (local.get 0x14c)) - (i64.store offset=0x14d align=1 (i32.const 0) (local.get 0x14d)) - (i64.store offset=0x14e align=1 (i32.const 0) (local.get 0x14e)) - (i64.store offset=0x14f align=1 (i32.const 0) (local.get 0x14f)) - (i64.store offset=0x150 align=1 (i32.const 0) (local.get 0x150)) - (i64.store offset=0x151 align=1 (i32.const 0) (local.get 0x151)) - (i64.store offset=0x152 align=1 (i32.const 0) (local.get 0x152)) - (i64.store offset=0x153 align=1 (i32.const 0) (local.get 0x153)) - (i64.store offset=0x154 align=1 (i32.const 0) (local.get 0x154)) - (i64.store offset=0x155 align=1 (i32.const 0) (local.get 0x155)) - (i64.store offset=0x156 align=1 (i32.const 0) (local.get 0x156)) - (i64.store offset=0x157 align=1 (i32.const 0) (local.get 0x157)) - (i64.store offset=0x158 align=1 (i32.const 0) (local.get 0x158)) - (i64.store offset=0x159 align=1 (i32.const 0) (local.get 0x159)) - (i64.store offset=0x15a align=1 (i32.const 0) (local.get 0x15a)) - (i64.store offset=0x15b align=1 (i32.const 0) (local.get 0x15b)) - (i64.store offset=0x15c align=1 (i32.const 0) (local.get 0x15c)) - (i64.store offset=0x15d align=1 (i32.const 0) (local.get 0x15d)) - (i64.store offset=0x15e align=1 (i32.const 0) (local.get 0x15e)) - (i64.store offset=0x15f align=1 (i32.const 0) (local.get 0x15f)) - (i64.store offset=0x160 align=1 (i32.const 0) (local.get 0x160)) - (i64.store offset=0x161 align=1 (i32.const 0) (local.get 0x161)) - (i64.store offset=0x162 align=1 (i32.const 0) (local.get 0x162)) - (i64.store offset=0x163 align=1 (i32.const 0) (local.get 0x163)) - (i64.store offset=0x164 align=1 (i32.const 0) (local.get 0x164)) - (i64.store offset=0x165 align=1 (i32.const 0) (local.get 0x165)) - (i64.store offset=0x166 align=1 (i32.const 0) (local.get 0x166)) - (i64.store offset=0x167 align=1 (i32.const 0) (local.get 0x167)) - (i64.store offset=0x168 align=1 (i32.const 0) (local.get 0x168)) - (i64.store offset=0x169 align=1 (i32.const 0) (local.get 0x169)) - (i64.store offset=0x16a align=1 (i32.const 0) (local.get 0x16a)) - (i64.store offset=0x16b align=1 (i32.const 0) (local.get 0x16b)) - (i64.store offset=0x16c align=1 (i32.const 0) (local.get 0x16c)) - (i64.store offset=0x16d align=1 (i32.const 0) (local.get 0x16d)) - (i64.store offset=0x16e align=1 (i32.const 0) (local.get 0x16e)) - (i64.store offset=0x16f align=1 (i32.const 0) (local.get 0x16f)) - (i64.store offset=0x170 align=1 (i32.const 0) (local.get 0x170)) - (i64.store offset=0x171 align=1 (i32.const 0) (local.get 0x171)) - (i64.store offset=0x172 align=1 (i32.const 0) (local.get 0x172)) - (i64.store offset=0x173 align=1 (i32.const 0) (local.get 0x173)) - (i64.store offset=0x174 align=1 (i32.const 0) (local.get 0x174)) - (i64.store offset=0x175 align=1 (i32.const 0) (local.get 0x175)) - (i64.store offset=0x176 align=1 (i32.const 0) (local.get 0x176)) - (i64.store offset=0x177 align=1 (i32.const 0) (local.get 0x177)) - (i64.store offset=0x178 align=1 (i32.const 0) (local.get 0x178)) - (i64.store offset=0x179 align=1 (i32.const 0) (local.get 0x179)) - (i64.store offset=0x17a align=1 (i32.const 0) (local.get 0x17a)) - (i64.store offset=0x17b align=1 (i32.const 0) (local.get 0x17b)) - (i64.store offset=0x17c align=1 (i32.const 0) (local.get 0x17c)) - (i64.store offset=0x17d align=1 (i32.const 0) (local.get 0x17d)) - (i64.store offset=0x17e align=1 (i32.const 0) (local.get 0x17e)) - (i64.store offset=0x17f align=1 (i32.const 0) (local.get 0x17f)) - (i64.store offset=0x180 align=1 (i32.const 0) (local.get 0x180)) - (i64.store offset=0x181 align=1 (i32.const 0) (local.get 0x181)) - (i64.store offset=0x182 align=1 (i32.const 0) (local.get 0x182)) - (i64.store offset=0x183 align=1 (i32.const 0) (local.get 0x183)) - (i64.store offset=0x184 align=1 (i32.const 0) (local.get 0x184)) - (i64.store offset=0x185 align=1 (i32.const 0) (local.get 0x185)) - (i64.store offset=0x186 align=1 (i32.const 0) (local.get 0x186)) - (i64.store offset=0x187 align=1 (i32.const 0) (local.get 0x187)) - (i64.store offset=0x188 align=1 (i32.const 0) (local.get 0x188)) - (i64.store offset=0x189 align=1 (i32.const 0) (local.get 0x189)) - (i64.store offset=0x18a align=1 (i32.const 0) (local.get 0x18a)) - (i64.store offset=0x18b align=1 (i32.const 0) (local.get 0x18b)) - (i64.store offset=0x18c align=1 (i32.const 0) (local.get 0x18c)) - (i64.store offset=0x18d align=1 (i32.const 0) (local.get 0x18d)) - (i64.store offset=0x18e align=1 (i32.const 0) (local.get 0x18e)) - (i64.store offset=0x18f align=1 (i32.const 0) (local.get 0x18f)) - (i64.store offset=0x190 align=1 (i32.const 0) (local.get 0x190)) - (i64.store offset=0x191 align=1 (i32.const 0) (local.get 0x191)) - (i64.store offset=0x192 align=1 (i32.const 0) (local.get 0x192)) - (i64.store offset=0x193 align=1 (i32.const 0) (local.get 0x193)) - (i64.store offset=0x194 align=1 (i32.const 0) (local.get 0x194)) - (i64.store offset=0x195 align=1 (i32.const 0) (local.get 0x195)) - (i64.store offset=0x196 align=1 (i32.const 0) (local.get 0x196)) - (i64.store offset=0x197 align=1 (i32.const 0) (local.get 0x197)) - (i64.store offset=0x198 align=1 (i32.const 0) (local.get 0x198)) - (i64.store offset=0x199 align=1 (i32.const 0) (local.get 0x199)) - (i64.store offset=0x19a align=1 (i32.const 0) (local.get 0x19a)) - (i64.store offset=0x19b align=1 (i32.const 0) (local.get 0x19b)) - (i64.store offset=0x19c align=1 (i32.const 0) (local.get 0x19c)) - (i64.store offset=0x19d align=1 (i32.const 0) (local.get 0x19d)) - (i64.store offset=0x19e align=1 (i32.const 0) (local.get 0x19e)) - (i64.store offset=0x19f align=1 (i32.const 0) (local.get 0x19f)) - (i64.store offset=0x1a0 align=1 (i32.const 0) (local.get 0x1a0)) - (i64.store offset=0x1a1 align=1 (i32.const 0) (local.get 0x1a1)) - (i64.store offset=0x1a2 align=1 (i32.const 0) (local.get 0x1a2)) - (i64.store offset=0x1a3 align=1 (i32.const 0) (local.get 0x1a3)) - (i64.store offset=0x1a4 align=1 (i32.const 0) (local.get 0x1a4)) - (i64.store offset=0x1a5 align=1 (i32.const 0) (local.get 0x1a5)) - (i64.store offset=0x1a6 align=1 (i32.const 0) (local.get 0x1a6)) - (i64.store offset=0x1a7 align=1 (i32.const 0) (local.get 0x1a7)) - (i64.store offset=0x1a8 align=1 (i32.const 0) (local.get 0x1a8)) - (i64.store offset=0x1a9 align=1 (i32.const 0) (local.get 0x1a9)) - (i64.store offset=0x1aa align=1 (i32.const 0) (local.get 0x1aa)) - (i64.store offset=0x1ab align=1 (i32.const 0) (local.get 0x1ab)) - (i64.store offset=0x1ac align=1 (i32.const 0) (local.get 0x1ac)) - (i64.store offset=0x1ad align=1 (i32.const 0) (local.get 0x1ad)) - (i64.store offset=0x1ae align=1 (i32.const 0) (local.get 0x1ae)) - (i64.store offset=0x1af align=1 (i32.const 0) (local.get 0x1af)) - (i64.store offset=0x1b0 align=1 (i32.const 0) (local.get 0x1b0)) - (i64.store offset=0x1b1 align=1 (i32.const 0) (local.get 0x1b1)) - (i64.store offset=0x1b2 align=1 (i32.const 0) (local.get 0x1b2)) - (i64.store offset=0x1b3 align=1 (i32.const 0) (local.get 0x1b3)) - (i64.store offset=0x1b4 align=1 (i32.const 0) (local.get 0x1b4)) - (i64.store offset=0x1b5 align=1 (i32.const 0) (local.get 0x1b5)) - (i64.store offset=0x1b6 align=1 (i32.const 0) (local.get 0x1b6)) - (i64.store offset=0x1b7 align=1 (i32.const 0) (local.get 0x1b7)) - (i64.store offset=0x1b8 align=1 (i32.const 0) (local.get 0x1b8)) - (i64.store offset=0x1b9 align=1 (i32.const 0) (local.get 0x1b9)) - (i64.store offset=0x1ba align=1 (i32.const 0) (local.get 0x1ba)) - (i64.store offset=0x1bb align=1 (i32.const 0) (local.get 0x1bb)) - (i64.store offset=0x1bc align=1 (i32.const 0) (local.get 0x1bc)) - (i64.store offset=0x1bd align=1 (i32.const 0) (local.get 0x1bd)) - (i64.store offset=0x1be align=1 (i32.const 0) (local.get 0x1be)) - (i64.store offset=0x1bf align=1 (i32.const 0) (local.get 0x1bf)) - (i64.store offset=0x1c0 align=1 (i32.const 0) (local.get 0x1c0)) - (i64.store offset=0x1c1 align=1 (i32.const 0) (local.get 0x1c1)) - (i64.store offset=0x1c2 align=1 (i32.const 0) (local.get 0x1c2)) - (i64.store offset=0x1c3 align=1 (i32.const 0) (local.get 0x1c3)) - (i64.store offset=0x1c4 align=1 (i32.const 0) (local.get 0x1c4)) - (i64.store offset=0x1c5 align=1 (i32.const 0) (local.get 0x1c5)) - (i64.store offset=0x1c6 align=1 (i32.const 0) (local.get 0x1c6)) - (i64.store offset=0x1c7 align=1 (i32.const 0) (local.get 0x1c7)) - (i64.store offset=0x1c8 align=1 (i32.const 0) (local.get 0x1c8)) - (i64.store offset=0x1c9 align=1 (i32.const 0) (local.get 0x1c9)) - (i64.store offset=0x1ca align=1 (i32.const 0) (local.get 0x1ca)) - (i64.store offset=0x1cb align=1 (i32.const 0) (local.get 0x1cb)) - (i64.store offset=0x1cc align=1 (i32.const 0) (local.get 0x1cc)) - (i64.store offset=0x1cd align=1 (i32.const 0) (local.get 0x1cd)) - (i64.store offset=0x1ce align=1 (i32.const 0) (local.get 0x1ce)) - (i64.store offset=0x1cf align=1 (i32.const 0) (local.get 0x1cf)) - (i64.store offset=0x1d0 align=1 (i32.const 0) (local.get 0x1d0)) - (i64.store offset=0x1d1 align=1 (i32.const 0) (local.get 0x1d1)) - (i64.store offset=0x1d2 align=1 (i32.const 0) (local.get 0x1d2)) - (i64.store offset=0x1d3 align=1 (i32.const 0) (local.get 0x1d3)) - (i64.store offset=0x1d4 align=1 (i32.const 0) (local.get 0x1d4)) - (i64.store offset=0x1d5 align=1 (i32.const 0) (local.get 0x1d5)) - (i64.store offset=0x1d6 align=1 (i32.const 0) (local.get 0x1d6)) - (i64.store offset=0x1d7 align=1 (i32.const 0) (local.get 0x1d7)) - (i64.store offset=0x1d8 align=1 (i32.const 0) (local.get 0x1d8)) - (i64.store offset=0x1d9 align=1 (i32.const 0) (local.get 0x1d9)) - (i64.store offset=0x1da align=1 (i32.const 0) (local.get 0x1da)) - (i64.store offset=0x1db align=1 (i32.const 0) (local.get 0x1db)) - (i64.store offset=0x1dc align=1 (i32.const 0) (local.get 0x1dc)) - (i64.store offset=0x1dd align=1 (i32.const 0) (local.get 0x1dd)) - (i64.store offset=0x1de align=1 (i32.const 0) (local.get 0x1de)) - (i64.store offset=0x1df align=1 (i32.const 0) (local.get 0x1df)) - (i64.store offset=0x1e0 align=1 (i32.const 0) (local.get 0x1e0)) - (i64.store offset=0x1e1 align=1 (i32.const 0) (local.get 0x1e1)) - (i64.store offset=0x1e2 align=1 (i32.const 0) (local.get 0x1e2)) - (i64.store offset=0x1e3 align=1 (i32.const 0) (local.get 0x1e3)) - (i64.store offset=0x1e4 align=1 (i32.const 0) (local.get 0x1e4)) - (i64.store offset=0x1e5 align=1 (i32.const 0) (local.get 0x1e5)) - (i64.store offset=0x1e6 align=1 (i32.const 0) (local.get 0x1e6)) - (i64.store offset=0x1e7 align=1 (i32.const 0) (local.get 0x1e7)) - (i64.store offset=0x1e8 align=1 (i32.const 0) (local.get 0x1e8)) - (i64.store offset=0x1e9 align=1 (i32.const 0) (local.get 0x1e9)) - (i64.store offset=0x1ea align=1 (i32.const 0) (local.get 0x1ea)) - (i64.store offset=0x1eb align=1 (i32.const 0) (local.get 0x1eb)) - (i64.store offset=0x1ec align=1 (i32.const 0) (local.get 0x1ec)) - (i64.store offset=0x1ed align=1 (i32.const 0) (local.get 0x1ed)) - (i64.store offset=0x1ee align=1 (i32.const 0) (local.get 0x1ee)) - (i64.store offset=0x1ef align=1 (i32.const 0) (local.get 0x1ef)) - (i64.store offset=0x1f0 align=1 (i32.const 0) (local.get 0x1f0)) - (i64.store offset=0x1f1 align=1 (i32.const 0) (local.get 0x1f1)) - (i64.store offset=0x1f2 align=1 (i32.const 0) (local.get 0x1f2)) - (i64.store offset=0x1f3 align=1 (i32.const 0) (local.get 0x1f3)) - (i64.store offset=0x1f4 align=1 (i32.const 0) (local.get 0x1f4)) - (i64.store offset=0x1f5 align=1 (i32.const 0) (local.get 0x1f5)) - (i64.store offset=0x1f6 align=1 (i32.const 0) (local.get 0x1f6)) - (i64.store offset=0x1f7 align=1 (i32.const 0) (local.get 0x1f7)) - (i64.store offset=0x1f8 align=1 (i32.const 0) (local.get 0x1f8)) - (i64.store offset=0x1f9 align=1 (i32.const 0) (local.get 0x1f9)) - (i64.store offset=0x1fa align=1 (i32.const 0) (local.get 0x1fa)) - (i64.store offset=0x1fb align=1 (i32.const 0) (local.get 0x1fb)) - (i64.store offset=0x1fc align=1 (i32.const 0) (local.get 0x1fc)) - (i64.store offset=0x1fd align=1 (i32.const 0) (local.get 0x1fd)) - (i64.store offset=0x1fe align=1 (i32.const 0) (local.get 0x1fe)) - (i64.store offset=0x1ff align=1 (i32.const 0) (local.get 0x1ff)) - (i64.store offset=0x200 align=1 (i32.const 0) (local.get 0x200)) - (i64.store offset=0x201 align=1 (i32.const 0) (local.get 0x201)) - (i64.store offset=0x202 align=1 (i32.const 0) (local.get 0x202)) - (i64.store offset=0x203 align=1 (i32.const 0) (local.get 0x203)) - (i64.store offset=0x204 align=1 (i32.const 0) (local.get 0x204)) - (i64.store offset=0x205 align=1 (i32.const 0) (local.get 0x205)) - (i64.store offset=0x206 align=1 (i32.const 0) (local.get 0x206)) - (i64.store offset=0x207 align=1 (i32.const 0) (local.get 0x207)) - (i64.store offset=0x208 align=1 (i32.const 0) (local.get 0x208)) - (i64.store offset=0x209 align=1 (i32.const 0) (local.get 0x209)) - (i64.store offset=0x20a align=1 (i32.const 0) (local.get 0x20a)) - (i64.store offset=0x20b align=1 (i32.const 0) (local.get 0x20b)) - (i64.store offset=0x20c align=1 (i32.const 0) (local.get 0x20c)) - (i64.store offset=0x20d align=1 (i32.const 0) (local.get 0x20d)) - (i64.store offset=0x20e align=1 (i32.const 0) (local.get 0x20e)) - (i64.store offset=0x20f align=1 (i32.const 0) (local.get 0x20f)) - (i64.store offset=0x210 align=1 (i32.const 0) (local.get 0x210)) - (i64.store offset=0x211 align=1 (i32.const 0) (local.get 0x211)) - (i64.store offset=0x212 align=1 (i32.const 0) (local.get 0x212)) - (i64.store offset=0x213 align=1 (i32.const 0) (local.get 0x213)) - (i64.store offset=0x214 align=1 (i32.const 0) (local.get 0x214)) - (i64.store offset=0x215 align=1 (i32.const 0) (local.get 0x215)) - (i64.store offset=0x216 align=1 (i32.const 0) (local.get 0x216)) - (i64.store offset=0x217 align=1 (i32.const 0) (local.get 0x217)) - (i64.store offset=0x218 align=1 (i32.const 0) (local.get 0x218)) - (i64.store offset=0x219 align=1 (i32.const 0) (local.get 0x219)) - (i64.store offset=0x21a align=1 (i32.const 0) (local.get 0x21a)) - (i64.store offset=0x21b align=1 (i32.const 0) (local.get 0x21b)) - (i64.store offset=0x21c align=1 (i32.const 0) (local.get 0x21c)) - (i64.store offset=0x21d align=1 (i32.const 0) (local.get 0x21d)) - (i64.store offset=0x21e align=1 (i32.const 0) (local.get 0x21e)) - (i64.store offset=0x21f align=1 (i32.const 0) (local.get 0x21f)) - (i64.store offset=0x220 align=1 (i32.const 0) (local.get 0x220)) - (i64.store offset=0x221 align=1 (i32.const 0) (local.get 0x221)) - (i64.store offset=0x222 align=1 (i32.const 0) (local.get 0x222)) - (i64.store offset=0x223 align=1 (i32.const 0) (local.get 0x223)) - (i64.store offset=0x224 align=1 (i32.const 0) (local.get 0x224)) - (i64.store offset=0x225 align=1 (i32.const 0) (local.get 0x225)) - (i64.store offset=0x226 align=1 (i32.const 0) (local.get 0x226)) - (i64.store offset=0x227 align=1 (i32.const 0) (local.get 0x227)) - (i64.store offset=0x228 align=1 (i32.const 0) (local.get 0x228)) - (i64.store offset=0x229 align=1 (i32.const 0) (local.get 0x229)) - (i64.store offset=0x22a align=1 (i32.const 0) (local.get 0x22a)) - (i64.store offset=0x22b align=1 (i32.const 0) (local.get 0x22b)) - (i64.store offset=0x22c align=1 (i32.const 0) (local.get 0x22c)) - (i64.store offset=0x22d align=1 (i32.const 0) (local.get 0x22d)) - (i64.store offset=0x22e align=1 (i32.const 0) (local.get 0x22e)) - (i64.store offset=0x22f align=1 (i32.const 0) (local.get 0x22f)) - (i64.store offset=0x230 align=1 (i32.const 0) (local.get 0x230)) - (i64.store offset=0x231 align=1 (i32.const 0) (local.get 0x231)) - (i64.store offset=0x232 align=1 (i32.const 0) (local.get 0x232)) - (i64.store offset=0x233 align=1 (i32.const 0) (local.get 0x233)) - (i64.store offset=0x234 align=1 (i32.const 0) (local.get 0x234)) - (i64.store offset=0x235 align=1 (i32.const 0) (local.get 0x235)) - (i64.store offset=0x236 align=1 (i32.const 0) (local.get 0x236)) - (i64.store offset=0x237 align=1 (i32.const 0) (local.get 0x237)) - (i64.store offset=0x238 align=1 (i32.const 0) (local.get 0x238)) - (i64.store offset=0x239 align=1 (i32.const 0) (local.get 0x239)) - (i64.store offset=0x23a align=1 (i32.const 0) (local.get 0x23a)) - (i64.store offset=0x23b align=1 (i32.const 0) (local.get 0x23b)) - (i64.store offset=0x23c align=1 (i32.const 0) (local.get 0x23c)) - (i64.store offset=0x23d align=1 (i32.const 0) (local.get 0x23d)) - (i64.store offset=0x23e align=1 (i32.const 0) (local.get 0x23e)) - (i64.store offset=0x23f align=1 (i32.const 0) (local.get 0x23f)) - (i64.store offset=0x240 align=1 (i32.const 0) (local.get 0x240)) - (i64.store offset=0x241 align=1 (i32.const 0) (local.get 0x241)) - (i64.store offset=0x242 align=1 (i32.const 0) (local.get 0x242)) - (i64.store offset=0x243 align=1 (i32.const 0) (local.get 0x243)) - (i64.store offset=0x244 align=1 (i32.const 0) (local.get 0x244)) - (i64.store offset=0x245 align=1 (i32.const 0) (local.get 0x245)) - (i64.store offset=0x246 align=1 (i32.const 0) (local.get 0x246)) - (i64.store offset=0x247 align=1 (i32.const 0) (local.get 0x247)) - (i64.store offset=0x248 align=1 (i32.const 0) (local.get 0x248)) - (i64.store offset=0x249 align=1 (i32.const 0) (local.get 0x249)) - (i64.store offset=0x24a align=1 (i32.const 0) (local.get 0x24a)) - (i64.store offset=0x24b align=1 (i32.const 0) (local.get 0x24b)) - (i64.store offset=0x24c align=1 (i32.const 0) (local.get 0x24c)) - (i64.store offset=0x24d align=1 (i32.const 0) (local.get 0x24d)) - (i64.store offset=0x24e align=1 (i32.const 0) (local.get 0x24e)) - (i64.store offset=0x24f align=1 (i32.const 0) (local.get 0x24f)) - (i64.store offset=0x250 align=1 (i32.const 0) (local.get 0x250)) - (i64.store offset=0x251 align=1 (i32.const 0) (local.get 0x251)) - (i64.store offset=0x252 align=1 (i32.const 0) (local.get 0x252)) - (i64.store offset=0x253 align=1 (i32.const 0) (local.get 0x253)) - (i64.store offset=0x254 align=1 (i32.const 0) (local.get 0x254)) - (i64.store offset=0x255 align=1 (i32.const 0) (local.get 0x255)) - (i64.store offset=0x256 align=1 (i32.const 0) (local.get 0x256)) - (i64.store offset=0x257 align=1 (i32.const 0) (local.get 0x257)) - (i64.store offset=0x258 align=1 (i32.const 0) (local.get 0x258)) - (i64.store offset=0x259 align=1 (i32.const 0) (local.get 0x259)) - (i64.store offset=0x25a align=1 (i32.const 0) (local.get 0x25a)) - (i64.store offset=0x25b align=1 (i32.const 0) (local.get 0x25b)) - (i64.store offset=0x25c align=1 (i32.const 0) (local.get 0x25c)) - (i64.store offset=0x25d align=1 (i32.const 0) (local.get 0x25d)) - (i64.store offset=0x25e align=1 (i32.const 0) (local.get 0x25e)) - (i64.store offset=0x25f align=1 (i32.const 0) (local.get 0x25f)) - (i64.store offset=0x260 align=1 (i32.const 0) (local.get 0x260)) - (i64.store offset=0x261 align=1 (i32.const 0) (local.get 0x261)) - (i64.store offset=0x262 align=1 (i32.const 0) (local.get 0x262)) - (i64.store offset=0x263 align=1 (i32.const 0) (local.get 0x263)) - (i64.store offset=0x264 align=1 (i32.const 0) (local.get 0x264)) - (i64.store offset=0x265 align=1 (i32.const 0) (local.get 0x265)) - (i64.store offset=0x266 align=1 (i32.const 0) (local.get 0x266)) - (i64.store offset=0x267 align=1 (i32.const 0) (local.get 0x267)) - (i64.store offset=0x268 align=1 (i32.const 0) (local.get 0x268)) - (i64.store offset=0x269 align=1 (i32.const 0) (local.get 0x269)) - (i64.store offset=0x26a align=1 (i32.const 0) (local.get 0x26a)) - (i64.store offset=0x26b align=1 (i32.const 0) (local.get 0x26b)) - (i64.store offset=0x26c align=1 (i32.const 0) (local.get 0x26c)) - (i64.store offset=0x26d align=1 (i32.const 0) (local.get 0x26d)) - (i64.store offset=0x26e align=1 (i32.const 0) (local.get 0x26e)) - (i64.store offset=0x26f align=1 (i32.const 0) (local.get 0x26f)) - (i64.store offset=0x270 align=1 (i32.const 0) (local.get 0x270)) - (i64.store offset=0x271 align=1 (i32.const 0) (local.get 0x271)) - (i64.store offset=0x272 align=1 (i32.const 0) (local.get 0x272)) - (i64.store offset=0x273 align=1 (i32.const 0) (local.get 0x273)) - (i64.store offset=0x274 align=1 (i32.const 0) (local.get 0x274)) - (i64.store offset=0x275 align=1 (i32.const 0) (local.get 0x275)) - (i64.store offset=0x276 align=1 (i32.const 0) (local.get 0x276)) - (i64.store offset=0x277 align=1 (i32.const 0) (local.get 0x277)) - (i64.store offset=0x278 align=1 (i32.const 0) (local.get 0x278)) - (i64.store offset=0x279 align=1 (i32.const 0) (local.get 0x279)) - (i64.store offset=0x27a align=1 (i32.const 0) (local.get 0x27a)) - (i64.store offset=0x27b align=1 (i32.const 0) (local.get 0x27b)) - (i64.store offset=0x27c align=1 (i32.const 0) (local.get 0x27c)) - (i64.store offset=0x27d align=1 (i32.const 0) (local.get 0x27d)) - (i64.store offset=0x27e align=1 (i32.const 0) (local.get 0x27e)) - (i64.store offset=0x27f align=1 (i32.const 0) (local.get 0x27f)) - (i64.store offset=0x280 align=1 (i32.const 0) (local.get 0x280)) - (i64.store offset=0x281 align=1 (i32.const 0) (local.get 0x281)) - (i64.store offset=0x282 align=1 (i32.const 0) (local.get 0x282)) - (i64.store offset=0x283 align=1 (i32.const 0) (local.get 0x283)) - (i64.store offset=0x284 align=1 (i32.const 0) (local.get 0x284)) - (i64.store offset=0x285 align=1 (i32.const 0) (local.get 0x285)) - (i64.store offset=0x286 align=1 (i32.const 0) (local.get 0x286)) - (i64.store offset=0x287 align=1 (i32.const 0) (local.get 0x287)) - (i64.store offset=0x288 align=1 (i32.const 0) (local.get 0x288)) - (i64.store offset=0x289 align=1 (i32.const 0) (local.get 0x289)) - (i64.store offset=0x28a align=1 (i32.const 0) (local.get 0x28a)) - (i64.store offset=0x28b align=1 (i32.const 0) (local.get 0x28b)) - (i64.store offset=0x28c align=1 (i32.const 0) (local.get 0x28c)) - (i64.store offset=0x28d align=1 (i32.const 0) (local.get 0x28d)) - (i64.store offset=0x28e align=1 (i32.const 0) (local.get 0x28e)) - (i64.store offset=0x28f align=1 (i32.const 0) (local.get 0x28f)) - (i64.store offset=0x290 align=1 (i32.const 0) (local.get 0x290)) - (i64.store offset=0x291 align=1 (i32.const 0) (local.get 0x291)) - (i64.store offset=0x292 align=1 (i32.const 0) (local.get 0x292)) - (i64.store offset=0x293 align=1 (i32.const 0) (local.get 0x293)) - (i64.store offset=0x294 align=1 (i32.const 0) (local.get 0x294)) - (i64.store offset=0x295 align=1 (i32.const 0) (local.get 0x295)) - (i64.store offset=0x296 align=1 (i32.const 0) (local.get 0x296)) - (i64.store offset=0x297 align=1 (i32.const 0) (local.get 0x297)) - (i64.store offset=0x298 align=1 (i32.const 0) (local.get 0x298)) - (i64.store offset=0x299 align=1 (i32.const 0) (local.get 0x299)) - (i64.store offset=0x29a align=1 (i32.const 0) (local.get 0x29a)) - (i64.store offset=0x29b align=1 (i32.const 0) (local.get 0x29b)) - (i64.store offset=0x29c align=1 (i32.const 0) (local.get 0x29c)) - (i64.store offset=0x29d align=1 (i32.const 0) (local.get 0x29d)) - (i64.store offset=0x29e align=1 (i32.const 0) (local.get 0x29e)) - (i64.store offset=0x29f align=1 (i32.const 0) (local.get 0x29f)) - (i64.store offset=0x2a0 align=1 (i32.const 0) (local.get 0x2a0)) - (i64.store offset=0x2a1 align=1 (i32.const 0) (local.get 0x2a1)) - (i64.store offset=0x2a2 align=1 (i32.const 0) (local.get 0x2a2)) - (i64.store offset=0x2a3 align=1 (i32.const 0) (local.get 0x2a3)) - (i64.store offset=0x2a4 align=1 (i32.const 0) (local.get 0x2a4)) - (i64.store offset=0x2a5 align=1 (i32.const 0) (local.get 0x2a5)) - (i64.store offset=0x2a6 align=1 (i32.const 0) (local.get 0x2a6)) - (i64.store offset=0x2a7 align=1 (i32.const 0) (local.get 0x2a7)) - (i64.store offset=0x2a8 align=1 (i32.const 0) (local.get 0x2a8)) - (i64.store offset=0x2a9 align=1 (i32.const 0) (local.get 0x2a9)) - (i64.store offset=0x2aa align=1 (i32.const 0) (local.get 0x2aa)) - (i64.store offset=0x2ab align=1 (i32.const 0) (local.get 0x2ab)) - (i64.store offset=0x2ac align=1 (i32.const 0) (local.get 0x2ac)) - (i64.store offset=0x2ad align=1 (i32.const 0) (local.get 0x2ad)) - (i64.store offset=0x2ae align=1 (i32.const 0) (local.get 0x2ae)) - (i64.store offset=0x2af align=1 (i32.const 0) (local.get 0x2af)) - (i64.store offset=0x2b0 align=1 (i32.const 0) (local.get 0x2b0)) - (i64.store offset=0x2b1 align=1 (i32.const 0) (local.get 0x2b1)) - (i64.store offset=0x2b2 align=1 (i32.const 0) (local.get 0x2b2)) - (i64.store offset=0x2b3 align=1 (i32.const 0) (local.get 0x2b3)) - (i64.store offset=0x2b4 align=1 (i32.const 0) (local.get 0x2b4)) - (i64.store offset=0x2b5 align=1 (i32.const 0) (local.get 0x2b5)) - (i64.store offset=0x2b6 align=1 (i32.const 0) (local.get 0x2b6)) - (i64.store offset=0x2b7 align=1 (i32.const 0) (local.get 0x2b7)) - (i64.store offset=0x2b8 align=1 (i32.const 0) (local.get 0x2b8)) - (i64.store offset=0x2b9 align=1 (i32.const 0) (local.get 0x2b9)) - (i64.store offset=0x2ba align=1 (i32.const 0) (local.get 0x2ba)) - (i64.store offset=0x2bb align=1 (i32.const 0) (local.get 0x2bb)) - (i64.store offset=0x2bc align=1 (i32.const 0) (local.get 0x2bc)) - (i64.store offset=0x2bd align=1 (i32.const 0) (local.get 0x2bd)) - (i64.store offset=0x2be align=1 (i32.const 0) (local.get 0x2be)) - (i64.store offset=0x2bf align=1 (i32.const 0) (local.get 0x2bf)) - (i64.store offset=0x2c0 align=1 (i32.const 0) (local.get 0x2c0)) - (i64.store offset=0x2c1 align=1 (i32.const 0) (local.get 0x2c1)) - (i64.store offset=0x2c2 align=1 (i32.const 0) (local.get 0x2c2)) - (i64.store offset=0x2c3 align=1 (i32.const 0) (local.get 0x2c3)) - (i64.store offset=0x2c4 align=1 (i32.const 0) (local.get 0x2c4)) - (i64.store offset=0x2c5 align=1 (i32.const 0) (local.get 0x2c5)) - (i64.store offset=0x2c6 align=1 (i32.const 0) (local.get 0x2c6)) - (i64.store offset=0x2c7 align=1 (i32.const 0) (local.get 0x2c7)) - (i64.store offset=0x2c8 align=1 (i32.const 0) (local.get 0x2c8)) - (i64.store offset=0x2c9 align=1 (i32.const 0) (local.get 0x2c9)) - (i64.store offset=0x2ca align=1 (i32.const 0) (local.get 0x2ca)) - (i64.store offset=0x2cb align=1 (i32.const 0) (local.get 0x2cb)) - (i64.store offset=0x2cc align=1 (i32.const 0) (local.get 0x2cc)) - (i64.store offset=0x2cd align=1 (i32.const 0) (local.get 0x2cd)) - (i64.store offset=0x2ce align=1 (i32.const 0) (local.get 0x2ce)) - (i64.store offset=0x2cf align=1 (i32.const 0) (local.get 0x2cf)) - (i64.store offset=0x2d0 align=1 (i32.const 0) (local.get 0x2d0)) - (i64.store offset=0x2d1 align=1 (i32.const 0) (local.get 0x2d1)) - (i64.store offset=0x2d2 align=1 (i32.const 0) (local.get 0x2d2)) - (i64.store offset=0x2d3 align=1 (i32.const 0) (local.get 0x2d3)) - (i64.store offset=0x2d4 align=1 (i32.const 0) (local.get 0x2d4)) - (i64.store offset=0x2d5 align=1 (i32.const 0) (local.get 0x2d5)) - (i64.store offset=0x2d6 align=1 (i32.const 0) (local.get 0x2d6)) - (i64.store offset=0x2d7 align=1 (i32.const 0) (local.get 0x2d7)) - (i64.store offset=0x2d8 align=1 (i32.const 0) (local.get 0x2d8)) - (i64.store offset=0x2d9 align=1 (i32.const 0) (local.get 0x2d9)) - (i64.store offset=0x2da align=1 (i32.const 0) (local.get 0x2da)) - (i64.store offset=0x2db align=1 (i32.const 0) (local.get 0x2db)) - (i64.store offset=0x2dc align=1 (i32.const 0) (local.get 0x2dc)) - (i64.store offset=0x2dd align=1 (i32.const 0) (local.get 0x2dd)) - (i64.store offset=0x2de align=1 (i32.const 0) (local.get 0x2de)) - (i64.store offset=0x2df align=1 (i32.const 0) (local.get 0x2df)) - (i64.store offset=0x2e0 align=1 (i32.const 0) (local.get 0x2e0)) - (i64.store offset=0x2e1 align=1 (i32.const 0) (local.get 0x2e1)) - (i64.store offset=0x2e2 align=1 (i32.const 0) (local.get 0x2e2)) - (i64.store offset=0x2e3 align=1 (i32.const 0) (local.get 0x2e3)) - (i64.store offset=0x2e4 align=1 (i32.const 0) (local.get 0x2e4)) - (i64.store offset=0x2e5 align=1 (i32.const 0) (local.get 0x2e5)) - (i64.store offset=0x2e6 align=1 (i32.const 0) (local.get 0x2e6)) - (i64.store offset=0x2e7 align=1 (i32.const 0) (local.get 0x2e7)) - (i64.store offset=0x2e8 align=1 (i32.const 0) (local.get 0x2e8)) - (i64.store offset=0x2e9 align=1 (i32.const 0) (local.get 0x2e9)) - (i64.store offset=0x2ea align=1 (i32.const 0) (local.get 0x2ea)) - (i64.store offset=0x2eb align=1 (i32.const 0) (local.get 0x2eb)) - (i64.store offset=0x2ec align=1 (i32.const 0) (local.get 0x2ec)) - (i64.store offset=0x2ed align=1 (i32.const 0) (local.get 0x2ed)) - (i64.store offset=0x2ee align=1 (i32.const 0) (local.get 0x2ee)) - (i64.store offset=0x2ef align=1 (i32.const 0) (local.get 0x2ef)) - (i64.store offset=0x2f0 align=1 (i32.const 0) (local.get 0x2f0)) - (i64.store offset=0x2f1 align=1 (i32.const 0) (local.get 0x2f1)) - (i64.store offset=0x2f2 align=1 (i32.const 0) (local.get 0x2f2)) - (i64.store offset=0x2f3 align=1 (i32.const 0) (local.get 0x2f3)) - (i64.store offset=0x2f4 align=1 (i32.const 0) (local.get 0x2f4)) - (i64.store offset=0x2f5 align=1 (i32.const 0) (local.get 0x2f5)) - (i64.store offset=0x2f6 align=1 (i32.const 0) (local.get 0x2f6)) - (i64.store offset=0x2f7 align=1 (i32.const 0) (local.get 0x2f7)) - (i64.store offset=0x2f8 align=1 (i32.const 0) (local.get 0x2f8)) - (i64.store offset=0x2f9 align=1 (i32.const 0) (local.get 0x2f9)) - (i64.store offset=0x2fa align=1 (i32.const 0) (local.get 0x2fa)) - (i64.store offset=0x2fb align=1 (i32.const 0) (local.get 0x2fb)) - (i64.store offset=0x2fc align=1 (i32.const 0) (local.get 0x2fc)) - (i64.store offset=0x2fd align=1 (i32.const 0) (local.get 0x2fd)) - (i64.store offset=0x2fe align=1 (i32.const 0) (local.get 0x2fe)) - (i64.store offset=0x2ff align=1 (i32.const 0) (local.get 0x2ff)) - (i64.store offset=0x300 align=1 (i32.const 0) (local.get 0x300)) - (i64.store offset=0x301 align=1 (i32.const 0) (local.get 0x301)) - (i64.store offset=0x302 align=1 (i32.const 0) (local.get 0x302)) - (i64.store offset=0x303 align=1 (i32.const 0) (local.get 0x303)) - (i64.store offset=0x304 align=1 (i32.const 0) (local.get 0x304)) - (i64.store offset=0x305 align=1 (i32.const 0) (local.get 0x305)) - (i64.store offset=0x306 align=1 (i32.const 0) (local.get 0x306)) - (i64.store offset=0x307 align=1 (i32.const 0) (local.get 0x307)) - (i64.store offset=0x308 align=1 (i32.const 0) (local.get 0x308)) - (i64.store offset=0x309 align=1 (i32.const 0) (local.get 0x309)) - (i64.store offset=0x30a align=1 (i32.const 0) (local.get 0x30a)) - (i64.store offset=0x30b align=1 (i32.const 0) (local.get 0x30b)) - (i64.store offset=0x30c align=1 (i32.const 0) (local.get 0x30c)) - (i64.store offset=0x30d align=1 (i32.const 0) (local.get 0x30d)) - (i64.store offset=0x30e align=1 (i32.const 0) (local.get 0x30e)) - (i64.store offset=0x30f align=1 (i32.const 0) (local.get 0x30f)) - (i64.store offset=0x310 align=1 (i32.const 0) (local.get 0x310)) - (i64.store offset=0x311 align=1 (i32.const 0) (local.get 0x311)) - (i64.store offset=0x312 align=1 (i32.const 0) (local.get 0x312)) - (i64.store offset=0x313 align=1 (i32.const 0) (local.get 0x313)) - (i64.store offset=0x314 align=1 (i32.const 0) (local.get 0x314)) - (i64.store offset=0x315 align=1 (i32.const 0) (local.get 0x315)) - (i64.store offset=0x316 align=1 (i32.const 0) (local.get 0x316)) - (i64.store offset=0x317 align=1 (i32.const 0) (local.get 0x317)) - (i64.store offset=0x318 align=1 (i32.const 0) (local.get 0x318)) - (i64.store offset=0x319 align=1 (i32.const 0) (local.get 0x319)) - (i64.store offset=0x31a align=1 (i32.const 0) (local.get 0x31a)) - (i64.store offset=0x31b align=1 (i32.const 0) (local.get 0x31b)) - (i64.store offset=0x31c align=1 (i32.const 0) (local.get 0x31c)) - (i64.store offset=0x31d align=1 (i32.const 0) (local.get 0x31d)) - (i64.store offset=0x31e align=1 (i32.const 0) (local.get 0x31e)) - (i64.store offset=0x31f align=1 (i32.const 0) (local.get 0x31f)) - (i64.store offset=0x320 align=1 (i32.const 0) (local.get 0x320)) - (i64.store offset=0x321 align=1 (i32.const 0) (local.get 0x321)) - (i64.store offset=0x322 align=1 (i32.const 0) (local.get 0x322)) - (i64.store offset=0x323 align=1 (i32.const 0) (local.get 0x323)) - (i64.store offset=0x324 align=1 (i32.const 0) (local.get 0x324)) - (i64.store offset=0x325 align=1 (i32.const 0) (local.get 0x325)) - (i64.store offset=0x326 align=1 (i32.const 0) (local.get 0x326)) - (i64.store offset=0x327 align=1 (i32.const 0) (local.get 0x327)) - (i64.store offset=0x328 align=1 (i32.const 0) (local.get 0x328)) - (i64.store offset=0x329 align=1 (i32.const 0) (local.get 0x329)) - (i64.store offset=0x32a align=1 (i32.const 0) (local.get 0x32a)) - (i64.store offset=0x32b align=1 (i32.const 0) (local.get 0x32b)) - (i64.store offset=0x32c align=1 (i32.const 0) (local.get 0x32c)) - (i64.store offset=0x32d align=1 (i32.const 0) (local.get 0x32d)) - (i64.store offset=0x32e align=1 (i32.const 0) (local.get 0x32e)) - (i64.store offset=0x32f align=1 (i32.const 0) (local.get 0x32f)) - (i64.store offset=0x330 align=1 (i32.const 0) (local.get 0x330)) - (i64.store offset=0x331 align=1 (i32.const 0) (local.get 0x331)) - (i64.store offset=0x332 align=1 (i32.const 0) (local.get 0x332)) - (i64.store offset=0x333 align=1 (i32.const 0) (local.get 0x333)) - (i64.store offset=0x334 align=1 (i32.const 0) (local.get 0x334)) - (i64.store offset=0x335 align=1 (i32.const 0) (local.get 0x335)) - (i64.store offset=0x336 align=1 (i32.const 0) (local.get 0x336)) - (i64.store offset=0x337 align=1 (i32.const 0) (local.get 0x337)) - (i64.store offset=0x338 align=1 (i32.const 0) (local.get 0x338)) - (i64.store offset=0x339 align=1 (i32.const 0) (local.get 0x339)) - (i64.store offset=0x33a align=1 (i32.const 0) (local.get 0x33a)) - (i64.store offset=0x33b align=1 (i32.const 0) (local.get 0x33b)) - (i64.store offset=0x33c align=1 (i32.const 0) (local.get 0x33c)) - (i64.store offset=0x33d align=1 (i32.const 0) (local.get 0x33d)) - (i64.store offset=0x33e align=1 (i32.const 0) (local.get 0x33e)) - (i64.store offset=0x33f align=1 (i32.const 0) (local.get 0x33f)) - (i64.store offset=0x340 align=1 (i32.const 0) (local.get 0x340)) - (i64.store offset=0x341 align=1 (i32.const 0) (local.get 0x341)) - (i64.store offset=0x342 align=1 (i32.const 0) (local.get 0x342)) - (i64.store offset=0x343 align=1 (i32.const 0) (local.get 0x343)) - (i64.store offset=0x344 align=1 (i32.const 0) (local.get 0x344)) - (i64.store offset=0x345 align=1 (i32.const 0) (local.get 0x345)) - (i64.store offset=0x346 align=1 (i32.const 0) (local.get 0x346)) - (i64.store offset=0x347 align=1 (i32.const 0) (local.get 0x347)) - (i64.store offset=0x348 align=1 (i32.const 0) (local.get 0x348)) - (i64.store offset=0x349 align=1 (i32.const 0) (local.get 0x349)) - (i64.store offset=0x34a align=1 (i32.const 0) (local.get 0x34a)) - (i64.store offset=0x34b align=1 (i32.const 0) (local.get 0x34b)) - (i64.store offset=0x34c align=1 (i32.const 0) (local.get 0x34c)) - (i64.store offset=0x34d align=1 (i32.const 0) (local.get 0x34d)) - (i64.store offset=0x34e align=1 (i32.const 0) (local.get 0x34e)) - (i64.store offset=0x34f align=1 (i32.const 0) (local.get 0x34f)) - (i64.store offset=0x350 align=1 (i32.const 0) (local.get 0x350)) - (i64.store offset=0x351 align=1 (i32.const 0) (local.get 0x351)) - (i64.store offset=0x352 align=1 (i32.const 0) (local.get 0x352)) - (i64.store offset=0x353 align=1 (i32.const 0) (local.get 0x353)) - (i64.store offset=0x354 align=1 (i32.const 0) (local.get 0x354)) - (i64.store offset=0x355 align=1 (i32.const 0) (local.get 0x355)) - (i64.store offset=0x356 align=1 (i32.const 0) (local.get 0x356)) - (i64.store offset=0x357 align=1 (i32.const 0) (local.get 0x357)) - (i64.store offset=0x358 align=1 (i32.const 0) (local.get 0x358)) - (i64.store offset=0x359 align=1 (i32.const 0) (local.get 0x359)) - (i64.store offset=0x35a align=1 (i32.const 0) (local.get 0x35a)) - (i64.store offset=0x35b align=1 (i32.const 0) (local.get 0x35b)) - (i64.store offset=0x35c align=1 (i32.const 0) (local.get 0x35c)) - (i64.store offset=0x35d align=1 (i32.const 0) (local.get 0x35d)) - (i64.store offset=0x35e align=1 (i32.const 0) (local.get 0x35e)) - (i64.store offset=0x35f align=1 (i32.const 0) (local.get 0x35f)) - (i64.store offset=0x360 align=1 (i32.const 0) (local.get 0x360)) - (i64.store offset=0x361 align=1 (i32.const 0) (local.get 0x361)) - (i64.store offset=0x362 align=1 (i32.const 0) (local.get 0x362)) - (i64.store offset=0x363 align=1 (i32.const 0) (local.get 0x363)) - (i64.store offset=0x364 align=1 (i32.const 0) (local.get 0x364)) - (i64.store offset=0x365 align=1 (i32.const 0) (local.get 0x365)) - (i64.store offset=0x366 align=1 (i32.const 0) (local.get 0x366)) - (i64.store offset=0x367 align=1 (i32.const 0) (local.get 0x367)) - (i64.store offset=0x368 align=1 (i32.const 0) (local.get 0x368)) - (i64.store offset=0x369 align=1 (i32.const 0) (local.get 0x369)) - (i64.store offset=0x36a align=1 (i32.const 0) (local.get 0x36a)) - (i64.store offset=0x36b align=1 (i32.const 0) (local.get 0x36b)) - (i64.store offset=0x36c align=1 (i32.const 0) (local.get 0x36c)) - (i64.store offset=0x36d align=1 (i32.const 0) (local.get 0x36d)) - (i64.store offset=0x36e align=1 (i32.const 0) (local.get 0x36e)) - (i64.store offset=0x36f align=1 (i32.const 0) (local.get 0x36f)) - (i64.store offset=0x370 align=1 (i32.const 0) (local.get 0x370)) - (i64.store offset=0x371 align=1 (i32.const 0) (local.get 0x371)) - (i64.store offset=0x372 align=1 (i32.const 0) (local.get 0x372)) - (i64.store offset=0x373 align=1 (i32.const 0) (local.get 0x373)) - (i64.store offset=0x374 align=1 (i32.const 0) (local.get 0x374)) - (i64.store offset=0x375 align=1 (i32.const 0) (local.get 0x375)) - (i64.store offset=0x376 align=1 (i32.const 0) (local.get 0x376)) - (i64.store offset=0x377 align=1 (i32.const 0) (local.get 0x377)) - (i64.store offset=0x378 align=1 (i32.const 0) (local.get 0x378)) - (i64.store offset=0x379 align=1 (i32.const 0) (local.get 0x379)) - (i64.store offset=0x37a align=1 (i32.const 0) (local.get 0x37a)) - (i64.store offset=0x37b align=1 (i32.const 0) (local.get 0x37b)) - (i64.store offset=0x37c align=1 (i32.const 0) (local.get 0x37c)) - (i64.store offset=0x37d align=1 (i32.const 0) (local.get 0x37d)) - (i64.store offset=0x37e align=1 (i32.const 0) (local.get 0x37e)) - (i64.store offset=0x37f align=1 (i32.const 0) (local.get 0x37f)) - (i64.store offset=0x380 align=1 (i32.const 0) (local.get 0x380)) - (i64.store offset=0x381 align=1 (i32.const 0) (local.get 0x381)) - (i64.store offset=0x382 align=1 (i32.const 0) (local.get 0x382)) - (i64.store offset=0x383 align=1 (i32.const 0) (local.get 0x383)) - (i64.store offset=0x384 align=1 (i32.const 0) (local.get 0x384)) - (i64.store offset=0x385 align=1 (i32.const 0) (local.get 0x385)) - (i64.store offset=0x386 align=1 (i32.const 0) (local.get 0x386)) - (i64.store offset=0x387 align=1 (i32.const 0) (local.get 0x387)) - (i64.store offset=0x388 align=1 (i32.const 0) (local.get 0x388)) - (i64.store offset=0x389 align=1 (i32.const 0) (local.get 0x389)) - (i64.store offset=0x38a align=1 (i32.const 0) (local.get 0x38a)) - (i64.store offset=0x38b align=1 (i32.const 0) (local.get 0x38b)) - (i64.store offset=0x38c align=1 (i32.const 0) (local.get 0x38c)) - (i64.store offset=0x38d align=1 (i32.const 0) (local.get 0x38d)) - (i64.store offset=0x38e align=1 (i32.const 0) (local.get 0x38e)) - (i64.store offset=0x38f align=1 (i32.const 0) (local.get 0x38f)) - (i64.store offset=0x390 align=1 (i32.const 0) (local.get 0x390)) - (i64.store offset=0x391 align=1 (i32.const 0) (local.get 0x391)) - (i64.store offset=0x392 align=1 (i32.const 0) (local.get 0x392)) - (i64.store offset=0x393 align=1 (i32.const 0) (local.get 0x393)) - (i64.store offset=0x394 align=1 (i32.const 0) (local.get 0x394)) - (i64.store offset=0x395 align=1 (i32.const 0) (local.get 0x395)) - (i64.store offset=0x396 align=1 (i32.const 0) (local.get 0x396)) - (i64.store offset=0x397 align=1 (i32.const 0) (local.get 0x397)) - (i64.store offset=0x398 align=1 (i32.const 0) (local.get 0x398)) - (i64.store offset=0x399 align=1 (i32.const 0) (local.get 0x399)) - (i64.store offset=0x39a align=1 (i32.const 0) (local.get 0x39a)) - (i64.store offset=0x39b align=1 (i32.const 0) (local.get 0x39b)) - (i64.store offset=0x39c align=1 (i32.const 0) (local.get 0x39c)) - (i64.store offset=0x39d align=1 (i32.const 0) (local.get 0x39d)) - (i64.store offset=0x39e align=1 (i32.const 0) (local.get 0x39e)) - (i64.store offset=0x39f align=1 (i32.const 0) (local.get 0x39f)) - (i64.store offset=0x3a0 align=1 (i32.const 0) (local.get 0x3a0)) - (i64.store offset=0x3a1 align=1 (i32.const 0) (local.get 0x3a1)) - (i64.store offset=0x3a2 align=1 (i32.const 0) (local.get 0x3a2)) - (i64.store offset=0x3a3 align=1 (i32.const 0) (local.get 0x3a3)) - (i64.store offset=0x3a4 align=1 (i32.const 0) (local.get 0x3a4)) - (i64.store offset=0x3a5 align=1 (i32.const 0) (local.get 0x3a5)) - (i64.store offset=0x3a6 align=1 (i32.const 0) (local.get 0x3a6)) - (i64.store offset=0x3a7 align=1 (i32.const 0) (local.get 0x3a7)) - (i64.store offset=0x3a8 align=1 (i32.const 0) (local.get 0x3a8)) - (i64.store offset=0x3a9 align=1 (i32.const 0) (local.get 0x3a9)) - (i64.store offset=0x3aa align=1 (i32.const 0) (local.get 0x3aa)) - (i64.store offset=0x3ab align=1 (i32.const 0) (local.get 0x3ab)) - (i64.store offset=0x3ac align=1 (i32.const 0) (local.get 0x3ac)) - (i64.store offset=0x3ad align=1 (i32.const 0) (local.get 0x3ad)) - (i64.store offset=0x3ae align=1 (i32.const 0) (local.get 0x3ae)) - (i64.store offset=0x3af align=1 (i32.const 0) (local.get 0x3af)) - (i64.store offset=0x3b0 align=1 (i32.const 0) (local.get 0x3b0)) - (i64.store offset=0x3b1 align=1 (i32.const 0) (local.get 0x3b1)) - (i64.store offset=0x3b2 align=1 (i32.const 0) (local.get 0x3b2)) - (i64.store offset=0x3b3 align=1 (i32.const 0) (local.get 0x3b3)) - (i64.store offset=0x3b4 align=1 (i32.const 0) (local.get 0x3b4)) - (i64.store offset=0x3b5 align=1 (i32.const 0) (local.get 0x3b5)) - (i64.store offset=0x3b6 align=1 (i32.const 0) (local.get 0x3b6)) - (i64.store offset=0x3b7 align=1 (i32.const 0) (local.get 0x3b7)) - (i64.store offset=0x3b8 align=1 (i32.const 0) (local.get 0x3b8)) - (i64.store offset=0x3b9 align=1 (i32.const 0) (local.get 0x3b9)) - (i64.store offset=0x3ba align=1 (i32.const 0) (local.get 0x3ba)) - (i64.store offset=0x3bb align=1 (i32.const 0) (local.get 0x3bb)) - (i64.store offset=0x3bc align=1 (i32.const 0) (local.get 0x3bc)) - (i64.store offset=0x3bd align=1 (i32.const 0) (local.get 0x3bd)) - (i64.store offset=0x3be align=1 (i32.const 0) (local.get 0x3be)) - (i64.store offset=0x3bf align=1 (i32.const 0) (local.get 0x3bf)) - (i64.store offset=0x3c0 align=1 (i32.const 0) (local.get 0x3c0)) - (i64.store offset=0x3c1 align=1 (i32.const 0) (local.get 0x3c1)) - (i64.store offset=0x3c2 align=1 (i32.const 0) (local.get 0x3c2)) - (i64.store offset=0x3c3 align=1 (i32.const 0) (local.get 0x3c3)) - (i64.store offset=0x3c4 align=1 (i32.const 0) (local.get 0x3c4)) - (i64.store offset=0x3c5 align=1 (i32.const 0) (local.get 0x3c5)) - (i64.store offset=0x3c6 align=1 (i32.const 0) (local.get 0x3c6)) - (i64.store offset=0x3c7 align=1 (i32.const 0) (local.get 0x3c7)) - (i64.store offset=0x3c8 align=1 (i32.const 0) (local.get 0x3c8)) - (i64.store offset=0x3c9 align=1 (i32.const 0) (local.get 0x3c9)) - (i64.store offset=0x3ca align=1 (i32.const 0) (local.get 0x3ca)) - (i64.store offset=0x3cb align=1 (i32.const 0) (local.get 0x3cb)) - (i64.store offset=0x3cc align=1 (i32.const 0) (local.get 0x3cc)) - (i64.store offset=0x3cd align=1 (i32.const 0) (local.get 0x3cd)) - (i64.store offset=0x3ce align=1 (i32.const 0) (local.get 0x3ce)) - (i64.store offset=0x3cf align=1 (i32.const 0) (local.get 0x3cf)) - (i64.store offset=0x3d0 align=1 (i32.const 0) (local.get 0x3d0)) - (i64.store offset=0x3d1 align=1 (i32.const 0) (local.get 0x3d1)) - (i64.store offset=0x3d2 align=1 (i32.const 0) (local.get 0x3d2)) - (i64.store offset=0x3d3 align=1 (i32.const 0) (local.get 0x3d3)) - (i64.store offset=0x3d4 align=1 (i32.const 0) (local.get 0x3d4)) - (i64.store offset=0x3d5 align=1 (i32.const 0) (local.get 0x3d5)) - (i64.store offset=0x3d6 align=1 (i32.const 0) (local.get 0x3d6)) - (i64.store offset=0x3d7 align=1 (i32.const 0) (local.get 0x3d7)) - (i64.store offset=0x3d8 align=1 (i32.const 0) (local.get 0x3d8)) - (i64.store offset=0x3d9 align=1 (i32.const 0) (local.get 0x3d9)) - (i64.store offset=0x3da align=1 (i32.const 0) (local.get 0x3da)) - (i64.store offset=0x3db align=1 (i32.const 0) (local.get 0x3db)) - (i64.store offset=0x3dc align=1 (i32.const 0) (local.get 0x3dc)) - (i64.store offset=0x3dd align=1 (i32.const 0) (local.get 0x3dd)) - (i64.store offset=0x3de align=1 (i32.const 0) (local.get 0x3de)) - (i64.store offset=0x3df align=1 (i32.const 0) (local.get 0x3df)) - (i64.store offset=0x3e0 align=1 (i32.const 0) (local.get 0x3e0)) - (i64.store offset=0x3e1 align=1 (i32.const 0) (local.get 0x3e1)) - (i64.store offset=0x3e2 align=1 (i32.const 0) (local.get 0x3e2)) - (i64.store offset=0x3e3 align=1 (i32.const 0) (local.get 0x3e3)) - (i64.store offset=0x3e4 align=1 (i32.const 0) (local.get 0x3e4)) - (i64.store offset=0x3e5 align=1 (i32.const 0) (local.get 0x3e5)) - (i64.store offset=0x3e6 align=1 (i32.const 0) (local.get 0x3e6)) - (i64.store offset=0x3e7 align=1 (i32.const 0) (local.get 0x3e7)) - (i64.store offset=0x3e8 align=1 (i32.const 0) (local.get 0x3e8)) - (i64.store offset=0x3e9 align=1 (i32.const 0) (local.get 0x3e9)) - (i64.store offset=0x3ea align=1 (i32.const 0) (local.get 0x3ea)) - (i64.store offset=0x3eb align=1 (i32.const 0) (local.get 0x3eb)) - (i64.store offset=0x3ec align=1 (i32.const 0) (local.get 0x3ec)) - (i64.store offset=0x3ed align=1 (i32.const 0) (local.get 0x3ed)) - (i64.store offset=0x3ee align=1 (i32.const 0) (local.get 0x3ee)) - (i64.store offset=0x3ef align=1 (i32.const 0) (local.get 0x3ef)) - (i64.store offset=0x3f0 align=1 (i32.const 0) (local.get 0x3f0)) - (i64.store offset=0x3f1 align=1 (i32.const 0) (local.get 0x3f1)) - (i64.store offset=0x3f2 align=1 (i32.const 0) (local.get 0x3f2)) - (i64.store offset=0x3f3 align=1 (i32.const 0) (local.get 0x3f3)) - (i64.store offset=0x3f4 align=1 (i32.const 0) (local.get 0x3f4)) - (i64.store offset=0x3f5 align=1 (i32.const 0) (local.get 0x3f5)) - (i64.store offset=0x3f6 align=1 (i32.const 0) (local.get 0x3f6)) - (i64.store offset=0x3f7 align=1 (i32.const 0) (local.get 0x3f7)) - (i64.store offset=0x3f8 align=1 (i32.const 0) (local.get 0x3f8)) - (i64.store offset=0x3f9 align=1 (i32.const 0) (local.get 0x3f9)) - (i64.store offset=0x3fa align=1 (i32.const 0) (local.get 0x3fa)) - (i64.store offset=0x3fb align=1 (i32.const 0) (local.get 0x3fb)) - (i64.store offset=0x3fc align=1 (i32.const 0) (local.get 0x3fc)) - (i64.store offset=0x3fd align=1 (i32.const 0) (local.get 0x3fd)) - (i64.store offset=0x3fe align=1 (i32.const 0) (local.get 0x3fe)) - (i64.store offset=0x3ff align=1 (i32.const 0) (local.get 0x3ff)) - (i64.store offset=0x400 align=1 (i32.const 0) (local.get 0x400)) - (i64.store offset=0x401 align=1 (i32.const 0) (local.get 0x401)) - (i64.store offset=0x402 align=1 (i32.const 0) (local.get 0x402)) - (i64.store offset=0x403 align=1 (i32.const 0) (local.get 0x403)) - (i64.store offset=0x404 align=1 (i32.const 0) (local.get 0x404)) - (i64.store offset=0x405 align=1 (i32.const 0) (local.get 0x405)) - (i64.store offset=0x406 align=1 (i32.const 0) (local.get 0x406)) - (i64.store offset=0x407 align=1 (i32.const 0) (local.get 0x407)) - (i64.store offset=0x408 align=1 (i32.const 0) (local.get 0x408)) - (i64.store offset=0x409 align=1 (i32.const 0) (local.get 0x409)) - (i64.store offset=0x40a align=1 (i32.const 0) (local.get 0x40a)) - (i64.store offset=0x40b align=1 (i32.const 0) (local.get 0x40b)) - (i64.store offset=0x40c align=1 (i32.const 0) (local.get 0x40c)) - (i64.store offset=0x40d align=1 (i32.const 0) (local.get 0x40d)) - (i64.store offset=0x40e align=1 (i32.const 0) (local.get 0x40e)) - (i64.store offset=0x40f align=1 (i32.const 0) (local.get 0x40f)) - (i64.store offset=0x410 align=1 (i32.const 0) (local.get 0x410)) - (i64.store offset=0x411 align=1 (i32.const 0) (local.get 0x411)) - (i64.store offset=0x412 align=1 (i32.const 0) (local.get 0x412)) - (i64.store offset=0x413 align=1 (i32.const 0) (local.get 0x413)) - (i64.store offset=0x414 align=1 (i32.const 0) (local.get 0x414)) - (i64.store offset=0x415 align=1 (i32.const 0) (local.get 0x415)) - (i64.store offset=0x416 align=1 (i32.const 0) (local.get 0x416)) - (i64.store offset=0x417 align=1 (i32.const 0) (local.get 0x417)) - (i64.store offset=0x418 align=1 (i32.const 0) (local.get 0x418)) - (i64.store offset=0x419 align=1 (i32.const 0) (local.get 0x419)) - (i64.store offset=0x41a align=1 (i32.const 0) (local.get 0x41a)) - (i64.store offset=0x41b align=1 (i32.const 0) (local.get 0x41b)) - (i64.store offset=0x41c align=1 (i32.const 0) (local.get 0x41c)) - (i64.store offset=0x41d align=1 (i32.const 0) (local.get 0x41d)) - (i64.store offset=0x41e align=1 (i32.const 0) (local.get 0x41e)) - (i64.store offset=0x41f align=1 (i32.const 0) (local.get 0x41f)) - ) -) diff --git a/client/executor-wasmtime/src/tests.rs b/client/executor-wasmtime/src/tests.rs deleted file mode 100644 index dbbf6490..00000000 --- a/client/executor-wasmtime/src/tests.rs +++ /dev/null @@ -1,522 +0,0 @@ -// This file is part of Substrate. - -// Copyright (C) Parity Technologies (UK) Ltd. -// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 - -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -use codec::{Decode as _, Encode as _}; -use sc_executor_common::{ - error::Error, - runtime_blob::RuntimeBlob, - wasm_runtime::{HeapAllocStrategy, WasmModule, DEFAULT_HEAP_ALLOC_STRATEGY}, -}; -use sc_runtime_test::wasm_binary_unwrap; - -use crate::InstantiationStrategy; - -type HostFunctions = sp_io::SubstrateHostFunctions; - -#[macro_export] -macro_rules! test_wasm_execution { - ($method_name:ident) => { - paste::item! { - #[test] - fn [<$method_name _recreate_instance_cow>]() { - $method_name( - InstantiationStrategy::RecreateInstanceCopyOnWrite - ); - } - - #[test] - fn [<$method_name _recreate_instance_vanilla>]() { - $method_name( - InstantiationStrategy::RecreateInstance - ); - } - - #[test] - fn [<$method_name _pooling_cow>]() { - $method_name( - InstantiationStrategy::PoolingCopyOnWrite - ); - } - - #[test] - fn [<$method_name _pooling_vanilla>]() { - $method_name( - InstantiationStrategy::Pooling - ); - } - } - }; -} - -struct RuntimeBuilder { - code: Option, - instantiation_strategy: InstantiationStrategy, - canonicalize_nans: bool, - deterministic_stack: bool, - heap_pages: HeapAllocStrategy, - precompile_runtime: bool, - tmpdir: Option, -} - -impl RuntimeBuilder { - fn new(instantiation_strategy: InstantiationStrategy) -> Self { - Self { - code: None, - instantiation_strategy, - canonicalize_nans: false, - deterministic_stack: false, - heap_pages: DEFAULT_HEAP_ALLOC_STRATEGY, - precompile_runtime: false, - tmpdir: None, - } - } - - fn use_wat(mut self, code: String) -> Self { - self.code = Some(code); - self - } - - fn canonicalize_nans(mut self, canonicalize_nans: bool) -> Self { - self.canonicalize_nans = canonicalize_nans; - self - } - - fn deterministic_stack(mut self, deterministic_stack: bool) -> Self { - self.deterministic_stack = deterministic_stack; - self - } - - fn precompile_runtime(mut self, precompile_runtime: bool) -> Self { - self.precompile_runtime = precompile_runtime; - self - } - - fn heap_alloc_strategy(mut self, heap_pages: HeapAllocStrategy) -> Self { - self.heap_pages = heap_pages; - self - } - - fn build(&mut self) -> impl WasmModule + '_ { - let blob = { - let wasm: Vec; - - let wasm = match self.code { - None => wasm_binary_unwrap(), - Some(ref wat) => { - wasm = wat::parse_str(wat).expect("wat parsing failed"); - &wasm - }, - }; - - RuntimeBlob::uncompress_if_needed(&wasm) - .expect("failed to create a runtime blob out of test runtime") - }; - - let config = crate::Config { - allow_missing_func_imports: true, - cache_path: None, - semantics: crate::Semantics { - instantiation_strategy: self.instantiation_strategy, - deterministic_stack_limit: match self.deterministic_stack { - true => Some(crate::DeterministicStackLimit { - logical_max: 65536, - native_stack_max: 256 * 1024 * 1024, - }), - false => None, - }, - canonicalize_nans: self.canonicalize_nans, - parallel_compilation: true, - heap_alloc_strategy: self.heap_pages, - wasm_multi_value: false, - wasm_bulk_memory: false, - wasm_reference_types: false, - wasm_simd: false, - }, - }; - - if self.precompile_runtime { - let dir = tempfile::tempdir().unwrap(); - let path = dir.path().join("runtime.bin"); - - // Delay the removal of the temporary directory until we're dropped. - self.tmpdir = Some(dir); - - let artifact = crate::prepare_runtime_artifact(blob, &config.semantics).unwrap(); - std::fs::write(&path, artifact).unwrap(); - unsafe { crate::create_runtime_from_artifact::(&path, config) } - } else { - crate::create_runtime::(blob, config) - } - .expect("cannot create runtime") - } -} - -fn deep_call_stack_wat(depth: usize) -> String { - format!( - r#" - (module - (memory $0 32) - (export "memory" (memory $0)) - (global (export "__heap_base") i32 (i32.const 0)) - (func (export "overflow") call 0) - - (func $overflow (param $0 i32) - (block $label$1 - (br_if $label$1 - (i32.ge_u - (local.get $0) - (i32.const {depth}) - ) - ) - (call $overflow - (i32.add - (local.get $0) - (i32.const 1) - ) - ) - ) - ) - - (func (export "main") - (param i32 i32) (result i64) - (call $overflow (i32.const 0)) - (i64.const 0) - ) - ) - "# - ) -} - -// These two tests ensure that the `wasmtime`'s stack size limit and the amount of -// stack space used by a single stack frame doesn't suddenly change without us noticing. -// -// If they do (e.g. because we've pulled in a new version of `wasmtime`) we want to know -// that it did, regardless of how small the change was. -// -// If these tests starting failing it doesn't necessarily mean that something is broken; -// what it means is that one (or multiple) of the following has to be done: -// a) the tests may need to be updated for the new call depth, -// b) the stack limit may need to be changed to maintain backwards compatibility, -// c) the root cause of the new call depth limit determined, and potentially fixed, -// d) the new call depth limit may need to be validated to ensure it doesn't prevent any -// existing chain from syncing (if it was effectively decreased) - -// We need two limits here since depending on whether the code is compiled in debug -// or in release mode the maximum call depth is slightly different. -const CALL_DEPTH_LOWER_LIMIT: usize = 65451; -const CALL_DEPTH_UPPER_LIMIT: usize = 65506; - -test_wasm_execution!(test_consume_under_1mb_of_stack_does_not_trap); -fn test_consume_under_1mb_of_stack_does_not_trap(instantiation_strategy: InstantiationStrategy) { - let wat = deep_call_stack_wat(CALL_DEPTH_LOWER_LIMIT); - let mut builder = RuntimeBuilder::new(instantiation_strategy).use_wat(wat); - let runtime = builder.build(); - let mut instance = runtime.new_instance().expect("failed to instantiate a runtime"); - instance.call_export("main", &[]).unwrap(); -} - -test_wasm_execution!(test_consume_over_1mb_of_stack_does_trap); -fn test_consume_over_1mb_of_stack_does_trap(instantiation_strategy: InstantiationStrategy) { - let wat = deep_call_stack_wat(CALL_DEPTH_UPPER_LIMIT + 1); - let mut builder = RuntimeBuilder::new(instantiation_strategy).use_wat(wat); - let runtime = builder.build(); - let mut instance = runtime.new_instance().expect("failed to instantiate a runtime"); - match instance.call_export("main", &[]).unwrap_err() { - Error::AbortedDueToTrap(error) => { - let expected = "wasm trap: call stack exhausted"; - assert_eq!(error.message, expected); - }, - error => panic!("unexpected error: {:?}", error), - } -} - -test_wasm_execution!(test_nan_canonicalization); -fn test_nan_canonicalization(instantiation_strategy: InstantiationStrategy) { - let mut builder = RuntimeBuilder::new(instantiation_strategy).canonicalize_nans(true); - let runtime = builder.build(); - - let mut instance = runtime.new_instance().expect("failed to instantiate a runtime"); - - /// A NaN with canonical payload bits. - const CANONICAL_NAN_BITS: u32 = 0x7fc00000; - /// A NaN value with an arbitrary payload. - const ARBITRARY_NAN_BITS: u32 = 0x7f812345; - - // This test works like this: we essentially do - // - // a + b - // - // where - // - // * a is a nan with arbitrary bits in its payload - // * b is 1. - // - // according to the wasm spec, if one of the inputs to the operation is a non-canonical NaN - // then the value be a NaN with non-deterministic payload bits. - // - // However, with the `canonicalize_nans` option turned on above, we expect that the output will - // be a canonical NaN. - // - // We extrapolate the results of this tests so that we assume that all intermediate computations - // that involve floats are sanitized and cannot produce a non-deterministic NaN. - - let params = (u32::to_le_bytes(ARBITRARY_NAN_BITS), u32::to_le_bytes(1)).encode(); - let res = { - let raw_result = instance.call_export("test_fp_f32add", ¶ms).unwrap(); - u32::from_le_bytes(<[u8; 4]>::decode(&mut &raw_result[..]).unwrap()) - }; - assert_eq!(res, CANONICAL_NAN_BITS); -} - -test_wasm_execution!(test_stack_depth_reaching); -fn test_stack_depth_reaching(instantiation_strategy: InstantiationStrategy) { - const TEST_GUARD_PAGE_SKIP: &str = include_str!("test-guard-page-skip.wat"); - - let mut builder = RuntimeBuilder::new(instantiation_strategy) - .use_wat(TEST_GUARD_PAGE_SKIP.to_string()) - .deterministic_stack(true); - - let runtime = builder.build(); - let mut instance = runtime.new_instance().expect("failed to instantiate a runtime"); - - match instance.call_export("test-many-locals", &[]).unwrap_err() { - Error::AbortedDueToTrap(error) => { - let expected = "wasm trap: wasm `unreachable` instruction executed"; - assert_eq!(error.message, expected); - }, - error => panic!("unexpected error: {:?}", error), - } -} - -test_wasm_execution!(test_max_memory_pages_imported_memory_without_precompilation); -fn test_max_memory_pages_imported_memory_without_precompilation( - instantiation_strategy: InstantiationStrategy, -) { - test_max_memory_pages(instantiation_strategy, true, false); -} - -test_wasm_execution!(test_max_memory_pages_exported_memory_without_precompilation); -fn test_max_memory_pages_exported_memory_without_precompilation( - instantiation_strategy: InstantiationStrategy, -) { - test_max_memory_pages(instantiation_strategy, false, false); -} - -test_wasm_execution!(test_max_memory_pages_imported_memory_with_precompilation); -fn test_max_memory_pages_imported_memory_with_precompilation( - instantiation_strategy: InstantiationStrategy, -) { - test_max_memory_pages(instantiation_strategy, true, true); -} - -test_wasm_execution!(test_max_memory_pages_exported_memory_with_precompilation); -fn test_max_memory_pages_exported_memory_with_precompilation( - instantiation_strategy: InstantiationStrategy, -) { - test_max_memory_pages(instantiation_strategy, false, true); -} - -fn test_max_memory_pages( - instantiation_strategy: InstantiationStrategy, - import_memory: bool, - precompile_runtime: bool, -) { - fn call( - heap_alloc_strategy: HeapAllocStrategy, - wat: String, - instantiation_strategy: InstantiationStrategy, - precompile_runtime: bool, - ) -> Result<(), Box> { - let mut builder = RuntimeBuilder::new(instantiation_strategy) - .use_wat(wat) - .heap_alloc_strategy(heap_alloc_strategy) - .precompile_runtime(precompile_runtime); - - let runtime = builder.build(); - let mut instance = runtime.new_instance().unwrap(); - instance.call_export("main", &[])?; - Ok(()) - } - - fn memory(initial: u32, maximum: u32, import: bool) -> String { - let memory = format!("(memory $0 {} {})", initial, maximum); - - if import { - format!("(import \"env\" \"memory\" {})", memory) - } else { - format!("{}\n(export \"memory\" (memory $0))", memory) - } - } - - let assert_grow_ok = |alloc_strategy: HeapAllocStrategy, initial_pages: u32, max_pages: u32| { - eprintln!("assert_grow_ok({alloc_strategy:?}, {initial_pages}, {max_pages})"); - - call( - alloc_strategy, - format!( - r#" - (module - {} - (global (export "__heap_base") i32 (i32.const 0)) - (func (export "main") - (param i32 i32) (result i64) - - ;; assert(memory.grow returns != -1) - (if - (i32.eq - (memory.grow - (i32.const 1) - ) - (i32.const -1) - ) - (then - (unreachable) - ) - ) - - (i64.const 0) - ) - ) - "#, - memory(initial_pages, max_pages, import_memory) - ), - instantiation_strategy, - precompile_runtime, - ) - .unwrap() - }; - - let assert_grow_fail = - |alloc_strategy: HeapAllocStrategy, initial_pages: u32, max_pages: u32| { - eprintln!("assert_grow_fail({alloc_strategy:?}, {initial_pages}, {max_pages})"); - - call( - alloc_strategy, - format!( - r#" - (module - {} - (global (export "__heap_base") i32 (i32.const 0)) - (func (export "main") - (param i32 i32) (result i64) - - ;; assert(memory.grow returns == -1) - (if - (i32.ne - (memory.grow - (i32.const 1) - ) - (i32.const -1) - ) - (then - (unreachable) - ) - ) - - (i64.const 0) - ) - ) - "#, - memory(initial_pages, max_pages, import_memory) - ), - instantiation_strategy, - precompile_runtime, - ) - .unwrap() - }; - - assert_grow_ok(HeapAllocStrategy::Dynamic { maximum_pages: Some(10) }, 1, 10); - assert_grow_ok(HeapAllocStrategy::Dynamic { maximum_pages: Some(10) }, 9, 10); - assert_grow_fail(HeapAllocStrategy::Dynamic { maximum_pages: Some(10) }, 10, 10); - - assert_grow_ok(HeapAllocStrategy::Dynamic { maximum_pages: None }, 1, 10); - assert_grow_ok(HeapAllocStrategy::Dynamic { maximum_pages: None }, 9, 10); - assert_grow_ok(HeapAllocStrategy::Dynamic { maximum_pages: None }, 10, 10); - - assert_grow_fail(HeapAllocStrategy::Static { extra_pages: 10 }, 1, 10); - assert_grow_fail(HeapAllocStrategy::Static { extra_pages: 10 }, 9, 10); - assert_grow_fail(HeapAllocStrategy::Static { extra_pages: 10 }, 10, 10); -} - -// This test takes quite a while to execute in a debug build (over 6 minutes on a TR 3970x) -// so it's ignored by default unless it was compiled with `--release`. -#[cfg_attr(build_profile = "debug", ignore)] -#[test] -fn test_instances_without_reuse_are_not_leaked() { - let runtime = crate::create_runtime::( - RuntimeBlob::uncompress_if_needed(wasm_binary_unwrap()).unwrap(), - crate::Config { - allow_missing_func_imports: true, - cache_path: None, - semantics: crate::Semantics { - instantiation_strategy: InstantiationStrategy::RecreateInstance, - deterministic_stack_limit: None, - canonicalize_nans: false, - parallel_compilation: true, - heap_alloc_strategy: DEFAULT_HEAP_ALLOC_STRATEGY, - wasm_multi_value: false, - wasm_bulk_memory: false, - wasm_reference_types: false, - wasm_simd: false, - }, - }, - ) - .unwrap(); - - // As long as the `wasmtime`'s `Store` lives the instances spawned through it - // will live indefinitely. Currently it has a maximum limit of 10k instances, - // so let's spawn 10k + 1 of them to make sure our code doesn't keep the `Store` - // alive longer than it is necessary. (And since we disabled instance reuse - // a new instance will be spawned on each call.) - let mut instance = runtime.new_instance().unwrap(); - for _ in 0..10001 { - instance.call_export("test_empty_return", &[0]).unwrap(); - } -} - -#[test] -fn test_rustix_version_matches_with_wasmtime() { - let metadata = cargo_metadata::MetadataCommand::new().exec().unwrap(); - - let wasmtime_rustix = metadata - .packages - .iter() - .find(|pkg| pkg.name == "wasmtime") - .unwrap() - .dependencies - .iter() - .find(|dep| dep.name == "rustix") - .unwrap(); - let our_rustix = metadata - .packages - .iter() - .find(|pkg| pkg.name == "sc-executor-wasmtime") - .unwrap() - .dependencies - .iter() - .find(|dep| dep.name == "rustix") - .unwrap(); - - if wasmtime_rustix.req != our_rustix.req { - panic!( - "our version of rustix ({0}) doesn't match wasmtime's ({1}); \ - bump the version in `sc-executor-wasmtime`'s `Cargo.toml' to '{1}' and try again", - our_rustix.req, wasmtime_rustix.req, - ); - } -} diff --git a/client/wasm-interface/Cargo.toml b/client/wasm-interface/Cargo.toml index f4c06cdb..e57eed8a 100644 --- a/client/wasm-interface/Cargo.toml +++ b/client/wasm-interface/Cargo.toml @@ -66,7 +66,8 @@ optional = true default-features = true [dependencies.wasmtime] -version = "35.0.0" +# Quantus: bump 35.0.0 -> 36.0.13 to unify with patched sc-executor-wasmtime. +version = "36.0.13" optional = true default-features = false diff --git a/client/wasm-interface/README.md b/client/wasm-interface/README.md index 2e584ade..e0b3a976 100644 --- a/client/wasm-interface/README.md +++ b/client/wasm-interface/README.md @@ -1,3 +1,7 @@ -Types and traits for interfacing between the host and the wasm runtime. +# sp-wasm-interface (vendored) + +Vendored from crates.io `sp-wasm-interface` **24.0.0**, then patched so the +optional `wasmtime` dependency is **36.0.13** (was 35.0.0) and unifies with the +patched `sc-executor-wasmtime`. License: Apache-2.0 From 16421463b499a621adfc4f1b196ba3b8a0fc0a53 Mon Sep 17 00:00:00 2001 From: illuzen Date: Mon, 3 Aug 2026 16:18:40 +0800 Subject: [PATCH 04/15] chore: clear easy cargo-audit yanked/unsound warnings Bump cid (drops core2 via that path), keccak, spin, event-listener, rand, memmap2 0.9, and cxx. Remaining yanked core2 is pinned by litep2p's multihash 0.17 and needs a multiaddr/multihash upgrade. Co-authored-by: Cursor --- Cargo.lock | 109 ++++++++++++++++++++++++++++------------------------- Cargo.toml | 2 +- 2 files changed, 59 insertions(+), 52 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 48f6e31d..daa9349e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -690,7 +690,7 @@ version = "3.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5fd03604047cee9b6ce9de9f70c6cd540a0520c813cbd49bae61f33ab80ed1dc" dependencies = [ - "event-listener 5.4.1", + "event-listener 5.4.2", "event-listener-strategy", "pin-project-lite", ] @@ -719,7 +719,7 @@ dependencies = [ "async-task", "blocking", "cfg-if", - "event-listener 5.4.1", + "event-listener 5.4.2", "futures-lite", "rustix", ] @@ -1332,13 +1332,12 @@ dependencies = [ [[package]] name = "cid" -version = "0.11.1" +version = "0.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3147d8272e8fa0ccd29ce51194dd98f79ddfb8191ba9e3409884e751798acf3a" +checksum = "21a304f95f84d169a6f31c4d0a30d784643aaa0bbc9c1e449a2c23e963ec4971" dependencies = [ - "core2", "multibase", - "multihash 0.19.3", + "multihash 0.19.5", "serde", "serde_bytes", "unsigned-varint 0.8.0", @@ -1458,9 +1457,9 @@ dependencies = [ [[package]] name = "codespan-reporting" -version = "0.12.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe6d2e5af09e8c8ad56c969f2157a3d4238cebc7c55f0a517728c38f7b200f81" +checksum = "af491d569909a7e4dee0ad7db7f5341fef5c614d5b8ec8cf765732aba3cff681" dependencies = [ "serde", "termcolor", @@ -2117,9 +2116,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.185" +version = "1.0.198" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f81de88da10862f22b5b3a60f18f6f42bbe7cb8faa24845dd7b1e4e22190e77" +checksum = "6fe442a792c7c736eea18b32a7f8a3b63cf8aafabda6760042dc2fdeda456291" dependencies = [ "cc", "cxx-build", @@ -2132,9 +2131,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.185" +version = "1.0.198" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5edd58bf75c3fdfc80d79806403af626570662f7b6cc782a7fabe156166bd6d6" +checksum = "e3184a94384c663718698311a78a51ac00c484c10b4eeac06fb0a068c5f64fa2" dependencies = [ "cc", "codespan-reporting", @@ -2142,40 +2141,39 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.119", + "syn 3.0.3", ] [[package]] name = "cxxbridge-cmd" -version = "1.0.185" +version = "1.0.198" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd46bf2b541a4e0c2d5abba76607379ee05d68e714868e3cb406dc8d591ce2d2" +checksum = "0148d8fd1199329ddf1d157a5e134e51ceff37c6a7ddd38615c399d81cb05d8d" dependencies = [ "clap", "codespan-reporting", "indexmap", "proc-macro2", "quote", - "syn 2.0.119", + "syn 3.0.3", ] [[package]] name = "cxxbridge-flags" -version = "1.0.185" +version = "1.0.198" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c79b68f6a3a8f809d39b38ae8af61305a6113819b19b262643b9c21353b92d9" +checksum = "52850339faed2eaadd24e286dc1d8268cc6f8a7bd9524d713adc9099566b4c89" [[package]] name = "cxxbridge-macro" -version = "1.0.185" +version = "1.0.198" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "862b7fdb048ff9ef0779a0d0a03affd09746c4c875543746b640756be9cff2af" +checksum = "2c77c856545d886c9bd5215409ebb63b925e262135248b50c79e5a5f194ee47c" dependencies = [ "indexmap", "proc-macro2", "quote", - "rustversion", - "syn 2.0.119", + "syn 3.0.3", ] [[package]] @@ -2792,11 +2790,10 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "event-listener" -version = "5.4.1" +version = "5.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13b66accf52311f30a0db42147dadea9850cb48cd070028831ae5f5d4b856ab" +checksum = "5a23add41df1562121a9393cb065eab5146a1242410f23a644851e90cfd669d2" dependencies = [ - "concurrent-queue", "parking", "pin-project-lite", ] @@ -2807,7 +2804,7 @@ version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93" dependencies = [ - "event-listener 5.4.1", + "event-listener 5.4.2", "pin-project-lite", ] @@ -2849,7 +2846,7 @@ checksum = "4e7f34442dbe69c60fe8eaf58a8cafff81a1f278816d8ab4db255b3bef4ac3c4" dependencies = [ "getrandom 0.3.3", "libm", - "rand 0.9.2", + "rand 0.9.5", "siphasher 1.0.1", ] @@ -4720,9 +4717,9 @@ dependencies = [ [[package]] name = "keccak" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +checksum = "cb26cec98cce3a3d96cbb7bced3c4b16e3d13f27ec56dbd62cbc8f39cfb9d653" dependencies = [ "cpufeatures 0.2.17", ] @@ -5189,9 +5186,9 @@ dependencies = [ [[package]] name = "memmap2" -version = "0.9.8" +version = "0.9.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843a98750cd611cc2965a8213b53b43e715f13c37a9e096c6408e69990961db7" +checksum = "d1219ed1b7f229ee7104d281dd01d6802fe28bb6e95d292942c4daacdeb798c0" dependencies = [ "libc", ] @@ -5394,11 +5391,10 @@ dependencies = [ [[package]] name = "multihash" -version = "0.19.3" +version = "0.19.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b430e7953c29dd6a09afc29ff0bb69c6e306329ee6794700aee27b76a1aea8d" +checksum = "577c63b00ad74d57e8c9aa870b5fccebf2fd64a308a5aee9f1bb88e4aea19447" dependencies = [ - "core2", "serde", "unsigned-varint 0.8.0", ] @@ -5786,7 +5782,7 @@ dependencies = [ "p3-maybe-rayon", "p3-util", "paste", - "rand 0.9.2", + "rand 0.9.5", "serde", "tracing", ] @@ -5805,7 +5801,7 @@ dependencies = [ "p3-symmetric", "p3-util", "paste", - "rand 0.9.2", + "rand 0.9.5", "serde", ] @@ -5819,7 +5815,7 @@ dependencies = [ "p3-field", "p3-maybe-rayon", "p3-util", - "rand 0.9.2", + "rand 0.9.5", "serde", "tracing", "transpose", @@ -5841,7 +5837,7 @@ dependencies = [ "p3-field", "p3-symmetric", "p3-util", - "rand 0.9.2", + "rand 0.9.5", ] [[package]] @@ -5854,7 +5850,7 @@ dependencies = [ "p3-mds", "p3-symmetric", "p3-util", - "rand 0.9.2", + "rand 0.9.5", ] [[package]] @@ -7273,7 +7269,7 @@ dependencies = [ "bitflags 2.9.4", "lazy_static", "num-traits", - "rand 0.9.2", + "rand 0.9.5", "rand_chacha 0.9.0", "rand_xorshift", "regex-syntax", @@ -7568,7 +7564,7 @@ dependencies = [ "p3-field", "p3-goldilocks", "p3-poseidon2", - "rand 0.9.2", + "rand 0.9.5", "rand_chacha 0.9.0", ] @@ -7930,7 +7926,7 @@ dependencies = [ "fastbloom", "getrandom 0.3.3", "lru-slab", - "rand 0.9.2", + "rand 0.9.5", "ring", "rustc-hash 2.1.1", "rustls", @@ -7996,9 +7992,9 @@ dependencies = [ [[package]] name = "rand" -version = "0.9.2" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +checksum = "b9ef1d0d795eb7d84685bca4f72f3649f064e6641543d3a8c415898726a57b41" dependencies = [ "rand_chacha 0.9.0", "rand_core 0.9.3", @@ -8633,7 +8629,7 @@ checksum = "6b52a39c5ae942a5db75eca82a7c0e50a4d469185651ef52677967860315bc63" dependencies = [ "array-bytes 6.2.3", "docify", - "memmap2 0.9.8", + "memmap2 0.9.11", "parity-scale-codec", "sc-chain-spec-derive", "sc-client-api", @@ -10218,7 +10214,7 @@ dependencies = [ "derive_more 2.0.1", "ed25519-zebra", "either", - "event-listener 5.4.1", + "event-listener 5.4.2", "fnv", "futures-lite", "futures-util", @@ -10267,7 +10263,7 @@ dependencies = [ "bs58", "derive_more 2.0.1", "either", - "event-listener 5.4.1", + "event-listener 5.4.2", "fnv", "futures-channel", "futures-lite", @@ -11075,9 +11071,9 @@ dependencies = [ [[package]] name = "spin" -version = "0.9.8" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +checksum = "3763264f6b73151db08c50ff20d7d8a0b8796e021cdea7ceedad07b80155fa0e" [[package]] name = "spinning_top" @@ -11543,6 +11539,17 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "synstructure" version = "0.12.6" @@ -12199,7 +12206,7 @@ dependencies = [ "http", "httparse", "log", - "rand 0.9.2", + "rand 0.9.5", "rustls", "rustls-pki-types", "sha1", @@ -13805,7 +13812,7 @@ dependencies = [ "nohash-hasher", "parking_lot 0.12.4", "pin-project", - "rand 0.9.2", + "rand 0.9.5", "static_assertions", "web-time", ] diff --git a/Cargo.toml b/Cargo.toml index 84f1fee2..5bbd2a5b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -92,7 +92,7 @@ bs58 = { version = "0.5.1" } bytes = { version = "1.4.0", default-features = false } cfg-if = { version = "1.0" } chrono = { version = "0.4.31" } -cid = { version = "0.11.1" } +cid = { version = "0.11.3" } clap = { version = "4.5.13" } clatter = { version = "=1.1.0" } codec = { version = "3.6.12", default-features = false, package = "parity-scale-codec" } From 6619d055e7f48ca2a90ff963d9a44e97b2bf3a6a Mon Sep 17 00:00:00 2001 From: illuzen Date: Mon, 3 Aug 2026 16:34:06 +0800 Subject: [PATCH 05/15] chore: bump litep2p multihash/multiaddr to drop yanked core2 Upgrade multiaddr 0.17 -> 0.18.2 and multihash 0.17 -> 0.19.5 (plus multihash-codetable), matching upstream litep2p 0.14's migration so Protocol::P2p carries PeerId and identity hashes use Multihash::wrap. Co-authored-by: Cursor --- Cargo.lock | 209 ++++++++++-------- Cargo.toml | 5 +- client/litep2p/Cargo.toml | 3 +- client/litep2p/src/error.rs | 11 +- client/litep2p/src/lib.rs | 7 +- client/litep2p/src/peer_id.rs | 119 ++++++++-- .../src/protocol/libp2p/kademlia/mod.rs | 8 +- .../src/protocol/libp2p/kademlia/query/mod.rs | 5 +- .../src/protocol/libp2p/kademlia/record.rs | 2 +- .../protocol/libp2p/kademlia/routing_table.rs | 4 +- .../litep2p/src/protocol/transport_service.rs | 4 +- .../litep2p/src/transport/common/listener.rs | 4 +- .../litep2p/src/transport/manager/address.rs | 10 +- .../litep2p/src/transport/manager/handle.rs | 22 +- client/litep2p/src/transport/manager/mod.rs | 102 ++++----- .../src/transport/manager/peer_state.rs | 8 +- client/litep2p/src/transport/tcp/mod.rs | 6 +- .../src/transport/websocket/connection.rs | 4 +- client/litep2p/src/transport/websocket/mod.rs | 2 +- client/litep2p/src/types.rs | 4 +- .../network-types/src/multiaddr/protocol.rs | 15 +- client/network-types/src/multihash.rs | 44 ++-- client/network/src/config.rs | 2 +- client/network/src/litep2p/discovery.rs | 2 +- client/network/src/litep2p/mod.rs | 15 +- 25 files changed, 371 insertions(+), 246 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index daa9349e..48a178f6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -42,7 +42,7 @@ version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" dependencies = [ - "crypto-common", + "crypto-common 0.1.6", "generic-array 0.14.7", ] @@ -598,7 +598,7 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.119", - "synstructure 0.13.2", + "synstructure", ] [[package]] @@ -1036,6 +1036,15 @@ dependencies = [ "generic-array 0.14.7", ] +[[package]] +name = "block-buffer" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2f6c7dbe95a6ed67ad9f18e57daf93a2f034c524b99fd2b76d18fdfeb6660aa" +dependencies = [ + "hybrid-array 0.4.14", +] + [[package]] name = "blocking" version = "1.6.2" @@ -1337,7 +1346,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21a304f95f84d169a6f31c4d0a30d784643aaa0bbc9c1e449a2c23e963ec4971" dependencies = [ "multibase", - "multihash 0.19.5", + "multihash", "serde", "serde_bytes", "unsigned-varint 0.8.0", @@ -1358,7 +1367,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" dependencies = [ - "crypto-common", + "crypto-common 0.1.6", "inout", "zeroize", ] @@ -1640,15 +1649,6 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" -[[package]] -name = "core2" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b49ba7ef1ad6107f8824dbe97de947cbaac53c44e7f9756a1fba0d37c1eec505" -dependencies = [ - "memchr", -] - [[package]] name = "cpp_demangle" version = "0.4.5" @@ -1939,6 +1939,15 @@ dependencies = [ "typenum", ] +[[package]] +name = "crypto-common" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce6e4c961d6cd6c9a86db418387425e8bdeaf05b3c8bc1411e6dca4c252f1453" +dependencies = [ + "hybrid-array 0.4.14", +] + [[package]] name = "crypto-mac" version = "0.7.0" @@ -2448,10 +2457,20 @@ checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer 0.10.4", "const-oid", - "crypto-common", + "crypto-common 0.1.6", "subtle 2.6.1", ] +[[package]] +name = "digest" +version = "0.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1dd6dbb5841937940781866fa1281a1ff7bd3bf827091440879f9994983d5c2" +dependencies = [ + "block-buffer 0.12.1", + "crypto-common 0.2.2", +] + [[package]] name = "directories" version = "5.0.1" @@ -2537,7 +2556,7 @@ dependencies = [ "regex", "syn 2.0.119", "termcolor", - "toml 0.8.23", + "toml", "walkdir", ] @@ -2874,7 +2893,7 @@ checksum = "eb42427514b063d97ce21d5199f36c0c307d981434a6be32582bc79fe5bd2303" dependencies = [ "expander", "indexmap", - "proc-macro-crate 3.4.0", + "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.119", @@ -3281,7 +3300,7 @@ name = "frame-support-procedural-tools" version = "13.0.1" dependencies = [ "frame-support-procedural-tools-derive", - "proc-macro-crate 3.4.0", + "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.119", @@ -3999,6 +4018,15 @@ dependencies = [ "typenum", ] +[[package]] +name = "hybrid-array" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "707114b52a152fa7bdb290cd7cd5912d9467273b6d74e21b8d81aca1f8533f6b" +dependencies = [ + "typenum", +] + [[package]] name = "hyper" version = "1.7.0" @@ -4450,7 +4478,7 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "319af585c4c8a6b5552a52b7787a1ab3e4d59df7614190b1f85b9b842488789d" dependencies = [ - "proc-macro-crate 3.4.0", + "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.119", @@ -4643,7 +4671,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7398cddf5013cca4702862a2692b66c48a3bd6cf6ec681a47453c93d63cf8de5" dependencies = [ "heck 0.5.0", - "proc-macro-crate 3.4.0", + "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.119", @@ -4819,6 +4847,20 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" +[[package]] +name = "libp2p-identity" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9525f3831544f7ae497bde79adf114ef127b0fbbb97edbbf692a80408636421c" +dependencies = [ + "bs58", + "hkdf", + "multihash", + "sha2 0.10.9", + "thiserror 2.0.18", + "tracing", +] + [[package]] name = "libredox" version = "0.1.10" @@ -4980,7 +5022,8 @@ dependencies = [ "libc", "mockall", "multiaddr", - "multihash 0.17.0", + "multihash", + "multihash-codetable", "network-interface", "parking_lot 0.12.4", "pin-project", @@ -5287,7 +5330,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97befee0c869cb56f3118f49d0f9bb68c9e3f380dec23c1100aedc4ec3ba239a" dependencies = [ - "hybrid-array", + "hybrid-array 0.2.3", "kem", "rand_core 0.6.4", "sha3", @@ -5347,20 +5390,20 @@ checksum = "685a9ac4b61f4e728e1d2c6a7844609c16527aeb5e6c865915c08e619c16410f" [[package]] name = "multiaddr" -version = "0.17.1" +version = "0.18.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b36f567c7099511fa8612bbbb52dda2419ce0bdbacf31714e3a5ffdb766d3bd" +checksum = "fe6351f60b488e04c1d21bc69e56b89cb3f5e8f5d22557d6e8031bdfd79b6961" dependencies = [ "arrayref", "byteorder", "data-encoding", - "log", + "libp2p-identity", "multibase", - "multihash 0.17.0", + "multihash", "percent-encoding", "serde", "static_assertions", - "unsigned-varint 0.7.2", + "unsigned-varint 0.8.0", "url", ] @@ -5377,40 +5420,46 @@ dependencies = [ [[package]] name = "multihash" -version = "0.17.0" +version = "0.19.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835d6ff01d610179fbce3de1694d007e500bf33a7f29689838941d6bf783ae40" +checksum = "577c63b00ad74d57e8c9aa870b5fccebf2fd64a308a5aee9f1bb88e4aea19447" dependencies = [ - "core2", - "digest 0.10.7", - "multihash-derive", "serde", - "sha2 0.10.9", - "unsigned-varint 0.7.2", + "unsigned-varint 0.8.0", ] [[package]] -name = "multihash" -version = "0.19.5" +name = "multihash-codetable" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "577c63b00ad74d57e8c9aa870b5fccebf2fd64a308a5aee9f1bb88e4aea19447" +checksum = "60384411b100398c5b2fdca476eed82e9898d09f2c60d1b1b66c5080ebe06118" dependencies = [ - "serde", - "unsigned-varint 0.8.0", + "digest 0.11.3", + "multihash-derive", + "sha2 0.11.0", ] [[package]] name = "multihash-derive" -version = "0.8.1" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6d4752e6230d8ef7adf7bd5d8c4b1f6561c1014c5ba9a37445ccefe18aa1db" +checksum = "4723acdce756db211a53f01b3419dbdf63cb48cef5df86260f55309364735fbf" dependencies = [ - "proc-macro-crate 1.1.3", - "proc-macro-error", + "multihash", + "multihash-derive-impl", +] + +[[package]] +name = "multihash-derive-impl" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f932556f78452e5604cef711349d337ec081a9aa3c96e67b3127c8f5df05d550" +dependencies = [ + "proc-macro-crate", "proc-macro2", "quote", - "syn 1.0.109", - "synstructure 0.12.6", + "syn 2.0.119", + "synstructure", ] [[package]] @@ -5751,7 +5800,7 @@ dependencies = [ "indexmap", "itertools 0.11.0", "petgraph 0.6.5", - "proc-macro-crate 3.4.0", + "proc-macro-crate", "proc-macro2", "quote", "syn 1.0.109", @@ -6325,7 +6374,7 @@ version = "3.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34b4653168b563151153c9e4c08ebed57fb8262bebfa79711552fa983c623e7a" dependencies = [ - "proc-macro-crate 3.4.0", + "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.119", @@ -7159,16 +7208,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "proc-macro-crate" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e17d47ce914bf4de440332250b0edd23ce48c005f59fab39d3335866b114f11a" -dependencies = [ - "thiserror 1.0.69", - "toml 0.5.11", -] - [[package]] name = "proc-macro-crate" version = "3.4.0" @@ -8654,7 +8693,7 @@ version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b18cef11d2c69703e0d7c3528202ef4ed1cd2b47a6f063e9e17cad8255b1fa94" dependencies = [ - "proc-macro-crate 3.4.0", + "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.119", @@ -9168,7 +9207,7 @@ dependencies = [ "litep2p", "log", "multiaddr", - "multihash 0.17.0", + "multihash", "quickcheck", "rand 0.8.6", "serde_with", @@ -9499,7 +9538,7 @@ version = "11.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb090b3a15c077b029619476b682ba8a31f391ee3f0b2c5f3f24366f53f6c538" dependencies = [ - "proc-macro-crate 3.4.0", + "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.119", @@ -9634,7 +9673,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78a3993a13b4eafa89350604672c8757b7ea84c7c5947d4b3691e3169c96379b" dependencies = [ "darling 0.20.11", - "proc-macro-crate 3.4.0", + "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.119", @@ -9660,7 +9699,7 @@ version = "2.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6630024bf739e2179b91fb424b28898baf819414262c5d376677dbff1fe7ebf" dependencies = [ - "proc-macro-crate 3.4.0", + "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.119", @@ -10058,6 +10097,17 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "sha2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "446ba717509524cb3f22f17ecc096f10f4822d76ab5c0b9822c5f9c284e825f4" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.0", + "digest 0.11.3", +] + [[package]] name = "sha3" version = "0.10.8" @@ -10360,7 +10410,7 @@ dependencies = [ "Inflector", "blake2 0.10.6", "expander", - "proc-macro-crate 3.4.0", + "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.119", @@ -10835,7 +10885,7 @@ checksum = "04178084ae654b3924934a56943ee73e3562db4d277e948393561b08c3b5b5fe" dependencies = [ "Inflector", "expander", - "proc-macro-crate 3.4.0", + "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.119", @@ -11305,7 +11355,7 @@ dependencies = [ "sp-version", "strum 0.26.3", "tempfile", - "toml 0.8.23", + "toml", "walkdir", "wasm-opt", ] @@ -11550,18 +11600,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "synstructure" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "unicode-xid", -] - [[package]] name = "synstructure" version = "0.13.2" @@ -11928,15 +11966,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "toml" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" -dependencies = [ - "serde", -] - [[package]] name = "toml" version = "0.8.23" @@ -12113,7 +12142,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f074568687ffdfd0adb6005aa8d1d96840197f2c159f80471285f08694cf0ce" dependencies = [ "expander", - "proc-macro-crate 3.4.0", + "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.119", @@ -12320,7 +12349,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" dependencies = [ - "crypto-common", + "crypto-common 0.1.6", "subtle 2.6.1", ] @@ -12913,7 +12942,7 @@ dependencies = [ "serde", "serde_derive", "sha2 0.10.9", - "toml 0.8.23", + "toml", "windows-sys 0.60.2", "zstd 0.13.3", ] @@ -13859,7 +13888,7 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.119", - "synstructure 0.13.2", + "synstructure", ] [[package]] @@ -13900,7 +13929,7 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.119", - "synstructure 0.13.2", + "synstructure", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 5bbd2a5b..0837ae59 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -138,8 +138,9 @@ log = { version = "0.4.22", default-features = false } macro_magic = { version = "0.5.1", default-features = false } memory-db = { version = "0.34.0", default-features = false } mockall = { version = "0.13.1" } -multiaddr = { version = "0.17.0" } -multihash = { version = "0.17.0", default-features = false, features = ["identity", "sha2"] } +multiaddr = { version = "0.18.2" } +multihash = { version = "0.19.5", default-features = false, features = ["std"] } +multihash-codetable = { version = "0.2.1", default-features = false, features = ["sha2"] } multistream-select = { version = "0.13.0" } names = { version = "0.14.0", default-features = false } network-interface = { version = "2.0.1" } diff --git a/client/litep2p/Cargo.toml b/client/litep2p/Cargo.toml index eb5d3283..3b22f393 100644 --- a/client/litep2p/Cargo.toml +++ b/client/litep2p/Cargo.toml @@ -24,7 +24,8 @@ ip_network = { workspace = true } libc = { workspace = true } mockall = { workspace = true } multiaddr = { workspace = true } -multihash = { workspace = true, features = ["identity", "sha2", "std"] } +multihash = { workspace = true, features = ["std"] } +multihash-codetable = { workspace = true } network-interface = { workspace = true } parking_lot = { workspace = true } pin-project = { workspace = true } diff --git a/client/litep2p/src/error.rs b/client/litep2p/src/error.rs index c820137e..f3d71800 100644 --- a/client/litep2p/src/error.rs +++ b/client/litep2p/src/error.rs @@ -30,8 +30,9 @@ use crate::{ PeerId, }; +type Multihash = multihash::Multihash<64>; + use multiaddr::Multiaddr; -use multihash::{Multihash, MultihashGeneric}; use std::io::{self, ErrorKind}; @@ -400,8 +401,8 @@ pub enum DnsError { IpVersionMismatch, } -impl From> for Error { - fn from(hash: MultihashGeneric<64>) -> Self { +impl From for Error { + fn from(hash: Multihash) -> Self { Error::AddressError(AddressError::InvalidPeerId(hash)) } } @@ -466,8 +467,8 @@ impl From for Error { } } -impl From> for AddressError { - fn from(hash: MultihashGeneric<64>) -> Self { +impl From for AddressError { + fn from(hash: Multihash) -> Self { AddressError::InvalidPeerId(hash) } } diff --git a/client/litep2p/src/lib.rs b/client/litep2p/src/lib.rs index 8bb58319..17b29445 100644 --- a/client/litep2p/src/lib.rs +++ b/client/litep2p/src/lib.rs @@ -336,7 +336,7 @@ impl Litep2p { for address in transport_listen_addresses { transport_manager.register_listen_address(address.clone()); - listen_addresses.push(address.with(Protocol::P2p(*local_peer_id.as_ref()))); + listen_addresses.push(address.with(Protocol::P2p(local_peer_id.into()))); } transport_manager.register_transport(SupportedTransport::Tcp, Box::new(transport)); @@ -352,7 +352,7 @@ impl Litep2p { for address in transport_listen_addresses { transport_manager.register_listen_address(address.clone()); - listen_addresses.push(address.with(Protocol::P2p(*local_peer_id.as_ref()))); + listen_addresses.push(address.with(Protocol::P2p(local_peer_id.into()))); } transport_manager @@ -512,7 +512,6 @@ mod tests { }; use hickory_resolver::config::{ResolverConfig, ResolverOpts}; use multiaddr::{Multiaddr, Protocol}; - use multihash::Multihash; use std::net::Ipv4Addr; #[test] @@ -642,7 +641,7 @@ mod tests { let address = Multiaddr::empty() .with(Protocol::Ip4(Ipv4Addr::new(255, 254, 253, 252))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from_bytes(&peer.to_bytes()).unwrap())); + .with(Protocol::P2p(peer.into())); let mut litep2p = Litep2p::new(config).unwrap(); litep2p.dial_address(address.clone()).await.unwrap(); diff --git a/client/litep2p/src/peer_id.rs b/client/litep2p/src/peer_id.rs index 23fe995e..5d8b97ef 100644 --- a/client/litep2p/src/peer_id.rs +++ b/client/litep2p/src/peer_id.rs @@ -24,7 +24,7 @@ use crate::crypto::PublicKey; use multiaddr::{Multiaddr, Protocol}; -use multihash::{Code, Error, Multihash, MultihashDigest}; +use multihash_codetable::{Code, MultihashDigest}; use rand::Rng; use serde::{Deserialize, Serialize}; use thiserror::Error; @@ -34,6 +34,8 @@ use std::{convert::TryFrom, fmt, str::FromStr}; /// Public keys with byte-lengths smaller than `MAX_INLINE_KEY_LENGTH` will be /// automatically used as the peer id using an identity multihash. const MAX_INLINE_KEY_LENGTH: usize = 42; +pub(crate) const MULTIHASH_IDENTITY_CODE: u64 = 0x00; +type Multihash = multihash::Multihash<64>; /// Identifier of a peer of the network. /// @@ -64,18 +66,31 @@ impl PeerId { /// Builds a `PeerId` from a public key in protobuf encoding. pub fn from_public_key_protobuf(key_enc: &[u8]) -> PeerId { - let hash_algorithm = - if key_enc.len() <= MAX_INLINE_KEY_LENGTH { Code::Identity } else { Code::Sha2_256 }; - - let multihash = hash_algorithm.digest(key_enc); + let multihash = if key_enc.len() <= MAX_INLINE_KEY_LENGTH { + Multihash::wrap(MULTIHASH_IDENTITY_CODE, key_enc) + .expect("key_enc.len() <= MAX_INLINE_KEY_LENGTH which fits in Multihash<64>") + } else { + Code::Sha2_256.digest(key_enc) + }; PeerId { multihash } } /// Parses a `PeerId` from bytes. - pub fn from_bytes(data: &[u8]) -> Result { - PeerId::from_multihash(Multihash::from_bytes(data)?) - .map_err(|mh| Error::UnsupportedCode(mh.code())) + pub fn from_bytes(data: &[u8]) -> Result { + let multihash = Multihash::from_bytes(data).map_err(|error| { + tracing::debug!(?error, "failed to decode peer ID bytes as multihash",); + ParseError::MultiHash + })?; + + PeerId::from_multihash(multihash).map_err(|multihash| { + tracing::debug!( + code = multihash.code(), + digest_len = multihash.digest().len(), + "decoded multihash is not a valid peer ID", + ); + ParseError::MultiHash + }) } /// Tries to turn a `Multihash` into a `PeerId`. @@ -83,10 +98,15 @@ impl PeerId { /// If the multihash does not use a valid hashing algorithm for peer IDs, /// or the hash value does not satisfy the constraints for a hashed /// peer ID, it is returned as an `Err`. - pub fn from_multihash(multihash: Multihash) -> Result { - match Code::try_from(multihash.code()) { - Ok(Code::Sha2_256) => Ok(PeerId { multihash }), - Ok(Code::Identity) if multihash.digest().len() <= MAX_INLINE_KEY_LENGTH => + /// + /// Accepts anything that converts into `multihash::Multihash<64>`, + /// including `multiaddr::PeerId` which implements that conversion. + pub fn from_multihash(multihash: impl Into) -> Result { + let multihash = multihash.into(); + + match multihash.code() { + code if code == u64::from(Code::Sha2_256) => Ok(PeerId { multihash }), + MULTIHASH_IDENTITY_CODE if multihash.digest().len() <= MAX_INLINE_KEY_LENGTH => Ok(PeerId { multihash }), _ => Err(multihash), } @@ -98,7 +118,7 @@ impl PeerId { /// will return the encapsulated [`PeerId`], otherwise it will return `None`. pub fn try_from_multiaddr(address: &Multiaddr) -> Option { address.iter().last().and_then(|p| match p { - Protocol::P2p(hash) => PeerId::from_multihash(hash).ok(), + Protocol::P2p(peer_id) => PeerId::from_multihash(peer_id).ok(), _ => None, }) } @@ -109,7 +129,7 @@ impl PeerId { pub fn random() -> PeerId { let peer_id = rand::thread_rng().gen::<[u8; 32]>(); PeerId { - multihash: Multihash::wrap(Code::Identity.into(), &peer_id) + multihash: Multihash::wrap(MULTIHASH_IDENTITY_CODE, &peer_id) .expect("The digest size is never too large"), } } @@ -129,10 +149,26 @@ impl PeerId { /// Returns `None` if this `PeerId`s hash algorithm is not supported when encoding the /// given public key, otherwise `Some` boolean as the result of an equality check. pub fn is_public_key(&self, public_key: &PublicKey) -> Option { - let alg = Code::try_from(self.multihash.code()) - .expect("Internal multihash is always a valid `Code`"); let enc = public_key.to_protobuf_encoding(); - Some(alg.digest(&enc) == self.multihash) + + let expected = match self.multihash.code() { + code if code == u64::from(Code::Sha2_256) => Code::Sha2_256.digest(&enc), + MULTIHASH_IDENTITY_CODE => Multihash::wrap(MULTIHASH_IDENTITY_CODE, &enc).expect( + "identity key enc fits in Multihash<64> since it passed from_public_key_protobuf", + ), + _ => return None, + }; + + Some(expected == self.multihash) + } + + /// Converts this peer ID into a `multiaddr` peer ID. + /// + /// This is a fallible conversion for callers that want to avoid relying on + /// the internal invariant that litep2p and multiaddr peer IDs accept the + /// same multihash forms. + pub fn to_multiaddr_peer_id(&self) -> Result { + multiaddr::PeerId::try_from(*self.as_ref()) } } @@ -182,6 +218,27 @@ impl From for Vec { } } +impl From for multiaddr::PeerId { + /// Converts this peer ID into a `multiaddr` peer ID. + /// + /// # Panics + /// + /// Panics only if `PeerId`'s internal invariant has been violated. Safe + /// constructors accept the same multihash forms that `multiaddr::PeerId` + /// accepts, so this conversion should not fail for any valid `PeerId`. + fn from(peer_id: PeerId) -> Self { + peer_id + .to_multiaddr_peer_id() + .expect("litep2p PeerId is always a valid multiaddr PeerId") + } +} + +impl From<&PeerId> for multiaddr::PeerId { + fn from(peer_id: &PeerId) -> Self { + (*peer_id).into() + } +} + impl Serialize for PeerId { fn serialize(&self, serializer: S) -> Result where @@ -248,15 +305,17 @@ impl FromStr for PeerId { #[inline] fn from_str(s: &str) -> Result { let bytes = bs58::decode(s).into_vec()?; - PeerId::from_bytes(&bytes).map_err(|_| ParseError::MultiHash) + PeerId::from_bytes(&bytes) } } #[cfg(test)] mod tests { + use super::{ParseError, MAX_INLINE_KEY_LENGTH, MULTIHASH_IDENTITY_CODE}; use crate::{crypto::dilithium::Keypair, PeerId}; use multiaddr::{Multiaddr, Protocol}; - use multihash::Multihash; + use crate::types::multihash::Multihash; + use multihash_codetable::Code; #[test] fn peer_id_is_public_key() { @@ -294,7 +353,7 @@ mod tests { let address = Multiaddr::empty() .with(Protocol::from(address.ip())) .with(Protocol::Tcp(address.port())) - .with(Protocol::P2p(Multihash::from(peer))); + .with(Protocol::P2p(peer.into())); assert_eq!(peer, PeerId::try_from_multiaddr(&address).unwrap()); } @@ -348,4 +407,24 @@ mod tests { } let _error = test().unwrap_err(); } + + #[test] + fn from_public_key_protobuf_large_key_uses_sha256() { + let enc = vec![0u8; MAX_INLINE_KEY_LENGTH + 1]; + let peer_id = PeerId::from_public_key_protobuf(&enc); + assert_eq!(peer_id.as_ref().code(), u64::from(Code::Sha2_256)); + } + + #[test] + fn identity_peer_id_roundtrip_through_multiaddr() { + let peer = PeerId::random(); + assert_eq!(peer.as_ref().code(), MULTIHASH_IDENTITY_CODE); + + let addr = Multiaddr::empty() + .with(Protocol::Ip4("127.0.0.1".parse().unwrap())) + .with(Protocol::Tcp(1234)) + .with(Protocol::P2p(peer.into())); + + assert_eq!(peer, PeerId::try_from_multiaddr(&addr).unwrap()); + } } diff --git a/client/litep2p/src/protocol/libp2p/kademlia/mod.rs b/client/litep2p/src/protocol/libp2p/kademlia/mod.rs index b5e19344..968f1ffd 100644 --- a/client/litep2p/src/protocol/libp2p/kademlia/mod.rs +++ b/client/litep2p/src/protocol/libp2p/kademlia/mod.rs @@ -1378,7 +1378,7 @@ mod tests { ConnectionId, }; use multiaddr::Protocol; - use multihash::Multihash; + use crate::types::multihash::Multihash; use std::str::FromStr; use tokio::sync::mpsc::channel; @@ -1492,13 +1492,13 @@ mod tests { let peer = PeerId::random(); let address_a = Multiaddr::from_str("/dns/domain1.com/tcp/30333") .unwrap() - .with(Protocol::P2p(Multihash::from_bytes(&peer.to_bytes()).unwrap())); + .with(Protocol::P2p(peer.into())); let address_b = Multiaddr::from_str("/dns/domain1.com/tcp/30334") .unwrap() - .with(Protocol::P2p(Multihash::from_bytes(&peer.to_bytes()).unwrap())); + .with(Protocol::P2p(peer.into())); let address_c = Multiaddr::from_str("/dns/domain1.com/tcp/30339") .unwrap() - .with(Protocol::P2p(Multihash::from_bytes(&peer.to_bytes()).unwrap())); + .with(Protocol::P2p(peer.into())); // Added only with address a. kademlia.routing_table.add_known_peer( diff --git a/client/litep2p/src/protocol/libp2p/kademlia/query/mod.rs b/client/litep2p/src/protocol/libp2p/kademlia/query/mod.rs index 220cba65..3ff53bbd 100644 --- a/client/litep2p/src/protocol/libp2p/kademlia/query/mod.rs +++ b/client/litep2p/src/protocol/libp2p/kademlia/query/mod.rs @@ -874,7 +874,8 @@ impl QueryEngine { #[cfg(test)] mod tests { - use multihash::{Code, Multihash}; + use crate::peer_id::MULTIHASH_IDENTITY_CODE; + use crate::types::multihash::Multihash; use super::*; use crate::protocol::libp2p::kademlia::types::ConnectionType; @@ -886,7 +887,7 @@ mod tests { peer_id[1] = second; PeerId::from_bytes( - &Multihash::wrap(Code::Identity.into(), &peer_id) + &Multihash::wrap(MULTIHASH_IDENTITY_CODE, &peer_id) .expect("The digest size is never too large") .to_bytes(), ) diff --git a/client/litep2p/src/protocol/libp2p/kademlia/record.rs b/client/litep2p/src/protocol/libp2p/kademlia/record.rs index bb1d8175..64339981 100644 --- a/client/litep2p/src/protocol/libp2p/kademlia/record.rs +++ b/client/litep2p/src/protocol/libp2p/kademlia/record.rs @@ -28,7 +28,7 @@ use crate::{ }; use bytes::Bytes; -use multihash::Multihash; +use crate::types::multihash::Multihash; use std::{borrow::Borrow, time::Instant}; diff --git a/client/litep2p/src/protocol/libp2p/kademlia/routing_table.rs b/client/litep2p/src/protocol/libp2p/kademlia/routing_table.rs index 4c203057..6910f53e 100644 --- a/client/litep2p/src/protocol/libp2p/kademlia/routing_table.rs +++ b/client/litep2p/src/protocol/libp2p/kademlia/routing_table.rs @@ -34,7 +34,7 @@ use crate::{ }; use multiaddr::{Multiaddr, Protocol}; -use multihash::Multihash; +use crate::types::multihash::Multihash; /// Number of k-buckets. const NUM_BUCKETS: usize = 256; @@ -192,7 +192,7 @@ impl RoutingTable { if std::matches!(last, Some(Protocol::P2p(_))) { Some(address) } else { - Some(address.with(Protocol::P2p(Multihash::from_bytes(&peer.to_bytes()).ok()?))) + Some(address.with(Protocol::P2p(peer.into()))) } }) .collect(); diff --git a/client/litep2p/src/protocol/transport_service.rs b/client/litep2p/src/protocol/transport_service.rs index 8fd170c9..78784585 100644 --- a/client/litep2p/src/protocol/transport_service.rs +++ b/client/litep2p/src/protocol/transport_service.rs @@ -29,7 +29,7 @@ use crate::{ use futures::{future::BoxFuture, stream::FuturesUnordered, Stream, StreamExt}; use multiaddr::{Multiaddr, Protocol}; -use multihash::Multihash; +use crate::types::multihash::Multihash; use tokio::sync::mpsc::{channel, Receiver, Sender}; use std::{ @@ -542,7 +542,7 @@ impl TransportService { let addresses: HashSet = addresses .filter_map(|address| { if !std::matches!(address.iter().last(), Some(Protocol::P2p(_))) { - Some(address.with(Protocol::P2p(Multihash::from_bytes(&peer.to_bytes()).ok()?))) + Some(address.with(Protocol::P2p(peer.into()))) } else { Some(address) } diff --git a/client/litep2p/src/transport/common/listener.rs b/client/litep2p/src/transport/common/listener.rs index e89d7887..58614746 100644 --- a/client/litep2p/src/transport/common/listener.rs +++ b/client/litep2p/src/transport/common/listener.rs @@ -405,8 +405,8 @@ fn multiaddr_to_socket_address( } let maybe_peer = match iter.next() { - Some(Protocol::P2p(multihash)) => - Some(PeerId::from_multihash(multihash).map_err(AddressError::InvalidPeerId)?), + Some(Protocol::P2p(peer_id)) => + Some(PeerId::from_multihash(peer_id).map_err(AddressError::InvalidPeerId)?), None => None, protocol => { tracing::error!( diff --git a/client/litep2p/src/transport/manager/address.rs b/client/litep2p/src/transport/manager/address.rs index eb32fd84..3bc5ca6f 100644 --- a/client/litep2p/src/transport/manager/address.rs +++ b/client/litep2p/src/transport/manager/address.rs @@ -22,7 +22,7 @@ use crate::{error::DialError, PeerId}; use ip_network::IpNetwork; use multiaddr::{Multiaddr, Protocol}; -use multihash::Multihash; +use crate::types::multihash::Multihash; use std::collections::{hash_map::Entry, HashMap}; @@ -70,9 +70,7 @@ impl AddressRecord { /// append the provided `PeerId` to the address. pub fn new(peer: &PeerId, address: Multiaddr, score: i32) -> Self { let address = if !std::matches!(address.iter().last(), Some(Protocol::P2p(_))) { - address.with(Protocol::P2p( - Multihash::from_bytes(&peer.to_bytes()).expect("valid peer id"), - )) + address.with(Protocol::P2p((*peer).into())) } else { address }; @@ -533,7 +531,7 @@ mod tests { let address = Multiaddr::empty() .with(Protocol::Ip4(Ipv4Addr::new(8, 8, 8, 8))) .with(Protocol::Tcp(9999)) - .with(Protocol::P2p(multihash::Multihash::from_bytes(&peer.to_bytes()).unwrap())); + .with(Protocol::P2p(peer.into())); let record = AddressRecord::from_multiaddr(address.clone()).unwrap(); assert_eq!(record.score, 0); @@ -570,7 +568,7 @@ mod tests { let address = Multiaddr::empty() .with(Protocol::Ip4(Ipv4Addr::new(8, 8, 8, 8))) .with(Protocol::Tcp(9999)) - .with(Protocol::P2p(multihash::Multihash::from_bytes(&peer.to_bytes()).unwrap())); + .with(Protocol::P2p(peer.into())); // First, add the address normally. let record = AddressRecord::from_multiaddr(address.clone()).unwrap(); diff --git a/client/litep2p/src/transport/manager/handle.rs b/client/litep2p/src/transport/manager/handle.rs index 2bee0aff..0a2c284e 100644 --- a/client/litep2p/src/transport/manager/handle.rs +++ b/client/litep2p/src/transport/manager/handle.rs @@ -243,9 +243,9 @@ impl TransportManagerHandle { } // Check the peer ID if present. - if let Some(Protocol::P2p(multihash)) = address.iter().last() { + if let Some(Protocol::P2p(addr_peer_id)) = address.iter().last() { // This can correspond to the provided peerID or to a different one. - if multihash != *peer.as_ref() { + if addr_peer_id.as_ref() != peer.as_ref() { tracing::debug!( target: LOG_TARGET, ?peer, @@ -259,7 +259,7 @@ impl TransportManagerHandle { peer_addresses.insert(address); } else { // Add the provided peer ID to the address. - let address = address.with(Protocol::P2p(multihash::Multihash::from(*peer))); + let address = address.with(Protocol::P2p(peer.into())); peer_addresses.insert(address); } } @@ -396,7 +396,7 @@ mod tests { }; use super::*; - use multihash::Multihash; + use crate::types::multihash::Multihash; use parking_lot::lock_api::RwLock; use tokio::sync::mpsc::{channel, Receiver}; @@ -535,7 +535,7 @@ mod tests { // only peer id (used by Polkadot sometimes) assert!(!handle.supported_transport( - &Multiaddr::empty().with(Protocol::P2p(Multihash::from(PeerId::random()))) + &Multiaddr::empty().with(Protocol::P2p(PeerId::random().into())) )); // only one transport @@ -599,7 +599,7 @@ mod tests { address: Multiaddr::empty() .with(Protocol::Ip4(std::net::Ipv4Addr::new(127, 0, 0, 1))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from(peer))), + .with(Protocol::P2p(peer.into())), connection_id: ConnectionId::from(0), }, secondary: None, @@ -609,7 +609,7 @@ mod tests { vec![Multiaddr::empty() .with(Protocol::Ip4(std::net::Ipv4Addr::new(127, 0, 0, 1))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from(peer)))] + .with(Protocol::P2p(peer.into()))] .into_iter(), ), }, @@ -642,7 +642,7 @@ mod tests { address: Multiaddr::empty() .with(Protocol::Ip4(std::net::Ipv4Addr::new(127, 0, 0, 1))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from(peer))), + .with(Protocol::P2p(peer.into())), connection_id: ConnectionId::from(0), }, }, @@ -651,7 +651,7 @@ mod tests { vec![Multiaddr::empty() .with(Protocol::Ip4(std::net::Ipv4Addr::new(127, 0, 0, 1))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from(peer)))] + .with(Protocol::P2p(peer.into()))] .into_iter(), ), }, @@ -710,7 +710,7 @@ mod tests { Multiaddr::empty() .with(Protocol::Ip4(std::net::Ipv4Addr::new(127, 0, 0, 1))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from(peer))), + .with(Protocol::P2p(peer.into())), ConnectionId::from(0), )), }, @@ -719,7 +719,7 @@ mod tests { vec![Multiaddr::empty() .with(Protocol::Ip4(std::net::Ipv4Addr::new(127, 0, 0, 1))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from(peer)))] + .with(Protocol::P2p(peer.into()))] .into_iter(), ), }, diff --git a/client/litep2p/src/transport/manager/mod.rs b/client/litep2p/src/transport/manager/mod.rs index a7633964..74983ee4 100644 --- a/client/litep2p/src/transport/manager/mod.rs +++ b/client/litep2p/src/transport/manager/mod.rs @@ -42,7 +42,7 @@ use address::{scores, AddressStore}; use futures::{future::BoxFuture, stream::FuturesUnordered, Stream, StreamExt}; use indexmap::IndexMap; use multiaddr::{Multiaddr, Protocol}; -use multihash::Multihash; +use crate::types::multihash::Multihash; use parking_lot::RwLock; use tokio::sync::mpsc::{channel, Receiver, Sender}; @@ -477,11 +477,7 @@ impl TransportManager { let mut listen_addresses = self.listen_addresses.write(); listen_addresses.insert(address.clone()); - listen_addresses.insert( - address.with(Protocol::P2p( - Multihash::from_bytes(&self.local_peer_id.to_bytes()).unwrap(), - )), - ); + listen_addresses.insert(address.with(Protocol::P2p(self.local_peer_id.into()))); } /// Add one or more known addresses for `peer`. @@ -680,7 +676,7 @@ impl TransportManager { // Extract the peer ID at this point to give `NegotiationError::PeerIdMismatch` a chance to // propagate. let peer_id = match address.iter().last() { - Some(Protocol::P2p(hash)) => PeerId::from_multihash(hash).ok(), + Some(Protocol::P2p(peer_id)) => PeerId::from_multihash(peer_id).ok(), _ => None, }; let Some(peer_id) = peer_id else { @@ -1140,7 +1136,7 @@ impl TransportManager { if let Ok(()) = self.on_dial_failure(connection_id) { match address.iter().last() { - Some(Protocol::P2p(hash)) => match PeerId::from_multihash(hash) { + Some(Protocol::P2p(peer_id)) => match PeerId::from_multihash(peer_id) { Ok(peer) => { tracing::trace!( target: LOG_TARGET, @@ -1416,7 +1412,7 @@ mod tests { use crate::transport::manager::{address::AddressStore, peer_state::SecondaryOrDialing}; use limits::ConnectionLimitsConfig; - use multihash::Multihash; + use crate::types::multihash::Multihash; use super::*; #[cfg(debug_assertions)] @@ -1437,7 +1433,7 @@ mod tests { let dial_address = Multiaddr::empty() .with(Protocol::Ip4(Ipv4Addr::new(127, 0, 0, 1))) .with(Protocol::Tcp(8888 + connection_id)) - .with(Protocol::P2p(Multihash::from_bytes(&peer.to_bytes()).unwrap())); + .with(Protocol::P2p(peer.into())); let connection_id = ConnectionId::from(connection_id as usize); (dial_address, connection_id) @@ -1557,7 +1553,7 @@ mod tests { let dial_address = Multiaddr::empty() .with(Protocol::Ip4(Ipv4Addr::new(127, 0, 0, 1))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from_bytes(&peer.to_bytes()).unwrap())); + .with(Protocol::P2p(peer.into())); let transport = Box::new({ let mut transport = DummyTransport::new(); @@ -1611,7 +1607,7 @@ mod tests { let dial_address = Multiaddr::empty() .with(Protocol::Ip4(Ipv4Addr::new(127, 0, 0, 1))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from_bytes(&peer.to_bytes()).unwrap())); + .with(Protocol::P2p(peer.into())); assert!(manager.dial_address(dial_address.clone()).await.is_ok()); assert_eq!(manager.pending_connections.len(), 1); @@ -1637,7 +1633,7 @@ mod tests { Multiaddr::empty() .with(Protocol::Ip4(Ipv4Addr::new(127, 0, 0, 1))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from_bytes(&peer.to_bytes()).unwrap(),)) + .with(Protocol::P2p(peer.into())) ) .await .is_ok()); @@ -1648,7 +1644,7 @@ mod tests { Multiaddr::empty() .with(Protocol::Ip6(Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from_bytes(&peer.to_bytes()).unwrap(),)) + .with(Protocol::P2p(peer.into())) ) .await .is_ok()); @@ -1756,11 +1752,11 @@ mod tests { let dial_address = Multiaddr::empty() .with(Protocol::Ip4(Ipv4Addr::new(127, 0, 0, 1))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from_bytes(&peer.to_bytes()).unwrap())); + .with(Protocol::P2p(peer.into())); let connect_address = Multiaddr::empty() .with(Protocol::Ip4(Ipv4Addr::new(192, 168, 1, 173))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from_bytes(&peer.to_bytes()).unwrap())); + .with(Protocol::P2p(peer.into())); assert!(manager.dial_address(dial_address.clone()).await.is_ok()); assert_eq!(manager.pending_connections.len(), 1); @@ -1813,11 +1809,11 @@ mod tests { let dial_address = Multiaddr::empty() .with(Protocol::Ip4(Ipv4Addr::new(127, 0, 0, 1))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from_bytes(&peer.to_bytes()).unwrap())); + .with(Protocol::P2p(peer.into())); let connect_address = Multiaddr::empty() .with(Protocol::Ip4(Ipv4Addr::new(192, 168, 1, 173))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from_bytes(&peer.to_bytes()).unwrap())); + .with(Protocol::P2p(peer.into())); assert!(manager.dial_address(dial_address.clone()).await.is_ok()); assert_eq!(manager.pending_connections.len(), 1); @@ -1885,11 +1881,11 @@ mod tests { let dial_address = Multiaddr::empty() .with(Protocol::Ip4(Ipv4Addr::new(127, 0, 0, 1))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from_bytes(&peer.to_bytes()).unwrap())); + .with(Protocol::P2p(peer.into())); let connect_address = Multiaddr::empty() .with(Protocol::Ip4(Ipv4Addr::new(192, 168, 1, 173))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from_bytes(&peer.to_bytes()).unwrap())); + .with(Protocol::P2p(peer.into())); assert!(manager.dial_address(dial_address.clone()).await.is_ok()); assert_eq!(manager.pending_connections.len(), 1); @@ -1954,15 +1950,15 @@ mod tests { let address1 = Multiaddr::empty() .with(Protocol::Ip4(Ipv4Addr::new(127, 0, 0, 1))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from_bytes(&peer.to_bytes()).unwrap())); + .with(Protocol::P2p(peer.into())); let address2 = Multiaddr::empty() .with(Protocol::Ip4(Ipv4Addr::new(192, 168, 1, 173))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from_bytes(&peer.to_bytes()).unwrap())); + .with(Protocol::P2p(peer.into())); let address3 = Multiaddr::empty() .with(Protocol::Ip4(Ipv4Addr::new(192, 168, 10, 64))) .with(Protocol::Tcp(9999)) - .with(Protocol::P2p(Multihash::from_bytes(&peer.to_bytes()).unwrap())); + .with(Protocol::P2p(peer.into())); // remote peer connected to local node let established_result = manager @@ -2049,11 +2045,11 @@ mod tests { let address1 = Multiaddr::empty() .with(Protocol::Ip4(Ipv4Addr::new(127, 0, 0, 1))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from_bytes(&peer.to_bytes()).unwrap())); + .with(Protocol::P2p(peer.into())); let address2 = Multiaddr::empty() .with(Protocol::Ip4(Ipv4Addr::new(192, 168, 1, 173))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from_bytes(&peer.to_bytes()).unwrap())); + .with(Protocol::P2p(peer.into())); // remote peer connected to local node let established_result = manager @@ -2133,11 +2129,11 @@ mod tests { let address1 = Multiaddr::empty() .with(Protocol::Ip4(Ipv4Addr::new(127, 0, 0, 1))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from_bytes(&peer.to_bytes()).unwrap())); + .with(Protocol::P2p(peer.into())); let address2 = Multiaddr::empty() .with(Protocol::Ip4(Ipv4Addr::new(192, 168, 1, 173))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from_bytes(&peer.to_bytes()).unwrap())); + .with(Protocol::P2p(peer.into())); // remote peer connected to local node let emit_event = manager @@ -2219,11 +2215,11 @@ mod tests { let address1 = Multiaddr::empty() .with(Protocol::Ip4(Ipv4Addr::new(127, 0, 0, 1))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from_bytes(&peer.to_bytes()).unwrap())); + .with(Protocol::P2p(peer.into())); let address2 = Multiaddr::empty() .with(Protocol::Ip4(Ipv4Addr::new(192, 168, 1, 173))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from_bytes(&peer.to_bytes()).unwrap())); + .with(Protocol::P2p(peer.into())); // remote peer connected to local node let emit_event = manager @@ -2302,15 +2298,15 @@ mod tests { let address1 = Multiaddr::empty() .with(Protocol::Ip4(Ipv4Addr::new(127, 0, 0, 1))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from_bytes(&peer.to_bytes()).unwrap())); + .with(Protocol::P2p(peer.into())); let address2 = Multiaddr::empty() .with(Protocol::Ip4(Ipv4Addr::new(192, 168, 1, 173))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from_bytes(&peer.to_bytes()).unwrap())); + .with(Protocol::P2p(peer.into())); let address3 = Multiaddr::empty() .with(Protocol::Ip4(Ipv4Addr::new(192, 168, 1, 173))) .with(Protocol::Tcp(9999)) - .with(Protocol::P2p(Multihash::from_bytes(&peer.to_bytes()).unwrap())); + .with(Protocol::P2p(peer.into())); // remote peer connected to local node let emit_event = manager @@ -2548,7 +2544,7 @@ mod tests { address: Multiaddr::empty() .with(Protocol::Ip4(std::net::Ipv4Addr::new(127, 0, 0, 1))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from(peer))), + .with(Protocol::P2p(peer.into())), connection_id: ConnectionId::from(0usize), }, secondary: None, @@ -2558,7 +2554,7 @@ mod tests { vec![Multiaddr::empty() .with(Protocol::Ip4(std::net::Ipv4Addr::new(127, 0, 0, 1))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from(peer)))] + .with(Protocol::P2p(peer.into()))] .into_iter(), ), }, @@ -2590,7 +2586,7 @@ mod tests { address: Multiaddr::empty() .with(Protocol::Ip4(std::net::Ipv4Addr::new(127, 0, 0, 1))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from(peer))), + .with(Protocol::P2p(peer.into())), connection_id: ConnectionId::from(0usize), }, }, @@ -2599,7 +2595,7 @@ mod tests { vec![Multiaddr::empty() .with(Protocol::Ip4(std::net::Ipv4Addr::new(127, 0, 0, 1))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from(peer)))] + .with(Protocol::P2p(peer.into()))] .into_iter(), ), }, @@ -2623,7 +2619,7 @@ mod tests { Multiaddr::empty() .with(Protocol::Ip4(std::net::Ipv4Addr::new(127, 0, 0, 1))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from(peer))) + .with(Protocol::P2p(peer.into())) ); }, state => panic!("invalid state: {state:?}"), @@ -2648,7 +2644,7 @@ mod tests { Multiaddr::empty() .with(Protocol::Ip4(std::net::Ipv4Addr::new(127, 0, 0, 1))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from(peer))), + .with(Protocol::P2p(peer.into())), ConnectionId::from(0), )), }, @@ -2674,7 +2670,7 @@ mod tests { // transport doesn't start with ip/dns { - let address = Multiaddr::empty().with(Protocol::P2p(Multihash::from(PeerId::random()))); + let address = Multiaddr::empty().with(Protocol::P2p(PeerId::random().into())); match manager.dial_address(address.clone()).await { Err(Error::TransportNotSupported(dial_address)) => { assert_eq!(dial_address, address); @@ -2689,7 +2685,7 @@ mod tests { .with(Protocol::Ip4(std::net::Ipv4Addr::new(127, 0, 0, 1))) .with(Protocol::Udp(8888)) .with(Protocol::Utp) - .with(Protocol::P2p(Multihash::from(PeerId::random()))); + .with(Protocol::P2p(PeerId::random().into())); match manager.dial_address(address.clone()).await { Err(Error::TransportNotSupported(dial_address)) => { assert_eq!(dial_address, address); @@ -2703,7 +2699,7 @@ mod tests { let address = Multiaddr::empty() .with(Protocol::Ip4(std::net::Ipv4Addr::new(127, 0, 0, 1))) .with(Protocol::Sctp(8888)) - .with(Protocol::P2p(Multihash::from(PeerId::random()))); + .with(Protocol::P2p(PeerId::random().into())); match manager.dial_address(address.clone()).await { Err(Error::TransportNotSupported(dial_address)) => { assert_eq!(dial_address, address); @@ -2718,7 +2714,7 @@ mod tests { .with(Protocol::Ip4(std::net::Ipv4Addr::new(127, 0, 0, 1))) .with(Protocol::Tcp(8888)) .with(Protocol::Utp) - .with(Protocol::P2p(Multihash::from(PeerId::random()))); + .with(Protocol::P2p(PeerId::random().into())); match manager.dial_address(address.clone()).await { Err(Error::TransportNotSupported(dial_address)) => { assert_eq!(dial_address, address); @@ -2783,7 +2779,7 @@ mod tests { let dial_address = Multiaddr::empty() .with(Protocol::Ip4(Ipv4Addr::new(127, 0, 0, 1))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from_bytes(&peer.to_bytes()).unwrap())); + .with(Protocol::P2p(peer.into())); let connection_id = ConnectionId::random(); let transport = Box::new({ @@ -2800,7 +2796,7 @@ mod tests { vec![Multiaddr::empty() .with(Protocol::Ip4(Ipv4Addr::new(192, 168, 1, 5))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from(peer)))] + .with(Protocol::P2p(peer.into()))] .into_iter(), ); @@ -2852,7 +2848,7 @@ mod tests { let dial_address = Multiaddr::empty() .with(Protocol::Ip4(Ipv4Addr::new(127, 0, 0, 1))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from_bytes(&peer.to_bytes()).unwrap())); + .with(Protocol::P2p(peer.into())); let connection_id = ConnectionId::random(); let transport = Box::new({ @@ -2869,7 +2865,7 @@ mod tests { vec![Multiaddr::empty() .with(Protocol::Ip4(Ipv4Addr::new(127, 0, 0, 1))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from(peer)))] + .with(Protocol::P2p(peer.into()))] .into_iter(), ); @@ -3136,7 +3132,7 @@ mod tests { let dial_address = Multiaddr::empty() .with(Protocol::Ip4(Ipv4Addr::new(127, 0, 0, 1))) .with(Protocol::Tcp(8888 + connection_id)) - .with(Protocol::P2p(Multihash::from_bytes(&peer.to_bytes()).unwrap())); + .with(Protocol::P2p(peer.into())); let connection_id = ConnectionId::from(connection_id as usize); (dial_address, connection_id) @@ -3275,7 +3271,7 @@ mod tests { let dial_address = Multiaddr::empty() .with(Protocol::Ip4(Ipv4Addr::new(127, 0, 0, 1))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from_bytes(&peer.to_bytes()).unwrap())); + .with(Protocol::P2p(peer.into())); let connection_id = ConnectionId::from(0); let transport = Box::new({ @@ -3308,7 +3304,7 @@ mod tests { let second_address = Multiaddr::empty() .with(Protocol::Ip4(Ipv4Addr::new(127, 0, 0, 1))) .with(Protocol::Tcp(8889)) - .with(Protocol::P2p(Multihash::from_bytes(&peer.to_bytes()).unwrap())); + .with(Protocol::P2p(peer.into())); // Second dial attempt with different address. manager.dial_address(second_address.clone()).await.unwrap(); @@ -3345,7 +3341,7 @@ mod tests { let dial_address_tcp = Multiaddr::empty() .with(Protocol::Ip4(Ipv4Addr::new(127, 0, 0, 1))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from_bytes(&peer.to_bytes()).unwrap())); + .with(Protocol::P2p(peer.into())); let transport = Box::new({ let mut transport = DummyTransport::new(); transport.inject_event(TransportEvent::OpenFailure { @@ -3360,7 +3356,7 @@ mod tests { vec![Multiaddr::empty() .with(Protocol::Ip4(Ipv4Addr::new(192, 168, 1, 5))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from(peer)))] + .with(Protocol::P2p(peer.into()))] .into_iter(), ); @@ -3369,7 +3365,7 @@ mod tests { .with(Protocol::Ip4(Ipv4Addr::new(127, 0, 0, 1))) .with(Protocol::Tcp(8889)) .with(Protocol::Ws(Cow::Borrowed("/"))) - .with(Protocol::P2p(Multihash::from_bytes(&peer.to_bytes()).unwrap())); + .with(Protocol::P2p(peer.into())); let transport = Box::new({ let mut transport = DummyTransport::new(); @@ -3386,7 +3382,7 @@ mod tests { .with(Protocol::Ip4(Ipv4Addr::new(192, 168, 1, 5))) .with(Protocol::Tcp(8889)) .with(Protocol::Ws(Cow::Borrowed("/"))) - .with(Protocol::P2p(Multihash::from_bytes(&peer.to_bytes()).unwrap()))] + .with(Protocol::P2p(peer.into()))] .into_iter(), ); diff --git a/client/litep2p/src/transport/manager/peer_state.rs b/client/litep2p/src/transport/manager/peer_state.rs index d31c63b0..165aa70d 100644 --- a/client/litep2p/src/transport/manager/peer_state.rs +++ b/client/litep2p/src/transport/manager/peer_state.rs @@ -422,8 +422,8 @@ impl ConnectionRecord { /// Ensures the peer ID is present in the address. fn ensure_peer_id(peer: PeerId, mut address: Multiaddr) -> Multiaddr { - if let Some(Protocol::P2p(multihash)) = address.iter().last() { - if multihash != *peer.as_ref() { + if let Some(Protocol::P2p(addr_peer_id)) = address.iter().last() { + if addr_peer_id.as_ref() != peer.as_ref() { tracing::warn!( target: LOG_TARGET, ?address, @@ -432,12 +432,12 @@ impl ConnectionRecord { ); address.pop(); - address.push(Protocol::P2p(*peer.as_ref())); + address.push(Protocol::P2p(peer.into())); } address } else { - address.with(Protocol::P2p(*peer.as_ref())) + address.with(Protocol::P2p(peer.into())) } } } diff --git a/client/litep2p/src/transport/tcp/mod.rs b/client/litep2p/src/transport/tcp/mod.rs index f34aa2ca..c5543565 100644 --- a/client/litep2p/src/transport/tcp/mod.rs +++ b/client/litep2p/src/transport/tcp/mod.rs @@ -720,7 +720,7 @@ mod tests { BandwidthSink, PeerId, }; use multiaddr::Protocol; - use multihash::Multihash; + use crate::types::multihash::Multihash; use std::sync::Arc; use tokio::sync::mpsc::channel; @@ -981,7 +981,7 @@ mod tests { let address = Multiaddr::empty() .with(Protocol::Ip6(std::net::Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from_bytes(&peer1.to_bytes()).unwrap())); + .with(Protocol::P2p(peer1.into())); transport2.dial(ConnectionId::new(), address).unwrap(); @@ -1019,7 +1019,7 @@ mod tests { let multiaddr = Multiaddr::empty() .with(Protocol::Ip4(std::net::Ipv4Addr::new(255, 254, 253, 252))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from_bytes(&peer_id.to_bytes()).unwrap())); + .with(Protocol::P2p(peer_id.into())); manager.dial_address(multiaddr.clone()).await.unwrap(); assert!(transport.pending_dials.is_empty()); diff --git a/client/litep2p/src/transport/websocket/connection.rs b/client/litep2p/src/transport/websocket/connection.rs index 8d3e3387..64c85fbc 100644 --- a/client/litep2p/src/transport/websocket/connection.rs +++ b/client/litep2p/src/transport/websocket/connection.rs @@ -37,7 +37,7 @@ use crate::{ }; use futures::{future::BoxFuture, stream::FuturesUnordered, AsyncRead, AsyncWrite, StreamExt}; -use multiaddr::{multihash::Multihash, Multiaddr, Protocol}; +use multiaddr::{Multiaddr, Protocol}; use tokio::net::TcpStream; use tokio_tungstenite::{MaybeTlsStream, WebSocketStream}; use tokio_util::compat::FuturesAsyncReadCompatExt; @@ -354,7 +354,7 @@ impl WebSocketConnection { let address = match role { Role::Dialer => address, - Role::Listener => address.with(Protocol::P2p(Multihash::from(peer))), + Role::Listener => address.with(Protocol::P2p(peer.into())), }; Ok(NegotiatedConnection { diff --git a/client/litep2p/src/transport/websocket/mod.rs b/client/litep2p/src/transport/websocket/mod.rs index d5550950..dca02d04 100644 --- a/client/litep2p/src/transport/websocket/mod.rs +++ b/client/litep2p/src/transport/websocket/mod.rs @@ -192,7 +192,7 @@ impl WebSocketTransport { }; let peer = match protocol_stack.next() { - Some(Protocol::P2p(multihash)) => PeerId::from_multihash(multihash)?, + Some(Protocol::P2p(peer_id)) => PeerId::from_multihash(peer_id)?, protocol => { tracing::warn!( target: LOG_TARGET, diff --git a/client/litep2p/src/types.rs b/client/litep2p/src/types.rs index f5d8791c..f903be37 100644 --- a/client/litep2p/src/types.rs +++ b/client/litep2p/src/types.rs @@ -27,7 +27,9 @@ pub mod multiaddr { pub use multiaddr::{Error, Iter, Multiaddr, Onion3Addr, Protocol}; } pub mod multihash { - pub use multihash::{Code, Error, Multihash, MultihashDigest}; + pub use ::multihash::Error; + pub type Multihash = ::multihash::Multihash<64>; + pub use multihash_codetable::{Code, MultihashDigest}; } pub mod cid { pub use cid::{multihash::Multihash, Cid, CidGeneric, Error, Result, Version}; diff --git a/client/network-types/src/multiaddr/protocol.rs b/client/network-types/src/multiaddr/protocol.rs index c7efe6d6..0e5a6911 100644 --- a/client/network-types/src/multiaddr/protocol.rs +++ b/client/network-types/src/multiaddr/protocol.rs @@ -18,8 +18,6 @@ use crate::multihash::Multihash; use litep2p::types::multiaddr::Protocol as LiteP2pProtocol; -// Note: With multiaddr 0.17, LiteP2pProtocol and multiaddr::Protocol are the same type -// (litep2p re-exports from the multiaddr crate), so we only need impls for one. use std::{ borrow::Cow, fmt::{self, Debug, Display}, @@ -115,7 +113,9 @@ impl<'a> From> for Protocol<'a> { LiteP2pProtocol::Onion(str, port) => Protocol::Onion(str, port), LiteP2pProtocol::Onion3(addr) => Protocol::Onion3(Cow::Owned(*addr.hash()), addr.port()), - LiteP2pProtocol::P2p(multihash) => Protocol::P2p(multihash.into()), + LiteP2pProtocol::P2p(peer_id) => Protocol::P2p( + Multihash::from_bytes(&peer_id.to_bytes()).expect("valid peer id multihash"), + ), LiteP2pProtocol::P2pCircuit => Protocol::P2pCircuit, LiteP2pProtocol::Quic => Protocol::Quic, LiteP2pProtocol::QuicV1 => Protocol::QuicV1, @@ -129,6 +129,7 @@ impl<'a> From> for Protocol<'a> { LiteP2pProtocol::Utp => Protocol::Utp, LiteP2pProtocol::Ws(str) => Protocol::Ws(str), LiteP2pProtocol::Wss(str) => Protocol::Wss(str), + _ => panic!("unsupported multiaddr protocol variant"), } } } @@ -153,7 +154,13 @@ impl<'a> From> for LiteP2pProtocol<'a> { Protocol::Memory(port) => LiteP2pProtocol::Memory(port), Protocol::Onion(str, port) => LiteP2pProtocol::Onion(str, port), Protocol::Onion3(str, port) => LiteP2pProtocol::Onion3((str.into_owned(), port).into()), - Protocol::P2p(multihash) => LiteP2pProtocol::P2p(multihash.into()), + Protocol::P2p(multihash) => { + let litep2p_multihash: litep2p::types::multihash::Multihash = multihash.into(); + LiteP2pProtocol::P2p( + multiaddr::PeerId::try_from(litep2p_multihash) + .expect("valid peer id multihash"), + ) + }, Protocol::P2pCircuit => LiteP2pProtocol::P2pCircuit, Protocol::Quic => LiteP2pProtocol::Quic, Protocol::QuicV1 => LiteP2pProtocol::QuicV1, diff --git a/client/network-types/src/multihash.rs b/client/network-types/src/multihash.rs index 50196603..c3e4820b 100644 --- a/client/network-types/src/multihash.rs +++ b/client/network-types/src/multihash.rs @@ -24,6 +24,8 @@ use litep2p::types::multihash::{ }; use std::fmt::{self, Debug}; +const MULTIHASH_IDENTITY_CODE: u64 = 0x00; + /// Default [`Multihash`] implementations. Only hashes used by substrate are defined. #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub enum Code { @@ -36,7 +38,11 @@ pub enum Code { impl Code { /// Calculate digest using this [`Code`]'s hashing algorithm. pub fn digest(&self, input: &[u8]) -> Multihash { - LiteP2pCode::from(*self).digest(input).into() + match self { + Code::Identity => Multihash::wrap(MULTIHASH_IDENTITY_CODE, input) + .expect("identity digest fits in Multihash<64>"), + Code::Sha2_256 => LiteP2pCode::Sha2_256.digest(input).into(), + } } } @@ -49,27 +55,22 @@ pub enum Error { /// The multihash code is not supported. #[error("unsupported multihash code '{0:x}'")] UnsupportedCode(u64), - /// Catch-all for other errors emitted when converting `u64` code to enum or parsing multihash - /// from bytes. Never generated as of multihash-0.17.0. + /// Catch-all for other errors emitted when parsing multihash from bytes. #[error("other error: {0}")] Other(Box), } impl From for Error { fn from(error: LiteP2pError) -> Self { - match error { - LiteP2pError::InvalidSize(s) => Self::InvalidSize(s), - LiteP2pError::UnsupportedCode(c) => Self::UnsupportedCode(c), - e => Self::Other(Box::new(e)), - } + Self::Other(Box::new(error)) } } impl From for LiteP2pCode { fn from(code: Code) -> Self { match code { - Code::Identity => LiteP2pCode::Identity, Code::Sha2_256 => LiteP2pCode::Sha2_256, + Code::Identity => panic!("identity is not a codetable code"), } } } @@ -79,7 +80,6 @@ impl TryFrom for Code { fn try_from(code: LiteP2pCode) -> Result { match code { - LiteP2pCode::Identity => Ok(Code::Identity), LiteP2pCode::Sha2_256 => Ok(Code::Sha2_256), _ => Err(Error::UnsupportedCode(code.into())), } @@ -90,16 +90,22 @@ impl TryFrom for Code { type Error = Error; fn try_from(code: u64) -> Result { - match LiteP2pCode::try_from(code) { - Ok(code) => code.try_into(), - Err(e) => Err(e.into()), + if code == MULTIHASH_IDENTITY_CODE { + return Ok(Code::Identity); } + if code == u64::from(LiteP2pCode::Sha2_256) { + return Ok(Code::Sha2_256); + } + Err(Error::UnsupportedCode(code)) } } impl From for u64 { fn from(code: Code) -> Self { - LiteP2pCode::from(code).into() + match code { + Code::Identity => MULTIHASH_IDENTITY_CODE, + Code::Sha2_256 => LiteP2pCode::Sha2_256.into(), + } } } @@ -156,9 +162,6 @@ impl From for LiteP2pMultihash { } } -// Note: In multihash 0.17, LiteP2pMultihash is the same as multihash::Multihash (type alias from -// Code derive) so these From impls are redundant as both are already handled above. - #[cfg(test)] mod tests { use super::*; @@ -175,4 +178,11 @@ mod tests { assert_eq!(u64::from(Code::Identity), 0x00); assert_eq!(u64::from(Code::Sha2_256), 0x12); } + + #[test] + fn identity_digest() { + let digest = Code::Identity.digest(b"hello"); + assert_eq!(digest.code(), MULTIHASH_IDENTITY_CODE); + assert_eq!(digest.digest(), b"hello"); + } } diff --git a/client/network/src/config.rs b/client/network/src/config.rs index 7e9a965f..99bd02fa 100644 --- a/client/network/src/config.rs +++ b/client/network/src/config.rs @@ -181,7 +181,7 @@ pub struct MultiaddrWithPeerId { impl MultiaddrWithPeerId { /// Concatenates the multiaddress and peer ID into one multiaddress containing both. pub fn concat(&self) -> Multiaddr { - let proto = multiaddr::Protocol::P2p(From::from(self.peer_id)); + let proto = multiaddr::Protocol::P2p(self.peer_id.into()); self.multiaddr.clone().with(proto) } } diff --git a/client/network/src/litep2p/discovery.rs b/client/network/src/litep2p/discovery.rs index e155da14..dd1694ef 100644 --- a/client/network/src/litep2p/discovery.rs +++ b/client/network/src/litep2p/discovery.rs @@ -709,7 +709,7 @@ impl Stream for Discovery { })) => { let observed_address = if let Some(Protocol::P2p(peer_id)) = observed_address.iter().last() { - if peer_id != *this.local_peer_id.as_ref() { + if peer_id.as_ref() != this.local_peer_id.as_ref() { log::warn!( target: LOG_TARGET, "Discovered external address for a peer that is not us: {observed_address}", diff --git a/client/network/src/litep2p/mod.rs b/client/network/src/litep2p/mod.rs index 7895dc10..39402e58 100644 --- a/client/network/src/litep2p/mod.rs +++ b/client/network/src/litep2p/mod.rs @@ -217,12 +217,13 @@ impl Litep2pNetworkBackend { Protocol::Ip4(_), ) => match address.iter().find(|protocol| std::matches!(protocol, Protocol::P2p(_))) { - Some(Protocol::P2p(multihash)) => PeerId::from_multihash(multihash.into()) - .map_or(None, |peer| Some((peer, Some(address)))), - _ => None, - }, - Some(Protocol::P2p(multihash)) => - PeerId::from_multihash(multihash.into()).map_or(None, |peer| Some((peer, None))), + Some(Protocol::P2p(peer_id)) => PeerId::from_bytes(&peer_id.to_bytes()) + .ok() + .map(|peer| (peer, Some(address))), + _ => None, + }, + Some(Protocol::P2p(peer_id)) => + PeerId::from_bytes(&peer_id.to_bytes()).ok().map(|peer| (peer, None)), _ => None, }) .fold(HashMap::new(), |mut acc, (peer, maybe_address)| { @@ -1068,7 +1069,7 @@ impl NetworkBackend for Litep2pNetworkBac // Litep2p requires the peer ID to be present in the address. let address = if !std::matches!(address.iter().last(), Some(Protocol::P2p(_))) { - address.with(Protocol::P2p(*local_peer_id.as_ref())) + address.with(Protocol::P2p(local_peer_id.into())) } else { address }; From 21221090324b11022ccfda2ad68c2661a9b61b3f Mon Sep 17 00:00:00 2001 From: illuzen Date: Mon, 3 Aug 2026 16:51:44 +0800 Subject: [PATCH 06/15] chore: bump clatter to 2.2 and drop pqcrypto-kyber Upgrade litep2p's Noise stack to clatter 2.2 with rust-crypto ML-KEM only (no pqclean/kyber features), simplifying ClatterSession now that PqHandshake owns its RNG. Co-authored-by: Cursor --- Cargo.lock | 45 ++----------------- Cargo.toml | 9 +++- client/litep2p/src/crypto/noise/protocol.rs | 41 ++--------------- .../src/protocol/libp2p/kademlia/mod.rs | 1 - .../protocol/libp2p/kademlia/routing_table.rs | 2 - .../litep2p/src/protocol/transport_service.rs | 1 - .../litep2p/src/transport/manager/address.rs | 1 - .../litep2p/src/transport/manager/handle.rs | 1 - client/litep2p/src/transport/manager/mod.rs | 11 ++--- client/litep2p/src/transport/tcp/mod.rs | 1 - 10 files changed, 19 insertions(+), 94 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 48a178f6..aa7a6283 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1425,22 +1425,20 @@ checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9" [[package]] name = "clatter" -version = "1.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58e0d6244d37bbab9ce2351c3ec3c871ae51f02597b6ee25b523bcd008025a13" +checksum = "6fed49fa357a85c377c0f920e86100f5326111b09ad69f6de684e324e3ad8097" dependencies = [ "aes-gcm", "arrayvec 0.7.6", "blake2 0.10.6", "chacha20poly1305", "displaydoc", + "getrandom 0.3.3", "ml-kem", - "pqcrypto-kyber", - "pqcrypto-traits", "rand_core 0.6.4", "sha2 0.10.9", "thiserror-no-std", - "x25519-dalek", "zeroize", ] @@ -2572,12 +2570,6 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2" -[[package]] -name = "dunce" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813" - [[package]] name = "dyn-clonable" version = "0.9.2" @@ -7080,37 +7072,6 @@ dependencies = [ "zerocopy", ] -[[package]] -name = "pqcrypto-internals" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4a326caf27cbf2ac291ca7fd56300497ba9e76a8cc6a7d95b7a18b57f22b61d" -dependencies = [ - "cc", - "dunce", - "getrandom 0.3.3", - "libc", -] - -[[package]] -name = "pqcrypto-kyber" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15c00293cf898859d0c771455388054fd69ab712263c73fdc7f287a39b1ba000" -dependencies = [ - "cc", - "glob", - "libc", - "pqcrypto-internals", - "pqcrypto-traits", -] - -[[package]] -name = "pqcrypto-traits" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94e851c7654eed9e68d7d27164c454961a616cf8c203d500607ef22c737b51bb" - [[package]] name = "predicates" version = "3.1.3" diff --git a/Cargo.toml b/Cargo.toml index 0837ae59..6fd0d31e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -94,7 +94,14 @@ cfg-if = { version = "1.0" } chrono = { version = "0.4.31" } cid = { version = "0.11.3" } clap = { version = "4.5.13" } -clatter = { version = "=1.1.0" } +# rust-crypto ML-KEM only — avoid default use-pqclean-* (unmaintained pqcrypto-kyber). +clatter = { version = "2.2.0", default-features = false, features = [ + "getrandom", + "std", + "use-chacha20poly1305", + "use-rust-crypto-ml-kem", + "use-sha", +] } codec = { version = "3.6.12", default-features = false, package = "parity-scale-codec" } const-hex = { version = "1.16.0", default-features = false } criterion = { version = "0.5.1", default-features = false } diff --git a/client/litep2p/src/crypto/noise/protocol.rs b/client/litep2p/src/crypto/noise/protocol.rs index 3ac516b4..b8d8de8c 100644 --- a/client/litep2p/src/crypto/noise/protocol.rs +++ b/client/litep2p/src/crypto/noise/protocol.rs @@ -33,30 +33,13 @@ use clatter::{ transportstate::TransportState, PqHandshake, }; -use rand::SeedableRng; use zeroize::Zeroize; use crate::error::NegotiationError; /// Clatter session that manages the pqXX handshake state with ML-KEM 768. -/// -/// This struct owns both the RNG and handshake with proper lifetime management. -/// The RNG is boxed for a stable address, allowing the handshake to borrow it. -/// -/// # Safety -/// This uses a self-referential pattern: the handshake borrows from the boxed RNG. -/// This is sound because: -/// 1. `_rng` is boxed, giving it a stable heap address -/// 2. We never move or drop `_rng` while `handshake` exists -/// 3. `ClatterSession` is not Clone/Copy, preventing aliasing -/// 4. `handshake` is declared before `_rng`, so it drops first (fields drop in declaration order), -/// ending the borrow before the RNG is freed pub struct ClatterSession { - /// The handshake state. The 'static lifetime is a lie - it actually borrows from `_rng`. - /// Declared before `_rng` so it is dropped first, while the borrowed RNG is still alive. - handshake: PqHandshake<'static, MlKem768, MlKem768, ChaChaPoly, Sha256, rand::rngs::StdRng>, - /// The RNG - must be boxed for stable address. Kept alive for the handshake's lifetime. - _rng: Box, + handshake: PqHandshake, } impl std::fmt::Debug for ClatterSession { @@ -84,21 +67,7 @@ impl ClatterSession { let kem_public = ::PubKey::from_slice(static_keypair.public.as_ref()); let clatter_keypair = clatter::KeyPair { public: kem_public, secret: kem_secret }; - let mut rng = Box::new(rand::rngs::StdRng::from_entropy()); - - // Get a raw pointer to the RNG - let rng_ptr = rng.as_mut() as *mut rand::rngs::StdRng; - - // SAFETY: We're creating a reference that borrows from the boxed RNG. - // This is sound because: - // 1. The Box gives a stable heap address that won't move - // 2. We store the Box in the same struct, so it lives as long as the handshake - // 3. `handshake` is declared before `_rng`, so it drops first (fields drop in declaration - // order), ending the borrow before the RNG is freed - // 4. We never expose &mut _rng or allow moving it - let rng_ref: &'static mut rand::rngs::StdRng = unsafe { &mut *rng_ptr }; - - let handshake = PqHandshake::::new( + let handshake = PqHandshake::::new( noise_pqxx(), prologue, is_initiator, @@ -106,13 +75,12 @@ impl ClatterSession { None, // No pre-shared ephemeral key None, // No remote static key (XX pattern) None, // No remote ephemeral key - rng_ref, ) .map_err(|e| { NegotiationError::Clatter(format!("Failed to create pqXX handshake: {:?}", e)) })?; - Ok(Self { handshake, _rng: rng }) + Ok(Self { handshake }) } /// Write a handshake message. @@ -195,8 +163,7 @@ pub struct Keypair { impl Keypair { /// Generate a new ML-KEM 768 keypair. pub fn new() -> Self { - let mut rng = rand::thread_rng(); - let keypair = MlKem768::genkey(&mut rng).expect("ML-KEM key generation should not fail"); + let keypair = MlKem768::genkey().expect("ML-KEM key generation should not fail"); let secret = SecretKey(keypair.secret.as_slice().to_vec()); let public = PublicKey(keypair.public.as_slice().to_vec()); diff --git a/client/litep2p/src/protocol/libp2p/kademlia/mod.rs b/client/litep2p/src/protocol/libp2p/kademlia/mod.rs index 968f1ffd..7cc9397d 100644 --- a/client/litep2p/src/protocol/libp2p/kademlia/mod.rs +++ b/client/litep2p/src/protocol/libp2p/kademlia/mod.rs @@ -1378,7 +1378,6 @@ mod tests { ConnectionId, }; use multiaddr::Protocol; - use crate::types::multihash::Multihash; use std::str::FromStr; use tokio::sync::mpsc::channel; diff --git a/client/litep2p/src/protocol/libp2p/kademlia/routing_table.rs b/client/litep2p/src/protocol/libp2p/kademlia/routing_table.rs index 6910f53e..0fcb20cd 100644 --- a/client/litep2p/src/protocol/libp2p/kademlia/routing_table.rs +++ b/client/litep2p/src/protocol/libp2p/kademlia/routing_table.rs @@ -34,8 +34,6 @@ use crate::{ }; use multiaddr::{Multiaddr, Protocol}; -use crate::types::multihash::Multihash; - /// Number of k-buckets. const NUM_BUCKETS: usize = 256; diff --git a/client/litep2p/src/protocol/transport_service.rs b/client/litep2p/src/protocol/transport_service.rs index 78784585..922c163c 100644 --- a/client/litep2p/src/protocol/transport_service.rs +++ b/client/litep2p/src/protocol/transport_service.rs @@ -29,7 +29,6 @@ use crate::{ use futures::{future::BoxFuture, stream::FuturesUnordered, Stream, StreamExt}; use multiaddr::{Multiaddr, Protocol}; -use crate::types::multihash::Multihash; use tokio::sync::mpsc::{channel, Receiver, Sender}; use std::{ diff --git a/client/litep2p/src/transport/manager/address.rs b/client/litep2p/src/transport/manager/address.rs index 3bc5ca6f..90953077 100644 --- a/client/litep2p/src/transport/manager/address.rs +++ b/client/litep2p/src/transport/manager/address.rs @@ -22,7 +22,6 @@ use crate::{error::DialError, PeerId}; use ip_network::IpNetwork; use multiaddr::{Multiaddr, Protocol}; -use crate::types::multihash::Multihash; use std::collections::{hash_map::Entry, HashMap}; diff --git a/client/litep2p/src/transport/manager/handle.rs b/client/litep2p/src/transport/manager/handle.rs index 0a2c284e..9cf05d99 100644 --- a/client/litep2p/src/transport/manager/handle.rs +++ b/client/litep2p/src/transport/manager/handle.rs @@ -396,7 +396,6 @@ mod tests { }; use super::*; - use crate::types::multihash::Multihash; use parking_lot::lock_api::RwLock; use tokio::sync::mpsc::{channel, Receiver}; diff --git a/client/litep2p/src/transport/manager/mod.rs b/client/litep2p/src/transport/manager/mod.rs index 74983ee4..5c4f38dd 100644 --- a/client/litep2p/src/transport/manager/mod.rs +++ b/client/litep2p/src/transport/manager/mod.rs @@ -42,7 +42,6 @@ use address::{scores, AddressStore}; use futures::{future::BoxFuture, stream::FuturesUnordered, Stream, StreamExt}; use indexmap::IndexMap; use multiaddr::{Multiaddr, Protocol}; -use crate::types::multihash::Multihash; use parking_lot::RwLock; use tokio::sync::mpsc::{channel, Receiver, Sender}; @@ -1412,8 +1411,6 @@ mod tests { use crate::transport::manager::{address::AddressStore, peer_state::SecondaryOrDialing}; use limits::ConnectionLimitsConfig; - use crate::types::multihash::Multihash; - use super::*; #[cfg(debug_assertions)] use crate::transport::KEEP_ALIVE_TIMEOUT; @@ -1534,7 +1531,7 @@ mod tests { .with(Protocol::Ip4(Ipv4Addr::new(127, 0, 0, 1))) .with(Protocol::Udp(8888)) .with(Protocol::QuicV1) - .with(Protocol::P2p(Multihash::from_bytes(&PeerId::random().to_bytes()).unwrap())); + .with(Protocol::P2p(PeerId::random().into())); assert!(std::matches!( manager.dial_address(address).await, @@ -1703,14 +1700,14 @@ mod tests { let address = Multiaddr::empty() .with(Protocol::Ip6(Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from_bytes(&PeerId::random().to_bytes()).unwrap())); + .with(Protocol::P2p(PeerId::random().into())); assert!(handle.supported_transport(&address)); // ipv4 let address = Multiaddr::empty() .with(Protocol::Ip4(Ipv4Addr::new(127, 0, 0, 1))) .with(Protocol::Tcp(8888)) - .with(Protocol::P2p(Multihash::from_bytes(&PeerId::random().to_bytes()).unwrap())); + .with(Protocol::P2p(PeerId::random().into())); assert!(handle.supported_transport(&address)); // quic - not supported @@ -1718,7 +1715,7 @@ mod tests { .with(Protocol::Ip4(Ipv4Addr::new(127, 0, 0, 1))) .with(Protocol::Udp(8888)) .with(Protocol::QuicV1) - .with(Protocol::P2p(Multihash::from_bytes(&PeerId::random().to_bytes()).unwrap())); + .with(Protocol::P2p(PeerId::random().into())); assert!(!handle.supported_transport(&address)); // websocket diff --git a/client/litep2p/src/transport/tcp/mod.rs b/client/litep2p/src/transport/tcp/mod.rs index c5543565..a40ad760 100644 --- a/client/litep2p/src/transport/tcp/mod.rs +++ b/client/litep2p/src/transport/tcp/mod.rs @@ -720,7 +720,6 @@ mod tests { BandwidthSink, PeerId, }; use multiaddr::Protocol; - use crate::types::multihash::Multihash; use std::sync::Arc; use tokio::sync::mpsc::channel; From 65d54520a3b0cd506ca1161e751adf85f71cd74d Mon Sep 17 00:00:00 2001 From: illuzen Date: Mon, 3 Aug 2026 17:03:52 +0800 Subject: [PATCH 07/15] fmt Co-Authored-By: Cursor --- client/litep2p/src/peer_id.rs | 3 +- .../src/protocol/libp2p/kademlia/query/mod.rs | 3 +- .../src/protocol/libp2p/kademlia/record.rs | 2 +- .../litep2p/src/transport/common/listener.rs | 2 +- .../litep2p/src/transport/manager/handle.rs | 5 +- client/network/src/litep2p/mod.rs | 14 ++--- client/wasm-interface/Cargo.toml | 58 +++++++++---------- 7 files changed, 42 insertions(+), 45 deletions(-) diff --git a/client/litep2p/src/peer_id.rs b/client/litep2p/src/peer_id.rs index 5d8b97ef..a264b1d1 100644 --- a/client/litep2p/src/peer_id.rs +++ b/client/litep2p/src/peer_id.rs @@ -312,9 +312,8 @@ impl FromStr for PeerId { #[cfg(test)] mod tests { use super::{ParseError, MAX_INLINE_KEY_LENGTH, MULTIHASH_IDENTITY_CODE}; - use crate::{crypto::dilithium::Keypair, PeerId}; + use crate::{crypto::dilithium::Keypair, types::multihash::Multihash, PeerId}; use multiaddr::{Multiaddr, Protocol}; - use crate::types::multihash::Multihash; use multihash_codetable::Code; #[test] diff --git a/client/litep2p/src/protocol/libp2p/kademlia/query/mod.rs b/client/litep2p/src/protocol/libp2p/kademlia/query/mod.rs index 3ff53bbd..126d163a 100644 --- a/client/litep2p/src/protocol/libp2p/kademlia/query/mod.rs +++ b/client/litep2p/src/protocol/libp2p/kademlia/query/mod.rs @@ -874,8 +874,7 @@ impl QueryEngine { #[cfg(test)] mod tests { - use crate::peer_id::MULTIHASH_IDENTITY_CODE; - use crate::types::multihash::Multihash; + use crate::{peer_id::MULTIHASH_IDENTITY_CODE, types::multihash::Multihash}; use super::*; use crate::protocol::libp2p::kademlia::types::ConnectionType; diff --git a/client/litep2p/src/protocol/libp2p/kademlia/record.rs b/client/litep2p/src/protocol/libp2p/kademlia/record.rs index 64339981..86395c80 100644 --- a/client/litep2p/src/protocol/libp2p/kademlia/record.rs +++ b/client/litep2p/src/protocol/libp2p/kademlia/record.rs @@ -27,8 +27,8 @@ use crate::{ Multiaddr, PeerId, }; -use bytes::Bytes; use crate::types::multihash::Multihash; +use bytes::Bytes; use std::{borrow::Borrow, time::Instant}; diff --git a/client/litep2p/src/transport/common/listener.rs b/client/litep2p/src/transport/common/listener.rs index 58614746..a74a60b1 100644 --- a/client/litep2p/src/transport/common/listener.rs +++ b/client/litep2p/src/transport/common/listener.rs @@ -406,7 +406,7 @@ fn multiaddr_to_socket_address( let maybe_peer = match iter.next() { Some(Protocol::P2p(peer_id)) => - Some(PeerId::from_multihash(peer_id).map_err(AddressError::InvalidPeerId)?), + Some(PeerId::from_multihash(peer_id).map_err(AddressError::InvalidPeerId)?), None => None, protocol => { tracing::error!( diff --git a/client/litep2p/src/transport/manager/handle.rs b/client/litep2p/src/transport/manager/handle.rs index 9cf05d99..48a1b32e 100644 --- a/client/litep2p/src/transport/manager/handle.rs +++ b/client/litep2p/src/transport/manager/handle.rs @@ -533,9 +533,8 @@ mod tests { let (handle, _rx) = make_transport_manager_handle(); // only peer id (used by Polkadot sometimes) - assert!(!handle.supported_transport( - &Multiaddr::empty().with(Protocol::P2p(PeerId::random().into())) - )); + assert!(!handle + .supported_transport(&Multiaddr::empty().with(Protocol::P2p(PeerId::random().into())))); // only one transport assert!(!handle.supported_transport( diff --git a/client/network/src/litep2p/mod.rs b/client/network/src/litep2p/mod.rs index 39402e58..46969767 100644 --- a/client/network/src/litep2p/mod.rs +++ b/client/network/src/litep2p/mod.rs @@ -217,13 +217,13 @@ impl Litep2pNetworkBackend { Protocol::Ip4(_), ) => match address.iter().find(|protocol| std::matches!(protocol, Protocol::P2p(_))) { - Some(Protocol::P2p(peer_id)) => PeerId::from_bytes(&peer_id.to_bytes()) - .ok() - .map(|peer| (peer, Some(address))), - _ => None, - }, - Some(Protocol::P2p(peer_id)) => - PeerId::from_bytes(&peer_id.to_bytes()).ok().map(|peer| (peer, None)), + Some(Protocol::P2p(peer_id)) => PeerId::from_bytes(&peer_id.to_bytes()) + .ok() + .map(|peer| (peer, Some(address))), + _ => None, + }, + Some(Protocol::P2p(peer_id)) => + PeerId::from_bytes(&peer_id.to_bytes()).ok().map(|peer| (peer, None)), _ => None, }) .fold(HashMap::new(), |mut acc, (peer, maybe_address)| { diff --git a/client/wasm-interface/Cargo.toml b/client/wasm-interface/Cargo.toml index e57eed8a..e359a30b 100644 --- a/client/wasm-interface/Cargo.toml +++ b/client/wasm-interface/Cargo.toml @@ -10,22 +10,22 @@ # See Cargo.toml.orig for the original contents. [package] -edition = "2021" -name = "sp-wasm-interface" -version = "24.0.0" authors = ["Parity Technologies "] -build = false -autolib = false +autobenches = false autobins = false autoexamples = false +autolib = false autotests = false -autobenches = false +build = false description = "Types and traits for interfacing between the host and the wasm runtime." -homepage = "https://paritytech.github.io/polkadot-sdk/" documentation = "https://docs.rs/sp-wasm-interface" -readme = "README.md" +edition = "2021" +homepage = "https://paritytech.github.io/polkadot-sdk/" license = "Apache-2.0" +name = "sp-wasm-interface" +readme = "README.md" repository = "https://github.com/paritytech/polkadot-sdk.git" +version = "24.0.0" [package.metadata.docs.rs] targets = ["x86_64-unknown-linux-gnu"] @@ -33,13 +33,13 @@ targets = ["x86_64-unknown-linux-gnu"] [features] default = ["std"] std = [ - "anyhow?/std", - "codec/std", - "log/std", + "anyhow?/std", + "codec/std", + "log/std", ] wasmtime = [ - "anyhow", - "dep:wasmtime", + "anyhow", + "dep:wasmtime", ] [lib] @@ -47,29 +47,29 @@ name = "sp_wasm_interface" path = "src/lib.rs" [dependencies.anyhow] -version = "1.0.81" -optional = true default-features = false +optional = true +version = "1.0.81" [dependencies.codec] -version = "3.7.5" -features = ["derive"] default-features = false +features = ["derive"] package = "parity-scale-codec" +version = "3.7.5" [dependencies.impl-trait-for-tuples] version = "0.2.2" [dependencies.log] -version = "0.4.22" -optional = true default-features = true +optional = true +version = "0.4.22" [dependencies.wasmtime] # Quantus: bump 35.0.0 -> 36.0.13 to unify with patched sc-executor-wasmtime. -version = "36.0.13" -optional = true default-features = false +optional = true +version = "36.0.13" [lints.clippy.all] level = "allow" @@ -172,13 +172,13 @@ level = "allow" priority = 2 [lints.rust.unexpected_cfgs] -level = "warn" -priority = 0 check-cfg = [ - 'cfg(build_opt_level, values("3"))', - 'cfg(build_profile, values("debug", "release"))', - "cfg(enable_alloc_error_handler)", - "cfg(fuzzing)", - "cfg(ignore_flaky_test)", - "cfg(substrate_runtime)", + "cfg(enable_alloc_error_handler)", + "cfg(fuzzing)", + "cfg(ignore_flaky_test)", + "cfg(substrate_runtime)", + 'cfg(build_opt_level, values("3"))', + 'cfg(build_profile, values("debug", "release"))', ] +level = "warn" +priority = 0 From fb49d79119160a119bb33fbaaf9a5d15cec4e29f Mon Sep 17 00:00:00 2001 From: illuzen Date: Mon, 3 Aug 2026 17:41:03 +0800 Subject: [PATCH 08/15] fix slow ti tests --- pallets/balances/src/lib.rs | 3 +- pallets/balances/src/tests/mod.rs | 49 ++++++++++++++++++------------- 2 files changed, 29 insertions(+), 23 deletions(-) diff --git a/pallets/balances/src/lib.rs b/pallets/balances/src/lib.rs index 00ab4301..4f86d6f7 100644 --- a/pallets/balances/src/lib.rs +++ b/pallets/balances/src/lib.rs @@ -204,8 +204,7 @@ const DEFAULT_ADDRESS_URI: &str = "//Sender//{}"; /// through the externally reachable `GenesisBuilder::build_state` runtime API. Each derived /// account performs an expensive sr25519 key derivation and a storage write, so an unbounded /// count would let a tiny request force effectively unbounded runtime work. This cap keeps the -/// worst-case derivation work small while still covering any legitimate development setup (the -/// largest in-repo use is exactly this many accounts). +/// worst-case derivation work small while still covering any legitimate development setup. pub const MAX_DEV_ACCOUNTS: u32 = 1_000; type AccountIdLookupOf = <::Lookup as StaticLookup>::Source; diff --git a/pallets/balances/src/tests/mod.rs b/pallets/balances/src/tests/mod.rs index 7ece36a6..4ee500e5 100644 --- a/pallets/balances/src/tests/mod.rs +++ b/pallets/balances/src/tests/mod.rs @@ -44,7 +44,14 @@ use sp_runtime::{ ArithmeticError, BuildStorage, DispatchError, DispatchResult, FixedPointNumber, RuntimeDebug, TokenError, }; -use std::collections::BTreeSet; +use std::{collections::BTreeSet, sync::OnceLock}; + +/// Genesis `dev_accounts` count used by [`ExtBuilder`]. +/// +/// Kept well below [`MAX_DEV_ACCOUNTS`]: each account pays for an sr25519 URI derivation, and +/// [`ensure_ti_valid`] must skip them. The production cap stays high for the genesis DoS bound; +/// tests only need to prove a non-trivial set exists in storage. +const TEST_DEV_ACCOUNTS: u32 = 100; mod consumer_limit_tests; mod currency_tests; @@ -184,7 +191,7 @@ impl ExtBuilder { vec![] }, dev_accounts: Some(( - 1000, + TEST_DEV_ACCOUNTS, self.existential_deposit, Some(DEFAULT_ADDRESS_URI.to_string()), )), @@ -307,31 +314,31 @@ pub fn info_from_weight(w: Weight) -> DispatchInfo { DispatchInfo { call_weight: w, ..Default::default() } } +/// Cached AccountIds for [`TEST_DEV_ACCOUNTS`] derived from [`DEFAULT_ADDRESS_URI`]. +/// +/// Deriving these is expensive; never rebuild them per [`ensure_ti_valid`] call. +fn test_dev_account_ids() -> &'static BTreeSet { + static IDS: OnceLock> = OnceLock::new(); + IDS.get_or_init(|| { + (0..TEST_DEV_ACCOUNTS) + .map(|index| { + let derivation_string = DEFAULT_ADDRESS_URI.replace("{}", &index.to_string()); + let pair: SrPair = + Pair::from_string(&derivation_string, None).expect("Invalid derivation string"); + AccountId::decode(&mut &pair.public().encode()[..]).unwrap() + }) + .collect() + }) +} + /// Check that the total-issuance matches the sum of all accounts' total balances. pub fn ensure_ti_valid() { let mut sum = 0; - - // Fetch the dev accounts from Account Storage. - let dev_accounts = (1000, EXISTENTIAL_DEPOSIT, DEFAULT_ADDRESS_URI.to_string()); - let (num_accounts, _balance, ref derivation) = dev_accounts; - - // Generate the dev account public keys. - let dev_account_ids: Vec<_> = (0..num_accounts) - .map(|index| { - let derivation_string = derivation.replace("{}", &index.to_string()); - let pair: SrPair = - Pair::from_string(&derivation_string, None).expect("Invalid derivation string"); - ::AccountId::decode( - &mut &pair.public().encode()[..], - ) - .unwrap() - }) - .collect(); + let dev_account_ids = test_dev_account_ids(); // Iterate over all account keys (i.e., the account IDs). for acc in frame_system::Account::::iter_keys() { - // Skip dev accounts by checking if the account is in the dev_account_ids list. - // This also proves dev_accounts exists in storage. + // Skip genesis dev accounts (also proves they landed in storage). if dev_account_ids.contains(&acc) { continue; } From 11a40ccd9da5a7a75ab8a4b17cefd13d25d8635b Mon Sep 17 00:00:00 2001 From: illuzen Date: Mon, 3 Aug 2026 20:49:15 +0800 Subject: [PATCH 09/15] fix: handle multiaddr 0.18 protocols without panicking Model WebTransport and other 0.18 Protocol variants, reject unknown protocols at parse time, and add a webtransport parse/iter regression test. Co-authored-by: Cursor --- client/network-types/src/multiaddr.rs | 44 ++++++- .../network-types/src/multiaddr/protocol.rs | 119 ++++++++++++------ 2 files changed, 124 insertions(+), 39 deletions(-) diff --git a/client/network-types/src/multiaddr.rs b/client/network-types/src/multiaddr.rs index cef79e44..573dfb3c 100644 --- a/client/network-types/src/multiaddr.rs +++ b/client/network-types/src/multiaddr.rs @@ -73,6 +73,15 @@ impl Multiaddr { pub fn to_vec(&self) -> Vec { self.multiaddr.to_vec() } + + /// Parse a litep2p multiaddr, rejecting protocols we do not model. + fn try_from_litep2p(multiaddr: LiteP2pMultiaddr) -> Result { + for protocol in multiaddr.iter() { + protocol::try_from_litep2p_protocol(protocol) + .map_err(|tag| ParseError::UnsupportedProtocol(tag.to_string()))?; + } + Ok(Self { multiaddr }) + } } impl Display for Multiaddr { @@ -96,6 +105,8 @@ impl AsRef<[u8]> for Multiaddr { impl From for Multiaddr { fn from(multiaddr: LiteP2pMultiaddr) -> Self { + // Infallible wrap for addresses already accepted by the litep2p stack. Iteration uses a + // non-panicking protocol conversion (see [`protocol::try_from_litep2p_protocol`]). Self { multiaddr } } } @@ -132,7 +143,7 @@ impl TryFrom> for Multiaddr { fn try_from(v: Vec) -> Result { let multiaddr = LiteP2pMultiaddr::try_from(v)?; - Ok(Self { multiaddr }) + Self::try_from_litep2p(multiaddr) } } @@ -157,6 +168,9 @@ pub enum ParseError { /// Failed to decode unsigned varint. #[error("failed to decode unsigned varint: {0}")] InvalidUvar(Box), + /// Protocol is valid in multiaddr but not modeled by [`Protocol`]. + #[error("unsupported multiaddr protocol '{0}'")] + UnsupportedProtocol(String), /// Other error emitted when parsing into the wrapped type. #[error("multiaddr parsing error: {0}")] ParsingError(Box), @@ -182,7 +196,7 @@ impl FromStr for Multiaddr { fn from_str(s: &str) -> Result { let multiaddr = LiteP2pMultiaddr::from_str(s)?; - Ok(Self { multiaddr }) + Self::try_from_litep2p(multiaddr) } } @@ -274,3 +288,29 @@ macro_rules! build_multiaddr { } } } + +#[cfg(test)] +mod tests { + use super::{Multiaddr, Protocol}; + use std::{net::Ipv4Addr, str::FromStr}; + + /// multiaddr 0.18 accepts `/webtransport`, and iteration must not panic after parse. + #[test] + fn webtransport_multiaddr_parses_and_iterates() { + let s = "/ip4/127.0.0.1/udp/443/quic-v1/webtransport"; + let address = Multiaddr::from_str(s).expect("valid multiaddr 0.18 address"); + assert_eq!(address.to_string(), s); + + let protocols: Vec<_> = address.iter().collect(); + assert_eq!( + protocols, + vec![ + Protocol::Ip4(Ipv4Addr::new(127, 0, 0, 1)), + Protocol::Udp(443), + Protocol::QuicV1, + Protocol::WebTransport, + ] + ); + assert_eq!(address.iter().count(), 4); + } +} diff --git a/client/network-types/src/multiaddr/protocol.rs b/client/network-types/src/multiaddr/protocol.rs index 0e5a6911..ee659131 100644 --- a/client/network-types/src/multiaddr/protocol.rs +++ b/client/network-types/src/multiaddr/protocol.rs @@ -24,6 +24,8 @@ use std::{ net::{IpAddr, Ipv4Addr, Ipv6Addr}, }; +const LOG_TARGET: &str = "sub-libp2p"; + /// [`Protocol`] describes all possible multiaddress protocols. #[derive(PartialEq, Eq, Clone, Debug)] pub enum Protocol<'a> { @@ -39,6 +41,7 @@ pub enum Protocol<'a> { P2pWebRtcDirect, P2pWebRtcStar, WebRTC, + WebRTCDirect, Certhash(Multihash), P2pWebSocketStar, /// Contains the "port" to contact. Similar to TCP or UDP, 0 means "assign me a port". @@ -57,8 +60,15 @@ pub enum Protocol<'a> { Udt, Unix(Cow<'a, str>), Utp, + WebTransport, Ws(Cow<'a, str>), Wss(Cow<'a, str>), + Ip6zone(Cow<'a, str>), + Ipcidr(u8), + Garlic64(Cow<'a, [u8]>), + Garlic32(Cow<'a, [u8]>), + Sni(Cow<'a, str>), + P2pStardust, } impl Display for Protocol<'_> { @@ -92,45 +102,72 @@ impl From for Protocol<'_> { } } +/// Fallible conversion from the litep2p/multiaddr protocol enum. +/// +/// Used at parsing boundaries so addresses containing protocols we do not model are rejected +/// instead of being stored and later panicking on iteration. `multiaddr::Protocol` is +/// `#[non_exhaustive]`, so unknown future variants surface here as `Err`. +pub(super) fn try_from_litep2p_protocol<'a>( + protocol: LiteP2pProtocol<'a>, +) -> Result, &'static str> { + Ok(match protocol { + LiteP2pProtocol::Dccp(port) => Protocol::Dccp(port), + LiteP2pProtocol::Dns(str) => Protocol::Dns(str), + LiteP2pProtocol::Dns4(str) => Protocol::Dns4(str), + LiteP2pProtocol::Dns6(str) => Protocol::Dns6(str), + LiteP2pProtocol::Dnsaddr(str) => Protocol::Dnsaddr(str), + LiteP2pProtocol::Http => Protocol::Http, + LiteP2pProtocol::Https => Protocol::Https, + LiteP2pProtocol::Ip4(ipv4_addr) => Protocol::Ip4(ipv4_addr), + LiteP2pProtocol::Ip6(ipv6_addr) => Protocol::Ip6(ipv6_addr), + LiteP2pProtocol::P2pWebRtcDirect => Protocol::P2pWebRtcDirect, + LiteP2pProtocol::P2pWebRtcStar => Protocol::P2pWebRtcStar, + LiteP2pProtocol::WebRTC => Protocol::WebRTC, + LiteP2pProtocol::WebRTCDirect => Protocol::WebRTCDirect, + LiteP2pProtocol::Certhash(multihash) => Protocol::Certhash(multihash.into()), + LiteP2pProtocol::P2pWebSocketStar => Protocol::P2pWebSocketStar, + LiteP2pProtocol::Memory(port) => Protocol::Memory(port), + LiteP2pProtocol::Onion(str, port) => Protocol::Onion(str, port), + LiteP2pProtocol::Onion3(addr) => Protocol::Onion3(Cow::Owned(*addr.hash()), addr.port()), + LiteP2pProtocol::P2p(peer_id) => Protocol::P2p( + Multihash::from_bytes(&peer_id.to_bytes()).expect("valid peer id multihash"), + ), + LiteP2pProtocol::P2pCircuit => Protocol::P2pCircuit, + LiteP2pProtocol::Quic => Protocol::Quic, + LiteP2pProtocol::QuicV1 => Protocol::QuicV1, + LiteP2pProtocol::Sctp(port) => Protocol::Sctp(port), + LiteP2pProtocol::Tcp(port) => Protocol::Tcp(port), + LiteP2pProtocol::Tls => Protocol::Tls, + LiteP2pProtocol::Noise => Protocol::Noise, + LiteP2pProtocol::Udp(port) => Protocol::Udp(port), + LiteP2pProtocol::Udt => Protocol::Udt, + LiteP2pProtocol::Unix(str) => Protocol::Unix(str), + LiteP2pProtocol::Utp => Protocol::Utp, + LiteP2pProtocol::WebTransport => Protocol::WebTransport, + LiteP2pProtocol::Ws(str) => Protocol::Ws(str), + LiteP2pProtocol::Wss(str) => Protocol::Wss(str), + LiteP2pProtocol::Ip6zone(str) => Protocol::Ip6zone(str), + LiteP2pProtocol::Ipcidr(mask) => Protocol::Ipcidr(mask), + LiteP2pProtocol::Garlic64(addr) => Protocol::Garlic64(addr), + LiteP2pProtocol::Garlic32(addr) => Protocol::Garlic32(addr), + LiteP2pProtocol::Sni(str) => Protocol::Sni(str), + LiteP2pProtocol::P2pStardust => Protocol::P2pStardust, + other => return Err(other.tag()), + }) +} + impl<'a> From> for Protocol<'a> { fn from(protocol: LiteP2pProtocol<'a>) -> Self { - match protocol { - LiteP2pProtocol::Dccp(port) => Protocol::Dccp(port), - LiteP2pProtocol::Dns(str) => Protocol::Dns(str), - LiteP2pProtocol::Dns4(str) => Protocol::Dns4(str), - LiteP2pProtocol::Dns6(str) => Protocol::Dns6(str), - LiteP2pProtocol::Dnsaddr(str) => Protocol::Dnsaddr(str), - LiteP2pProtocol::Http => Protocol::Http, - LiteP2pProtocol::Https => Protocol::Https, - LiteP2pProtocol::Ip4(ipv4_addr) => Protocol::Ip4(ipv4_addr), - LiteP2pProtocol::Ip6(ipv6_addr) => Protocol::Ip6(ipv6_addr), - LiteP2pProtocol::P2pWebRtcDirect => Protocol::P2pWebRtcDirect, - LiteP2pProtocol::P2pWebRtcStar => Protocol::P2pWebRtcStar, - LiteP2pProtocol::WebRTC => Protocol::WebRTC, - LiteP2pProtocol::Certhash(multihash) => Protocol::Certhash(multihash.into()), - LiteP2pProtocol::P2pWebSocketStar => Protocol::P2pWebSocketStar, - LiteP2pProtocol::Memory(port) => Protocol::Memory(port), - LiteP2pProtocol::Onion(str, port) => Protocol::Onion(str, port), - LiteP2pProtocol::Onion3(addr) => - Protocol::Onion3(Cow::Owned(*addr.hash()), addr.port()), - LiteP2pProtocol::P2p(peer_id) => Protocol::P2p( - Multihash::from_bytes(&peer_id.to_bytes()).expect("valid peer id multihash"), - ), - LiteP2pProtocol::P2pCircuit => Protocol::P2pCircuit, - LiteP2pProtocol::Quic => Protocol::Quic, - LiteP2pProtocol::QuicV1 => Protocol::QuicV1, - LiteP2pProtocol::Sctp(port) => Protocol::Sctp(port), - LiteP2pProtocol::Tcp(port) => Protocol::Tcp(port), - LiteP2pProtocol::Tls => Protocol::Tls, - LiteP2pProtocol::Noise => Protocol::Noise, - LiteP2pProtocol::Udp(port) => Protocol::Udp(port), - LiteP2pProtocol::Udt => Protocol::Udt, - LiteP2pProtocol::Unix(str) => Protocol::Unix(str), - LiteP2pProtocol::Utp => Protocol::Utp, - LiteP2pProtocol::Ws(str) => Protocol::Ws(str), - LiteP2pProtocol::Wss(str) => Protocol::Wss(str), - _ => panic!("unsupported multiaddr protocol variant"), - } + try_from_litep2p_protocol(protocol).unwrap_or_else(|tag| { + // Never panic while iterating addresses that bypassed the fallible parse path + // (e.g. wrapped litep2p multiaddrs). Lossy, but safe. + log::error!( + target: LOG_TARGET, + "Got unsupported multiaddr protocol '{}'", + tag, + ); + Protocol::Dccp(0) + }) } } @@ -149,6 +186,7 @@ impl<'a> From> for LiteP2pProtocol<'a> { Protocol::P2pWebRtcDirect => LiteP2pProtocol::P2pWebRtcDirect, Protocol::P2pWebRtcStar => LiteP2pProtocol::P2pWebRtcStar, Protocol::WebRTC => LiteP2pProtocol::WebRTC, + Protocol::WebRTCDirect => LiteP2pProtocol::WebRTCDirect, Protocol::Certhash(multihash) => LiteP2pProtocol::Certhash(multihash.into()), Protocol::P2pWebSocketStar => LiteP2pProtocol::P2pWebSocketStar, Protocol::Memory(port) => LiteP2pProtocol::Memory(port), @@ -172,8 +210,15 @@ impl<'a> From> for LiteP2pProtocol<'a> { Protocol::Udt => LiteP2pProtocol::Udt, Protocol::Unix(str) => LiteP2pProtocol::Unix(str), Protocol::Utp => LiteP2pProtocol::Utp, + Protocol::WebTransport => LiteP2pProtocol::WebTransport, Protocol::Ws(str) => LiteP2pProtocol::Ws(str), Protocol::Wss(str) => LiteP2pProtocol::Wss(str), + Protocol::Ip6zone(str) => LiteP2pProtocol::Ip6zone(str), + Protocol::Ipcidr(mask) => LiteP2pProtocol::Ipcidr(mask), + Protocol::Garlic64(addr) => LiteP2pProtocol::Garlic64(addr), + Protocol::Garlic32(addr) => LiteP2pProtocol::Garlic32(addr), + Protocol::Sni(str) => LiteP2pProtocol::Sni(str), + Protocol::P2pStardust => LiteP2pProtocol::P2pStardust, } } } From 5358dcbca6e8d719da2fa3e63a27206663be2464 Mon Sep 17 00:00:00 2001 From: illuzen Date: Mon, 3 Aug 2026 20:51:29 +0800 Subject: [PATCH 10/15] test: restore WAT coverage for vendored wasmtime executor Bring back focused sc-executor-wasmtime tests covering instantiation strategies, stack limits, NaN canonicalization, memory growth, and precompiled artifacts without depending on unpublished sc-runtime-test. Co-authored-by: Cursor --- client/executor-wasmtime/README.md | 5 +- client/executor-wasmtime/src/lib.rs | 5 +- .../src/test-guard-page-skip.wat | 2293 +++++++++++++++++ client/executor-wasmtime/src/tests.rs | 557 ++++ 4 files changed, 2856 insertions(+), 4 deletions(-) create mode 100644 client/executor-wasmtime/src/test-guard-page-skip.wat create mode 100644 client/executor-wasmtime/src/tests.rs diff --git a/client/executor-wasmtime/README.md b/client/executor-wasmtime/README.md index fd652d59..35215904 100644 --- a/client/executor-wasmtime/README.md +++ b/client/executor-wasmtime/README.md @@ -6,7 +6,8 @@ a full Substrate client bump. Upstream bump reference: [paritytech/polkadot-sdk#11793](https://github.com/paritytech/polkadot-sdk/pull/11793). -Upstream unit tests that require `sc-runtime-test` are omitted; the node -exercises this crate through `sc-executor`. +WAT-focused unit tests are kept (stack limits, NaN canonicalization, memory +growth, precompiled artifacts, instantiation strategies). Cases that needed +the unpublished `sc-runtime-test` blob were rewritten as pure WAT fixtures. License: GPL-3.0-or-later WITH Classpath-exception-2.0 diff --git a/client/executor-wasmtime/src/lib.rs b/client/executor-wasmtime/src/lib.rs index 02bde5e8..34488807 100644 --- a/client/executor-wasmtime/src/lib.rs +++ b/client/executor-wasmtime/src/lib.rs @@ -34,8 +34,9 @@ mod instance_wrapper; mod runtime; mod util; -// Quantus: upstream unit tests require unpublished sc-runtime-test; omit here. -// The node exercises this crate through sc-executor. +// Quantus: WAT-focused unit tests (no unpublished sc-runtime-test blob). +#[cfg(test)] +mod tests; pub use runtime::{ create_runtime, create_runtime_from_artifact, create_runtime_from_artifact_bytes, diff --git a/client/executor-wasmtime/src/test-guard-page-skip.wat b/client/executor-wasmtime/src/test-guard-page-skip.wat new file mode 100644 index 00000000..2f7339d4 --- /dev/null +++ b/client/executor-wasmtime/src/test-guard-page-skip.wat @@ -0,0 +1,2293 @@ +;; This file is a modified version of +;; https://github.com/WebAssembly/testsuite/blob/01efde81028c5b0d099eb836645a2dc5e7755449/skip-stack-guard-page.wast +;; Licensed Apache 2.0 https://github.com/WebAssembly/testsuite/blob/01efde81028c5b0d099eb836645a2dc5e7755449/LICENSE + +;; This wasm module implements a Substrate Runtime with one entrypoint: `test-many-locals`. This +;; entrypoint does not take any parameters nor returns a result. Each execution should end up with +;; a stack overflow trap. +;; +;; What it does is essentially a recursive call. The function that recurses into itself declares +;; lots of local variables. It reads into each local at the corresponding offset, recurses into itself +;; and then writes the contents of the locals back into the memory at the same offset. +;; +;; The original purpose of this file in the test suite is to test skipping the guard page (hence the +;; size 256 + 4096 + 4096). However, what's important here is to just an infinite recursion with +;; many locals. +;; +;; NOTE That memory accesses are put there in an attempt to prevent eliminating the dead locals. +;; At the moment of writing, wasmtime should be dumb enough to be tricked into thinking that the code +;; does something. + +(module + (import "env" "memory" (memory 1)) + (export "test-many-locals" (func $test-many-locals)) + + ;; The heap base is chosen so that the heap doesn't overlap with the data below. + (global (export "__heap_base") i32 (i32.const 8448)) + + (func $test-many-locals + (param i32 i32) (result i64) + (call $function-with-many-locals) + (i64.const 0) + ) + + (func $function-with-many-locals + + ;; 1056 i64 = 8448 bytes of locals + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x000-0x007 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x008-0x00f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x010-0x017 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x018-0x01f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x020-0x027 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x028-0x02f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x030-0x037 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x038-0x03f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x040-0x047 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x048-0x04f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x050-0x057 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x058-0x05f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x060-0x067 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x068-0x06f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x070-0x077 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x078-0x07f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x080-0x087 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x088-0x08f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x090-0x097 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x098-0x09f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0a0-0x0a7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0a8-0x0af + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0b0-0x0b7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0b8-0x0bf + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0c0-0x0c7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0c8-0x0cf + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0d0-0x0d7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0d8-0x0df + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0e0-0x0e7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0e8-0x0ef + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0f0-0x0f7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x0f8-0x0ff + + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x100-0x107 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x108-0x10f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x110-0x117 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x118-0x11f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x120-0x127 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x128-0x12f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x130-0x137 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x138-0x13f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x140-0x147 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x148-0x14f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x150-0x157 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x158-0x15f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x160-0x167 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x168-0x16f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x170-0x177 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x178-0x17f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x180-0x187 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x188-0x18f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x190-0x197 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x198-0x19f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1a0-0x1a7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1a8-0x1af + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1b0-0x1b7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1b8-0x1bf + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1c0-0x1c7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1c8-0x1cf + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1d0-0x1d7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1d8-0x1df + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1e0-0x1e7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1e8-0x1ef + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1f0-0x1f7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x1f8-0x1ff + + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x200-0x207 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x208-0x20f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x210-0x217 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x218-0x21f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x220-0x227 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x228-0x22f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x230-0x237 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x238-0x23f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x240-0x247 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x248-0x24f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x250-0x257 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x258-0x25f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x260-0x267 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x268-0x26f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x270-0x277 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x278-0x27f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x280-0x287 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x288-0x28f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x290-0x297 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x298-0x29f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2a0-0x2a7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2a8-0x2af + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2b0-0x2b7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2b8-0x2bf + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2c0-0x2c7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2c8-0x2cf + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2d0-0x2d7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2d8-0x2df + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2e0-0x2e7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2e8-0x2ef + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2f0-0x2f7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x2f8-0x2ff + + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x300-0x307 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x308-0x30f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x310-0x317 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x318-0x31f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x320-0x327 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x328-0x32f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x330-0x337 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x338-0x33f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x340-0x347 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x348-0x34f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x350-0x357 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x358-0x35f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x360-0x367 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x368-0x36f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x370-0x377 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x378-0x37f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x380-0x387 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x388-0x38f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x390-0x397 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x398-0x39f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3a0-0x3a7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3a8-0x3af + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3b0-0x3b7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3b8-0x3bf + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3c0-0x3c7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3c8-0x3cf + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3d0-0x3d7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3d8-0x3df + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3e0-0x3e7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3e8-0x3ef + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3f0-0x3f7 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x3f8-0x3ff + + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x400-0x407 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x408-0x40f + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x410-0x417 + (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) (local i64) ;; 0x418-0x41f + + ;; recurse first to try to make the callee access the stack below the space allocated for the locals before the locals themselves have been initialized. + (call $function-with-many-locals) + + ;; load from memory into the locals. + (local.set 0x000 (i64.load offset=0x000 align=1 (i32.const 0))) + (local.set 0x001 (i64.load offset=0x001 align=1 (i32.const 0))) + (local.set 0x002 (i64.load offset=0x002 align=1 (i32.const 0))) + (local.set 0x003 (i64.load offset=0x003 align=1 (i32.const 0))) + (local.set 0x004 (i64.load offset=0x004 align=1 (i32.const 0))) + (local.set 0x005 (i64.load offset=0x005 align=1 (i32.const 0))) + (local.set 0x006 (i64.load offset=0x006 align=1 (i32.const 0))) + (local.set 0x007 (i64.load offset=0x007 align=1 (i32.const 0))) + (local.set 0x008 (i64.load offset=0x008 align=1 (i32.const 0))) + (local.set 0x009 (i64.load offset=0x009 align=1 (i32.const 0))) + (local.set 0x00a (i64.load offset=0x00a align=1 (i32.const 0))) + (local.set 0x00b (i64.load offset=0x00b align=1 (i32.const 0))) + (local.set 0x00c (i64.load offset=0x00c align=1 (i32.const 0))) + (local.set 0x00d (i64.load offset=0x00d align=1 (i32.const 0))) + (local.set 0x00e (i64.load offset=0x00e align=1 (i32.const 0))) + (local.set 0x00f (i64.load offset=0x00f align=1 (i32.const 0))) + (local.set 0x010 (i64.load offset=0x010 align=1 (i32.const 0))) + (local.set 0x011 (i64.load offset=0x011 align=1 (i32.const 0))) + (local.set 0x012 (i64.load offset=0x012 align=1 (i32.const 0))) + (local.set 0x013 (i64.load offset=0x013 align=1 (i32.const 0))) + (local.set 0x014 (i64.load offset=0x014 align=1 (i32.const 0))) + (local.set 0x015 (i64.load offset=0x015 align=1 (i32.const 0))) + (local.set 0x016 (i64.load offset=0x016 align=1 (i32.const 0))) + (local.set 0x017 (i64.load offset=0x017 align=1 (i32.const 0))) + (local.set 0x018 (i64.load offset=0x018 align=1 (i32.const 0))) + (local.set 0x019 (i64.load offset=0x019 align=1 (i32.const 0))) + (local.set 0x01a (i64.load offset=0x01a align=1 (i32.const 0))) + (local.set 0x01b (i64.load offset=0x01b align=1 (i32.const 0))) + (local.set 0x01c (i64.load offset=0x01c align=1 (i32.const 0))) + (local.set 0x01d (i64.load offset=0x01d align=1 (i32.const 0))) + (local.set 0x01e (i64.load offset=0x01e align=1 (i32.const 0))) + (local.set 0x01f (i64.load offset=0x01f align=1 (i32.const 0))) + (local.set 0x020 (i64.load offset=0x020 align=1 (i32.const 0))) + (local.set 0x021 (i64.load offset=0x021 align=1 (i32.const 0))) + (local.set 0x022 (i64.load offset=0x022 align=1 (i32.const 0))) + (local.set 0x023 (i64.load offset=0x023 align=1 (i32.const 0))) + (local.set 0x024 (i64.load offset=0x024 align=1 (i32.const 0))) + (local.set 0x025 (i64.load offset=0x025 align=1 (i32.const 0))) + (local.set 0x026 (i64.load offset=0x026 align=1 (i32.const 0))) + (local.set 0x027 (i64.load offset=0x027 align=1 (i32.const 0))) + (local.set 0x028 (i64.load offset=0x028 align=1 (i32.const 0))) + (local.set 0x029 (i64.load offset=0x029 align=1 (i32.const 0))) + (local.set 0x02a (i64.load offset=0x02a align=1 (i32.const 0))) + (local.set 0x02b (i64.load offset=0x02b align=1 (i32.const 0))) + (local.set 0x02c (i64.load offset=0x02c align=1 (i32.const 0))) + (local.set 0x02d (i64.load offset=0x02d align=1 (i32.const 0))) + (local.set 0x02e (i64.load offset=0x02e align=1 (i32.const 0))) + (local.set 0x02f (i64.load offset=0x02f align=1 (i32.const 0))) + (local.set 0x030 (i64.load offset=0x030 align=1 (i32.const 0))) + (local.set 0x031 (i64.load offset=0x031 align=1 (i32.const 0))) + (local.set 0x032 (i64.load offset=0x032 align=1 (i32.const 0))) + (local.set 0x033 (i64.load offset=0x033 align=1 (i32.const 0))) + (local.set 0x034 (i64.load offset=0x034 align=1 (i32.const 0))) + (local.set 0x035 (i64.load offset=0x035 align=1 (i32.const 0))) + (local.set 0x036 (i64.load offset=0x036 align=1 (i32.const 0))) + (local.set 0x037 (i64.load offset=0x037 align=1 (i32.const 0))) + (local.set 0x038 (i64.load offset=0x038 align=1 (i32.const 0))) + (local.set 0x039 (i64.load offset=0x039 align=1 (i32.const 0))) + (local.set 0x03a (i64.load offset=0x03a align=1 (i32.const 0))) + (local.set 0x03b (i64.load offset=0x03b align=1 (i32.const 0))) + (local.set 0x03c (i64.load offset=0x03c align=1 (i32.const 0))) + (local.set 0x03d (i64.load offset=0x03d align=1 (i32.const 0))) + (local.set 0x03e (i64.load offset=0x03e align=1 (i32.const 0))) + (local.set 0x03f (i64.load offset=0x03f align=1 (i32.const 0))) + (local.set 0x040 (i64.load offset=0x040 align=1 (i32.const 0))) + (local.set 0x041 (i64.load offset=0x041 align=1 (i32.const 0))) + (local.set 0x042 (i64.load offset=0x042 align=1 (i32.const 0))) + (local.set 0x043 (i64.load offset=0x043 align=1 (i32.const 0))) + (local.set 0x044 (i64.load offset=0x044 align=1 (i32.const 0))) + (local.set 0x045 (i64.load offset=0x045 align=1 (i32.const 0))) + (local.set 0x046 (i64.load offset=0x046 align=1 (i32.const 0))) + (local.set 0x047 (i64.load offset=0x047 align=1 (i32.const 0))) + (local.set 0x048 (i64.load offset=0x048 align=1 (i32.const 0))) + (local.set 0x049 (i64.load offset=0x049 align=1 (i32.const 0))) + (local.set 0x04a (i64.load offset=0x04a align=1 (i32.const 0))) + (local.set 0x04b (i64.load offset=0x04b align=1 (i32.const 0))) + (local.set 0x04c (i64.load offset=0x04c align=1 (i32.const 0))) + (local.set 0x04d (i64.load offset=0x04d align=1 (i32.const 0))) + (local.set 0x04e (i64.load offset=0x04e align=1 (i32.const 0))) + (local.set 0x04f (i64.load offset=0x04f align=1 (i32.const 0))) + (local.set 0x050 (i64.load offset=0x050 align=1 (i32.const 0))) + (local.set 0x051 (i64.load offset=0x051 align=1 (i32.const 0))) + (local.set 0x052 (i64.load offset=0x052 align=1 (i32.const 0))) + (local.set 0x053 (i64.load offset=0x053 align=1 (i32.const 0))) + (local.set 0x054 (i64.load offset=0x054 align=1 (i32.const 0))) + (local.set 0x055 (i64.load offset=0x055 align=1 (i32.const 0))) + (local.set 0x056 (i64.load offset=0x056 align=1 (i32.const 0))) + (local.set 0x057 (i64.load offset=0x057 align=1 (i32.const 0))) + (local.set 0x058 (i64.load offset=0x058 align=1 (i32.const 0))) + (local.set 0x059 (i64.load offset=0x059 align=1 (i32.const 0))) + (local.set 0x05a (i64.load offset=0x05a align=1 (i32.const 0))) + (local.set 0x05b (i64.load offset=0x05b align=1 (i32.const 0))) + (local.set 0x05c (i64.load offset=0x05c align=1 (i32.const 0))) + (local.set 0x05d (i64.load offset=0x05d align=1 (i32.const 0))) + (local.set 0x05e (i64.load offset=0x05e align=1 (i32.const 0))) + (local.set 0x05f (i64.load offset=0x05f align=1 (i32.const 0))) + (local.set 0x060 (i64.load offset=0x060 align=1 (i32.const 0))) + (local.set 0x061 (i64.load offset=0x061 align=1 (i32.const 0))) + (local.set 0x062 (i64.load offset=0x062 align=1 (i32.const 0))) + (local.set 0x063 (i64.load offset=0x063 align=1 (i32.const 0))) + (local.set 0x064 (i64.load offset=0x064 align=1 (i32.const 0))) + (local.set 0x065 (i64.load offset=0x065 align=1 (i32.const 0))) + (local.set 0x066 (i64.load offset=0x066 align=1 (i32.const 0))) + (local.set 0x067 (i64.load offset=0x067 align=1 (i32.const 0))) + (local.set 0x068 (i64.load offset=0x068 align=1 (i32.const 0))) + (local.set 0x069 (i64.load offset=0x069 align=1 (i32.const 0))) + (local.set 0x06a (i64.load offset=0x06a align=1 (i32.const 0))) + (local.set 0x06b (i64.load offset=0x06b align=1 (i32.const 0))) + (local.set 0x06c (i64.load offset=0x06c align=1 (i32.const 0))) + (local.set 0x06d (i64.load offset=0x06d align=1 (i32.const 0))) + (local.set 0x06e (i64.load offset=0x06e align=1 (i32.const 0))) + (local.set 0x06f (i64.load offset=0x06f align=1 (i32.const 0))) + (local.set 0x070 (i64.load offset=0x070 align=1 (i32.const 0))) + (local.set 0x071 (i64.load offset=0x071 align=1 (i32.const 0))) + (local.set 0x072 (i64.load offset=0x072 align=1 (i32.const 0))) + (local.set 0x073 (i64.load offset=0x073 align=1 (i32.const 0))) + (local.set 0x074 (i64.load offset=0x074 align=1 (i32.const 0))) + (local.set 0x075 (i64.load offset=0x075 align=1 (i32.const 0))) + (local.set 0x076 (i64.load offset=0x076 align=1 (i32.const 0))) + (local.set 0x077 (i64.load offset=0x077 align=1 (i32.const 0))) + (local.set 0x078 (i64.load offset=0x078 align=1 (i32.const 0))) + (local.set 0x079 (i64.load offset=0x079 align=1 (i32.const 0))) + (local.set 0x07a (i64.load offset=0x07a align=1 (i32.const 0))) + (local.set 0x07b (i64.load offset=0x07b align=1 (i32.const 0))) + (local.set 0x07c (i64.load offset=0x07c align=1 (i32.const 0))) + (local.set 0x07d (i64.load offset=0x07d align=1 (i32.const 0))) + (local.set 0x07e (i64.load offset=0x07e align=1 (i32.const 0))) + (local.set 0x07f (i64.load offset=0x07f align=1 (i32.const 0))) + (local.set 0x080 (i64.load offset=0x080 align=1 (i32.const 0))) + (local.set 0x081 (i64.load offset=0x081 align=1 (i32.const 0))) + (local.set 0x082 (i64.load offset=0x082 align=1 (i32.const 0))) + (local.set 0x083 (i64.load offset=0x083 align=1 (i32.const 0))) + (local.set 0x084 (i64.load offset=0x084 align=1 (i32.const 0))) + (local.set 0x085 (i64.load offset=0x085 align=1 (i32.const 0))) + (local.set 0x086 (i64.load offset=0x086 align=1 (i32.const 0))) + (local.set 0x087 (i64.load offset=0x087 align=1 (i32.const 0))) + (local.set 0x088 (i64.load offset=0x088 align=1 (i32.const 0))) + (local.set 0x089 (i64.load offset=0x089 align=1 (i32.const 0))) + (local.set 0x08a (i64.load offset=0x08a align=1 (i32.const 0))) + (local.set 0x08b (i64.load offset=0x08b align=1 (i32.const 0))) + (local.set 0x08c (i64.load offset=0x08c align=1 (i32.const 0))) + (local.set 0x08d (i64.load offset=0x08d align=1 (i32.const 0))) + (local.set 0x08e (i64.load offset=0x08e align=1 (i32.const 0))) + (local.set 0x08f (i64.load offset=0x08f align=1 (i32.const 0))) + (local.set 0x090 (i64.load offset=0x090 align=1 (i32.const 0))) + (local.set 0x091 (i64.load offset=0x091 align=1 (i32.const 0))) + (local.set 0x092 (i64.load offset=0x092 align=1 (i32.const 0))) + (local.set 0x093 (i64.load offset=0x093 align=1 (i32.const 0))) + (local.set 0x094 (i64.load offset=0x094 align=1 (i32.const 0))) + (local.set 0x095 (i64.load offset=0x095 align=1 (i32.const 0))) + (local.set 0x096 (i64.load offset=0x096 align=1 (i32.const 0))) + (local.set 0x097 (i64.load offset=0x097 align=1 (i32.const 0))) + (local.set 0x098 (i64.load offset=0x098 align=1 (i32.const 0))) + (local.set 0x099 (i64.load offset=0x099 align=1 (i32.const 0))) + (local.set 0x09a (i64.load offset=0x09a align=1 (i32.const 0))) + (local.set 0x09b (i64.load offset=0x09b align=1 (i32.const 0))) + (local.set 0x09c (i64.load offset=0x09c align=1 (i32.const 0))) + (local.set 0x09d (i64.load offset=0x09d align=1 (i32.const 0))) + (local.set 0x09e (i64.load offset=0x09e align=1 (i32.const 0))) + (local.set 0x09f (i64.load offset=0x09f align=1 (i32.const 0))) + (local.set 0x0a0 (i64.load offset=0x0a0 align=1 (i32.const 0))) + (local.set 0x0a1 (i64.load offset=0x0a1 align=1 (i32.const 0))) + (local.set 0x0a2 (i64.load offset=0x0a2 align=1 (i32.const 0))) + (local.set 0x0a3 (i64.load offset=0x0a3 align=1 (i32.const 0))) + (local.set 0x0a4 (i64.load offset=0x0a4 align=1 (i32.const 0))) + (local.set 0x0a5 (i64.load offset=0x0a5 align=1 (i32.const 0))) + (local.set 0x0a6 (i64.load offset=0x0a6 align=1 (i32.const 0))) + (local.set 0x0a7 (i64.load offset=0x0a7 align=1 (i32.const 0))) + (local.set 0x0a8 (i64.load offset=0x0a8 align=1 (i32.const 0))) + (local.set 0x0a9 (i64.load offset=0x0a9 align=1 (i32.const 0))) + (local.set 0x0aa (i64.load offset=0x0aa align=1 (i32.const 0))) + (local.set 0x0ab (i64.load offset=0x0ab align=1 (i32.const 0))) + (local.set 0x0ac (i64.load offset=0x0ac align=1 (i32.const 0))) + (local.set 0x0ad (i64.load offset=0x0ad align=1 (i32.const 0))) + (local.set 0x0ae (i64.load offset=0x0ae align=1 (i32.const 0))) + (local.set 0x0af (i64.load offset=0x0af align=1 (i32.const 0))) + (local.set 0x0b0 (i64.load offset=0x0b0 align=1 (i32.const 0))) + (local.set 0x0b1 (i64.load offset=0x0b1 align=1 (i32.const 0))) + (local.set 0x0b2 (i64.load offset=0x0b2 align=1 (i32.const 0))) + (local.set 0x0b3 (i64.load offset=0x0b3 align=1 (i32.const 0))) + (local.set 0x0b4 (i64.load offset=0x0b4 align=1 (i32.const 0))) + (local.set 0x0b5 (i64.load offset=0x0b5 align=1 (i32.const 0))) + (local.set 0x0b6 (i64.load offset=0x0b6 align=1 (i32.const 0))) + (local.set 0x0b7 (i64.load offset=0x0b7 align=1 (i32.const 0))) + (local.set 0x0b8 (i64.load offset=0x0b8 align=1 (i32.const 0))) + (local.set 0x0b9 (i64.load offset=0x0b9 align=1 (i32.const 0))) + (local.set 0x0ba (i64.load offset=0x0ba align=1 (i32.const 0))) + (local.set 0x0bb (i64.load offset=0x0bb align=1 (i32.const 0))) + (local.set 0x0bc (i64.load offset=0x0bc align=1 (i32.const 0))) + (local.set 0x0bd (i64.load offset=0x0bd align=1 (i32.const 0))) + (local.set 0x0be (i64.load offset=0x0be align=1 (i32.const 0))) + (local.set 0x0bf (i64.load offset=0x0bf align=1 (i32.const 0))) + (local.set 0x0c0 (i64.load offset=0x0c0 align=1 (i32.const 0))) + (local.set 0x0c1 (i64.load offset=0x0c1 align=1 (i32.const 0))) + (local.set 0x0c2 (i64.load offset=0x0c2 align=1 (i32.const 0))) + (local.set 0x0c3 (i64.load offset=0x0c3 align=1 (i32.const 0))) + (local.set 0x0c4 (i64.load offset=0x0c4 align=1 (i32.const 0))) + (local.set 0x0c5 (i64.load offset=0x0c5 align=1 (i32.const 0))) + (local.set 0x0c6 (i64.load offset=0x0c6 align=1 (i32.const 0))) + (local.set 0x0c7 (i64.load offset=0x0c7 align=1 (i32.const 0))) + (local.set 0x0c8 (i64.load offset=0x0c8 align=1 (i32.const 0))) + (local.set 0x0c9 (i64.load offset=0x0c9 align=1 (i32.const 0))) + (local.set 0x0ca (i64.load offset=0x0ca align=1 (i32.const 0))) + (local.set 0x0cb (i64.load offset=0x0cb align=1 (i32.const 0))) + (local.set 0x0cc (i64.load offset=0x0cc align=1 (i32.const 0))) + (local.set 0x0cd (i64.load offset=0x0cd align=1 (i32.const 0))) + (local.set 0x0ce (i64.load offset=0x0ce align=1 (i32.const 0))) + (local.set 0x0cf (i64.load offset=0x0cf align=1 (i32.const 0))) + (local.set 0x0d0 (i64.load offset=0x0d0 align=1 (i32.const 0))) + (local.set 0x0d1 (i64.load offset=0x0d1 align=1 (i32.const 0))) + (local.set 0x0d2 (i64.load offset=0x0d2 align=1 (i32.const 0))) + (local.set 0x0d3 (i64.load offset=0x0d3 align=1 (i32.const 0))) + (local.set 0x0d4 (i64.load offset=0x0d4 align=1 (i32.const 0))) + (local.set 0x0d5 (i64.load offset=0x0d5 align=1 (i32.const 0))) + (local.set 0x0d6 (i64.load offset=0x0d6 align=1 (i32.const 0))) + (local.set 0x0d7 (i64.load offset=0x0d7 align=1 (i32.const 0))) + (local.set 0x0d8 (i64.load offset=0x0d8 align=1 (i32.const 0))) + (local.set 0x0d9 (i64.load offset=0x0d9 align=1 (i32.const 0))) + (local.set 0x0da (i64.load offset=0x0da align=1 (i32.const 0))) + (local.set 0x0db (i64.load offset=0x0db align=1 (i32.const 0))) + (local.set 0x0dc (i64.load offset=0x0dc align=1 (i32.const 0))) + (local.set 0x0dd (i64.load offset=0x0dd align=1 (i32.const 0))) + (local.set 0x0de (i64.load offset=0x0de align=1 (i32.const 0))) + (local.set 0x0df (i64.load offset=0x0df align=1 (i32.const 0))) + (local.set 0x0e0 (i64.load offset=0x0e0 align=1 (i32.const 0))) + (local.set 0x0e1 (i64.load offset=0x0e1 align=1 (i32.const 0))) + (local.set 0x0e2 (i64.load offset=0x0e2 align=1 (i32.const 0))) + (local.set 0x0e3 (i64.load offset=0x0e3 align=1 (i32.const 0))) + (local.set 0x0e4 (i64.load offset=0x0e4 align=1 (i32.const 0))) + (local.set 0x0e5 (i64.load offset=0x0e5 align=1 (i32.const 0))) + (local.set 0x0e6 (i64.load offset=0x0e6 align=1 (i32.const 0))) + (local.set 0x0e7 (i64.load offset=0x0e7 align=1 (i32.const 0))) + (local.set 0x0e8 (i64.load offset=0x0e8 align=1 (i32.const 0))) + (local.set 0x0e9 (i64.load offset=0x0e9 align=1 (i32.const 0))) + (local.set 0x0ea (i64.load offset=0x0ea align=1 (i32.const 0))) + (local.set 0x0eb (i64.load offset=0x0eb align=1 (i32.const 0))) + (local.set 0x0ec (i64.load offset=0x0ec align=1 (i32.const 0))) + (local.set 0x0ed (i64.load offset=0x0ed align=1 (i32.const 0))) + (local.set 0x0ee (i64.load offset=0x0ee align=1 (i32.const 0))) + (local.set 0x0ef (i64.load offset=0x0ef align=1 (i32.const 0))) + (local.set 0x0f0 (i64.load offset=0x0f0 align=1 (i32.const 0))) + (local.set 0x0f1 (i64.load offset=0x0f1 align=1 (i32.const 0))) + (local.set 0x0f2 (i64.load offset=0x0f2 align=1 (i32.const 0))) + (local.set 0x0f3 (i64.load offset=0x0f3 align=1 (i32.const 0))) + (local.set 0x0f4 (i64.load offset=0x0f4 align=1 (i32.const 0))) + (local.set 0x0f5 (i64.load offset=0x0f5 align=1 (i32.const 0))) + (local.set 0x0f6 (i64.load offset=0x0f6 align=1 (i32.const 0))) + (local.set 0x0f7 (i64.load offset=0x0f7 align=1 (i32.const 0))) + (local.set 0x0f8 (i64.load offset=0x0f8 align=1 (i32.const 0))) + (local.set 0x0f9 (i64.load offset=0x0f9 align=1 (i32.const 0))) + (local.set 0x0fa (i64.load offset=0x0fa align=1 (i32.const 0))) + (local.set 0x0fb (i64.load offset=0x0fb align=1 (i32.const 0))) + (local.set 0x0fc (i64.load offset=0x0fc align=1 (i32.const 0))) + (local.set 0x0fd (i64.load offset=0x0fd align=1 (i32.const 0))) + (local.set 0x0fe (i64.load offset=0x0fe align=1 (i32.const 0))) + (local.set 0x0ff (i64.load offset=0x0ff align=1 (i32.const 0))) + (local.set 0x100 (i64.load offset=0x100 align=1 (i32.const 0))) + (local.set 0x101 (i64.load offset=0x101 align=1 (i32.const 0))) + (local.set 0x102 (i64.load offset=0x102 align=1 (i32.const 0))) + (local.set 0x103 (i64.load offset=0x103 align=1 (i32.const 0))) + (local.set 0x104 (i64.load offset=0x104 align=1 (i32.const 0))) + (local.set 0x105 (i64.load offset=0x105 align=1 (i32.const 0))) + (local.set 0x106 (i64.load offset=0x106 align=1 (i32.const 0))) + (local.set 0x107 (i64.load offset=0x107 align=1 (i32.const 0))) + (local.set 0x108 (i64.load offset=0x108 align=1 (i32.const 0))) + (local.set 0x109 (i64.load offset=0x109 align=1 (i32.const 0))) + (local.set 0x10a (i64.load offset=0x10a align=1 (i32.const 0))) + (local.set 0x10b (i64.load offset=0x10b align=1 (i32.const 0))) + (local.set 0x10c (i64.load offset=0x10c align=1 (i32.const 0))) + (local.set 0x10d (i64.load offset=0x10d align=1 (i32.const 0))) + (local.set 0x10e (i64.load offset=0x10e align=1 (i32.const 0))) + (local.set 0x10f (i64.load offset=0x10f align=1 (i32.const 0))) + (local.set 0x110 (i64.load offset=0x110 align=1 (i32.const 0))) + (local.set 0x111 (i64.load offset=0x111 align=1 (i32.const 0))) + (local.set 0x112 (i64.load offset=0x112 align=1 (i32.const 0))) + (local.set 0x113 (i64.load offset=0x113 align=1 (i32.const 0))) + (local.set 0x114 (i64.load offset=0x114 align=1 (i32.const 0))) + (local.set 0x115 (i64.load offset=0x115 align=1 (i32.const 0))) + (local.set 0x116 (i64.load offset=0x116 align=1 (i32.const 0))) + (local.set 0x117 (i64.load offset=0x117 align=1 (i32.const 0))) + (local.set 0x118 (i64.load offset=0x118 align=1 (i32.const 0))) + (local.set 0x119 (i64.load offset=0x119 align=1 (i32.const 0))) + (local.set 0x11a (i64.load offset=0x11a align=1 (i32.const 0))) + (local.set 0x11b (i64.load offset=0x11b align=1 (i32.const 0))) + (local.set 0x11c (i64.load offset=0x11c align=1 (i32.const 0))) + (local.set 0x11d (i64.load offset=0x11d align=1 (i32.const 0))) + (local.set 0x11e (i64.load offset=0x11e align=1 (i32.const 0))) + (local.set 0x11f (i64.load offset=0x11f align=1 (i32.const 0))) + (local.set 0x120 (i64.load offset=0x120 align=1 (i32.const 0))) + (local.set 0x121 (i64.load offset=0x121 align=1 (i32.const 0))) + (local.set 0x122 (i64.load offset=0x122 align=1 (i32.const 0))) + (local.set 0x123 (i64.load offset=0x123 align=1 (i32.const 0))) + (local.set 0x124 (i64.load offset=0x124 align=1 (i32.const 0))) + (local.set 0x125 (i64.load offset=0x125 align=1 (i32.const 0))) + (local.set 0x126 (i64.load offset=0x126 align=1 (i32.const 0))) + (local.set 0x127 (i64.load offset=0x127 align=1 (i32.const 0))) + (local.set 0x128 (i64.load offset=0x128 align=1 (i32.const 0))) + (local.set 0x129 (i64.load offset=0x129 align=1 (i32.const 0))) + (local.set 0x12a (i64.load offset=0x12a align=1 (i32.const 0))) + (local.set 0x12b (i64.load offset=0x12b align=1 (i32.const 0))) + (local.set 0x12c (i64.load offset=0x12c align=1 (i32.const 0))) + (local.set 0x12d (i64.load offset=0x12d align=1 (i32.const 0))) + (local.set 0x12e (i64.load offset=0x12e align=1 (i32.const 0))) + (local.set 0x12f (i64.load offset=0x12f align=1 (i32.const 0))) + (local.set 0x130 (i64.load offset=0x130 align=1 (i32.const 0))) + (local.set 0x131 (i64.load offset=0x131 align=1 (i32.const 0))) + (local.set 0x132 (i64.load offset=0x132 align=1 (i32.const 0))) + (local.set 0x133 (i64.load offset=0x133 align=1 (i32.const 0))) + (local.set 0x134 (i64.load offset=0x134 align=1 (i32.const 0))) + (local.set 0x135 (i64.load offset=0x135 align=1 (i32.const 0))) + (local.set 0x136 (i64.load offset=0x136 align=1 (i32.const 0))) + (local.set 0x137 (i64.load offset=0x137 align=1 (i32.const 0))) + (local.set 0x138 (i64.load offset=0x138 align=1 (i32.const 0))) + (local.set 0x139 (i64.load offset=0x139 align=1 (i32.const 0))) + (local.set 0x13a (i64.load offset=0x13a align=1 (i32.const 0))) + (local.set 0x13b (i64.load offset=0x13b align=1 (i32.const 0))) + (local.set 0x13c (i64.load offset=0x13c align=1 (i32.const 0))) + (local.set 0x13d (i64.load offset=0x13d align=1 (i32.const 0))) + (local.set 0x13e (i64.load offset=0x13e align=1 (i32.const 0))) + (local.set 0x13f (i64.load offset=0x13f align=1 (i32.const 0))) + (local.set 0x140 (i64.load offset=0x140 align=1 (i32.const 0))) + (local.set 0x141 (i64.load offset=0x141 align=1 (i32.const 0))) + (local.set 0x142 (i64.load offset=0x142 align=1 (i32.const 0))) + (local.set 0x143 (i64.load offset=0x143 align=1 (i32.const 0))) + (local.set 0x144 (i64.load offset=0x144 align=1 (i32.const 0))) + (local.set 0x145 (i64.load offset=0x145 align=1 (i32.const 0))) + (local.set 0x146 (i64.load offset=0x146 align=1 (i32.const 0))) + (local.set 0x147 (i64.load offset=0x147 align=1 (i32.const 0))) + (local.set 0x148 (i64.load offset=0x148 align=1 (i32.const 0))) + (local.set 0x149 (i64.load offset=0x149 align=1 (i32.const 0))) + (local.set 0x14a (i64.load offset=0x14a align=1 (i32.const 0))) + (local.set 0x14b (i64.load offset=0x14b align=1 (i32.const 0))) + (local.set 0x14c (i64.load offset=0x14c align=1 (i32.const 0))) + (local.set 0x14d (i64.load offset=0x14d align=1 (i32.const 0))) + (local.set 0x14e (i64.load offset=0x14e align=1 (i32.const 0))) + (local.set 0x14f (i64.load offset=0x14f align=1 (i32.const 0))) + (local.set 0x150 (i64.load offset=0x150 align=1 (i32.const 0))) + (local.set 0x151 (i64.load offset=0x151 align=1 (i32.const 0))) + (local.set 0x152 (i64.load offset=0x152 align=1 (i32.const 0))) + (local.set 0x153 (i64.load offset=0x153 align=1 (i32.const 0))) + (local.set 0x154 (i64.load offset=0x154 align=1 (i32.const 0))) + (local.set 0x155 (i64.load offset=0x155 align=1 (i32.const 0))) + (local.set 0x156 (i64.load offset=0x156 align=1 (i32.const 0))) + (local.set 0x157 (i64.load offset=0x157 align=1 (i32.const 0))) + (local.set 0x158 (i64.load offset=0x158 align=1 (i32.const 0))) + (local.set 0x159 (i64.load offset=0x159 align=1 (i32.const 0))) + (local.set 0x15a (i64.load offset=0x15a align=1 (i32.const 0))) + (local.set 0x15b (i64.load offset=0x15b align=1 (i32.const 0))) + (local.set 0x15c (i64.load offset=0x15c align=1 (i32.const 0))) + (local.set 0x15d (i64.load offset=0x15d align=1 (i32.const 0))) + (local.set 0x15e (i64.load offset=0x15e align=1 (i32.const 0))) + (local.set 0x15f (i64.load offset=0x15f align=1 (i32.const 0))) + (local.set 0x160 (i64.load offset=0x160 align=1 (i32.const 0))) + (local.set 0x161 (i64.load offset=0x161 align=1 (i32.const 0))) + (local.set 0x162 (i64.load offset=0x162 align=1 (i32.const 0))) + (local.set 0x163 (i64.load offset=0x163 align=1 (i32.const 0))) + (local.set 0x164 (i64.load offset=0x164 align=1 (i32.const 0))) + (local.set 0x165 (i64.load offset=0x165 align=1 (i32.const 0))) + (local.set 0x166 (i64.load offset=0x166 align=1 (i32.const 0))) + (local.set 0x167 (i64.load offset=0x167 align=1 (i32.const 0))) + (local.set 0x168 (i64.load offset=0x168 align=1 (i32.const 0))) + (local.set 0x169 (i64.load offset=0x169 align=1 (i32.const 0))) + (local.set 0x16a (i64.load offset=0x16a align=1 (i32.const 0))) + (local.set 0x16b (i64.load offset=0x16b align=1 (i32.const 0))) + (local.set 0x16c (i64.load offset=0x16c align=1 (i32.const 0))) + (local.set 0x16d (i64.load offset=0x16d align=1 (i32.const 0))) + (local.set 0x16e (i64.load offset=0x16e align=1 (i32.const 0))) + (local.set 0x16f (i64.load offset=0x16f align=1 (i32.const 0))) + (local.set 0x170 (i64.load offset=0x170 align=1 (i32.const 0))) + (local.set 0x171 (i64.load offset=0x171 align=1 (i32.const 0))) + (local.set 0x172 (i64.load offset=0x172 align=1 (i32.const 0))) + (local.set 0x173 (i64.load offset=0x173 align=1 (i32.const 0))) + (local.set 0x174 (i64.load offset=0x174 align=1 (i32.const 0))) + (local.set 0x175 (i64.load offset=0x175 align=1 (i32.const 0))) + (local.set 0x176 (i64.load offset=0x176 align=1 (i32.const 0))) + (local.set 0x177 (i64.load offset=0x177 align=1 (i32.const 0))) + (local.set 0x178 (i64.load offset=0x178 align=1 (i32.const 0))) + (local.set 0x179 (i64.load offset=0x179 align=1 (i32.const 0))) + (local.set 0x17a (i64.load offset=0x17a align=1 (i32.const 0))) + (local.set 0x17b (i64.load offset=0x17b align=1 (i32.const 0))) + (local.set 0x17c (i64.load offset=0x17c align=1 (i32.const 0))) + (local.set 0x17d (i64.load offset=0x17d align=1 (i32.const 0))) + (local.set 0x17e (i64.load offset=0x17e align=1 (i32.const 0))) + (local.set 0x17f (i64.load offset=0x17f align=1 (i32.const 0))) + (local.set 0x180 (i64.load offset=0x180 align=1 (i32.const 0))) + (local.set 0x181 (i64.load offset=0x181 align=1 (i32.const 0))) + (local.set 0x182 (i64.load offset=0x182 align=1 (i32.const 0))) + (local.set 0x183 (i64.load offset=0x183 align=1 (i32.const 0))) + (local.set 0x184 (i64.load offset=0x184 align=1 (i32.const 0))) + (local.set 0x185 (i64.load offset=0x185 align=1 (i32.const 0))) + (local.set 0x186 (i64.load offset=0x186 align=1 (i32.const 0))) + (local.set 0x187 (i64.load offset=0x187 align=1 (i32.const 0))) + (local.set 0x188 (i64.load offset=0x188 align=1 (i32.const 0))) + (local.set 0x189 (i64.load offset=0x189 align=1 (i32.const 0))) + (local.set 0x18a (i64.load offset=0x18a align=1 (i32.const 0))) + (local.set 0x18b (i64.load offset=0x18b align=1 (i32.const 0))) + (local.set 0x18c (i64.load offset=0x18c align=1 (i32.const 0))) + (local.set 0x18d (i64.load offset=0x18d align=1 (i32.const 0))) + (local.set 0x18e (i64.load offset=0x18e align=1 (i32.const 0))) + (local.set 0x18f (i64.load offset=0x18f align=1 (i32.const 0))) + (local.set 0x190 (i64.load offset=0x190 align=1 (i32.const 0))) + (local.set 0x191 (i64.load offset=0x191 align=1 (i32.const 0))) + (local.set 0x192 (i64.load offset=0x192 align=1 (i32.const 0))) + (local.set 0x193 (i64.load offset=0x193 align=1 (i32.const 0))) + (local.set 0x194 (i64.load offset=0x194 align=1 (i32.const 0))) + (local.set 0x195 (i64.load offset=0x195 align=1 (i32.const 0))) + (local.set 0x196 (i64.load offset=0x196 align=1 (i32.const 0))) + (local.set 0x197 (i64.load offset=0x197 align=1 (i32.const 0))) + (local.set 0x198 (i64.load offset=0x198 align=1 (i32.const 0))) + (local.set 0x199 (i64.load offset=0x199 align=1 (i32.const 0))) + (local.set 0x19a (i64.load offset=0x19a align=1 (i32.const 0))) + (local.set 0x19b (i64.load offset=0x19b align=1 (i32.const 0))) + (local.set 0x19c (i64.load offset=0x19c align=1 (i32.const 0))) + (local.set 0x19d (i64.load offset=0x19d align=1 (i32.const 0))) + (local.set 0x19e (i64.load offset=0x19e align=1 (i32.const 0))) + (local.set 0x19f (i64.load offset=0x19f align=1 (i32.const 0))) + (local.set 0x1a0 (i64.load offset=0x1a0 align=1 (i32.const 0))) + (local.set 0x1a1 (i64.load offset=0x1a1 align=1 (i32.const 0))) + (local.set 0x1a2 (i64.load offset=0x1a2 align=1 (i32.const 0))) + (local.set 0x1a3 (i64.load offset=0x1a3 align=1 (i32.const 0))) + (local.set 0x1a4 (i64.load offset=0x1a4 align=1 (i32.const 0))) + (local.set 0x1a5 (i64.load offset=0x1a5 align=1 (i32.const 0))) + (local.set 0x1a6 (i64.load offset=0x1a6 align=1 (i32.const 0))) + (local.set 0x1a7 (i64.load offset=0x1a7 align=1 (i32.const 0))) + (local.set 0x1a8 (i64.load offset=0x1a8 align=1 (i32.const 0))) + (local.set 0x1a9 (i64.load offset=0x1a9 align=1 (i32.const 0))) + (local.set 0x1aa (i64.load offset=0x1aa align=1 (i32.const 0))) + (local.set 0x1ab (i64.load offset=0x1ab align=1 (i32.const 0))) + (local.set 0x1ac (i64.load offset=0x1ac align=1 (i32.const 0))) + (local.set 0x1ad (i64.load offset=0x1ad align=1 (i32.const 0))) + (local.set 0x1ae (i64.load offset=0x1ae align=1 (i32.const 0))) + (local.set 0x1af (i64.load offset=0x1af align=1 (i32.const 0))) + (local.set 0x1b0 (i64.load offset=0x1b0 align=1 (i32.const 0))) + (local.set 0x1b1 (i64.load offset=0x1b1 align=1 (i32.const 0))) + (local.set 0x1b2 (i64.load offset=0x1b2 align=1 (i32.const 0))) + (local.set 0x1b3 (i64.load offset=0x1b3 align=1 (i32.const 0))) + (local.set 0x1b4 (i64.load offset=0x1b4 align=1 (i32.const 0))) + (local.set 0x1b5 (i64.load offset=0x1b5 align=1 (i32.const 0))) + (local.set 0x1b6 (i64.load offset=0x1b6 align=1 (i32.const 0))) + (local.set 0x1b7 (i64.load offset=0x1b7 align=1 (i32.const 0))) + (local.set 0x1b8 (i64.load offset=0x1b8 align=1 (i32.const 0))) + (local.set 0x1b9 (i64.load offset=0x1b9 align=1 (i32.const 0))) + (local.set 0x1ba (i64.load offset=0x1ba align=1 (i32.const 0))) + (local.set 0x1bb (i64.load offset=0x1bb align=1 (i32.const 0))) + (local.set 0x1bc (i64.load offset=0x1bc align=1 (i32.const 0))) + (local.set 0x1bd (i64.load offset=0x1bd align=1 (i32.const 0))) + (local.set 0x1be (i64.load offset=0x1be align=1 (i32.const 0))) + (local.set 0x1bf (i64.load offset=0x1bf align=1 (i32.const 0))) + (local.set 0x1c0 (i64.load offset=0x1c0 align=1 (i32.const 0))) + (local.set 0x1c1 (i64.load offset=0x1c1 align=1 (i32.const 0))) + (local.set 0x1c2 (i64.load offset=0x1c2 align=1 (i32.const 0))) + (local.set 0x1c3 (i64.load offset=0x1c3 align=1 (i32.const 0))) + (local.set 0x1c4 (i64.load offset=0x1c4 align=1 (i32.const 0))) + (local.set 0x1c5 (i64.load offset=0x1c5 align=1 (i32.const 0))) + (local.set 0x1c6 (i64.load offset=0x1c6 align=1 (i32.const 0))) + (local.set 0x1c7 (i64.load offset=0x1c7 align=1 (i32.const 0))) + (local.set 0x1c8 (i64.load offset=0x1c8 align=1 (i32.const 0))) + (local.set 0x1c9 (i64.load offset=0x1c9 align=1 (i32.const 0))) + (local.set 0x1ca (i64.load offset=0x1ca align=1 (i32.const 0))) + (local.set 0x1cb (i64.load offset=0x1cb align=1 (i32.const 0))) + (local.set 0x1cc (i64.load offset=0x1cc align=1 (i32.const 0))) + (local.set 0x1cd (i64.load offset=0x1cd align=1 (i32.const 0))) + (local.set 0x1ce (i64.load offset=0x1ce align=1 (i32.const 0))) + (local.set 0x1cf (i64.load offset=0x1cf align=1 (i32.const 0))) + (local.set 0x1d0 (i64.load offset=0x1d0 align=1 (i32.const 0))) + (local.set 0x1d1 (i64.load offset=0x1d1 align=1 (i32.const 0))) + (local.set 0x1d2 (i64.load offset=0x1d2 align=1 (i32.const 0))) + (local.set 0x1d3 (i64.load offset=0x1d3 align=1 (i32.const 0))) + (local.set 0x1d4 (i64.load offset=0x1d4 align=1 (i32.const 0))) + (local.set 0x1d5 (i64.load offset=0x1d5 align=1 (i32.const 0))) + (local.set 0x1d6 (i64.load offset=0x1d6 align=1 (i32.const 0))) + (local.set 0x1d7 (i64.load offset=0x1d7 align=1 (i32.const 0))) + (local.set 0x1d8 (i64.load offset=0x1d8 align=1 (i32.const 0))) + (local.set 0x1d9 (i64.load offset=0x1d9 align=1 (i32.const 0))) + (local.set 0x1da (i64.load offset=0x1da align=1 (i32.const 0))) + (local.set 0x1db (i64.load offset=0x1db align=1 (i32.const 0))) + (local.set 0x1dc (i64.load offset=0x1dc align=1 (i32.const 0))) + (local.set 0x1dd (i64.load offset=0x1dd align=1 (i32.const 0))) + (local.set 0x1de (i64.load offset=0x1de align=1 (i32.const 0))) + (local.set 0x1df (i64.load offset=0x1df align=1 (i32.const 0))) + (local.set 0x1e0 (i64.load offset=0x1e0 align=1 (i32.const 0))) + (local.set 0x1e1 (i64.load offset=0x1e1 align=1 (i32.const 0))) + (local.set 0x1e2 (i64.load offset=0x1e2 align=1 (i32.const 0))) + (local.set 0x1e3 (i64.load offset=0x1e3 align=1 (i32.const 0))) + (local.set 0x1e4 (i64.load offset=0x1e4 align=1 (i32.const 0))) + (local.set 0x1e5 (i64.load offset=0x1e5 align=1 (i32.const 0))) + (local.set 0x1e6 (i64.load offset=0x1e6 align=1 (i32.const 0))) + (local.set 0x1e7 (i64.load offset=0x1e7 align=1 (i32.const 0))) + (local.set 0x1e8 (i64.load offset=0x1e8 align=1 (i32.const 0))) + (local.set 0x1e9 (i64.load offset=0x1e9 align=1 (i32.const 0))) + (local.set 0x1ea (i64.load offset=0x1ea align=1 (i32.const 0))) + (local.set 0x1eb (i64.load offset=0x1eb align=1 (i32.const 0))) + (local.set 0x1ec (i64.load offset=0x1ec align=1 (i32.const 0))) + (local.set 0x1ed (i64.load offset=0x1ed align=1 (i32.const 0))) + (local.set 0x1ee (i64.load offset=0x1ee align=1 (i32.const 0))) + (local.set 0x1ef (i64.load offset=0x1ef align=1 (i32.const 0))) + (local.set 0x1f0 (i64.load offset=0x1f0 align=1 (i32.const 0))) + (local.set 0x1f1 (i64.load offset=0x1f1 align=1 (i32.const 0))) + (local.set 0x1f2 (i64.load offset=0x1f2 align=1 (i32.const 0))) + (local.set 0x1f3 (i64.load offset=0x1f3 align=1 (i32.const 0))) + (local.set 0x1f4 (i64.load offset=0x1f4 align=1 (i32.const 0))) + (local.set 0x1f5 (i64.load offset=0x1f5 align=1 (i32.const 0))) + (local.set 0x1f6 (i64.load offset=0x1f6 align=1 (i32.const 0))) + (local.set 0x1f7 (i64.load offset=0x1f7 align=1 (i32.const 0))) + (local.set 0x1f8 (i64.load offset=0x1f8 align=1 (i32.const 0))) + (local.set 0x1f9 (i64.load offset=0x1f9 align=1 (i32.const 0))) + (local.set 0x1fa (i64.load offset=0x1fa align=1 (i32.const 0))) + (local.set 0x1fb (i64.load offset=0x1fb align=1 (i32.const 0))) + (local.set 0x1fc (i64.load offset=0x1fc align=1 (i32.const 0))) + (local.set 0x1fd (i64.load offset=0x1fd align=1 (i32.const 0))) + (local.set 0x1fe (i64.load offset=0x1fe align=1 (i32.const 0))) + (local.set 0x1ff (i64.load offset=0x1ff align=1 (i32.const 0))) + (local.set 0x200 (i64.load offset=0x200 align=1 (i32.const 0))) + (local.set 0x201 (i64.load offset=0x201 align=1 (i32.const 0))) + (local.set 0x202 (i64.load offset=0x202 align=1 (i32.const 0))) + (local.set 0x203 (i64.load offset=0x203 align=1 (i32.const 0))) + (local.set 0x204 (i64.load offset=0x204 align=1 (i32.const 0))) + (local.set 0x205 (i64.load offset=0x205 align=1 (i32.const 0))) + (local.set 0x206 (i64.load offset=0x206 align=1 (i32.const 0))) + (local.set 0x207 (i64.load offset=0x207 align=1 (i32.const 0))) + (local.set 0x208 (i64.load offset=0x208 align=1 (i32.const 0))) + (local.set 0x209 (i64.load offset=0x209 align=1 (i32.const 0))) + (local.set 0x20a (i64.load offset=0x20a align=1 (i32.const 0))) + (local.set 0x20b (i64.load offset=0x20b align=1 (i32.const 0))) + (local.set 0x20c (i64.load offset=0x20c align=1 (i32.const 0))) + (local.set 0x20d (i64.load offset=0x20d align=1 (i32.const 0))) + (local.set 0x20e (i64.load offset=0x20e align=1 (i32.const 0))) + (local.set 0x20f (i64.load offset=0x20f align=1 (i32.const 0))) + (local.set 0x210 (i64.load offset=0x210 align=1 (i32.const 0))) + (local.set 0x211 (i64.load offset=0x211 align=1 (i32.const 0))) + (local.set 0x212 (i64.load offset=0x212 align=1 (i32.const 0))) + (local.set 0x213 (i64.load offset=0x213 align=1 (i32.const 0))) + (local.set 0x214 (i64.load offset=0x214 align=1 (i32.const 0))) + (local.set 0x215 (i64.load offset=0x215 align=1 (i32.const 0))) + (local.set 0x216 (i64.load offset=0x216 align=1 (i32.const 0))) + (local.set 0x217 (i64.load offset=0x217 align=1 (i32.const 0))) + (local.set 0x218 (i64.load offset=0x218 align=1 (i32.const 0))) + (local.set 0x219 (i64.load offset=0x219 align=1 (i32.const 0))) + (local.set 0x21a (i64.load offset=0x21a align=1 (i32.const 0))) + (local.set 0x21b (i64.load offset=0x21b align=1 (i32.const 0))) + (local.set 0x21c (i64.load offset=0x21c align=1 (i32.const 0))) + (local.set 0x21d (i64.load offset=0x21d align=1 (i32.const 0))) + (local.set 0x21e (i64.load offset=0x21e align=1 (i32.const 0))) + (local.set 0x21f (i64.load offset=0x21f align=1 (i32.const 0))) + (local.set 0x220 (i64.load offset=0x220 align=1 (i32.const 0))) + (local.set 0x221 (i64.load offset=0x221 align=1 (i32.const 0))) + (local.set 0x222 (i64.load offset=0x222 align=1 (i32.const 0))) + (local.set 0x223 (i64.load offset=0x223 align=1 (i32.const 0))) + (local.set 0x224 (i64.load offset=0x224 align=1 (i32.const 0))) + (local.set 0x225 (i64.load offset=0x225 align=1 (i32.const 0))) + (local.set 0x226 (i64.load offset=0x226 align=1 (i32.const 0))) + (local.set 0x227 (i64.load offset=0x227 align=1 (i32.const 0))) + (local.set 0x228 (i64.load offset=0x228 align=1 (i32.const 0))) + (local.set 0x229 (i64.load offset=0x229 align=1 (i32.const 0))) + (local.set 0x22a (i64.load offset=0x22a align=1 (i32.const 0))) + (local.set 0x22b (i64.load offset=0x22b align=1 (i32.const 0))) + (local.set 0x22c (i64.load offset=0x22c align=1 (i32.const 0))) + (local.set 0x22d (i64.load offset=0x22d align=1 (i32.const 0))) + (local.set 0x22e (i64.load offset=0x22e align=1 (i32.const 0))) + (local.set 0x22f (i64.load offset=0x22f align=1 (i32.const 0))) + (local.set 0x230 (i64.load offset=0x230 align=1 (i32.const 0))) + (local.set 0x231 (i64.load offset=0x231 align=1 (i32.const 0))) + (local.set 0x232 (i64.load offset=0x232 align=1 (i32.const 0))) + (local.set 0x233 (i64.load offset=0x233 align=1 (i32.const 0))) + (local.set 0x234 (i64.load offset=0x234 align=1 (i32.const 0))) + (local.set 0x235 (i64.load offset=0x235 align=1 (i32.const 0))) + (local.set 0x236 (i64.load offset=0x236 align=1 (i32.const 0))) + (local.set 0x237 (i64.load offset=0x237 align=1 (i32.const 0))) + (local.set 0x238 (i64.load offset=0x238 align=1 (i32.const 0))) + (local.set 0x239 (i64.load offset=0x239 align=1 (i32.const 0))) + (local.set 0x23a (i64.load offset=0x23a align=1 (i32.const 0))) + (local.set 0x23b (i64.load offset=0x23b align=1 (i32.const 0))) + (local.set 0x23c (i64.load offset=0x23c align=1 (i32.const 0))) + (local.set 0x23d (i64.load offset=0x23d align=1 (i32.const 0))) + (local.set 0x23e (i64.load offset=0x23e align=1 (i32.const 0))) + (local.set 0x23f (i64.load offset=0x23f align=1 (i32.const 0))) + (local.set 0x240 (i64.load offset=0x240 align=1 (i32.const 0))) + (local.set 0x241 (i64.load offset=0x241 align=1 (i32.const 0))) + (local.set 0x242 (i64.load offset=0x242 align=1 (i32.const 0))) + (local.set 0x243 (i64.load offset=0x243 align=1 (i32.const 0))) + (local.set 0x244 (i64.load offset=0x244 align=1 (i32.const 0))) + (local.set 0x245 (i64.load offset=0x245 align=1 (i32.const 0))) + (local.set 0x246 (i64.load offset=0x246 align=1 (i32.const 0))) + (local.set 0x247 (i64.load offset=0x247 align=1 (i32.const 0))) + (local.set 0x248 (i64.load offset=0x248 align=1 (i32.const 0))) + (local.set 0x249 (i64.load offset=0x249 align=1 (i32.const 0))) + (local.set 0x24a (i64.load offset=0x24a align=1 (i32.const 0))) + (local.set 0x24b (i64.load offset=0x24b align=1 (i32.const 0))) + (local.set 0x24c (i64.load offset=0x24c align=1 (i32.const 0))) + (local.set 0x24d (i64.load offset=0x24d align=1 (i32.const 0))) + (local.set 0x24e (i64.load offset=0x24e align=1 (i32.const 0))) + (local.set 0x24f (i64.load offset=0x24f align=1 (i32.const 0))) + (local.set 0x250 (i64.load offset=0x250 align=1 (i32.const 0))) + (local.set 0x251 (i64.load offset=0x251 align=1 (i32.const 0))) + (local.set 0x252 (i64.load offset=0x252 align=1 (i32.const 0))) + (local.set 0x253 (i64.load offset=0x253 align=1 (i32.const 0))) + (local.set 0x254 (i64.load offset=0x254 align=1 (i32.const 0))) + (local.set 0x255 (i64.load offset=0x255 align=1 (i32.const 0))) + (local.set 0x256 (i64.load offset=0x256 align=1 (i32.const 0))) + (local.set 0x257 (i64.load offset=0x257 align=1 (i32.const 0))) + (local.set 0x258 (i64.load offset=0x258 align=1 (i32.const 0))) + (local.set 0x259 (i64.load offset=0x259 align=1 (i32.const 0))) + (local.set 0x25a (i64.load offset=0x25a align=1 (i32.const 0))) + (local.set 0x25b (i64.load offset=0x25b align=1 (i32.const 0))) + (local.set 0x25c (i64.load offset=0x25c align=1 (i32.const 0))) + (local.set 0x25d (i64.load offset=0x25d align=1 (i32.const 0))) + (local.set 0x25e (i64.load offset=0x25e align=1 (i32.const 0))) + (local.set 0x25f (i64.load offset=0x25f align=1 (i32.const 0))) + (local.set 0x260 (i64.load offset=0x260 align=1 (i32.const 0))) + (local.set 0x261 (i64.load offset=0x261 align=1 (i32.const 0))) + (local.set 0x262 (i64.load offset=0x262 align=1 (i32.const 0))) + (local.set 0x263 (i64.load offset=0x263 align=1 (i32.const 0))) + (local.set 0x264 (i64.load offset=0x264 align=1 (i32.const 0))) + (local.set 0x265 (i64.load offset=0x265 align=1 (i32.const 0))) + (local.set 0x266 (i64.load offset=0x266 align=1 (i32.const 0))) + (local.set 0x267 (i64.load offset=0x267 align=1 (i32.const 0))) + (local.set 0x268 (i64.load offset=0x268 align=1 (i32.const 0))) + (local.set 0x269 (i64.load offset=0x269 align=1 (i32.const 0))) + (local.set 0x26a (i64.load offset=0x26a align=1 (i32.const 0))) + (local.set 0x26b (i64.load offset=0x26b align=1 (i32.const 0))) + (local.set 0x26c (i64.load offset=0x26c align=1 (i32.const 0))) + (local.set 0x26d (i64.load offset=0x26d align=1 (i32.const 0))) + (local.set 0x26e (i64.load offset=0x26e align=1 (i32.const 0))) + (local.set 0x26f (i64.load offset=0x26f align=1 (i32.const 0))) + (local.set 0x270 (i64.load offset=0x270 align=1 (i32.const 0))) + (local.set 0x271 (i64.load offset=0x271 align=1 (i32.const 0))) + (local.set 0x272 (i64.load offset=0x272 align=1 (i32.const 0))) + (local.set 0x273 (i64.load offset=0x273 align=1 (i32.const 0))) + (local.set 0x274 (i64.load offset=0x274 align=1 (i32.const 0))) + (local.set 0x275 (i64.load offset=0x275 align=1 (i32.const 0))) + (local.set 0x276 (i64.load offset=0x276 align=1 (i32.const 0))) + (local.set 0x277 (i64.load offset=0x277 align=1 (i32.const 0))) + (local.set 0x278 (i64.load offset=0x278 align=1 (i32.const 0))) + (local.set 0x279 (i64.load offset=0x279 align=1 (i32.const 0))) + (local.set 0x27a (i64.load offset=0x27a align=1 (i32.const 0))) + (local.set 0x27b (i64.load offset=0x27b align=1 (i32.const 0))) + (local.set 0x27c (i64.load offset=0x27c align=1 (i32.const 0))) + (local.set 0x27d (i64.load offset=0x27d align=1 (i32.const 0))) + (local.set 0x27e (i64.load offset=0x27e align=1 (i32.const 0))) + (local.set 0x27f (i64.load offset=0x27f align=1 (i32.const 0))) + (local.set 0x280 (i64.load offset=0x280 align=1 (i32.const 0))) + (local.set 0x281 (i64.load offset=0x281 align=1 (i32.const 0))) + (local.set 0x282 (i64.load offset=0x282 align=1 (i32.const 0))) + (local.set 0x283 (i64.load offset=0x283 align=1 (i32.const 0))) + (local.set 0x284 (i64.load offset=0x284 align=1 (i32.const 0))) + (local.set 0x285 (i64.load offset=0x285 align=1 (i32.const 0))) + (local.set 0x286 (i64.load offset=0x286 align=1 (i32.const 0))) + (local.set 0x287 (i64.load offset=0x287 align=1 (i32.const 0))) + (local.set 0x288 (i64.load offset=0x288 align=1 (i32.const 0))) + (local.set 0x289 (i64.load offset=0x289 align=1 (i32.const 0))) + (local.set 0x28a (i64.load offset=0x28a align=1 (i32.const 0))) + (local.set 0x28b (i64.load offset=0x28b align=1 (i32.const 0))) + (local.set 0x28c (i64.load offset=0x28c align=1 (i32.const 0))) + (local.set 0x28d (i64.load offset=0x28d align=1 (i32.const 0))) + (local.set 0x28e (i64.load offset=0x28e align=1 (i32.const 0))) + (local.set 0x28f (i64.load offset=0x28f align=1 (i32.const 0))) + (local.set 0x290 (i64.load offset=0x290 align=1 (i32.const 0))) + (local.set 0x291 (i64.load offset=0x291 align=1 (i32.const 0))) + (local.set 0x292 (i64.load offset=0x292 align=1 (i32.const 0))) + (local.set 0x293 (i64.load offset=0x293 align=1 (i32.const 0))) + (local.set 0x294 (i64.load offset=0x294 align=1 (i32.const 0))) + (local.set 0x295 (i64.load offset=0x295 align=1 (i32.const 0))) + (local.set 0x296 (i64.load offset=0x296 align=1 (i32.const 0))) + (local.set 0x297 (i64.load offset=0x297 align=1 (i32.const 0))) + (local.set 0x298 (i64.load offset=0x298 align=1 (i32.const 0))) + (local.set 0x299 (i64.load offset=0x299 align=1 (i32.const 0))) + (local.set 0x29a (i64.load offset=0x29a align=1 (i32.const 0))) + (local.set 0x29b (i64.load offset=0x29b align=1 (i32.const 0))) + (local.set 0x29c (i64.load offset=0x29c align=1 (i32.const 0))) + (local.set 0x29d (i64.load offset=0x29d align=1 (i32.const 0))) + (local.set 0x29e (i64.load offset=0x29e align=1 (i32.const 0))) + (local.set 0x29f (i64.load offset=0x29f align=1 (i32.const 0))) + (local.set 0x2a0 (i64.load offset=0x2a0 align=1 (i32.const 0))) + (local.set 0x2a1 (i64.load offset=0x2a1 align=1 (i32.const 0))) + (local.set 0x2a2 (i64.load offset=0x2a2 align=1 (i32.const 0))) + (local.set 0x2a3 (i64.load offset=0x2a3 align=1 (i32.const 0))) + (local.set 0x2a4 (i64.load offset=0x2a4 align=1 (i32.const 0))) + (local.set 0x2a5 (i64.load offset=0x2a5 align=1 (i32.const 0))) + (local.set 0x2a6 (i64.load offset=0x2a6 align=1 (i32.const 0))) + (local.set 0x2a7 (i64.load offset=0x2a7 align=1 (i32.const 0))) + (local.set 0x2a8 (i64.load offset=0x2a8 align=1 (i32.const 0))) + (local.set 0x2a9 (i64.load offset=0x2a9 align=1 (i32.const 0))) + (local.set 0x2aa (i64.load offset=0x2aa align=1 (i32.const 0))) + (local.set 0x2ab (i64.load offset=0x2ab align=1 (i32.const 0))) + (local.set 0x2ac (i64.load offset=0x2ac align=1 (i32.const 0))) + (local.set 0x2ad (i64.load offset=0x2ad align=1 (i32.const 0))) + (local.set 0x2ae (i64.load offset=0x2ae align=1 (i32.const 0))) + (local.set 0x2af (i64.load offset=0x2af align=1 (i32.const 0))) + (local.set 0x2b0 (i64.load offset=0x2b0 align=1 (i32.const 0))) + (local.set 0x2b1 (i64.load offset=0x2b1 align=1 (i32.const 0))) + (local.set 0x2b2 (i64.load offset=0x2b2 align=1 (i32.const 0))) + (local.set 0x2b3 (i64.load offset=0x2b3 align=1 (i32.const 0))) + (local.set 0x2b4 (i64.load offset=0x2b4 align=1 (i32.const 0))) + (local.set 0x2b5 (i64.load offset=0x2b5 align=1 (i32.const 0))) + (local.set 0x2b6 (i64.load offset=0x2b6 align=1 (i32.const 0))) + (local.set 0x2b7 (i64.load offset=0x2b7 align=1 (i32.const 0))) + (local.set 0x2b8 (i64.load offset=0x2b8 align=1 (i32.const 0))) + (local.set 0x2b9 (i64.load offset=0x2b9 align=1 (i32.const 0))) + (local.set 0x2ba (i64.load offset=0x2ba align=1 (i32.const 0))) + (local.set 0x2bb (i64.load offset=0x2bb align=1 (i32.const 0))) + (local.set 0x2bc (i64.load offset=0x2bc align=1 (i32.const 0))) + (local.set 0x2bd (i64.load offset=0x2bd align=1 (i32.const 0))) + (local.set 0x2be (i64.load offset=0x2be align=1 (i32.const 0))) + (local.set 0x2bf (i64.load offset=0x2bf align=1 (i32.const 0))) + (local.set 0x2c0 (i64.load offset=0x2c0 align=1 (i32.const 0))) + (local.set 0x2c1 (i64.load offset=0x2c1 align=1 (i32.const 0))) + (local.set 0x2c2 (i64.load offset=0x2c2 align=1 (i32.const 0))) + (local.set 0x2c3 (i64.load offset=0x2c3 align=1 (i32.const 0))) + (local.set 0x2c4 (i64.load offset=0x2c4 align=1 (i32.const 0))) + (local.set 0x2c5 (i64.load offset=0x2c5 align=1 (i32.const 0))) + (local.set 0x2c6 (i64.load offset=0x2c6 align=1 (i32.const 0))) + (local.set 0x2c7 (i64.load offset=0x2c7 align=1 (i32.const 0))) + (local.set 0x2c8 (i64.load offset=0x2c8 align=1 (i32.const 0))) + (local.set 0x2c9 (i64.load offset=0x2c9 align=1 (i32.const 0))) + (local.set 0x2ca (i64.load offset=0x2ca align=1 (i32.const 0))) + (local.set 0x2cb (i64.load offset=0x2cb align=1 (i32.const 0))) + (local.set 0x2cc (i64.load offset=0x2cc align=1 (i32.const 0))) + (local.set 0x2cd (i64.load offset=0x2cd align=1 (i32.const 0))) + (local.set 0x2ce (i64.load offset=0x2ce align=1 (i32.const 0))) + (local.set 0x2cf (i64.load offset=0x2cf align=1 (i32.const 0))) + (local.set 0x2d0 (i64.load offset=0x2d0 align=1 (i32.const 0))) + (local.set 0x2d1 (i64.load offset=0x2d1 align=1 (i32.const 0))) + (local.set 0x2d2 (i64.load offset=0x2d2 align=1 (i32.const 0))) + (local.set 0x2d3 (i64.load offset=0x2d3 align=1 (i32.const 0))) + (local.set 0x2d4 (i64.load offset=0x2d4 align=1 (i32.const 0))) + (local.set 0x2d5 (i64.load offset=0x2d5 align=1 (i32.const 0))) + (local.set 0x2d6 (i64.load offset=0x2d6 align=1 (i32.const 0))) + (local.set 0x2d7 (i64.load offset=0x2d7 align=1 (i32.const 0))) + (local.set 0x2d8 (i64.load offset=0x2d8 align=1 (i32.const 0))) + (local.set 0x2d9 (i64.load offset=0x2d9 align=1 (i32.const 0))) + (local.set 0x2da (i64.load offset=0x2da align=1 (i32.const 0))) + (local.set 0x2db (i64.load offset=0x2db align=1 (i32.const 0))) + (local.set 0x2dc (i64.load offset=0x2dc align=1 (i32.const 0))) + (local.set 0x2dd (i64.load offset=0x2dd align=1 (i32.const 0))) + (local.set 0x2de (i64.load offset=0x2de align=1 (i32.const 0))) + (local.set 0x2df (i64.load offset=0x2df align=1 (i32.const 0))) + (local.set 0x2e0 (i64.load offset=0x2e0 align=1 (i32.const 0))) + (local.set 0x2e1 (i64.load offset=0x2e1 align=1 (i32.const 0))) + (local.set 0x2e2 (i64.load offset=0x2e2 align=1 (i32.const 0))) + (local.set 0x2e3 (i64.load offset=0x2e3 align=1 (i32.const 0))) + (local.set 0x2e4 (i64.load offset=0x2e4 align=1 (i32.const 0))) + (local.set 0x2e5 (i64.load offset=0x2e5 align=1 (i32.const 0))) + (local.set 0x2e6 (i64.load offset=0x2e6 align=1 (i32.const 0))) + (local.set 0x2e7 (i64.load offset=0x2e7 align=1 (i32.const 0))) + (local.set 0x2e8 (i64.load offset=0x2e8 align=1 (i32.const 0))) + (local.set 0x2e9 (i64.load offset=0x2e9 align=1 (i32.const 0))) + (local.set 0x2ea (i64.load offset=0x2ea align=1 (i32.const 0))) + (local.set 0x2eb (i64.load offset=0x2eb align=1 (i32.const 0))) + (local.set 0x2ec (i64.load offset=0x2ec align=1 (i32.const 0))) + (local.set 0x2ed (i64.load offset=0x2ed align=1 (i32.const 0))) + (local.set 0x2ee (i64.load offset=0x2ee align=1 (i32.const 0))) + (local.set 0x2ef (i64.load offset=0x2ef align=1 (i32.const 0))) + (local.set 0x2f0 (i64.load offset=0x2f0 align=1 (i32.const 0))) + (local.set 0x2f1 (i64.load offset=0x2f1 align=1 (i32.const 0))) + (local.set 0x2f2 (i64.load offset=0x2f2 align=1 (i32.const 0))) + (local.set 0x2f3 (i64.load offset=0x2f3 align=1 (i32.const 0))) + (local.set 0x2f4 (i64.load offset=0x2f4 align=1 (i32.const 0))) + (local.set 0x2f5 (i64.load offset=0x2f5 align=1 (i32.const 0))) + (local.set 0x2f6 (i64.load offset=0x2f6 align=1 (i32.const 0))) + (local.set 0x2f7 (i64.load offset=0x2f7 align=1 (i32.const 0))) + (local.set 0x2f8 (i64.load offset=0x2f8 align=1 (i32.const 0))) + (local.set 0x2f9 (i64.load offset=0x2f9 align=1 (i32.const 0))) + (local.set 0x2fa (i64.load offset=0x2fa align=1 (i32.const 0))) + (local.set 0x2fb (i64.load offset=0x2fb align=1 (i32.const 0))) + (local.set 0x2fc (i64.load offset=0x2fc align=1 (i32.const 0))) + (local.set 0x2fd (i64.load offset=0x2fd align=1 (i32.const 0))) + (local.set 0x2fe (i64.load offset=0x2fe align=1 (i32.const 0))) + (local.set 0x2ff (i64.load offset=0x2ff align=1 (i32.const 0))) + (local.set 0x300 (i64.load offset=0x300 align=1 (i32.const 0))) + (local.set 0x301 (i64.load offset=0x301 align=1 (i32.const 0))) + (local.set 0x302 (i64.load offset=0x302 align=1 (i32.const 0))) + (local.set 0x303 (i64.load offset=0x303 align=1 (i32.const 0))) + (local.set 0x304 (i64.load offset=0x304 align=1 (i32.const 0))) + (local.set 0x305 (i64.load offset=0x305 align=1 (i32.const 0))) + (local.set 0x306 (i64.load offset=0x306 align=1 (i32.const 0))) + (local.set 0x307 (i64.load offset=0x307 align=1 (i32.const 0))) + (local.set 0x308 (i64.load offset=0x308 align=1 (i32.const 0))) + (local.set 0x309 (i64.load offset=0x309 align=1 (i32.const 0))) + (local.set 0x30a (i64.load offset=0x30a align=1 (i32.const 0))) + (local.set 0x30b (i64.load offset=0x30b align=1 (i32.const 0))) + (local.set 0x30c (i64.load offset=0x30c align=1 (i32.const 0))) + (local.set 0x30d (i64.load offset=0x30d align=1 (i32.const 0))) + (local.set 0x30e (i64.load offset=0x30e align=1 (i32.const 0))) + (local.set 0x30f (i64.load offset=0x30f align=1 (i32.const 0))) + (local.set 0x310 (i64.load offset=0x310 align=1 (i32.const 0))) + (local.set 0x311 (i64.load offset=0x311 align=1 (i32.const 0))) + (local.set 0x312 (i64.load offset=0x312 align=1 (i32.const 0))) + (local.set 0x313 (i64.load offset=0x313 align=1 (i32.const 0))) + (local.set 0x314 (i64.load offset=0x314 align=1 (i32.const 0))) + (local.set 0x315 (i64.load offset=0x315 align=1 (i32.const 0))) + (local.set 0x316 (i64.load offset=0x316 align=1 (i32.const 0))) + (local.set 0x317 (i64.load offset=0x317 align=1 (i32.const 0))) + (local.set 0x318 (i64.load offset=0x318 align=1 (i32.const 0))) + (local.set 0x319 (i64.load offset=0x319 align=1 (i32.const 0))) + (local.set 0x31a (i64.load offset=0x31a align=1 (i32.const 0))) + (local.set 0x31b (i64.load offset=0x31b align=1 (i32.const 0))) + (local.set 0x31c (i64.load offset=0x31c align=1 (i32.const 0))) + (local.set 0x31d (i64.load offset=0x31d align=1 (i32.const 0))) + (local.set 0x31e (i64.load offset=0x31e align=1 (i32.const 0))) + (local.set 0x31f (i64.load offset=0x31f align=1 (i32.const 0))) + (local.set 0x320 (i64.load offset=0x320 align=1 (i32.const 0))) + (local.set 0x321 (i64.load offset=0x321 align=1 (i32.const 0))) + (local.set 0x322 (i64.load offset=0x322 align=1 (i32.const 0))) + (local.set 0x323 (i64.load offset=0x323 align=1 (i32.const 0))) + (local.set 0x324 (i64.load offset=0x324 align=1 (i32.const 0))) + (local.set 0x325 (i64.load offset=0x325 align=1 (i32.const 0))) + (local.set 0x326 (i64.load offset=0x326 align=1 (i32.const 0))) + (local.set 0x327 (i64.load offset=0x327 align=1 (i32.const 0))) + (local.set 0x328 (i64.load offset=0x328 align=1 (i32.const 0))) + (local.set 0x329 (i64.load offset=0x329 align=1 (i32.const 0))) + (local.set 0x32a (i64.load offset=0x32a align=1 (i32.const 0))) + (local.set 0x32b (i64.load offset=0x32b align=1 (i32.const 0))) + (local.set 0x32c (i64.load offset=0x32c align=1 (i32.const 0))) + (local.set 0x32d (i64.load offset=0x32d align=1 (i32.const 0))) + (local.set 0x32e (i64.load offset=0x32e align=1 (i32.const 0))) + (local.set 0x32f (i64.load offset=0x32f align=1 (i32.const 0))) + (local.set 0x330 (i64.load offset=0x330 align=1 (i32.const 0))) + (local.set 0x331 (i64.load offset=0x331 align=1 (i32.const 0))) + (local.set 0x332 (i64.load offset=0x332 align=1 (i32.const 0))) + (local.set 0x333 (i64.load offset=0x333 align=1 (i32.const 0))) + (local.set 0x334 (i64.load offset=0x334 align=1 (i32.const 0))) + (local.set 0x335 (i64.load offset=0x335 align=1 (i32.const 0))) + (local.set 0x336 (i64.load offset=0x336 align=1 (i32.const 0))) + (local.set 0x337 (i64.load offset=0x337 align=1 (i32.const 0))) + (local.set 0x338 (i64.load offset=0x338 align=1 (i32.const 0))) + (local.set 0x339 (i64.load offset=0x339 align=1 (i32.const 0))) + (local.set 0x33a (i64.load offset=0x33a align=1 (i32.const 0))) + (local.set 0x33b (i64.load offset=0x33b align=1 (i32.const 0))) + (local.set 0x33c (i64.load offset=0x33c align=1 (i32.const 0))) + (local.set 0x33d (i64.load offset=0x33d align=1 (i32.const 0))) + (local.set 0x33e (i64.load offset=0x33e align=1 (i32.const 0))) + (local.set 0x33f (i64.load offset=0x33f align=1 (i32.const 0))) + (local.set 0x340 (i64.load offset=0x340 align=1 (i32.const 0))) + (local.set 0x341 (i64.load offset=0x341 align=1 (i32.const 0))) + (local.set 0x342 (i64.load offset=0x342 align=1 (i32.const 0))) + (local.set 0x343 (i64.load offset=0x343 align=1 (i32.const 0))) + (local.set 0x344 (i64.load offset=0x344 align=1 (i32.const 0))) + (local.set 0x345 (i64.load offset=0x345 align=1 (i32.const 0))) + (local.set 0x346 (i64.load offset=0x346 align=1 (i32.const 0))) + (local.set 0x347 (i64.load offset=0x347 align=1 (i32.const 0))) + (local.set 0x348 (i64.load offset=0x348 align=1 (i32.const 0))) + (local.set 0x349 (i64.load offset=0x349 align=1 (i32.const 0))) + (local.set 0x34a (i64.load offset=0x34a align=1 (i32.const 0))) + (local.set 0x34b (i64.load offset=0x34b align=1 (i32.const 0))) + (local.set 0x34c (i64.load offset=0x34c align=1 (i32.const 0))) + (local.set 0x34d (i64.load offset=0x34d align=1 (i32.const 0))) + (local.set 0x34e (i64.load offset=0x34e align=1 (i32.const 0))) + (local.set 0x34f (i64.load offset=0x34f align=1 (i32.const 0))) + (local.set 0x350 (i64.load offset=0x350 align=1 (i32.const 0))) + (local.set 0x351 (i64.load offset=0x351 align=1 (i32.const 0))) + (local.set 0x352 (i64.load offset=0x352 align=1 (i32.const 0))) + (local.set 0x353 (i64.load offset=0x353 align=1 (i32.const 0))) + (local.set 0x354 (i64.load offset=0x354 align=1 (i32.const 0))) + (local.set 0x355 (i64.load offset=0x355 align=1 (i32.const 0))) + (local.set 0x356 (i64.load offset=0x356 align=1 (i32.const 0))) + (local.set 0x357 (i64.load offset=0x357 align=1 (i32.const 0))) + (local.set 0x358 (i64.load offset=0x358 align=1 (i32.const 0))) + (local.set 0x359 (i64.load offset=0x359 align=1 (i32.const 0))) + (local.set 0x35a (i64.load offset=0x35a align=1 (i32.const 0))) + (local.set 0x35b (i64.load offset=0x35b align=1 (i32.const 0))) + (local.set 0x35c (i64.load offset=0x35c align=1 (i32.const 0))) + (local.set 0x35d (i64.load offset=0x35d align=1 (i32.const 0))) + (local.set 0x35e (i64.load offset=0x35e align=1 (i32.const 0))) + (local.set 0x35f (i64.load offset=0x35f align=1 (i32.const 0))) + (local.set 0x360 (i64.load offset=0x360 align=1 (i32.const 0))) + (local.set 0x361 (i64.load offset=0x361 align=1 (i32.const 0))) + (local.set 0x362 (i64.load offset=0x362 align=1 (i32.const 0))) + (local.set 0x363 (i64.load offset=0x363 align=1 (i32.const 0))) + (local.set 0x364 (i64.load offset=0x364 align=1 (i32.const 0))) + (local.set 0x365 (i64.load offset=0x365 align=1 (i32.const 0))) + (local.set 0x366 (i64.load offset=0x366 align=1 (i32.const 0))) + (local.set 0x367 (i64.load offset=0x367 align=1 (i32.const 0))) + (local.set 0x368 (i64.load offset=0x368 align=1 (i32.const 0))) + (local.set 0x369 (i64.load offset=0x369 align=1 (i32.const 0))) + (local.set 0x36a (i64.load offset=0x36a align=1 (i32.const 0))) + (local.set 0x36b (i64.load offset=0x36b align=1 (i32.const 0))) + (local.set 0x36c (i64.load offset=0x36c align=1 (i32.const 0))) + (local.set 0x36d (i64.load offset=0x36d align=1 (i32.const 0))) + (local.set 0x36e (i64.load offset=0x36e align=1 (i32.const 0))) + (local.set 0x36f (i64.load offset=0x36f align=1 (i32.const 0))) + (local.set 0x370 (i64.load offset=0x370 align=1 (i32.const 0))) + (local.set 0x371 (i64.load offset=0x371 align=1 (i32.const 0))) + (local.set 0x372 (i64.load offset=0x372 align=1 (i32.const 0))) + (local.set 0x373 (i64.load offset=0x373 align=1 (i32.const 0))) + (local.set 0x374 (i64.load offset=0x374 align=1 (i32.const 0))) + (local.set 0x375 (i64.load offset=0x375 align=1 (i32.const 0))) + (local.set 0x376 (i64.load offset=0x376 align=1 (i32.const 0))) + (local.set 0x377 (i64.load offset=0x377 align=1 (i32.const 0))) + (local.set 0x378 (i64.load offset=0x378 align=1 (i32.const 0))) + (local.set 0x379 (i64.load offset=0x379 align=1 (i32.const 0))) + (local.set 0x37a (i64.load offset=0x37a align=1 (i32.const 0))) + (local.set 0x37b (i64.load offset=0x37b align=1 (i32.const 0))) + (local.set 0x37c (i64.load offset=0x37c align=1 (i32.const 0))) + (local.set 0x37d (i64.load offset=0x37d align=1 (i32.const 0))) + (local.set 0x37e (i64.load offset=0x37e align=1 (i32.const 0))) + (local.set 0x37f (i64.load offset=0x37f align=1 (i32.const 0))) + (local.set 0x380 (i64.load offset=0x380 align=1 (i32.const 0))) + (local.set 0x381 (i64.load offset=0x381 align=1 (i32.const 0))) + (local.set 0x382 (i64.load offset=0x382 align=1 (i32.const 0))) + (local.set 0x383 (i64.load offset=0x383 align=1 (i32.const 0))) + (local.set 0x384 (i64.load offset=0x384 align=1 (i32.const 0))) + (local.set 0x385 (i64.load offset=0x385 align=1 (i32.const 0))) + (local.set 0x386 (i64.load offset=0x386 align=1 (i32.const 0))) + (local.set 0x387 (i64.load offset=0x387 align=1 (i32.const 0))) + (local.set 0x388 (i64.load offset=0x388 align=1 (i32.const 0))) + (local.set 0x389 (i64.load offset=0x389 align=1 (i32.const 0))) + (local.set 0x38a (i64.load offset=0x38a align=1 (i32.const 0))) + (local.set 0x38b (i64.load offset=0x38b align=1 (i32.const 0))) + (local.set 0x38c (i64.load offset=0x38c align=1 (i32.const 0))) + (local.set 0x38d (i64.load offset=0x38d align=1 (i32.const 0))) + (local.set 0x38e (i64.load offset=0x38e align=1 (i32.const 0))) + (local.set 0x38f (i64.load offset=0x38f align=1 (i32.const 0))) + (local.set 0x390 (i64.load offset=0x390 align=1 (i32.const 0))) + (local.set 0x391 (i64.load offset=0x391 align=1 (i32.const 0))) + (local.set 0x392 (i64.load offset=0x392 align=1 (i32.const 0))) + (local.set 0x393 (i64.load offset=0x393 align=1 (i32.const 0))) + (local.set 0x394 (i64.load offset=0x394 align=1 (i32.const 0))) + (local.set 0x395 (i64.load offset=0x395 align=1 (i32.const 0))) + (local.set 0x396 (i64.load offset=0x396 align=1 (i32.const 0))) + (local.set 0x397 (i64.load offset=0x397 align=1 (i32.const 0))) + (local.set 0x398 (i64.load offset=0x398 align=1 (i32.const 0))) + (local.set 0x399 (i64.load offset=0x399 align=1 (i32.const 0))) + (local.set 0x39a (i64.load offset=0x39a align=1 (i32.const 0))) + (local.set 0x39b (i64.load offset=0x39b align=1 (i32.const 0))) + (local.set 0x39c (i64.load offset=0x39c align=1 (i32.const 0))) + (local.set 0x39d (i64.load offset=0x39d align=1 (i32.const 0))) + (local.set 0x39e (i64.load offset=0x39e align=1 (i32.const 0))) + (local.set 0x39f (i64.load offset=0x39f align=1 (i32.const 0))) + (local.set 0x3a0 (i64.load offset=0x3a0 align=1 (i32.const 0))) + (local.set 0x3a1 (i64.load offset=0x3a1 align=1 (i32.const 0))) + (local.set 0x3a2 (i64.load offset=0x3a2 align=1 (i32.const 0))) + (local.set 0x3a3 (i64.load offset=0x3a3 align=1 (i32.const 0))) + (local.set 0x3a4 (i64.load offset=0x3a4 align=1 (i32.const 0))) + (local.set 0x3a5 (i64.load offset=0x3a5 align=1 (i32.const 0))) + (local.set 0x3a6 (i64.load offset=0x3a6 align=1 (i32.const 0))) + (local.set 0x3a7 (i64.load offset=0x3a7 align=1 (i32.const 0))) + (local.set 0x3a8 (i64.load offset=0x3a8 align=1 (i32.const 0))) + (local.set 0x3a9 (i64.load offset=0x3a9 align=1 (i32.const 0))) + (local.set 0x3aa (i64.load offset=0x3aa align=1 (i32.const 0))) + (local.set 0x3ab (i64.load offset=0x3ab align=1 (i32.const 0))) + (local.set 0x3ac (i64.load offset=0x3ac align=1 (i32.const 0))) + (local.set 0x3ad (i64.load offset=0x3ad align=1 (i32.const 0))) + (local.set 0x3ae (i64.load offset=0x3ae align=1 (i32.const 0))) + (local.set 0x3af (i64.load offset=0x3af align=1 (i32.const 0))) + (local.set 0x3b0 (i64.load offset=0x3b0 align=1 (i32.const 0))) + (local.set 0x3b1 (i64.load offset=0x3b1 align=1 (i32.const 0))) + (local.set 0x3b2 (i64.load offset=0x3b2 align=1 (i32.const 0))) + (local.set 0x3b3 (i64.load offset=0x3b3 align=1 (i32.const 0))) + (local.set 0x3b4 (i64.load offset=0x3b4 align=1 (i32.const 0))) + (local.set 0x3b5 (i64.load offset=0x3b5 align=1 (i32.const 0))) + (local.set 0x3b6 (i64.load offset=0x3b6 align=1 (i32.const 0))) + (local.set 0x3b7 (i64.load offset=0x3b7 align=1 (i32.const 0))) + (local.set 0x3b8 (i64.load offset=0x3b8 align=1 (i32.const 0))) + (local.set 0x3b9 (i64.load offset=0x3b9 align=1 (i32.const 0))) + (local.set 0x3ba (i64.load offset=0x3ba align=1 (i32.const 0))) + (local.set 0x3bb (i64.load offset=0x3bb align=1 (i32.const 0))) + (local.set 0x3bc (i64.load offset=0x3bc align=1 (i32.const 0))) + (local.set 0x3bd (i64.load offset=0x3bd align=1 (i32.const 0))) + (local.set 0x3be (i64.load offset=0x3be align=1 (i32.const 0))) + (local.set 0x3bf (i64.load offset=0x3bf align=1 (i32.const 0))) + (local.set 0x3c0 (i64.load offset=0x3c0 align=1 (i32.const 0))) + (local.set 0x3c1 (i64.load offset=0x3c1 align=1 (i32.const 0))) + (local.set 0x3c2 (i64.load offset=0x3c2 align=1 (i32.const 0))) + (local.set 0x3c3 (i64.load offset=0x3c3 align=1 (i32.const 0))) + (local.set 0x3c4 (i64.load offset=0x3c4 align=1 (i32.const 0))) + (local.set 0x3c5 (i64.load offset=0x3c5 align=1 (i32.const 0))) + (local.set 0x3c6 (i64.load offset=0x3c6 align=1 (i32.const 0))) + (local.set 0x3c7 (i64.load offset=0x3c7 align=1 (i32.const 0))) + (local.set 0x3c8 (i64.load offset=0x3c8 align=1 (i32.const 0))) + (local.set 0x3c9 (i64.load offset=0x3c9 align=1 (i32.const 0))) + (local.set 0x3ca (i64.load offset=0x3ca align=1 (i32.const 0))) + (local.set 0x3cb (i64.load offset=0x3cb align=1 (i32.const 0))) + (local.set 0x3cc (i64.load offset=0x3cc align=1 (i32.const 0))) + (local.set 0x3cd (i64.load offset=0x3cd align=1 (i32.const 0))) + (local.set 0x3ce (i64.load offset=0x3ce align=1 (i32.const 0))) + (local.set 0x3cf (i64.load offset=0x3cf align=1 (i32.const 0))) + (local.set 0x3d0 (i64.load offset=0x3d0 align=1 (i32.const 0))) + (local.set 0x3d1 (i64.load offset=0x3d1 align=1 (i32.const 0))) + (local.set 0x3d2 (i64.load offset=0x3d2 align=1 (i32.const 0))) + (local.set 0x3d3 (i64.load offset=0x3d3 align=1 (i32.const 0))) + (local.set 0x3d4 (i64.load offset=0x3d4 align=1 (i32.const 0))) + (local.set 0x3d5 (i64.load offset=0x3d5 align=1 (i32.const 0))) + (local.set 0x3d6 (i64.load offset=0x3d6 align=1 (i32.const 0))) + (local.set 0x3d7 (i64.load offset=0x3d7 align=1 (i32.const 0))) + (local.set 0x3d8 (i64.load offset=0x3d8 align=1 (i32.const 0))) + (local.set 0x3d9 (i64.load offset=0x3d9 align=1 (i32.const 0))) + (local.set 0x3da (i64.load offset=0x3da align=1 (i32.const 0))) + (local.set 0x3db (i64.load offset=0x3db align=1 (i32.const 0))) + (local.set 0x3dc (i64.load offset=0x3dc align=1 (i32.const 0))) + (local.set 0x3dd (i64.load offset=0x3dd align=1 (i32.const 0))) + (local.set 0x3de (i64.load offset=0x3de align=1 (i32.const 0))) + (local.set 0x3df (i64.load offset=0x3df align=1 (i32.const 0))) + (local.set 0x3e0 (i64.load offset=0x3e0 align=1 (i32.const 0))) + (local.set 0x3e1 (i64.load offset=0x3e1 align=1 (i32.const 0))) + (local.set 0x3e2 (i64.load offset=0x3e2 align=1 (i32.const 0))) + (local.set 0x3e3 (i64.load offset=0x3e3 align=1 (i32.const 0))) + (local.set 0x3e4 (i64.load offset=0x3e4 align=1 (i32.const 0))) + (local.set 0x3e5 (i64.load offset=0x3e5 align=1 (i32.const 0))) + (local.set 0x3e6 (i64.load offset=0x3e6 align=1 (i32.const 0))) + (local.set 0x3e7 (i64.load offset=0x3e7 align=1 (i32.const 0))) + (local.set 0x3e8 (i64.load offset=0x3e8 align=1 (i32.const 0))) + (local.set 0x3e9 (i64.load offset=0x3e9 align=1 (i32.const 0))) + (local.set 0x3ea (i64.load offset=0x3ea align=1 (i32.const 0))) + (local.set 0x3eb (i64.load offset=0x3eb align=1 (i32.const 0))) + (local.set 0x3ec (i64.load offset=0x3ec align=1 (i32.const 0))) + (local.set 0x3ed (i64.load offset=0x3ed align=1 (i32.const 0))) + (local.set 0x3ee (i64.load offset=0x3ee align=1 (i32.const 0))) + (local.set 0x3ef (i64.load offset=0x3ef align=1 (i32.const 0))) + (local.set 0x3f0 (i64.load offset=0x3f0 align=1 (i32.const 0))) + (local.set 0x3f1 (i64.load offset=0x3f1 align=1 (i32.const 0))) + (local.set 0x3f2 (i64.load offset=0x3f2 align=1 (i32.const 0))) + (local.set 0x3f3 (i64.load offset=0x3f3 align=1 (i32.const 0))) + (local.set 0x3f4 (i64.load offset=0x3f4 align=1 (i32.const 0))) + (local.set 0x3f5 (i64.load offset=0x3f5 align=1 (i32.const 0))) + (local.set 0x3f6 (i64.load offset=0x3f6 align=1 (i32.const 0))) + (local.set 0x3f7 (i64.load offset=0x3f7 align=1 (i32.const 0))) + (local.set 0x3f8 (i64.load offset=0x3f8 align=1 (i32.const 0))) + (local.set 0x3f9 (i64.load offset=0x3f9 align=1 (i32.const 0))) + (local.set 0x3fa (i64.load offset=0x3fa align=1 (i32.const 0))) + (local.set 0x3fb (i64.load offset=0x3fb align=1 (i32.const 0))) + (local.set 0x3fc (i64.load offset=0x3fc align=1 (i32.const 0))) + (local.set 0x3fd (i64.load offset=0x3fd align=1 (i32.const 0))) + (local.set 0x3fe (i64.load offset=0x3fe align=1 (i32.const 0))) + (local.set 0x3ff (i64.load offset=0x3ff align=1 (i32.const 0))) + (local.set 0x400 (i64.load offset=0x400 align=1 (i32.const 0))) + (local.set 0x401 (i64.load offset=0x401 align=1 (i32.const 0))) + (local.set 0x402 (i64.load offset=0x402 align=1 (i32.const 0))) + (local.set 0x403 (i64.load offset=0x403 align=1 (i32.const 0))) + (local.set 0x404 (i64.load offset=0x404 align=1 (i32.const 0))) + (local.set 0x405 (i64.load offset=0x405 align=1 (i32.const 0))) + (local.set 0x406 (i64.load offset=0x406 align=1 (i32.const 0))) + (local.set 0x407 (i64.load offset=0x407 align=1 (i32.const 0))) + (local.set 0x408 (i64.load offset=0x408 align=1 (i32.const 0))) + (local.set 0x409 (i64.load offset=0x409 align=1 (i32.const 0))) + (local.set 0x40a (i64.load offset=0x40a align=1 (i32.const 0))) + (local.set 0x40b (i64.load offset=0x40b align=1 (i32.const 0))) + (local.set 0x40c (i64.load offset=0x40c align=1 (i32.const 0))) + (local.set 0x40d (i64.load offset=0x40d align=1 (i32.const 0))) + (local.set 0x40e (i64.load offset=0x40e align=1 (i32.const 0))) + (local.set 0x40f (i64.load offset=0x40f align=1 (i32.const 0))) + (local.set 0x410 (i64.load offset=0x410 align=1 (i32.const 0))) + (local.set 0x411 (i64.load offset=0x411 align=1 (i32.const 0))) + (local.set 0x412 (i64.load offset=0x412 align=1 (i32.const 0))) + (local.set 0x413 (i64.load offset=0x413 align=1 (i32.const 0))) + (local.set 0x414 (i64.load offset=0x414 align=1 (i32.const 0))) + (local.set 0x415 (i64.load offset=0x415 align=1 (i32.const 0))) + (local.set 0x416 (i64.load offset=0x416 align=1 (i32.const 0))) + (local.set 0x417 (i64.load offset=0x417 align=1 (i32.const 0))) + (local.set 0x418 (i64.load offset=0x418 align=1 (i32.const 0))) + (local.set 0x419 (i64.load offset=0x419 align=1 (i32.const 0))) + (local.set 0x41a (i64.load offset=0x41a align=1 (i32.const 0))) + (local.set 0x41b (i64.load offset=0x41b align=1 (i32.const 0))) + (local.set 0x41c (i64.load offset=0x41c align=1 (i32.const 0))) + (local.set 0x41d (i64.load offset=0x41d align=1 (i32.const 0))) + (local.set 0x41e (i64.load offset=0x41e align=1 (i32.const 0))) + (local.set 0x41f (i64.load offset=0x41f align=1 (i32.const 0))) + + ;; store the locals back to memory + (i64.store offset=0x000 align=1 (i32.const 0) (local.get 0x000)) + (i64.store offset=0x001 align=1 (i32.const 0) (local.get 0x001)) + (i64.store offset=0x002 align=1 (i32.const 0) (local.get 0x002)) + (i64.store offset=0x003 align=1 (i32.const 0) (local.get 0x003)) + (i64.store offset=0x004 align=1 (i32.const 0) (local.get 0x004)) + (i64.store offset=0x005 align=1 (i32.const 0) (local.get 0x005)) + (i64.store offset=0x006 align=1 (i32.const 0) (local.get 0x006)) + (i64.store offset=0x007 align=1 (i32.const 0) (local.get 0x007)) + (i64.store offset=0x008 align=1 (i32.const 0) (local.get 0x008)) + (i64.store offset=0x009 align=1 (i32.const 0) (local.get 0x009)) + (i64.store offset=0x00a align=1 (i32.const 0) (local.get 0x00a)) + (i64.store offset=0x00b align=1 (i32.const 0) (local.get 0x00b)) + (i64.store offset=0x00c align=1 (i32.const 0) (local.get 0x00c)) + (i64.store offset=0x00d align=1 (i32.const 0) (local.get 0x00d)) + (i64.store offset=0x00e align=1 (i32.const 0) (local.get 0x00e)) + (i64.store offset=0x00f align=1 (i32.const 0) (local.get 0x00f)) + (i64.store offset=0x010 align=1 (i32.const 0) (local.get 0x010)) + (i64.store offset=0x011 align=1 (i32.const 0) (local.get 0x011)) + (i64.store offset=0x012 align=1 (i32.const 0) (local.get 0x012)) + (i64.store offset=0x013 align=1 (i32.const 0) (local.get 0x013)) + (i64.store offset=0x014 align=1 (i32.const 0) (local.get 0x014)) + (i64.store offset=0x015 align=1 (i32.const 0) (local.get 0x015)) + (i64.store offset=0x016 align=1 (i32.const 0) (local.get 0x016)) + (i64.store offset=0x017 align=1 (i32.const 0) (local.get 0x017)) + (i64.store offset=0x018 align=1 (i32.const 0) (local.get 0x018)) + (i64.store offset=0x019 align=1 (i32.const 0) (local.get 0x019)) + (i64.store offset=0x01a align=1 (i32.const 0) (local.get 0x01a)) + (i64.store offset=0x01b align=1 (i32.const 0) (local.get 0x01b)) + (i64.store offset=0x01c align=1 (i32.const 0) (local.get 0x01c)) + (i64.store offset=0x01d align=1 (i32.const 0) (local.get 0x01d)) + (i64.store offset=0x01e align=1 (i32.const 0) (local.get 0x01e)) + (i64.store offset=0x01f align=1 (i32.const 0) (local.get 0x01f)) + (i64.store offset=0x020 align=1 (i32.const 0) (local.get 0x020)) + (i64.store offset=0x021 align=1 (i32.const 0) (local.get 0x021)) + (i64.store offset=0x022 align=1 (i32.const 0) (local.get 0x022)) + (i64.store offset=0x023 align=1 (i32.const 0) (local.get 0x023)) + (i64.store offset=0x024 align=1 (i32.const 0) (local.get 0x024)) + (i64.store offset=0x025 align=1 (i32.const 0) (local.get 0x025)) + (i64.store offset=0x026 align=1 (i32.const 0) (local.get 0x026)) + (i64.store offset=0x027 align=1 (i32.const 0) (local.get 0x027)) + (i64.store offset=0x028 align=1 (i32.const 0) (local.get 0x028)) + (i64.store offset=0x029 align=1 (i32.const 0) (local.get 0x029)) + (i64.store offset=0x02a align=1 (i32.const 0) (local.get 0x02a)) + (i64.store offset=0x02b align=1 (i32.const 0) (local.get 0x02b)) + (i64.store offset=0x02c align=1 (i32.const 0) (local.get 0x02c)) + (i64.store offset=0x02d align=1 (i32.const 0) (local.get 0x02d)) + (i64.store offset=0x02e align=1 (i32.const 0) (local.get 0x02e)) + (i64.store offset=0x02f align=1 (i32.const 0) (local.get 0x02f)) + (i64.store offset=0x030 align=1 (i32.const 0) (local.get 0x030)) + (i64.store offset=0x031 align=1 (i32.const 0) (local.get 0x031)) + (i64.store offset=0x032 align=1 (i32.const 0) (local.get 0x032)) + (i64.store offset=0x033 align=1 (i32.const 0) (local.get 0x033)) + (i64.store offset=0x034 align=1 (i32.const 0) (local.get 0x034)) + (i64.store offset=0x035 align=1 (i32.const 0) (local.get 0x035)) + (i64.store offset=0x036 align=1 (i32.const 0) (local.get 0x036)) + (i64.store offset=0x037 align=1 (i32.const 0) (local.get 0x037)) + (i64.store offset=0x038 align=1 (i32.const 0) (local.get 0x038)) + (i64.store offset=0x039 align=1 (i32.const 0) (local.get 0x039)) + (i64.store offset=0x03a align=1 (i32.const 0) (local.get 0x03a)) + (i64.store offset=0x03b align=1 (i32.const 0) (local.get 0x03b)) + (i64.store offset=0x03c align=1 (i32.const 0) (local.get 0x03c)) + (i64.store offset=0x03d align=1 (i32.const 0) (local.get 0x03d)) + (i64.store offset=0x03e align=1 (i32.const 0) (local.get 0x03e)) + (i64.store offset=0x03f align=1 (i32.const 0) (local.get 0x03f)) + (i64.store offset=0x040 align=1 (i32.const 0) (local.get 0x040)) + (i64.store offset=0x041 align=1 (i32.const 0) (local.get 0x041)) + (i64.store offset=0x042 align=1 (i32.const 0) (local.get 0x042)) + (i64.store offset=0x043 align=1 (i32.const 0) (local.get 0x043)) + (i64.store offset=0x044 align=1 (i32.const 0) (local.get 0x044)) + (i64.store offset=0x045 align=1 (i32.const 0) (local.get 0x045)) + (i64.store offset=0x046 align=1 (i32.const 0) (local.get 0x046)) + (i64.store offset=0x047 align=1 (i32.const 0) (local.get 0x047)) + (i64.store offset=0x048 align=1 (i32.const 0) (local.get 0x048)) + (i64.store offset=0x049 align=1 (i32.const 0) (local.get 0x049)) + (i64.store offset=0x04a align=1 (i32.const 0) (local.get 0x04a)) + (i64.store offset=0x04b align=1 (i32.const 0) (local.get 0x04b)) + (i64.store offset=0x04c align=1 (i32.const 0) (local.get 0x04c)) + (i64.store offset=0x04d align=1 (i32.const 0) (local.get 0x04d)) + (i64.store offset=0x04e align=1 (i32.const 0) (local.get 0x04e)) + (i64.store offset=0x04f align=1 (i32.const 0) (local.get 0x04f)) + (i64.store offset=0x050 align=1 (i32.const 0) (local.get 0x050)) + (i64.store offset=0x051 align=1 (i32.const 0) (local.get 0x051)) + (i64.store offset=0x052 align=1 (i32.const 0) (local.get 0x052)) + (i64.store offset=0x053 align=1 (i32.const 0) (local.get 0x053)) + (i64.store offset=0x054 align=1 (i32.const 0) (local.get 0x054)) + (i64.store offset=0x055 align=1 (i32.const 0) (local.get 0x055)) + (i64.store offset=0x056 align=1 (i32.const 0) (local.get 0x056)) + (i64.store offset=0x057 align=1 (i32.const 0) (local.get 0x057)) + (i64.store offset=0x058 align=1 (i32.const 0) (local.get 0x058)) + (i64.store offset=0x059 align=1 (i32.const 0) (local.get 0x059)) + (i64.store offset=0x05a align=1 (i32.const 0) (local.get 0x05a)) + (i64.store offset=0x05b align=1 (i32.const 0) (local.get 0x05b)) + (i64.store offset=0x05c align=1 (i32.const 0) (local.get 0x05c)) + (i64.store offset=0x05d align=1 (i32.const 0) (local.get 0x05d)) + (i64.store offset=0x05e align=1 (i32.const 0) (local.get 0x05e)) + (i64.store offset=0x05f align=1 (i32.const 0) (local.get 0x05f)) + (i64.store offset=0x060 align=1 (i32.const 0) (local.get 0x060)) + (i64.store offset=0x061 align=1 (i32.const 0) (local.get 0x061)) + (i64.store offset=0x062 align=1 (i32.const 0) (local.get 0x062)) + (i64.store offset=0x063 align=1 (i32.const 0) (local.get 0x063)) + (i64.store offset=0x064 align=1 (i32.const 0) (local.get 0x064)) + (i64.store offset=0x065 align=1 (i32.const 0) (local.get 0x065)) + (i64.store offset=0x066 align=1 (i32.const 0) (local.get 0x066)) + (i64.store offset=0x067 align=1 (i32.const 0) (local.get 0x067)) + (i64.store offset=0x068 align=1 (i32.const 0) (local.get 0x068)) + (i64.store offset=0x069 align=1 (i32.const 0) (local.get 0x069)) + (i64.store offset=0x06a align=1 (i32.const 0) (local.get 0x06a)) + (i64.store offset=0x06b align=1 (i32.const 0) (local.get 0x06b)) + (i64.store offset=0x06c align=1 (i32.const 0) (local.get 0x06c)) + (i64.store offset=0x06d align=1 (i32.const 0) (local.get 0x06d)) + (i64.store offset=0x06e align=1 (i32.const 0) (local.get 0x06e)) + (i64.store offset=0x06f align=1 (i32.const 0) (local.get 0x06f)) + (i64.store offset=0x070 align=1 (i32.const 0) (local.get 0x070)) + (i64.store offset=0x071 align=1 (i32.const 0) (local.get 0x071)) + (i64.store offset=0x072 align=1 (i32.const 0) (local.get 0x072)) + (i64.store offset=0x073 align=1 (i32.const 0) (local.get 0x073)) + (i64.store offset=0x074 align=1 (i32.const 0) (local.get 0x074)) + (i64.store offset=0x075 align=1 (i32.const 0) (local.get 0x075)) + (i64.store offset=0x076 align=1 (i32.const 0) (local.get 0x076)) + (i64.store offset=0x077 align=1 (i32.const 0) (local.get 0x077)) + (i64.store offset=0x078 align=1 (i32.const 0) (local.get 0x078)) + (i64.store offset=0x079 align=1 (i32.const 0) (local.get 0x079)) + (i64.store offset=0x07a align=1 (i32.const 0) (local.get 0x07a)) + (i64.store offset=0x07b align=1 (i32.const 0) (local.get 0x07b)) + (i64.store offset=0x07c align=1 (i32.const 0) (local.get 0x07c)) + (i64.store offset=0x07d align=1 (i32.const 0) (local.get 0x07d)) + (i64.store offset=0x07e align=1 (i32.const 0) (local.get 0x07e)) + (i64.store offset=0x07f align=1 (i32.const 0) (local.get 0x07f)) + (i64.store offset=0x080 align=1 (i32.const 0) (local.get 0x080)) + (i64.store offset=0x081 align=1 (i32.const 0) (local.get 0x081)) + (i64.store offset=0x082 align=1 (i32.const 0) (local.get 0x082)) + (i64.store offset=0x083 align=1 (i32.const 0) (local.get 0x083)) + (i64.store offset=0x084 align=1 (i32.const 0) (local.get 0x084)) + (i64.store offset=0x085 align=1 (i32.const 0) (local.get 0x085)) + (i64.store offset=0x086 align=1 (i32.const 0) (local.get 0x086)) + (i64.store offset=0x087 align=1 (i32.const 0) (local.get 0x087)) + (i64.store offset=0x088 align=1 (i32.const 0) (local.get 0x088)) + (i64.store offset=0x089 align=1 (i32.const 0) (local.get 0x089)) + (i64.store offset=0x08a align=1 (i32.const 0) (local.get 0x08a)) + (i64.store offset=0x08b align=1 (i32.const 0) (local.get 0x08b)) + (i64.store offset=0x08c align=1 (i32.const 0) (local.get 0x08c)) + (i64.store offset=0x08d align=1 (i32.const 0) (local.get 0x08d)) + (i64.store offset=0x08e align=1 (i32.const 0) (local.get 0x08e)) + (i64.store offset=0x08f align=1 (i32.const 0) (local.get 0x08f)) + (i64.store offset=0x090 align=1 (i32.const 0) (local.get 0x090)) + (i64.store offset=0x091 align=1 (i32.const 0) (local.get 0x091)) + (i64.store offset=0x092 align=1 (i32.const 0) (local.get 0x092)) + (i64.store offset=0x093 align=1 (i32.const 0) (local.get 0x093)) + (i64.store offset=0x094 align=1 (i32.const 0) (local.get 0x094)) + (i64.store offset=0x095 align=1 (i32.const 0) (local.get 0x095)) + (i64.store offset=0x096 align=1 (i32.const 0) (local.get 0x096)) + (i64.store offset=0x097 align=1 (i32.const 0) (local.get 0x097)) + (i64.store offset=0x098 align=1 (i32.const 0) (local.get 0x098)) + (i64.store offset=0x099 align=1 (i32.const 0) (local.get 0x099)) + (i64.store offset=0x09a align=1 (i32.const 0) (local.get 0x09a)) + (i64.store offset=0x09b align=1 (i32.const 0) (local.get 0x09b)) + (i64.store offset=0x09c align=1 (i32.const 0) (local.get 0x09c)) + (i64.store offset=0x09d align=1 (i32.const 0) (local.get 0x09d)) + (i64.store offset=0x09e align=1 (i32.const 0) (local.get 0x09e)) + (i64.store offset=0x09f align=1 (i32.const 0) (local.get 0x09f)) + (i64.store offset=0x0a0 align=1 (i32.const 0) (local.get 0x0a0)) + (i64.store offset=0x0a1 align=1 (i32.const 0) (local.get 0x0a1)) + (i64.store offset=0x0a2 align=1 (i32.const 0) (local.get 0x0a2)) + (i64.store offset=0x0a3 align=1 (i32.const 0) (local.get 0x0a3)) + (i64.store offset=0x0a4 align=1 (i32.const 0) (local.get 0x0a4)) + (i64.store offset=0x0a5 align=1 (i32.const 0) (local.get 0x0a5)) + (i64.store offset=0x0a6 align=1 (i32.const 0) (local.get 0x0a6)) + (i64.store offset=0x0a7 align=1 (i32.const 0) (local.get 0x0a7)) + (i64.store offset=0x0a8 align=1 (i32.const 0) (local.get 0x0a8)) + (i64.store offset=0x0a9 align=1 (i32.const 0) (local.get 0x0a9)) + (i64.store offset=0x0aa align=1 (i32.const 0) (local.get 0x0aa)) + (i64.store offset=0x0ab align=1 (i32.const 0) (local.get 0x0ab)) + (i64.store offset=0x0ac align=1 (i32.const 0) (local.get 0x0ac)) + (i64.store offset=0x0ad align=1 (i32.const 0) (local.get 0x0ad)) + (i64.store offset=0x0ae align=1 (i32.const 0) (local.get 0x0ae)) + (i64.store offset=0x0af align=1 (i32.const 0) (local.get 0x0af)) + (i64.store offset=0x0b0 align=1 (i32.const 0) (local.get 0x0b0)) + (i64.store offset=0x0b1 align=1 (i32.const 0) (local.get 0x0b1)) + (i64.store offset=0x0b2 align=1 (i32.const 0) (local.get 0x0b2)) + (i64.store offset=0x0b3 align=1 (i32.const 0) (local.get 0x0b3)) + (i64.store offset=0x0b4 align=1 (i32.const 0) (local.get 0x0b4)) + (i64.store offset=0x0b5 align=1 (i32.const 0) (local.get 0x0b5)) + (i64.store offset=0x0b6 align=1 (i32.const 0) (local.get 0x0b6)) + (i64.store offset=0x0b7 align=1 (i32.const 0) (local.get 0x0b7)) + (i64.store offset=0x0b8 align=1 (i32.const 0) (local.get 0x0b8)) + (i64.store offset=0x0b9 align=1 (i32.const 0) (local.get 0x0b9)) + (i64.store offset=0x0ba align=1 (i32.const 0) (local.get 0x0ba)) + (i64.store offset=0x0bb align=1 (i32.const 0) (local.get 0x0bb)) + (i64.store offset=0x0bc align=1 (i32.const 0) (local.get 0x0bc)) + (i64.store offset=0x0bd align=1 (i32.const 0) (local.get 0x0bd)) + (i64.store offset=0x0be align=1 (i32.const 0) (local.get 0x0be)) + (i64.store offset=0x0bf align=1 (i32.const 0) (local.get 0x0bf)) + (i64.store offset=0x0c0 align=1 (i32.const 0) (local.get 0x0c0)) + (i64.store offset=0x0c1 align=1 (i32.const 0) (local.get 0x0c1)) + (i64.store offset=0x0c2 align=1 (i32.const 0) (local.get 0x0c2)) + (i64.store offset=0x0c3 align=1 (i32.const 0) (local.get 0x0c3)) + (i64.store offset=0x0c4 align=1 (i32.const 0) (local.get 0x0c4)) + (i64.store offset=0x0c5 align=1 (i32.const 0) (local.get 0x0c5)) + (i64.store offset=0x0c6 align=1 (i32.const 0) (local.get 0x0c6)) + (i64.store offset=0x0c7 align=1 (i32.const 0) (local.get 0x0c7)) + (i64.store offset=0x0c8 align=1 (i32.const 0) (local.get 0x0c8)) + (i64.store offset=0x0c9 align=1 (i32.const 0) (local.get 0x0c9)) + (i64.store offset=0x0ca align=1 (i32.const 0) (local.get 0x0ca)) + (i64.store offset=0x0cb align=1 (i32.const 0) (local.get 0x0cb)) + (i64.store offset=0x0cc align=1 (i32.const 0) (local.get 0x0cc)) + (i64.store offset=0x0cd align=1 (i32.const 0) (local.get 0x0cd)) + (i64.store offset=0x0ce align=1 (i32.const 0) (local.get 0x0ce)) + (i64.store offset=0x0cf align=1 (i32.const 0) (local.get 0x0cf)) + (i64.store offset=0x0d0 align=1 (i32.const 0) (local.get 0x0d0)) + (i64.store offset=0x0d1 align=1 (i32.const 0) (local.get 0x0d1)) + (i64.store offset=0x0d2 align=1 (i32.const 0) (local.get 0x0d2)) + (i64.store offset=0x0d3 align=1 (i32.const 0) (local.get 0x0d3)) + (i64.store offset=0x0d4 align=1 (i32.const 0) (local.get 0x0d4)) + (i64.store offset=0x0d5 align=1 (i32.const 0) (local.get 0x0d5)) + (i64.store offset=0x0d6 align=1 (i32.const 0) (local.get 0x0d6)) + (i64.store offset=0x0d7 align=1 (i32.const 0) (local.get 0x0d7)) + (i64.store offset=0x0d8 align=1 (i32.const 0) (local.get 0x0d8)) + (i64.store offset=0x0d9 align=1 (i32.const 0) (local.get 0x0d9)) + (i64.store offset=0x0da align=1 (i32.const 0) (local.get 0x0da)) + (i64.store offset=0x0db align=1 (i32.const 0) (local.get 0x0db)) + (i64.store offset=0x0dc align=1 (i32.const 0) (local.get 0x0dc)) + (i64.store offset=0x0dd align=1 (i32.const 0) (local.get 0x0dd)) + (i64.store offset=0x0de align=1 (i32.const 0) (local.get 0x0de)) + (i64.store offset=0x0df align=1 (i32.const 0) (local.get 0x0df)) + (i64.store offset=0x0e0 align=1 (i32.const 0) (local.get 0x0e0)) + (i64.store offset=0x0e1 align=1 (i32.const 0) (local.get 0x0e1)) + (i64.store offset=0x0e2 align=1 (i32.const 0) (local.get 0x0e2)) + (i64.store offset=0x0e3 align=1 (i32.const 0) (local.get 0x0e3)) + (i64.store offset=0x0e4 align=1 (i32.const 0) (local.get 0x0e4)) + (i64.store offset=0x0e5 align=1 (i32.const 0) (local.get 0x0e5)) + (i64.store offset=0x0e6 align=1 (i32.const 0) (local.get 0x0e6)) + (i64.store offset=0x0e7 align=1 (i32.const 0) (local.get 0x0e7)) + (i64.store offset=0x0e8 align=1 (i32.const 0) (local.get 0x0e8)) + (i64.store offset=0x0e9 align=1 (i32.const 0) (local.get 0x0e9)) + (i64.store offset=0x0ea align=1 (i32.const 0) (local.get 0x0ea)) + (i64.store offset=0x0eb align=1 (i32.const 0) (local.get 0x0eb)) + (i64.store offset=0x0ec align=1 (i32.const 0) (local.get 0x0ec)) + (i64.store offset=0x0ed align=1 (i32.const 0) (local.get 0x0ed)) + (i64.store offset=0x0ee align=1 (i32.const 0) (local.get 0x0ee)) + (i64.store offset=0x0ef align=1 (i32.const 0) (local.get 0x0ef)) + (i64.store offset=0x0f0 align=1 (i32.const 0) (local.get 0x0f0)) + (i64.store offset=0x0f1 align=1 (i32.const 0) (local.get 0x0f1)) + (i64.store offset=0x0f2 align=1 (i32.const 0) (local.get 0x0f2)) + (i64.store offset=0x0f3 align=1 (i32.const 0) (local.get 0x0f3)) + (i64.store offset=0x0f4 align=1 (i32.const 0) (local.get 0x0f4)) + (i64.store offset=0x0f5 align=1 (i32.const 0) (local.get 0x0f5)) + (i64.store offset=0x0f6 align=1 (i32.const 0) (local.get 0x0f6)) + (i64.store offset=0x0f7 align=1 (i32.const 0) (local.get 0x0f7)) + (i64.store offset=0x0f8 align=1 (i32.const 0) (local.get 0x0f8)) + (i64.store offset=0x0f9 align=1 (i32.const 0) (local.get 0x0f9)) + (i64.store offset=0x0fa align=1 (i32.const 0) (local.get 0x0fa)) + (i64.store offset=0x0fb align=1 (i32.const 0) (local.get 0x0fb)) + (i64.store offset=0x0fc align=1 (i32.const 0) (local.get 0x0fc)) + (i64.store offset=0x0fd align=1 (i32.const 0) (local.get 0x0fd)) + (i64.store offset=0x0fe align=1 (i32.const 0) (local.get 0x0fe)) + (i64.store offset=0x0ff align=1 (i32.const 0) (local.get 0x0ff)) + (i64.store offset=0x100 align=1 (i32.const 0) (local.get 0x100)) + (i64.store offset=0x101 align=1 (i32.const 0) (local.get 0x101)) + (i64.store offset=0x102 align=1 (i32.const 0) (local.get 0x102)) + (i64.store offset=0x103 align=1 (i32.const 0) (local.get 0x103)) + (i64.store offset=0x104 align=1 (i32.const 0) (local.get 0x104)) + (i64.store offset=0x105 align=1 (i32.const 0) (local.get 0x105)) + (i64.store offset=0x106 align=1 (i32.const 0) (local.get 0x106)) + (i64.store offset=0x107 align=1 (i32.const 0) (local.get 0x107)) + (i64.store offset=0x108 align=1 (i32.const 0) (local.get 0x108)) + (i64.store offset=0x109 align=1 (i32.const 0) (local.get 0x109)) + (i64.store offset=0x10a align=1 (i32.const 0) (local.get 0x10a)) + (i64.store offset=0x10b align=1 (i32.const 0) (local.get 0x10b)) + (i64.store offset=0x10c align=1 (i32.const 0) (local.get 0x10c)) + (i64.store offset=0x10d align=1 (i32.const 0) (local.get 0x10d)) + (i64.store offset=0x10e align=1 (i32.const 0) (local.get 0x10e)) + (i64.store offset=0x10f align=1 (i32.const 0) (local.get 0x10f)) + (i64.store offset=0x110 align=1 (i32.const 0) (local.get 0x110)) + (i64.store offset=0x111 align=1 (i32.const 0) (local.get 0x111)) + (i64.store offset=0x112 align=1 (i32.const 0) (local.get 0x112)) + (i64.store offset=0x113 align=1 (i32.const 0) (local.get 0x113)) + (i64.store offset=0x114 align=1 (i32.const 0) (local.get 0x114)) + (i64.store offset=0x115 align=1 (i32.const 0) (local.get 0x115)) + (i64.store offset=0x116 align=1 (i32.const 0) (local.get 0x116)) + (i64.store offset=0x117 align=1 (i32.const 0) (local.get 0x117)) + (i64.store offset=0x118 align=1 (i32.const 0) (local.get 0x118)) + (i64.store offset=0x119 align=1 (i32.const 0) (local.get 0x119)) + (i64.store offset=0x11a align=1 (i32.const 0) (local.get 0x11a)) + (i64.store offset=0x11b align=1 (i32.const 0) (local.get 0x11b)) + (i64.store offset=0x11c align=1 (i32.const 0) (local.get 0x11c)) + (i64.store offset=0x11d align=1 (i32.const 0) (local.get 0x11d)) + (i64.store offset=0x11e align=1 (i32.const 0) (local.get 0x11e)) + (i64.store offset=0x11f align=1 (i32.const 0) (local.get 0x11f)) + (i64.store offset=0x120 align=1 (i32.const 0) (local.get 0x120)) + (i64.store offset=0x121 align=1 (i32.const 0) (local.get 0x121)) + (i64.store offset=0x122 align=1 (i32.const 0) (local.get 0x122)) + (i64.store offset=0x123 align=1 (i32.const 0) (local.get 0x123)) + (i64.store offset=0x124 align=1 (i32.const 0) (local.get 0x124)) + (i64.store offset=0x125 align=1 (i32.const 0) (local.get 0x125)) + (i64.store offset=0x126 align=1 (i32.const 0) (local.get 0x126)) + (i64.store offset=0x127 align=1 (i32.const 0) (local.get 0x127)) + (i64.store offset=0x128 align=1 (i32.const 0) (local.get 0x128)) + (i64.store offset=0x129 align=1 (i32.const 0) (local.get 0x129)) + (i64.store offset=0x12a align=1 (i32.const 0) (local.get 0x12a)) + (i64.store offset=0x12b align=1 (i32.const 0) (local.get 0x12b)) + (i64.store offset=0x12c align=1 (i32.const 0) (local.get 0x12c)) + (i64.store offset=0x12d align=1 (i32.const 0) (local.get 0x12d)) + (i64.store offset=0x12e align=1 (i32.const 0) (local.get 0x12e)) + (i64.store offset=0x12f align=1 (i32.const 0) (local.get 0x12f)) + (i64.store offset=0x130 align=1 (i32.const 0) (local.get 0x130)) + (i64.store offset=0x131 align=1 (i32.const 0) (local.get 0x131)) + (i64.store offset=0x132 align=1 (i32.const 0) (local.get 0x132)) + (i64.store offset=0x133 align=1 (i32.const 0) (local.get 0x133)) + (i64.store offset=0x134 align=1 (i32.const 0) (local.get 0x134)) + (i64.store offset=0x135 align=1 (i32.const 0) (local.get 0x135)) + (i64.store offset=0x136 align=1 (i32.const 0) (local.get 0x136)) + (i64.store offset=0x137 align=1 (i32.const 0) (local.get 0x137)) + (i64.store offset=0x138 align=1 (i32.const 0) (local.get 0x138)) + (i64.store offset=0x139 align=1 (i32.const 0) (local.get 0x139)) + (i64.store offset=0x13a align=1 (i32.const 0) (local.get 0x13a)) + (i64.store offset=0x13b align=1 (i32.const 0) (local.get 0x13b)) + (i64.store offset=0x13c align=1 (i32.const 0) (local.get 0x13c)) + (i64.store offset=0x13d align=1 (i32.const 0) (local.get 0x13d)) + (i64.store offset=0x13e align=1 (i32.const 0) (local.get 0x13e)) + (i64.store offset=0x13f align=1 (i32.const 0) (local.get 0x13f)) + (i64.store offset=0x140 align=1 (i32.const 0) (local.get 0x140)) + (i64.store offset=0x141 align=1 (i32.const 0) (local.get 0x141)) + (i64.store offset=0x142 align=1 (i32.const 0) (local.get 0x142)) + (i64.store offset=0x143 align=1 (i32.const 0) (local.get 0x143)) + (i64.store offset=0x144 align=1 (i32.const 0) (local.get 0x144)) + (i64.store offset=0x145 align=1 (i32.const 0) (local.get 0x145)) + (i64.store offset=0x146 align=1 (i32.const 0) (local.get 0x146)) + (i64.store offset=0x147 align=1 (i32.const 0) (local.get 0x147)) + (i64.store offset=0x148 align=1 (i32.const 0) (local.get 0x148)) + (i64.store offset=0x149 align=1 (i32.const 0) (local.get 0x149)) + (i64.store offset=0x14a align=1 (i32.const 0) (local.get 0x14a)) + (i64.store offset=0x14b align=1 (i32.const 0) (local.get 0x14b)) + (i64.store offset=0x14c align=1 (i32.const 0) (local.get 0x14c)) + (i64.store offset=0x14d align=1 (i32.const 0) (local.get 0x14d)) + (i64.store offset=0x14e align=1 (i32.const 0) (local.get 0x14e)) + (i64.store offset=0x14f align=1 (i32.const 0) (local.get 0x14f)) + (i64.store offset=0x150 align=1 (i32.const 0) (local.get 0x150)) + (i64.store offset=0x151 align=1 (i32.const 0) (local.get 0x151)) + (i64.store offset=0x152 align=1 (i32.const 0) (local.get 0x152)) + (i64.store offset=0x153 align=1 (i32.const 0) (local.get 0x153)) + (i64.store offset=0x154 align=1 (i32.const 0) (local.get 0x154)) + (i64.store offset=0x155 align=1 (i32.const 0) (local.get 0x155)) + (i64.store offset=0x156 align=1 (i32.const 0) (local.get 0x156)) + (i64.store offset=0x157 align=1 (i32.const 0) (local.get 0x157)) + (i64.store offset=0x158 align=1 (i32.const 0) (local.get 0x158)) + (i64.store offset=0x159 align=1 (i32.const 0) (local.get 0x159)) + (i64.store offset=0x15a align=1 (i32.const 0) (local.get 0x15a)) + (i64.store offset=0x15b align=1 (i32.const 0) (local.get 0x15b)) + (i64.store offset=0x15c align=1 (i32.const 0) (local.get 0x15c)) + (i64.store offset=0x15d align=1 (i32.const 0) (local.get 0x15d)) + (i64.store offset=0x15e align=1 (i32.const 0) (local.get 0x15e)) + (i64.store offset=0x15f align=1 (i32.const 0) (local.get 0x15f)) + (i64.store offset=0x160 align=1 (i32.const 0) (local.get 0x160)) + (i64.store offset=0x161 align=1 (i32.const 0) (local.get 0x161)) + (i64.store offset=0x162 align=1 (i32.const 0) (local.get 0x162)) + (i64.store offset=0x163 align=1 (i32.const 0) (local.get 0x163)) + (i64.store offset=0x164 align=1 (i32.const 0) (local.get 0x164)) + (i64.store offset=0x165 align=1 (i32.const 0) (local.get 0x165)) + (i64.store offset=0x166 align=1 (i32.const 0) (local.get 0x166)) + (i64.store offset=0x167 align=1 (i32.const 0) (local.get 0x167)) + (i64.store offset=0x168 align=1 (i32.const 0) (local.get 0x168)) + (i64.store offset=0x169 align=1 (i32.const 0) (local.get 0x169)) + (i64.store offset=0x16a align=1 (i32.const 0) (local.get 0x16a)) + (i64.store offset=0x16b align=1 (i32.const 0) (local.get 0x16b)) + (i64.store offset=0x16c align=1 (i32.const 0) (local.get 0x16c)) + (i64.store offset=0x16d align=1 (i32.const 0) (local.get 0x16d)) + (i64.store offset=0x16e align=1 (i32.const 0) (local.get 0x16e)) + (i64.store offset=0x16f align=1 (i32.const 0) (local.get 0x16f)) + (i64.store offset=0x170 align=1 (i32.const 0) (local.get 0x170)) + (i64.store offset=0x171 align=1 (i32.const 0) (local.get 0x171)) + (i64.store offset=0x172 align=1 (i32.const 0) (local.get 0x172)) + (i64.store offset=0x173 align=1 (i32.const 0) (local.get 0x173)) + (i64.store offset=0x174 align=1 (i32.const 0) (local.get 0x174)) + (i64.store offset=0x175 align=1 (i32.const 0) (local.get 0x175)) + (i64.store offset=0x176 align=1 (i32.const 0) (local.get 0x176)) + (i64.store offset=0x177 align=1 (i32.const 0) (local.get 0x177)) + (i64.store offset=0x178 align=1 (i32.const 0) (local.get 0x178)) + (i64.store offset=0x179 align=1 (i32.const 0) (local.get 0x179)) + (i64.store offset=0x17a align=1 (i32.const 0) (local.get 0x17a)) + (i64.store offset=0x17b align=1 (i32.const 0) (local.get 0x17b)) + (i64.store offset=0x17c align=1 (i32.const 0) (local.get 0x17c)) + (i64.store offset=0x17d align=1 (i32.const 0) (local.get 0x17d)) + (i64.store offset=0x17e align=1 (i32.const 0) (local.get 0x17e)) + (i64.store offset=0x17f align=1 (i32.const 0) (local.get 0x17f)) + (i64.store offset=0x180 align=1 (i32.const 0) (local.get 0x180)) + (i64.store offset=0x181 align=1 (i32.const 0) (local.get 0x181)) + (i64.store offset=0x182 align=1 (i32.const 0) (local.get 0x182)) + (i64.store offset=0x183 align=1 (i32.const 0) (local.get 0x183)) + (i64.store offset=0x184 align=1 (i32.const 0) (local.get 0x184)) + (i64.store offset=0x185 align=1 (i32.const 0) (local.get 0x185)) + (i64.store offset=0x186 align=1 (i32.const 0) (local.get 0x186)) + (i64.store offset=0x187 align=1 (i32.const 0) (local.get 0x187)) + (i64.store offset=0x188 align=1 (i32.const 0) (local.get 0x188)) + (i64.store offset=0x189 align=1 (i32.const 0) (local.get 0x189)) + (i64.store offset=0x18a align=1 (i32.const 0) (local.get 0x18a)) + (i64.store offset=0x18b align=1 (i32.const 0) (local.get 0x18b)) + (i64.store offset=0x18c align=1 (i32.const 0) (local.get 0x18c)) + (i64.store offset=0x18d align=1 (i32.const 0) (local.get 0x18d)) + (i64.store offset=0x18e align=1 (i32.const 0) (local.get 0x18e)) + (i64.store offset=0x18f align=1 (i32.const 0) (local.get 0x18f)) + (i64.store offset=0x190 align=1 (i32.const 0) (local.get 0x190)) + (i64.store offset=0x191 align=1 (i32.const 0) (local.get 0x191)) + (i64.store offset=0x192 align=1 (i32.const 0) (local.get 0x192)) + (i64.store offset=0x193 align=1 (i32.const 0) (local.get 0x193)) + (i64.store offset=0x194 align=1 (i32.const 0) (local.get 0x194)) + (i64.store offset=0x195 align=1 (i32.const 0) (local.get 0x195)) + (i64.store offset=0x196 align=1 (i32.const 0) (local.get 0x196)) + (i64.store offset=0x197 align=1 (i32.const 0) (local.get 0x197)) + (i64.store offset=0x198 align=1 (i32.const 0) (local.get 0x198)) + (i64.store offset=0x199 align=1 (i32.const 0) (local.get 0x199)) + (i64.store offset=0x19a align=1 (i32.const 0) (local.get 0x19a)) + (i64.store offset=0x19b align=1 (i32.const 0) (local.get 0x19b)) + (i64.store offset=0x19c align=1 (i32.const 0) (local.get 0x19c)) + (i64.store offset=0x19d align=1 (i32.const 0) (local.get 0x19d)) + (i64.store offset=0x19e align=1 (i32.const 0) (local.get 0x19e)) + (i64.store offset=0x19f align=1 (i32.const 0) (local.get 0x19f)) + (i64.store offset=0x1a0 align=1 (i32.const 0) (local.get 0x1a0)) + (i64.store offset=0x1a1 align=1 (i32.const 0) (local.get 0x1a1)) + (i64.store offset=0x1a2 align=1 (i32.const 0) (local.get 0x1a2)) + (i64.store offset=0x1a3 align=1 (i32.const 0) (local.get 0x1a3)) + (i64.store offset=0x1a4 align=1 (i32.const 0) (local.get 0x1a4)) + (i64.store offset=0x1a5 align=1 (i32.const 0) (local.get 0x1a5)) + (i64.store offset=0x1a6 align=1 (i32.const 0) (local.get 0x1a6)) + (i64.store offset=0x1a7 align=1 (i32.const 0) (local.get 0x1a7)) + (i64.store offset=0x1a8 align=1 (i32.const 0) (local.get 0x1a8)) + (i64.store offset=0x1a9 align=1 (i32.const 0) (local.get 0x1a9)) + (i64.store offset=0x1aa align=1 (i32.const 0) (local.get 0x1aa)) + (i64.store offset=0x1ab align=1 (i32.const 0) (local.get 0x1ab)) + (i64.store offset=0x1ac align=1 (i32.const 0) (local.get 0x1ac)) + (i64.store offset=0x1ad align=1 (i32.const 0) (local.get 0x1ad)) + (i64.store offset=0x1ae align=1 (i32.const 0) (local.get 0x1ae)) + (i64.store offset=0x1af align=1 (i32.const 0) (local.get 0x1af)) + (i64.store offset=0x1b0 align=1 (i32.const 0) (local.get 0x1b0)) + (i64.store offset=0x1b1 align=1 (i32.const 0) (local.get 0x1b1)) + (i64.store offset=0x1b2 align=1 (i32.const 0) (local.get 0x1b2)) + (i64.store offset=0x1b3 align=1 (i32.const 0) (local.get 0x1b3)) + (i64.store offset=0x1b4 align=1 (i32.const 0) (local.get 0x1b4)) + (i64.store offset=0x1b5 align=1 (i32.const 0) (local.get 0x1b5)) + (i64.store offset=0x1b6 align=1 (i32.const 0) (local.get 0x1b6)) + (i64.store offset=0x1b7 align=1 (i32.const 0) (local.get 0x1b7)) + (i64.store offset=0x1b8 align=1 (i32.const 0) (local.get 0x1b8)) + (i64.store offset=0x1b9 align=1 (i32.const 0) (local.get 0x1b9)) + (i64.store offset=0x1ba align=1 (i32.const 0) (local.get 0x1ba)) + (i64.store offset=0x1bb align=1 (i32.const 0) (local.get 0x1bb)) + (i64.store offset=0x1bc align=1 (i32.const 0) (local.get 0x1bc)) + (i64.store offset=0x1bd align=1 (i32.const 0) (local.get 0x1bd)) + (i64.store offset=0x1be align=1 (i32.const 0) (local.get 0x1be)) + (i64.store offset=0x1bf align=1 (i32.const 0) (local.get 0x1bf)) + (i64.store offset=0x1c0 align=1 (i32.const 0) (local.get 0x1c0)) + (i64.store offset=0x1c1 align=1 (i32.const 0) (local.get 0x1c1)) + (i64.store offset=0x1c2 align=1 (i32.const 0) (local.get 0x1c2)) + (i64.store offset=0x1c3 align=1 (i32.const 0) (local.get 0x1c3)) + (i64.store offset=0x1c4 align=1 (i32.const 0) (local.get 0x1c4)) + (i64.store offset=0x1c5 align=1 (i32.const 0) (local.get 0x1c5)) + (i64.store offset=0x1c6 align=1 (i32.const 0) (local.get 0x1c6)) + (i64.store offset=0x1c7 align=1 (i32.const 0) (local.get 0x1c7)) + (i64.store offset=0x1c8 align=1 (i32.const 0) (local.get 0x1c8)) + (i64.store offset=0x1c9 align=1 (i32.const 0) (local.get 0x1c9)) + (i64.store offset=0x1ca align=1 (i32.const 0) (local.get 0x1ca)) + (i64.store offset=0x1cb align=1 (i32.const 0) (local.get 0x1cb)) + (i64.store offset=0x1cc align=1 (i32.const 0) (local.get 0x1cc)) + (i64.store offset=0x1cd align=1 (i32.const 0) (local.get 0x1cd)) + (i64.store offset=0x1ce align=1 (i32.const 0) (local.get 0x1ce)) + (i64.store offset=0x1cf align=1 (i32.const 0) (local.get 0x1cf)) + (i64.store offset=0x1d0 align=1 (i32.const 0) (local.get 0x1d0)) + (i64.store offset=0x1d1 align=1 (i32.const 0) (local.get 0x1d1)) + (i64.store offset=0x1d2 align=1 (i32.const 0) (local.get 0x1d2)) + (i64.store offset=0x1d3 align=1 (i32.const 0) (local.get 0x1d3)) + (i64.store offset=0x1d4 align=1 (i32.const 0) (local.get 0x1d4)) + (i64.store offset=0x1d5 align=1 (i32.const 0) (local.get 0x1d5)) + (i64.store offset=0x1d6 align=1 (i32.const 0) (local.get 0x1d6)) + (i64.store offset=0x1d7 align=1 (i32.const 0) (local.get 0x1d7)) + (i64.store offset=0x1d8 align=1 (i32.const 0) (local.get 0x1d8)) + (i64.store offset=0x1d9 align=1 (i32.const 0) (local.get 0x1d9)) + (i64.store offset=0x1da align=1 (i32.const 0) (local.get 0x1da)) + (i64.store offset=0x1db align=1 (i32.const 0) (local.get 0x1db)) + (i64.store offset=0x1dc align=1 (i32.const 0) (local.get 0x1dc)) + (i64.store offset=0x1dd align=1 (i32.const 0) (local.get 0x1dd)) + (i64.store offset=0x1de align=1 (i32.const 0) (local.get 0x1de)) + (i64.store offset=0x1df align=1 (i32.const 0) (local.get 0x1df)) + (i64.store offset=0x1e0 align=1 (i32.const 0) (local.get 0x1e0)) + (i64.store offset=0x1e1 align=1 (i32.const 0) (local.get 0x1e1)) + (i64.store offset=0x1e2 align=1 (i32.const 0) (local.get 0x1e2)) + (i64.store offset=0x1e3 align=1 (i32.const 0) (local.get 0x1e3)) + (i64.store offset=0x1e4 align=1 (i32.const 0) (local.get 0x1e4)) + (i64.store offset=0x1e5 align=1 (i32.const 0) (local.get 0x1e5)) + (i64.store offset=0x1e6 align=1 (i32.const 0) (local.get 0x1e6)) + (i64.store offset=0x1e7 align=1 (i32.const 0) (local.get 0x1e7)) + (i64.store offset=0x1e8 align=1 (i32.const 0) (local.get 0x1e8)) + (i64.store offset=0x1e9 align=1 (i32.const 0) (local.get 0x1e9)) + (i64.store offset=0x1ea align=1 (i32.const 0) (local.get 0x1ea)) + (i64.store offset=0x1eb align=1 (i32.const 0) (local.get 0x1eb)) + (i64.store offset=0x1ec align=1 (i32.const 0) (local.get 0x1ec)) + (i64.store offset=0x1ed align=1 (i32.const 0) (local.get 0x1ed)) + (i64.store offset=0x1ee align=1 (i32.const 0) (local.get 0x1ee)) + (i64.store offset=0x1ef align=1 (i32.const 0) (local.get 0x1ef)) + (i64.store offset=0x1f0 align=1 (i32.const 0) (local.get 0x1f0)) + (i64.store offset=0x1f1 align=1 (i32.const 0) (local.get 0x1f1)) + (i64.store offset=0x1f2 align=1 (i32.const 0) (local.get 0x1f2)) + (i64.store offset=0x1f3 align=1 (i32.const 0) (local.get 0x1f3)) + (i64.store offset=0x1f4 align=1 (i32.const 0) (local.get 0x1f4)) + (i64.store offset=0x1f5 align=1 (i32.const 0) (local.get 0x1f5)) + (i64.store offset=0x1f6 align=1 (i32.const 0) (local.get 0x1f6)) + (i64.store offset=0x1f7 align=1 (i32.const 0) (local.get 0x1f7)) + (i64.store offset=0x1f8 align=1 (i32.const 0) (local.get 0x1f8)) + (i64.store offset=0x1f9 align=1 (i32.const 0) (local.get 0x1f9)) + (i64.store offset=0x1fa align=1 (i32.const 0) (local.get 0x1fa)) + (i64.store offset=0x1fb align=1 (i32.const 0) (local.get 0x1fb)) + (i64.store offset=0x1fc align=1 (i32.const 0) (local.get 0x1fc)) + (i64.store offset=0x1fd align=1 (i32.const 0) (local.get 0x1fd)) + (i64.store offset=0x1fe align=1 (i32.const 0) (local.get 0x1fe)) + (i64.store offset=0x1ff align=1 (i32.const 0) (local.get 0x1ff)) + (i64.store offset=0x200 align=1 (i32.const 0) (local.get 0x200)) + (i64.store offset=0x201 align=1 (i32.const 0) (local.get 0x201)) + (i64.store offset=0x202 align=1 (i32.const 0) (local.get 0x202)) + (i64.store offset=0x203 align=1 (i32.const 0) (local.get 0x203)) + (i64.store offset=0x204 align=1 (i32.const 0) (local.get 0x204)) + (i64.store offset=0x205 align=1 (i32.const 0) (local.get 0x205)) + (i64.store offset=0x206 align=1 (i32.const 0) (local.get 0x206)) + (i64.store offset=0x207 align=1 (i32.const 0) (local.get 0x207)) + (i64.store offset=0x208 align=1 (i32.const 0) (local.get 0x208)) + (i64.store offset=0x209 align=1 (i32.const 0) (local.get 0x209)) + (i64.store offset=0x20a align=1 (i32.const 0) (local.get 0x20a)) + (i64.store offset=0x20b align=1 (i32.const 0) (local.get 0x20b)) + (i64.store offset=0x20c align=1 (i32.const 0) (local.get 0x20c)) + (i64.store offset=0x20d align=1 (i32.const 0) (local.get 0x20d)) + (i64.store offset=0x20e align=1 (i32.const 0) (local.get 0x20e)) + (i64.store offset=0x20f align=1 (i32.const 0) (local.get 0x20f)) + (i64.store offset=0x210 align=1 (i32.const 0) (local.get 0x210)) + (i64.store offset=0x211 align=1 (i32.const 0) (local.get 0x211)) + (i64.store offset=0x212 align=1 (i32.const 0) (local.get 0x212)) + (i64.store offset=0x213 align=1 (i32.const 0) (local.get 0x213)) + (i64.store offset=0x214 align=1 (i32.const 0) (local.get 0x214)) + (i64.store offset=0x215 align=1 (i32.const 0) (local.get 0x215)) + (i64.store offset=0x216 align=1 (i32.const 0) (local.get 0x216)) + (i64.store offset=0x217 align=1 (i32.const 0) (local.get 0x217)) + (i64.store offset=0x218 align=1 (i32.const 0) (local.get 0x218)) + (i64.store offset=0x219 align=1 (i32.const 0) (local.get 0x219)) + (i64.store offset=0x21a align=1 (i32.const 0) (local.get 0x21a)) + (i64.store offset=0x21b align=1 (i32.const 0) (local.get 0x21b)) + (i64.store offset=0x21c align=1 (i32.const 0) (local.get 0x21c)) + (i64.store offset=0x21d align=1 (i32.const 0) (local.get 0x21d)) + (i64.store offset=0x21e align=1 (i32.const 0) (local.get 0x21e)) + (i64.store offset=0x21f align=1 (i32.const 0) (local.get 0x21f)) + (i64.store offset=0x220 align=1 (i32.const 0) (local.get 0x220)) + (i64.store offset=0x221 align=1 (i32.const 0) (local.get 0x221)) + (i64.store offset=0x222 align=1 (i32.const 0) (local.get 0x222)) + (i64.store offset=0x223 align=1 (i32.const 0) (local.get 0x223)) + (i64.store offset=0x224 align=1 (i32.const 0) (local.get 0x224)) + (i64.store offset=0x225 align=1 (i32.const 0) (local.get 0x225)) + (i64.store offset=0x226 align=1 (i32.const 0) (local.get 0x226)) + (i64.store offset=0x227 align=1 (i32.const 0) (local.get 0x227)) + (i64.store offset=0x228 align=1 (i32.const 0) (local.get 0x228)) + (i64.store offset=0x229 align=1 (i32.const 0) (local.get 0x229)) + (i64.store offset=0x22a align=1 (i32.const 0) (local.get 0x22a)) + (i64.store offset=0x22b align=1 (i32.const 0) (local.get 0x22b)) + (i64.store offset=0x22c align=1 (i32.const 0) (local.get 0x22c)) + (i64.store offset=0x22d align=1 (i32.const 0) (local.get 0x22d)) + (i64.store offset=0x22e align=1 (i32.const 0) (local.get 0x22e)) + (i64.store offset=0x22f align=1 (i32.const 0) (local.get 0x22f)) + (i64.store offset=0x230 align=1 (i32.const 0) (local.get 0x230)) + (i64.store offset=0x231 align=1 (i32.const 0) (local.get 0x231)) + (i64.store offset=0x232 align=1 (i32.const 0) (local.get 0x232)) + (i64.store offset=0x233 align=1 (i32.const 0) (local.get 0x233)) + (i64.store offset=0x234 align=1 (i32.const 0) (local.get 0x234)) + (i64.store offset=0x235 align=1 (i32.const 0) (local.get 0x235)) + (i64.store offset=0x236 align=1 (i32.const 0) (local.get 0x236)) + (i64.store offset=0x237 align=1 (i32.const 0) (local.get 0x237)) + (i64.store offset=0x238 align=1 (i32.const 0) (local.get 0x238)) + (i64.store offset=0x239 align=1 (i32.const 0) (local.get 0x239)) + (i64.store offset=0x23a align=1 (i32.const 0) (local.get 0x23a)) + (i64.store offset=0x23b align=1 (i32.const 0) (local.get 0x23b)) + (i64.store offset=0x23c align=1 (i32.const 0) (local.get 0x23c)) + (i64.store offset=0x23d align=1 (i32.const 0) (local.get 0x23d)) + (i64.store offset=0x23e align=1 (i32.const 0) (local.get 0x23e)) + (i64.store offset=0x23f align=1 (i32.const 0) (local.get 0x23f)) + (i64.store offset=0x240 align=1 (i32.const 0) (local.get 0x240)) + (i64.store offset=0x241 align=1 (i32.const 0) (local.get 0x241)) + (i64.store offset=0x242 align=1 (i32.const 0) (local.get 0x242)) + (i64.store offset=0x243 align=1 (i32.const 0) (local.get 0x243)) + (i64.store offset=0x244 align=1 (i32.const 0) (local.get 0x244)) + (i64.store offset=0x245 align=1 (i32.const 0) (local.get 0x245)) + (i64.store offset=0x246 align=1 (i32.const 0) (local.get 0x246)) + (i64.store offset=0x247 align=1 (i32.const 0) (local.get 0x247)) + (i64.store offset=0x248 align=1 (i32.const 0) (local.get 0x248)) + (i64.store offset=0x249 align=1 (i32.const 0) (local.get 0x249)) + (i64.store offset=0x24a align=1 (i32.const 0) (local.get 0x24a)) + (i64.store offset=0x24b align=1 (i32.const 0) (local.get 0x24b)) + (i64.store offset=0x24c align=1 (i32.const 0) (local.get 0x24c)) + (i64.store offset=0x24d align=1 (i32.const 0) (local.get 0x24d)) + (i64.store offset=0x24e align=1 (i32.const 0) (local.get 0x24e)) + (i64.store offset=0x24f align=1 (i32.const 0) (local.get 0x24f)) + (i64.store offset=0x250 align=1 (i32.const 0) (local.get 0x250)) + (i64.store offset=0x251 align=1 (i32.const 0) (local.get 0x251)) + (i64.store offset=0x252 align=1 (i32.const 0) (local.get 0x252)) + (i64.store offset=0x253 align=1 (i32.const 0) (local.get 0x253)) + (i64.store offset=0x254 align=1 (i32.const 0) (local.get 0x254)) + (i64.store offset=0x255 align=1 (i32.const 0) (local.get 0x255)) + (i64.store offset=0x256 align=1 (i32.const 0) (local.get 0x256)) + (i64.store offset=0x257 align=1 (i32.const 0) (local.get 0x257)) + (i64.store offset=0x258 align=1 (i32.const 0) (local.get 0x258)) + (i64.store offset=0x259 align=1 (i32.const 0) (local.get 0x259)) + (i64.store offset=0x25a align=1 (i32.const 0) (local.get 0x25a)) + (i64.store offset=0x25b align=1 (i32.const 0) (local.get 0x25b)) + (i64.store offset=0x25c align=1 (i32.const 0) (local.get 0x25c)) + (i64.store offset=0x25d align=1 (i32.const 0) (local.get 0x25d)) + (i64.store offset=0x25e align=1 (i32.const 0) (local.get 0x25e)) + (i64.store offset=0x25f align=1 (i32.const 0) (local.get 0x25f)) + (i64.store offset=0x260 align=1 (i32.const 0) (local.get 0x260)) + (i64.store offset=0x261 align=1 (i32.const 0) (local.get 0x261)) + (i64.store offset=0x262 align=1 (i32.const 0) (local.get 0x262)) + (i64.store offset=0x263 align=1 (i32.const 0) (local.get 0x263)) + (i64.store offset=0x264 align=1 (i32.const 0) (local.get 0x264)) + (i64.store offset=0x265 align=1 (i32.const 0) (local.get 0x265)) + (i64.store offset=0x266 align=1 (i32.const 0) (local.get 0x266)) + (i64.store offset=0x267 align=1 (i32.const 0) (local.get 0x267)) + (i64.store offset=0x268 align=1 (i32.const 0) (local.get 0x268)) + (i64.store offset=0x269 align=1 (i32.const 0) (local.get 0x269)) + (i64.store offset=0x26a align=1 (i32.const 0) (local.get 0x26a)) + (i64.store offset=0x26b align=1 (i32.const 0) (local.get 0x26b)) + (i64.store offset=0x26c align=1 (i32.const 0) (local.get 0x26c)) + (i64.store offset=0x26d align=1 (i32.const 0) (local.get 0x26d)) + (i64.store offset=0x26e align=1 (i32.const 0) (local.get 0x26e)) + (i64.store offset=0x26f align=1 (i32.const 0) (local.get 0x26f)) + (i64.store offset=0x270 align=1 (i32.const 0) (local.get 0x270)) + (i64.store offset=0x271 align=1 (i32.const 0) (local.get 0x271)) + (i64.store offset=0x272 align=1 (i32.const 0) (local.get 0x272)) + (i64.store offset=0x273 align=1 (i32.const 0) (local.get 0x273)) + (i64.store offset=0x274 align=1 (i32.const 0) (local.get 0x274)) + (i64.store offset=0x275 align=1 (i32.const 0) (local.get 0x275)) + (i64.store offset=0x276 align=1 (i32.const 0) (local.get 0x276)) + (i64.store offset=0x277 align=1 (i32.const 0) (local.get 0x277)) + (i64.store offset=0x278 align=1 (i32.const 0) (local.get 0x278)) + (i64.store offset=0x279 align=1 (i32.const 0) (local.get 0x279)) + (i64.store offset=0x27a align=1 (i32.const 0) (local.get 0x27a)) + (i64.store offset=0x27b align=1 (i32.const 0) (local.get 0x27b)) + (i64.store offset=0x27c align=1 (i32.const 0) (local.get 0x27c)) + (i64.store offset=0x27d align=1 (i32.const 0) (local.get 0x27d)) + (i64.store offset=0x27e align=1 (i32.const 0) (local.get 0x27e)) + (i64.store offset=0x27f align=1 (i32.const 0) (local.get 0x27f)) + (i64.store offset=0x280 align=1 (i32.const 0) (local.get 0x280)) + (i64.store offset=0x281 align=1 (i32.const 0) (local.get 0x281)) + (i64.store offset=0x282 align=1 (i32.const 0) (local.get 0x282)) + (i64.store offset=0x283 align=1 (i32.const 0) (local.get 0x283)) + (i64.store offset=0x284 align=1 (i32.const 0) (local.get 0x284)) + (i64.store offset=0x285 align=1 (i32.const 0) (local.get 0x285)) + (i64.store offset=0x286 align=1 (i32.const 0) (local.get 0x286)) + (i64.store offset=0x287 align=1 (i32.const 0) (local.get 0x287)) + (i64.store offset=0x288 align=1 (i32.const 0) (local.get 0x288)) + (i64.store offset=0x289 align=1 (i32.const 0) (local.get 0x289)) + (i64.store offset=0x28a align=1 (i32.const 0) (local.get 0x28a)) + (i64.store offset=0x28b align=1 (i32.const 0) (local.get 0x28b)) + (i64.store offset=0x28c align=1 (i32.const 0) (local.get 0x28c)) + (i64.store offset=0x28d align=1 (i32.const 0) (local.get 0x28d)) + (i64.store offset=0x28e align=1 (i32.const 0) (local.get 0x28e)) + (i64.store offset=0x28f align=1 (i32.const 0) (local.get 0x28f)) + (i64.store offset=0x290 align=1 (i32.const 0) (local.get 0x290)) + (i64.store offset=0x291 align=1 (i32.const 0) (local.get 0x291)) + (i64.store offset=0x292 align=1 (i32.const 0) (local.get 0x292)) + (i64.store offset=0x293 align=1 (i32.const 0) (local.get 0x293)) + (i64.store offset=0x294 align=1 (i32.const 0) (local.get 0x294)) + (i64.store offset=0x295 align=1 (i32.const 0) (local.get 0x295)) + (i64.store offset=0x296 align=1 (i32.const 0) (local.get 0x296)) + (i64.store offset=0x297 align=1 (i32.const 0) (local.get 0x297)) + (i64.store offset=0x298 align=1 (i32.const 0) (local.get 0x298)) + (i64.store offset=0x299 align=1 (i32.const 0) (local.get 0x299)) + (i64.store offset=0x29a align=1 (i32.const 0) (local.get 0x29a)) + (i64.store offset=0x29b align=1 (i32.const 0) (local.get 0x29b)) + (i64.store offset=0x29c align=1 (i32.const 0) (local.get 0x29c)) + (i64.store offset=0x29d align=1 (i32.const 0) (local.get 0x29d)) + (i64.store offset=0x29e align=1 (i32.const 0) (local.get 0x29e)) + (i64.store offset=0x29f align=1 (i32.const 0) (local.get 0x29f)) + (i64.store offset=0x2a0 align=1 (i32.const 0) (local.get 0x2a0)) + (i64.store offset=0x2a1 align=1 (i32.const 0) (local.get 0x2a1)) + (i64.store offset=0x2a2 align=1 (i32.const 0) (local.get 0x2a2)) + (i64.store offset=0x2a3 align=1 (i32.const 0) (local.get 0x2a3)) + (i64.store offset=0x2a4 align=1 (i32.const 0) (local.get 0x2a4)) + (i64.store offset=0x2a5 align=1 (i32.const 0) (local.get 0x2a5)) + (i64.store offset=0x2a6 align=1 (i32.const 0) (local.get 0x2a6)) + (i64.store offset=0x2a7 align=1 (i32.const 0) (local.get 0x2a7)) + (i64.store offset=0x2a8 align=1 (i32.const 0) (local.get 0x2a8)) + (i64.store offset=0x2a9 align=1 (i32.const 0) (local.get 0x2a9)) + (i64.store offset=0x2aa align=1 (i32.const 0) (local.get 0x2aa)) + (i64.store offset=0x2ab align=1 (i32.const 0) (local.get 0x2ab)) + (i64.store offset=0x2ac align=1 (i32.const 0) (local.get 0x2ac)) + (i64.store offset=0x2ad align=1 (i32.const 0) (local.get 0x2ad)) + (i64.store offset=0x2ae align=1 (i32.const 0) (local.get 0x2ae)) + (i64.store offset=0x2af align=1 (i32.const 0) (local.get 0x2af)) + (i64.store offset=0x2b0 align=1 (i32.const 0) (local.get 0x2b0)) + (i64.store offset=0x2b1 align=1 (i32.const 0) (local.get 0x2b1)) + (i64.store offset=0x2b2 align=1 (i32.const 0) (local.get 0x2b2)) + (i64.store offset=0x2b3 align=1 (i32.const 0) (local.get 0x2b3)) + (i64.store offset=0x2b4 align=1 (i32.const 0) (local.get 0x2b4)) + (i64.store offset=0x2b5 align=1 (i32.const 0) (local.get 0x2b5)) + (i64.store offset=0x2b6 align=1 (i32.const 0) (local.get 0x2b6)) + (i64.store offset=0x2b7 align=1 (i32.const 0) (local.get 0x2b7)) + (i64.store offset=0x2b8 align=1 (i32.const 0) (local.get 0x2b8)) + (i64.store offset=0x2b9 align=1 (i32.const 0) (local.get 0x2b9)) + (i64.store offset=0x2ba align=1 (i32.const 0) (local.get 0x2ba)) + (i64.store offset=0x2bb align=1 (i32.const 0) (local.get 0x2bb)) + (i64.store offset=0x2bc align=1 (i32.const 0) (local.get 0x2bc)) + (i64.store offset=0x2bd align=1 (i32.const 0) (local.get 0x2bd)) + (i64.store offset=0x2be align=1 (i32.const 0) (local.get 0x2be)) + (i64.store offset=0x2bf align=1 (i32.const 0) (local.get 0x2bf)) + (i64.store offset=0x2c0 align=1 (i32.const 0) (local.get 0x2c0)) + (i64.store offset=0x2c1 align=1 (i32.const 0) (local.get 0x2c1)) + (i64.store offset=0x2c2 align=1 (i32.const 0) (local.get 0x2c2)) + (i64.store offset=0x2c3 align=1 (i32.const 0) (local.get 0x2c3)) + (i64.store offset=0x2c4 align=1 (i32.const 0) (local.get 0x2c4)) + (i64.store offset=0x2c5 align=1 (i32.const 0) (local.get 0x2c5)) + (i64.store offset=0x2c6 align=1 (i32.const 0) (local.get 0x2c6)) + (i64.store offset=0x2c7 align=1 (i32.const 0) (local.get 0x2c7)) + (i64.store offset=0x2c8 align=1 (i32.const 0) (local.get 0x2c8)) + (i64.store offset=0x2c9 align=1 (i32.const 0) (local.get 0x2c9)) + (i64.store offset=0x2ca align=1 (i32.const 0) (local.get 0x2ca)) + (i64.store offset=0x2cb align=1 (i32.const 0) (local.get 0x2cb)) + (i64.store offset=0x2cc align=1 (i32.const 0) (local.get 0x2cc)) + (i64.store offset=0x2cd align=1 (i32.const 0) (local.get 0x2cd)) + (i64.store offset=0x2ce align=1 (i32.const 0) (local.get 0x2ce)) + (i64.store offset=0x2cf align=1 (i32.const 0) (local.get 0x2cf)) + (i64.store offset=0x2d0 align=1 (i32.const 0) (local.get 0x2d0)) + (i64.store offset=0x2d1 align=1 (i32.const 0) (local.get 0x2d1)) + (i64.store offset=0x2d2 align=1 (i32.const 0) (local.get 0x2d2)) + (i64.store offset=0x2d3 align=1 (i32.const 0) (local.get 0x2d3)) + (i64.store offset=0x2d4 align=1 (i32.const 0) (local.get 0x2d4)) + (i64.store offset=0x2d5 align=1 (i32.const 0) (local.get 0x2d5)) + (i64.store offset=0x2d6 align=1 (i32.const 0) (local.get 0x2d6)) + (i64.store offset=0x2d7 align=1 (i32.const 0) (local.get 0x2d7)) + (i64.store offset=0x2d8 align=1 (i32.const 0) (local.get 0x2d8)) + (i64.store offset=0x2d9 align=1 (i32.const 0) (local.get 0x2d9)) + (i64.store offset=0x2da align=1 (i32.const 0) (local.get 0x2da)) + (i64.store offset=0x2db align=1 (i32.const 0) (local.get 0x2db)) + (i64.store offset=0x2dc align=1 (i32.const 0) (local.get 0x2dc)) + (i64.store offset=0x2dd align=1 (i32.const 0) (local.get 0x2dd)) + (i64.store offset=0x2de align=1 (i32.const 0) (local.get 0x2de)) + (i64.store offset=0x2df align=1 (i32.const 0) (local.get 0x2df)) + (i64.store offset=0x2e0 align=1 (i32.const 0) (local.get 0x2e0)) + (i64.store offset=0x2e1 align=1 (i32.const 0) (local.get 0x2e1)) + (i64.store offset=0x2e2 align=1 (i32.const 0) (local.get 0x2e2)) + (i64.store offset=0x2e3 align=1 (i32.const 0) (local.get 0x2e3)) + (i64.store offset=0x2e4 align=1 (i32.const 0) (local.get 0x2e4)) + (i64.store offset=0x2e5 align=1 (i32.const 0) (local.get 0x2e5)) + (i64.store offset=0x2e6 align=1 (i32.const 0) (local.get 0x2e6)) + (i64.store offset=0x2e7 align=1 (i32.const 0) (local.get 0x2e7)) + (i64.store offset=0x2e8 align=1 (i32.const 0) (local.get 0x2e8)) + (i64.store offset=0x2e9 align=1 (i32.const 0) (local.get 0x2e9)) + (i64.store offset=0x2ea align=1 (i32.const 0) (local.get 0x2ea)) + (i64.store offset=0x2eb align=1 (i32.const 0) (local.get 0x2eb)) + (i64.store offset=0x2ec align=1 (i32.const 0) (local.get 0x2ec)) + (i64.store offset=0x2ed align=1 (i32.const 0) (local.get 0x2ed)) + (i64.store offset=0x2ee align=1 (i32.const 0) (local.get 0x2ee)) + (i64.store offset=0x2ef align=1 (i32.const 0) (local.get 0x2ef)) + (i64.store offset=0x2f0 align=1 (i32.const 0) (local.get 0x2f0)) + (i64.store offset=0x2f1 align=1 (i32.const 0) (local.get 0x2f1)) + (i64.store offset=0x2f2 align=1 (i32.const 0) (local.get 0x2f2)) + (i64.store offset=0x2f3 align=1 (i32.const 0) (local.get 0x2f3)) + (i64.store offset=0x2f4 align=1 (i32.const 0) (local.get 0x2f4)) + (i64.store offset=0x2f5 align=1 (i32.const 0) (local.get 0x2f5)) + (i64.store offset=0x2f6 align=1 (i32.const 0) (local.get 0x2f6)) + (i64.store offset=0x2f7 align=1 (i32.const 0) (local.get 0x2f7)) + (i64.store offset=0x2f8 align=1 (i32.const 0) (local.get 0x2f8)) + (i64.store offset=0x2f9 align=1 (i32.const 0) (local.get 0x2f9)) + (i64.store offset=0x2fa align=1 (i32.const 0) (local.get 0x2fa)) + (i64.store offset=0x2fb align=1 (i32.const 0) (local.get 0x2fb)) + (i64.store offset=0x2fc align=1 (i32.const 0) (local.get 0x2fc)) + (i64.store offset=0x2fd align=1 (i32.const 0) (local.get 0x2fd)) + (i64.store offset=0x2fe align=1 (i32.const 0) (local.get 0x2fe)) + (i64.store offset=0x2ff align=1 (i32.const 0) (local.get 0x2ff)) + (i64.store offset=0x300 align=1 (i32.const 0) (local.get 0x300)) + (i64.store offset=0x301 align=1 (i32.const 0) (local.get 0x301)) + (i64.store offset=0x302 align=1 (i32.const 0) (local.get 0x302)) + (i64.store offset=0x303 align=1 (i32.const 0) (local.get 0x303)) + (i64.store offset=0x304 align=1 (i32.const 0) (local.get 0x304)) + (i64.store offset=0x305 align=1 (i32.const 0) (local.get 0x305)) + (i64.store offset=0x306 align=1 (i32.const 0) (local.get 0x306)) + (i64.store offset=0x307 align=1 (i32.const 0) (local.get 0x307)) + (i64.store offset=0x308 align=1 (i32.const 0) (local.get 0x308)) + (i64.store offset=0x309 align=1 (i32.const 0) (local.get 0x309)) + (i64.store offset=0x30a align=1 (i32.const 0) (local.get 0x30a)) + (i64.store offset=0x30b align=1 (i32.const 0) (local.get 0x30b)) + (i64.store offset=0x30c align=1 (i32.const 0) (local.get 0x30c)) + (i64.store offset=0x30d align=1 (i32.const 0) (local.get 0x30d)) + (i64.store offset=0x30e align=1 (i32.const 0) (local.get 0x30e)) + (i64.store offset=0x30f align=1 (i32.const 0) (local.get 0x30f)) + (i64.store offset=0x310 align=1 (i32.const 0) (local.get 0x310)) + (i64.store offset=0x311 align=1 (i32.const 0) (local.get 0x311)) + (i64.store offset=0x312 align=1 (i32.const 0) (local.get 0x312)) + (i64.store offset=0x313 align=1 (i32.const 0) (local.get 0x313)) + (i64.store offset=0x314 align=1 (i32.const 0) (local.get 0x314)) + (i64.store offset=0x315 align=1 (i32.const 0) (local.get 0x315)) + (i64.store offset=0x316 align=1 (i32.const 0) (local.get 0x316)) + (i64.store offset=0x317 align=1 (i32.const 0) (local.get 0x317)) + (i64.store offset=0x318 align=1 (i32.const 0) (local.get 0x318)) + (i64.store offset=0x319 align=1 (i32.const 0) (local.get 0x319)) + (i64.store offset=0x31a align=1 (i32.const 0) (local.get 0x31a)) + (i64.store offset=0x31b align=1 (i32.const 0) (local.get 0x31b)) + (i64.store offset=0x31c align=1 (i32.const 0) (local.get 0x31c)) + (i64.store offset=0x31d align=1 (i32.const 0) (local.get 0x31d)) + (i64.store offset=0x31e align=1 (i32.const 0) (local.get 0x31e)) + (i64.store offset=0x31f align=1 (i32.const 0) (local.get 0x31f)) + (i64.store offset=0x320 align=1 (i32.const 0) (local.get 0x320)) + (i64.store offset=0x321 align=1 (i32.const 0) (local.get 0x321)) + (i64.store offset=0x322 align=1 (i32.const 0) (local.get 0x322)) + (i64.store offset=0x323 align=1 (i32.const 0) (local.get 0x323)) + (i64.store offset=0x324 align=1 (i32.const 0) (local.get 0x324)) + (i64.store offset=0x325 align=1 (i32.const 0) (local.get 0x325)) + (i64.store offset=0x326 align=1 (i32.const 0) (local.get 0x326)) + (i64.store offset=0x327 align=1 (i32.const 0) (local.get 0x327)) + (i64.store offset=0x328 align=1 (i32.const 0) (local.get 0x328)) + (i64.store offset=0x329 align=1 (i32.const 0) (local.get 0x329)) + (i64.store offset=0x32a align=1 (i32.const 0) (local.get 0x32a)) + (i64.store offset=0x32b align=1 (i32.const 0) (local.get 0x32b)) + (i64.store offset=0x32c align=1 (i32.const 0) (local.get 0x32c)) + (i64.store offset=0x32d align=1 (i32.const 0) (local.get 0x32d)) + (i64.store offset=0x32e align=1 (i32.const 0) (local.get 0x32e)) + (i64.store offset=0x32f align=1 (i32.const 0) (local.get 0x32f)) + (i64.store offset=0x330 align=1 (i32.const 0) (local.get 0x330)) + (i64.store offset=0x331 align=1 (i32.const 0) (local.get 0x331)) + (i64.store offset=0x332 align=1 (i32.const 0) (local.get 0x332)) + (i64.store offset=0x333 align=1 (i32.const 0) (local.get 0x333)) + (i64.store offset=0x334 align=1 (i32.const 0) (local.get 0x334)) + (i64.store offset=0x335 align=1 (i32.const 0) (local.get 0x335)) + (i64.store offset=0x336 align=1 (i32.const 0) (local.get 0x336)) + (i64.store offset=0x337 align=1 (i32.const 0) (local.get 0x337)) + (i64.store offset=0x338 align=1 (i32.const 0) (local.get 0x338)) + (i64.store offset=0x339 align=1 (i32.const 0) (local.get 0x339)) + (i64.store offset=0x33a align=1 (i32.const 0) (local.get 0x33a)) + (i64.store offset=0x33b align=1 (i32.const 0) (local.get 0x33b)) + (i64.store offset=0x33c align=1 (i32.const 0) (local.get 0x33c)) + (i64.store offset=0x33d align=1 (i32.const 0) (local.get 0x33d)) + (i64.store offset=0x33e align=1 (i32.const 0) (local.get 0x33e)) + (i64.store offset=0x33f align=1 (i32.const 0) (local.get 0x33f)) + (i64.store offset=0x340 align=1 (i32.const 0) (local.get 0x340)) + (i64.store offset=0x341 align=1 (i32.const 0) (local.get 0x341)) + (i64.store offset=0x342 align=1 (i32.const 0) (local.get 0x342)) + (i64.store offset=0x343 align=1 (i32.const 0) (local.get 0x343)) + (i64.store offset=0x344 align=1 (i32.const 0) (local.get 0x344)) + (i64.store offset=0x345 align=1 (i32.const 0) (local.get 0x345)) + (i64.store offset=0x346 align=1 (i32.const 0) (local.get 0x346)) + (i64.store offset=0x347 align=1 (i32.const 0) (local.get 0x347)) + (i64.store offset=0x348 align=1 (i32.const 0) (local.get 0x348)) + (i64.store offset=0x349 align=1 (i32.const 0) (local.get 0x349)) + (i64.store offset=0x34a align=1 (i32.const 0) (local.get 0x34a)) + (i64.store offset=0x34b align=1 (i32.const 0) (local.get 0x34b)) + (i64.store offset=0x34c align=1 (i32.const 0) (local.get 0x34c)) + (i64.store offset=0x34d align=1 (i32.const 0) (local.get 0x34d)) + (i64.store offset=0x34e align=1 (i32.const 0) (local.get 0x34e)) + (i64.store offset=0x34f align=1 (i32.const 0) (local.get 0x34f)) + (i64.store offset=0x350 align=1 (i32.const 0) (local.get 0x350)) + (i64.store offset=0x351 align=1 (i32.const 0) (local.get 0x351)) + (i64.store offset=0x352 align=1 (i32.const 0) (local.get 0x352)) + (i64.store offset=0x353 align=1 (i32.const 0) (local.get 0x353)) + (i64.store offset=0x354 align=1 (i32.const 0) (local.get 0x354)) + (i64.store offset=0x355 align=1 (i32.const 0) (local.get 0x355)) + (i64.store offset=0x356 align=1 (i32.const 0) (local.get 0x356)) + (i64.store offset=0x357 align=1 (i32.const 0) (local.get 0x357)) + (i64.store offset=0x358 align=1 (i32.const 0) (local.get 0x358)) + (i64.store offset=0x359 align=1 (i32.const 0) (local.get 0x359)) + (i64.store offset=0x35a align=1 (i32.const 0) (local.get 0x35a)) + (i64.store offset=0x35b align=1 (i32.const 0) (local.get 0x35b)) + (i64.store offset=0x35c align=1 (i32.const 0) (local.get 0x35c)) + (i64.store offset=0x35d align=1 (i32.const 0) (local.get 0x35d)) + (i64.store offset=0x35e align=1 (i32.const 0) (local.get 0x35e)) + (i64.store offset=0x35f align=1 (i32.const 0) (local.get 0x35f)) + (i64.store offset=0x360 align=1 (i32.const 0) (local.get 0x360)) + (i64.store offset=0x361 align=1 (i32.const 0) (local.get 0x361)) + (i64.store offset=0x362 align=1 (i32.const 0) (local.get 0x362)) + (i64.store offset=0x363 align=1 (i32.const 0) (local.get 0x363)) + (i64.store offset=0x364 align=1 (i32.const 0) (local.get 0x364)) + (i64.store offset=0x365 align=1 (i32.const 0) (local.get 0x365)) + (i64.store offset=0x366 align=1 (i32.const 0) (local.get 0x366)) + (i64.store offset=0x367 align=1 (i32.const 0) (local.get 0x367)) + (i64.store offset=0x368 align=1 (i32.const 0) (local.get 0x368)) + (i64.store offset=0x369 align=1 (i32.const 0) (local.get 0x369)) + (i64.store offset=0x36a align=1 (i32.const 0) (local.get 0x36a)) + (i64.store offset=0x36b align=1 (i32.const 0) (local.get 0x36b)) + (i64.store offset=0x36c align=1 (i32.const 0) (local.get 0x36c)) + (i64.store offset=0x36d align=1 (i32.const 0) (local.get 0x36d)) + (i64.store offset=0x36e align=1 (i32.const 0) (local.get 0x36e)) + (i64.store offset=0x36f align=1 (i32.const 0) (local.get 0x36f)) + (i64.store offset=0x370 align=1 (i32.const 0) (local.get 0x370)) + (i64.store offset=0x371 align=1 (i32.const 0) (local.get 0x371)) + (i64.store offset=0x372 align=1 (i32.const 0) (local.get 0x372)) + (i64.store offset=0x373 align=1 (i32.const 0) (local.get 0x373)) + (i64.store offset=0x374 align=1 (i32.const 0) (local.get 0x374)) + (i64.store offset=0x375 align=1 (i32.const 0) (local.get 0x375)) + (i64.store offset=0x376 align=1 (i32.const 0) (local.get 0x376)) + (i64.store offset=0x377 align=1 (i32.const 0) (local.get 0x377)) + (i64.store offset=0x378 align=1 (i32.const 0) (local.get 0x378)) + (i64.store offset=0x379 align=1 (i32.const 0) (local.get 0x379)) + (i64.store offset=0x37a align=1 (i32.const 0) (local.get 0x37a)) + (i64.store offset=0x37b align=1 (i32.const 0) (local.get 0x37b)) + (i64.store offset=0x37c align=1 (i32.const 0) (local.get 0x37c)) + (i64.store offset=0x37d align=1 (i32.const 0) (local.get 0x37d)) + (i64.store offset=0x37e align=1 (i32.const 0) (local.get 0x37e)) + (i64.store offset=0x37f align=1 (i32.const 0) (local.get 0x37f)) + (i64.store offset=0x380 align=1 (i32.const 0) (local.get 0x380)) + (i64.store offset=0x381 align=1 (i32.const 0) (local.get 0x381)) + (i64.store offset=0x382 align=1 (i32.const 0) (local.get 0x382)) + (i64.store offset=0x383 align=1 (i32.const 0) (local.get 0x383)) + (i64.store offset=0x384 align=1 (i32.const 0) (local.get 0x384)) + (i64.store offset=0x385 align=1 (i32.const 0) (local.get 0x385)) + (i64.store offset=0x386 align=1 (i32.const 0) (local.get 0x386)) + (i64.store offset=0x387 align=1 (i32.const 0) (local.get 0x387)) + (i64.store offset=0x388 align=1 (i32.const 0) (local.get 0x388)) + (i64.store offset=0x389 align=1 (i32.const 0) (local.get 0x389)) + (i64.store offset=0x38a align=1 (i32.const 0) (local.get 0x38a)) + (i64.store offset=0x38b align=1 (i32.const 0) (local.get 0x38b)) + (i64.store offset=0x38c align=1 (i32.const 0) (local.get 0x38c)) + (i64.store offset=0x38d align=1 (i32.const 0) (local.get 0x38d)) + (i64.store offset=0x38e align=1 (i32.const 0) (local.get 0x38e)) + (i64.store offset=0x38f align=1 (i32.const 0) (local.get 0x38f)) + (i64.store offset=0x390 align=1 (i32.const 0) (local.get 0x390)) + (i64.store offset=0x391 align=1 (i32.const 0) (local.get 0x391)) + (i64.store offset=0x392 align=1 (i32.const 0) (local.get 0x392)) + (i64.store offset=0x393 align=1 (i32.const 0) (local.get 0x393)) + (i64.store offset=0x394 align=1 (i32.const 0) (local.get 0x394)) + (i64.store offset=0x395 align=1 (i32.const 0) (local.get 0x395)) + (i64.store offset=0x396 align=1 (i32.const 0) (local.get 0x396)) + (i64.store offset=0x397 align=1 (i32.const 0) (local.get 0x397)) + (i64.store offset=0x398 align=1 (i32.const 0) (local.get 0x398)) + (i64.store offset=0x399 align=1 (i32.const 0) (local.get 0x399)) + (i64.store offset=0x39a align=1 (i32.const 0) (local.get 0x39a)) + (i64.store offset=0x39b align=1 (i32.const 0) (local.get 0x39b)) + (i64.store offset=0x39c align=1 (i32.const 0) (local.get 0x39c)) + (i64.store offset=0x39d align=1 (i32.const 0) (local.get 0x39d)) + (i64.store offset=0x39e align=1 (i32.const 0) (local.get 0x39e)) + (i64.store offset=0x39f align=1 (i32.const 0) (local.get 0x39f)) + (i64.store offset=0x3a0 align=1 (i32.const 0) (local.get 0x3a0)) + (i64.store offset=0x3a1 align=1 (i32.const 0) (local.get 0x3a1)) + (i64.store offset=0x3a2 align=1 (i32.const 0) (local.get 0x3a2)) + (i64.store offset=0x3a3 align=1 (i32.const 0) (local.get 0x3a3)) + (i64.store offset=0x3a4 align=1 (i32.const 0) (local.get 0x3a4)) + (i64.store offset=0x3a5 align=1 (i32.const 0) (local.get 0x3a5)) + (i64.store offset=0x3a6 align=1 (i32.const 0) (local.get 0x3a6)) + (i64.store offset=0x3a7 align=1 (i32.const 0) (local.get 0x3a7)) + (i64.store offset=0x3a8 align=1 (i32.const 0) (local.get 0x3a8)) + (i64.store offset=0x3a9 align=1 (i32.const 0) (local.get 0x3a9)) + (i64.store offset=0x3aa align=1 (i32.const 0) (local.get 0x3aa)) + (i64.store offset=0x3ab align=1 (i32.const 0) (local.get 0x3ab)) + (i64.store offset=0x3ac align=1 (i32.const 0) (local.get 0x3ac)) + (i64.store offset=0x3ad align=1 (i32.const 0) (local.get 0x3ad)) + (i64.store offset=0x3ae align=1 (i32.const 0) (local.get 0x3ae)) + (i64.store offset=0x3af align=1 (i32.const 0) (local.get 0x3af)) + (i64.store offset=0x3b0 align=1 (i32.const 0) (local.get 0x3b0)) + (i64.store offset=0x3b1 align=1 (i32.const 0) (local.get 0x3b1)) + (i64.store offset=0x3b2 align=1 (i32.const 0) (local.get 0x3b2)) + (i64.store offset=0x3b3 align=1 (i32.const 0) (local.get 0x3b3)) + (i64.store offset=0x3b4 align=1 (i32.const 0) (local.get 0x3b4)) + (i64.store offset=0x3b5 align=1 (i32.const 0) (local.get 0x3b5)) + (i64.store offset=0x3b6 align=1 (i32.const 0) (local.get 0x3b6)) + (i64.store offset=0x3b7 align=1 (i32.const 0) (local.get 0x3b7)) + (i64.store offset=0x3b8 align=1 (i32.const 0) (local.get 0x3b8)) + (i64.store offset=0x3b9 align=1 (i32.const 0) (local.get 0x3b9)) + (i64.store offset=0x3ba align=1 (i32.const 0) (local.get 0x3ba)) + (i64.store offset=0x3bb align=1 (i32.const 0) (local.get 0x3bb)) + (i64.store offset=0x3bc align=1 (i32.const 0) (local.get 0x3bc)) + (i64.store offset=0x3bd align=1 (i32.const 0) (local.get 0x3bd)) + (i64.store offset=0x3be align=1 (i32.const 0) (local.get 0x3be)) + (i64.store offset=0x3bf align=1 (i32.const 0) (local.get 0x3bf)) + (i64.store offset=0x3c0 align=1 (i32.const 0) (local.get 0x3c0)) + (i64.store offset=0x3c1 align=1 (i32.const 0) (local.get 0x3c1)) + (i64.store offset=0x3c2 align=1 (i32.const 0) (local.get 0x3c2)) + (i64.store offset=0x3c3 align=1 (i32.const 0) (local.get 0x3c3)) + (i64.store offset=0x3c4 align=1 (i32.const 0) (local.get 0x3c4)) + (i64.store offset=0x3c5 align=1 (i32.const 0) (local.get 0x3c5)) + (i64.store offset=0x3c6 align=1 (i32.const 0) (local.get 0x3c6)) + (i64.store offset=0x3c7 align=1 (i32.const 0) (local.get 0x3c7)) + (i64.store offset=0x3c8 align=1 (i32.const 0) (local.get 0x3c8)) + (i64.store offset=0x3c9 align=1 (i32.const 0) (local.get 0x3c9)) + (i64.store offset=0x3ca align=1 (i32.const 0) (local.get 0x3ca)) + (i64.store offset=0x3cb align=1 (i32.const 0) (local.get 0x3cb)) + (i64.store offset=0x3cc align=1 (i32.const 0) (local.get 0x3cc)) + (i64.store offset=0x3cd align=1 (i32.const 0) (local.get 0x3cd)) + (i64.store offset=0x3ce align=1 (i32.const 0) (local.get 0x3ce)) + (i64.store offset=0x3cf align=1 (i32.const 0) (local.get 0x3cf)) + (i64.store offset=0x3d0 align=1 (i32.const 0) (local.get 0x3d0)) + (i64.store offset=0x3d1 align=1 (i32.const 0) (local.get 0x3d1)) + (i64.store offset=0x3d2 align=1 (i32.const 0) (local.get 0x3d2)) + (i64.store offset=0x3d3 align=1 (i32.const 0) (local.get 0x3d3)) + (i64.store offset=0x3d4 align=1 (i32.const 0) (local.get 0x3d4)) + (i64.store offset=0x3d5 align=1 (i32.const 0) (local.get 0x3d5)) + (i64.store offset=0x3d6 align=1 (i32.const 0) (local.get 0x3d6)) + (i64.store offset=0x3d7 align=1 (i32.const 0) (local.get 0x3d7)) + (i64.store offset=0x3d8 align=1 (i32.const 0) (local.get 0x3d8)) + (i64.store offset=0x3d9 align=1 (i32.const 0) (local.get 0x3d9)) + (i64.store offset=0x3da align=1 (i32.const 0) (local.get 0x3da)) + (i64.store offset=0x3db align=1 (i32.const 0) (local.get 0x3db)) + (i64.store offset=0x3dc align=1 (i32.const 0) (local.get 0x3dc)) + (i64.store offset=0x3dd align=1 (i32.const 0) (local.get 0x3dd)) + (i64.store offset=0x3de align=1 (i32.const 0) (local.get 0x3de)) + (i64.store offset=0x3df align=1 (i32.const 0) (local.get 0x3df)) + (i64.store offset=0x3e0 align=1 (i32.const 0) (local.get 0x3e0)) + (i64.store offset=0x3e1 align=1 (i32.const 0) (local.get 0x3e1)) + (i64.store offset=0x3e2 align=1 (i32.const 0) (local.get 0x3e2)) + (i64.store offset=0x3e3 align=1 (i32.const 0) (local.get 0x3e3)) + (i64.store offset=0x3e4 align=1 (i32.const 0) (local.get 0x3e4)) + (i64.store offset=0x3e5 align=1 (i32.const 0) (local.get 0x3e5)) + (i64.store offset=0x3e6 align=1 (i32.const 0) (local.get 0x3e6)) + (i64.store offset=0x3e7 align=1 (i32.const 0) (local.get 0x3e7)) + (i64.store offset=0x3e8 align=1 (i32.const 0) (local.get 0x3e8)) + (i64.store offset=0x3e9 align=1 (i32.const 0) (local.get 0x3e9)) + (i64.store offset=0x3ea align=1 (i32.const 0) (local.get 0x3ea)) + (i64.store offset=0x3eb align=1 (i32.const 0) (local.get 0x3eb)) + (i64.store offset=0x3ec align=1 (i32.const 0) (local.get 0x3ec)) + (i64.store offset=0x3ed align=1 (i32.const 0) (local.get 0x3ed)) + (i64.store offset=0x3ee align=1 (i32.const 0) (local.get 0x3ee)) + (i64.store offset=0x3ef align=1 (i32.const 0) (local.get 0x3ef)) + (i64.store offset=0x3f0 align=1 (i32.const 0) (local.get 0x3f0)) + (i64.store offset=0x3f1 align=1 (i32.const 0) (local.get 0x3f1)) + (i64.store offset=0x3f2 align=1 (i32.const 0) (local.get 0x3f2)) + (i64.store offset=0x3f3 align=1 (i32.const 0) (local.get 0x3f3)) + (i64.store offset=0x3f4 align=1 (i32.const 0) (local.get 0x3f4)) + (i64.store offset=0x3f5 align=1 (i32.const 0) (local.get 0x3f5)) + (i64.store offset=0x3f6 align=1 (i32.const 0) (local.get 0x3f6)) + (i64.store offset=0x3f7 align=1 (i32.const 0) (local.get 0x3f7)) + (i64.store offset=0x3f8 align=1 (i32.const 0) (local.get 0x3f8)) + (i64.store offset=0x3f9 align=1 (i32.const 0) (local.get 0x3f9)) + (i64.store offset=0x3fa align=1 (i32.const 0) (local.get 0x3fa)) + (i64.store offset=0x3fb align=1 (i32.const 0) (local.get 0x3fb)) + (i64.store offset=0x3fc align=1 (i32.const 0) (local.get 0x3fc)) + (i64.store offset=0x3fd align=1 (i32.const 0) (local.get 0x3fd)) + (i64.store offset=0x3fe align=1 (i32.const 0) (local.get 0x3fe)) + (i64.store offset=0x3ff align=1 (i32.const 0) (local.get 0x3ff)) + (i64.store offset=0x400 align=1 (i32.const 0) (local.get 0x400)) + (i64.store offset=0x401 align=1 (i32.const 0) (local.get 0x401)) + (i64.store offset=0x402 align=1 (i32.const 0) (local.get 0x402)) + (i64.store offset=0x403 align=1 (i32.const 0) (local.get 0x403)) + (i64.store offset=0x404 align=1 (i32.const 0) (local.get 0x404)) + (i64.store offset=0x405 align=1 (i32.const 0) (local.get 0x405)) + (i64.store offset=0x406 align=1 (i32.const 0) (local.get 0x406)) + (i64.store offset=0x407 align=1 (i32.const 0) (local.get 0x407)) + (i64.store offset=0x408 align=1 (i32.const 0) (local.get 0x408)) + (i64.store offset=0x409 align=1 (i32.const 0) (local.get 0x409)) + (i64.store offset=0x40a align=1 (i32.const 0) (local.get 0x40a)) + (i64.store offset=0x40b align=1 (i32.const 0) (local.get 0x40b)) + (i64.store offset=0x40c align=1 (i32.const 0) (local.get 0x40c)) + (i64.store offset=0x40d align=1 (i32.const 0) (local.get 0x40d)) + (i64.store offset=0x40e align=1 (i32.const 0) (local.get 0x40e)) + (i64.store offset=0x40f align=1 (i32.const 0) (local.get 0x40f)) + (i64.store offset=0x410 align=1 (i32.const 0) (local.get 0x410)) + (i64.store offset=0x411 align=1 (i32.const 0) (local.get 0x411)) + (i64.store offset=0x412 align=1 (i32.const 0) (local.get 0x412)) + (i64.store offset=0x413 align=1 (i32.const 0) (local.get 0x413)) + (i64.store offset=0x414 align=1 (i32.const 0) (local.get 0x414)) + (i64.store offset=0x415 align=1 (i32.const 0) (local.get 0x415)) + (i64.store offset=0x416 align=1 (i32.const 0) (local.get 0x416)) + (i64.store offset=0x417 align=1 (i32.const 0) (local.get 0x417)) + (i64.store offset=0x418 align=1 (i32.const 0) (local.get 0x418)) + (i64.store offset=0x419 align=1 (i32.const 0) (local.get 0x419)) + (i64.store offset=0x41a align=1 (i32.const 0) (local.get 0x41a)) + (i64.store offset=0x41b align=1 (i32.const 0) (local.get 0x41b)) + (i64.store offset=0x41c align=1 (i32.const 0) (local.get 0x41c)) + (i64.store offset=0x41d align=1 (i32.const 0) (local.get 0x41d)) + (i64.store offset=0x41e align=1 (i32.const 0) (local.get 0x41e)) + (i64.store offset=0x41f align=1 (i32.const 0) (local.get 0x41f)) + ) +) diff --git a/client/executor-wasmtime/src/tests.rs b/client/executor-wasmtime/src/tests.rs new file mode 100644 index 00000000..c370b1ca --- /dev/null +++ b/client/executor-wasmtime/src/tests.rs @@ -0,0 +1,557 @@ +// This file is part of Substrate. + +// Copyright (C) Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +//! Focused WAT-based coverage for the wasmtime executor adapter. +//! +//! Upstream's suite also exercises a full `sc-runtime-test` WASM blob. That crate is not +//! published, so Quantus keeps the WAT-only tests (stack limits, NaN canonicalization, +//! memory growth, precompiled artifacts, instantiation strategies) and rewrites the few +//! cases that previously depended on the unpublished blob. + +use codec::{Decode as _, Encode as _}; +use sc_executor_common::{ + error::Error, + runtime_blob::RuntimeBlob, + wasm_runtime::{HeapAllocStrategy, WasmModule, DEFAULT_HEAP_ALLOC_STRATEGY}, +}; + +use crate::InstantiationStrategy; + +/// No host functions — WAT fixtures used here do not import env helpers. +type HostFunctions = (); + +#[macro_export] +macro_rules! test_wasm_execution { + ($method_name:ident) => { + paste::item! { + #[test] + fn [<$method_name _recreate_instance_cow>]() { + $method_name( + InstantiationStrategy::RecreateInstanceCopyOnWrite + ); + } + + #[test] + fn [<$method_name _recreate_instance_vanilla>]() { + $method_name( + InstantiationStrategy::RecreateInstance + ); + } + + #[test] + fn [<$method_name _pooling_cow>]() { + $method_name( + InstantiationStrategy::PoolingCopyOnWrite + ); + } + + #[test] + fn [<$method_name _pooling_vanilla>]() { + $method_name( + InstantiationStrategy::Pooling + ); + } + } + }; +} + +struct RuntimeBuilder { + code: Option, + instantiation_strategy: InstantiationStrategy, + canonicalize_nans: bool, + deterministic_stack: bool, + heap_pages: HeapAllocStrategy, + precompile_runtime: bool, + tmpdir: Option, +} + +impl RuntimeBuilder { + fn new(instantiation_strategy: InstantiationStrategy) -> Self { + Self { + code: None, + instantiation_strategy, + canonicalize_nans: false, + deterministic_stack: false, + heap_pages: DEFAULT_HEAP_ALLOC_STRATEGY, + precompile_runtime: false, + tmpdir: None, + } + } + + fn use_wat(mut self, code: String) -> Self { + self.code = Some(code); + self + } + + fn canonicalize_nans(mut self, canonicalize_nans: bool) -> Self { + self.canonicalize_nans = canonicalize_nans; + self + } + + fn deterministic_stack(mut self, deterministic_stack: bool) -> Self { + self.deterministic_stack = deterministic_stack; + self + } + + fn precompile_runtime(mut self, precompile_runtime: bool) -> Self { + self.precompile_runtime = precompile_runtime; + self + } + + fn heap_alloc_strategy(mut self, heap_pages: HeapAllocStrategy) -> Self { + self.heap_pages = heap_pages; + self + } + + fn build(&mut self) -> impl WasmModule + '_ { + let blob = { + let wasm: Vec; + + let wasm = match self.code { + None => panic!("WAT fixture required (sc-runtime-test blob is not available)"), + Some(ref wat) => { + wasm = wat::parse_str(wat).expect("wat parsing failed"); + &wasm + }, + }; + + RuntimeBlob::uncompress_if_needed(&wasm) + .expect("failed to create a runtime blob out of test runtime") + }; + + let config = crate::Config { + allow_missing_func_imports: true, + cache_path: None, + semantics: crate::Semantics { + instantiation_strategy: self.instantiation_strategy, + deterministic_stack_limit: match self.deterministic_stack { + true => Some(crate::DeterministicStackLimit { + logical_max: 65536, + native_stack_max: 256 * 1024 * 1024, + }), + false => None, + }, + canonicalize_nans: self.canonicalize_nans, + parallel_compilation: true, + heap_alloc_strategy: self.heap_pages, + wasm_multi_value: false, + wasm_bulk_memory: false, + wasm_reference_types: false, + wasm_simd: false, + }, + }; + + if self.precompile_runtime { + let dir = tempfile::tempdir().unwrap(); + let path = dir.path().join("runtime.bin"); + + // Delay the removal of the temporary directory until we're dropped. + self.tmpdir = Some(dir); + + let artifact = crate::prepare_runtime_artifact(blob, &config.semantics).unwrap(); + std::fs::write(&path, artifact).unwrap(); + unsafe { crate::create_runtime_from_artifact::(&path, config) } + } else { + crate::create_runtime::(blob, config) + } + .expect("cannot create runtime") + } +} + +fn deep_call_stack_wat(depth: usize) -> String { + format!( + r#" + (module + (memory $0 32) + (export "memory" (memory $0)) + (global (export "__heap_base") i32 (i32.const 0)) + (func (export "overflow") call 0) + + (func $overflow (param $0 i32) + (block $label$1 + (br_if $label$1 + (i32.ge_u + (local.get $0) + (i32.const {depth}) + ) + ) + (call $overflow + (i32.add + (local.get $0) + (i32.const 1) + ) + ) + ) + ) + + (func (export "main") + (param i32 i32) (result i64) + (call $overflow (i32.const 0)) + (i64.const 0) + ) + ) + "# + ) +} + +// These two tests ensure that the `wasmtime`'s stack size limit and the amount of +// stack space used by a single stack frame doesn't suddenly change without us noticing. +// +// If they do (e.g. because we've pulled in a new version of `wasmtime`) we want to know +// that it did, regardless of how small the change was. +// +// If these tests starting failing it doesn't necessarily mean that something is broken; +// what it means is that one (or multiple) of the following has to be done: +// a) the tests may need to be updated for the new call depth, +// b) the stack limit may need to be changed to maintain backwards compatibility, +// c) the root cause of the new call depth limit determined, and potentially fixed, +// d) the new call depth limit may need to be validated to ensure it doesn't prevent any +// existing chain from syncing (if it was effectively decreased) + +// We need two limits here since depending on whether the code is compiled in debug +// or in release mode the maximum call depth is slightly different. +const CALL_DEPTH_LOWER_LIMIT: usize = 65451; +const CALL_DEPTH_UPPER_LIMIT: usize = 65506; + +test_wasm_execution!(test_consume_under_1mb_of_stack_does_not_trap); +fn test_consume_under_1mb_of_stack_does_not_trap(instantiation_strategy: InstantiationStrategy) { + let wat = deep_call_stack_wat(CALL_DEPTH_LOWER_LIMIT); + let mut builder = RuntimeBuilder::new(instantiation_strategy).use_wat(wat); + let runtime = builder.build(); + let mut instance = runtime.new_instance().expect("failed to instantiate a runtime"); + instance.call_export("main", &[]).unwrap(); +} + +test_wasm_execution!(test_consume_over_1mb_of_stack_does_trap); +fn test_consume_over_1mb_of_stack_does_trap(instantiation_strategy: InstantiationStrategy) { + let wat = deep_call_stack_wat(CALL_DEPTH_UPPER_LIMIT + 1); + let mut builder = RuntimeBuilder::new(instantiation_strategy).use_wat(wat); + let runtime = builder.build(); + let mut instance = runtime.new_instance().expect("failed to instantiate a runtime"); + match instance.call_export("main", &[]).unwrap_err() { + Error::AbortedDueToTrap(error) => { + let expected = "wasm trap: call stack exhausted"; + assert_eq!(error.message, expected); + }, + error => panic!("unexpected error: {:?}", error), + } +} + +/// WAT stand-in for upstream's `sc-runtime-test` `test_fp_f32add` export. +fn nan_canonicalization_wat() -> String { + r#" + (module + (memory $0 1) + (export "memory" (memory $0)) + (global (export "__heap_base") i32 (i32.const 65536)) + (func (export "test_fp_f32add") (param $ptr i32) (param $len i32) (result i64) + (local $sum f32) + ;; SCALE-encoded ([u8;4], [u8;4]) is 8 raw little-endian bytes. + (local.set $sum + (f32.add + (f32.load (local.get $ptr)) + (f32.load (i32.add (local.get $ptr) (i32.const 4))) + ) + ) + (f32.store (local.get $ptr) (local.get $sum)) + ;; pack_ptr_and_len(ptr, 4) + (i64.or + (i64.extend_i32_u (local.get $ptr)) + (i64.shl (i64.const 4) (i64.const 32)) + ) + ) + ) + "# + .into() +} + +test_wasm_execution!(test_nan_canonicalization); +fn test_nan_canonicalization(instantiation_strategy: InstantiationStrategy) { + let mut builder = RuntimeBuilder::new(instantiation_strategy) + .use_wat(nan_canonicalization_wat()) + .canonicalize_nans(true); + let runtime = builder.build(); + + let mut instance = runtime.new_instance().expect("failed to instantiate a runtime"); + + /// A NaN with canonical payload bits. + const CANONICAL_NAN_BITS: u32 = 0x7fc00000; + /// A NaN value with an arbitrary payload. + const ARBITRARY_NAN_BITS: u32 = 0x7f812345; + + // This test works like this: we essentially do + // + // a + b + // + // where + // + // * a is a nan with arbitrary bits in its payload + // * b is 1. + // + // according to the wasm spec, if one of the inputs to the operation is a non-canonical NaN + // then the value be a NaN with non-deterministic payload bits. + // + // However, with the `canonicalize_nans` option turned on above, we expect that the output will + // be a canonical NaN. + // + // We extrapolate the results of this tests so that we assume that all intermediate computations + // that involve floats are sanitized and cannot produce a non-deterministic NaN. + + let params = (u32::to_le_bytes(ARBITRARY_NAN_BITS), u32::to_le_bytes(1)).encode(); + let res = { + let raw_result = instance.call_export("test_fp_f32add", ¶ms).unwrap(); + u32::from_le_bytes(<[u8; 4]>::decode(&mut &raw_result[..]).unwrap()) + }; + assert_eq!(res, CANONICAL_NAN_BITS); +} + +test_wasm_execution!(test_stack_depth_reaching); +fn test_stack_depth_reaching(instantiation_strategy: InstantiationStrategy) { + const TEST_GUARD_PAGE_SKIP: &str = include_str!("test-guard-page-skip.wat"); + + let mut builder = RuntimeBuilder::new(instantiation_strategy) + .use_wat(TEST_GUARD_PAGE_SKIP.to_string()) + .deterministic_stack(true); + + let runtime = builder.build(); + let mut instance = runtime.new_instance().expect("failed to instantiate a runtime"); + + match instance.call_export("test-many-locals", &[]).unwrap_err() { + Error::AbortedDueToTrap(error) => { + let expected = "wasm trap: wasm `unreachable` instruction executed"; + assert_eq!(error.message, expected); + }, + error => panic!("unexpected error: {:?}", error), + } +} + +test_wasm_execution!(test_max_memory_pages_imported_memory_without_precompilation); +fn test_max_memory_pages_imported_memory_without_precompilation( + instantiation_strategy: InstantiationStrategy, +) { + test_max_memory_pages(instantiation_strategy, true, false); +} + +test_wasm_execution!(test_max_memory_pages_exported_memory_without_precompilation); +fn test_max_memory_pages_exported_memory_without_precompilation( + instantiation_strategy: InstantiationStrategy, +) { + test_max_memory_pages(instantiation_strategy, false, false); +} + +test_wasm_execution!(test_max_memory_pages_imported_memory_with_precompilation); +fn test_max_memory_pages_imported_memory_with_precompilation( + instantiation_strategy: InstantiationStrategy, +) { + test_max_memory_pages(instantiation_strategy, true, true); +} + +test_wasm_execution!(test_max_memory_pages_exported_memory_with_precompilation); +fn test_max_memory_pages_exported_memory_with_precompilation( + instantiation_strategy: InstantiationStrategy, +) { + test_max_memory_pages(instantiation_strategy, false, true); +} + +fn test_max_memory_pages( + instantiation_strategy: InstantiationStrategy, + import_memory: bool, + precompile_runtime: bool, +) { + fn call( + heap_alloc_strategy: HeapAllocStrategy, + wat: String, + instantiation_strategy: InstantiationStrategy, + precompile_runtime: bool, + ) -> Result<(), Box> { + let mut builder = RuntimeBuilder::new(instantiation_strategy) + .use_wat(wat) + .heap_alloc_strategy(heap_alloc_strategy) + .precompile_runtime(precompile_runtime); + + let runtime = builder.build(); + let mut instance = runtime.new_instance().unwrap(); + instance.call_export("main", &[])?; + Ok(()) + } + + fn memory(initial: u32, maximum: u32, import: bool) -> String { + let memory = format!("(memory $0 {} {})", initial, maximum); + + if import { + format!("(import \"env\" \"memory\" {})", memory) + } else { + format!("{}\n(export \"memory\" (memory $0))", memory) + } + } + + let assert_grow_ok = |alloc_strategy: HeapAllocStrategy, initial_pages: u32, max_pages: u32| { + eprintln!("assert_grow_ok({alloc_strategy:?}, {initial_pages}, {max_pages})"); + + call( + alloc_strategy, + format!( + r#" + (module + {} + (global (export "__heap_base") i32 (i32.const 0)) + (func (export "main") + (param i32 i32) (result i64) + + ;; assert(memory.grow returns != -1) + (if + (i32.eq + (memory.grow + (i32.const 1) + ) + (i32.const -1) + ) + (then + (unreachable) + ) + ) + + (i64.const 0) + ) + ) + "#, + memory(initial_pages, max_pages, import_memory) + ), + instantiation_strategy, + precompile_runtime, + ) + .unwrap() + }; + + let assert_grow_fail = + |alloc_strategy: HeapAllocStrategy, initial_pages: u32, max_pages: u32| { + eprintln!("assert_grow_fail({alloc_strategy:?}, {initial_pages}, {max_pages})"); + + call( + alloc_strategy, + format!( + r#" + (module + {} + (global (export "__heap_base") i32 (i32.const 0)) + (func (export "main") + (param i32 i32) (result i64) + + ;; assert(memory.grow returns == -1) + (if + (i32.ne + (memory.grow + (i32.const 1) + ) + (i32.const -1) + ) + (then + (unreachable) + ) + ) + + (i64.const 0) + ) + ) + "#, + memory(initial_pages, max_pages, import_memory) + ), + instantiation_strategy, + precompile_runtime, + ) + .unwrap() + }; + + assert_grow_ok(HeapAllocStrategy::Dynamic { maximum_pages: Some(10) }, 1, 10); + assert_grow_ok(HeapAllocStrategy::Dynamic { maximum_pages: Some(10) }, 9, 10); + assert_grow_fail(HeapAllocStrategy::Dynamic { maximum_pages: Some(10) }, 10, 10); + + assert_grow_ok(HeapAllocStrategy::Dynamic { maximum_pages: None }, 1, 10); + assert_grow_ok(HeapAllocStrategy::Dynamic { maximum_pages: None }, 9, 10); + assert_grow_ok(HeapAllocStrategy::Dynamic { maximum_pages: None }, 10, 10); + + assert_grow_fail(HeapAllocStrategy::Static { extra_pages: 10 }, 1, 10); + assert_grow_fail(HeapAllocStrategy::Static { extra_pages: 10 }, 9, 10); + assert_grow_fail(HeapAllocStrategy::Static { extra_pages: 10 }, 10, 10); +} + +fn empty_return_wat() -> String { + r#" + (module + (memory $0 1) + (export "memory" (memory $0)) + (global (export "__heap_base") i32 (i32.const 65536)) + (func (export "test_empty_return") (param i32 i32) (result i64) + (i64.const 0) + ) + ) + "# + .into() +} + +// This test takes quite a while to execute in a debug build (over 6 minutes on a TR 3970x) +// so it's ignored by default unless it was compiled with `--release`. +#[cfg_attr(build_profile = "debug", ignore)] +#[test] +fn test_instances_without_reuse_are_not_leaked() { + let mut builder = RuntimeBuilder::new(InstantiationStrategy::RecreateInstance) + .use_wat(empty_return_wat()); + let runtime = builder.build(); + + // As long as the `wasmtime`'s `Store` lives the instances spawned through it + // will live indefinitely. Currently it has a maximum limit of 10k instances, + // so let's spawn 10k + 1 of them to make sure our code doesn't keep the `Store` + // alive longer than it is necessary. (And since we disabled instance reuse + // a new instance will be spawned on each call.) + let mut instance = runtime.new_instance().unwrap(); + for _ in 0..10001 { + instance.call_export("test_empty_return", &[0]).unwrap(); + } +} + +#[test] +fn test_rustix_version_matches_with_wasmtime() { + let metadata = cargo_metadata::MetadataCommand::new().exec().unwrap(); + + let wasmtime_rustix = metadata + .packages + .iter() + .find(|pkg| pkg.name.as_str() == "wasmtime") + .unwrap() + .dependencies + .iter() + .find(|dep| dep.name.as_str() == "rustix") + .unwrap(); + let our_rustix = metadata + .packages + .iter() + .find(|pkg| pkg.name.as_str() == "sc-executor-wasmtime") + .unwrap() + .dependencies + .iter() + .find(|dep| dep.name.as_str() == "rustix") + .unwrap(); + + if wasmtime_rustix.req != our_rustix.req { + panic!( + "our version of rustix ({0}) doesn't match wasmtime's ({1}); \ + bump the version in `sc-executor-wasmtime`'s `Cargo.toml' to '{1}' and try again", + our_rustix.req, wasmtime_rustix.req, + ); + } +} From 92f242a56ccff9c3d4b635f013e85041160869b7 Mon Sep 17 00:00:00 2001 From: illuzen Date: Mon, 3 Aug 2026 20:59:44 +0800 Subject: [PATCH 11/15] fix: make Protocol to litep2p P2p conversion fallible Replace the panicking expect on non-peer-id multihashes with TryFrom, add try_push/try_with, and keep legacy push/with non-panicking via a lossy placeholder fallback. Co-authored-by: Cursor --- client/network-types/src/multiaddr.rs | 63 +++++++++++++++++-- .../network-types/src/multiaddr/protocol.rs | 49 ++++++++++++--- 2 files changed, 99 insertions(+), 13 deletions(-) diff --git a/client/network-types/src/multiaddr.rs b/client/network-types/src/multiaddr.rs index 573dfb3c..f225ed9e 100644 --- a/client/network-types/src/multiaddr.rs +++ b/client/network-types/src/multiaddr.rs @@ -30,7 +30,7 @@ use std::{ }; mod protocol; -pub use protocol::Protocol; +pub use protocol::{Protocol, ProtocolConversionError}; // Re-export the macro under shorter name under `multiaddr`. pub use crate::build_multiaddr as multiaddr; @@ -50,8 +50,18 @@ impl Multiaddr { } /// Adds an address component to the end of this multiaddr. + /// + /// Prefer [`Multiaddr::try_push`] when the protocol may carry an arbitrary `/p2p` multihash. pub fn push(&mut self, p: Protocol<'_>) { - self.multiaddr.push(p.into()) + self.multiaddr.push(protocol::into_litep2p_lossy(p)) + } + + /// Fallible variant of [`Multiaddr::push`]. + /// + /// Fails if `p` is [`Protocol::P2p`] with a multihash that is not a valid peer id. + pub fn try_push(&mut self, p: Protocol<'_>) -> Result<(), ProtocolConversionError> { + self.multiaddr.push(LiteP2pProtocol::try_from(p)?); + Ok(()) } /// Pops the last `Protocol` of this multiaddr, or `None` if the multiaddr is empty. @@ -60,8 +70,15 @@ impl Multiaddr { } /// Like [`Multiaddr::push`] but consumes `self`. + /// + /// Prefer [`Multiaddr::try_with`] when the protocol may carry an arbitrary `/p2p` multihash. pub fn with(self, p: Protocol<'_>) -> Self { - self.multiaddr.with(p.into()).into() + self.multiaddr.with(protocol::into_litep2p_lossy(p)).into() + } + + /// Fallible variant of [`Multiaddr::with`]. + pub fn try_with(self, p: Protocol<'_>) -> Result { + Ok(self.multiaddr.with(LiteP2pProtocol::try_from(p)?).into()) } /// Returns the components of this multiaddress. @@ -247,13 +264,13 @@ impl<'a> FromIterator> for Multiaddr { where T: IntoIterator>, { - LiteP2pMultiaddr::from_iter(iter.into_iter().map(Into::into)).into() + LiteP2pMultiaddr::from_iter(iter.into_iter().map(protocol::into_litep2p_lossy)).into() } } impl<'a> From> for Multiaddr { fn from(p: Protocol<'a>) -> Multiaddr { - let protocol: LiteP2pProtocol = p.into(); + let protocol = protocol::into_litep2p_lossy(p); let multiaddr: LiteP2pMultiaddr = protocol.into(); multiaddr.into() } @@ -291,7 +308,9 @@ macro_rules! build_multiaddr { #[cfg(test)] mod tests { - use super::{Multiaddr, Protocol}; + use super::{Multiaddr, Protocol, ProtocolConversionError}; + use crate::multihash::Multihash; + use litep2p::types::multiaddr::Protocol as LiteP2pProtocol; use std::{net::Ipv4Addr, str::FromStr}; /// multiaddr 0.18 accepts `/webtransport`, and iteration must not panic after parse. @@ -313,4 +332,36 @@ mod tests { ); assert_eq!(address.iter().count(), 4); } + + /// sha2-512 is a valid multihash code but not a peer-id code. + fn non_peer_id_multihash() -> Multihash { + const SHA2_512: u64 = 0x13; + Multihash::wrap(SHA2_512, &[0u8; 64]).expect("64-byte digest fits Multihash<64>") + } + + #[test] + fn p2p_try_from_rejects_non_peer_id_multihash() { + let protocol = Protocol::P2p(non_peer_id_multihash()); + assert_eq!( + LiteP2pProtocol::try_from(protocol), + Err(ProtocolConversionError::InvalidPeerId) + ); + } + + #[test] + fn p2p_lossy_conversion_does_not_panic_on_non_peer_id_multihash() { + let protocol = Protocol::P2p(non_peer_id_multihash()); + // Legacy infallible paths must not panic; they substitute a placeholder peer id. + let _ = Multiaddr::empty().with(protocol); + } + + #[test] + fn try_push_rejects_non_peer_id_p2p() { + let mut addr = Multiaddr::empty(); + assert_eq!( + addr.try_push(Protocol::P2p(non_peer_id_multihash())), + Err(ProtocolConversionError::InvalidPeerId) + ); + assert_eq!(addr.iter().count(), 0); + } } diff --git a/client/network-types/src/multiaddr/protocol.rs b/client/network-types/src/multiaddr/protocol.rs index ee659131..4eba2d7a 100644 --- a/client/network-types/src/multiaddr/protocol.rs +++ b/client/network-types/src/multiaddr/protocol.rs @@ -26,6 +26,15 @@ use std::{ const LOG_TARGET: &str = "sub-libp2p"; +/// Error converting a local [`Protocol`] into a litep2p/multiaddr protocol. +#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)] +pub enum ProtocolConversionError { + /// [`Protocol::P2p`] carried a multihash that is not a valid peer id + /// (for example sha2-512, or an oversized identity digest). + #[error("p2p protocol multihash is not a valid peer id")] + InvalidPeerId, +} + /// [`Protocol`] describes all possible multiaddress protocols. #[derive(PartialEq, Eq, Clone, Debug)] pub enum Protocol<'a> { @@ -73,8 +82,10 @@ pub enum Protocol<'a> { impl Display for Protocol<'_> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - let protocol = LiteP2pProtocol::from(self.clone()); - Display::fmt(&protocol, f) + match LiteP2pProtocol::try_from(self.clone()) { + Ok(protocol) => Display::fmt(&protocol, f), + Err(ProtocolConversionError::InvalidPeerId) => f.write_str("/p2p/"), + } } } @@ -171,9 +182,11 @@ impl<'a> From> for Protocol<'a> { } } -impl<'a> From> for LiteP2pProtocol<'a> { - fn from(protocol: Protocol<'a>) -> Self { - match protocol { +impl<'a> TryFrom> for LiteP2pProtocol<'a> { + type Error = ProtocolConversionError; + + fn try_from(protocol: Protocol<'a>) -> Result { + Ok(match protocol { Protocol::Dccp(port) => LiteP2pProtocol::Dccp(port), Protocol::Dns(str) => LiteP2pProtocol::Dns(str), Protocol::Dns4(str) => LiteP2pProtocol::Dns4(str), @@ -196,7 +209,7 @@ impl<'a> From> for LiteP2pProtocol<'a> { let litep2p_multihash: litep2p::types::multihash::Multihash = multihash.into(); LiteP2pProtocol::P2p( multiaddr::PeerId::try_from(litep2p_multihash) - .expect("valid peer id multihash"), + .map_err(|_| ProtocolConversionError::InvalidPeerId)?, ) }, Protocol::P2pCircuit => LiteP2pProtocol::P2pCircuit, @@ -219,6 +232,28 @@ impl<'a> From> for LiteP2pProtocol<'a> { Protocol::Garlic32(addr) => LiteP2pProtocol::Garlic32(addr), Protocol::Sni(str) => LiteP2pProtocol::Sni(str), Protocol::P2pStardust => LiteP2pProtocol::P2pStardust, - } + }) } } + +/// Lossy conversion for legacy infallible call sites (`push` / `with`). +/// +/// Prefer [`TryFrom`] — that is the real contract for [`Protocol::P2p`]. This helper never +/// panics: invalid peer-id multihashes are replaced with a placeholder and logged. +pub(super) fn into_litep2p_lossy<'a>(protocol: Protocol<'a>) -> LiteP2pProtocol<'a> { + LiteP2pProtocol::try_from(protocol).unwrap_or_else(|err| { + log::error!( + target: LOG_TARGET, + "Failed to convert Protocol to litep2p protocol: {err}; \ + replacing invalid /p2p component with a placeholder peer id", + ); + LiteP2pProtocol::P2p(placeholder_peer_id()) + }) +} + +/// Valid peer id used only as a non-panicking stand-in for a bad `/p2p` multihash. +fn placeholder_peer_id() -> multiaddr::PeerId { + let multihash = litep2p::types::multihash::Multihash::wrap(0, &[0u8; 32]) + .expect("32-byte identity digest fits Multihash<64>"); + multiaddr::PeerId::try_from(multihash).expect("identity digests <= 42 bytes are valid peer ids") +} From be4d87267afdc6a5161e244fed5c31bb70ff8bea Mon Sep 17 00:00:00 2001 From: illuzen Date: Mon, 3 Aug 2026 21:01:14 +0800 Subject: [PATCH 12/15] fmt --- client/executor-wasmtime/src/tests.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/executor-wasmtime/src/tests.rs b/client/executor-wasmtime/src/tests.rs index c370b1ca..82724140 100644 --- a/client/executor-wasmtime/src/tests.rs +++ b/client/executor-wasmtime/src/tests.rs @@ -509,8 +509,8 @@ fn empty_return_wat() -> String { #[cfg_attr(build_profile = "debug", ignore)] #[test] fn test_instances_without_reuse_are_not_leaked() { - let mut builder = RuntimeBuilder::new(InstantiationStrategy::RecreateInstance) - .use_wat(empty_return_wat()); + let mut builder = + RuntimeBuilder::new(InstantiationStrategy::RecreateInstance).use_wat(empty_return_wat()); let runtime = builder.build(); // As long as the `wasmtime`'s `Store` lives the instances spawned through it From 71e6ce045d59c8421b0a631ca6745df3312274ff Mon Sep 17 00:00:00 2001 From: illuzen Date: Mon, 3 Aug 2026 21:53:51 +0800 Subject: [PATCH 13/15] fix: carry a validated PeerId in multiaddr Protocol::P2p Makes an invalid /p2p component unrepresentable (multiaddr 0.18 semantics), so conversion to litep2p is infallible again. Drops the lossy placeholder peer id along with the ProtocolConversionError / try_push / try_with error surface. Co-authored-by: Cursor --- client/network-types/src/multiaddr.rs | 65 ++++++------------ .../network-types/src/multiaddr/protocol.rs | 66 +++++-------------- client/network-types/src/peer_id.rs | 11 ++-- client/network/src/config.rs | 5 +- 4 files changed, 45 insertions(+), 102 deletions(-) diff --git a/client/network-types/src/multiaddr.rs b/client/network-types/src/multiaddr.rs index f225ed9e..bf261489 100644 --- a/client/network-types/src/multiaddr.rs +++ b/client/network-types/src/multiaddr.rs @@ -30,7 +30,7 @@ use std::{ }; mod protocol; -pub use protocol::{Protocol, ProtocolConversionError}; +pub use protocol::Protocol; // Re-export the macro under shorter name under `multiaddr`. pub use crate::build_multiaddr as multiaddr; @@ -50,18 +50,8 @@ impl Multiaddr { } /// Adds an address component to the end of this multiaddr. - /// - /// Prefer [`Multiaddr::try_push`] when the protocol may carry an arbitrary `/p2p` multihash. pub fn push(&mut self, p: Protocol<'_>) { - self.multiaddr.push(protocol::into_litep2p_lossy(p)) - } - - /// Fallible variant of [`Multiaddr::push`]. - /// - /// Fails if `p` is [`Protocol::P2p`] with a multihash that is not a valid peer id. - pub fn try_push(&mut self, p: Protocol<'_>) -> Result<(), ProtocolConversionError> { - self.multiaddr.push(LiteP2pProtocol::try_from(p)?); - Ok(()) + self.multiaddr.push(p.into()) } /// Pops the last `Protocol` of this multiaddr, or `None` if the multiaddr is empty. @@ -70,15 +60,8 @@ impl Multiaddr { } /// Like [`Multiaddr::push`] but consumes `self`. - /// - /// Prefer [`Multiaddr::try_with`] when the protocol may carry an arbitrary `/p2p` multihash. pub fn with(self, p: Protocol<'_>) -> Self { - self.multiaddr.with(protocol::into_litep2p_lossy(p)).into() - } - - /// Fallible variant of [`Multiaddr::with`]. - pub fn try_with(self, p: Protocol<'_>) -> Result { - Ok(self.multiaddr.with(LiteP2pProtocol::try_from(p)?).into()) + self.multiaddr.with(p.into()).into() } /// Returns the components of this multiaddress. @@ -264,13 +247,13 @@ impl<'a> FromIterator> for Multiaddr { where T: IntoIterator>, { - LiteP2pMultiaddr::from_iter(iter.into_iter().map(protocol::into_litep2p_lossy)).into() + LiteP2pMultiaddr::from_iter(iter.into_iter().map(LiteP2pProtocol::from)).into() } } impl<'a> From> for Multiaddr { fn from(p: Protocol<'a>) -> Multiaddr { - let protocol = protocol::into_litep2p_lossy(p); + let protocol: LiteP2pProtocol = p.into(); let multiaddr: LiteP2pMultiaddr = protocol.into(); multiaddr.into() } @@ -308,9 +291,8 @@ macro_rules! build_multiaddr { #[cfg(test)] mod tests { - use super::{Multiaddr, Protocol, ProtocolConversionError}; - use crate::multihash::Multihash; - use litep2p::types::multiaddr::Protocol as LiteP2pProtocol; + use super::{Multiaddr, Protocol}; + use crate::{multihash::Multihash, PeerId}; use std::{net::Ipv4Addr, str::FromStr}; /// multiaddr 0.18 accepts `/webtransport`, and iteration must not panic after parse. @@ -339,29 +321,24 @@ mod tests { Multihash::wrap(SHA2_512, &[0u8; 64]).expect("64-byte digest fits Multihash<64>") } + /// [`Protocol::P2p`] carries a validated [`PeerId`], so a non-peer-id multihash is + /// unrepresentable in a [`Multiaddr`] and must be rejected at the validation boundary. #[test] - fn p2p_try_from_rejects_non_peer_id_multihash() { - let protocol = Protocol::P2p(non_peer_id_multihash()); - assert_eq!( - LiteP2pProtocol::try_from(protocol), - Err(ProtocolConversionError::InvalidPeerId) - ); - } + fn non_peer_id_multihash_rejected_at_boundaries() { + assert!(PeerId::from_multihash(non_peer_id_multihash()).is_err()); - #[test] - fn p2p_lossy_conversion_does_not_panic_on_non_peer_id_multihash() { - let protocol = Protocol::P2p(non_peer_id_multihash()); - // Legacy infallible paths must not panic; they substitute a placeholder peer id. - let _ = Multiaddr::empty().with(protocol); + let encoded = bs58::encode(non_peer_id_multihash().to_bytes()).into_string(); + assert!(Multiaddr::from_str(&format!("/p2p/{encoded}")).is_err()); } #[test] - fn try_push_rejects_non_peer_id_p2p() { - let mut addr = Multiaddr::empty(); - assert_eq!( - addr.try_push(Protocol::P2p(non_peer_id_multihash())), - Err(ProtocolConversionError::InvalidPeerId) - ); - assert_eq!(addr.iter().count(), 0); + fn p2p_multiaddr_roundtrips_through_push_and_iter() { + let peer_id = PeerId::random(); + let mut address = Multiaddr::from_str("/ip4/198.51.100.19/tcp/30333").unwrap(); + address.push(Protocol::P2p(peer_id)); + + assert_eq!(address.iter().last(), Some(Protocol::P2p(peer_id))); + let reparsed = Multiaddr::from_str(&address.to_string()).unwrap(); + assert_eq!(reparsed, address); } } diff --git a/client/network-types/src/multiaddr/protocol.rs b/client/network-types/src/multiaddr/protocol.rs index 4eba2d7a..9dcdfcd0 100644 --- a/client/network-types/src/multiaddr/protocol.rs +++ b/client/network-types/src/multiaddr/protocol.rs @@ -16,7 +16,7 @@ // You should have received a copy of the GNU General Public License // along with this program. If not, see . -use crate::multihash::Multihash; +use crate::{multihash::Multihash, PeerId}; use litep2p::types::multiaddr::Protocol as LiteP2pProtocol; use std::{ borrow::Cow, @@ -26,15 +26,6 @@ use std::{ const LOG_TARGET: &str = "sub-libp2p"; -/// Error converting a local [`Protocol`] into a litep2p/multiaddr protocol. -#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)] -pub enum ProtocolConversionError { - /// [`Protocol::P2p`] carried a multihash that is not a valid peer id - /// (for example sha2-512, or an oversized identity digest). - #[error("p2p protocol multihash is not a valid peer id")] - InvalidPeerId, -} - /// [`Protocol`] describes all possible multiaddress protocols. #[derive(PartialEq, Eq, Clone, Debug)] pub enum Protocol<'a> { @@ -57,7 +48,9 @@ pub enum Protocol<'a> { Memory(u64), Onion(Cow<'a, [u8; 10]>, u16), Onion3(Cow<'a, [u8; 35]>, u16), - P2p(Multihash), + /// Carries a validated [`PeerId`] (multiaddr 0.18 semantics), so an invalid `/p2p` + /// component is unrepresentable and conversion to litep2p is infallible. + P2p(PeerId), P2pCircuit, Quic, QuicV1, @@ -82,10 +75,7 @@ pub enum Protocol<'a> { impl Display for Protocol<'_> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - match LiteP2pProtocol::try_from(self.clone()) { - Ok(protocol) => Display::fmt(&protocol, f), - Err(ProtocolConversionError::InvalidPeerId) => f.write_str("/p2p/"), - } + Display::fmt(&LiteP2pProtocol::from(self.clone()), f) } } @@ -141,7 +131,8 @@ pub(super) fn try_from_litep2p_protocol<'a>( LiteP2pProtocol::Onion(str, port) => Protocol::Onion(str, port), LiteP2pProtocol::Onion3(addr) => Protocol::Onion3(Cow::Owned(*addr.hash()), addr.port()), LiteP2pProtocol::P2p(peer_id) => Protocol::P2p( - Multihash::from_bytes(&peer_id.to_bytes()).expect("valid peer id multihash"), + PeerId::from_bytes(&peer_id.to_bytes()) + .expect("both peer id types enforce the same multihash constraints; qed"), ), LiteP2pProtocol::P2pCircuit => Protocol::P2pCircuit, LiteP2pProtocol::Quic => Protocol::Quic, @@ -182,11 +173,9 @@ impl<'a> From> for Protocol<'a> { } } -impl<'a> TryFrom> for LiteP2pProtocol<'a> { - type Error = ProtocolConversionError; - - fn try_from(protocol: Protocol<'a>) -> Result { - Ok(match protocol { +impl<'a> From> for LiteP2pProtocol<'a> { + fn from(protocol: Protocol<'a>) -> Self { + match protocol { Protocol::Dccp(port) => LiteP2pProtocol::Dccp(port), Protocol::Dns(str) => LiteP2pProtocol::Dns(str), Protocol::Dns4(str) => LiteP2pProtocol::Dns4(str), @@ -205,13 +194,10 @@ impl<'a> TryFrom> for LiteP2pProtocol<'a> { Protocol::Memory(port) => LiteP2pProtocol::Memory(port), Protocol::Onion(str, port) => LiteP2pProtocol::Onion(str, port), Protocol::Onion3(str, port) => LiteP2pProtocol::Onion3((str.into_owned(), port).into()), - Protocol::P2p(multihash) => { - let litep2p_multihash: litep2p::types::multihash::Multihash = multihash.into(); - LiteP2pProtocol::P2p( - multiaddr::PeerId::try_from(litep2p_multihash) - .map_err(|_| ProtocolConversionError::InvalidPeerId)?, - ) - }, + Protocol::P2p(peer_id) => LiteP2pProtocol::P2p( + multiaddr::PeerId::from_bytes(&peer_id.to_bytes()) + .expect("both peer id types enforce the same multihash constraints; qed"), + ), Protocol::P2pCircuit => LiteP2pProtocol::P2pCircuit, Protocol::Quic => LiteP2pProtocol::Quic, Protocol::QuicV1 => LiteP2pProtocol::QuicV1, @@ -232,28 +218,6 @@ impl<'a> TryFrom> for LiteP2pProtocol<'a> { Protocol::Garlic32(addr) => LiteP2pProtocol::Garlic32(addr), Protocol::Sni(str) => LiteP2pProtocol::Sni(str), Protocol::P2pStardust => LiteP2pProtocol::P2pStardust, - }) + } } } - -/// Lossy conversion for legacy infallible call sites (`push` / `with`). -/// -/// Prefer [`TryFrom`] — that is the real contract for [`Protocol::P2p`]. This helper never -/// panics: invalid peer-id multihashes are replaced with a placeholder and logged. -pub(super) fn into_litep2p_lossy<'a>(protocol: Protocol<'a>) -> LiteP2pProtocol<'a> { - LiteP2pProtocol::try_from(protocol).unwrap_or_else(|err| { - log::error!( - target: LOG_TARGET, - "Failed to convert Protocol to litep2p protocol: {err}; \ - replacing invalid /p2p component with a placeholder peer id", - ); - LiteP2pProtocol::P2p(placeholder_peer_id()) - }) -} - -/// Valid peer id used only as a non-panicking stand-in for a bad `/p2p` multihash. -fn placeholder_peer_id() -> multiaddr::PeerId { - let multihash = litep2p::types::multihash::Multihash::wrap(0, &[0u8; 32]) - .expect("32-byte identity digest fits Multihash<64>"); - multiaddr::PeerId::try_from(multihash).expect("identity digests <= 42 bytes are valid peer ids") -} diff --git a/client/network-types/src/peer_id.rs b/client/network-types/src/peer_id.rs index e866d497..d3229302 100644 --- a/client/network-types/src/peer_id.rs +++ b/client/network-types/src/peer_id.rs @@ -70,7 +70,7 @@ impl PeerId { /// otherwise returns `None`. pub fn try_from_multiaddr(address: &Multiaddr) -> Option { match address.iter().last() { - Some(Protocol::P2p(multihash)) => Some(Self { multihash }), + Some(Protocol::P2p(peer_id)) => Some(peer_id), _ => None, } } @@ -161,9 +161,12 @@ impl PeerId { } } -impl AsRef for PeerId { - fn as_ref(&self) -> &Multihash { - &self.multihash +/// Reflexive impl: [`crate::multiaddr::Protocol::P2p`] carries a `PeerId` (multiaddr 0.18 +/// semantics), and external consumers (e.g. `sc-mixnet`) build that variant via +/// `*peer_id.as_ref()`. Keep this the only `AsRef` impl so type inference stays unambiguous. +impl AsRef for PeerId { + fn as_ref(&self) -> &PeerId { + self } } diff --git a/client/network/src/config.rs b/client/network/src/config.rs index 99bd02fa..2c1712a2 100644 --- a/client/network/src/config.rs +++ b/client/network/src/config.rs @@ -146,11 +146,10 @@ pub fn parse_str_addr(addr_str: &str) -> Result<(PeerId, Multiaddr), ParseErr> { /// Splits a Multiaddress into a Multiaddress and PeerId. pub fn parse_addr(mut addr: Multiaddr) -> Result<(PeerId, Multiaddr), ParseErr> { - let multihash = match addr.pop() { - Some(multiaddr::Protocol::P2p(multihash)) => multihash, + let peer_id = match addr.pop() { + Some(multiaddr::Protocol::P2p(peer_id)) => peer_id, _ => return Err(ParseErr::PeerIdMissing), }; - let peer_id = PeerId::from_multihash(multihash).map_err(|_| ParseErr::InvalidPeerId)?; Ok((peer_id, addr)) } From 5af8b603410390ca0ab89208866d6efe9636b27e Mon Sep 17 00:00:00 2001 From: illuzen Date: Mon, 3 Aug 2026 21:55:41 +0800 Subject: [PATCH 14/15] chore: drop now-identity conversions in peer_id tests Co-authored-by: Cursor --- client/network-types/src/peer_id.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/network-types/src/peer_id.rs b/client/network-types/src/peer_id.rs index d3229302..9a338034 100644 --- a/client/network-types/src/peer_id.rs +++ b/client/network-types/src/peer_id.rs @@ -234,7 +234,7 @@ mod tests { let address = "/ip4/198.51.100.19/tcp/30333" .parse::() .unwrap() - .with(Protocol::P2p(peer.into())); + .with(Protocol::P2p(peer)); assert_eq!(PeerId::try_from_multiaddr(&address), Some(peer)); } @@ -242,7 +242,7 @@ mod tests { { let peer = PeerId::random(); assert_eq!( - PeerId::try_from_multiaddr(&Multiaddr::empty().with(Protocol::P2p(peer.into()))), + PeerId::try_from_multiaddr(&Multiaddr::empty().with(Protocol::P2p(peer))), Some(peer) ); } From d8bfae21540ec555d69e43ecb537644100fe20df Mon Sep 17 00:00:00 2001 From: illuzen Date: Mon, 3 Aug 2026 22:25:46 +0800 Subject: [PATCH 15/15] fix: accept impl Into in PeerId::from_multihash sc-authority-discovery 0.55.0 (pulled in via polkadot-node-network-protocol under runtime-benchmarks/try-runtime) re-validates the Protocol::P2p payload with from_multihash; keep it source-compatible now that the payload is PeerId. Co-authored-by: Cursor --- client/network-types/src/peer_id.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/network-types/src/peer_id.rs b/client/network-types/src/peer_id.rs index 9a338034..c150143e 100644 --- a/client/network-types/src/peer_id.rs +++ b/client/network-types/src/peer_id.rs @@ -80,7 +80,11 @@ impl PeerId { /// If the multihash does not use a valid hashing algorithm for peer IDs, /// or the hash value does not satisfy the constraints for a hashed /// peer ID, it is returned as an `Err`. - pub fn from_multihash(multihash: Multihash) -> Result { + /// + /// Accepts anything convertible into a `Multihash` (including a `PeerId`) so that + /// multiaddr-0.17-era callers that re-validate the `Protocol::P2p` payload keep compiling. + pub fn from_multihash(multihash: impl Into) -> Result { + let multihash = multihash.into(); match Code::try_from(multihash.code()) { Ok(Code::Sha2_256) => Ok(PeerId { multihash }), Ok(Code::Identity) if multihash.digest().len() <= MAX_INLINE_KEY_LENGTH =>