diff --git a/deps/uvwasi/include/fd_table.h b/deps/uvwasi/include/fd_table.h index 42a5f0d920ff6e..639ff9abc8d34f 100644 --- a/deps/uvwasi/include/fd_table.h +++ b/deps/uvwasi/include/fd_table.h @@ -6,33 +6,22 @@ #include "wasi_types.h" #include "uv_mapping.h" -/* TODO(cjihrig): PATH_MAX_BYTES shouldn't be stack allocated. On Windows, paths - can be 32k long, and this PATH_MAX_BYTES is an artificial limitation. */ -#ifdef _WIN32 -/* MAX_PATH is in characters, not bytes. Make sure we have enough headroom. */ -# define PATH_MAX_BYTES (MAX_PATH * 4) -#else -# include -# define PATH_MAX_BYTES (PATH_MAX) -#endif - struct uvwasi_s; struct uvwasi_fd_wrap_t { uvwasi_fd_t id; uv_file fd; - char path[PATH_MAX_BYTES]; - char real_path[PATH_MAX_BYTES]; + char* path; + char* real_path; uvwasi_filetype_t type; uvwasi_rights_t rights_base; uvwasi_rights_t rights_inheriting; int preopen; - int valid; uv_mutex_t mutex; }; struct uvwasi_fd_table_t { - struct uvwasi_fd_wrap_t* fds; + struct uvwasi_fd_wrap_t** fds; uint32_t size; uint32_t used; uv_rwlock_t rwlock; @@ -61,7 +50,8 @@ uvwasi_errno_t uvwasi_fd_table_get(const struct uvwasi_fd_table_t* table, struct uvwasi_fd_wrap_t** wrap, uvwasi_rights_t rights_base, uvwasi_rights_t rights_inheriting); -uvwasi_errno_t uvwasi_fd_table_remove(struct uvwasi_fd_table_t* table, +uvwasi_errno_t uvwasi_fd_table_remove(struct uvwasi_s* uvwasi, + struct uvwasi_fd_table_t* table, const uvwasi_fd_t id); #endif /* __UVWASI_FD_TABLE_H__ */ diff --git a/deps/uvwasi/include/uvwasi.h b/deps/uvwasi/include/uvwasi.h index 2a4e389164357d..2fbcbc583dcbfb 100644 --- a/deps/uvwasi/include/uvwasi.h +++ b/deps/uvwasi/include/uvwasi.h @@ -11,7 +11,7 @@ extern "C" { #define UVWASI_VERSION_MAJOR 0 #define UVWASI_VERSION_MINOR 0 -#define UVWASI_VERSION_PATCH 1 +#define UVWASI_VERSION_PATCH 3 #define UVWASI_VERSION_HEX ((UVWASI_VERSION_MAJOR << 16) | \ (UVWASI_VERSION_MINOR << 8) | \ (UVWASI_VERSION_PATCH)) @@ -20,7 +20,7 @@ extern "C" { #define UVWASI_VERSION_STRING UVWASI_STRINGIFY(UVWASI_VERSION_MAJOR) "." \ UVWASI_STRINGIFY(UVWASI_VERSION_MINOR) "." \ UVWASI_STRINGIFY(UVWASI_VERSION_PATCH) -#define UVWASI_VERSION_WASI "snapshot_0" +#define UVWASI_VERSION_WASI "snapshot_1" typedef void* (*uvwasi_malloc)(size_t size, void* mem_user_data); typedef void (*uvwasi_free)(void* ptr, void* mem_user_data); @@ -69,6 +69,7 @@ void uvwasi_destroy(uvwasi_t* uvwasi); uvwasi_errno_t uvwasi_embedder_remap_fd(uvwasi_t* uvwasi, const uvwasi_fd_t fd, uv_file new_host_fd); +const char* uvwasi_embedder_err_code_to_string(uvwasi_errno_t code); // WASI system call API. diff --git a/deps/uvwasi/include/wasi_types.h b/deps/uvwasi/include/wasi_types.h index 34b5291c577627..ec1013663f6a76 100644 --- a/deps/uvwasi/include/wasi_types.h +++ b/deps/uvwasi/include/wasi_types.h @@ -155,7 +155,7 @@ typedef struct uvwasi_iovec_s { size_t buf_len; } uvwasi_iovec_t; -typedef uint32_t uvwasi_linkcount_t; +typedef uint64_t uvwasi_linkcount_t; typedef uint32_t uvwasi_lookupflags_t; /* Bitfield */ #define UVWASI_LOOKUP_SYMLINK_FOLLOW (1 << 0) @@ -266,7 +266,6 @@ typedef struct uvwasi_subscription_s { uvwasi_eventtype_t type; union { struct { - uvwasi_userdata_t identifier; uvwasi_clockid_t clock_id; uvwasi_timestamp_t timeout; uvwasi_timestamp_t precision; @@ -316,8 +315,8 @@ typedef struct uvwasi_event_s { } uvwasi_event_t; typedef uint8_t uvwasi_whence_t; -#define UVWASI_WHENCE_CUR 0 -#define UVWASI_WHENCE_END 1 -#define UVWASI_WHENCE_SET 2 +#define UVWASI_WHENCE_SET 0 +#define UVWASI_WHENCE_CUR 1 +#define UVWASI_WHENCE_END 2 #endif /* __UVWASI_WASI_TYPES_H__ */ diff --git a/deps/uvwasi/src/fd_table.c b/deps/uvwasi/src/fd_table.c index f716495e9a02b2..0abddb5a21dd36 100644 --- a/deps/uvwasi/src/fd_table.c +++ b/deps/uvwasi/src/fd_table.c @@ -187,12 +187,29 @@ static uvwasi_errno_t uvwasi__fd_table_insert(uvwasi_t* uvwasi, int preopen, struct uvwasi_fd_wrap_t** wrap) { struct uvwasi_fd_wrap_t* entry; - struct uvwasi_fd_wrap_t* new_fds; + struct uvwasi_fd_wrap_t** new_fds; uvwasi_errno_t err; uint32_t new_size; int index; uint32_t i; int r; + size_t mp_len; + char* mp_copy; + size_t rp_len; + char* rp_copy; + + mp_len = strlen(mapped_path); + rp_len = strlen(real_path); + entry = (struct uvwasi_fd_wrap_t*) + uvwasi__malloc(uvwasi, sizeof(*entry) + mp_len + rp_len + 2); + if (entry == NULL) return UVWASI_ENOMEM; + + mp_copy = (char*)(entry + 1); + rp_copy = mp_copy + mp_len + 1; + memcpy(mp_copy, mapped_path, mp_len); + mp_copy[mp_len] = '\0'; + memcpy(rp_copy, real_path, rp_len); + rp_copy[rp_len] = '\0'; uv_rwlock_wrlock(&table->rwlock); @@ -201,12 +218,13 @@ static uvwasi_errno_t uvwasi__fd_table_insert(uvwasi_t* uvwasi, new_size = table->size * 2; new_fds = uvwasi__realloc(uvwasi, table->fds, new_size * sizeof(*new_fds)); if (new_fds == NULL) { + uvwasi__free(uvwasi, entry); err = UVWASI_ENOMEM; goto exit; } for (i = table->size; i < new_size; ++i) - new_fds[i].valid = 0; + new_fds[i] = NULL; index = table->size; table->fds = new_fds; @@ -215,7 +233,7 @@ static uvwasi_errno_t uvwasi__fd_table_insert(uvwasi_t* uvwasi, /* The table is big enough, so find an empty slot for the new data. */ index = -1; for (i = 0; i < table->size; ++i) { - if (table->fds[i].valid != 1) { + if (table->fds[i] == NULL) { index = i; break; } @@ -223,12 +241,13 @@ static uvwasi_errno_t uvwasi__fd_table_insert(uvwasi_t* uvwasi, /* index should never be -1. */ if (index == -1) { + uvwasi__free(uvwasi, entry); err = UVWASI_ENOSPC; goto exit; } } - entry = &table->fds[index]; + table->fds[index] = entry; r = uv_mutex_init(&entry->mutex); if (r != 0) { @@ -238,13 +257,12 @@ static uvwasi_errno_t uvwasi__fd_table_insert(uvwasi_t* uvwasi, entry->id = index; entry->fd = fd; - strcpy(entry->path, mapped_path); - strcpy(entry->real_path, real_path); + entry->path = mp_copy; + entry->real_path = rp_copy; entry->type = type; entry->rights_base = rights_base; entry->rights_inheriting = rights_inheriting; entry->preopen = preopen; - entry->valid = 1; table->used++; if (wrap != NULL) @@ -281,7 +299,7 @@ uvwasi_errno_t uvwasi_fd_table_init(uvwasi_t* uvwasi, table->size = init_size; table->fds = uvwasi__calloc(uvwasi, init_size, - sizeof(struct uvwasi_fd_wrap_t)); + sizeof(struct uvwasi_fd_wrap_t*)); if (table->fds == NULL) { err = UVWASI_ENOMEM; @@ -325,9 +343,20 @@ uvwasi_errno_t uvwasi_fd_table_init(uvwasi_t* uvwasi, void uvwasi_fd_table_free(uvwasi_t* uvwasi, struct uvwasi_fd_table_t* table) { + struct uvwasi_fd_wrap_t* entry; + uint32_t i; + if (table == NULL) return; + for (i = 0; i < table->size; i++) { + entry = table->fds[i]; + if (entry == NULL) continue; + + uv_mutex_destroy(&entry->mutex); + uvwasi__free(uvwasi, entry); + } + uvwasi__free(uvwasi, table->fds); table->fds = NULL; table->size = 0; @@ -430,9 +459,9 @@ uvwasi_errno_t uvwasi_fd_table_get(const struct uvwasi_fd_table_t* table, goto exit; } - entry = &table->fds[id]; + entry = table->fds[id]; - if (entry->valid != 1 || entry->id != id) { + if (entry == NULL || entry->id != id) { err = UVWASI_EBADF; goto exit; } @@ -453,7 +482,8 @@ uvwasi_errno_t uvwasi_fd_table_get(const struct uvwasi_fd_table_t* table, } -uvwasi_errno_t uvwasi_fd_table_remove(struct uvwasi_fd_table_t* table, +uvwasi_errno_t uvwasi_fd_table_remove(uvwasi_t* uvwasi, + struct uvwasi_fd_table_t* table, const uvwasi_fd_t id) { struct uvwasi_fd_wrap_t* entry; uvwasi_errno_t err; @@ -468,15 +498,16 @@ uvwasi_errno_t uvwasi_fd_table_remove(struct uvwasi_fd_table_t* table, goto exit; } - entry = &table->fds[id]; + entry = table->fds[id]; - if (entry->valid != 1 || entry->id != id) { + if (entry == NULL || entry->id != id) { err = UVWASI_EBADF; goto exit; } uv_mutex_destroy(&entry->mutex); - entry->valid = 0; + uvwasi__free(uvwasi, entry); + table->fds[id] = NULL; table->used--; err = UVWASI_ESUCCESS; exit: diff --git a/deps/uvwasi/src/uvwasi.c b/deps/uvwasi/src/uvwasi.c index 0f7c4c5d3aa0ef..28c6dcc26104c9 100644 --- a/deps/uvwasi/src/uvwasi.c +++ b/deps/uvwasi/src/uvwasi.c @@ -25,6 +25,16 @@ #include "fd_table.h" #include "clocks.h" +/* TODO(cjihrig): PATH_MAX_BYTES shouldn't be stack allocated. On Windows, paths + can be 32k long, and this PATH_MAX_BYTES is an artificial limitation. */ +#ifdef _WIN32 +/* MAX_PATH is in characters, not bytes. Make sure we have enough headroom. */ +# define PATH_MAX_BYTES (MAX_PATH * 4) +#else +# include +# define PATH_MAX_BYTES (PATH_MAX) +#endif + static void* default_malloc(size_t size, void* mem_user_data) { return malloc(size); } @@ -688,7 +698,7 @@ uvwasi_errno_t uvwasi_fd_close(uvwasi_t* uvwasi, uvwasi_fd_t fd) { if (r != 0) return uvwasi__translate_uv_error(r); - return uvwasi_fd_table_remove(&uvwasi->fds, fd); + return uvwasi_fd_table_remove(uvwasi, &uvwasi->fds, fd); } @@ -1319,7 +1329,7 @@ uvwasi_errno_t uvwasi_fd_renumber(uvwasi_t* uvwasi, to_wrap->id = to; uv_mutex_unlock(&from_wrap->mutex); uv_mutex_unlock(&to_wrap->mutex); - return uvwasi_fd_table_remove(&uvwasi->fds, from); + return uvwasi_fd_table_remove(uvwasi, &uvwasi->fds, from); } @@ -1773,7 +1783,7 @@ uvwasi_errno_t uvwasi_path_open(uvwasi_t* uvwasi, if ((o_flags & UVWASI_O_DIRECTORY) != 0 && wrap.type != UVWASI_FILETYPE_DIRECTORY) { uv_mutex_unlock(&dirfd_wrap->mutex); - uvwasi_fd_table_remove(&uvwasi->fds, wrap.id); + uvwasi_fd_table_remove(uvwasi, &uvwasi->fds, wrap.id); err = UVWASI_ENOTDIR; goto close_file_and_error_exit; } @@ -2140,3 +2150,90 @@ uvwasi_errno_t uvwasi_sock_shutdown(uvwasi_t* uvwasi, https://github.com/WebAssembly/WASI/issues/4 */ return UVWASI_ENOTSUP; } + + +const char* uvwasi_embedder_err_code_to_string(uvwasi_errno_t code) { + switch (code) { +#define V(errcode) case errcode: return #errcode; + V(UVWASI_E2BIG) + V(UVWASI_EACCES) + V(UVWASI_EADDRINUSE) + V(UVWASI_EADDRNOTAVAIL) + V(UVWASI_EAFNOSUPPORT) + V(UVWASI_EAGAIN) + V(UVWASI_EALREADY) + V(UVWASI_EBADF) + V(UVWASI_EBADMSG) + V(UVWASI_EBUSY) + V(UVWASI_ECANCELED) + V(UVWASI_ECHILD) + V(UVWASI_ECONNABORTED) + V(UVWASI_ECONNREFUSED) + V(UVWASI_ECONNRESET) + V(UVWASI_EDEADLK) + V(UVWASI_EDESTADDRREQ) + V(UVWASI_EDOM) + V(UVWASI_EDQUOT) + V(UVWASI_EEXIST) + V(UVWASI_EFAULT) + V(UVWASI_EFBIG) + V(UVWASI_EHOSTUNREACH) + V(UVWASI_EIDRM) + V(UVWASI_EILSEQ) + V(UVWASI_EINPROGRESS) + V(UVWASI_EINTR) + V(UVWASI_EINVAL) + V(UVWASI_EIO) + V(UVWASI_EISCONN) + V(UVWASI_EISDIR) + V(UVWASI_ELOOP) + V(UVWASI_EMFILE) + V(UVWASI_EMLINK) + V(UVWASI_EMSGSIZE) + V(UVWASI_EMULTIHOP) + V(UVWASI_ENAMETOOLONG) + V(UVWASI_ENETDOWN) + V(UVWASI_ENETRESET) + V(UVWASI_ENETUNREACH) + V(UVWASI_ENFILE) + V(UVWASI_ENOBUFS) + V(UVWASI_ENODEV) + V(UVWASI_ENOENT) + V(UVWASI_ENOEXEC) + V(UVWASI_ENOLCK) + V(UVWASI_ENOLINK) + V(UVWASI_ENOMEM) + V(UVWASI_ENOMSG) + V(UVWASI_ENOPROTOOPT) + V(UVWASI_ENOSPC) + V(UVWASI_ENOSYS) + V(UVWASI_ENOTCONN) + V(UVWASI_ENOTDIR) + V(UVWASI_ENOTEMPTY) + V(UVWASI_ENOTRECOVERABLE) + V(UVWASI_ENOTSOCK) + V(UVWASI_ENOTSUP) + V(UVWASI_ENOTTY) + V(UVWASI_ENXIO) + V(UVWASI_EOVERFLOW) + V(UVWASI_EOWNERDEAD) + V(UVWASI_EPERM) + V(UVWASI_EPIPE) + V(UVWASI_EPROTO) + V(UVWASI_EPROTONOSUPPORT) + V(UVWASI_EPROTOTYPE) + V(UVWASI_ERANGE) + V(UVWASI_EROFS) + V(UVWASI_ESPIPE) + V(UVWASI_ESRCH) + V(UVWASI_ESTALE) + V(UVWASI_ETIMEDOUT) + V(UVWASI_ETXTBSY) + V(UVWASI_EXDEV) + V(UVWASI_ENOTCAPABLE) + V(UVWASI_ESUCCESS) +#undef V + default: + return "UVWASI_UNKNOWN_ERROR"; + } +} diff --git a/doc/api/cli.md b/doc/api/cli.md index 745d274e0ccacd..fa82b09ebe0f79 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -230,9 +230,14 @@ added: v9.6.0 Enable experimental ES Module support in the `vm` module. -### `--experimental-wasi-unstable-preview0` +### `--experimental-wasi-unstable-preview1` Enable experimental WebAssembly System Interface (WASI) support. @@ -1073,7 +1078,7 @@ Node.js options that are allowed are: * `--experimental-resolve-self` * `--experimental-specifier-resolution` * `--experimental-vm-modules` -* `--experimental-wasi-unstable-preview0` +* `--experimental-wasi-unstable-preview1` * `--experimental-wasm-modules` * `--force-context-aware` * `--force-fips` diff --git a/doc/api/wasi.md b/doc/api/wasi.md index f5425bb2bd85ce..078aeb8107ebd9 100644 --- a/doc/api/wasi.md +++ b/doc/api/wasi.md @@ -19,7 +19,7 @@ const wasi = new WASI({ '/sandbox': '/some/real/path/that/wasm/can/access' } }); -const importObject = { wasi_unstable: wasi.wasiImport }; +const importObject = { wasi_snapshot_preview1: wasi.wasiImport }; (async () => { const wasm = await WebAssembly.compile(fs.readFileSync('./binary.wasm')); @@ -29,7 +29,7 @@ const importObject = { wasi_unstable: wasi.wasiImport }; })(); ``` -The `--experimental-wasi-unstable-preview0` and `--experimental-wasm-bigint` +The `--experimental-wasi-unstable-preview1` and `--experimental-wasm-bigint` CLI arguments are needed for the previous example to run. ## Class: WASI @@ -82,8 +82,8 @@ added: v13.3.0 * {Object} `wasiImport` is an object that implements the WASI system call API. This object -should be passed as the `wasi_unstable` import during the instantiation of a -[`WebAssembly.Instance`][]. +should be passed as the `wasi_snapshot_preview1` import during the instantiation +of a [`WebAssembly.Instance`][]. [`WebAssembly.Instance`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Instance [`WebAssembly.Memory`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WebAssembly/Memory diff --git a/doc/node.1 b/doc/node.1 index 255f6746abf3f3..c783195c957f86 100644 --- a/doc/node.1 +++ b/doc/node.1 @@ -141,7 +141,7 @@ Enable experimental support for a package to load itself. .It Fl -experimental-vm-modules Enable experimental ES module support in VM module. . -.It Fl -experimental-wasi-unstable-preview0 +.It Fl -experimental-wasi-unstable-preview1 Enable experimental WebAssembly System Interface support. . .It Fl -experimental-wasm-modules diff --git a/lib/internal/bootstrap/pre_execution.js b/lib/internal/bootstrap/pre_execution.js index 47c709b424ec14..40dabdda504e4b 100644 --- a/lib/internal/bootstrap/pre_execution.js +++ b/lib/internal/bootstrap/pre_execution.js @@ -404,7 +404,7 @@ function initializeWASI() { const { NativeModule } = require('internal/bootstrap/loaders'); const mod = NativeModule.map.get('wasi'); mod.canBeRequiredByUsers = - getOptionValue('--experimental-wasi-unstable-preview0'); + getOptionValue('--experimental-wasi-unstable-preview1'); } function initializeCJSLoader() { diff --git a/src/node_options.cc b/src/node_options.cc index ff3bf9b4edd876..622287d5248f0c 100644 --- a/src/node_options.cc +++ b/src/node_options.cc @@ -361,7 +361,7 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() { &EnvironmentOptions::experimental_report, kAllowedInEnvironment); #endif // NODE_REPORT - AddOption("--experimental-wasi-unstable-preview0", + AddOption("--experimental-wasi-unstable-preview1", "experimental WASI support", &EnvironmentOptions::experimental_wasi, kAllowedInEnvironment); diff --git a/src/node_wasi.cc b/src/node_wasi.cc index 39669df490c957..5f4644e03ac080 100644 --- a/src/node_wasi.cc +++ b/src/node_wasi.cc @@ -511,11 +511,11 @@ void WASI::FdFilestatGet(const FunctionCallbackInfo& args) { wasi->writeUInt64(memory, stats.st_dev, buf); wasi->writeUInt64(memory, stats.st_ino, buf + 8); wasi->writeUInt8(memory, stats.st_filetype, buf + 16); - wasi->writeUInt32(memory, stats.st_nlink, buf + 20); - wasi->writeUInt64(memory, stats.st_size, buf + 24); - wasi->writeUInt64(memory, stats.st_atim, buf + 32); - wasi->writeUInt64(memory, stats.st_mtim, buf + 40); - wasi->writeUInt64(memory, stats.st_ctim, buf + 48); + wasi->writeUInt32(memory, stats.st_nlink, buf + 24); + wasi->writeUInt64(memory, stats.st_size, buf + 32); + wasi->writeUInt64(memory, stats.st_atim, buf + 40); + wasi->writeUInt64(memory, stats.st_mtim, buf + 48); + wasi->writeUInt64(memory, stats.st_ctim, buf + 56); } args.GetReturnValue().Set(err); @@ -1039,11 +1039,11 @@ void WASI::PathFilestatGet(const FunctionCallbackInfo& args) { wasi->writeUInt64(memory, stats.st_dev, buf_ptr); wasi->writeUInt64(memory, stats.st_ino, buf_ptr + 8); wasi->writeUInt8(memory, stats.st_filetype, buf_ptr + 16); - wasi->writeUInt32(memory, stats.st_nlink, buf_ptr + 20); - wasi->writeUInt64(memory, stats.st_size, buf_ptr + 24); - wasi->writeUInt64(memory, stats.st_atim, buf_ptr + 32); - wasi->writeUInt64(memory, stats.st_mtim, buf_ptr + 40); - wasi->writeUInt64(memory, stats.st_ctim, buf_ptr + 48); + wasi->writeUInt32(memory, stats.st_nlink, buf_ptr + 24); + wasi->writeUInt64(memory, stats.st_size, buf_ptr + 32); + wasi->writeUInt64(memory, stats.st_atim, buf_ptr + 40); + wasi->writeUInt64(memory, stats.st_mtim, buf_ptr + 48); + wasi->writeUInt64(memory, stats.st_ctim, buf_ptr + 56); } args.GetReturnValue().Set(err); @@ -1406,11 +1406,10 @@ void WASI::PollOneoff(const FunctionCallbackInfo& args) { wasi->readUInt8(memory, &sub.type, in_ptr + 8); if (sub.type == UVWASI_EVENTTYPE_CLOCK) { - wasi->readUInt64(memory, &sub.u.clock.identifier, in_ptr + 16); - wasi->readUInt32(memory, &sub.u.clock.clock_id, in_ptr + 24); - wasi->readUInt64(memory, &sub.u.clock.timeout, in_ptr + 32); - wasi->readUInt64(memory, &sub.u.clock.precision, in_ptr + 40); - wasi->readUInt16(memory, &sub.u.clock.flags, in_ptr + 48); + wasi->readUInt32(memory, &sub.u.clock.clock_id, in_ptr + 16); + wasi->readUInt64(memory, &sub.u.clock.timeout, in_ptr + 24); + wasi->readUInt64(memory, &sub.u.clock.precision, in_ptr + 32); + wasi->readUInt16(memory, &sub.u.clock.flags, in_ptr + 40); } else if (sub.type == UVWASI_EVENTTYPE_FD_READ || sub.type == UVWASI_EVENTTYPE_FD_WRITE) { wasi->readUInt32(memory, &sub.u.fd_readwrite.fd, in_ptr + 16); diff --git a/test/fixtures/wasi/simple-wasi.wasm b/test/fixtures/wasi/simple-wasi.wasm deleted file mode 100755 index 334d3a3dcac6c0..00000000000000 Binary files a/test/fixtures/wasi/simple-wasi.wasm and /dev/null differ diff --git a/test/fixtures/wasi/simple-wasi.wat b/test/fixtures/wasi/simple-wasi.wat deleted file mode 100644 index 318f390c76b1fa..00000000000000 --- a/test/fixtures/wasi/simple-wasi.wat +++ /dev/null @@ -1,6533 +0,0 @@ -(module - (type (;0;) (func (param i32 i32 i32) (result i32))) - (type (;1;) (func (param i32 i64 i32) (result i64))) - (type (;2;) (func (param i32 i32) (result i32))) - (type (;3;) (func (param i32))) - (type (;4;) (func (param i32) (result i32))) - (type (;5;) (func (param i32 i32 i32 i32) (result i32))) - (type (;6;) (func (param i32 i64 i32 i32) (result i32))) - (type (;7;) (func)) - (type (;8;) (func (result i32))) - (import "wasi_unstable" "fd_prestat_get" (func (;0;) (type 2))) - (import "wasi_unstable" "fd_prestat_dir_name" (func (;1;) (type 0))) - (import "wasi_unstable" "environ_sizes_get" (func (;2;) (type 2))) - (import "wasi_unstable" "environ_get" (func (;3;) (type 2))) - (import "wasi_unstable" "args_sizes_get" (func (;4;) (type 2))) - (import "wasi_unstable" "args_get" (func (;5;) (type 2))) - (import "wasi_unstable" "proc_exit" (func (;6;) (type 3))) - (import "wasi_unstable" "fd_fdstat_get" (func (;7;) (type 2))) - (import "wasi_unstable" "fd_close" (func (;8;) (type 4))) - (import "wasi_unstable" "fd_write" (func (;9;) (type 5))) - (import "wasi_unstable" "fd_seek" (func (;10;) (type 6))) - (func (;11;) (type 7)) - (func (;12;) (type 7) - (local i32 i32 i32 i32) - get_global 0 - i32.const 16 - i32.sub - tee_local 0 - set_global 0 - call 23 - i32.const 3 - set_local 1 - block ;; label = @1 - block ;; label = @2 - block ;; label = @3 - block ;; label = @4 - loop ;; label = @5 - get_local 1 - get_local 0 - call 0 - tee_local 2 - i32.const 8 - i32.eq - br_if 1 (;@4;) - get_local 2 - br_if 3 (;@2;) - block ;; label = @6 - get_local 0 - i32.load8_u - br_if 0 (;@6;) - get_local 0 - i32.load offset=4 - i32.const 1 - i32.add - call 14 - tee_local 2 - i32.eqz - br_if 4 (;@2;) - get_local 1 - get_local 2 - get_local 0 - i32.load offset=4 - call 1 - br_if 3 (;@3;) - get_local 2 - get_local 0 - i32.load offset=4 - i32.add - i32.const 0 - i32.store8 - get_local 1 - get_local 2 - call 24 - set_local 3 - get_local 2 - call 16 - get_local 3 - br_if 4 (;@2;) - end - get_local 1 - i32.const 1 - i32.add - tee_local 1 - br_if 0 (;@5;) - end - end - block ;; label = @4 - get_local 0 - get_local 0 - i32.const 12 - i32.add - call 2 - br_if 0 (;@4;) - i32.const 0 - get_local 0 - i32.load - i32.const 2 - i32.shl - i32.const 4 - i32.add - call 14 - i32.store offset=1544 - get_local 0 - i32.load offset=12 - call 14 - tee_local 1 - i32.eqz - br_if 0 (;@4;) - i32.const 0 - i32.load offset=1544 - tee_local 2 - i32.eqz - br_if 0 (;@4;) - get_local 2 - get_local 0 - i32.load - i32.const 2 - i32.shl - i32.add - i32.const 0 - i32.store - i32.const 0 - i32.load offset=1544 - get_local 1 - call 3 - br_if 0 (;@4;) - block ;; label = @5 - block ;; label = @6 - block ;; label = @7 - get_local 0 - i32.const 12 - i32.add - get_local 0 - call 4 - br_if 0 (;@7;) - get_local 0 - i32.load offset=12 - tee_local 1 - i32.eqz - br_if 1 (;@6;) - get_local 1 - i32.const 2 - i32.shl - i32.const 4 - i32.add - call 14 - set_local 1 - get_local 0 - i32.load - call 14 - set_local 2 - get_local 1 - i32.eqz - br_if 0 (;@7;) - get_local 2 - i32.eqz - br_if 0 (;@7;) - get_local 1 - i32.const 0 - i32.store - get_local 1 - get_local 2 - call 5 - i32.eqz - br_if 2 (;@5;) - end - i32.const 71 - call 19 - unreachable - end - end - call 11 - get_local 0 - i32.load offset=12 - get_local 1 - call 13 - set_local 1 - call 27 - get_local 1 - br_if 3 (;@1;) - get_local 0 - i32.const 16 - i32.add - set_global 0 - return - end - i32.const 71 - call 19 - unreachable - end - get_local 2 - call 16 - end - i32.const 71 - call 19 - unreachable - end - get_local 1 - call 19 - unreachable) - (func (;13;) (type 2) (param i32 i32) (result i32) - i32.const 1024 - call 35 - drop - i32.const 0) - (func (;14;) (type 4) (param i32) (result i32) - get_local 0 - call 15) - (func (;15;) (type 4) (param i32) (result i32) - (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32) - get_global 0 - i32.const 16 - i32.sub - tee_local 1 - set_global 0 - block ;; label = @1 - block ;; label = @2 - block ;; label = @3 - block ;; label = @4 - block ;; label = @5 - block ;; label = @6 - block ;; label = @7 - block ;; label = @8 - block ;; label = @9 - block ;; label = @10 - block ;; label = @11 - block ;; label = @12 - block ;; label = @13 - block ;; label = @14 - block ;; label = @15 - block ;; label = @16 - block ;; label = @17 - block ;; label = @18 - block ;; label = @19 - block ;; label = @20 - block ;; label = @21 - block ;; label = @22 - block ;; label = @23 - block ;; label = @24 - block ;; label = @25 - block ;; label = @26 - block ;; label = @27 - block ;; label = @28 - block ;; label = @29 - block ;; label = @30 - block ;; label = @31 - block ;; label = @32 - block ;; label = @33 - block ;; label = @34 - block ;; label = @35 - block ;; label = @36 - block ;; label = @37 - block ;; label = @38 - get_local 0 - i32.const 244 - i32.gt_u - br_if 0 (;@38;) - i32.const 0 - i32.load offset=1040 - tee_local 2 - i32.const 16 - get_local 0 - i32.const 11 - i32.add - i32.const -8 - i32.and - get_local 0 - i32.const 11 - i32.lt_u - select - tee_local 3 - i32.const 3 - i32.shr_u - tee_local 4 - i32.shr_u - tee_local 0 - i32.const 3 - i32.and - i32.eqz - br_if 1 (;@37;) - get_local 0 - i32.const -1 - i32.xor - i32.const 1 - i32.and - get_local 4 - i32.add - tee_local 5 - i32.const 3 - i32.shl - tee_local 6 - i32.const 1088 - i32.add - i32.load - tee_local 4 - i32.const 8 - i32.add - set_local 0 - get_local 4 - i32.load offset=8 - tee_local 3 - get_local 6 - i32.const 1080 - i32.add - tee_local 6 - i32.eq - br_if 2 (;@36;) - get_local 3 - get_local 6 - i32.store offset=12 - get_local 6 - i32.const 8 - i32.add - get_local 3 - i32.store - br 3 (;@35;) - end - i32.const -1 - set_local 3 - get_local 0 - i32.const -65 - i32.gt_u - br_if 14 (;@23;) - get_local 0 - i32.const 11 - i32.add - tee_local 0 - i32.const -8 - i32.and - set_local 3 - i32.const 0 - i32.load offset=1044 - tee_local 7 - i32.eqz - br_if 14 (;@23;) - i32.const 0 - set_local 8 - block ;; label = @38 - get_local 0 - i32.const 8 - i32.shr_u - tee_local 0 - i32.eqz - br_if 0 (;@38;) - i32.const 31 - set_local 8 - get_local 3 - i32.const 16777215 - i32.gt_u - br_if 0 (;@38;) - get_local 3 - i32.const 14 - get_local 0 - get_local 0 - i32.const 1048320 - i32.add - i32.const 16 - i32.shr_u - i32.const 8 - i32.and - tee_local 4 - i32.shl - tee_local 0 - i32.const 520192 - i32.add - i32.const 16 - i32.shr_u - i32.const 4 - i32.and - tee_local 5 - get_local 4 - i32.or - get_local 0 - get_local 5 - i32.shl - tee_local 0 - i32.const 245760 - i32.add - i32.const 16 - i32.shr_u - i32.const 2 - i32.and - tee_local 4 - i32.or - i32.sub - get_local 0 - get_local 4 - i32.shl - i32.const 15 - i32.shr_u - i32.add - tee_local 0 - i32.const 7 - i32.add - i32.shr_u - i32.const 1 - i32.and - get_local 0 - i32.const 1 - i32.shl - i32.or - set_local 8 - end - i32.const 0 - get_local 3 - i32.sub - set_local 5 - get_local 8 - i32.const 2 - i32.shl - i32.const 1344 - i32.add - i32.load - tee_local 4 - i32.eqz - br_if 3 (;@34;) - get_local 3 - i32.const 0 - i32.const 25 - get_local 8 - i32.const 1 - i32.shr_u - i32.sub - get_local 8 - i32.const 31 - i32.eq - select - i32.shl - set_local 6 - i32.const 0 - set_local 0 - i32.const 0 - set_local 9 - loop ;; label = @38 - block ;; label = @39 - get_local 4 - i32.load offset=4 - i32.const -8 - i32.and - get_local 3 - i32.sub - tee_local 2 - get_local 5 - i32.ge_u - br_if 0 (;@39;) - get_local 2 - set_local 5 - get_local 4 - set_local 9 - get_local 2 - i32.eqz - br_if 8 (;@31;) - end - get_local 0 - get_local 4 - i32.const 20 - i32.add - i32.load - tee_local 2 - get_local 2 - get_local 4 - get_local 6 - i32.const 29 - i32.shr_u - i32.const 4 - i32.and - i32.add - i32.const 16 - i32.add - i32.load - tee_local 4 - i32.eq - select - get_local 0 - get_local 2 - select - set_local 0 - get_local 6 - get_local 4 - i32.const 0 - i32.ne - i32.shl - set_local 6 - get_local 4 - br_if 0 (;@38;) - end - get_local 0 - get_local 9 - i32.or - i32.eqz - br_if 4 (;@33;) - br 11 (;@26;) - end - get_local 3 - i32.const 0 - i32.load offset=1048 - tee_local 7 - i32.le_u - br_if 13 (;@23;) - get_local 0 - i32.eqz - br_if 4 (;@32;) - get_local 0 - get_local 4 - i32.shl - i32.const 2 - get_local 4 - i32.shl - tee_local 0 - i32.const 0 - get_local 0 - i32.sub - i32.or - i32.and - tee_local 0 - i32.const 0 - get_local 0 - i32.sub - i32.and - i32.const -1 - i32.add - tee_local 0 - get_local 0 - i32.const 12 - i32.shr_u - i32.const 16 - i32.and - tee_local 0 - i32.shr_u - tee_local 4 - i32.const 5 - i32.shr_u - i32.const 8 - i32.and - tee_local 5 - get_local 0 - i32.or - get_local 4 - get_local 5 - i32.shr_u - tee_local 0 - i32.const 2 - i32.shr_u - i32.const 4 - i32.and - tee_local 4 - i32.or - get_local 0 - get_local 4 - i32.shr_u - tee_local 0 - i32.const 1 - i32.shr_u - i32.const 2 - i32.and - tee_local 4 - i32.or - get_local 0 - get_local 4 - i32.shr_u - tee_local 0 - i32.const 1 - i32.shr_u - i32.const 1 - i32.and - tee_local 4 - i32.or - get_local 0 - get_local 4 - i32.shr_u - i32.add - tee_local 5 - i32.const 3 - i32.shl - tee_local 6 - i32.const 1088 - i32.add - i32.load - tee_local 4 - i32.load offset=8 - tee_local 0 - get_local 6 - i32.const 1080 - i32.add - tee_local 6 - i32.eq - br_if 6 (;@30;) - get_local 0 - get_local 6 - i32.store offset=12 - get_local 6 - i32.const 8 - i32.add - get_local 0 - i32.store - br 7 (;@29;) - end - i32.const 0 - get_local 2 - i32.const -2 - get_local 5 - i32.rotl - i32.and - i32.store offset=1040 - end - get_local 4 - get_local 5 - i32.const 3 - i32.shl - tee_local 5 - i32.const 3 - i32.or - i32.store offset=4 - get_local 4 - get_local 5 - i32.add - tee_local 4 - get_local 4 - i32.load offset=4 - i32.const 1 - i32.or - i32.store offset=4 - br 33 (;@1;) - end - i32.const 0 - set_local 0 - i32.const 0 - set_local 9 - i32.const 0 - i32.const 0 - i32.or - br_if 7 (;@26;) - end - i32.const 2 - get_local 8 - i32.shl - tee_local 0 - i32.const 0 - get_local 0 - i32.sub - i32.or - get_local 7 - i32.and - tee_local 0 - i32.eqz - br_if 9 (;@23;) - get_local 0 - i32.const 0 - get_local 0 - i32.sub - i32.and - i32.const -1 - i32.add - tee_local 0 - get_local 0 - i32.const 12 - i32.shr_u - i32.const 16 - i32.and - tee_local 0 - i32.shr_u - tee_local 4 - i32.const 5 - i32.shr_u - i32.const 8 - i32.and - tee_local 6 - get_local 0 - i32.or - get_local 4 - get_local 6 - i32.shr_u - tee_local 0 - i32.const 2 - i32.shr_u - i32.const 4 - i32.and - tee_local 4 - i32.or - get_local 0 - get_local 4 - i32.shr_u - tee_local 0 - i32.const 1 - i32.shr_u - i32.const 2 - i32.and - tee_local 4 - i32.or - get_local 0 - get_local 4 - i32.shr_u - tee_local 0 - i32.const 1 - i32.shr_u - i32.const 1 - i32.and - tee_local 4 - i32.or - get_local 0 - get_local 4 - i32.shr_u - i32.add - i32.const 2 - i32.shl - i32.const 1344 - i32.add - i32.load - tee_local 0 - br_if 7 (;@25;) - br 8 (;@24;) - end - i32.const 0 - i32.load offset=1044 - tee_local 10 - i32.eqz - br_if 8 (;@23;) - get_local 10 - i32.const 0 - get_local 10 - i32.sub - i32.and - i32.const -1 - i32.add - tee_local 0 - get_local 0 - i32.const 12 - i32.shr_u - i32.const 16 - i32.and - tee_local 0 - i32.shr_u - tee_local 4 - i32.const 5 - i32.shr_u - i32.const 8 - i32.and - tee_local 5 - get_local 0 - i32.or - get_local 4 - get_local 5 - i32.shr_u - tee_local 0 - i32.const 2 - i32.shr_u - i32.const 4 - i32.and - tee_local 4 - i32.or - get_local 0 - get_local 4 - i32.shr_u - tee_local 0 - i32.const 1 - i32.shr_u - i32.const 2 - i32.and - tee_local 4 - i32.or - get_local 0 - get_local 4 - i32.shr_u - tee_local 0 - i32.const 1 - i32.shr_u - i32.const 1 - i32.and - tee_local 4 - i32.or - get_local 0 - get_local 4 - i32.shr_u - i32.add - i32.const 2 - i32.shl - i32.const 1344 - i32.add - i32.load - tee_local 6 - i32.load offset=4 - i32.const -8 - i32.and - get_local 3 - i32.sub - set_local 5 - get_local 6 - tee_local 9 - i32.load offset=16 - tee_local 0 - i32.eqz - br_if 3 (;@28;) - i32.const 1 - set_local 4 - br 4 (;@27;) - end - i32.const 0 - set_local 5 - get_local 4 - set_local 9 - get_local 4 - set_local 0 - br 5 (;@25;) - end - i32.const 0 - get_local 2 - i32.const -2 - get_local 5 - i32.rotl - i32.and - tee_local 2 - i32.store offset=1040 - end - get_local 4 - i32.const 8 - i32.add - set_local 0 - get_local 4 - get_local 3 - i32.const 3 - i32.or - i32.store offset=4 - get_local 4 - get_local 5 - i32.const 3 - i32.shl - tee_local 5 - i32.add - get_local 5 - get_local 3 - i32.sub - tee_local 5 - i32.store - get_local 4 - get_local 3 - i32.add - tee_local 6 - get_local 5 - i32.const 1 - i32.or - i32.store offset=4 - block ;; label = @29 - get_local 7 - i32.eqz - br_if 0 (;@29;) - get_local 7 - i32.const 3 - i32.shr_u - tee_local 9 - i32.const 3 - i32.shl - i32.const 1080 - i32.add - set_local 3 - i32.const 0 - i32.load offset=1060 - set_local 4 - block ;; label = @30 - block ;; label = @31 - get_local 2 - i32.const 1 - get_local 9 - i32.shl - tee_local 9 - i32.and - i32.eqz - br_if 0 (;@31;) - get_local 3 - i32.load offset=8 - set_local 9 - br 1 (;@30;) - end - i32.const 0 - get_local 2 - get_local 9 - i32.or - i32.store offset=1040 - get_local 3 - set_local 9 - end - get_local 9 - get_local 4 - i32.store offset=12 - get_local 3 - get_local 4 - i32.store offset=8 - get_local 4 - get_local 3 - i32.store offset=12 - get_local 4 - get_local 9 - i32.store offset=8 - end - i32.const 0 - get_local 6 - i32.store offset=1060 - i32.const 0 - get_local 5 - i32.store offset=1048 - br 27 (;@1;) - end - i32.const 0 - set_local 4 - end - block ;; label = @27 - block ;; label = @28 - loop ;; label = @29 - block ;; label = @30 - block ;; label = @31 - block ;; label = @32 - block ;; label = @33 - get_local 4 - br_table 1 (;@32;) 0 (;@33;) 0 (;@33;) - end - get_local 0 - i32.load offset=4 - i32.const -8 - i32.and - get_local 3 - i32.sub - tee_local 4 - get_local 5 - get_local 4 - get_local 5 - i32.lt_u - tee_local 4 - select - set_local 5 - get_local 0 - get_local 6 - get_local 4 - select - set_local 6 - get_local 0 - tee_local 9 - i32.load offset=16 - tee_local 0 - br_if 1 (;@31;) - i32.const 0 - set_local 4 - br 3 (;@29;) - end - get_local 9 - i32.const 20 - i32.add - i32.load - tee_local 0 - br_if 1 (;@30;) - get_local 6 - get_local 3 - i32.add - tee_local 11 - get_local 6 - i32.le_u - br_if 8 (;@23;) - get_local 6 - i32.load offset=24 - set_local 12 - block ;; label = @32 - get_local 6 - i32.load offset=12 - tee_local 9 - get_local 6 - i32.eq - br_if 0 (;@32;) - get_local 6 - i32.load offset=8 - tee_local 0 - get_local 9 - i32.store offset=12 - get_local 9 - get_local 0 - i32.store offset=8 - get_local 12 - br_if 4 (;@28;) - br 5 (;@27;) - end - block ;; label = @32 - block ;; label = @33 - get_local 6 - i32.const 20 - i32.add - tee_local 4 - i32.load - tee_local 0 - br_if 0 (;@33;) - get_local 6 - i32.load offset=16 - tee_local 0 - i32.eqz - br_if 1 (;@32;) - get_local 6 - i32.const 16 - i32.add - set_local 4 - end - loop ;; label = @33 - get_local 4 - set_local 8 - get_local 0 - tee_local 9 - i32.const 20 - i32.add - tee_local 4 - i32.load - tee_local 0 - br_if 0 (;@33;) - get_local 9 - i32.const 16 - i32.add - set_local 4 - get_local 9 - i32.load offset=16 - tee_local 0 - br_if 0 (;@33;) - end - get_local 8 - i32.const 0 - i32.store - get_local 12 - i32.eqz - br_if 5 (;@27;) - br 4 (;@28;) - end - i32.const 0 - set_local 9 - get_local 12 - br_if 3 (;@28;) - br 4 (;@27;) - end - i32.const 1 - set_local 4 - br 1 (;@29;) - end - i32.const 1 - set_local 4 - br 0 (;@29;) - end - end - block ;; label = @28 - block ;; label = @29 - block ;; label = @30 - get_local 6 - get_local 6 - i32.load offset=28 - tee_local 4 - i32.const 2 - i32.shl - i32.const 1344 - i32.add - tee_local 0 - i32.load - i32.eq - br_if 0 (;@30;) - get_local 12 - i32.const 16 - i32.const 20 - get_local 12 - i32.load offset=16 - get_local 6 - i32.eq - select - i32.add - get_local 9 - i32.store - get_local 9 - br_if 1 (;@29;) - br 3 (;@27;) - end - get_local 0 - get_local 9 - i32.store - get_local 9 - i32.eqz - br_if 1 (;@28;) - end - get_local 9 - get_local 12 - i32.store offset=24 - block ;; label = @29 - get_local 6 - i32.load offset=16 - tee_local 0 - i32.eqz - br_if 0 (;@29;) - get_local 9 - get_local 0 - i32.store offset=16 - get_local 0 - get_local 9 - i32.store offset=24 - end - get_local 6 - i32.const 20 - i32.add - i32.load - tee_local 0 - i32.eqz - br_if 1 (;@27;) - get_local 9 - i32.const 20 - i32.add - get_local 0 - i32.store - get_local 0 - get_local 9 - i32.store offset=24 - br 1 (;@27;) - end - i32.const 0 - get_local 10 - i32.const -2 - get_local 4 - i32.rotl - i32.and - i32.store offset=1044 - end - block ;; label = @27 - block ;; label = @28 - get_local 5 - i32.const 15 - i32.gt_u - br_if 0 (;@28;) - get_local 6 - get_local 5 - get_local 3 - i32.add - tee_local 0 - i32.const 3 - i32.or - i32.store offset=4 - get_local 6 - get_local 0 - i32.add - tee_local 0 - get_local 0 - i32.load offset=4 - i32.const 1 - i32.or - i32.store offset=4 - br 1 (;@27;) - end - get_local 11 - get_local 5 - i32.const 1 - i32.or - i32.store offset=4 - get_local 6 - get_local 3 - i32.const 3 - i32.or - i32.store offset=4 - get_local 11 - get_local 5 - i32.add - get_local 5 - i32.store - block ;; label = @28 - get_local 7 - i32.eqz - br_if 0 (;@28;) - get_local 7 - i32.const 3 - i32.shr_u - tee_local 3 - i32.const 3 - i32.shl - i32.const 1080 - i32.add - set_local 4 - i32.const 0 - i32.load offset=1060 - set_local 0 - block ;; label = @29 - block ;; label = @30 - i32.const 1 - get_local 3 - i32.shl - tee_local 3 - get_local 2 - i32.and - i32.eqz - br_if 0 (;@30;) - get_local 4 - i32.load offset=8 - set_local 3 - br 1 (;@29;) - end - i32.const 0 - get_local 3 - get_local 2 - i32.or - i32.store offset=1040 - get_local 4 - set_local 3 - end - get_local 3 - get_local 0 - i32.store offset=12 - get_local 4 - get_local 0 - i32.store offset=8 - get_local 0 - get_local 4 - i32.store offset=12 - get_local 0 - get_local 3 - i32.store offset=8 - end - i32.const 0 - get_local 11 - i32.store offset=1060 - i32.const 0 - get_local 5 - i32.store offset=1048 - end - get_local 6 - i32.const 8 - i32.add - set_local 0 - br 25 (;@1;) - end - get_local 0 - i32.eqz - br_if 1 (;@24;) - end - loop ;; label = @25 - get_local 0 - i32.load offset=4 - i32.const -8 - i32.and - get_local 3 - i32.sub - tee_local 2 - get_local 5 - i32.lt_u - set_local 6 - block ;; label = @26 - get_local 0 - i32.load offset=16 - tee_local 4 - br_if 0 (;@26;) - get_local 0 - i32.const 20 - i32.add - i32.load - set_local 4 - end - get_local 2 - get_local 5 - get_local 6 - select - set_local 5 - get_local 0 - get_local 9 - get_local 6 - select - set_local 9 - get_local 4 - set_local 0 - get_local 4 - br_if 0 (;@25;) - end - end - get_local 9 - i32.eqz - br_if 0 (;@23;) - get_local 5 - i32.const 0 - i32.load offset=1048 - get_local 3 - i32.sub - i32.ge_u - br_if 0 (;@23;) - get_local 9 - get_local 3 - i32.add - tee_local 8 - get_local 9 - i32.le_u - br_if 0 (;@23;) - get_local 9 - i32.load offset=24 - set_local 10 - get_local 9 - i32.load offset=12 - tee_local 6 - get_local 9 - i32.eq - br_if 1 (;@22;) - get_local 9 - i32.load offset=8 - tee_local 0 - get_local 6 - i32.store offset=12 - get_local 6 - get_local 0 - i32.store offset=8 - get_local 10 - br_if 20 (;@3;) - br 21 (;@2;) - end - block ;; label = @23 - block ;; label = @24 - block ;; label = @25 - block ;; label = @26 - block ;; label = @27 - block ;; label = @28 - i32.const 0 - i32.load offset=1048 - tee_local 0 - get_local 3 - i32.ge_u - br_if 0 (;@28;) - i32.const 0 - i32.load offset=1052 - tee_local 6 - get_local 3 - i32.le_u - br_if 1 (;@27;) - i32.const 0 - i32.load offset=1064 - tee_local 0 - get_local 3 - i32.add - tee_local 4 - get_local 6 - get_local 3 - i32.sub - tee_local 5 - i32.const 1 - i32.or - i32.store offset=4 - i32.const 0 - get_local 5 - i32.store offset=1052 - i32.const 0 - get_local 4 - i32.store offset=1064 - get_local 0 - get_local 3 - i32.const 3 - i32.or - i32.store offset=4 - get_local 0 - i32.const 8 - i32.add - set_local 0 - br 27 (;@1;) - end - i32.const 0 - i32.load offset=1060 - set_local 4 - get_local 0 - get_local 3 - i32.sub - tee_local 5 - i32.const 16 - i32.lt_u - br_if 1 (;@26;) - get_local 4 - get_local 3 - i32.add - tee_local 6 - get_local 5 - i32.const 1 - i32.or - i32.store offset=4 - i32.const 0 - get_local 5 - i32.store offset=1048 - i32.const 0 - get_local 6 - i32.store offset=1060 - get_local 4 - get_local 0 - i32.add - get_local 5 - i32.store - get_local 4 - get_local 3 - i32.const 3 - i32.or - i32.store offset=4 - br 2 (;@25;) - end - i32.const 0 - i32.load offset=1512 - i32.eqz - br_if 2 (;@24;) - i32.const 0 - i32.load offset=1520 - set_local 4 - br 3 (;@23;) - end - get_local 4 - get_local 0 - i32.const 3 - i32.or - i32.store offset=4 - get_local 4 - get_local 0 - i32.add - tee_local 0 - get_local 0 - i32.load offset=4 - i32.const 1 - i32.or - i32.store offset=4 - i32.const 0 - i32.const 0 - i32.store offset=1060 - i32.const 0 - i32.const 0 - i32.store offset=1048 - end - get_local 4 - i32.const 8 - i32.add - set_local 0 - br 23 (;@1;) - end - i32.const 0 - i64.const -1 - i64.store offset=1524 align=4 - i32.const 0 - i64.const 281474976776192 - i64.store offset=1516 align=4 - i32.const 0 - get_local 1 - i32.const 12 - i32.add - i32.const -16 - i32.and - i32.const 1431655768 - i32.xor - i32.store offset=1512 - i32.const 0 - i32.const 0 - i32.store offset=1532 - i32.const 0 - i32.const 0 - i32.store offset=1484 - i32.const 65536 - set_local 4 - end - i32.const 0 - set_local 0 - block ;; label = @23 - block ;; label = @24 - get_local 4 - get_local 3 - i32.const 47 - i32.add - tee_local 7 - i32.add - tee_local 2 - i32.const 0 - get_local 4 - i32.sub - tee_local 8 - i32.and - tee_local 9 - get_local 3 - i32.le_u - br_if 0 (;@24;) - block ;; label = @25 - i32.const 0 - i32.load offset=1480 - tee_local 0 - i32.eqz - br_if 0 (;@25;) - i32.const 0 - i32.load offset=1472 - tee_local 4 - get_local 9 - i32.add - tee_local 5 - get_local 4 - i32.le_u - br_if 2 (;@23;) - get_local 5 - get_local 0 - i32.gt_u - br_if 2 (;@23;) - end - i32.const 0 - i32.load8_u offset=1484 - i32.const 4 - i32.and - br_if 10 (;@14;) - block ;; label = @25 - i32.const 0 - i32.load offset=1064 - tee_local 4 - i32.eqz - br_if 0 (;@25;) - i32.const 1488 - set_local 0 - loop ;; label = @26 - block ;; label = @27 - get_local 0 - i32.load - tee_local 5 - get_local 4 - i32.gt_u - br_if 0 (;@27;) - get_local 5 - get_local 0 - i32.load offset=4 - i32.add - get_local 4 - i32.gt_u - br_if 6 (;@21;) - end - get_local 0 - i32.load offset=8 - tee_local 0 - br_if 0 (;@26;) - end - end - i32.const 0 - call 25 - tee_local 6 - i32.const -1 - i32.eq - br_if 9 (;@15;) - get_local 9 - set_local 2 - block ;; label = @25 - i32.const 0 - i32.load offset=1516 - tee_local 0 - i32.const -1 - i32.add - tee_local 4 - get_local 6 - i32.and - i32.eqz - br_if 0 (;@25;) - get_local 9 - get_local 6 - i32.sub - get_local 4 - get_local 6 - i32.add - i32.const 0 - get_local 0 - i32.sub - i32.and - i32.add - set_local 2 - end - get_local 2 - get_local 3 - i32.le_u - br_if 9 (;@15;) - get_local 2 - i32.const 2147483646 - i32.gt_u - br_if 9 (;@15;) - block ;; label = @25 - i32.const 0 - i32.load offset=1480 - tee_local 0 - i32.eqz - br_if 0 (;@25;) - i32.const 0 - i32.load offset=1472 - tee_local 4 - get_local 2 - i32.add - tee_local 5 - get_local 4 - i32.le_u - br_if 10 (;@15;) - get_local 5 - get_local 0 - i32.gt_u - br_if 10 (;@15;) - end - get_local 2 - call 25 - tee_local 0 - get_local 6 - i32.ne - br_if 4 (;@20;) - br 11 (;@13;) - end - i32.const 0 - i32.const 48 - i32.store offset=1536 - br 22 (;@1;) - end - i32.const 0 - set_local 0 - i32.const 0 - i32.const 48 - i32.store offset=1536 - br 21 (;@1;) - end - block ;; label = @22 - get_local 9 - i32.const 20 - i32.add - tee_local 4 - i32.load - tee_local 0 - br_if 0 (;@22;) - get_local 9 - i32.load offset=16 - tee_local 0 - i32.eqz - br_if 3 (;@19;) - get_local 9 - i32.const 16 - i32.add - set_local 4 - end - loop ;; label = @22 - get_local 4 - set_local 2 - get_local 0 - tee_local 6 - i32.const 20 - i32.add - tee_local 4 - i32.load - tee_local 0 - br_if 0 (;@22;) - get_local 6 - i32.const 16 - i32.add - set_local 4 - get_local 6 - i32.load offset=16 - tee_local 0 - br_if 0 (;@22;) - end - get_local 2 - i32.const 0 - i32.store - get_local 10 - i32.eqz - br_if 19 (;@2;) - br 18 (;@3;) - end - get_local 2 - get_local 6 - i32.sub - get_local 8 - i32.and - tee_local 2 - i32.const 2147483646 - i32.gt_u - br_if 5 (;@15;) - get_local 2 - call 25 - tee_local 6 - get_local 0 - i32.load - get_local 0 - i32.load offset=4 - i32.add - i32.eq - br_if 3 (;@17;) - get_local 6 - set_local 0 - end - get_local 0 - set_local 6 - get_local 3 - i32.const 48 - i32.add - get_local 2 - i32.le_u - br_if 1 (;@18;) - get_local 2 - i32.const 2147483646 - i32.gt_u - br_if 1 (;@18;) - get_local 6 - i32.const -1 - i32.eq - br_if 1 (;@18;) - get_local 7 - get_local 2 - i32.sub - i32.const 0 - i32.load offset=1520 - tee_local 0 - i32.add - i32.const 0 - get_local 0 - i32.sub - i32.and - tee_local 0 - i32.const 2147483646 - i32.gt_u - br_if 6 (;@13;) - get_local 0 - call 25 - i32.const -1 - i32.eq - br_if 3 (;@16;) - get_local 0 - get_local 2 - i32.add - set_local 2 - br 6 (;@13;) - end - i32.const 0 - set_local 6 - get_local 10 - br_if 15 (;@3;) - br 16 (;@2;) - end - get_local 6 - i32.const -1 - i32.ne - br_if 4 (;@13;) - br 2 (;@15;) - end - get_local 6 - i32.const -1 - i32.ne - br_if 3 (;@13;) - br 1 (;@15;) - end - i32.const 0 - get_local 2 - i32.sub - call 25 - drop - end - i32.const 0 - i32.const 0 - i32.load offset=1484 - i32.const 4 - i32.or - i32.store offset=1484 - end - get_local 9 - i32.const 2147483646 - i32.gt_u - br_if 1 (;@12;) - get_local 9 - call 25 - tee_local 6 - i32.const 0 - call 25 - tee_local 0 - i32.ge_u - br_if 1 (;@12;) - get_local 6 - i32.const -1 - i32.eq - br_if 1 (;@12;) - get_local 0 - i32.const -1 - i32.eq - br_if 1 (;@12;) - get_local 0 - get_local 6 - i32.sub - tee_local 2 - get_local 3 - i32.const 40 - i32.add - i32.le_u - br_if 1 (;@12;) - end - i32.const 0 - i32.const 0 - i32.load offset=1472 - get_local 2 - i32.add - tee_local 0 - i32.store offset=1472 - block ;; label = @13 - get_local 0 - i32.const 0 - i32.load offset=1476 - i32.le_u - br_if 0 (;@13;) - i32.const 0 - get_local 0 - i32.store offset=1476 - end - block ;; label = @13 - block ;; label = @14 - block ;; label = @15 - block ;; label = @16 - i32.const 0 - i32.load offset=1064 - tee_local 4 - i32.eqz - br_if 0 (;@16;) - i32.const 1488 - set_local 0 - loop ;; label = @17 - get_local 6 - get_local 0 - i32.load - tee_local 5 - get_local 0 - i32.load offset=4 - tee_local 9 - i32.add - i32.eq - br_if 2 (;@15;) - get_local 0 - i32.load offset=8 - tee_local 0 - br_if 0 (;@17;) - br 3 (;@14;) - end - end - block ;; label = @16 - block ;; label = @17 - i32.const 0 - i32.load offset=1056 - tee_local 0 - i32.eqz - br_if 0 (;@17;) - get_local 6 - get_local 0 - i32.ge_u - br_if 1 (;@16;) - end - i32.const 0 - get_local 6 - i32.store offset=1056 - end - i32.const 0 - set_local 0 - i32.const 0 - get_local 2 - i32.store offset=1492 - i32.const 0 - get_local 6 - i32.store offset=1488 - i32.const 0 - i32.const -1 - i32.store offset=1072 - i32.const 0 - i32.const 0 - i32.load offset=1512 - i32.store offset=1076 - i32.const 0 - i32.const 0 - i32.store offset=1500 - loop ;; label = @16 - get_local 0 - i32.const 1088 - i32.add - get_local 0 - i32.const 1080 - i32.add - tee_local 4 - i32.store - get_local 0 - i32.const 1092 - i32.add - get_local 4 - i32.store - get_local 0 - i32.const 8 - i32.add - tee_local 0 - i32.const 256 - i32.ne - br_if 0 (;@16;) - end - get_local 6 - i32.const -8 - get_local 6 - i32.sub - i32.const 7 - i32.and - i32.const 0 - get_local 6 - i32.const 8 - i32.add - i32.const 7 - i32.and - select - tee_local 0 - i32.add - tee_local 4 - get_local 2 - i32.const -40 - i32.add - tee_local 5 - get_local 0 - i32.sub - tee_local 0 - i32.const 1 - i32.or - i32.store offset=4 - i32.const 0 - i32.const 0 - i32.load offset=1528 - i32.store offset=1068 - i32.const 0 - get_local 0 - i32.store offset=1052 - i32.const 0 - get_local 4 - i32.store offset=1064 - get_local 6 - get_local 5 - i32.add - i32.const 40 - i32.store offset=4 - br 2 (;@13;) - end - get_local 0 - i32.load8_u offset=12 - i32.const 8 - i32.and - br_if 0 (;@14;) - get_local 6 - get_local 4 - i32.le_u - br_if 0 (;@14;) - get_local 5 - get_local 4 - i32.gt_u - br_if 0 (;@14;) - get_local 4 - i32.const -8 - get_local 4 - i32.sub - i32.const 7 - i32.and - i32.const 0 - get_local 4 - i32.const 8 - i32.add - i32.const 7 - i32.and - select - tee_local 5 - i32.add - tee_local 6 - i32.const 0 - i32.load offset=1052 - get_local 2 - i32.add - tee_local 8 - get_local 5 - i32.sub - tee_local 5 - i32.const 1 - i32.or - i32.store offset=4 - get_local 0 - i32.const 4 - i32.add - get_local 9 - get_local 2 - i32.add - i32.store - i32.const 0 - i32.const 0 - i32.load offset=1528 - i32.store offset=1068 - i32.const 0 - get_local 5 - i32.store offset=1052 - i32.const 0 - get_local 6 - i32.store offset=1064 - get_local 4 - get_local 8 - i32.add - i32.const 40 - i32.store offset=4 - br 1 (;@13;) - end - block ;; label = @14 - get_local 6 - i32.const 0 - i32.load offset=1056 - i32.ge_u - br_if 0 (;@14;) - i32.const 0 - get_local 6 - i32.store offset=1056 - end - get_local 6 - get_local 2 - i32.add - set_local 5 - i32.const 1488 - set_local 0 - block ;; label = @14 - block ;; label = @15 - block ;; label = @16 - block ;; label = @17 - block ;; label = @18 - block ;; label = @19 - block ;; label = @20 - block ;; label = @21 - loop ;; label = @22 - get_local 0 - i32.load - get_local 5 - i32.eq - br_if 1 (;@21;) - get_local 0 - i32.load offset=8 - tee_local 0 - br_if 0 (;@22;) - br 2 (;@20;) - end - end - get_local 0 - i32.load8_u offset=12 - i32.const 8 - i32.and - br_if 0 (;@20;) - get_local 0 - get_local 6 - i32.store - get_local 0 - get_local 0 - i32.load offset=4 - get_local 2 - i32.add - i32.store offset=4 - get_local 6 - i32.const -8 - get_local 6 - i32.sub - i32.const 7 - i32.and - i32.const 0 - get_local 6 - i32.const 8 - i32.add - i32.const 7 - i32.and - select - i32.add - tee_local 2 - get_local 3 - i32.const 3 - i32.or - i32.store offset=4 - get_local 5 - i32.const -8 - get_local 5 - i32.sub - i32.const 7 - i32.and - i32.const 0 - get_local 5 - i32.const 8 - i32.add - i32.const 7 - i32.and - select - i32.add - tee_local 6 - get_local 2 - i32.sub - get_local 3 - i32.sub - set_local 0 - get_local 2 - get_local 3 - i32.add - set_local 5 - get_local 4 - get_local 6 - i32.eq - br_if 1 (;@19;) - i32.const 0 - i32.load offset=1060 - get_local 6 - i32.eq - br_if 9 (;@11;) - get_local 6 - i32.load offset=4 - tee_local 4 - i32.const 3 - i32.and - i32.const 1 - i32.ne - br_if 15 (;@5;) - get_local 4 - i32.const -8 - i32.and - set_local 7 - get_local 4 - i32.const 255 - i32.gt_u - br_if 10 (;@10;) - get_local 6 - i32.load offset=12 - tee_local 3 - get_local 6 - i32.load offset=8 - tee_local 9 - i32.eq - br_if 11 (;@9;) - get_local 3 - get_local 9 - i32.store offset=8 - get_local 9 - get_local 3 - i32.store offset=12 - br 14 (;@6;) - end - i32.const 1488 - set_local 0 - block ;; label = @20 - loop ;; label = @21 - block ;; label = @22 - get_local 0 - i32.load - tee_local 5 - get_local 4 - i32.gt_u - br_if 0 (;@22;) - get_local 5 - get_local 0 - i32.load offset=4 - i32.add - tee_local 5 - get_local 4 - i32.gt_u - br_if 2 (;@20;) - end - get_local 0 - i32.load offset=8 - set_local 0 - br 0 (;@21;) - end - end - get_local 6 - i32.const -8 - get_local 6 - i32.sub - i32.const 7 - i32.and - i32.const 0 - get_local 6 - i32.const 8 - i32.add - i32.const 7 - i32.and - select - tee_local 0 - i32.add - tee_local 8 - get_local 2 - i32.const -40 - i32.add - tee_local 9 - get_local 0 - i32.sub - tee_local 0 - i32.const 1 - i32.or - i32.store offset=4 - get_local 6 - get_local 9 - i32.add - i32.const 40 - i32.store offset=4 - get_local 4 - get_local 5 - i32.const 39 - get_local 5 - i32.sub - i32.const 7 - i32.and - i32.const 0 - get_local 5 - i32.const -39 - i32.add - i32.const 7 - i32.and - select - i32.add - i32.const -47 - i32.add - tee_local 9 - get_local 9 - get_local 4 - i32.const 16 - i32.add - i32.lt_u - select - tee_local 9 - i32.const 27 - i32.store offset=4 - i32.const 0 - i32.const 0 - i32.load offset=1528 - i32.store offset=1068 - i32.const 0 - get_local 0 - i32.store offset=1052 - i32.const 0 - get_local 8 - i32.store offset=1064 - get_local 9 - i32.const 16 - i32.add - i32.const 0 - i64.load offset=1496 align=4 - i64.store align=4 - get_local 9 - i32.const 0 - i64.load offset=1488 align=4 - i64.store offset=8 align=4 - i32.const 0 - get_local 2 - i32.store offset=1492 - i32.const 0 - get_local 6 - i32.store offset=1488 - i32.const 0 - get_local 9 - i32.const 8 - i32.add - i32.store offset=1496 - i32.const 0 - i32.const 0 - i32.store offset=1500 - get_local 9 - i32.const 28 - i32.add - set_local 0 - loop ;; label = @20 - get_local 0 - i32.const 7 - i32.store - get_local 0 - i32.const 4 - i32.add - tee_local 0 - get_local 5 - i32.lt_u - br_if 0 (;@20;) - end - get_local 9 - get_local 4 - i32.eq - br_if 6 (;@13;) - get_local 9 - i32.const 4 - i32.add - tee_local 0 - get_local 0 - i32.load - i32.const -2 - i32.and - i32.store - get_local 9 - get_local 9 - get_local 4 - i32.sub - tee_local 2 - i32.store - get_local 4 - get_local 2 - i32.const 1 - i32.or - i32.store offset=4 - block ;; label = @20 - get_local 2 - i32.const 255 - i32.gt_u - br_if 0 (;@20;) - get_local 2 - i32.const 3 - i32.shr_u - tee_local 5 - i32.const 3 - i32.shl - i32.const 1080 - i32.add - set_local 0 - i32.const 0 - i32.load offset=1040 - tee_local 6 - i32.const 1 - get_local 5 - i32.shl - tee_local 5 - i32.and - i32.eqz - br_if 2 (;@18;) - get_local 0 - i32.load offset=8 - set_local 5 - br 3 (;@17;) - end - i32.const 0 - set_local 0 - block ;; label = @20 - get_local 2 - i32.const 8 - i32.shr_u - tee_local 5 - i32.eqz - br_if 0 (;@20;) - i32.const 31 - set_local 0 - get_local 2 - i32.const 16777215 - i32.gt_u - br_if 0 (;@20;) - get_local 2 - i32.const 14 - get_local 5 - get_local 5 - i32.const 1048320 - i32.add - i32.const 16 - i32.shr_u - i32.const 8 - i32.and - tee_local 0 - i32.shl - tee_local 5 - i32.const 520192 - i32.add - i32.const 16 - i32.shr_u - i32.const 4 - i32.and - tee_local 6 - get_local 0 - i32.or - get_local 5 - get_local 6 - i32.shl - tee_local 0 - i32.const 245760 - i32.add - i32.const 16 - i32.shr_u - i32.const 2 - i32.and - tee_local 5 - i32.or - i32.sub - get_local 0 - get_local 5 - i32.shl - i32.const 15 - i32.shr_u - i32.add - tee_local 0 - i32.const 7 - i32.add - i32.shr_u - i32.const 1 - i32.and - get_local 0 - i32.const 1 - i32.shl - i32.or - set_local 0 - end - get_local 4 - i64.const 0 - i64.store offset=16 align=4 - get_local 4 - i32.const 28 - i32.add - get_local 0 - i32.store - get_local 0 - i32.const 2 - i32.shl - i32.const 1344 - i32.add - set_local 5 - i32.const 0 - i32.load offset=1044 - tee_local 6 - i32.const 1 - get_local 0 - i32.shl - tee_local 9 - i32.and - i32.eqz - br_if 3 (;@16;) - get_local 2 - i32.const 0 - i32.const 25 - get_local 0 - i32.const 1 - i32.shr_u - i32.sub - get_local 0 - i32.const 31 - i32.eq - select - i32.shl - set_local 0 - get_local 5 - i32.load - set_local 6 - loop ;; label = @20 - get_local 6 - tee_local 5 - i32.load offset=4 - i32.const -8 - i32.and - get_local 2 - i32.eq - br_if 6 (;@14;) - get_local 0 - i32.const 29 - i32.shr_u - set_local 6 - get_local 0 - i32.const 1 - i32.shl - set_local 0 - get_local 5 - get_local 6 - i32.const 4 - i32.and - i32.add - i32.const 16 - i32.add - tee_local 9 - i32.load - tee_local 6 - br_if 0 (;@20;) - end - get_local 9 - get_local 4 - i32.store - get_local 4 - i32.const 24 - i32.add - get_local 5 - i32.store - br 4 (;@15;) - end - i32.const 0 - get_local 5 - i32.store offset=1064 - i32.const 0 - i32.const 0 - i32.load offset=1052 - get_local 0 - i32.add - tee_local 0 - i32.store offset=1052 - get_local 5 - get_local 0 - i32.const 1 - i32.or - i32.store offset=4 - br 14 (;@4;) - end - i32.const 0 - get_local 6 - get_local 5 - i32.or - i32.store offset=1040 - get_local 0 - set_local 5 - end - get_local 5 - get_local 4 - i32.store offset=12 - get_local 0 - get_local 4 - i32.store offset=8 - get_local 4 - get_local 0 - i32.store offset=12 - get_local 4 - get_local 5 - i32.store offset=8 - br 3 (;@13;) - end - get_local 5 - get_local 4 - i32.store - i32.const 0 - get_local 6 - get_local 9 - i32.or - i32.store offset=1044 - get_local 4 - i32.const 24 - i32.add - get_local 5 - i32.store - end - get_local 4 - get_local 4 - i32.store offset=12 - get_local 4 - get_local 4 - i32.store offset=8 - br 1 (;@13;) - end - get_local 5 - i32.load offset=8 - tee_local 0 - get_local 4 - i32.store offset=12 - get_local 5 - get_local 4 - i32.store offset=8 - get_local 4 - i32.const 24 - i32.add - i32.const 0 - i32.store - get_local 4 - get_local 5 - i32.store offset=12 - get_local 4 - get_local 0 - i32.store offset=8 - end - i32.const 0 - i32.load offset=1052 - tee_local 0 - get_local 3 - i32.le_u - br_if 0 (;@12;) - i32.const 0 - i32.load offset=1064 - tee_local 4 - get_local 3 - i32.add - tee_local 5 - get_local 0 - get_local 3 - i32.sub - tee_local 0 - i32.const 1 - i32.or - i32.store offset=4 - i32.const 0 - get_local 0 - i32.store offset=1052 - i32.const 0 - get_local 5 - i32.store offset=1064 - get_local 4 - get_local 3 - i32.const 3 - i32.or - i32.store offset=4 - get_local 4 - i32.const 8 - i32.add - set_local 0 - br 11 (;@1;) - end - i32.const 0 - set_local 0 - i32.const 0 - i32.const 48 - i32.store offset=1536 - br 10 (;@1;) - end - i32.const 0 - get_local 5 - i32.store offset=1060 - i32.const 0 - i32.const 0 - i32.load offset=1048 - get_local 0 - i32.add - tee_local 0 - i32.store offset=1048 - get_local 5 - get_local 0 - i32.const 1 - i32.or - i32.store offset=4 - get_local 5 - get_local 0 - i32.add - get_local 0 - i32.store - br 6 (;@4;) - end - get_local 6 - i32.load offset=24 - set_local 10 - get_local 6 - i32.load offset=12 - tee_local 9 - get_local 6 - i32.eq - br_if 1 (;@8;) - get_local 6 - i32.load offset=8 - tee_local 4 - get_local 9 - i32.store offset=12 - get_local 9 - get_local 4 - i32.store offset=8 - get_local 10 - br_if 2 (;@7;) - br 3 (;@6;) - end - i32.const 0 - i32.const 0 - i32.load offset=1040 - i32.const -2 - get_local 4 - i32.const 3 - i32.shr_u - i32.rotl - i32.and - i32.store offset=1040 - br 2 (;@6;) - end - block ;; label = @8 - block ;; label = @9 - get_local 6 - i32.const 20 - i32.add - tee_local 4 - i32.load - tee_local 3 - br_if 0 (;@9;) - get_local 6 - i32.const 16 - i32.add - tee_local 4 - i32.load - tee_local 3 - i32.eqz - br_if 1 (;@8;) - end - loop ;; label = @9 - get_local 4 - set_local 8 - get_local 3 - tee_local 9 - i32.const 20 - i32.add - tee_local 4 - i32.load - tee_local 3 - br_if 0 (;@9;) - get_local 9 - i32.const 16 - i32.add - set_local 4 - get_local 9 - i32.load offset=16 - tee_local 3 - br_if 0 (;@9;) - end - get_local 8 - i32.const 0 - i32.store - get_local 10 - i32.eqz - br_if 2 (;@6;) - br 1 (;@7;) - end - i32.const 0 - set_local 9 - get_local 10 - i32.eqz - br_if 1 (;@6;) - end - block ;; label = @7 - block ;; label = @8 - block ;; label = @9 - get_local 6 - i32.load offset=28 - tee_local 3 - i32.const 2 - i32.shl - i32.const 1344 - i32.add - tee_local 4 - i32.load - get_local 6 - i32.eq - br_if 0 (;@9;) - get_local 10 - i32.const 16 - i32.const 20 - get_local 10 - i32.load offset=16 - get_local 6 - i32.eq - select - i32.add - get_local 9 - i32.store - get_local 9 - br_if 1 (;@8;) - br 3 (;@6;) - end - get_local 4 - get_local 9 - i32.store - get_local 9 - i32.eqz - br_if 1 (;@7;) - end - get_local 9 - get_local 10 - i32.store offset=24 - block ;; label = @8 - get_local 6 - i32.load offset=16 - tee_local 4 - i32.eqz - br_if 0 (;@8;) - get_local 9 - get_local 4 - i32.store offset=16 - get_local 4 - get_local 9 - i32.store offset=24 - end - get_local 6 - i32.const 20 - i32.add - i32.load - tee_local 4 - i32.eqz - br_if 1 (;@6;) - get_local 9 - i32.const 20 - i32.add - get_local 4 - i32.store - get_local 4 - get_local 9 - i32.store offset=24 - br 1 (;@6;) - end - i32.const 0 - i32.const 0 - i32.load offset=1044 - i32.const -2 - get_local 3 - i32.rotl - i32.and - i32.store offset=1044 - end - get_local 7 - get_local 0 - i32.add - set_local 0 - get_local 6 - get_local 7 - i32.add - set_local 6 - end - get_local 6 - get_local 6 - i32.load offset=4 - i32.const -2 - i32.and - i32.store offset=4 - get_local 5 - get_local 0 - i32.add - get_local 0 - i32.store - get_local 5 - get_local 0 - i32.const 1 - i32.or - i32.store offset=4 - block ;; label = @5 - block ;; label = @6 - block ;; label = @7 - block ;; label = @8 - block ;; label = @9 - block ;; label = @10 - get_local 0 - i32.const 255 - i32.gt_u - br_if 0 (;@10;) - get_local 0 - i32.const 3 - i32.shr_u - tee_local 4 - i32.const 3 - i32.shl - i32.const 1080 - i32.add - set_local 0 - i32.const 0 - i32.load offset=1040 - tee_local 3 - i32.const 1 - get_local 4 - i32.shl - tee_local 4 - i32.and - i32.eqz - br_if 1 (;@9;) - get_local 0 - i32.load offset=8 - set_local 4 - br 2 (;@8;) - end - i32.const 0 - set_local 4 - block ;; label = @10 - get_local 0 - i32.const 8 - i32.shr_u - tee_local 3 - i32.eqz - br_if 0 (;@10;) - i32.const 31 - set_local 4 - get_local 0 - i32.const 16777215 - i32.gt_u - br_if 0 (;@10;) - get_local 0 - i32.const 14 - get_local 3 - get_local 3 - i32.const 1048320 - i32.add - i32.const 16 - i32.shr_u - i32.const 8 - i32.and - tee_local 4 - i32.shl - tee_local 3 - i32.const 520192 - i32.add - i32.const 16 - i32.shr_u - i32.const 4 - i32.and - tee_local 6 - get_local 4 - i32.or - get_local 3 - get_local 6 - i32.shl - tee_local 4 - i32.const 245760 - i32.add - i32.const 16 - i32.shr_u - i32.const 2 - i32.and - tee_local 3 - i32.or - i32.sub - get_local 4 - get_local 3 - i32.shl - i32.const 15 - i32.shr_u - i32.add - tee_local 4 - i32.const 7 - i32.add - i32.shr_u - i32.const 1 - i32.and - get_local 4 - i32.const 1 - i32.shl - i32.or - set_local 4 - end - get_local 5 - get_local 4 - i32.store offset=28 - get_local 5 - i64.const 0 - i64.store offset=16 align=4 - get_local 4 - i32.const 2 - i32.shl - i32.const 1344 - i32.add - set_local 3 - i32.const 0 - i32.load offset=1044 - tee_local 6 - i32.const 1 - get_local 4 - i32.shl - tee_local 9 - i32.and - i32.eqz - br_if 2 (;@7;) - get_local 0 - i32.const 0 - i32.const 25 - get_local 4 - i32.const 1 - i32.shr_u - i32.sub - get_local 4 - i32.const 31 - i32.eq - select - i32.shl - set_local 4 - get_local 3 - i32.load - set_local 6 - loop ;; label = @10 - get_local 6 - tee_local 3 - i32.load offset=4 - i32.const -8 - i32.and - get_local 0 - i32.eq - br_if 5 (;@5;) - get_local 4 - i32.const 29 - i32.shr_u - set_local 6 - get_local 4 - i32.const 1 - i32.shl - set_local 4 - get_local 3 - get_local 6 - i32.const 4 - i32.and - i32.add - i32.const 16 - i32.add - tee_local 9 - i32.load - tee_local 6 - br_if 0 (;@10;) - end - get_local 9 - get_local 5 - i32.store - get_local 5 - get_local 3 - i32.store offset=24 - br 3 (;@6;) - end - i32.const 0 - get_local 3 - get_local 4 - i32.or - i32.store offset=1040 - get_local 0 - set_local 4 - end - get_local 4 - get_local 5 - i32.store offset=12 - get_local 0 - get_local 5 - i32.store offset=8 - get_local 5 - get_local 0 - i32.store offset=12 - get_local 5 - get_local 4 - i32.store offset=8 - br 3 (;@4;) - end - get_local 3 - get_local 5 - i32.store - i32.const 0 - get_local 6 - get_local 9 - i32.or - i32.store offset=1044 - get_local 5 - get_local 3 - i32.store offset=24 - end - get_local 5 - get_local 5 - i32.store offset=12 - get_local 5 - get_local 5 - i32.store offset=8 - br 1 (;@4;) - end - get_local 3 - i32.load offset=8 - tee_local 0 - get_local 5 - i32.store offset=12 - get_local 3 - get_local 5 - i32.store offset=8 - get_local 5 - i32.const 0 - i32.store offset=24 - get_local 5 - get_local 3 - i32.store offset=12 - get_local 5 - get_local 0 - i32.store offset=8 - end - get_local 2 - i32.const 8 - i32.add - set_local 0 - br 2 (;@1;) - end - block ;; label = @3 - block ;; label = @4 - block ;; label = @5 - get_local 9 - get_local 9 - i32.load offset=28 - tee_local 4 - i32.const 2 - i32.shl - i32.const 1344 - i32.add - tee_local 0 - i32.load - i32.eq - br_if 0 (;@5;) - get_local 10 - i32.const 16 - i32.const 20 - get_local 10 - i32.load offset=16 - get_local 9 - i32.eq - select - i32.add - get_local 6 - i32.store - get_local 6 - br_if 1 (;@4;) - br 3 (;@2;) - end - get_local 0 - get_local 6 - i32.store - get_local 6 - i32.eqz - br_if 1 (;@3;) - end - get_local 6 - get_local 10 - i32.store offset=24 - block ;; label = @4 - get_local 9 - i32.load offset=16 - tee_local 0 - i32.eqz - br_if 0 (;@4;) - get_local 6 - get_local 0 - i32.store offset=16 - get_local 0 - get_local 6 - i32.store offset=24 - end - get_local 9 - i32.const 20 - i32.add - i32.load - tee_local 0 - i32.eqz - br_if 1 (;@2;) - get_local 6 - i32.const 20 - i32.add - get_local 0 - i32.store - get_local 0 - get_local 6 - i32.store offset=24 - br 1 (;@2;) - end - i32.const 0 - get_local 7 - i32.const -2 - get_local 4 - i32.rotl - i32.and - tee_local 7 - i32.store offset=1044 - end - block ;; label = @2 - block ;; label = @3 - get_local 5 - i32.const 15 - i32.gt_u - br_if 0 (;@3;) - get_local 9 - get_local 5 - get_local 3 - i32.add - tee_local 0 - i32.const 3 - i32.or - i32.store offset=4 - get_local 9 - get_local 0 - i32.add - tee_local 0 - get_local 0 - i32.load offset=4 - i32.const 1 - i32.or - i32.store offset=4 - br 1 (;@2;) - end - get_local 8 - get_local 5 - i32.const 1 - i32.or - i32.store offset=4 - get_local 9 - get_local 3 - i32.const 3 - i32.or - i32.store offset=4 - get_local 8 - get_local 5 - i32.add - get_local 5 - i32.store - block ;; label = @3 - block ;; label = @4 - block ;; label = @5 - block ;; label = @6 - block ;; label = @7 - get_local 5 - i32.const 255 - i32.gt_u - br_if 0 (;@7;) - get_local 5 - i32.const 3 - i32.shr_u - tee_local 4 - i32.const 3 - i32.shl - i32.const 1080 - i32.add - set_local 0 - i32.const 0 - i32.load offset=1040 - tee_local 5 - i32.const 1 - get_local 4 - i32.shl - tee_local 4 - i32.and - i32.eqz - br_if 1 (;@6;) - get_local 0 - i32.load offset=8 - set_local 4 - br 2 (;@5;) - end - get_local 5 - i32.const 8 - i32.shr_u - tee_local 4 - i32.eqz - br_if 2 (;@4;) - i32.const 31 - set_local 0 - get_local 5 - i32.const 16777215 - i32.gt_u - br_if 3 (;@3;) - get_local 5 - i32.const 14 - get_local 4 - get_local 4 - i32.const 1048320 - i32.add - i32.const 16 - i32.shr_u - i32.const 8 - i32.and - tee_local 0 - i32.shl - tee_local 4 - i32.const 520192 - i32.add - i32.const 16 - i32.shr_u - i32.const 4 - i32.and - tee_local 3 - get_local 0 - i32.or - get_local 4 - get_local 3 - i32.shl - tee_local 0 - i32.const 245760 - i32.add - i32.const 16 - i32.shr_u - i32.const 2 - i32.and - tee_local 4 - i32.or - i32.sub - get_local 0 - get_local 4 - i32.shl - i32.const 15 - i32.shr_u - i32.add - tee_local 0 - i32.const 7 - i32.add - i32.shr_u - i32.const 1 - i32.and - get_local 0 - i32.const 1 - i32.shl - i32.or - set_local 0 - br 3 (;@3;) - end - i32.const 0 - get_local 5 - get_local 4 - i32.or - i32.store offset=1040 - get_local 0 - set_local 4 - end - get_local 4 - get_local 8 - i32.store offset=12 - get_local 0 - get_local 8 - i32.store offset=8 - get_local 8 - get_local 0 - i32.store offset=12 - get_local 8 - get_local 4 - i32.store offset=8 - br 2 (;@2;) - end - i32.const 0 - set_local 0 - end - get_local 8 - get_local 0 - i32.store offset=28 - get_local 8 - i64.const 0 - i64.store offset=16 align=4 - get_local 0 - i32.const 2 - i32.shl - i32.const 1344 - i32.add - set_local 4 - block ;; label = @3 - block ;; label = @4 - block ;; label = @5 - get_local 7 - i32.const 1 - get_local 0 - i32.shl - tee_local 3 - i32.and - i32.eqz - br_if 0 (;@5;) - get_local 5 - i32.const 0 - i32.const 25 - get_local 0 - i32.const 1 - i32.shr_u - i32.sub - get_local 0 - i32.const 31 - i32.eq - select - i32.shl - set_local 0 - get_local 4 - i32.load - set_local 3 - loop ;; label = @6 - get_local 3 - tee_local 4 - i32.load offset=4 - i32.const -8 - i32.and - get_local 5 - i32.eq - br_if 3 (;@3;) - get_local 0 - i32.const 29 - i32.shr_u - set_local 3 - get_local 0 - i32.const 1 - i32.shl - set_local 0 - get_local 4 - get_local 3 - i32.const 4 - i32.and - i32.add - i32.const 16 - i32.add - tee_local 6 - i32.load - tee_local 3 - br_if 0 (;@6;) - end - get_local 6 - get_local 8 - i32.store - get_local 8 - get_local 4 - i32.store offset=24 - br 1 (;@4;) - end - get_local 4 - get_local 8 - i32.store - i32.const 0 - get_local 7 - get_local 3 - i32.or - i32.store offset=1044 - get_local 8 - get_local 4 - i32.store offset=24 - end - get_local 8 - get_local 8 - i32.store offset=12 - get_local 8 - get_local 8 - i32.store offset=8 - br 1 (;@2;) - end - get_local 4 - i32.load offset=8 - tee_local 0 - get_local 8 - i32.store offset=12 - get_local 4 - get_local 8 - i32.store offset=8 - get_local 8 - i32.const 0 - i32.store offset=24 - get_local 8 - get_local 4 - i32.store offset=12 - get_local 8 - get_local 0 - i32.store offset=8 - end - get_local 9 - i32.const 8 - i32.add - set_local 0 - end - get_local 1 - i32.const 16 - i32.add - set_global 0 - get_local 0) - (func (;16;) (type 3) (param i32) - get_local 0 - call 17) - (func (;17;) (type 3) (param i32) - (local i32 i32 i32 i32 i32 i32 i32) - block ;; label = @1 - block ;; label = @2 - get_local 0 - i32.eqz - br_if 0 (;@2;) - get_local 0 - i32.const -8 - i32.add - tee_local 1 - get_local 0 - i32.const -4 - i32.add - i32.load - tee_local 2 - i32.const -8 - i32.and - tee_local 0 - i32.add - set_local 3 - block ;; label = @3 - block ;; label = @4 - get_local 2 - i32.const 1 - i32.and - br_if 0 (;@4;) - get_local 2 - i32.const 3 - i32.and - i32.eqz - br_if 2 (;@2;) - get_local 1 - get_local 1 - i32.load - tee_local 2 - i32.sub - tee_local 1 - i32.const 0 - i32.load offset=1056 - i32.lt_u - br_if 2 (;@2;) - get_local 2 - get_local 0 - i32.add - set_local 0 - block ;; label = @5 - block ;; label = @6 - block ;; label = @7 - block ;; label = @8 - block ;; label = @9 - i32.const 0 - i32.load offset=1060 - get_local 1 - i32.eq - br_if 0 (;@9;) - get_local 2 - i32.const 255 - i32.gt_u - br_if 1 (;@8;) - get_local 1 - i32.load offset=12 - tee_local 4 - get_local 1 - i32.load offset=8 - tee_local 5 - i32.eq - br_if 2 (;@7;) - get_local 4 - get_local 5 - i32.store offset=8 - get_local 5 - get_local 4 - i32.store offset=12 - get_local 1 - get_local 3 - i32.lt_u - br_if 6 (;@3;) - br 7 (;@2;) - end - get_local 3 - i32.load offset=4 - tee_local 2 - i32.const 3 - i32.and - i32.const 3 - i32.ne - br_if 4 (;@4;) - get_local 3 - i32.const 4 - i32.add - get_local 2 - i32.const -2 - i32.and - i32.store - i32.const 0 - get_local 0 - i32.store offset=1048 - get_local 1 - get_local 0 - i32.add - get_local 0 - i32.store - get_local 1 - get_local 0 - i32.const 1 - i32.or - i32.store offset=4 - return - end - get_local 1 - i32.load offset=24 - set_local 6 - get_local 1 - i32.load offset=12 - tee_local 5 - get_local 1 - i32.eq - br_if 1 (;@6;) - get_local 1 - i32.load offset=8 - tee_local 2 - get_local 5 - i32.store offset=12 - get_local 5 - get_local 2 - i32.store offset=8 - get_local 6 - br_if 2 (;@5;) - br 3 (;@4;) - end - i32.const 0 - i32.const 0 - i32.load offset=1040 - i32.const -2 - get_local 2 - i32.const 3 - i32.shr_u - i32.rotl - i32.and - i32.store offset=1040 - get_local 1 - get_local 3 - i32.lt_u - br_if 3 (;@3;) - br 4 (;@2;) - end - block ;; label = @6 - block ;; label = @7 - get_local 1 - i32.const 20 - i32.add - tee_local 2 - i32.load - tee_local 4 - br_if 0 (;@7;) - get_local 1 - i32.const 16 - i32.add - tee_local 2 - i32.load - tee_local 4 - i32.eqz - br_if 1 (;@6;) - end - loop ;; label = @7 - get_local 2 - set_local 7 - get_local 4 - tee_local 5 - i32.const 20 - i32.add - tee_local 2 - i32.load - tee_local 4 - br_if 0 (;@7;) - get_local 5 - i32.const 16 - i32.add - set_local 2 - get_local 5 - i32.load offset=16 - tee_local 4 - br_if 0 (;@7;) - end - get_local 7 - i32.const 0 - i32.store - get_local 6 - i32.eqz - br_if 2 (;@4;) - br 1 (;@5;) - end - i32.const 0 - set_local 5 - get_local 6 - i32.eqz - br_if 1 (;@4;) - end - block ;; label = @5 - block ;; label = @6 - block ;; label = @7 - get_local 1 - i32.load offset=28 - tee_local 4 - i32.const 2 - i32.shl - i32.const 1344 - i32.add - tee_local 2 - i32.load - get_local 1 - i32.eq - br_if 0 (;@7;) - get_local 6 - i32.const 16 - i32.const 20 - get_local 6 - i32.load offset=16 - get_local 1 - i32.eq - select - i32.add - get_local 5 - i32.store - get_local 5 - br_if 1 (;@6;) - br 3 (;@4;) - end - get_local 2 - get_local 5 - i32.store - get_local 5 - i32.eqz - br_if 1 (;@5;) - end - get_local 5 - get_local 6 - i32.store offset=24 - block ;; label = @6 - get_local 1 - i32.load offset=16 - tee_local 2 - i32.eqz - br_if 0 (;@6;) - get_local 5 - get_local 2 - i32.store offset=16 - get_local 2 - get_local 5 - i32.store offset=24 - end - get_local 1 - i32.const 20 - i32.add - i32.load - tee_local 2 - i32.eqz - br_if 1 (;@4;) - get_local 5 - i32.const 20 - i32.add - get_local 2 - i32.store - get_local 2 - get_local 5 - i32.store offset=24 - get_local 1 - get_local 3 - i32.lt_u - br_if 2 (;@3;) - br 3 (;@2;) - end - i32.const 0 - i32.const 0 - i32.load offset=1044 - i32.const -2 - get_local 4 - i32.rotl - i32.and - i32.store offset=1044 - end - get_local 1 - get_local 3 - i32.ge_u - br_if 1 (;@2;) - end - get_local 3 - i32.load offset=4 - tee_local 2 - i32.const 1 - i32.and - i32.eqz - br_if 0 (;@2;) - block ;; label = @3 - block ;; label = @4 - block ;; label = @5 - block ;; label = @6 - block ;; label = @7 - block ;; label = @8 - block ;; label = @9 - block ;; label = @10 - block ;; label = @11 - get_local 2 - i32.const 2 - i32.and - br_if 0 (;@11;) - i32.const 0 - i32.load offset=1064 - get_local 3 - i32.eq - br_if 1 (;@10;) - i32.const 0 - i32.load offset=1060 - get_local 3 - i32.eq - br_if 2 (;@9;) - get_local 2 - i32.const -8 - i32.and - get_local 0 - i32.add - set_local 0 - get_local 2 - i32.const 255 - i32.gt_u - br_if 3 (;@8;) - get_local 3 - i32.load offset=12 - tee_local 4 - get_local 3 - i32.load offset=8 - tee_local 5 - i32.eq - br_if 4 (;@7;) - get_local 4 - get_local 5 - i32.store offset=8 - get_local 5 - get_local 4 - i32.store offset=12 - br 7 (;@4;) - end - get_local 3 - i32.const 4 - i32.add - get_local 2 - i32.const -2 - i32.and - i32.store - get_local 1 - get_local 0 - i32.add - get_local 0 - i32.store - get_local 1 - get_local 0 - i32.const 1 - i32.or - i32.store offset=4 - br 7 (;@3;) - end - i32.const 0 - get_local 1 - i32.store offset=1064 - i32.const 0 - i32.const 0 - i32.load offset=1052 - get_local 0 - i32.add - tee_local 0 - i32.store offset=1052 - get_local 1 - get_local 0 - i32.const 1 - i32.or - i32.store offset=4 - get_local 1 - i32.const 0 - i32.load offset=1060 - i32.ne - br_if 7 (;@2;) - i32.const 0 - i32.const 0 - i32.store offset=1048 - i32.const 0 - i32.const 0 - i32.store offset=1060 - return - end - i32.const 0 - get_local 1 - i32.store offset=1060 - i32.const 0 - i32.const 0 - i32.load offset=1048 - get_local 0 - i32.add - tee_local 0 - i32.store offset=1048 - get_local 1 - get_local 0 - i32.const 1 - i32.or - i32.store offset=4 - get_local 1 - get_local 0 - i32.add - get_local 0 - i32.store - return - end - get_local 3 - i32.load offset=24 - set_local 6 - get_local 3 - i32.load offset=12 - tee_local 5 - get_local 3 - i32.eq - br_if 1 (;@6;) - get_local 3 - i32.load offset=8 - tee_local 2 - get_local 5 - i32.store offset=12 - get_local 5 - get_local 2 - i32.store offset=8 - get_local 6 - br_if 2 (;@5;) - br 3 (;@4;) - end - i32.const 0 - i32.const 0 - i32.load offset=1040 - i32.const -2 - get_local 2 - i32.const 3 - i32.shr_u - i32.rotl - i32.and - i32.store offset=1040 - br 2 (;@4;) - end - block ;; label = @6 - block ;; label = @7 - get_local 3 - i32.const 20 - i32.add - tee_local 2 - i32.load - tee_local 4 - br_if 0 (;@7;) - get_local 3 - i32.const 16 - i32.add - tee_local 2 - i32.load - tee_local 4 - i32.eqz - br_if 1 (;@6;) - end - loop ;; label = @7 - get_local 2 - set_local 7 - get_local 4 - tee_local 5 - i32.const 20 - i32.add - tee_local 2 - i32.load - tee_local 4 - br_if 0 (;@7;) - get_local 5 - i32.const 16 - i32.add - set_local 2 - get_local 5 - i32.load offset=16 - tee_local 4 - br_if 0 (;@7;) - end - get_local 7 - i32.const 0 - i32.store - get_local 6 - i32.eqz - br_if 2 (;@4;) - br 1 (;@5;) - end - i32.const 0 - set_local 5 - get_local 6 - i32.eqz - br_if 1 (;@4;) - end - block ;; label = @5 - block ;; label = @6 - block ;; label = @7 - get_local 3 - i32.load offset=28 - tee_local 4 - i32.const 2 - i32.shl - i32.const 1344 - i32.add - tee_local 2 - i32.load - get_local 3 - i32.eq - br_if 0 (;@7;) - get_local 6 - i32.const 16 - i32.const 20 - get_local 6 - i32.load offset=16 - get_local 3 - i32.eq - select - i32.add - get_local 5 - i32.store - get_local 5 - br_if 1 (;@6;) - br 3 (;@4;) - end - get_local 2 - get_local 5 - i32.store - get_local 5 - i32.eqz - br_if 1 (;@5;) - end - get_local 5 - get_local 6 - i32.store offset=24 - block ;; label = @6 - get_local 3 - i32.load offset=16 - tee_local 2 - i32.eqz - br_if 0 (;@6;) - get_local 5 - get_local 2 - i32.store offset=16 - get_local 2 - get_local 5 - i32.store offset=24 - end - get_local 3 - i32.const 20 - i32.add - i32.load - tee_local 2 - i32.eqz - br_if 1 (;@4;) - get_local 5 - i32.const 20 - i32.add - get_local 2 - i32.store - get_local 2 - get_local 5 - i32.store offset=24 - br 1 (;@4;) - end - i32.const 0 - i32.const 0 - i32.load offset=1044 - i32.const -2 - get_local 4 - i32.rotl - i32.and - i32.store offset=1044 - end - get_local 1 - get_local 0 - i32.add - get_local 0 - i32.store - get_local 1 - get_local 0 - i32.const 1 - i32.or - i32.store offset=4 - get_local 1 - i32.const 0 - i32.load offset=1060 - i32.ne - br_if 0 (;@3;) - i32.const 0 - get_local 0 - i32.store offset=1048 - return - end - block ;; label = @3 - block ;; label = @4 - block ;; label = @5 - block ;; label = @6 - block ;; label = @7 - block ;; label = @8 - block ;; label = @9 - get_local 0 - i32.const 255 - i32.gt_u - br_if 0 (;@9;) - get_local 0 - i32.const 3 - i32.shr_u - tee_local 2 - i32.const 3 - i32.shl - i32.const 1080 - i32.add - set_local 0 - i32.const 0 - i32.load offset=1040 - tee_local 4 - i32.const 1 - get_local 2 - i32.shl - tee_local 2 - i32.and - i32.eqz - br_if 1 (;@8;) - get_local 0 - i32.load offset=8 - set_local 2 - br 2 (;@7;) - end - i32.const 0 - set_local 2 - block ;; label = @9 - get_local 0 - i32.const 8 - i32.shr_u - tee_local 4 - i32.eqz - br_if 0 (;@9;) - i32.const 31 - set_local 2 - get_local 0 - i32.const 16777215 - i32.gt_u - br_if 0 (;@9;) - get_local 0 - i32.const 14 - get_local 4 - get_local 4 - i32.const 1048320 - i32.add - i32.const 16 - i32.shr_u - i32.const 8 - i32.and - tee_local 2 - i32.shl - tee_local 4 - i32.const 520192 - i32.add - i32.const 16 - i32.shr_u - i32.const 4 - i32.and - tee_local 5 - get_local 2 - i32.or - get_local 4 - get_local 5 - i32.shl - tee_local 2 - i32.const 245760 - i32.add - i32.const 16 - i32.shr_u - i32.const 2 - i32.and - tee_local 4 - i32.or - i32.sub - get_local 2 - get_local 4 - i32.shl - i32.const 15 - i32.shr_u - i32.add - tee_local 2 - i32.const 7 - i32.add - i32.shr_u - i32.const 1 - i32.and - get_local 2 - i32.const 1 - i32.shl - i32.or - set_local 2 - end - get_local 1 - i64.const 0 - i64.store offset=16 align=4 - get_local 1 - i32.const 28 - i32.add - get_local 2 - i32.store - get_local 2 - i32.const 2 - i32.shl - i32.const 1344 - i32.add - set_local 4 - i32.const 0 - i32.load offset=1044 - tee_local 5 - i32.const 1 - get_local 2 - i32.shl - tee_local 3 - i32.and - i32.eqz - br_if 2 (;@6;) - get_local 0 - i32.const 0 - i32.const 25 - get_local 2 - i32.const 1 - i32.shr_u - i32.sub - get_local 2 - i32.const 31 - i32.eq - select - i32.shl - set_local 2 - get_local 4 - i32.load - set_local 5 - loop ;; label = @9 - get_local 5 - tee_local 4 - i32.load offset=4 - i32.const -8 - i32.and - get_local 0 - i32.eq - br_if 5 (;@4;) - get_local 2 - i32.const 29 - i32.shr_u - set_local 5 - get_local 2 - i32.const 1 - i32.shl - set_local 2 - get_local 4 - get_local 5 - i32.const 4 - i32.and - i32.add - i32.const 16 - i32.add - tee_local 3 - i32.load - tee_local 5 - br_if 0 (;@9;) - end - get_local 3 - get_local 1 - i32.store - get_local 1 - i32.const 24 - i32.add - get_local 4 - i32.store - br 3 (;@5;) - end - i32.const 0 - get_local 4 - get_local 2 - i32.or - i32.store offset=1040 - get_local 0 - set_local 2 - end - get_local 2 - get_local 1 - i32.store offset=12 - get_local 0 - get_local 1 - i32.store offset=8 - get_local 1 - get_local 0 - i32.store offset=12 - get_local 1 - get_local 2 - i32.store offset=8 - return - end - get_local 4 - get_local 1 - i32.store - i32.const 0 - get_local 5 - get_local 3 - i32.or - i32.store offset=1044 - get_local 1 - i32.const 24 - i32.add - get_local 4 - i32.store - end - get_local 1 - get_local 1 - i32.store offset=12 - get_local 1 - get_local 1 - i32.store offset=8 - br 1 (;@3;) - end - get_local 4 - i32.load offset=8 - tee_local 0 - get_local 1 - i32.store offset=12 - get_local 4 - get_local 1 - i32.store offset=8 - get_local 1 - i32.const 24 - i32.add - i32.const 0 - i32.store - get_local 1 - get_local 4 - i32.store offset=12 - get_local 1 - get_local 0 - i32.store offset=8 - end - i32.const 0 - i32.const 0 - i32.load offset=1072 - i32.const -1 - i32.add - tee_local 1 - i32.store offset=1072 - get_local 1 - i32.eqz - br_if 1 (;@1;) - end - return - end - i32.const 1496 - set_local 1 - loop ;; label = @1 - get_local 1 - i32.load - tee_local 0 - i32.const 8 - i32.add - set_local 1 - get_local 0 - br_if 0 (;@1;) - end - i32.const 0 - i32.const -1 - i32.store offset=1072) - (func (;18;) (type 2) (param i32 i32) (result i32) - (local i32) - block ;; label = @1 - block ;; label = @2 - block ;; label = @3 - get_local 0 - i32.eqz - br_if 0 (;@3;) - get_local 1 - get_local 0 - i32.mul - set_local 2 - block ;; label = @4 - get_local 1 - get_local 0 - i32.or - i32.const 65536 - i32.lt_u - br_if 0 (;@4;) - get_local 2 - i32.const -1 - get_local 2 - get_local 0 - i32.div_u - get_local 1 - i32.eq - select - set_local 2 - end - get_local 2 - call 15 - tee_local 0 - br_if 1 (;@2;) - br 2 (;@1;) - end - i32.const 0 - set_local 2 - i32.const 0 - call 15 - tee_local 0 - i32.eqz - br_if 1 (;@1;) - end - get_local 0 - i32.const -4 - i32.add - i32.load8_u - i32.const 3 - i32.and - i32.eqz - br_if 0 (;@1;) - get_local 0 - i32.const 0 - get_local 2 - call 44 - drop - end - get_local 0) - (func (;19;) (type 3) (param i32) - get_local 0 - call 6 - unreachable) - (func (;20;) (type 7) - unreachable - unreachable) - (func (;21;) (type 4) (param i32) (result i32) - block ;; label = @1 - get_local 0 - call 8 - tee_local 0 - i32.eqz - br_if 0 (;@1;) - i32.const 0 - get_local 0 - i32.store offset=1536 - i32.const -1 - return - end - i32.const 0) - (func (;22;) (type 3) (param i32) - (local i32 i32) - block ;; label = @1 - get_local 0 - i32.load - i32.const 0 - i32.le_s - br_if 0 (;@1;) - get_local 0 - i32.load offset=12 - tee_local 1 - get_local 0 - i32.load offset=8 - tee_local 2 - i32.gt_u - br_if 0 (;@1;) - get_local 0 - i32.load offset=4 - set_local 0 - block ;; label = @2 - get_local 2 - i32.eqz - br_if 0 (;@2;) - get_local 0 - i32.eqz - br_if 1 (;@1;) - end - block ;; label = @2 - get_local 1 - i32.eqz - br_if 0 (;@2;) - i32.const 0 - set_local 2 - loop ;; label = @3 - get_local 0 - i32.load - i32.eqz - br_if 2 (;@1;) - get_local 0 - i32.const 4 - i32.add - i32.load - i32.const -1 - i32.le_s - br_if 2 (;@1;) - get_local 0 - i32.const 24 - i32.add - set_local 0 - get_local 2 - i32.const 1 - i32.add - tee_local 2 - get_local 1 - i32.lt_u - br_if 0 (;@3;) - end - end - return - end - call 20 - unreachable) - (func (;23;) (type 7) - (local i32 i32) - block ;; label = @1 - i32.const 16 - call 14 - tee_local 0 - i32.eqz - br_if 0 (;@1;) - get_local 0 - i32.const 24 - i32.const 4 - call 18 - tee_local 1 - i32.store offset=4 - block ;; label = @2 - get_local 1 - i32.eqz - br_if 0 (;@2;) - get_local 0 - i64.const 4 - i64.store offset=8 align=4 - get_local 0 - i32.const 1 - i32.store - get_local 0 - call 22 - i32.const 0 - get_local 0 - i32.store offset=1540 - get_local 0 - call 22 - return - end - get_local 0 - call 16 - end - i32.const 0 - i32.const 0 - i32.store offset=1540 - unreachable - unreachable) - (func (;24;) (type 2) (param i32 i32) (result i32) - (local i32 i32 i32 i32 i32 i32) - get_global 0 - i32.const 32 - i32.sub - tee_local 2 - set_global 0 - i32.const 0 - i32.load offset=1540 - call 22 - i32.const -1 - set_local 3 - block ;; label = @1 - get_local 1 - i32.eqz - br_if 0 (;@1;) - i32.const 0 - i32.load offset=1540 - tee_local 4 - call 22 - get_local 0 - i32.const 0 - i32.lt_s - br_if 0 (;@1;) - block ;; label = @2 - block ;; label = @3 - get_local 4 - i32.load offset=12 - tee_local 5 - get_local 4 - i32.load offset=8 - i32.ne - br_if 0 (;@3;) - i32.const 24 - get_local 5 - i32.const 1 - i32.shl - call 18 - tee_local 6 - i32.eqz - br_if 2 (;@1;) - get_local 6 - get_local 4 - i32.load offset=4 - get_local 4 - i32.const 12 - i32.add - tee_local 5 - i32.load - i32.const 24 - i32.mul - call 43 - drop - get_local 4 - i32.load offset=4 - call 16 - get_local 4 - get_local 6 - i32.store offset=4 - get_local 4 - i32.const 8 - i32.add - tee_local 7 - get_local 7 - i32.load - i32.const 1 - i32.shl - i32.store - get_local 5 - i32.load - set_local 5 - br 1 (;@2;) - end - get_local 4 - i32.load offset=4 - set_local 6 - end - get_local 4 - i32.const 12 - i32.add - get_local 5 - i32.const 1 - i32.add - i32.store - get_local 1 - call 45 - set_local 7 - get_local 6 - get_local 5 - i32.const 24 - i32.mul - i32.add - tee_local 1 - get_local 0 - i32.store offset=4 - get_local 1 - get_local 7 - i32.store - block ;; label = @2 - get_local 0 - get_local 2 - i32.const 8 - i32.add - call 7 - tee_local 0 - i32.eqz - br_if 0 (;@2;) - i32.const 0 - get_local 0 - i32.store offset=1536 - br 1 (;@1;) - end - get_local 1 - get_local 2 - i64.load offset=16 - i64.store offset=8 - get_local 1 - get_local 2 - i64.load offset=24 - i64.store offset=16 - get_local 4 - call 22 - get_local 4 - call 22 - i32.const 0 - set_local 3 - i32.const 0 - get_local 4 - i32.store offset=1540 - end - get_local 2 - i32.const 32 - i32.add - set_global 0 - get_local 3) - (func (;25;) (type 4) (param i32) (result i32) - block ;; label = @1 - get_local 0 - i32.const 65535 - i32.and - br_if 0 (;@1;) - get_local 0 - i32.const -1 - i32.le_s - br_if 0 (;@1;) - block ;; label = @2 - get_local 0 - i32.const 16 - i32.shr_u - grow_memory - tee_local 0 - i32.const -1 - i32.eq - br_if 0 (;@2;) - get_local 0 - i32.const 16 - i32.shl - return - end - i32.const 0 - i32.const 48 - i32.store offset=1536 - i32.const -1 - return - end - call 20 - unreachable) - (func (;26;) (type 7)) - (func (;27;) (type 7) - call 26 - call 29) - (func (;28;) (type 8) (result i32) - i32.const 1548) - (func (;29;) (type 7) - (local i32 i32 i32) - block ;; label = @1 - call 28 - i32.load - tee_local 0 - i32.eqz - br_if 0 (;@1;) - loop ;; label = @2 - block ;; label = @3 - get_local 0 - i32.load offset=20 - get_local 0 - i32.load offset=24 - i32.eq - br_if 0 (;@3;) - get_local 0 - i32.const 0 - i32.const 0 - get_local 0 - i32.load offset=32 - call_indirect (type 0) - drop - end - block ;; label = @3 - get_local 0 - i32.load offset=4 - tee_local 1 - get_local 0 - i32.load offset=8 - tee_local 2 - i32.eq - br_if 0 (;@3;) - get_local 0 - get_local 1 - get_local 2 - i32.sub - i64.extend_s/i32 - i32.const 0 - get_local 0 - i32.load offset=36 - call_indirect (type 1) - drop - end - get_local 0 - i32.load offset=52 - tee_local 0 - br_if 0 (;@2;) - end - end - block ;; label = @1 - i32.const 0 - i32.load offset=1552 - tee_local 0 - i32.eqz - br_if 0 (;@1;) - block ;; label = @2 - get_local 0 - i32.load offset=20 - get_local 0 - i32.load offset=24 - i32.eq - br_if 0 (;@2;) - get_local 0 - i32.const 0 - i32.const 0 - get_local 0 - i32.load offset=32 - call_indirect (type 0) - drop - end - get_local 0 - i32.load offset=4 - tee_local 1 - get_local 0 - i32.load offset=8 - tee_local 2 - i32.eq - br_if 0 (;@1;) - get_local 0 - get_local 1 - get_local 2 - i32.sub - i64.extend_s/i32 - i32.const 0 - get_local 0 - i32.load offset=36 - call_indirect (type 1) - drop - end - block ;; label = @1 - i32.const 0 - i32.load offset=2712 - tee_local 0 - i32.eqz - br_if 0 (;@1;) - block ;; label = @2 - get_local 0 - i32.load offset=20 - get_local 0 - i32.load offset=24 - i32.eq - br_if 0 (;@2;) - get_local 0 - i32.const 0 - i32.const 0 - get_local 0 - i32.load offset=32 - call_indirect (type 0) - drop - end - get_local 0 - i32.load offset=4 - tee_local 1 - get_local 0 - i32.load offset=8 - tee_local 2 - i32.eq - br_if 0 (;@1;) - get_local 0 - get_local 1 - get_local 2 - i32.sub - i64.extend_s/i32 - i32.const 0 - get_local 0 - i32.load offset=36 - call_indirect (type 1) - drop - end - block ;; label = @1 - i32.const 0 - i32.load offset=1552 - tee_local 0 - i32.eqz - br_if 0 (;@1;) - block ;; label = @2 - get_local 0 - i32.load offset=20 - get_local 0 - i32.load offset=24 - i32.eq - br_if 0 (;@2;) - get_local 0 - i32.const 0 - i32.const 0 - get_local 0 - i32.load offset=32 - call_indirect (type 0) - drop - end - get_local 0 - i32.load offset=4 - tee_local 1 - get_local 0 - i32.load offset=8 - tee_local 2 - i32.eq - br_if 0 (;@1;) - get_local 0 - get_local 1 - get_local 2 - i32.sub - i64.extend_s/i32 - i32.const 0 - get_local 0 - i32.load offset=36 - call_indirect (type 1) - drop - end) - (func (;30;) (type 4) (param i32) (result i32) - (local i32) - get_local 0 - get_local 0 - i32.load offset=60 - tee_local 1 - i32.const -1 - i32.add - get_local 1 - i32.or - i32.store offset=60 - block ;; label = @1 - get_local 0 - i32.load - tee_local 1 - i32.const 8 - i32.and - br_if 0 (;@1;) - get_local 0 - i64.const 0 - i64.store offset=4 align=4 - get_local 0 - get_local 0 - i32.load offset=40 - tee_local 1 - i32.store offset=24 - get_local 0 - get_local 1 - i32.store offset=20 - get_local 0 - get_local 1 - get_local 0 - i32.load offset=44 - i32.add - i32.store offset=16 - i32.const 0 - return - end - get_local 0 - get_local 1 - i32.const 32 - i32.or - i32.store - i32.const -1) - (func (;31;) (type 0) (param i32 i32 i32) (result i32) - (local i32 i32 i32 i32 i32 i32) - block ;; label = @1 - block ;; label = @2 - get_local 2 - i32.load offset=16 - tee_local 3 - br_if 0 (;@2;) - i32.const 0 - set_local 6 - get_local 2 - call 30 - br_if 1 (;@1;) - get_local 2 - i32.const 16 - i32.add - i32.load - set_local 3 - end - block ;; label = @2 - get_local 3 - get_local 2 - i32.load offset=20 - tee_local 4 - i32.sub - get_local 1 - i32.ge_u - br_if 0 (;@2;) - get_local 2 - get_local 0 - get_local 1 - get_local 2 - i32.load offset=32 - call_indirect (type 0) - return - end - i32.const 0 - set_local 5 - block ;; label = @2 - get_local 2 - i32.load offset=64 - i32.const 0 - i32.lt_s - br_if 0 (;@2;) - i32.const 0 - set_local 5 - get_local 0 - set_local 6 - i32.const 0 - set_local 3 - loop ;; label = @3 - get_local 1 - get_local 3 - i32.eq - br_if 1 (;@2;) - get_local 3 - i32.const 1 - i32.add - set_local 3 - get_local 6 - get_local 1 - i32.add - set_local 7 - get_local 6 - i32.const -1 - i32.add - tee_local 8 - set_local 6 - get_local 7 - i32.const -1 - i32.add - i32.load8_u - i32.const 10 - i32.ne - br_if 0 (;@3;) - end - get_local 2 - get_local 0 - get_local 1 - get_local 3 - i32.sub - i32.const 1 - i32.add - tee_local 5 - get_local 2 - i32.load offset=32 - call_indirect (type 0) - tee_local 6 - get_local 5 - i32.lt_u - br_if 1 (;@1;) - get_local 8 - get_local 1 - i32.add - i32.const 1 - i32.add - set_local 0 - get_local 2 - i32.const 20 - i32.add - i32.load - set_local 4 - get_local 3 - i32.const -1 - i32.add - set_local 1 - end - get_local 4 - get_local 0 - get_local 1 - call 43 - drop - get_local 2 - i32.const 20 - i32.add - tee_local 3 - get_local 3 - i32.load - get_local 1 - i32.add - i32.store - get_local 5 - get_local 1 - i32.add - return - end - get_local 6) - (func (;32;) (type 5) (param i32 i32 i32 i32) (result i32) - (local i32) - block ;; label = @1 - get_local 0 - get_local 2 - get_local 1 - i32.mul - tee_local 4 - get_local 3 - call 31 - tee_local 0 - get_local 4 - i32.ne - br_if 0 (;@1;) - get_local 2 - i32.const 0 - get_local 1 - select - return - end - get_local 0 - get_local 1 - i32.div_u) - (func (;33;) (type 2) (param i32 i32) (result i32) - (local i32) - i32.const -1 - i32.const 0 - get_local 0 - call 46 - tee_local 2 - get_local 0 - i32.const 1 - get_local 2 - get_local 1 - call 32 - i32.ne - select) - (func (;34;) (type 2) (param i32 i32) (result i32) - (local i32 i32 i32) - get_global 0 - i32.const 16 - i32.sub - tee_local 2 - set_global 0 - get_local 2 - get_local 1 - i32.store8 offset=15 - block ;; label = @1 - block ;; label = @2 - get_local 0 - i32.load offset=16 - tee_local 3 - br_if 0 (;@2;) - i32.const -1 - set_local 3 - get_local 0 - call 30 - br_if 1 (;@1;) - get_local 0 - i32.const 16 - i32.add - i32.load - set_local 3 - end - block ;; label = @2 - block ;; label = @3 - get_local 0 - i32.load offset=20 - tee_local 4 - get_local 3 - i32.eq - br_if 0 (;@3;) - get_local 0 - i32.load offset=64 - get_local 1 - i32.const 255 - i32.and - tee_local 3 - i32.ne - br_if 1 (;@2;) - end - i32.const -1 - set_local 3 - get_local 0 - get_local 2 - i32.const 15 - i32.add - i32.const 1 - get_local 0 - i32.load offset=32 - call_indirect (type 0) - i32.const 1 - i32.ne - br_if 1 (;@1;) - get_local 2 - i32.load8_u offset=15 - set_local 3 - br 1 (;@1;) - end - get_local 0 - i32.const 20 - i32.add - get_local 4 - i32.const 1 - i32.add - i32.store - get_local 4 - get_local 1 - i32.store8 - end - get_local 2 - i32.const 16 - i32.add - set_global 0 - get_local 3) - (func (;35;) (type 4) (param i32) (result i32) - block ;; label = @1 - get_local 0 - i32.const 2600 - call 33 - i32.const 0 - i32.lt_s - br_if 0 (;@1;) - block ;; label = @2 - i32.const 0 - i32.load offset=2664 - i32.const 10 - i32.eq - br_if 0 (;@2;) - i32.const 0 - i32.load offset=2620 - tee_local 0 - i32.const 0 - i32.load offset=2616 - i32.eq - br_if 0 (;@2;) - i32.const 0 - get_local 0 - i32.const 1 - i32.add - i32.store offset=2620 - get_local 0 - i32.const 10 - i32.store8 - i32.const 0 - return - end - i32.const 2600 - i32.const 10 - call 34 - i32.const 31 - i32.shr_s - return - end - i32.const -1) - (func (;36;) (type 4) (param i32) (result i32) - get_local 0 - i32.load offset=56 - call 21) - (func (;37;) (type 0) (param i32 i32 i32) (result i32) - (local i32 i32) - get_global 0 - i32.const 16 - i32.sub - tee_local 3 - set_global 0 - i32.const -1 - set_local 4 - block ;; label = @1 - block ;; label = @2 - block ;; label = @3 - get_local 2 - i32.const -1 - i32.le_s - br_if 0 (;@3;) - get_local 0 - get_local 1 - get_local 2 - get_local 3 - i32.const 12 - i32.add - call 9 - tee_local 2 - i32.eqz - br_if 1 (;@2;) - i32.const 0 - get_local 2 - i32.store offset=1536 - i32.const -1 - set_local 4 - br 2 (;@1;) - end - i32.const 0 - i32.const 28 - i32.store offset=1536 - br 1 (;@1;) - end - get_local 3 - i32.load offset=12 - set_local 4 - end - get_local 3 - i32.const 16 - i32.add - set_global 0 - get_local 4) - (func (;38;) (type 0) (param i32 i32 i32) (result i32) - (local i32 i32 i32 i32 i32 i32 i32) - get_global 0 - i32.const 16 - i32.sub - tee_local 3 - set_global 0 - get_local 3 - get_local 2 - i32.store offset=12 - get_local 3 - get_local 1 - i32.store offset=8 - get_local 3 - get_local 0 - i32.load offset=24 - tee_local 1 - i32.store - get_local 3 - get_local 0 - i32.load offset=20 - get_local 1 - i32.sub - tee_local 1 - i32.store offset=4 - i32.const 2 - set_local 4 - block ;; label = @1 - block ;; label = @2 - block ;; label = @3 - get_local 1 - get_local 2 - i32.add - tee_local 5 - get_local 0 - i32.load offset=56 - get_local 3 - i32.const 2 - call 37 - tee_local 6 - i32.eq - br_if 0 (;@3;) - get_local 3 - set_local 1 - get_local 0 - i32.const 56 - i32.add - set_local 7 - loop ;; label = @4 - get_local 6 - i32.const -1 - i32.le_s - br_if 2 (;@2;) - get_local 1 - i32.const 8 - i32.add - get_local 1 - get_local 6 - get_local 1 - i32.load offset=4 - tee_local 8 - i32.gt_u - tee_local 9 - select - tee_local 1 - get_local 1 - i32.load - get_local 6 - get_local 8 - i32.const 0 - get_local 9 - select - i32.sub - tee_local 8 - i32.add - i32.store - get_local 1 - get_local 1 - i32.load offset=4 - get_local 8 - i32.sub - i32.store offset=4 - get_local 5 - get_local 6 - i32.sub - set_local 5 - get_local 7 - i32.load - get_local 1 - get_local 4 - get_local 9 - i32.sub - tee_local 4 - call 37 - tee_local 9 - set_local 6 - get_local 5 - get_local 9 - i32.ne - br_if 0 (;@4;) - end - end - get_local 0 - i32.const 24 - i32.add - get_local 0 - i32.load offset=40 - tee_local 1 - i32.store - get_local 0 - i32.const 20 - i32.add - get_local 1 - i32.store - get_local 0 - get_local 1 - get_local 0 - i32.load offset=44 - i32.add - i32.store offset=16 - get_local 2 - set_local 6 - br 1 (;@1;) - end - get_local 0 - i64.const 0 - i64.store offset=16 - i32.const 0 - set_local 6 - get_local 0 - i32.const 24 - i32.add - i32.const 0 - i32.store - get_local 0 - get_local 0 - i32.load - i32.const 32 - i32.or - i32.store - get_local 4 - i32.const 2 - i32.eq - br_if 0 (;@1;) - get_local 2 - get_local 1 - i32.load offset=4 - i32.sub - set_local 6 - end - get_local 3 - i32.const 16 - i32.add - set_global 0 - get_local 6) - (func (;39;) (type 4) (param i32) (result i32) - (local i32 i32) - get_global 0 - i32.const 32 - i32.sub - tee_local 1 - set_global 0 - block ;; label = @1 - block ;; label = @2 - block ;; label = @3 - get_local 0 - get_local 1 - i32.const 8 - i32.add - call 7 - tee_local 0 - br_if 0 (;@3;) - i32.const 59 - set_local 0 - get_local 1 - i32.load8_u offset=8 - i32.const 2 - i32.ne - br_if 0 (;@3;) - get_local 1 - i32.load8_u offset=16 - i32.const 36 - i32.and - i32.eqz - br_if 1 (;@2;) - end - i32.const 0 - set_local 2 - i32.const 0 - get_local 0 - i32.store offset=1536 - br 1 (;@1;) - end - i32.const 1 - set_local 2 - end - get_local 1 - i32.const 32 - i32.add - set_global 0 - get_local 2) - (func (;40;) (type 0) (param i32 i32 i32) (result i32) - get_local 0 - i32.const 1 - i32.store offset=32 - block ;; label = @1 - block ;; label = @2 - get_local 0 - i32.load8_u - i32.const 64 - i32.and - br_if 0 (;@2;) - get_local 0 - i32.load offset=56 - call 39 - i32.eqz - br_if 1 (;@1;) - end - get_local 0 - get_local 1 - get_local 2 - call 38 - return - end - get_local 0 - i32.const -1 - i32.store offset=64 - get_local 0 - get_local 1 - get_local 2 - call 38) - (func (;41;) (type 1) (param i32 i64 i32) (result i64) - (local i32) - get_global 0 - i32.const 16 - i32.sub - tee_local 3 - set_global 0 - block ;; label = @1 - block ;; label = @2 - get_local 0 - get_local 1 - get_local 2 - i32.const 255 - i32.and - get_local 3 - i32.const 8 - i32.add - call 10 - tee_local 0 - i32.eqz - br_if 0 (;@2;) - i32.const 0 - i32.const 70 - get_local 0 - get_local 0 - i32.const 76 - i32.eq - select - i32.store offset=1536 - i64.const -1 - set_local 1 - br 1 (;@1;) - end - get_local 3 - i64.load offset=8 - set_local 1 - end - get_local 3 - i32.const 16 - i32.add - set_global 0 - get_local 1) - (func (;42;) (type 1) (param i32 i64 i32) (result i64) - get_local 0 - i32.load offset=56 - get_local 1 - get_local 2 - call 41) - (func (;43;) (type 0) (param i32 i32 i32) (result i32) - (local i32 i32 i32 i32 i32 i32 i32 i32) - block ;; label = @1 - block ;; label = @2 - block ;; label = @3 - block ;; label = @4 - get_local 2 - i32.eqz - br_if 0 (;@4;) - get_local 1 - i32.const 3 - i32.and - i32.eqz - br_if 0 (;@4;) - get_local 0 - set_local 3 - block ;; label = @5 - loop ;; label = @6 - get_local 3 - get_local 1 - i32.load8_u - i32.store8 - get_local 2 - i32.const -1 - i32.add - set_local 4 - get_local 3 - i32.const 1 - i32.add - set_local 3 - get_local 1 - i32.const 1 - i32.add - set_local 1 - get_local 2 - i32.const 1 - i32.eq - br_if 1 (;@5;) - get_local 4 - set_local 2 - get_local 1 - i32.const 3 - i32.and - br_if 0 (;@6;) - end - end - get_local 3 - i32.const 3 - i32.and - tee_local 2 - i32.eqz - br_if 1 (;@3;) - br 2 (;@2;) - end - get_local 2 - set_local 4 - get_local 0 - tee_local 3 - i32.const 3 - i32.and - tee_local 2 - br_if 1 (;@2;) - end - block ;; label = @3 - block ;; label = @4 - get_local 4 - i32.const 16 - i32.lt_u - br_if 0 (;@4;) - get_local 4 - i32.const -16 - i32.add - set_local 2 - loop ;; label = @5 - get_local 3 - get_local 1 - i32.load - i32.store - get_local 3 - i32.const 4 - i32.add - get_local 1 - i32.const 4 - i32.add - i32.load - i32.store - get_local 3 - i32.const 8 - i32.add - get_local 1 - i32.const 8 - i32.add - i32.load - i32.store - get_local 3 - i32.const 12 - i32.add - get_local 1 - i32.const 12 - i32.add - i32.load - i32.store - get_local 3 - i32.const 16 - i32.add - set_local 3 - get_local 1 - i32.const 16 - i32.add - set_local 1 - get_local 4 - i32.const -16 - i32.add - tee_local 4 - i32.const 15 - i32.gt_u - br_if 0 (;@5;) - br 2 (;@3;) - end - end - get_local 4 - set_local 2 - end - block ;; label = @3 - get_local 2 - i32.const 8 - i32.and - i32.eqz - br_if 0 (;@3;) - get_local 3 - get_local 1 - i64.load align=4 - i64.store align=4 - get_local 1 - i32.const 8 - i32.add - set_local 1 - get_local 3 - i32.const 8 - i32.add - set_local 3 - end - block ;; label = @3 - get_local 2 - i32.const 4 - i32.and - i32.eqz - br_if 0 (;@3;) - get_local 3 - get_local 1 - i32.load - i32.store - get_local 1 - i32.const 4 - i32.add - set_local 1 - get_local 3 - i32.const 4 - i32.add - set_local 3 - end - block ;; label = @3 - get_local 2 - i32.const 2 - i32.and - i32.eqz - br_if 0 (;@3;) - get_local 3 - get_local 1 - i32.load8_u - i32.store8 - get_local 3 - get_local 1 - i32.load8_u offset=1 - i32.store8 offset=1 - get_local 3 - i32.const 2 - i32.add - set_local 3 - get_local 1 - i32.const 2 - i32.add - set_local 1 - end - get_local 2 - i32.const 1 - i32.and - i32.eqz - br_if 1 (;@1;) - get_local 3 - get_local 1 - i32.load8_u - i32.store8 - get_local 0 - return - end - block ;; label = @2 - get_local 4 - i32.const 32 - i32.lt_u - br_if 0 (;@2;) - block ;; label = @3 - block ;; label = @4 - get_local 2 - i32.const 3 - i32.eq - br_if 0 (;@4;) - get_local 2 - i32.const 2 - i32.eq - br_if 1 (;@3;) - get_local 2 - i32.const 1 - i32.ne - br_if 2 (;@2;) - get_local 3 - get_local 1 - i32.load8_u offset=1 - i32.store8 offset=1 - get_local 3 - get_local 1 - i32.load - tee_local 5 - i32.store8 - get_local 3 - get_local 1 - i32.load8_u offset=2 - i32.store8 offset=2 - get_local 4 - i32.const -3 - i32.add - set_local 6 - get_local 3 - i32.const 3 - i32.add - set_local 7 - get_local 4 - i32.const -20 - i32.add - i32.const -16 - i32.and - set_local 8 - i32.const 0 - set_local 2 - loop ;; label = @5 - get_local 7 - get_local 2 - i32.add - tee_local 3 - get_local 1 - get_local 2 - i32.add - tee_local 9 - i32.const 4 - i32.add - i32.load - tee_local 10 - i32.const 8 - i32.shl - get_local 5 - i32.const 24 - i32.shr_u - i32.or - i32.store - get_local 3 - i32.const 4 - i32.add - get_local 9 - i32.const 8 - i32.add - i32.load - tee_local 5 - i32.const 8 - i32.shl - get_local 10 - i32.const 24 - i32.shr_u - i32.or - i32.store - get_local 3 - i32.const 8 - i32.add - get_local 9 - i32.const 12 - i32.add - i32.load - tee_local 10 - i32.const 8 - i32.shl - get_local 5 - i32.const 24 - i32.shr_u - i32.or - i32.store - get_local 3 - i32.const 12 - i32.add - get_local 9 - i32.const 16 - i32.add - i32.load - tee_local 5 - i32.const 8 - i32.shl - get_local 10 - i32.const 24 - i32.shr_u - i32.or - i32.store - get_local 2 - i32.const 16 - i32.add - set_local 2 - get_local 6 - i32.const -16 - i32.add - tee_local 6 - i32.const 16 - i32.gt_u - br_if 0 (;@5;) - end - get_local 7 - get_local 2 - i32.add - set_local 3 - get_local 1 - get_local 2 - i32.add - i32.const 3 - i32.add - set_local 1 - get_local 4 - i32.const -19 - i32.add - get_local 8 - i32.sub - set_local 4 - br 2 (;@2;) - end - get_local 3 - get_local 1 - i32.load - tee_local 5 - i32.store8 - get_local 4 - i32.const -1 - i32.add - set_local 6 - get_local 3 - i32.const 1 - i32.add - set_local 7 - get_local 4 - i32.const -20 - i32.add - i32.const -16 - i32.and - set_local 8 - i32.const 0 - set_local 2 - loop ;; label = @4 - get_local 7 - get_local 2 - i32.add - tee_local 3 - get_local 1 - get_local 2 - i32.add - tee_local 9 - i32.const 4 - i32.add - i32.load - tee_local 10 - i32.const 24 - i32.shl - get_local 5 - i32.const 8 - i32.shr_u - i32.or - i32.store - get_local 3 - i32.const 4 - i32.add - get_local 9 - i32.const 8 - i32.add - i32.load - tee_local 5 - i32.const 24 - i32.shl - get_local 10 - i32.const 8 - i32.shr_u - i32.or - i32.store - get_local 3 - i32.const 8 - i32.add - get_local 9 - i32.const 12 - i32.add - i32.load - tee_local 10 - i32.const 24 - i32.shl - get_local 5 - i32.const 8 - i32.shr_u - i32.or - i32.store - get_local 3 - i32.const 12 - i32.add - get_local 9 - i32.const 16 - i32.add - i32.load - tee_local 5 - i32.const 24 - i32.shl - get_local 10 - i32.const 8 - i32.shr_u - i32.or - i32.store - get_local 2 - i32.const 16 - i32.add - set_local 2 - get_local 6 - i32.const -16 - i32.add - tee_local 6 - i32.const 18 - i32.gt_u - br_if 0 (;@4;) - end - get_local 7 - get_local 2 - i32.add - set_local 3 - get_local 1 - get_local 2 - i32.add - i32.const 1 - i32.add - set_local 1 - get_local 4 - i32.const -17 - i32.add - get_local 8 - i32.sub - set_local 4 - br 1 (;@2;) - end - get_local 3 - get_local 1 - i32.load - tee_local 5 - i32.store8 - get_local 3 - get_local 1 - i32.load8_u offset=1 - i32.store8 offset=1 - get_local 4 - i32.const -2 - i32.add - set_local 6 - get_local 3 - i32.const 2 - i32.add - set_local 7 - get_local 4 - i32.const -20 - i32.add - i32.const -16 - i32.and - set_local 8 - i32.const 0 - set_local 2 - loop ;; label = @3 - get_local 7 - get_local 2 - i32.add - tee_local 3 - get_local 1 - get_local 2 - i32.add - tee_local 9 - i32.const 4 - i32.add - i32.load - tee_local 10 - i32.const 16 - i32.shl - get_local 5 - i32.const 16 - i32.shr_u - i32.or - i32.store - get_local 3 - i32.const 4 - i32.add - get_local 9 - i32.const 8 - i32.add - i32.load - tee_local 5 - i32.const 16 - i32.shl - get_local 10 - i32.const 16 - i32.shr_u - i32.or - i32.store - get_local 3 - i32.const 8 - i32.add - get_local 9 - i32.const 12 - i32.add - i32.load - tee_local 10 - i32.const 16 - i32.shl - get_local 5 - i32.const 16 - i32.shr_u - i32.or - i32.store - get_local 3 - i32.const 12 - i32.add - get_local 9 - i32.const 16 - i32.add - i32.load - tee_local 5 - i32.const 16 - i32.shl - get_local 10 - i32.const 16 - i32.shr_u - i32.or - i32.store - get_local 2 - i32.const 16 - i32.add - set_local 2 - get_local 6 - i32.const -16 - i32.add - tee_local 6 - i32.const 17 - i32.gt_u - br_if 0 (;@3;) - end - get_local 7 - get_local 2 - i32.add - set_local 3 - get_local 1 - get_local 2 - i32.add - i32.const 2 - i32.add - set_local 1 - get_local 4 - i32.const -18 - i32.add - get_local 8 - i32.sub - set_local 4 - end - block ;; label = @2 - get_local 4 - i32.const 16 - i32.and - i32.eqz - br_if 0 (;@2;) - get_local 3 - get_local 1 - i32.load16_u align=1 - i32.store16 align=1 - get_local 3 - get_local 1 - i32.load8_u offset=2 - i32.store8 offset=2 - get_local 3 - get_local 1 - i32.load8_u offset=3 - i32.store8 offset=3 - get_local 3 - get_local 1 - i32.load8_u offset=4 - i32.store8 offset=4 - get_local 3 - get_local 1 - i32.load8_u offset=5 - i32.store8 offset=5 - get_local 3 - get_local 1 - i32.load8_u offset=6 - i32.store8 offset=6 - get_local 3 - get_local 1 - i32.load8_u offset=7 - i32.store8 offset=7 - get_local 3 - get_local 1 - i32.load8_u offset=8 - i32.store8 offset=8 - get_local 3 - get_local 1 - i32.load8_u offset=9 - i32.store8 offset=9 - get_local 3 - get_local 1 - i32.load8_u offset=10 - i32.store8 offset=10 - get_local 3 - get_local 1 - i32.load8_u offset=11 - i32.store8 offset=11 - get_local 3 - get_local 1 - i32.load8_u offset=12 - i32.store8 offset=12 - get_local 3 - get_local 1 - i32.load8_u offset=13 - i32.store8 offset=13 - get_local 3 - get_local 1 - i32.load8_u offset=14 - i32.store8 offset=14 - get_local 3 - get_local 1 - i32.load8_u offset=15 - i32.store8 offset=15 - get_local 3 - i32.const 16 - i32.add - set_local 3 - get_local 1 - i32.const 16 - i32.add - set_local 1 - end - block ;; label = @2 - get_local 4 - i32.const 8 - i32.and - i32.eqz - br_if 0 (;@2;) - get_local 3 - get_local 1 - i32.load8_u - i32.store8 - get_local 3 - get_local 1 - i32.load8_u offset=1 - i32.store8 offset=1 - get_local 3 - get_local 1 - i32.load8_u offset=2 - i32.store8 offset=2 - get_local 3 - get_local 1 - i32.load8_u offset=3 - i32.store8 offset=3 - get_local 3 - get_local 1 - i32.load8_u offset=4 - i32.store8 offset=4 - get_local 3 - get_local 1 - i32.load8_u offset=5 - i32.store8 offset=5 - get_local 3 - get_local 1 - i32.load8_u offset=6 - i32.store8 offset=6 - get_local 3 - get_local 1 - i32.load8_u offset=7 - i32.store8 offset=7 - get_local 3 - i32.const 8 - i32.add - set_local 3 - get_local 1 - i32.const 8 - i32.add - set_local 1 - end - block ;; label = @2 - get_local 4 - i32.const 4 - i32.and - i32.eqz - br_if 0 (;@2;) - get_local 3 - get_local 1 - i32.load8_u - i32.store8 - get_local 3 - get_local 1 - i32.load8_u offset=1 - i32.store8 offset=1 - get_local 3 - get_local 1 - i32.load8_u offset=2 - i32.store8 offset=2 - get_local 3 - get_local 1 - i32.load8_u offset=3 - i32.store8 offset=3 - get_local 3 - i32.const 4 - i32.add - set_local 3 - get_local 1 - i32.const 4 - i32.add - set_local 1 - end - block ;; label = @2 - get_local 4 - i32.const 2 - i32.and - i32.eqz - br_if 0 (;@2;) - get_local 3 - get_local 1 - i32.load8_u - i32.store8 - get_local 3 - get_local 1 - i32.load8_u offset=1 - i32.store8 offset=1 - get_local 3 - i32.const 2 - i32.add - set_local 3 - get_local 1 - i32.const 2 - i32.add - set_local 1 - end - get_local 4 - i32.const 1 - i32.and - i32.eqz - br_if 0 (;@1;) - get_local 3 - get_local 1 - i32.load8_u - i32.store8 - end - get_local 0) - (func (;44;) (type 0) (param i32 i32 i32) (result i32) - (local i32 i32 i32 i64) - block ;; label = @1 - get_local 2 - i32.eqz - br_if 0 (;@1;) - get_local 0 - get_local 1 - i32.store8 - get_local 0 - get_local 2 - i32.add - tee_local 3 - i32.const -1 - i32.add - get_local 1 - i32.store8 - get_local 2 - i32.const 3 - i32.lt_u - br_if 0 (;@1;) - get_local 0 - get_local 1 - i32.store8 offset=2 - get_local 0 - get_local 1 - i32.store8 offset=1 - get_local 3 - i32.const -3 - i32.add - get_local 1 - i32.store8 - get_local 3 - i32.const -2 - i32.add - get_local 1 - i32.store8 - get_local 2 - i32.const 7 - i32.lt_u - br_if 0 (;@1;) - get_local 0 - get_local 1 - i32.store8 offset=3 - get_local 3 - i32.const -4 - i32.add - get_local 1 - i32.store8 - get_local 2 - i32.const 9 - i32.lt_u - br_if 0 (;@1;) - get_local 0 - i32.const 0 - get_local 0 - i32.sub - i32.const 3 - i32.and - tee_local 4 - i32.add - tee_local 3 - get_local 1 - i32.const 255 - i32.and - i32.const 16843009 - i32.mul - tee_local 1 - i32.store - get_local 3 - get_local 2 - get_local 4 - i32.sub - i32.const -4 - i32.and - tee_local 4 - i32.add - tee_local 2 - i32.const -4 - i32.add - get_local 1 - i32.store - get_local 4 - i32.const 9 - i32.lt_u - br_if 0 (;@1;) - get_local 3 - get_local 1 - i32.store offset=8 - get_local 3 - get_local 1 - i32.store offset=4 - get_local 2 - i32.const -8 - i32.add - get_local 1 - i32.store - get_local 2 - i32.const -12 - i32.add - get_local 1 - i32.store - get_local 4 - i32.const 25 - i32.lt_u - br_if 0 (;@1;) - get_local 3 - get_local 1 - i32.store offset=24 - get_local 3 - get_local 1 - i32.store offset=20 - get_local 3 - get_local 1 - i32.store offset=16 - get_local 3 - get_local 1 - i32.store offset=12 - get_local 2 - i32.const -16 - i32.add - get_local 1 - i32.store - get_local 2 - i32.const -20 - i32.add - get_local 1 - i32.store - get_local 2 - i32.const -24 - i32.add - get_local 1 - i32.store - get_local 2 - i32.const -28 - i32.add - get_local 1 - i32.store - get_local 4 - get_local 3 - i32.const 4 - i32.and - i32.const 24 - i32.or - tee_local 5 - i32.sub - tee_local 2 - i32.const 32 - i32.lt_u - br_if 0 (;@1;) - get_local 1 - i64.extend_u/i32 - tee_local 6 - i64.const 32 - i64.shl - get_local 6 - i64.or - set_local 6 - get_local 3 - get_local 5 - i32.add - set_local 1 - loop ;; label = @2 - get_local 1 - get_local 6 - i64.store - get_local 1 - i32.const 24 - i32.add - get_local 6 - i64.store - get_local 1 - i32.const 16 - i32.add - get_local 6 - i64.store - get_local 1 - i32.const 8 - i32.add - get_local 6 - i64.store - get_local 1 - i32.const 32 - i32.add - set_local 1 - get_local 2 - i32.const -32 - i32.add - tee_local 2 - i32.const 31 - i32.gt_u - br_if 0 (;@2;) - end - end - get_local 0) - (func (;45;) (type 4) (param i32) (result i32) - (local i32 i32) - block ;; label = @1 - get_local 0 - call 46 - i32.const 1 - i32.add - tee_local 1 - call 14 - tee_local 2 - i32.eqz - br_if 0 (;@1;) - get_local 2 - get_local 0 - get_local 1 - call 43 - return - end - i32.const 0) - (func (;46;) (type 4) (param i32) (result i32) - (local i32 i32 i32) - get_local 0 - set_local 1 - block ;; label = @1 - block ;; label = @2 - block ;; label = @3 - get_local 0 - i32.const 3 - i32.and - i32.eqz - br_if 0 (;@3;) - get_local 0 - i32.load8_u - i32.eqz - br_if 1 (;@2;) - get_local 0 - i32.const 1 - i32.add - set_local 1 - loop ;; label = @4 - get_local 1 - i32.const 3 - i32.and - i32.eqz - br_if 1 (;@3;) - get_local 1 - i32.load8_u - set_local 2 - get_local 1 - i32.const 1 - i32.add - tee_local 3 - set_local 1 - get_local 2 - br_if 0 (;@4;) - end - get_local 3 - i32.const -1 - i32.add - get_local 0 - i32.sub - return - end - get_local 1 - i32.const -4 - i32.add - set_local 1 - loop ;; label = @3 - get_local 1 - i32.const 4 - i32.add - tee_local 1 - i32.load - tee_local 2 - i32.const -1 - i32.xor - get_local 2 - i32.const -16843009 - i32.add - i32.and - i32.const -2139062144 - i32.and - i32.eqz - br_if 0 (;@3;) - end - get_local 2 - i32.const 255 - i32.and - i32.eqz - br_if 1 (;@1;) - loop ;; label = @3 - get_local 1 - i32.load8_u offset=1 - set_local 2 - get_local 1 - i32.const 1 - i32.add - tee_local 3 - set_local 1 - get_local 2 - br_if 0 (;@3;) - end - get_local 3 - get_local 0 - i32.sub - return - end - get_local 0 - get_local 0 - i32.sub - return - end - get_local 1 - get_local 0 - i32.sub) - (table (;0;) 5 5 anyfunc) - (memory (;0;) 2) - (global (;0;) (mut i32) (i32.const 68256)) - (global (;1;) i32 (i32.const 68256)) - (global (;2;) i32 (i32.const 2716)) - (export "memory" (memory 0)) - (export "__heap_base" (global 1)) - (export "__data_end" (global 2)) - (export "_start" (func 12)) - (elem (i32.const 1) 38 36 40 42) - (data (i32.const 1024) "simple-wasi...\00") - (data (i32.const 1040) "\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 2600) "\05\00\00\00\00\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\03\00\00\00\04\00\00\00(\06\00\00\00\04\00\00\00\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00\0a\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00(\0a\00\00")) diff --git a/test/wasi/test-wasi-binding.js b/test/wasi/test-wasi-binding.js deleted file mode 100644 index 876c8a15a72c13..00000000000000 --- a/test/wasi/test-wasi-binding.js +++ /dev/null @@ -1,19 +0,0 @@ -// Flags: --experimental-wasi-unstable-preview0 -'use strict'; - -const common = require('../common'); - -const assert = require('assert'); -const fixtures = require('../common/fixtures'); -const buffer = fixtures.readSync(['wasi', 'simple-wasi.wasm']); -const { WASI } = require('wasi'); -const wasi = new WASI({ args: [], env: process.env }); -const importObject = { - wasi_unstable: wasi.wasiImport -}; - -WebAssembly.instantiate(buffer, importObject) -.then(common.mustCall((results) => { - assert(results.instance.exports._start); - wasi.start(results.instance); -})); diff --git a/test/wasi/test-wasi-options-validation.js b/test/wasi/test-wasi-options-validation.js index f8ec2604d5b9f1..fe23e446b08733 100644 --- a/test/wasi/test-wasi-options-validation.js +++ b/test/wasi/test-wasi-options-validation.js @@ -1,6 +1,6 @@ 'use strict'; -// Flags: --experimental-wasi-unstable-preview0 +// Flags: --experimental-wasi-unstable-preview1 require('../common'); const assert = require('assert'); diff --git a/test/wasi/test-wasi-start-validation.js b/test/wasi/test-wasi-start-validation.js index 8c8c6f7e44acc6..a31c5847968491 100644 --- a/test/wasi/test-wasi-start-validation.js +++ b/test/wasi/test-wasi-start-validation.js @@ -1,4 +1,4 @@ -// Flags: --experimental-wasi-unstable-preview0 +// Flags: --experimental-wasi-unstable-preview1 'use strict'; const common = require('../common'); diff --git a/test/wasi/test-wasi-symlinks.js b/test/wasi/test-wasi-symlinks.js index 7c6e6809738975..8332c8d147d9c4 100644 --- a/test/wasi/test-wasi-symlinks.js +++ b/test/wasi/test-wasi-symlinks.js @@ -17,7 +17,7 @@ if (process.argv[2] === 'wasi-child') { '/sandbox': process.argv[4] } }); - const importObject = { wasi_unstable: wasi.wasiImport }; + const importObject = { wasi_snapshot_preview1: wasi.wasiImport }; const modulePath = path.join(wasmDir, `${process.argv[3]}.wasm`); const buffer = fs.readFileSync(modulePath); @@ -59,7 +59,7 @@ if (process.argv[2] === 'wasi-child') { console.log('executing', options.test); const opts = { env: { ...process.env, NODE_DEBUG_NATIVE: 'wasi' } }; const child = cp.spawnSync(process.execPath, [ - '--experimental-wasi-unstable-preview0', + '--experimental-wasi-unstable-preview1', '--experimental-wasm-bigint', __filename, 'wasi-child', diff --git a/test/wasi/test-wasi.js b/test/wasi/test-wasi.js index d1060f5b32d33d..9c8b2a752778f9 100644 --- a/test/wasi/test-wasi.js +++ b/test/wasi/test-wasi.js @@ -22,7 +22,7 @@ if (process.argv[2] === 'wasi-child') { '/tmp': tmpdir.path } }); - const importObject = { wasi_unstable: wasi.wasiImport }; + const importObject = { wasi_snapshot_preview1: wasi.wasiImport }; const modulePath = path.join(wasmDir, `${process.argv[3]}.wasm`); const buffer = fs.readFileSync(modulePath); @@ -44,7 +44,7 @@ if (process.argv[2] === 'wasi-child') { opts.input = options.stdin; const child = cp.spawnSync(process.execPath, [ - '--experimental-wasi-unstable-preview0', + '--experimental-wasi-unstable-preview1', '--experimental-wasm-bigint', __filename, 'wasi-child', diff --git a/test/wasi/wasm/cant_dotdot.wasm b/test/wasi/wasm/cant_dotdot.wasm index 61e202d6913a3e..1ffbe23c6afdb2 100755 Binary files a/test/wasi/wasm/cant_dotdot.wasm and b/test/wasi/wasm/cant_dotdot.wasm differ diff --git a/test/wasi/wasm/clock_getres.wasm b/test/wasi/wasm/clock_getres.wasm index fac14edb04d794..510049dca4a009 100755 Binary files a/test/wasi/wasm/clock_getres.wasm and b/test/wasi/wasm/clock_getres.wasm differ diff --git a/test/wasi/wasm/exitcode.wasm b/test/wasi/wasm/exitcode.wasm index b2d9ef5e114218..ceb797f8b31ddf 100755 Binary files a/test/wasi/wasm/exitcode.wasm and b/test/wasi/wasm/exitcode.wasm differ diff --git a/test/wasi/wasm/fd_prestat_get_refresh.wasm b/test/wasi/wasm/fd_prestat_get_refresh.wasm index cf4bb97c3b2b20..159cfa9e4c8159 100755 Binary files a/test/wasi/wasm/fd_prestat_get_refresh.wasm and b/test/wasi/wasm/fd_prestat_get_refresh.wasm differ diff --git a/test/wasi/wasm/follow_symlink.wasm b/test/wasi/wasm/follow_symlink.wasm index 48cf8da1eb2860..f5f236c53f2440 100755 Binary files a/test/wasi/wasm/follow_symlink.wasm and b/test/wasi/wasm/follow_symlink.wasm differ diff --git a/test/wasi/wasm/getentropy.wasm b/test/wasi/wasm/getentropy.wasm index 6e3e8c8a8edbab..527ac6a17d3008 100755 Binary files a/test/wasi/wasm/getentropy.wasm and b/test/wasi/wasm/getentropy.wasm differ diff --git a/test/wasi/wasm/getrusage.wasm b/test/wasi/wasm/getrusage.wasm index 524e809175b5aa..c9546e232c7956 100755 Binary files a/test/wasi/wasm/getrusage.wasm and b/test/wasi/wasm/getrusage.wasm differ diff --git a/test/wasi/wasm/gettimeofday.wasm b/test/wasi/wasm/gettimeofday.wasm index 94627f00866903..7629b119d8895d 100755 Binary files a/test/wasi/wasm/gettimeofday.wasm and b/test/wasi/wasm/gettimeofday.wasm differ diff --git a/test/wasi/wasm/notdir.wasm b/test/wasi/wasm/notdir.wasm index f83a790ddc4700..6b592fc17b032f 100755 Binary files a/test/wasi/wasm/notdir.wasm and b/test/wasi/wasm/notdir.wasm differ diff --git a/test/wasi/wasm/poll.wasm b/test/wasi/wasm/poll.wasm index 98d0736762d7fb..90b39c502ef4db 100755 Binary files a/test/wasi/wasm/poll.wasm and b/test/wasi/wasm/poll.wasm differ diff --git a/test/wasi/wasm/preopen_populates.wasm b/test/wasi/wasm/preopen_populates.wasm index e7c34bc964602f..618050b3b4c210 100755 Binary files a/test/wasi/wasm/preopen_populates.wasm and b/test/wasi/wasm/preopen_populates.wasm differ diff --git a/test/wasi/wasm/read_file.wasm b/test/wasi/wasm/read_file.wasm index 2b9db77d272618..1c5e8107e0a9f7 100755 Binary files a/test/wasi/wasm/read_file.wasm and b/test/wasi/wasm/read_file.wasm differ diff --git a/test/wasi/wasm/read_file_twice.wasm b/test/wasi/wasm/read_file_twice.wasm index cd075a4de75a51..6917a105eb4c08 100755 Binary files a/test/wasi/wasm/read_file_twice.wasm and b/test/wasi/wasm/read_file_twice.wasm differ diff --git a/test/wasi/wasm/stat.wasm b/test/wasi/wasm/stat.wasm index 9007334d37d1a1..0d7980970fbe8b 100755 Binary files a/test/wasi/wasm/stat.wasm and b/test/wasi/wasm/stat.wasm differ diff --git a/test/wasi/wasm/stdin.wasm b/test/wasi/wasm/stdin.wasm index 7264608753229f..3cc548607af2e0 100755 Binary files a/test/wasi/wasm/stdin.wasm and b/test/wasi/wasm/stdin.wasm differ diff --git a/test/wasi/wasm/symlink_escape.wasm b/test/wasi/wasm/symlink_escape.wasm index 0cdb8327a1a23b..fcb8cfd5790782 100755 Binary files a/test/wasi/wasm/symlink_escape.wasm and b/test/wasi/wasm/symlink_escape.wasm differ diff --git a/test/wasi/wasm/symlink_loop.wasm b/test/wasi/wasm/symlink_loop.wasm index 3883d5278c7008..98e5c62f4b8355 100755 Binary files a/test/wasi/wasm/symlink_loop.wasm and b/test/wasi/wasm/symlink_loop.wasm differ diff --git a/test/wasi/wasm/write_file.wasm b/test/wasi/wasm/write_file.wasm index 500405e0fb3120..c21d0c2bfef5c7 100755 Binary files a/test/wasi/wasm/write_file.wasm and b/test/wasi/wasm/write_file.wasm differ