diff --git a/.github/workflows/native.yml b/.github/workflows/native.yml new file mode 100644 index 0000000..723ea60 --- /dev/null +++ b/.github/workflows/native.yml @@ -0,0 +1,41 @@ +name: Native + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + native: + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v7 + - uses: actions/setup-node@v7 + with: + node-version: 18.x + - run: cmake -S . -B build/native -DCMAKE_BUILD_TYPE=Debug + - run: cmake --build build/native --config Debug --parallel + - run: ctest --test-dir build/native -C Debug --output-on-failure + - run: cmake --install build/native --config Debug --prefix "${{ github.workspace }}/build/native-install" + - run: cmake -S test/native/consumer -B build/native-consumer -DCMAKE_PREFIX_PATH="${{ github.workspace }}/build/native-install" + - run: cmake --build build/native-consumer --config Debug --parallel + - run: ctest --test-dir build/native-consumer -C Debug --output-on-failure + - run: npm ci + - run: npm run build + - run: npm run test-native + sanitizers: + runs-on: ubuntu-latest + strategy: + matrix: + sanitizer: ['address,undefined', thread] + steps: + - uses: actions/checkout@v7 + - run: cmake -S . -B build/native -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_FLAGS="-fsanitize=${{ matrix.sanitizer }} -fno-omit-frame-pointer" -DCMAKE_CXX_FLAGS="-fsanitize=${{ matrix.sanitizer }} -fno-omit-frame-pointer" + - run: cmake --build build/native --parallel + - run: ctest --test-dir build/native --output-on-failure + - if: matrix.sanitizer == 'address,undefined' + run: clang -std=c11 -g -Iinclude -fsanitize=fuzzer,address,undefined src/lexer.c src/native.c test/native/fuzz.c -o build/native/fuzz && build/native/fuzz -runs=100000 diff --git a/.gitignore b/.gitignore index 0088252..99ad089 100755 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ node_modules dist yarn.lock build/toolchain +build/native* diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..e603224 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,55 @@ +cmake_minimum_required(VERSION 3.15) +project(cjs_module_lexer LANGUAGES C) + +if(CMAKE_C_COMPILER_ID STREQUAL "MSVC" AND + (CMAKE_VERSION VERSION_LESS 3.18.2 OR CMAKE_C_COMPILER_VERSION VERSION_LESS 19.28)) + message(FATAL_ERROR "The native lexer requires CMake 3.18.2 and MSVC 19.28 or newer when building with MSVC.") +endif() + +include(GNUInstallDirs) + +add_library(cjs_module_lexer STATIC src/lexer.c src/native.c) +add_library(cjs_module_lexer::cjs_module_lexer ALIAS cjs_module_lexer) +target_compile_features(cjs_module_lexer PUBLIC c_std_11) +target_include_directories(cjs_module_lexer PUBLIC + $ + $) +if(MSVC) + target_compile_options(cjs_module_lexer PRIVATE /W4) +else() + target_compile_options(cjs_module_lexer PRIVATE -Wall -Wextra -Wno-parentheses) +endif() + +install(TARGETS cjs_module_lexer EXPORT cjs_module_lexer_targets ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) +install(FILES include/cjs-module-lexer.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) +install(EXPORT cjs_module_lexer_targets FILE cjs_module_lexer-config.cmake + NAMESPACE cjs_module_lexer:: DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/cjs_module_lexer) + +include(CTest) +if(BUILD_TESTING) + enable_language(CXX) + find_package(Threads REQUIRED) + add_executable(native_test test/native/test.c) + target_link_libraries(native_test PRIVATE cjs_module_lexer) + add_test(NAME native COMMAND native_test) + add_executable(native_parse test/native/parse.c) + target_link_libraries(native_parse PRIVATE cjs_module_lexer) + add_executable(native_threads test/native/threads.cc) + target_compile_features(native_threads PRIVATE cxx_std_11) + target_link_libraries(native_threads PRIVATE cjs_module_lexer Threads::Threads) + add_test(NAME native_threads COMMAND native_threads) + add_library(native_failure OBJECT src/lexer.c src/native.c) + target_include_directories(native_failure PRIVATE include) + target_compile_features(native_failure PRIVATE c_std_11) + target_compile_definitions(native_failure PRIVATE malloc=cjs_test_malloc realloc=cjs_test_realloc free=cjs_test_free) + add_executable(native_failures test/native/failures.c $) + target_include_directories(native_failures PRIVATE include) + add_test(NAME native_failures COMMAND native_failures) + foreach(target native_test native_threads native_failures) + if(MSVC) + target_compile_options(${target} PRIVATE /UNDEBUG) + else() + target_compile_options(${target} PRIVATE -UNDEBUG) + endif() + endforeach() +endif() diff --git a/Makefile b/Makefile index bf45b62..1a16121 100755 --- a/Makefile +++ b/Makefile @@ -6,14 +6,14 @@ WASM_OPT ?= ../binaryen/bin/wasm-opt lib/lexer.wat: lib/lexer.wasm $(WASM2WAT) lib/lexer.wasm -o lib/lexer.wat -lib/lexer.wasm: include-wasm/cjs-module-lexer.h src/lexer.c | lib/ +lib/lexer.wasm: include/cjs-module-lexer.h src/lexer-internal.h src/lexer.c src/wasm.c | lib/ node build/wasm.js --docker lib/: @mkdir -p $@ optimize: lib/lexer.wasm - $(WASM_OPT) -Oz --enable-bulk-memory --strip-debug lib/lexer.wasm -o lib/lexer.wasm + $(WASM_OPT) -Oz --strip-debug lib/lexer.wasm -o lib/lexer.wasm clean: $(RM) lib/* diff --git a/README.md b/README.md index 7e6f695..f1cfa66 100755 --- a/README.md +++ b/README.md @@ -494,6 +494,65 @@ test/samples/*.js (3635 KiB) > 27.76ms ``` +## Native embedding + +The source distribution provides a C11 static library with no dependencies beyond the C library. +JavaScript installation does not require a native compiler. +The native build requires CMake 3.15 or later. With MSVC, use CMake 3.18.2 or later, +Visual Studio 2019 version 16.8 or later, and Windows SDK 10.0.20348.0 or later. + +```sh +cmake -S . -B build/native -DBUILD_TESTING=OFF +cmake --build build/native --parallel +cmake --install build/native --prefix /your/prefix +``` + +CMake consumers can use `find_package(cjs_module_lexer CONFIG REQUIRED)` and link +`cjs_module_lexer::cjs_module_lexer`. Other builds can compile `src/lexer.c` and `src/native.c` with `include/` +on the header search path. The interface does not promise a cross-version shared-library ABI. + +```c +#include + +/* UTF-16 code units, without a terminator. */ +const uint16_t source[] = {'e', 'x', 'p', 'o', 'r', 't', 's', '.', 'a', '=', '1'}; +cjs_lexer_result* result; +cjs_lexer_error error; +uint32_t status = cjs_lexer_parse_utf16(source, sizeof(source) / sizeof(source[0]), 0, &result, &error); +if (status == CJS_LEXER_OK) { + for (size_t index = 0; index < cjs_lexer_export_count(result); index++) { + cjs_lexer_string16 name = cjs_lexer_export(result, index); + /* Consume name.data[0..name.length). */ + } + cjs_lexer_result_free(result); +} +``` + +Lengths and error offsets count UTF-16 code units. Null source is valid with zero length. +The flags `CJS_LEXER_ALLOW_MINIFIED_ENUMERABLE` and `CJS_LEXER_EXTENDED` select the corresponding JavaScript options. +The default remains conservative detection. The lexer does not validate JavaScript syntax. + +Each call creates private scanner state. Calls can run concurrently, and independently owned results can coexist. +The result owns metadata and decoded strings. Names that need no decoding borrow the source. +Keep the source unchanged and alive until `cjs_lexer_result_free(result)`. +Read-only result access can run concurrently, with release synchronized by the caller. +Indexed access requires an index below the corresponding count. `cjs_lexer_result_free(NULL)` is valid. + +The C interface returns decoded candidates after getter filtering and reexport replacement. +Candidates retain source order and can contain duplicates. JavaScript wrappers retain their unique arrays. +String rejection, getter filtering, and detection modes match the Wasm package. + +The status distinguishes invalid arguments, lexical failure, limits, and allocation failure. +Every failure sets the result to null and initializes the optional error output. +`error.has_offset` signals that `error.offset` gives a source location. +`error.code` is a `CJS_LEXER_ERROR_*` constant from the header, or `CJS_LEXER_ERROR_NONE` if there is no scanner error. +`CJS_LEXER_ERROR_UNEXPECTED_IMPORT_META`, `CJS_LEXER_ERROR_UNEXPECTED_ESM_IMPORT`, and +`CJS_LEXER_ERROR_UNEXPECTED_ESM_EXPORT` identify ESM syntax. Nesting is limited to 2048 tracked brackets or templates. +Reaching the end of input while scanning template text reports `CJS_LEXER_ERROR_UNTERMINATED_TEMPLATE`. +Diagnostic code `4` is reserved. +Input lengths must fit `uint32_t`, `PTRDIFF_MAX - 32`, and the platform's UTF-16 allocation range. +Output locations must not overlap each other or the source. + ### Wasm Build Steps The build uses docker and make, they must be installed first. diff --git a/build/Makefile b/build/Makefile index 3a29c0c..6edfbe6 100755 --- a/build/Makefile +++ b/build/Makefile @@ -5,19 +5,16 @@ WASM_LDFLAGS := -nostartfiles # These are project-specific and are expected to be kept intact WASM_TARGET := -target wasm32-unknown-wasi -WASM_EXTRA_CFLAGS := -I include-wasm/ -Wno-logical-op-parentheses -Wno-parentheses -Oz +WASM_EXTRA_CFLAGS := -I include/ -Wno-logical-op-parentheses -Wno-parentheses -Oz WASM_EXTRA_CFLAGS += -flto -mllvm -inline-threshold=150 WASM_EXTRA_LDFLAGS := -Wl,-z,stack-size=13312,--no-entry,--compress-relocations,--strip-all WASM_EXTRA_LDFLAGS += -Wl,--mllvm=-inline-threshold=150 -WASM_EXTRA_LDFLAGS += -Wl,--export=__heap_base,--export=parseCJS,--export=sa -WASM_EXTRA_LDFLAGS += -Wl,--export=parseCJSWithOptions -WASM_EXTRA_LDFLAGS += -Wl,--export=e,--export=re,--export=es,--export=ee -WASM_EXTRA_LDFLAGS += -Wl,--export=rre,--export=ree,--export=res,--export=ru,--export=us,--export=ue +WASM_EXTRA_LDFLAGS += -Wl,--export=sa,--export=es,--export=ee,--export=re,--export=res,--export=ree,--export=rre,--export=us,--export=ue,--export=ru,--export=e,--export=parseCJS,--export=parseCJSWithOptions,--export=__heap_base -lib/lexer.wasm: include-wasm/cjs-module-lexer.h src/lexer.c +lib/lexer.wasm: include/cjs-module-lexer.h src/lexer-internal.h src/lexer.c src/wasm.c @mkdir -p lib $(WASM_CC) $(WASM_CFLAGS) $(WASM_TARGET) $(WASM_EXTRA_CFLAGS) \ - src/lexer.c -o lib/lexer.wasm \ + src/wasm.c -o lib/lexer.wasm \ $(WASM_LDFLAGS) $(WASM_EXTRA_LDFLAGS) optimize: lib/lexer.wasm diff --git a/build/wasm.js b/build/wasm.js index edd0c5f..cc5c27e 100644 --- a/build/wasm.js +++ b/build/wasm.js @@ -36,7 +36,7 @@ if (process.argv[2] === '--docker') { --mount type=bind,source=${ROOT}/build/Makefile,target=/home/node/build/Makefile \ --mount type=bind,source=${ROOT}/build.js,target=/home/node/build/build.js \ --mount type=bind,source=${ROOT}/package.json,target=/home/node/build/package.json \ - --mount type=bind,source=${ROOT}/include-wasm,target=/home/node/build/include-wasm \ + --mount type=bind,source=${ROOT}/include,target=/home/node/build/include \ -t ${WASM_BUILDER_CONTAINER} node wasm.js` console.log(`> ${cmd}\n\n`) execSync(cmd, { stdio: 'inherit' }) diff --git a/include-wasm/cjs-module-lexer.h b/include-wasm/cjs-module-lexer.h deleted file mode 100755 index 77911fe..0000000 --- a/include-wasm/cjs-module-lexer.h +++ /dev/null @@ -1,262 +0,0 @@ -#include -#include -#include -#include -#include - -extern unsigned char __heap_base; - -const uint16_t* source = (void*)&__heap_base; -uint32_t parse_error; - -struct Slice { - const uint16_t* start; - const uint16_t* end; - struct Slice* next; -}; -typedef struct Slice Slice; - -struct StarExportBinding { - const uint16_t* specifier_start; - const uint16_t* specifier_end; - const uint16_t* id_start; - const uint16_t* id_end; - struct StarExportBinding* next; -}; -typedef struct StarExportBinding StarExportBinding; - -Slice* first_export = NULL; -Slice* export_read_head = NULL; -Slice* export_write_head = NULL; -Slice* first_reexport = NULL; -Slice* reexport_read_head = NULL; -Slice* reexport_write_head = NULL; -Slice* first_unsafe_getter = NULL; -Slice* unsafe_getter_read_head = NULL; -Slice* unsafe_getter_write_head = NULL; -void* analysis_base; -// The end of a full Wasm32 memory does not fit in uintptr_t. -uint64_t analysis_head; -uint64_t analysis_limit; - -void bail (uint32_t err); - -// allocateSource -const uint16_t* sa (uint32_t utf16Len) { - const uint16_t* sourceEnd = source + utf16Len + 1; - // ensure source is null terminated - *(uint16_t*)(source + utf16Len) = '\0'; - const uintptr_t alignment = _Alignof(Slice); - analysis_base = (void*)(((uintptr_t)sourceEnd + alignment - 1) & ~(alignment - 1)); - analysis_head = (uintptr_t)analysis_base; - analysis_limit = (uint64_t)__builtin_wasm_memory_size(0) << 16; - first_export = NULL; - export_write_head = NULL; - export_read_head = NULL; - first_reexport = NULL; - reexport_write_head = NULL; - reexport_read_head = NULL; - first_unsafe_getter = NULL; - unsafe_getter_write_head = NULL; - unsafe_getter_read_head = NULL; - return source; -} - -// getErr -uint32_t e () { - return parse_error; -} - -// getExportStart -uint32_t es () { - return export_read_head->start - source; -} -// getExportEnd -uint32_t ee () { - return export_read_head->end - source; -} -// getReexportStart -uint32_t res () { - return reexport_read_head->start - source; -} -// getReexportEnd -uint32_t ree () { - return reexport_read_head->end - source; -} -// getUnsafeGetterStart -uint32_t us () { - return unsafe_getter_read_head->start - source; -} -// getUnsafeGetterEnd -uint32_t ue () { - return unsafe_getter_read_head->end - source; -} -// readExport -bool re () { - if (export_read_head == NULL) - export_read_head = first_export; - else - export_read_head = export_read_head->next; - if (export_read_head == NULL) - return false; - return true; -} -// readReexport -bool rre () { - if (reexport_read_head == NULL) - reexport_read_head = first_reexport; - else - reexport_read_head = reexport_read_head->next; - if (reexport_read_head == NULL) - return false; - return true; -} -// readUnsafeGetter -bool ru () { - if (unsafe_getter_read_head == NULL) - unsafe_getter_read_head = first_unsafe_getter; - else - unsafe_getter_read_head = unsafe_getter_read_head->next; - if (unsafe_getter_read_head == NULL) - return false; - return true; -} - -static __attribute__((noinline)) void growAnalysis (uint64_t required) { - uint32_t pages = (required - analysis_limit + 65535) >> 16; - if (__builtin_wasm_memory_grow(0, pages) == (size_t)-1) - __builtin_trap(); - analysis_limit += (uint64_t)pages << 16; -} - -static inline __attribute__((always_inline)) void ensureAnalysisCapacity (size_t size) { - uint64_t required = analysis_head + size; - if (required > analysis_limit) - growAnalysis(required); -} - -void _addExport (const uint16_t* start, const uint16_t* end) { - ensureAnalysisCapacity(sizeof(Slice)); - Slice* export = (Slice*)(uintptr_t)analysis_head; - analysis_head = analysis_head + sizeof(Slice); - if (export_write_head == NULL) - first_export = export; - else - export_write_head->next = export; - export_write_head = export; - export->start = start; - export->end = end; - export->next = NULL; -} -void _addReexport (const uint16_t* start, const uint16_t* end) { - ensureAnalysisCapacity(sizeof(Slice)); - Slice* reexport = (Slice*)(uintptr_t)analysis_head; - analysis_head = analysis_head + sizeof(Slice); - if (reexport_write_head == NULL) - first_reexport = reexport; - else - reexport_write_head->next = reexport; - reexport_write_head = reexport; - reexport->start = start; - reexport->end = end; - reexport->next = NULL; -} -void _addUnsafeGetter (const uint16_t* start, const uint16_t* end) { - ensureAnalysisCapacity(sizeof(Slice)); - Slice* unsafe_getter = (Slice*)(uintptr_t)analysis_head; - analysis_head = analysis_head + sizeof(Slice); - if (unsafe_getter_write_head == NULL) - first_unsafe_getter = unsafe_getter; - else - unsafe_getter_write_head->next = unsafe_getter; - unsafe_getter_write_head = unsafe_getter; - unsafe_getter->start = start; - unsafe_getter->end = end; - unsafe_getter->next = NULL; -} -void _clearReexports () { - reexport_write_head = NULL; - first_reexport = NULL; -} -void (*addExport)(const uint16_t*, const uint16_t*) = &_addExport; -void (*addReexport)(const uint16_t*, const uint16_t*) = &_addReexport; -void (*addUnsafeGetter)(const uint16_t*, const uint16_t*) = &_addUnsafeGetter; -void (*clearReexports)() = &_clearReexports; -uint32_t parseCJS (uint16_t* source, uint32_t sourceLen, void (*addExport)(const uint16_t* start, const uint16_t* end), void (*addReexport)(const uint16_t* start, const uint16_t* end), void (*addUnsafeGetter)(const uint16_t*, const uint16_t*), void (*clearReexports)()); -uint32_t parseCJSWithOptions (uint16_t* source, uint32_t sourceLen, void (*addExport)(const uint16_t* start, const uint16_t* end), void (*addReexport)(const uint16_t* start, const uint16_t* end), void (*addUnsafeGetter)(const uint16_t*, const uint16_t*), void (*clearReexports)(), uint32_t options); - -enum RequireType { - Import, - ExportAssign, - ExportStar -}; - -void tryBacktrackAddStarExportBinding (uint16_t* pos); -bool tryParseRequire (enum RequireType requireType); -void tryParseLiteralExports (); -void readExportDefinition (); -void readExportProperty (); -bool readExportsOrModuleDotExports (uint16_t ch); -void tryParseModuleExportsDotAssign (); -void tryParseExportsDotAssign (bool assign); -void tryParseObjectDefineOrKeys (bool keys); -bool identifier (uint16_t ch); - -void throwIfImportStatement (); -void throwIfExportStatement (); - -void readImportString (const uint16_t* ss, uint16_t ch); -uint16_t readExportAs (uint16_t* startPos, uint16_t* endPos); - -uint16_t commentWhitespace (); -void stringLiteral (uint16_t quote); -void regularExpression (); -void templateString (); -void blockComment (); -void lineComment (); - -uint16_t readToWsOrPunctuator (uint16_t ch); - -uint32_t fullCharCode (uint16_t ch); -uint32_t fullCharCodeAtLast (uint16_t* pos); -bool isIdentifierStart (uint32_t code); -bool isIdentifierChar (uint32_t code); -int charCodeByteLen (uint32_t ch); - -bool isBr (uint16_t c); -bool isBrOrWs (uint16_t c); -bool isBrOrWsOrPunctuator (uint16_t c); -bool isBrOrWsOrPunctuatorNotDot (uint16_t c); - -bool str_eq2 (uint16_t* pos, uint16_t c1, uint16_t c2); -bool str_eq3 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3); -bool str_eq4 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4); -bool str_eq5 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5); -bool str_eq6 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6); -bool str_eq7 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7); -bool str_eq8 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7, uint16_t c8); -bool str_eq9 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7, uint16_t c8, uint16_t c9); -bool str_eq10 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7, uint16_t c8, uint16_t c9, uint16_t c10); -bool str_eq13 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7, uint16_t c8, uint16_t c9, uint16_t c10, uint16_t c11, uint16_t c12, uint16_t c13); -bool str_eq18 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7, uint16_t c8, uint16_t c9, uint16_t c10, uint16_t c11, uint16_t c12, uint16_t c13, uint16_t c14, uint16_t c15, uint16_t c16, uint16_t c17, uint16_t c18); -bool str_eq22 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7, uint16_t c8, uint16_t c9, uint16_t c10, uint16_t c11, uint16_t c12, uint16_t c13, uint16_t c14, uint16_t c15, uint16_t c16, uint16_t c17, uint16_t c18, uint16_t c19, uint16_t c20, uint16_t c21, uint16_t c22); - -bool readPrecedingKeyword2(uint16_t* pos, uint16_t c1, uint16_t c2); -bool readPrecedingKeyword3(uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3); -bool readPrecedingKeyword4(uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4); -bool readPrecedingKeyword5(uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5); -bool readPrecedingKeyword6(uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6); -bool readPrecedingKeyword7(uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7); - -bool keywordStart (uint16_t* pos); -bool isExpressionKeyword (uint16_t* pos); -bool isParenKeyword (uint16_t* pos); -bool isPunctuator (uint16_t charCode); -bool isExpressionPunctuator (uint16_t charCode); -bool isExpressionTerminator (uint16_t* pos); - -void nextChar (uint16_t ch); -void nextCharSurrogate (uint16_t ch); -uint16_t readChar (); - -void syntaxError (uint32_t code); diff --git a/include/cjs-module-lexer.h b/include/cjs-module-lexer.h new file mode 100644 index 0000000..7caff4c --- /dev/null +++ b/include/cjs-module-lexer.h @@ -0,0 +1,69 @@ +#ifndef CJS_MODULE_LEXER_H +#define CJS_MODULE_LEXER_H + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct cjs_lexer_result cjs_lexer_result; + +typedef struct { + const uint16_t* data; + size_t length; +} cjs_lexer_string16; + +typedef struct { + uint32_t code; + uint32_t has_offset; + size_t offset; +} cjs_lexer_error; + +enum { + CJS_LEXER_ERROR_NONE = 0, + CJS_LEXER_ERROR_UNEXPECTED_EOF = 1, + CJS_LEXER_ERROR_UNEXPECTED_CLOSING_BRACE = 2, + CJS_LEXER_ERROR_UNEXPECTED_TEMPLATE_BRACE = 3, + CJS_LEXER_ERROR_UNEXPECTED_IMPORT_META = 5, + CJS_LEXER_ERROR_UNEXPECTED_ESM_IMPORT = 6, + CJS_LEXER_ERROR_UNEXPECTED_ESM_EXPORT = 7, + CJS_LEXER_ERROR_UNBALANCED_DELIMITER = 8, + CJS_LEXER_ERROR_UNTERMINATED_STRING = 9, + CJS_LEXER_ERROR_UNTERMINATED_REGEX_CLASS = 10, + CJS_LEXER_ERROR_UNTERMINATED_REGEX = 11, + CJS_LEXER_ERROR_NESTING_LIMIT = 12, + CJS_LEXER_ERROR_UNTERMINATED_TEMPLATE = 14 +}; + +#define CJS_LEXER_OK UINT32_C(0) +#define CJS_LEXER_INVALID_ARGUMENT UINT32_C(1) +#define CJS_LEXER_SYNTAX_ERROR UINT32_C(2) +#define CJS_LEXER_LIMIT UINT32_C(3) +#define CJS_LEXER_OUT_OF_MEMORY UINT32_C(4) + +#define CJS_LEXER_ALLOW_MINIFIED_ENUMERABLE UINT32_C(1) +#define CJS_LEXER_EXTENDED UINT32_C(2) + +/* Source is borrowed, in UTF-16 code units, without padding or a terminator. + * Keep it unchanged until result_free. Null source is valid only with length 0. + * Output locations must not alias source or each other. On failure *result is + * null and error, when supplied, describes this call only. */ +uint32_t cjs_lexer_parse_utf16(const uint16_t* source, size_t length, + uint32_t flags, cjs_lexer_result** result, + cjs_lexer_error* error); + +/* Views require a live result and index below the corresponding count. + * Candidates are decoded and filtered, in source order, with duplicates. + * Views remain valid until result_free, including across independent parses. */ +size_t cjs_lexer_export_count(const cjs_lexer_result* result); +size_t cjs_lexer_reexport_count(const cjs_lexer_result* result); +cjs_lexer_string16 cjs_lexer_export(const cjs_lexer_result* result, size_t index); +cjs_lexer_string16 cjs_lexer_reexport(const cjs_lexer_result* result, size_t index); +void cjs_lexer_result_free(cjs_lexer_result* result); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/lexer.js b/lexer.js index 2217554..aaeeb59 100755 --- a/lexer.js +++ b/lexer.js @@ -91,7 +91,7 @@ function decode (str) { // Filter to exclude non-matching UTF-16 surrogate strings for (let i = 0; i < decoded.length; i++) { const surrogatePrefix = decoded.charCodeAt(i) & 0xFC00; - if (surrogatePrefix < 0xD800) { + if (surrogatePrefix < 0xD800 || surrogatePrefix >= 0xE000) { // Not a surrogate continue; } @@ -101,7 +101,7 @@ function decode (str) { return; } else { - // Out-of-range surrogate code (above 0xD800) + // Unpaired low surrogate return; } } @@ -120,6 +120,9 @@ function parseSource (cjsSource) { pos = -1; end = source.length - 1; let ch = 0; + let lastClosedTokenPos = -1; + let lastOpenTokenPos = -1; + let lastOpenTokenType = 0; // Handle #! if (source.charCodeAt(0) === 35/*#*/ && source.charCodeAt(1) === 33/*!*/) { @@ -232,6 +235,8 @@ function parseSource (cjsSource) { if (openTokenDepth === 0) throw new Error('Unexpected closing bracket.'); openTokenDepth--; + lastClosedTokenPos = pos; + lastOpenTokenPos = openTokenPosStack[openTokenDepth]; break; case 123/*{*/: pushOpenToken(lastTokenPos); @@ -246,6 +251,9 @@ function parseSource (cjsSource) { case 125/*}*/: if (openTokenDepth === 0) throw new Error('Unexpected closing brace.'); + lastClosedTokenPos = pos; + lastOpenTokenPos = openTokenPosStack[openTokenDepth - 1]; + lastOpenTokenType = openTokenTypeStack[openTokenDepth - 1]; if (openTokenDepth-- === templateDepth) { templateDepth = templateStack[--templateStackDepth]; templateString(); @@ -283,10 +291,10 @@ function parseSource (cjsSource) { if (isExpressionPunctuator(lastToken) && !(lastToken === 46/*.*/ && (source.charCodeAt(lastTokenPos - 1) >= 48/*0*/ && source.charCodeAt(lastTokenPos - 1) <= 57/*9*/)) && !(lastToken === 43/*+*/ && source.charCodeAt(lastTokenPos - 1) === 43/*+*/) && !(lastToken === 45/*-*/ && source.charCodeAt(lastTokenPos - 1) === 45/*-*/) || - lastToken === 41/*)*/ && isParenKeyword(openTokenPosStack[openTokenDepth]) || - lastToken === 125/*}*/ && (isExpressionTerminator(openTokenPosStack[openTokenDepth]) || - (openTokenTypeStack[openTokenDepth] & ClassToken) || - extended && isStatementBrace(openTokenPosStack[openTokenDepth], openTokenDepth)) || + lastTokenPos === lastClosedTokenPos && (lastToken === 41/*)*/ && isParenKeyword(lastOpenTokenPos) || + lastToken === 125/*}*/ && (isExpressionTerminator(lastOpenTokenPos) || + (lastOpenTokenType & ClassToken) || + extended && isStatementBrace(lastOpenTokenPos, openTokenDepth))) || lastToken === 47/*/*/ && lastSlashWasDivision || isExpressionKeyword(lastTokenPos) || !lastToken) { diff --git a/lib/lexer.wasm b/lib/lexer.wasm index fd7050a..993c8e8 100755 Binary files a/lib/lexer.wasm and b/lib/lexer.wasm differ diff --git a/lib/lexer.wat b/lib/lexer.wat index a6cd568..7cd1311 100644 --- a/lib/lexer.wat +++ b/lib/lexer.wat @@ -1,227 +1,87 @@ (module - (type (;0;) (func (param i32 i32))) - (type (;1;) (func (result i32))) - (type (;2;) (func (param i32) (result i32))) - (type (;3;) (func (param i32 i32 i32 i32 i32 i32) (result i32))) - (type (;4;) (func (param i32 i32) (result i32))) + (type (;0;) (func (result i32))) + (type (;1;) (func (param i32) (result i32))) + (type (;2;) (func (param i32))) + (type (;3;) (func (param i32 i32) (result i32))) + (type (;4;) (func (param i32 i32 i32))) (type (;5;) (func (param i32 i32 i32) (result i32))) - (type (;6;) (func (param i64))) - (type (;7;) (func (param i32))) + (type (;6;) (func)) + (type (;7;) (func (param i64))) (type (;8;) (func (param i32 i32 i32 i32 i32 i32 i32) (result i32))) - (type (;9;) (func (param i32 i32 i32 i32))) - (func (;0;) (type 5) (param i32 i32 i32) (result i32) - (local i32 i32 i32) - block ;; label = @1 - local.get 2 - i32.eqz - br_if 0 (;@1;) - loop ;; label = @2 - local.get 0 - i32.load8_u - local.tee 4 - local.get 1 - i32.load8_u - local.tee 5 - i32.eq - if ;; label = @3 - local.get 1 - i32.const 1 - i32.add - local.set 1 - local.get 0 - i32.const 1 - i32.add - local.set 0 - local.get 2 - i32.const 1 - i32.sub - local.tee 2 - br_if 1 (;@2;) - br 2 (;@1;) - end - end - local.get 4 - local.get 5 - i32.sub - local.set 3 - end - local.get 3) - (func (;1;) (type 0) (param i32 i32) - local.get 0 - local.get 1 - i32.const 4048 - i32.const 4056 - call 32) - (func (;2;) (type 6) (param i64) - local.get 0 - i32.const 4096 - i64.load - i64.sub - i64.const 65535 - i64.add - local.tee 0 - i64.const 16 - i64.shr_u - i32.wrap_i64 - memory.grow - i32.const -1 - i32.eq - if ;; label = @1 - unreachable - end - i32.const 4096 - i32.const 4096 - i64.load - local.get 0 - i64.const 281474976645120 - i64.and - i64.add - i64.store) - (func (;3;) (type 0) (param i32 i32) - local.get 0 - local.get 1 - i32.const 4060 - i32.const 4068 - call 32) - (func (;4;) (type 0) (param i32 i32) - local.get 0 - local.get 1 - i32.const 4072 - i32.const 4080 - call 32) - (func (;5;) (type 3) (param i32 i32 i32 i32 i32 i32) (result i32) - (local i32 i32 i32 i32 i32 i32 i32 i32 i64 i64) - i32.const 4024 + (type (;9;) (func (param i32 i32 i32 i32 i32 i32) (result i32))) + (func (;0;) (type 2) (param i32) local.get 0 - i32.store - i32.const 4112 - local.get 5 - i32.const 1 - i32.and - i32.store8 - i32.const 4113 - local.get 5 - i32.const 1 - i32.shr_u - i32.const 1 - i32.and - i32.store8 - local.get 2 - if ;; label = @1 - i32.const 4028 - local.get 2 - i32.store - end - local.get 3 - if ;; label = @1 - i32.const 4032 - local.get 3 - i32.store - end - local.get 4 - if ;; label = @1 - i32.const 4036 - local.get 4 - i32.store - end - i32.const 4118 - i32.const 65535 - i32.store16 - i32.const 8224 - i32.const 4128 - i32.store - i32.const 16448 - local.get 0 - i32.const 2 - i32.sub - local.tee 5 - i32.store - i32.const 16452 - local.get 5 - local.get 1 - i32.const 1 - i32.shl - i32.add - local.tee 3 - i32.store - i32.const 4116 - i32.const 0 - i32.store16 - i32.const 4114 - i32.const 0 - i32.store16 - i32.const 4124 - i32.const 0 - i32.store8 - i32.const 4104 - i32.const 0 - i32.store - i32.const 4108 - i32.const 0 - i32.store - i32.const 16432 i32.const 0 - i32.store - i32.const 16436 - i32.const 0 - i32.store - i32.const 16440 - i32.const 0 - i32.store8 - i32.const 16444 - i32.const 0 - i32.store + i32.store offset=8 + local.get 0 + i64.const 0 + i64.store align=4) + (func (;1;) (type 0) (result i32) + (local i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i32 i64 i64) block ;; label = @1 block ;; label = @2 - local.get 0 + i32.const 4188 + i32.load + local.tee 3 i32.load16_u i32.const 35 i32.ne br_if 0 (;@2;) - local.get 0 + local.get 3 i32.load16_u offset=2 i32.const 33 i32.ne br_if 0 (;@2;) - i32.const 0 - local.set 4 - local.get 1 + i32.const 4192 + i32.load i32.const 2 i32.eq br_if 1 (;@1;) - local.get 0 - i32.const 4 + i32.const 4196 + i32.load + i32.const 6 i32.add - local.set 0 + local.set 1 + i32.const 4200 + i32.load + local.set 2 loop ;; label = @3 - local.get 0 - local.tee 5 - i32.const 2 - i32.sub - local.get 3 - i32.ge_u - br_if 1 (;@2;) - local.get 0 - i32.const 2 - i32.add - local.set 0 - local.get 5 - i32.load16_u - i32.const 10 - i32.sub - br_table 1 (;@2;) 0 (;@3;) 0 (;@3;) 1 (;@2;) 0 (;@3;) + block ;; label = @4 + local.get 1 + local.tee 0 + local.get 2 + i32.gt_u + br_if 0 (;@4;) + local.get 0 + i32.const 2 + i32.add + local.set 1 + local.get 0 + i32.load16_u + i32.const 10 + i32.sub + br_table 0 (;@4;) 1 (;@3;) 1 (;@3;) 0 (;@4;) 1 (;@3;) + end end - unreachable + i32.const 4196 + local.get 0 + i32.store end - i32.const 1024 - local.set 1 + i32.const 4196 + i32.load + local.set 0 + local.get 3 + i32.const 2 + i32.sub + local.tee 12 + local.set 8 loop ;; label = @2 - i32.const 16448 - local.get 5 - local.tee 0 + i32.const 4196 + local.get 0 + local.tee 2 i32.const 2 i32.add - local.tee 5 + local.tee 0 i32.store block ;; label = @3 block ;; label = @4 @@ -232,42 +92,44 @@ block ;; label = @9 block ;; label = @10 block ;; label = @11 - block ;; label = @12 + i32.const 4224 + block (result i32) ;; label = @12 block ;; label = @13 block ;; label = @14 block ;; label = @15 block ;; label = @16 block ;; label = @17 - i32.const 4124 - block (result i32) ;; label = @18 + block ;; label = @18 block ;; label = @19 block ;; label = @20 block ;; label = @21 - block ;; label = @22 + i32.const 4200 + i32.load + local.tee 10 + local.get 0 + i32.ge_u + if ;; label = @22 + local.get 0 + i32.load16_u + local.tee 4 + i32.const 9 + i32.sub + local.tee 3 + i32.const 23 + i32.le_u + i32.const 0 + i32.const 1 + local.get 3 + i32.shl + i32.const 8388639 + i32.and + select + br_if 20 (;@2;) block ;; label = @23 block ;; label = @24 block ;; label = @25 block ;; label = @26 - local.get 0 - local.get 3 - i32.lt_u - if ;; label = @27 - local.get 5 - i32.load16_u - local.tee 6 - i32.const 9 - i32.sub - local.tee 2 - i32.const 23 - i32.le_u - i32.const 0 - i32.const 1 - local.get 2 - i32.shl - i32.const 8388639 - i32.and - select - br_if 25 (;@2;) + block ;; label = @27 block ;; label = @28 block ;; label = @29 block ;; label = @30 @@ -283,9680 +145,9844 @@ block ;; label = @40 block ;; label = @41 block ;; label = @42 - block ;; label = @43 + i32.const 4214 + i32.load16_u + local.tee 1 + i32.eqz + if ;; label = @43 block ;; label = @44 block ;; label = @45 - i32.const 4116 + block ;; label = @46 + local.get 4 + i32.const 91 + i32.sub + br_table 11 (;@35;) 42 (;@4;) 14 (;@32;) 42 (;@4;) 2 (;@44;) 27 (;@19;) 42 (;@4;) 42 (;@4;) 6 (;@40;) 42 (;@4;) 5 (;@41;) 42 (;@4;) 42 (;@4;) 42 (;@4;) 1 (;@45;) 42 (;@4;) 42 (;@4;) 42 (;@4;) 4 (;@42;) 0 (;@46;) + end + block ;; label = @46 + local.get 4 + i32.const 34 + i32.sub + br_table 22 (;@24;) 42 (;@4;) 42 (;@4;) 42 (;@4;) 42 (;@4;) 22 (;@24;) 25 (;@21;) 16 (;@30;) 42 (;@4;) 42 (;@4;) 43 (;@3;) 42 (;@4;) 42 (;@4;) 23 (;@23;) 0 (;@46;) + end + block ;; label = @46 + local.get 4 + i32.const 123 + i32.sub + br_table 19 (;@27;) 42 (;@4;) 20 (;@26;) 0 (;@46;) + end + local.get 4 + i32.const 60 + i32.eq + br_if 42 (;@3;) + local.get 4 + i32.const 79 + i32.eq + br_if 7 (;@38;) + local.get 4 + i32.const 114 + i32.ne + br_if 41 (;@4;) + i32.const 0 + call 2 + i32.eqz + br_if 41 (;@4;) + i32.const 4188 + i32.load + local.get 0 + i32.eq + br_if 40 (;@5;) + local.get 2 i32.load16_u - local.tee 4 + call 3 i32.eqz - if ;; label = @46 - block ;; label = @47 - block ;; label = @48 - block ;; label = @49 - local.get 6 - i32.const 91 - i32.sub - br_table 10 (;@39;) 45 (;@4;) 11 (;@38;) 45 (;@4;) 2 (;@47;) 25 (;@24;) 45 (;@4;) 45 (;@4;) 6 (;@43;) 45 (;@4;) 5 (;@44;) 45 (;@4;) 45 (;@4;) 45 (;@4;) 1 (;@48;) 45 (;@4;) 45 (;@4;) 45 (;@4;) 4 (;@45;) 0 (;@49;) - end - i32.const 0 - local.set 2 - block ;; label = @49 - local.get 6 - i32.const 34 - i32.sub - br_table 20 (;@29;) 45 (;@4;) 45 (;@4;) 45 (;@4;) 45 (;@4;) 20 (;@29;) 9 (;@40;) 14 (;@35;) 45 (;@4;) 45 (;@4;) 13 (;@36;) 45 (;@4;) 45 (;@4;) 21 (;@28;) 0 (;@49;) - end - block ;; label = @49 - local.get 6 - i32.const 123 - i32.sub - br_table 17 (;@32;) 45 (;@4;) 18 (;@31;) 0 (;@49;) - end - local.get 6 - i32.const 60 - i32.eq - br_if 45 (;@3;) - local.get 6 - i32.const 79 - i32.eq - br_if 6 (;@42;) - local.get 6 - i32.const 114 - i32.ne - br_if 44 (;@4;) - i32.const 0 - call 6 - i32.eqz - br_if 44 (;@4;) - i32.const 4024 - i32.load - local.get 5 - i32.eq - br_if 43 (;@5;) - local.get 0 - i32.load16_u - call 7 - i32.eqz - br_if 44 (;@4;) - br 43 (;@5;) - end - local.get 0 - i32.load16_u offset=4 - i32.const 109 - i32.ne - br_if 43 (;@4;) - local.get 0 - i32.load16_u offset=6 - i32.const 112 - i32.ne - br_if 43 (;@4;) - local.get 0 - i32.load16_u offset=8 - i32.const 111 - i32.ne - br_if 43 (;@4;) - local.get 0 - i32.load16_u offset=10 - i32.const 114 - i32.ne - br_if 43 (;@4;) - local.get 0 - i32.load16_u offset=12 - i32.const 116 - i32.ne - br_if 43 (;@4;) - local.get 5 - i32.const 4024 - i32.load - local.tee 1 - i32.ne - if ;; label = @48 - local.get 0 - i32.load16_u - call 7 - i32.eqz - br_if 44 (;@4;) - end - i32.const 16448 - local.get 0 - i32.const 14 - i32.add - local.tee 2 - i32.store + br_if 41 (;@4;) + br 40 (;@5;) + end + local.get 2 + i32.load16_u offset=4 + i32.const 109 + i32.ne + br_if 40 (;@4;) + local.get 2 + i32.load16_u offset=6 + i32.const 112 + i32.ne + br_if 40 (;@4;) + local.get 2 + i32.load16_u offset=8 + i32.const 111 + i32.ne + br_if 40 (;@4;) + local.get 2 + i32.load16_u offset=10 + i32.const 114 + i32.ne + br_if 40 (;@4;) + local.get 2 + i32.load16_u offset=12 + i32.const 116 + i32.ne + br_if 40 (;@4;) + local.get 0 + i32.const 4188 + i32.load + i32.ne + if ;; label = @45 + local.get 2 + i32.load16_u + call 3 + i32.eqz + br_if 41 (;@4;) + end + i32.const 4196 + local.get 2 + i32.const 14 + i32.add + local.tee 1 + i32.store + block ;; label = @45 + block ;; label = @46 + block ;; label = @47 block ;; label = @48 block ;; label = @49 block ;; label = @50 - block ;; label = @51 - block ;; label = @52 - call 8 - local.tee 0 - i32.const 39 - i32.sub - br_table 2 (;@50;) 3 (;@49;) 1 (;@51;) 2 (;@50;) 1 (;@51;) 1 (;@51;) 1 (;@51;) 4 (;@48;) 0 (;@52;) - end - local.get 0 - i32.const 34 - i32.eq - local.get 0 - i32.const 123 - i32.eq - i32.or - br_if 1 (;@50;) - end - i32.const 16448 - i32.load - local.get 2 - i32.eq - br_if 46 (;@4;) - end - i32.const 4108 - i32.load - i32.eqz - if ;; label = @50 - i32.const 4108 - i32.const 6 - i32.store + call 4 + local.tee 3 + i32.const 39 + i32.sub + br_table 2 (;@48;) 3 (;@47;) 1 (;@49;) 2 (;@48;) 1 (;@49;) 1 (;@49;) 1 (;@49;) 4 (;@46;) 0 (;@50;) end - i32.const 16448 - i32.load - local.set 0 - i32.const 16448 local.get 3 - i32.const 2 - i32.add - i32.store - i32.const 4104 - local.get 0 - local.get 1 - i32.sub - i32.const 1 - i32.shr_s - i32.store - br 45 (;@4;) - end - i32.const 4113 - i32.load8_u - if ;; label = @49 - i32.const 16464 - i32.const 0 - i32.store8 + i32.const 34 + i32.eq + local.get 3 + i32.const 123 + i32.eq + i32.or + br_if 1 (;@48;) end - i32.const 8240 - local.get 5 - i32.store - i32.const 4116 - i32.const 1 - i32.store16 - br 44 (;@4;) + i32.const 4196 + i32.load + local.get 1 + i32.eq + br_if 44 (;@4;) end - i32.const 4108 - i32.load + i32.const 4214 + i32.load16_u i32.eqz - if ;; label = @48 - i32.const 4108 - i32.const 5 - i32.store - end - i32.const 16448 + br_if 2 (;@45;) + i32.const 4196 + i32.const 4196 i32.load - local.set 0 - i32.const 16448 - local.get 3 i32.const 2 - i32.add - i32.store - i32.const 4104 - local.get 0 - local.get 1 i32.sub - i32.const 1 - i32.shr_s i32.store br 43 (;@4;) end - local.get 0 - i32.load16_u offset=4 - local.tee 2 - i32.const 95 + i32.const 4214 + i32.load16_u + local.tee 3 + i32.const 2048 i32.ne + br_if 26 (;@20;) + i32.const 4224 + i32.load + i32.eqz if ;; label = @47 - local.get 2 - i32.const 105 - i32.ne - br_if 43 (;@4;) - local.get 0 - i32.load16_u offset=6 - i32.const 110 - i32.ne - br_if 43 (;@4;) - local.get 0 - i32.load16_u offset=8 - i32.const 116 - i32.ne - br_if 43 (;@4;) - local.get 0 - i32.load16_u offset=10 - i32.const 101 - i32.ne - br_if 43 (;@4;) - local.get 0 - i32.load16_u offset=12 - i32.const 114 - i32.ne - br_if 43 (;@4;) - local.get 0 - i32.load16_u offset=14 - i32.const 111 - i32.ne - br_if 43 (;@4;) - local.get 0 - i32.load16_u offset=16 - i32.const 112 - i32.ne - br_if 43 (;@4;) - local.get 0 - i32.load16_u offset=18 - i32.const 82 - i32.ne - br_if 43 (;@4;) - local.get 0 - i32.load16_u offset=20 - i32.const 101 - i32.ne - br_if 43 (;@4;) - local.get 0 - i32.load16_u offset=22 - i32.const 113 - i32.ne - br_if 43 (;@4;) - local.get 0 - i32.load16_u offset=24 - i32.const 117 - i32.ne - br_if 43 (;@4;) - local.get 0 - i32.load16_u offset=26 - i32.const 105 - i32.ne - br_if 43 (;@4;) - local.get 0 - i32.load16_u offset=28 - i32.const 114 - i32.ne - br_if 43 (;@4;) - local.get 0 - i32.load16_u offset=30 - i32.const 101 - i32.ne - br_if 43 (;@4;) - local.get 0 - i32.load16_u offset=32 - i32.const 87 - i32.ne - br_if 43 (;@4;) - local.get 0 - i32.load16_u offset=34 - i32.const 105 - i32.ne - br_if 43 (;@4;) - local.get 0 - i32.load16_u offset=36 - i32.const 108 - i32.ne - br_if 43 (;@4;) - local.get 0 - i32.load16_u offset=38 - i32.const 100 - i32.ne - br_if 43 (;@4;) - local.get 0 - i32.load16_u offset=40 - i32.const 99 - i32.ne - br_if 43 (;@4;) - local.get 0 - i32.load16_u offset=42 - i32.const 97 - i32.ne - br_if 43 (;@4;) - local.get 0 - i32.load16_u offset=44 - i32.const 114 - i32.ne - br_if 43 (;@4;) - local.get 0 - i32.load16_u offset=46 - i32.const 100 - i32.ne - br_if 43 (;@4;) - block ;; label = @48 - i32.const 4024 - i32.load - local.get 5 - i32.eq - br_if 0 (;@48;) - local.get 0 - i32.load16_u - local.tee 2 - call 7 - br_if 0 (;@48;) - local.get 2 - i32.const 46 - i32.ne - br_if 44 (;@4;) - end - i32.const 16448 - local.get 0 - i32.const 48 - i32.add - i32.store - local.get 0 - i32.load16_u offset=48 - i32.const 40 - i32.ne - br_if 43 (;@4;) - i32.const 16448 - local.get 0 - i32.const 50 - i32.add - i32.store - i32.const 4113 - i32.load8_u - if ;; label = @48 - i32.const 16464 - i32.const 0 - i32.store8 - end - i32.const 8240 - local.get 1 + i32.const 4224 + i32.const 12 i32.store - i32.const 4116 - i32.const 1 - i32.store16 - i32.const 0 - call 6 - i32.eqz - br_if 43 (;@4;) - i32.const 4024 + i32.const 4228 + i32.const 4196 i32.load - local.get 5 - i32.eq - br_if 42 (;@5;) - local.get 0 - i32.load16_u - call 7 - br_if 42 (;@5;) - br 43 (;@4;) - end - local.get 0 - i32.load16_u offset=6 - i32.const 101 - i32.ne - br_if 42 (;@4;) - local.get 0 - i32.load16_u offset=8 - i32.const 120 - i32.ne - br_if 42 (;@4;) - local.get 0 - i32.load16_u offset=10 - i32.const 112 - i32.ne - br_if 42 (;@4;) - local.get 0 - i32.load16_u offset=12 - i32.const 111 - i32.ne - br_if 42 (;@4;) - local.get 0 - i32.load16_u offset=14 - i32.const 114 - i32.ne - br_if 42 (;@4;) - local.get 0 - i32.load16_u offset=16 - i32.const 116 - i32.ne - br_if 42 (;@4;) - block ;; label = @47 - i32.const 4024 + i32.const 4188 i32.load - local.get 5 - i32.eq - br_if 0 (;@47;) - local.get 0 - i32.load16_u - local.tee 2 - call 7 - br_if 0 (;@47;) - local.get 2 - i32.const 46 - i32.ne - br_if 43 (;@4;) - end - i32.const 16448 - local.get 0 - i32.const 18 - i32.add - i32.store - i32.const 9 - local.set 4 - local.get 0 - i32.load16_u offset=18 - local.tee 5 - i32.const 83 - i32.eq - if ;; label = @47 - local.get 0 - i32.load16_u offset=20 - i32.const 116 - i32.ne - br_if 43 (;@4;) - local.get 0 - i32.load16_u offset=22 - i32.const 97 - i32.ne - br_if 43 (;@4;) - local.get 0 - i32.load16_u offset=24 - i32.const 114 - i32.ne - br_if 43 (;@4;) - i32.const 16448 - local.get 0 - i32.const 26 - i32.add + i32.sub + i32.const 1 + i32.shr_s i32.store - local.get 0 - i32.load16_u offset=26 - local.set 5 - i32.const 13 - local.set 4 end - local.get 5 - i32.const 65535 - i32.and - i32.const 40 - i32.ne - br_if 42 (;@4;) - i32.const 4113 - i32.load8_u - if ;; label = @47 - i32.const 16464 - i32.const 0 - i32.store8 - end - i32.const 4116 - i32.const 1 - i32.store16 - i32.const 8240 - local.get 1 - i32.store - local.get 0 - local.get 4 - i32.const 1 - i32.shl - i32.add - local.tee 0 - i32.load16_u offset=2 - i32.const 114 - i32.ne - br_if 42 (;@4;) - i32.const 16448 - local.get 0 + i32.const 4196 + i32.const 4200 + i32.load i32.const 2 i32.add i32.store - i32.const 2 - call 6 - drop br 42 (;@4;) end - block ;; label = @46 - local.get 6 - i32.const 34 - i32.sub - br_table 17 (;@29;) 42 (;@4;) 42 (;@4;) 42 (;@4;) 42 (;@4;) 17 (;@29;) 5 (;@41;) 12 (;@34;) 42 (;@4;) 42 (;@4;) 10 (;@36;) 42 (;@4;) 42 (;@4;) 18 (;@28;) 0 (;@46;) - end - block ;; label = @46 - local.get 6 - i32.const 91 - i32.sub - br_table 20 (;@26;) 42 (;@4;) 9 (;@37;) 42 (;@4;) 42 (;@4;) 22 (;@24;) 42 (;@4;) 42 (;@4;) 3 (;@43;) 42 (;@4;) 2 (;@44;) 0 (;@46;) - end - block ;; label = @46 - local.get 6 - i32.const 123 + i32.const 4224 + i32.load + i32.eqz + if ;; label = @46 + i32.const 4224 + i32.const 5 + i32.store + i32.const 4228 + i32.const 4196 + i32.load + i32.const 4188 + i32.load i32.sub - br_table 13 (;@33;) 42 (;@4;) 16 (;@30;) 0 (;@46;) + i32.const 1 + i32.shr_s + i32.store end - local.get 6 - i32.const 60 - i32.eq - br_if 42 (;@3;) - local.get 6 - i32.const 79 - i32.eq - br_if 3 (;@42;) - local.get 6 - i32.const 109 - i32.ne - br_if 41 (;@4;) + i32.const 4196 + i32.const 4200 + i32.load + i32.const 2 + i32.add + i32.store + br 41 (;@4;) end - local.get 0 - i32.load16_u offset=4 - i32.const 111 + i32.const 4224 + i32.load + i32.eqz + if ;; label = @45 + i32.const 4224 + i32.const 6 + i32.store + i32.const 4228 + i32.const 4196 + i32.load + i32.const 4188 + i32.load + i32.sub + i32.const 1 + i32.shr_s + i32.store + end + i32.const 4196 + i32.const 4200 + i32.load + i32.const 2 + i32.add + i32.store + br 40 (;@4;) + end + local.get 2 + i32.load16_u offset=4 + local.tee 3 + i32.const 95 + i32.ne + if ;; label = @44 + local.get 3 + i32.const 105 i32.ne br_if 40 (;@4;) - local.get 0 + local.get 2 i32.load16_u offset=6 - i32.const 100 + i32.const 110 i32.ne br_if 40 (;@4;) - local.get 0 + local.get 2 i32.load16_u offset=8 - i32.const 117 + i32.const 116 i32.ne br_if 40 (;@4;) - local.get 0 + local.get 2 i32.load16_u offset=10 - i32.const 108 + i32.const 101 i32.ne br_if 40 (;@4;) - local.get 0 + local.get 2 i32.load16_u offset=12 - i32.const 101 + i32.const 114 i32.ne br_if 40 (;@4;) - local.get 5 - i32.const 4024 - i32.load + local.get 2 + i32.load16_u offset=14 + i32.const 111 i32.ne - if ;; label = @45 - local.get 0 - i32.load16_u - call 7 - i32.eqz - br_if 41 (;@4;) - end - i32.const 16448 - local.get 0 - i32.const 14 - i32.add - i32.store - call 8 - i32.const 46 + br_if 40 (;@4;) + local.get 2 + i32.load16_u offset=16 + i32.const 112 i32.ne - br_if 19 (;@25;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 + br_if 40 (;@4;) + local.get 2 + i32.load16_u offset=18 + i32.const 82 + i32.ne + br_if 40 (;@4;) + local.get 2 + i32.load16_u offset=20 i32.const 101 i32.ne - br_if 19 (;@25;) - i32.const 16448 - i32.load - local.tee 1 - i32.load16_u offset=2 - i32.const 120 + br_if 40 (;@4;) + local.get 2 + i32.load16_u offset=22 + i32.const 113 i32.ne - br_if 19 (;@25;) - local.get 1 - i32.load16_u offset=4 - i32.const 112 + br_if 40 (;@4;) + local.get 2 + i32.load16_u offset=24 + i32.const 117 i32.ne - br_if 19 (;@25;) - local.get 1 - i32.load16_u offset=6 - i32.const 111 + br_if 40 (;@4;) + local.get 2 + i32.load16_u offset=26 + i32.const 105 i32.ne - br_if 19 (;@25;) - local.get 1 - i32.load16_u offset=8 + br_if 40 (;@4;) + local.get 2 + i32.load16_u offset=28 i32.const 114 i32.ne - br_if 19 (;@25;) - local.get 1 - i32.load16_u offset=10 - i32.const 116 + br_if 40 (;@4;) + local.get 2 + i32.load16_u offset=30 + i32.const 101 i32.ne - br_if 19 (;@25;) - local.get 1 - i32.load16_u offset=12 - i32.const 115 + br_if 40 (;@4;) + local.get 2 + i32.load16_u offset=32 + i32.const 87 i32.ne - br_if 19 (;@25;) - i32.const 1 - call 9 - br 40 (;@4;) - end - local.get 0 - i32.load16_u offset=4 - i32.const 120 - i32.ne - br_if 39 (;@4;) - local.get 0 - i32.load16_u offset=6 - i32.const 112 - i32.ne - br_if 39 (;@4;) - local.get 0 - i32.load16_u offset=8 - i32.const 111 - i32.ne - br_if 39 (;@4;) - local.get 0 - i32.load16_u offset=10 - i32.const 114 - i32.ne - br_if 39 (;@4;) - local.get 0 - i32.load16_u offset=12 - i32.const 116 - i32.ne - br_if 39 (;@4;) - local.get 5 - i32.const 4024 - i32.load - local.tee 1 - i32.ne - if ;; label = @44 - local.get 0 - i32.load16_u - call 7 - i32.eqz br_if 40 (;@4;) - end - local.get 0 - i32.load16_u offset=14 - i32.const 115 - i32.eq - if ;; label = @44 + local.get 2 + i32.load16_u offset=34 + i32.const 105 + i32.ne + br_if 40 (;@4;) + local.get 2 + i32.load16_u offset=36 + i32.const 108 + i32.ne + br_if 40 (;@4;) + local.get 2 + i32.load16_u offset=38 + i32.const 100 + i32.ne + br_if 40 (;@4;) + local.get 2 + i32.load16_u offset=40 + i32.const 99 + i32.ne + br_if 40 (;@4;) + local.get 2 + i32.load16_u offset=42 + i32.const 97 + i32.ne + br_if 40 (;@4;) + local.get 2 + i32.load16_u offset=44 + i32.const 114 + i32.ne + br_if 40 (;@4;) + local.get 2 + i32.load16_u offset=46 + i32.const 100 + i32.ne + br_if 40 (;@4;) + block ;; label = @45 + i32.const 4188 + i32.load + local.get 0 + i32.eq + br_if 0 (;@45;) + local.get 2 + i32.load16_u + local.tee 3 + call 3 + br_if 0 (;@45;) + local.get 3 + i32.const 46 + i32.ne + br_if 41 (;@4;) + end + i32.const 4196 + local.get 2 + i32.const 48 + i32.add + i32.store + local.get 2 + i32.load16_u offset=48 + i32.const 40 + i32.ne + br_if 40 (;@4;) + i32.const 4214 + i32.const 1 + i32.store16 + i32.const 4196 + local.get 2 + i32.const 50 + i32.add + i32.store + i32.const 8328 + i32.const 4204 + i32.load + i32.store + i32.const 16520 i32.const 0 - call 9 + i32.store8 + i32.const 0 + call 2 + i32.eqz + br_if 40 (;@4;) + i32.const 4188 + i32.load + local.get 0 + i32.eq + br_if 39 (;@5;) + local.get 2 + i32.load16_u + call 3 + br_if 39 (;@5;) br 40 (;@4;) end - local.get 4 + local.get 2 + i32.load16_u offset=6 + i32.const 101 + i32.ne + br_if 39 (;@4;) + local.get 2 + i32.load16_u offset=8 + i32.const 120 + i32.ne + br_if 39 (;@4;) + local.get 2 + i32.load16_u offset=10 + i32.const 112 + i32.ne + br_if 39 (;@4;) + local.get 2 + i32.load16_u offset=12 + i32.const 111 + i32.ne + br_if 39 (;@4;) + local.get 2 + i32.load16_u offset=14 + i32.const 114 + i32.ne + br_if 39 (;@4;) + local.get 2 + i32.load16_u offset=16 + i32.const 116 + i32.ne br_if 39 (;@4;) - i32.const 16448 - local.get 0 - i32.const 14 - i32.add - local.tee 2 - i32.store - call 8 - local.set 0 block ;; label = @44 - local.get 2 - i32.const 16448 + i32.const 4188 i32.load - local.tee 4 - i32.ne - br_if 0 (;@44;) local.get 0 - i32.const 65528 - i32.and - i32.const 40 i32.eq - local.get 0 - i32.const 58 - i32.sub - i32.const 6 - i32.lt_u - i32.or - local.get 0 - i32.const 33 - i32.sub - local.tee 2 - i32.const 5 - i32.le_u - i32.const 0 - i32.const 1 - local.get 2 - i32.shl - i32.const 49 - i32.and - select - i32.or br_if 0 (;@44;) - local.get 0 - i32.const 91 - i32.sub - local.tee 2 - i32.const 3 - i32.le_u local.get 2 - i32.const 1 - i32.ne - i32.and + i32.load16_u + local.tee 0 + call 3 br_if 0 (;@44;) local.get 0 - i32.const 123 - i32.sub - i32.const 65535 - i32.and - i32.const 3 - i32.gt_u + i32.const 46 + i32.ne br_if 40 (;@4;) end - i32.const 4108 - i32.load - i32.eqz - if ;; label = @44 - i32.const 4108 - i32.const 7 + i32.const 4196 + local.get 2 + i32.const 18 + i32.add + i32.store + i32.const 9 + local.set 1 + local.get 2 + i32.load16_u offset=18 + local.tee 0 + i32.const 83 + i32.eq + if (result i32) ;; label = @44 + local.get 2 + i32.load16_u offset=20 + i32.const 116 + i32.ne + br_if 40 (;@4;) + local.get 2 + i32.load16_u offset=22 + i32.const 97 + i32.ne + br_if 40 (;@4;) + local.get 2 + i32.load16_u offset=24 + i32.const 114 + i32.ne + br_if 40 (;@4;) + i32.const 4196 + local.get 2 + i32.const 26 + i32.add i32.store + i32.const 13 + local.set 1 + local.get 2 + i32.load16_u offset=26 + else + local.get 0 end - i32.const 16448 - local.get 3 - i32.const 2 - i32.add + i32.const 65535 + i32.and + i32.const 40 + i32.ne + br_if 39 (;@4;) + i32.const 4214 + i32.const 1 + i32.store16 + i32.const 8328 + i32.const 4204 + i32.load i32.store - i32.const 4104 - local.get 4 + i32.const 16520 + i32.const 0 + i32.store8 + local.get 2 local.get 1 - i32.sub i32.const 1 - i32.shr_s + i32.shl + i32.add + local.tee 0 + i32.load16_u offset=2 + i32.const 114 + i32.ne + br_if 39 (;@4;) + i32.const 4196 + local.get 0 + i32.const 2 + i32.add i32.store + i32.const 2 + call 2 + drop br 39 (;@4;) end - local.get 5 - i32.const 4024 - i32.load - i32.ne - if ;; label = @43 - local.get 0 - i32.load16_u - call 7 - i32.eqz - br_if 39 (;@4;) + block ;; label = @43 + local.get 4 + i32.const 34 + i32.sub + br_table 19 (;@24;) 39 (;@4;) 39 (;@4;) 39 (;@4;) 39 (;@4;) 19 (;@24;) 6 (;@37;) 14 (;@29;) 39 (;@4;) 39 (;@4;) 12 (;@31;) 39 (;@4;) 39 (;@4;) 20 (;@23;) 0 (;@43;) end - local.get 0 - i32.load16_u offset=4 - i32.const 108 - i32.ne - br_if 38 (;@4;) - local.get 0 - i32.load16_u offset=6 - i32.const 97 - i32.ne - br_if 38 (;@4;) - local.get 0 - i32.load16_u offset=8 - i32.const 115 - i32.ne - br_if 38 (;@4;) - local.get 0 - i32.load16_u offset=10 - i32.const 115 + block ;; label = @43 + local.get 4 + i32.const 91 + i32.sub + br_table 7 (;@36;) 39 (;@4;) 10 (;@33;) 39 (;@4;) 39 (;@4;) 24 (;@19;) 39 (;@4;) 39 (;@4;) 3 (;@40;) 39 (;@4;) 2 (;@41;) 0 (;@43;) + end + block ;; label = @43 + local.get 4 + i32.const 123 + i32.sub + br_table 15 (;@28;) 39 (;@4;) 18 (;@25;) 0 (;@43;) + end + local.get 4 + i32.const 60 + i32.eq + br_if 39 (;@3;) + local.get 4 + i32.const 79 + i32.eq + br_if 4 (;@38;) + local.get 4 + i32.const 109 i32.ne br_if 38 (;@4;) - local.get 0 - i32.load16_u offset=12 - local.tee 0 - i32.const 9 - i32.sub - local.tee 1 - i32.const 23 - i32.gt_u - i32.const 1 - local.get 1 - i32.shl - i32.const 8388639 - i32.and - i32.eqz - i32.or - br_if 35 (;@7;) - br 36 (;@6;) end - local.get 0 + local.get 2 i32.load16_u offset=4 - i32.const 98 + i32.const 111 i32.ne br_if 37 (;@4;) - local.get 0 + local.get 2 i32.load16_u offset=6 - i32.const 106 + i32.const 100 i32.ne br_if 37 (;@4;) - local.get 0 + local.get 2 i32.load16_u offset=8 - i32.const 101 + i32.const 117 i32.ne br_if 37 (;@4;) - local.get 0 + local.get 2 i32.load16_u offset=10 - i32.const 99 + i32.const 108 i32.ne br_if 37 (;@4;) - local.get 0 + local.get 2 i32.load16_u offset=12 - i32.const 116 + i32.const 101 i32.ne br_if 37 (;@4;) - local.get 5 - i32.const 4024 + local.get 0 + i32.const 4188 i32.load - local.tee 8 i32.ne if ;; label = @42 - local.get 0 + local.get 2 i32.load16_u - call 7 + call 3 i32.eqz br_if 38 (;@4;) end - i32.const 16448 - local.get 0 + i32.const 4196 + local.get 2 i32.const 14 i32.add i32.store - local.get 0 - i32.const 12 - i32.add - local.set 2 - call 8 + call 4 i32.const 46 i32.ne - br_if 33 (;@8;) - i32.const 16448 - i32.const 16448 + br_if 2 (;@39;) + i32.const 4196 + i32.const 4196 i32.load i32.const 2 i32.add i32.store - call 8 - local.set 0 - i32.const 4113 - i32.load8_u - i32.eqz - local.get 0 - i32.const 100 + call 4 + i32.const 101 i32.ne - i32.or - i32.eqz - if ;; label = @42 - i32.const 16448 - i32.load - local.tee 1 - local.get 3 - i32.gt_u - br_if 34 (;@8;) - local.get 3 - local.get 1 - i32.sub - i32.const 1 - i32.shr_s - i32.const 1 - i32.add - local.tee 4 + br_if 2 (;@39;) + i32.const 4196 + i32.load + local.tee 0 + i32.load16_u offset=2 + i32.const 120 + i32.ne + br_if 2 (;@39;) + local.get 0 + i32.load16_u offset=4 + i32.const 112 + i32.ne + br_if 2 (;@39;) + local.get 0 + i32.load16_u offset=6 + i32.const 111 + i32.ne + br_if 2 (;@39;) + local.get 0 + i32.load16_u offset=8 + i32.const 114 + i32.ne + br_if 2 (;@39;) + local.get 0 + i32.load16_u offset=10 + i32.const 116 + i32.ne + br_if 2 (;@39;) + local.get 0 + i32.load16_u offset=12 + i32.const 115 + i32.ne + br_if 2 (;@39;) + i32.const 1 + call 5 + br 37 (;@4;) + end + local.get 2 + i32.load16_u offset=4 + i32.const 120 + i32.ne + br_if 36 (;@4;) + local.get 2 + i32.load16_u offset=6 + i32.const 112 + i32.ne + br_if 36 (;@4;) + local.get 2 + i32.load16_u offset=8 + i32.const 111 + i32.ne + br_if 36 (;@4;) + local.get 2 + i32.load16_u offset=10 + i32.const 114 + i32.ne + br_if 36 (;@4;) + local.get 2 + i32.load16_u offset=12 + i32.const 116 + i32.ne + br_if 36 (;@4;) + local.get 0 + i32.const 4188 + i32.load + i32.ne + if ;; label = @41 + local.get 2 + i32.load16_u + call 3 + i32.eqz + br_if 37 (;@4;) + end + local.get 2 + i32.load16_u offset=14 + i32.const 115 + i32.eq + if ;; label = @41 + i32.const 0 + call 5 + br 37 (;@4;) + end + local.get 1 + br_if 36 (;@4;) + i32.const 4196 + local.get 2 + i32.const 14 + i32.add + local.tee 3 + i32.store + call 4 + local.set 0 + block ;; label = @41 + local.get 3 + i32.const 4196 + i32.load + local.tee 1 + i32.ne + br_if 0 (;@41;) + local.get 0 + i32.const 65528 + i32.and + i32.const 40 + i32.eq + local.get 0 + i32.const 58 + i32.sub + i32.const 6 + i32.lt_u + i32.or + local.get 0 + i32.const 33 + i32.sub + local.tee 3 + i32.const 5 + i32.le_u + i32.const 0 + i32.const 1 + local.get 3 + i32.shl + i32.const 49 + i32.and + select + i32.or + br_if 0 (;@41;) + local.get 0 + i32.const 91 + i32.sub + local.tee 3 + i32.const 3 + i32.le_u + local.get 3 + i32.const 1 + i32.ne + i32.and + br_if 0 (;@41;) + local.get 0 + i32.const 123 + i32.sub + i32.const 65535 + i32.and + i32.const 3 + i32.gt_u + br_if 37 (;@4;) + end + i32.const 4224 + i32.load + i32.eqz + if ;; label = @41 + i32.const 4224 + i32.const 7 + i32.store + i32.const 4228 + local.get 1 + i32.const 4188 + i32.load + i32.sub + i32.const 1 + i32.shr_s + i32.store + end + i32.const 4196 + i32.const 4200 + i32.load + i32.const 2 + i32.add + i32.store + br 36 (;@4;) + end + local.get 0 + i32.const 4188 + i32.load + i32.ne + if ;; label = @40 + local.get 2 + i32.load16_u + call 3 + i32.eqz + br_if 36 (;@4;) + end + local.get 2 + i32.load16_u offset=4 + i32.const 108 + i32.ne + br_if 35 (;@4;) + local.get 2 + i32.load16_u offset=6 + i32.const 97 + i32.ne + br_if 35 (;@4;) + local.get 2 + i32.load16_u offset=8 + i32.const 115 + i32.ne + br_if 35 (;@4;) + local.get 2 + i32.load16_u offset=10 + i32.const 115 + i32.ne + br_if 35 (;@4;) + local.get 2 + i32.load16_u offset=12 + local.tee 0 + i32.const 9 + i32.sub + local.tee 3 + i32.const 23 + i32.gt_u + i32.const 1 + local.get 3 + i32.shl + i32.const 8388639 + i32.and + i32.eqz + i32.or + br_if 32 (;@7;) + br 33 (;@6;) + end + i32.const 4196 + local.get 2 + i32.const 12 + i32.add + i32.store + br 34 (;@4;) + end + local.get 2 + i32.load16_u offset=4 + i32.const 98 + i32.ne + br_if 33 (;@4;) + local.get 2 + i32.load16_u offset=6 + i32.const 106 + i32.ne + br_if 33 (;@4;) + local.get 2 + i32.load16_u offset=8 + i32.const 101 + i32.ne + br_if 33 (;@4;) + local.get 2 + i32.load16_u offset=10 + i32.const 99 + i32.ne + br_if 33 (;@4;) + local.get 2 + i32.load16_u offset=12 + i32.const 116 + i32.ne + br_if 33 (;@4;) + local.get 0 + i32.const 4188 + i32.load + i32.ne + if ;; label = @38 + local.get 2 + i32.load16_u + call 3 + i32.eqz + br_if 34 (;@4;) + end + local.get 2 + i32.const 12 + i32.add + local.set 7 + i32.const 4196 + local.get 2 + i32.const 14 + i32.add + i32.store + call 4 + i32.const 46 + i32.ne + br_if 29 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + local.set 0 + i32.const 4221 + i32.load8_u + i32.eqz + local.get 0 + i32.const 100 + i32.ne + i32.or + i32.eqz + if ;; label = @38 + i32.const 4196 + i32.load + local.tee 3 + i32.const 4200 + i32.load + local.tee 0 + i32.gt_u + br_if 30 (;@8;) + local.get 0 + local.get 3 + i32.sub + i32.const 1 + i32.shr_s + i32.const 1 + i32.add + local.tee 2 + i32.const 14 + i32.lt_u + br_if 30 (;@8;) + i32.const -1 + local.set 0 + local.get 3 + local.set 1 + loop ;; label = @39 + block ;; label = @40 + local.get 0 + i32.const 13 + i32.eq + if ;; label = @41 + i32.const 14 + local.set 4 + br 1 (;@40;) + end + local.get 0 + i32.const 4105 + i32.add + local.set 5 + local.get 1 + i32.load16_u + local.get 1 + i32.const 2 + i32.add + local.set 1 + local.get 0 + i32.const 1 + i32.add + local.tee 4 + local.set 0 + local.get 5 + i32.load8_s + i32.eq + br_if 1 (;@39;) + end + end + block ;; label = @39 + local.get 2 + i32.const 16 + i32.ge_u + if ;; label = @40 + i32.const -1 + local.set 0 + local.get 3 + local.set 1 + loop ;; label = @41 + local.get 0 + i32.const 15 + i32.eq + if ;; label = @42 i32.const 14 - i32.lt_u - br_if 34 (;@8;) - i32.const -1 - local.set 5 - local.get 1 + i32.const 16 + local.get 4 + i32.const 13 + i32.gt_u + select local.set 0 - loop ;; label = @43 - block ;; label = @44 - local.get 5 - i32.const 13 - i32.eq - if ;; label = @45 - i32.const 14 - local.set 6 - br 1 (;@44;) - end - local.get 5 - i32.const 1027 - i32.add - local.set 7 - local.get 0 - i32.load16_u - local.get 0 - i32.const 2 - i32.add - local.set 0 - local.get 5 - i32.const 1 - i32.add - local.tee 6 - local.set 5 - local.get 7 - i32.load8_s - i32.eq - br_if 1 (;@43;) - end - end - block ;; label = @43 - local.get 4 - i32.const 16 - i32.ge_u - if ;; label = @44 - i32.const -1 - local.set 5 - local.get 1 - local.set 0 - loop ;; label = @45 - local.get 5 - i32.const 15 - i32.eq - if ;; label = @46 - i32.const 14 - i32.const 16 - local.get 6 - i32.const 13 - i32.gt_u - select - local.set 5 - i32.const 1 - local.set 0 - br 3 (;@43;) - end - local.get 5 - i32.const 1042 - i32.add - local.set 4 - local.get 0 - i32.load16_u - local.get 0 - i32.const 2 - i32.add - local.set 0 - local.get 5 - i32.const 1 - i32.add - local.tee 9 - local.set 5 - local.get 4 - i32.load8_s - i32.eq - br_if 0 (;@45;) - end - i32.const 14 - i32.const 16 - local.get 6 - i32.const 13 - i32.gt_u - local.tee 4 - select - local.set 5 - local.get 4 - local.get 9 - i32.const 15 - i32.gt_u - local.tee 0 - i32.or - br_if 1 (;@43;) - br 36 (;@8;) - end - i32.const 14 - local.set 5 - i32.const 0 - local.set 0 - local.get 6 - i32.const 14 - i32.lt_u - br_if 35 (;@8;) - end - i32.const 16448 - local.get 1 - local.get 5 i32.const 1 - i32.shl - i32.add - i32.store - call 8 - i32.const 40 - i32.ne - br_if 34 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - call 10 - i32.eqz - br_if 34 (;@8;) - call 8 - i32.const 44 - i32.ne - br_if 34 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 local.set 1 - local.get 0 - if ;; label = @43 - local.get 1 - i32.const 40 - i32.eq - if (result i32) ;; label = @44 - call 11 - else - local.get 1 - end - i32.const 123 - i32.ne - br_if 35 (;@8;) - i32.const 16444 - i32.const 16448 - i32.load - i32.store - br 35 (;@8;) - end - local.get 1 - i32.const 39 - i32.ne - local.get 1 - i32.const 34 - i32.ne - i32.and - br_if 34 (;@8;) - i32.const 16448 - i32.load - local.tee 6 - local.set 5 - block ;; label = @43 - loop ;; label = @44 - block ;; label = @45 - local.get 5 - local.tee 0 - i32.const 2 - i32.add - local.set 5 - local.get 0 - local.get 3 - i32.ge_u - br_if 0 (;@45;) - local.get 1 - local.get 5 - i32.load16_u - local.tee 4 - i32.eq - if ;; label = @46 - local.get 0 - local.set 3 - br 3 (;@43;) - end - local.get 4 - i32.const 92 - i32.ne - if ;; label = @46 - local.get 4 - i32.const 10 - i32.sub - br_table 1 (;@45;) 2 (;@44;) 2 (;@44;) 1 (;@45;) 2 (;@44;) - end - local.get 0 - i32.const 4 - i32.add - local.set 5 - local.get 0 - i32.load16_u offset=4 - i32.const 13 - i32.ne - br_if 1 (;@44;) - local.get 0 - i32.const 6 - i32.add - local.get 5 - local.get 0 - i32.load16_u offset=6 - i32.const 10 - i32.eq - select - local.set 5 - br 1 (;@44;) - end - end - i32.const 4108 - i32.load - i32.eqz - if ;; label = @44 - i32.const 4108 - i32.const 9 - i32.store - end - i32.const 4104 - local.get 5 - local.get 8 - i32.sub - i32.const 1 - i32.shr_s - i32.store - end - i32.const 16448 - local.get 3 - i32.const 4 - i32.add - local.tee 0 - i32.store - call 8 - i32.const 44 - i32.ne - br_if 34 (;@8;) - local.get 6 - local.get 0 - i32.const 4028 - i32.load - call_indirect (type 0) - br 34 (;@8;) + br 3 (;@39;) end local.get 0 - i32.const 100 + i32.const 4120 + i32.add + local.set 2 + local.get 1 + i32.load16_u + local.get 1 + i32.const 2 + i32.add + local.set 1 + local.get 0 + i32.const 1 + i32.add + local.tee 6 + local.set 0 + local.get 2 + i32.load8_s + i32.eq + br_if 0 (;@41;) + end + i32.const 14 + i32.const 16 + local.get 4 + i32.const 13 + i32.gt_u + local.tee 2 + select + local.set 0 + local.get 2 + local.get 6 + i32.const 15 + i32.gt_u + local.tee 1 + i32.or + br_if 1 (;@39;) + br 32 (;@8;) + end + i32.const 14 + local.set 0 + i32.const 0 + local.set 1 + local.get 4 + i32.const 14 + i32.lt_u + br_if 31 (;@8;) + end + i32.const 4196 + local.get 3 + local.get 0 + i32.const 1 + i32.shl + i32.add + i32.store + call 4 + i32.const 40 + i32.ne + br_if 30 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + call 6 + i32.eqz + br_if 30 (;@8;) + call 4 + i32.const 44 + i32.ne + br_if 30 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + local.set 2 + local.get 1 + if ;; label = @39 + local.get 2 + i32.const 40 + i32.eq + if (result i32) ;; label = @40 + call 7 + else + local.get 2 + end + i32.const 123 + i32.ne + br_if 31 (;@8;) + i32.const 4208 + i32.const 4196 + i32.load + i32.store + br 31 (;@8;) + end + local.get 2 + i32.const 39 + i32.ne + local.get 2 + i32.const 34 + i32.ne + i32.and + br_if 30 (;@8;) + i32.const 4200 + i32.load + local.set 4 + i32.const 4196 + i32.load + local.tee 5 + local.set 0 + block ;; label = @39 + loop ;; label = @40 + block ;; label = @41 + local.get 0 + local.tee 3 + i32.const 2 + i32.add + local.set 0 + local.get 3 + local.get 4 + i32.ge_u + br_if 0 (;@41;) + local.get 2 + local.get 0 + i32.load16_u + local.tee 1 i32.eq if ;; label = @42 - i32.const 16448 - i32.load - local.tee 0 - i32.load16_u offset=2 - i32.const 101 - i32.ne - br_if 34 (;@8;) - local.get 0 - i32.load16_u offset=4 - i32.const 102 - i32.ne - br_if 34 (;@8;) - local.get 0 - i32.load16_u offset=6 - i32.const 105 - i32.ne - br_if 34 (;@8;) - local.get 0 - i32.load16_u offset=8 - i32.const 110 - i32.ne - br_if 34 (;@8;) - local.get 0 - i32.load16_u offset=10 - i32.const 101 - i32.ne - br_if 34 (;@8;) - local.get 0 - i32.load16_u offset=12 - i32.const 80 - i32.ne - br_if 34 (;@8;) - local.get 0 - i32.load16_u offset=14 - i32.const 114 - i32.ne - br_if 34 (;@8;) - local.get 0 - i32.load16_u offset=16 - i32.const 111 - i32.ne - br_if 34 (;@8;) - local.get 0 - i32.load16_u offset=18 - i32.const 112 - i32.ne - br_if 34 (;@8;) - local.get 0 - i32.load16_u offset=20 - i32.const 101 - i32.ne - br_if 34 (;@8;) - local.get 0 - i32.load16_u offset=22 - i32.const 114 - i32.ne - br_if 34 (;@8;) - local.get 0 - i32.load16_u offset=24 - i32.const 116 - i32.ne - br_if 34 (;@8;) - local.get 0 - i32.load16_u offset=26 - i32.const 121 - i32.ne - br_if 34 (;@8;) - local.get 0 - i32.const 26 - i32.add - local.set 2 - i32.const 16448 - local.get 0 - i32.const 28 - i32.add - i32.store - call 8 - i32.const 40 - i32.ne - br_if 34 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - call 10 - i32.eqz - br_if 34 (;@8;) - call 8 - i32.const 44 - i32.ne - br_if 34 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - local.tee 1 - i32.const 39 - i32.ne + local.get 3 + local.set 4 + br 3 (;@39;) + end + local.get 1 + i32.const 92 + i32.ne + if ;; label = @42 local.get 1 - i32.const 34 - i32.ne - i32.and - br_if 34 (;@8;) - i32.const 16448 - i32.load - local.tee 4 - local.set 5 - block ;; label = @43 - loop ;; label = @44 - block ;; label = @45 - local.get 5 - local.tee 0 - i32.const 2 - i32.add - local.set 5 - local.get 0 - local.get 3 - i32.ge_u - br_if 0 (;@45;) - local.get 5 - i32.load16_u - local.tee 6 - local.get 1 - i32.eq - br_if 2 (;@43;) - local.get 6 - i32.const 92 - i32.ne - if ;; label = @46 - local.get 6 - i32.const 10 - i32.sub - br_table 1 (;@45;) 2 (;@44;) 2 (;@44;) 1 (;@45;) 2 (;@44;) - end - local.get 0 - i32.const 4 - i32.add - local.set 5 - local.get 0 - i32.load16_u offset=4 - i32.const 13 - i32.ne - br_if 1 (;@44;) - local.get 0 - i32.const 6 - i32.add - local.get 5 - local.get 0 - i32.load16_u offset=6 - i32.const 10 - i32.eq - select - local.set 5 - br 1 (;@44;) - end - end - i32.const 4108 - i32.load - i32.eqz - if ;; label = @44 - i32.const 4108 - i32.const 9 - i32.store - end - i32.const 4104 - local.get 5 - local.get 8 - i32.sub - i32.const 1 - i32.shr_s - i32.store - local.get 3 - local.set 0 - end - i32.const 16448 - local.get 0 - i32.const 4 - i32.add - local.tee 5 - i32.store - call 8 - i32.const 44 - i32.ne - br_if 33 (;@9;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - i32.const 123 - i32.ne - br_if 33 (;@9;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - local.tee 0 - i32.const 101 - i32.eq - if ;; label = @43 - i32.const 16448 - i32.load - local.tee 0 - i32.load16_u offset=2 - i32.const 110 - i32.ne - br_if 34 (;@9;) - local.get 0 - i32.load16_u offset=4 - i32.const 117 - i32.ne - br_if 34 (;@9;) - local.get 0 - i32.load16_u offset=6 - i32.const 109 - i32.ne - br_if 34 (;@9;) - local.get 0 - i32.load16_u offset=8 - i32.const 101 - i32.ne - br_if 34 (;@9;) - local.get 0 - i32.load16_u offset=10 - i32.const 114 - i32.ne - br_if 34 (;@9;) - local.get 0 - i32.load16_u offset=12 - i32.const 97 - i32.ne - br_if 34 (;@9;) - local.get 0 - i32.load16_u offset=14 - i32.const 98 - i32.ne - br_if 34 (;@9;) - local.get 0 - i32.load16_u offset=16 - i32.const 108 - i32.ne - br_if 34 (;@9;) - local.get 0 - i32.load16_u offset=18 - i32.const 101 - i32.ne - br_if 34 (;@9;) - i32.const 16448 - local.get 0 - i32.const 20 - i32.add - i32.store - call 8 - i32.const 58 - i32.ne - br_if 34 (;@9;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - i32.const 16448 - block (result i32) ;; label = @44 - block ;; label = @45 - call 8 - local.tee 1 - i32.const 116 - i32.ne - br_if 0 (;@45;) - i32.const 16448 - i32.load - local.tee 0 - i32.load16_u offset=2 - i32.const 114 - i32.ne - br_if 0 (;@45;) - local.get 0 - i32.load16_u offset=4 - i32.const 117 - i32.ne - br_if 0 (;@45;) - local.get 0 - i32.load16_u offset=6 - i32.const 101 - i32.ne - br_if 0 (;@45;) - local.get 0 - i32.const 8 - i32.add - br 1 (;@44;) - end - local.get 1 - i32.const 33 - i32.ne - br_if 35 (;@9;) - i32.const 4112 - i32.load8_u - i32.eqz - br_if 35 (;@9;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - i32.const 48 - i32.ne - br_if 35 (;@9;) - i32.const 16448 - i32.load - i32.const 2 - i32.add - end - i32.store - call 8 - i32.const 44 - i32.ne - br_if 34 (;@9;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - local.set 0 - end - local.get 0 - i32.const 103 - i32.ne - if ;; label = @43 - local.get 0 - i32.const 118 - i32.ne - br_if 34 (;@9;) - i32.const 16448 - i32.load - local.tee 0 - i32.load16_u offset=2 - i32.const 97 - i32.ne - br_if 34 (;@9;) - local.get 0 - i32.load16_u offset=4 - i32.const 108 - i32.ne - br_if 34 (;@9;) - local.get 0 - i32.load16_u offset=6 - i32.const 117 - i32.ne - br_if 34 (;@9;) - local.get 0 - i32.load16_u offset=8 - i32.const 101 - i32.ne - br_if 34 (;@9;) - i32.const 16448 - local.get 0 - i32.const 10 - i32.add - i32.store - call 8 - i32.const 58 - i32.ne - br_if 34 (;@9;) - local.get 4 - local.get 5 - i32.const 4028 - i32.load - call_indirect (type 0) - br 35 (;@8;) - end - i32.const 16448 - i32.load - local.tee 0 - i32.load16_u offset=2 - i32.const 101 - i32.ne - br_if 33 (;@9;) - local.get 0 - i32.load16_u offset=4 - i32.const 116 - i32.ne - br_if 33 (;@9;) - i32.const 16448 - local.get 0 - i32.const 6 - i32.add - i32.store - call 8 - local.tee 0 - i32.const 58 - i32.eq - if (result i32) ;; label = @43 - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - i32.const 102 - i32.ne - br_if 34 (;@9;) - i32.const 16448 - i32.load - local.tee 0 - i32.load16_u offset=2 - i32.const 117 - i32.ne - br_if 34 (;@9;) - local.get 0 - i32.load16_u offset=4 - i32.const 110 - i32.ne - br_if 34 (;@9;) - local.get 0 - i32.load16_u offset=6 - i32.const 99 - i32.ne - br_if 34 (;@9;) - local.get 0 - i32.load16_u offset=8 - i32.const 116 - i32.ne - br_if 34 (;@9;) - local.get 0 - i32.load16_u offset=10 - i32.const 105 - i32.ne - br_if 34 (;@9;) - local.get 0 - i32.load16_u offset=12 - i32.const 111 - i32.ne - br_if 34 (;@9;) - local.get 0 - i32.load16_u offset=14 - i32.const 110 - i32.ne - br_if 34 (;@9;) - i32.const 16448 - local.get 0 - i32.const 16 - i32.add - local.tee 0 - i32.store - call 8 - local.tee 1 - i32.const 40 - i32.ne - if ;; label = @44 - local.get 0 - i32.const 16448 - i32.load - i32.eq - br_if 35 (;@9;) - local.get 1 - call 12 - i32.eqz - br_if 35 (;@9;) - end - call 8 - else - local.get 0 - end - i32.const 40 - i32.ne - br_if 33 (;@9;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - i32.const 41 - i32.ne - br_if 33 (;@9;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - i32.const 123 - i32.ne - br_if 33 (;@9;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - i32.const 114 - i32.ne - br_if 33 (;@9;) - i32.const 16448 - i32.load - local.tee 0 - i32.load16_u offset=2 - i32.const 101 - i32.ne - br_if 33 (;@9;) - local.get 0 - i32.load16_u offset=4 - i32.const 116 - i32.ne - br_if 33 (;@9;) - local.get 0 - i32.load16_u offset=6 - i32.const 117 - i32.ne - br_if 33 (;@9;) - local.get 0 - i32.load16_u offset=8 - i32.const 114 - i32.ne - br_if 33 (;@9;) - local.get 0 - i32.load16_u offset=10 - i32.const 110 - i32.ne - br_if 33 (;@9;) - i32.const 16448 - local.get 0 - i32.const 12 - i32.add - i32.store - call 8 - call 12 - i32.eqz - br_if 33 (;@9;) - block ;; label = @43 - block ;; label = @44 - call 8 - local.tee 0 - i32.const 91 - i32.ne - if ;; label = @45 - local.get 0 - i32.const 46 - i32.ne - br_if 2 (;@43;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - call 12 - br_if 1 (;@44;) - br 36 (;@9;) - end - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - local.tee 6 - i32.const 39 - i32.ne - local.get 6 - i32.const 34 - i32.ne - i32.and - br_if 35 (;@9;) - i32.const 16448 - i32.load - local.set 0 - block ;; label = @45 - loop ;; label = @46 - block ;; label = @47 - local.get 0 - local.tee 1 - i32.const 2 - i32.add - local.set 0 - local.get 1 - local.get 3 - i32.ge_u - br_if 0 (;@47;) - local.get 6 - local.get 0 - i32.load16_u - local.tee 7 - i32.eq - if ;; label = @48 - local.get 1 - local.set 3 - br 3 (;@45;) - end - local.get 7 - i32.const 92 - i32.ne - if ;; label = @48 - local.get 7 - i32.const 10 - i32.sub - br_table 1 (;@47;) 2 (;@46;) 2 (;@46;) 1 (;@47;) 2 (;@46;) - end - local.get 1 - i32.const 4 - i32.add - local.set 0 - local.get 1 - i32.load16_u offset=4 - i32.const 13 - i32.ne - br_if 1 (;@46;) - local.get 1 - i32.const 6 - i32.add - local.get 0 - local.get 1 - i32.load16_u offset=6 - i32.const 10 - i32.eq - select - local.set 0 - br 1 (;@46;) - end - end - i32.const 4108 - i32.load - i32.eqz - if ;; label = @46 - i32.const 4108 - i32.const 9 - i32.store - end - i32.const 4104 - local.get 0 - local.get 8 - i32.sub - i32.const 1 - i32.shr_s - i32.store - end - i32.const 16448 - local.get 3 - i32.const 4 - i32.add - i32.store - call 8 - i32.const 93 - i32.ne - br_if 35 (;@9;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - end - call 8 - local.set 0 - end - local.get 0 - i32.const 59 - i32.eq - if (result i32) ;; label = @43 - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - else - local.get 0 - end - i32.const 125 - i32.ne - br_if 33 (;@9;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - local.tee 0 - i32.const 44 - i32.eq - if (result i32) ;; label = @43 - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - else - local.get 0 - end - i32.const 125 - i32.ne - br_if 33 (;@9;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - i32.const 41 - i32.ne - br_if 33 (;@9;) - local.get 4 - local.get 5 - i32.const 4028 - i32.load - call_indirect (type 0) - br 38 (;@4;) - end - local.get 4 - local.get 0 - i32.const 107 - i32.ne - i32.or - br_if 33 (;@8;) - i32.const 16448 - i32.load - local.tee 0 - i32.load16_u offset=2 - i32.const 101 - i32.ne - br_if 33 (;@8;) - local.get 0 - i32.load16_u offset=4 - i32.const 121 - i32.ne - br_if 33 (;@8;) - local.get 0 - i32.load16_u offset=6 - i32.const 115 - i32.ne - br_if 33 (;@8;) - local.get 0 - i32.const 6 - i32.add - local.set 2 - i32.const 16448 - local.get 0 - i32.const 8 - i32.add - i32.store - call 8 - i32.const 40 - i32.ne - br_if 33 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - i32.const 16448 - i32.load - local.set 6 - call 12 - i32.eqz - br_if 33 (;@8;) - i32.const 16448 - i32.load - call 8 - i32.const 41 - i32.ne - br_if 33 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - local.tee 2 - i32.const 2 - i32.add - i32.store - call 8 - i32.const 46 - i32.ne - br_if 33 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - i32.const 102 - i32.ne - br_if 33 (;@8;) - i32.const 16448 - i32.load - local.tee 0 - i32.load16_u offset=2 - i32.const 111 - i32.ne - br_if 33 (;@8;) - local.get 0 - i32.load16_u offset=4 - i32.const 114 - i32.ne - br_if 33 (;@8;) - local.get 0 - i32.load16_u offset=6 - i32.const 69 - i32.ne - br_if 33 (;@8;) - local.get 0 - i32.load16_u offset=8 - i32.const 97 - i32.ne - br_if 33 (;@8;) - local.get 0 - i32.load16_u offset=10 - i32.const 99 - i32.ne - br_if 33 (;@8;) - local.get 0 - i32.load16_u offset=12 - i32.const 104 - i32.ne - br_if 33 (;@8;) - i32.const 16448 - local.get 0 - i32.const 14 - i32.add - i32.store - call 8 - i32.const 16448 - i32.load - local.tee 3 - i32.const 2 - i32.sub - local.set 2 - i32.const 40 - i32.ne - br_if 33 (;@8;) - i32.const 16448 - local.get 3 - i32.const 2 - i32.add - i32.store - call 8 - i32.const 102 - i32.ne - br_if 33 (;@8;) - i32.const 16448 - i32.load - local.tee 0 - i32.load16_u offset=2 - i32.const 117 - i32.ne - br_if 33 (;@8;) - local.get 0 - i32.load16_u offset=4 - i32.const 110 - i32.ne - br_if 33 (;@8;) - local.get 0 - i32.load16_u offset=6 - i32.const 99 - i32.ne - br_if 33 (;@8;) - local.get 0 - i32.load16_u offset=8 - i32.const 116 - i32.ne - br_if 33 (;@8;) - local.get 0 - i32.load16_u offset=10 - i32.const 105 - i32.ne - br_if 33 (;@8;) - local.get 0 - i32.load16_u offset=12 - i32.const 111 - i32.ne - br_if 33 (;@8;) - local.get 0 - i32.load16_u offset=14 - i32.const 110 - i32.ne - br_if 33 (;@8;) - i32.const 16448 - local.get 0 - i32.const 16 - i32.add - i32.store - call 8 - i32.const 40 - i32.ne - br_if 33 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - i32.const 16448 - i32.load - local.set 0 - call 12 - i32.eqz - br_if 33 (;@8;) - i32.const 16448 - i32.load - local.set 3 - call 8 - i32.const 41 - i32.ne - br_if 33 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - i32.const 123 - i32.ne - br_if 33 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - i32.const 105 - i32.ne - br_if 33 (;@8;) - i32.const 16448 - i32.load - local.tee 4 - i32.load16_u offset=2 - i32.const 102 - i32.ne - br_if 33 (;@8;) - i32.const 16448 - local.get 4 - i32.const 4 - i32.add - i32.store - call 8 - i32.const 40 - i32.ne - br_if 33 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - drop - i32.const 16448 - i32.load - local.tee 5 - local.get 0 - local.get 3 - local.get 0 - i32.sub - local.tee 3 - call 0 - br_if 33 (;@8;) - local.get 6 - i32.sub - local.tee 8 - i32.const 1 - i32.shr_s - local.set 7 - i32.const 16448 - local.get 5 - local.get 3 - i32.const 1 - i32.shr_s - local.tee 9 - i32.const 1 - i32.shl - local.tee 4 - i32.add - i32.store - block ;; label = @42 - block ;; label = @43 - block ;; label = @44 - call 8 - local.tee 1 - i32.const 33 - i32.ne - if ;; label = @45 - local.get 1 - i32.const 61 - i32.ne - br_if 37 (;@8;) - i32.const 16448 - i32.load - local.tee 1 - i32.load16_u offset=2 - i32.const 61 - i32.ne - br_if 37 (;@8;) - local.get 1 - i32.load16_u offset=4 - i32.const 61 - i32.ne - br_if 37 (;@8;) - i32.const 16448 - local.get 1 - i32.const 6 - i32.add - i32.store - call 8 - local.tee 5 - i32.const 39 - i32.ne - local.get 5 - i32.const 34 - i32.ne - i32.and - br_if 37 (;@8;) - i32.const 16448 - i32.load - local.tee 1 - i32.load16_u offset=2 - i32.const 100 - i32.ne - br_if 37 (;@8;) - local.get 1 - i32.load16_u offset=4 - i32.const 101 - i32.ne - br_if 37 (;@8;) - local.get 1 - i32.load16_u offset=6 - i32.const 102 - i32.ne - br_if 37 (;@8;) - local.get 1 - i32.load16_u offset=8 - i32.const 97 - i32.ne - br_if 37 (;@8;) - local.get 1 - i32.load16_u offset=10 - i32.const 117 - i32.ne - br_if 37 (;@8;) - local.get 1 - i32.load16_u offset=12 - i32.const 108 - i32.ne - br_if 37 (;@8;) - local.get 1 - i32.load16_u offset=14 - i32.const 116 - i32.ne - br_if 37 (;@8;) - i32.const 16448 - local.get 1 - i32.const 16 - i32.add - i32.store - call 8 - local.get 5 - i32.ne - br_if 37 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - i32.const 124 - i32.ne - br_if 37 (;@8;) - i32.const 16448 - i32.load - local.tee 1 - i32.load16_u offset=2 - i32.const 124 - i32.ne - br_if 37 (;@8;) - i32.const 16448 - local.get 1 - i32.const 4 - i32.add - i32.store - call 8 - drop - i32.const 16448 - i32.load - local.tee 1 - local.get 0 - local.get 3 - call 0 - br_if 37 (;@8;) - i32.const 16448 - local.get 1 - local.get 4 - i32.add - i32.store - call 8 - i32.const 61 - i32.ne - br_if 37 (;@8;) - i32.const 16448 - i32.load - local.tee 1 - i32.load16_u offset=2 - i32.const 61 - i32.ne - br_if 37 (;@8;) - local.get 1 - i32.load16_u offset=4 - i32.const 61 - i32.ne - br_if 37 (;@8;) - i32.const 16448 - local.get 1 - i32.const 6 - i32.add - i32.store - call 8 - local.tee 5 - i32.const 39 - i32.ne - local.get 5 - i32.const 34 - i32.ne - i32.and - br_if 37 (;@8;) - i32.const 16448 - i32.load - local.tee 1 - i32.load16_u offset=2 - i32.const 95 - i32.ne - br_if 37 (;@8;) - local.get 1 - i32.load16_u offset=4 - i32.const 95 - i32.ne - br_if 37 (;@8;) - local.get 1 - i32.load16_u offset=6 - i32.const 101 - i32.ne - br_if 37 (;@8;) - local.get 1 - i32.load16_u offset=8 - i32.const 115 - i32.ne - br_if 37 (;@8;) - local.get 1 - i32.load16_u offset=10 - i32.const 77 - i32.ne - br_if 37 (;@8;) - local.get 1 - i32.load16_u offset=12 - i32.const 111 - i32.ne - br_if 37 (;@8;) - local.get 1 - i32.load16_u offset=14 - i32.const 100 - i32.ne - br_if 37 (;@8;) - local.get 1 - i32.load16_u offset=16 - i32.const 117 - i32.ne - br_if 37 (;@8;) - local.get 1 - i32.load16_u offset=18 - i32.const 108 - i32.ne - br_if 37 (;@8;) - local.get 1 - i32.load16_u offset=20 - i32.const 101 - i32.ne - br_if 37 (;@8;) - i32.const 16448 - local.get 1 - i32.const 22 - i32.add - i32.store - call 8 - local.get 5 - i32.ne - br_if 37 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - i32.const 41 - i32.ne - br_if 37 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - i32.const 114 - i32.ne - br_if 37 (;@8;) - i32.const 16448 - i32.load - local.tee 1 - i32.load16_u offset=2 - i32.const 101 - i32.ne - br_if 37 (;@8;) - local.get 1 - i32.load16_u offset=4 - i32.const 116 - i32.ne - br_if 37 (;@8;) - local.get 1 - i32.load16_u offset=6 - i32.const 117 - i32.ne - br_if 37 (;@8;) - local.get 1 - i32.load16_u offset=8 - i32.const 114 - i32.ne - br_if 37 (;@8;) - local.get 1 - i32.load16_u offset=10 - i32.const 110 - i32.ne - br_if 37 (;@8;) - i32.const 16448 - local.get 1 - i32.const 12 - i32.add - i32.store - call 8 - i32.const 59 - i32.eq - if ;; label = @46 - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - end - call 8 - local.tee 5 - i32.const 105 - i32.ne - br_if 3 (;@42;) - i32.const 105 - local.set 5 - i32.const 16448 - i32.load - local.tee 1 - i32.load16_u offset=2 - i32.const 102 - i32.ne - br_if 3 (;@42;) - i32.const 16448 - local.get 1 - i32.const 4 - i32.add - i32.store - call 8 - i32.const 40 - i32.ne - br_if 37 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - local.tee 5 - i32.store - local.get 0 - local.get 9 - call 13 - if ;; label = @46 - call 8 - i32.const 41 - i32.ne - br_if 38 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - i32.const 114 - i32.ne - br_if 38 (;@8;) - i32.const 16448 - i32.load - local.tee 1 - i32.load16_u offset=2 - i32.const 101 - i32.ne - br_if 38 (;@8;) - local.get 1 - i32.load16_u offset=4 - i32.const 116 - i32.ne - br_if 38 (;@8;) - local.get 1 - i32.load16_u offset=6 - i32.const 117 - i32.ne - br_if 38 (;@8;) - local.get 1 - i32.load16_u offset=8 - i32.const 114 - i32.ne - br_if 38 (;@8;) - local.get 1 - i32.load16_u offset=10 - i32.const 110 - i32.ne - br_if 38 (;@8;) - i32.const 16448 - local.get 1 - i32.const 12 - i32.add - i32.store - call 8 - i32.const 59 - i32.eq - if ;; label = @47 - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - end - call 8 - local.tee 5 - i32.const 105 - i32.ne - br_if 4 (;@42;) - i32.const 105 - local.set 5 - i32.const 16448 - i32.load - local.tee 1 - i32.load16_u offset=2 - i32.const 102 - i32.ne - br_if 4 (;@42;) - i32.const 16448 - local.get 1 - i32.const 4 - i32.add - i32.store - call 8 - i32.const 40 - i32.ne - br_if 38 (;@8;) - i32.const 16448 - i32.load - i32.const 2 - i32.add - local.set 5 - end - i32.const 16448 - local.get 5 - i32.store - local.get 5 - local.get 0 - local.get 3 - call 0 - br_if 37 (;@8;) - i32.const 16448 - local.get 4 - local.get 5 - i32.add - i32.store - call 8 - i32.const 105 - i32.ne - br_if 37 (;@8;) - i32.const 16448 - i32.load - local.tee 1 - i32.load16_u offset=2 - i32.const 110 - i32.ne - br_if 37 (;@8;) - local.get 1 - i32.load16_u offset=4 - i32.const 32 - i32.ne - br_if 37 (;@8;) - i32.const 16448 - local.get 1 - i32.const 6 - i32.add - i32.store - call 8 - call 10 - i32.eqz - br_if 37 (;@8;) - call 8 - i32.const 38 - i32.ne - br_if 37 (;@8;) - i32.const 16448 - i32.load - local.tee 1 - i32.load16_u offset=2 - i32.const 38 - i32.ne - br_if 37 (;@8;) - i32.const 16448 - local.get 1 - i32.const 4 - i32.add - i32.store - call 8 - call 10 - i32.eqz - br_if 37 (;@8;) - call 8 - i32.const 91 - i32.ne - br_if 37 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - drop - i32.const 16448 - i32.load - local.tee 1 - local.get 0 - local.get 3 - call 0 - br_if 37 (;@8;) - i32.const 16448 - local.get 1 - local.get 4 - i32.add - i32.store - call 8 - i32.const 93 - i32.ne - br_if 37 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - i32.const 61 - i32.ne - br_if 37 (;@8;) - i32.const 16448 - i32.load - local.tee 1 - i32.load16_u offset=2 - i32.const 61 - i32.ne - br_if 37 (;@8;) - local.get 1 - i32.load16_u offset=4 - i32.const 61 - i32.ne - br_if 37 (;@8;) - i32.const 16448 - local.get 1 - i32.const 6 - i32.add - i32.store - call 8 - drop - i32.const 16448 - i32.load - local.tee 1 - local.get 6 - local.get 8 - call 0 - br_if 37 (;@8;) - i32.const 16448 - local.get 1 - local.get 7 - i32.const 1 - i32.shl - i32.add - i32.store - call 8 - i32.const 91 - i32.ne - br_if 37 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - drop - i32.const 16448 - i32.load - local.tee 1 - local.get 0 - local.get 3 - call 0 - br_if 37 (;@8;) - i32.const 16448 - local.get 1 - local.get 4 - i32.add - i32.store - call 8 - i32.const 93 - i32.ne - br_if 37 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - i32.const 41 - i32.ne - br_if 37 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - i32.const 114 - i32.ne - br_if 37 (;@8;) - i32.const 16448 - i32.load - local.tee 1 - i32.load16_u offset=2 - i32.const 101 - i32.ne - br_if 37 (;@8;) - local.get 1 - i32.load16_u offset=4 - i32.const 116 - i32.ne - br_if 37 (;@8;) - local.get 1 - i32.load16_u offset=6 - i32.const 117 - i32.ne - br_if 37 (;@8;) - local.get 1 - i32.load16_u offset=8 - i32.const 114 - i32.ne - br_if 37 (;@8;) - local.get 1 - i32.load16_u offset=10 - i32.const 110 - i32.ne - br_if 37 (;@8;) - i32.const 16448 - local.get 1 - i32.const 12 - i32.add - i32.store - call 8 - i32.const 59 - i32.eq - br_if 1 (;@44;) - br 2 (;@43;) - end - i32.const 16448 - i32.load - local.tee 1 - i32.load16_u offset=2 - i32.const 61 - i32.ne - br_if 36 (;@8;) - local.get 1 - i32.load16_u offset=4 - i32.const 61 - i32.ne - br_if 36 (;@8;) - i32.const 16448 - local.get 1 - i32.const 6 - i32.add - i32.store - call 8 - local.tee 5 - i32.const 39 - i32.ne - local.get 5 - i32.const 34 - i32.ne - i32.and - br_if 36 (;@8;) - i32.const 16448 - i32.load - local.tee 1 - i32.load16_u offset=2 - i32.const 100 - i32.ne - br_if 36 (;@8;) - local.get 1 - i32.load16_u offset=4 - i32.const 101 - i32.ne - br_if 36 (;@8;) - local.get 1 - i32.load16_u offset=6 - i32.const 102 - i32.ne - br_if 36 (;@8;) - local.get 1 - i32.load16_u offset=8 - i32.const 97 - i32.ne - br_if 36 (;@8;) - local.get 1 - i32.load16_u offset=10 - i32.const 117 - i32.ne - br_if 36 (;@8;) - local.get 1 - i32.load16_u offset=12 - i32.const 108 - i32.ne - br_if 36 (;@8;) - local.get 1 - i32.load16_u offset=14 - i32.const 116 - i32.ne - br_if 36 (;@8;) - i32.const 16448 - local.get 1 - i32.const 16 - i32.add - i32.store - call 8 - local.get 5 - i32.ne - br_if 36 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - local.tee 1 - i32.const 38 - i32.eq - if (result i32) ;; label = @45 - i32.const 16448 - i32.load - local.tee 1 - i32.load16_u offset=2 - i32.const 38 - i32.ne - br_if 37 (;@8;) - i32.const 16448 - local.get 1 - i32.const 4 - i32.add - i32.store - call 8 - i32.const 33 - i32.ne - br_if 37 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - block ;; label = @46 - block ;; label = @47 - call 8 - local.tee 5 - i32.const 79 - i32.ne - br_if 0 (;@47;) - i32.const 16448 - i32.load - local.tee 1 - i32.load16_u offset=2 - i32.const 98 - i32.ne - br_if 0 (;@47;) - local.get 1 - i32.load16_u offset=4 - i32.const 106 - i32.ne - br_if 0 (;@47;) - local.get 1 - i32.load16_u offset=6 - i32.const 101 - i32.ne - br_if 0 (;@47;) - local.get 1 - i32.load16_u offset=8 - i32.const 99 - i32.ne - br_if 0 (;@47;) - local.get 1 - i32.load16_u offset=10 - i32.const 116 - i32.ne - br_if 0 (;@47;) - local.get 1 - i32.load16_u offset=12 - i32.const 46 - i32.ne - br_if 0 (;@47;) - local.get 0 - local.get 9 - call 13 - br_if 1 (;@46;) - br 39 (;@8;) - end - local.get 5 - call 12 - i32.eqz - br_if 0 (;@46;) - call 8 - i32.const 46 - i32.ne - br_if 38 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - i32.const 104 - i32.ne - br_if 38 (;@8;) - i32.const 16448 - i32.load - local.tee 1 - i32.load16_u offset=2 - i32.const 97 - i32.ne - br_if 38 (;@8;) - local.get 1 - i32.load16_u offset=4 - i32.const 115 - i32.ne - br_if 38 (;@8;) - local.get 1 - i32.load16_u offset=6 - i32.const 79 - i32.ne - br_if 38 (;@8;) - local.get 1 - i32.load16_u offset=8 - i32.const 119 - i32.ne - br_if 38 (;@8;) - local.get 1 - i32.load16_u offset=10 - i32.const 110 - i32.ne - br_if 38 (;@8;) - local.get 1 - i32.load16_u offset=12 - i32.const 80 - i32.ne - br_if 38 (;@8;) - local.get 1 - i32.load16_u offset=14 - i32.const 114 - i32.ne - br_if 38 (;@8;) - local.get 1 - i32.load16_u offset=16 - i32.const 111 - i32.ne - br_if 38 (;@8;) - local.get 1 - i32.load16_u offset=18 - i32.const 112 - i32.ne - br_if 38 (;@8;) - local.get 1 - i32.load16_u offset=20 - i32.const 101 - i32.ne - br_if 38 (;@8;) - local.get 1 - i32.load16_u offset=22 - i32.const 114 - i32.ne - br_if 38 (;@8;) - local.get 1 - i32.load16_u offset=24 - i32.const 116 - i32.ne - br_if 38 (;@8;) - local.get 1 - i32.load16_u offset=26 - i32.const 121 - i32.ne - br_if 38 (;@8;) - i32.const 16448 - local.get 1 - i32.const 28 - i32.add - i32.store - call 8 - i32.const 40 - i32.ne - br_if 38 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - drop - i32.const 16448 - i32.load - local.tee 1 - local.get 0 - local.get 3 - call 0 - br_if 38 (;@8;) - i32.const 16448 - local.get 1 - local.get 4 - i32.add - i32.store - call 8 - i32.const 41 - i32.ne - br_if 38 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - end - call 8 - else - local.get 1 - end - i32.const 41 - i32.ne - br_if 36 (;@8;) - end - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - end - call 8 - local.set 5 - end - block ;; label = @42 - block ;; label = @43 - local.get 5 - call 10 - if ;; label = @44 - call 8 - i32.const 91 - i32.ne - br_if 36 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - drop - i32.const 16448 - i32.load - local.tee 1 - local.get 0 - local.get 3 - call 0 - br_if 36 (;@8;) - i32.const 16448 - local.get 1 - local.get 4 - i32.add - i32.store - call 8 - i32.const 93 - i32.ne - br_if 36 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - i32.const 61 - i32.ne - br_if 36 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - drop - i32.const 16448 - i32.load - local.tee 1 - local.get 6 - local.get 8 - call 0 - br_if 36 (;@8;) - i32.const 16448 - local.get 1 - local.get 7 - i32.const 1 - i32.shl - i32.add - i32.store - call 8 - i32.const 91 - i32.ne - br_if 36 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - drop - i32.const 16448 - i32.load - local.tee 1 - local.get 0 - local.get 3 - call 0 - br_if 36 (;@8;) - i32.const 16448 - local.get 1 - local.get 4 - i32.add - i32.store - call 8 - i32.const 93 - i32.ne - br_if 36 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - local.tee 5 - i32.const 59 - i32.eq - br_if 1 (;@43;) - br 2 (;@42;) - end - local.get 5 - i32.const 79 - i32.ne - br_if 35 (;@8;) - i32.const 16448 - i32.load - local.tee 1 - i32.load16_u offset=2 - i32.const 98 - i32.ne - br_if 35 (;@8;) - local.get 1 - i32.load16_u offset=4 - i32.const 106 - i32.ne - br_if 35 (;@8;) - local.get 1 - i32.load16_u offset=6 - i32.const 101 - i32.ne - br_if 35 (;@8;) - local.get 1 - i32.load16_u offset=8 - i32.const 99 - i32.ne - br_if 35 (;@8;) - local.get 1 - i32.load16_u offset=10 - i32.const 116 - i32.ne - br_if 35 (;@8;) - i32.const 16448 - local.get 1 - i32.const 12 - i32.add - i32.store - call 8 - i32.const 46 - i32.ne - br_if 35 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - i32.const 100 - i32.ne - br_if 35 (;@8;) - i32.const 16448 - i32.load - local.tee 1 - i32.load16_u offset=2 - i32.const 101 - i32.ne - br_if 35 (;@8;) - local.get 1 - i32.load16_u offset=4 - i32.const 102 - i32.ne - br_if 35 (;@8;) - local.get 1 - i32.load16_u offset=6 - i32.const 105 - i32.ne - br_if 35 (;@8;) - local.get 1 - i32.load16_u offset=8 - i32.const 110 - i32.ne - br_if 35 (;@8;) - local.get 1 - i32.load16_u offset=10 - i32.const 101 - i32.ne - br_if 35 (;@8;) - local.get 1 - i32.load16_u offset=12 - i32.const 80 - i32.ne - br_if 35 (;@8;) - local.get 1 - i32.load16_u offset=14 - i32.const 114 - i32.ne - br_if 35 (;@8;) - local.get 1 - i32.load16_u offset=16 - i32.const 111 - i32.ne - br_if 35 (;@8;) - local.get 1 - i32.load16_u offset=18 - i32.const 112 - i32.ne - br_if 35 (;@8;) - local.get 1 - i32.load16_u offset=20 - i32.const 101 - i32.ne - br_if 35 (;@8;) - local.get 1 - i32.load16_u offset=22 - i32.const 114 - i32.ne - br_if 35 (;@8;) - local.get 1 - i32.load16_u offset=24 - i32.const 116 - i32.ne - br_if 35 (;@8;) - local.get 1 - i32.load16_u offset=26 - i32.const 121 - i32.ne - br_if 35 (;@8;) - i32.const 16448 - local.get 1 - i32.const 28 - i32.add - i32.store - call 8 - i32.const 40 - i32.ne - br_if 35 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - call 10 - i32.eqz - br_if 35 (;@8;) - call 8 - i32.const 44 - i32.ne - br_if 35 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - drop - i32.const 16448 - i32.load - local.tee 1 - local.get 0 - local.get 3 - call 0 - br_if 35 (;@8;) - i32.const 16448 - local.get 1 - local.get 4 - i32.add - i32.store - call 8 - i32.const 44 - i32.ne - br_if 35 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - i32.const 123 - i32.ne - br_if 35 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - i32.const 101 - i32.ne - br_if 35 (;@8;) - i32.const 16448 - i32.load - local.tee 1 - i32.load16_u offset=2 - i32.const 110 - i32.ne - br_if 35 (;@8;) - local.get 1 - i32.load16_u offset=4 - i32.const 117 - i32.ne - br_if 35 (;@8;) - local.get 1 - i32.load16_u offset=6 - i32.const 109 - i32.ne - br_if 35 (;@8;) - local.get 1 - i32.load16_u offset=8 - i32.const 101 - i32.ne - br_if 35 (;@8;) - local.get 1 - i32.load16_u offset=10 - i32.const 114 - i32.ne - br_if 35 (;@8;) - local.get 1 - i32.load16_u offset=12 - i32.const 97 - i32.ne - br_if 35 (;@8;) - local.get 1 - i32.load16_u offset=14 - i32.const 98 - i32.ne - br_if 35 (;@8;) - local.get 1 - i32.load16_u offset=16 - i32.const 108 - i32.ne - br_if 35 (;@8;) - local.get 1 - i32.load16_u offset=18 - i32.const 101 - i32.ne - br_if 35 (;@8;) - i32.const 16448 - local.get 1 - i32.const 20 - i32.add - i32.store - call 8 - i32.const 58 - i32.ne - br_if 35 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - i32.const 16448 - block (result i32) ;; label = @44 - block ;; label = @45 - call 8 - local.tee 5 - i32.const 116 - i32.ne - br_if 0 (;@45;) - i32.const 16448 - i32.load - local.tee 1 - i32.load16_u offset=2 - i32.const 114 - i32.ne - br_if 0 (;@45;) - local.get 1 - i32.load16_u offset=4 - i32.const 117 - i32.ne - br_if 0 (;@45;) - local.get 1 - i32.load16_u offset=6 - i32.const 101 - i32.ne - br_if 0 (;@45;) - local.get 1 - i32.const 8 - i32.add - br 1 (;@44;) - end - local.get 5 - i32.const 33 - i32.ne - br_if 36 (;@8;) - i32.const 4112 - i32.load8_u - i32.eqz - br_if 36 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - i32.const 48 - i32.ne - br_if 36 (;@8;) - i32.const 16448 - i32.load - i32.const 2 - i32.add - end - i32.store - call 8 - i32.const 44 - i32.ne - br_if 35 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - i32.const 103 - i32.ne - br_if 35 (;@8;) - i32.const 16448 - i32.load - local.tee 1 - i32.load16_u offset=2 - i32.const 101 - i32.ne - br_if 35 (;@8;) - local.get 1 - i32.load16_u offset=4 - i32.const 116 - i32.ne - br_if 35 (;@8;) - i32.const 16448 - local.get 1 - i32.const 6 - i32.add - i32.store - call 8 - local.tee 1 - i32.const 58 - i32.eq - if (result i32) ;; label = @44 - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - i32.const 102 - i32.ne - br_if 36 (;@8;) - i32.const 16448 - i32.load - local.tee 1 - i32.load16_u offset=2 - i32.const 117 - i32.ne - br_if 36 (;@8;) - local.get 1 - i32.load16_u offset=4 - i32.const 110 - i32.ne - br_if 36 (;@8;) - local.get 1 - i32.load16_u offset=6 - i32.const 99 - i32.ne - br_if 36 (;@8;) - local.get 1 - i32.load16_u offset=8 - i32.const 116 - i32.ne - br_if 36 (;@8;) - local.get 1 - i32.load16_u offset=10 - i32.const 105 - i32.ne - br_if 36 (;@8;) - local.get 1 - i32.load16_u offset=12 - i32.const 111 - i32.ne - br_if 36 (;@8;) - local.get 1 - i32.load16_u offset=14 - i32.const 110 - i32.ne - br_if 36 (;@8;) - i32.const 16448 - local.get 1 - i32.const 16 - i32.add - local.tee 1 - i32.store - call 8 - local.tee 5 - i32.const 40 - i32.ne - if ;; label = @45 - local.get 1 - i32.const 16448 - i32.load - i32.eq - br_if 37 (;@8;) - local.get 5 - call 12 - i32.eqz - br_if 37 (;@8;) - end - call 8 - else - local.get 1 - end - i32.const 40 - i32.ne - br_if 35 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - i32.const 41 - i32.ne - br_if 35 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - i32.const 123 - i32.ne - br_if 35 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - i32.const 114 - i32.ne - br_if 35 (;@8;) - i32.const 16448 - i32.load - local.tee 1 - i32.load16_u offset=2 - i32.const 101 - i32.ne - br_if 35 (;@8;) - local.get 1 - i32.load16_u offset=4 - i32.const 116 - i32.ne - br_if 35 (;@8;) - local.get 1 - i32.load16_u offset=6 - i32.const 117 - i32.ne - br_if 35 (;@8;) - local.get 1 - i32.load16_u offset=8 - i32.const 114 - i32.ne - br_if 35 (;@8;) - local.get 1 - i32.load16_u offset=10 - i32.const 110 - i32.ne - br_if 35 (;@8;) - i32.const 16448 - local.get 1 - i32.const 12 - i32.add - i32.store - call 8 - drop - i32.const 16448 - i32.load - local.tee 1 - local.get 6 - local.get 8 - call 0 - br_if 35 (;@8;) - i32.const 16448 - local.get 1 - local.get 7 - i32.const 1 - i32.shl - i32.add - i32.store - call 8 - i32.const 91 - i32.ne - br_if 35 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - drop - i32.const 16448 - i32.load - local.tee 1 - local.get 0 - local.get 3 - call 0 - br_if 35 (;@8;) - i32.const 16448 - local.get 1 - local.get 4 - i32.add - i32.store - call 8 - i32.const 93 - i32.ne - br_if 35 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - local.tee 0 - i32.const 59 - i32.eq - if (result i32) ;; label = @44 - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - else - local.get 0 - end - i32.const 125 - i32.ne - br_if 35 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - local.tee 0 - i32.const 44 - i32.eq - if (result i32) ;; label = @44 - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - else - local.get 0 - end - i32.const 125 - i32.ne - br_if 35 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - i32.const 41 - i32.ne - br_if 35 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - local.tee 5 - i32.const 59 - i32.ne - br_if 1 (;@42;) - end - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - local.set 5 - end - local.get 5 - i32.const 125 - i32.ne - br_if 33 (;@8;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - i32.const 41 - i32.ne - br_if 33 (;@8;) - i32.const 16432 - local.set 5 - loop ;; label = @42 - local.get 5 - i32.load - local.tee 0 - i32.eqz - br_if 38 (;@4;) - block ;; label = @43 - local.get 7 - local.get 0 - i32.load offset=12 - local.get 0 - i32.load offset=8 - local.tee 1 - i32.sub - i32.const 1 - i32.shr_s - i32.ne - br_if 0 (;@43;) - local.get 6 - local.get 1 - local.get 8 - call 0 - br_if 0 (;@43;) - local.get 0 - i32.load - local.get 0 - i32.load offset=4 - i32.const 4032 - i32.load - call_indirect (type 0) - br 35 (;@8;) - end - local.get 0 - i32.const 16 - i32.add - local.set 5 - br 0 (;@42;) - end - unreachable - end - local.get 4 - local.set 2 - local.get 4 - i32.const 2048 - i32.ne - br_if 0 (;@40;) - i32.const 4108 - i32.load - local.tee 2 - br_if 30 (;@10;) - br 28 (;@12;) - end - i32.const 4113 - i32.load8_u - if ;; label = @40 - local.get 2 - i32.const 16464 - i32.add - i32.const 0 - i32.store8 - end - i32.const 4116 - local.get 4 - i32.const 1 - i32.add - i32.store16 - local.get 2 - i32.const 2 - i32.shl - i32.const 8240 - i32.add - local.get 1 - i32.store - br 36 (;@3;) - end - i32.const 4113 - i32.load8_u - i32.eqz - br_if 35 (;@3;) - br 25 (;@13;) - end - i32.const 4113 - i32.load8_u - i32.eqz - br_if 34 (;@3;) - i32.const 4108 - i32.load - local.tee 2 - br_if 27 (;@10;) - br 22 (;@15;) - end - i32.const 4113 - i32.load8_u - i32.eqz - br_if 33 (;@3;) - i32.const 4116 - local.get 4 - i32.const 1 - i32.sub - i32.store16 - br 33 (;@3;) - end - local.get 4 - i32.eqz - br_if 32 (;@3;) - i32.const 4113 - i32.load8_u - i32.eqz - br_if 32 (;@3;) - local.get 4 - i32.const 16463 - i32.add - i32.load8_u - i32.const 2 - i32.and - i32.eqz - br_if 32 (;@3;) - br 19 (;@16;) - end - i32.const 4108 - i32.load - local.tee 2 - i32.eqz - br_if 19 (;@15;) - br 24 (;@10;) - end - i32.const 4116 - local.get 4 - i32.const 1 - i32.sub - i32.store16 - br 30 (;@3;) - end - local.get 4 - local.set 2 - local.get 4 - i32.const 2048 - i32.ne - br_if 0 (;@32;) - i32.const 4108 - i32.load - local.tee 2 - i32.eqz - br_if 20 (;@12;) - br 22 (;@10;) - end - i32.const 4113 - i32.load8_u - local.tee 0 - if ;; label = @32 - local.get 2 - i32.const 16464 - i32.add - i32.const 0 - i32.store8 - end - i32.const 4116 - local.get 4 - i32.const 1 - i32.add - local.tee 3 - i32.store16 - local.get 2 - i32.const 2 - i32.shl - i32.const 8240 - i32.add - local.get 1 - i32.store - local.get 3 - i32.const 65535 - i32.and - local.tee 1 - i32.const 16463 - i32.add - i32.const 16440 - i32.load8_u - local.tee 2 - i32.store8 - i32.const 16440 - i32.const 0 - i32.store8 - local.get 0 - i32.eqz - br_if 28 (;@3;) - local.get 5 - i32.const 16444 - i32.load - i32.ne - br_if 28 (;@3;) - local.get 1 - i32.const 16463 - i32.add - local.get 2 - i32.const 2 - i32.or - i32.store8 - i32.const 16444 - i32.const 0 - i32.store - br 15 (;@16;) - end - i32.const 4108 - i32.load - local.tee 2 - br_if 20 (;@10;) - i32.const 2 - local.set 2 - br 19 (;@11;) - end - i32.const 4116 - local.get 4 - i32.const 1 - i32.sub - local.tee 1 - i32.store16 - i32.const 4118 - i32.load16_u - local.tee 0 - local.get 4 - i32.eq - if ;; label = @30 - i32.const 4114 - i32.const 4114 - i32.load16_u - i32.const 1 - i32.sub - local.tee 0 - i32.store16 - i32.const 4118 - local.get 0 - i32.const 65535 - i32.and - i32.const 1 - i32.shl - i32.const 4128 - i32.add - i32.load16_u - i32.store16 - br 13 (;@17;) - end - local.get 0 - i32.const 65535 - i32.eq - local.get 1 - i32.const 65535 - i32.and - local.get 0 - i32.ge_u - i32.or - br_if 26 (;@3;) - i32.const 4108 - i32.load - local.tee 2 - br_if 19 (;@10;) - i32.const 3 - local.set 2 - br 18 (;@11;) - end - block ;; label = @29 - loop ;; label = @30 - block ;; label = @31 - local.get 5 - local.tee 0 - i32.const 2 - i32.add - local.set 5 - local.get 0 - local.get 3 - i32.ge_u - br_if 0 (;@31;) - local.get 5 - i32.load16_u - local.tee 1 - local.get 6 - i32.eq - br_if 2 (;@29;) - local.get 1 - i32.const 92 - i32.ne - if ;; label = @32 - local.get 1 - i32.const 10 - i32.sub - br_table 1 (;@31;) 2 (;@30;) 2 (;@30;) 1 (;@31;) 2 (;@30;) - end - local.get 0 - i32.const 4 - i32.add - local.set 5 - local.get 0 - i32.load16_u offset=4 - i32.const 13 - i32.ne - br_if 1 (;@30;) - local.get 0 - i32.const 6 - i32.add - local.get 5 - local.get 0 - i32.load16_u offset=6 - i32.const 10 - i32.eq - select - local.set 5 - br 1 (;@30;) - end - end - i32.const 4108 - i32.load - i32.eqz - if ;; label = @30 - i32.const 4108 - i32.const 9 - i32.store - end - i32.const 4104 - local.get 5 - i32.const 4024 - i32.load - i32.sub - i32.const 1 - i32.shr_s - i32.store - local.get 3 - i32.const 2 - i32.add - local.set 5 - end - i32.const 16448 - local.get 5 - i32.store - br 25 (;@3;) - end - local.get 0 - i32.const 4 - i32.add - local.set 2 - block ;; label = @28 - block ;; label = @29 - block ;; label = @30 - block ;; label = @31 - local.get 0 - i32.load16_u offset=4 - local.tee 0 - i32.const 47 - i32.ne - if ;; label = @32 - local.get 0 - i32.const 42 - i32.eq - br_if 1 (;@31;) - local.get 1 - i32.load16_u - local.tee 7 - i32.const 33 - i32.sub - local.tee 0 - i32.const 5 - i32.le_u - i32.const 0 - i32.const 1 - local.get 0 - i32.shl - i32.const 49 - i32.and - select - br_if 13 (;@19;) - local.get 7 - i32.const 41 - i32.ne - local.get 7 - i32.const 40 - i32.sub - i32.const 65535 - i32.and - i32.const 7 - i32.lt_u - i32.and - br_if 3 (;@29;) - local.get 7 - i32.const 58 - i32.sub - i32.const 6 - i32.lt_u - br_if 13 (;@19;) - local.get 7 - i32.const 91 - i32.sub - br_table 13 (;@19;) 2 (;@30;) 2 (;@30;) 13 (;@19;) 2 (;@30;) - end - loop ;; label = @32 - local.get 2 - local.tee 5 - i32.const 2 - i32.sub - local.get 3 - i32.ge_u - br_if 10 (;@22;) - local.get 5 - i32.const 2 - i32.add - local.set 2 - local.get 5 - i32.load16_u - i32.const 10 - i32.sub - br_table 10 (;@22;) 0 (;@32;) 0 (;@32;) 10 (;@22;) 0 (;@32;) - end - unreachable - end - loop ;; label = @31 - local.get 2 - local.tee 0 - local.get 3 - i32.ge_u - br_if 8 (;@23;) - local.get 0 - i32.const 2 - i32.add - local.tee 2 - i32.load16_u - i32.const 42 - i32.ne - br_if 0 (;@31;) - local.get 0 - i32.const 4 - i32.add - local.tee 5 - i32.load16_u - i32.const 47 - i32.ne - br_if 0 (;@31;) - end - br 8 (;@22;) - end - local.get 7 - i32.const 125 - i32.eq - local.tee 0 - local.get 7 - i32.const 123 - i32.sub - i32.const 65535 - i32.and - i32.const 3 - i32.gt_u - i32.or - br_if 1 (;@28;) - end - block ;; label = @29 - block ;; label = @30 - block ;; label = @31 - local.get 7 - i32.const 43 - i32.sub - br_table 1 (;@30;) 12 (;@19;) 2 (;@29;) 0 (;@31;) 12 (;@19;) - end - i32.const 0 - local.set 2 - local.get 1 - i32.const 2 - i32.sub - i32.load16_u - i32.const 48 - i32.sub - i32.const 65535 - i32.and - i32.const 10 - i32.lt_u - br_if 10 (;@20;) - br 11 (;@19;) - end - i32.const 0 - local.set 2 - local.get 1 - i32.const 2 - i32.sub - i32.load16_u - i32.const 43 - i32.eq - br_if 9 (;@20;) - br 10 (;@19;) - end - i32.const 0 - local.set 2 - local.get 1 - i32.const 2 - i32.sub - i32.load16_u - i32.const 45 - i32.eq - br_if 8 (;@20;) - br 9 (;@19;) - end - i32.const 0 - local.set 2 - 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 - local.get 7 - i32.const 100 - i32.sub - local.tee 11 - br_table 1 (;@37;) 2 (;@36;) 3 (;@35;) 18 (;@20;) 18 (;@20;) 18 (;@20;) 18 (;@20;) 18 (;@20;) 18 (;@20;) 18 (;@20;) 4 (;@34;) 5 (;@33;) 18 (;@20;) 18 (;@20;) 6 (;@32;) 18 (;@20;) 7 (;@31;) 18 (;@20;) 18 (;@20;) 8 (;@30;) 0 (;@38;) - end - local.get 0 - i32.eqz - if ;; label = @38 - local.get 7 - i32.const 47 - i32.eq - br_if 10 (;@28;) - local.get 7 - i32.const 41 - i32.ne - br_if 17 (;@21;) - block ;; label = @39 - local.get 4 - i32.const 2 - i32.shl - i32.const 8240 - i32.add - i32.load - local.tee 0 - i32.const 8 - i32.sub - local.tee 2 - i32.const 4024 - i32.load - local.tee 1 - i32.lt_u - br_if 0 (;@39;) - local.get 2 - i32.load16_u - i32.const 119 - i32.ne - br_if 0 (;@39;) - local.get 0 - i32.const 6 - i32.sub - i32.load16_u - i32.const 104 - i32.ne - br_if 0 (;@39;) - local.get 0 - i32.const 4 - i32.sub - i32.load16_u - i32.const 105 - i32.ne - br_if 0 (;@39;) - local.get 0 - i32.const 2 - i32.sub - i32.load16_u - i32.const 108 - i32.ne - br_if 0 (;@39;) - local.get 0 - i32.load16_u - i32.const 101 - i32.ne - br_if 0 (;@39;) - local.get 1 - local.get 2 - i32.eq - br_if 20 (;@19;) - local.get 0 - i32.const 10 - i32.sub - i32.load16_u - call 7 - br_if 20 (;@19;) - end - block ;; label = @39 - local.get 0 - i32.const 4 - i32.sub - local.tee 4 - local.get 1 - i32.lt_u - br_if 0 (;@39;) - local.get 4 - i32.load16_u - i32.const 102 - i32.ne - br_if 0 (;@39;) - local.get 0 - i32.const 2 - i32.sub - i32.load16_u - i32.const 111 - i32.ne - br_if 0 (;@39;) - local.get 0 - i32.load16_u - i32.const 114 - i32.ne - br_if 0 (;@39;) - local.get 1 - local.get 4 - i32.eq - br_if 20 (;@19;) - local.get 0 - i32.const 6 - i32.sub - i32.load16_u - call 7 - br_if 20 (;@19;) - end - local.get 0 - i32.const 2 - i32.sub - local.tee 2 - local.get 1 - i32.lt_u - br_if 17 (;@21;) - local.get 2 - i32.load16_u - i32.const 105 - i32.ne - br_if 17 (;@21;) - local.get 0 - i32.load16_u - i32.const 102 - i32.ne - br_if 17 (;@21;) - local.get 1 - local.get 2 - i32.eq - br_if 19 (;@19;) - i32.const 0 - local.set 2 - local.get 4 - i32.load16_u - call 7 - i32.eqz - br_if 18 (;@20;) - br 19 (;@19;) - end - local.get 4 - i32.const 2 - i32.shl - i32.const 8240 - i32.add - i32.load - local.tee 0 - call 14 - br_if 18 (;@19;) - local.get 4 - i32.const 16464 - i32.add - i32.load8_u - i32.const 1 - i32.and - br_if 18 (;@19;) - i32.const 4113 - i32.load8_u - i32.eqz - br_if 17 (;@20;) - i32.const 4024 - i32.load - local.tee 9 - i32.const 6 - i32.add - local.set 12 - loop ;; label = @38 - local.get 0 - i32.eqz - local.get 0 - i32.const 1024 - i32.eq - i32.or - br_if 19 (;@19;) - local.get 4 - i32.const 65535 - i32.and - i32.eqz - local.get 0 - i32.load16_u - local.tee 6 - i32.const 123 - i32.ne - i32.or - i32.eqz - if ;; label = @39 - local.get 4 - i32.const 1 - i32.sub - local.tee 4 - i32.const 65535 - i32.and - i32.const 2 - i32.shl - i32.const 8240 - i32.add - i32.load - local.set 0 - br 1 (;@38;) - end - block ;; label = @39 - local.get 6 - i32.const 58 - i32.ne - if ;; label = @40 - local.get 6 - i32.const 125 - i32.eq - br_if 21 (;@19;) - local.get 0 - call 14 - i32.eqz - br_if 1 (;@39;) - br 21 (;@19;) - end - local.get 0 - local.get 9 - i32.eq - br_if 0 (;@39;) - local.get 0 - i32.const 2 - i32.sub - call 15 - local.tee 6 - i32.eqz - br_if 0 (;@39;) - block ;; label = @40 - local.get 6 - i32.load16_u - local.tee 10 - i32.const 34 - i32.eq - local.get 10 - i32.const 39 - i32.eq - i32.or - i32.eqz - if ;; label = @41 - i32.const 0 - local.set 8 - loop ;; label = @42 - local.get 6 - local.get 9 - i32.lt_u - br_if 2 (;@40;) - local.get 6 - i32.load16_u - local.tee 0 - i32.const 64512 - i32.and - i32.const 56320 - i32.ne - local.tee 10 - if (result i32) ;; label = @43 - local.get 0 - else - local.get 0 - i32.const 1023 - i32.and - local.get 6 - i32.const 2 - i32.sub - i32.load16_u - i32.const 1023 - i32.and - i32.const 10 - i32.shl - i32.or - i32.const 65536 - i32.add - end - call 16 - i32.eqz - br_if 2 (;@40;) - local.get 10 - i32.eqz - if ;; label = @43 - local.get 0 - i32.const 1023 - i32.and - local.get 6 - i32.const 2 - i32.sub - i32.load16_u - i32.const 1023 - i32.and - i32.const 10 - i32.shl - i32.or - i32.const 65536 - i32.add - local.set 0 - end - local.get 6 - local.get 9 - i32.sub - local.get 6 - i32.const -2 - i32.const -4 - local.get 0 - i32.const 65536 - i32.lt_u - local.tee 13 - select - i32.add - local.set 6 - local.get 0 - call 17 - local.set 8 - i32.const 1 - i32.shr_s - i32.const 1 - i32.const 2 - local.get 13 - select - i32.ge_u - br_if 0 (;@42;) - end - local.get 8 - i32.eqz - br_if 2 (;@39;) - br 22 (;@19;) - end - loop ;; label = @41 - local.get 6 - local.get 9 - i32.gt_u - if ;; label = @42 - local.get 6 - i32.const 2 - i32.sub - local.tee 6 - i32.load16_u - local.get 10 - i32.ne - br_if 1 (;@41;) - local.get 6 - local.set 0 - loop ;; label = @43 - local.get 9 - local.get 0 - local.tee 8 - i32.lt_u - if ;; label = @44 - local.get 0 - i32.const 2 - i32.sub - local.tee 0 - i32.load16_u - i32.const 92 - i32.eq - br_if 1 (;@43;) - end - end - local.get 6 - local.get 8 - i32.sub - i32.const 2 - i32.and - br_if 1 (;@41;) - end - end - local.get 6 - local.get 9 - i32.eq - br_if 1 (;@39;) - local.get 6 - i32.const 2 - i32.sub - local.set 6 - i32.const 0 - local.set 8 - end - i32.const 0 - local.set 0 - block ;; label = @40 - local.get 6 - call 15 - local.tee 6 - i32.eqz - br_if 0 (;@40;) - block ;; label = @41 - block ;; label = @42 - local.get 6 - i32.load16_u - i32.const 43 - i32.sub - br_table 0 (;@42;) 1 (;@41;) 0 (;@42;) 1 (;@41;) - end - local.get 6 - local.get 9 - i32.eq - br_if 1 (;@40;) - local.get 6 - i32.const 2 - i32.sub - call 15 - local.tee 6 - i32.eqz - br_if 1 (;@40;) - end - block ;; label = @41 - local.get 6 - local.get 9 - i32.sub - i32.const 5 - i32.lt_s - br_if 0 (;@41;) - local.get 6 - i32.const 6 - i32.sub - i32.load16_u - i32.const 99 - i32.ne - br_if 0 (;@41;) - local.get 6 - i32.const 4 - i32.sub - i32.load16_u - i32.const 97 - i32.ne - br_if 0 (;@41;) - local.get 6 - i32.const 2 - i32.sub - i32.load16_u - i32.const 115 - i32.ne - br_if 0 (;@41;) - local.get 6 - i32.load16_u - i32.const 101 - i32.ne - br_if 0 (;@41;) - local.get 6 - local.get 12 - i32.eq - br_if 22 (;@19;) - local.get 6 - i32.const 8 - i32.sub - i32.load16_u - local.tee 0 - i32.const 64512 - i32.and - i32.const 56320 - i32.eq - if (result i32) ;; label = @42 - local.get 0 - i32.const 1023 - i32.and - local.get 6 - i32.const 10 - i32.sub - i32.load16_u - i32.const 1023 - i32.and - i32.const 10 - i32.shl - i32.or - i32.const 65536 - i32.add - else - local.get 0 - end - call 16 - local.get 0 - i32.const 46 - i32.eq - br_if 0 (;@41;) - local.get 6 - local.set 0 - i32.eqz - br_if 22 (;@19;) - br 1 (;@40;) - end - local.get 6 - local.set 0 - end - local.get 8 - i32.const 1 - i32.and - br_if 1 (;@38;) - end - end - local.get 11 - br_table 0 (;@37;) 1 (;@36;) 2 (;@35;) 17 (;@20;) 17 (;@20;) 17 (;@20;) 17 (;@20;) 17 (;@20;) 17 (;@20;) 17 (;@20;) 3 (;@34;) 4 (;@33;) 17 (;@20;) 17 (;@20;) 5 (;@32;) 17 (;@20;) 6 (;@31;) 17 (;@20;) 17 (;@20;) 7 (;@30;) 17 (;@20;) - end - block ;; label = @37 - block ;; label = @38 - local.get 1 - i32.const 2 - i32.sub - i32.load16_u - i32.const 105 - i32.sub - br_table 0 (;@38;) 18 (;@20;) 18 (;@20;) 1 (;@37;) 18 (;@20;) - end - local.get 1 - i32.const 6 - i32.sub - local.tee 0 - i32.const 4024 - i32.load - local.tee 4 - i32.lt_u - br_if 17 (;@20;) - local.get 0 - i32.load16_u - i32.const 118 - i32.ne - br_if 17 (;@20;) - local.get 1 - i32.const 4 - i32.sub - i32.load16_u - i32.const 111 - i32.ne - br_if 17 (;@20;) - i32.const -4 - local.set 2 - local.get 0 - local.get 4 - i32.ne - br_if 8 (;@29;) - br 18 (;@19;) - end - local.get 1 - i32.const 8 - i32.sub - local.tee 0 - i32.const 4024 - i32.load - local.tee 4 - i32.lt_u - br_if 16 (;@20;) - local.get 0 - i32.load16_u - i32.const 121 - i32.ne - br_if 16 (;@20;) - local.get 1 - i32.const 6 - i32.sub - i32.load16_u - i32.const 105 - i32.ne - br_if 16 (;@20;) - local.get 1 - i32.const 4 - i32.sub - i32.load16_u - i32.const 101 - i32.ne - br_if 16 (;@20;) - i32.const -5 - local.set 2 - local.get 0 - local.get 4 - i32.ne - br_if 7 (;@29;) - br 17 (;@19;) - end - block ;; label = @36 - block ;; label = @37 - local.get 1 - i32.const 2 - i32.sub - i32.load16_u - i32.const 115 - i32.sub - br_table 0 (;@37;) 1 (;@36;) 17 (;@20;) - end - local.get 1 - i32.const 4 - i32.sub - i32.load16_u - local.tee 0 - i32.const 97 - i32.ne - if ;; label = @37 - local.get 0 - i32.const 108 - i32.ne - br_if 17 (;@20;) - i32.const 4024 - i32.load - local.tee 4 - local.get 1 - i32.const 6 - i32.sub - local.tee 0 - i32.gt_u - br_if 17 (;@20;) - local.get 0 - i32.load16_u - i32.const 101 - i32.ne - br_if 17 (;@20;) - i32.const -4 - local.set 2 - local.get 0 - local.get 4 - i32.ne - br_if 8 (;@29;) - br 18 (;@19;) - end - i32.const 4024 - i32.load - local.tee 4 - local.get 1 - i32.const 6 - i32.sub - local.tee 0 - i32.gt_u - br_if 16 (;@20;) - local.get 0 - i32.load16_u - i32.const 99 - i32.ne - br_if 16 (;@20;) - i32.const -4 - local.set 2 - local.get 0 - local.get 4 - i32.ne - br_if 7 (;@29;) - br 17 (;@19;) - end - local.get 1 - i32.const 10 - i32.sub - local.tee 0 - i32.const 4024 - i32.load - local.tee 4 - i32.lt_u - br_if 15 (;@20;) - local.get 0 - i32.load16_u - i32.const 100 - i32.ne - br_if 15 (;@20;) - local.get 1 - i32.const 8 - i32.sub - i32.load16_u - i32.const 101 - i32.ne - br_if 15 (;@20;) - local.get 1 - i32.const 6 - i32.sub - i32.load16_u - i32.const 108 - i32.ne - br_if 15 (;@20;) - local.get 1 - i32.const 4 - i32.sub - i32.load16_u - i32.const 101 - i32.ne - br_if 15 (;@20;) - i32.const -6 - local.set 2 - local.get 0 - local.get 4 - i32.ne - br_if 6 (;@29;) - br 16 (;@19;) - end - local.get 1 - i32.const 2 - i32.sub - i32.load16_u - i32.const 111 - i32.ne - br_if 13 (;@21;) - local.get 1 - i32.const 4 - i32.sub - i32.load16_u - i32.const 101 - i32.ne - br_if 13 (;@21;) - local.get 1 - i32.const 6 - i32.sub - i32.load16_u - local.tee 0 - i32.const 112 - i32.ne - if ;; label = @35 - local.get 0 - i32.const 99 - i32.ne - br_if 15 (;@20;) - local.get 1 - i32.const 18 - i32.sub - local.tee 0 - i32.const 4024 - i32.load - local.tee 4 - i32.lt_u - br_if 15 (;@20;) - local.get 0 - i32.load16_u - i32.const 105 - i32.ne - br_if 15 (;@20;) - local.get 1 - i32.const 16 - i32.sub - i32.load16_u - i32.const 110 - i32.ne - br_if 15 (;@20;) - local.get 1 - i32.const 14 - i32.sub - i32.load16_u - i32.const 115 - i32.ne - br_if 15 (;@20;) - local.get 1 - i32.const 12 - i32.sub - i32.load16_u - i32.const 116 - i32.ne - br_if 15 (;@20;) - local.get 1 - i32.const 10 - i32.sub - i32.load16_u - i32.const 97 - i32.ne - br_if 15 (;@20;) - local.get 1 - i32.const 8 - i32.sub - i32.load16_u - i32.const 110 - i32.ne - br_if 15 (;@20;) - i32.const -10 - local.set 2 - local.get 0 - local.get 4 - i32.ne - br_if 6 (;@29;) - br 16 (;@19;) - end - local.get 1 - i32.const 10 - i32.sub - local.tee 0 - i32.const 4024 - i32.load - local.tee 4 - i32.lt_u - br_if 14 (;@20;) - local.get 0 - i32.load16_u - i32.const 116 - i32.ne - br_if 14 (;@20;) - local.get 1 - i32.const 8 - i32.sub - i32.load16_u - i32.const 121 - i32.ne - br_if 14 (;@20;) - i32.const -6 - local.set 2 - local.get 0 - local.get 4 - i32.ne - br_if 5 (;@29;) - br 15 (;@19;) - end - block ;; label = @34 - i32.const 4024 - i32.load - local.tee 0 - local.get 1 - i32.const 2 - i32.sub - local.tee 4 - i32.gt_u - br_if 0 (;@34;) - local.get 4 - i32.load16_u - i32.const 105 - i32.ne - br_if 0 (;@34;) - local.get 0 - local.get 4 - i32.eq - br_if 15 (;@19;) - local.get 1 - i32.const 4 - i32.sub - i32.load16_u - call 7 - br_if 15 (;@19;) - end - local.get 1 - i32.const 10 - i32.sub - local.tee 6 - local.get 0 - i32.lt_u - br_if 12 (;@21;) - local.get 6 - i32.load16_u - i32.const 114 - i32.ne - br_if 12 (;@21;) - local.get 1 - i32.const 8 - i32.sub - i32.load16_u - i32.const 101 - i32.ne - br_if 12 (;@21;) - local.get 1 - i32.const 6 - i32.sub - i32.load16_u - i32.const 116 - i32.ne - br_if 12 (;@21;) - local.get 1 - i32.const 4 - i32.sub - i32.load16_u - i32.const 117 - i32.ne - br_if 12 (;@21;) - local.get 4 - i32.load16_u - i32.const 114 - i32.ne - br_if 13 (;@20;) - i32.const -6 - local.set 2 - local.get 0 - local.get 6 - i32.ne - br_if 4 (;@29;) - br 14 (;@19;) - end - i32.const 4024 - i32.load - local.tee 4 - local.get 1 - i32.const 2 - i32.sub - local.tee 0 - i32.gt_u - br_if 12 (;@20;) - local.get 0 - i32.load16_u - i32.const 100 - i32.ne - br_if 12 (;@20;) - i32.const -2 - local.set 2 - local.get 0 - local.get 4 - i32.ne - br_if 3 (;@29;) - br 13 (;@19;) - end - local.get 1 - i32.const 14 - i32.sub - local.tee 0 - i32.const 4024 - i32.load - local.tee 4 - i32.lt_u - br_if 11 (;@20;) - local.get 0 - i32.load16_u - i32.const 100 - i32.ne - br_if 11 (;@20;) - local.get 1 - i32.const 12 - i32.sub - i32.load16_u - i32.const 101 - i32.ne - br_if 11 (;@20;) - local.get 1 - i32.const 10 - i32.sub - i32.load16_u - i32.const 98 - i32.ne - br_if 11 (;@20;) - local.get 1 - i32.const 8 - i32.sub - i32.load16_u - i32.const 117 - i32.ne - br_if 11 (;@20;) - local.get 1 - i32.const 6 - i32.sub - i32.load16_u - i32.const 103 - i32.ne - br_if 11 (;@20;) - local.get 1 - i32.const 4 - i32.sub - i32.load16_u - i32.const 103 - i32.ne - br_if 11 (;@20;) - local.get 1 - i32.const 2 - i32.sub - i32.load16_u - i32.const 101 - i32.ne - br_if 11 (;@20;) - i32.const -8 - local.set 2 - local.get 0 - local.get 4 - i32.ne - br_if 2 (;@29;) - br 12 (;@19;) - end - local.get 1 - i32.const 8 - i32.sub - local.tee 0 - i32.const 4024 - i32.load - local.tee 4 - i32.lt_u - br_if 10 (;@20;) - local.get 0 - i32.load16_u - i32.const 97 - i32.ne - br_if 10 (;@20;) - local.get 1 - i32.const 6 - i32.sub - i32.load16_u - i32.const 119 - i32.ne - br_if 10 (;@20;) - local.get 1 - i32.const 4 - i32.sub - i32.load16_u - i32.const 97 - i32.ne - br_if 10 (;@20;) - local.get 1 - i32.const 2 - i32.sub - i32.load16_u - i32.const 105 - i32.ne - br_if 10 (;@20;) - i32.const -5 - local.set 2 - local.get 0 - local.get 4 - i32.ne - br_if 1 (;@29;) - br 11 (;@19;) - end - local.get 1 - i32.const 2 - i32.sub - i32.load16_u - local.tee 0 - i32.const 111 - i32.ne - if ;; label = @30 - local.get 0 - i32.const 101 - i32.ne - br_if 10 (;@20;) - i32.const 4024 - i32.load - local.tee 4 - local.get 1 - i32.const 4 - i32.sub - local.tee 0 - i32.gt_u - br_if 10 (;@20;) - local.get 0 - i32.load16_u - i32.const 110 - i32.ne - br_if 10 (;@20;) - i32.const -3 - local.set 2 - local.get 0 - local.get 4 - i32.ne - br_if 1 (;@29;) - br 11 (;@19;) - end - local.get 1 - i32.const 8 - i32.sub - local.tee 0 - i32.const 4024 - i32.load - local.tee 4 - i32.lt_u - br_if 9 (;@20;) - local.get 0 - i32.load16_u - i32.const 116 - i32.ne - br_if 9 (;@20;) - local.get 1 - i32.const 6 - i32.sub - i32.load16_u - i32.const 104 - i32.ne - br_if 9 (;@20;) - local.get 1 - i32.const 4 - i32.sub - i32.load16_u - i32.const 114 - i32.ne - br_if 9 (;@20;) - i32.const -5 - local.set 2 - local.get 0 - local.get 4 - i32.eq - br_if 10 (;@19;) - end - local.get 1 - local.get 2 - i32.const 1 - i32.shl - i32.add - i32.load16_u - call 7 - local.set 2 - br 8 (;@20;) - end - i32.const 4124 - i32.load8_u - i32.eqz - br_if 7 (;@20;) - br 8 (;@19;) - end - i32.const 4108 - i32.load - local.tee 0 - i32.const 0 - i32.const 4118 - i32.load16_u - i32.const 65535 - i32.ne - i32.const 4116 - i32.load16_u - i32.const 0 - i32.ne - i32.or - local.get 0 - i32.const 0 - i32.ne - i32.or - local.tee 1 - select - local.set 4 - i32.const 1 - local.set 2 - local.get 1 - i32.eqz - local.get 0 - i32.or - br_if 25 (;@1;) - br 15 (;@11;) - end - i32.const 4113 - i32.load8_u - br_if 11 (;@14;) - br 22 (;@3;) - end - i32.const 16448 - local.get 0 - i32.const 12 - i32.add - i32.store - br 20 (;@4;) - end - i32.const 4118 - i32.load16_u - i32.const 65534 - i32.ne - br_if 6 (;@17;) - i32.const 4108 - i32.load - local.tee 2 - br_if 13 (;@10;) - i32.const 4 - local.set 2 - br 12 (;@11;) - end - local.get 0 - i32.const 2 - i32.add - local.set 5 - end - i32.const 16448 - local.get 5 - i32.store - br 19 (;@2;) - end - i32.const 0 - local.set 2 - end - local.get 7 - i32.eqz - br_if 0 (;@19;) - i32.const 1 - local.get 2 - i32.eqz - br_if 1 (;@18;) - drop - end - local.get 3 - i32.const 2 - i32.add - local.set 1 - i32.const 4024 - i32.load - local.set 4 - i32.const 4108 - i32.load - local.set 2 - block ;; label = @19 - loop ;; label = @20 - local.get 5 - i32.const 2 - i32.add - local.set 0 - block ;; label = @21 - block ;; label = @22 - local.get 3 - local.get 5 - i32.le_u - br_if 0 (;@22;) - block ;; label = @23 - block ;; label = @24 - block ;; label = @25 - local.get 0 - i32.load16_u - local.tee 6 - i32.const 91 - i32.sub - br_table 1 (;@24;) 2 (;@23;) 0 (;@25;) - end - local.get 0 - local.set 5 - local.get 6 - i32.const 10 - i32.sub - br_table 2 (;@22;) 4 (;@20;) 4 (;@20;) 2 (;@22;) 3 (;@21;) - end - loop ;; label = @24 - block ;; label = @25 - local.get 0 - i32.const 2 - i32.add - local.set 5 - local.get 0 - local.get 3 - i32.ge_u - br_if 0 (;@25;) - block ;; label = @26 - block ;; label = @27 - local.get 5 - i32.load16_u - local.tee 6 - i32.const 92 - i32.sub - br_table 0 (;@27;) 7 (;@20;) 1 (;@26;) - end - local.get 0 - i32.const 4 - i32.add - local.set 0 - br 2 (;@24;) - end - local.get 5 - local.set 0 - local.get 6 - i32.const 10 - i32.sub - br_table 0 (;@25;) 1 (;@24;) 1 (;@24;) 0 (;@25;) 1 (;@24;) - end - end - local.get 2 - i32.eqz - if ;; label = @24 - i32.const 4108 - i32.const 10 - i32.store - i32.const 10 - local.set 2 - end - i32.const 4104 - local.get 5 - local.get 4 - i32.sub - i32.const 1 - i32.shr_s - i32.store - local.get 1 - local.set 5 - br 3 (;@20;) - end - local.get 5 - i32.const 4 - i32.add - local.set 5 - br 2 (;@20;) - end - local.get 2 - i32.eqz - if ;; label = @22 - i32.const 4108 - i32.const 11 - i32.store - end - i32.const 4104 - local.get 0 - local.get 4 - i32.sub - i32.const 1 - i32.shr_s - i32.store - br 2 (;@19;) - end - local.get 6 - i32.const 47 - i32.ne - br_if 0 (;@20;) - end - local.get 0 - local.set 1 - end - i32.const 16448 - local.get 1 - i32.store - i32.const 0 - end - i32.store8 - br 14 (;@3;) - end - i32.const 16448 - i32.load - local.set 0 - i32.const 16452 - i32.load - local.set 2 - block ;; label = @17 - block ;; label = @18 - loop ;; label = @19 - block ;; label = @20 - local.get 0 - local.tee 1 - i32.const 2 - i32.add - local.set 0 - local.get 1 - local.get 2 - i32.ge_u - br_if 0 (;@20;) - block ;; label = @21 - block ;; label = @22 - local.get 0 - i32.load16_u - local.tee 3 - i32.const 92 - i32.sub - br_table 1 (;@21;) 3 (;@19;) 3 (;@19;) 3 (;@19;) 4 (;@18;) 0 (;@22;) - end - local.get 3 - i32.const 36 - i32.ne - br_if 2 (;@19;) - local.get 1 - i32.load16_u offset=4 - i32.const 123 - i32.ne - br_if 2 (;@19;) - i32.const 16448 - local.get 1 - i32.const 4 - i32.add - local.tee 3 - i32.store - block ;; label = @22 - i32.const 4114 - i32.load16_u - local.tee 0 - i32.const 2048 - i32.ne - if ;; label = @23 - i32.const 4116 - i32.load16_u - local.tee 1 - i32.const 2048 - i32.ne - br_if 1 (;@22;) - end - i32.const 4108 - i32.load - i32.eqz - if ;; label = @23 - i32.const 4108 - i32.const 12 - i32.store - end - i32.const 16448 - local.get 2 - i32.const 2 - i32.add - i32.store - i32.const 4104 - local.get 3 - i32.const 4024 - i32.load - i32.sub - i32.const 1 - i32.shr_s - i32.store - br 5 (;@17;) - end - i32.const 4114 - local.get 0 - i32.const 1 - i32.add - i32.store16 - i32.const 8224 - i32.load - local.get 0 - i32.const 1 - i32.shl - i32.add - i32.const 4118 - i32.load16_u - i32.store16 - i32.const 4113 - i32.load8_u - if ;; label = @22 - local.get 1 - i32.const 16464 - i32.add - i32.const 0 - i32.store8 - end - i32.const 4118 - local.get 1 - i32.const 1 - i32.add - local.tee 0 - i32.store16 - i32.const 4116 - local.get 0 - i32.store16 - br 4 (;@17;) - end - local.get 1 - i32.const 4 - i32.add - local.set 0 - br 1 (;@19;) - end - end - i32.const 4108 - i32.load - i32.eqz - if ;; label = @19 - i32.const 4108 - i32.const 8 - i32.store - end - i32.const 16448 - local.get 2 - i32.const 2 - i32.add - i32.store - i32.const 4104 - local.get 0 - i32.const 4024 - i32.load - i32.sub - i32.const 1 - i32.shr_s - i32.store - br 1 (;@17;) - end - i32.const 16448 - local.get 0 - i32.store - end - br 13 (;@3;) - end - i32.const 0 - local.set 5 - i32.const 16448 - i32.const 16448 - i32.load - local.tee 8 - i32.const 2 - i32.add - i32.store - block ;; label = @16 - block ;; label = @17 - block ;; label = @18 - block ;; label = @19 - block ;; label = @20 - block ;; label = @21 - block ;; label = @22 - call 8 - local.tee 0 - i32.const 42 - i32.sub - br_table 1 (;@21;) 2 (;@20;) 2 (;@20;) 2 (;@20;) 0 (;@22;) 2 (;@20;) - end - i32.const 46 - local.set 1 - i32.const 16452 - i32.load - i32.const 16448 - i32.load - local.tee 2 - i32.sub - i32.const 3 - i32.lt_s - br_if 2 (;@19;) - local.get 2 - i32.load16_u offset=2 - i32.const 46 - i32.ne - br_if 2 (;@19;) - local.get 2 - i32.load16_u offset=4 - i32.const 46 - i32.ne - br_if 2 (;@19;) - i32.const 16448 - local.get 2 - i32.const 6 - i32.add - i32.store - call 8 - i32.const 114 - i32.ne - br_if 5 (;@16;) - i32.const 1 - call 6 - drop - br 5 (;@16;) - end - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - local.set 0 - end - local.get 0 - local.set 1 - local.get 0 - i32.const 91 - i32.eq - if ;; label = @20 - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - local.set 1 - end - i32.const 16448 - i32.load - local.set 2 - local.get 1 - i32.const 39 - i32.ne - local.get 1 - i32.const 34 - i32.ne - i32.and - i32.eqz - if ;; label = @20 - local.get 0 - i32.const 91 - i32.eq - local.set 5 - i32.const 16452 - i32.load - local.set 3 - local.get 2 - local.set 0 - block ;; label = @21 - loop ;; label = @22 - block ;; label = @23 - local.get 0 - local.tee 4 - i32.const 2 - i32.add - local.set 0 - local.get 3 - local.get 4 - i32.le_u - br_if 0 (;@23;) - local.get 1 - local.get 0 - i32.load16_u - local.tee 6 - i32.eq - if ;; label = @24 - local.get 4 - local.set 3 - br 3 (;@21;) - end - local.get 6 - i32.const 92 - i32.ne - if ;; label = @24 - local.get 6 - i32.const 10 - i32.sub - br_table 1 (;@23;) 2 (;@22;) 2 (;@22;) 1 (;@23;) 2 (;@22;) - end - local.get 4 - i32.const 4 - i32.add - local.set 0 - local.get 4 - i32.load16_u offset=4 - i32.const 13 - i32.ne - br_if 1 (;@22;) - local.get 4 - i32.const 6 - i32.add - local.get 0 - local.get 4 - i32.load16_u offset=6 - i32.const 10 - i32.eq - select - local.set 0 - br 1 (;@22;) - end - end - i32.const 4108 - i32.load - i32.eqz - if ;; label = @22 - i32.const 4108 - i32.const 9 - i32.store - end - i32.const 4104 - local.get 0 - i32.const 4024 - i32.load - i32.sub - i32.const 1 - i32.shr_s - i32.store - end - i32.const 16448 - local.get 3 - i32.const 4 - i32.add - local.tee 1 - i32.store - br 3 (;@17;) - end - local.get 0 - i32.const 91 - i32.eq - br_if 1 (;@18;) - end - local.get 1 - call 12 - i32.eqz - if ;; label = @19 - i32.const 0 - local.set 1 - br 2 (;@17;) - end - i32.const 16448 - i32.load - local.set 1 - call 8 - local.set 0 - block ;; label = @19 - block ;; label = @20 - block ;; label = @21 - block ;; label = @22 - block ;; label = @23 - block ;; label = @24 - local.get 1 - local.get 2 - i32.sub - i32.const 6 - i32.sub - br_table 0 (;@24;) 7 (;@17;) 7 (;@17;) 7 (;@17;) 1 (;@23;) 7 (;@17;) - end - block ;; label = @24 - local.get 2 - i32.load16_u - local.tee 3 - i32.const 115 - i32.ne - if ;; label = @25 - local.get 3 - i32.const 103 - i32.ne - br_if 8 (;@17;) - local.get 2 - i32.load16_u offset=2 - i32.const 101 - i32.ne - br_if 8 (;@17;) - local.get 2 - i32.load16_u offset=4 - i32.const 116 - i32.eq - br_if 1 (;@24;) - br 8 (;@17;) - end - local.get 2 - i32.load16_u offset=2 - i32.const 101 - i32.ne - br_if 7 (;@17;) - local.get 2 - i32.load16_u offset=4 - i32.const 116 - i32.ne - br_if 7 (;@17;) - end - local.get 0 - i32.const 40 - i32.sub - br_table 6 (;@17;) 4 (;@19;) 3 (;@20;) 4 (;@19;) 6 (;@17;) 1 (;@22;) - end - local.get 2 - i32.load16_u - i32.const 97 - i32.ne - br_if 5 (;@17;) - local.get 2 - i32.load16_u offset=2 - i32.const 115 - i32.ne - br_if 5 (;@17;) - local.get 2 - i32.load16_u offset=4 - i32.const 121 - i32.ne - br_if 5 (;@17;) - local.get 2 - i32.load16_u offset=6 - i32.const 110 - i32.ne - br_if 5 (;@17;) - local.get 0 - i32.const 58 - i32.eq - local.get 2 - i32.load16_u offset=8 - i32.const 99 - i32.ne - i32.or - br_if 5 (;@17;) - local.get 0 - i32.const 40 - i32.sub - br_table 5 (;@17;) 3 (;@19;) 2 (;@20;) 3 (;@19;) 5 (;@17;) 1 (;@21;) - end - local.get 0 - i32.const 58 - i32.eq - br_if 4 (;@17;) - local.get 0 - i32.const 125 - i32.ne - br_if 2 (;@19;) - br 4 (;@17;) - end - local.get 0 - i32.const 125 - i32.ne - br_if 1 (;@19;) - br 3 (;@17;) - end - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - local.set 0 - end - local.get 0 - local.set 1 - local.get 0 - i32.const 91 - i32.eq - if ;; label = @19 - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - local.set 1 - end - i32.const 16448 - i32.load - local.set 2 - local.get 1 - i32.const 39 - i32.ne - local.get 1 - i32.const 34 - i32.ne - i32.and - i32.eqz - if ;; label = @19 - local.get 0 - i32.const 91 - i32.eq - local.set 5 - i32.const 16452 - i32.load - local.set 3 - local.get 2 - local.set 0 - block ;; label = @20 - loop ;; label = @21 - block ;; label = @22 - local.get 0 - local.tee 4 - i32.const 2 - i32.add - local.set 0 - local.get 3 - local.get 4 - i32.le_u - br_if 0 (;@22;) - local.get 1 - local.get 0 - i32.load16_u - local.tee 6 - i32.eq - if ;; label = @23 - local.get 4 - local.set 3 - br 3 (;@20;) - end - local.get 6 - i32.const 92 - i32.ne - if ;; label = @23 - local.get 6 - i32.const 10 - i32.sub - br_table 1 (;@22;) 2 (;@21;) 2 (;@21;) 1 (;@22;) 2 (;@21;) - end - local.get 4 - i32.const 4 - i32.add - local.set 0 - local.get 4 - i32.load16_u offset=4 - i32.const 13 - i32.ne - br_if 1 (;@21;) - local.get 4 - i32.const 6 - i32.add - local.get 0 - local.get 4 - i32.load16_u offset=6 - i32.const 10 - i32.eq - select - local.set 0 - br 1 (;@21;) - end - end - i32.const 4108 - i32.load - i32.eqz - if ;; label = @21 - i32.const 4108 - i32.const 9 - i32.store - end - i32.const 4104 - local.get 0 - i32.const 4024 - i32.load - i32.sub - i32.const 1 - i32.shr_s - i32.store - end - i32.const 16448 - local.get 3 - i32.const 4 - i32.add - local.tee 1 - i32.store - br 2 (;@17;) - end - local.get 0 - i32.const 91 - i32.eq - br_if 0 (;@18;) - local.get 1 - call 12 - local.set 0 - i32.const 16448 - i32.load - i32.const 0 - local.get 0 - select - local.set 1 - br 1 (;@17;) - end - i32.const 0 - local.set 1 - i32.const 1 - local.set 5 - end - call 8 - local.set 0 - local.get 5 - if ;; label = @17 - local.get 0 - i32.const 93 - i32.ne - br_if 1 (;@16;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - local.set 0 - end - local.get 1 - i32.eqz - br_if 0 (;@16;) - block ;; label = @17 - local.get 0 - i32.const 40 - i32.eq - local.get 0 - i32.const 58 - i32.eq - i32.or - br_if 0 (;@17;) - local.get 5 - br_if 1 (;@16;) - local.get 0 - i32.const 125 - i32.eq - br_if 0 (;@17;) - local.get 0 - i32.const 44 - i32.ne - br_if 1 (;@16;) - end - local.get 2 - local.get 1 - i32.const 4028 - i32.load - call_indirect (type 0) - end - i32.const 16448 - local.get 8 - i32.store - br 12 (;@3;) - end - i32.const 8 - local.set 2 - br 3 (;@11;) - end - local.get 4 - i32.const 2048 - i32.ne - br_if 0 (;@13;) - i32.const 4108 - i32.load - local.tee 2 - i32.eqz - br_if 1 (;@12;) - br 3 (;@10;) - end - i32.const 4116 - local.get 4 - i32.const 1 - i32.add - i32.store16 - local.get 4 - i32.const 16464 - i32.add - i32.const 0 - i32.store8 - local.get 4 - i32.const 2 - i32.shl - i32.const 8240 - i32.add - local.get 1 - i32.store - br 9 (;@3;) - end - i32.const 12 - local.set 2 - end - i32.const 4108 - local.get 2 - i32.store - end - i32.const 16448 - local.get 3 - i32.const 2 - i32.add - i32.store - i32.const 4104 - local.get 5 - i32.const 4024 - i32.load - i32.sub - i32.const 1 - i32.shr_s - i32.store - local.get 2 - local.set 4 - br 8 (;@1;) - end - local.get 4 - local.get 5 - i32.const 4036 - i32.load - call_indirect (type 0) - end - i32.const 16448 - local.get 2 - i32.store - br 3 (;@4;) - end - local.get 0 - i32.const 160 - i32.ne - br_if 2 (;@4;) - end - i32.const 16440 - i32.const 1 - i32.store8 - br 1 (;@4;) - end - i32.const 4024 - i32.load - local.set 3 - loop ;; label = @5 - block ;; label = @6 - local.get 0 - i32.const 2 - i32.sub - local.set 1 - local.get 0 - i32.load16_u - local.tee 2 - i32.const 32 - i32.ne - br_if 0 (;@6;) - local.get 0 - local.get 3 - i32.gt_u - local.get 1 - local.set 0 - br_if 1 (;@5;) - end - end - block ;; label = @5 - local.get 2 - i32.const 61 - i32.ne - br_if 0 (;@5;) - loop ;; label = @6 - local.get 1 - local.tee 0 - i32.load16_u - local.tee 2 - i32.const 32 - i32.eq - if ;; label = @7 - local.get 0 - i32.const 2 - i32.sub - local.set 1 - local.get 0 - local.get 3 - i32.gt_u - br_if 1 (;@6;) - end - end - local.get 0 - i32.const 2 - i32.add - local.set 5 - i32.const 0 - local.set 4 - loop ;; label = @6 - block ;; label = @7 - local.get 2 - local.tee 1 - i32.const 64512 - i32.and - i32.const 56320 - i32.eq - if ;; label = @8 - local.get 1 - i32.const 1023 - i32.and - local.get 0 - i32.const 2 - i32.sub - i32.load16_u - i32.const 1023 - i32.and - i32.const 10 - i32.shl - i32.or - i32.const 65536 - i32.add - local.set 1 - end - local.get 1 - i32.eqz - local.get 0 - local.get 3 - i32.le_u - i32.or - br_if 0 (;@7;) - local.get 1 - i32.const 92 - i32.eq - br_if 2 (;@5;) - local.get 1 - call 16 - i32.eqz - br_if 0 (;@7;) - local.get 1 - call 17 - local.set 4 - local.get 0 - i32.const -2 - i32.const -4 - local.get 1 - i32.const 65536 - i32.lt_u - select - i32.add - local.tee 0 - i32.load16_u - local.set 2 - br 1 (;@6;) - end - end - local.get 4 - i32.const -1 - i32.xor - local.get 2 - i32.const 32 - i32.ne - i32.or - i32.const 1 - i32.and - br_if 0 (;@5;) - i32.const 18524 - local.get 5 - i32.store - i32.const 18520 - local.get 0 - i32.const 2 - i32.add - i32.store - loop ;; label = @6 - block ;; label = @7 - local.get 0 - local.tee 1 - i32.const 2 - i32.sub - local.set 0 - local.get 1 - i32.load16_u - local.tee 2 - i32.const 32 - i32.ne - br_if 0 (;@7;) - local.get 1 - local.get 3 - i32.gt_u - br_if 1 (;@6;) - end - end - block ;; label = @6 - block ;; label = @7 - block ;; label = @8 - local.get 2 - i32.const 114 - i32.sub - br_table 0 (;@8;) 3 (;@5;) 1 (;@7;) 3 (;@5;) - end - local.get 1 - i32.const 4 - i32.sub - local.tee 2 - local.get 3 - i32.lt_u - br_if 2 (;@5;) - local.get 2 - i32.load16_u - i32.const 118 - i32.ne - br_if 2 (;@5;) - local.get 0 - i32.load16_u - i32.const 97 - i32.ne - br_if 2 (;@5;) - local.get 2 - local.get 3 - i32.eq - br_if 1 (;@6;) - local.get 1 - i32.const 6 - i32.sub - i32.load16_u - call 7 - br_if 1 (;@6;) - br 2 (;@5;) - end - block ;; label = @7 - local.get 1 - i32.const 4 - i32.sub - local.tee 2 - local.get 3 - i32.lt_u - br_if 0 (;@7;) - local.get 2 - i32.load16_u - i32.const 108 - i32.ne - br_if 0 (;@7;) - local.get 0 - i32.load16_u - i32.const 101 - i32.ne - br_if 0 (;@7;) - local.get 2 - local.get 3 - i32.eq - br_if 1 (;@6;) - local.get 1 - i32.const 6 - i32.sub - i32.load16_u - call 7 - br_if 1 (;@6;) - end - local.get 1 - i32.const 8 - i32.sub - local.tee 4 - local.get 3 - i32.lt_u - br_if 1 (;@5;) - local.get 4 - i32.load16_u - i32.const 99 - i32.ne - br_if 1 (;@5;) - local.get 1 - i32.const 6 - i32.sub - i32.load16_u - i32.const 111 - i32.ne - br_if 1 (;@5;) - local.get 2 - i32.load16_u - i32.const 110 - i32.ne - br_if 1 (;@5;) - local.get 0 - i32.load16_u - i32.const 115 - i32.ne - br_if 1 (;@5;) - local.get 3 - local.get 4 - i32.eq - br_if 0 (;@6;) - local.get 1 - i32.const 10 - i32.sub - i32.load16_u - call 7 - i32.eqz - br_if 1 (;@5;) - end - i32.const 4088 - i32.const 4088 - i64.load - local.tee 14 - i64.const 20 - i64.add - local.tee 15 - i32.const 4096 - i64.load - i64.gt_u - if (result i64) ;; label = @6 - local.get 15 - call 2 - i32.const 4088 - i64.load - local.tee 14 - i64.const 20 - i64.add - else - local.get 15 - end - i64.store - local.get 14 - i32.wrap_i64 - local.tee 0 - i32.const 18512 - i64.load align=4 - i64.store align=4 - local.get 0 - i32.const 0 - i32.store offset=16 - local.get 0 - i32.const 8 - i32.add - i32.const 18520 - i64.load align=4 - i64.store align=4 - i32.const 16436 - i32.load - local.set 1 - i32.const 16436 - local.get 0 - i32.store - local.get 1 - i32.const 16 - i32.add - i32.const 16432 - local.get 1 - select - local.get 0 - i32.store - end - end - block ;; label = @4 - i32.const 16448 - i32.load - local.tee 1 - i32.load16_u - local.tee 0 - i32.const 48 - i32.sub - i32.const 65535 - i32.and - i32.const 10 - i32.lt_u - local.get 0 - i32.const 32 - i32.or - i32.const 97 - i32.sub - i32.const 65535 - i32.and - i32.const 26 - i32.lt_u - i32.or - br_if 0 (;@4;) - block ;; label = @5 - block ;; label = @6 - local.get 0 - i32.const 92 - i32.sub - br_table 2 (;@4;) 1 (;@5;) 1 (;@5;) 2 (;@4;) 0 (;@6;) - end - local.get 0 - i32.const 36 - i32.eq - br_if 1 (;@4;) - end - local.get 0 - i32.const 160 - i32.eq - local.get 0 - i32.const 128 - i32.lt_u - i32.or - br_if 1 (;@3;) - end - local.get 1 - i32.const 2 - i32.add - local.set 5 - loop ;; label = @4 - local.get 5 - i32.load16_u - local.tee 0 - i32.const 32 - i32.or - i32.const 97 - i32.sub - local.set 1 - block ;; label = @5 - local.get 0 - i32.const 48 - i32.sub - i32.const 65535 - i32.and - i32.const 10 - i32.lt_u - local.get 1 - i32.const 65535 - i32.and - i32.const 26 - i32.lt_u - i32.or - br_if 0 (;@5;) - block ;; label = @6 - block ;; label = @7 - local.get 0 - i32.const 92 - i32.sub - br_table 2 (;@5;) 1 (;@6;) 1 (;@6;) 2 (;@5;) 0 (;@7;) - end - local.get 0 - i32.const 36 - i32.eq - br_if 1 (;@5;) - end - local.get 0 - i32.const 160 - i32.eq - local.get 0 - i32.const 128 - i32.lt_u - i32.or - br_if 2 (;@3;) - end - i32.const 16448 - local.get 5 - i32.store - local.get 5 - i32.const 2 - i32.add - local.set 5 - br 0 (;@4;) - end - unreachable - end - i32.const 4120 - i32.const 16448 - i32.load - local.tee 1 - i32.store - i32.const 16452 - i32.load - local.set 3 - local.get 1 - local.set 5 - br 0 (;@2;) - end - unreachable - end - local.get 4) - (func (;6;) (type 2) (param i32) (result i32) - (local i32 i32 i32 i32 i32 i32 i32) - block ;; label = @1 - block ;; label = @2 - i32.const 16448 - i32.load - local.tee 2 - i32.load16_u offset=2 - i32.const 101 - i32.ne - br_if 0 (;@2;) - local.get 2 - i32.load16_u offset=4 - i32.const 113 - i32.ne - br_if 0 (;@2;) - local.get 2 - i32.load16_u offset=6 - i32.const 117 - i32.ne - br_if 0 (;@2;) - local.get 2 - i32.load16_u offset=8 - i32.const 105 - i32.ne - br_if 0 (;@2;) - local.get 2 - i32.load16_u offset=10 - i32.const 114 - i32.ne - br_if 0 (;@2;) - local.get 2 - i32.load16_u offset=12 - i32.const 101 - i32.ne - br_if 0 (;@2;) - i32.const 16448 - local.get 2 - i32.const 14 - i32.add - i32.store - block ;; label = @3 - call 8 - i32.const 40 - i32.ne - br_if 0 (;@3;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - local.set 5 - i32.const 16448 - i32.load - local.set 4 - local.get 5 - i32.const 39 - i32.ne - local.get 5 - i32.const 34 - i32.ne - i32.and - br_if 0 (;@3;) - i32.const 16452 - i32.load - local.set 6 - local.get 4 - local.set 1 - block ;; label = @4 - loop ;; label = @5 - block ;; label = @6 - local.get 1 - local.tee 3 - i32.const 2 - i32.add - local.set 1 - local.get 3 - local.get 6 - i32.ge_u - br_if 0 (;@6;) - local.get 5 - local.get 1 - i32.load16_u - local.tee 7 - i32.eq - if ;; label = @7 - local.get 3 - local.set 6 - br 3 (;@4;) - end - local.get 7 - i32.const 92 - i32.ne - if ;; label = @7 - local.get 7 - i32.const 10 - i32.sub - br_table 1 (;@6;) 2 (;@5;) 2 (;@5;) 1 (;@6;) 2 (;@5;) - end - local.get 3 - i32.const 4 - i32.add - local.set 1 - local.get 3 - i32.load16_u offset=4 - i32.const 13 - i32.ne - br_if 1 (;@5;) - local.get 3 - i32.const 6 - i32.add - local.get 1 - local.get 3 - i32.load16_u offset=6 - i32.const 10 - i32.eq - select - local.set 1 - br 1 (;@5;) - end - end - i32.const 4108 - i32.load - i32.eqz - if ;; label = @5 - i32.const 4108 - i32.const 9 - i32.store - end - i32.const 4104 - local.get 1 - i32.const 4024 - i32.load - i32.sub - i32.const 1 - i32.shr_s - i32.store - end - i32.const 16448 - local.get 6 - i32.const 4 - i32.add - local.tee 1 - i32.store - call 8 - i32.const 41 - i32.ne - br_if 0 (;@3;) - block ;; label = @4 - local.get 0 - i32.const 1 - i32.sub - br_table 3 (;@1;) 3 (;@1;) 0 (;@4;) - end - i32.const 18516 - local.get 1 - i32.store - i32.const 18512 - local.get 4 - i32.store - i32.const 1 - return - end - i32.const 16448 - local.get 2 - i32.store - end - i32.const 0 - return - end - local.get 4 - local.get 1 - i32.const 4032 - i32.load - call_indirect (type 0) - i32.const 1) - (func (;7;) (type 2) (param i32) (result i32) - (local i32 i32) - i32.const 1 - local.set 1 - block ;; label = @1 - local.get 0 - i32.const 9 - i32.sub - i32.const 5 - i32.lt_u - br_if 0 (;@1;) - block ;; label = @2 - block ;; label = @3 - block ;; label = @4 - local.get 0 - i32.const 32 - i32.sub - br_table 3 (;@1;) 2 (;@2;) 1 (;@3;) 1 (;@3;) 1 (;@3;) 2 (;@2;) 2 (;@2;) 0 (;@4;) - end - local.get 0 - i32.const 160 - i32.eq - br_if 2 (;@1;) - end - local.get 0 - i32.const 65528 - i32.and - i32.const 40 - i32.eq - br_if 0 (;@2;) - local.get 0 - i32.const 58 - i32.sub - local.tee 2 - i32.const 65535 - i32.and - i32.const 37 - i32.lt_u - i64.const 111669149759 - local.get 2 - i64.extend_i32_u - i64.shr_u - i64.const 1 - i64.and - i64.eqz - i32.eqz - i32.and - br_if 0 (;@2;) - local.get 0 - i32.const 123 - i32.sub - i32.const 65535 - i32.and - i32.const 4 - i32.lt_u - local.set 1 - end - local.get 0 - i32.const 46 - i32.ne - local.get 1 - i32.and - local.set 1 - end - local.get 1) - (func (;8;) (type 1) (result i32) - (local i32 i32 i32 i32 i32) - i32.const 16452 - i32.load - local.set 3 - i32.const 16448 - i32.load - local.set 1 - loop ;; label = @1 - block ;; label = @2 - block ;; label = @3 - local.get 1 - i32.load16_u - local.tee 2 - i32.const 9 - i32.sub - i32.const 5 - i32.lt_u - local.get 2 - i32.const 32 - i32.eq - i32.or - local.get 2 - i32.const 160 - i32.eq - i32.or - i32.eqz - if ;; label = @4 - local.get 2 - i32.const 47 - i32.ne - if ;; label = @5 - local.get 2 - return - end - i32.const 47 - local.set 4 - block ;; label = @5 - local.get 1 - i32.load16_u offset=2 - local.tee 0 - i32.const 47 - i32.ne - if ;; label = @6 - local.get 0 - i32.const 42 - i32.ne - br_if 4 (;@2;) - local.get 1 - i32.const 4 - i32.add - local.set 0 - loop ;; label = @7 - local.get 0 - i32.const 2 - i32.sub - local.tee 1 - local.get 3 - i32.ge_u - br_if 4 (;@3;) - local.get 0 - i32.load16_u - i32.const 42 - i32.eq - if ;; label = @8 - local.get 0 - i32.const 2 - i32.add - i32.load16_u - i32.const 47 - i32.eq - br_if 3 (;@5;) - end - local.get 0 - i32.const 2 - i32.add - local.set 0 - br 0 (;@7;) - end - unreachable - end - local.get 1 - i32.const 2 - i32.add - local.set 1 - loop ;; label = @6 - local.get 1 - local.tee 0 - i32.const 2 - i32.sub - local.get 3 - i32.ge_u - br_if 3 (;@3;) - local.get 0 - i32.const 2 - i32.add - local.set 1 - local.get 0 - i32.load16_u - i32.const 10 - i32.sub - br_table 3 (;@3;) 0 (;@6;) 0 (;@6;) 3 (;@3;) 0 (;@6;) - end - unreachable - end - local.get 1 - i32.const 4 - i32.add - local.set 0 - br 1 (;@3;) - end - local.get 1 - local.set 0 - end - i32.const 16448 - local.get 0 - i32.const 2 - i32.add - local.tee 1 - i32.store - local.get 2 - local.set 4 - local.get 0 - local.get 3 - i32.lt_u - br_if 1 (;@1;) - end - end - local.get 4) - (func (;9;) (type 7) (param i32) - (local i32 i32 i32 i32 i32 i32) - i32.const 16448 - i32.const 16448 - i32.load - local.tee 1 - i32.const 14 - i32.add - i32.store - local.get 1 - i32.const 12 - i32.add - local.set 2 - block ;; label = @1 - block ;; label = @2 - block ;; label = @3 - call 8 - local.tee 1 - i32.const 91 - i32.ne - if ;; label = @4 - local.get 1 - i32.const 61 - i32.eq - br_if 1 (;@3;) - local.get 1 - i32.const 46 - i32.ne - br_if 2 (;@2;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - i32.const 16448 - i32.load - local.set 1 - call 12 - i32.eqz - br_if 2 (;@2;) - i32.const 16448 - i32.load - local.set 0 - call 8 - i32.const 61 - i32.ne - br_if 2 (;@2;) - local.get 1 - local.get 0 - i32.const 4028 - i32.load - call_indirect (type 0) - return - end - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - local.tee 4 - i32.const 39 - i32.ne - local.get 4 - i32.const 34 - i32.ne - i32.and - br_if 1 (;@2;) - i32.const 16452 - i32.load - local.set 3 - i32.const 16448 - i32.load - local.tee 6 - local.set 0 - block ;; label = @4 - loop ;; label = @5 - block ;; label = @6 - local.get 0 - local.tee 1 - i32.const 2 - i32.add - local.set 0 - local.get 1 - local.get 3 - i32.ge_u - br_if 0 (;@6;) - local.get 4 - local.get 0 - i32.load16_u - local.tee 5 - i32.eq - if ;; label = @7 - local.get 1 - local.set 3 - br 3 (;@4;) - end - local.get 5 - i32.const 92 - i32.ne - if ;; label = @7 - local.get 5 - i32.const 10 - i32.sub - br_table 1 (;@6;) 2 (;@5;) 2 (;@5;) 1 (;@6;) 2 (;@5;) - end - local.get 1 - i32.const 4 - i32.add - local.set 0 - local.get 1 - i32.load16_u offset=4 - i32.const 13 - i32.ne - br_if 1 (;@5;) - local.get 1 - i32.const 6 - i32.add - local.get 0 - local.get 1 - i32.load16_u offset=6 - i32.const 10 - i32.eq - select - local.set 0 - br 1 (;@5;) - end - end - i32.const 4108 - i32.load - i32.eqz - if ;; label = @5 - i32.const 4108 - i32.const 9 - i32.store - end - i32.const 4104 - local.get 0 - i32.const 4024 - i32.load - i32.sub - i32.const 1 - i32.shr_s - i32.store - end - i32.const 16448 - local.get 3 - i32.const 4 - i32.add - local.tee 0 - i32.store - call 8 - i32.const 93 - i32.ne - br_if 1 (;@2;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - i32.const 61 - i32.ne - br_if 1 (;@2;) - local.get 6 - local.get 0 - i32.const 4028 - i32.load - call_indirect (type 0) - br 1 (;@2;) - end - local.get 0 - i32.eqz - br_if 0 (;@2;) - i32.const 4113 - i32.load8_u - local.tee 1 - i32.eqz - if ;; label = @3 - i32.const 4060 - i32.const 0 - i32.store - i32.const 4068 - i32.const 0 - i32.store - end - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - local.set 0 - local.get 1 - if ;; label = @3 - local.get 0 - i32.const 40 - i32.eq - if ;; label = @4 - call 11 - local.set 0 - end - block ;; label = @4 - local.get 0 - i32.const 114 - i32.ne - if ;; label = @5 - local.get 0 - i32.const 123 - i32.ne - br_if 1 (;@4;) - i32.const 16444 - i32.const 16448 - i32.load - i32.store - br 1 (;@4;) - end - i32.const 1 - call 6 - drop - end - i32.const 16448 - local.get 2 - i32.store - return - end - local.get 0 - i32.const 114 - i32.ne - if ;; label = @3 - local.get 0 - i32.const 123 - i32.ne - br_if 1 (;@2;) - i32.const 16448 - i32.load - i32.const 2 - i32.sub - local.set 5 - block ;; label = @4 - loop ;; label = @5 - i32.const 16448 - i32.const 16448 - i32.load - local.tee 0 - i32.const 2 - i32.add - i32.store - local.get 0 - i32.const 16452 - i32.load - local.tee 3 - i32.ge_u - br_if 4 (;@1;) - call 8 - local.set 2 - i32.const 16448 - i32.load - local.set 1 - block ;; label = @6 - local.get 2 - call 12 - if ;; label = @7 - i32.const 16448 - i32.load - local.set 3 - block ;; label = @8 - block ;; label = @9 - call 8 - local.tee 0 - i32.const 40 - i32.sub - br_table 1 (;@8;) 5 (;@4;) 5 (;@4;) 5 (;@4;) 1 (;@8;) 0 (;@9;) - end - block ;; label = @9 - block ;; label = @10 - local.get 0 - i32.const 58 - i32.sub - br_table 1 (;@9;) 6 (;@4;) 6 (;@4;) 2 (;@8;) 0 (;@10;) - end - local.get 0 - i32.const 125 - i32.eq - br_if 1 (;@8;) - br 5 (;@4;) - end - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - call 12 - i32.const 16448 - i32.load - i32.load16_u - local.set 0 - br_if 0 (;@8;) - local.get 0 - i32.const 65535 - i32.and - i32.const 92 - local.set 0 - i32.const 92 - i32.ne - br_if 4 (;@4;) - end - local.get 1 - local.get 3 - i32.const 4028 - i32.load - call_indirect (type 0) - br 1 (;@6;) - end - block ;; label = @7 - local.get 2 - i32.const 34 - i32.ne - if ;; label = @8 - local.get 2 - i32.const 46 - i32.eq - br_if 1 (;@7;) - local.get 2 - i32.const 39 - i32.ne - br_if 4 (;@4;) - end - i32.const 16448 - i32.load - local.tee 6 - local.set 0 - block ;; label = @8 - loop ;; label = @9 - block ;; label = @10 - local.get 0 - local.tee 1 - i32.const 2 - i32.add - local.set 0 - local.get 1 - local.get 3 - i32.ge_u - br_if 0 (;@10;) - local.get 2 - local.get 0 - i32.load16_u - local.tee 4 - i32.eq - if ;; label = @11 - local.get 1 - local.set 3 - br 3 (;@8;) - end - local.get 4 - i32.const 92 - i32.ne - if ;; label = @11 - local.get 4 - i32.const 10 - i32.sub - br_table 1 (;@10;) 2 (;@9;) 2 (;@9;) 1 (;@10;) 2 (;@9;) - end - local.get 1 - i32.const 4 - i32.add - local.set 0 - local.get 1 - i32.load16_u offset=4 - i32.const 13 - i32.ne - br_if 1 (;@9;) - local.get 1 - i32.const 6 - i32.add - local.get 0 - local.get 1 - i32.load16_u offset=6 - i32.const 10 - i32.eq - select - local.set 0 - br 1 (;@9;) - end - end - i32.const 4108 - i32.load - i32.eqz - if ;; label = @9 - i32.const 4108 - i32.const 9 - i32.store - end - i32.const 4104 - local.get 0 - i32.const 4024 - i32.load - i32.sub - i32.const 1 - i32.shr_s - i32.store - end - i32.const 16448 - local.get 3 - i32.const 4 - i32.add - local.tee 1 - i32.store - call 8 - local.tee 0 - i32.const 58 - i32.ne - br_if 1 (;@6;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - call 12 - i32.eqz - i32.const 16448 - i32.load - i32.load16_u - local.tee 0 - i32.const 92 - i32.ne - i32.and - br_if 3 (;@4;) - local.get 6 - local.get 1 - i32.const 4028 - i32.load - call_indirect (type 0) - br 1 (;@6;) - end - i32.const 16448 - i32.load - local.tee 0 - i32.load16_u offset=2 - i32.const 46 - i32.ne - br_if 2 (;@4;) - local.get 0 - i32.load16_u offset=4 - i32.const 46 - i32.ne - br_if 2 (;@4;) - i32.const 16448 - local.get 0 - i32.const 6 - i32.add - i32.store - block ;; label = @7 - block ;; label = @8 - local.get 0 - i32.load16_u offset=6 - local.tee 0 - i32.const 114 - i32.eq - if (result i32) ;; label = @9 - i32.const 1 - call 6 - i32.const 16448 - i32.load - local.set 0 - br_if 1 (;@8;) - local.get 0 - i32.load16_u - else - local.get 0 - end - i32.const 65535 - i32.and - call 12 - i32.eqz - br_if 4 (;@4;) - br 1 (;@7;) - end - i32.const 16448 - local.get 0 - i32.const 2 - i32.add - i32.store - end - call 8 - local.set 0 - end - local.get 0 - i32.const 65535 - i32.and - local.tee 0 - i32.const 44 - i32.eq - br_if 0 (;@5;) - end - local.get 0 - i32.const 125 - i32.eq - br_if 3 (;@1;) - end - i32.const 16448 - local.get 5 - i32.store - return - end - i32.const 1 - call 6 - drop - end - i32.const 16448 - local.get 2 - i32.store - end) - (func (;10;) (type 2) (param i32) (result i32) - (local i32 i32) - i32.const 16448 - i32.load - local.set 1 - block ;; label = @1 - local.get 0 - i32.const 109 - i32.eq - if (result i32) ;; label = @2 - local.get 1 - i32.load16_u offset=2 - i32.const 111 - i32.ne - br_if 1 (;@1;) - local.get 1 - i32.load16_u offset=4 - i32.const 100 - i32.ne - br_if 1 (;@1;) - local.get 1 - i32.load16_u offset=6 - i32.const 117 - i32.ne - br_if 1 (;@1;) - local.get 1 - i32.load16_u offset=8 - i32.const 108 - i32.ne - br_if 1 (;@1;) - local.get 1 - i32.load16_u offset=10 - i32.const 101 - i32.ne - br_if 1 (;@1;) - i32.const 16448 - local.get 1 - i32.const 12 - i32.add - i32.store - call 8 - i32.const 46 - i32.ne - if ;; label = @3 - br 2 (;@1;) - end - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - else - local.get 0 - end - i32.const 101 - i32.ne - br_if 0 (;@1;) - i32.const 16448 - i32.load - local.tee 0 - i32.load16_u offset=2 - i32.const 120 - i32.ne - br_if 0 (;@1;) - local.get 0 - i32.load16_u offset=4 - i32.const 112 - i32.ne - br_if 0 (;@1;) - local.get 0 - i32.load16_u offset=6 - i32.const 111 - i32.ne - br_if 0 (;@1;) - local.get 0 - i32.load16_u offset=8 - i32.const 114 - i32.ne - br_if 0 (;@1;) - local.get 0 - i32.load16_u offset=10 - i32.const 116 - i32.ne - br_if 0 (;@1;) - local.get 0 - i32.const 14 - i32.add - local.get 1 - local.get 0 - i32.load16_u offset=12 - i32.const 115 - i32.eq - local.tee 2 - select - local.set 1 - end - i32.const 16448 - local.get 1 - i32.store - local.get 2) - (func (;11;) (type 1) (result i32) - (local i32 i32 i32 i32 i32 i32 i32 i32 i32) - i32.const 4108 - i32.load - local.set 5 - i32.const 4024 - i32.load - local.set 7 - i32.const 16452 - i32.load - local.set 6 - loop ;; label = @1 - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - local.tee 2 - i32.const 40 - i32.eq - br_if 0 (;@1;) - i32.const 16448 - i32.load - local.set 3 - block ;; label = @2 - block ;; label = @3 - i32.const 16448 - block (result i32) ;; label = @4 - block ;; label = @5 - block ;; label = @6 - local.get 2 - i32.const 34 - i32.eq - local.get 2 - i32.const 39 - i32.eq - i32.or - i32.eqz - if ;; label = @7 - local.get 3 - local.set 0 - local.get 2 - i32.const 123 - i32.ne - br_if 1 (;@6;) - i32.const 16448 - local.get 0 - i32.const 2 - i32.add - i32.store - call 8 - i32.const 125 - i32.eq - br_if 2 (;@5;) - i32.const 123 - local.set 2 - br 5 (;@2;) - end - local.get 3 - local.set 0 - block ;; label = @7 - loop ;; label = @8 - block ;; label = @9 - local.get 0 - local.tee 1 - i32.const 2 - i32.add - local.set 0 - local.get 1 - local.get 6 - i32.ge_u - br_if 0 (;@9;) - local.get 0 - i32.load16_u - local.tee 4 - local.get 2 - i32.eq - br_if 2 (;@7;) - local.get 4 - i32.const 92 - i32.ne - if ;; label = @10 - local.get 4 - i32.const 10 - i32.sub - br_table 1 (;@9;) 2 (;@8;) 2 (;@8;) 1 (;@9;) 2 (;@8;) - end - local.get 1 - i32.const 4 - i32.add - local.set 0 - local.get 1 - i32.load16_u offset=4 - i32.const 13 - i32.ne - br_if 1 (;@8;) - local.get 1 - i32.const 6 - i32.add - local.get 0 - local.get 1 - i32.load16_u offset=6 - i32.const 10 - i32.eq - select - local.set 0 - br 1 (;@8;) - end - end - local.get 5 - i32.eqz - if ;; label = @8 - i32.const 4108 - i32.const 9 - i32.store - i32.const 9 - local.set 5 - end - i32.const 4104 - local.get 0 - local.get 7 - i32.sub - i32.const 1 - i32.shr_s - i32.store - local.get 6 - local.set 1 - end - local.get 1 - i32.const 4 - i32.add - br 2 (;@4;) - end - loop ;; label = @6 - local.get 0 - local.get 6 - i32.gt_u - br_if 3 (;@3;) - local.get 0 - i32.load16_u - local.tee 1 - local.set 4 - local.get 1 - i32.const 64512 - i32.and - i32.const 55296 - i32.ne - local.tee 8 - if (result i32) ;; label = @7 - local.get 4 - else - local.get 1 - i32.const 10 - i32.shl - i32.const 1047552 - i32.and - local.get 0 - i32.load16_u offset=2 - i32.const 1023 - i32.and - i32.or - i32.const 65536 - i32.add - end - call 16 - i32.eqz - br_if 3 (;@3;) - i32.const 16448 - local.get 0 - i32.const 2 - i32.const 4 - local.get 8 - if (result i32) ;; label = @7 - local.get 1 - else - local.get 1 - i32.const 10 - i32.shl - i32.const 1047552 - i32.and - local.get 0 - i32.load16_u offset=2 - i32.const 1023 - i32.and - i32.or - i32.const 65536 - i32.add - end - i32.const 65536 - i32.lt_u - select - i32.add - local.tee 0 - i32.store - br 0 (;@6;) - end - unreachable - end - i32.const 16448 - i32.load - i32.const 2 - i32.add - end - local.tee 0 - i32.store - end - local.get 0 - local.get 3 - i32.eq - br_if 0 (;@2;) - call 8 - i32.const 44 - i32.eq - br_if 1 (;@1;) - end - end - i32.const 16448 - local.get 3 - i32.store - local.get 2) - (func (;12;) (type 2) (param i32) (result i32) - (local i32) - block (result i32) ;; label = @1 - local.get 0 - i32.const 64512 - i32.and - i32.const 55296 - i32.eq - if ;; label = @2 - local.get 0 - i32.const 10 - i32.shl - i32.const 1047552 - i32.and - i32.const 16448 - i32.load - i32.load16_u offset=2 - i32.const 1023 - i32.and - i32.or - i32.const 65536 - i32.add - local.set 0 - end - i32.const 0 - local.get 0 - call 17 - i32.eqz - br_if 0 (;@1;) - drop - i32.const 16448 - i32.load - i32.const 2 - i32.const 4 - local.get 0 - i32.const 65536 - i32.lt_u - select - i32.add - local.set 1 - block ;; label = @2 - loop ;; label = @3 - i32.const 16448 - local.get 1 - i32.store - block ;; label = @4 - local.get 1 - i32.load16_u - local.tee 0 - i32.const 64512 - i32.and - i32.const 55296 - i32.eq - if ;; label = @5 - local.get 0 - i32.const 10 - i32.shl - i32.const 1047552 - i32.and - local.get 1 - i32.load16_u offset=2 - i32.const 1023 - i32.and - i32.or - i32.const 65536 - i32.add - local.set 0 - br 1 (;@4;) - end - local.get 0 - i32.eqz - br_if 2 (;@2;) - end - local.get 0 - call 16 - if ;; label = @4 - local.get 1 - i32.const 2 - i32.const 4 - local.get 0 - i32.const 65536 - i32.lt_u - select - i32.add - local.set 1 - br 1 (;@3;) - end - end - i32.const 0 - local.get 0 - i32.const 92 - i32.eq - br_if 1 (;@1;) - drop - end - i32.const 1 - end) - (func (;13;) (type 4) (param i32 i32) (result i32) - (local i32 i32) - block ;; label = @1 - call 8 - i32.const 79 - i32.ne - br_if 0 (;@1;) - i32.const 16448 - i32.load - local.tee 2 - i32.load16_u offset=2 - i32.const 98 - i32.ne - br_if 0 (;@1;) - local.get 2 - i32.load16_u offset=4 - i32.const 106 - i32.ne - br_if 0 (;@1;) - local.get 2 - i32.load16_u offset=6 - i32.const 101 - i32.ne - br_if 0 (;@1;) - local.get 2 - i32.load16_u offset=8 - i32.const 99 - i32.ne - br_if 0 (;@1;) - local.get 2 - i32.load16_u offset=10 - i32.const 116 - i32.ne - br_if 0 (;@1;) - i32.const 16448 - local.get 2 - i32.const 12 - i32.add - i32.store - call 8 - i32.const 46 - i32.ne - br_if 0 (;@1;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - local.tee 2 - i32.const 112 - i32.eq - if ;; label = @2 - i32.const 16448 - i32.load - local.tee 2 - i32.load16_u offset=2 - i32.const 114 - i32.ne - br_if 1 (;@1;) - local.get 2 - i32.load16_u offset=4 - i32.const 111 - i32.ne - br_if 1 (;@1;) - local.get 2 - i32.load16_u offset=6 - i32.const 116 - i32.ne - br_if 1 (;@1;) - local.get 2 - i32.load16_u offset=8 - i32.const 111 - i32.ne - br_if 1 (;@1;) - local.get 2 - i32.load16_u offset=10 - i32.const 116 - i32.ne - br_if 1 (;@1;) - local.get 2 - i32.load16_u offset=12 - i32.const 121 - i32.ne - br_if 1 (;@1;) - local.get 2 - i32.load16_u offset=14 - i32.const 112 - i32.ne - br_if 1 (;@1;) - local.get 2 - i32.load16_u offset=16 - i32.const 101 - i32.ne - br_if 1 (;@1;) - i32.const 16448 - local.get 2 - i32.const 18 - i32.add - i32.store - call 8 - i32.const 46 - i32.ne - br_if 1 (;@1;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - local.set 2 - end - local.get 2 - i32.const 104 - i32.ne - br_if 0 (;@1;) - i32.const 16448 - i32.load - local.tee 2 - i32.load16_u offset=2 - i32.const 97 - i32.ne - br_if 0 (;@1;) - local.get 2 - i32.load16_u offset=4 - i32.const 115 - i32.ne - br_if 0 (;@1;) - local.get 2 - i32.load16_u offset=6 - i32.const 79 - i32.ne - br_if 0 (;@1;) - local.get 2 - i32.load16_u offset=8 - i32.const 119 - i32.ne - br_if 0 (;@1;) - local.get 2 - i32.load16_u offset=10 - i32.const 110 - i32.ne - br_if 0 (;@1;) - local.get 2 - i32.load16_u offset=12 - i32.const 80 - i32.ne - br_if 0 (;@1;) - local.get 2 - i32.load16_u offset=14 - i32.const 114 - i32.ne - br_if 0 (;@1;) - local.get 2 - i32.load16_u offset=16 - i32.const 111 - i32.ne - br_if 0 (;@1;) - local.get 2 - i32.load16_u offset=18 - i32.const 112 - i32.ne - br_if 0 (;@1;) - local.get 2 - i32.load16_u offset=20 - i32.const 101 - i32.ne - br_if 0 (;@1;) - local.get 2 - i32.load16_u offset=22 - i32.const 114 - i32.ne - br_if 0 (;@1;) - local.get 2 - i32.load16_u offset=24 - i32.const 116 - i32.ne - br_if 0 (;@1;) - local.get 2 - i32.load16_u offset=26 - i32.const 121 - i32.ne - br_if 0 (;@1;) - i32.const 16448 - local.get 2 - i32.const 28 - i32.add - i32.store - call 8 - i32.const 46 - i32.ne - br_if 0 (;@1;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - i32.const 99 - i32.ne - br_if 0 (;@1;) - i32.const 16448 - i32.load - local.tee 2 - i32.load16_u offset=2 - i32.const 97 - i32.ne - br_if 0 (;@1;) - local.get 2 - i32.load16_u offset=4 - i32.const 108 - i32.ne - br_if 0 (;@1;) - local.get 2 - i32.load16_u offset=6 - i32.const 108 - i32.ne - br_if 0 (;@1;) - i32.const 16448 - local.get 2 - i32.const 8 - i32.add - i32.store - call 8 - i32.const 40 - i32.ne - br_if 0 (;@1;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - call 12 - i32.eqz - br_if 0 (;@1;) - call 8 - i32.const 44 - i32.ne - br_if 0 (;@1;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - call 8 - drop - i32.const 16448 - i32.load - local.tee 2 - local.get 0 - local.get 1 - i32.const 1 - i32.shl - local.tee 0 - call 0 - br_if 0 (;@1;) - i32.const 16448 - local.get 0 - local.get 2 - i32.add - i32.store - call 8 - i32.const 41 - i32.ne - br_if 0 (;@1;) - i32.const 16448 - i32.const 16448 - i32.load - i32.const 2 - i32.add - i32.store - i32.const 1 - local.set 3 - end - local.get 3) - (func (;14;) (type 2) (param i32) (result i32) - (local i32 i32 i32) - i32.const 1 - local.set 2 - block ;; label = @1 - block ;; label = @2 - block ;; label = @3 - block ;; label = @4 - block ;; label = @5 - block ;; label = @6 - block ;; label = @7 - block ;; label = @8 - local.get 0 - i32.load16_u - local.tee 1 - i32.const 59 - i32.sub - br_table 7 (;@1;) 5 (;@3;) 5 (;@3;) 1 (;@7;) 0 (;@8;) - end - block ;; label = @8 - local.get 1 - i32.const 101 - i32.sub - br_table 3 (;@5;) 5 (;@3;) 5 (;@3;) 2 (;@6;) 0 (;@8;) - end - local.get 1 - i32.const 41 - i32.ne - br_if 3 (;@4;) - i32.const 1 - return - end - local.get 0 - i32.const 2 - i32.sub - i32.load16_u - i32.const 61 - i32.eq - return - end - i32.const 0 - local.set 2 - local.get 0 - i32.const 8 - i32.sub - local.tee 1 - i32.const 4024 - i32.load - local.tee 3 - i32.lt_u - br_if 4 (;@1;) - local.get 1 - i32.load16_u - i32.const 99 - i32.ne - br_if 4 (;@1;) - local.get 0 - i32.const 6 - i32.sub - i32.load16_u - i32.const 97 - i32.ne - br_if 4 (;@1;) - local.get 0 - i32.const 4 - i32.sub - i32.load16_u - i32.const 116 - i32.ne - br_if 4 (;@1;) - local.get 0 - i32.const 2 - i32.sub - i32.load16_u - i32.const 99 - i32.ne - br_if 4 (;@1;) - i32.const 1 - local.set 2 - local.get 1 - local.get 3 - i32.eq - br_if 4 (;@1;) - local.get 0 - i32.const 10 - i32.sub - i32.load16_u - call 7 - return - end - i32.const 0 - local.set 2 - local.get 0 - i32.const 6 - i32.sub - local.tee 1 - i32.const 4024 - i32.load - local.tee 3 - i32.lt_u - br_if 3 (;@1;) - local.get 1 - i32.load16_u - i32.const 101 - i32.ne - br_if 3 (;@1;) - local.get 0 - i32.const 4 - i32.sub - i32.load16_u - i32.const 108 - i32.ne - br_if 3 (;@1;) - local.get 0 - i32.const 2 - i32.sub - i32.load16_u - i32.const 115 - i32.ne - br_if 3 (;@1;) - i32.const 1 - local.set 2 - local.get 1 - local.get 3 - i32.eq - br_if 3 (;@1;) - local.get 0 - i32.const 8 - i32.sub - i32.load16_u - call 7 - return - end - local.get 1 - i32.const 121 - i32.eq - br_if 1 (;@2;) - end - i32.const 0 - local.set 2 - br 1 (;@1;) - end - i32.const 0 - local.set 2 - local.get 0 - i32.const 12 - i32.sub - local.tee 1 - i32.const 4024 - i32.load - local.tee 3 - i32.lt_u - br_if 0 (;@1;) - local.get 1 - i32.load16_u - i32.const 102 - i32.ne - br_if 0 (;@1;) - local.get 0 - i32.const 10 - i32.sub - i32.load16_u - i32.const 105 - i32.ne - br_if 0 (;@1;) - local.get 0 - i32.const 8 - i32.sub - i32.load16_u - i32.const 110 - i32.ne - br_if 0 (;@1;) - local.get 0 - i32.const 6 - i32.sub - i32.load16_u - i32.const 97 - i32.ne - br_if 0 (;@1;) - local.get 0 - i32.const 4 - i32.sub - i32.load16_u - i32.const 108 - i32.ne - br_if 0 (;@1;) - local.get 0 - i32.const 2 - i32.sub - i32.load16_u - i32.const 108 - i32.ne - br_if 0 (;@1;) - i32.const 1 - local.set 2 - local.get 1 - local.get 3 - i32.eq - br_if 0 (;@1;) - local.get 0 - i32.const 14 - i32.sub - i32.load16_u - call 7 - return - end - local.get 2) - (func (;15;) (type 2) (param i32) (result i32) - (local i32 i32 i32 i32) - i32.const 4024 - i32.load - local.tee 3 - i32.const 2 - i32.add - local.set 4 - block ;; label = @1 - loop ;; label = @2 - block ;; label = @3 - local.get 0 - i32.eqz - br_if 0 (;@3;) - local.get 0 - i32.const 6 - i32.sub - local.set 2 - loop ;; label = @4 - block ;; label = @5 - local.get 0 - i32.load16_u - local.tee 1 - i32.const 9 - i32.sub - i32.const 5 - i32.lt_u - local.get 1 - i32.const 32 - i32.eq - i32.or - local.get 1 - i32.const 160 - i32.eq - i32.or - i32.eqz - if ;; label = @6 - local.get 1 - i32.const 47 - i32.ne - br_if 5 (;@1;) + i32.const 10 + i32.sub + br_table 1 (;@41;) 2 (;@40;) 2 (;@40;) 1 (;@41;) 2 (;@40;) + end + local.get 3 + i32.const 4 + i32.add + local.set 0 + local.get 3 + i32.load16_u offset=4 + i32.const 13 + i32.ne + br_if 1 (;@40;) + local.get 3 + i32.const 6 + i32.add + local.get 0 + local.get 3 + i32.load16_u offset=6 + i32.const 10 + i32.eq + select + local.set 0 + br 1 (;@40;) + end + end + i32.const 4224 + i32.load + br_if 0 (;@39;) + i32.const 4224 + i32.const 9 + i32.store + i32.const 4228 + local.get 0 + i32.const 4188 + i32.load + i32.sub + i32.const 1 + i32.shr_s + i32.store + end + i32.const 4196 + local.get 4 + i32.const 4 + i32.add + local.tee 0 + i32.store + call 4 + i32.const 44 + i32.ne + br_if 30 (;@8;) + i32.const 18596 + i32.load + local.get 5 + local.get 0 + call 8 + br 30 (;@8;) + end + local.get 0 + i32.const 100 + i32.eq + if ;; label = @38 + i32.const 4196 + i32.load + local.tee 0 + i32.load16_u offset=2 + i32.const 101 + i32.ne + br_if 30 (;@8;) + local.get 0 + i32.load16_u offset=4 + i32.const 102 + i32.ne + br_if 30 (;@8;) + local.get 0 + i32.load16_u offset=6 + i32.const 105 + i32.ne + br_if 30 (;@8;) + local.get 0 + i32.load16_u offset=8 + i32.const 110 + i32.ne + br_if 30 (;@8;) + local.get 0 + i32.load16_u offset=10 + i32.const 101 + i32.ne + br_if 30 (;@8;) + local.get 0 + i32.load16_u offset=12 + i32.const 80 + i32.ne + br_if 30 (;@8;) + local.get 0 + i32.load16_u offset=14 + i32.const 114 + i32.ne + br_if 30 (;@8;) + local.get 0 + i32.load16_u offset=16 + i32.const 111 + i32.ne + br_if 30 (;@8;) + local.get 0 + i32.load16_u offset=18 + i32.const 112 + i32.ne + br_if 30 (;@8;) + local.get 0 + i32.load16_u offset=20 + i32.const 101 + i32.ne + br_if 30 (;@8;) + local.get 0 + i32.load16_u offset=22 + i32.const 114 + i32.ne + br_if 30 (;@8;) + local.get 0 + i32.load16_u offset=24 + i32.const 116 + i32.ne + br_if 30 (;@8;) + local.get 0 + i32.load16_u offset=26 + i32.const 121 + i32.ne + br_if 30 (;@8;) + local.get 0 + i32.const 26 + i32.add + local.set 7 + i32.const 4196 + local.get 0 + i32.const 28 + i32.add + i32.store + i32.const 4188 + i32.load + local.set 0 + call 4 + i32.const 40 + i32.ne + br_if 28 (;@10;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + call 6 + i32.eqz + br_if 28 (;@10;) + call 4 + i32.const 44 + i32.ne + br_if 28 (;@10;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + local.tee 4 + i32.const 39 + i32.ne + if ;; label = @39 + local.get 0 + local.set 3 + local.get 4 + i32.const 34 + i32.ne + br_if 30 (;@9;) + end + i32.const 4200 + i32.load + local.set 2 + i32.const 4196 + i32.load + local.tee 3 + local.set 0 + block ;; label = @39 + loop ;; label = @40 + block ;; label = @41 + local.get 0 + local.tee 1 + i32.const 2 + i32.add + local.set 0 + local.get 1 + local.get 2 + i32.ge_u + br_if 0 (;@41;) + local.get 4 + local.get 0 + i32.load16_u + local.tee 5 + i32.eq + if ;; label = @42 + local.get 1 + local.set 2 + br 3 (;@39;) + end + local.get 5 + i32.const 92 + i32.ne + if ;; label = @42 + local.get 5 + i32.const 10 + i32.sub + br_table 1 (;@41;) 2 (;@40;) 2 (;@40;) 1 (;@41;) 2 (;@40;) + end + local.get 1 + i32.const 4 + i32.add + local.set 0 + local.get 1 + i32.load16_u offset=4 + i32.const 13 + i32.ne + br_if 1 (;@40;) + local.get 1 + i32.const 6 + i32.add + local.get 0 + local.get 1 + i32.load16_u offset=6 + i32.const 10 + i32.eq + select + local.set 0 + br 1 (;@40;) + end + end + i32.const 4224 + i32.load + br_if 0 (;@39;) + i32.const 4224 + i32.const 9 + i32.store + i32.const 4228 + local.get 0 + i32.const 4188 + i32.load + i32.sub + i32.const 1 + i32.shr_s + i32.store + end + i32.const 4196 + local.get 2 + i32.const 4 + i32.add + local.tee 0 + i32.store + call 4 + i32.const 44 + i32.ne + br_if 29 (;@9;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + i32.const 123 + i32.ne + br_if 29 (;@9;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + local.tee 1 + i32.const 101 + i32.eq + if ;; label = @39 + i32.const 4196 + i32.load + local.tee 1 + i32.load16_u offset=2 + i32.const 110 + i32.ne + br_if 30 (;@9;) + local.get 1 + i32.load16_u offset=4 + i32.const 117 + i32.ne + br_if 30 (;@9;) + local.get 1 + i32.load16_u offset=6 + i32.const 109 + i32.ne + br_if 30 (;@9;) + local.get 1 + i32.load16_u offset=8 + i32.const 101 + i32.ne + br_if 30 (;@9;) + local.get 1 + i32.load16_u offset=10 + i32.const 114 + i32.ne + br_if 30 (;@9;) + local.get 1 + i32.load16_u offset=12 + i32.const 97 + i32.ne + br_if 30 (;@9;) + local.get 1 + i32.load16_u offset=14 + i32.const 98 + i32.ne + br_if 30 (;@9;) + local.get 1 + i32.load16_u offset=16 + i32.const 108 + i32.ne + br_if 30 (;@9;) + local.get 1 + i32.load16_u offset=18 + i32.const 101 + i32.ne + br_if 30 (;@9;) + i32.const 4196 + local.get 1 + i32.const 20 + i32.add + i32.store + call 4 + i32.const 58 + i32.ne + br_if 30 (;@9;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + i32.const 4196 + block (result i32) ;; label = @40 + block ;; label = @41 + call 4 + local.tee 2 + i32.const 116 + i32.ne + br_if 0 (;@41;) + i32.const 4196 + i32.load + local.tee 1 + i32.load16_u offset=2 + i32.const 114 + i32.ne + br_if 0 (;@41;) + local.get 1 + i32.load16_u offset=4 + i32.const 117 + i32.ne + br_if 0 (;@41;) + local.get 1 + i32.load16_u offset=6 + i32.const 101 + i32.ne + br_if 0 (;@41;) + local.get 1 + i32.const 8 + i32.add + br 1 (;@40;) + end + local.get 2 + i32.const 33 + i32.ne + br_if 31 (;@9;) + i32.const 4220 + i32.load8_u + i32.eqz + br_if 31 (;@9;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + i32.const 48 + i32.ne + br_if 31 (;@9;) + i32.const 4196 + i32.load + i32.const 2 + i32.add + end + i32.store + call 4 + i32.const 44 + i32.ne + br_if 30 (;@9;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + local.set 1 + end + local.get 1 + i32.const 103 + i32.ne + if ;; label = @39 + local.get 1 + i32.const 118 + i32.ne + br_if 30 (;@9;) + i32.const 4196 + i32.load + local.tee 1 + i32.load16_u offset=2 + i32.const 97 + i32.ne + br_if 30 (;@9;) + local.get 1 + i32.load16_u offset=4 + i32.const 108 + i32.ne + br_if 30 (;@9;) + local.get 1 + i32.load16_u offset=6 + i32.const 117 + i32.ne + br_if 30 (;@9;) + local.get 1 + i32.load16_u offset=8 + i32.const 101 + i32.ne + br_if 30 (;@9;) + i32.const 4196 + local.get 1 + i32.const 10 + i32.add + i32.store + call 4 + i32.const 58 + i32.ne + br_if 30 (;@9;) + i32.const 18596 + i32.load + local.get 3 + local.get 0 + call 8 + br 31 (;@8;) + end + i32.const 4196 + i32.load + local.tee 1 + i32.load16_u offset=2 + i32.const 101 + i32.ne + br_if 29 (;@9;) + local.get 1 + i32.load16_u offset=4 + i32.const 116 + i32.ne + br_if 29 (;@9;) + i32.const 4196 + local.get 1 + i32.const 6 + i32.add + i32.store + call 4 + local.tee 1 + i32.const 58 + i32.eq + if (result i32) ;; label = @39 + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + i32.const 102 + i32.ne + br_if 30 (;@9;) + i32.const 4196 + i32.load + local.tee 1 + i32.load16_u offset=2 + i32.const 117 + i32.ne + br_if 30 (;@9;) + local.get 1 + i32.load16_u offset=4 + i32.const 110 + i32.ne + br_if 30 (;@9;) + local.get 1 + i32.load16_u offset=6 + i32.const 99 + i32.ne + br_if 30 (;@9;) + local.get 1 + i32.load16_u offset=8 + i32.const 116 + i32.ne + br_if 30 (;@9;) + local.get 1 + i32.load16_u offset=10 + i32.const 105 + i32.ne + br_if 30 (;@9;) + local.get 1 + i32.load16_u offset=12 + i32.const 111 + i32.ne + br_if 30 (;@9;) + local.get 1 + i32.load16_u offset=14 + i32.const 110 + i32.ne + br_if 30 (;@9;) + i32.const 4196 + local.get 1 + i32.const 16 + i32.add + local.tee 1 + i32.store + call 4 + local.tee 2 + i32.const 40 + i32.ne + if ;; label = @40 + local.get 1 + i32.const 4196 + i32.load + i32.eq + br_if 31 (;@9;) + local.get 2 + call 9 + i32.eqz + br_if 31 (;@9;) + end + call 4 + else + local.get 1 + end + i32.const 40 + i32.ne + br_if 29 (;@9;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + i32.const 41 + i32.ne + br_if 29 (;@9;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + i32.const 123 + i32.ne + br_if 29 (;@9;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + i32.const 114 + i32.ne + br_if 29 (;@9;) + i32.const 4196 + i32.load + local.tee 1 + i32.load16_u offset=2 + i32.const 101 + i32.ne + br_if 29 (;@9;) + local.get 1 + i32.load16_u offset=4 + i32.const 116 + i32.ne + br_if 29 (;@9;) + local.get 1 + i32.load16_u offset=6 + i32.const 117 + i32.ne + br_if 29 (;@9;) + local.get 1 + i32.load16_u offset=8 + i32.const 114 + i32.ne + br_if 29 (;@9;) + local.get 1 + i32.load16_u offset=10 + i32.const 110 + i32.ne + br_if 29 (;@9;) + i32.const 4196 + local.get 1 + i32.const 12 + i32.add + i32.store + call 4 + call 9 + i32.eqz + br_if 29 (;@9;) + block ;; label = @39 + block ;; label = @40 + call 4 + local.tee 1 + i32.const 91 + i32.ne + if ;; label = @41 + local.get 1 + i32.const 46 + i32.ne + br_if 2 (;@39;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + call 9 + i32.eqz + br_if 32 (;@9;) + br 1 (;@40;) + end + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + local.tee 5 + i32.const 39 + i32.ne + local.get 5 + i32.const 34 + i32.ne + i32.and + br_if 31 (;@9;) + i32.const 4196 + i32.load + local.set 1 + i32.const 4200 + i32.load + local.set 4 + block ;; label = @41 + loop ;; label = @42 + block ;; label = @43 + local.get 1 + local.tee 2 + i32.const 2 + i32.add + local.set 1 + local.get 2 + local.get 4 + i32.ge_u + br_if 0 (;@43;) + local.get 5 + local.get 1 + i32.load16_u + local.tee 6 + i32.eq + if ;; label = @44 + local.get 2 + local.set 4 + br 3 (;@41;) + end + local.get 6 + i32.const 92 + i32.ne + if ;; label = @44 + local.get 6 + i32.const 10 + i32.sub + br_table 1 (;@43;) 2 (;@42;) 2 (;@42;) 1 (;@43;) 2 (;@42;) + end + local.get 2 + i32.const 4 + i32.add + local.set 1 + local.get 2 + i32.load16_u offset=4 + i32.const 13 + i32.ne + br_if 1 (;@42;) + local.get 2 + i32.const 6 + i32.add + local.get 1 + local.get 2 + i32.load16_u offset=6 + i32.const 10 + i32.eq + select + local.set 1 + br 1 (;@42;) + end + end + i32.const 4224 + i32.load + br_if 0 (;@41;) + i32.const 4224 + i32.const 9 + i32.store + i32.const 4228 + local.get 1 + i32.const 4188 + i32.load + i32.sub + i32.const 1 + i32.shr_s + i32.store + end + i32.const 4196 + local.get 4 + i32.const 4 + i32.add + i32.store + call 4 + i32.const 93 + i32.ne + br_if 31 (;@9;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + end + call 4 + local.set 1 + end + local.get 1 + i32.const 59 + i32.eq + if (result i32) ;; label = @39 + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + else + local.get 1 + end + i32.const 125 + i32.ne + br_if 29 (;@9;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + local.tee 1 + i32.const 44 + i32.eq + if (result i32) ;; label = @39 + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + else + local.get 1 + end + i32.const 125 + i32.ne + br_if 29 (;@9;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + i32.const 41 + i32.ne + br_if 29 (;@9;) + i32.const 18596 + i32.load + local.get 3 + local.get 0 + call 8 + br 34 (;@4;) + end + local.get 1 + local.get 0 + i32.const 107 + i32.ne + i32.or + br_if 29 (;@8;) + i32.const 4196 + i32.load + local.tee 0 + i32.load16_u offset=2 + i32.const 101 + i32.ne + br_if 29 (;@8;) + local.get 0 + i32.load16_u offset=4 + i32.const 121 + i32.ne + br_if 29 (;@8;) + local.get 0 + i32.load16_u offset=6 + i32.const 115 + i32.ne + br_if 29 (;@8;) + local.get 0 + i32.const 6 + i32.add + local.set 7 + i32.const 4196 + local.get 0 + i32.const 8 + i32.add + i32.store + call 4 + i32.const 40 + i32.ne + br_if 29 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + i32.const 4196 + i32.load + local.set 5 + call 9 + i32.eqz + br_if 29 (;@8;) + i32.const 4196 + i32.load + call 4 + i32.const 41 + i32.ne + br_if 29 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + local.tee 7 + i32.const 2 + i32.add + i32.store + call 4 + i32.const 46 + i32.ne + br_if 29 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + i32.const 102 + i32.ne + br_if 29 (;@8;) + i32.const 4196 + i32.load + local.tee 0 + i32.load16_u offset=2 + i32.const 111 + i32.ne + br_if 29 (;@8;) + local.get 0 + i32.load16_u offset=4 + i32.const 114 + i32.ne + br_if 29 (;@8;) + local.get 0 + i32.load16_u offset=6 + i32.const 69 + i32.ne + br_if 29 (;@8;) + local.get 0 + i32.load16_u offset=8 + i32.const 97 + i32.ne + br_if 29 (;@8;) + local.get 0 + i32.load16_u offset=10 + i32.const 99 + i32.ne + br_if 29 (;@8;) + local.get 0 + i32.load16_u offset=12 + i32.const 104 + i32.ne + br_if 29 (;@8;) + i32.const 4196 + local.get 0 + i32.const 14 + i32.add + i32.store + call 4 + i32.const 4196 + i32.load + local.tee 3 + i32.const 2 + i32.sub + local.set 7 + i32.const 40 + i32.ne + br_if 29 (;@8;) + i32.const 4196 + local.get 3 + i32.const 2 + i32.add + i32.store + call 4 + i32.const 102 + i32.ne + br_if 29 (;@8;) + i32.const 4196 + i32.load + local.tee 0 + i32.load16_u offset=2 + i32.const 117 + i32.ne + br_if 29 (;@8;) + local.get 0 + i32.load16_u offset=4 + i32.const 110 + i32.ne + br_if 29 (;@8;) + local.get 0 + i32.load16_u offset=6 + i32.const 99 + i32.ne + br_if 29 (;@8;) + local.get 0 + i32.load16_u offset=8 + i32.const 116 + i32.ne + br_if 29 (;@8;) + local.get 0 + i32.load16_u offset=10 + i32.const 105 + i32.ne + br_if 29 (;@8;) + local.get 0 + i32.load16_u offset=12 + i32.const 111 + i32.ne + br_if 29 (;@8;) + local.get 0 + i32.load16_u offset=14 + i32.const 110 + i32.ne + br_if 29 (;@8;) + i32.const 4196 + local.get 0 + i32.const 16 + i32.add + i32.store + call 4 + i32.const 40 + i32.ne + br_if 29 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + i32.const 4196 + i32.load + local.set 3 + call 9 + i32.eqz + br_if 29 (;@8;) + i32.const 4196 + i32.load + local.set 0 + call 4 + i32.const 41 + i32.ne + br_if 29 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + i32.const 123 + i32.ne + br_if 29 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + i32.const 105 + i32.ne + br_if 29 (;@8;) + i32.const 4196 + i32.load + local.tee 1 + i32.load16_u offset=2 + i32.const 102 + i32.ne + br_if 29 (;@8;) + i32.const 4196 + local.get 1 + i32.const 4 + i32.add + i32.store + call 4 + i32.const 40 + i32.ne + br_if 29 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + drop + i32.const 4196 + i32.load + local.tee 6 + local.get 3 + local.get 0 + local.get 3 + i32.sub + i32.const 1 + i32.shr_s + local.tee 1 + call 10 + i32.eqz + br_if 29 (;@8;) + local.get 5 + i32.sub + i32.const 1 + i32.shr_s + local.set 4 + i32.const 4196 + local.get 6 + local.get 1 + i32.const 1 + i32.shl + local.tee 2 + i32.add + i32.store + block ;; label = @38 + block ;; label = @39 + block ;; label = @40 + call 4 + local.tee 0 + i32.const 33 + i32.ne + if ;; label = @41 + local.get 0 + i32.const 61 + i32.ne + br_if 33 (;@8;) + i32.const 4196 + i32.load + local.tee 0 + i32.load16_u offset=2 + i32.const 61 + i32.ne + br_if 33 (;@8;) + local.get 0 + i32.load16_u offset=4 + i32.const 61 + i32.ne + br_if 33 (;@8;) + i32.const 4196 + local.get 0 + i32.const 6 + i32.add + i32.store + call 4 + local.tee 6 + i32.const 39 + i32.ne + local.get 6 + i32.const 34 + i32.ne + i32.and + br_if 33 (;@8;) + i32.const 4196 + i32.load + local.tee 0 + i32.load16_u offset=2 + i32.const 100 + i32.ne + br_if 33 (;@8;) + local.get 0 + i32.load16_u offset=4 + i32.const 101 + i32.ne + br_if 33 (;@8;) + local.get 0 + i32.load16_u offset=6 + i32.const 102 + i32.ne + br_if 33 (;@8;) + local.get 0 + i32.load16_u offset=8 + i32.const 97 + i32.ne + br_if 33 (;@8;) + local.get 0 + i32.load16_u offset=10 + i32.const 117 + i32.ne + br_if 33 (;@8;) + local.get 0 + i32.load16_u offset=12 + i32.const 108 + i32.ne + br_if 33 (;@8;) + local.get 0 + i32.load16_u offset=14 + i32.const 116 + i32.ne + br_if 33 (;@8;) + i32.const 4196 + local.get 0 + i32.const 16 + i32.add + i32.store + call 4 + local.get 6 + i32.ne + br_if 33 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + i32.const 124 + i32.ne + br_if 33 (;@8;) + i32.const 4196 + i32.load + local.tee 0 + i32.load16_u offset=2 + i32.const 124 + i32.ne + br_if 33 (;@8;) + i32.const 4196 + local.get 0 + i32.const 4 + i32.add + i32.store + call 4 + drop + i32.const 4196 + i32.load + local.tee 0 + local.get 3 + local.get 1 + call 10 + i32.eqz + br_if 33 (;@8;) + i32.const 4196 + local.get 0 + local.get 2 + i32.add + i32.store + call 4 + i32.const 61 + i32.ne + br_if 33 (;@8;) + i32.const 4196 + i32.load + local.tee 0 + i32.load16_u offset=2 + i32.const 61 + i32.ne + br_if 33 (;@8;) + local.get 0 + i32.load16_u offset=4 + i32.const 61 + i32.ne + br_if 33 (;@8;) + i32.const 4196 + local.get 0 + i32.const 6 + i32.add + i32.store + call 4 + local.tee 6 + i32.const 39 + i32.ne + local.get 6 + i32.const 34 + i32.ne + i32.and + br_if 33 (;@8;) + i32.const 4196 + i32.load + local.tee 0 + i32.load16_u offset=2 + i32.const 95 + i32.ne + br_if 33 (;@8;) + local.get 0 + i32.load16_u offset=4 + i32.const 95 + i32.ne + br_if 33 (;@8;) + local.get 0 + i32.load16_u offset=6 + i32.const 101 + i32.ne + br_if 33 (;@8;) + local.get 0 + i32.load16_u offset=8 + i32.const 115 + i32.ne + br_if 33 (;@8;) + local.get 0 + i32.load16_u offset=10 + i32.const 77 + i32.ne + br_if 33 (;@8;) + local.get 0 + i32.load16_u offset=12 + i32.const 111 + i32.ne + br_if 33 (;@8;) + local.get 0 + i32.load16_u offset=14 + i32.const 100 + i32.ne + br_if 33 (;@8;) + local.get 0 + i32.load16_u offset=16 + i32.const 117 + i32.ne + br_if 33 (;@8;) + local.get 0 + i32.load16_u offset=18 + i32.const 108 + i32.ne + br_if 33 (;@8;) + local.get 0 + i32.load16_u offset=20 + i32.const 101 + i32.ne + br_if 33 (;@8;) + i32.const 4196 + local.get 0 + i32.const 22 + i32.add + i32.store + call 4 + local.get 6 + i32.ne + br_if 33 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + i32.const 41 + i32.ne + br_if 33 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + i32.const 114 + i32.ne + br_if 33 (;@8;) + i32.const 4196 + i32.load + local.tee 0 + i32.load16_u offset=2 + i32.const 101 + i32.ne + br_if 33 (;@8;) + local.get 0 + i32.load16_u offset=4 + i32.const 116 + i32.ne + br_if 33 (;@8;) + local.get 0 + i32.load16_u offset=6 + i32.const 117 + i32.ne + br_if 33 (;@8;) + local.get 0 + i32.load16_u offset=8 + i32.const 114 + i32.ne + br_if 33 (;@8;) + local.get 0 + i32.load16_u offset=10 + i32.const 110 + i32.ne + br_if 33 (;@8;) + i32.const 4196 + local.get 0 + i32.const 12 + i32.add + i32.store + call 4 + i32.const 59 + i32.eq + if ;; label = @42 + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + end + call 4 + local.tee 0 + i32.const 105 + i32.ne + br_if 3 (;@38;) + i32.const 105 + local.set 0 + i32.const 4196 + i32.load + local.tee 6 + i32.load16_u offset=2 + i32.const 102 + i32.ne + br_if 3 (;@38;) + i32.const 4196 + local.get 6 + i32.const 4 + i32.add + i32.store + call 4 + i32.const 40 + i32.ne + br_if 33 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + local.tee 0 + i32.store + local.get 3 + local.get 1 + call 11 + if ;; label = @42 + call 4 + i32.const 41 + i32.ne + br_if 34 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + i32.const 114 + i32.ne + br_if 34 (;@8;) + i32.const 4196 + i32.load + local.tee 0 + i32.load16_u offset=2 + i32.const 101 + i32.ne + br_if 34 (;@8;) + local.get 0 + i32.load16_u offset=4 + i32.const 116 + i32.ne + br_if 34 (;@8;) + local.get 0 + i32.load16_u offset=6 + i32.const 117 + i32.ne + br_if 34 (;@8;) + local.get 0 + i32.load16_u offset=8 + i32.const 114 + i32.ne + br_if 34 (;@8;) + local.get 0 + i32.load16_u offset=10 + i32.const 110 + i32.ne + br_if 34 (;@8;) + i32.const 4196 + local.get 0 + i32.const 12 + i32.add + i32.store + call 4 + i32.const 59 + i32.eq + if ;; label = @43 + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + end + call 4 + local.tee 0 + i32.const 105 + i32.ne + br_if 4 (;@38;) + i32.const 105 + local.set 0 + i32.const 4196 + i32.load + local.tee 6 + i32.load16_u offset=2 + i32.const 102 + i32.ne + br_if 4 (;@38;) + i32.const 4196 + local.get 6 + i32.const 4 + i32.add + i32.store + call 4 + i32.const 40 + i32.ne + br_if 34 (;@8;) + i32.const 4196 + i32.load + i32.const 2 + i32.add + local.set 0 + end + i32.const 4196 + local.get 0 + i32.store + local.get 0 + local.get 3 + local.get 1 + call 10 + i32.eqz + br_if 33 (;@8;) + i32.const 4196 + local.get 0 + local.get 2 + i32.add + i32.store + call 4 + i32.const 105 + i32.ne + br_if 33 (;@8;) + i32.const 4196 + i32.load + local.tee 0 + i32.load16_u offset=2 + i32.const 110 + i32.ne + br_if 33 (;@8;) + local.get 0 + i32.load16_u offset=4 + i32.const 32 + i32.ne + br_if 33 (;@8;) + i32.const 4196 + local.get 0 + i32.const 6 + i32.add + i32.store + call 4 + call 6 + i32.eqz + br_if 33 (;@8;) + call 4 + i32.const 38 + i32.ne + br_if 33 (;@8;) + i32.const 4196 + i32.load + local.tee 0 + i32.load16_u offset=2 + i32.const 38 + i32.ne + br_if 33 (;@8;) + i32.const 4196 + local.get 0 + i32.const 4 + i32.add + i32.store + call 4 + call 6 + i32.eqz + br_if 33 (;@8;) + call 4 + i32.const 91 + i32.ne + br_if 33 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + drop + i32.const 4196 + i32.load + local.tee 0 + local.get 3 + local.get 1 + call 10 + i32.eqz + br_if 33 (;@8;) + i32.const 4196 + local.get 0 + local.get 2 + i32.add + i32.store + call 4 + i32.const 93 + i32.ne + br_if 33 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + i32.const 61 + i32.ne + br_if 33 (;@8;) + i32.const 4196 + i32.load + local.tee 0 + i32.load16_u offset=2 + i32.const 61 + i32.ne + br_if 33 (;@8;) + local.get 0 + i32.load16_u offset=4 + i32.const 61 + i32.ne + br_if 33 (;@8;) + i32.const 4196 + local.get 0 + i32.const 6 + i32.add + i32.store + call 4 + drop + i32.const 4196 + i32.load + local.tee 0 + local.get 5 + local.get 4 + call 10 + i32.eqz + br_if 33 (;@8;) + i32.const 4196 + local.get 0 + local.get 4 + i32.const 1 + i32.shl + i32.add + i32.store + call 4 + i32.const 91 + i32.ne + br_if 33 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + drop + i32.const 4196 + i32.load + local.tee 0 + local.get 3 + local.get 1 + call 10 + i32.eqz + br_if 33 (;@8;) + i32.const 4196 + local.get 0 + local.get 2 + i32.add + i32.store + call 4 + i32.const 93 + i32.ne + br_if 33 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + i32.const 41 + i32.ne + br_if 33 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + i32.const 114 + i32.ne + br_if 33 (;@8;) + i32.const 4196 + i32.load + local.tee 0 + i32.load16_u offset=2 + i32.const 101 + i32.ne + br_if 33 (;@8;) + local.get 0 + i32.load16_u offset=4 + i32.const 116 + i32.ne + br_if 33 (;@8;) + local.get 0 + i32.load16_u offset=6 + i32.const 117 + i32.ne + br_if 33 (;@8;) + local.get 0 + i32.load16_u offset=8 + i32.const 114 + i32.ne + br_if 33 (;@8;) + local.get 0 + i32.load16_u offset=10 + i32.const 110 + i32.ne + br_if 33 (;@8;) + i32.const 4196 + local.get 0 + i32.const 12 + i32.add + i32.store + call 4 + i32.const 59 + i32.eq + br_if 1 (;@40;) + br 2 (;@39;) + end + i32.const 4196 + i32.load + local.tee 0 + i32.load16_u offset=2 + i32.const 61 + i32.ne + br_if 32 (;@8;) + local.get 0 + i32.load16_u offset=4 + i32.const 61 + i32.ne + br_if 32 (;@8;) + i32.const 4196 + local.get 0 + i32.const 6 + i32.add + i32.store + call 4 + local.tee 6 + i32.const 39 + i32.ne + local.get 6 + i32.const 34 + i32.ne + i32.and + br_if 32 (;@8;) + i32.const 4196 + i32.load + local.tee 0 + i32.load16_u offset=2 + i32.const 100 + i32.ne + br_if 32 (;@8;) + local.get 0 + i32.load16_u offset=4 + i32.const 101 + i32.ne + br_if 32 (;@8;) + local.get 0 + i32.load16_u offset=6 + i32.const 102 + i32.ne + br_if 32 (;@8;) + local.get 0 + i32.load16_u offset=8 + i32.const 97 + i32.ne + br_if 32 (;@8;) + local.get 0 + i32.load16_u offset=10 + i32.const 117 + i32.ne + br_if 32 (;@8;) + local.get 0 + i32.load16_u offset=12 + i32.const 108 + i32.ne + br_if 32 (;@8;) + local.get 0 + i32.load16_u offset=14 + i32.const 116 + i32.ne + br_if 32 (;@8;) + i32.const 4196 + local.get 0 + i32.const 16 + i32.add + i32.store + call 4 + local.get 6 + i32.ne + br_if 32 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + local.tee 0 + i32.const 38 + i32.eq + if (result i32) ;; label = @41 + i32.const 4196 + i32.load + local.tee 0 + i32.load16_u offset=2 + i32.const 38 + i32.ne + br_if 33 (;@8;) + i32.const 4196 + local.get 0 + i32.const 4 + i32.add + i32.store + call 4 + i32.const 33 + i32.ne + br_if 33 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + block ;; label = @42 + block ;; label = @43 + call 4 + local.tee 6 + i32.const 79 + i32.ne + br_if 0 (;@43;) + i32.const 4196 + i32.load + local.tee 0 + i32.load16_u offset=2 + i32.const 98 + i32.ne + br_if 0 (;@43;) + local.get 0 + i32.load16_u offset=4 + i32.const 106 + i32.ne + br_if 0 (;@43;) + local.get 0 + i32.load16_u offset=6 + i32.const 101 + i32.ne + br_if 0 (;@43;) + local.get 0 + i32.load16_u offset=8 + i32.const 99 + i32.ne + br_if 0 (;@43;) + local.get 0 + i32.load16_u offset=10 + i32.const 116 + i32.ne + br_if 0 (;@43;) + local.get 0 + i32.load16_u offset=12 + i32.const 46 + i32.ne + br_if 0 (;@43;) + local.get 3 + local.get 1 + call 11 + br_if 1 (;@42;) + br 35 (;@8;) + end + local.get 6 + call 9 + i32.eqz + br_if 0 (;@42;) + call 4 + i32.const 46 + i32.ne + br_if 34 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + i32.const 104 + i32.ne + br_if 34 (;@8;) + i32.const 4196 + i32.load + local.tee 0 + i32.load16_u offset=2 + i32.const 97 + i32.ne + br_if 34 (;@8;) + local.get 0 + i32.load16_u offset=4 + i32.const 115 + i32.ne + br_if 34 (;@8;) + local.get 0 + i32.load16_u offset=6 + i32.const 79 + i32.ne + br_if 34 (;@8;) + local.get 0 + i32.load16_u offset=8 + i32.const 119 + i32.ne + br_if 34 (;@8;) + local.get 0 + i32.load16_u offset=10 + i32.const 110 + i32.ne + br_if 34 (;@8;) + local.get 0 + i32.load16_u offset=12 + i32.const 80 + i32.ne + br_if 34 (;@8;) + local.get 0 + i32.load16_u offset=14 + i32.const 114 + i32.ne + br_if 34 (;@8;) + local.get 0 + i32.load16_u offset=16 + i32.const 111 + i32.ne + br_if 34 (;@8;) + local.get 0 + i32.load16_u offset=18 + i32.const 112 + i32.ne + br_if 34 (;@8;) + local.get 0 + i32.load16_u offset=20 + i32.const 101 + i32.ne + br_if 34 (;@8;) + local.get 0 + i32.load16_u offset=22 + i32.const 114 + i32.ne + br_if 34 (;@8;) + local.get 0 + i32.load16_u offset=24 + i32.const 116 + i32.ne + br_if 34 (;@8;) + local.get 0 + i32.load16_u offset=26 + i32.const 121 + i32.ne + br_if 34 (;@8;) + i32.const 4196 + local.get 0 + i32.const 28 + i32.add + i32.store + call 4 + i32.const 40 + i32.ne + br_if 34 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + drop + i32.const 4196 + i32.load + local.tee 0 + local.get 3 + local.get 1 + call 10 + i32.eqz + br_if 34 (;@8;) + i32.const 4196 + local.get 0 + local.get 2 + i32.add + i32.store + call 4 + i32.const 41 + i32.ne + br_if 34 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + end + call 4 + else + local.get 0 + end + i32.const 41 + i32.ne + br_if 32 (;@8;) + end + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + end + call 4 + local.set 0 + end + block ;; label = @38 + block ;; label = @39 + local.get 0 + call 6 + if ;; label = @40 + call 4 + i32.const 91 + i32.ne + br_if 32 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + drop + i32.const 4196 + i32.load + local.tee 0 + local.get 3 + local.get 1 + call 10 + i32.eqz + br_if 32 (;@8;) + i32.const 4196 + local.get 0 + local.get 2 + i32.add + i32.store + call 4 + i32.const 93 + i32.ne + br_if 32 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + i32.const 61 + i32.ne + br_if 32 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + drop + i32.const 4196 + i32.load + local.tee 0 + local.get 5 + local.get 4 + call 10 + i32.eqz + br_if 32 (;@8;) + i32.const 4196 + local.get 0 + local.get 4 + i32.const 1 + i32.shl + i32.add + i32.store + call 4 + i32.const 91 + i32.ne + br_if 32 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + drop + i32.const 4196 + i32.load + local.tee 0 + local.get 3 + local.get 1 + call 10 + i32.eqz + br_if 32 (;@8;) + i32.const 4196 + local.get 0 + local.get 2 + i32.add + i32.store + call 4 + i32.const 93 + i32.ne + br_if 32 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + local.tee 0 + i32.const 59 + i32.eq + br_if 1 (;@39;) + br 2 (;@38;) + end + local.get 0 + i32.const 79 + i32.ne + br_if 31 (;@8;) + i32.const 4196 + i32.load + local.tee 0 + i32.load16_u offset=2 + i32.const 98 + i32.ne + br_if 31 (;@8;) + local.get 0 + i32.load16_u offset=4 + i32.const 106 + i32.ne + br_if 31 (;@8;) + local.get 0 + i32.load16_u offset=6 + i32.const 101 + i32.ne + br_if 31 (;@8;) + local.get 0 + i32.load16_u offset=8 + i32.const 99 + i32.ne + br_if 31 (;@8;) + local.get 0 + i32.load16_u offset=10 + i32.const 116 + i32.ne + br_if 31 (;@8;) + i32.const 4196 + local.get 0 + i32.const 12 + i32.add + i32.store + call 4 + i32.const 46 + i32.ne + br_if 31 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + i32.const 100 + i32.ne + br_if 31 (;@8;) + i32.const 4196 + i32.load + local.tee 0 + i32.load16_u offset=2 + i32.const 101 + i32.ne + br_if 31 (;@8;) + local.get 0 + i32.load16_u offset=4 + i32.const 102 + i32.ne + br_if 31 (;@8;) + local.get 0 + i32.load16_u offset=6 + i32.const 105 + i32.ne + br_if 31 (;@8;) + local.get 0 + i32.load16_u offset=8 + i32.const 110 + i32.ne + br_if 31 (;@8;) + local.get 0 + i32.load16_u offset=10 + i32.const 101 + i32.ne + br_if 31 (;@8;) + local.get 0 + i32.load16_u offset=12 + i32.const 80 + i32.ne + br_if 31 (;@8;) + local.get 0 + i32.load16_u offset=14 + i32.const 114 + i32.ne + br_if 31 (;@8;) + local.get 0 + i32.load16_u offset=16 + i32.const 111 + i32.ne + br_if 31 (;@8;) + local.get 0 + i32.load16_u offset=18 + i32.const 112 + i32.ne + br_if 31 (;@8;) + local.get 0 + i32.load16_u offset=20 + i32.const 101 + i32.ne + br_if 31 (;@8;) + local.get 0 + i32.load16_u offset=22 + i32.const 114 + i32.ne + br_if 31 (;@8;) + local.get 0 + i32.load16_u offset=24 + i32.const 116 + i32.ne + br_if 31 (;@8;) + local.get 0 + i32.load16_u offset=26 + i32.const 121 + i32.ne + br_if 31 (;@8;) + i32.const 4196 + local.get 0 + i32.const 28 + i32.add + i32.store + call 4 + i32.const 40 + i32.ne + br_if 31 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + call 6 + i32.eqz + br_if 31 (;@8;) + call 4 + i32.const 44 + i32.ne + br_if 31 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + drop + i32.const 4196 + i32.load + local.tee 0 + local.get 3 + local.get 1 + call 10 + i32.eqz + br_if 31 (;@8;) + i32.const 4196 + local.get 0 + local.get 2 + i32.add + i32.store + call 4 + i32.const 44 + i32.ne + br_if 31 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + i32.const 123 + i32.ne + br_if 31 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + i32.const 101 + i32.ne + br_if 31 (;@8;) + i32.const 4196 + i32.load + local.tee 0 + i32.load16_u offset=2 + i32.const 110 + i32.ne + br_if 31 (;@8;) + local.get 0 + i32.load16_u offset=4 + i32.const 117 + i32.ne + br_if 31 (;@8;) + local.get 0 + i32.load16_u offset=6 + i32.const 109 + i32.ne + br_if 31 (;@8;) + local.get 0 + i32.load16_u offset=8 + i32.const 101 + i32.ne + br_if 31 (;@8;) + local.get 0 + i32.load16_u offset=10 + i32.const 114 + i32.ne + br_if 31 (;@8;) + local.get 0 + i32.load16_u offset=12 + i32.const 97 + i32.ne + br_if 31 (;@8;) + local.get 0 + i32.load16_u offset=14 + i32.const 98 + i32.ne + br_if 31 (;@8;) + local.get 0 + i32.load16_u offset=16 + i32.const 108 + i32.ne + br_if 31 (;@8;) + local.get 0 + i32.load16_u offset=18 + i32.const 101 + i32.ne + br_if 31 (;@8;) + i32.const 4196 + local.get 0 + i32.const 20 + i32.add + i32.store + call 4 + i32.const 58 + i32.ne + br_if 31 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + i32.const 4196 + block (result i32) ;; label = @40 + block ;; label = @41 + call 4 + local.tee 6 + i32.const 116 + i32.ne + br_if 0 (;@41;) + i32.const 4196 + i32.load + local.tee 0 + i32.load16_u offset=2 + i32.const 114 + i32.ne + br_if 0 (;@41;) + local.get 0 + i32.load16_u offset=4 + i32.const 117 + i32.ne + br_if 0 (;@41;) + local.get 0 + i32.load16_u offset=6 + i32.const 101 + i32.ne + br_if 0 (;@41;) + local.get 0 + i32.const 8 + i32.add + br 1 (;@40;) + end + local.get 6 + i32.const 33 + i32.ne + br_if 32 (;@8;) + i32.const 4220 + i32.load8_u + i32.eqz + br_if 32 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + i32.const 48 + i32.ne + br_if 32 (;@8;) + i32.const 4196 + i32.load + i32.const 2 + i32.add + end + i32.store + call 4 + i32.const 44 + i32.ne + br_if 31 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + i32.const 103 + i32.ne + br_if 31 (;@8;) + i32.const 4196 + i32.load + local.tee 0 + i32.load16_u offset=2 + i32.const 101 + i32.ne + br_if 31 (;@8;) + local.get 0 + i32.load16_u offset=4 + i32.const 116 + i32.ne + br_if 31 (;@8;) + i32.const 4196 + local.get 0 + i32.const 6 + i32.add + i32.store + call 4 + local.tee 0 + i32.const 58 + i32.eq + if (result i32) ;; label = @40 + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + i32.const 102 + i32.ne + br_if 32 (;@8;) + i32.const 4196 + i32.load + local.tee 0 + i32.load16_u offset=2 + i32.const 117 + i32.ne + br_if 32 (;@8;) + local.get 0 + i32.load16_u offset=4 + i32.const 110 + i32.ne + br_if 32 (;@8;) + local.get 0 + i32.load16_u offset=6 + i32.const 99 + i32.ne + br_if 32 (;@8;) + local.get 0 + i32.load16_u offset=8 + i32.const 116 + i32.ne + br_if 32 (;@8;) + local.get 0 + i32.load16_u offset=10 + i32.const 105 + i32.ne + br_if 32 (;@8;) + local.get 0 + i32.load16_u offset=12 + i32.const 111 + i32.ne + br_if 32 (;@8;) + local.get 0 + i32.load16_u offset=14 + i32.const 110 + i32.ne + br_if 32 (;@8;) + i32.const 4196 + local.get 0 + i32.const 16 + i32.add + local.tee 0 + i32.store + call 4 + local.tee 6 + i32.const 40 + i32.ne + if ;; label = @41 + local.get 0 + i32.const 4196 + i32.load + i32.eq + br_if 33 (;@8;) + local.get 6 + call 9 + i32.eqz + br_if 33 (;@8;) + end + call 4 + else + local.get 0 + end + i32.const 40 + i32.ne + br_if 31 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + i32.const 41 + i32.ne + br_if 31 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + i32.const 123 + i32.ne + br_if 31 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + i32.const 114 + i32.ne + br_if 31 (;@8;) + i32.const 4196 + i32.load + local.tee 0 + i32.load16_u offset=2 + i32.const 101 + i32.ne + br_if 31 (;@8;) + local.get 0 + i32.load16_u offset=4 + i32.const 116 + i32.ne + br_if 31 (;@8;) + local.get 0 + i32.load16_u offset=6 + i32.const 117 + i32.ne + br_if 31 (;@8;) + local.get 0 + i32.load16_u offset=8 + i32.const 114 + i32.ne + br_if 31 (;@8;) + local.get 0 + i32.load16_u offset=10 + i32.const 110 + i32.ne + br_if 31 (;@8;) + i32.const 4196 + local.get 0 + i32.const 12 + i32.add + i32.store + call 4 + drop + i32.const 4196 + i32.load + local.tee 0 + local.get 5 + local.get 4 + call 10 + i32.eqz + br_if 31 (;@8;) + i32.const 4196 + local.get 0 + local.get 4 + i32.const 1 + i32.shl + i32.add + i32.store + call 4 + i32.const 91 + i32.ne + br_if 31 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + drop + i32.const 4196 + i32.load + local.tee 0 + local.get 3 + local.get 1 + call 10 + i32.eqz + br_if 31 (;@8;) + i32.const 4196 + local.get 0 + local.get 2 + i32.add + i32.store + call 4 + i32.const 93 + i32.ne + br_if 31 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + local.tee 0 + i32.const 59 + i32.eq + if (result i32) ;; label = @40 + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + else + local.get 0 + end + i32.const 125 + i32.ne + br_if 31 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + local.tee 0 + i32.const 44 + i32.eq + if (result i32) ;; label = @40 + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + else + local.get 0 + end + i32.const 125 + i32.ne + br_if 31 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + i32.const 41 + i32.ne + br_if 31 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + local.tee 0 + i32.const 59 + i32.ne + br_if 1 (;@38;) + end + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + local.set 0 + end + local.get 0 + i32.const 125 + i32.ne + br_if 29 (;@8;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + i32.const 41 + i32.ne + br_if 29 (;@8;) + i32.const 18588 + local.set 0 + loop ;; label = @38 + local.get 0 + i32.load + local.tee 0 + i32.eqz + br_if 34 (;@4;) + block ;; label = @39 + local.get 4 + local.get 0 + i32.load offset=12 + local.get 0 + i32.load offset=8 + local.tee 3 + i32.sub + i32.const 1 + i32.shr_s + i32.ne + br_if 0 (;@39;) + local.get 5 + local.get 3 + local.get 4 + call 10 + i32.eqz + br_if 0 (;@39;) + i32.const 18596 + i32.load + i32.const 12 + i32.add + local.get 0 + i32.load + local.get 0 + i32.load offset=4 + call 8 + br 31 (;@8;) + end + local.get 0 + i32.const 16 + i32.add + local.set 0 + br 0 (;@38;) + end + unreachable + end + local.get 1 + i32.const 2048 + i32.ne + br_if 15 (;@21;) + i32.const 4224 + i32.load + local.tee 1 + br_if 25 (;@11;) + br 23 (;@13;) + end + i32.const 4221 + i32.load8_u + i32.eqz + br_if 32 (;@3;) + local.get 1 + i32.const 2048 + i32.ne + br_if 1 (;@34;) + i32.const 4224 + i32.load + local.tee 1 + i32.eqz + br_if 22 (;@13;) + br 24 (;@11;) + end + i32.const 4221 + i32.load8_u + i32.eqz + br_if 31 (;@3;) + end + local.get 1 + i32.const 16520 + i32.add + i32.const 0 + i32.store8 + i32.const 4214 + local.get 1 + i32.const 1 + i32.add + i32.store16 + local.get 1 + i32.const 2 + i32.shl + i32.const 8328 + i32.add + i32.const 4204 + i32.load + i32.store + br 30 (;@3;) + end + i32.const 4221 + i32.load8_u + i32.eqz + br_if 29 (;@3;) + i32.const 4214 + local.get 1 + i32.const 1 + i32.sub + i32.store16 + br 29 (;@3;) + end + i32.const 4221 + i32.load8_u + i32.eqz + br_if 28 (;@3;) + i32.const 4224 + i32.load + local.tee 1 + br_if 20 (;@11;) + br 17 (;@14;) + end + i32.const 4221 + i32.load8_u + i32.eqz + br_if 27 (;@3;) + local.get 1 + i32.const 16519 + i32.add + i32.load8_u + i32.const 2 + i32.and + i32.eqz + br_if 27 (;@3;) + br 15 (;@15;) + end + i32.const 4224 + i32.load + local.tee 1 + i32.eqz + br_if 15 (;@14;) + br 18 (;@11;) + end + i32.const 4214 + local.get 1 + i32.const 1 + i32.sub + local.tee 3 + i32.store16 + local.get 3 + i32.const 65535 + i32.and + i32.const 2 + i32.shl + i32.const 8328 + i32.add + i32.load + local.set 8 + br 12 (;@16;) + end + local.get 1 + i32.const 2048 + i32.ne + br_if 0 (;@27;) + i32.const 4224 + i32.load + local.tee 1 + i32.eqz + br_if 14 (;@13;) + br 16 (;@11;) + end + local.get 1 + i32.const 16520 + i32.add + i32.const 0 + i32.store8 + local.get 1 + i32.const 2 + i32.shl + i32.const 8328 + i32.add + i32.const 4204 + i32.load + i32.store + i32.const 4214 + local.get 1 + i32.const 1 + i32.add + local.tee 3 + i32.store16 + local.get 3 + i32.const 65535 + i32.and + i32.const 16519 + i32.add + local.tee 3 + i32.const 4219 + i32.load8_u + local.tee 1 + i32.store8 + i32.const 4219 + i32.const 0 + i32.store8 + i32.const 4221 + i32.load8_u + i32.eqz + br_if 23 (;@3;) + local.get 0 + i32.const 4208 + i32.load + i32.ne + br_if 23 (;@3;) + local.get 3 + local.get 1 + i32.const 2 + i32.or + i32.store8 + i32.const 4208 + i32.const 4188 + i32.load + i32.const 2 + i32.sub + i32.store + br 11 (;@15;) + end + i32.const 4224 + i32.load + local.tee 1 + br_if 14 (;@11;) + i32.const 2 + br 13 (;@12;) + end + i32.const 4214 + local.get 1 + i32.const 1 + i32.sub + local.tee 2 + i32.store16 + local.get 1 + i32.const 16519 + i32.add + i32.load8_u + local.set 14 + local.get 1 + i32.const 2 + i32.shl + i32.const 8324 + i32.add + i32.load + local.set 8 + i32.const 4216 + i32.load16_u + local.tee 3 + local.get 1 + i32.eq + if ;; label = @25 + i32.const 4212 + i32.const 4212 + i32.load16_u + i32.const 1 + i32.sub + local.tee 3 + i32.store16 + i32.const 4216 + local.get 3 + i32.const 65535 + i32.and + i32.const 1 + i32.shl + i32.const 4232 + i32.add + i32.load16_u + i32.store16 + call 12 + br 9 (;@16;) + end + local.get 3 + i32.const 65535 + i32.eq + local.get 2 + i32.const 65535 + i32.and + local.get 3 + i32.ge_u + i32.or + br_if 8 (;@16;) + i32.const 4224 + i32.load + local.tee 1 + br_if 13 (;@11;) + i32.const 3 + br 12 (;@12;) + end + block ;; label = @24 + loop ;; label = @25 + block ;; label = @26 + local.get 0 + local.tee 3 + i32.const 2 + i32.add + local.set 0 + local.get 3 + local.get 10 + i32.ge_u + br_if 0 (;@26;) + local.get 0 + i32.load16_u + local.tee 1 + local.get 4 + i32.eq + br_if 2 (;@24;) + local.get 1 + i32.const 92 + i32.ne + if ;; label = @27 + local.get 1 + i32.const 10 + i32.sub + br_table 1 (;@26;) 2 (;@25;) 2 (;@25;) 1 (;@26;) 2 (;@25;) + end + local.get 3 + i32.const 4 + i32.add + local.set 0 + local.get 3 + i32.load16_u offset=4 + i32.const 13 + i32.ne + br_if 1 (;@25;) + local.get 3 + i32.const 6 + i32.add + local.get 0 + local.get 3 + i32.load16_u offset=6 + i32.const 10 + i32.eq + select + local.set 0 + br 1 (;@25;) + end + end + i32.const 4224 + i32.load + i32.eqz + if ;; label = @25 + i32.const 4224 + i32.const 9 + i32.store + i32.const 4228 + local.get 0 + i32.const 4188 + i32.load + i32.sub + i32.const 1 + i32.shr_s + i32.store + end + local.get 10 + i32.const 2 + i32.add + local.set 0 + end + i32.const 4196 + local.get 0 + i32.store + br 20 (;@3;) + end + local.get 2 + i32.const 4 + i32.add + local.set 3 + block ;; label = @23 + block ;; label = @24 + block ;; label = @25 + block ;; label = @26 + block ;; label = @27 + block ;; label = @28 + local.get 2 + i32.load16_u offset=4 + local.tee 2 + i32.const 47 + i32.ne + if ;; label = @29 + local.get 2 + i32.const 42 + i32.eq + br_if 1 (;@28;) + i32.const 4204 + i32.load + local.tee 5 + i32.load16_u + local.tee 6 + i32.const 33 + i32.sub + local.tee 3 + i32.const 5 + i32.le_u + i32.const 0 + i32.const 1 + local.get 3 + i32.shl + i32.const 49 + i32.and + select + br_if 5 (;@24;) + local.get 6 + i32.const 41 + i32.ne + local.get 6 + i32.const 40 + i32.sub + i32.const 65535 + i32.and + i32.const 7 + i32.lt_u + i32.and + br_if 3 (;@26;) + local.get 6 + i32.const 58 + i32.sub + i32.const 6 + i32.lt_u + br_if 5 (;@24;) + local.get 6 + i32.const 91 + i32.sub + br_table 5 (;@24;) 2 (;@27;) 2 (;@27;) 5 (;@24;) 2 (;@27;) + end + loop ;; label = @29 + local.get 3 + local.tee 0 + i32.const 2 + i32.sub + local.get 10 + i32.ge_u + br_if 12 (;@17;) + local.get 0 + i32.const 2 + i32.add + local.set 3 + local.get 0 + i32.load16_u + i32.const 10 + i32.sub + br_table 12 (;@17;) 0 (;@29;) 0 (;@29;) 12 (;@17;) 0 (;@29;) + end + unreachable + end + loop ;; label = @28 + local.get 3 + local.tee 0 + local.get 10 + i32.ge_u + br_if 10 (;@18;) + local.get 0 + i32.const 2 + i32.add + local.tee 3 + i32.load16_u + i32.const 42 + i32.ne + br_if 0 (;@28;) + local.get 0 + i32.const 4 + i32.add + local.tee 0 + i32.load16_u + i32.const 47 + i32.ne + br_if 0 (;@28;) + end + br 10 (;@17;) + end + local.get 6 + i32.const 125 + i32.eq + local.get 6 + i32.const 123 + i32.sub + i32.const 65535 + i32.and + i32.const 3 + i32.gt_u + i32.or + br_if 1 (;@25;) + end + block ;; label = @26 + block ;; label = @27 + block ;; label = @28 + local.get 6 + i32.const 43 + i32.sub + br_table 1 (;@27;) 4 (;@24;) 2 (;@26;) 0 (;@28;) 4 (;@24;) + end + local.get 5 + i32.const 2 + i32.sub + i32.load16_u + i32.const 48 + i32.sub + i32.const 65535 + i32.and + i32.const 10 + i32.lt_u + br_if 2 (;@25;) + br 3 (;@24;) + end + local.get 5 + i32.const 2 + i32.sub + i32.load16_u + i32.const 43 + i32.eq + br_if 1 (;@25;) + br 2 (;@24;) + end + local.get 5 + i32.const 2 + i32.sub + i32.load16_u + i32.const 45 + i32.ne + br_if 1 (;@24;) + end + 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 + local.get 5 + local.get 12 + i32.ne + br_if 0 (;@36;) + i32.const 0 + local.set 3 + block ;; label = @37 + local.get 6 + i32.const 100 + i32.sub + br_table 3 (;@34;) 4 (;@33;) 5 (;@32;) 12 (;@25;) 12 (;@25;) 12 (;@25;) 12 (;@25;) 12 (;@25;) 12 (;@25;) 12 (;@25;) 6 (;@31;) 7 (;@30;) 12 (;@25;) 12 (;@25;) 8 (;@29;) 12 (;@25;) 9 (;@28;) 12 (;@25;) 12 (;@25;) 10 (;@27;) 0 (;@37;) + end + local.get 6 + i32.const 125 + i32.ne + if ;; label = @37 + local.get 6 + i32.const 47 + i32.eq + br_if 2 (;@35;) + local.get 6 + i32.const 41 + i32.ne + br_if 12 (;@25;) + block ;; label = @38 + local.get 8 + i32.const 8 + i32.sub + local.tee 2 + i32.const 4188 + i32.load + local.tee 1 + i32.lt_u + br_if 0 (;@38;) + local.get 2 + i32.load16_u + i32.const 119 + i32.ne + br_if 0 (;@38;) + local.get 8 + i32.const 6 + i32.sub + i32.load16_u + i32.const 104 + i32.ne + br_if 0 (;@38;) + local.get 8 + i32.const 4 + i32.sub + i32.load16_u + i32.const 105 + i32.ne + br_if 0 (;@38;) + local.get 8 + i32.const 2 + i32.sub + i32.load16_u + i32.const 108 + i32.ne + br_if 0 (;@38;) + local.get 8 + i32.load16_u + i32.const 101 + i32.ne + br_if 0 (;@38;) + local.get 1 + local.get 2 + i32.eq + br_if 14 (;@24;) + local.get 8 + i32.const 10 + i32.sub + i32.load16_u + call 3 + br_if 14 (;@24;) + end + block ;; label = @38 + local.get 8 + i32.const 4 + i32.sub + local.tee 2 + local.get 1 + i32.lt_u + br_if 0 (;@38;) + local.get 2 + i32.load16_u + i32.const 102 + i32.ne + br_if 0 (;@38;) + local.get 8 + i32.const 2 + i32.sub + i32.load16_u + i32.const 111 + i32.ne + br_if 0 (;@38;) + local.get 8 + i32.load16_u + i32.const 114 + i32.ne + br_if 0 (;@38;) + local.get 1 + local.get 2 + i32.eq + br_if 14 (;@24;) + local.get 8 + i32.const 6 + i32.sub + i32.load16_u + call 3 + br_if 14 (;@24;) + end + local.get 8 + i32.const 2 + i32.sub + local.tee 4 + local.get 1 + i32.lt_u + br_if 12 (;@25;) + local.get 4 + i32.load16_u + i32.const 105 + i32.ne + br_if 12 (;@25;) + local.get 8 + i32.load16_u + i32.const 102 + i32.ne + br_if 12 (;@25;) + local.get 1 + local.get 4 + i32.eq + br_if 13 (;@24;) + local.get 2 + i32.load16_u + call 3 + i32.eqz + br_if 12 (;@25;) + br 13 (;@24;) + end + local.get 8 + call 13 + local.get 14 + i32.const 1 + i32.and + i32.or + br_if 12 (;@24;) + i32.const 4221 + i32.load8_u + i32.eqz + br_if 11 (;@25;) + i32.const 4188 + i32.load + local.tee 9 + i32.const 6 + i32.add + local.set 13 + local.get 9 + i32.const 2 + i32.sub + local.set 7 + local.get 8 + local.set 3 + loop ;; label = @37 + local.get 3 + local.get 9 + i32.lt_u + br_if 13 (;@24;) + local.get 1 + i32.const 65535 + i32.and + i32.eqz + local.get 3 + i32.load16_u + local.tee 2 + i32.const 123 + i32.ne + i32.or + i32.eqz + if ;; label = @38 + local.get 1 + i32.const 1 + i32.sub + local.tee 1 + i32.const 65535 + i32.and + i32.const 2 + i32.shl + i32.const 8328 + i32.add + i32.load + local.set 3 + br 1 (;@37;) + end + local.get 2 + i32.const 58 + i32.ne + if ;; label = @38 + local.get 2 + i32.const 125 + i32.eq + br_if 14 (;@24;) + local.get 3 + call 13 + i32.eqz + br_if 2 (;@36;) + br 14 (;@24;) + end + local.get 3 + local.get 9 + i32.eq + br_if 1 (;@36;) + local.get 3 + i32.const 2 + i32.sub + call 14 + local.tee 4 + local.get 9 + i32.lt_u + br_if 1 (;@36;) + block ;; label = @38 + local.get 4 + i32.load16_u + local.tee 11 + i32.const 34 + i32.eq + local.get 11 + i32.const 39 + i32.eq + i32.or + i32.eqz + if ;; label = @39 + i32.const 0 + local.set 11 + loop ;; label = @40 + local.get 4 + local.get 9 + i32.lt_u + br_if 2 (;@38;) + local.get 4 + i32.load16_u + local.tee 3 + i32.const 64512 + i32.and + i32.const 56320 + i32.ne + local.tee 2 + if (result i32) ;; label = @41 + local.get 3 + else + local.get 3 + i32.const 1023 + i32.and + local.get 4 + i32.const 2 + i32.sub + i32.load16_u + i32.const 1023 + i32.and + i32.const 10 + i32.shl + i32.or + i32.const 65536 + i32.add + end + call 15 + i32.eqz + br_if 2 (;@38;) + local.get 2 + i32.eqz + if ;; label = @41 + local.get 3 + i32.const 1023 + i32.and + local.get 4 + i32.const 2 + i32.sub + i32.load16_u + i32.const 1023 + i32.and + i32.const 10 + i32.shl + i32.or + i32.const 65536 + i32.add + local.set 3 + end + local.get 4 + local.get 9 + i32.sub + local.get 4 + i32.const -2 + i32.const -4 + local.get 3 + i32.const 65536 + i32.lt_u + local.tee 15 + select + i32.add + local.set 4 + local.get 3 + call 16 + local.set 11 + i32.const 1 + i32.shr_s + i32.const 1 + i32.const 2 + local.get 15 + select + i32.ge_u + br_if 0 (;@40;) + end + local.get 11 + i32.eqz + br_if 3 (;@36;) + br 15 (;@24;) + end + loop ;; label = @39 + local.get 4 + local.get 9 + i32.gt_u + if ;; label = @40 + local.get 4 + i32.const 2 + i32.sub + local.tee 4 + i32.load16_u + local.get 11 + i32.ne + br_if 1 (;@39;) + local.get 4 + local.set 3 + loop ;; label = @41 + local.get 9 + local.get 3 + local.tee 2 + i32.lt_u + if ;; label = @42 + local.get 2 + i32.const 2 + i32.sub + local.tee 3 + i32.load16_u + i32.const 92 + i32.eq + br_if 1 (;@41;) + end + end + local.get 4 + local.get 2 + i32.sub + i32.const 2 + i32.and + br_if 1 (;@39;) + end + end + local.get 4 + local.get 9 + i32.eq + br_if 2 (;@36;) + local.get 4 + i32.const 2 + i32.sub + local.set 4 + i32.const 0 + local.set 11 + end + block ;; label = @38 + block ;; label = @39 + local.get 4 + call 14 + local.tee 2 + local.get 9 + i32.lt_u + br_if 0 (;@39;) + block ;; label = @40 + local.get 2 + i32.load16_u + i32.const 43 + i32.sub + br_table 0 (;@40;) 1 (;@39;) 0 (;@40;) 1 (;@39;) + end + local.get 7 + local.set 3 + local.get 2 + local.get 9 + i32.eq + br_if 1 (;@38;) + local.get 2 + i32.const 2 + i32.sub + call 14 + local.set 2 + end + block ;; label = @39 + local.get 2 + local.get 9 + i32.lt_u + local.get 2 + local.get 13 + i32.lt_u + i32.or + br_if 0 (;@39;) + local.get 2 + i32.const 6 + i32.sub + i32.load16_u + i32.const 99 + i32.ne + br_if 0 (;@39;) + local.get 2 + i32.const 4 + i32.sub + i32.load16_u + i32.const 97 + i32.ne + br_if 0 (;@39;) + local.get 2 + i32.const 2 + i32.sub + i32.load16_u + i32.const 115 + i32.ne + br_if 0 (;@39;) + local.get 2 + i32.load16_u + i32.const 101 + i32.ne + br_if 0 (;@39;) + local.get 2 + local.get 13 + i32.eq + br_if 15 (;@24;) + local.get 2 + i32.const 8 + i32.sub + i32.load16_u + local.tee 3 + i32.const 64512 + i32.and + i32.const 56320 + i32.eq + if (result i32) ;; label = @40 + local.get 3 + i32.const 1023 + i32.and + local.get 2 + i32.const 10 + i32.sub + i32.load16_u + i32.const 1023 + i32.and + i32.const 10 + i32.shl + i32.or + i32.const 65536 + i32.add + else + local.get 3 + end + call 15 + local.get 3 + i32.const 46 + i32.eq + br_if 0 (;@39;) + local.get 2 + local.set 3 + i32.eqz + br_if 15 (;@24;) + br 1 (;@38;) + end + local.get 2 + local.set 3 + end + local.get 11 + i32.const 1 + i32.and + br_if 0 (;@37;) + end + end + i32.const 0 + local.set 3 + block ;; label = @36 + local.get 6 + i32.const 100 + i32.sub + br_table 2 (;@34;) 3 (;@33;) 4 (;@32;) 11 (;@25;) 11 (;@25;) 11 (;@25;) 11 (;@25;) 11 (;@25;) 11 (;@25;) 11 (;@25;) 5 (;@31;) 6 (;@30;) 11 (;@25;) 11 (;@25;) 7 (;@29;) 11 (;@25;) 8 (;@28;) 11 (;@25;) 11 (;@25;) 9 (;@27;) 0 (;@36;) + end + local.get 6 + i32.const 47 + i32.ne + br_if 10 (;@25;) + end + i32.const 4218 + i32.load8_u + i32.eqz + br_if 9 (;@25;) + br 10 (;@24;) + end + block ;; label = @34 + block ;; label = @35 + local.get 5 + i32.const 2 + i32.sub + i32.load16_u + i32.const 105 + i32.sub + br_table 0 (;@35;) 10 (;@25;) 10 (;@25;) 1 (;@34;) 10 (;@25;) + end + local.get 5 + i32.const 6 + i32.sub + local.tee 1 + i32.const 4188 + i32.load + local.tee 2 + i32.lt_u + br_if 9 (;@25;) + local.get 1 + i32.load16_u + i32.const 118 + i32.ne + br_if 9 (;@25;) + local.get 5 + i32.const 4 + i32.sub + i32.load16_u + i32.const 111 + i32.ne + br_if 9 (;@25;) + i32.const -4 + local.set 3 + local.get 1 + local.get 2 + i32.ne + br_if 8 (;@26;) + br 10 (;@24;) + end + local.get 5 + i32.const 8 + i32.sub + local.tee 1 + i32.const 4188 + i32.load + local.tee 2 + i32.lt_u + br_if 8 (;@25;) + local.get 1 + i32.load16_u + i32.const 121 + i32.ne + br_if 8 (;@25;) + local.get 5 + i32.const 6 + i32.sub + i32.load16_u + i32.const 105 + i32.ne + br_if 8 (;@25;) + local.get 5 + i32.const 4 + i32.sub + i32.load16_u + i32.const 101 + i32.ne + br_if 8 (;@25;) + i32.const -5 + local.set 3 + local.get 1 + local.get 2 + i32.ne + br_if 7 (;@26;) + br 9 (;@24;) + end + block ;; label = @33 + block ;; label = @34 + local.get 5 + i32.const 2 + i32.sub + i32.load16_u + i32.const 115 + i32.sub + br_table 0 (;@34;) 1 (;@33;) 9 (;@25;) + end + local.get 5 + i32.const 4 + i32.sub + i32.load16_u + local.tee 1 + i32.const 97 + i32.ne + if ;; label = @34 + local.get 1 + i32.const 108 + i32.ne + br_if 9 (;@25;) + i32.const 4188 + i32.load + local.tee 2 + local.get 5 + i32.const 6 + i32.sub + local.tee 1 + i32.gt_u + br_if 9 (;@25;) + local.get 1 + i32.load16_u + i32.const 101 + i32.ne + br_if 9 (;@25;) + i32.const -4 + local.set 3 + local.get 1 + local.get 2 + i32.ne + br_if 8 (;@26;) + br 10 (;@24;) + end + i32.const 4188 + i32.load + local.tee 2 + local.get 5 + i32.const 6 + i32.sub + local.tee 1 + i32.gt_u + br_if 8 (;@25;) + local.get 1 + i32.load16_u + i32.const 99 + i32.ne + br_if 8 (;@25;) + i32.const -4 + local.set 3 + local.get 1 + local.get 2 + i32.ne + br_if 7 (;@26;) + br 9 (;@24;) + end + local.get 5 + i32.const 10 + i32.sub + local.tee 1 + i32.const 4188 + i32.load + local.tee 2 + i32.lt_u + br_if 7 (;@25;) + local.get 1 + i32.load16_u + i32.const 100 + i32.ne + br_if 7 (;@25;) + local.get 5 + i32.const 8 + i32.sub + i32.load16_u + i32.const 101 + i32.ne + br_if 7 (;@25;) + local.get 5 + i32.const 6 + i32.sub + i32.load16_u + i32.const 108 + i32.ne + br_if 7 (;@25;) + local.get 5 + i32.const 4 + i32.sub + i32.load16_u + i32.const 101 + i32.ne + br_if 7 (;@25;) + i32.const -6 + local.set 3 + local.get 1 + local.get 2 + i32.ne + br_if 6 (;@26;) + br 8 (;@24;) + end + local.get 5 + i32.const 2 + i32.sub + i32.load16_u + i32.const 111 + i32.ne + br_if 6 (;@25;) + local.get 5 + i32.const 4 + i32.sub + i32.load16_u + i32.const 101 + i32.ne + br_if 6 (;@25;) + local.get 5 + i32.const 6 + i32.sub + i32.load16_u + local.tee 1 + i32.const 112 + i32.ne + if ;; label = @32 + local.get 1 + i32.const 99 + i32.ne + br_if 7 (;@25;) + local.get 5 + i32.const 18 + i32.sub + local.tee 1 + i32.const 4188 + i32.load + local.tee 2 + i32.lt_u + br_if 7 (;@25;) + local.get 1 + i32.load16_u + i32.const 105 + i32.ne + br_if 7 (;@25;) + local.get 5 + i32.const 16 + i32.sub + i32.load16_u + i32.const 110 + i32.ne + br_if 7 (;@25;) + local.get 5 + i32.const 14 + i32.sub + i32.load16_u + i32.const 115 + i32.ne + br_if 7 (;@25;) + local.get 5 + i32.const 12 + i32.sub + i32.load16_u + i32.const 116 + i32.ne + br_if 7 (;@25;) + local.get 5 + i32.const 10 + i32.sub + i32.load16_u + i32.const 97 + i32.ne + br_if 7 (;@25;) + local.get 5 + i32.const 8 + i32.sub + i32.load16_u + i32.const 110 + i32.ne + br_if 7 (;@25;) + i32.const -10 + local.set 3 + local.get 1 + local.get 2 + i32.ne + br_if 6 (;@26;) + br 8 (;@24;) + end + local.get 5 + i32.const 10 + i32.sub + local.tee 1 + i32.const 4188 + i32.load + local.tee 2 + i32.lt_u + br_if 6 (;@25;) + local.get 1 + i32.load16_u + i32.const 116 + i32.ne + br_if 6 (;@25;) + local.get 5 + i32.const 8 + i32.sub + i32.load16_u + i32.const 121 + i32.ne + br_if 6 (;@25;) + i32.const -6 + local.set 3 + local.get 1 + local.get 2 + i32.ne + br_if 5 (;@26;) + br 7 (;@24;) + end + block ;; label = @31 + i32.const 4188 + i32.load + local.tee 1 + local.get 5 + i32.const 2 + i32.sub + local.tee 2 + i32.gt_u + br_if 0 (;@31;) + local.get 2 + i32.load16_u + i32.const 105 + i32.ne + br_if 0 (;@31;) + local.get 1 + local.get 2 + i32.eq + br_if 7 (;@24;) + local.get 5 + i32.const 4 + i32.sub + i32.load16_u + call 3 + br_if 7 (;@24;) + end + local.get 5 + i32.const 10 + i32.sub + local.tee 4 + local.get 1 + i32.lt_u + br_if 5 (;@25;) + local.get 4 + i32.load16_u + i32.const 114 + i32.ne + br_if 5 (;@25;) + local.get 5 + i32.const 8 + i32.sub + i32.load16_u + i32.const 101 + i32.ne + br_if 5 (;@25;) + local.get 5 + i32.const 6 + i32.sub + i32.load16_u + i32.const 116 + i32.ne + br_if 5 (;@25;) + local.get 5 + i32.const 4 + i32.sub + i32.load16_u + i32.const 117 + i32.ne + br_if 5 (;@25;) + local.get 2 + i32.load16_u + i32.const 114 + i32.ne + br_if 5 (;@25;) + i32.const -6 + local.set 3 + local.get 1 + local.get 4 + i32.ne + br_if 4 (;@26;) + br 6 (;@24;) + end + i32.const 4188 + i32.load + local.tee 2 + local.get 5 + i32.const 2 + i32.sub + local.tee 1 + i32.gt_u + br_if 4 (;@25;) + local.get 1 + i32.load16_u + i32.const 100 + i32.ne + br_if 4 (;@25;) + i32.const -2 + local.set 3 + local.get 1 + local.get 2 + i32.ne + br_if 3 (;@26;) + br 5 (;@24;) + end + local.get 5 + i32.const 14 + i32.sub + local.tee 1 + i32.const 4188 + i32.load + local.tee 2 + i32.lt_u + br_if 3 (;@25;) + local.get 1 + i32.load16_u + i32.const 100 + i32.ne + br_if 3 (;@25;) + local.get 5 + i32.const 12 + i32.sub + i32.load16_u + i32.const 101 + i32.ne + br_if 3 (;@25;) + local.get 5 + i32.const 10 + i32.sub + i32.load16_u + i32.const 98 + i32.ne + br_if 3 (;@25;) + local.get 5 + i32.const 8 + i32.sub + i32.load16_u + i32.const 117 + i32.ne + br_if 3 (;@25;) + local.get 5 + i32.const 6 + i32.sub + i32.load16_u + i32.const 103 + i32.ne + br_if 3 (;@25;) + local.get 5 + i32.const 4 + i32.sub + i32.load16_u + i32.const 103 + i32.ne + br_if 3 (;@25;) + local.get 5 + i32.const 2 + i32.sub + i32.load16_u + i32.const 101 + i32.ne + br_if 3 (;@25;) + i32.const -8 + local.set 3 + local.get 1 + local.get 2 + i32.ne + br_if 2 (;@26;) + br 4 (;@24;) + end + local.get 5 + i32.const 8 + i32.sub + local.tee 1 + i32.const 4188 + i32.load + local.tee 2 + i32.lt_u + br_if 2 (;@25;) + local.get 1 + i32.load16_u + i32.const 97 + i32.ne + br_if 2 (;@25;) + local.get 5 + i32.const 6 + i32.sub + i32.load16_u + i32.const 119 + i32.ne + br_if 2 (;@25;) + local.get 5 + i32.const 4 + i32.sub + i32.load16_u + i32.const 97 + i32.ne + br_if 2 (;@25;) + local.get 5 + i32.const 2 + i32.sub + i32.load16_u + i32.const 105 + i32.ne + br_if 2 (;@25;) + i32.const -5 + local.set 3 + local.get 1 + local.get 2 + i32.ne + br_if 1 (;@26;) + br 3 (;@24;) + end + local.get 5 + i32.const 2 + i32.sub + i32.load16_u + local.tee 1 + i32.const 111 + i32.ne + if ;; label = @27 + local.get 1 + i32.const 101 + i32.ne + br_if 2 (;@25;) + i32.const 4188 + i32.load + local.tee 2 + local.get 5 + i32.const 4 + i32.sub + local.tee 1 + i32.gt_u + br_if 2 (;@25;) + local.get 1 + i32.load16_u + i32.const 110 + i32.ne + br_if 2 (;@25;) + i32.const -3 + local.set 3 + local.get 1 + local.get 2 + i32.ne + br_if 1 (;@26;) + br 3 (;@24;) + end + local.get 5 + i32.const 8 + i32.sub + local.tee 1 + i32.const 4188 + i32.load + local.tee 2 + i32.lt_u + br_if 1 (;@25;) + local.get 1 + i32.load16_u + i32.const 116 + i32.ne + br_if 1 (;@25;) + local.get 5 + i32.const 6 + i32.sub + i32.load16_u + i32.const 104 + i32.ne + br_if 1 (;@25;) + local.get 5 + i32.const 4 + i32.sub + i32.load16_u + i32.const 114 + i32.ne + br_if 1 (;@25;) + i32.const -5 + local.set 3 + local.get 1 + local.get 2 + i32.eq + br_if 2 (;@24;) + end + local.get 5 + local.get 3 + i32.const 1 + i32.shl + i32.add + i32.load16_u + call 3 + local.set 3 + end + local.get 6 + i32.eqz + br_if 0 (;@24;) + local.get 3 + i32.eqz + br_if 1 (;@23;) + end + local.get 10 + i32.const 2 + i32.add + local.set 2 + i32.const 4224 + i32.load + local.set 4 + i32.const 4188 + i32.load + local.set 7 + block ;; label = @24 + loop ;; label = @25 + local.get 0 + i32.const 2 + i32.add + local.set 1 + block ;; label = @26 + block ;; label = @27 + local.get 0 + local.get 10 + i32.ge_u + br_if 0 (;@27;) + block ;; label = @28 + block ;; label = @29 + block ;; label = @30 + block ;; label = @31 + local.get 1 + i32.load16_u + local.tee 3 + i32.const 91 + i32.sub + br_table 1 (;@30;) 2 (;@29;) 0 (;@31;) + end + local.get 1 + local.set 0 + local.get 3 + i32.const 10 + i32.sub + br_table 3 (;@27;) 5 (;@25;) 5 (;@25;) 3 (;@27;) 4 (;@26;) + end + loop ;; label = @30 + block ;; label = @31 + local.get 1 + i32.const 2 + i32.add + local.set 3 + local.get 1 + local.get 10 + i32.ge_u + br_if 0 (;@31;) + block ;; label = @32 + block ;; label = @33 + local.get 3 + i32.load16_u + local.tee 0 + i32.const 92 + i32.sub + br_table 0 (;@33;) 5 (;@28;) 1 (;@32;) + end + local.get 1 + i32.const 4 + i32.add + local.set 1 + br 2 (;@30;) + end + local.get 3 + local.set 1 + local.get 0 + i32.const 10 + i32.sub + br_table 0 (;@31;) 1 (;@30;) 1 (;@30;) 0 (;@31;) 1 (;@30;) + end + end + local.get 2 + local.set 0 + local.get 4 + br_if 4 (;@25;) + i32.const 10 + local.set 4 + i32.const 4224 + i32.const 10 + i32.store + i32.const 4228 + local.get 3 + local.get 7 + i32.sub + i32.const 1 + i32.shr_s + i32.store + br 4 (;@25;) + end + local.get 0 + i32.const 4 + i32.add + local.set 0 + br 3 (;@25;) + end + local.get 3 + local.set 0 + br 2 (;@25;) + end + local.get 4 + br_if 2 (;@24;) + i32.const 4224 + i32.const 11 + i32.store + i32.const 4228 + local.get 1 + local.get 7 + i32.sub + i32.const 1 + i32.shr_s + i32.store + br 2 (;@24;) + end + local.get 3 + i32.const 47 + i32.ne + br_if 0 (;@25;) + end + local.get 0 + local.set 2 + end + i32.const 4196 + local.get 2 + i32.store + i32.const 4218 + i32.const 0 + i32.store8 + br 20 (;@3;) + end + i32.const 4218 + i32.const 1 + i32.store8 + br 19 (;@3;) + end + block ;; label = @22 + i32.const 4216 + i32.load16_u + i32.const 65535 + i32.ne + if ;; label = @23 + i32.const 4224 + i32.load + local.set 1 + br 1 (;@22;) + end + i32.const 4224 + i32.load + local.set 1 + i32.const 4214 + i32.load16_u + i32.eqz + br_if 21 (;@1;) + end + local.get 1 + br_if 20 (;@1;) + i32.const 1 + br 9 (;@12;) + end + local.get 1 + i32.const 16520 + i32.add + i32.const 0 + i32.store8 + i32.const 4214 + local.get 1 + i32.const 1 + i32.add + i32.store16 + local.get 1 + i32.const 2 + i32.shl + i32.const 8328 + i32.add + i32.const 4204 + i32.load + i32.store + br 17 (;@3;) + end + local.get 3 + i32.const 16520 + i32.add + i32.const 0 + i32.store8 + i32.const 4214 + local.get 3 + i32.const 1 + i32.add + i32.store16 + local.get 3 + i32.const 2 + i32.shl + i32.const 8328 + i32.add + local.get 0 + i32.store + br 15 (;@4;) + end + call 12 + br 15 (;@3;) + end + local.get 0 + i32.const 2 + i32.add + local.set 0 + end + i32.const 4196 + local.get 0 + i32.store + br 14 (;@2;) + end + local.get 0 + local.set 12 + br 12 (;@3;) + end + i32.const 0 + local.set 7 + i32.const 4196 + i32.const 4196 + i32.load + local.tee 6 + i32.const 2 + i32.add + i32.store + 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 + call 4 + local.tee 0 + i32.const 42 + i32.sub + br_table 1 (;@23;) 2 (;@22;) 2 (;@22;) 2 (;@22;) 0 (;@24;) 2 (;@22;) + end + i32.const 46 + local.set 3 + i32.const 4200 + i32.load + i32.const 4196 + i32.load + local.tee 1 + i32.sub + i32.const 3 + i32.lt_s + br_if 2 (;@21;) + local.get 1 + i32.load16_u offset=2 + i32.const 46 + i32.ne + br_if 2 (;@21;) + local.get 1 + i32.load16_u offset=4 + i32.const 46 + i32.ne + br_if 2 (;@21;) + i32.const 4196 + local.get 1 + i32.const 6 + i32.add + i32.store + call 4 + i32.const 114 + i32.ne + br_if 8 (;@15;) + i32.const 1 + call 2 + drop + br 8 (;@15;) + end + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + local.set 0 + end + local.get 0 + local.set 3 + local.get 0 + i32.const 91 + i32.eq + if ;; label = @22 + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + local.set 3 + end + i32.const 4196 + i32.load + local.set 1 + local.get 3 + i32.const 39 + i32.ne + local.get 3 + i32.const 34 + i32.ne + i32.and + i32.eqz + if ;; label = @22 + local.get 0 + i32.const 91 + i32.eq + local.set 7 + i32.const 4200 + i32.load + local.set 2 + local.get 1 + local.set 0 + loop ;; label = @23 + local.get 0 + local.tee 4 + i32.const 2 + i32.add + local.set 0 + local.get 2 + local.get 4 + i32.le_u + br_if 3 (;@20;) + local.get 3 + local.get 0 + i32.load16_u + local.tee 5 + i32.eq + if ;; label = @24 + local.get 4 + local.set 2 + br 6 (;@18;) + end + local.get 5 + i32.const 92 + i32.ne + if ;; label = @24 + local.get 5 + i32.const 10 + i32.sub + br_table 4 (;@20;) 1 (;@23;) 1 (;@23;) 4 (;@20;) 1 (;@23;) + end + local.get 4 + i32.const 4 + i32.add + local.set 0 + local.get 4 + i32.load16_u offset=4 + i32.const 13 + i32.ne + br_if 0 (;@23;) + local.get 4 + i32.const 6 + i32.add + local.get 0 + local.get 4 + i32.load16_u offset=6 + i32.const 10 + i32.eq + select + local.set 0 + br 0 (;@23;) + end + unreachable + end + local.get 0 + i32.const 91 + i32.eq + br_if 4 (;@17;) + end + local.get 3 + call 9 + i32.eqz + if ;; label = @21 + i32.const 0 + local.set 3 + br 5 (;@16;) + end + i32.const 4196 + i32.load + local.set 3 + call 4 + local.set 0 + block ;; label = @21 + block ;; label = @22 + block ;; label = @23 + block ;; label = @24 + block ;; label = @25 + block ;; label = @26 + local.get 3 + local.get 1 + i32.sub + i32.const 6 + i32.sub + br_table 0 (;@26;) 10 (;@16;) 10 (;@16;) 10 (;@16;) 1 (;@25;) 10 (;@16;) + end + block ;; label = @26 + local.get 1 + i32.load16_u + local.tee 2 + i32.const 115 + i32.ne + if ;; label = @27 + local.get 2 + i32.const 103 + i32.ne + br_if 11 (;@16;) + local.get 1 + i32.load16_u offset=2 + i32.const 101 + i32.ne + br_if 11 (;@16;) + local.get 1 + i32.load16_u offset=4 + i32.const 116 + i32.eq + br_if 1 (;@26;) + br 11 (;@16;) + end + local.get 1 + i32.load16_u offset=2 + i32.const 101 + i32.ne + br_if 10 (;@16;) + local.get 1 + i32.load16_u offset=4 + i32.const 116 + i32.ne + br_if 10 (;@16;) + end + local.get 0 + i32.const 40 + i32.sub + br_table 9 (;@16;) 4 (;@21;) 3 (;@22;) 4 (;@21;) 9 (;@16;) 1 (;@24;) + end + local.get 1 + i32.load16_u + i32.const 97 + i32.ne + br_if 8 (;@16;) + local.get 1 + i32.load16_u offset=2 + i32.const 115 + i32.ne + br_if 8 (;@16;) + local.get 1 + i32.load16_u offset=4 + i32.const 121 + i32.ne + br_if 8 (;@16;) + local.get 1 + i32.load16_u offset=6 + i32.const 110 + i32.ne + br_if 8 (;@16;) + local.get 0 + i32.const 58 + i32.eq + local.get 1 + i32.load16_u offset=8 + i32.const 99 + i32.ne + i32.or + br_if 8 (;@16;) + local.get 0 + i32.const 40 + i32.sub + br_table 8 (;@16;) 3 (;@21;) 2 (;@22;) 3 (;@21;) 8 (;@16;) 1 (;@23;) + end + local.get 0 + i32.const 58 + i32.eq + br_if 7 (;@16;) + local.get 0 + i32.const 125 + i32.ne + br_if 2 (;@21;) + br 7 (;@16;) + end + local.get 0 + i32.const 125 + i32.ne + br_if 1 (;@21;) + br 6 (;@16;) + end + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + local.set 0 + end + local.get 0 + local.set 3 + local.get 0 + i32.const 91 + i32.eq + if ;; label = @21 + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + local.set 3 + end + i32.const 4196 + i32.load + local.set 1 + local.get 3 + i32.const 39 + i32.ne + local.get 3 + i32.const 34 + i32.ne + i32.and + i32.eqz + if ;; label = @21 + local.get 0 + i32.const 91 + i32.eq + local.set 7 + i32.const 4200 + i32.load + local.set 2 + local.get 1 + local.set 0 + loop ;; label = @22 + block ;; label = @23 + local.get 0 + local.tee 4 + i32.const 2 + i32.add + local.set 0 + local.get 2 + local.get 4 + i32.le_u + br_if 0 (;@23;) + local.get 3 + local.get 0 + i32.load16_u + local.tee 5 + i32.eq + if ;; label = @24 + local.get 4 + local.set 2 + br 6 (;@18;) + end + local.get 5 + i32.const 92 + i32.ne + if ;; label = @24 + local.get 5 + i32.const 10 + i32.sub + br_table 1 (;@23;) 2 (;@22;) 2 (;@22;) 1 (;@23;) 2 (;@22;) + end + local.get 4 + i32.const 4 + i32.add + local.set 0 + local.get 4 + i32.load16_u offset=4 + i32.const 13 + i32.ne + br_if 1 (;@22;) + local.get 4 + i32.const 6 + i32.add + local.get 0 + local.get 4 + i32.load16_u offset=6 + i32.const 10 + i32.eq + select + local.set 0 + br 1 (;@22;) + end + end + i32.const 4224 + i32.load + i32.eqz + br_if 2 (;@19;) + br 3 (;@18;) + end + local.get 0 + i32.const 91 + i32.eq + br_if 3 (;@17;) + local.get 3 + call 9 + local.set 0 + i32.const 4196 + i32.load + i32.const 0 + local.get 0 + select + local.set 3 + br 4 (;@16;) + end + i32.const 4224 + i32.load + br_if 1 (;@18;) + end + i32.const 4224 + i32.const 9 + i32.store + i32.const 4228 + local.get 0 + i32.const 4188 + i32.load + i32.sub + i32.const 1 + i32.shr_s + i32.store + end + i32.const 4196 + local.get 2 + i32.const 4 + i32.add + local.tee 3 + i32.store + br 1 (;@16;) + end + i32.const 0 + local.set 3 + i32.const 1 + local.set 7 + end + call 4 + local.set 0 + local.get 7 + if ;; label = @16 + local.get 0 + i32.const 93 + i32.ne + br_if 1 (;@15;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + local.set 0 + end + local.get 3 + i32.eqz + br_if 0 (;@15;) + block ;; label = @16 + local.get 0 + i32.const 40 + i32.eq + local.get 0 + i32.const 58 + i32.eq + i32.or + br_if 0 (;@16;) + local.get 7 + br_if 1 (;@15;) + local.get 0 + i32.const 125 + i32.eq + br_if 0 (;@16;) + local.get 0 + i32.const 44 + i32.ne + br_if 1 (;@15;) + end + i32.const 18596 + i32.load + local.get 1 + local.get 3 + call 8 + end + i32.const 4196 + local.get 6 + i32.store + br 11 (;@3;) + end + i32.const 8 + br 1 (;@12;) + end + i32.const 12 + end + local.tee 1 + i32.store + i32.const 4228 + local.get 0 + i32.const 4188 + i32.load + i32.sub + i32.const 1 + i32.shr_s + i32.store + end + i32.const 4196 + local.get 10 + i32.const 2 + i32.add + i32.store + br 9 (;@1;) + end + local.get 0 + local.set 3 + end + local.get 0 + i32.const 4188 + i32.load + i32.le_u + br_if 0 (;@8;) + i32.const 18596 + i32.load + i32.const 24 + i32.add + local.get 3 + local.get 0 + call 8 + end + i32.const 4196 + local.get 7 + i32.store + br 3 (;@4;) + end local.get 0 - local.get 3 + i32.const 160 i32.ne - br_if 1 (;@5;) - local.get 3 - return + br_if 2 (;@4;) end - local.get 0 - local.get 3 - i32.eq - br_if 2 (;@3;) - local.get 2 - i32.const 2 - i32.sub - local.set 2 - local.get 0 - i32.const 2 - i32.sub - local.set 0 + i32.const 4219 + i32.const 1 + i32.store8 br 1 (;@4;) end - end - local.get 0 - i32.const 2 - i32.sub - i32.load16_u - i32.const 42 - i32.ne - br_if 2 (;@1;) - local.get 0 - local.get 4 - i32.eq - br_if 0 (;@3;) - loop ;; label = @4 + i32.const 0 + local.set 4 + i32.const 4188 + i32.load + local.set 1 block ;; label = @5 - local.get 2 - i32.const 2 - i32.add - local.tee 1 - local.get 3 - i32.le_u - br_if 0 (;@5;) - local.get 1 - i32.load16_u - i32.const 42 - i32.eq - if ;; label = @6 + block (result i32) ;; label = @6 + loop ;; label = @7 + block ;; label = @8 + local.get 2 + i32.load16_u + local.tee 0 + i32.const 32 + i32.ne + if ;; label = @9 + local.get 0 + i32.const 61 + i32.ne + br_if 4 (;@5;) + local.get 2 + i32.const 2 + i32.sub + local.set 0 + loop ;; label = @10 + local.get 0 + local.tee 2 + i32.load16_u + local.tee 3 + i32.const 32 + i32.ne + br_if 2 (;@8;) + local.get 0 + i32.const 2 + i32.sub + local.set 0 + local.get 1 + local.get 2 + i32.lt_u + br_if 0 (;@10;) + end + i32.const 32 + local.set 3 + local.get 2 + i32.const 2 + i32.add + br 3 (;@6;) + end + local.get 1 + local.get 2 + i32.ge_u + br_if 3 (;@5;) + local.get 2 + i32.const 2 + i32.sub + local.set 2 + br 1 (;@7;) + end + end local.get 2 - i32.load16_u - i32.const 47 - i32.eq - br_if 1 (;@5;) + i32.const 2 + i32.add + end + local.set 7 + loop ;; label = @6 + block ;; label = @7 + local.get 3 + local.tee 0 + i32.const 64512 + i32.and + i32.const 56320 + i32.eq + if ;; label = @8 + local.get 0 + i32.const 1023 + i32.and + local.get 2 + i32.const 2 + i32.sub + i32.load16_u + i32.const 1023 + i32.and + i32.const 10 + i32.shl + i32.or + i32.const 65536 + i32.add + local.set 0 + br 1 (;@7;) + end + local.get 3 + i32.eqz + br_if 2 (;@5;) + end + block ;; label = @7 + local.get 1 + local.get 2 + i32.ge_u + br_if 0 (;@7;) + local.get 0 + i32.const 92 + i32.eq + br_if 2 (;@5;) + local.get 0 + call 15 + i32.eqz + br_if 0 (;@7;) + local.get 0 + call 16 + local.set 4 + local.get 2 + i32.const -2 + i32.const -4 + local.get 0 + i32.const 65536 + i32.lt_u + select + i32.add + local.tee 2 + i32.load16_u + local.set 3 + br 1 (;@6;) + end end - local.get 2 - i32.const 2 - i32.sub - local.set 2 - br 1 (;@4;) - end - end - local.get 1 - i32.const 4 - i32.sub - local.set 0 - local.get 1 - local.get 4 - i32.gt_u - br_if 1 (;@2;) - end - end - i32.const 0 - local.set 0 - end - local.get 0) - (func (;16;) (type 2) (param i32) (result i32) - (local i32 i32 i32 i32) - local.get 0 - i32.const 47 - i32.le_u - if ;; label = @1 - local.get 0 - i32.const 36 - i32.eq - return - end - block ;; label = @1 - local.get 0 - i32.const 58 - i32.lt_u - br_if 0 (;@1;) - block ;; label = @2 - local.get 0 - i32.const 65 - i32.lt_u - br_if 0 (;@2;) - local.get 0 - i32.const 91 - i32.lt_u - br_if 1 (;@1;) - local.get 0 - i32.const 96 - i32.le_u - if ;; label = @3 - local.get 0 - i32.const 95 - i32.eq - return - end - local.get 0 - i32.const 123 - i32.lt_u - br_if 1 (;@1;) - i32.const 65536 - local.set 4 - block ;; label = @3 - local.get 0 - i32.const 65536 - i32.ge_u - if ;; label = @4 - i32.const 1072 - local.set 1 - i32.const -2 - local.set 2 - loop ;; label = @5 - local.get 2 - i32.const 2 - i32.add - local.tee 2 - i32.const 488 - i32.ge_u - br_if 2 (;@3;) - local.get 1 - i32.load local.get 4 - i32.add - local.tee 4 - local.get 0 - i32.gt_u - br_if 2 (;@3;) - local.get 1 - i32.const 4 - i32.add - local.set 3 - local.get 1 - i32.const 8 - i32.add - local.set 1 - local.get 0 + i32.const -1 + i32.xor local.get 3 - i32.load - local.get 4 - i32.add - local.tee 4 - i32.gt_u + i32.const 32 + i32.ne + i32.or + i32.const 1 + i32.and br_if 0 (;@5;) - end - br 3 (;@1;) - end - local.get 0 - i32.const 170 - i32.lt_u - br_if 1 (;@2;) - local.get 0 - call 18 - local.get 0 - i32.const 8204 - i32.sub - i32.const 2 - i32.lt_u - i32.or - local.get 0 - i32.const 183 - i32.eq - local.get 0 - i32.const 768 - i32.sub - i32.const 112 - i32.lt_u - i32.or - i32.or - local.get 0 - i32.const 903 - i32.eq - local.get 0 - i32.const 1155 - i32.sub - i32.const 5 - i32.lt_u - i32.or - local.get 0 - i32.const 1425 - i32.sub - i32.const 45 - i32.lt_u - i32.or - i32.or - br_if 2 (;@1;) - local.get 0 - i32.const 1471 - i32.sub - local.tee 2 - i32.const 9 - i32.lt_u - if ;; label = @4 - i32.const 1 - local.set 1 - i32.const 365 - local.get 2 - i32.shr_u - i32.const 1 - i32.and - br_if 2 (;@2;) - end - local.get 0 - i32.const 1552 - i32.sub - i32.const 11 - i32.lt_u - local.get 0 - i32.const 1611 - i32.sub - i32.const 31 - i32.lt_u - i32.or - br_if 2 (;@1;) - local.get 0 - i32.const 1648 - i32.eq - local.get 0 - i32.const 1770 - i32.sub - i32.const 4 - i32.lt_u - i32.or - local.get 0 - i32.const 1750 - i32.sub - local.tee 1 - i32.const 18 - i32.le_u - i32.const 0 - i32.const 1 - local.get 1 - i32.shl - i32.const 425599 - i32.and - select - i32.or - local.get 0 - i32.const 1984 - i32.sub - i32.const 10 - i32.lt_u - local.get 0 - i32.const 1958 - i32.sub - i32.const 11 - i32.lt_u - i32.or - local.get 0 - i32.const 1809 - i32.eq - local.get 0 - i32.const 1840 - i32.sub - i32.const 27 - i32.lt_u - i32.or - i32.or - i32.or - br_if 2 (;@1;) - local.get 0 - i32.const 1776 - i32.sub - i32.const 10 - i32.lt_u - local.get 0 - i32.const 2366 - i32.sub - i32.const 18 - i32.lt_u - i32.or - local.get 0 - i32.const 2362 - i32.sub - i32.const 3 - i32.lt_u - local.get 0 - i32.const 2275 - i32.sub - i32.const 33 - i32.lt_u - i32.or - i32.or - local.get 0 - i32.const 2259 - i32.sub - i32.const 15 - i32.lt_u - local.get 0 - i32.const 2137 - i32.sub - i32.const 3 - i32.lt_u - i32.or - local.get 0 - i32.const 2089 - i32.sub - i32.const 5 - i32.lt_u - local.get 0 - i32.const 2085 - i32.sub - i32.const 3 - i32.lt_u - i32.or - i32.or - i32.or - br_if 2 (;@1;) - local.get 0 - i32.const 2075 - i32.sub - i32.const 9 - i32.lt_u - local.get 0 - i32.const 2070 - i32.sub - i32.const 4 - i32.lt_u - i32.or - local.get 0 - i32.const 2045 - i32.eq - local.get 0 - i32.const 2027 - i32.sub - i32.const 9 - i32.lt_u - i32.or - i32.or - br_if 2 (;@1;) - block ;; label = @4 - local.get 0 - i32.const 2385 - i32.sub - local.tee 2 - i32.const 19 - i32.ge_u - if ;; label = @5 + i32.const 18580 + local.get 7 + i32.store + i32.const 18576 + local.get 2 + i32.const 2 + i32.add + i32.store + i32.const 32 + local.set 0 + block ;; label = @6 + block ;; label = @7 + loop ;; label = @8 + block ;; label = @9 + local.get 0 + i32.const 65535 + i32.and + local.tee 0 + i32.const 32 + i32.ne + if ;; label = @10 + local.get 0 + i32.const 114 + i32.sub + br_table 1 (;@9;) 5 (;@5;) 3 (;@7;) 5 (;@5;) + end + local.get 1 + local.get 2 + i32.ge_u + br_if 4 (;@5;) + local.get 2 + i32.const 2 + i32.sub + local.tee 2 + i32.load16_u + local.set 0 + br 1 (;@8;) + end + end + local.get 2 + i32.const 4 + i32.sub + local.tee 0 + local.get 1 + i32.lt_u + br_if 2 (;@5;) + local.get 0 + i32.load16_u + i32.const 118 + i32.ne + br_if 2 (;@5;) + local.get 2 + i32.const 2 + i32.sub + i32.load16_u + i32.const 97 + i32.ne + br_if 2 (;@5;) + local.get 0 + local.get 1 + i32.eq + br_if 1 (;@6;) + local.get 2 + i32.const 6 + i32.sub + i32.load16_u + call 3 + br_if 1 (;@6;) + br 2 (;@5;) + end + local.get 2 + i32.const 2 + i32.sub + local.set 3 + block ;; label = @7 + local.get 2 + i32.const 4 + i32.sub + local.tee 0 + local.get 1 + i32.lt_u + br_if 0 (;@7;) + local.get 0 + i32.load16_u + i32.const 108 + i32.ne + br_if 0 (;@7;) + local.get 3 + i32.load16_u + i32.const 101 + i32.ne + br_if 0 (;@7;) + local.get 0 + local.get 1 + i32.eq + br_if 1 (;@6;) + local.get 2 + i32.const 6 + i32.sub + i32.load16_u + call 3 + br_if 1 (;@6;) + end + local.get 2 + i32.const 8 + i32.sub + local.tee 4 + local.get 1 + i32.lt_u + br_if 1 (;@5;) + local.get 4 + i32.load16_u + i32.const 99 + i32.ne + br_if 1 (;@5;) + local.get 2 + i32.const 6 + i32.sub + i32.load16_u + i32.const 111 + i32.ne + br_if 1 (;@5;) + local.get 0 + i32.load16_u + i32.const 110 + i32.ne + br_if 1 (;@5;) + local.get 3 + i32.load16_u + i32.const 115 + i32.ne + br_if 1 (;@5;) + local.get 1 + local.get 4 + i32.eq + br_if 0 (;@6;) + local.get 2 + i32.const 10 + i32.sub + i32.load16_u + call 3 + i32.eqz + br_if 1 (;@5;) + end + i32.const 4136 + i64.load + local.tee 16 + i64.const 20 + i64.add + local.tee 17 + i32.const 4144 + i64.load + i64.gt_u + if ;; label = @6 + local.get 17 + call 17 + i32.const 4136 + i64.load + local.set 16 + end + i32.const 4136 + local.get 17 + i64.store + local.get 16 + i32.wrap_i64 + local.tee 0 + i32.eqz + if ;; label = @6 + i32.const 4224 + i32.load + i32.eqz + if ;; label = @7 + i32.const 4224 + i32.const 13 + i32.store + i32.const 4228 + i32.const 4196 + i32.load + i32.const 4188 + i32.load + i32.sub + i32.const 1 + i32.shr_s + i32.store + end + i32.const 4196 + i32.const 4200 + i32.load + i32.const 2 + i32.add + i32.store + br 1 (;@5;) + end local.get 0 - i32.const 2406 - i32.sub - i32.const 10 - i32.lt_u - br_if 4 (;@1;) - br 1 (;@4;) - end - i32.const 1 - local.set 1 - i32.const 393343 - local.get 2 - i32.shr_u - i32.const 1 - i32.and - local.get 0 - i32.const 2406 - i32.sub - i32.const 10 - i32.lt_u - i32.or - br_if 2 (;@2;) - end - i32.const 1 - local.set 1 - block ;; label = @4 - block ;; label = @5 + i32.const 8 + i32.add + i32.const 18576 + i64.load align=4 + i64.store align=4 local.get 0 - i32.const 2492 - i32.sub - br_table 3 (;@2;) 1 (;@4;) 3 (;@2;) 3 (;@2;) 3 (;@2;) 3 (;@2;) 3 (;@2;) 3 (;@2;) 3 (;@2;) 1 (;@4;) 1 (;@4;) 3 (;@2;) 3 (;@2;) 1 (;@4;) 1 (;@4;) 3 (;@2;) 3 (;@2;) 3 (;@2;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 3 (;@2;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 3 (;@2;) 3 (;@2;) 0 (;@5;) - end - local.get 0 - i32.const 2433 - i32.sub - i32.const 3 - i32.lt_u - br_if 3 (;@1;) - end - local.get 0 - i32.const 2558 - i32.eq - local.get 0 - i32.const 2534 - i32.sub - i32.const 10 - i32.lt_u - i32.or - br_if 2 (;@1;) - local.get 0 - i32.const 2677 - i32.eq - local.get 0 - i32.const 2561 - i32.sub - i32.const 3 - i32.lt_u - i32.or - local.get 0 - i32.const 2620 - i32.sub - local.tee 1 - i32.const 21 - i32.le_u - i32.const 0 - i32.const 1 - local.get 1 - i32.shl - i32.const 2332797 - i32.and - select - i32.or - local.get 0 - i32.const 2662 - i32.sub - i32.const 12 - i32.lt_u - i32.or - br_if 2 (;@1;) - i32.const 1 - local.set 1 - block ;; label = @4 - block ;; label = @5 + i32.const 18568 + i64.load align=4 + i64.store align=4 local.get 0 - i32.const 2748 - i32.sub - br_table 3 (;@2;) 1 (;@4;) 3 (;@2;) 3 (;@2;) 3 (;@2;) 3 (;@2;) 3 (;@2;) 3 (;@2;) 3 (;@2;) 3 (;@2;) 1 (;@4;) 3 (;@2;) 3 (;@2;) 3 (;@2;) 1 (;@4;) 3 (;@2;) 3 (;@2;) 3 (;@2;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 3 (;@2;) 3 (;@2;) 0 (;@5;) - end - local.get 0 - i32.const 2689 - i32.sub - i32.const 3 - i32.lt_u - br_if 3 (;@1;) - end - local.get 0 - i32.const 2790 - i32.sub - i32.const 10 - i32.lt_u - local.get 0 - i32.const 2810 - i32.sub - i32.const 6 - i32.lt_u - i32.or - br_if 2 (;@1;) - block ;; label = @4 - block ;; label = @5 + i32.const 0 + i32.store offset=16 + i32.const 18592 + i32.load + local.tee 3 + i32.const 16 + i32.add + i32.const 18588 + local.get 3 + select local.get 0 - i32.const 2876 - i32.sub - br_table 3 (;@2;) 1 (;@4;) 3 (;@2;) 3 (;@2;) 3 (;@2;) 3 (;@2;) 3 (;@2;) 3 (;@2;) 3 (;@2;) 1 (;@4;) 1 (;@4;) 3 (;@2;) 3 (;@2;) 1 (;@4;) 1 (;@4;) 3 (;@2;) 3 (;@2;) 3 (;@2;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 3 (;@2;) 3 (;@2;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 3 (;@2;) 3 (;@2;) 0 (;@5;) - end - local.get 0 - i32.const 2817 - i32.sub - i32.const 3 - i32.lt_u - br_if 3 (;@1;) - end - local.get 0 - i32.const 2918 - i32.sub - i32.const 10 - i32.lt_u - br_if 2 (;@1;) - local.get 0 - i32.const 2946 - i32.eq - local.get 0 - i32.const 3046 - i32.sub - i32.const 10 - i32.lt_u - i32.or - local.get 0 - i32.const 3006 - i32.sub - local.tee 1 - i32.const 25 - i32.le_u - i32.const 0 - i32.const 1 - local.get 1 - i32.shl - i32.const 33617695 - i32.and - select - i32.or - br_if 2 (;@1;) - i32.const 1 - local.set 1 - block ;; label = @4 - block ;; label = @5 + i32.store + i32.const 18592 local.get 0 - i32.const 3134 - i32.sub - br_table 3 (;@2;) 3 (;@2;) 3 (;@2;) 3 (;@2;) 3 (;@2;) 3 (;@2;) 3 (;@2;) 1 (;@4;) 3 (;@2;) 3 (;@2;) 3 (;@2;) 1 (;@4;) 3 (;@2;) 3 (;@2;) 3 (;@2;) 3 (;@2;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 3 (;@2;) 3 (;@2;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 3 (;@2;) 3 (;@2;) 0 (;@5;) + i32.store end - local.get 0 - i32.const 3072 - i32.sub - i32.const 5 - i32.lt_u - br_if 3 (;@1;) end - local.get 0 - i32.const 3174 - i32.sub - i32.const 10 - i32.lt_u - br_if 2 (;@1;) block ;; label = @4 - block ;; label = @5 + i32.const 4196 + i32.load + local.tee 3 + i32.load16_u + local.tee 0 + i32.const 127 + i32.le_u + if ;; label = @5 local.get 0 - i32.const 3260 - i32.sub - br_table 3 (;@2;) 1 (;@4;) 3 (;@2;) 3 (;@2;) 3 (;@2;) 3 (;@2;) 3 (;@2;) 3 (;@2;) 3 (;@2;) 1 (;@4;) 3 (;@2;) 3 (;@2;) 3 (;@2;) 1 (;@4;) 3 (;@2;) 3 (;@2;) 3 (;@2;) 3 (;@2;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 3 (;@2;) 3 (;@2;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 3 (;@2;) 3 (;@2;) 0 (;@5;) + i32.const 1024 + i32.add + i32.load8_u + br_if 1 (;@4;) + br 2 (;@3;) end local.get 0 - i32.const 3201 - i32.sub - i32.const 3 - i32.lt_u - br_if 3 (;@1;) + i32.const 160 + i32.eq + br_if 1 (;@3;) end - local.get 0 - i32.const 3302 - i32.sub - i32.const 10 - i32.lt_u - br_if 2 (;@1;) - local.get 0 - i32.const -4 - i32.and - local.tee 2 - i32.const 3328 - i32.eq - br_if 2 (;@1;) - block ;; label = @4 + local.get 3 + i32.const 2 + i32.add + local.set 0 + i32.const 4200 + i32.load + local.set 1 + loop ;; label = @4 local.get 0 - i32.const 3387 + i32.const 2 i32.sub - local.tee 3 - i32.const 41 + local.get 1 i32.ge_u - if ;; label = @5 + br_if 1 (;@3;) + block ;; label = @5 local.get 0 - i32.const 3430 - i32.sub - i32.const 10 - i32.lt_u - br_if 4 (;@1;) - br 1 (;@4;) + i32.load16_u + local.tee 3 + i32.const 127 + i32.le_u + if ;; label = @6 + local.get 3 + i32.const 1024 + i32.add + i32.load8_u + br_if 1 (;@5;) + br 3 (;@3;) + end + local.get 3 + i32.const 160 + i32.eq + br_if 2 (;@3;) end - i64.const 1649536383995 - local.get 3 - i64.extend_i32_u - i64.shr_u - i32.wrap_i64 - i32.const 1 - i32.and + i32.const 4196 local.get 0 - i32.const 3430 - i32.sub - i32.const 10 - i32.lt_u - i32.or - br_if 2 (;@2;) + i32.store + local.get 0 + i32.const 2 + i32.add + local.set 0 + br 0 (;@4;) end - local.get 0 - i32.const -8 - i32.and - i32.const 3544 - i32.eq - local.get 0 - i32.const 3458 - i32.sub - i32.const 2 - i32.lt_u - i32.or - local.get 0 - i32.const 3530 - i32.sub - local.tee 1 - i32.const 12 - i32.le_u - i32.const 0 - i32.const 1 - local.get 1 - i32.shl - i32.const 6113 - i32.and - select - i32.or - local.get 0 - i32.const 3558 - i32.sub - i32.const 10 - i32.lt_u - i32.or - br_if 2 (;@1;) - local.get 0 - i32.const 3761 - i32.eq - local.get 0 - i32.const 3570 - i32.sub + unreachable + end + i32.const 4204 + i32.const 4196 + i32.load + local.tee 0 + i32.store + br 0 (;@2;) + end + unreachable + end + local.get 1) + (func (;2;) (type 1) (param i32) (result i32) + (local i32 i32 i32 i32 i32 i32 i32) + block ;; label = @1 + block ;; label = @2 + i32.const 4196 + i32.load + local.tee 2 + i32.load16_u offset=2 + i32.const 101 + i32.ne + br_if 0 (;@2;) + local.get 2 + i32.load16_u offset=4 + i32.const 113 + i32.ne + br_if 0 (;@2;) + local.get 2 + i32.load16_u offset=6 + i32.const 117 + i32.ne + br_if 0 (;@2;) + local.get 2 + i32.load16_u offset=8 + i32.const 105 + i32.ne + br_if 0 (;@2;) + local.get 2 + i32.load16_u offset=10 + i32.const 114 + i32.ne + br_if 0 (;@2;) + local.get 2 + i32.load16_u offset=12 + i32.const 101 + i32.ne + br_if 0 (;@2;) + i32.const 4196 + local.get 2 + i32.const 14 + i32.add + i32.store + block ;; label = @3 + call 4 + i32.const 40 + i32.ne + br_if 0 (;@3;) + i32.const 4196 + i32.const 4196 + i32.load i32.const 2 - i32.lt_u - i32.or - local.get 0 - i32.const 3633 - i32.sub - local.tee 1 - i32.const 29 - i32.le_u - i32.const 0 - i32.const 1 - local.get 1 - i32.shl - i32.const 1069548537 + i32.add + i32.store + call 4 + local.set 5 + i32.const 4196 + i32.load + local.set 4 + local.get 5 + i32.const 39 + i32.ne + local.get 5 + i32.const 34 + i32.ne i32.and - select - i32.or - local.get 0 - i32.const 3664 - i32.sub - i32.const 10 - i32.lt_u - i32.or - br_if 2 (;@1;) + br_if 0 (;@3;) + i32.const 4200 + i32.load + local.set 6 + local.get 4 + local.set 1 block ;; label = @4 - local.get 0 - i32.const 3764 - i32.sub - local.tee 3 - i32.const 9 - i32.ge_u - if ;; label = @5 - local.get 0 - i32.const 3784 - i32.sub - i32.const 6 - i32.lt_u - br_if 4 (;@1;) - br 1 (;@4;) + loop ;; label = @5 + block ;; label = @6 + local.get 1 + local.tee 3 + i32.const 2 + i32.add + local.set 1 + local.get 3 + local.get 6 + i32.ge_u + br_if 0 (;@6;) + local.get 5 + local.get 1 + i32.load16_u + local.tee 7 + i32.eq + if ;; label = @7 + local.get 3 + local.set 6 + br 3 (;@4;) + end + local.get 7 + i32.const 92 + i32.ne + if ;; label = @7 + local.get 7 + i32.const 10 + i32.sub + br_table 1 (;@6;) 2 (;@5;) 2 (;@5;) 1 (;@6;) 2 (;@5;) + end + local.get 3 + i32.const 4 + i32.add + local.set 1 + local.get 3 + i32.load16_u offset=4 + i32.const 13 + i32.ne + br_if 1 (;@5;) + local.get 3 + i32.const 6 + i32.add + local.get 1 + local.get 3 + i32.load16_u offset=6 + i32.const 10 + i32.eq + select + local.set 1 + br 1 (;@5;) + end end - i32.const 1 - local.set 1 - i32.const 447 - local.get 3 - i32.shr_u - i32.const 1 - i32.and - local.get 0 - i32.const 3784 + i32.const 4224 + i32.load + br_if 0 (;@4;) + i32.const 4224 + i32.const 9 + i32.store + i32.const 4228 + local.get 1 + i32.const 4188 + i32.load i32.sub - i32.const 6 - i32.lt_u - i32.or - br_if 2 (;@2;) - end - local.get 0 - i32.const 3872 - i32.sub - i32.const 10 - i32.lt_u - local.get 0 - i32.const 3792 - i32.sub - i32.const 10 - i32.lt_u - i32.or - br_if 2 (;@1;) - local.get 0 - i32.const -2 - i32.and - local.tee 3 - i32.const 3864 - i32.eq - br_if 2 (;@1;) - local.get 0 - i32.const 3893 - i32.sub - local.tee 4 - i32.const 11 - i32.lt_u - if ;; label = @4 - i32.const 1 - local.set 1 - i32.const 1557 - local.get 4 - i32.shr_u i32.const 1 - i32.and - br_if 2 (;@2;) + i32.shr_s + i32.store end - local.get 0 - i32.const 3981 - i32.sub - i32.const 11 - i32.lt_u - local.get 0 - i32.const 3953 - i32.sub - i32.const 20 - i32.lt_u - i32.or - local.get 3 - i32.const 3974 - i32.eq - local.get 0 - i32.const 5906 - i32.sub - i32.const 3 - i32.lt_u - i32.or - i32.or - local.get 0 - i32.const 4969 - i32.sub - i32.const 9 - i32.lt_u - local.get 0 - i32.const 4957 - i32.sub - i32.const 3 - i32.lt_u - i32.or - local.get 0 - i32.const 4239 - i32.sub - i32.const 15 - i32.lt_u - local.get 0 - i32.const 4226 - i32.sub - i32.const 12 - i32.lt_u - i32.or - i32.or - i32.or - br_if 2 (;@1;) - local.get 0 - i32.const 4209 - i32.sub - i32.const 4 - i32.lt_u - local.get 0 - i32.const 4199 - i32.sub - i32.const 7 - i32.lt_u - i32.or - local.get 0 - i32.const 4194 - i32.sub - i32.const 3 - i32.lt_u - local.get 0 - i32.const 4190 - i32.sub - i32.const 3 - i32.lt_u - i32.or - i32.or - local.get 0 - i32.const 4182 - i32.sub + i32.const 4196 + local.get 6 i32.const 4 - i32.lt_u - local.get 0 - i32.const 4160 - i32.sub - i32.const 10 - i32.lt_u - i32.or - local.get 0 - i32.const 4038 - i32.eq - local.get 0 - i32.const 4139 - i32.sub - i32.const 20 - i32.lt_u - i32.or - i32.or - i32.or - br_if 2 (;@1;) - local.get 0 - i32.const 3993 - i32.sub - i32.const 36 - i32.lt_u - local.get 0 - i32.const 5938 - i32.sub - i32.const 3 - i32.lt_u - i32.or - local.get 0 - i32.const 5970 - i32.sub - i32.const 2 - i32.lt_u - local.get 0 - i32.const 6002 - i32.sub - i32.const 2 - i32.lt_u - i32.or - i32.or - local.get 0 - i32.const 6155 - i32.sub - i32.const 3 - i32.lt_u - local.get 0 - i32.const 6112 - i32.sub - i32.const 10 - i32.lt_u - i32.or - local.get 0 - i32.const 6109 - i32.eq - local.get 0 - i32.const 6068 - i32.sub - i32.const 32 - i32.lt_u - i32.or - i32.or - i32.or - br_if 2 (;@1;) - local.get 0 - i32.const 7376 - i32.sub - i32.const 3 - i32.lt_u - local.get 0 - i32.const -18 - i32.and - i32.const 7232 - i32.sub - i32.const 10 - i32.lt_u - i32.or - local.get 0 - i32.const 7204 - i32.sub - i32.const 20 - i32.lt_u - local.get 0 - i32.const 7142 - i32.sub - i32.const 14 - i32.lt_u - i32.or - i32.or - local.get 0 - i32.const 7088 - i32.sub - i32.const 10 - i32.lt_u - local.get 0 - i32.const 7073 - i32.sub - i32.const 13 - i32.lt_u - i32.or - local.get 0 - i32.const 7040 - i32.sub - i32.const 3 - i32.lt_u - local.get 0 - i32.const 7019 - i32.sub - i32.const 9 - i32.lt_u - i32.or - i32.or - i32.or - br_if 2 (;@1;) - local.get 0 - i32.const 6992 - i32.sub - i32.const 10 - i32.lt_u - local.get 0 - i32.const 6964 - i32.sub - i32.const 17 - i32.lt_u - i32.or - local.get 0 - i32.const 6912 - i32.sub - i32.const 5 - i32.lt_u - local.get 0 - i32.const 6832 - i32.sub - i32.const 14 - i32.lt_u - i32.or - i32.or - local.get 0 - i32.const 6800 - i32.sub - i32.const 10 - i32.lt_u - local.get 0 - i32.const 6783 - i32.sub - i32.const 11 - i32.lt_u - i32.or - local.get 0 - i32.const 6752 - i32.sub - i32.const 29 - i32.lt_u + i32.add + local.tee 1 + i32.store + call 4 + i32.const 41 + i32.ne + br_if 0 (;@3;) + block ;; label = @4 + local.get 0 + i32.const 1 + i32.sub + br_table 3 (;@1;) 3 (;@1;) 0 (;@4;) + end + i32.const 18572 + local.get 1 + i32.store + i32.const 18568 + local.get 4 + i32.store + i32.const 1 + return + end + i32.const 4196 + local.get 2 + i32.store + end + i32.const 0 + return + end + i32.const 18596 + i32.load + i32.const 12 + i32.add + local.get 4 + local.get 1 + call 8 + i32.const 1) + (func (;3;) (type 1) (param i32) (result i32) + (local i32 i32) + i32.const 1 + local.set 1 + block ;; label = @1 + local.get 0 + i32.const 9 + i32.sub + i32.const 5 + i32.lt_u + br_if 0 (;@1;) + block ;; label = @2 + block ;; label = @3 + block ;; label = @4 + local.get 0 + i32.const 32 + i32.sub + br_table 3 (;@1;) 2 (;@2;) 1 (;@3;) 1 (;@3;) 1 (;@3;) 2 (;@2;) 2 (;@2;) 0 (;@4;) + end local.get 0 - i32.const 6741 - i32.sub - i32.const 10 - i32.lt_u - i32.or - i32.or - i32.or + i32.const 160 + i32.eq br_if 2 (;@1;) - local.get 0 - i32.const 6679 + end + local.get 0 + i32.const 65528 + i32.and + i32.const 40 + i32.eq + br_if 0 (;@2;) + local.get 0 + i32.const 58 + i32.sub + local.tee 2 + i32.const 65535 + i32.and + i32.const 37 + i32.lt_u + i64.const 111669149759 + local.get 2 + i64.extend_i32_u + i64.shr_u + i64.const 1 + i64.and + i64.eqz + i32.eqz + i32.and + br_if 0 (;@2;) + local.get 0 + i32.const 123 + i32.sub + i32.const 65535 + i32.and + i32.const 4 + i32.lt_u + local.set 1 + end + local.get 0 + i32.const 46 + i32.ne + local.get 1 + i32.and + local.set 1 + end + local.get 1) + (func (;4;) (type 0) (result i32) + (local i32 i32 i32 i32 i32) + i32.const 4200 + i32.load + local.set 3 + i32.const 4196 + i32.load + local.set 1 + loop ;; label = @1 + block ;; label = @2 + block ;; label = @3 + local.get 1 + i32.load16_u + local.tee 2 + i32.const 9 i32.sub i32.const 5 i32.lt_u - local.get 0 - i32.const 6608 - i32.sub - i32.const 11 - i32.lt_u - i32.or - local.get 0 - i32.const 6313 + local.get 2 + i32.const 32 i32.eq - local.get 0 - i32.const 6470 - i32.sub - i32.const 10 - i32.lt_u i32.or + local.get 2 + i32.const 160 + i32.eq i32.or - local.get 0 - i32.const 6160 - i32.sub - i32.const 10 - i32.lt_u - local.get 0 - i32.const -20 + i32.eqz + if ;; label = @4 + local.get 2 + i32.const 47 + i32.ne + if ;; label = @5 + local.get 2 + return + end + i32.const 47 + local.set 4 + block ;; label = @5 + local.get 1 + i32.load16_u offset=2 + local.tee 0 + i32.const 47 + i32.ne + if ;; label = @6 + local.get 0 + i32.const 42 + i32.ne + br_if 4 (;@2;) + local.get 1 + i32.const 4 + i32.add + local.set 0 + loop ;; label = @7 + local.get 0 + i32.const 2 + i32.sub + local.tee 1 + local.get 3 + i32.ge_u + br_if 4 (;@3;) + local.get 0 + i32.load16_u + i32.const 42 + i32.eq + if ;; label = @8 + local.get 0 + i32.const 2 + i32.add + i32.load16_u + i32.const 47 + i32.eq + br_if 3 (;@5;) + end + local.get 0 + i32.const 2 + i32.add + local.set 0 + br 0 (;@7;) + end + unreachable + end + local.get 1 + i32.const 2 + i32.add + local.set 1 + loop ;; label = @6 + local.get 1 + local.tee 0 + i32.const 2 + i32.sub + local.get 3 + i32.ge_u + br_if 3 (;@3;) + local.get 0 + i32.const 2 + i32.add + local.set 1 + local.get 0 + i32.load16_u + i32.const 10 + i32.sub + br_table 3 (;@3;) 0 (;@6;) 0 (;@6;) 3 (;@3;) 0 (;@6;) + end + unreachable + end + local.get 1 + i32.const 4 + i32.add + local.set 0 + br 1 (;@3;) + end + local.get 1 + local.set 0 + end + i32.const 4196 + local.get 0 + i32.const 2 + i32.add + local.tee 1 + i32.store + local.get 2 + local.set 4 + local.get 0 + local.get 3 + i32.lt_u + br_if 1 (;@1;) + end + end + local.get 4) + (func (;5;) (type 2) (param i32) + (local i32 i32 i32 i32 i32 i32) + i32.const 4196 + i32.const 4196 + i32.load + local.tee 1 + i32.const 14 + i32.add + i32.store + local.get 1 + i32.const 12 + i32.add + local.set 2 + block ;; label = @1 + block ;; label = @2 + block ;; label = @3 + call 4 + local.tee 1 + i32.const 91 + i32.ne + if ;; label = @4 + local.get 1 + i32.const 61 + i32.eq + br_if 1 (;@3;) + local.get 1 + i32.const 46 + i32.ne + br_if 2 (;@2;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + i32.const 4196 + i32.load + local.set 1 + call 9 + i32.eqz + br_if 2 (;@2;) + i32.const 4196 + i32.load + local.set 0 + call 4 + i32.const 61 + i32.ne + br_if 2 (;@2;) + i32.const 18596 + i32.load + local.get 1 + local.get 0 + call 8 + return + end + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + local.tee 4 + i32.const 39 + i32.ne + local.get 4 + i32.const 34 + i32.ne i32.and - i32.const 6432 - i32.sub - i32.const 12 - i32.lt_u - i32.or - local.get 0 - i32.const 7616 - i32.sub - i32.const 58 - i32.lt_u - local.get 0 - i32.const 7415 - i32.sub - i32.const 3 - i32.lt_u - i32.or - i32.or - i32.or - br_if 2 (;@1;) - local.get 0 - i32.const 7405 - i32.eq - local.get 0 - i32.const 7410 - i32.sub - i32.const 3 - i32.lt_u - i32.or - local.get 0 - i32.const 7380 - i32.sub - i32.const 21 - i32.lt_u + br_if 1 (;@2;) + i32.const 4200 + i32.load + local.set 3 + i32.const 4196 + i32.load + local.tee 6 + local.set 0 + block ;; label = @4 + loop ;; label = @5 + block ;; label = @6 + local.get 0 + local.tee 1 + i32.const 2 + i32.add + local.set 0 + local.get 1 + local.get 3 + i32.ge_u + br_if 0 (;@6;) + local.get 4 + local.get 0 + i32.load16_u + local.tee 5 + i32.eq + if ;; label = @7 + local.get 1 + local.set 3 + br 3 (;@4;) + end + local.get 5 + i32.const 92 + i32.ne + if ;; label = @7 + local.get 5 + i32.const 10 + i32.sub + br_table 1 (;@6;) 2 (;@5;) 2 (;@5;) 1 (;@6;) 2 (;@5;) + end + local.get 1 + i32.const 4 + i32.add + local.set 0 + local.get 1 + i32.load16_u offset=4 + i32.const 13 + i32.ne + br_if 1 (;@5;) + local.get 1 + i32.const 6 + i32.add + local.get 0 + local.get 1 + i32.load16_u offset=6 + i32.const 10 + i32.eq + select + local.set 0 + br 1 (;@5;) + end + end + i32.const 4224 + i32.load + br_if 0 (;@4;) + i32.const 4224 + i32.const 9 + i32.store + i32.const 4228 + local.get 0 + i32.const 4188 + i32.load + i32.sub + i32.const 1 + i32.shr_s + i32.store + end + i32.const 4196 + local.get 3 + i32.const 4 + i32.add + local.tee 0 + i32.store + call 4 + i32.const 93 + i32.ne + br_if 1 (;@2;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + i32.const 61 + i32.ne + br_if 1 (;@2;) + i32.const 18596 + i32.load + local.get 6 local.get 0 - i32.const 7675 - i32.sub - i32.const 5 - i32.lt_u - i32.or - i32.or - br_if 2 (;@1;) + call 8 + br 1 (;@2;) + end + local.get 0 + i32.eqz + br_if 0 (;@2;) + i32.const 4221 + i32.load8_u + i32.eqz + if ;; label = @3 + i32.const 18596 + i32.load + i32.const 12 + i32.add + call 0 + end + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + local.set 0 + i32.const 4221 + i32.load8_u + if ;; label = @3 local.get 0 - i32.const 8417 + i32.const 40 i32.eq + if ;; label = @4 + call 7 + local.set 0 + end + block ;; label = @4 + local.get 0 + i32.const 114 + i32.ne + if ;; label = @5 + local.get 0 + i32.const 123 + i32.ne + br_if 1 (;@4;) + i32.const 4208 + i32.const 4196 + i32.load + i32.store + br 1 (;@4;) + end + i32.const 1 + call 2 + drop + end + i32.const 4196 + local.get 2 + i32.store + return + end + local.get 0 + i32.const 114 + i32.ne + if ;; label = @3 local.get 0 - i32.const 8421 - i32.sub - i32.const 12 - i32.lt_u - i32.or - local.get 0 - i32.const 8255 + i32.const 123 + i32.ne + br_if 1 (;@2;) + i32.const 4196 + i32.load + i32.const 2 i32.sub - local.tee 1 - i32.const 21 - i32.le_u - i32.const 0 - i32.const 1 + local.set 5 + block ;; label = @4 + loop ;; label = @5 + i32.const 4196 + i32.const 4196 + i32.load + local.tee 0 + i32.const 2 + i32.add + i32.store + local.get 0 + i32.const 4200 + i32.load + i32.ge_u + br_if 4 (;@1;) + call 4 + local.set 2 + i32.const 4196 + i32.load + local.set 1 + block ;; label = @6 + local.get 2 + call 9 + if ;; label = @7 + i32.const 4196 + i32.load + local.set 3 + block ;; label = @8 + block ;; label = @9 + call 4 + local.tee 0 + i32.const 40 + i32.sub + br_table 1 (;@8;) 5 (;@4;) 5 (;@4;) 5 (;@4;) 1 (;@8;) 0 (;@9;) + end + block ;; label = @9 + block ;; label = @10 + local.get 0 + i32.const 58 + i32.sub + br_table 1 (;@9;) 6 (;@4;) 6 (;@4;) 2 (;@8;) 0 (;@10;) + end + local.get 0 + i32.const 125 + i32.eq + br_if 1 (;@8;) + br 5 (;@4;) + end + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + call 9 + i32.const 4196 + i32.load + i32.load16_u + local.set 0 + br_if 0 (;@8;) + local.get 0 + i32.const 65535 + i32.and + i32.const 92 + local.set 0 + i32.const 92 + i32.ne + br_if 4 (;@4;) + end + i32.const 18596 + i32.load + local.get 1 + local.get 3 + call 8 + br 1 (;@6;) + end + block ;; label = @7 + local.get 2 + i32.const 34 + i32.ne + if ;; label = @8 + local.get 2 + i32.const 46 + i32.eq + br_if 1 (;@7;) + local.get 2 + i32.const 39 + i32.ne + br_if 4 (;@4;) + end + i32.const 4200 + i32.load + local.set 3 + i32.const 4196 + i32.load + local.tee 6 + local.set 0 + block ;; label = @8 + loop ;; label = @9 + block ;; label = @10 + local.get 0 + local.tee 1 + i32.const 2 + i32.add + local.set 0 + local.get 1 + local.get 3 + i32.ge_u + br_if 0 (;@10;) + local.get 2 + local.get 0 + i32.load16_u + local.tee 4 + i32.eq + if ;; label = @11 + local.get 1 + local.set 3 + br 3 (;@8;) + end + local.get 4 + i32.const 92 + i32.ne + if ;; label = @11 + local.get 4 + i32.const 10 + i32.sub + br_table 1 (;@10;) 2 (;@9;) 2 (;@9;) 1 (;@10;) 2 (;@9;) + end + local.get 1 + i32.const 4 + i32.add + local.set 0 + local.get 1 + i32.load16_u offset=4 + i32.const 13 + i32.ne + br_if 1 (;@9;) + local.get 1 + i32.const 6 + i32.add + local.get 0 + local.get 1 + i32.load16_u offset=6 + i32.const 10 + i32.eq + select + local.set 0 + br 1 (;@9;) + end + end + i32.const 4224 + i32.load + br_if 0 (;@8;) + i32.const 4224 + i32.const 9 + i32.store + i32.const 4228 + local.get 0 + i32.const 4188 + i32.load + i32.sub + i32.const 1 + i32.shr_s + i32.store + end + i32.const 4196 + local.get 3 + i32.const 4 + i32.add + local.tee 1 + i32.store + call 4 + local.tee 0 + i32.const 58 + i32.ne + br_if 1 (;@6;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + call 9 + i32.eqz + i32.const 4196 + i32.load + i32.load16_u + local.tee 0 + i32.const 92 + i32.ne + i32.and + br_if 3 (;@4;) + i32.const 18596 + i32.load + local.get 6 + local.get 1 + call 8 + br 1 (;@6;) + end + i32.const 4196 + i32.load + local.tee 0 + i32.load16_u offset=2 + i32.const 46 + i32.ne + br_if 2 (;@4;) + local.get 0 + i32.load16_u offset=4 + i32.const 46 + i32.ne + br_if 2 (;@4;) + i32.const 4196 + local.get 0 + i32.const 6 + i32.add + i32.store + block ;; label = @7 + block ;; label = @8 + local.get 0 + i32.load16_u offset=6 + local.tee 0 + i32.const 114 + i32.eq + if (result i32) ;; label = @9 + i32.const 1 + call 2 + i32.const 4196 + i32.load + local.set 0 + br_if 1 (;@8;) + local.get 0 + i32.load16_u + else + local.get 0 + end + i32.const 65535 + i32.and + call 9 + i32.eqz + br_if 4 (;@4;) + br 1 (;@7;) + end + i32.const 4196 + local.get 0 + i32.const 2 + i32.add + i32.store + end + call 4 + local.set 0 + end + local.get 0 + i32.const 65535 + i32.and + local.tee 0 + i32.const 44 + i32.eq + br_if 0 (;@5;) + end + local.get 0 + i32.const 125 + i32.eq + br_if 3 (;@1;) + end + i32.const 4196 + local.get 5 + i32.store + return + end + i32.const 1 + call 2 + drop + end + i32.const 4196 + local.get 2 + i32.store + end) + (func (;6;) (type 1) (param i32) (result i32) + (local i32 i32) + i32.const 4196 + i32.load + local.set 1 + block ;; label = @1 + local.get 0 + i32.const 109 + i32.eq + if (result i32) ;; label = @2 + local.get 1 + i32.load16_u offset=2 + i32.const 111 + i32.ne + br_if 1 (;@1;) + local.get 1 + i32.load16_u offset=4 + i32.const 100 + i32.ne + br_if 1 (;@1;) + local.get 1 + i32.load16_u offset=6 + i32.const 117 + i32.ne + br_if 1 (;@1;) + local.get 1 + i32.load16_u offset=8 + i32.const 108 + i32.ne + br_if 1 (;@1;) + local.get 1 + i32.load16_u offset=10 + i32.const 101 + i32.ne + br_if 1 (;@1;) + i32.const 4196 + local.get 1 + i32.const 12 + i32.add + i32.store + call 4 + i32.const 46 + i32.ne + if ;; label = @3 + br 2 (;@1;) + end + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + else + local.get 0 + end + i32.const 101 + i32.ne + br_if 0 (;@1;) + i32.const 4196 + i32.load + local.tee 0 + i32.load16_u offset=2 + i32.const 120 + i32.ne + br_if 0 (;@1;) + local.get 0 + i32.load16_u offset=4 + i32.const 112 + i32.ne + br_if 0 (;@1;) + local.get 0 + i32.load16_u offset=6 + i32.const 111 + i32.ne + br_if 0 (;@1;) + local.get 0 + i32.load16_u offset=8 + i32.const 114 + i32.ne + br_if 0 (;@1;) + local.get 0 + i32.load16_u offset=10 + i32.const 116 + i32.ne + br_if 0 (;@1;) + local.get 0 + i32.const 14 + i32.add + local.get 1 + local.get 0 + i32.load16_u offset=12 + i32.const 115 + i32.eq + local.tee 2 + select + local.set 1 + end + i32.const 4196 + local.get 1 + i32.store + local.get 2) + (func (;7;) (type 0) (result i32) + (local i32 i32 i32 i32 i32 i32 i32) + loop ;; label = @1 + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + local.tee 2 + i32.const 40 + i32.eq + br_if 0 (;@1;) + i32.const 4196 + i32.load + local.set 3 + block ;; label = @2 + block ;; label = @3 + i32.const 4196 + block (result i32) ;; label = @4 + block ;; label = @5 + local.get 2 + i32.const 34 + i32.eq + local.get 2 + i32.const 39 + i32.eq + i32.or + i32.eqz + if ;; label = @6 + local.get 2 + i32.const 123 + i32.eq + br_if 1 (;@5;) + i32.const 4200 + i32.load + local.set 5 + local.get 3 + local.set 0 + loop ;; label = @7 + local.get 0 + local.get 5 + i32.gt_u + br_if 4 (;@3;) + local.get 0 + i32.load16_u + local.tee 1 + local.set 4 + local.get 1 + i32.const 64512 + i32.and + i32.const 55296 + i32.ne + local.tee 6 + if (result i32) ;; label = @8 + local.get 4 + else + local.get 1 + i32.const 10 + i32.shl + i32.const 1047552 + i32.and + local.get 0 + i32.load16_u offset=2 + i32.const 1023 + i32.and + i32.or + i32.const 65536 + i32.add + end + call 15 + i32.eqz + br_if 4 (;@3;) + i32.const 4196 + local.get 0 + i32.const 2 + i32.const 4 + local.get 6 + if (result i32) ;; label = @8 + local.get 1 + else + local.get 1 + i32.const 10 + i32.shl + i32.const 1047552 + i32.and + local.get 0 + i32.load16_u offset=2 + i32.const 1023 + i32.and + i32.or + i32.const 65536 + i32.add + end + i32.const 65536 + i32.lt_u + select + i32.add + local.tee 0 + i32.store + br 0 (;@7;) + end + unreachable + end + i32.const 4200 + i32.load + local.set 4 + local.get 3 + local.set 0 + block ;; label = @6 + loop ;; label = @7 + block ;; label = @8 + local.get 0 + local.tee 1 + i32.const 2 + i32.add + local.set 0 + local.get 1 + local.get 4 + i32.ge_u + br_if 0 (;@8;) + local.get 2 + local.get 0 + i32.load16_u + local.tee 5 + i32.eq + if ;; label = @9 + local.get 1 + local.set 4 + br 3 (;@6;) + end + local.get 5 + i32.const 92 + i32.ne + if ;; label = @9 + local.get 5 + i32.const 10 + i32.sub + br_table 1 (;@8;) 2 (;@7;) 2 (;@7;) 1 (;@8;) 2 (;@7;) + end + local.get 1 + i32.const 4 + i32.add + local.set 0 + local.get 1 + i32.load16_u offset=4 + i32.const 13 + i32.ne + br_if 1 (;@7;) + local.get 1 + i32.const 6 + i32.add + local.get 0 + local.get 1 + i32.load16_u offset=6 + i32.const 10 + i32.eq + select + local.set 0 + br 1 (;@7;) + end + end + i32.const 4224 + i32.load + br_if 0 (;@6;) + i32.const 4224 + i32.const 9 + i32.store + i32.const 4228 + local.get 0 + i32.const 4188 + i32.load + i32.sub + i32.const 1 + i32.shr_s + i32.store + end + local.get 4 + i32.const 4 + i32.add + br 1 (;@4;) + end + i32.const 4196 + local.get 3 + i32.const 2 + i32.add + i32.store + call 4 + i32.const 125 + i32.ne + if ;; label = @5 + i32.const 123 + local.set 2 + br 3 (;@2;) + end + i32.const 4196 + i32.load + i32.const 2 + i32.add + end + local.tee 0 + i32.store + end + local.get 0 + local.get 3 + i32.eq + br_if 0 (;@2;) + call 4 + i32.const 44 + i32.eq + br_if 1 (;@1;) + end + end + i32.const 4196 + local.get 3 + i32.store + local.get 2) + (func (;8;) (type 4) (param i32 i32 i32) + (local i32 i64 i64) + i32.const 4136 + i64.load + local.tee 5 + i64.const 12 + i64.add + local.tee 4 + i32.const 4144 + i64.load + i64.gt_u + if (result i64) ;; label = @1 + local.get 4 + call 17 + i32.const 4136 + i64.load + else + local.get 5 + end + i32.wrap_i64 + local.tee 3 + i32.const 0 + i32.store offset=8 + local.get 3 + local.get 2 + i32.store offset=4 + local.get 3 + local.get 1 + i32.store + local.get 0 + i32.load offset=4 + local.tee 1 + i32.const 8 + i32.add + local.get 0 + local.get 1 + select + local.get 3 + i32.store + i32.const 4136 + local.get 4 + i64.store + local.get 0 + local.get 3 + i32.store offset=4) + (func (;9;) (type 1) (param i32) (result i32) + (local i32) + block (result i32) ;; label = @1 + local.get 0 + i32.const 64512 + i32.and + i32.const 55296 + i32.eq + if ;; label = @2 + local.get 0 + i32.const 10 + i32.shl + i32.const 1047552 + i32.and + i32.const 4196 + i32.load + i32.load16_u offset=2 + i32.const 1023 + i32.and + i32.or + i32.const 65536 + i32.add + local.set 0 + end + i32.const 0 + local.get 0 + call 16 + i32.eqz + br_if 0 (;@1;) + drop + i32.const 4196 + i32.load + i32.const 2 + i32.const 4 + local.get 0 + i32.const 65536 + i32.lt_u + select + i32.add + local.set 1 + block ;; label = @2 + loop ;; label = @3 + i32.const 4196 local.get 1 - i32.shl - i32.const 2097155 - i32.and - select - i32.or - local.get 0 - i32.const 8400 - i32.sub - i32.const 13 - i32.lt_u - local.get 0 - i32.const 11503 - i32.sub - i32.const 3 - i32.lt_u - i32.or - local.get 0 - i32.const 11647 - i32.eq - local.get 0 - i32.const -32 - i32.and - i32.const 11744 - i32.eq - i32.or - i32.or - i32.or - br_if 2 (;@1;) - local.get 0 - i32.const 12330 - i32.sub - i32.const 6 - i32.lt_u + i32.store + block ;; label = @4 + local.get 1 + i32.load16_u + local.tee 0 + i32.const 64512 + i32.and + i32.const 55296 + i32.eq + if ;; label = @5 + local.get 0 + i32.const 10 + i32.shl + i32.const 1047552 + i32.and + local.get 1 + i32.load16_u offset=2 + i32.const 1023 + i32.and + i32.or + i32.const 65536 + i32.add + local.set 0 + br 1 (;@4;) + end + local.get 0 + i32.eqz + br_if 2 (;@2;) + end local.get 0 - i32.const 12441 - i32.sub - i32.const 2 - i32.lt_u - i32.or + call 15 + if ;; label = @4 + local.get 1 + i32.const 2 + i32.const 4 + local.get 0 + i32.const 65536 + i32.lt_u + select + i32.add + local.set 1 + br 1 (;@3;) + end + end + i32.const 0 + local.get 0 + i32.const 92 + i32.eq + br_if 1 (;@1;) + drop + end + i32.const 1 + end) + (func (;10;) (type 5) (param i32 i32 i32) (result i32) + (local i32 i32 i32) + i32.const 4200 + i32.load + i32.const 2 + i32.add + local.tee 3 + local.get 0 + i32.lt_u + local.get 3 + local.get 0 + i32.sub + i32.const 1 + i32.shr_s + local.get 2 + i32.lt_u + i32.or + if (result i32) ;; label = @1 + i32.const 1 + else + i32.const 0 + local.set 3 + block ;; label = @2 + local.get 2 + i32.const 1 + i32.shl + local.tee 2 + i32.eqz + br_if 0 (;@2;) + loop ;; label = @3 local.get 0 - i32.const 42607 + i32.load8_u + local.tee 4 + local.get 1 + i32.load8_u + local.tee 5 i32.eq + if ;; label = @4 + local.get 1 + i32.const 1 + i32.add + local.set 1 + local.get 0 + i32.const 1 + i32.add + local.set 0 + local.get 2 + i32.const 1 + i32.sub + local.tee 2 + br_if 1 (;@3;) + br 2 (;@2;) + end + end + local.get 4 + local.get 5 + i32.sub + local.set 3 + end + local.get 3 + end + i32.eqz) + (func (;11;) (type 3) (param i32 i32) (result i32) + (local i32 i32) + block ;; label = @1 + call 4 + i32.const 79 + i32.ne + br_if 0 (;@1;) + i32.const 4196 + i32.load + local.tee 2 + i32.load16_u offset=2 + i32.const 98 + i32.ne + br_if 0 (;@1;) + local.get 2 + i32.load16_u offset=4 + i32.const 106 + i32.ne + br_if 0 (;@1;) + local.get 2 + i32.load16_u offset=6 + i32.const 101 + i32.ne + br_if 0 (;@1;) + local.get 2 + i32.load16_u offset=8 + i32.const 99 + i32.ne + br_if 0 (;@1;) + local.get 2 + i32.load16_u offset=10 + i32.const 116 + i32.ne + br_if 0 (;@1;) + i32.const 4196 + local.get 2 + i32.const 12 + i32.add + i32.store + call 4 + i32.const 46 + i32.ne + br_if 0 (;@1;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + local.tee 2 + i32.const 112 + i32.eq + if ;; label = @2 + i32.const 4196 + i32.load + local.tee 2 + i32.load16_u offset=2 + i32.const 114 + i32.ne + br_if 1 (;@1;) + local.get 2 + i32.load16_u offset=4 + i32.const 111 + i32.ne + br_if 1 (;@1;) + local.get 2 + i32.load16_u offset=6 + i32.const 116 + i32.ne + br_if 1 (;@1;) + local.get 2 + i32.load16_u offset=8 + i32.const 111 + i32.ne + br_if 1 (;@1;) + local.get 2 + i32.load16_u offset=10 + i32.const 116 + i32.ne + br_if 1 (;@1;) + local.get 2 + i32.load16_u offset=12 + i32.const 121 + i32.ne + br_if 1 (;@1;) + local.get 2 + i32.load16_u offset=14 + i32.const 112 + i32.ne + br_if 1 (;@1;) + local.get 2 + i32.load16_u offset=16 + i32.const 101 + i32.ne + br_if 1 (;@1;) + i32.const 4196 + local.get 2 + i32.const 18 + i32.add + i32.store + call 4 + i32.const 46 + i32.ne + br_if 1 (;@1;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + local.set 2 + end + local.get 2 + i32.const 104 + i32.ne + br_if 0 (;@1;) + i32.const 4196 + i32.load + local.tee 2 + i32.load16_u offset=2 + i32.const 97 + i32.ne + br_if 0 (;@1;) + local.get 2 + i32.load16_u offset=4 + i32.const 115 + i32.ne + br_if 0 (;@1;) + local.get 2 + i32.load16_u offset=6 + i32.const 79 + i32.ne + br_if 0 (;@1;) + local.get 2 + i32.load16_u offset=8 + i32.const 119 + i32.ne + br_if 0 (;@1;) + local.get 2 + i32.load16_u offset=10 + i32.const 110 + i32.ne + br_if 0 (;@1;) + local.get 2 + i32.load16_u offset=12 + i32.const 80 + i32.ne + br_if 0 (;@1;) + local.get 2 + i32.load16_u offset=14 + i32.const 114 + i32.ne + br_if 0 (;@1;) + local.get 2 + i32.load16_u offset=16 + i32.const 111 + i32.ne + br_if 0 (;@1;) + local.get 2 + i32.load16_u offset=18 + i32.const 112 + i32.ne + br_if 0 (;@1;) + local.get 2 + i32.load16_u offset=20 + i32.const 101 + i32.ne + br_if 0 (;@1;) + local.get 2 + i32.load16_u offset=22 + i32.const 114 + i32.ne + br_if 0 (;@1;) + local.get 2 + i32.load16_u offset=24 + i32.const 116 + i32.ne + br_if 0 (;@1;) + local.get 2 + i32.load16_u offset=26 + i32.const 121 + i32.ne + br_if 0 (;@1;) + i32.const 4196 + local.get 2 + i32.const 28 + i32.add + i32.store + call 4 + i32.const 46 + i32.ne + br_if 0 (;@1;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + i32.const 99 + i32.ne + br_if 0 (;@1;) + i32.const 4196 + i32.load + local.tee 2 + i32.load16_u offset=2 + i32.const 97 + i32.ne + br_if 0 (;@1;) + local.get 2 + i32.load16_u offset=4 + i32.const 108 + i32.ne + br_if 0 (;@1;) + local.get 2 + i32.load16_u offset=6 + i32.const 108 + i32.ne + br_if 0 (;@1;) + i32.const 4196 + local.get 2 + i32.const 8 + i32.add + i32.store + call 4 + i32.const 40 + i32.ne + br_if 0 (;@1;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + call 9 + i32.eqz + br_if 0 (;@1;) + call 4 + i32.const 44 + i32.ne + br_if 0 (;@1;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + call 4 + drop + i32.const 4196 + i32.load + local.tee 2 + local.get 0 + local.get 1 + call 10 + i32.eqz + br_if 0 (;@1;) + i32.const 4196 + local.get 2 + local.get 1 + i32.const 1 + i32.shl + i32.add + i32.store + call 4 + i32.const 41 + i32.ne + br_if 0 (;@1;) + i32.const 4196 + i32.const 4196 + i32.load + i32.const 2 + i32.add + i32.store + i32.const 1 + local.set 3 + end + local.get 3) + (func (;12;) (type 6) + (local i32 i32 i32 i32) + i32.const 4196 + i32.load + local.set 0 + i32.const 4200 + i32.load + local.set 3 + block ;; label = @1 + block ;; label = @2 + loop ;; label = @3 + block ;; label = @4 + local.get 0 + local.tee 1 + i32.const 2 + i32.add + local.set 0 + local.get 1 + local.get 3 + i32.ge_u + br_if 0 (;@4;) + block ;; label = @5 + block ;; label = @6 + local.get 0 + i32.load16_u + local.tee 2 + i32.const 92 + i32.sub + br_table 1 (;@5;) 3 (;@3;) 3 (;@3;) 3 (;@3;) 4 (;@2;) 0 (;@6;) + end + local.get 2 + i32.const 36 + i32.ne + br_if 2 (;@3;) + local.get 1 + i32.load16_u offset=4 + i32.const 123 + i32.ne + br_if 2 (;@3;) + i32.const 4196 + local.get 1 + i32.const 4 + i32.add + local.tee 1 + i32.store + block ;; label = @6 + i32.const 4212 + i32.load16_u + local.tee 0 + i32.const 2048 + i32.ne + if ;; label = @7 + i32.const 4214 + i32.load16_u + local.tee 2 + i32.const 2048 + i32.ne + br_if 1 (;@6;) + end + i32.const 4224 + i32.load + i32.eqz + if ;; label = @7 + i32.const 4224 + i32.const 12 + i32.store + i32.const 4228 + local.get 1 + i32.const 4188 + i32.load + i32.sub + i32.const 1 + i32.shr_s + i32.store + end + br 5 (;@1;) + end + local.get 0 + i32.const 1 + i32.shl + i32.const 4232 + i32.add + i32.const 4216 + i32.load16_u + i32.store16 + local.get 2 + i32.const 16520 + i32.add + i32.const 0 + i32.store8 + i32.const 4212 + local.get 0 + i32.const 1 + i32.add + i32.store16 + i32.const 4216 + local.get 2 + i32.const 1 + i32.add + local.tee 1 + i32.store16 + i32.const 4214 + local.get 1 + i32.store16 + local.get 2 + i32.const 2 + i32.shl + i32.const 8328 + i32.add + i32.const 4188 + i32.load + i32.const 2 + i32.sub + i32.store + return + end + local.get 1 + i32.const 4 + i32.add + local.set 0 + br 1 (;@3;) + end + end + i32.const 4224 + i32.load + i32.eqz + if ;; label = @3 + i32.const 4224 + i32.const 14 + i32.store + i32.const 4228 local.get 0 - i32.const 42612 - i32.sub - i32.const 10 - i32.lt_u - i32.or - i32.or - local.get 0 - i32.const 42528 - i32.sub - i32.const 10 - i32.lt_u - i32.or - br_if 2 (;@1;) - local.get 0 - i32.const 42654 - i32.sub - i32.const 2 - i32.lt_u - local.get 0 - i32.const 42736 - i32.sub - i32.const 2 - i32.lt_u - i32.or - local.get 0 - i32.const 43019 + i32.const 4188 + i32.load i32.sub - local.tee 1 - i32.const 28 - i32.le_u - i32.const 0 i32.const 1 + i32.shr_s + i32.store + end + br 1 (;@1;) + end + i32.const 4196 + local.get 0 + i32.store + return + end + i32.const 4196 + local.get 3 + i32.const 2 + i32.add + i32.store) + (func (;13;) (type 1) (param i32) (result i32) + (local i32 i32 i32) + i32.const 1 + local.set 2 + block ;; label = @1 + block ;; label = @2 + block ;; label = @3 + block ;; label = @4 + block ;; label = @5 + block ;; label = @6 + block ;; label = @7 + block ;; label = @8 + local.get 0 + i32.load16_u + local.tee 1 + i32.const 59 + i32.sub + br_table 7 (;@1;) 5 (;@3;) 5 (;@3;) 1 (;@7;) 0 (;@8;) + end + block ;; label = @8 + local.get 1 + i32.const 101 + i32.sub + br_table 3 (;@5;) 5 (;@3;) 5 (;@3;) 2 (;@6;) 0 (;@8;) + end + local.get 1 + i32.const 41 + i32.ne + br_if 3 (;@4;) + i32.const 1 + return + end + local.get 0 + i32.const 2 + i32.sub + i32.load16_u + i32.const 61 + i32.eq + return + end + i32.const 0 + local.set 2 + local.get 0 + i32.const 8 + i32.sub + local.tee 1 + i32.const 4188 + i32.load + local.tee 3 + i32.lt_u + br_if 4 (;@1;) + local.get 1 + i32.load16_u + i32.const 99 + i32.ne + br_if 4 (;@1;) + local.get 0 + i32.const 6 + i32.sub + i32.load16_u + i32.const 97 + i32.ne + br_if 4 (;@1;) + local.get 0 + i32.const 4 + i32.sub + i32.load16_u + i32.const 116 + i32.ne + br_if 4 (;@1;) + local.get 0 + i32.const 2 + i32.sub + i32.load16_u + i32.const 99 + i32.ne + br_if 4 (;@1;) + i32.const 1 + local.set 2 + local.get 1 + local.get 3 + i32.eq + br_if 4 (;@1;) + local.get 0 + i32.const 10 + i32.sub + i32.load16_u + call 3 + return + end + i32.const 0 + local.set 2 + local.get 0 + i32.const 6 + i32.sub + local.tee 1 + i32.const 4188 + i32.load + local.tee 3 + i32.lt_u + br_if 3 (;@1;) + local.get 1 + i32.load16_u + i32.const 101 + i32.ne + br_if 3 (;@1;) + local.get 0 + i32.const 4 + i32.sub + i32.load16_u + i32.const 108 + i32.ne + br_if 3 (;@1;) + local.get 0 + i32.const 2 + i32.sub + i32.load16_u + i32.const 115 + i32.ne + br_if 3 (;@1;) + i32.const 1 + local.set 2 + local.get 1 + local.get 3 + i32.eq + br_if 3 (;@1;) + local.get 0 + i32.const 8 + i32.sub + i32.load16_u + call 3 + return + end local.get 1 - i32.shl - i32.const 520093697 - i32.and - select - i32.or - br_if 2 (;@1;) - i32.const 1 - local.set 1 + i32.const 121 + i32.eq + br_if 1 (;@2;) + end + i32.const 0 + local.set 2 + br 1 (;@1;) + end + i32.const 0 + local.set 2 + local.get 0 + i32.const 12 + i32.sub + local.tee 1 + i32.const 4188 + i32.load + local.tee 3 + i32.lt_u + br_if 0 (;@1;) + local.get 1 + i32.load16_u + i32.const 102 + i32.ne + br_if 0 (;@1;) + local.get 0 + i32.const 10 + i32.sub + i32.load16_u + i32.const 105 + i32.ne + br_if 0 (;@1;) + local.get 0 + i32.const 8 + i32.sub + i32.load16_u + i32.const 110 + i32.ne + br_if 0 (;@1;) + local.get 0 + i32.const 6 + i32.sub + i32.load16_u + i32.const 97 + i32.ne + br_if 0 (;@1;) + local.get 0 + i32.const 4 + i32.sub + i32.load16_u + i32.const 108 + i32.ne + br_if 0 (;@1;) + local.get 0 + i32.const 2 + i32.sub + i32.load16_u + i32.const 108 + i32.ne + br_if 0 (;@1;) + i32.const 1 + local.set 2 + local.get 1 + local.get 3 + i32.eq + br_if 0 (;@1;) + local.get 0 + i32.const 14 + i32.sub + i32.load16_u + call 3 + return + end + local.get 2) + (func (;14;) (type 1) (param i32) (result i32) + (local i32 i32 i32 i32) + i32.const 4188 + i32.load + local.tee 1 + i32.const 2 + i32.add + local.set 4 + block ;; label = @1 + block ;; label = @2 + block ;; label = @3 + loop ;; label = @4 + local.get 0 + local.get 1 + i32.lt_u + br_if 1 (;@3;) + local.get 0 + i32.const 6 + i32.sub + local.set 3 + loop ;; label = @5 + block ;; label = @6 + local.get 0 + i32.load16_u + local.tee 2 + i32.const 9 + i32.sub + i32.const 5 + i32.lt_u + local.get 2 + i32.const 32 + i32.eq + i32.or + local.get 2 + i32.const 160 + i32.eq + i32.or + i32.eqz + if ;; label = @7 + local.get 2 + i32.const 47 + i32.ne + br_if 5 (;@2;) + local.get 0 + local.get 1 + i32.ne + br_if 1 (;@6;) + local.get 1 + return + end + local.get 0 + local.get 1 + i32.eq + br_if 5 (;@1;) + local.get 3 + i32.const 2 + i32.sub + local.set 3 + local.get 0 + i32.const 2 + i32.sub + local.set 0 + br 1 (;@5;) + end + end + local.get 0 + i32.const 2 + i32.sub + i32.load16_u + i32.const 42 + i32.ne + br_if 2 (;@2;) + local.get 0 + local.get 4 + i32.eq + br_if 3 (;@1;) + loop ;; label = @5 + block ;; label = @6 + local.get 3 + i32.const 2 + i32.add + local.tee 2 + local.get 1 + i32.le_u + br_if 0 (;@6;) + local.get 2 + i32.load16_u + i32.const 42 + i32.eq + if ;; label = @7 + local.get 3 + i32.load16_u + i32.const 47 + i32.eq + br_if 1 (;@6;) + end + local.get 3 + i32.const 2 + i32.sub + local.set 3 + br 1 (;@5;) + end + end + local.get 2 + i32.const 4 + i32.sub + local.set 0 + local.get 2 + local.get 4 + i32.gt_u + br_if 0 (;@4;) + end + br 2 (;@1;) + end + local.get 1 + i32.const 2 + i32.sub + local.set 0 + end + local.get 0 + return + end + local.get 1 + i32.const 2 + i32.sub) + (func (;15;) (type 1) (param i32) (result i32) + (local i32 i32 i32 i32) + local.get 0 + i32.const 47 + i32.le_u + if ;; label = @1 + local.get 0 + i32.const 36 + i32.eq + return + end + block ;; label = @1 + local.get 0 + i32.const 58 + i32.lt_u + br_if 0 (;@1;) + block ;; label = @2 + block ;; label = @3 block ;; label = @4 + local.get 0 + i32.const 65 + i32.lt_u + br_if 0 (;@4;) + local.get 0 + i32.const 91 + i32.lt_u + br_if 3 (;@1;) + local.get 0 + i32.const 96 + i32.le_u + if ;; label = @5 + local.get 0 + i32.const 95 + i32.eq + return + end + local.get 0 + i32.const 123 + i32.lt_u + br_if 3 (;@1;) + i32.const 65536 + local.set 4 + local.get 0 + i32.const 65536 + i32.ge_u + if ;; label = @5 + i32.const 1152 + local.set 1 + i32.const -2 + local.set 2 + loop ;; label = @6 + local.get 2 + i32.const 2 + i32.add + local.tee 2 + i32.const 488 + i32.ge_u + br_if 4 (;@2;) + local.get 1 + i32.load + local.get 4 + i32.add + local.tee 4 + local.get 0 + i32.gt_u + br_if 4 (;@2;) + local.get 1 + i32.const 4 + i32.add + local.set 3 + local.get 1 + i32.const 8 + i32.add + local.set 1 + local.get 0 + local.get 3 + i32.load + local.get 4 + i32.add + local.tee 4 + i32.gt_u + br_if 0 (;@6;) + end + br 4 (;@1;) + end + local.get 0 + i32.const 170 + i32.lt_u + br_if 0 (;@4;) + local.get 0 + call 18 + local.get 0 + i32.const 8204 + i32.sub + i32.const 2 + i32.lt_u + i32.or + local.get 0 + i32.const 183 + i32.eq + local.get 0 + i32.const 768 + i32.sub + i32.const 112 + i32.lt_u + i32.or + i32.or + local.get 0 + i32.const 903 + i32.eq + local.get 0 + i32.const 1155 + i32.sub + i32.const 5 + i32.lt_u + i32.or + local.get 0 + i32.const 1425 + i32.sub + i32.const 45 + i32.lt_u + i32.or + i32.or + br_if 3 (;@1;) + local.get 0 + i32.const 1471 + i32.sub + local.tee 2 + i32.const 9 + i32.lt_u + if ;; label = @5 + i32.const 1 + local.set 1 + i32.const 365 + local.get 2 + i32.shr_u + i32.const 1 + i32.and + br_if 1 (;@4;) + end + local.get 0 + i32.const 1552 + i32.sub + i32.const 11 + i32.lt_u + local.get 0 + i32.const 1611 + i32.sub + i32.const 31 + i32.lt_u + i32.or + br_if 3 (;@1;) + local.get 0 + i32.const 1648 + i32.eq + local.get 0 + i32.const 1770 + i32.sub + i32.const 4 + i32.lt_u + i32.or + local.get 0 + i32.const 1750 + i32.sub + local.tee 1 + i32.const 18 + i32.le_u + i32.const 0 + i32.const 1 + local.get 1 + i32.shl + i32.const 425599 + i32.and + select + i32.or + local.get 0 + i32.const 1984 + i32.sub + i32.const 10 + i32.lt_u + local.get 0 + i32.const 1958 + i32.sub + i32.const 11 + i32.lt_u + i32.or + local.get 0 + i32.const 1809 + i32.eq + local.get 0 + i32.const 1840 + i32.sub + i32.const 27 + i32.lt_u + i32.or + i32.or + i32.or + br_if 3 (;@1;) + local.get 0 + i32.const 1776 + i32.sub + i32.const 10 + i32.lt_u + local.get 0 + i32.const 2366 + i32.sub + i32.const 18 + i32.lt_u + i32.or + local.get 0 + i32.const 2362 + i32.sub + i32.const 3 + i32.lt_u + local.get 0 + i32.const 2275 + i32.sub + i32.const 33 + i32.lt_u + i32.or + i32.or + local.get 0 + i32.const 2259 + i32.sub + i32.const 15 + i32.lt_u + local.get 0 + i32.const 2137 + i32.sub + i32.const 3 + i32.lt_u + i32.or + local.get 0 + i32.const 2089 + i32.sub + i32.const 5 + i32.lt_u + local.get 0 + i32.const 2085 + i32.sub + i32.const 3 + i32.lt_u + i32.or + i32.or + i32.or + br_if 3 (;@1;) + local.get 0 + i32.const 2075 + i32.sub + i32.const 9 + i32.lt_u + local.get 0 + i32.const 2070 + i32.sub + i32.const 4 + i32.lt_u + i32.or + local.get 0 + i32.const 2045 + i32.eq + local.get 0 + i32.const 2027 + i32.sub + i32.const 9 + i32.lt_u + i32.or + i32.or + br_if 3 (;@1;) + block ;; label = @5 + local.get 0 + i32.const 2385 + i32.sub + local.tee 2 + i32.const 19 + i32.ge_u + if ;; label = @6 + local.get 0 + i32.const 2406 + i32.sub + i32.const 10 + i32.lt_u + br_if 5 (;@1;) + br 1 (;@5;) + end + i32.const 1 + local.set 1 + i32.const 393343 + local.get 2 + i32.shr_u + i32.const 1 + i32.and + local.get 0 + i32.const 2406 + i32.sub + i32.const 10 + i32.lt_u + i32.or + br_if 1 (;@4;) + end + i32.const 1 + local.set 1 + block ;; label = @5 + block ;; label = @6 + local.get 0 + i32.const 2492 + i32.sub + br_table 2 (;@4;) 1 (;@5;) 2 (;@4;) 2 (;@4;) 2 (;@4;) 2 (;@4;) 2 (;@4;) 2 (;@4;) 2 (;@4;) 1 (;@5;) 1 (;@5;) 2 (;@4;) 2 (;@4;) 1 (;@5;) 1 (;@5;) 2 (;@4;) 2 (;@4;) 2 (;@4;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 2 (;@4;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 2 (;@4;) 2 (;@4;) 0 (;@6;) + end + local.get 0 + i32.const 2433 + i32.sub + i32.const 3 + i32.lt_u + br_if 4 (;@1;) + end + local.get 0 + i32.const 2558 + i32.eq + local.get 0 + i32.const 2534 + i32.sub + i32.const 10 + i32.lt_u + i32.or + br_if 3 (;@1;) + local.get 0 + i32.const 2677 + i32.eq + local.get 0 + i32.const 2561 + i32.sub + i32.const 3 + i32.lt_u + i32.or + local.get 0 + i32.const 2620 + i32.sub + local.tee 1 + i32.const 21 + i32.le_u + i32.const 0 + i32.const 1 + local.get 1 + i32.shl + i32.const 2332797 + i32.and + select + i32.or + local.get 0 + i32.const 2662 + i32.sub + i32.const 12 + i32.lt_u + i32.or + br_if 3 (;@1;) + i32.const 1 + local.set 1 + block ;; label = @5 + block ;; label = @6 + local.get 0 + i32.const 2748 + i32.sub + br_table 2 (;@4;) 1 (;@5;) 2 (;@4;) 2 (;@4;) 2 (;@4;) 2 (;@4;) 2 (;@4;) 2 (;@4;) 2 (;@4;) 2 (;@4;) 1 (;@5;) 2 (;@4;) 2 (;@4;) 2 (;@4;) 1 (;@5;) 2 (;@4;) 2 (;@4;) 2 (;@4;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 2 (;@4;) 2 (;@4;) 0 (;@6;) + end + local.get 0 + i32.const 2689 + i32.sub + i32.const 3 + i32.lt_u + br_if 4 (;@1;) + end + local.get 0 + i32.const 2790 + i32.sub + i32.const 10 + i32.lt_u + local.get 0 + i32.const 2810 + i32.sub + i32.const 6 + i32.lt_u + i32.or + br_if 3 (;@1;) + block ;; label = @5 + block ;; label = @6 + local.get 0 + i32.const 2876 + i32.sub + br_table 2 (;@4;) 1 (;@5;) 2 (;@4;) 2 (;@4;) 2 (;@4;) 2 (;@4;) 2 (;@4;) 2 (;@4;) 2 (;@4;) 1 (;@5;) 1 (;@5;) 2 (;@4;) 2 (;@4;) 1 (;@5;) 1 (;@5;) 2 (;@4;) 2 (;@4;) 2 (;@4;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 2 (;@4;) 2 (;@4;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 2 (;@4;) 2 (;@4;) 0 (;@6;) + end + local.get 0 + i32.const 2817 + i32.sub + i32.const 3 + i32.lt_u + br_if 4 (;@1;) + end + local.get 0 + i32.const 2918 + i32.sub + i32.const 10 + i32.lt_u + br_if 3 (;@1;) + local.get 0 + i32.const 2946 + i32.eq + local.get 0 + i32.const 3046 + i32.sub + i32.const 10 + i32.lt_u + i32.or + local.get 0 + i32.const 3006 + i32.sub + local.tee 1 + i32.const 25 + i32.le_u + i32.const 0 + i32.const 1 + local.get 1 + i32.shl + i32.const 33617695 + i32.and + select + i32.or + br_if 3 (;@1;) + i32.const 1 + local.set 1 + block ;; label = @5 + block ;; label = @6 + local.get 0 + i32.const 3134 + i32.sub + br_table 2 (;@4;) 2 (;@4;) 2 (;@4;) 2 (;@4;) 2 (;@4;) 2 (;@4;) 2 (;@4;) 1 (;@5;) 2 (;@4;) 2 (;@4;) 2 (;@4;) 1 (;@5;) 2 (;@4;) 2 (;@4;) 2 (;@4;) 2 (;@4;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 2 (;@4;) 2 (;@4;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 2 (;@4;) 2 (;@4;) 0 (;@6;) + end + local.get 0 + i32.const 3072 + i32.sub + i32.const 5 + i32.lt_u + br_if 4 (;@1;) + end + local.get 0 + i32.const 3174 + i32.sub + i32.const 10 + i32.lt_u + br_if 3 (;@1;) + block ;; label = @5 + block ;; label = @6 + local.get 0 + i32.const 3260 + i32.sub + br_table 2 (;@4;) 1 (;@5;) 2 (;@4;) 2 (;@4;) 2 (;@4;) 2 (;@4;) 2 (;@4;) 2 (;@4;) 2 (;@4;) 1 (;@5;) 2 (;@4;) 2 (;@4;) 2 (;@4;) 1 (;@5;) 2 (;@4;) 2 (;@4;) 2 (;@4;) 2 (;@4;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 2 (;@4;) 2 (;@4;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 2 (;@4;) 2 (;@4;) 0 (;@6;) + end + local.get 0 + i32.const 3201 + i32.sub + i32.const 3 + i32.lt_u + br_if 4 (;@1;) + end + local.get 0 + i32.const 3302 + i32.sub + i32.const 10 + i32.lt_u + br_if 3 (;@1;) + local.get 0 + i32.const -4 + i32.and + local.tee 2 + i32.const 3328 + i32.eq + br_if 3 (;@1;) + block ;; label = @5 + local.get 0 + i32.const 3387 + i32.sub + local.tee 3 + i32.const 41 + i32.ge_u + if ;; label = @6 + local.get 0 + i32.const 3430 + i32.sub + i32.const 10 + i32.lt_u + br_if 5 (;@1;) + br 1 (;@5;) + end + i64.const 1649536383995 + local.get 3 + i64.extend_i32_u + i64.shr_u + i32.wrap_i64 + i32.const 1 + i32.and + local.get 0 + i32.const 3430 + i32.sub + i32.const 10 + i32.lt_u + i32.or + br_if 1 (;@4;) + end + local.get 0 + i32.const -8 + i32.and + i32.const 3544 + i32.eq + local.get 0 + i32.const 3458 + i32.sub + i32.const 2 + i32.lt_u + i32.or + local.get 0 + i32.const 3530 + i32.sub + local.tee 1 + i32.const 12 + i32.le_u + i32.const 0 + i32.const 1 + local.get 1 + i32.shl + i32.const 6113 + i32.and + select + i32.or + local.get 0 + i32.const 3558 + i32.sub + i32.const 10 + i32.lt_u + i32.or + br_if 3 (;@1;) + local.get 0 + i32.const 3761 + i32.eq + local.get 0 + i32.const 3570 + i32.sub + i32.const 2 + i32.lt_u + i32.or + local.get 0 + i32.const 3633 + i32.sub + local.tee 1 + i32.const 29 + i32.le_u + i32.const 0 + i32.const 1 + local.get 1 + i32.shl + i32.const 1069548537 + i32.and + select + i32.or + local.get 0 + i32.const 3664 + i32.sub + i32.const 10 + i32.lt_u + i32.or + br_if 3 (;@1;) + block ;; label = @5 + local.get 0 + i32.const 3764 + i32.sub + local.tee 3 + i32.const 9 + i32.ge_u + if ;; label = @6 + local.get 0 + i32.const 3784 + i32.sub + i32.const 6 + i32.lt_u + br_if 5 (;@1;) + br 1 (;@5;) + end + i32.const 1 + local.set 1 + i32.const 447 + local.get 3 + i32.shr_u + i32.const 1 + i32.and + local.get 0 + i32.const 3784 + i32.sub + i32.const 6 + i32.lt_u + i32.or + br_if 1 (;@4;) + end + local.get 0 + i32.const 3872 + i32.sub + i32.const 10 + i32.lt_u + local.get 0 + i32.const 3792 + i32.sub + i32.const 10 + i32.lt_u + i32.or + br_if 3 (;@1;) + local.get 0 + i32.const -2 + i32.and + local.tee 3 + i32.const 3864 + i32.eq + br_if 3 (;@1;) + local.get 0 + i32.const 3893 + i32.sub + local.tee 4 + i32.const 11 + i32.lt_u + if ;; label = @5 + i32.const 1 + local.set 1 + i32.const 1557 + local.get 4 + i32.shr_u + i32.const 1 + i32.and + br_if 1 (;@4;) + end + local.get 0 + i32.const 3981 + i32.sub + i32.const 11 + i32.lt_u + local.get 0 + i32.const 3953 + i32.sub + i32.const 20 + i32.lt_u + i32.or + local.get 3 + i32.const 3974 + i32.eq + local.get 0 + i32.const 5906 + i32.sub + i32.const 3 + i32.lt_u + i32.or + i32.or + local.get 0 + i32.const 4969 + i32.sub + i32.const 9 + i32.lt_u + local.get 0 + i32.const 4957 + i32.sub + i32.const 3 + i32.lt_u + i32.or + local.get 0 + i32.const 4239 + i32.sub + i32.const 15 + i32.lt_u + local.get 0 + i32.const 4226 + i32.sub + i32.const 12 + i32.lt_u + i32.or + i32.or + i32.or + br_if 3 (;@1;) + local.get 0 + i32.const 4209 + i32.sub + i32.const 4 + i32.lt_u + local.get 0 + i32.const 4199 + i32.sub + i32.const 7 + i32.lt_u + i32.or + local.get 0 + i32.const 4194 + i32.sub + i32.const 3 + i32.lt_u + local.get 0 + i32.const 4190 + i32.sub + i32.const 3 + i32.lt_u + i32.or + i32.or + local.get 0 + i32.const 4182 + i32.sub + i32.const 4 + i32.lt_u + local.get 0 + i32.const 4160 + i32.sub + i32.const 10 + i32.lt_u + i32.or + local.get 0 + i32.const 4038 + i32.eq + local.get 0 + i32.const 4139 + i32.sub + i32.const 20 + i32.lt_u + i32.or + i32.or + i32.or + br_if 3 (;@1;) + local.get 0 + i32.const 3993 + i32.sub + i32.const 36 + i32.lt_u + local.get 0 + i32.const 5938 + i32.sub + i32.const 3 + i32.lt_u + i32.or + local.get 0 + i32.const 5970 + i32.sub + i32.const 2 + i32.lt_u + local.get 0 + i32.const 6002 + i32.sub + i32.const 2 + i32.lt_u + i32.or + i32.or + local.get 0 + i32.const 6155 + i32.sub + i32.const 3 + i32.lt_u + local.get 0 + i32.const 6112 + i32.sub + i32.const 10 + i32.lt_u + i32.or + local.get 0 + i32.const 6109 + i32.eq + local.get 0 + i32.const 6068 + i32.sub + i32.const 32 + i32.lt_u + i32.or + i32.or + i32.or + br_if 3 (;@1;) + local.get 0 + i32.const 7376 + i32.sub + i32.const 3 + i32.lt_u + local.get 0 + i32.const -18 + i32.and + i32.const 7232 + i32.sub + i32.const 10 + i32.lt_u + i32.or + local.get 0 + i32.const 7204 + i32.sub + i32.const 20 + i32.lt_u + local.get 0 + i32.const 7142 + i32.sub + i32.const 14 + i32.lt_u + i32.or + i32.or + local.get 0 + i32.const 7088 + i32.sub + i32.const 10 + i32.lt_u + local.get 0 + i32.const 7073 + i32.sub + i32.const 13 + i32.lt_u + i32.or + local.get 0 + i32.const 7040 + i32.sub + i32.const 3 + i32.lt_u + local.get 0 + i32.const 7019 + i32.sub + i32.const 9 + i32.lt_u + i32.or + i32.or + i32.or + br_if 3 (;@1;) + local.get 0 + i32.const 6992 + i32.sub + i32.const 10 + i32.lt_u + local.get 0 + i32.const 6964 + i32.sub + i32.const 17 + i32.lt_u + i32.or + local.get 0 + i32.const 6912 + i32.sub + i32.const 5 + i32.lt_u + local.get 0 + i32.const 6832 + i32.sub + i32.const 14 + i32.lt_u + i32.or + i32.or + local.get 0 + i32.const 6800 + i32.sub + i32.const 10 + i32.lt_u + local.get 0 + i32.const 6783 + i32.sub + i32.const 11 + i32.lt_u + i32.or + local.get 0 + i32.const 6752 + i32.sub + i32.const 29 + i32.lt_u + local.get 0 + i32.const 6741 + i32.sub + i32.const 10 + i32.lt_u + i32.or + i32.or + i32.or + br_if 3 (;@1;) + local.get 0 + i32.const 6679 + i32.sub + i32.const 5 + i32.lt_u + local.get 0 + i32.const 6608 + i32.sub + i32.const 11 + i32.lt_u + i32.or + local.get 0 + i32.const 6313 + i32.eq + local.get 0 + i32.const 6470 + i32.sub + i32.const 10 + i32.lt_u + i32.or + i32.or + local.get 0 + i32.const 6160 + i32.sub + i32.const 10 + i32.lt_u + local.get 0 + i32.const -20 + i32.and + i32.const 6432 + i32.sub + i32.const 12 + i32.lt_u + i32.or + local.get 0 + i32.const 7616 + i32.sub + i32.const 58 + i32.lt_u + local.get 0 + i32.const 7415 + i32.sub + i32.const 3 + i32.lt_u + i32.or + i32.or + i32.or + br_if 3 (;@1;) + local.get 0 + i32.const 7405 + i32.eq + local.get 0 + i32.const 7410 + i32.sub + i32.const 3 + i32.lt_u + i32.or + local.get 0 + i32.const 7380 + i32.sub + i32.const 21 + i32.lt_u + local.get 0 + i32.const 7675 + i32.sub + i32.const 5 + i32.lt_u + i32.or + i32.or + br_if 3 (;@1;) + local.get 0 + i32.const 8417 + i32.eq + local.get 0 + i32.const 8421 + i32.sub + i32.const 12 + i32.lt_u + i32.or + local.get 0 + i32.const 8255 + i32.sub + local.tee 1 + i32.const 21 + i32.le_u + i32.const 0 + i32.const 1 + local.get 1 + i32.shl + i32.const 2097155 + i32.and + select + i32.or + local.get 0 + i32.const 8400 + i32.sub + i32.const 13 + i32.lt_u + local.get 0 + i32.const 11503 + i32.sub + i32.const 3 + i32.lt_u + i32.or + local.get 0 + i32.const 11647 + i32.eq + local.get 0 + i32.const -32 + i32.and + i32.const 11744 + i32.eq + i32.or + i32.or + i32.or + br_if 3 (;@1;) + local.get 0 + i32.const 12330 + i32.sub + i32.const 6 + i32.lt_u + local.get 0 + i32.const 12441 + i32.sub + i32.const 2 + i32.lt_u + i32.or + local.get 0 + i32.const 42607 + i32.eq + local.get 0 + i32.const 42612 + i32.sub + i32.const 10 + i32.lt_u + i32.or + i32.or + local.get 0 + i32.const 42528 + i32.sub + i32.const 10 + i32.lt_u + i32.or + br_if 3 (;@1;) + local.get 0 + i32.const 42654 + i32.sub + i32.const 2 + i32.lt_u + local.get 0 + i32.const 42736 + i32.sub + i32.const 2 + i32.lt_u + i32.or + local.get 0 + i32.const 43019 + i32.sub + local.tee 1 + i32.const 28 + i32.le_u + i32.const 0 + i32.const 1 + local.get 1 + i32.shl + i32.const 520093697 + i32.and + select + i32.or + br_if 3 (;@1;) + i32.const 1 + local.set 1 block ;; label = @5 + block ;; label = @6 + local.get 0 + i32.const 43010 + i32.sub + br_table 2 (;@4;) 1 (;@5;) 1 (;@5;) 1 (;@5;) 2 (;@4;) 0 (;@6;) + end local.get 0 - i32.const 43010 + i32.const 43136 i32.sub - br_table 3 (;@2;) 1 (;@4;) 1 (;@4;) 1 (;@4;) 3 (;@2;) 0 (;@5;) + i32.const 2 + i32.lt_u + br_if 4 (;@1;) end local.get 0 - i32.const 43136 + i32.const 43443 i32.sub - i32.const 2 + i32.const 14 i32.lt_u br_if 3 (;@1;) - end - local.get 0 - i32.const 43443 - i32.sub - i32.const 14 - i32.lt_u - br_if 2 (;@1;) - block ;; label = @4 local.get 2 i32.const 43392 i32.eq @@ -10002,7 +10028,7 @@ i32.or i32.or i32.or - br_if 0 (;@4;) + br_if 1 (;@3;) local.get 0 i32.const 43493 i32.eq @@ -10014,7 +10040,7 @@ i32.const 10 i32.lt_u i32.or - br_if 0 (;@4;) + br_if 1 (;@3;) local.get 0 i32.const 43600 i32.sub @@ -10034,7 +10060,7 @@ i32.and select i32.or - br_if 0 (;@4;) + br_if 1 (;@3;) local.get 0 i32.const 44003 i32.sub @@ -10045,7 +10071,7 @@ i32.const 8 i32.ne i32.and - br_if 0 (;@4;) + br_if 1 (;@3;) local.get 0 i32.const 43696 i32.sub @@ -10059,7 +10085,7 @@ i32.const 180637 i32.and select - br_if 0 (;@4;) + br_if 1 (;@3;) local.get 0 i32.const 43643 i32.sub @@ -10079,7 +10105,7 @@ i32.and select i32.or - br_if 0 (;@4;) + br_if 1 (;@3;) local.get 0 i32.const -16 i32.and @@ -10090,104 +10116,104 @@ i32.const 64286 i32.eq i32.or - br_if 0 (;@4;) - i32.const 1 - local.set 1 - local.get 0 - i32.const 44016 - i32.sub - i32.const 10 - i32.lt_u - br_if 2 (;@2;) - local.get 2 - i32.const 65056 - i32.eq - local.get 0 - i32.const 65075 - i32.sub - i32.const 2 - i32.lt_u - i32.or - local.get 0 - i32.const 65101 - i32.sub - i32.const 3 - i32.lt_u - i32.or - local.get 0 - i32.const 65296 - i32.sub - i32.const 10 - i32.lt_u - i32.or - local.get 0 - i32.const 65343 - i32.eq - i32.or - return - end - i32.const 1 - return - end - i32.const 65536 - local.set 4 - i32.const 3024 - local.set 1 - i32.const -2 - local.set 2 - block ;; label = @3 - loop ;; label = @4 - local.get 2 - i32.const 2 - i32.add - local.tee 2 - i32.const 249 - i32.gt_u - br_if 1 (;@3;) - local.get 0 - local.get 1 - i32.load - local.get 4 - i32.add - local.tee 4 - i32.lt_u - if ;; label = @5 - i32.const 0 - local.set 3 - br 2 (;@3;) - end - local.get 1 - i32.const 4 - i32.add - local.set 3 - local.get 1 - i32.const 8 - i32.add + br_if 1 (;@3;) + i32.const 1 local.set 1 - local.get 3 - i32.load - local.get 4 - i32.add - local.tee 4 local.get 0 + i32.const 44016 + i32.sub + i32.const 10 i32.lt_u br_if 0 (;@4;) + local.get 2 + i32.const 65056 + i32.eq + local.get 0 + i32.const 65075 + i32.sub + i32.const 2 + i32.lt_u + i32.or + local.get 0 + i32.const 65101 + i32.sub + i32.const 3 + i32.lt_u + i32.or + local.get 0 + i32.const 65296 + i32.sub + i32.const 10 + i32.lt_u + i32.or + local.get 0 + i32.const 65343 + i32.eq + i32.or + return end - i32.const 1 + local.get 1 + return + end + i32.const 1 + return + end + i32.const 65536 + local.set 4 + i32.const 3104 + local.set 1 + i32.const -2 + local.set 2 + block ;; label = @2 + loop ;; label = @3 + local.get 2 + i32.const 2 + i32.add + local.tee 2 + i32.const 249 + i32.gt_u + br_if 1 (;@2;) + local.get 0 + local.get 1 + i32.load + local.get 4 + i32.add + local.tee 4 + i32.lt_u + if ;; label = @4 + i32.const 0 + local.set 3 + br 2 (;@2;) + end + local.get 1 + i32.const 4 + i32.add local.set 3 + local.get 1 + i32.const 8 + i32.add + local.set 1 + local.get 3 + i32.load + local.get 4 + i32.add + local.tee 4 + local.get 0 + i32.lt_u + br_if 0 (;@3;) end - local.get 2 - i32.const 250 - i32.lt_u - local.get 3 - i32.and - local.set 1 + i32.const 1 + local.set 3 end - local.get 1 + local.get 2 + i32.const 250 + i32.lt_u + local.get 3 + i32.and return end i32.const 1) - (func (;17;) (type 2) (param i32) (result i32) + (func (;16;) (type 1) (param i32) (result i32) (local i32 i32 i32 i32) local.get 0 i32.const 64 @@ -10224,7 +10250,7 @@ i32.const 65536 i32.ge_u if ;; label = @2 - i32.const 1072 + i32.const 1152 local.set 1 i32.const -2 local.set 4 @@ -10288,7 +10314,32 @@ return end local.get 1) - (func (;18;) (type 2) (param i32) (result i32) + (func (;17;) (type 7) (param i64) + local.get 0 + i32.const 4144 + i64.load + i64.sub + i64.const 65535 + i64.add + local.tee 0 + i64.const 16 + i64.shr_u + i32.wrap_i64 + memory.grow + i32.const -1 + i32.eq + if ;; label = @1 + unreachable + end + i32.const 4144 + i32.const 4144 + i64.load + local.get 0 + i64.const 281474976645120 + i64.and + i64.add + i64.store) + (func (;18;) (type 1) (param i32) (result i32) (local i32 i32 i32 i32 i32) block ;; label = @1 local.get 0 @@ -12208,199 +12259,223 @@ return end i32.const 1) - (func (;19;) (type 2) (param i32) (result i32) + (func (;19;) (type 1) (param i32) (result i32) (local i32) - i32.const 4024 - i32.load - local.tee 1 + block ;; label = @1 + local.get 0 + i32.const 2147483616 + i32.lt_u + if ;; label = @2 + local.get 0 + i32.const 1 + i32.shl + i32.const 31920 + i32.add + local.tee 0 + i32.const -64 + i32.sub + i32.const 0 + i32.store16 + i32.const 4136 + local.get 0 + i32.const 69 + i32.add + i32.const -4 + i32.and + i64.extend_i32_u + i64.store + i32.const 4144 + memory.size + i64.extend_i32_u + i64.const 16 + i64.shl + i64.store + loop ;; label = @3 + local.get 1 + i32.const 36 + i32.eq + br_if 2 (;@1;) + local.get 1 + i32.const 4152 + i32.add + call 0 + local.get 1 + i32.const 12 + i32.add + local.set 1 + br 0 (;@3;) + end + unreachable + end + unreachable + end + i32.const 31984) + (func (;20;) (type 8) (param i32 i32 i32 i32 i32 i32 i32) (result i32) + i32.const 18596 + i32.const 4152 + i32.store + i32.const 18588 + i64.const 0 + i64.store align=4 + i32.const 4224 + i64.const 0 + i64.store align=4 + i32.const 4212 + i64.const 281470681743360 + i64.store align=4 + i32.const 4192 + local.get 1 + i32.store + i32.const 4188 local.get 0 + i32.store + i32.const 4220 + local.get 6 i32.const 1 - i32.shl - i32.add - local.tee 0 - i32.const 0 - i32.store16 - i32.const 4084 - local.get 0 - i32.const 5 - i32.add - i32.const -4 i32.and + i32.store8 + i32.const 4208 + local.get 0 + i32.const 2 + i32.sub local.tee 0 i32.store - i32.const 4088 + i32.const 4204 local.get 0 - i64.extend_i32_u - i64.store - i32.const 4096 - memory.size - i64.extend_i32_u - i64.const 16 - i64.shl - i64.store - i32.const 4048 - i32.const 0 i32.store - i32.const 4056 - i32.const 0 + i32.const 4196 + local.get 0 i32.store - i32.const 4052 - i32.const 0 + i32.const 4221 + local.get 6 + i32.const 1 + i32.shr_u + i32.const 1 + i32.and + i32.store8 + i32.const 4200 + local.get 0 + local.get 1 + i32.const 1 + i32.shl + i32.add i32.store - i32.const 4060 - i32.const 0 + call 1) + (func (;21;) (type 9) (param i32 i32 i32 i32 i32 i32) (result i32) + i32.const 18588 + i64.const 0 + i64.store align=4 + i32.const 4224 + i64.const 0 + i64.store align=4 + i32.const 4216 + i32.const 65535 + i32.store16 + i32.const 4192 + local.get 1 i32.store - i32.const 4068 - i32.const 0 + i32.const 4188 + local.get 0 i32.store - i32.const 4064 - i32.const 0 + i32.const 18596 + i32.const 4152 i32.store - i32.const 4072 - i32.const 0 + i32.const 4208 + local.get 0 + i32.const 2 + i32.sub + local.tee 0 i32.store - i32.const 4080 - i32.const 0 + i32.const 4204 + local.get 0 + i32.store + i32.const 4196 + local.get 0 + i32.store + i32.const 4200 + local.get 0 + local.get 1 + i32.const 1 + i32.shl + i32.add i32.store - i32.const 4076 + i32.const 4212 i32.const 0 i32.store - local.get 1) - (func (;20;) (type 1) (result i32) - i32.const 4104 + i32.const 4218 + i32.const 0 + i32.store align=2 + call 1) + (func (;22;) (type 0) (result i32) + i32.const 4228 i32.load) - (func (;21;) (type 1) (result i32) - i32.const 4052 + (func (;23;) (type 0) (result i32) + i32.const 4160 i32.load i32.load - i32.const 4024 + i32.const 4188 i32.load i32.sub i32.const 1 i32.shr_s) - (func (;22;) (type 1) (result i32) - i32.const 4052 + (func (;24;) (type 0) (result i32) + i32.const 4160 i32.load i32.load offset=4 - i32.const 4024 + i32.const 4188 i32.load i32.sub i32.const 1 i32.shr_s) - (func (;23;) (type 1) (result i32) - i32.const 4064 + (func (;25;) (type 0) (result i32) + i32.const 4172 i32.load i32.load - i32.const 4024 + i32.const 4188 i32.load i32.sub i32.const 1 i32.shr_s) - (func (;24;) (type 1) (result i32) - i32.const 4064 + (func (;26;) (type 0) (result i32) + i32.const 4172 i32.load i32.load offset=4 - i32.const 4024 + i32.const 4188 i32.load i32.sub i32.const 1 i32.shr_s) - (func (;25;) (type 1) (result i32) - i32.const 4076 + (func (;27;) (type 0) (result i32) + i32.const 4184 i32.load i32.load - i32.const 4024 + i32.const 4188 i32.load i32.sub i32.const 1 i32.shr_s) - (func (;26;) (type 1) (result i32) - i32.const 4076 + (func (;28;) (type 0) (result i32) + i32.const 4184 i32.load i32.load offset=4 - i32.const 4024 + i32.const 4188 i32.load i32.sub i32.const 1 i32.shr_s) - (func (;27;) (type 1) (result i32) - i32.const 4048 - i32.const 4052 - call 33) - (func (;28;) (type 1) (result i32) - i32.const 4060 - i32.const 4064 - call 33) - (func (;29;) (type 1) (result i32) - i32.const 4072 - i32.const 4076 - call 33) - (func (;30;) (type 3) (param i32 i32 i32 i32 i32 i32) (result i32) - local.get 0 - local.get 1 - local.get 2 - local.get 3 - local.get 4 - i32.const 0 - call 5) - (func (;31;) (type 8) (param i32 i32 i32 i32 i32 i32 i32) (result i32) - local.get 0 - local.get 1 - local.get 2 - local.get 3 - local.get 4 - local.get 6 - call 5) - (func (;32;) (type 9) (param i32 i32 i32 i32) - (local i64 i64 i32 i32) - i32.const 4088 - i64.load - local.tee 5 - i64.const 12 - i64.add - local.tee 4 - i32.const 4096 - i64.load - i64.gt_u - if ;; label = @1 - local.get 4 - call 2 - i32.const 4088 - i64.load - local.tee 5 - i64.const 12 - i64.add - local.set 4 - end - local.get 3 - i32.load - local.set 7 - local.get 3 - local.get 5 - i32.wrap_i64 - local.tee 6 - i32.store - local.get 7 - i32.const 8 - i32.add - local.get 2 - local.get 7 - select - local.get 6 - i32.store - i32.const 4088 - local.get 4 - i64.store - local.get 6 - local.get 0 - i32.store - local.get 6 - i32.const 0 - i32.store offset=8 - local.get 6 - local.get 1 - i32.store offset=4) - (func (;33;) (type 4) (param i32 i32) (result i32) + (func (;29;) (type 0) (result i32) + i32.const 4152 + i32.const 4160 + call 32) + (func (;30;) (type 0) (result i32) + i32.const 4164 + i32.const 4172 + call 32) + (func (;31;) (type 0) (result i32) + i32.const 4176 + i32.const 4184 + call 32) + (func (;32;) (type 3) (param i32 i32) (result i32) (local i32) local.get 1 local.get 1 @@ -12417,25 +12492,23 @@ local.get 2 i32.const 0 i32.ne) - (table (;0;) 4 4 funcref) (memory (;0;) 1) - (global (;0;) i32 (i32.const 31856)) + (global (;0;) i32 (i32.const 31920)) (export "memory" (memory 0)) (export "__heap_base" (global 0)) (export "sa" (func 19)) - (export "e" (func 20)) - (export "es" (func 21)) - (export "ee" (func 22)) - (export "res" (func 23)) - (export "ree" (func 24)) - (export "us" (func 25)) - (export "ue" (func 26)) - (export "re" (func 27)) - (export "rre" (func 28)) - (export "ru" (func 29)) - (export "parseCJS" (func 30)) - (export "parseCJSWithOptions" (func 31)) - (elem (;0;) (i32.const 1) func 1 3 4) - (data (;0;) (i32.const 1026) "defineProperty\00defineProperties") - (data (;1;) (i32.const 1076) "\0b\00\00\00\02\00\00\00\19\00\00\00\02\00\00\00\12\00\00\00\02\00\00\00\01\00\00\00\02\00\00\00\0e\00\00\00\03\00\00\00\0d\00\00\00#\00\00\00z\00\00\00F\00\00\004\00\00\00\0c\01\00\00\1c\00\00\00\04\00\00\000\00\00\000\00\00\00\1f\00\00\00\0e\00\00\00\1d\00\00\00\06\00\00\00%\00\00\00\0b\00\00\00\1d\00\00\00\03\00\00\00#\00\00\00\05\00\00\00\07\00\00\00\02\00\00\00\04\00\00\00+\00\00\00\9d\00\00\00\13\00\00\00#\00\00\00\05\00\00\00#\00\00\00\05\00\00\00'\00\00\00\09\00\00\003\00\00\00\9d\00\00\006\01\00\00\0a\00\00\00\15\00\00\00\0b\00\00\00\07\00\00\00\99\00\00\00\05\00\00\00\03\00\00\00\00\00\00\00\02\00\00\00+\00\00\00\02\00\00\00\01\00\00\00\04\00\00\00\00\00\00\00\03\00\00\00\16\00\00\00\0b\00\00\00\16\00\00\00\0a\00\00\00\1e\00\00\00B\00\00\00\12\00\00\00\02\00\00\00\01\00\00\00\0b\00\00\00\15\00\00\00\0b\00\00\00\19\00\00\00G\00\00\007\00\00\00\07\00\00\00\01\00\00\00A\00\00\00\00\00\00\00\10\00\00\00\03\00\00\00\02\00\00\00\02\00\00\00\02\00\00\00\1c\00\00\00+\00\00\00\1c\00\00\00\04\00\00\00\1c\00\00\00$\00\00\00\07\00\00\00\02\00\00\00\1b\00\00\00\1c\00\00\005\00\00\00\0b\00\00\00\15\00\00\00\0b\00\00\00\12\00\00\00\0e\00\00\00\11\00\00\00o\00\00\00H\00\00\008\00\00\002\00\00\00\0e\00\00\002\00\00\00\0e\00\00\00#\00\00\00]\01\00\00)\00\00\00\07\00\00\00\01\00\00\00O\00\00\00\1c\00\00\00\0b\00\00\00\00\00\00\00\09\00\00\00\15\00\00\00k\00\00\00\14\00\00\00\1c\00\00\00\16\00\00\00\0d\00\00\004\00\00\00L\00\00\00,\00\00\00!\00\00\00\18\00\00\00\1b\00\00\00#\00\00\00\1e\00\00\00\00\00\00\00\03\00\00\00\00\00\00\00\09\00\00\00\22\00\00\00\04\00\00\00\00\00\00\00\0d\00\00\00/\00\00\00\0f\00\00\00\03\00\00\00\16\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00$\00\00\00\11\00\00\00\02\00\00\00\18\00\00\00U\00\00\00\06\00\00\00\02\00\00\00\00\00\00\00\02\00\00\00\03\00\00\00\02\00\00\00\0e\00\00\00\02\00\00\00\09\00\00\00\08\00\00\00.\00\00\00'\00\00\00\07\00\00\00\03\00\00\00\01\00\00\00\03\00\00\00\15\00\00\00\02\00\00\00\06\00\00\00\02\00\00\00\01\00\00\00\02\00\00\00\04\00\00\00\04\00\00\00\00\00\00\00\13\00\00\00\00\00\00\00\0d\00\00\00\04\00\00\00\9f\00\00\004\00\00\00\13\00\00\00\03\00\00\00\15\00\00\00\02\00\00\00\1f\00\00\00/\00\00\00\15\00\00\00\01\00\00\00\02\00\00\00\00\00\00\00\b9\00\00\00.\00\00\00*\00\00\00\03\00\00\00%\00\00\00/\00\00\00\15\00\00\00\00\00\00\00<\00\00\00*\00\00\00\0e\00\00\00\00\00\00\00H\00\00\00\1a\00\00\00\e6\00\00\00+\00\00\00u\00\00\00?\00\00\00 \00\00\00\07\00\00\00\03\00\00\00\00\00\00\00\03\00\00\00\07\00\00\00\02\00\00\00\01\00\00\00\02\00\00\00\17\00\00\00\10\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00_\00\00\00\07\00\00\00\03\00\00\00&\00\00\00\11\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00\1d\00\00\00\00\00\00\00\0b\00\00\00'\00\00\00\08\00\00\00\00\00\00\00\16\00\00\00\00\00\00\00\0c\00\00\00-\00\00\00\14\00\00\00\00\00\00\00#\00\00\008\00\00\00\08\01\00\00\08\00\00\00\02\00\00\00$\00\00\00\12\00\00\00\00\00\00\002\00\00\00\1d\00\00\00q\00\00\00\06\00\00\00\02\00\00\00\01\00\00\00\02\00\00\00%\00\00\00\16\00\00\00\00\00\00\00\1a\00\00\00\05\00\00\00\02\00\00\00\01\00\00\00\02\00\00\00\1f\00\00\00\0f\00\00\00\00\00\00\00H\01\00\00\12\00\00\00\be\00\00\00\00\00\00\00P\00\00\00\99\03\00\00g\00\00\00n\00\00\00\12\00\00\00\c3\00\00\00\bd\0a\00\00.\04\00\00\d2\0f\00\00F\02\00\00\ba!\00\008\02\00\00\08\00\00\00\1e\00\00\00r\00\00\00\1d\00\00\00\13\00\00\00/\00\00\00\11\00\00\00\03\00\00\00 \00\00\00\14\00\00\00\06\00\00\00\12\00\00\00\b1\02\00\00?\00\00\00\81\00\00\00J\00\00\00\06\00\00\00\00\00\00\00C\00\00\00\0c\00\00\00A\00\00\00\01\00\00\00\02\00\00\00\00\00\00\00\1d\00\00\00\f7\17\00\00\09\00\00\00\d5\04\00\00+\00\00\00\08\00\00\00\f8\22\00\00\1e\01\00\002\00\00\00\02\00\00\00\12\00\00\00\03\00\00\00\09\00\00\00\8b\01\00\00\05\09\00\00j\00\00\00\06\00\00\00\0c\00\00\00\04\00\00\00\08\00\00\00\08\00\00\00\09\00\00\00g\17\00\00T\00\00\00\02\00\00\00F\00\00\00\02\00\00\00\01\00\00\00\03\00\00\00\00\00\00\00\03\00\00\00\01\00\00\00\03\00\00\00\03\00\00\00\02\00\00\00\0b\00\00\00\02\00\00\00\00\00\00\00\02\00\00\00\06\00\00\00\02\00\00\00@\00\00\00\02\00\00\00\03\00\00\00\03\00\00\00\07\00\00\00\02\00\00\00\06\00\00\00\02\00\00\00\1b\00\00\00\02\00\00\00\03\00\00\00\02\00\00\00\04\00\00\00\02\00\00\00\00\00\00\00\04\00\00\00\06\00\00\00\02\00\00\00S\01\00\00\03\00\00\00\18\00\00\00\02\00\00\00\18\00\00\00\02\00\00\00\1e\00\00\00\02\00\00\00\18\00\00\00\02\00\00\00\1e\00\00\00\02\00\00\00\18\00\00\00\02\00\00\00\1e\00\00\00\02\00\00\00\18\00\00\00\02\00\00\00\1e\00\00\00\02\00\00\00\18\00\00\00\02\00\00\00\07\00\00\005\09\00\00,\00\00\00\0b\00\00\00\06\00\00\00\11\00\00\00\00\00\00\00r\01\00\00+\00\00\00\15\05\00\00\c4\00\00\00<\00\00\00C\00\00\00\08\00\00\00\00\00\00\00\b5\04\00\00\03\00\00\00\02\00\00\00\1a\00\00\00\02\00\00\00\01\00\00\00\02\00\00\00\00\00\00\00\03\00\00\00\00\00\00\00\02\00\00\00\09\00\00\00\02\00\00\00\03\00\00\00\02\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00\07\00\00\00\00\00\00\00\05\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00\02\00\00\00\01\00\00\00\02\00\00\00\00\00\00\00\03\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00\02\00\00\00\01\00\00\00\02\00\00\00\00\00\00\00\03\00\00\00\03\00\00\00\02\00\00\00\06\00\00\00\02\00\00\00\03\00\00\00\02\00\00\00\03\00\00\00\02\00\00\00\00\00\00\00\02\00\00\00\09\00\00\00\02\00\00\00\10\00\00\00\06\00\00\00\02\00\00\00\02\00\00\00\04\00\00\00\02\00\00\00\10\00\00\00E\11\00\00\dd\a6\00\00#\00\00\004\10\00\00\0c\00\00\00\dd\00\00\00\03\00\00\00\81\16\00\00\0f\00\00\000\1d\00\00 \0c\00\00\1d\02\00\00\e3\05\00\00J\13\00\00\fd\01\00\00\00\00\00\00\e3\00\00\00\00\00\00\00\96\00\00\00\04\00\00\00&\01\00\00\09\00\00\00X\05\00\00\02\00\00\00\02\00\00\00\01\00\00\00\06\00\00\00\03\00\00\00)\00\00\00\02\00\00\00\05\00\00\00\00\00\00\00\a6\00\00\00\01\00\00\00>\02\00\00\03\00\00\00\09\00\00\00\09\00\00\00r\01\00\00\01\00\00\00\9a\00\00\00\0a\00\00\00\b0\00\00\00\02\00\00\006\00\00\00\0e\00\00\00 \00\00\00\09\00\00\00\10\00\00\00\03\00\00\00.\00\00\00\0a\00\00\006\00\00\00\09\00\00\00\07\00\00\00\02\00\00\00%\00\00\00\0d\00\00\00\02\00\00\00\09\00\00\00\06\00\00\00\01\00\00\00-\00\00\00\00\00\00\00\0d\00\00\00\02\00\00\001\00\00\00\0d\00\00\00\09\00\00\00\03\00\00\00\02\00\00\00\0b\00\00\00S\00\00\00\0b\00\00\00\07\00\00\00\00\00\00\00\a1\00\00\00\0b\00\00\00\06\00\00\00\09\00\00\00\07\00\00\00\03\00\00\008\00\00\00\01\00\00\00\02\00\00\00\06\00\00\00\03\00\00\00\01\00\00\00\03\00\00\00\02\00\00\00\0a\00\00\00\00\00\00\00\0b\00\00\00\01\00\00\00\03\00\00\00\06\00\00\00\04\00\00\00\04\00\00\00\c1\00\00\00\11\00\00\00\0a\00\00\00\09\00\00\00\05\00\00\00\00\00\00\00R\00\00\00\13\00\00\00\0d\00\00\00\09\00\00\00\d6\00\00\00\06\00\00\00\03\00\00\00\08\00\00\00\1c\00\00\00\01\00\00\00S\00\00\00\10\00\00\00\10\00\00\00\09\00\00\00R\00\00\00\0c\00\00\00\09\00\00\00\09\00\00\00T\00\00\00\0e\00\00\00\05\00\00\00\09\00\00\00\f3\00\00\00\0e\00\00\00\a6\00\00\00\09\00\00\00G\00\00\00\05\00\00\00\02\00\00\00\01\00\00\00\03\00\00\00\03\00\00\00\02\00\00\00\00\00\00\00\02\00\00\00\01\00\00\00\0d\00\00\00\09\00\00\00x\00\00\00\06\00\00\00\03\00\00\00\06\00\00\00\04\00\00\00\00\00\00\00\1d\00\00\00\09\00\00\00)\00\00\00\06\00\00\00\02\00\00\00\03\00\00\00\09\00\00\00\00\00\00\00\0a\00\00\00\0a\00\00\00/\00\00\00\0f\00\00\00\96\01\00\00\07\00\00\00\02\00\00\00\07\00\00\00\11\00\00\00\09\00\00\009\00\00\00\15\00\00\00\02\00\00\00\0d\00\00\00{\00\00\00\05\00\00\00\04\00\00\00\00\00\00\00\02\00\00\00\01\00\00\00\02\00\00\00\06\00\00\00\02\00\00\00\00\00\00\00\09\00\00\00\09\00\00\001\00\00\00\04\00\00\00\02\00\00\00\01\00\00\00\02\00\00\00\04\00\00\00\09\00\00\00\09\00\00\00J\01\00\00\03\00\00\00jK\00\00\09\00\00\00\87\00\00\00\04\00\00\00<\00\00\00\06\00\00\00\1a\00\00\00\09\00\00\00\f6\03\00\00\00\00\00\00\02\00\00\006\00\00\00\08\00\00\00\03\00\00\00R\00\00\00\00\00\00\00\0c\00\00\00\01\00\00\00\acL\00\00\01\00\00\00\c7\14\00\00\04\00\00\00\04\00\00\00\05\00\00\00\09\00\00\00\07\00\00\00\03\00\00\00\06\00\00\00\1f\00\00\00\03\00\00\00\95\00\00\00\02\00\00\00\8a\05\00\001\00\00\00\01\02\00\006\00\00\00\05\00\00\001\00\00\00\09\00\00\00\00\00\00\00\0f\00\00\00\00\00\00\00\17\00\00\00\04\00\00\00\02\00\00\00\0e\00\00\00Q\05\00\00\06\00\00\00\02\00\00\00\10\00\00\00\03\00\00\00\06\00\00\00\02\00\00\00\01\00\00\00\02\00\00\00\04\00\00\00\06\01\00\00\06\00\00\00\0a\00\00\00\09\00\00\00\a3\01\00\00\0d\00\00\00\d7\05\00\00\06\00\00\00n\00\00\00\06\00\00\00\06\00\00\00\09\00\00\00\97\12\00\00\09\00\00\00\07\05\0c\00\ef") - (data (;2;) (i32.const 4024) "p|\00\00\01\00\00\00\02\00\00\00\03")) + (export "parseCJSWithOptions" (func 20)) + (export "parseCJS" (func 21)) + (export "e" (func 22)) + (export "es" (func 23)) + (export "ee" (func 24)) + (export "res" (func 25)) + (export "ree" (func 26)) + (export "us" (func 27)) + (export "ue" (func 28)) + (export "re" (func 29)) + (export "rre" (func 30)) + (export "ru" (func 31)) + (data (;0;) (i32.const 1060) "\01") + (data (;1;) (i32.const 1072) "\01\01\01\01\01\01\01\01\01\01\00\00\00\00\00\00\00\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\00\01\00\00\01\00\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01\01") + (data (;2;) (i32.const 1156) "\0b\00\00\00\02\00\00\00\19\00\00\00\02\00\00\00\12\00\00\00\02\00\00\00\01\00\00\00\02\00\00\00\0e\00\00\00\03\00\00\00\0d\00\00\00#\00\00\00z\00\00\00F\00\00\004\00\00\00\0c\01\00\00\1c\00\00\00\04\00\00\000\00\00\000\00\00\00\1f\00\00\00\0e\00\00\00\1d\00\00\00\06\00\00\00%\00\00\00\0b\00\00\00\1d\00\00\00\03\00\00\00#\00\00\00\05\00\00\00\07\00\00\00\02\00\00\00\04\00\00\00+\00\00\00\9d\00\00\00\13\00\00\00#\00\00\00\05\00\00\00#\00\00\00\05\00\00\00'\00\00\00\09\00\00\003\00\00\00\9d\00\00\006\01\00\00\0a\00\00\00\15\00\00\00\0b\00\00\00\07\00\00\00\99\00\00\00\05\00\00\00\03\00\00\00\00\00\00\00\02\00\00\00+\00\00\00\02\00\00\00\01\00\00\00\04\00\00\00\00\00\00\00\03\00\00\00\16\00\00\00\0b\00\00\00\16\00\00\00\0a\00\00\00\1e\00\00\00B\00\00\00\12\00\00\00\02\00\00\00\01\00\00\00\0b\00\00\00\15\00\00\00\0b\00\00\00\19\00\00\00G\00\00\007\00\00\00\07\00\00\00\01\00\00\00A\00\00\00\00\00\00\00\10\00\00\00\03\00\00\00\02\00\00\00\02\00\00\00\02\00\00\00\1c\00\00\00+\00\00\00\1c\00\00\00\04\00\00\00\1c\00\00\00$\00\00\00\07\00\00\00\02\00\00\00\1b\00\00\00\1c\00\00\005\00\00\00\0b\00\00\00\15\00\00\00\0b\00\00\00\12\00\00\00\0e\00\00\00\11\00\00\00o\00\00\00H\00\00\008\00\00\002\00\00\00\0e\00\00\002\00\00\00\0e\00\00\00#\00\00\00]\01\00\00)\00\00\00\07\00\00\00\01\00\00\00O\00\00\00\1c\00\00\00\0b\00\00\00\00\00\00\00\09\00\00\00\15\00\00\00k\00\00\00\14\00\00\00\1c\00\00\00\16\00\00\00\0d\00\00\004\00\00\00L\00\00\00,\00\00\00!\00\00\00\18\00\00\00\1b\00\00\00#\00\00\00\1e\00\00\00\00\00\00\00\03\00\00\00\00\00\00\00\09\00\00\00\22\00\00\00\04\00\00\00\00\00\00\00\0d\00\00\00/\00\00\00\0f\00\00\00\03\00\00\00\16\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00$\00\00\00\11\00\00\00\02\00\00\00\18\00\00\00U\00\00\00\06\00\00\00\02\00\00\00\00\00\00\00\02\00\00\00\03\00\00\00\02\00\00\00\0e\00\00\00\02\00\00\00\09\00\00\00\08\00\00\00.\00\00\00'\00\00\00\07\00\00\00\03\00\00\00\01\00\00\00\03\00\00\00\15\00\00\00\02\00\00\00\06\00\00\00\02\00\00\00\01\00\00\00\02\00\00\00\04\00\00\00\04\00\00\00\00\00\00\00\13\00\00\00\00\00\00\00\0d\00\00\00\04\00\00\00\9f\00\00\004\00\00\00\13\00\00\00\03\00\00\00\15\00\00\00\02\00\00\00\1f\00\00\00/\00\00\00\15\00\00\00\01\00\00\00\02\00\00\00\00\00\00\00\b9\00\00\00.\00\00\00*\00\00\00\03\00\00\00%\00\00\00/\00\00\00\15\00\00\00\00\00\00\00<\00\00\00*\00\00\00\0e\00\00\00\00\00\00\00H\00\00\00\1a\00\00\00\e6\00\00\00+\00\00\00u\00\00\00?\00\00\00 \00\00\00\07\00\00\00\03\00\00\00\00\00\00\00\03\00\00\00\07\00\00\00\02\00\00\00\01\00\00\00\02\00\00\00\17\00\00\00\10\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00_\00\00\00\07\00\00\00\03\00\00\00&\00\00\00\11\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00\1d\00\00\00\00\00\00\00\0b\00\00\00'\00\00\00\08\00\00\00\00\00\00\00\16\00\00\00\00\00\00\00\0c\00\00\00-\00\00\00\14\00\00\00\00\00\00\00#\00\00\008\00\00\00\08\01\00\00\08\00\00\00\02\00\00\00$\00\00\00\12\00\00\00\00\00\00\002\00\00\00\1d\00\00\00q\00\00\00\06\00\00\00\02\00\00\00\01\00\00\00\02\00\00\00%\00\00\00\16\00\00\00\00\00\00\00\1a\00\00\00\05\00\00\00\02\00\00\00\01\00\00\00\02\00\00\00\1f\00\00\00\0f\00\00\00\00\00\00\00H\01\00\00\12\00\00\00\be\00\00\00\00\00\00\00P\00\00\00\99\03\00\00g\00\00\00n\00\00\00\12\00\00\00\c3\00\00\00\bd\0a\00\00.\04\00\00\d2\0f\00\00F\02\00\00\ba!\00\008\02\00\00\08\00\00\00\1e\00\00\00r\00\00\00\1d\00\00\00\13\00\00\00/\00\00\00\11\00\00\00\03\00\00\00 \00\00\00\14\00\00\00\06\00\00\00\12\00\00\00\b1\02\00\00?\00\00\00\81\00\00\00J\00\00\00\06\00\00\00\00\00\00\00C\00\00\00\0c\00\00\00A\00\00\00\01\00\00\00\02\00\00\00\00\00\00\00\1d\00\00\00\f7\17\00\00\09\00\00\00\d5\04\00\00+\00\00\00\08\00\00\00\f8\22\00\00\1e\01\00\002\00\00\00\02\00\00\00\12\00\00\00\03\00\00\00\09\00\00\00\8b\01\00\00\05\09\00\00j\00\00\00\06\00\00\00\0c\00\00\00\04\00\00\00\08\00\00\00\08\00\00\00\09\00\00\00g\17\00\00T\00\00\00\02\00\00\00F\00\00\00\02\00\00\00\01\00\00\00\03\00\00\00\00\00\00\00\03\00\00\00\01\00\00\00\03\00\00\00\03\00\00\00\02\00\00\00\0b\00\00\00\02\00\00\00\00\00\00\00\02\00\00\00\06\00\00\00\02\00\00\00@\00\00\00\02\00\00\00\03\00\00\00\03\00\00\00\07\00\00\00\02\00\00\00\06\00\00\00\02\00\00\00\1b\00\00\00\02\00\00\00\03\00\00\00\02\00\00\00\04\00\00\00\02\00\00\00\00\00\00\00\04\00\00\00\06\00\00\00\02\00\00\00S\01\00\00\03\00\00\00\18\00\00\00\02\00\00\00\18\00\00\00\02\00\00\00\1e\00\00\00\02\00\00\00\18\00\00\00\02\00\00\00\1e\00\00\00\02\00\00\00\18\00\00\00\02\00\00\00\1e\00\00\00\02\00\00\00\18\00\00\00\02\00\00\00\1e\00\00\00\02\00\00\00\18\00\00\00\02\00\00\00\07\00\00\005\09\00\00,\00\00\00\0b\00\00\00\06\00\00\00\11\00\00\00\00\00\00\00r\01\00\00+\00\00\00\15\05\00\00\c4\00\00\00<\00\00\00C\00\00\00\08\00\00\00\00\00\00\00\b5\04\00\00\03\00\00\00\02\00\00\00\1a\00\00\00\02\00\00\00\01\00\00\00\02\00\00\00\00\00\00\00\03\00\00\00\00\00\00\00\02\00\00\00\09\00\00\00\02\00\00\00\03\00\00\00\02\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00\07\00\00\00\00\00\00\00\05\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00\02\00\00\00\02\00\00\00\02\00\00\00\01\00\00\00\02\00\00\00\00\00\00\00\03\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00\02\00\00\00\01\00\00\00\02\00\00\00\00\00\00\00\03\00\00\00\03\00\00\00\02\00\00\00\06\00\00\00\02\00\00\00\03\00\00\00\02\00\00\00\03\00\00\00\02\00\00\00\00\00\00\00\02\00\00\00\09\00\00\00\02\00\00\00\10\00\00\00\06\00\00\00\02\00\00\00\02\00\00\00\04\00\00\00\02\00\00\00\10\00\00\00E\11\00\00\dd\a6\00\00#\00\00\004\10\00\00\0c\00\00\00\dd\00\00\00\03\00\00\00\81\16\00\00\0f\00\00\000\1d\00\00 \0c\00\00\1d\02\00\00\e3\05\00\00J\13\00\00\fd\01\00\00\00\00\00\00\e3\00\00\00\00\00\00\00\96\00\00\00\04\00\00\00&\01\00\00\09\00\00\00X\05\00\00\02\00\00\00\02\00\00\00\01\00\00\00\06\00\00\00\03\00\00\00)\00\00\00\02\00\00\00\05\00\00\00\00\00\00\00\a6\00\00\00\01\00\00\00>\02\00\00\03\00\00\00\09\00\00\00\09\00\00\00r\01\00\00\01\00\00\00\9a\00\00\00\0a\00\00\00\b0\00\00\00\02\00\00\006\00\00\00\0e\00\00\00 \00\00\00\09\00\00\00\10\00\00\00\03\00\00\00.\00\00\00\0a\00\00\006\00\00\00\09\00\00\00\07\00\00\00\02\00\00\00%\00\00\00\0d\00\00\00\02\00\00\00\09\00\00\00\06\00\00\00\01\00\00\00-\00\00\00\00\00\00\00\0d\00\00\00\02\00\00\001\00\00\00\0d\00\00\00\09\00\00\00\03\00\00\00\02\00\00\00\0b\00\00\00S\00\00\00\0b\00\00\00\07\00\00\00\00\00\00\00\a1\00\00\00\0b\00\00\00\06\00\00\00\09\00\00\00\07\00\00\00\03\00\00\008\00\00\00\01\00\00\00\02\00\00\00\06\00\00\00\03\00\00\00\01\00\00\00\03\00\00\00\02\00\00\00\0a\00\00\00\00\00\00\00\0b\00\00\00\01\00\00\00\03\00\00\00\06\00\00\00\04\00\00\00\04\00\00\00\c1\00\00\00\11\00\00\00\0a\00\00\00\09\00\00\00\05\00\00\00\00\00\00\00R\00\00\00\13\00\00\00\0d\00\00\00\09\00\00\00\d6\00\00\00\06\00\00\00\03\00\00\00\08\00\00\00\1c\00\00\00\01\00\00\00S\00\00\00\10\00\00\00\10\00\00\00\09\00\00\00R\00\00\00\0c\00\00\00\09\00\00\00\09\00\00\00T\00\00\00\0e\00\00\00\05\00\00\00\09\00\00\00\f3\00\00\00\0e\00\00\00\a6\00\00\00\09\00\00\00G\00\00\00\05\00\00\00\02\00\00\00\01\00\00\00\03\00\00\00\03\00\00\00\02\00\00\00\00\00\00\00\02\00\00\00\01\00\00\00\0d\00\00\00\09\00\00\00x\00\00\00\06\00\00\00\03\00\00\00\06\00\00\00\04\00\00\00\00\00\00\00\1d\00\00\00\09\00\00\00)\00\00\00\06\00\00\00\02\00\00\00\03\00\00\00\09\00\00\00\00\00\00\00\0a\00\00\00\0a\00\00\00/\00\00\00\0f\00\00\00\96\01\00\00\07\00\00\00\02\00\00\00\07\00\00\00\11\00\00\00\09\00\00\009\00\00\00\15\00\00\00\02\00\00\00\0d\00\00\00{\00\00\00\05\00\00\00\04\00\00\00\00\00\00\00\02\00\00\00\01\00\00\00\02\00\00\00\06\00\00\00\02\00\00\00\00\00\00\00\09\00\00\00\09\00\00\001\00\00\00\04\00\00\00\02\00\00\00\01\00\00\00\02\00\00\00\04\00\00\00\09\00\00\00\09\00\00\00J\01\00\00\03\00\00\00jK\00\00\09\00\00\00\87\00\00\00\04\00\00\00<\00\00\00\06\00\00\00\1a\00\00\00\09\00\00\00\f6\03\00\00\00\00\00\00\02\00\00\006\00\00\00\08\00\00\00\03\00\00\00R\00\00\00\00\00\00\00\0c\00\00\00\01\00\00\00\acL\00\00\01\00\00\00\c7\14\00\00\04\00\00\00\04\00\00\00\05\00\00\00\09\00\00\00\07\00\00\00\03\00\00\00\06\00\00\00\1f\00\00\00\03\00\00\00\95\00\00\00\02\00\00\00\8a\05\00\001\00\00\00\01\02\00\006\00\00\00\05\00\00\001\00\00\00\09\00\00\00\00\00\00\00\0f\00\00\00\00\00\00\00\17\00\00\00\04\00\00\00\02\00\00\00\0e\00\00\00Q\05\00\00\06\00\00\00\02\00\00\00\10\00\00\00\03\00\00\00\06\00\00\00\02\00\00\00\01\00\00\00\02\00\00\00\04\00\00\00\06\01\00\00\06\00\00\00\0a\00\00\00\09\00\00\00\a3\01\00\00\0d\00\00\00\d7\05\00\00\06\00\00\00n\00\00\00\06\00\00\00\06\00\00\00\09\00\00\00\97\12\00\00\09\00\00\00\07\05\0c\00\ef\00\00\00defineProperty\00defineProperties")) diff --git a/package.json b/package.json index 6db516c..8d338d0 100755 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "test-wasm": "cross-env WASM=1 NODE_OPTIONS=--disallow-code-generation-from-strings mocha -b -u tdd test/*.js", "test-wasm-sync": "cross-env WASM_SYNC=1 NODE_OPTIONS=--disallow-code-generation-from-strings mocha -b -u tdd test/*.js", "test": "npm run test-wasm && npm run test-wasm-sync && npm run test-js", + "test-native": "cross-env NATIVE=1 WASM=1 NODE_OPTIONS=--disallow-code-generation-from-strings mocha -b -u tdd test/_unit.js test/extended.js test/integration.js", "bench": "node --expose-gc bench/index.mjs", "build": "node build.js", "build-wasm": "make lib/lexer.wasm ; node build.js", diff --git a/src/lexer-internal.h b/src/lexer-internal.h new file mode 100644 index 0000000..cec418d --- /dev/null +++ b/src/lexer-internal.h @@ -0,0 +1,116 @@ +#ifndef CJS_LEXER_INTERNAL_H +#define CJS_LEXER_INTERNAL_H + +#include "cjs-module-lexer.h" +#include +#include +#include +#include + +#define STACK_DEPTH 2048 +#define CJS_LEXER_ERROR_ALLOCATION 13 + +#ifdef CJS_LEXER_WASM +#define CJS_INLINE inline __attribute__((always_inline)) +#else +#define CJS_INLINE inline +#endif + +#ifdef CJS_LEXER_WASM +typedef const uint16_t* Cursor; +#define SOURCE_START parser->input +#define scanInput(input, cursor) (*(cursor)) +#else +typedef ptrdiff_t Cursor; +#define SOURCE_START ((Cursor)0) +#define scanInput(input, cursor) ((input)[cursor]) +#endif +#define SOURCE_BEFORE (SOURCE_START - 1) + +typedef enum { + ExportCandidate, + ReexportCandidate, + UnsafeGetterCandidate, + CandidateKindCount +} CandidateKind; + +typedef struct StarExportBinding { + Cursor specifier_start; + Cursor specifier_end; + Cursor id_start; + Cursor id_end; + struct StarExportBinding* next; +} StarExportBinding; + +typedef struct { + const uint16_t* input; + size_t sourceLen; + Cursor pos; + Cursor end; + Cursor lastTokenPos; + Cursor exportObjectPos; + uint16_t templateStackDepth; + uint16_t openTokenDepth; + uint16_t templateDepth; + bool lastSlashWasDivision; + bool nextBraceIsClass; + bool allowMinifiedEnumerable; + bool extended; + uint32_t error; + size_t parse_error; + uint16_t templateStack[STACK_DEPTH]; + Cursor openTokenPosStack[STACK_DEPTH]; + uint8_t openTokenTypeStack[STACK_DEPTH]; + StarExportBinding starExportBinding_; + StarExportBinding* firstStarExport; + StarExportBinding* lastStarExport; + cjs_lexer_result* result; +} Parser; + +enum RequireType { Import, ExportAssign, ExportStar }; + +static inline ptrdiff_t sourceIndex(const Parser* parser, Cursor cursor) { +#ifdef CJS_LEXER_WASM + return cursor - parser->input; +#else + (void)parser; + return cursor; +#endif +} + +static inline uint16_t at(const Parser* parser, Cursor cursor) { +#ifdef CJS_LEXER_WASM + return *cursor; +#else + return (size_t)cursor < parser->sourceLen ? parser->input[cursor] : 0; +#endif +} + +static inline bool hasChars(const Parser* parser, Cursor cursor, size_t length) { +#ifdef CJS_LEXER_WASM + return true; +#else + return (size_t)cursor <= parser->sourceLen && + length <= parser->sourceLen - (size_t)cursor; +#endif +} + +#ifdef CJS_LEXER_WASM +__attribute__((noinline)) +#endif +static inline bool matches(const Parser* parser, Cursor left, Cursor right, size_t length) { +#ifdef CJS_LEXER_WASM + if (left > parser->end + 1 || length > (size_t)(parser->end + 1 - left)) return false; + return memcmp(left, right, length * sizeof(uint16_t)) == 0; +#else + return hasChars(parser, left, length) && hasChars(parser, right, length) && + memcmp(parser->input + left, parser->input + right, length * sizeof(uint16_t)) == 0; +#endif +} + +void* cjs_lexer_allocate(cjs_lexer_result* result, size_t size); +void cjs_lexer_add(Parser* parser, CandidateKind kind, Cursor start, Cursor end); +void cjs_lexer_clear_reexports(cjs_lexer_result* result); +uint32_t cjs_lexer_scan(Parser* parser); + +#endif diff --git a/src/lexer.c b/src/lexer.c index dab3336..e894255 100755 --- a/src/lexer.c +++ b/src/lexer.c @@ -1,167 +1,171 @@ -#include "cjs-module-lexer.h" - -const uint16_t* STANDARD_IMPORT = (uint16_t*)0x1; -const uint16_t* IMPORT_META = (uint16_t*)0x2; -const uint16_t __empty_char = '\0'; -const uint16_t* EMPTY_CHAR = &__empty_char; -// tracked depth of template and brackets -#define STACK_DEPTH 2048 +#include "lexer-internal.h" + enum TokenType { ClassToken = 1, ExportObjectToken = 2 }; -const uint16_t* source; - -bool lastSlashWasDivision; -uint16_t templateStackDepth; -uint16_t openTokenDepth; -uint16_t templateDepth; -uint16_t braceDepth; -uint16_t* lastTokenPos; -uint16_t* pos; -uint16_t* end; -uint16_t* templateStack; -uint16_t** openTokenPosStack; -bool nextBraceIsClass; -bool allowMinifiedEnumerable; -static bool extended; -static uint16_t* exportObjectPos; - -uint16_t* lastReexportStart; -uint16_t* lastReexportEnd; - -// Memory Structure: -// -> source -// -> analysis starts after source -uint32_t parse_error; -uint32_t error = 0; -uint32_t sourceLen; - -uint16_t templateStack_[STACK_DEPTH]; -uint16_t* openTokenPosStack_[STACK_DEPTH]; -uint8_t openTokenTypeStack[STACK_DEPTH]; -StarExportBinding starExportBinding_; -StarExportBinding* firstStarExport; -StarExportBinding* lastStarExport; - -void (*addExport)(const uint16_t*, const uint16_t*); -void (*addReexport)(const uint16_t*, const uint16_t*); -void (*addUnsafeGetter)(const uint16_t*, const uint16_t*); -void (*clearReexports)(); - -static bool isStatementBrace (uint16_t* curPos, uint16_t depth); -static uint16_t readExportExpressionStart (); - -static inline __attribute__((always_inline)) bool isTokenRunChar (uint16_t ch) { - return (uint16_t)((ch | 32) - 'a') < 26 || (uint16_t)(ch - '0') < 10 || - ch == '$' || ch == '_' || ch == '\\' || (ch > 127 && ch != 160); -} - -static inline __attribute__((always_inline)) bool pushOpenToken (uint16_t* tokenPos) { - if (openTokenDepth == STACK_DEPTH) { - syntaxError(12); + +static CJS_INLINE bool isTokenRunChar (uint16_t ch); +static CJS_INLINE bool pushOpenToken(Parser* parser, Cursor tokenPos); +static CJS_INLINE bool pushTemplate(Parser* parser); +static void tryBacktrackAddStarExportBinding(Parser* parser, Cursor bPos); +static bool tryParseObjectHasOwnProperty(Parser* parser, Cursor it_id_start, ptrdiff_t it_id_len); +static inline bool tryParseMinifiedEnumerable(Parser* parser, uint16_t ch); +static void tryParseObjectDefineOrKeys(Parser* parser, bool keys); +static bool readExportsOrModuleDotExports(Parser* parser, uint16_t ch); +static void tryParseModuleExportsDotAssign(Parser* parser); +static void tryParseExportsDotAssign(Parser* parser, bool assign); +static bool tryParseRequire(Parser* parser, enum RequireType requireType); +static bool matchesKeyword(Parser* parser, const char* keyword, uint32_t length); +static uint16_t readExportExpressionStart(Parser* parser); +static void readExportDefinition(Parser* parser); +static void readExportProperty(Parser* parser); +static void tryParseLiteralExports(Parser* parser); +static bool isNonASCIIidentifierStartChar (uint32_t ch); +static bool isNonASCIIidentifierChar (uint32_t ch); +static bool isInAstralIdentifierStartCodes (uint32_t code); +static bool isInAstralIdentifierCodes (uint32_t code); +static bool isIdentifierStart(uint32_t code); +static bool isIdentifierChar(uint32_t code); +static inline int charCodeByteLen(uint32_t ch); +static uint32_t fullCharCodeAtLast(Parser* parser, Cursor bPos); +static uint32_t fullCharCode(Parser* parser, uint16_t ch); +static bool identifier(Parser* parser, uint16_t startCh); +static void throwIfImportStatement(Parser* parser); +static void throwIfExportStatement(Parser* parser); +static uint16_t commentWhitespace(Parser* parser); +static void templateString(Parser* parser); +static void blockComment(Parser* parser); +static void lineComment(Parser* parser); +static void stringLiteral(Parser* parser, uint16_t quote); +static uint16_t regexCharacterClass(Parser* parser); +static void regularExpression(Parser* parser); +static bool isBr (uint16_t c); +static bool isBrOrWs (uint16_t c); +static bool isBrOrWsOrPunctuatorNotDot (uint16_t c); +static bool str_eq2(Parser* parser, Cursor cursor, uint16_t c1, uint16_t c2); +static bool str_eq3(Parser* parser, Cursor cursor, uint16_t c1, uint16_t c2, uint16_t c3); +static bool str_eq4(Parser* parser, Cursor cursor, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4); +static bool str_eq5(Parser* parser, Cursor cursor, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5); +static bool str_eq6(Parser* parser, Cursor cursor, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6); +static bool str_eq7(Parser* parser, Cursor cursor, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7); +static bool str_eq8(Parser* parser, Cursor cursor, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7, uint16_t c8); +static bool str_eq9(Parser* parser, Cursor cursor, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7, uint16_t c8, uint16_t c9); +static bool str_eq10(Parser* parser, Cursor cursor, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7, uint16_t c8, uint16_t c9, uint16_t c10); +static bool str_eq13(Parser* parser, Cursor cursor, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7, uint16_t c8, uint16_t c9, uint16_t c10, uint16_t c11, uint16_t c12, uint16_t c13); +static bool str_eq22(Parser* parser, Cursor cursor, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7, uint16_t c8, uint16_t c9, uint16_t c10, uint16_t c11, uint16_t c12, uint16_t c13, uint16_t c14, uint16_t c15, uint16_t c16, uint16_t c17, uint16_t c18, uint16_t c19, uint16_t c20, uint16_t c21, uint16_t c22); +static bool keywordStart(Parser* parser, Cursor cursor); +static bool readPrecedingKeyword1(Parser* parser, Cursor cursor, uint16_t c1); +static bool readPrecedingKeyword2(Parser* parser, Cursor cursor, uint16_t c1, uint16_t c2); +static bool readPrecedingKeyword3(Parser* parser, Cursor cursor, uint16_t c1, uint16_t c2, uint16_t c3); +static bool readPrecedingKeyword4(Parser* parser, Cursor cursor, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4); +static bool readPrecedingKeyword5(Parser* parser, Cursor cursor, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5); +static bool readPrecedingKeyword6(Parser* parser, Cursor cursor, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6); +static bool readPrecedingKeyword7(Parser* parser, Cursor cursor, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7); +static bool isExpressionKeyword(Parser* parser, Cursor cursor); +static bool isParenKeyword(Parser* parser, Cursor curPos); +static bool isPunctuator (uint16_t ch); +static bool isExpressionPunctuator (uint16_t ch); +static Cursor precedingToken(Parser* parser, Cursor curPos); +static bool isStatementBrace(Parser* parser, Cursor curPos, uint16_t depth); +static bool isExpressionTerminator(Parser* parser, Cursor curPos); +static void syntaxError(Parser* parser, uint32_t code); + + +static CJS_INLINE bool isTokenRunChar (uint16_t ch) { + static const uint8_t tokenRun[128] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, + }; + return ch < 128 ? tokenRun[ch] : ch != 160; +} + +static CJS_INLINE bool pushOpenToken(Parser* parser, Cursor tokenPos) { + if (parser->openTokenDepth == STACK_DEPTH) { + syntaxError(parser, CJS_LEXER_ERROR_NESTING_LIMIT); return false; } - if (extended) openTokenTypeStack[openTokenDepth] = 0; - openTokenPosStack[openTokenDepth++] = tokenPos; + parser->openTokenTypeStack[parser->openTokenDepth] = 0; + parser->openTokenPosStack[parser->openTokenDepth++] = tokenPos; return true; } -static inline __attribute__((always_inline)) bool pushTemplate () { - if (templateStackDepth == STACK_DEPTH || openTokenDepth == STACK_DEPTH) { - syntaxError(12); +static CJS_INLINE bool pushTemplate(Parser* parser) { + if (parser->templateStackDepth == STACK_DEPTH || parser->openTokenDepth == STACK_DEPTH) { + syntaxError(parser, CJS_LEXER_ERROR_NESTING_LIMIT); return false; } - templateStack[templateStackDepth++] = templateDepth; - if (extended) openTokenTypeStack[openTokenDepth] = 0; - templateDepth = ++openTokenDepth; + parser->templateStack[parser->templateStackDepth++] = parser->templateDepth; + parser->openTokenTypeStack[parser->openTokenDepth] = 0; + parser->openTokenPosStack[parser->openTokenDepth] = SOURCE_BEFORE; + parser->templateDepth = ++parser->openTokenDepth; return true; } -uint32_t parseCJS (uint16_t* _source, uint32_t _sourceLen, void (*_addExport)(const uint16_t*, const uint16_t*), void (*_addReexport)(const uint16_t*, const uint16_t*), void (*_addUnsafeGetter)(const uint16_t*, const uint16_t*), void (*_clearReexports)()) { - return parseCJSWithOptions(_source, _sourceLen, _addExport, _addReexport, _addUnsafeGetter, _clearReexports, 0); -} - // Note: parsing is based on the _assumption_ that the source is already valid -uint32_t parseCJSWithOptions (uint16_t* _source, uint32_t _sourceLen, void (*_addExport)(const uint16_t*, const uint16_t*), void (*_addReexport)(const uint16_t*, const uint16_t*), void (*_addUnsafeGetter)(const uint16_t*, const uint16_t*), void (*_clearReexports)(), uint32_t options) { - source = _source; - sourceLen = _sourceLen; - allowMinifiedEnumerable = (options & 1) != 0; - extended = (options & 2) != 0; - if (_addExport) - addExport = _addExport; - if (_addReexport) - addReexport = _addReexport; - if (_addUnsafeGetter) - addUnsafeGetter = _addUnsafeGetter; - - templateStackDepth = 0; - openTokenDepth = 0; - templateDepth = UINT16_MAX; - lastTokenPos = (uint16_t*)EMPTY_CHAR; - lastSlashWasDivision = false; - parse_error = 0; - error = 0; - templateStack = &templateStack_[0]; - openTokenPosStack = &openTokenPosStack_[0]; - firstStarExport = NULL; - lastStarExport = NULL; - nextBraceIsClass = false; - exportObjectPos = 0; - - pos = (uint16_t*)(source - 1); - uint16_t ch = '\0'; - end = pos + sourceLen; +uint32_t cjs_lexer_scan (Parser* parser) { + const uint16_t* input = parser->input; + uint16_t ch = 0; + Cursor lastOpenTokenPos = SOURCE_BEFORE; + Cursor lastClosedTokenPos = SOURCE_BEFORE; + uint8_t lastOpenTokenType = 0; // Handle #! - if (*source == '#' && *(source + 1) == '!') { - if (sourceLen == 2) + if (at(parser, SOURCE_START) == '#' && at(parser, SOURCE_START + 1) == '!') { + if (parser->sourceLen == 2) return 0; - pos += 2; - while (pos++ < end) { - ch = *pos; + parser->pos += 2; + while (++parser->pos <= parser->end) { + ch = scanInput(input, parser->pos); if (ch == '\n' || ch == '\r') break; } } - while (pos++ < end) { - ch = *pos; + while (++parser->pos <= parser->end) { + ch = scanInput(input, parser->pos); if (ch == 32 || ch < 14 && ch > 8) continue; - if (openTokenDepth == 0) { + + if (parser->openTokenDepth == 0) { switch (ch) { case 'i': - if (str_eq5(pos + 1, 'm', 'p', 'o', 'r', 't') && keywordStart(pos)) - throwIfImportStatement(); + if (str_eq5(parser, parser->pos + 1, 'm', 'p', 'o', 'r', 't') && keywordStart(parser, parser->pos)) + throwIfImportStatement(parser); goto skipTokenRun; case 'r': { - uint16_t* startPos = pos; - if (tryParseRequire(Import) && keywordStart(startPos)) - tryBacktrackAddStarExportBinding(startPos - 1); + Cursor startPos = parser->pos; + if (tryParseRequire(parser, Import) && keywordStart(parser, startPos)) + tryBacktrackAddStarExportBinding(parser, startPos - 1); goto skipTokenRun; } case '_': - if (str_eq22(pos + 1, 'i', 'n', 't', 'e', 'r', 'o', 'p', 'R', 'e', 'q', 'u', 'i', 'r', 'e', 'W', 'i', 'l', 'd', 'c', 'a', 'r', 'd') && (keywordStart(pos) || *(pos - 1) == '.')) { - uint16_t* startPos = pos; - pos += 23; - if (*pos == '(') { - pos++; - if (!pushOpenToken(lastTokenPos)) - return error; - if (tryParseRequire(Import) && keywordStart(startPos)) - tryBacktrackAddStarExportBinding(startPos - 1); + if (str_eq22(parser, parser->pos + 1, 'i', 'n', 't', 'e', 'r', 'o', 'p', 'R', 'e', 'q', 'u', 'i', 'r', 'e', 'W', 'i', 'l', 'd', 'c', 'a', 'r', 'd') && (keywordStart(parser, parser->pos) || at(parser, parser->pos - 1) == '.')) { + Cursor startPos = parser->pos; + parser->pos += 23; + if (at(parser, parser->pos) == '(') { + parser->pos++; + if (!pushOpenToken(parser, parser->lastTokenPos)) + return parser->error; + if (tryParseRequire(parser, Import) && keywordStart(parser, startPos)) + tryBacktrackAddStarExportBinding(parser, startPos - 1); } } - else if (str_eq7(pos + 1, '_', 'e', 'x', 'p', 'o', 'r', 't') && (keywordStart(pos) || *(pos - 1) == '.')) { - pos += 8; - if (str_eq4(pos, 'S', 't', 'a', 'r')) - pos += 4; - if (*pos == '(') { - if (!pushOpenToken(lastTokenPos)) - return error; - if (*(pos + 1) == 'r') { - pos++; - tryParseRequire(ExportStar); + else if (str_eq7(parser, parser->pos + 1, '_', 'e', 'x', 'p', 'o', 'r', 't') && (keywordStart(parser, parser->pos) || at(parser, parser->pos - 1) == '.')) { + parser->pos += 8; + if (str_eq4(parser, parser->pos, 'S', 't', 'a', 'r')) + parser->pos += 4; + if (at(parser, parser->pos) == '(') { + if (!pushOpenToken(parser, parser->lastTokenPos)) + return parser->error; + if (at(parser, parser->pos + 1) == 'r') { + parser->pos++; + tryParseRequire(parser, ExportStar); } } } @@ -171,70 +175,75 @@ uint32_t parseCJSWithOptions (uint16_t* _source, uint32_t _sourceLen, void (*_ad switch (ch) { case 'e': - if (str_eq5(pos + 1, 'x', 'p', 'o', 'r', 't') && keywordStart(pos)) { - if (*(pos + 6) == 's') - tryParseExportsDotAssign(false); - else if (openTokenDepth == 0) - throwIfExportStatement(); + if (str_eq5(parser, parser->pos + 1, 'x', 'p', 'o', 'r', 't') && keywordStart(parser, parser->pos)) { + if (at(parser, parser->pos + 6) == 's') + tryParseExportsDotAssign(parser, false); + else if (parser->openTokenDepth == 0) + throwIfExportStatement(parser); } goto skipTokenRun; case 'c': - if (keywordStart(pos) && str_eq4(pos + 1, 'l', 'a', 's', 's') && isBrOrWs(*(pos + 5))) - nextBraceIsClass = true; + if (keywordStart(parser, parser->pos) && str_eq4(parser, parser->pos + 1, 'l', 'a', 's', 's') && isBrOrWs(at(parser, parser->pos + 5))) + parser->nextBraceIsClass = true; goto skipTokenRun; case 'm': - if (str_eq5(pos + 1, 'o', 'd', 'u', 'l', 'e') && keywordStart(pos)) - tryParseModuleExportsDotAssign(); + if (str_eq5(parser, parser->pos + 1, 'o', 'd', 'u', 'l', 'e') && keywordStart(parser, parser->pos)) + tryParseModuleExportsDotAssign(parser); goto skipTokenRun; case 'O': - if (str_eq5(pos + 1, 'b', 'j', 'e', 'c', 't') && keywordStart(pos)) - tryParseObjectDefineOrKeys(openTokenDepth == 0); + if (str_eq5(parser, parser->pos + 1, 'b', 'j', 'e', 'c', 't') && keywordStart(parser, parser->pos)) + tryParseObjectDefineOrKeys(parser, parser->openTokenDepth == 0); goto skipTokenRun; case '(': - if (!pushOpenToken(lastTokenPos)) - return error; + if (!pushOpenToken(parser, parser->lastTokenPos)) + return parser->error; break; case '[': - if (extended && !pushOpenToken(lastTokenPos)) - return error; + if (parser->extended && !pushOpenToken(parser, parser->lastTokenPos)) + return parser->error; break; case ']': - if (extended) { - if (openTokenDepth == 0) - return syntaxError(8), error; - openTokenDepth--; + if (parser->extended) { + if (parser->openTokenDepth == 0) + return syntaxError(parser, CJS_LEXER_ERROR_UNBALANCED_DELIMITER), parser->error; + parser->openTokenDepth--; } break; case ',': - if (extended && openTokenDepth && (openTokenTypeStack[openTokenDepth - 1] & ExportObjectToken)) - readExportProperty(); + if (parser->extended && parser->openTokenDepth && (parser->openTokenTypeStack[parser->openTokenDepth - 1] & ExportObjectToken)) + readExportProperty(parser); break; case ')': - if (openTokenDepth == 0) - return syntaxError(8), error; - openTokenDepth--; + if (parser->openTokenDepth == 0) + return syntaxError(parser, CJS_LEXER_ERROR_UNBALANCED_DELIMITER), parser->error; + parser->openTokenDepth--; + lastOpenTokenPos = parser->openTokenPosStack[parser->openTokenDepth]; + lastClosedTokenPos = parser->pos; break; case '{': - if (!pushOpenToken(lastTokenPos)) - return error; - openTokenTypeStack[openTokenDepth - 1] = nextBraceIsClass ? ClassToken : 0; - nextBraceIsClass = false; - if (extended && pos == exportObjectPos) { - openTokenTypeStack[openTokenDepth - 1] |= ExportObjectToken; - exportObjectPos = 0; - readExportProperty(); + if (!pushOpenToken(parser, parser->lastTokenPos)) + return parser->error; + parser->openTokenTypeStack[parser->openTokenDepth - 1] = parser->nextBraceIsClass ? ClassToken : 0; + parser->nextBraceIsClass = false; + if (parser->extended && parser->pos == parser->exportObjectPos) { + parser->openTokenTypeStack[parser->openTokenDepth - 1] |= ExportObjectToken; + parser->exportObjectPos = SOURCE_BEFORE; + readExportProperty(parser); } break; case '}': - if (openTokenDepth == 0) - return syntaxError(2), error; - if (openTokenDepth-- == templateDepth) { - templateDepth = templateStack[--templateStackDepth]; - templateString(); + if (parser->openTokenDepth == 0) + return syntaxError(parser, CJS_LEXER_ERROR_UNEXPECTED_CLOSING_BRACE), parser->error; + lastOpenTokenPos = parser->openTokenPosStack[parser->openTokenDepth - 1]; + lastOpenTokenType = parser->openTokenTypeStack[parser->openTokenDepth - 1]; + lastClosedTokenPos = parser->pos; + if (parser->openTokenDepth-- == parser->templateDepth) { + parser->templateDepth = parser->templateStack[--parser->templateStackDepth]; + templateString(parser); } else { - if (templateDepth != UINT16_MAX && openTokenDepth < templateDepth) - return syntaxError(3), error; + if (parser->templateDepth != UINT16_MAX && parser->openTokenDepth < parser->templateDepth) + return syntaxError(parser, CJS_LEXER_ERROR_UNEXPECTED_TEMPLATE_BRACE), parser->error; } break; case '<': @@ -242,17 +251,17 @@ uint32_t parseCJSWithOptions (uint16_t* _source, uint32_t _sourceLen, void (*_ad break; case '\'': case '"': - stringLiteral(ch); + stringLiteral(parser, ch); break; case '/': { - uint16_t next_ch = *(pos + 1); + uint16_t next_ch = at(parser, parser->pos + 1); if (next_ch == '/') { - lineComment(); + lineComment(parser); // dont update lastToken continue; } else if (next_ch == '*') { - blockComment(); + blockComment(parser); // dont update lastToken continue; } @@ -261,62 +270,69 @@ uint32_t parseCJSWithOptions (uint16_t* _source, uint32_t _sourceLen, void (*_ad // - what token came previously (lastToken) // - if a closing brace or paren, what token came before the corresponding // opening brace or paren (lastOpenTokenIndex) - uint16_t lastToken = *lastTokenPos; + uint16_t lastToken = at(parser, parser->lastTokenPos); if (isExpressionPunctuator(lastToken) && - !(lastToken == '.' && (*(lastTokenPos - 1) >= '0' && *(lastTokenPos - 1) <= '9')) && - !(lastToken == '+' && *(lastTokenPos - 1) == '+') && !(lastToken == '-' && *(lastTokenPos - 1) == '-') || - lastToken == ')' && isParenKeyword(openTokenPosStack[openTokenDepth]) || - lastToken == '}' && (isExpressionTerminator(openTokenPosStack[openTokenDepth]) || - (openTokenTypeStack[openTokenDepth] & ClassToken) || - extended && isStatementBrace(openTokenPosStack[openTokenDepth], openTokenDepth)) || - lastToken == '/' && lastSlashWasDivision || - isExpressionKeyword(lastTokenPos) || + !(lastToken == '.' && (at(parser, parser->lastTokenPos - 1) >= '0' && at(parser, parser->lastTokenPos - 1) <= '9')) && + !(lastToken == '+' && at(parser, parser->lastTokenPos - 1) == '+') && !(lastToken == '-' && at(parser, parser->lastTokenPos - 1) == '-') || + parser->lastTokenPos == lastClosedTokenPos && (lastToken == ')' && isParenKeyword(parser, lastOpenTokenPos) || + lastToken == '}' && (isExpressionTerminator(parser, lastOpenTokenPos) || + (lastOpenTokenType & ClassToken) || + parser->extended && isStatementBrace(parser, lastOpenTokenPos, parser->openTokenDepth))) || + lastToken == '/' && parser->lastSlashWasDivision || + isExpressionKeyword(parser, parser->lastTokenPos) || !lastToken) { - regularExpression(); - lastSlashWasDivision = false; + regularExpression(parser); + parser->lastSlashWasDivision = false; } else { - lastSlashWasDivision = true; + parser->lastSlashWasDivision = true; } } break; } case '`': - if (templateDepth == UINT16_MAX - 1) - return syntaxError(4), error; - templateString(); + templateString(parser); break; default: +#ifndef CJS_LEXER_WASM + if (!isTokenRunChar(ch)) + break; + goto scanTokenRun; +#endif skipTokenRun: - if (!isTokenRunChar(*pos)) + if (!isTokenRunChar(at(parser, parser->pos))) break; - while (isTokenRunChar(*(pos + 1))) - pos++; +#ifndef CJS_LEXER_WASM + scanTokenRun: +#endif + while (parser->pos < parser->end && + isTokenRunChar(scanInput(input, parser->pos + 1))) + parser->pos++; } - lastTokenPos = pos; + parser->lastTokenPos = parser->pos; } - if (templateDepth != UINT16_MAX || openTokenDepth || error) { - if (!error) - syntaxError(1); - return error; + if (parser->templateDepth != UINT16_MAX || parser->openTokenDepth || parser->error) { + if (!parser->error) + syntaxError(parser, CJS_LEXER_ERROR_UNEXPECTED_EOF); + return parser->error; } // success return 0; } -void tryBacktrackAddStarExportBinding (uint16_t* bPos) { - while (*bPos == ' ' && bPos > source) +static void tryBacktrackAddStarExportBinding(Parser* parser, Cursor bPos) { + while (at(parser, bPos) == ' ' && bPos > SOURCE_START) bPos--; - if (*bPos == '=') { + if (at(parser, bPos) == '=') { bPos--; - while (*bPos == ' ' && bPos > source) + while (at(parser, bPos) == ' ' && bPos > SOURCE_START) bPos--; uint32_t charCode; - uint16_t* id_end = bPos; + Cursor id_end = bPos; bool identifierStart = false; - while ((charCode = fullCharCodeAtLast(bPos)) && bPos > source) { + while ((charCode = fullCharCodeAtLast(parser, bPos)) && bPos > SOURCE_START) { if (charCode == '\\') return; if (!isIdentifierChar(charCode)) @@ -324,598 +340,600 @@ void tryBacktrackAddStarExportBinding (uint16_t* bPos) { identifierStart = isIdentifierStart(charCode); bPos -= charCodeByteLen(charCode); } - if (identifierStart && *bPos == ' ') { - starExportBinding_.id_start = bPos + 1; - starExportBinding_.id_end = id_end + 1; - while (*bPos == ' ' && bPos > source) + if (identifierStart && at(parser, bPos) == ' ') { + parser->starExportBinding_.id_start = bPos + 1; + parser->starExportBinding_.id_end = id_end + 1; + while (at(parser, bPos) == ' ' && bPos > SOURCE_START) bPos--; - switch (*bPos) { + switch (at(parser, bPos)) { case 'r': - if (!readPrecedingKeyword2(bPos - 1, 'v', 'a')) + if (!readPrecedingKeyword2(parser, bPos - 1, 'v', 'a')) return; break; case 't': - if (!readPrecedingKeyword2(bPos - 1, 'l', 'e') && !readPrecedingKeyword4(bPos - 1, 'c', 'o', 'n', 's')) + if (!readPrecedingKeyword2(parser, bPos - 1, 'l', 'e') && !readPrecedingKeyword4(parser, bPos - 1, 'c', 'o', 'n', 's')) return; break; default: return; } - ensureAnalysisCapacity(sizeof(StarExportBinding)); - StarExportBinding* binding = (StarExportBinding*)(uintptr_t)analysis_head; - analysis_head += sizeof(StarExportBinding); - *binding = starExportBinding_; + StarExportBinding* binding = cjs_lexer_allocate(parser->result, sizeof(StarExportBinding)); + if (!binding) { + syntaxError(parser, CJS_LEXER_ERROR_ALLOCATION); + return; + } + *binding = parser->starExportBinding_; binding->next = NULL; - if (lastStarExport) - lastStarExport->next = binding; + if (parser->lastStarExport) + parser->lastStarExport->next = binding; else - firstStarExport = binding; - lastStarExport = binding; + parser->firstStarExport = binding; + parser->lastStarExport = binding; } } } -bool tryParseObjectHasOwnProperty (uint16_t* it_id_start, ptrdiff_t it_id_len) { - uint16_t ch = commentWhitespace(); - if (ch != 'O' || !str_eq5(pos + 1, 'b', 'j', 'e', 'c', 't')) return false; - pos += 6; - ch = commentWhitespace(); +static bool tryParseObjectHasOwnProperty(Parser* parser, Cursor it_id_start, ptrdiff_t it_id_len) { + uint16_t ch = commentWhitespace(parser); + if (ch != 'O' || !str_eq5(parser, parser->pos + 1, 'b', 'j', 'e', 'c', 't')) return false; + parser->pos += 6; + ch = commentWhitespace(parser); if (ch != '.') return false; - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); if (ch == 'p') { - if (!str_eq8(pos + 1, 'r', 'o', 't', 'o', 't', 'y', 'p', 'e')) return false; - pos += 9; - ch = commentWhitespace(); + if (!str_eq8(parser, parser->pos + 1, 'r', 'o', 't', 'o', 't', 'y', 'p', 'e')) return false; + parser->pos += 9; + ch = commentWhitespace(parser); if (ch != '.') return false; - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); } - if (ch != 'h' || !str_eq13(pos + 1, 'a', 's', 'O', 'w', 'n', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'y')) return false; - pos += 14; - ch = commentWhitespace(); + if (ch != 'h' || !str_eq13(parser, parser->pos + 1, 'a', 's', 'O', 'w', 'n', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'y')) return false; + parser->pos += 14; + ch = commentWhitespace(parser); if (ch != '.') return false; - pos++; - ch = commentWhitespace(); - if (ch != 'c' || !str_eq3(pos + 1, 'a', 'l', 'l')) return false; - pos += 4; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); + if (ch != 'c' || !str_eq3(parser, parser->pos + 1, 'a', 'l', 'l')) return false; + parser->pos += 4; + ch = commentWhitespace(parser); if (ch != '(') return false; - pos++; - ch = commentWhitespace(); - if (!identifier(ch)) return false; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); + if (!identifier(parser, ch)) return false; + ch = commentWhitespace(parser); if (ch != ',') return false; - pos++; - ch = commentWhitespace(); - if (memcmp(pos, it_id_start, it_id_len * sizeof(uint16_t)) != 0) return false; - pos += it_id_len; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); + if (!matches(parser, parser->pos, it_id_start, (size_t)it_id_len)) return false; + parser->pos += it_id_len; + ch = commentWhitespace(parser); if (ch != ')') return false; - pos++; + parser->pos++; return true; } -static inline bool tryParseMinifiedEnumerable (uint16_t ch) { - if (!allowMinifiedEnumerable || ch != '!') return false; - pos++; - if (commentWhitespace() != '0') return false; - pos++; +static inline bool tryParseMinifiedEnumerable(Parser* parser, uint16_t ch) { + if (!parser->allowMinifiedEnumerable || ch != '!') return false; + parser->pos++; + if (commentWhitespace(parser) != '0') return false; + parser->pos++; return true; } -void tryParseObjectDefineOrKeys (bool keys) { - pos += 6; - uint16_t* revertPos = pos - 1; - uint16_t ch = commentWhitespace(); +static void tryParseObjectDefineOrKeys(Parser* parser, bool keys) { + parser->pos += 6; + Cursor revertPos = parser->pos - 1; + uint16_t ch = commentWhitespace(parser); if (ch == '.') { - pos++; - ch = commentWhitespace(); - if (extended && ch == 'd') { - readExportDefinition(); - pos = revertPos; + parser->pos++; + ch = commentWhitespace(parser); + if (parser->extended && ch == 'd') { + readExportDefinition(parser); + parser->pos = revertPos; return; } - if (ch == 'd' && str_eq13(pos + 1, 'e', 'f', 'i', 'n', 'e', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'y')) { - uint16_t* exportStart = 0; - uint16_t* exportEnd = 0; + if (ch == 'd' && str_eq13(parser, parser->pos + 1, 'e', 'f', 'i', 'n', 'e', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'y')) { + Cursor exportStart = SOURCE_START; + Cursor exportEnd = SOURCE_START; while (true) { - pos += 14; - revertPos = pos - 1; - ch = commentWhitespace(); + parser->pos += 14; + revertPos = parser->pos - 1; + ch = commentWhitespace(parser); if (ch != '(') break; - pos++; - ch = commentWhitespace(); - if (!readExportsOrModuleDotExports(ch)) break; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); + if (!readExportsOrModuleDotExports(parser, ch)) break; + ch = commentWhitespace(parser); if (ch != ',') break; - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); if (ch != '\'' && ch != '"') break; - exportStart = pos; - stringLiteral(ch); - exportEnd = ++pos; - ch = commentWhitespace(); + exportStart = parser->pos; + stringLiteral(parser, ch); + exportEnd = ++parser->pos; + ch = commentWhitespace(parser); if (ch != ',') break; - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); if (ch != '{') break; - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); if (ch == 'e') { - if (!str_eq9(pos + 1, 'n', 'u', 'm', 'e', 'r', 'a', 'b', 'l', 'e')) break; - pos += 10; - ch = commentWhitespace(); + if (!str_eq9(parser, parser->pos + 1, 'n', 'u', 'm', 'e', 'r', 'a', 'b', 'l', 'e')) break; + parser->pos += 10; + ch = commentWhitespace(parser); if (ch != ':') break; - pos++; - ch = commentWhitespace(); - if (ch == 't' && str_eq3(pos + 1, 'r', 'u', 'e')) { - pos += 4; - } else if (!tryParseMinifiedEnumerable(ch)) { + parser->pos++; + ch = commentWhitespace(parser); + if (ch == 't' && str_eq3(parser, parser->pos + 1, 'r', 'u', 'e')) { + parser->pos += 4; + } else if (!tryParseMinifiedEnumerable(parser, ch)) { break; } - ch = commentWhitespace(); + ch = commentWhitespace(parser); if (ch != 44) break; - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); } if (ch == 'v') { - if (!str_eq4(pos + 1, 'a', 'l', 'u', 'e')) break; - pos += 5; - ch = commentWhitespace(); + if (!str_eq4(parser, parser->pos + 1, 'a', 'l', 'u', 'e')) break; + parser->pos += 5; + ch = commentWhitespace(parser); if (ch != ':') break; - addExport(exportStart, exportEnd); - pos = revertPos; + cjs_lexer_add(parser, ExportCandidate, exportStart, exportEnd); + parser->pos = revertPos; return; } else if (ch == 'g') { - if (!str_eq2(pos + 1, 'e', 't')) break; - pos += 3; - ch = commentWhitespace(); + if (!str_eq2(parser, parser->pos + 1, 'e', 't')) break; + parser->pos += 3; + ch = commentWhitespace(parser); if (ch == ':') { - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); if (ch != 'f') break; - if (!str_eq7(pos + 1, 'u', 'n', 'c', 't', 'i', 'o', 'n')) break; - pos += 8; - uint16_t* lastPos = pos; - ch = commentWhitespace(); - if (ch != '(' && (lastPos == pos || !identifier(ch))) break; - ch = commentWhitespace(); + if (!str_eq7(parser, parser->pos + 1, 'u', 'n', 'c', 't', 'i', 'o', 'n')) break; + parser->pos += 8; + Cursor lastPos = parser->pos; + ch = commentWhitespace(parser); + if (ch != '(' && (lastPos == parser->pos || !identifier(parser, ch))) break; + ch = commentWhitespace(parser); } if (ch != '(') break; - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); if (ch != ')') break; - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); if (ch != '{') break; - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); if (ch != 'r') break; - if (!str_eq5(pos + 1, 'e', 't', 'u', 'r', 'n')) break; - pos += 6; - ch = commentWhitespace(); - if (!identifier(ch)) break; - ch = commentWhitespace(); + if (!str_eq5(parser, parser->pos + 1, 'e', 't', 'u', 'r', 'n')) break; + parser->pos += 6; + ch = commentWhitespace(parser); + if (!identifier(parser, ch)) break; + ch = commentWhitespace(parser); if (ch == '.') { - pos++; - ch = commentWhitespace(); - if (!identifier(ch)) break; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); + if (!identifier(parser, ch)) break; + ch = commentWhitespace(parser); } else if (ch == '[') { - pos++; - ch = commentWhitespace(); - if (ch == '\'' || ch == '"') stringLiteral(ch); + parser->pos++; + ch = commentWhitespace(parser); + if (ch == '\'' || ch == '"') stringLiteral(parser, ch); else break; - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); if (ch != ']') break; - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); } if (ch == ';') { - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); } if (ch != '}') break; - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); if (ch == ',') { - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); } if (ch != '}') break; - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); if (ch != ')') break; - addExport(exportStart, exportEnd); + cjs_lexer_add(parser, ExportCandidate, exportStart, exportEnd); return; } break; } - if (exportEnd > 0) { - addUnsafeGetter(exportStart, exportEnd); + if (exportEnd > SOURCE_START) { + cjs_lexer_add(parser, UnsafeGetterCandidate, exportStart, exportEnd); } } - else if (keys && ch == 'k' && str_eq3(pos + 1, 'e', 'y', 's')) { + else if (keys && ch == 'k' && str_eq3(parser, parser->pos + 1, 'e', 'y', 's')) { while (true) { - pos += 4; - revertPos = pos - 1; - ch = commentWhitespace(); + parser->pos += 4; + revertPos = parser->pos - 1; + ch = commentWhitespace(parser); if (ch != '(') break; - pos++; - ch = commentWhitespace(); - uint16_t* id_start = pos; - if (!identifier(ch)) break; - ptrdiff_t id_len = pos - id_start; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); + Cursor id_start = parser->pos; + if (!identifier(parser, ch)) break; + ptrdiff_t id_len = parser->pos - id_start; + ch = commentWhitespace(parser); if (ch != ')') break; - revertPos = pos++; - ch = commentWhitespace(); + revertPos = parser->pos++; + ch = commentWhitespace(parser); if (ch != '.') break; - pos++; - ch = commentWhitespace(); - if (ch != 'f' || !str_eq6(pos + 1, 'o', 'r', 'E', 'a', 'c', 'h')) break; - pos += 7; - ch = commentWhitespace(); - revertPos = pos - 1; + parser->pos++; + ch = commentWhitespace(parser); + if (ch != 'f' || !str_eq6(parser, parser->pos + 1, 'o', 'r', 'E', 'a', 'c', 'h')) break; + parser->pos += 7; + ch = commentWhitespace(parser); + revertPos = parser->pos - 1; if (ch != '(') break; - pos++; - ch = commentWhitespace(); - if (ch != 'f' || !str_eq7(pos + 1, 'u', 'n', 'c', 't', 'i', 'o', 'n')) break; - pos += 8; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); + if (ch != 'f' || !str_eq7(parser, parser->pos + 1, 'u', 'n', 'c', 't', 'i', 'o', 'n')) break; + parser->pos += 8; + ch = commentWhitespace(parser); if (ch != '(') break; - pos++; - ch = commentWhitespace(); - uint16_t* it_id_start = pos; - if (!identifier(ch)) break; - ptrdiff_t it_id_len = pos - it_id_start; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); + Cursor it_id_start = parser->pos; + if (!identifier(parser, ch)) break; + ptrdiff_t it_id_len = parser->pos - it_id_start; + ch = commentWhitespace(parser); if (ch != ')') break; - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); if (ch != '{') break; - pos++; - ch = commentWhitespace(); - if (ch != 'i' || *(pos + 1) != 'f') break; - pos += 2; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); + if (ch != 'i' || at(parser, parser->pos + 1) != 'f') break; + parser->pos += 2; + ch = commentWhitespace(parser); if (ch != '(') break; - pos++; - ch = commentWhitespace(); - if (memcmp(pos, it_id_start, it_id_len * sizeof(uint16_t)) != 0) break; - pos += it_id_len; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); + if (!matches(parser, parser->pos, it_id_start, (size_t)it_id_len)) break; + parser->pos += it_id_len; + ch = commentWhitespace(parser); // `if (` IDENTIFIER$2 `===` ( `'default'` | `"default"` ) `||` IDENTIFIER$2 `===` ( '__esModule' | `"__esModule"` ) `) return` `;`? | if (ch == '=') { - if (!str_eq2(pos + 1, '=', '=')) break; - pos += 3; - ch = commentWhitespace(); + if (!str_eq2(parser, parser->pos + 1, '=', '=')) break; + parser->pos += 3; + ch = commentWhitespace(parser); if (ch != '"' && ch != '\'') break; uint16_t quot = ch; - if (!str_eq7(pos + 1, 'd', 'e', 'f', 'a', 'u', 'l', 't')) break; - pos += 8; - ch = commentWhitespace(); + if (!str_eq7(parser, parser->pos + 1, 'd', 'e', 'f', 'a', 'u', 'l', 't')) break; + parser->pos += 8; + ch = commentWhitespace(parser); if (ch != quot) break; - pos += 1; - ch = commentWhitespace(); - if (ch != '|' || *(pos + 1) != '|') break; - pos += 2; - ch = commentWhitespace(); - if (memcmp(pos, it_id_start, it_id_len * sizeof(uint16_t)) != 0) break; - pos += it_id_len; - ch = commentWhitespace(); - if (ch != '=' || !str_eq2(pos + 1, '=', '=')) break; - pos += 3; - ch = commentWhitespace(); + parser->pos += 1; + ch = commentWhitespace(parser); + if (ch != '|' || at(parser, parser->pos + 1) != '|') break; + parser->pos += 2; + ch = commentWhitespace(parser); + if (!matches(parser, parser->pos, it_id_start, (size_t)it_id_len)) break; + parser->pos += it_id_len; + ch = commentWhitespace(parser); + if (ch != '=' || !str_eq2(parser, parser->pos + 1, '=', '=')) break; + parser->pos += 3; + ch = commentWhitespace(parser); if (ch != '"' && ch != '\'') break; quot = ch; - if (!str_eq10(pos + 1, '_', '_', 'e', 's', 'M', 'o', 'd', 'u', 'l', 'e')) break; - pos += 11; - ch = commentWhitespace(); + if (!str_eq10(parser, parser->pos + 1, '_', '_', 'e', 's', 'M', 'o', 'd', 'u', 'l', 'e')) break; + parser->pos += 11; + ch = commentWhitespace(parser); if (ch != quot) break; - pos += 1; - ch = commentWhitespace(); + parser->pos += 1; + ch = commentWhitespace(parser); if (ch != ')') break; - pos += 1; - ch = commentWhitespace(); - if (ch != 'r' || !str_eq5(pos + 1, 'e', 't', 'u', 'r', 'n')) break; - pos += 6; - ch = commentWhitespace(); + parser->pos += 1; + ch = commentWhitespace(parser); + if (ch != 'r' || !str_eq5(parser, parser->pos + 1, 'e', 't', 'u', 'r', 'n')) break; + parser->pos += 6; + ch = commentWhitespace(parser); if (ch == ';') - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); // `if (` - if (ch == 'i' && *(pos + 1) == 'f') { + if (ch == 'i' && at(parser, parser->pos + 1) == 'f') { bool inIf = true; - pos += 2; - ch = commentWhitespace(); + parser->pos += 2; + ch = commentWhitespace(parser); if (ch != '(') break; - pos++; - uint16_t *ifInnerPos = pos; + parser->pos++; + Cursor ifInnerPos = parser->pos; // `Object.prototype.hasOwnProperty.call(` IDENTIFIER `, ` IDENTIFIER$2 `)) return` `;`? - if (tryParseObjectHasOwnProperty(it_id_start, it_id_len)) { - ch = commentWhitespace(); + if (tryParseObjectHasOwnProperty(parser, it_id_start, it_id_len)) { + ch = commentWhitespace(parser); if (ch != ')') break; - pos++; - ch = commentWhitespace(); - if (ch != 'r' || !str_eq5(pos + 1, 'e', 't', 'u', 'r', 'n')) break; - pos += 6; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); + if (ch != 'r' || !str_eq5(parser, parser->pos + 1, 'e', 't', 'u', 'r', 'n')) break; + parser->pos += 6; + ch = commentWhitespace(parser); if (ch == ';') - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); // match next if - if (ch == 'i' && *(pos + 1) == 'f') { - pos += 2; - ch = commentWhitespace(); + if (ch == 'i' && at(parser, parser->pos + 1) == 'f') { + parser->pos += 2; + ch = commentWhitespace(parser); if (ch != '(') break; - pos++; + parser->pos++; } else { inIf = false; } } else { - pos = ifInnerPos; + parser->pos = ifInnerPos; } // `if (` IDENTIFIER$2 `in` EXPORTS_IDENTIFIER `&&` EXPORTS_IDENTIFIER `[` IDENTIFIER$2 `] ===` IDENTIFIER$1 `[` IDENTIFIER$2 `]) return` `;`? if (inIf) { - if (memcmp(pos, it_id_start, it_id_len * sizeof(uint16_t)) != 0) break; - pos += it_id_len; - ch = commentWhitespace(); - if (ch != 'i' || !str_eq2(pos + 1, 'n', ' ')) break; - pos += 3; - ch = commentWhitespace(); - if (!readExportsOrModuleDotExports(ch)) break; - ch = commentWhitespace(); - if (ch != '&' || *(pos + 1) != '&') break; - pos += 2; - ch = commentWhitespace(); - if (!readExportsOrModuleDotExports(ch)) break; - ch = commentWhitespace(); + if (!matches(parser, parser->pos, it_id_start, (size_t)it_id_len)) break; + parser->pos += it_id_len; + ch = commentWhitespace(parser); + if (ch != 'i' || !str_eq2(parser, parser->pos + 1, 'n', ' ')) break; + parser->pos += 3; + ch = commentWhitespace(parser); + if (!readExportsOrModuleDotExports(parser, ch)) break; + ch = commentWhitespace(parser); + if (ch != '&' || at(parser, parser->pos + 1) != '&') break; + parser->pos += 2; + ch = commentWhitespace(parser); + if (!readExportsOrModuleDotExports(parser, ch)) break; + ch = commentWhitespace(parser); if (ch != '[') break; - pos++; - ch = commentWhitespace(); - if (memcmp(pos, it_id_start, it_id_len * sizeof(uint16_t)) != 0) break; - pos += it_id_len; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); + if (!matches(parser, parser->pos, it_id_start, (size_t)it_id_len)) break; + parser->pos += it_id_len; + ch = commentWhitespace(parser); if (ch != ']') break; - pos++; - ch = commentWhitespace(); - if (ch != '=' || !str_eq2(pos + 1, '=', '=')) break; - pos += 3; - ch = commentWhitespace(); - if (memcmp(pos, id_start, id_len * sizeof(uint16_t)) != 0) break; - pos += id_len; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); + if (ch != '=' || !str_eq2(parser, parser->pos + 1, '=', '=')) break; + parser->pos += 3; + ch = commentWhitespace(parser); + if (!matches(parser, parser->pos, id_start, (size_t)id_len)) break; + parser->pos += id_len; + ch = commentWhitespace(parser); if (ch != '[') break; - pos++; - ch = commentWhitespace(); - if (memcmp(pos, it_id_start, it_id_len * sizeof(uint16_t)) != 0) break; - pos += it_id_len; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); + if (!matches(parser, parser->pos, it_id_start, (size_t)it_id_len)) break; + parser->pos += it_id_len; + ch = commentWhitespace(parser); if (ch != ']') break; - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); if (ch != ')') break; - pos++; - ch = commentWhitespace(); - if (ch != 'r' || !str_eq5(pos + 1, 'e', 't', 'u', 'r', 'n')) break; - pos += 6; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); + if (ch != 'r' || !str_eq5(parser, parser->pos + 1, 'e', 't', 'u', 'r', 'n')) break; + parser->pos += 6; + ch = commentWhitespace(parser); if (ch == ';') - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); } } } // `if (` IDENTIFIER$2 `!==` ( `'default'` | `"default"` ) (`&& !` IDENTIFIER `.hasOwnProperty(` IDENTIFIER$2 `)` )? `)` else if (ch == '!') { - if (!str_eq2(pos + 1, '=', '=')) break; - pos += 3; - ch = commentWhitespace(); + if (!str_eq2(parser, parser->pos + 1, '=', '=')) break; + parser->pos += 3; + ch = commentWhitespace(parser); if (ch != '"' && ch != '\'') break; uint16_t quot = ch; - if (!str_eq7(pos + 1, 'd', 'e', 'f', 'a', 'u', 'l', 't')) break; - pos += 8; - ch = commentWhitespace(); + if (!str_eq7(parser, parser->pos + 1, 'd', 'e', 'f', 'a', 'u', 'l', 't')) break; + parser->pos += 8; + ch = commentWhitespace(parser); if (ch != quot) break; - pos += 1; - ch = commentWhitespace(); + parser->pos += 1; + ch = commentWhitespace(parser); if (ch == '&') { - if (*(pos + 1) != '&') break; - pos += 2; - ch = commentWhitespace(); + if (at(parser, parser->pos + 1) != '&') break; + parser->pos += 2; + ch = commentWhitespace(parser); if (ch != '!') break; - pos += 1; - ch = commentWhitespace(); - if (ch == 'O' && str_eq6(pos + 1, 'b', 'j', 'e', 'c', 't', '.')) { - if (!tryParseObjectHasOwnProperty(it_id_start, it_id_len)) break; + parser->pos += 1; + ch = commentWhitespace(parser); + if (ch == 'O' && str_eq6(parser, parser->pos + 1, 'b', 'j', 'e', 'c', 't', '.')) { + if (!tryParseObjectHasOwnProperty(parser, it_id_start, it_id_len)) break; } - else if (identifier(ch)) { - ch = commentWhitespace(); + else if (identifier(parser, ch)) { + ch = commentWhitespace(parser); if (ch != '.') break; - pos++; - ch = commentWhitespace(); - if (ch != 'h' || !str_eq13(pos + 1, 'a', 's', 'O', 'w', 'n', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'y')) break; - pos += 14; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); + if (ch != 'h' || !str_eq13(parser, parser->pos + 1, 'a', 's', 'O', 'w', 'n', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'y')) break; + parser->pos += 14; + ch = commentWhitespace(parser); if (ch != '(') break; - pos += 1; - ch = commentWhitespace(); - if (memcmp(pos, it_id_start, it_id_len * sizeof(uint16_t)) != 0) break; - pos += it_id_len; - ch = commentWhitespace(); + parser->pos += 1; + ch = commentWhitespace(parser); + if (!matches(parser, parser->pos, it_id_start, (size_t)it_id_len)) break; + parser->pos += it_id_len; + ch = commentWhitespace(parser); if (ch != ')') break; - pos += 1; + parser->pos += 1; } - ch = commentWhitespace(); + ch = commentWhitespace(parser); } if (ch != ')') break; - pos += 1; - ch = commentWhitespace(); + parser->pos += 1; + ch = commentWhitespace(parser); } else break; // EXPORTS_IDENTIFIER `[` IDENTIFIER$2 `] =` IDENTIFIER$1 `[` IDENTIFIER$2 `]` - if (readExportsOrModuleDotExports(ch)) { - ch = commentWhitespace(); + if (readExportsOrModuleDotExports(parser, ch)) { + ch = commentWhitespace(parser); if (ch != '[') break; - pos++; - ch = commentWhitespace(); - if (memcmp(pos, it_id_start, it_id_len * sizeof(uint16_t)) != 0) break; - pos += it_id_len; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); + if (!matches(parser, parser->pos, it_id_start, (size_t)it_id_len)) break; + parser->pos += it_id_len; + ch = commentWhitespace(parser); if (ch != ']') break; - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); if (ch != '=') break; - pos++; - ch = commentWhitespace(); - if (memcmp(pos, id_start, id_len * sizeof(uint16_t)) != 0) break; - pos += id_len; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); + if (!matches(parser, parser->pos, id_start, (size_t)id_len)) break; + parser->pos += id_len; + ch = commentWhitespace(parser); if (ch != '[') break; - pos++; - ch = commentWhitespace(); - if (memcmp(pos, it_id_start, it_id_len * sizeof(uint16_t)) != 0) break; - pos += it_id_len; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); + if (!matches(parser, parser->pos, it_id_start, (size_t)it_id_len)) break; + parser->pos += it_id_len; + ch = commentWhitespace(parser); if (ch != ']') break; - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); if (ch == ';') { - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); } } // `Object.defineProperty(` EXPORTS_IDENTIFIER `, ` IDENTIFIER$2 `, { enumerable: true, get: function () { return ` IDENTIFIER$1 `[` IDENTIFIER$2 `]; } })` else if (ch == 'O') { - if (!str_eq5(pos + 1, 'b', 'j', 'e', 'c', 't')) break; - pos += 6; - ch = commentWhitespace(); + if (!str_eq5(parser, parser->pos + 1, 'b', 'j', 'e', 'c', 't')) break; + parser->pos += 6; + ch = commentWhitespace(parser); if (ch != '.') break; - pos++; - ch = commentWhitespace(); - if (ch != 'd' || !str_eq13(pos + 1, 'e', 'f', 'i', 'n', 'e', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'y')) break; - pos += 14; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); + if (ch != 'd' || !str_eq13(parser, parser->pos + 1, 'e', 'f', 'i', 'n', 'e', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'y')) break; + parser->pos += 14; + ch = commentWhitespace(parser); if (ch != '(') break; - pos++; - ch = commentWhitespace(); - if (!readExportsOrModuleDotExports(ch)) break; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); + if (!readExportsOrModuleDotExports(parser, ch)) break; + ch = commentWhitespace(parser); if (ch != ',') break; - pos++; - ch = commentWhitespace(); - if (memcmp(pos, it_id_start, it_id_len * sizeof(uint16_t)) != 0) break; - pos += it_id_len; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); + if (!matches(parser, parser->pos, it_id_start, (size_t)it_id_len)) break; + parser->pos += it_id_len; + ch = commentWhitespace(parser); if (ch != ',') break; - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); if (ch != '{') break; - pos++; - ch = commentWhitespace(); - if (ch != 'e' || !str_eq9(pos + 1, 'n', 'u', 'm', 'e', 'r', 'a', 'b', 'l', 'e')) break; - pos += 10; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); + if (ch != 'e' || !str_eq9(parser, parser->pos + 1, 'n', 'u', 'm', 'e', 'r', 'a', 'b', 'l', 'e')) break; + parser->pos += 10; + ch = commentWhitespace(parser); if (ch != ':') break; - pos++; - ch = commentWhitespace(); - if (ch == 't' && str_eq3(pos + 1, 'r', 'u', 'e')) { - pos += 4; - } else if (!tryParseMinifiedEnumerable(ch)) { + parser->pos++; + ch = commentWhitespace(parser); + if (ch == 't' && str_eq3(parser, parser->pos + 1, 'r', 'u', 'e')) { + parser->pos += 4; + } else if (!tryParseMinifiedEnumerable(parser, ch)) { break; } - ch = commentWhitespace(); + ch = commentWhitespace(parser); if (ch != ',') break; - pos++; - ch = commentWhitespace(); - if (ch != 'g' || !str_eq2(pos + 1, 'e', 't')) break; - pos += 3; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); + if (ch != 'g' || !str_eq2(parser, parser->pos + 1, 'e', 't')) break; + parser->pos += 3; + ch = commentWhitespace(parser); if (ch == ':') { - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); if (ch != 'f') break; - if (!str_eq7(pos + 1, 'u', 'n', 'c', 't', 'i', 'o', 'n')) break; - pos += 8; - uint16_t* lastPos = pos; - ch = commentWhitespace(); - if (ch != '(' && (lastPos == pos || !identifier(ch))) break; - ch = commentWhitespace(); + if (!str_eq7(parser, parser->pos + 1, 'u', 'n', 'c', 't', 'i', 'o', 'n')) break; + parser->pos += 8; + Cursor lastPos = parser->pos; + ch = commentWhitespace(parser); + if (ch != '(' && (lastPos == parser->pos || !identifier(parser, ch))) break; + ch = commentWhitespace(parser); } if (ch != '(') break; - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); if (ch != ')') break; - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); if (ch != '{') break; - pos++; - ch = commentWhitespace(); - if (ch != 'r' || !str_eq5(pos + 1, 'e', 't', 'u', 'r', 'n')) break; - pos += 6; - ch = commentWhitespace(); - if (memcmp(pos, id_start, id_len * sizeof(uint16_t)) != 0) break; - pos += id_len; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); + if (ch != 'r' || !str_eq5(parser, parser->pos + 1, 'e', 't', 'u', 'r', 'n')) break; + parser->pos += 6; + ch = commentWhitespace(parser); + if (!matches(parser, parser->pos, id_start, (size_t)id_len)) break; + parser->pos += id_len; + ch = commentWhitespace(parser); if (ch != '[') break; - pos++; - ch = commentWhitespace(); - if (memcmp(pos, it_id_start, it_id_len * sizeof(uint16_t)) != 0) break; - pos += it_id_len; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); + if (!matches(parser, parser->pos, it_id_start, (size_t)it_id_len)) break; + parser->pos += it_id_len; + ch = commentWhitespace(parser); if (ch != ']') break; - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); if (ch == ';') { - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); } if (ch != '}') break; - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); if (ch == ',') { - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); } if (ch != '}') break; - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); if (ch != ')') break; - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); if (ch == ';') { - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); } } else break; if (ch != '}') break; - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); if (ch != ')') break; // search through export bindings to see if this is a star export // this is done last because it is a linear search through all require bindings // and by doing this search last after verifying the structure match, // we don't have to worry about the slow search algorithm - StarExportBinding* binding = firstStarExport; + StarExportBinding* binding = parser->firstStarExport; while (binding) { if (id_len == binding->id_end - binding->id_start && - 0 == memcmp(id_start, binding->id_start, id_len * sizeof(uint16_t))) { - addReexport(binding->specifier_start, binding->specifier_end); - pos = revertPos; + matches(parser, id_start, binding->id_start, (size_t)id_len)) { + cjs_lexer_add(parser, ReexportCandidate, binding->specifier_start, binding->specifier_end); + parser->pos = revertPos; return; } binding = binding->next; @@ -924,61 +942,61 @@ void tryParseObjectDefineOrKeys (bool keys) { } } } - pos = revertPos; + parser->pos = revertPos; } -bool readExportsOrModuleDotExports (uint16_t ch) { - uint16_t* revertPos = pos; - if (ch == 'm' && str_eq5(pos + 1, 'o', 'd', 'u', 'l', 'e')) { - pos += 6; - ch = commentWhitespace(); +static bool readExportsOrModuleDotExports(Parser* parser, uint16_t ch) { + Cursor revertPos = parser->pos; + if (ch == 'm' && str_eq5(parser, parser->pos + 1, 'o', 'd', 'u', 'l', 'e')) { + parser->pos += 6; + ch = commentWhitespace(parser); if (ch != '.') { - pos = revertPos; + parser->pos = revertPos; return false; } - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); } - if (ch == 'e' && str_eq6(pos + 1, 'x', 'p', 'o', 'r', 't', 's')) { - pos += 7; + if (ch == 'e' && str_eq6(parser, parser->pos + 1, 'x', 'p', 'o', 'r', 't', 's')) { + parser->pos += 7; return true; } else { - pos = revertPos; + parser->pos = revertPos; return false; } } -void tryParseModuleExportsDotAssign () { - pos += 6; - uint16_t* revertPos = pos - 1; - uint16_t ch = commentWhitespace(); +static void tryParseModuleExportsDotAssign(Parser* parser) { + parser->pos += 6; + Cursor revertPos = parser->pos - 1; + uint16_t ch = commentWhitespace(parser); if (ch == '.') { - pos++; - ch = commentWhitespace(); - if (ch == 'e' && str_eq6(pos + 1, 'x', 'p', 'o', 'r', 't', 's')) { - tryParseExportsDotAssign(true); + parser->pos++; + ch = commentWhitespace(parser); + if (ch == 'e' && str_eq6(parser, parser->pos + 1, 'x', 'p', 'o', 'r', 't', 's')) { + tryParseExportsDotAssign(parser, true); return; } } - pos = revertPos; + parser->pos = revertPos; } -void tryParseExportsDotAssign (bool assign) { - pos += 7; - uint16_t* revertPos = pos - 1; - uint16_t ch = commentWhitespace(); +static void tryParseExportsDotAssign(Parser* parser, bool assign) { + parser->pos += 7; + Cursor revertPos = parser->pos - 1; + uint16_t ch = commentWhitespace(parser); switch (ch) { // exports.asdf case '.': { - pos++; - ch = commentWhitespace(); - uint16_t* startPos = pos; - if (identifier(ch)) { - uint16_t* endPos = pos; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); + Cursor startPos = parser->pos; + if (identifier(parser, ch)) { + Cursor endPos = parser->pos; + ch = commentWhitespace(parser); if (ch == '=') { - addExport(startPos, endPos); + cjs_lexer_add(parser, ExportCandidate, startPos, endPos); return; } } @@ -986,263 +1004,263 @@ void tryParseExportsDotAssign (bool assign) { } // exports['asdf'] case '[': { - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); if (ch == '\'' || ch == '"') { - uint16_t* startPos = pos; - stringLiteral(ch); - uint16_t* endPos = ++pos; - ch = commentWhitespace(); + Cursor startPos = parser->pos; + stringLiteral(parser, ch); + Cursor endPos = ++parser->pos; + ch = commentWhitespace(parser); if (ch != ']') break; - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); if (ch != '=') break; - addExport(startPos, endPos); + cjs_lexer_add(parser, ExportCandidate, startPos, endPos); } break; } // module.exports = case '=': { if (assign) { - if (!extended) clearReexports(); - pos++; - ch = commentWhitespace(); - if (extended) { - if (ch == '(') ch = readExportExpressionStart(); - if (ch == '{') exportObjectPos = pos; - else if (ch == 'r') tryParseRequire(ExportAssign); - pos = revertPos; + if (!parser->extended) cjs_lexer_clear_reexports(parser->result); + parser->pos++; + ch = commentWhitespace(parser); + if (parser->extended) { + if (ch == '(') ch = readExportExpressionStart(parser); + if (ch == '{') parser->exportObjectPos = parser->pos; + else if (ch == 'r') tryParseRequire(parser, ExportAssign); + parser->pos = revertPos; return; } // { ... } if (ch == '{') { - tryParseLiteralExports(); + tryParseLiteralExports(parser); return; } // require('...') if (ch == 'r') - tryParseRequire(ExportAssign); + tryParseRequire(parser, ExportAssign); } } } - pos = revertPos; + parser->pos = revertPos; } -bool tryParseRequire (enum RequireType requireType) { - uint16_t* revertPos = pos; +static bool tryParseRequire(Parser* parser, enum RequireType requireType) { + Cursor revertPos = parser->pos; // require('...') - if (str_eq6(pos + 1, 'e', 'q', 'u', 'i', 'r', 'e')) { - pos += 7; - uint16_t ch = commentWhitespace(); + if (str_eq6(parser, parser->pos + 1, 'e', 'q', 'u', 'i', 'r', 'e')) { + parser->pos += 7; + uint16_t ch = commentWhitespace(parser); if (ch == '(') { - pos++; - ch = commentWhitespace(); - uint16_t* reexportStart = pos; + parser->pos++; + ch = commentWhitespace(parser); + Cursor reexportStart = parser->pos; if (ch == '\'' || ch == '"') { - stringLiteral(ch); - uint16_t* reexportEnd = ++pos; - ch = commentWhitespace(); + stringLiteral(parser, ch); + Cursor reexportEnd = ++parser->pos; + ch = commentWhitespace(parser); if (ch == ')') { switch (requireType) { case ExportStar: - addReexport(reexportStart, reexportEnd); + cjs_lexer_add(parser, ReexportCandidate, reexportStart, reexportEnd); return true; case ExportAssign: - addReexport(reexportStart, reexportEnd); + cjs_lexer_add(parser, ReexportCandidate, reexportStart, reexportEnd); return true; default: - starExportBinding_.specifier_start = reexportStart; - starExportBinding_.specifier_end = reexportEnd; + parser->starExportBinding_.specifier_start = reexportStart; + parser->starExportBinding_.specifier_end = reexportEnd; return true; } } } } - pos = revertPos; + parser->pos = revertPos; } return false; } -static bool matchesKeyword (const char* keyword, uint32_t length) { - if (pos > end || (uint32_t)(end - pos + 1) < length) return false; +static bool matchesKeyword(Parser* parser, const char* keyword, uint32_t length) { + if (parser->pos > parser->end || (uint32_t)(parser->end - parser->pos + 1) < length) return false; for (uint32_t i = 0; i < length; i++) { - if (pos[i] != keyword[i]) return false; + if (scanInput(parser->input, parser->pos + i) != keyword[i]) return false; } return true; } -static uint16_t readExportExpressionStart () { +static uint16_t readExportExpressionStart(Parser* parser) { while (true) { - pos++; - uint16_t ch = commentWhitespace(); + parser->pos++; + uint16_t ch = commentWhitespace(parser); if (ch == '(') continue; - uint16_t* start = pos; + Cursor start = parser->pos; if (ch == '\'' || ch == '"') { - stringLiteral(ch); - pos++; + stringLiteral(parser, ch); + parser->pos++; } else if (ch == '{') { - pos++; - if (commentWhitespace() == '}') pos++; + parser->pos++; + if (commentWhitespace(parser) == '}') parser->pos++; else { - pos = start; + parser->pos = start; return ch; } } else { - while (pos <= end && isIdentifierChar(fullCharCode(*pos))) - pos += charCodeByteLen(fullCharCode(*pos)); + while (parser->pos <= parser->end && isIdentifierChar(fullCharCode(parser, scanInput(parser->input, parser->pos)))) + parser->pos += charCodeByteLen(fullCharCode(parser, scanInput(parser->input, parser->pos))); } - if (pos == start || commentWhitespace() != ',') { - pos = start; + if (parser->pos == start || commentWhitespace(parser) != ',') { + parser->pos = start; return ch; } } } -void readExportDefinition () { - bool property = matchesKeyword("defineProperty", 14); - bool properties = matchesKeyword("defineProperties", 16); +static void readExportDefinition(Parser* parser) { + bool property = matchesKeyword(parser, "defineProperty", 14); + bool properties = matchesKeyword(parser, "defineProperties", 16); if (!property && !properties) return; - pos += property ? 14 : 16; - uint16_t ch = commentWhitespace(); + parser->pos += property ? 14 : 16; + uint16_t ch = commentWhitespace(parser); if (ch != '(') return; - pos++; - ch = commentWhitespace(); - if (!readExportsOrModuleDotExports(ch)) return; - if (commentWhitespace() != ',') return; - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); + if (!readExportsOrModuleDotExports(parser, ch)) return; + if (commentWhitespace(parser) != ',') return; + parser->pos++; + ch = commentWhitespace(parser); if (properties) { - if (ch == '(') ch = readExportExpressionStart(); - if (ch == '{') exportObjectPos = pos; + if (ch == '(') ch = readExportExpressionStart(parser); + if (ch == '{') parser->exportObjectPos = parser->pos; } else if (ch == '\'' || ch == '"') { - uint16_t* nameStart = pos; - stringLiteral(ch); - uint16_t* nameEnd = ++pos; - if (commentWhitespace() == ',') addExport(nameStart, nameEnd); + Cursor nameStart = parser->pos; + stringLiteral(parser, ch); + Cursor nameEnd = ++parser->pos; + if (commentWhitespace(parser) == ',') cjs_lexer_add(parser, ExportCandidate, nameStart, nameEnd); } } -void readExportProperty () { - uint16_t* revertPos = pos; - pos++; - uint16_t ch = commentWhitespace(); - if (ch == '.' && end - pos >= 2 && str_eq2(pos + 1, '.', '.')) { - pos += 3; - ch = commentWhitespace(); - if (ch == 'r') tryParseRequire(ExportAssign); - pos = revertPos; +static void readExportProperty(Parser* parser) { + Cursor revertPos = parser->pos; + parser->pos++; + uint16_t ch = commentWhitespace(parser); + if (ch == '.' && parser->end - parser->pos >= 2 && str_eq2(parser, parser->pos + 1, '.', '.')) { + parser->pos += 3; + ch = commentWhitespace(parser); + if (ch == 'r') tryParseRequire(parser, ExportAssign); + parser->pos = revertPos; return; } if (ch == '*') { - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); } bool computed = ch == '['; if (computed) { - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); } - uint16_t* nameStart = pos; - uint16_t* nameEnd = 0; + Cursor nameStart = parser->pos; + Cursor nameEnd = 0; if (ch == '\'' || ch == '"') { - stringLiteral(ch); - nameEnd = ++pos; + stringLiteral(parser, ch); + nameEnd = ++parser->pos; } - else if (!computed && identifier(ch)) { - nameEnd = pos; - ch = commentWhitespace(); - if ((nameEnd - nameStart == 3 && (str_eq3(nameStart, 'g', 'e', 't') || str_eq3(nameStart, 's', 'e', 't')) || - nameEnd - nameStart == 5 && str_eq5(nameStart, 'a', 's', 'y', 'n', 'c')) && + else if (!computed && identifier(parser, ch)) { + nameEnd = parser->pos; + ch = commentWhitespace(parser); + if ((nameEnd - nameStart == 3 && (str_eq3(parser, nameStart, 'g', 'e', 't') || str_eq3(parser, nameStart, 's', 'e', 't')) || + nameEnd - nameStart == 5 && str_eq5(parser, nameStart, 'a', 's', 'y', 'n', 'c')) && ch != ':' && ch != '(' && ch != ',' && ch != '}') { if (ch == '*') { - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); } computed = ch == '['; if (computed) { - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); } - nameStart = pos; + nameStart = parser->pos; if (ch == '\'' || ch == '"') { - stringLiteral(ch); - nameEnd = ++pos; + stringLiteral(parser, ch); + nameEnd = ++parser->pos; } - else if (!computed && identifier(ch)) nameEnd = pos; + else if (!computed && identifier(parser, ch)) nameEnd = parser->pos; else nameEnd = 0; } } - ch = commentWhitespace(); + ch = commentWhitespace(parser); if (computed) { if (ch != ']') nameEnd = 0; else { - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); } } if (nameEnd && (ch == ':' || ch == '(' || !computed && (ch == ',' || ch == '}'))) - addExport(nameStart, nameEnd); - pos = revertPos; -} - -void tryParseLiteralExports () { - uint16_t* revertPos = pos - 1; - while (pos++ < end) { - uint16_t ch = commentWhitespace(); - uint16_t* startPos = pos; - if (identifier(ch)) { - uint16_t* endPos = pos; - ch = commentWhitespace(); + cjs_lexer_add(parser, ExportCandidate, nameStart, nameEnd); + parser->pos = revertPos; +} + +static void tryParseLiteralExports(Parser* parser) { + Cursor revertPos = parser->pos - 1; + while (parser->pos++ < parser->end) { + uint16_t ch = commentWhitespace(parser); + Cursor startPos = parser->pos; + if (identifier(parser, ch)) { + Cursor endPos = parser->pos; + ch = commentWhitespace(parser); if (ch == ':') { - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); // nothing more complex than identifier expressions for now - if (!identifier(ch) && *pos != '\\') { - pos = revertPos; + if (!identifier(parser, ch) && at(parser, parser->pos) != '\\') { + parser->pos = revertPos; return; } - ch = *pos; + ch = at(parser, parser->pos); } else if (ch != ',' && ch != '}' && ch != '=' && ch != '(') { - pos = revertPos; + parser->pos = revertPos; return; } - addExport(startPos, endPos); + cjs_lexer_add(parser, ExportCandidate, startPos, endPos); } else if (ch == '\'' || ch == '"') { - uint16_t* startPos = pos; - stringLiteral(ch); - uint16_t* endPos = ++pos; - ch = commentWhitespace(); + Cursor startPos = parser->pos; + stringLiteral(parser, ch); + Cursor endPos = ++parser->pos; + ch = commentWhitespace(parser); if (ch == ':') { - pos++; - ch = commentWhitespace(); + parser->pos++; + ch = commentWhitespace(parser); // nothing more complex than identifier expressions for now - if (!identifier(ch) && *pos != '\\') { - pos = revertPos; + if (!identifier(parser, ch) && at(parser, parser->pos) != '\\') { + parser->pos = revertPos; return; } - ch = *pos; - addExport(startPos, endPos); + ch = at(parser, parser->pos); + cjs_lexer_add(parser, ExportCandidate, startPos, endPos); } } - else if (ch == '.' && str_eq2(pos + 1, '.', '.')) { - pos += 3; - if (*pos == 'r' && tryParseRequire(ExportAssign)) { - pos++; + else if (ch == '.' && str_eq2(parser, parser->pos + 1, '.', '.')) { + parser->pos += 3; + if (at(parser, parser->pos) == 'r' && tryParseRequire(parser, ExportAssign)) { + parser->pos++; } - else if (!identifier(*pos)) { - pos = revertPos; + else if (!identifier(parser, at(parser, parser->pos))) { + parser->pos = revertPos; return; } - ch = commentWhitespace(); + ch = commentWhitespace(parser); } else { - pos = revertPos; + parser->pos = revertPos; return; } @@ -1250,7 +1268,7 @@ void tryParseLiteralExports () { return; if (ch != ',') { - pos = revertPos; + parser->pos = revertPos; return; } } @@ -1265,13 +1283,13 @@ void tryParseLiteralExports () { // code point above 128. // Generated by `bin/generate-identifier-regex.js`. -bool isNonASCIIidentifierStartChar (uint32_t ch) { +static bool isNonASCIIidentifierStartChar (uint32_t ch) { return ch == 0xaa || ch == 0xb5 || ch == 0xba || ch >= 0xc0 && ch <= 0xd6 || ch >= 0xd8 && ch <= 0xf6 || ch >= 0xf8 && ch <= 0x02c1 || ch >= 0x02c6 && ch <= 0x02d1 || ch >= 0x02e0 && ch <= 0x02e4 || ch == 0x02ec || ch == 0x02ee || ch >= 0x0370 && ch <= 0x0374 || ch == 0x0376 || ch == 0x0377 || ch >= 0x037a && ch <= 0x037d || ch == 0x037f || ch == 0x0386 || ch >= 0x0388 && ch <= 0x038a || ch == 0x038c || ch >= 0x038e && ch <= 0x03a1 || ch >= 0x03a3 && ch <= 0x03f5 || ch >= 0x03f7 && ch <= 0x0481 || ch >= 0x048a && ch <= 0x052f || ch >= 0x0531 && ch <= 0x0556 || ch == 0x0559 || ch >= 0x0560 && ch <= 0x0588 || ch >= 0x05d0 && ch <= 0x05ea || ch >= 0x05ef && ch <= 0x05f2 || ch >= 0x0620 && ch <= 0x064a || ch == 0x066e || ch == 0x066f || ch >= 0x0671 && ch <= 0x06d3 || ch == 0x06d5 || ch == 0x06e5 || ch == 0x06e6 || ch == 0x06ee || ch == 0x06ef || ch >= 0x06fa && ch <= 0x06fc || ch == 0x06ff || ch == 0x0710 || ch >= 0x0712 && ch <= 0x072f || ch >= 0x074d && ch <= 0x07a5 || ch == 0x07b1 || ch >= 0x07ca && ch <= 0x07ea || ch == 0x07f4 || ch == 0x07f5 || ch == 0x07fa || ch >= 0x0800 && ch <= 0x0815 || ch == 0x081a || ch == 0x0824 || ch == 0x0828 || ch >= 0x0840 && ch <= 0x0858 || ch >= 0x0860 && ch <= 0x086a || ch >= 0x08a0 && ch <= 0x08b4 || ch >= 0x08b6 && ch <= 0x08bd || ch >= 0x0904 && ch <= 0x0939 || ch == 0x093d || ch == 0x0950 || ch >= 0x0958 && ch <= 0x0961 || ch >= 0x0971 && ch <= 0x0980 || ch >= 0x0985 && ch <= 0x098c || ch == 0x098f || ch == 0x0990 || ch >= 0x0993 && ch <= 0x09a8 || ch >= 0x09aa && ch <= 0x09b0 || ch == 0x09b2 || ch >= 0x09b6 && ch <= 0x09b9 || ch == 0x09bd || ch == 0x09ce || ch == 0x09dc || ch == 0x09dd || ch >= 0x09df && ch <= 0x09e1 || ch == 0x09f0 || ch == 0x09f1 || ch == 0x09fc || ch >= 0x0a05 && ch <= 0x0a0a || ch == 0x0a0f || ch == 0x0a10 || ch >= 0x0a13 && ch <= 0x0a28 || ch >= 0x0a2a && ch <= 0x0a30 || ch == 0x0a32 || ch == 0x0a33 || ch == 0x0a35 || ch == 0x0a36 || ch == 0x0a38 || ch == 0x0a39 || ch >= 0x0a59 && ch <= 0x0a5c || ch == 0x0a5e || ch >= 0x0a72 && ch <= 0x0a74 || ch >= 0x0a85 && ch <= 0x0a8d || ch >= 0x0a8f && ch <= 0x0a91 || ch >= 0x0a93 && ch <= 0x0aa8 || ch >= 0x0aaa && ch <= 0x0ab0 || ch == 0x0ab2 || ch == 0x0ab3 || ch >= 0x0ab5 && ch <= 0x0ab9 || ch == 0x0abd || ch == 0x0ad0 || ch == 0x0ae0 || ch == 0x0ae1 || ch == 0x0af9 || ch >= 0x0b05 && ch <= 0x0b0c || ch == 0x0b0f || ch == 0x0b10 || ch >= 0x0b13 && ch <= 0x0b28 || ch >= 0x0b2a && ch <= 0x0b30 || ch == 0x0b32 || ch == 0x0b33 || ch >= 0x0b35 && ch <= 0x0b39 || ch == 0x0b3d || ch == 0x0b5c || ch == 0x0b5d || ch >= 0x0b5f && ch <= 0x0b61 || ch == 0x0b71 || ch == 0x0b83 || ch >= 0x0b85 && ch <= 0x0b8a || ch >= 0x0b8e && ch <= 0x0b90 || ch >= 0x0b92 && ch <= 0x0b95 || ch == 0x0b99 || ch == 0x0b9a || ch == 0x0b9c || ch == 0x0b9e || ch == 0x0b9f || ch == 0x0ba3 || ch == 0x0ba4 || ch >= 0x0ba8 && ch <= 0x0baa || ch >= 0x0bae && ch <= 0x0bb9 || ch == 0x0bd0 || ch >= 0x0c05 && ch <= 0x0c0c || ch >= 0x0c0e && ch <= 0x0c10 || ch >= 0x0c12 && ch <= 0x0c28 || ch >= 0x0c2a && ch <= 0x0c39 || ch == 0x0c3d || ch >= 0x0c58 && ch <= 0x0c5a || ch == 0x0c60 || ch == 0x0c61 || ch == 0x0c80 || ch >= 0x0c85 && ch <= 0x0c8c || ch >= 0x0c8e && ch <= 0x0c90 || ch >= 0x0c92 && ch <= 0x0ca8 || ch >= 0x0caa && ch <= 0x0cb3 || ch >= 0x0cb5 && ch <= 0x0cb9 || ch == 0x0cbd || ch == 0x0cde || ch == 0x0ce0 || ch == 0x0ce1 || ch == 0x0cf1 || ch == 0x0cf2 || ch >= 0x0d05 && ch <= 0x0d0c || ch >= 0x0d0e && ch <= 0x0d10 || ch >= 0x0d12 && ch <= 0x0d3a || ch == 0x0d3d || ch == 0x0d4e || ch >= 0x0d54 && ch <= 0x0d56 || ch >= 0x0d5f && ch <= 0x0d61 || ch >= 0x0d7a && ch <= 0x0d7f || ch >= 0x0d85 && ch <= 0x0d96 || ch >= 0x0d9a && ch <= 0x0db1 || ch >= 0x0db3 && ch <= 0x0dbb || ch == 0x0dbd || ch >= 0x0dc0 && ch <= 0x0dc6 || ch >= 0x0e01 && ch <= 0x0e30 || ch == 0x0e32 || ch == 0x0e33 || ch >= 0x0e40 && ch <= 0x0e46 || ch == 0x0e81 || ch == 0x0e82 || ch == 0x0e84 || ch == 0x0e87 || ch == 0x0e88 || ch == 0x0e8a || ch == 0x0e8d || ch >= 0x0e94 && ch <= 0x0e97 || ch >= 0x0e99 && ch <= 0x0e9f || ch >= 0x0ea1 && ch <= 0x0ea3 || ch == 0x0ea5 || ch == 0x0ea7 || ch == 0x0eaa || ch == 0x0eab || ch >= 0x0ead && ch <= 0x0eb0 || ch == 0x0eb2 || ch == 0x0eb3 || ch == 0x0ebd || ch >= 0x0ec0 && ch <= 0x0ec4 || ch == 0x0ec6 || ch >= 0x0edc && ch <= 0x0edf || ch == 0x0f00 || ch >= 0x0f40 && ch <= 0x0f47 || ch >= 0x0f49 && ch <= 0x0f6c || ch >= 0x0f88 && ch <= 0x0f8c || ch >= 0x1000 && ch <= 0x102a || ch == 0x103f || ch >= 0x1050 && ch <= 0x1055 || ch >= 0x105a && ch <= 0x105d || ch == 0x1061 || ch == 0x1065 || ch == 0x1066 || ch >= 0x106e && ch <= 0x1070 || ch >= 0x1075 && ch <= 0x1081 || ch == 0x108e || ch >= 0x10a0 && ch <= 0x10c5 || ch == 0x10c7 || ch == 0x10cd || ch >= 0x10d0 && ch <= 0x10fa || ch >= 0x10fc && ch <= 0x1248 || ch >= 0x124a && ch <= 0x124d || ch >= 0x1250 && ch <= 0x1256 || ch == 0x1258 || ch >= 0x125a && ch <= 0x125d || ch >= 0x1260 && ch <= 0x1288 || ch >= 0x128a && ch <= 0x128d || ch >= 0x1290 && ch <= 0x12b0 || ch >= 0x12b2 && ch <= 0x12b5 || ch >= 0x12b8 && ch <= 0x12be || ch == 0x12c0 || ch >= 0x12c2 && ch <= 0x12c5 || ch >= 0x12c8 && ch <= 0x12d6 || ch >= 0x12d8 && ch <= 0x1310 || ch >= 0x1312 && ch <= 0x1315 || ch >= 0x1318 && ch <= 0x135a || ch >= 0x1380 && ch <= 0x138f || ch >= 0x13a0 && ch <= 0x13f5 || ch >= 0x13f8 && ch <= 0x13fd || ch >= 0x1401 && ch <= 0x166c || ch >= 0x166f && ch <= 0x167f || ch >= 0x1681 && ch <= 0x169a || ch >= 0x16a0 && ch <= 0x16ea || ch >= 0x16ee && ch <= 0x16f8 || ch >= 0x1700 && ch <= 0x170c || ch >= 0x170e && ch <= 0x1711 || ch >= 0x1720 && ch <= 0x1731 || ch >= 0x1740 && ch <= 0x1751 || ch >= 0x1760 && ch <= 0x176c || ch >= 0x176e && ch <= 0x1770 || ch >= 0x1780 && ch <= 0x17b3 || ch == 0x17d7 || ch == 0x17dc || ch >= 0x1820 && ch <= 0x1878 || ch >= 0x1880 && ch <= 0x18a8 || ch == 0x18aa || ch >= 0x18b0 && ch <= 0x18f5 || ch >= 0x1900 && ch <= 0x191e || ch >= 0x1950 && ch <= 0x196d || ch >= 0x1970 && ch <= 0x1974 || ch >= 0x1980 && ch <= 0x19ab || ch >= 0x19b0 && ch <= 0x19c9 || ch >= 0x1a00 && ch <= 0x1a16 || ch >= 0x1a20 && ch <= 0x1a54 || ch == 0x1aa7 || ch >= 0x1b05 && ch <= 0x1b33 || ch >= 0x1b45 && ch <= 0x1b4b || ch >= 0x1b83 && ch <= 0x1ba0 || ch == 0x1bae || ch == 0x1baf || ch >= 0x1bba && ch <= 0x1be5 || ch >= 0x1c00 && ch <= 0x1c23 || ch >= 0x1c4d && ch <= 0x1c4f || ch >= 0x1c5a && ch <= 0x1c7d || ch >= 0x1c80 && ch <= 0x1c88 || ch >= 0x1c90 && ch <= 0x1cba || ch >= 0x1cbd && ch <= 0x1cbf || ch >= 0x1ce9 && ch <= 0x1cec || ch >= 0x1cee && ch <= 0x1cf1 || ch == 0x1cf5 || ch == 0x1cf6 || ch >= 0x1d00 && ch <= 0x1dbf || ch >= 0x1e00 && ch <= 0x1f15 || ch >= 0x1f18 && ch <= 0x1f1d || ch >= 0x1f20 && ch <= 0x1f45 || ch >= 0x1f48 && ch <= 0x1f4d || ch >= 0x1f50 && ch <= 0x1f57 || ch == 0x1f59 || ch == 0x1f5b || ch == 0x1f5d || ch >= 0x1f5f && ch <= 0x1f7d || ch >= 0x1f80 && ch <= 0x1fb4 || ch >= 0x1fb6 && ch <= 0x1fbc || ch == 0x1fbe || ch >= 0x1fc2 && ch <= 0x1fc4 || ch >= 0x1fc6 && ch <= 0x1fcc || ch >= 0x1fd0 && ch <= 0x1fd3 || ch >= 0x1fd6 && ch <= 0x1fdb || ch >= 0x1fe0 && ch <= 0x1fec || ch >= 0x1ff2 && ch <= 0x1ff4 || ch >= 0x1ff6 && ch <= 0x1ffc || ch == 0x2071 || ch == 0x207f || ch >= 0x2090 && ch <= 0x209c || ch == 0x2102 || ch == 0x2107 || ch >= 0x210a && ch <= 0x2113 || ch == 0x2115 || ch >= 0x2118 && ch <= 0x211d || ch == 0x2124 || ch == 0x2126 || ch == 0x2128 || ch >= 0x212a && ch <= 0x2139 || ch >= 0x213c && ch <= 0x213f || ch >= 0x2145 && ch <= 0x2149 || ch == 0x214e || ch >= 0x2160 && ch <= 0x2188 || ch >= 0x2c00 && ch <= 0x2c2e || ch >= 0x2c30 && ch <= 0x2c5e || ch >= 0x2c60 && ch <= 0x2ce4 || ch >= 0x2ceb && ch <= 0x2cee || ch == 0x2cf2 || ch == 0x2cf3 || ch >= 0x2d00 && ch <= 0x2d25 || ch == 0x2d27 || ch == 0x2d2d || ch >= 0x2d30 && ch <= 0x2d67 || ch == 0x2d6f || ch >= 0x2d80 && ch <= 0x2d96 || ch >= 0x2da0 && ch <= 0x2da6 || ch >= 0x2da8 && ch <= 0x2dae || ch >= 0x2db0 && ch <= 0x2db6 || ch >= 0x2db8 && ch <= 0x2dbe || ch >= 0x2dc0 && ch <= 0x2dc6 || ch >= 0x2dc8 && ch <= 0x2dce || ch >= 0x2dd0 && ch <= 0x2dd6 || ch >= 0x2dd8 && ch <= 0x2dde || ch >= 0x3005 && ch <= 0x3007 || ch >= 0x3021 && ch <= 0x3029 || ch >= 0x3031 && ch <= 0x3035 || ch >= 0x3038 && ch <= 0x303c || ch >= 0x3041 && ch <= 0x3096 || ch >= 0x309b && ch <= 0x309f || ch >= 0x30a1 && ch <= 0x30fa || ch >= 0x30fc && ch <= 0x30ff || ch >= 0x3105 && ch <= 0x312f || ch >= 0x3131 && ch <= 0x318e || ch >= 0x31a0 && ch <= 0x31ba || ch >= 0x31f0 && ch <= 0x31ff || ch >= 0x3400 && ch <= 0x4db5 || ch >= 0x4e00 && ch <= 0x9fef || ch >= 0xa000 && ch <= 0xa48c || ch >= 0xa4d0 && ch <= 0xa4fd || ch >= 0xa500 && ch <= 0xa60c || ch >= 0xa610 && ch <= 0xa61f || ch == 0xa62a || ch == 0xa62b || ch >= 0xa640 && ch <= 0xa66e || ch >= 0xa67f && ch <= 0xa69d || ch >= 0xa6a0 && ch <= 0xa6ef || ch >= 0xa717 && ch <= 0xa71f || ch >= 0xa722 && ch <= 0xa788 || ch >= 0xa78b && ch <= 0xa7b9 || ch >= 0xa7f7 && ch <= 0xa801 || ch >= 0xa803 && ch <= 0xa805 || ch >= 0xa807 && ch <= 0xa80a || ch >= 0xa80c && ch <= 0xa822 || ch >= 0xa840 && ch <= 0xa873 || ch >= 0xa882 && ch <= 0xa8b3 || ch >= 0xa8f2 && ch <= 0xa8f7 || ch == 0xa8fb || ch == 0xa8fd || ch == 0xa8fe || ch >= 0xa90a && ch <= 0xa925 || ch >= 0xa930 && ch <= 0xa946 || ch >= 0xa960 && ch <= 0xa97c || ch >= 0xa984 && ch <= 0xa9b2 || ch == 0xa9cf || ch >= 0xa9e0 && ch <= 0xa9e4 || ch >= 0xa9e6 && ch <= 0xa9ef || ch >= 0xa9fa && ch <= 0xa9fe || ch >= 0xaa00 && ch <= 0xaa28 || ch >= 0xaa40 && ch <= 0xaa42 || ch >= 0xaa44 && ch <= 0xaa4b || ch >= 0xaa60 && ch <= 0xaa76 || ch == 0xaa7a || ch >= 0xaa7e && ch <= 0xaaaf || ch == 0xaab1 || ch == 0xaab5 || ch == 0xaab6 || ch >= 0xaab9 && ch <= 0xaabd || ch == 0xaac0 || ch == 0xaac2 || ch >= 0xaadb && ch <= 0xaadd || ch >= 0xaae0 && ch <= 0xaaea || ch >= 0xaaf2 && ch <= 0xaaf4 || ch >= 0xab01 && ch <= 0xab06 || ch >= 0xab09 && ch <= 0xab0e || ch >= 0xab11 && ch <= 0xab16 || ch >= 0xab20 && ch <= 0xab26 || ch >= 0xab28 && ch <= 0xab2e || ch >= 0xab30 && ch <= 0xab5a || ch >= 0xab5c && ch <= 0xab65 || ch >= 0xab70 && ch <= 0xabe2 || ch >= 0xac00 && ch <= 0xd7a3 || ch >= 0xd7b0 && ch <= 0xd7c6 || ch >= 0xd7cb && ch <= 0xd7fb || ch >= 0xf900 && ch <= 0xfa6d || ch >= 0xfa70 && ch <= 0xfad9 || ch >= 0xfb00 && ch <= 0xfb06 || ch >= 0xfb13 && ch <= 0xfb17 || ch == 0xfb1d || ch >= 0xfb1f && ch <= 0xfb28 || ch >= 0xfb2a && ch <= 0xfb36 || ch >= 0xfb38 && ch <= 0xfb3c || ch == 0xfb3e || ch == 0xfb40 || ch == 0xfb41 || ch == 0xfb43 || ch == 0xfb44 || ch >= 0xfb46 && ch <= 0xfbb1 || ch >= 0xfbd3 && ch <= 0xfd3d || ch >= 0xfd50 && ch <= 0xfd8f || ch >= 0xfd92 && ch <= 0xfdc7 || ch >= 0xfdf0 && ch <= 0xfdfb || ch >= 0xfe70 && ch <= 0xfe74 || ch >= 0xfe76 && ch <= 0xfefc || ch >= 0xff21 && ch <= 0xff3a || ch >= 0xff41 && ch <= 0xff5a || ch >= 0xff66 && ch <= 0xffbe || ch >= 0xffc2 && ch <= 0xffc7 || ch >= 0xffca && ch <= 0xffcf || ch >= 0xffd2 && ch <= 0xffd7 || ch >= 0xffda && ch <= 0xffdc; } -bool isNonASCIIidentifierChar (uint32_t ch) { +static bool isNonASCIIidentifierChar (uint32_t ch) { return isNonASCIIidentifierStartChar(ch) || ch == 0x200c || ch == 0x200d || ch == 0xb7 || ch >= 0x0300 && ch <= 0x036f || ch == 0x0387 || ch >= 0x0483 && ch <= 0x0487 || ch >= 0x0591 && ch <= 0x05bd || ch == 0x05bf || ch == 0x05c1 || ch == 0x05c2 || ch == 0x05c4 || ch == 0x05c5 || ch == 0x05c7 || ch >= 0x0610 && ch <= 0x061a || ch >= 0x064b && ch <= 0x0669 || ch == 0x0670 || ch >= 0x06d6 && ch <= 0x06dc || ch >= 0x06df && ch <= 0x06e4 || ch == 0x06e7 || ch == 0x06e8 || ch >= 0x06ea && ch <= 0x06ed || ch >= 0x06f0 && ch <= 0x06f9 || ch == 0x0711 || ch >= 0x0730 && ch <= 0x074a || ch >= 0x07a6 && ch <= 0x07b0 || ch >= 0x07c0 && ch <= 0x07c9 || ch >= 0x07eb && ch <= 0x07f3 || ch == 0x07fd || ch >= 0x0816 && ch <= 0x0819 || ch >= 0x081b && ch <= 0x0823 || ch >= 0x0825 && ch <= 0x0827 || ch >= 0x0829 && ch <= 0x082d || ch >= 0x0859 && ch <= 0x085b || ch >= 0x08d3 && ch <= 0x08e1 || ch >= 0x08e3 && ch <= 0x0903 || ch >= 0x093a && ch <= 0x093c || ch >= 0x093e && ch <= 0x094f || ch >= 0x0951 && ch <= 0x0957 || ch == 0x0962 || ch == 0x0963 || ch >= 0x0966 && ch <= 0x096f || ch >= 0x0981 && ch <= 0x0983 || ch == 0x09bc || ch >= 0x09be && ch <= 0x09c4 || ch == 0x09c7 || ch == 0x09c8 || ch >= 0x09cb && ch <= 0x09cd || ch == 0x09d7 || ch == 0x09e2 || ch == 0x09e3 || ch >= 0x09e6 && ch <= 0x09ef || ch == 0x09fe || ch >= 0x0a01 && ch <= 0x0a03 || ch == 0x0a3c || ch >= 0x0a3e && ch <= 0x0a42 || ch == 0x0a47 || ch == 0x0a48 || ch >= 0x0a4b && ch <= 0x0a4d || ch == 0x0a51 || ch >= 0x0a66 && ch <= 0x0a71 || ch == 0x0a75 || ch >= 0x0a81 && ch <= 0x0a83 || ch == 0x0abc || ch >= 0x0abe && ch <= 0x0ac5 || ch >= 0x0ac7 && ch <= 0x0ac9 || ch >= 0x0acb && ch <= 0x0acd || ch == 0x0ae2 || ch == 0x0ae3 || ch >= 0x0ae6 && ch <= 0x0aef || ch >= 0x0afa && ch <= 0x0aff || ch >= 0x0b01 && ch <= 0x0b03 || ch == 0x0b3c || ch >= 0x0b3e && ch <= 0x0b44 || ch == 0x0b47 || ch == 0x0b48 || ch >= 0x0b4b && ch <= 0x0b4d || ch == 0x0b56 || ch == 0x0b57 || ch == 0x0b62 || ch == 0x0b63 || ch >= 0x0b66 && ch <= 0x0b6f || ch == 0x0b82 || ch >= 0x0bbe && ch <= 0x0bc2 || ch >= 0x0bc6 && ch <= 0x0bc8 || ch >= 0x0bca && ch <= 0x0bcd || ch == 0x0bd7 || ch >= 0x0be6 && ch <= 0x0bef || ch >= 0x0c00 && ch <= 0x0c04 || ch >= 0x0c3e && ch <= 0x0c44 || ch >= 0x0c46 && ch <= 0x0c48 || ch >= 0x0c4a && ch <= 0x0c4d || ch == 0x0c55 || ch == 0x0c56 || ch == 0x0c62 || ch == 0x0c63 || ch >= 0x0c66 && ch <= 0x0c6f || ch >= 0x0c81 && ch <= 0x0c83 || ch == 0x0cbc || ch >= 0x0cbe && ch <= 0x0cc4 || ch >= 0x0cc6 && ch <= 0x0cc8 || ch >= 0x0cca && ch <= 0x0ccd || ch == 0x0cd5 || ch == 0x0cd6 || ch == 0x0ce2 || ch == 0x0ce3 || ch >= 0x0ce6 && ch <= 0x0cef || ch >= 0x0d00 && ch <= 0x0d03 || ch == 0x0d3b || ch == 0x0d3c || ch >= 0x0d3e && ch <= 0x0d44 || ch >= 0x0d46 && ch <= 0x0d48 || ch >= 0x0d4a && ch <= 0x0d4d || ch == 0x0d57 || ch == 0x0d62 || ch == 0x0d63 || ch >= 0x0d66 && ch <= 0x0d6f || ch == 0x0d82 || ch == 0x0d83 || ch == 0x0dca || ch >= 0x0dcf && ch <= 0x0dd4 || ch == 0x0dd6 || ch >= 0x0dd8 && ch <= 0x0ddf || ch >= 0x0de6 && ch <= 0x0def || ch == 0x0df2 || ch == 0x0df3 || ch == 0x0e31 || ch >= 0x0e34 && ch <= 0x0e3a || ch >= 0x0e47 && ch <= 0x0e4e || ch >= 0x0e50 && ch <= 0x0e59 || ch == 0x0eb1 || ch >= 0x0eb4 && ch <= 0x0eb9 || ch == 0x0ebb || ch == 0x0ebc || ch >= 0x0ec8 && ch <= 0x0ecd || ch >= 0x0ed0 && ch <= 0x0ed9 || ch == 0x0f18 || ch == 0x0f19 || ch >= 0x0f20 && ch <= 0x0f29 || ch == 0x0f35 || ch == 0x0f37 || ch == 0x0f39 || ch == 0x0f3e || ch == 0x0f3f || ch >= 0x0f71 && ch <= 0x0f84 || ch == 0x0f86 || ch == 0x0f87 || ch >= 0x0f8d && ch <= 0x0f97 || ch >= 0x0f99 && ch <= 0x0fbc || ch == 0x0fc6 || ch >= 0x102b && ch <= 0x103e || ch >= 0x1040 && ch <= 0x1049 || ch >= 0x1056 && ch <= 0x1059 || ch >= 0x105e && ch <= 0x1060 || ch >= 0x1062 && ch <= 0x1064 || ch >= 0x1067 && ch <= 0x106d || ch >= 0x1071 && ch <= 0x1074 || ch >= 0x1082 && ch <= 0x108d || ch >= 0x108f && ch <= 0x109d || ch >= 0x135d && ch <= 0x135f || ch >= 0x1369 && ch <= 0x1371 || ch >= 0x1712 && ch <= 0x1714 || ch >= 0x1732 && ch <= 0x1734 || ch == 0x1752 || ch == 0x1753 || ch == 0x1772 || ch == 0x1773 || ch >= 0x17b4 && ch <= 0x17d3 || ch == 0x17dd || ch >= 0x17e0 && ch <= 0x17e9 || ch >= 0x180b && ch <= 0x180d || ch >= 0x1810 && ch <= 0x1819 || ch == 0x18a9 || ch >= 0x1920 && ch <= 0x192b || ch >= 0x1930 && ch <= 0x193b || ch >= 0x1946 && ch <= 0x194f || ch >= 0x19d0 && ch <= 0x19da || ch >= 0x1a17 && ch <= 0x1a1b || ch >= 0x1a55 && ch <= 0x1a5e || ch >= 0x1a60 && ch <= 0x1a7c || ch >= 0x1a7f && ch <= 0x1a89 || ch >= 0x1a90 && ch <= 0x1a99 || ch >= 0x1ab0 && ch <= 0x1abd || ch >= 0x1b00 && ch <= 0x1b04 || ch >= 0x1b34 && ch <= 0x1b44 || ch >= 0x1b50 && ch <= 0x1b59 || ch >= 0x1b6b && ch <= 0x1b73 || ch >= 0x1b80 && ch <= 0x1b82 || ch >= 0x1ba1 && ch <= 0x1bad || ch >= 0x1bb0 && ch <= 0x1bb9 || ch >= 0x1be6 && ch <= 0x1bf3 || ch >= 0x1c24 && ch <= 0x1c37 || ch >= 0x1c40 && ch <= 0x1c49 || ch >= 0x1c50 && ch <= 0x1c59 || ch >= 0x1cd0 && ch <= 0x1cd2 || ch >= 0x1cd4 && ch <= 0x1ce8 || ch == 0x1ced || ch >= 0x1cf2 && ch <= 0x1cf4 || ch >= 0x1cf7 && ch <= 0x1cf9 || ch >= 0x1dc0 && ch <= 0x1df9 || ch >= 0x1dfb && ch <= 0x1dff || ch == 0x203f || ch == 0x2040 || ch == 0x2054 || ch >= 0x20d0 && ch <= 0x20dc || ch == 0x20e1 || ch >= 0x20e5 && ch <= 0x20f0 || ch >= 0x2cef && ch <= 0x2cf1 || ch == 0x2d7f || ch >= 0x2de0 && ch <= 0x2dff || ch >= 0x302a && ch <= 0x302f || ch == 0x3099 || ch == 0x309a || ch >= 0xa620 && ch <= 0xa629 || ch == 0xa66f || ch >= 0xa674 && ch <= 0xa67d || ch == 0xa69e || ch == 0xa69f || ch == 0xa6f0 || ch == 0xa6f1 || ch == 0xa802 || ch == 0xa806 || ch == 0xa80b || ch >= 0xa823 && ch <= 0xa827 || ch == 0xa880 || ch == 0xa881 || ch >= 0xa8b4 && ch <= 0xa8c5 || ch >= 0xa8d0 && ch <= 0xa8d9 || ch >= 0xa8e0 && ch <= 0xa8f1 || ch >= 0xa8ff && ch <= 0xa909 || ch >= 0xa926 && ch <= 0xa92d || ch >= 0xa947 && ch <= 0xa953 || ch >= 0xa980 && ch <= 0xa983 || ch >= 0xa9b3 && ch <= 0xa9c0 || ch >= 0xa9d0 && ch <= 0xa9d9 || ch == 0xa9e5 || ch >= 0xa9f0 && ch <= 0xa9f9 || ch >= 0xaa29 && ch <= 0xaa36 || ch == 0xaa43 || ch == 0xaa4c || ch == 0xaa4d || ch >= 0xaa50 && ch <= 0xaa59 || ch >= 0xaa7b && ch <= 0xaa7d || ch == 0xaab0 || ch >= 0xaab2 && ch <= 0xaab4 || ch == 0xaab7 || ch == 0xaab8 || ch == 0xaabe || ch == 0xaabf || ch == 0xaac1 || ch >= 0xaaeb && ch <= 0xaaef || ch == 0xaaf5 || ch == 0xaaf6 || ch >= 0xabe3 && ch <= 0xabea || ch == 0xabec || ch == 0xabed || ch >= 0xabf0 && ch <= 0xabf9 || ch == 0xfb1e || ch >= 0xfe00 && ch <= 0xfe0f || ch >= 0xfe20 && ch <= 0xfe2f || ch == 0xfe33 || ch == 0xfe34 || ch >= 0xfe4d && ch <= 0xfe4f || ch >= 0xff10 && ch <= 0xff19 || ch == 0xff3f; } @@ -1288,7 +1306,7 @@ static uint32_t astralIdentifierCodes[] = { 509,0,227,0,150,4,294,9,1368,2,2,1,6 // This has a complexity linear to the value of the code. The // assumption is that looking up astral identifier characters is // rare. -bool isInAstralIdentifierStartCodes (uint32_t code) { +static bool isInAstralIdentifierStartCodes (uint32_t code) { uint32_t cur = 0x10000; for (unsigned int i = 0; i < sizeof(astralIdentifierStartCodes) / sizeof(uint32_t); i += 2) { cur += astralIdentifierStartCodes[i]; @@ -1301,7 +1319,7 @@ bool isInAstralIdentifierStartCodes (uint32_t code) { return false; } -bool isInAstralIdentifierCodes (uint32_t code) { +static bool isInAstralIdentifierCodes (uint32_t code) { uint32_t cur = 0x10000; for (unsigned int i = 0; i < sizeof(astralIdentifierCodes) / sizeof(uint32_t); i += 2) { cur += astralIdentifierCodes[i]; @@ -1315,7 +1333,7 @@ bool isInAstralIdentifierCodes (uint32_t code) { } // Test whether a given character code starts an identifier. -bool isIdentifierStart(uint32_t code) { +static bool isIdentifierStart(uint32_t code) { if (code < 65) return code == 36; if (code < 91) return true; if (code < 97) return code == 95; @@ -1326,7 +1344,7 @@ bool isIdentifierStart(uint32_t code) { // Test whether a given character is part of an identifier. -bool isIdentifierChar(uint32_t code) { +static bool isIdentifierChar(uint32_t code) { if (code < 48) return code == 36; if (code < 58) return true; if (code < 65) return false; @@ -1337,34 +1355,34 @@ bool isIdentifierChar(uint32_t code) { return isInAstralIdentifierStartCodes(code) || isInAstralIdentifierCodes(code); } -inline int charCodeByteLen(uint32_t ch) { +static inline int charCodeByteLen(uint32_t ch) { if (ch < 0x10000) return 1; return 2; } -uint32_t fullCharCodeAtLast(uint16_t* bPos) { +static uint32_t fullCharCodeAtLast(Parser* parser, Cursor bPos) { // Gives the UTF char for backtracking surrogates - uint16_t ch = *bPos; + uint16_t ch = at(parser, bPos); if ((ch & 0xFC00) == 0xDC00) - return (((*(bPos - 1) & 0x3FF) << 10) | (ch & 0x3FF)) + 0x10000; + return (((at(parser, bPos - 1) & 0x3FF) << 10) | (ch & 0x3FF)) + 0x10000; return ch; } -uint32_t fullCharCode(uint16_t ch) { +static uint32_t fullCharCode(Parser* parser, uint16_t ch) { // Read UTF Surrogates if necessary if ((ch & 0xFC00) == 0xD800) - return (((ch & 0x3FF) << 10) | (*(pos + 1) & 0x3FF)) + 0x10000; + return (((ch & 0x3FF) << 10) | (at(parser, parser->pos + 1) & 0x3FF)) + 0x10000; return ch; } -bool identifier (uint16_t startCh) { - uint32_t ch = fullCharCode(startCh); +static bool identifier(Parser* parser, uint16_t startCh) { + uint32_t ch = fullCharCode(parser, startCh); if (!isIdentifierStart(ch)) return false; - pos += charCodeByteLen(ch); - while (ch = fullCharCode(*pos)) { + parser->pos += charCodeByteLen(ch); + while ((ch = fullCharCode(parser, at(parser, parser->pos)))) { if (isIdentifierChar(ch)) { - pos += charCodeByteLen(ch); + parser->pos += charCodeByteLen(ch); } else if (ch == '\\') { // no identifier escapes support for now @@ -1377,333 +1395,323 @@ bool identifier (uint16_t startCh) { return true; } -void throwIfImportStatement () { - uint16_t* startPos = pos; - pos += 6; - uint16_t ch = commentWhitespace(); +static void throwIfImportStatement(Parser* parser) { + Cursor startPos = parser->pos; + parser->pos += 6; + uint16_t ch = commentWhitespace(parser); switch (ch) { // dynamic import case '(': - if (!pushOpenToken(startPos)) + if (!pushOpenToken(parser, startPos)) return; return; // import.meta case '.': - syntaxError(5); + syntaxError(parser, CJS_LEXER_ERROR_UNEXPECTED_IMPORT_META); return; - + default: // no space after "import" -> not an import keyword - if (pos == startPos + 6) + if (parser->pos == startPos + 6) break; case '"': case '\'': case '{': case '*': // import statement only permitted at base-level - if (openTokenDepth != 0) { - pos--; + if (parser->openTokenDepth != 0) { + parser->pos--; return; } // import statements are a syntax error in CommonJS - syntaxError(6); + syntaxError(parser, CJS_LEXER_ERROR_UNEXPECTED_ESM_IMPORT); } } -void throwIfExportStatement () { - pos += 6; - uint16_t* curPos = pos; - uint16_t ch = commentWhitespace(); - if (pos == curPos && !isPunctuator(ch)) +static void throwIfExportStatement(Parser* parser) { + parser->pos += 6; + Cursor curPos = parser->pos; + uint16_t ch = commentWhitespace(parser); + if (parser->pos == curPos && !isPunctuator(ch)) return; - syntaxError(7); + syntaxError(parser, CJS_LEXER_ERROR_UNEXPECTED_ESM_EXPORT); } -uint16_t commentWhitespace () { +static uint16_t commentWhitespace(Parser* parser) { uint16_t ch; do { - ch = *pos; + ch = at(parser, parser->pos); if (ch == '/') { - uint16_t next_ch = *(pos + 1); + uint16_t next_ch = at(parser, parser->pos + 1); if (next_ch == '/') - lineComment(); + lineComment(parser); else if (next_ch == '*') - blockComment(); + blockComment(parser); else return ch; } else if (!isBrOrWs(ch)) { return ch; } - } while (pos++ < end); + } while (parser->pos++ < parser->end); return ch; } -void templateString () { - while (pos++ < end) { - uint16_t ch = *pos; - if (ch == '$' && *(pos + 1) == '{') { - pos++; - if (!pushTemplate()) +static void templateString(Parser* parser) { + while (parser->pos++ < parser->end) { + uint16_t ch = scanInput(parser->input, parser->pos); + if (ch == '$' && at(parser, parser->pos + 1) == '{') { + parser->pos++; + if (!pushTemplate(parser)) return; return; } if (ch == '`') return; if (ch == '\\') - pos++; + parser->pos++; } - syntaxError(8); + syntaxError(parser, CJS_LEXER_ERROR_UNTERMINATED_TEMPLATE); } -void blockComment () { - pos++; - while (pos++ < end) { - uint16_t ch = *pos; - if (ch == '*' && *(pos + 1) == '/') { - pos++; +static void blockComment(Parser* parser) { + parser->pos++; + while (parser->pos++ < parser->end) { + uint16_t ch = scanInput(parser->input, parser->pos); + if (ch == '*' && at(parser, parser->pos + 1) == '/') { + parser->pos++; return; } } } -void lineComment () { - while (pos++ < end) { - uint16_t ch = *pos; +static void lineComment(Parser* parser) { + while (parser->pos++ < parser->end) { + uint16_t ch = scanInput(parser->input, parser->pos); if (ch == '\n' || ch == '\r') return; } } -void stringLiteral (uint16_t quote) { - while (pos++ < end) { - uint16_t ch = *pos; +static void stringLiteral(Parser* parser, uint16_t quote) { + while (parser->pos++ < parser->end) { + uint16_t ch = scanInput(parser->input, parser->pos); if (ch == quote) return; if (ch == '\\') { - ch = *++pos; - if (ch == '\r' && *(pos + 1) == '\n') - pos++; + ch = at(parser, ++parser->pos); + if (ch == '\r' && at(parser, parser->pos + 1) == '\n') + parser->pos++; } else if (isBr(ch)) break; } - syntaxError(9); + syntaxError(parser, CJS_LEXER_ERROR_UNTERMINATED_STRING); } -uint16_t regexCharacterClass () { - while (pos++ < end) { - uint16_t ch = *pos; +static uint16_t regexCharacterClass(Parser* parser) { + while (parser->pos++ < parser->end) { + uint16_t ch = scanInput(parser->input, parser->pos); if (ch == ']') return ch; if (ch == '\\') - pos++; + parser->pos++; else if (ch == '\n' || ch == '\r') break; } - syntaxError(10); + syntaxError(parser, CJS_LEXER_ERROR_UNTERMINATED_REGEX_CLASS); return '\0'; } -void regularExpression () { - while (pos++ < end) { - uint16_t ch = *pos; +static void regularExpression(Parser* parser) { + while (parser->pos++ < parser->end) { + uint16_t ch = scanInput(parser->input, parser->pos); if (ch == '/') return; if (ch == '[') - ch = regexCharacterClass(); + ch = regexCharacterClass(parser); else if (ch == '\\') - pos++; + parser->pos++; else if (ch == '\n' || ch == '\r') break; } - syntaxError(11); + syntaxError(parser, CJS_LEXER_ERROR_UNTERMINATED_REGEX); } -uint16_t readToWsOrPunctuator (uint16_t ch) { - do { - if (isBrOrWs(ch) || isPunctuator(ch)) - return ch; - } while (ch = *(++pos)); - return ch; -} // Note: non-asii BR and whitespace checks omitted for perf / footprint // if there is a significant user need this can be reconsidered -bool isBr (uint16_t c) { +static bool isBr (uint16_t c) { return c == '\r' || c == '\n'; } -bool isBrOrWs (uint16_t c) { +static bool isBrOrWs (uint16_t c) { return c > 8 && c < 14 || c == 32 || c == 160; } -bool isBrOrWsOrPunctuatorNotDot (uint16_t c) { +static bool isBrOrWsOrPunctuatorNotDot (uint16_t c) { return c > 8 && c < 14 || c == 32 || c == 160 || isPunctuator(c) && c != '.'; } -bool str_eq2 (uint16_t* pos, uint16_t c1, uint16_t c2) { - return *pos == c1 && *(pos + 1) == c2; +static bool str_eq2(Parser* parser, Cursor cursor, uint16_t c1, uint16_t c2) { + return hasChars(parser, cursor, 2) && scanInput(parser->input, cursor + 0) == c1 && scanInput(parser->input, cursor + 1) == c2; } -bool str_eq3 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3) { - return *pos == c1 && *(pos + 1) == c2 && *(pos + 2) == c3; +static bool str_eq3(Parser* parser, Cursor cursor, uint16_t c1, uint16_t c2, uint16_t c3) { + return hasChars(parser, cursor, 3) && scanInput(parser->input, cursor + 0) == c1 && scanInput(parser->input, cursor + 1) == c2 && scanInput(parser->input, cursor + 2) == c3; } -bool str_eq4 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4) { - return *pos == c1 && *(pos + 1) == c2 && *(pos + 2) == c3 && *(pos + 3) == c4; +static bool str_eq4(Parser* parser, Cursor cursor, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4) { + return hasChars(parser, cursor, 4) && scanInput(parser->input, cursor + 0) == c1 && scanInput(parser->input, cursor + 1) == c2 && scanInput(parser->input, cursor + 2) == c3 && scanInput(parser->input, cursor + 3) == c4; } -bool str_eq5 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5) { - return *pos == c1 && *(pos + 1) == c2 && *(pos + 2) == c3 && *(pos + 3) == c4 && *(pos + 4) == c5; +static bool str_eq5(Parser* parser, Cursor cursor, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5) { + return hasChars(parser, cursor, 5) && scanInput(parser->input, cursor + 0) == c1 && scanInput(parser->input, cursor + 1) == c2 && scanInput(parser->input, cursor + 2) == c3 && scanInput(parser->input, cursor + 3) == c4 && scanInput(parser->input, cursor + 4) == c5; } -bool str_eq6 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6) { - return *pos == c1 && *(pos + 1) == c2 && *(pos + 2) == c3 && *(pos + 3) == c4 && *(pos + 4) == c5 && *(pos + 5) == c6; +static bool str_eq6(Parser* parser, Cursor cursor, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6) { + return hasChars(parser, cursor, 6) && scanInput(parser->input, cursor + 0) == c1 && scanInput(parser->input, cursor + 1) == c2 && scanInput(parser->input, cursor + 2) == c3 && scanInput(parser->input, cursor + 3) == c4 && scanInput(parser->input, cursor + 4) == c5 && scanInput(parser->input, cursor + 5) == c6; } -bool str_eq7 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7) { - return *pos == c1 && *(pos + 1) == c2 && *(pos + 2) == c3 && *(pos + 3) == c4 && *(pos + 4) == c5 && *(pos + 5) == c6 && *(pos + 6) == c7; +static bool str_eq7(Parser* parser, Cursor cursor, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7) { + return hasChars(parser, cursor, 7) && scanInput(parser->input, cursor + 0) == c1 && scanInput(parser->input, cursor + 1) == c2 && scanInput(parser->input, cursor + 2) == c3 && scanInput(parser->input, cursor + 3) == c4 && scanInput(parser->input, cursor + 4) == c5 && scanInput(parser->input, cursor + 5) == c6 && scanInput(parser->input, cursor + 6) == c7; } -bool str_eq8 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7, uint16_t c8) { - return *pos == c1 && *(pos + 1) == c2 && *(pos + 2) == c3 && *(pos + 3) == c4 && *(pos + 4) == c5 && *(pos + 5) == c6 && *(pos + 6) == c7 && *(pos + 7) == c8; +static bool str_eq8(Parser* parser, Cursor cursor, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7, uint16_t c8) { + return hasChars(parser, cursor, 8) && scanInput(parser->input, cursor + 0) == c1 && scanInput(parser->input, cursor + 1) == c2 && scanInput(parser->input, cursor + 2) == c3 && scanInput(parser->input, cursor + 3) == c4 && scanInput(parser->input, cursor + 4) == c5 && scanInput(parser->input, cursor + 5) == c6 && scanInput(parser->input, cursor + 6) == c7 && scanInput(parser->input, cursor + 7) == c8; } -bool str_eq9 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7, uint16_t c8, uint16_t c9) { - return *pos == c1 && *(pos + 1) == c2 && *(pos + 2) == c3 && *(pos + 3) == c4 && *(pos + 4) == c5 && *(pos + 5) == c6 && *(pos + 6) == c7 && *(pos + 7) == c8 && *(pos + 8) == c9; +static bool str_eq9(Parser* parser, Cursor cursor, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7, uint16_t c8, uint16_t c9) { + return hasChars(parser, cursor, 9) && scanInput(parser->input, cursor + 0) == c1 && scanInput(parser->input, cursor + 1) == c2 && scanInput(parser->input, cursor + 2) == c3 && scanInput(parser->input, cursor + 3) == c4 && scanInput(parser->input, cursor + 4) == c5 && scanInput(parser->input, cursor + 5) == c6 && scanInput(parser->input, cursor + 6) == c7 && scanInput(parser->input, cursor + 7) == c8 && scanInput(parser->input, cursor + 8) == c9; } -bool str_eq10 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7, uint16_t c8, uint16_t c9, uint16_t c10) { - return *pos == c1 && *(pos + 1) == c2 && *(pos + 2) == c3 && *(pos + 3) == c4 && *(pos + 4) == c5 && *(pos + 5) == c6 && *(pos + 6) == c7 && *(pos + 7) == c8 && *(pos + 8) == c9 && *(pos + 9) == c10; +static bool str_eq10(Parser* parser, Cursor cursor, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7, uint16_t c8, uint16_t c9, uint16_t c10) { + return hasChars(parser, cursor, 10) && scanInput(parser->input, cursor + 0) == c1 && scanInput(parser->input, cursor + 1) == c2 && scanInput(parser->input, cursor + 2) == c3 && scanInput(parser->input, cursor + 3) == c4 && scanInput(parser->input, cursor + 4) == c5 && scanInput(parser->input, cursor + 5) == c6 && scanInput(parser->input, cursor + 6) == c7 && scanInput(parser->input, cursor + 7) == c8 && scanInput(parser->input, cursor + 8) == c9 && scanInput(parser->input, cursor + 9) == c10; } -bool str_eq13 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7, uint16_t c8, uint16_t c9, uint16_t c10, uint16_t c11, uint16_t c12, uint16_t c13) { - return *pos == c1 && *(pos + 1) == c2 && *(pos + 2) == c3 && *(pos + 3) == c4 && *(pos + 4) == c5 && *(pos + 5) == c6 && *(pos + 6) == c7 && *(pos + 7) == c8 && *(pos + 8) == c9 && *(pos + 9) == c10 && *(pos + 10) == c11 && *(pos + 11) == c12 && *(pos + 12) == c13; +static bool str_eq13(Parser* parser, Cursor cursor, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7, uint16_t c8, uint16_t c9, uint16_t c10, uint16_t c11, uint16_t c12, uint16_t c13) { + return hasChars(parser, cursor, 13) && scanInput(parser->input, cursor + 0) == c1 && scanInput(parser->input, cursor + 1) == c2 && scanInput(parser->input, cursor + 2) == c3 && scanInput(parser->input, cursor + 3) == c4 && scanInput(parser->input, cursor + 4) == c5 && scanInput(parser->input, cursor + 5) == c6 && scanInput(parser->input, cursor + 6) == c7 && scanInput(parser->input, cursor + 7) == c8 && scanInput(parser->input, cursor + 8) == c9 && scanInput(parser->input, cursor + 9) == c10 && scanInput(parser->input, cursor + 10) == c11 && scanInput(parser->input, cursor + 11) == c12 && scanInput(parser->input, cursor + 12) == c13; } -bool str_eq18 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7, uint16_t c8, uint16_t c9, uint16_t c10, uint16_t c11, uint16_t c12, uint16_t c13, uint16_t c14, uint16_t c15, uint16_t c16, uint16_t c17, uint16_t c18) { - return *pos == c1 && *(pos + 1) == c2 && *(pos + 2) == c3 && *(pos + 3) == c4 && *(pos + 4) == c5 && *(pos + 5) == c6 && *(pos + 6) == c7 && *(pos + 7) == c8 && *(pos + 8) == c9 && *(pos + 9) == c10 && *(pos + 10) == c11 && *(pos + 11) == c12 && *(pos + 12) == c13 && *(pos + 13) == c14 && *(pos + 14) == c15 && *(pos + 15) == c16 && *(pos + 16) == c17 && *(pos + 17) == c18; -} -bool str_eq22 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7, uint16_t c8, uint16_t c9, uint16_t c10, uint16_t c11, uint16_t c12, uint16_t c13, uint16_t c14, uint16_t c15, uint16_t c16, uint16_t c17, uint16_t c18, uint16_t c19, uint16_t c20, uint16_t c21, uint16_t c22) { - return *pos == c1 && *(pos + 1) == c2 && *(pos + 2) == c3 && *(pos + 3) == c4 && *(pos + 4) == c5 && *(pos + 5) == c6 && *(pos + 6) == c7 && *(pos + 7) == c8 && *(pos + 8) == c9 && *(pos + 9) == c10 && *(pos + 10) == c11 && *(pos + 11) == c12 && *(pos + 12) == c13 && *(pos + 13) == c14 && *(pos + 14) == c15 && *(pos + 15) == c16 && *(pos + 16) == c17 && *(pos + 17) == c18 && *(pos + 18) == c19 && *(pos + 19) == c20 && *(pos + 20) == c21 && *(pos + 21) == c22; +static bool str_eq22(Parser* parser, Cursor cursor, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7, uint16_t c8, uint16_t c9, uint16_t c10, uint16_t c11, uint16_t c12, uint16_t c13, uint16_t c14, uint16_t c15, uint16_t c16, uint16_t c17, uint16_t c18, uint16_t c19, uint16_t c20, uint16_t c21, uint16_t c22) { + return hasChars(parser, cursor, 22) && scanInput(parser->input, cursor + 0) == c1 && scanInput(parser->input, cursor + 1) == c2 && scanInput(parser->input, cursor + 2) == c3 && scanInput(parser->input, cursor + 3) == c4 && scanInput(parser->input, cursor + 4) == c5 && scanInput(parser->input, cursor + 5) == c6 && scanInput(parser->input, cursor + 6) == c7 && scanInput(parser->input, cursor + 7) == c8 && scanInput(parser->input, cursor + 8) == c9 && scanInput(parser->input, cursor + 9) == c10 && scanInput(parser->input, cursor + 10) == c11 && scanInput(parser->input, cursor + 11) == c12 && scanInput(parser->input, cursor + 12) == c13 && scanInput(parser->input, cursor + 13) == c14 && scanInput(parser->input, cursor + 14) == c15 && scanInput(parser->input, cursor + 15) == c16 && scanInput(parser->input, cursor + 16) == c17 && scanInput(parser->input, cursor + 17) == c18 && scanInput(parser->input, cursor + 18) == c19 && scanInput(parser->input, cursor + 19) == c20 && scanInput(parser->input, cursor + 20) == c21 && scanInput(parser->input, cursor + 21) == c22; } -bool keywordStart (uint16_t* pos) { - return pos == source || isBrOrWsOrPunctuatorNotDot(*(pos - 1)); +static bool keywordStart(Parser* parser, Cursor cursor) { + return cursor == SOURCE_START || isBrOrWsOrPunctuatorNotDot(at(parser, cursor - 1)); } -bool readPrecedingKeyword1 (uint16_t* pos, uint16_t c1) { - if (pos < source) return false; - return *pos == c1 && (pos == source || isBrOrWsOrPunctuatorNotDot(*(pos - 1))); +static bool readPrecedingKeyword1(Parser* parser, Cursor cursor, uint16_t c1) { + if (cursor < SOURCE_START) return false; + return at(parser, cursor) == c1 && (cursor == SOURCE_START || isBrOrWsOrPunctuatorNotDot(at(parser, cursor - 1))); } -bool readPrecedingKeyword2 (uint16_t* pos, uint16_t c1, uint16_t c2) { - if (pos - 1 < source) return false; - return str_eq2(pos - 1, c1, c2) && (pos - 1 == source || isBrOrWsOrPunctuatorNotDot(*(pos - 2))); +static bool readPrecedingKeyword2(Parser* parser, Cursor cursor, uint16_t c1, uint16_t c2) { + if (cursor - 1 < SOURCE_START) return false; + return str_eq2(parser, cursor - 1, c1, c2) && (cursor - 1 == SOURCE_START || isBrOrWsOrPunctuatorNotDot(at(parser, cursor - 2))); } -bool readPrecedingKeyword3 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3) { - if (pos - 2 < source) return false; - return str_eq3(pos - 2, c1, c2, c3) && (pos - 2 == source || isBrOrWsOrPunctuatorNotDot(*(pos - 3))); +static bool readPrecedingKeyword3(Parser* parser, Cursor cursor, uint16_t c1, uint16_t c2, uint16_t c3) { + if (cursor - 2 < SOURCE_START) return false; + return str_eq3(parser, cursor - 2, c1, c2, c3) && (cursor - 2 == SOURCE_START || isBrOrWsOrPunctuatorNotDot(at(parser, cursor - 3))); } -bool readPrecedingKeyword4 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4) { - if (pos - 3 < source) return false; - return str_eq4(pos - 3, c1, c2, c3, c4) && (pos - 3 == source || isBrOrWsOrPunctuatorNotDot(*(pos - 4))); +static bool readPrecedingKeyword4(Parser* parser, Cursor cursor, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4) { + if (cursor - 3 < SOURCE_START) return false; + return str_eq4(parser, cursor - 3, c1, c2, c3, c4) && (cursor - 3 == SOURCE_START || isBrOrWsOrPunctuatorNotDot(at(parser, cursor - 4))); } -bool readPrecedingKeyword5 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5) { - if (pos - 4 < source) return false; - return str_eq5(pos - 4, c1, c2, c3, c4, c5) && (pos - 4 == source || isBrOrWsOrPunctuatorNotDot(*(pos - 5))); +static bool readPrecedingKeyword5(Parser* parser, Cursor cursor, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5) { + if (cursor - 4 < SOURCE_START) return false; + return str_eq5(parser, cursor - 4, c1, c2, c3, c4, c5) && (cursor - 4 == SOURCE_START || isBrOrWsOrPunctuatorNotDot(at(parser, cursor - 5))); } -bool readPrecedingKeyword6 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6) { - if (pos - 5 < source) return false; - return str_eq6(pos - 5, c1, c2, c3, c4, c5, c6) && (pos - 5 == source || isBrOrWsOrPunctuatorNotDot(*(pos - 6))); +static bool readPrecedingKeyword6(Parser* parser, Cursor cursor, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6) { + if (cursor - 5 < SOURCE_START) return false; + return str_eq6(parser, cursor - 5, c1, c2, c3, c4, c5, c6) && (cursor - 5 == SOURCE_START || isBrOrWsOrPunctuatorNotDot(at(parser, cursor - 6))); } -bool readPrecedingKeyword7 (uint16_t* pos, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7) { - if (pos - 6 < source) return false; - return str_eq7(pos - 6, c1, c2, c3, c4, c5, c6, c7) && (pos - 6 == source || isBrOrWsOrPunctuatorNotDot(*(pos - 7))); +static bool readPrecedingKeyword7(Parser* parser, Cursor cursor, uint16_t c1, uint16_t c2, uint16_t c3, uint16_t c4, uint16_t c5, uint16_t c6, uint16_t c7) { + if (cursor - 6 < SOURCE_START) return false; + return str_eq7(parser, cursor - 6, c1, c2, c3, c4, c5, c6, c7) && (cursor - 6 == SOURCE_START || isBrOrWsOrPunctuatorNotDot(at(parser, cursor - 7))); } // Detects one of case, debugger, delete, do, else, in, instanceof, new, // return, throw, typeof, void, yield ,await -bool isExpressionKeyword (uint16_t* pos) { - switch (*pos) { +static bool isExpressionKeyword(Parser* parser, Cursor cursor) { + switch (at(parser, cursor)) { case 'd': - switch (*(pos - 1)) { + switch (at(parser, cursor - 1)) { case 'i': // void - return readPrecedingKeyword2(pos - 2, 'v', 'o'); + return readPrecedingKeyword2(parser, cursor - 2, 'v', 'o'); case 'l': // yield - return readPrecedingKeyword3(pos - 2, 'y', 'i', 'e'); + return readPrecedingKeyword3(parser, cursor - 2, 'y', 'i', 'e'); default: return false; } case 'e': - switch (*(pos - 1)) { + switch (at(parser, cursor - 1)) { case 's': - switch (*(pos - 2)) { + switch (at(parser, cursor - 2)) { case 'l': // else - return readPrecedingKeyword1(pos - 3, 'e'); + return readPrecedingKeyword1(parser, cursor - 3, 'e'); case 'a': // case - return readPrecedingKeyword1(pos - 3, 'c'); + return readPrecedingKeyword1(parser, cursor - 3, 'c'); default: return false; } case 't': // delete - return readPrecedingKeyword4(pos - 2, 'd', 'e', 'l', 'e'); + return readPrecedingKeyword4(parser, cursor - 2, 'd', 'e', 'l', 'e'); default: return false; } case 'f': - if (*(pos - 1) != 'o' || *(pos - 2) != 'e') + if (at(parser, cursor - 1) != 'o' || at(parser, cursor - 2) != 'e') return false; - switch (*(pos - 3)) { + switch (at(parser, cursor - 3)) { case 'c': // instanceof - return readPrecedingKeyword6(pos - 4, 'i', 'n', 's', 't', 'a', 'n'); + return readPrecedingKeyword6(parser, cursor - 4, 'i', 'n', 's', 't', 'a', 'n'); case 'p': // typeof - return readPrecedingKeyword2(pos - 4, 't', 'y'); + return readPrecedingKeyword2(parser, cursor - 4, 't', 'y'); default: return false; } case 'n': // in, return - return readPrecedingKeyword1(pos - 1, 'i') || readPrecedingKeyword5(pos - 1, 'r', 'e', 't', 'u', 'r'); + return readPrecedingKeyword1(parser, cursor - 1, 'i') || readPrecedingKeyword5(parser, cursor - 1, 'r', 'e', 't', 'u', 'r'); case 'o': // do - return readPrecedingKeyword1(pos - 1, 'd'); + return readPrecedingKeyword1(parser, cursor - 1, 'd'); case 'r': // debugger - return readPrecedingKeyword7(pos - 1, 'd', 'e', 'b', 'u', 'g', 'g', 'e'); + return readPrecedingKeyword7(parser, cursor - 1, 'd', 'e', 'b', 'u', 'g', 'g', 'e'); case 't': // await - return readPrecedingKeyword4(pos - 1, 'a', 'w', 'a', 'i'); + return readPrecedingKeyword4(parser, cursor - 1, 'a', 'w', 'a', 'i'); case 'w': - switch (*(pos - 1)) { + switch (at(parser, cursor - 1)) { case 'e': // new - return readPrecedingKeyword1(pos - 2, 'n'); + return readPrecedingKeyword1(parser, cursor - 2, 'n'); case 'o': // throw - return readPrecedingKeyword3(pos - 2, 't', 'h', 'r'); + return readPrecedingKeyword3(parser, cursor - 2, 't', 'h', 'r'); default: - return false; + return false; } } return false; } -bool isParenKeyword (uint16_t* curPos) { - return readPrecedingKeyword5(curPos, 'w', 'h', 'i', 'l', 'e') || - readPrecedingKeyword3(curPos, 'f', 'o', 'r') || - readPrecedingKeyword2(curPos, 'i', 'f'); +static bool isParenKeyword(Parser* parser, Cursor curPos) { + return readPrecedingKeyword5(parser, curPos, 'w', 'h', 'i', 'l', 'e') || + readPrecedingKeyword3(parser, curPos, 'f', 'o', 'r') || + readPrecedingKeyword2(parser, curPos, 'i', 'f'); } -bool isPunctuator (uint16_t ch) { +static bool isPunctuator (uint16_t ch) { // 23 possible punctuator endings: !%&()*+,-./:;<=>?[]^{}|~ return ch == '!' || ch == '%' || ch == '&' || ch > 39 && ch < 48 || ch > 57 && ch < 64 || @@ -1711,70 +1719,70 @@ bool isPunctuator (uint16_t ch) { ch > 122 && ch < 127; } -bool isExpressionPunctuator (uint16_t ch) { +static bool isExpressionPunctuator (uint16_t ch) { // 20 possible expression endings: !%&(*+,-.:;<=>?[^{|~ return ch == '!' || ch == '%' || ch == '&' || ch > 39 && ch < 47 && ch != 41 || ch > 57 && ch < 64 || ch == '[' || ch == '^' || ch > 122 && ch < 127 && ch != '}'; } -static uint16_t* precedingToken (uint16_t* curPos) { - while (curPos) { - while (isBrOrWs(*curPos)) { - if (curPos == source) return NULL; +static Cursor precedingToken(Parser* parser, Cursor curPos) { + while (curPos >= SOURCE_START) { + while (isBrOrWs(at(parser, curPos))) { + if (curPos == SOURCE_START) return SOURCE_BEFORE; curPos--; } - if (*curPos != '/' || curPos == source || *(curPos - 1) != '*') + if (at(parser, curPos) != '/' || curPos == SOURCE_START || at(parser, curPos - 1) != '*') return curPos; - if (curPos == source + 1) return NULL; + if (curPos == SOURCE_START + 1) return SOURCE_BEFORE; curPos -= 2; - while (curPos > source && !(*curPos == '*' && *(curPos - 1) == '/')) curPos--; - if (curPos <= source + 1) return NULL; + while (curPos > SOURCE_START && !(at(parser, curPos) == '*' && at(parser, curPos - 1) == '/')) curPos--; + if (curPos <= SOURCE_START + 1) return SOURCE_BEFORE; curPos -= 2; } - return NULL; + return SOURCE_BEFORE; } -static bool isStatementBrace (uint16_t* curPos, uint16_t depth) { - while (curPos && curPos != EMPTY_CHAR) { - uint16_t ch = *curPos; +static bool isStatementBrace(Parser* parser, Cursor curPos, uint16_t depth) { + while (curPos >= SOURCE_START) { + uint16_t ch = at(parser, curPos); if (ch == '{' && depth) { - curPos = openTokenPosStack[--depth]; + curPos = parser->openTokenPosStack[--depth]; continue; } if (ch != ':') - return ch == '}' || isExpressionTerminator(curPos); - if (curPos == source) return false; - curPos = precedingToken(curPos - 1); - if (!curPos) return false; - uint16_t* start = curPos; + return ch == '}' || isExpressionTerminator(parser, curPos); + if (curPos == SOURCE_START) return false; + curPos = precedingToken(parser, curPos - 1); + if (curPos < SOURCE_START) return false; + Cursor start = curPos; bool identifierStart = false; - uint16_t quote = *start; + uint16_t quote = at(parser, start); if (quote == '\'' || quote == '"') { - while (start > source) { + while (start > SOURCE_START) { start--; - if (*start != quote) continue; - uint16_t* before = start; - while (before > source && *(before - 1) == '\\') before--; + if (at(parser, start) != quote) continue; + Cursor before = start; + while (before > SOURCE_START && at(parser, before - 1) == '\\') before--; if ((start - before) % 2 == 0) break; } - if (start == source) return false; + if (start == SOURCE_START) return false; start--; } else { - while (start >= source && isIdentifierChar(fullCharCodeAtLast(start))) { - uint32_t codePoint = fullCharCodeAtLast(start); + while (start >= SOURCE_START && isIdentifierChar(fullCharCodeAtLast(parser, start))) { + uint32_t codePoint = fullCharCodeAtLast(parser, start); identifierStart = isIdentifierStart(codePoint); uint32_t length = charCodeByteLen(codePoint); - if ((size_t)(start - source) < length) return identifierStart; + if ((size_t)sourceIndex(parser, start) < length) return identifierStart; start -= length; } } - curPos = precedingToken(start); - if (curPos && (*curPos == '+' || *curPos == '-')) - curPos = curPos == source ? NULL : precedingToken(curPos - 1); - if (curPos && curPos - source >= 3 && str_eq4(curPos - 3, 'c', 'a', 's', 'e') && - (curPos == source + 3 || !isIdentifierChar(fullCharCodeAtLast(curPos - 4)) && *(curPos - 4) != '.')) + curPos = precedingToken(parser, start); + if (curPos >= SOURCE_START && (at(parser, curPos) == '+' || at(parser, curPos) == '-')) + curPos = curPos == SOURCE_START ? SOURCE_BEFORE : precedingToken(parser, curPos - 1); + if (curPos >= SOURCE_START && curPos >= SOURCE_START + 3 && str_eq4(parser, curPos - 3, 'c', 'a', 's', 'e') && + (curPos == SOURCE_START + 3 || !isIdentifierChar(fullCharCodeAtLast(parser, curPos - 4)) && at(parser, curPos - 4) != '.')) return true; if (!identifierStart) return false; @@ -1782,34 +1790,30 @@ static bool isStatementBrace (uint16_t* curPos, uint16_t depth) { return true; } -bool isExpressionTerminator (uint16_t* curPos) { +static bool isExpressionTerminator(Parser* parser, Cursor curPos) { // detects: // > ; ) -1 finally catch // as all of these followed by a { will indicate a statement brace - switch (*curPos) { + switch (at(parser, curPos)) { case '>': - return *(curPos - 1) == '='; + return at(parser, curPos - 1) == '='; case ';': case ')': return true; case 'h': - return readPrecedingKeyword4(curPos - 1, 'c', 'a', 't', 'c'); + return readPrecedingKeyword4(parser, curPos - 1, 'c', 'a', 't', 'c'); case 'y': - return readPrecedingKeyword6(curPos - 1, 'f', 'i', 'n', 'a', 'l', 'l'); + return readPrecedingKeyword6(parser, curPos - 1, 'f', 'i', 'n', 'a', 'l', 'l'); case 'e': - return readPrecedingKeyword3(curPos - 1, 'e', 'l', 's'); + return readPrecedingKeyword3(parser, curPos - 1, 'e', 'l', 's'); } return false; } -void bail (uint32_t err) { - error = 1; - parse_error = err; - pos = end + 1; -} - -void syntaxError (uint32_t code) { - if (error == 0) error = code; - parse_error = pos - source; - pos = end + 1; +static void syntaxError(Parser* parser, uint32_t code) { + if (parser->error == 0) { + parser->error = code; + parser->parse_error = sourceIndex(parser, parser->pos); + } + parser->pos = parser->end + 1; } diff --git a/src/lexer.js b/src/lexer.js index cb6509e..a580797 100755 --- a/src/lexer.js +++ b/src/lexer.js @@ -18,15 +18,17 @@ export function parse (source, name = '@', options) { initSync(); const len = source.length; + if (len === 0) + return { exports: [], reexports: [] }; - // sa(len) writes a terminator at index len. + // The guest reserves 32 zero code units before the source and a terminator. let memory = wasm.memory.buffer; - const extraMem = (wasm.__heap_base.value || wasm.__heap_base) + (len + 1) * 2 - memory.byteLength; + const extraMem = (wasm.__heap_base.value || wasm.__heap_base) + (len + 33) * 2 - memory.byteLength; if (extraMem > 0) { wasm.memory.grow(Math.ceil(extraMem / 65536)); memory = wasm.memory.buffer; } - + const addr = wasm.sa(len); // Buffer setup is slower than the loop for short sources. if (len >= 64 && hasBuffer) @@ -45,7 +47,7 @@ export function parse (source, name = '@', options) { } let exports = new Set(), reexports = new Set(), unsafeGetters; - + while (wasm.rre()) { const reexptStr = decode(source.slice(wasm.res(), wasm.ree())); if (reexptStr !== undefined) @@ -71,7 +73,7 @@ function decode (str) { // Filter to exclude non-matching UTF-16 surrogate strings for (let i = 0; i < decoded.length; i++) { const surrogatePrefix = decoded.charCodeAt(i) & 0xFC00; - if (surrogatePrefix < 0xD800) { + if (surrogatePrefix < 0xD800 || surrogatePrefix >= 0xE000) { // Not a surrogate continue; } @@ -81,7 +83,7 @@ function decode (str) { return; } else { - // Out-of-range surrogate code (above 0xD800) + // Unpaired low surrogate return; } } diff --git a/src/native.c b/src/native.c new file mode 100644 index 0000000..2c3d305 --- /dev/null +++ b/src/native.c @@ -0,0 +1,313 @@ +#include "lexer-internal.h" + +typedef union { + uint16_t code; + StarExportBinding binding; +} ArenaValue; + +typedef struct ArenaBlock { + struct ArenaBlock* next; + size_t used; + size_t capacity; + ArenaValue data[]; +} ArenaBlock; + +typedef struct { + Cursor start; + Cursor end; + cjs_lexer_string16 value; + uint32_t hash; +} Candidate; + +typedef struct { + Candidate* data; + size_t count; + size_t capacity; +} Candidates; + +struct cjs_lexer_result { + Candidates candidates[CandidateKindCount]; + ArenaBlock* blocks; +}; + +void cjs_lexer_clear_reexports(cjs_lexer_result* result) { + result->candidates[ReexportCandidate].count = 0; +} + +void* cjs_lexer_allocate(cjs_lexer_result* result, size_t size) { + const size_t alignment = _Alignof(ArenaValue); + if (size > SIZE_MAX - alignment + 1) return NULL; + size = (size + alignment - 1) & ~(alignment - 1); + ArenaBlock* block = result->blocks; + if (!block || size > block->capacity - block->used) { + size_t capacity = size > 4096 ? size : 4096; + if (capacity > SIZE_MAX - sizeof(ArenaBlock)) return NULL; + block = malloc(sizeof(ArenaBlock) + capacity); + if (!block) return NULL; + block->next = result->blocks; + block->used = 0; + block->capacity = capacity; + result->blocks = block; + } + void* value = (unsigned char*)block->data + block->used; + block->used += size; + return value; +} + +void cjs_lexer_add(Parser* parser, CandidateKind kind, Cursor start, Cursor end) { + if (parser->error) return; + if (start < 0 || end < start || (size_t)end > parser->sourceLen) return; + Candidates* list = &parser->result->candidates[kind]; + if (list->count == list->capacity) { + size_t capacity = list->capacity ? list->capacity * 2 : 16; + if (capacity < list->capacity || capacity > SIZE_MAX / sizeof(Candidate)) { + parser->error = CJS_LEXER_ERROR_ALLOCATION; + parser->pos = parser->end + 1; + return; + } + Candidate* data = realloc(list->data, capacity * sizeof(Candidate)); + if (!data) { + parser->error = CJS_LEXER_ERROR_ALLOCATION; + parser->pos = parser->end + 1; + return; + } + list->data = data; + list->capacity = capacity; + } + Candidate* candidate = &list->data[list->count++]; + candidate->start = start; + candidate->end = end; +} + +static int readHex(uint16_t code) { + if (code >= '0' && code <= '9') return code - '0'; + if (code >= 'a' && code <= 'f') return code - 'a' + 10; + if (code >= 'A' && code <= 'F') return code - 'A' + 10; + return -1; +} + +static bool validQuotedString(cjs_lexer_string16 value) { + for (size_t index = 0; index < value.length; index++) { + uint16_t prefix = value.data[index] & 0xfc00; + if (prefix < 0xd800 || prefix >= 0xe000) continue; + if (prefix != 0xd800 || ++index == value.length || + (value.data[index] & 0xfc00) != 0xdc00) return false; + } + return true; +} + +/* Return -1 on allocation failure, 0 for a rejected name, 1 for a view. */ +static int decode(cjs_lexer_result* result, const uint16_t* source, Candidate* candidate) { + size_t start = (size_t)candidate->start; + size_t end = (size_t)candidate->end; + candidate->value.data = source + start; + candidate->value.length = end - start; + if (start == end || (source[start] != '\'' && source[start] != '"')) return 1; + if (end - start < 2 || source[end - 1] != source[start]) return 0; + start++; + end--; + candidate->value.data = source + start; + candidate->value.length = end - start; + size_t first = start; + while (first < end && source[first] != '\\') first++; + if (first == end) return validQuotedString(candidate->value); + if (end - start > SIZE_MAX / sizeof(uint16_t)) return -1; + uint16_t* output = cjs_lexer_allocate(result, (end - start) * sizeof(uint16_t)); + if (!output) return -1; + size_t written = first - start; + memcpy(output, source + start, written * sizeof(uint16_t)); + for (size_t index = first; index < end; index++) { + uint32_t code = source[index]; + if (code == '\\') { + if (++index == end) return 0; + code = source[index]; + switch (code) { + case '\r': + if (index + 1 < end && source[index + 1] == '\n') index++; + continue; + case '\n': case 0x2028: case 0x2029: continue; + case 'r': code = '\r'; break; + case 'n': code = '\n'; break; + case 't': code = '\t'; break; + case 'b': code = '\b'; break; + case 'f': code = '\f'; break; + case 'v': code = '\v'; break; + case 'x': case 'u': { + bool braced = code == 'u' && index + 1 < end && source[index + 1] == '{'; + size_t digits = code == 'x' ? 2 : 4; + code = 0; + if (braced) { + index++; + size_t count = 0; + while (++index < end && source[index] != '}') { + int digit = readHex(source[index]); + if (digit < 0 || code > (0x10ffffU - (uint32_t)digit) / 16) return 0; + code = code * 16 + (uint32_t)digit; + count++; + } + if (!count || index == end) return 0; + } else { + if (digits > end - index - 1) return 0; + while (digits--) { + int digit = readHex(source[++index]); + if (digit < 0) return 0; + code = code * 16 + (uint32_t)digit; + } + } + break; + } + default: + if (code >= '0' && code <= '7') { + size_t remaining = code <= '3' ? 2 : 1; + code -= '0'; + while (remaining-- && index + 1 < end && source[index + 1] >= '0' && source[index + 1] <= '7') + code = code * 8 + source[++index] - '0'; + } + } + } + if (code > 0xffff) { + code -= 0x10000; + output[written++] = (uint16_t)(0xd800 | (code >> 10)); + output[written++] = (uint16_t)(0xdc00 | (code & 0x3ff)); + } else { + output[written++] = (uint16_t)code; + } + } + candidate->value.data = output; + candidate->value.length = written; + return validQuotedString(candidate->value); +} + +static bool normalize(cjs_lexer_result* result, const uint16_t* source, Candidates* list) { + size_t count = 0; + for (size_t index = 0; index < list->count; index++) { + Candidate value; + value.start = list->data[index].start; + value.end = list->data[index].end; + value.hash = 0; + int status = decode(result, source, &value); + if (status < 0) return false; + if (!status) continue; + list->data[count++] = value; + } + list->count = count; + return true; +} + +static int compareNames(const void* left, const void* right) { + const Candidate* first = left; + const Candidate* second = right; + if (first->hash != second->hash) return first->hash < second->hash ? -1 : 1; + if (first->value.length != second->value.length) + return first->value.length < second->value.length ? -1 : 1; + return memcmp(first->value.data, second->value.data, first->value.length * sizeof(uint16_t)); +} + +static void hashNames(Candidates* list) { + for (size_t index = 0; index < list->count; index++) { + Candidate* candidate = &list->data[index]; + uint32_t hash = UINT32_C(2166136261); + for (size_t unit = 0; unit < candidate->value.length; unit++) + hash = (hash ^ candidate->value.data[unit]) * UINT32_C(16777619); + candidate->hash = hash; + } +} + +uint32_t cjs_lexer_parse_utf16(const uint16_t* source, size_t length, + uint32_t flags, cjs_lexer_result** result, + cjs_lexer_error* error) { + if (error) *error = (cjs_lexer_error){0, 0, 0}; + if (!result) return CJS_LEXER_INVALID_ARGUMENT; + *result = NULL; + if ((!source && length) || (flags & ~UINT32_C(3))) return CJS_LEXER_INVALID_ARGUMENT; + if (length > UINT32_MAX || length > (size_t)PTRDIFF_MAX - 32 || + length > SIZE_MAX / sizeof(uint16_t)) return CJS_LEXER_LIMIT; + cjs_lexer_result* output = malloc(sizeof(cjs_lexer_result)); + if (!output) return CJS_LEXER_OUT_OF_MEMORY; + *output = (cjs_lexer_result){0}; + Parser parser; + parser.input = source; + parser.sourceLen = length; + parser.pos = -1; + parser.end = (ptrdiff_t)length - 1; + parser.lastTokenPos = -1; + parser.exportObjectPos = -1; + parser.templateStackDepth = 0; + parser.openTokenDepth = 0; + parser.templateDepth = UINT16_MAX; + parser.lastSlashWasDivision = false; + parser.nextBraceIsClass = false; + parser.allowMinifiedEnumerable = (flags & CJS_LEXER_ALLOW_MINIFIED_ENUMERABLE) != 0; + parser.extended = (flags & CJS_LEXER_EXTENDED) != 0; + parser.error = 0; + parser.parse_error = 0; + parser.starExportBinding_ = (StarExportBinding){0}; + parser.firstStarExport = NULL; + parser.lastStarExport = NULL; + parser.result = output; + Candidates* exports = &output->candidates[ExportCandidate]; + Candidates* reexports = &output->candidates[ReexportCandidate]; + Candidates* unsafe_getters = &output->candidates[UnsafeGetterCandidate]; + uint32_t status = cjs_lexer_scan(&parser); + if (status) { + if (error && status != CJS_LEXER_ERROR_ALLOCATION) { + error->code = status; + error->has_offset = 1; + error->offset = parser.parse_error > length ? length : parser.parse_error; + } + status = status == CJS_LEXER_ERROR_ALLOCATION ? CJS_LEXER_OUT_OF_MEMORY : + status == CJS_LEXER_ERROR_NESTING_LIMIT ? CJS_LEXER_LIMIT : CJS_LEXER_SYNTAX_ERROR; + } else if (!normalize(output, source, exports) || + !normalize(output, source, reexports) || + !normalize(output, source, unsafe_getters)) { + status = CJS_LEXER_OUT_OF_MEMORY; + } else if (unsafe_getters->count) { + hashNames(exports); + hashNames(unsafe_getters); + qsort(unsafe_getters->data, unsafe_getters->count, sizeof(Candidate), compareNames); + size_t count = 0; + for (size_t index = 0; index < exports->count; index++) { + Candidate candidate = exports->data[index]; + if (!bsearch(&candidate, unsafe_getters->data, unsafe_getters->count, + sizeof(Candidate), compareNames)) exports->data[count++] = candidate; + } + exports->count = count; + } + if (status) { + cjs_lexer_result_free(output); + return status; + } + free(unsafe_getters->data); + *unsafe_getters = (Candidates){0}; + *result = output; + return CJS_LEXER_OK; +} + +size_t cjs_lexer_export_count(const cjs_lexer_result* result) { + return result->candidates[ExportCandidate].count; +} + +size_t cjs_lexer_reexport_count(const cjs_lexer_result* result) { + return result->candidates[ReexportCandidate].count; +} + +cjs_lexer_string16 cjs_lexer_export(const cjs_lexer_result* result, size_t index) { + return result->candidates[ExportCandidate].data[index].value; +} + +cjs_lexer_string16 cjs_lexer_reexport(const cjs_lexer_result* result, size_t index) { + return result->candidates[ReexportCandidate].data[index].value; +} + +void cjs_lexer_result_free(cjs_lexer_result* result) { + if (!result) return; + ArenaBlock* block = result->blocks; + while (block) { + ArenaBlock* next = block->next; + free(block); + block = next; + } + for (size_t index = 0; index < CandidateKindCount; index++) + free(result->candidates[index].data); + free(result); +} diff --git a/src/wasm.c b/src/wasm.c new file mode 100644 index 0000000..1c2004e --- /dev/null +++ b/src/wasm.c @@ -0,0 +1,120 @@ +#define CJS_LEXER_WASM +#include "lexer-internal.h" + +typedef struct Slice { + Cursor start; + Cursor end; + struct Slice* next; +} Slice; + +typedef struct { + Slice* first; + Slice* last; + Slice* read; +} Candidates; + +struct cjs_lexer_result { + Candidates candidates[CandidateKindCount]; +}; + +extern unsigned char __heap_base; +static Parser parser; +static cjs_lexer_result result; +static uint64_t analysis_head; +static uint64_t analysis_limit; + +static __attribute__((noinline)) void growAnalysis(uint64_t required) { + uint32_t pages = (required - analysis_limit + 65535) >> 16; + if (__builtin_wasm_memory_grow(0, pages) == (size_t)-1) __builtin_trap(); + analysis_limit += (uint64_t)pages << 16; +} + +void* cjs_lexer_allocate(cjs_lexer_result* unused, size_t size) { + uint64_t required = analysis_head + size; + if (required > analysis_limit) growAnalysis(required); + void* allocation = (void*)(uintptr_t)analysis_head; + analysis_head = required; + return allocation; +} + +static __attribute__((noinline)) void appendCandidate(Candidates* list, Cursor start, Cursor end) { + Slice* slice = cjs_lexer_allocate(NULL, sizeof(Slice)); + slice->start = start; + slice->end = end; + slice->next = NULL; + if (list->last) list->last->next = slice; + else list->first = slice; + list->last = slice; +} + +__attribute__((always_inline)) void cjs_lexer_add(Parser* parser, CandidateKind kind, Cursor start, Cursor end) { + appendCandidate(&parser->result->candidates[kind], start, end); +} + +static __attribute__((noinline)) void clearCandidates(Candidates* list) { + *list = (Candidates){0}; +} + +void cjs_lexer_clear_reexports(cjs_lexer_result* result) { + clearCandidates(&result->candidates[ReexportCandidate]); +} + +uint16_t* sa(uint32_t length) { + if (length > (size_t)PTRDIFF_MAX - 32) __builtin_trap(); + uint16_t* source = (uint16_t*)(void*)&__heap_base + 32; + source[length] = 0; + analysis_head = ((uintptr_t)(source + length + 1) + _Alignof(Slice) - 1) & + ~((uintptr_t)_Alignof(Slice) - 1); + analysis_limit = (uint64_t)__builtin_wasm_memory_size(0) << 16; + for (size_t index = 0; index < CandidateKindCount; index++) + clearCandidates(&result.candidates[index]); + return source; +} + +uint32_t parseCJSWithOptions(uint16_t* source, uint32_t length, uint32_t unused1, + uint32_t unused2, uint32_t unused3, uint32_t unused4, + uint32_t flags) { + parser.input = source; + parser.sourceLen = length; + parser.pos = source - 1; + parser.end = source + length - 1; + parser.lastTokenPos = source - 1; + parser.exportObjectPos = source - 1; + parser.templateStackDepth = 0; + parser.openTokenDepth = 0; + parser.templateDepth = UINT16_MAX; + parser.lastSlashWasDivision = false; + parser.nextBraceIsClass = false; + parser.allowMinifiedEnumerable = (flags & CJS_LEXER_ALLOW_MINIFIED_ENUMERABLE) != 0; + parser.extended = (flags & CJS_LEXER_EXTENDED) != 0; + parser.error = 0; + parser.parse_error = 0; + parser.firstStarExport = NULL; + parser.lastStarExport = NULL; + parser.result = &result; + return cjs_lexer_scan(&parser); +} + +uint32_t parseCJS(uint16_t* source, uint32_t length, uint32_t unused1, + uint32_t unused2, uint32_t unused3, uint32_t unused4) { + return parseCJSWithOptions(source, length, 0, 0, 0, 0, 0); +} + +uint32_t e(void) { return parser.parse_error; } +uint32_t es(void) { return result.candidates[ExportCandidate].read->start - parser.input; } +uint32_t ee(void) { return result.candidates[ExportCandidate].read->end - parser.input; } +uint32_t res(void) { return result.candidates[ReexportCandidate].read->start - parser.input; } +uint32_t ree(void) { return result.candidates[ReexportCandidate].read->end - parser.input; } +uint32_t us(void) { return result.candidates[UnsafeGetterCandidate].read->start - parser.input; } +uint32_t ue(void) { return result.candidates[UnsafeGetterCandidate].read->end - parser.input; } + +static bool readCandidate(Candidates* list) { + list->read = list->read ? list->read->next : list->first; + return list->read != NULL; +} + +bool re(void) { return readCandidate(&result.candidates[ExportCandidate]); } +bool rre(void) { return readCandidate(&result.candidates[ReexportCandidate]); } +bool ru(void) { return readCandidate(&result.candidates[UnsafeGetterCandidate]); } + +#include "lexer.c" diff --git a/test/_unit.js b/test/_unit.js index 3eccde1..cc9239b 100755 --- a/test/_unit.js +++ b/test/_unit.js @@ -3,6 +3,10 @@ const assert = require('node:assert/strict'); let parse; async function loadParser () { if (parse) return; + if (process.env.NATIVE) { + parse = require('./native/parser.js').parse; + return; + } if (process.env.WASM) { const m = await import('../dist/lexer.mjs'); await m.init(); @@ -930,6 +934,21 @@ suite('Lexer', () => { parse(`\nconst x = num / /'/.exec(l)[0].slice(1, -1)//'"`); }); + test('Closing tokens consumed by export helpers do not reuse earlier brace metadata', () => { + for (const source of [ + 'module.exports={a}/1;exports.b=2;', + 'class A{};module.exports={a}/* comment *//1;exports.b=2;', + 'if(x) require("x")/1;exports.b=2;', + 'if(x){};Object.defineProperty(exports,"a",{value:1})/1;exports.b=2;', + 'class A{}/* comment *//[}]/.test("}");exports.b=2;', + 'if(x)/* comment *//[)]/.test(")");exports.b=2;' + ]) { + for (const mode of ['default', 'extended']) { + assert.equal(parse(source, '@', { mode }).exports.at(-1), 'b'); + } + } + }); + test('Multiline string escapes', () => { parse("const str = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAABmJLR0QA/wAAAAAzJ3zzAAAGTElEQV\\\r\n\t\tRIx+VXe1BU1xn/zjn7ugvL4sIuQnll5U0ELAQxig7WiQYz6NRHa6O206qdSXXSxs60dTK200zNY9q0dcRpMs1jkrRNWmaijCVoaU';\r\n"); }); @@ -1199,6 +1218,36 @@ suite('Lexer', () => { parse(`//`); }); + test('Quoted names preserve raw UTF-16 code units', () => { + const value = '\u001a\u0a0d\u0d0a'; + assert.deepStrictEqual(parse(`exports['${value}'] = 1; module.exports = require('${value}');`), { + exports: [value], + reexports: [value] + }); + }); + + test('Quoted Unicode names preserve the BMP around surrogate boundaries', () => { + const accepted = ['\ud7ff', '\ue000', '\uf900', '\uff21', '\ufffd', '\uffff', '\ud800\udc00', '\udbff\udfff']; + const rejected = ['\ud800', '\udbff', '\udc00', '\udfff', '\ud800A', '\udbff\ue000']; + for (const value of [...accepted, ...rejected]) { + let escaped = ''; + for (let index = 0; index < value.length; index++) { + escaped += '\\u' + value.charCodeAt(index).toString(16).padStart(4, '0'); + } + for (const quoted of [JSON.stringify(value), '"' + escaped + '"']) { + const expected = accepted.includes(value) ? [value] : []; + assert.deepStrictEqual(parse(`exports[${quoted}] = 1; module.exports = require(${quoted});`), { + exports: expected, + reexports: expected + }); + } + } + assert.deepStrictEqual(parse("exports['\ue000'] = 1; Object.defineProperty(exports, '\\ue000', { get() { return effect(); } });"), { + exports: [], + reexports: [] + }); + }); + test('Simple export with unicode conversions', () => { const source = `export var pð“€€s,q`; assert.throws(() => { @@ -1365,6 +1414,11 @@ function x() { }); }); + test('Reports the first syntax error offset', () => { + const offsetKey = process.env.NATIVE || process.env.WASM || process.env.WASM_SYNC ? 'idx' : 'loc'; + assert.throws(() => parse('/[\nexports.b=2;'), { [offsetKey]: 2 }); + }); + test('Bracket matching', () => { assert.ok(parse(` instance.extend('parseExprAtom', function (nextMethod) { diff --git a/test/extended.js b/test/extended.js index 9ea9a6b..460d316 100644 --- a/test/extended.js +++ b/test/extended.js @@ -5,6 +5,10 @@ const options = { mode: 'extended' }; suite('Extended parsing', () => { suiteSetup(async () => { + if (process.env.NATIVE) { + parse = require('./native/parser.js').parse; + return; + } if (process.env.WASM) { const lexer = await import('../dist/lexer.mjs'); await lexer.init(); @@ -51,6 +55,35 @@ suite('Extended parsing', () => { }); } + test('empty export objects do not add names', () => { + for (const source of [ + 'module.exports = {};', 'module.exports = ({ /* empty */ });', + 'Object.defineProperties(exports, {});', 'Object.defineProperties(module.exports, {});', + 'Object.defineProperties(exports, ({ /* empty */ }));' + ]) { + assert.deepEqual(parse(source, 'fixture.cjs', options), { exports: [], reexports: [] }); + } + }); + + test('trailing commas do not add empty names', () => { + for (const source of [ + 'module.exports = { first: 1, };', 'module.exports = ({ first: 1, /* trailing */ });', + 'Object.defineProperties(exports, { first: { value: 1 }, });', + 'Object.defineProperties(module.exports, ({ first: { value: 1 }, /* trailing */ }));' + ]) { + assert.deepEqual(parse(source, 'fixture.cjs', options), { exports: ['first'], reexports: [] }); + } + }); + + test('empty string property names remain exports', () => { + for (const source of [ + "module.exports = { '': 1 };", "module.exports = { ['']: 1, };", + "Object.defineProperties(exports, { '': { value: 1 } });" + ]) { + assert.deepEqual(parse(source, 'fixture.cjs', options), { exports: [''], reexports: [] }); + } + }); + test('descriptors with computed constant names', () => { const result = parse(`Object.defineProperties(module.exports, { ['first']: { get() { return factory().value; } }, second: { value: 2 } diff --git a/test/integration.js b/test/integration.js index 1a99de9..2b0c8e9 100755 --- a/test/integration.js +++ b/test/integration.js @@ -4,6 +4,10 @@ const assert = require('assert'); let parse; async function loadParser () { if (parse) return; + if (process.env.NATIVE) { + parse = require('./native/parser.js').parse; + return; + } if (process.env.WASM) { const m = await import('../dist/lexer.mjs'); await m.init(); diff --git a/test/native/consumer/CMakeLists.txt b/test/native/consumer/CMakeLists.txt new file mode 100644 index 0000000..e434c41 --- /dev/null +++ b/test/native/consumer/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 3.15) +project(consumer LANGUAGES C CXX) +find_package(cjs_module_lexer CONFIG REQUIRED) +add_executable(consumer_c main.c) +add_executable(consumer_cpp main.cc) +target_link_libraries(consumer_c PRIVATE cjs_module_lexer::cjs_module_lexer) +target_link_libraries(consumer_cpp PRIVATE cjs_module_lexer::cjs_module_lexer) +enable_testing() +add_test(NAME consumer_c COMMAND consumer_c) +add_test(NAME consumer_cpp COMMAND consumer_cpp) diff --git a/test/native/consumer/main.c b/test/native/consumer/main.c new file mode 100644 index 0000000..1809d40 --- /dev/null +++ b/test/native/consumer/main.c @@ -0,0 +1,12 @@ +#include + +int main(void) { + const uint16_t source[] = {'e', 'x', 'p', 'o', 'r', 't', 's', '.', 'a', '=', '1'}; + cjs_lexer_result* result; + if (cjs_lexer_parse_utf16(source, sizeof(source) / sizeof(source[0]), 0, &result, NULL)) return 1; + if (cjs_lexer_export_count(result) != 1 || cjs_lexer_reexport_count(result)) return 1; + cjs_lexer_string16 name = cjs_lexer_export(result, 0); + int status = name.length != 1 || name.data[0] != 'a'; + cjs_lexer_result_free(result); + return status; +} diff --git a/test/native/consumer/main.cc b/test/native/consumer/main.cc new file mode 100644 index 0000000..0f793e2 --- /dev/null +++ b/test/native/consumer/main.cc @@ -0,0 +1 @@ +#include "main.c" diff --git a/test/native/failures.c b/test/native/failures.c new file mode 100644 index 0000000..a7e8fc6 --- /dev/null +++ b/test/native/failures.c @@ -0,0 +1,63 @@ +#include "cjs-module-lexer.h" +#include +#include +#include + +static size_t calls; +static size_t fail_at; +static size_t live; + +void* cjs_test_malloc(size_t size) { + if (++calls == fail_at) return NULL; + void* result = malloc(size); + if (result) live++; + return result; +} + +void* cjs_test_realloc(void* pointer, size_t size) { + if (++calls == fail_at) return NULL; + int fresh = pointer == NULL; + void* result = realloc(pointer, size); + if (result && fresh) live++; + return result; +} + +void cjs_test_free(void* pointer) { + if (pointer) live--; + free(pointer); +} + +int main(void) { + const char* pattern = "var dep=require('dep');exports['a\\u0062']=1;" + "Object.defineProperty(exports,'ab',{get(){return effect()}});__exportStar(require('side'));"; + size_t length = strlen(pattern) * 256; + uint16_t* source = malloc(length * sizeof(uint16_t)); + assert(source); + for (size_t index = 0; index < length; index++) source[index] = (unsigned char)pattern[index % strlen(pattern)]; + size_t allocations = 0; + for (size_t failure = 0; failure <= allocations + 1; failure++) { + calls = 0; + fail_at = failure; + cjs_lexer_result* result; + cjs_lexer_error error; + uint32_t status = cjs_lexer_parse_utf16(source, length, 0, &result, &error); + if (!failure) allocations = calls; + if (failure && failure <= allocations) { + assert(status == CJS_LEXER_OUT_OF_MEMORY); + assert(!result); + assert(!error.code && !error.has_offset && !error.offset); + } else { + assert(status == CJS_LEXER_OK); + assert(cjs_lexer_export_count(result) == 0); + assert(cjs_lexer_reexport_count(result) == 256); + cjs_lexer_result_free(result); + } + assert(!live); + fail_at = 0; + assert(cjs_lexer_parse_utf16(source, length, 0, &result, NULL) == CJS_LEXER_OK); + cjs_lexer_result_free(result); + assert(!live); + } + free(source); + return 0; +} diff --git a/test/native/fuzz.c b/test/native/fuzz.c new file mode 100644 index 0000000..09c95ab --- /dev/null +++ b/test/native/fuzz.c @@ -0,0 +1,25 @@ +#include "cjs-module-lexer.h" +#include + +int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { + if (!size) return 0; + size_t length = (size - 1) / 2; + uint16_t* source = malloc(length * sizeof(uint16_t)); + if (!source && length) return 0; + for (size_t index = 0; index < length; index++) + source[index] = (uint16_t)(data[index * 2 + 1] | (uint16_t)data[index * 2 + 2] << 8); + cjs_lexer_result* result; + cjs_lexer_error error; + cjs_lexer_parse_utf16(source, length, data[0] & 3, &result, &error); + if (result) { + for (size_t index = 0; index < cjs_lexer_export_count(result); index++) { + cjs_lexer_string16 value = cjs_lexer_export(result, index); + volatile uint16_t unit = 0; + for (size_t offset = 0; offset < value.length; offset++) unit = value.data[offset]; + (void)unit; + } + } + cjs_lexer_result_free(result); + free(source); + return 0; +} diff --git a/test/native/parse.c b/test/native/parse.c new file mode 100644 index 0000000..5bd3984 --- /dev/null +++ b/test/native/parse.c @@ -0,0 +1,57 @@ +#include "cjs-module-lexer.h" +#include +#include +#ifdef _WIN32 +#include +#include +#endif + +static void string(cjs_lexer_string16 value) { + putchar('"'); + for (size_t index = 0; index < value.length; index++) printf("\\u%04x", value.data[index]); + putchar('"'); +} + +int main(int argc, char** argv) { +#ifdef _WIN32 + if (_setmode(_fileno(stdin), _O_BINARY) == -1) return 1; +#endif + uint32_t flags = argc > 1 ? (uint32_t)strtoul(argv[1], NULL, 10) : 0; + size_t length = 0; + size_t capacity = 1024; + uint16_t* source = malloc(capacity * sizeof(uint16_t)); + if (!source) return 1; + int low; + while ((low = getchar()) != EOF) { + int high = getchar(); + if (high == EOF) return 1; + if (length == capacity) { + capacity *= 2; + uint16_t* next = realloc(source, capacity * sizeof(uint16_t)); + if (!next) { free(source); return 1; } + source = next; + } + source[length++] = (uint16_t)(low | high << 8); + } + cjs_lexer_result* result; + cjs_lexer_error error; + uint32_t status = cjs_lexer_parse_utf16(source, length, flags, &result, &error); + if (status) { + printf("{\"status\":%u,\"code\":%u,\"idx\":%zu}\n", status, error.code, error.offset); + } else { + printf("{\"exports\":["); + for (size_t index = 0; index < cjs_lexer_export_count(result); index++) { + if (index) putchar(','); + string(cjs_lexer_export(result, index)); + } + printf("],\"reexports\":["); + for (size_t index = 0; index < cjs_lexer_reexport_count(result); index++) { + if (index) putchar(','); + string(cjs_lexer_reexport(result, index)); + } + printf("]}\n"); + cjs_lexer_result_free(result); + } + free(source); + return 0; +} diff --git a/test/native/parser.js b/test/native/parser.js new file mode 100644 index 0000000..a1b0264 --- /dev/null +++ b/test/native/parser.js @@ -0,0 +1,26 @@ +const { execFileSync } = require('node:child_process'); +const path = require('node:path'); + +/** + * @param {string} source + * @param {string} name + * @param {import('../../lexer').ParseOptions} options + */ +exports.parse = function parse (source, name = '@', options) { + const mode = options?.mode; + if (mode !== undefined && mode !== 'default' && mode !== 'extended') + throw new TypeError('Expected options.mode to be "default" or "extended".'); + const flags = (options?.allowMinifiedEnumerable === true ? 1 : 0) | (mode === 'extended' ? 2 : 0); + const executable = process.env.NATIVE_LEXER || path.join(__dirname, + process.platform === 'win32' ? '../../build/native/Debug/native_parse.exe' : '../../build/native/native_parse'); + const result = JSON.parse(execFileSync(executable, [String(flags)], { + input: Buffer.from(source, 'utf16le'), maxBuffer: 16 * 1024 * 1024 + })); + if (result.status) { + const error = new Error(`Parse error ${name}${result.idx}`); + error.idx = result.idx; + if (result.code === 5 || result.code === 6 || result.code === 7) error.code = 'ERR_LEXER_ESM_SYNTAX'; + throw error; + } + return { exports: [...new Set(result.exports)], reexports: [...new Set(result.reexports)] }; +}; diff --git a/test/native/test.c b/test/native/test.c new file mode 100644 index 0000000..bb6da57 --- /dev/null +++ b/test/native/test.c @@ -0,0 +1,161 @@ +#include "cjs-module-lexer.h" +#include +#include +#include + +static uint16_t* copy(const char* source, size_t length) { + uint16_t* data = malloc(length * sizeof(uint16_t)); + assert(data || !length); + for (size_t index = 0; index < length; index++) data[index] = (unsigned char)source[index]; + return data; +} + +static void name(cjs_lexer_string16 value, const char* expected) { + assert(value.length == strlen(expected)); + for (size_t index = 0; index < value.length; index++) assert(value.data[index] == (unsigned char)expected[index]); +} + +int main(void) { + cjs_lexer_result* result = NULL; + cjs_lexer_error error = {99, 99, 99}; + assert(cjs_lexer_parse_utf16(NULL, 0, 0, &result, &error) == CJS_LEXER_OK); + assert(cjs_lexer_export_count(result) == 0); + assert(!error.code && !error.has_offset && !error.offset); + cjs_lexer_result_free(result); + assert(cjs_lexer_parse_utf16(NULL, 1, 0, &result, &error) == CJS_LEXER_INVALID_ARGUMENT); + assert(!result && !error.has_offset); + assert(cjs_lexer_parse_utf16(NULL, 0, 4, &result, &error) == CJS_LEXER_INVALID_ARGUMENT); + assert(!result); + assert(cjs_lexer_parse_utf16(NULL, 0, 0, NULL, &error) == CJS_LEXER_INVALID_ARGUMENT); + uint16_t unit = 0; + assert(cjs_lexer_parse_utf16(&unit, SIZE_MAX, 0, &result, &error) == CJS_LEXER_LIMIT); + assert(!result && !error.has_offset); + const struct { + const char* text; + uint32_t flags; + uint32_t code; + size_t offset; + } syntax_errors[] = { + {"}", 0, CJS_LEXER_ERROR_UNEXPECTED_CLOSING_BRACE, 0}, + {")", 0, CJS_LEXER_ERROR_UNBALANCED_DELIMITER, 0}, + {"]", CJS_LEXER_EXTENDED, CJS_LEXER_ERROR_UNBALANCED_DELIMITER, 0}, + {"`", 0, CJS_LEXER_ERROR_UNTERMINATED_TEMPLATE, 1}, + {"`${0}", 0, CJS_LEXER_ERROR_UNTERMINATED_TEMPLATE, 5}, + {"`${0", 0, CJS_LEXER_ERROR_UNEXPECTED_EOF, 4}, + {"/[\nexports.b=2;", 0, CJS_LEXER_ERROR_UNTERMINATED_REGEX_CLASS, 2}, + {"import.meta", 0, CJS_LEXER_ERROR_UNEXPECTED_IMPORT_META, 6}, + {"import x from 'package'", 0, CJS_LEXER_ERROR_UNEXPECTED_ESM_IMPORT, 7}, + {"export const x = 1", 0, CJS_LEXER_ERROR_UNEXPECTED_ESM_EXPORT, 7} + }; + for (size_t index = 0; index < sizeof(syntax_errors) / sizeof(*syntax_errors); index++) { + size_t count = strlen(syntax_errors[index].text); + uint16_t* source = copy(syntax_errors[index].text, count); + assert(cjs_lexer_parse_utf16(source, count, syntax_errors[index].flags, &result, &error) == CJS_LEXER_SYNTAX_ERROR); + assert(!result && error.code == syntax_errors[index].code && error.has_offset); + assert(error.offset == syntax_errors[index].offset); + free(source); + } + const char* divisions[] = { + "module.exports={a}/1;exports.b=2;", + "class A{};module.exports={a}/1;exports.b=2;", + "if(x) require('x')/1;exports.b=2;", + "if(x){};Object.defineProperty(exports,'a',{value:1})/1;exports.b=2;" + }; + for (size_t index = 0; index < sizeof(divisions) / sizeof(*divisions); index++) { + size_t count = strlen(divisions[index]); + uint16_t* division = copy(divisions[index], count); + assert(cjs_lexer_parse_utf16(division, count, 0, &result, &error) == CJS_LEXER_OK); + name(cjs_lexer_export(result, cjs_lexer_export_count(result) - 1), "b"); + cjs_lexer_result_free(result); + free(division); + } + const char* text = "exports.a=1;exports['\\u0061']=2;exports.b=3;" + "Object.defineProperty(exports,'b',{get(){return effect()}});" + "__exportStar(require('first'));module.exports=require('last');"; + size_t length = strlen(text); + uint16_t* source = copy(text, length); + assert(cjs_lexer_parse_utf16(source, length, 0, &result, &error) == CJS_LEXER_OK); + assert(cjs_lexer_export_count(result) == 2); + name(cjs_lexer_export(result, 0), "a"); + name(cjs_lexer_export(result, 1), "a"); + assert(cjs_lexer_reexport_count(result) == 1); + name(cjs_lexer_reexport(result, 0), "last"); + cjs_lexer_result* other; + assert(cjs_lexer_parse_utf16(source, length, CJS_LEXER_EXTENDED, &other, NULL) == CJS_LEXER_OK); + assert(cjs_lexer_export_count(other) == 4); + assert(cjs_lexer_reexport_count(other) == 2); + cjs_lexer_result_free(other); + name(cjs_lexer_export(result, 1), "a"); + cjs_lexer_result_free(result); + // Every prefix uses an exact allocation, including truncated lookahead and escapes. + for (size_t count = 0; count <= length; count++) { + uint16_t* prefix = copy(text, count); + uint32_t status = cjs_lexer_parse_utf16(prefix, count, 0, &result, &error); + assert(status == CJS_LEXER_OK || status == CJS_LEXER_SYNTAX_ERROR); + assert(!error.has_offset || error.offset <= count); + cjs_lexer_result_free(result); + free(prefix); + } + free(source); + const char* scans[] = { + "const value=`a\\`b${1}c`;exports.after=1;", + "/* a* * / **/exports.after=1;", + "// a\\\r\nexports.after=1;", + "const value=/a\\/[b\\]c]*/;exports.after=1;", + "module.exports=(first,second,{});exports.after=1;", + "Object.defineProperty(exports,'item',{value:1});exports.after=1;", + "Object.defineProperties(exports,{item:{value:1}});exports.after=1;", + "_interopRequireWildcard(require('item'));__exportStar(require('other'));exports.after=1;" + }; + for (size_t index = 0; index < sizeof(scans) / sizeof(*scans); index++) { + length = strlen(scans[index]); + for (uint32_t flags = 0; flags <= 3; flags++) { + for (size_t count = 0; count <= length; count++) { + source = copy(scans[index], count); + uint32_t status = cjs_lexer_parse_utf16(source, count, flags, &result, &error); + assert(status == CJS_LEXER_OK || status == CJS_LEXER_SYNTAX_ERROR); + assert(!error.has_offset || error.offset <= count); + if (count == length) { + assert(status == CJS_LEXER_OK); + assert(cjs_lexer_export_count(result)); + name(cjs_lexer_export(result, cjs_lexer_export_count(result) - 1), "after"); + } + cjs_lexer_result_free(result); + free(source); + } + } + } + // The nesting boundary and recovery share the public parse path. + for (size_t depth = 2047; depth <= 2049; depth++) { + source = malloc(depth * 4); + assert(source); + for (size_t index = 0; index < depth; index++) { + source[index] = '('; + source[depth + index] = ')'; + } + uint32_t status = cjs_lexer_parse_utf16(source, depth * 2, 0, &result, &error); + assert(status == (depth <= 2048 ? CJS_LEXER_OK : CJS_LEXER_LIMIT)); + if (depth > 2048) assert(error.code == CJS_LEXER_ERROR_NESTING_LIMIT && error.has_offset && error.offset == 2048); + cjs_lexer_result_free(result); + free(source); + } + assert(cjs_lexer_parse_utf16(&unit, 1, 0, &result, NULL) == CJS_LEXER_OK); + cjs_lexer_result_free(result); + // Deterministic malformed UTF-16 exercises both modes without padding. + uint32_t random = 42; + for (size_t iteration = 0; iteration < 20000; iteration++) { + length = iteration % 128; + source = malloc(length * sizeof(uint16_t)); + for (size_t index = 0; index < length; index++) { + random = random * UINT32_C(1664525) + UINT32_C(1013904223); + source[index] = (iteration & 1) ? (uint16_t)(random >> 16) : (uint16_t)(random % 128); + } + uint32_t status = cjs_lexer_parse_utf16(source, length, (uint32_t)iteration & 3, &result, &error); + assert(status == CJS_LEXER_OK || status == CJS_LEXER_SYNTAX_ERROR || status == CJS_LEXER_LIMIT); + assert(!error.has_offset || error.offset <= length); + cjs_lexer_result_free(result); + free(source); + } + cjs_lexer_result_free(NULL); + return 0; +} diff --git a/test/native/threads.cc b/test/native/threads.cc new file mode 100644 index 0000000..8ad52c8 --- /dev/null +++ b/test/native/threads.cc @@ -0,0 +1,42 @@ +#include "cjs-module-lexer.h" +#include +#include +#include +#include +#include + +int main() { + std::mutex mutex; + std::condition_variable ready; + unsigned waiting = 0; + std::vector workers; + for (unsigned worker = 0; worker < 8; worker++) { + workers.emplace_back([&, worker]() { + std::vector source; + for (char unit : "exports['\\u0061']=1;module.exports=require('dep');") { + if (unit) source.push_back(static_cast(unit)); + } + std::unique_lock lock(mutex); + waiting++; + ready.notify_all(); + ready.wait(lock, [&]() { return waiting == 8; }); + lock.unlock(); + for (unsigned iteration = 0; iteration < 1000; iteration++) { + cjs_lexer_result* first; + cjs_lexer_result* second; + cjs_lexer_error error; + assert(cjs_lexer_parse_utf16(source.data(), source.size(), worker & 3, &first, &error) == CJS_LEXER_OK); + assert(cjs_lexer_parse_utf16(source.data(), source.size(), 0, &second, nullptr) == CJS_LEXER_OK); + auto name = cjs_lexer_export(first, 0); + assert(name.length == 1 && name.data[0] == 'a'); + auto specifier = cjs_lexer_reexport(second, 0); + assert(specifier.length == 3 && specifier.data[0] == 'd'); + cjs_lexer_result_free(iteration & 1 ? first : second); + if (!(iteration & 1)) assert(cjs_lexer_export(first, 0).data[0] == 'a'); + else assert(cjs_lexer_reexport(second, 0).data[0] == 'd'); + cjs_lexer_result_free(iteration & 1 ? second : first); + } + }); + } + for (auto& worker : workers) worker.join(); +} diff --git a/test/wasm-memory.js b/test/wasm-memory.js index a2d974f..fe4d0be 100644 --- a/test/wasm-memory.js +++ b/test/wasm-memory.js @@ -22,7 +22,7 @@ suite('Wasm analysis capacity', () => { const prefix = 'var v=0;module.exports={'; const suffix = 'v};' + tail; // Each shorthand adds 4 source bytes and a 12-byte Slice. - const available = bytes - wasm.__heap_base.value - 2 * (prefix.length + suffix.length + 1) - 12; + const available = bytes - wasm.__heap_base.value - 2 * (prefix.length + suffix.length + 33) - 12; const count = Math.floor((available - remaining) / 16); const padding = (available - count * 16 - remaining) / 2; const source = prefix + 'v,'.repeat(count) + suffix + ' '.repeat(padding); @@ -60,7 +60,7 @@ suite('Wasm binding capacity', () => { const bytes = memory.byteLength; const prefix = 'var v=0;module.exports={'; const suffix = 'v};var last=require("last");' + reexport; - const available = bytes - wasm.__heap_base.value - 2 * (prefix.length + suffix.length + 1) - 12; + const available = bytes - wasm.__heap_base.value - 2 * (prefix.length + suffix.length + 33) - 12; const count = Math.floor((available - remaining) / 16); const padding = (available - count * 16 - remaining) / 2; const source = prefix + 'v,'.repeat(count) + suffix + ' '.repeat(padding); @@ -169,7 +169,7 @@ suite('Wasm source reservation', () => { globalThis.Buffer = originalBuffer; if (mode === 'async') await lexer.init(); if (mode === 'sync') lexer.initSync(); - const length = (bytes - heap - remaining) / 2 - 1; + const length = (bytes - heap - remaining) / 2 - 33; const source = ' '.repeat(length - tail.length) + tail; const result = lexer.parse(source); assert.deepStrictEqual(result, expected);